@quandis/qbo4.configuration 4.0.1-CI-20250218-171324 → 4.0.1-CI-20250306-185422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/wwwroot/js/esm/qbo4.configuration.js +31 -9
- package/wwwroot/js/esm/qbo4.configuration.min.js +1 -1
- package/wwwroot/js/esm/qbo4.configuration.min.js.map +1 -1
- package/wwwroot/js/qbo4.configuration.js +31 -9
- package/wwwroot/js/qbo4.configuration.min.js +10 -10
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! For license information please see qbo4.configuration.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.qbo4=e():(t.qbo4=t.qbo4||{},t.qbo4.configuration=e())}(self,(()=>(()=>{var t={630:(t,e,o)=>{var r;!function(t){!function(){var e="object"==typeof globalThis?globalThis:"object"==typeof o.g?o.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),r=i(t);function i(t,e){return function(o,r){Object.defineProperty(t,o,{configurable:!0,writable:!0,value:r}),e&&e(o,r)}}void 0!==e.Reflect&&(r=i(e.Reflect,r)),function(t,e){var o=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,l=!a&&!s,d={create:a?function(){return V(Object.create(null))}:s?function(){return V({__proto__:null})}:function(){return V({})},has:l?function(t,e){return o.call(t,e)}:function(t,e){return e in t},get:l?function(t,e){return o.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),h="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],o=function(){function t(t,e,o){this._index=0,this._keys=t,this._values=e,this._selector=o}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var o=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:o,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var o=this._find(t,!0);return this._values[o]=e,this},e.prototype.delete=function(e){var o=this._find(e,!1);if(o>=0){for(var r=this._keys.length,i=o+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,M(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new o(this._keys,this._values,r)},e.prototype.values=function(){return new o(this._keys,this._values,i)},e.prototype.entries=function(){return new o(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[n]=function(){return this.entries()},e.prototype._find=function(t,e){if(!M(this._cacheKey,t)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(M(this._keys[o],t)){this._cacheIndex=o;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}(),p="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[n]=function(){return this.keys()},t}(),u="function"==typeof WeakMap?WeakMap:function(){var t=d.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&d.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?d.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(d.has(t,e));return t[e]=!0,e}function i(t,r){if(!o.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:d.create()})}return t[e]}function n(t,e){for(var o=0;o<e;++o)t[o]=255*Math.random()|0;return t}function a(){var t=function(t){if("function"==typeof Uint8Array){var e=new Uint8Array(t);return"undefined"!=typeof crypto?crypto.getRandomValues(e):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(e):n(e,t),e}return n(new Array(t),t)}(16);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var e="",o=0;o<16;++o){var r=t[o];4!==o&&6!==o&&8!==o||(e+="-"),r<16&&(e+="0"),e+=r.toString(16).toLowerCase()}return e}}(),m=r?Symbol.for("@reflect-metadata:registry"):void 0,f=function(){var t;return!S(m)&&$(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[m]),S(t)&&(t=function(){var t,o,r,i;S(m)||void 0===e.Reflect||m in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,o=t.hasOwnMetadata,r=t.getOwnMetadata,i=t.getOwnMetadataKeys,n=t.deleteMetadata,a=new u;return{isProviderFor:function(t,e){var o=a.get(t);return!(S(o)||!o.has(e))||!!i(t,e).length&&(S(o)&&(o=new p,a.set(t,o)),o.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:o,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:n}}(e.Reflect));var n=new u,a={registerProvider:s,getProvider:d,setProvider:f};return a;function s(e){if(!Object.isExtensible(a))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case S(o):o=e;break;case o===e:break;case S(r):r=e;break;case r===e:break;default:void 0===i&&(i=new p),i.add(e)}}function l(e,n){if(!S(o)){if(o.isProviderFor(e,n))return o;if(!S(r)){if(r.isProviderFor(e,n))return o;if(!S(i))for(var a=j(i);;){var s=X(a);if(!s)return;var l=z(s);if(l.isProviderFor(e,n))return _(a),l}}}if(!S(t)&&t.isProviderFor(e,n))return t}function d(t,e){var o,r=n.get(t);return S(r)||(o=r.get(e)),S(o)?(S(o=l(t,e))||(S(r)&&(r=new h,n.set(t,r)),r.set(e,o)),o):o}function c(t){if(S(t))throw new TypeError;return o===t||r===t||!S(i)&&i.has(t)}function f(t,e,o){if(!c(o))throw new Error("Metadata provider not registered.");var r=d(t,e);if(r!==o){if(!S(r))return!1;var i=n.get(t);S(i)&&(i=new h,n.set(t,i)),i.set(e,o)}return!0}}()),!S(m)&&$(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,m,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),b=function(t){var e=new u,o={isProviderFor:function(t,o){var r=e.get(t);return!S(r)&&r.has(o)},OrdinaryDefineOwnMetadata:function(t,e,o,i){r(o,i,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,o){var i=r(e,o,!1);return!S(i)&&C(i.has(t))},OrdinaryGetOwnMetadata:function(t,e,o){var i=r(e,o,!1);if(!S(i))return i.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var o=[],i=r(t,e,!1);if(S(i))return o;for(var n=j(i.keys()),a=0;;){var s=X(n);if(!s)return o.length=a,o;var l=z(s);try{o[a]=l}catch(t){try{_(n)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,o,i){var n=r(o,i,!1);if(S(n))return!1;if(!n.delete(t))return!1;if(0===n.size){var a=e.get(o);S(a)||(a.delete(i),0===a.size&&e.delete(a))}return!0}};return f.registerProvider(o),o;function r(r,i,n){var a=e.get(r),s=!1;if(S(a)){if(!n)return;a=new h,e.set(r,a),s=!0}var l=a.get(i);if(S(l)){if(!n)return;if(l=new h,a.set(i,l),!t.setProvider(r,i,o))throw a.delete(i),s&&e.delete(r),new Error("Wrong provider for target.")}return l}}(f);function g(t,e,o){if(v(t,e,o))return!0;var r=D(e);return!Q(r)&&g(t,r,o)}function v(t,e,o){var r=U(e,o,!1);return!S(r)&&C(r.OrdinaryHasOwnMetadata(t,e,o))}function O(t,e,o){if(v(t,e,o))return y(t,e,o);var r=D(e);return Q(r)?void 0:O(t,r,o)}function y(t,e,o){var r=U(e,o,!1);if(!S(r))return r.OrdinaryGetOwnMetadata(t,e,o)}function x(t,e,o,r){U(o,r,!0).OrdinaryDefineOwnMetadata(t,e,o,r)}function w(t,e){var o=k(t,e),r=D(t);if(null===r)return o;var i=w(r,e);if(i.length<=0)return o;if(o.length<=0)return i;for(var n=new p,a=[],s=0,l=o;s<l.length;s++){var d=l[s];n.has(d)||(n.add(d),a.push(d))}for(var c=0,h=i;c<h.length;c++)d=h[c],n.has(d)||(n.add(d),a.push(d));return a}function k(t,e){var o=U(t,e,!1);return o?o.OrdinaryOwnMetadataKeys(t,e):[]}function q(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function S(t){return void 0===t}function Q(t){return null===t}function $(t){return"object"==typeof t?null!==t:"function"==typeof t}function P(t,e){switch(q(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var o=3===e?"string":5===e?"number":"default",r=E(t,i);if(void 0!==r){var n=r.call(t,o);if($(n))throw new TypeError;return n}return function(t,e){if("string"===e){var o=t.toString;if(T(o)&&!$(i=o.call(t)))return i;if(T(r=t.valueOf)&&!$(i=r.call(t)))return i}else{var r;if(T(r=t.valueOf)&&!$(i=r.call(t)))return i;var i,n=t.toString;if(T(n)&&!$(i=n.call(t)))return i}throw new TypeError}(t,"default"===o?"number":o)}function C(t){return!!t}function R(t){var e=P(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function Z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function T(t){return"function"==typeof t}function A(t){return"function"==typeof t}function M(t,e){return t===e||t!=t&&e!=e}function E(t,e){var o=t[e];if(null!=o){if(!T(o))throw new TypeError;return o}}function j(t){var e=E(t,n);if(!T(e))throw new TypeError;var o=e.call(t);if(!$(o))throw new TypeError;return o}function z(t){return t.value}function X(t){var e=t.next();return!e.done&&e}function _(t){var e=t.return;e&&e.call(t)}function D(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var o=t.prototype,r=o&&Object.getPrototypeOf(o);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function U(t,e,o){var r=f.getProvider(t,e);if(!S(r))return r;if(o){if(f.setProvider(t,e,b))return b;throw new Error("Illegal state.")}}function V(t){return t.__=void 0,delete t.__,t}t("decorate",(function(t,e,o,r){if(S(o)){if(!Z(t))throw new TypeError;if(!A(e))throw new TypeError;return function(t,e){for(var o=t.length-1;o>=0;--o){var r=(0,t[o])(e);if(!S(r)&&!Q(r)){if(!A(r))throw new TypeError;e=r}}return e}(t,e)}if(!Z(t))throw new TypeError;if(!$(e))throw new TypeError;if(!$(r)&&!S(r)&&!Q(r))throw new TypeError;return Q(r)&&(r=void 0),function(t,e,o,r){for(var i=t.length-1;i>=0;--i){var n=(0,t[i])(e,o,r);if(!S(n)&&!Q(n)){if(!$(n))throw new TypeError;r=n}}return r}(t,e,o=R(o),r)})),t("metadata",(function(t,e){return function(o,r){if(!$(o))throw new TypeError;if(!S(r)&&!function(t){switch(q(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;x(t,e,o,r)}})),t("defineMetadata",(function(t,e,o,r){if(!$(o))throw new TypeError;return S(r)||(r=R(r)),x(t,e,o,r)})),t("hasMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),g(t,e,o)})),t("hasOwnMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),v(t,e,o)})),t("getMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),O(t,e,o)})),t("getOwnMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),y(t,e,o)})),t("getMetadataKeys",(function(t,e){if(!$(t))throw new TypeError;return S(e)||(e=R(e)),w(t,e)})),t("getOwnMetadataKeys",(function(t,e){if(!$(t))throw new TypeError;return S(e)||(e=R(e)),k(t,e)})),t("deleteMetadata",(function(t,e,o){if(!$(e))throw new TypeError;if(S(o)||(o=R(o)),!$(e))throw new TypeError;S(o)||(o=R(o));var r=U(e,o,!1);return!S(r)&&r.OrdinaryDeleteMetadata(t,e,o)}))}(r,e),void 0===e.Reflect&&(e.Reflect=t)}()}(r||(r={}))}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t;o.r(r),o.d(r,{Configuration:()=>hi,ConfigurationSection:()=>ci,EmptyConfigurationSource:()=>di,IConfigurationSourceToken:()=>ni,IConfigurationToken:()=>ai,JsonConfigurationSource:()=>li,QboConfigEditor:()=>fi,QboCss:()=>xw,QboTemplate:()=>vw,QboTemplateMixin:()=>gw,css:()=>K,html:()=>zt,iterateConfig:()=>si,redefineCustomElements:()=>ww,template:()=>bw,templates:()=>fw}),o(630),function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(t||(t={}));const e=t;var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},i(t,e)};function n(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function a(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}function d(t){return!!t.useClass}function c(t){return!!t.useFactory}var h=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var e,o=this,r=!1;return new Proxy({},this.createHandler((function(){return r||(e=t(o.wrap()),r=!0),e})))},t.prototype.createHandler=function(t){var e={};return this.reflectMethods.forEach((function(o){e[o]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e[0]=t(),Reflect[o].apply(void 0,l(e))}})),e},t}();function p(t){return"string"==typeof t||"symbol"==typeof t}function u(t){return"object"==typeof t&&"token"in t&&"transform"in t}function m(t){return!!t.useToken}function f(t){return null!=t.useValue}const b=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(t){return this.ensure(t),this._registryMap.get(t)},t.prototype.get=function(t){this.ensure(t);var e=this._registryMap.get(t);return e[e.length-1]||null},t.prototype.set=function(t,e){this.ensure(t),this._registryMap.get(t).push(e)},t.prototype.setAll=function(t,e){this._registryMap.set(t,e)},t.prototype.has=function(t){return this.ensure(t),this._registryMap.get(t).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(t){this._registryMap.has(t)||this._registryMap.set(t,[])},t}(),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b),v=function(){this.scopedResolutions=new Map};var O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b);const x=function(){this.preResolution=new O,this.postResolution=new y};var w=new Map,k=function(){function t(t){this.parent=t,this._registry=new g,this.interceptors=new x,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(t,o,r){var i;if(void 0===r&&(r={lifecycle:e.Transient}),this.ensureNotDisposed(),i=function(t){return d(t)||f(t)||m(t)||c(t)}(o)?o:{useClass:o},m(i))for(var n=[t],a=i;null!=a;){var s=a.useToken;if(n.includes(s))throw new Error("Token registration cycle detected! "+l(n,[s]).join(" -> "));n.push(s);var h=this._registry.get(s);a=h&&m(h.provider)?h.provider:null}if((r.lifecycle===e.Singleton||r.lifecycle==e.ContainerScoped||r.lifecycle==e.ResolutionScoped)&&(f(i)||c(i)))throw new Error('Cannot use lifecycle "'+e[r.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:i,options:r}),this},t.prototype.registerType=function(t,e){return this.ensureNotDisposed(),p(e)?this.register(t,{useToken:e}):this.register(t,{useClass:e})},t.prototype.registerInstance=function(t,e){return this.ensureNotDisposed(),this.register(t,{useValue:e})},t.prototype.registerSingleton=function(t,o){if(this.ensureNotDisposed(),p(t)){if(p(o))return this.register(t,{useToken:o},{lifecycle:e.Singleton});if(o)return this.register(t,{useClass:o},{lifecycle:e.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var r=t;return o&&!p(o)&&(r=o),this.register(t,{useClass:r},{lifecycle:e.Singleton})},t.prototype.resolve=function(t,e){void 0===e&&(e=new v),this.ensureNotDisposed();var o=this.getRegistration(t);if(!o&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),o){var r=this.resolveRegistration(o,e);return this.executePostResolutionInterceptor(t,r,"Single"),r}if(function(t){return"function"==typeof t||t instanceof h}(t))return r=this.construct(t,e),this.executePostResolutionInterceptor(t,r,"Single"),r;throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,e){var o,r;if(this.interceptors.preResolution.has(t)){var i=[];try{for(var n=a(this.interceptors.preResolution.getAll(t)),s=n.next();!s.done;s=n.next()){var l=s.value;"Once"!=l.options.frequency&&i.push(l),l.callback(t,e)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}this.interceptors.preResolution.setAll(t,i)}},t.prototype.executePostResolutionInterceptor=function(t,e,o){var r,i;if(this.interceptors.postResolution.has(t)){var n=[];try{for(var s=a(this.interceptors.postResolution.getAll(t)),l=s.next();!l.done;l=s.next()){var d=l.value;"Once"!=d.options.frequency&&n.push(d),d.callback(t,e,o)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}this.interceptors.postResolution.setAll(t,n)}},t.prototype.resolveRegistration=function(t,o){if(this.ensureNotDisposed(),t.options.lifecycle===e.ResolutionScoped&&o.scopedResolutions.has(t))return o.scopedResolutions.get(t);var r,i=t.options.lifecycle===e.Singleton,n=t.options.lifecycle===e.ContainerScoped,a=i||n;return r=f(t.provider)?t.provider.useValue:m(t.provider)?a?t.instance||(t.instance=this.resolve(t.provider.useToken,o)):this.resolve(t.provider.useToken,o):d(t.provider)?a?t.instance||(t.instance=this.construct(t.provider.useClass,o)):this.construct(t.provider.useClass,o):c(t.provider)?t.provider.useFactory(this):this.construct(t.provider,o),t.options.lifecycle===e.ResolutionScoped&&o.scopedResolutions.set(t,r),r},t.prototype.resolveAll=function(t,e){var o=this;void 0===e&&(e=new v),this.ensureNotDisposed();var r=this.getAllRegistrations(t);if(!r&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),r){var i=r.map((function(t){return o.resolveRegistration(t,e)}));return this.executePostResolutionInterceptor(t,i,"All"),i}var n=[this.construct(t,e)];return this.executePostResolutionInterceptor(t,n,"All"),n},t.prototype.isRegistered=function(t,e){return void 0===e&&(e=!1),this.ensureNotDisposed(),this._registry.has(t)||e&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,e;this.ensureNotDisposed();try{for(var o=a(this._registry.entries()),r=o.next();!r.done;r=o.next()){var i=s(r.value,2),n=i[0],l=i[1];this._registry.setAll(n,l.filter((function(t){return!f(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var o,r;this.ensureNotDisposed();var i=new t(this);try{for(var n=a(this._registry.entries()),l=n.next();!l.done;l=n.next()){var d=s(l.value,2),c=d[0],h=d[1];h.some((function(t){return t.options.lifecycle===e.ContainerScoped}))&&i._registry.setAll(c,h.map((function(t){return t.options.lifecycle===e.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){o={error:t}}finally{try{l&&!l.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},t.prototype.beforeResolution=function(t,e,o){void 0===o&&(o={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:e,options:o})},t.prototype.afterResolution=function(t,e,o){void 0===o&&(o={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:e,options:o})},t.prototype.dispose=function(){return function(t,e,o,r){return new(o||(o=Promise))((function(i,n){function a(t){try{l(r.next(t))}catch(t){n(t)}}function s(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function(){var t;return function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}}(this,(function(e){switch(e.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach((function(e){var o=e.dispose();o&&t.push(o)})),[4,Promise.all(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,e){var o=this;if(t instanceof h)return t.createProxy((function(t){return o.resolve(t,e)}));var r,i=function(){var r=w.get(t);if(!r||0===r.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var i=r.map(o.resolveParams(e,t));return new(t.bind.apply(t,l([void 0],i)))}();return"function"!=typeof(r=i).dispose||r.dispose.length>0||this.disposables.add(i),i},t.prototype.resolveParams=function(t,e){var o=this;return function(r,i){var n,a,d,c;try{return"object"==typeof(c=r)&&"token"in c&&"multiple"in c?u(r)?r.multiple?(n=o.resolve(r.transform)).transform.apply(n,l([o.resolveAll(r.token)],r.transformArgs)):(a=o.resolve(r.transform)).transform.apply(a,l([o.resolve(r.token,t)],r.transformArgs)):r.multiple?o.resolveAll(r.token):o.resolve(r.token,t):u(r)?(d=o.resolve(r.transform,t)).transform.apply(d,l([o.resolve(r.token,t)],r.transformArgs)):o.resolve(r,t)}catch(t){throw new Error(function(t,e,o){var r,i,n=s(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1];return function(t,e,o){return void 0===o&&(o=" "),l([t],e.message.split("\n").map((function(t){return o+t}))).join("\n")}("Cannot inject the dependency "+(i=e,(null===(r=void 0===n?null:n)?"at position #"+i:'"'+r.split(",")[i].trim()+'" at position #'+i)+' of "')+t.name+'" constructor. Reason:',o)}(e,i,t))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),q=new k,S="injectionTokens";function Q(t,e){return function(o,r,i){var n=Reflect.getOwnMetadata(S,o)||{};n[i]=e?{token:t,transform:e.transformToken,transformArgs:e.args||[]}:t,Reflect.defineMetadata(S,n,o)}}const $=function(){return function(t){w.set(t,function(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],o=Reflect.getOwnMetadata(S,t)||{};return Object.keys(o).forEach((function(t){e[+t]=o[t]})),e}(t))}};if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class P{constructor(t,e){this.container=t,this.options=e}getService(t){return this.container.resolve(t)}}const C=window?.qbo4?.services||new P(q.createChildContainer(),{});function R(t,e){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){return console.error("Error parsing JSON string:",t),null}if(Array.isArray(t))return t;if("object"==typeof t&&null!==t)for(const o in t){const r=t[o];if(Array.isArray(r))return r;if("object"==typeof r){const t=R(r,e);if(t)return t}}return null}function Z(t,...e){const o=/\${(.*?)}/g;let r=t;for(let t=0;t<e.length;t++){const i=e[t];r=r.replace(o,((t,e)=>{const o=e.split(/\.|\[|\]/).filter((t=>""!==t));let r=i;for(let e of o){if(void 0===r[e])return t;r=r[e]}return r}))}return r=r.replace(o,(()=>"")),r}"undefined"!=typeof window&&(window.qbo4=window.qbo4||{},window.qbo4.services=window.qbo4.services||new P(q.createChildContainer(),{}),window.qbo4.services);class T{constructor(t,e={},o=null){this.basePath="",this.relativePath="",this.apiEndpoint=t,this.headers=e,this.method=o;const r=new URL(this.apiEndpoint);this.basePath=`${r.href}`}async fetch(t,e){this.apiEndpoint.indexOf("//")<0&&(this.apiEndpoint=new URL(this.apiEndpoint,document.location.origin).href);const o=Z(new URL(t??this.relativePath,this.apiEndpoint).href,e),r=this.method??(e?"POST":"GET"),i=new Headers(this.headers||{});e&&!i.has("Content-Type")&&i.append("Content-Type","application/json");const n=await fetch(o,{method:r,headers:i,credentials:"include",body:"POST"===r&&e?JSON.stringify(e):null}),a=i.get("Accept")??"";return n.ok?"application/json"===a?await n.json():await n.text():(console.error(`API request failed with status ${n.status}`),null)}clone(t){const e=new T(this.apiEndpoint,this.headers,this.method);return e.relativePath=t??"",e}}function A(t){"string"!=typeof t&&(t=t.href);const e=t.match(/api:\/\/([^/]+)/),o=e?e[1]:t,r=e?t.substring(`api://${o}`.length+1):"",i=C.container.isRegistered(o)?C.container.resolve(o):new T(t);return r?i.clone(r):i}C.container.registerInstance("default",new T(document.querySelector("base[href]")?.getAttribute("href")||window.location.origin));const M="ValidateToken";var E=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};let j=class{constructor(){this.message="Zip code is invalid",this.selector=".zipcode"}validate(t){return Promise.resolve(!0)}connect(t){}disconnect(){}};j=E([$()],j),C.container.register(M,{useClass:j});let z=class{constructor(){this.message="Email is invalid",this.selector=".email"}validate(t){return Promise.resolve(!0)}connect(t){}disconnect(){}};z=E([$()],z),C.container.register(M,{useClass:z});let X=class{constructor(){this.message="This value does not appear to exist.",this.selector="[data-exists]"}connect(t){}disconnect(){}async validate(t){var e=t.getAttribute("data-exists");if(!e)return!1;var o=t.getAttribute("data-exists-path");const r=C.container.isRegistered(e)?C.container.resolve(e):new T(e);if(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement){const e=R(await r.fetch(o,{value:t.value}));return null!=e&&e.length>0}return!1}};X=E([$()],X),C.container.register(M,{useClass:X});class _{constructor(){this.evaluators=[],this.depends="",this.condition="or",this.emptyOnDisable=!1,this.resetOnDisable=!0,this.disabledClass="disabled",this.disableChildren=!0}}const D="DependencyValidatorOptions",U=new Map([["!=",(t,e)=>!ri(t.value,e)],[">=",(t,e)=>t.value>=e],["<=",(t,e)=>t.value<=e],["=",(t,e)=>ri(t.value,e)],[">",(t,e)=>t.value>e],["<",(t,e)=>t.value<e]]),V=Array.from(U.keys());let L=class{constructor(t,e){this.message="Dependency condition not met",this.selector="[data-depend-options]",this.optionsCache=new Map,this.checkDependencies=async t=>{console.log("checking dependencies",this.optionsCache);for(const[t,e]of this.optionsCache)await this.validate(t)},this.form=t,this.options=e,this.currentOptions=e}connect(t){this.form.querySelectorAll(this.selector).forEach((t=>{t instanceof HTMLElement&&this.getOptions(t)})),this.optionsCache.forEach(((t,e)=>{this.validate(e)})),this.form.addEventListener("change",this.checkDependencies)}disconnect(){this.form.removeEventListener("change",this.checkDependencies)}async validate(t){const e=this.getOptions(t);if(null==e)return Promise.resolve(!0);let o;o="or"===e.condition?e.evaluators.some((t=>!0===t())):e.evaluators.every((t=>!0===t())),(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&(t.disabled=!o),t.classList.toggle(e.disabledClass,!o);const r=function(t,e){const o=Array.from(t.querySelectorAll(e));return t.matches(e)&&o.unshift(t),o}(t,"input,select,textarea");return o?e.disableChildren&&r.forEach((t=>t.removeAttribute("disabled"))):(e.disableChildren&&r.forEach((t=>t.setAttribute("disabled","disabled"))),e.resetOnDisable?r.forEach((t=>function(t){if(t instanceof HTMLInputElement)"checkbox"===t.type||"radio"===t.type?t.checked=t.defaultChecked:t.value=t.defaultValue;else if(t instanceof HTMLSelectElement){var e=t.querySelectorAll("option[selected]");0==e.length?t.selectedIndex=0:e.forEach((t=>{t instanceof HTMLOptionElement&&(t.selected=!0)}))}}(t))):e.emptyOnDisable&&r.forEach((t=>{var e;(e=t)instanceof HTMLInputElement?"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value="":e instanceof HTMLSelectElement&&(e.options.selectedIndex=0)}))),Promise.resolve(o)}getOptions(t){let e=this.optionsCache.get(t);if(!e){try{e=Object.assign({},this.options,function(t,e,o="options"){const r={},i=`${e}${o}`,n=t.getAttributeNames();for(const a of n)if(a.startsWith(e)){const n=a.slice(e.length);if(null!=o&&a===i)try{const e=JSON.parse(t.getAttribute(a));Object.assign(r,e)}catch(e){console.error(`Error parsing JSON from element ${t.name} attribute ${i} (${t.getAttribute(a)}):`,t,e)}else r[n]=t.getAttribute(a)}return r}(t,"data-depend-"))}catch(t){console.error("Error parsing data-depend-options attribute:",t)}if(!e)return null;e.evaluators=e.depends.split(",").map((t=>{t=t.trim();let e=V.find((e=>t.includes(e)))??"!=",o=null,r="";if(e){const i=t.split(e);o=i[0],r=i[1]??""}else t.startsWith("!")?(e="=",o=t.substring(1)):o=t;const i=this.form.querySelector(`#${CSS.escape(o)}`)??this.form.querySelector(`[name="${CSS.escape(o)}"]`);return i instanceof HTMLInputElement?"checkbox"===i.type||"radio"===i.type?"!="===e?()=>i.checked:()=>!i.checked:()=>U.get(e)(i,r):i instanceof HTMLSelectElement?()=>U.get(e)(i,r):i instanceof HTMLOptionElement?"!="===e?()=>i.selected:()=>!i.selected:void 0})).filter((t=>void 0!==t)),this.optionsCache.set(t,e)}return e}getElement(t){return this.form.querySelector(`#${CSS.escape(t)}`)??this.form.querySelector(`[name="${CSS.escape(t)}"]`)}};var W,B,Y;L=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a}([$(),(W=1,Y=D,B=Q(Y),function(t,e){B(t,e,W)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[HTMLFormElement,_])],L),C.container.register(D,{useValue:new _}),C.container.register(M,{useClass:L});const I=globalThis,N=I.ShadowRoot&&(void 0===I.ShadyCSS||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),F=new WeakMap;class H{constructor(t,e,o){if(this._$cssResult$=!0,o!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(N&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=F.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&F.set(e,t))}return t}toString(){return this.cssText}}const K=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[r+1]),t[0]);return new H(o,t,G)},J=(t,e)=>{if(N)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),r=I.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}},tt=N?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new H("string"==typeof t?t:t+"",void 0,G))(e)})(t):t,{is:et,defineProperty:ot,getOwnPropertyDescriptor:rt,getOwnPropertyNames:it,getOwnPropertySymbols:nt,getPrototypeOf:at}=Object,st=globalThis,lt=st.trustedTypes,dt=lt?lt.emptyScript:"",ct=st.reactiveElementPolyfillSupport,ht=(t,e)=>t,pt={toAttribute(t,e){switch(e){case Boolean:t=t?dt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},ut=(t,e)=>!et(t,e),mt={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:ut};Symbol.metadata??=Symbol("metadata"),st.litPropertyMetadata??=new WeakMap;class ft extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),r=this.getPropertyDescriptor(t,o,e);void 0!==r&&ot(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){const{get:r,set:i}=rt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const n=r?.call(this);i.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(ht("elementProperties")))return;const t=at(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ht("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ht("properties"))){const t=this.properties,e=[...it(t),...nt(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(tt(t))}else void 0!==t&&e.push(tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return J(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EC(t,e){const o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(void 0!==r&&!0===o.reflect){const i=(void 0!==o.converter?.toAttribute?o.converter:pt).toAttribute(e,o.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const o=this.constructor,r=o._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:pt;this._$Em=r,this[r]=i.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??ut)(this[t],e))return;this.P(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}ft.elementStyles=[],ft.shadowRootOptions={mode:"open"},ft[ht("elementProperties")]=new Map,ft[ht("finalized")]=new Map,ct?.({ReactiveElement:ft}),(st.reactiveElementVersions??=[]).push("2.0.4");const bt=globalThis,gt=bt.trustedTypes,vt=gt?gt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ot="$lit$",yt=`lit$${Math.random().toFixed(9).slice(2)}$`,xt="?"+yt,wt=`<${xt}>`,kt=document,qt=()=>kt.createComment(""),St=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Qt=Array.isArray,$t=t=>Qt(t)||"function"==typeof t?.[Symbol.iterator],Pt="[ \t\n\f\r]",Ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Zt=/>/g,Tt=RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,Mt=/"/g,Et=/^(?:script|style|textarea|title)$/i,jt=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),zt=jt(1),Xt=(jt(2),jt(3),Symbol.for("lit-noChange")),_t=Symbol.for("lit-nothing"),Dt=new WeakMap,Ut=kt.createTreeWalker(kt,129);function Vt(t,e){if(!Qt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==vt?vt.createHTML(e):e}const Lt=(t,e)=>{const o=t.length-1,r=[];let i,n=2===e?"<svg>":3===e?"<math>":"",a=Ct;for(let e=0;e<o;e++){const o=t[e];let s,l,d=-1,c=0;for(;c<o.length&&(a.lastIndex=c,l=a.exec(o),null!==l);)c=a.lastIndex,a===Ct?"!--"===l[1]?a=Rt:void 0!==l[1]?a=Zt:void 0!==l[2]?(Et.test(l[2])&&(i=RegExp("</"+l[2],"g")),a=Tt):void 0!==l[3]&&(a=Tt):a===Tt?">"===l[0]?(a=i??Ct,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?Tt:'"'===l[3]?Mt:At):a===Mt||a===At?a=Tt:a===Rt||a===Zt?a=Ct:(a=Tt,i=void 0);const h=a===Tt&&t[e+1].startsWith("/>")?" ":"";n+=a===Ct?o+wt:d>=0?(r.push(s),o.slice(0,d)+Ot+o.slice(d)+yt+h):o+yt+(-2===d?e:h)}return[Vt(t,n+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class Wt{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let i=0,n=0;const a=t.length-1,s=this.parts,[l,d]=Lt(t,e);if(this.el=Wt.createElement(l,o),Ut.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=Ut.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Ot)){const e=d[n++],o=r.getAttribute(t).split(yt),a=/([.?@])?(.*)/.exec(e);s.push({type:1,index:i,name:a[2],strings:o,ctor:"."===a[1]?Gt:"?"===a[1]?Ft:"@"===a[1]?Ht:Nt}),r.removeAttribute(t)}else t.startsWith(yt)&&(s.push({type:6,index:i}),r.removeAttribute(t));if(Et.test(r.tagName)){const t=r.textContent.split(yt),e=t.length-1;if(e>0){r.textContent=gt?gt.emptyScript:"";for(let o=0;o<e;o++)r.append(t[o],qt()),Ut.nextNode(),s.push({type:2,index:++i});r.append(t[e],qt())}}}else if(8===r.nodeType)if(r.data===xt)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(yt,t+1));)s.push({type:7,index:i}),t+=yt.length-1}i++}}static createElement(t,e){const o=kt.createElement("template");return o.innerHTML=t,o}}function Bt(t,e,o=t,r){if(e===Xt)return e;let i=void 0!==r?o._$Co?.[r]:o._$Cl;const n=St(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),void 0===n?i=void 0:(i=new n(t),i._$AT(t,o,r)),void 0!==r?(o._$Co??=[])[r]=i:o._$Cl=i),void 0!==i&&(e=Bt(t,i._$AS(t,e.values),i,r)),e}class Yt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,r=(t?.creationScope??kt).importNode(e,!0);Ut.currentNode=r;let i=Ut.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let e;2===s.type?e=new It(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new Kt(i,this,t)),this._$AV.push(e),s=o[++a]}n!==s?.index&&(i=Ut.nextNode(),n++)}return Ut.currentNode=kt,r}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class It{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,r){this.type=2,this._$AH=_t,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Bt(this,t,e),St(t)?t===_t||null==t||""===t?(this._$AH!==_t&&this._$AR(),this._$AH=_t):t!==this._$AH&&t!==Xt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):$t(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==_t&&St(this._$AH)?this._$AA.nextSibling.data=t:this.T(kt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Wt.createElement(Vt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new Yt(r,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=Dt.get(t.strings);return void 0===e&&Dt.set(t.strings,e=new Wt(t)),e}k(t){Qt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const i of t)r===e.length?e.push(o=new It(this.O(qt()),this.O(qt()),this,this.options)):o=e[r],o._$AI(i),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,r,i){this.type=1,this._$AH=_t,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=_t}_$AI(t,e=this,o,r){const i=this.strings;let n=!1;if(void 0===i)t=Bt(this,t,e,0),n=!St(t)||t!==this._$AH&&t!==Xt,n&&(this._$AH=t);else{const r=t;let a,s;for(t=i[0],a=0;a<i.length-1;a++)s=Bt(this,r[o+a],e,a),s===Xt&&(s=this._$AH[a]),n||=!St(s)||s!==this._$AH[a],s===_t?t=_t:t!==_t&&(t+=(s??"")+i[a+1]),this._$AH[a]=s}n&&!r&&this.j(t)}j(t){t===_t?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Gt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_t?void 0:t}}class Ft extends Nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_t)}}class Ht extends Nt{constructor(t,e,o,r,i){super(t,e,o,r,i),this.type=5}_$AI(t,e=this){if((t=Bt(this,t,e,0)??_t)===Xt)return;const o=this._$AH,r=t===_t&&o!==_t||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==_t&&(o===_t||r);r&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Kt{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Bt(this,t)}}const Jt={M:Ot,P:yt,A:xt,C:1,L:Lt,R:Yt,D:$t,V:Bt,I:It,H:Nt,N:Ft,U:Ht,B:Gt,F:Kt},te=bt.litHtmlPolyfillSupport;te?.(Wt,It),(bt.litHtmlVersions??=[]).push("3.2.1");class ee extends ft{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const r=o?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=o?.renderBefore??null;r._$litPart$=i=new It(e.insertBefore(qt(),t),t,void 0,o??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Xt}}ee._$litElement$=!0,ee.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ee});const oe=globalThis.litElementPolyfillSupport;oe?.({LitElement:ee}),(globalThis.litElementVersions??=[]).push("4.1.1");const re=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ie={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:ut},ne=(t=ie,e,o)=>{const{kind:r,metadata:i}=o;let n=globalThis.litPropertyMetadata.get(i);if(void 0===n&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(o.name,t),"accessor"===r){const{name:r}=o;return{set(o){const i=e.get.call(this);e.set.call(this,o),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=o;return function(o){const i=this[r];e.call(this,o),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function ae(t){return(e,o)=>"object"==typeof o?ne(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function se(t){return ae({...t,state:!0,attribute:!1})}var le=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},de=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ce=class extends ee{constructor(){super(...arguments),this.name=null,this.apiEndpoint=null}connectedCallback(){super.connectedCallback();const t={};null==this.name&&console.error("qbo-api name is required."),null==this.apiEndpoint&&console.error("qbo-api apiEndpoint is required."),this.querySelectorAll("header").forEach((e=>{const o=e.getAttribute("name"),r=e.textContent;o&&r&&(t[o]=r)})),t.ContentType&&(t["Content-Type"]=t.ContentType,delete t.ContentType),this.apiEndpoint?.startsWith("http")||(this.apiEndpoint=new URL(this.apiEndpoint??"",document.location.origin).href),function(t,e,o={"Content-Type":"application/json"},r){C.container.registerInstance(t,new T(e,o,r))}(this.name,this.apiEndpoint,t,this.method)}render(){return zt``}};le([ae({type:String}),de("design:type",Object)],ce.prototype,"name",void 0),le([ae({type:String}),de("design:type",Object)],ce.prototype,"apiEndpoint",void 0),le([ae(),de("design:type",Object)],ce.prototype,"method",void 0),ce=le([re("qbo-api")],ce);var he=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},pe=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ue=class extends ee{constructor(){super(...arguments),this.display="normal",this.trigger="header",this.renderInHost=!0,this.hasExpandedContent=!1,this.minimize=t=>{this.display="minimize"},this.normal=t=>{this.display="normal"},this.maximize=t=>{this.display="maximize"}}static{this.styles=[K``]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick),document.addEventListener("qbo-card-minimize",this.minimize),document.addEventListener("qbo-card-normal",this.normal),document.addEventListener("qbo-card-maximize",this.maximize),this.hasExpandedContent=null!=this.querySelector(".expanded"),"normal"!==this.display||this.hasExpandedContent||(this.display="maximize")}disconnectedCallback(){this.removeEventListener("click",this.handleClick),document.removeEventListener("qbo-card-minimize",this.minimize),document.removeEventListener("qbo-card-normal",this.normal),document.removeEventListener("qbo-card-maximize",this.maximize),super.disconnectedCallback()}attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),"display"===t&&(this.classList.remove("normal","minimize","maximize"),o&&this.classList.add(o))}handleClick(t){t.composedPath()[0]===this.querySelector(this.trigger)&&(t.ctrlKey?this.shrink():this.grow())}shrink(){switch(this.display){case"minimize":return void(this.display="maximize");case"maximize":return void(this.display=this.hasExpandedContent?"normal":"minimize");default:return void(this.display="minimize")}}grow(){switch(this.display){case"minimize":return void(this.display=this.hasExpandedContent?"normal":"maximize");case"maximize":return void(this.display="minimize");default:return void(this.display="maximize")}}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}render(){return zt`<slot></slot>`}};he([ae({reflect:!0}),pe("design:type",String)],ue.prototype,"display",void 0),he([ae(),pe("design:type",String)],ue.prototype,"trigger",void 0),he([ae(),pe("design:type",Boolean)],ue.prototype,"renderInHost",void 0),he([ae(),pe("design:type",Object)],ue.prototype,"columns",void 0),ue=he([re("qbo-card")],ue),K`@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxC7mw9c.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRzS7mw9c.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxi7mw9c.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxy7mw9c.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--qbo-font:Montserrat,Arial,sans-serif;--qbo-color:#333;--qbo-border-color:#999;--qbo-border-radius:4px;--qbo-background-color:#fff;--qbo-padding-horizontal:0.75rem;--qbo-padding-vertical:0.375rem;--qbo-padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);--qbo-margin:0.5rem;--qbo-margin-horizontal:0.5rem;--qbo-margin-vertical:0.5rem;--qbo-focus-border-color:#80bdff;--qbo-focus-box-shadow:rgba(0, 123, 255, 0.25);--qbo-line-height:var(--qbo-line-height);--qbo-button-bg:#007bff;--qbo-button-border:#007bff;--qbo-button-bg-hover:#0056b3;--qbo-button-border-hover:#004085;--qbo-button-color:#fff;--qbo-button-padding:var(--qbo-padding);--qbo-button-border-radius:var(--qbo-border-radius);--qbo-nav-color:#333;--qbo-nav-background-color:#fff;--qbo-nav-background-hover:#81181d;--qbo-nav-background-hover-color:#999;--qbo-primary-bg:#007bff;--qbo-primary-color:#fff;--qbo-primary-border:#007bff;--qbo-primary-hover-bg:#0056b3;--qbo-primary-hover-border:#004085;--qbo-secondary-bg:#6c757d;--qbo-secondary-color:#ffffff;--qbo-secondary-border:#6c757d;--qbo-secondary-hover-bg:#5a6268;--qbo-secondary-hover-border:#545b62;--qbo-success-bg:#28a745;--qbo-success-color:#ffffff;--qbo-success-border:#28a745;--qbo-success-hover-bg:#218838;--qbo-success-hover-border:#1e7e34;--qbo-danger-bg:#dc3545;--qbo-danger-color:#ffffff;--qbo-danger-border:#dc3545;--qbo-danger-hover-bg:#c82333;--qbo-danger-hover-border:#bd2130;--qbo-info-bg:#17a2b8;--qbo-info-color:#ffffff;--qbo-info-border:#17a2b8;--qbo-info-hover-bg:#138496;--qbo-info-hover-border:#117a8b;--qbo-light-bg:#f8f9fa;--qbo-light-color:#212529;--qbo-light-border:#f8f9fa;--qbo-light-hover-bg:#e2e6ea;--qbo-light-hover-border:#dae0e5;--qbo-dark-bg:#343a40;--qbo-dark-color:#ffffff;--qbo-dark-border:#343a40;--qbo-dark-hover-bg:#23272b;--qbo-dark-hover-border:#1d2124;--qbo-table-header-color:var(--qbo-color);--qbo-table-header-background:color-mix(in srgb, var(--qbo-border-color) 50%, var(--qbo-background-color) 50%);--qbo-table-footer-color:color-mix(in srgb, var(--qbo-color) 70%, var(--qbo-background-color) 70%);--qbo-table-footer-background:var(--qbo-background-color);--qbo-table-padding:0.25em;--qbo-file-height:500px;--qbo-label-margin-bottom:0.25em;--qbo-label-margin-top:0.25em;--qbo-h3-card-color:#595959}.qbo-theme-dark{--qbo-color:#e0e0e0;--qbo-border-color:grey;--qbo-background-color:#121212;--qbo-nav-color:#000;--qbo-nav-background-color:#fff;--qbo-svg-filter:brightness(0) invert(1)}.qbo-theme-light{font-family:var(--qbo-font);color:var(--qbo-color);margin:0;background-color:var(--qbo-background-color)}.qbo-row{display:flex;flex-wrap:wrap;gap:var(--qbo-margin)}div.qbo-row-padding-top{padding-top:.375rem}.qbo-card,.qbo-col{flex:1 0 0;max-width:100%;box-sizing:border-box}.qbo-col-1{flex:0 0 calc(8.33% - var(--qbo-margin)/ 2);max-width:calc(8.33% - var(--qbo-margin)/ 2)}.qbo-col-2{flex:0 0 calc(16.66% - var(--qbo-margin)/ 2);max-width:calc(16.66% - var(--qbo-margin)/ 2)}.qbo-col-3{flex:0 0 calc(25% - var(--qbo-margin)/ 2);max-width:calc(25% - var(--qbo-margin)/ 2)}.qbo-col-4{flex:0 0 calc(33.33% - var(--qbo-margin)/ 2);max-width:calc(33.33% - var(--qbo-margin)/ 2)}.qbo-col-5{flex:0 0 calc(41.66% - var(--qbo-margin)/ 2);max-width:calc(41.66% - var(--qbo-margin)/ 2)}.qbo-col-6{flex:0 0 calc(50% - var(--qbo-margin)/ 2);max-width:calc(50% - var(--qbo-margin)/ 2)}.qbo-col-7{flex:0 0 calc(58.33% - var(--qbo-margin)/ 2);max-width:calc(58.33% - var(--qbo-margin)/ 2)}.qbo-col-8{flex:0 0 calc(66.66% - var(--qbo-margin)/ 2);max-width:calc(66.66% - var(--qbo-margin)/ 2)}.qbo-col-9{flex:0 0 calc(75% - var(--qbo-margin)/ 2);max-width:calc(75% - var(--qbo-margin)/ 2)}.qbo-col-10{flex:0 0 calc(83.33% - var(--qbo-margin)/ 2);max-width:calc(83.33% - var(--qbo-margin)/ 2)}.qbo-col-11{flex:0 0 calc(91.66% - var(--qbo-margin)/ 2);max-width:calc(91.66% - var(--qbo-margin)/ 2)}.qbo-col-12{flex:0 0 calc(100% - var(--qbo-margin)/ 2);max-width:calc(100% - var(--qbo-margin)/ 2)}.qbo-col-auto{flex:0 0 auto;max-width:none}.qbo-card{border:1px solid var(--qbo-border-color)!important;border-radius:var(--qbo-border-radius)!important;box-shadow:2px 2px 3px var(--qbo-border-color);padding:.5em;position:inherit!important;overflow:auto}.qbo-card-bottom{margin-bottom:.5em}.qbo-card-left{margin-left:.5em}.qbo-card-right{margin-right:.5em}.qbo-card-top{margin-top:.5em}svg{height:1rem;width:1rem}.qbo-col-noborder>.qbo-form{margin-top:.25em}.qbo-col-noborder>.qbo-form.qbo-form-status{margin-top:0}.qbo-form label{display:flex;flex-direction:column;font-size:.9rem;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial;margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form label:first-child{margin-top:var(--qbo-label-margin-top)!important}.qbo-form.qbo-form-status label:first-child{margin-top:0!important}.qbo-form span{display:flex;flex-direction:column;font-size:.9rem;font-weight:600;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial}.qbo-form span:not(:last-child){margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form span:empty::after{color:color-mix(in oklab,var(--qbo-color) 25%,var(--qbo-background-color));content:"null";font-style:italic;font-weight:initial;min-height:1.125em}.qbo-form small{display:block;font-size:.8rem;color:color-mix(in srgb,var(--qbo-color) 60%,transparent)}.qbo-form input,.qbo-form select,.qbo-form textarea{width:100%;box-sizing:border-box;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem;line-height:1;color:var(--qbo-color);background-color:var(--qbo-background-color);background-clip:padding-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-family:var(--qbo-font);margin-top:.1rem;margin-right:1rem}.qbo-form input[type=color]{width:3rem;height:calc(1.5em + .75rem + 0px);padding:.375rem;background-color:transparent;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none}.qbo-form input:focus,.qbo-form select:focus,.qbo-form textarea:focus{color:var(--qbo-color);border-color:var(--qbo-focus-border-color);outline:0;box-shadow:0 0 0 .2rem var(--qbo-focus-box-shadow)}.qbo-form input[disabled],.qbo-form select[disabled],.qbo-form textarea[disabled]{color:color-mix(in oklab,var(--qbo-color) 50%,var(--qbo-background-color));cursor:not-allowed;opacity:1}.qbo-form div{display:flex;align-items:center}.qbo-form div span{display:inline-flex;font-weight:100;align-items:center;padding:.375rem .75rem;font-size:1rem;text-align:center;white-space:nowrap;border-right:none;border-radius:.25rem 0 0 .25rem}.qbo-form div input,.qbo-form div select,.qbo-form div textarea{flex:1 1 auto;padding:.375rem .75rem;font-size:1rem;background-clip:padding-box;margin:0}.qbo-form .form-check{display:flex;align-items:center;margin-bottom:1rem}.qbo-form .form-check input[type=checkbox],.qbo-form .form-check input[type=radio]{width:auto;margin-right:.5rem}.qbo-form .form-check label{margin-bottom:0;font-weight:400;color:var(--qbo-color)}.qbo-button,button{display:inline-block;font-weight:400;color:var(--qbo-color);background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem!important;line-height:var(--qbo-line-height);text-align:center;vertical-align:middle;cursor:pointer;margin-right:var(--qbo-margin);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.qbo-button svg,button svg{vertical-align:top}.qbo-button:focus,.qbo-button:hover,button:focus,button:hover{background-color:var(--qbo-border-color);text-decoration:none;line-height:var(--qbo-line-height);border-radius:var(--qbo-border-radius);transition:background-color .15s ease-in-out,border-color .15s ease-in-out}.qbo-button:disabled,button:disabled{opacity:.65;cursor:not-allowed;background-color:var(--qbo-button-bg);border-color:var(--qbo-button-border);color:var(--qbo-button-color)}.primary{background-color:var(--qbo-primary-bg);border:1px solid var(--qbo-primary-border);color:var(--qbo-primary-color)}.primary:focus,.primary:hover{background-color:var(--qbo-primary-hover-bg);border:1px solid var(--qbo-primary-hover-border)}.secondary{background-color:var(--qbo-secondary-bg);border:1px solid var(--qbo-secondary-border);color:var(--qbo-secondary-color)}.secondary:focus,.secondary:hover{background-color:var(--qbo-secondary-hover-bg);border:1px solid var(--qbo-secondary-hover-border)}.icon{height:1rem;width:1rem;filter:var(--qbo-svg-filter)}.icon use{display:block}.icon.right{position:relative;padding-left:1.25rem;background-image:url("https://devqmp.quandis.io/core/ui/images/qbo-icons.svg#i-arrow-down-circle");background-repeat:no-repeat;background-position:left center}nav.qbo-main-menu{background:linear-gradient(to bottom,#d9d9d9,#fff);padding-top:4px}nav{--qbo-background-color:var(--qbo-nav-background-color, black);--qbo-color:var(--qbo-nav-color, white);--qbo-svg-filter:brightness(0) invert(1);display:flex;flex-direction:row;color:var(--qbo-nav-color,#fff)}nav menu{list-style-type:none;padding-inline-start:20px;margin-block-start:0.5em;margin-block-end:0.5em}nav menu li{border:0;cursor:pointer;display:inline-block;line-height:var(--qbo-line-height);padding:5px}nav menu li svg{filter:invert(0)!important}nav menu li:focus,nav menu li:hover{background-color:var(--qbo-nav-background-hover,grey);border:0;border-radius:.5em;color:#fff;text-decoration:none}nav menu li:focus span>svg,nav menu li:focus>svg,nav menu li:hover span>svg,nav menu li:hover>svg{filter:var(--qbo-svg-filter)!important}nav>img{padding-inline-start:8px}nav>span{font-size:1.75em;font-weight:500;margin-top:4px;padding-inline-start:10px}nav a{color:var(--qbo-color)}nav svg.label{vertical-align:text-top}nav svg.toggle{vertical-align:text-bottom}menu.qbo-toolbar{list-style-type:none;padding-left:0;display:flex;flex-direction:row;margin-right:var(--qbo-margin)}menu.qbo-toolbar>li{display:inline-block;margin-right:0;color:var(--qbo-color);background-color:#eee;border:1px solid var(--qbo-border-color);padding:.4rem .5rem .2rem .5rem;line-height:var(--qbo-line-height);cursor:pointer;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-decoration:none}menu.qbo-toolbar>li:first-child{border-top-left-radius:var(--qbo-border-radius);border-bottom-left-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li:last-child{border-top-right-radius:var(--qbo-border-radius);border-bottom-right-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li.active,menu.qbo-toolbar>li:focus,menu.qbo-toolbar>li:hover{background-color:#81181d;border-color:#81181d;line-height:var(--qbo-line-height);text-decoration:none;transition:background-color .15s ease-in-out,border-color .15s ease-in-out}menu.qbo-toolbar>li.active svg,menu.qbo-toolbar>li:focus svg,menu.qbo-toolbar>li:hover svg{filter:brightness(0) invert(1)}menu.qbo-toolbar.vertical{align-items:flex-start;flex-direction:column;margin-right:0;margin-top:0}qbo-menu aside,qbo-menu menu{background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);box-sizing:border-box;height:auto;list-style-type:none;margin:0;padding-left:0;position:absolute;visibility:hidden}qbo-menu aside.open,qbo-menu menu.open{background:linear-gradient(to top,#f0f0f0,#fff 90%);border-bottom:1px solid var(--qbo-border-color);color:var(--qbo-color);display:block;padding-bottom:1.25em;visibility:visible;z-index:1}qbo-menu aside.open>header,qbo-menu menu.open>header{font-size:1.5em;font-weight:500;margin-left:10px}qbo-menu aside.open>header>svg,qbo-menu menu.open>header>svg{height:1.5rem;margin-bottom:.2em;vertical-align:bottom;width:1.5rem}qbo-menu aside.open>p,qbo-menu menu.open>p{margin-left:10px}qbo-menu aside{width:0;margin:var(--qbo-margin);padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);padding-bottom:.6em;overflow-y:scroll;top:53px!important;width:100%;background-color:#f0f0f0;border:0;border-radius:0;border-bottom-left-radius:.7em;border-bottom-right-radius:.7em;color:var(--qbo-nav-color,#fff);height:auto;left:0;margin:0;overflow-y:auto}qbo-menu aside>h1{color:var(--qbo-color);margin-block-end:0;margin-left:1em}qbo-menu aside>p{color:var(--qbo-color);margin-block-start:0;margin-left:1.2em}qbo-menu li{display:list-item!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);line-height:var(--qbo-line-height);text-align:left;white-space:nowrap;cursor:pointer;text-decoration:none}qbo-menu li:hover{background-color:var(--qbo-border-color)}qbo-menu menu li.disabled{color:#6c757d;pointer-events:none;background-color:transparent}qbo-menu menu .dropdown-divider{height:1px;margin:.5rem 0;overflow:hidden;background-color:#e9ecef}qbo-menu menu .dropdown-header{padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}qbo-popover{background-color:#f0f0f0;border:1px solid #81181d;border-radius:var(--qbo-border-radius);color:var(--qbo-color);display:none;margin:.6em 0 0 0;padding:0 1em 0 1em;position:absolute;z-index:1}qbo-popover h3{margin-block-end:0.5em;margin-block-start:0.5em}qbo-popover p{margin-block-start:0;white-space:nowrap}qbo-popover.open{display:inherit;visibility:visible}details>a{margin-left:1.5em}div.qbo-row-subsequent{margin-top:.5em}h3.title{color:var(--qbo-h3-card-color);font-size:1.5em;font-weight:500;line-height:1.2;margin-bottom:0;margin-top:0}h4.title{color:var(--qbo-h3-card-color);font-size:1.25rem;font-weight:500;margin-block:0.5em 0;margin-bottom:.25em;margin-top:.25em}p.detail{margin-block-end:0.5em;margin-block-start:0;margin-left:.5em}div.qbo-col-noborder{border:0!important;box-shadow:initial}.qbo-height-10{height:10vh}.qbo-height-20{height:20vh}.qbo-height-30{height:30vh}.qbo-height-40{height:40vh}.qbo-height-50{height:50vh}.qbo-height-60{height:60vh}.qbo-height-70{height:70vh}.qbo-height-80{height:80vh}.qbo-height-90{height:90vh}.qbo-height-100{height:100vh}`;const me=K`@charset "UTF-8";@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxC7mw9c.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRzS7mw9c.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxi7mw9c.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxy7mw9c.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--qbo-font:Montserrat,Arial,sans-serif;--qbo-color:#333;--qbo-border-color:#999;--qbo-border-radius:4px;--qbo-background-color:#fff;--qbo-padding-horizontal:0.75rem;--qbo-padding-vertical:0.375rem;--qbo-padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);--qbo-margin:0.5rem;--qbo-margin-horizontal:0.5rem;--qbo-margin-vertical:0.5rem;--qbo-focus-border-color:#80bdff;--qbo-focus-box-shadow:rgba(0, 123, 255, 0.25);--qbo-line-height:var(--qbo-line-height);--qbo-button-bg:#007bff;--qbo-button-border:#007bff;--qbo-button-bg-hover:#0056b3;--qbo-button-border-hover:#004085;--qbo-button-color:#fff;--qbo-button-padding:var(--qbo-padding);--qbo-button-border-radius:var(--qbo-border-radius);--qbo-nav-color:#333;--qbo-nav-background-color:#fff;--qbo-nav-background-hover:#81181d;--qbo-nav-background-hover-color:#999;--qbo-primary-bg:#007bff;--qbo-primary-color:#fff;--qbo-primary-border:#007bff;--qbo-primary-hover-bg:#0056b3;--qbo-primary-hover-border:#004085;--qbo-secondary-bg:#6c757d;--qbo-secondary-color:#ffffff;--qbo-secondary-border:#6c757d;--qbo-secondary-hover-bg:#5a6268;--qbo-secondary-hover-border:#545b62;--qbo-success-bg:#28a745;--qbo-success-color:#ffffff;--qbo-success-border:#28a745;--qbo-success-hover-bg:#218838;--qbo-success-hover-border:#1e7e34;--qbo-danger-bg:#dc3545;--qbo-danger-color:#ffffff;--qbo-danger-border:#dc3545;--qbo-danger-hover-bg:#c82333;--qbo-danger-hover-border:#bd2130;--qbo-info-bg:#17a2b8;--qbo-info-color:#ffffff;--qbo-info-border:#17a2b8;--qbo-info-hover-bg:#138496;--qbo-info-hover-border:#117a8b;--qbo-light-bg:#f8f9fa;--qbo-light-color:#212529;--qbo-light-border:#f8f9fa;--qbo-light-hover-bg:#e2e6ea;--qbo-light-hover-border:#dae0e5;--qbo-dark-bg:#343a40;--qbo-dark-color:#ffffff;--qbo-dark-border:#343a40;--qbo-dark-hover-bg:#23272b;--qbo-dark-hover-border:#1d2124;--qbo-table-header-color:var(--qbo-color);--qbo-table-header-background:color-mix(in srgb, var(--qbo-border-color) 50%, var(--qbo-background-color) 50%);--qbo-table-footer-color:color-mix(in srgb, var(--qbo-color) 70%, var(--qbo-background-color) 70%);--qbo-table-footer-background:var(--qbo-background-color);--qbo-table-padding:0.25em;--qbo-file-height:500px;--qbo-label-margin-bottom:0.25em;--qbo-label-margin-top:0.25em;--qbo-h3-card-color:#595959}.qbo-theme-dark{--qbo-color:#e0e0e0;--qbo-border-color:grey;--qbo-background-color:#121212;--qbo-nav-color:#000;--qbo-nav-background-color:#fff;--qbo-svg-filter:brightness(0) invert(1)}.qbo-theme-light{font-family:var(--qbo-font);color:var(--qbo-color);margin:0;background-color:var(--qbo-background-color)}.qbo-row,.qbo-row-viewer{display:flex;flex-wrap:wrap;gap:var(--qbo-margin)}div.qbo-row-padding-top{padding-top:.375rem}.qbo-card,.qbo-col{flex:1 0 0;max-width:100%;box-sizing:border-box}.qbo-col-1,qbo-card[columns="1"]{flex:0 0 calc(8.33% - var(--qbo-margin)/ 2);max-width:calc(8.33% - var(--qbo-margin)/ 2)}.qbo-col-2,qbo-card[columns="2"]{flex:0 0 calc(16.66% - var(--qbo-margin)/ 2);max-width:calc(16.66% - var(--qbo-margin)/ 2)}.qbo-col-3,qbo-card[columns="3"]{flex:0 0 calc(25% - var(--qbo-margin)/ 2);max-width:calc(25% - var(--qbo-margin)/ 2)}.qbo-col-4,qbo-card[columns="4"]{flex:0 0 calc(33.33% - var(--qbo-margin)/ 2);max-width:calc(33.33% - var(--qbo-margin)/ 2)}.qbo-col-5{flex:0 0 calc(41.66% - var(--qbo-margin)/ 2);max-width:calc(41.66% - var(--qbo-margin)/ 2)}.qbo-col-6,qbo-card[columns="6"]{flex:0 0 calc(50% - var(--qbo-margin)/ 2);max-width:calc(50% - var(--qbo-margin)/ 2)}.qbo-col-7,qbo-card[columns="7"]{flex:0 0 calc(58.33% - var(--qbo-margin)/ 2);max-width:calc(58.33% - var(--qbo-margin)/ 2)}.qbo-col-8,qbo-card[columns="8"]{flex:0 0 calc(66.66% - var(--qbo-margin)/ 2);max-width:calc(66.66% - var(--qbo-margin)/ 2)}.qbo-col-9,qbo-card[columns="9"]{flex:0 0 calc(75% - var(--qbo-margin)/ 2);max-width:calc(75% - var(--qbo-margin)/ 2)}.qbo-col-10,qbo-card[columns="10"]{flex:0 0 calc(83.33% - var(--qbo-margin)/ 2);max-width:calc(83.33% - var(--qbo-margin)/ 2)}.qbo-col-11,qbo-card[columns="11"]{flex:0 0 calc(91.66% - var(--qbo-margin)/ 2);max-width:calc(91.66% - var(--qbo-margin)/ 2)}.qbo-col-12,qbo-card[columns="12"]{flex:0 0 calc(100% - var(--qbo-margin)/ 2);max-width:calc(100% - var(--qbo-margin)/ 2)}.qbo-col-auto,qbo-card[columns=auto]{flex:0 0 auto;max-width:none}.qbo-card{border:1px solid var(--qbo-border-color)!important;border-radius:var(--qbo-border-radius)!important;box-shadow:2px 2px 3px var(--qbo-border-color);padding:.5em;position:inherit!important;overflow:auto}.qbo-card-bottom{margin-bottom:.5em}.qbo-card-left{margin-left:.5em}.qbo-card-right{margin-right:.5em}.qbo-card-top{margin-top:.5em}svg{height:1rem;width:1rem}.qbo-col-noborder>.qbo-form{margin-top:.25em}.qbo-col-noborder>.qbo-form.qbo-form-status{margin-top:0}.qbo-form label{display:flex;flex-direction:column;font-size:.9rem;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial;margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form label:first-child{margin-top:var(--qbo-label-margin-top)!important}.qbo-form.qbo-form-status label:first-child{margin-top:0!important}.qbo-form span{display:flex;flex-direction:column;font-size:.9rem;font-weight:600;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial}.qbo-form span:not(:last-child){margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form span:empty::after{color:color-mix(in oklab,var(--qbo-color) 25%,var(--qbo-background-color));content:"null";font-style:italic;font-weight:initial;min-height:1.125em}.qbo-form small{display:block;font-size:.8rem;color:color-mix(in srgb,var(--qbo-color) 60%,transparent)}.qbo-form input,.qbo-form select,.qbo-form textarea{width:100%;box-sizing:border-box;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem;line-height:1;color:var(--qbo-color);background-color:var(--qbo-background-color);background-clip:padding-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-family:var(--qbo-font);margin-top:.1rem;margin-right:1rem}.qbo-form input[type=color]{width:3rem;height:calc(1.5em + .75rem + 0px);padding:.375rem;background-color:transparent;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none}.qbo-form input:focus,.qbo-form select:focus,.qbo-form textarea:focus{color:var(--qbo-color);border-color:var(--qbo-focus-border-color);outline:0;box-shadow:0 0 0 .2rem var(--qbo-focus-box-shadow)}.qbo-form input[disabled],.qbo-form select[disabled],.qbo-form textarea[disabled]{color:color-mix(in oklab,var(--qbo-color) 50%,var(--qbo-background-color));cursor:not-allowed;opacity:1}.qbo-form div{display:flex;align-items:center}.qbo-form div span{display:inline-flex;font-weight:100;align-items:center;padding:.375rem .75rem;font-size:1rem;text-align:center;white-space:nowrap;border-right:none;border-radius:.25rem 0 0 .25rem}.qbo-form div input,.qbo-form div select,.qbo-form div textarea{flex:1 1 auto;padding:.375rem .75rem;font-size:1rem;background-clip:padding-box;margin:0}.qbo-form .form-check{display:flex;align-items:center;margin-bottom:1rem}.qbo-form .form-check input[type=checkbox],.qbo-form .form-check input[type=radio]{width:auto;margin-right:.5rem}.qbo-form .form-check label{margin-bottom:0;font-weight:400;color:var(--qbo-color)}.qbo-button,button{display:inline-block;font-weight:400;color:var(--qbo-color);background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem!important;line-height:var(--qbo-line-height);text-align:center;vertical-align:middle;cursor:pointer;margin-right:var(--qbo-margin);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.qbo-button svg,button svg{vertical-align:top}.qbo-button:focus,.qbo-button:hover,button:focus,button:hover{background-color:var(--qbo-border-color);text-decoration:none;line-height:var(--qbo-line-height);border-radius:var(--qbo-border-radius);transition:background-color .15s ease-in-out,border-color .15s ease-in-out}.qbo-button:disabled,button:disabled{opacity:.65;cursor:not-allowed;background-color:var(--qbo-button-bg);border-color:var(--qbo-button-border);color:var(--qbo-button-color)}.primary{background-color:var(--qbo-primary-bg);border:1px solid var(--qbo-primary-border);color:var(--qbo-primary-color)}.primary:focus,.primary:hover{background-color:var(--qbo-primary-hover-bg);border:1px solid var(--qbo-primary-hover-border)}.secondary{background-color:var(--qbo-secondary-bg);border:1px solid var(--qbo-secondary-border);color:var(--qbo-secondary-color)}.secondary:focus,.secondary:hover{background-color:var(--qbo-secondary-hover-bg);border:1px solid var(--qbo-secondary-hover-border)}.icon,nav.qbo-mainmenu>div>div>ul i.qbo-icon{height:1rem;width:1rem;filter:var(--qbo-svg-filter)}.icon use,nav.qbo-mainmenu>div>div>ul i.qbo-icon use{display:block}.icon.right,nav.qbo-mainmenu>div>div>ul i.right.qbo-icon{position:relative;padding-left:1.25rem;background-image:url("https://devqmp.quandis.io/core/ui/images/qbo-icons.svg#i-arrow-down-circle");background-repeat:no-repeat;background-position:left center}nav.qbo-main-menu{background:linear-gradient(to bottom,#d9d9d9,#fff);padding-top:4px}nav{--qbo-background-color:var(--qbo-nav-background-color, black);--qbo-color:var(--qbo-nav-color, white);--qbo-svg-filter:brightness(0) invert(1);display:flex;flex-direction:row;color:var(--qbo-nav-color,#fff)}nav menu{list-style-type:none;padding-inline-start:20px;margin-block-start:0.5em;margin-block-end:0.5em}nav menu li{border:0;cursor:pointer;display:inline-block;line-height:var(--qbo-line-height);padding:5px}nav menu li svg{filter:invert(0)!important}nav menu li:focus,nav menu li:hover{background-color:var(--qbo-nav-background-hover,grey);border:0;border-radius:.5em;color:#fff;text-decoration:none}nav menu li:focus span>svg,nav menu li:focus>svg,nav menu li:hover span>svg,nav menu li:hover>svg{filter:var(--qbo-svg-filter)!important}nav>img{padding-inline-start:8px}nav>span{font-size:1.75em;font-weight:500;margin-top:4px;padding-inline-start:10px}nav a{color:var(--qbo-color)}nav svg.label{vertical-align:text-top}nav svg.toggle{vertical-align:text-bottom}menu.qbo-toolbar{list-style-type:none;padding-left:0;display:flex;flex-direction:row;margin-right:var(--qbo-margin)}menu.qbo-toolbar>li{display:inline-block;margin-right:0;color:var(--qbo-color);background-color:#eee;border:1px solid var(--qbo-border-color);padding:.4rem .5rem .2rem .5rem;line-height:var(--qbo-line-height);cursor:pointer;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-decoration:none}menu.qbo-toolbar>li:first-child{border-top-left-radius:var(--qbo-border-radius);border-bottom-left-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li:last-child{border-top-right-radius:var(--qbo-border-radius);border-bottom-right-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li.active,menu.qbo-toolbar>li:focus,menu.qbo-toolbar>li:hover{background-color:#81181d;border-color:#81181d;line-height:var(--qbo-line-height);text-decoration:none;transition:background-color .15s ease-in-out,border-color .15s ease-in-out}menu.qbo-toolbar>li.active svg,menu.qbo-toolbar>li:focus svg,menu.qbo-toolbar>li:hover svg{filter:brightness(0) invert(1)}menu.qbo-toolbar.vertical{align-items:flex-start;flex-direction:column;margin-right:0;margin-top:0}qbo-menu aside,qbo-menu menu{background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);box-sizing:border-box;height:auto;list-style-type:none;margin:0;padding-left:0;position:absolute;visibility:hidden}qbo-menu aside.open,qbo-menu menu.open{background:linear-gradient(to top,#f0f0f0,#fff 90%);border-bottom:1px solid var(--qbo-border-color);color:var(--qbo-color);display:block;padding-bottom:1.25em;visibility:visible;z-index:1}qbo-menu aside.open>header,qbo-menu menu.open>header{font-size:1.5em;font-weight:500;margin-left:10px}qbo-menu aside.open>header>svg,qbo-menu menu.open>header>svg{height:1.5rem;margin-bottom:.2em;vertical-align:bottom;width:1.5rem}qbo-menu aside.open>p,qbo-menu menu.open>p{margin-left:10px}qbo-menu aside{width:0;margin:var(--qbo-margin);padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);padding-bottom:.6em;overflow-y:scroll;top:53px!important;width:100%;background-color:#f0f0f0;border:0;border-radius:0;border-bottom-left-radius:.7em;border-bottom-right-radius:.7em;color:var(--qbo-nav-color,#fff);height:auto;left:0;margin:0;overflow-y:auto}qbo-menu aside>h1{color:var(--qbo-color);margin-block-end:0;margin-left:1em}qbo-menu aside>p{color:var(--qbo-color);margin-block-start:0;margin-left:1.2em}qbo-menu li{display:list-item!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);line-height:var(--qbo-line-height);text-align:left;white-space:nowrap;cursor:pointer;text-decoration:none}qbo-menu li:hover{background-color:var(--qbo-border-color)}.qbo-paginate qbo-menu menu li.disabled,qbo-menu menu .qbo-paginate li.disabled,qbo-menu menu li.disabled{color:#6c757d;pointer-events:none;background-color:transparent}nav.qbo-mainmenu>div>div>ul qbo-menu menu hr,qbo-menu menu .dropdown-divider,qbo-menu menu nav.qbo-mainmenu>div>div>ul hr{height:1px;margin:.5rem 0;overflow:hidden;background-color:#e9ecef}qbo-menu menu .dropdown-header{padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}qbo-popover{background-color:#f0f0f0;border:1px solid #81181d;border-radius:var(--qbo-border-radius);color:var(--qbo-color);display:none;margin:.6em 0 0 0;padding:0 1em 0 1em;position:absolute;z-index:1}qbo-popover h3{margin-block-end:0.5em;margin-block-start:0.5em}qbo-popover p{margin-block-start:0;white-space:nowrap}qbo-popover.open{display:inherit;visibility:visible}details>a{margin-left:1.5em}div.qbo-row-subsequent{margin-top:.5em}h3.title{color:var(--qbo-h3-card-color);font-size:1.5em;font-weight:500;line-height:1.2;margin-bottom:0;margin-top:0}h4.title{color:var(--qbo-h3-card-color);font-size:1.25rem;font-weight:500;margin-block:0.5em 0;margin-bottom:.25em;margin-top:.25em}p.detail{margin-block-end:0.5em;margin-block-start:0;margin-left:.5em}div.qbo-col-noborder{border:0!important;box-shadow:initial}.qbo-height-10{height:10vh}.qbo-height-20{height:20vh}.qbo-height-30{height:30vh}.qbo-height-40{height:40vh}.qbo-height-50{height:50vh}.qbo-height-60{height:60vh}.qbo-height-70{height:70vh}.qbo-height-80{height:80vh}.qbo-height-90{height:90vh}.qbo-height-100{height:100vh}.qbo-breadcrumb{z-index:999!important}nav.qbo-breadcrumb>div>nav{--bs-breadcrumb-divider:">"}nav.qbo-breadcrumb>div>nav>ul{margin-bottom:.5rem}@media all and (min-width:992px){.navbar .dropdown-menu li,.navbar .qbo-menu-context>menu li,.navbar .qbo-menu-context>ul li,.navbar qbo-menu[type=context]>menu li,.navbar qbo-menu[type=context]>ul li,nav.qbo-mainmenu .dropdown-menu li,nav.qbo-mainmenu .qbo-menu-context>menu li,nav.qbo-mainmenu .qbo-menu-context>ul li,nav.qbo-mainmenu qbo-menu[type=context]>menu li,nav.qbo-mainmenu qbo-menu[type=context]>ul li{position:relative}.navbar .dropdown-menu .submenu,.navbar .qbo-menu-context>menu .submenu,.navbar .qbo-menu-context>ul .submenu,.navbar qbo-menu[type=context]>menu .submenu,.navbar qbo-menu[type=context]>ul .submenu,nav.qbo-mainmenu .dropdown-menu .submenu,nav.qbo-mainmenu .qbo-menu-context>menu .submenu,nav.qbo-mainmenu .qbo-menu-context>ul .submenu,nav.qbo-mainmenu qbo-menu[type=context]>menu .submenu,nav.qbo-mainmenu qbo-menu[type=context]>ul .submenu{display:none;position:absolute;left:100%;top:-7px}.navbar .dropdown-menu>li:hover,.navbar .qbo-menu-context>menu>li:hover,.navbar .qbo-menu-context>ul>li:hover,.navbar qbo-menu[type=context]>menu>li:hover,.navbar qbo-menu[type=context]>ul>li:hover,nav.qbo-mainmenu .dropdown-menu>li:hover,nav.qbo-mainmenu .qbo-menu-context>menu>li:hover,nav.qbo-mainmenu .qbo-menu-context>ul>li:hover,nav.qbo-mainmenu qbo-menu[type=context]>menu>li:hover,nav.qbo-mainmenu qbo-menu[type=context]>ul>li:hover{background-color:#f1f1f1}.navbar .dropdown-menu>li:hover>.submenu,.navbar .qbo-menu-context>menu>li:hover>.submenu,.navbar .qbo-menu-context>ul>li:hover>.submenu,.navbar qbo-menu[type=context]>menu>li:hover>.submenu,.navbar qbo-menu[type=context]>ul>li:hover>.submenu,nav.qbo-mainmenu .dropdown-menu>li:hover>.submenu,nav.qbo-mainmenu .qbo-menu-context>menu>li:hover>.submenu,nav.qbo-mainmenu .qbo-menu-context>ul>li:hover>.submenu,nav.qbo-mainmenu qbo-menu[type=context]>menu>li:hover>.submenu,nav.qbo-mainmenu qbo-menu[type=context]>ul>li:hover>.submenu{display:block}.navbar .nav-item .dropdown-mainmenu,.navbar .qbo-menu-side li .dropdown-mainmenu,.navbar qbo-menu[type=side] li .dropdown-mainmenu,.qbo-menu-side .navbar li .dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu li .dropdown-mainmenu,nav.qbo-mainmenu .nav-item .dropdown-mainmenu,nav.qbo-mainmenu .qbo-menu-side li .dropdown-mainmenu,nav.qbo-mainmenu qbo-menu[type=side] li .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] .navbar li .dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu li .dropdown-mainmenu{display:none;margin-top:0}.navbar .nav-item:hover .dropdown-mainmenu,.navbar .nav-item:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.navbar .qbo-menu-side li:hover .dropdown-mainmenu,.navbar .qbo-menu-side li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.navbar qbo-menu[type=side] li:hover .dropdown-mainmenu,.navbar qbo-menu[type=side] li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.qbo-menu-side .navbar li:hover .dropdown-mainmenu,.qbo-menu-side .navbar li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu li:hover .dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu .nav-item:hover .dropdown-mainmenu,nav.qbo-mainmenu .qbo-menu-side li:hover .dropdown-mainmenu,nav.qbo-mainmenu qbo-menu[type=side] li:hover .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul .nav-item:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] .navbar li:hover .dropdown-mainmenu,qbo-menu[type=side] .navbar li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu li:hover .dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu{display:block}.navbar .navbar-brand span,nav.qbo-mainmenu .navbar-brand span,nav.qbo-mainmenu>div>a span{margin-right:5px}}@media (max-width:991px){.navbar .dropdown-menu .dropdown-menu,.navbar .dropdown-menu .qbo-menu-context>menu,.navbar .dropdown-menu .qbo-menu-context>ul,.navbar .dropdown-menu qbo-menu[type=context]>menu,.navbar .dropdown-menu qbo-menu[type=context]>ul,.navbar .qbo-menu-context>menu .dropdown-menu,.navbar .qbo-menu-context>menu .qbo-menu-context>menu,.navbar .qbo-menu-context>menu .qbo-menu-context>ul,.navbar .qbo-menu-context>menu qbo-menu[type=context]>menu,.navbar .qbo-menu-context>menu qbo-menu[type=context]>ul,.navbar .qbo-menu-context>ul .dropdown-menu,.navbar .qbo-menu-context>ul .qbo-menu-context>menu,.navbar .qbo-menu-context>ul .qbo-menu-context>ul,.navbar .qbo-menu-context>ul qbo-menu[type=context]>menu,.navbar .qbo-menu-context>ul qbo-menu[type=context]>ul,.navbar qbo-menu[type=context]>menu .dropdown-menu,.navbar qbo-menu[type=context]>menu .qbo-menu-context>menu,.navbar qbo-menu[type=context]>menu .qbo-menu-context>ul,.navbar qbo-menu[type=context]>menu qbo-menu[type=context]>menu,.navbar qbo-menu[type=context]>menu qbo-menu[type=context]>ul,.navbar qbo-menu[type=context]>ul .dropdown-menu,.navbar qbo-menu[type=context]>ul .qbo-menu-context>menu,.navbar qbo-menu[type=context]>ul .qbo-menu-context>ul,.navbar qbo-menu[type=context]>ul qbo-menu[type=context]>menu,.navbar qbo-menu[type=context]>ul qbo-menu[type=context]>ul,nav.qbo-mainmenu .dropdown-menu .dropdown-menu,nav.qbo-mainmenu .dropdown-menu .qbo-menu-context>menu,nav.qbo-mainmenu .dropdown-menu .qbo-menu-context>ul,nav.qbo-mainmenu .dropdown-menu qbo-menu[type=context]>menu,nav.qbo-mainmenu .dropdown-menu qbo-menu[type=context]>ul,nav.qbo-mainmenu .qbo-menu-context>menu .dropdown-menu,nav.qbo-mainmenu .qbo-menu-context>menu .qbo-menu-context>menu,nav.qbo-mainmenu .qbo-menu-context>menu .qbo-menu-context>ul,nav.qbo-mainmenu .qbo-menu-context>menu qbo-menu[type=context]>menu,nav.qbo-mainmenu .qbo-menu-context>menu qbo-menu[type=context]>ul,nav.qbo-mainmenu .qbo-menu-context>ul .dropdown-menu,nav.qbo-mainmenu .qbo-menu-context>ul .qbo-menu-context>menu,nav.qbo-mainmenu .qbo-menu-context>ul .qbo-menu-context>ul,nav.qbo-mainmenu .qbo-menu-context>ul qbo-menu[type=context]>menu,nav.qbo-mainmenu .qbo-menu-context>ul qbo-menu[type=context]>ul,nav.qbo-mainmenu qbo-menu[type=context]>menu .dropdown-menu,nav.qbo-mainmenu qbo-menu[type=context]>menu .qbo-menu-context>menu,nav.qbo-mainmenu qbo-menu[type=context]>menu .qbo-menu-context>ul,nav.qbo-mainmenu qbo-menu[type=context]>menu qbo-menu[type=context]>menu,nav.qbo-mainmenu qbo-menu[type=context]>menu qbo-menu[type=context]>ul,nav.qbo-mainmenu qbo-menu[type=context]>ul .dropdown-menu,nav.qbo-mainmenu qbo-menu[type=context]>ul .qbo-menu-context>menu,nav.qbo-mainmenu qbo-menu[type=context]>ul .qbo-menu-context>ul,nav.qbo-mainmenu qbo-menu[type=context]>ul qbo-menu[type=context]>menu,nav.qbo-mainmenu qbo-menu[type=context]>ul qbo-menu[type=context]>ul{margin-left:.7rem;margin-right:.7rem;margin-bottom:.5rem}}.navbar .nav-item nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul .nav-item li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li li>a.qbo-dropdown-item>span.qbo-submenuexpand,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li li>a.qbo-dropdown-item>span.qbo-submenuexpand{float:right}.navbar .nav-item .icon,.navbar .nav-item nav.qbo-mainmenu>div>div>ul i.qbo-icon,.navbar .qbo-menu-side li .icon,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.navbar qbo-menu[type=side] li .icon,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.qbo-menu-side .navbar li .icon,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.qbo-menu-side nav.qbo-mainmenu li .icon,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li i.qbo-icon,nav.qbo-mainmenu .nav-item .icon,nav.qbo-mainmenu .qbo-menu-side li .icon,nav.qbo-mainmenu qbo-menu[type=side] li .icon,nav.qbo-mainmenu>div>div>ul .nav-item i.qbo-icon,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li i.qbo-icon,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item .icon,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item i.qbo-icon,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li i.qbo-icon,qbo-menu[type=side] .navbar li .icon,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul i.qbo-icon,qbo-menu[type=side] nav.qbo-mainmenu li .icon,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li i.qbo-icon{margin-right:5px}.navbar .nav-item nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul .nav-item a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li a.qbo-doubleclick,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li a.qbo-doubleclick{cursor:pointer}.bd-subnavbar,nav.qbo-breadcrumb{position:relative;z-index:1020;background-color:rgba(255,255,255,.95);box-shadow:0 .5rem 1rem rgba(0,0,0,.05),inset 0 -1px 0 rgba(0,0,0,.15)}.bd-subnavbar .dropdown-menu,.bd-subnavbar .qbo-menu-context>menu,.bd-subnavbar .qbo-menu-context>ul,.bd-subnavbar qbo-menu[type=context]>menu,.bd-subnavbar qbo-menu[type=context]>ul,nav.qbo-breadcrumb .dropdown-menu,nav.qbo-breadcrumb .qbo-menu-context>menu,nav.qbo-breadcrumb .qbo-menu-context>ul,nav.qbo-breadcrumb qbo-menu[type=context]>menu,nav.qbo-breadcrumb qbo-menu[type=context]>ul{font-size:.875rem;box-shadow:0 .5rem 1rem rgba(0,0,0,.05)}.bd-subnavbar .dropdown-item.current,.bd-subnavbar .qbo-menu-context li.current,.bd-subnavbar nav.qbo-mainmenu>div>div>ul li>a.current.qbo-dropdown-item,.bd-subnavbar qbo-menu[type=context] li.current,.qbo-menu-context .bd-subnavbar li.current,.qbo-menu-context nav.qbo-breadcrumb li.current,nav.qbo-breadcrumb .dropdown-item.current,nav.qbo-breadcrumb .qbo-menu-context li.current,nav.qbo-breadcrumb nav.qbo-mainmenu>div>div>ul li>a.current.qbo-dropdown-item,nav.qbo-breadcrumb qbo-menu[type=context] li.current,nav.qbo-mainmenu>div>div>ul .bd-subnavbar li>a.current.qbo-dropdown-item,nav.qbo-mainmenu>div>div>ul nav.qbo-breadcrumb li>a.current.qbo-dropdown-item,qbo-menu[type=context] .bd-subnavbar li.current,qbo-menu[type=context] nav.qbo-breadcrumb li.current{font-weight:600;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 1rem top .6rem;background-size:.75rem .75rem}@media (min-width:768px){.bd-subnavbar,nav.qbo-breadcrumb{position:sticky;top:0}}@media (min-width:768px){:root{scroll-padding-top:4rem}}.bd-content>h2:not(:first-child),div.qbo-container-layout>main>div>h2:not(:first-child){margin-top:3rem}.bd-content>h3,div.qbo-container-layout>main>div>h3{margin-top:2rem}.bd-content>ol li,.bd-content>ul li,div.qbo-container-layout>main>div>ol li,div.qbo-container-layout>main>div>ul li{margin-bottom:.25rem}.bd-content>ol li>p~ul,.bd-content>ul li>p~ul,div.qbo-container-layout>main>div>ol li>p~ul,div.qbo-container-layout>main>div>ul li>p~ul{margin-top:-.5rem;margin-bottom:1rem}.bd-content>.table,div.qbo-container-layout>main>div>.table{max-width:100%;margin-bottom:1.5rem;font-size:.875rem}@media (max-width:991.98px){.bd-content>.table,div.qbo-container-layout>main>div>.table{display:block;overflow-x:auto}.bd-content>.table.table-bordered,div.qbo-container-layout>main>div>.table.table-bordered{border:0}}.bd-content>.table td:first-child,.bd-content>.table th:first-child,div.qbo-container-layout>main>div>.table td:first-child,div.qbo-container-layout>main>div>.table th:first-child{padding-left:0}.bd-content>.table td:not(:last-child),.bd-content>.table th:not(:last-child),div.qbo-container-layout>main>div>.table td:not(:last-child),div.qbo-container-layout>main>div>.table th:not(:last-child){padding-right:1.5rem}.bd-content>.table td:first-child>code,div.qbo-container-layout>main>div>.table td:first-child>code{white-space:nowrap}@media (max-width:767.98px){.bd-sidebar,aside.qbo-sidebar{margin:0 -.75rem 1rem}}.bd-links,aside.qbo-sidebar>nav{overflow:auto;font-weight:600}@media (min-width:768px){.bd-links,aside.qbo-sidebar>nav{position:sticky;top:5rem;display:block!important;height:calc(100vh - 7rem);padding-left:.25rem;margin-left:-.25rem;overflow-y:auto}}@media (max-width:767.98px){.bd-links>ul,aside.qbo-sidebar>nav>ul{padding:1.5rem .75rem;background-color:#f8f9fa;border-bottom:1px solid #e9ecef}}.bd-links a,aside.qbo-sidebar>nav a{padding:.1875rem .5rem;margin-top:.125rem;margin-left:1.25rem;color:rgba(0,0,0,.65);text-decoration:none}.bd-links a:focus,.bd-links a:hover,aside.qbo-sidebar>nav a:focus,aside.qbo-sidebar>nav a:hover{color:rgba(0,0,0,.85);background-color:rgba(121,82,179,.1)}.bd-links .btn,.bd-links .qbo-btn-light,.bd-links button.qbo-btn,.bd-links button.qbo-primary,.bd-links button.qbo-primary-dropdown,.bd-links button.qbo-secondary,.bd-links qbo-icon[type=button],.bd-links qbo-icon[type=toggle],aside.qbo-sidebar>nav .btn,aside.qbo-sidebar>nav .qbo-btn-light,aside.qbo-sidebar>nav button.qbo-btn,aside.qbo-sidebar>nav button.qbo-primary,aside.qbo-sidebar>nav button.qbo-primary-dropdown,aside.qbo-sidebar>nav button.qbo-secondary,aside.qbo-sidebar>nav qbo-icon[type=button],aside.qbo-sidebar>nav qbo-icon[type=toggle],aside.qbo-sidebar>nav>ul>li>button{padding:.25rem .5rem;font-weight:600;color:rgba(0,0,0,.65);background-color:transparent;border:0}.bd-links .btn:focus,.bd-links .btn:hover,.bd-links .qbo-btn-light:focus,.bd-links .qbo-btn-light:hover,.bd-links button.qbo-btn:focus,.bd-links button.qbo-btn:hover,.bd-links button.qbo-primary-dropdown:focus,.bd-links button.qbo-primary-dropdown:hover,.bd-links button.qbo-primary:focus,.bd-links button.qbo-primary:hover,.bd-links button.qbo-secondary:focus,.bd-links button.qbo-secondary:hover,.bd-links qbo-icon[type=button]:focus,.bd-links qbo-icon[type=button]:hover,.bd-links qbo-icon[type=toggle]:focus,.bd-links qbo-icon[type=toggle]:hover,aside.qbo-sidebar>nav .btn:focus,aside.qbo-sidebar>nav .btn:hover,aside.qbo-sidebar>nav .qbo-btn-light:focus,aside.qbo-sidebar>nav .qbo-btn-light:hover,aside.qbo-sidebar>nav button.qbo-btn:focus,aside.qbo-sidebar>nav button.qbo-btn:hover,aside.qbo-sidebar>nav button.qbo-primary-dropdown:focus,aside.qbo-sidebar>nav button.qbo-primary-dropdown:hover,aside.qbo-sidebar>nav button.qbo-primary:focus,aside.qbo-sidebar>nav button.qbo-primary:hover,aside.qbo-sidebar>nav button.qbo-secondary:focus,aside.qbo-sidebar>nav button.qbo-secondary:hover,aside.qbo-sidebar>nav qbo-icon[type=button]:focus,aside.qbo-sidebar>nav qbo-icon[type=button]:hover,aside.qbo-sidebar>nav qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav qbo-icon[type=toggle]:hover,aside.qbo-sidebar>nav>ul>li>button:focus,aside.qbo-sidebar>nav>ul>li>button:hover{color:rgba(0,0,0,.85);background-color:rgba(121,82,179,.1)}.bd-links .btn:focus,.bd-links .qbo-btn-light:focus,.bd-links button.qbo-btn:focus,.bd-links button.qbo-primary-dropdown:focus,.bd-links button.qbo-primary:focus,.bd-links button.qbo-secondary:focus,.bd-links qbo-icon[type=button]:focus,.bd-links qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav .btn:focus,aside.qbo-sidebar>nav .qbo-btn-light:focus,aside.qbo-sidebar>nav button.qbo-btn:focus,aside.qbo-sidebar>nav button.qbo-primary-dropdown:focus,aside.qbo-sidebar>nav button.qbo-primary:focus,aside.qbo-sidebar>nav button.qbo-secondary:focus,aside.qbo-sidebar>nav qbo-icon[type=button]:focus,aside.qbo-sidebar>nav qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav>ul>li>button:focus{box-shadow:0 0 0 1px rgba(121,82,179,.7)}.bd-links .btn::before,.bd-links .qbo-btn-light::before,.bd-links button.qbo-btn::before,.bd-links button.qbo-primary-dropdown::before,.bd-links button.qbo-primary::before,.bd-links button.qbo-secondary::before,.bd-links qbo-icon[type=button]::before,.bd-links qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav .btn::before,aside.qbo-sidebar>nav .qbo-btn-light::before,aside.qbo-sidebar>nav button.qbo-btn::before,aside.qbo-sidebar>nav button.qbo-primary-dropdown::before,aside.qbo-sidebar>nav button.qbo-primary::before,aside.qbo-sidebar>nav button.qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[type=button]::before,aside.qbo-sidebar>nav qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button::before{width:1.25em;line-height:0;content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");transition:transform .35s ease;transform-origin:0.5em 50%}@media (prefers-reduced-motion:reduce){.bd-links .btn::before,.bd-links .qbo-btn-light::before,.bd-links button.qbo-btn::before,.bd-links button.qbo-primary-dropdown::before,.bd-links button.qbo-primary::before,.bd-links button.qbo-secondary::before,.bd-links qbo-icon[type=button]::before,.bd-links qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav .btn::before,aside.qbo-sidebar>nav .qbo-btn-light::before,aside.qbo-sidebar>nav button.qbo-btn::before,aside.qbo-sidebar>nav button.qbo-primary-dropdown::before,aside.qbo-sidebar>nav button.qbo-primary::before,aside.qbo-sidebar>nav button.qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[type=button]::before,aside.qbo-sidebar>nav qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button::before{transition:none}}.bd-links .btn[aria-expanded=true],.bd-links [aria-expanded=true].qbo-btn-light,.bd-links button[aria-expanded=true].qbo-btn,.bd-links button[aria-expanded=true].qbo-primary,.bd-links button[aria-expanded=true].qbo-primary-dropdown,.bd-links button[aria-expanded=true].qbo-secondary,.bd-links qbo-icon[aria-expanded=true][type=button],.bd-links qbo-icon[aria-expanded=true][type=toggle],aside.qbo-sidebar>nav .btn[aria-expanded=true],aside.qbo-sidebar>nav [aria-expanded=true].qbo-btn-light,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-btn,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary-dropdown,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-secondary,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=button],aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=toggle],aside.qbo-sidebar>nav>ul>li>button[aria-expanded=true]{color:rgba(0,0,0,.85)}.bd-links .btn[aria-expanded=true]::before,.bd-links [aria-expanded=true].qbo-btn-light::before,.bd-links button[aria-expanded=true].qbo-btn::before,.bd-links button[aria-expanded=true].qbo-primary-dropdown::before,.bd-links button[aria-expanded=true].qbo-primary::before,.bd-links button[aria-expanded=true].qbo-secondary::before,.bd-links qbo-icon[aria-expanded=true][type=button]::before,.bd-links qbo-icon[aria-expanded=true][type=toggle]::before,aside.qbo-sidebar>nav .btn[aria-expanded=true]::before,aside.qbo-sidebar>nav [aria-expanded=true].qbo-btn-light::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-btn::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary-dropdown::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=button]::before,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button[aria-expanded=true]::before{transform:rotate(90deg)}.bd-links .active,.bd-links .qbo-paginate li.active,.bd-links nav.qbo-breadcrumb>div>nav>ul>li:last-child,.bd-links qbo-icon[selected],.qbo-paginate .bd-links li.active,aside.qbo-sidebar>nav .active,aside.qbo-sidebar>nav qbo-icon[selected]{font-weight:600;color:rgba(0,0,0,.85)}@media (min-width:768px){.bd-layout,div.qbo-container-layout{display:grid;gap:1.5rem;grid-template-areas:"sidebar main";grid-template-columns:1fr 3fr}}@media (min-width:992px){.bd-layout,div.qbo-container-layout{grid-template-columns:1fr 5fr}}.bd-sidebar,aside.qbo-sidebar{grid-area:sidebar}.bd-content,div.qbo-container-layout>main>div{grid-area:content;min-width:1px}.bd-example{position:relative;padding:1rem;margin:1rem -.75rem 0;border:solid #dee2e6;border-width:1px 0 0}.bd-example::after{display:block;clear:both;content:""}@media (min-width:576px){.bd-example{padding:1.5rem;margin-right:0;margin-left:0;border-width:1px;border-top-left-radius:.25rem;border-top-right-radius:.25rem}}.bd-example+p{margin-top:2rem}.bd-example>.form-control+.form-control,.qbo-paginate li.pageSize .bd-example>.form-control+input,.qbo-paginate li.pageSize .bd-example>input+.form-control,.qbo-paginate li.pageSize .bd-example>input+input{margin-top:.5rem}.bd-example>.alert+.alert,.bd-example>.nav+.nav,.bd-example>.navbar+.navbar,.bd-example>.navbar+nav.qbo-mainmenu,.bd-example>.progress+.progress,.bd-example>nav.qbo-mainmenu+.navbar,.bd-example>nav.qbo-mainmenu+nav.qbo-mainmenu,.qbo-menu-side .bd-example>.nav+menu,.qbo-menu-side .bd-example>menu+.nav,.qbo-menu-side .bd-example>menu+menu,qbo-menu[type=side] .bd-example>.nav+menu,qbo-menu[type=side] .bd-example>menu+.nav,qbo-menu[type=side] .bd-example>menu+menu{margin-top:1rem}.bd-example.qbo-menu-context>menu,.bd-example.qbo-menu-context>ul,.bd-example>.dropdown-menu,qbo-menu.bd-example[type=context]>menu,qbo-menu.bd-example[type=context]>ul{position:static;display:block}.bd-example>:last-child{margin-bottom:0}.bd-example>img+img,.bd-example>svg+svg{margin-left:.5rem}.bd-example>.btn,.bd-example>.btn-group,.bd-example>.qbo-btn-light,.bd-example>button.qbo-btn,.bd-example>button.qbo-primary,.bd-example>button.qbo-primary-dropdown,.bd-example>button.qbo-secondary,.bd-example>qbo-icon[type=button],.bd-example>qbo-icon[type=toggle],aside.qbo-sidebar>nav>ul>li.bd-example>button{margin:.25rem .125rem}.bd-example>.btn-toolbar+.btn-toolbar{margin-top:.5rem}.bd-example>.list-group{max-width:400px}.bd-example>[class*=list-group-horizontal]{max-width:100%}.bd-example .fixed-top,.bd-example .sticky-top{position:static;margin:-1rem -1rem 1rem}.bd-example .fixed-bottom{position:static;margin:1rem -1rem -1rem}@media (min-width:576px){.bd-example .fixed-top,.bd-example .sticky-top{margin:-1.5rem -1.5rem 1rem}.bd-example .fixed-bottom{margin:1rem -1.5rem -1.5rem}}.bd-example .pagination,.bd-example .qbo-paginate{margin-top:.5rem;margin-bottom:.5rem}.highlight{padding:1rem;margin-bottom:1rem;background-color:#f8f9fa}@media (min-width:576px){.highlight{padding:1rem 1.5rem}}.highlight pre{padding:0;margin-top:.65rem;margin-bottom:.65rem;white-space:pre;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#212529;word-wrap:normal}.bd-content .highlight,div.qbo-container-layout>main>div .highlight{margin-right:-.75rem;margin-left:-.75rem}@media (min-width:576px){.bd-content .highlight,div.qbo-container-layout>main>div .highlight{margin-right:0;margin-left:0}}.bd-brand-logos{color:#7952b3}.bd-brand-logos .inverse{color:#fff;background-color:#7952b3}.algolia-docsearch-footer--logo{color:inherit}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:var(--qbo-background-color);background-clip:border-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:var(--qbo-border-radius)}.card>.list-group:last-child .list-group-item:last-child{border-top-right-radius:var(--qbo-border-radius)}.card-header,.qbo-card header,qbo-card header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#999;border-bottom:1px solid var(--qbo-border-color)}.card-header:first-child,.qbo-card header:first-child,qbo-card header:first-child{border-radius:var(--qbo-border-radius)}.card-header+.list-group .list-group-item:first-child,.qbo-card header+.list-group .list-group-item:first-child,qbo-card header+.list-group .list-group-item:first-child{border-top:0}.card-footer,.qbo-card footer,qbo-card footer{padding:.75rem 1.25rem;background-color:#999;border-top:1px solid var(--qbo-border-color)}.card-footer:last-child,.qbo-card footer:last-child,qbo-card footer:last-child{border-radius:var(--qbo-border-radius)}.modal-dialog,.qbo-modal dialog,.qbo-modal div.qbo-modal-dialog{width:100%;max-width:500px;margin:0 auto}.modal-header,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-header,.qbo-modal header{padding:16px;border-bottom:1px solid #ddd;display:flex;justify-content:space-between;align-items:center}.modal-body,.qbo-modal div,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-body{padding:16px;font-size:1rem;color:#555}.modal-footer,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-footer,.qbo-modal footer{padding:16px;border-top:1px solid #ddd;display:flex;justify-content:flex-end;gap:10px}.modal-content,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content{background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1);overflow:hidden;display:flex;flex-direction:column}.page-item,.qbo-paginate li{margin:0 5px}.page-link,.qbo-paginate a{display:block;padding:8px 16px;text-decoration:none;color:#007bff;border:1px solid #ddd;border-radius:4px;transition:background-color .3s,color .3s}.input-group,.qbo-paginate li.pageSize,div.qbo-input-group{display:flex;align-items:center;width:100%}.input-group-sm .input,.input-group-sm .input-group-text,.input-group-sm .qbo-paginate li.pageSize span,.input-group-sm span.qbo-input-group-text,.qbo-paginate li.pageSize .input-group-sm span,.qbo-paginate.small li.pageSize .input,.qbo-paginate.small li.pageSize .input-group-text,.qbo-paginate.small li.pageSize li.pageSize span,.qbo-paginate.small li.pageSize span.qbo-input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize li.pageSize span,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize span.qbo-input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}@media (max-width:576px){.input-group-sm .input,.input-group-sm .input-group-text,.input-group-sm .qbo-paginate li.pageSize span,.input-group-sm span.qbo-input-group-text,.qbo-paginate li.pageSize .input-group-sm span,.qbo-paginate.small li.pageSize .input,.qbo-paginate.small li.pageSize .input-group-text,.qbo-paginate.small li.pageSize li.pageSize span,.qbo-paginate.small li.pageSize span.qbo-input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize li.pageSize span,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize span.qbo-input-group-text{font-size:.75rem;padding:.2rem .4rem}}.input-group-text,.qbo-paginate li.pageSize span,span.qbo-input-group-text{background-color:#f8f9fa;border:1px solid #ced4da;padding:.375rem .75rem;color:#495057;font-size:1rem;border-radius:.25rem 0;cursor:pointer;transition:background-color .3s,border-color .3s}.input-group-text:hover,.qbo-paginate li.pageSize span:hover,span.qbo-input-group-text:hover{background-color:#e9ecef;border-color:#adb5bd}.qbo-paginate li.pageSize,.w-auto{width:auto}.justify-content-center,.qbo-paginate.center{display:flex;justify-content:center}.justify-content-end,.qbo-paginate.right{display:flex;justify-content:flex-end}.pagination-sm .page-link,.pagination-sm .qbo-paginate a,.qbo-paginate .pagination-sm a,.qbo-paginate .qbo-paginate.small a,.qbo-paginate aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate a,.qbo-paginate.small .page-link,.qbo-paginate.small .qbo-paginate a,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate .page-link,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate .qbo-paginate a{padding:4px 8px;font-size:.875rem;border-radius:3px}.form-control-sm,.qbo-paginate.small li.pageSize input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize input{padding:.25rem .5rem;font-size:.875rem;height:calc(1.5em + .75rem + 2px);line-height:1.5;border-radius:.2rem;border:1px solid #ced4da}.form-control-sm:focus,.qbo-paginate.small li.pageSize input:focus,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize input:focus{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-select-sm{padding:.25rem .5rem;font-size:.875rem;height:calc(1.5em + .75rem + 2px);border-radius:.2rem;border:1px solid #ced4da}.list-unstyled,aside.qbo-sidebar>nav>ul,aside.qbo-sidebar>nav>ul>li>div>ul{list-style:none;padding-left:0;margin:0}.mb-0,aside.qbo-sidebar>nav>ul{margin-bottom:0}.py-3,aside.qbo-sidebar>nav>ul{padding-top:1rem;padding-bottom:1rem}.pt-sm-1{padding-top:0}@media (min-width:576px){.pt-sm-1{padding-top:.25rem}}.pt-md-1,aside.qbo-sidebar>nav>ul{padding-top:0}@media (min-width:768px){.pt-md-1,aside.qbo-sidebar>nav>ul{padding-top:.25rem}}.pt-lg-1{padding-top:0}@media (min-width:992px){.pt-lg-1{padding-top:.25rem}}.pt-xl-1{padding-top:0}@media (min-width:1200px){.pt-xl-1{padding-top:.25rem}}.d-inline-flex,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{display:inline-flex}.align-items-center,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{display:flex;align-items:center}.rounded,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{border-radius:.25rem}.fw-normal,aside.qbo-sidebar>nav>ul>li>div>ul{font-weight:400}.pb-1,aside.qbo-sidebar>nav>ul>li>div>ul{padding-bottom:.25rem}.container-fluid,div.qbo-container-layout,nav.qbo-breadcrumb>div,nav.qbo-mainmenu>div{width:100%;max-width:100%;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.breadcrumb,nav.qbo-breadcrumb,nav.qbo-breadcrumb>div>nav>ul{list-style:none;padding:0;margin:0;display:flex}.breadcrumb-item,nav.qbo-breadcrumb>div>nav>ul>li{font-size:1rem}.breadcrumb-item a,nav.qbo-breadcrumb>div>nav>ul>li a{text-decoration:none;color:#007bff;transition:color .3s}.breadcrumb-item a:hover,nav.qbo-breadcrumb>div>nav>ul>li a:hover{color:#0056b3}.breadcrumb-item.active,.qbo-paginate li.breadcrumb-item.active,nav.qbo-breadcrumb>div>nav>ul>li.active,nav.qbo-breadcrumb>div>nav>ul>li:last-child,qbo-icon.breadcrumb-item[selected]{color:#6c757d}.breadcrumb-item+.breadcrumb-item::before,nav.qbo-breadcrumb>div>nav>ul>.breadcrumb-item+li::before,nav.qbo-breadcrumb>div>nav>ul>li+.breadcrumb-item::before,nav.qbo-breadcrumb>div>nav>ul>li+li::before{content:"›";margin:0 8px;color:#6c757d}@media (min-width:992px){.navbar-expand-lg,nav.qbo-mainmenu{flex-flow:row nowrap;justify-content:flex-start}}.bg-dark,nav.qbo-mainmenu{background-color:#343a40}.navbar,nav.qbo-mainmenu{display:flex;flex-direction:column;background-color:#343a40;padding:10px}.navbar ul,nav.qbo-mainmenu ul{list-style:none;padding:0;margin:0}.navbar li,nav.qbo-mainmenu li{margin:5px 0}.navbar a,nav.qbo-mainmenu a{color:#fff;text-decoration:none;padding:8px}.navbar a:hover,nav.qbo-mainmenu a:hover{background-color:#575757}.navbar-collapse,nav.qbo-mainmenu>div>div{display:none;flex-direction:column}.navbar-collapse.show,.qbo-menu-context>menu.navbar-collapse,div.navbar-collapse.qbo-show,nav.qbo-mainmenu>div>div.qbo-show,nav.qbo-mainmenu>div>div.show,qbo-menu[type=context]>menu.navbar-collapse{display:flex}@media (min-width:992px){.navbar,nav.qbo-mainmenu{flex-direction:row}.navbar-collapse,nav.qbo-mainmenu>div>div{display:flex;flex-direction:row}.navbar li,nav.qbo-mainmenu li{margin:0 15px}}.dropdown,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown{position:relative;display:inline-block}.dropdown-toggle,button.qbo-primary-dropdown,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown>a{background-color:#007bff;color:#fff;padding:8px 16px;border:none;cursor:pointer;font-size:16px;border-radius:4px}.dropdown-toggle:hover,button.qbo-primary-dropdown:hover,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown>a:hover{background-color:#0056b3}.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:10px}.col-md-2{grid-column:span 2}.col-md-3{grid-column:span 3}.col-md-4{grid-column:span 4}.col-md-6{grid-column:span 6}.col-md-12{grid-column:span 12}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}.mt-5{margin-top:3rem}.col-form-label-sm{font-size:.875rem;padding-top:.25rem;padding-bottom:.25rem;line-height:1.25}.form-select{display:inline-block;width:100%;padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.form-select option{padding:.375rem .75rem}.btn-light,.qbo-btn-light{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #ced4da;border-radius:.25rem;background-color:#f8f9fa;color:#495057;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-light:hover,.qbo-btn-light:hover{background-color:#e2e6ea;border-color:#adb5bd;color:#495057}.btn-light:focus,.qbo-btn-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.btn-light:disabled,.qbo-btn-light:disabled{background-color:#e9ecef;border-color:#ced4da;color:#6c757d;cursor:not-allowed}.btn-primary,button.qbo-primary,button.qbo-primary-dropdown{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #007bff;border-radius:.25rem;background-color:#007bff;color:#fff;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-primary:hover,button.qbo-primary-dropdown:hover,button.qbo-primary:hover{background-color:#0056b3;border-color:#0056b3}.btn-primary:focus,button.qbo-primary-dropdown:focus,button.qbo-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.btn-primary:disabled,button.qbo-primary-dropdown:disabled,button.qbo-primary:disabled{background-color:silver;border-color:silver;color:#6c757d;cursor:not-allowed}.btn-secondary,button.qbo-secondary{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #6c757d;border-radius:.25rem;background-color:#6c757d;color:#fff;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-secondary:hover,button.qbo-secondary:hover{background-color:#5a6268;border-color:#545b62}.btn-secondary:focus,button.qbo-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.25)}.btn-secondary:disabled,button.qbo-secondary:disabled{background-color:#e2e6ea;border-color:#ced4da;color:#6c757d;cursor:not-allowed}.dropdown-toggle-split,button.qbo-primary-dropdown{display:inline-flex;align-items:center;position:relative;border:1px solid #ced4da;border-radius:.25rem}.dropdown-menu,.qbo-menu-context>menu,.qbo-menu-context>ul,qbo-menu[type=context]>menu,qbo-menu[type=context]>ul{display:none;position:absolute;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;top:100%;left:0;min-width:160px;z-index:1}.dropdown-toggle-split.open .dropdown-menu,.dropdown-toggle-split.open .qbo-menu-context>menu,.dropdown-toggle-split.open .qbo-menu-context>ul,.dropdown-toggle-split.open qbo-menu[type=context]>menu,.dropdown-toggle-split.open qbo-menu[type=context]>ul,button.open.qbo-primary-dropdown .dropdown-menu,button.open.qbo-primary-dropdown .qbo-menu-context>menu,button.open.qbo-primary-dropdown .qbo-menu-context>ul,button.open.qbo-primary-dropdown qbo-menu[type=context]>menu,button.open.qbo-primary-dropdown qbo-menu[type=context]>ul{display:block}.dropdown-menu a,.qbo-menu-context>menu a,.qbo-menu-context>ul a,qbo-menu[type=context]>menu a,qbo-menu[type=context]>ul a{color:#495057;padding:.375rem .75rem;text-decoration:none;display:block}.dropdown-menu a:hover,.qbo-menu-context>menu a:hover,.qbo-menu-context>ul a:hover,qbo-menu[type=context]>menu a:hover,qbo-menu[type=context]>ul a:hover{background-color:#f1f1f1}.flex-column,.qbo-menu-side menu,qbo-menu[type=side] menu{display:flex;flex-direction:column}.qbo-card header,qbo-card header{font-weight:700;font-size:1.25rem;cursor:pointer;position:relative;padding-left:1.25rem;background-repeat:no-repeat;background-position:left center;background-size:1rem 1rem}.qbo-card.minimize>*,qbo-card.minimize>*{display:none}.qbo-card.minimize header,qbo-card.minimize header{display:block}.qbo-card.normal>.expanded,qbo-card.normal>.expanded{display:none}.qbo-card>h3.title,qbo-card>h3.title{font-size:1.5em}.qbo-card>p.detail,qbo-card>p.detail{margin-left:0}qbo-card[display=maximize] header{background-image:url("/ui/images/qbo-icons.svg#i-arrow-down-circle")}qbo-card[display=minimize] header{background-image:url("/ui/images/qbo-icons.svg#i-arrow-right-circle")}qbo-card[display=normal] header{position:relative;padding-left:1.25rem;background-image:url("/ui/images/qbo-icons.svg#i-arrow-down-right-circle");background-repeat:no-repeat;background-position:left center;background-size:1rem 1rem}.qbo-modal{display:block}.qbo-paginate{display:flex;padding-left:0;list-style:none;border-radius:var(---qbo-border-radius)}.qbo-paginate a{cursor:pointer}.qbo-paginate li.disabled a{color:inherit;cursor:default}.qbo-paginate li.active a,.qbo-paginate nav.qbo-breadcrumb>div>nav>ul>li:last-child a{color:inherit;cursor:default;font-weight:700}.qbo-paginate li.pageSize input{background-color:inherit;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);width:5em}.qbo-paginate li.pageSize span{background-color:inherit;border:0;padding-right:.5em}nav.qbo-breadcrumb{border-bottom:1px solid rgba(0,0,0,.15);box-shadow:inherit;margin-bottom:.5rem;padding-bottom:.25rem!important;padding-top:.5rem!important}.navbar-dark,nav.qbo-mainmenu{color:#fff}.navbar-dark a,nav.qbo-mainmenu a{color:#fff;text-decoration:none}.navbar-dark a:hover,nav.qbo-mainmenu a:hover{color:#ddd}.navbar-dark .navbar-brand,nav.qbo-mainmenu .navbar-brand,nav.qbo-mainmenu>div>a{color:#fff}.navbar-dark .navbar-toggler-icon,nav.qbo-mainmenu .navbar-toggler-icon,nav.qbo-mainmenu>div>button>span{background-color:#fff}nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:not(.qbo-dropdown){padding-top:5px}button.qbo-primary-dropdown{border-top-right-radius:inherit!important;border-bottom-right-radius:inherit!important}button.expandcollapse{background-color:#eee;float:left;margin-right:.5em;margin-top:.1em;padding:.2em .3em 0 .3em}button.qbo-option{background-color:#eee;margin-right:0;padding:.2em .3em 0 .3em}button.qbo-option-active{background-color:#81181d;border-color:#81181d}button.qbo-option-active svg{filter:brightness(0) invert(1)}div.qbo-option-group{float:right}div.qbo-card-buttons{margin-bottom:.5em}div.qbo-card-buttons>button{background-color:var(--qbo-background-color);border:1px solid var(--qbo-background-color);margin-right:0}div.qbo-card-buttons>button:hover{background-color:#eee;border:1px solid #eee}div.qbo-card-buttons>button.active{background-color:#81181d;border:1px solid #81181d;color:#fff}div.qbo-card-buttons>button.active svg{filter:brightness(0) invert(1)}.btn-close{background-color:#eee;margin-right:inherit;padding:.2em .75em .25em .75em}.qbo-icon::before,[class*=" qbo-icon-"]::before,[class^=qbo-icon-]::before{display:inline-block;font-family:bootstrap-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;line-height:1;vertical-align:-.125em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}span.qbo-input-group-text{margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.qbo-float-end{float:right}.qbo-pointer{cursor:pointer}qbo-resize{position:relative;display:block}qbo-resize svg{justify-content:center;align-items:center}qbo-resize:hover{background-color:#d3d3d3}qbo-resize.horizontal{width:5px;cursor:col-resize;padding-left:2px;padding-right:3px}qbo-resize.vertical{width:100%;height:5px;cursor:row-resize}.qbo-resize{flex:0 0 auto;width:auto}.qbo-menu-context,qbo-menu[type=context]{position:fixed;z-index:2}.qbo-menu-side,qbo-menu[type=side]{width:auto;padding:0 0;transition:width .1s;cursor:ew-resize;border-left:1px solid var(--bs-dark-border-subtle);border-right:1px solid var(--bs-dark-border-subtle)}.qbo-menu-side span,qbo-menu[type=side] span{display:none}.qbo-menu-side.expanded span,qbo-menu[type=side].expanded span{display:inline}tr.qbo-select-on{background-color:#d3d3d3}tr.qbo-select-on td{background-color:#d3d3d3}li.qbo-select-on{background-color:#d3d3d3}table{border:1px solid var(--qbo-border-color);border-collapse:initial!important;border-radius:4px;border-spacing:0px;margin-bottom:0;width:100%}table th{background:linear-gradient(to bottom,#d9d9d9,#fff);background-color:initial;color:#595959;padding:var(--qbo-table-padding);position:sticky;text-align:inherit;top:0}table td{font-size:.9rem;padding:var(--qbo-table-padding);vertical-align:top}table td span.bodyText{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:750px}table tbody tr:not(:last-child):hover{background:linear-gradient(to bottom,#fff,#f2f2f2)}table tbody tr:last-child:hover{background:linear-gradient(to bottom,#f2f2f2,#fff)}table tbody tr:not(:last-child) td{border-bottom:1px solid #f2f2f2}table tbody tr.qbo-filter td:last-child{padding-right:.5em}table tbody tr.qbo-filter td input{border:1px solid #81181d;border-radius:4px;padding-inline:initial;text-indent:.5em;width:100%}tfoot{font-size:.8rem;color:var(--qbo-table-footer-color);background-color:var(--qbo-table-footer-background);border:1px solid var(--qbo-border-color)}tfoot td,tfoot th{padding:calc(var(--qbo-table-padding)/ 2)}tfoot td{background:linear-gradient(to bottom,#fff,#d9d9d9);color:#595959;padding:.375rem}tfoot select{background:initial;border:0}.qbo-nowrap td,.qbo-nowrap th{white-space:nowrap;text-overflow:ellipsis}.qbo-truncate{max-width:0;overflow:hidden}details{padding-left:3px}.date,.numeric{text-align:right}.sort{cursor:pointer}.asc::after,.desc::after{display:inline-block;margin-left:.3rem;width:.7rem;height:.7rem;content:"";background-size:contain;background-repeat:no-repeat}.asc::after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7 14l5-5 5 5z"/></svg>')}.desc::after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7 10l5 5 5-5z"/></svg>')}.qbo-tabs{border-bottom:1px solid var(--qbo-border-color);display:flex;list-style:none;margin-block-start:0.375em;margin-bottom:.1em;padding-left:0}.qbo-tabs li{border:1px solid transparent;border-top-left-radius:var(--qbo-border-radius);border-top-right-radius:var(--qbo-border-radius);color:var(--qbo-h3-card-color);cursor:pointer;font-size:1.25rem;font-weight:500;margin-bottom:-1px;max-width:var(--qbo-tab-max-width);overflow:hidden;padding:.5rem 1rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.qbo-tabs li:hover{border-color:#81181d #81181d #fff;color:#81181d}.qbo-tabs li.active,.qbo-tabs nav.qbo-breadcrumb>div>nav>ul>li:last-child{border-color:#999 #999 #fff}.qbo-tabs li:not(:last-child){margin-right:.5rem}.qbo-row-viewer{padding-top:var(--qbo-padding-vertical)}.collapse:not(.show):not(div.qbo-show),aside.qbo-sidebar>nav:not(.show):not(div.qbo-show),aside.qbo-sidebar>nav>ul>li>div:not(.show):not(div.qbo-show),nav.qbo-mainmenu>div>div:not(.show):not(div.qbo-show){display:inherit!important}.collapse div.qbo-row-viewer,.collapse>div.qbo-row,.collapse>h3.title>div.qbo-option-group,aside.qbo-sidebar>nav div.qbo-row-viewer,aside.qbo-sidebar>nav>div.qbo-row,aside.qbo-sidebar>nav>h3.title>div.qbo-option-group,aside.qbo-sidebar>nav>ul>li>div>div.qbo-row,aside.qbo-sidebar>nav>ul>li>div>h3.title>div.qbo-option-group,nav.qbo-mainmenu>div>div div.qbo-row-viewer,nav.qbo-mainmenu>div>div>div.qbo-row,nav.qbo-mainmenu>div>div>h3.title>div.qbo-option-group{display:none}div.qbo-row-container{margin:.5em}div.qbo-row-container>div.qbo-row,div.qbo-row-container>div.qbo-row-viewer{margin-bottom:.5em}span.green{background-color:#d4efdf;border:1px solid #d4efdf;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}span.red{background-color:#f2d7d5;border:1px solid #f2d7d5;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}span.yellow{background-color:#fcf3cf;border:1px solid #fcf3cf;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}.progress-bar{position:absolute;top:0;left:0;width:100%;opacity:.1}.progress-bar.qbo-success{display:none}.progress-bar.qbo-queued{display:none}.qbo-module-viewer{height:100%;box-shadow:initial;padding:.375rem .75rem .375rem .75rem}.qbo-module-viewer h2{color:#595959;font-weight:400;margin-bottom:.25em;margin-top:0}.qbo-module-viewer h2 .btn-close{float:right}`;var fe=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},be=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ge=class extends ee{constructor(){super(...arguments),this._open=!1,this.target="",this.parent=null,this.menu=null,this.showContextMenu=t=>{t.preventDefault(),this._open=!0,this._updateMenuPosition(t)}}static{this.styles=[me]}connectedCallback(){super.connectedCallback(),this.getContextTarget(),document.addEventListener("click",this._handleClickOutside.bind(this))}getContextTarget(){this.target?this.parent=this.closest(this.target)??(()=>{const t=this.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.querySelector(this.target):null})()??document.querySelector(this.target)??document:this.parent=this.parentElement,this.parent.addEventListener("contextmenu",this.showContextMenu)}disconnectedCallback(){this.parent&&this.parent.removeEventListener("contextmenu",this.showContextMenu),document.removeEventListener("click",this._handleClickOutside.bind(this))}_handleClickOutside(t){!this._open||this.shadowRoot?.contains(t.target)||this.contains(t.target)||(this._open=!1)}async _updateMenuPosition(t){t.preventDefault(),this._open=!0,await this.updateComplete;const e=window.innerWidth,o=window.innerHeight,r=this.offsetWidth||0,i=this.offsetHeight||0;let n=t.clientX,a=t.clientY;n+r>e&&(n=e-r),a+i>o&&(a=o-i),console.log(`mouse event: ${t.clientX} x ${t.clientY} ; ${n} x ${a}`),this.style.left=n+"px",this.style.top=a+"px"}_handleClose(){this._open=!1}render(){return zt`${this._open?zt`<slot></slot>`:""}`}};fe([se(),be("design:type",Object)],ge.prototype,"_open",void 0),fe([ae({type:String}),be("design:type",Object)],ge.prototype,"target",void 0),ge=fe([re("qbo-contextmenu")],ge);var ve=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Oe=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const ye=(t=>{class e extends t{constructor(...t){super(...t),this.apiEndpoint=null,this.method="GET",this.error=!1,this.jsonData={},this.accept="application/json",this.headerTag='script[name="headers"]',this.html=null,this.fetchOnLoad=!0,this.headers=null,this.payload=null}async connectedCallback(){super.connectedCallback(),this.fetchOnLoad&&(this.headers=this.headers??this.getHeaders(),this.payload=this.payload??this.getPayload(this.headers),await this.fetchData(this.headers,this.payload))}getHeaders(){const t=this.querySelector(this.headerTag);let e={Accept:this.accept};if(t&&null!==t.textContent)try{e=JSON.parse(t.textContent)}catch(t){console.error("Error parsing header JSON:",t)}return e}getPayload(t){const e=this.querySelector('script[name="payload"]');let o=null;if(e&&null!==e.textContent)try{o=JSON.parse(e.textContent),o&&(t["Content-Type"]="application/json")}catch(t){console.error("Error parsing payload JSON:",t)}return o}async fetchData(t,e){if(null!==this.apiEndpoint){null!==e&&(this.method="POST");try{const t=A(this.apiEndpoint),o=await t.fetch(null,e);"application/json"===this.accept?(this.jsonData=o,this.html=null):(this.html=o,this.jsonData=null),this.dispatchEvent(new CustomEvent("qbo-updated",{bubbles:!0,composed:!0}))}catch(t){this.error=!0,dispatchEvent(new CustomEvent("qbo-error",{detail:t}))}}}}return ve([ae({type:URL}),Oe("design:type",Object)],e.prototype,"apiEndpoint",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"method",void 0),ve([ae({type:Boolean}),Oe("design:type",Object)],e.prototype,"error",void 0),ve([ae({type:Object}),Oe("design:type",Object)],e.prototype,"jsonData",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"accept",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"headerTag",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"html",void 0),ve([ae({type:Boolean}),Oe("design:type",Object)],e.prototype,"fetchOnLoad",void 0),ve([ae({attribute:!1}),Oe("design:type",Object)],e.prototype,"headers",void 0),ve([ae({attribute:!1}),Oe("design:type",Object)],e.prototype,"payload",void 0),e})(ee);var xe=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},we=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ke=class extends ye{constructor(){super(...arguments),this.listId=null,this.min=3,this.options=[],this.renderInHost=!0,this.text=null,this.value=null,this.fetchOnLoad=!1,this.endpoint=null,this.headers=null,this.payload={},this.targets=null}connectedCallback(){super.connectedCallback(),this.targets=document.querySelectorAll(`input[list=${this.listId}]`);const t=this;this.targets.forEach((function(e){e.addEventListener("keyup",t.buildDataList.bind(t)),e.hasAttribute("data-for")&&e.addEventListener("change",t.setOutputValue.bind(t))})),this.endpoint=this.apiEndpoint.toString(),this.headers=this.getHeaders(),this.payload=this.getPayload(this.headers)}disconnectedCallback(){const t=this;this.targets?.forEach((function(e){e.removeEventListener("keyup",t.buildDataList.bind(t)),e.hasAttribute("data-for")&&e.removeEventListener("change",t.setOutputValue.bind(t))})),super.disconnectedCallback()}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}async buildDataList(t){const e=t.target;e instanceof HTMLInputElement&&e.value.length>=this.min&&(null!=this.endpoint&&(this.apiEndpoint=new URL(this.endpoint.replace("{value}",`${e.value}`),this.baseURI)),await this.fetchData(this.headers,this.payload))}setOutputValue(t){const e=t.target;let o=null;if(e.hasAttribute("data-for")){const t=e.getAttribute("data-for");o=document.getElementById(t)||e.querySelector(t)||e.parentElement?.querySelector(t)||document.getElementsByName(t)[0]}if(e instanceof HTMLInputElement&&o instanceof HTMLInputElement){const t=this.text,r=this.options?.filter((function(o){return o[t]==e.value}));e.value=1==r?.length?r[0][`${this.text}`]:"",o.value=1==r?.length?r[0][`${this.value}`]:""}}render(){return this.options=R(this.jsonData),this.options&&0!==this.options.length?(null!=this.options&&(this.value??=Object.keys(this.options[0])[0],this.text??=Object.keys(this.options[0])[1]??this.value),zt`
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.qbo4=e():(t.qbo4=t.qbo4||{},t.qbo4.configuration=e())}(self,(()=>(()=>{var t={630:(t,e,o)=>{var r;!function(t){!function(){var e="object"==typeof globalThis?globalThis:"object"==typeof o.g?o.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),r=i(t);function i(t,e){return function(o,r){Object.defineProperty(t,o,{configurable:!0,writable:!0,value:r}),e&&e(o,r)}}void 0!==e.Reflect&&(r=i(e.Reflect,r)),function(t,e){var o=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,l=!a&&!s,d={create:a?function(){return V(Object.create(null))}:s?function(){return V({__proto__:null})}:function(){return V({})},has:l?function(t,e){return o.call(t,e)}:function(t,e){return e in t},get:l?function(t,e){return o.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),h="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],o=function(){function t(t,e,o){this._index=0,this._keys=t,this._values=e,this._selector=o}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var o=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:o,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var o=this._find(t,!0);return this._values[o]=e,this},e.prototype.delete=function(e){var o=this._find(e,!1);if(o>=0){for(var r=this._keys.length,i=o+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,M(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new o(this._keys,this._values,r)},e.prototype.values=function(){return new o(this._keys,this._values,i)},e.prototype.entries=function(){return new o(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[n]=function(){return this.entries()},e.prototype._find=function(t,e){if(!M(this._cacheKey,t)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(M(this._keys[o],t)){this._cacheIndex=o;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function i(t,e){return e}function a(t,e){return[t,e]}}(),p="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[n]=function(){return this.keys()},t}(),u="function"==typeof WeakMap?WeakMap:function(){var t=d.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=i(t,!1);return void 0!==e&&d.has(e,this._key)},t.prototype.get=function(t){var e=i(t,!1);return void 0!==e?d.get(e,this._key):void 0},t.prototype.set=function(t,e){return i(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=i(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+a()}while(d.has(t,e));return t[e]=!0,e}function i(t,r){if(!o.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:d.create()})}return t[e]}function n(t,e){for(var o=0;o<e;++o)t[o]=255*Math.random()|0;return t}function a(){var t=function(t){if("function"==typeof Uint8Array){var e=new Uint8Array(t);return"undefined"!=typeof crypto?crypto.getRandomValues(e):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(e):n(e,t),e}return n(new Array(t),t)}(16);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var e="",o=0;o<16;++o){var r=t[o];4!==o&&6!==o&&8!==o||(e+="-"),r<16&&(e+="0"),e+=r.toString(16).toLowerCase()}return e}}(),m=r?Symbol.for("@reflect-metadata:registry"):void 0,f=function(){var t;return!S(m)&&$(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[m]),S(t)&&(t=function(){var t,o,r,i;S(m)||void 0===e.Reflect||m in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,o=t.hasOwnMetadata,r=t.getOwnMetadata,i=t.getOwnMetadataKeys,n=t.deleteMetadata,a=new u;return{isProviderFor:function(t,e){var o=a.get(t);return!(S(o)||!o.has(e))||!!i(t,e).length&&(S(o)&&(o=new p,a.set(t,o)),o.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:o,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:n}}(e.Reflect));var n=new u,a={registerProvider:s,getProvider:d,setProvider:f};return a;function s(e){if(!Object.isExtensible(a))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case S(o):o=e;break;case o===e:break;case S(r):r=e;break;case r===e:break;default:void 0===i&&(i=new p),i.add(e)}}function l(e,n){if(!S(o)){if(o.isProviderFor(e,n))return o;if(!S(r)){if(r.isProviderFor(e,n))return o;if(!S(i))for(var a=j(i);;){var s=X(a);if(!s)return;var l=z(s);if(l.isProviderFor(e,n))return _(a),l}}}if(!S(t)&&t.isProviderFor(e,n))return t}function d(t,e){var o,r=n.get(t);return S(r)||(o=r.get(e)),S(o)?(S(o=l(t,e))||(S(r)&&(r=new h,n.set(t,r)),r.set(e,o)),o):o}function c(t){if(S(t))throw new TypeError;return o===t||r===t||!S(i)&&i.has(t)}function f(t,e,o){if(!c(o))throw new Error("Metadata provider not registered.");var r=d(t,e);if(r!==o){if(!S(r))return!1;var i=n.get(t);S(i)&&(i=new h,n.set(t,i)),i.set(e,o)}return!0}}()),!S(m)&&$(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,m,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),b=function(t){var e=new u,o={isProviderFor:function(t,o){var r=e.get(t);return!S(r)&&r.has(o)},OrdinaryDefineOwnMetadata:function(t,e,o,i){r(o,i,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,o){var i=r(e,o,!1);return!S(i)&&C(i.has(t))},OrdinaryGetOwnMetadata:function(t,e,o){var i=r(e,o,!1);if(!S(i))return i.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var o=[],i=r(t,e,!1);if(S(i))return o;for(var n=j(i.keys()),a=0;;){var s=X(n);if(!s)return o.length=a,o;var l=z(s);try{o[a]=l}catch(t){try{_(n)}finally{throw t}}a++}},OrdinaryDeleteMetadata:function(t,o,i){var n=r(o,i,!1);if(S(n))return!1;if(!n.delete(t))return!1;if(0===n.size){var a=e.get(o);S(a)||(a.delete(i),0===a.size&&e.delete(a))}return!0}};return f.registerProvider(o),o;function r(r,i,n){var a=e.get(r),s=!1;if(S(a)){if(!n)return;a=new h,e.set(r,a),s=!0}var l=a.get(i);if(S(l)){if(!n)return;if(l=new h,a.set(i,l),!t.setProvider(r,i,o))throw a.delete(i),s&&e.delete(r),new Error("Wrong provider for target.")}return l}}(f);function g(t,e,o){if(v(t,e,o))return!0;var r=D(e);return!Q(r)&&g(t,r,o)}function v(t,e,o){var r=U(e,o,!1);return!S(r)&&C(r.OrdinaryHasOwnMetadata(t,e,o))}function O(t,e,o){if(v(t,e,o))return x(t,e,o);var r=D(e);return Q(r)?void 0:O(t,r,o)}function x(t,e,o){var r=U(e,o,!1);if(!S(r))return r.OrdinaryGetOwnMetadata(t,e,o)}function y(t,e,o,r){U(o,r,!0).OrdinaryDefineOwnMetadata(t,e,o,r)}function w(t,e){var o=k(t,e),r=D(t);if(null===r)return o;var i=w(r,e);if(i.length<=0)return o;if(o.length<=0)return i;for(var n=new p,a=[],s=0,l=o;s<l.length;s++){var d=l[s];n.has(d)||(n.add(d),a.push(d))}for(var c=0,h=i;c<h.length;c++)d=h[c],n.has(d)||(n.add(d),a.push(d));return a}function k(t,e){var o=U(t,e,!1);return o?o.OrdinaryOwnMetadataKeys(t,e):[]}function q(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function S(t){return void 0===t}function Q(t){return null===t}function $(t){return"object"==typeof t?null!==t:"function"==typeof t}function P(t,e){switch(q(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var o=3===e?"string":5===e?"number":"default",r=E(t,i);if(void 0!==r){var n=r.call(t,o);if($(n))throw new TypeError;return n}return function(t,e){if("string"===e){var o=t.toString;if(T(o)&&!$(i=o.call(t)))return i;if(T(r=t.valueOf)&&!$(i=r.call(t)))return i}else{var r;if(T(r=t.valueOf)&&!$(i=r.call(t)))return i;var i,n=t.toString;if(T(n)&&!$(i=n.call(t)))return i}throw new TypeError}(t,"default"===o?"number":o)}function C(t){return!!t}function R(t){var e=P(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function Z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function T(t){return"function"==typeof t}function A(t){return"function"==typeof t}function M(t,e){return t===e||t!=t&&e!=e}function E(t,e){var o=t[e];if(null!=o){if(!T(o))throw new TypeError;return o}}function j(t){var e=E(t,n);if(!T(e))throw new TypeError;var o=e.call(t);if(!$(o))throw new TypeError;return o}function z(t){return t.value}function X(t){var e=t.next();return!e.done&&e}function _(t){var e=t.return;e&&e.call(t)}function D(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var o=t.prototype,r=o&&Object.getPrototypeOf(o);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function U(t,e,o){var r=f.getProvider(t,e);if(!S(r))return r;if(o){if(f.setProvider(t,e,b))return b;throw new Error("Illegal state.")}}function V(t){return t.__=void 0,delete t.__,t}t("decorate",(function(t,e,o,r){if(S(o)){if(!Z(t))throw new TypeError;if(!A(e))throw new TypeError;return function(t,e){for(var o=t.length-1;o>=0;--o){var r=(0,t[o])(e);if(!S(r)&&!Q(r)){if(!A(r))throw new TypeError;e=r}}return e}(t,e)}if(!Z(t))throw new TypeError;if(!$(e))throw new TypeError;if(!$(r)&&!S(r)&&!Q(r))throw new TypeError;return Q(r)&&(r=void 0),function(t,e,o,r){for(var i=t.length-1;i>=0;--i){var n=(0,t[i])(e,o,r);if(!S(n)&&!Q(n)){if(!$(n))throw new TypeError;r=n}}return r}(t,e,o=R(o),r)})),t("metadata",(function(t,e){return function(o,r){if(!$(o))throw new TypeError;if(!S(r)&&!function(t){switch(q(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;y(t,e,o,r)}})),t("defineMetadata",(function(t,e,o,r){if(!$(o))throw new TypeError;return S(r)||(r=R(r)),y(t,e,o,r)})),t("hasMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),g(t,e,o)})),t("hasOwnMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),v(t,e,o)})),t("getMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),O(t,e,o)})),t("getOwnMetadata",(function(t,e,o){if(!$(e))throw new TypeError;return S(o)||(o=R(o)),x(t,e,o)})),t("getMetadataKeys",(function(t,e){if(!$(t))throw new TypeError;return S(e)||(e=R(e)),w(t,e)})),t("getOwnMetadataKeys",(function(t,e){if(!$(t))throw new TypeError;return S(e)||(e=R(e)),k(t,e)})),t("deleteMetadata",(function(t,e,o){if(!$(e))throw new TypeError;if(S(o)||(o=R(o)),!$(e))throw new TypeError;S(o)||(o=R(o));var r=U(e,o,!1);return!S(r)&&r.OrdinaryDeleteMetadata(t,e,o)}))}(r,e),void 0===e.Reflect&&(e.Reflect=t)}()}(r||(r={}))}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t;o.r(r),o.d(r,{Configuration:()=>hi,ConfigurationSection:()=>ci,EmptyConfigurationSource:()=>di,IConfigurationSourceToken:()=>ni,IConfigurationToken:()=>ai,JsonConfigurationSource:()=>li,QboConfigEditor:()=>fi,QboCss:()=>yw,QboTemplate:()=>vw,QboTemplateMixin:()=>gw,css:()=>K,html:()=>zt,iterateConfig:()=>si,redefineCustomElements:()=>ww,template:()=>bw,templates:()=>fw}),o(630),function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(t||(t={}));const e=t;var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},i(t,e)};function n(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function a(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}function d(t){return!!t.useClass}function c(t){return!!t.useFactory}var h=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var e,o=this,r=!1;return new Proxy({},this.createHandler((function(){return r||(e=t(o.wrap()),r=!0),e})))},t.prototype.createHandler=function(t){var e={};return this.reflectMethods.forEach((function(o){e[o]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e[0]=t(),Reflect[o].apply(void 0,l(e))}})),e},t}();function p(t){return"string"==typeof t||"symbol"==typeof t}function u(t){return"object"==typeof t&&"token"in t&&"transform"in t}function m(t){return!!t.useToken}function f(t){return null!=t.useValue}const b=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(t){return this.ensure(t),this._registryMap.get(t)},t.prototype.get=function(t){this.ensure(t);var e=this._registryMap.get(t);return e[e.length-1]||null},t.prototype.set=function(t,e){this.ensure(t),this._registryMap.get(t).push(e)},t.prototype.setAll=function(t,e){this._registryMap.set(t,e)},t.prototype.has=function(t){return this.ensure(t),this._registryMap.get(t).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(t){this._registryMap.has(t)||this._registryMap.set(t,[])},t}(),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b),v=function(){this.scopedResolutions=new Map};var O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(b);const y=function(){this.preResolution=new O,this.postResolution=new x};var w=new Map,k=function(){function t(t){this.parent=t,this._registry=new g,this.interceptors=new y,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(t,o,r){var i;if(void 0===r&&(r={lifecycle:e.Transient}),this.ensureNotDisposed(),i=function(t){return d(t)||f(t)||m(t)||c(t)}(o)?o:{useClass:o},m(i))for(var n=[t],a=i;null!=a;){var s=a.useToken;if(n.includes(s))throw new Error("Token registration cycle detected! "+l(n,[s]).join(" -> "));n.push(s);var h=this._registry.get(s);a=h&&m(h.provider)?h.provider:null}if((r.lifecycle===e.Singleton||r.lifecycle==e.ContainerScoped||r.lifecycle==e.ResolutionScoped)&&(f(i)||c(i)))throw new Error('Cannot use lifecycle "'+e[r.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:i,options:r}),this},t.prototype.registerType=function(t,e){return this.ensureNotDisposed(),p(e)?this.register(t,{useToken:e}):this.register(t,{useClass:e})},t.prototype.registerInstance=function(t,e){return this.ensureNotDisposed(),this.register(t,{useValue:e})},t.prototype.registerSingleton=function(t,o){if(this.ensureNotDisposed(),p(t)){if(p(o))return this.register(t,{useToken:o},{lifecycle:e.Singleton});if(o)return this.register(t,{useClass:o},{lifecycle:e.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var r=t;return o&&!p(o)&&(r=o),this.register(t,{useClass:r},{lifecycle:e.Singleton})},t.prototype.resolve=function(t,e){void 0===e&&(e=new v),this.ensureNotDisposed();var o=this.getRegistration(t);if(!o&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),o){var r=this.resolveRegistration(o,e);return this.executePostResolutionInterceptor(t,r,"Single"),r}if(function(t){return"function"==typeof t||t instanceof h}(t))return r=this.construct(t,e),this.executePostResolutionInterceptor(t,r,"Single"),r;throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,e){var o,r;if(this.interceptors.preResolution.has(t)){var i=[];try{for(var n=a(this.interceptors.preResolution.getAll(t)),s=n.next();!s.done;s=n.next()){var l=s.value;"Once"!=l.options.frequency&&i.push(l),l.callback(t,e)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}this.interceptors.preResolution.setAll(t,i)}},t.prototype.executePostResolutionInterceptor=function(t,e,o){var r,i;if(this.interceptors.postResolution.has(t)){var n=[];try{for(var s=a(this.interceptors.postResolution.getAll(t)),l=s.next();!l.done;l=s.next()){var d=l.value;"Once"!=d.options.frequency&&n.push(d),d.callback(t,e,o)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}this.interceptors.postResolution.setAll(t,n)}},t.prototype.resolveRegistration=function(t,o){if(this.ensureNotDisposed(),t.options.lifecycle===e.ResolutionScoped&&o.scopedResolutions.has(t))return o.scopedResolutions.get(t);var r,i=t.options.lifecycle===e.Singleton,n=t.options.lifecycle===e.ContainerScoped,a=i||n;return r=f(t.provider)?t.provider.useValue:m(t.provider)?a?t.instance||(t.instance=this.resolve(t.provider.useToken,o)):this.resolve(t.provider.useToken,o):d(t.provider)?a?t.instance||(t.instance=this.construct(t.provider.useClass,o)):this.construct(t.provider.useClass,o):c(t.provider)?t.provider.useFactory(this):this.construct(t.provider,o),t.options.lifecycle===e.ResolutionScoped&&o.scopedResolutions.set(t,r),r},t.prototype.resolveAll=function(t,e){var o=this;void 0===e&&(e=new v),this.ensureNotDisposed();var r=this.getAllRegistrations(t);if(!r&&p(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),r){var i=r.map((function(t){return o.resolveRegistration(t,e)}));return this.executePostResolutionInterceptor(t,i,"All"),i}var n=[this.construct(t,e)];return this.executePostResolutionInterceptor(t,n,"All"),n},t.prototype.isRegistered=function(t,e){return void 0===e&&(e=!1),this.ensureNotDisposed(),this._registry.has(t)||e&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,e;this.ensureNotDisposed();try{for(var o=a(this._registry.entries()),r=o.next();!r.done;r=o.next()){var i=s(r.value,2),n=i[0],l=i[1];this._registry.setAll(n,l.filter((function(t){return!f(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var o,r;this.ensureNotDisposed();var i=new t(this);try{for(var n=a(this._registry.entries()),l=n.next();!l.done;l=n.next()){var d=s(l.value,2),c=d[0],h=d[1];h.some((function(t){return t.options.lifecycle===e.ContainerScoped}))&&i._registry.setAll(c,h.map((function(t){return t.options.lifecycle===e.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){o={error:t}}finally{try{l&&!l.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},t.prototype.beforeResolution=function(t,e,o){void 0===o&&(o={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:e,options:o})},t.prototype.afterResolution=function(t,e,o){void 0===o&&(o={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:e,options:o})},t.prototype.dispose=function(){return function(t,e,o,r){return new(o||(o=Promise))((function(i,n){function a(t){try{l(r.next(t))}catch(t){n(t)}}function s(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function(){var t;return function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}}(this,(function(e){switch(e.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach((function(e){var o=e.dispose();o&&t.push(o)})),[4,Promise.all(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,e){var o=this;if(t instanceof h)return t.createProxy((function(t){return o.resolve(t,e)}));var r,i=function(){var r=w.get(t);if(!r||0===r.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var i=r.map(o.resolveParams(e,t));return new(t.bind.apply(t,l([void 0],i)))}();return"function"!=typeof(r=i).dispose||r.dispose.length>0||this.disposables.add(i),i},t.prototype.resolveParams=function(t,e){var o=this;return function(r,i){var n,a,d,c;try{return"object"==typeof(c=r)&&"token"in c&&"multiple"in c?u(r)?r.multiple?(n=o.resolve(r.transform)).transform.apply(n,l([o.resolveAll(r.token)],r.transformArgs)):(a=o.resolve(r.transform)).transform.apply(a,l([o.resolve(r.token,t)],r.transformArgs)):r.multiple?o.resolveAll(r.token):o.resolve(r.token,t):u(r)?(d=o.resolve(r.transform,t)).transform.apply(d,l([o.resolve(r.token,t)],r.transformArgs)):o.resolve(r,t)}catch(t){throw new Error(function(t,e,o){var r,i,n=s(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1];return function(t,e,o){return void 0===o&&(o=" "),l([t],e.message.split("\n").map((function(t){return o+t}))).join("\n")}("Cannot inject the dependency "+(i=e,(null===(r=void 0===n?null:n)?"at position #"+i:'"'+r.split(",")[i].trim()+'" at position #'+i)+' of "')+t.name+'" constructor. Reason:',o)}(e,i,t))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),q=new k,S="injectionTokens";function Q(t,e){return function(o,r,i){var n=Reflect.getOwnMetadata(S,o)||{};n[i]=e?{token:t,transform:e.transformToken,transformArgs:e.args||[]}:t,Reflect.defineMetadata(S,n,o)}}const $=function(){return function(t){w.set(t,function(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],o=Reflect.getOwnMetadata(S,t)||{};return Object.keys(o).forEach((function(t){e[+t]=o[t]})),e}(t))}};if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class P{constructor(t,e){this.container=t,this.options=e}getService(t){return this.container.resolve(t)}}const C=window?.qbo4?.services||new P(q.createChildContainer(),{});function R(t,e){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){return console.error("Error parsing JSON string:",t),null}if(Array.isArray(t))return t;if("object"==typeof t&&null!==t)for(const o in t){const r=t[o];if(Array.isArray(r))return r;if("object"==typeof r){const t=R(r,e);if(t)return t}}return null}function Z(t,...e){const o=/\${(.*?)}/g;let r=t;for(let t=0;t<e.length;t++){const i=e[t];r=r.replace(o,((t,e)=>{const o=e.split(/\.|\[|\]/).filter((t=>""!==t));let r=i;for(let e of o){if(void 0===r[e])return t;r=r[e]}return r}))}return r=r.replace(o,(()=>"")),r}"undefined"!=typeof window&&(window.qbo4=window.qbo4||{},window.qbo4.services=window.qbo4.services||new P(q.createChildContainer(),{}),window.qbo4.services);class T{constructor(t,e={},o=null){this.basePath="",this.relativePath="",this.apiEndpoint=t,this.headers=e,this.method=o;const r=new URL(this.apiEndpoint);this.basePath=`${r.href}`}async fetch(t,e){this.apiEndpoint.indexOf("//")<0&&(this.apiEndpoint=new URL(this.apiEndpoint,document.location.origin).href);const o=Z(new URL(t??this.relativePath,this.apiEndpoint).href,e),r=this.method??(e?"POST":"GET"),i=new Headers(this.headers||{});e&&!i.has("Content-Type")&&i.append("Content-Type","application/json");const n=await fetch(o,{method:r,headers:i,credentials:"include",body:"POST"===r&&e?JSON.stringify(e):null}),a=i.get("Accept")??"";return n.ok?"application/json"===a?await n.json():await n.text():(console.error(`API request failed with status ${n.status}`),null)}clone(t){const e=new T(this.apiEndpoint,this.headers,this.method);return e.relativePath=t??"",e}}function A(t){"string"!=typeof t&&(t=t.href);const e=t.match(/api:\/\/([^/]+)/),o=e?e[1]:t,r=e?t.substring(`api://${o}`.length+1):"",i=C.container.isRegistered(o)?C.container.resolve(o):new T(t);return r?i.clone(r):i}C.container.registerInstance("default",new T(document.querySelector("base[href]")?.getAttribute("href")||window.location.origin));const M="ValidateToken";var E=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};let j=class{constructor(){this.message="Zip code is invalid",this.selector=".zipcode"}validate(t){return Promise.resolve(!0)}connect(t){}disconnect(){}};j=E([$()],j),C.container.register(M,{useClass:j});let z=class{constructor(){this.message="Email is invalid",this.selector=".email"}validate(t){return Promise.resolve(!0)}connect(t){}disconnect(){}};z=E([$()],z),C.container.register(M,{useClass:z});let X=class{constructor(){this.message="This value does not appear to exist.",this.selector="[data-exists]"}connect(t){}disconnect(){}async validate(t){var e=t.getAttribute("data-exists");if(!e)return!1;var o=t.getAttribute("data-exists-path");const r=C.container.isRegistered(e)?C.container.resolve(e):new T(e);if(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement){const e=R(await r.fetch(o,{value:t.value}));return null!=e&&e.length>0}return!1}};X=E([$()],X),C.container.register(M,{useClass:X});class _{constructor(){this.evaluators=[],this.depends="",this.condition="or",this.emptyOnDisable=!1,this.resetOnDisable=!0,this.disabledClass="disabled",this.disableChildren=!0}}const D="DependencyValidatorOptions",U=new Map([["!=",(t,e)=>!ri(t.value,e)],[">=",(t,e)=>t.value>=e],["<=",(t,e)=>t.value<=e],["=",(t,e)=>ri(t.value,e)],[">",(t,e)=>t.value>e],["<",(t,e)=>t.value<e]]),V=Array.from(U.keys());let L=class{constructor(t,e){this.message="Dependency condition not met",this.selector="[data-depend-options]",this.optionsCache=new Map,this.checkDependencies=async t=>{console.log("checking dependencies",this.optionsCache);for(const[t,e]of this.optionsCache)await this.validate(t)},this.form=t,this.options=e,this.currentOptions=e}connect(t){this.form.querySelectorAll(this.selector).forEach((t=>{t instanceof HTMLElement&&this.getOptions(t)})),this.optionsCache.forEach(((t,e)=>{this.validate(e)})),this.form.addEventListener("change",this.checkDependencies)}disconnect(){this.form.removeEventListener("change",this.checkDependencies)}async validate(t){const e=this.getOptions(t);if(null==e)return Promise.resolve(!0);let o;o="or"===e.condition?e.evaluators.some((t=>!0===t())):e.evaluators.every((t=>!0===t())),(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&(t.disabled=!o),t.classList.toggle(e.disabledClass,!o);const r=function(t,e){const o=Array.from(t.querySelectorAll(e));return t.matches(e)&&o.unshift(t),o}(t,"input,select,textarea");return o?e.disableChildren&&r.forEach((t=>t.removeAttribute("disabled"))):(e.disableChildren&&r.forEach((t=>t.setAttribute("disabled","disabled"))),e.resetOnDisable?r.forEach((t=>function(t){if(t instanceof HTMLInputElement)"checkbox"===t.type||"radio"===t.type?t.checked=t.defaultChecked:t.value=t.defaultValue;else if(t instanceof HTMLSelectElement){var e=t.querySelectorAll("option[selected]");0==e.length?t.selectedIndex=0:e.forEach((t=>{t instanceof HTMLOptionElement&&(t.selected=!0)}))}}(t))):e.emptyOnDisable&&r.forEach((t=>{var e;(e=t)instanceof HTMLInputElement?"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value="":e instanceof HTMLSelectElement&&(e.options.selectedIndex=0)}))),Promise.resolve(o)}getOptions(t){let e=this.optionsCache.get(t);if(!e){try{e=Object.assign({},this.options,function(t,e,o="options"){const r={},i=`${e}${o}`,n=t.getAttributeNames();for(const a of n)if(a.startsWith(e)){const n=a.slice(e.length);if(null!=o&&a===i)try{const e=JSON.parse(t.getAttribute(a));Object.assign(r,e)}catch(e){console.error(`Error parsing JSON from element ${t.name} attribute ${i} (${t.getAttribute(a)}):`,t,e)}else r[n]=t.getAttribute(a)}return r}(t,"data-depend-"))}catch(t){console.error("Error parsing data-depend-options attribute:",t)}if(!e)return null;e.evaluators=e.depends.split(",").map((t=>{t=t.trim();let e=V.find((e=>t.includes(e)))??"!=",o=null,r="";if(e){const i=t.split(e);o=i[0],r=i[1]??""}else t.startsWith("!")?(e="=",o=t.substring(1)):o=t;const i=this.form.querySelector(`#${CSS.escape(o)}`)??this.form.querySelector(`[name="${CSS.escape(o)}"]`);return i instanceof HTMLInputElement?"checkbox"===i.type||"radio"===i.type?"!="===e?()=>i.checked:()=>!i.checked:()=>U.get(e)(i,r):i instanceof HTMLSelectElement?()=>U.get(e)(i,r):i instanceof HTMLOptionElement?"!="===e?()=>i.selected:()=>!i.selected:void 0})).filter((t=>void 0!==t)),this.optionsCache.set(t,e)}return e}getElement(t){return this.form.querySelector(`#${CSS.escape(t)}`)??this.form.querySelector(`[name="${CSS.escape(t)}"]`)}};var W,B,Y;L=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a}([$(),(W=1,Y=D,B=Q(Y),function(t,e){B(t,e,W)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[HTMLFormElement,_])],L),C.container.register(D,{useValue:new _}),C.container.register(M,{useClass:L});const I=globalThis,N=I.ShadowRoot&&(void 0===I.ShadyCSS||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),F=new WeakMap;class H{constructor(t,e,o){if(this._$cssResult$=!0,o!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(N&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=F.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&F.set(e,t))}return t}toString(){return this.cssText}}const K=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[r+1]),t[0]);return new H(o,t,G)},J=(t,e)=>{if(N)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),r=I.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}},tt=N?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new H("string"==typeof t?t:t+"",void 0,G))(e)})(t):t,{is:et,defineProperty:ot,getOwnPropertyDescriptor:rt,getOwnPropertyNames:it,getOwnPropertySymbols:nt,getPrototypeOf:at}=Object,st=globalThis,lt=st.trustedTypes,dt=lt?lt.emptyScript:"",ct=st.reactiveElementPolyfillSupport,ht=(t,e)=>t,pt={toAttribute(t,e){switch(e){case Boolean:t=t?dt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},ut=(t,e)=>!et(t,e),mt={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:ut};Symbol.metadata??=Symbol("metadata"),st.litPropertyMetadata??=new WeakMap;class ft extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),r=this.getPropertyDescriptor(t,o,e);void 0!==r&&ot(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){const{get:r,set:i}=rt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const n=r?.call(this);i.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(ht("elementProperties")))return;const t=at(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ht("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ht("properties"))){const t=this.properties,e=[...it(t),...nt(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(tt(t))}else void 0!==t&&e.push(tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return J(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EC(t,e){const o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(void 0!==r&&!0===o.reflect){const i=(void 0!==o.converter?.toAttribute?o.converter:pt).toAttribute(e,o.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const o=this.constructor,r=o._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:pt;this._$Em=r,this[r]=i.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??ut)(this[t],e))return;this.P(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}ft.elementStyles=[],ft.shadowRootOptions={mode:"open"},ft[ht("elementProperties")]=new Map,ft[ht("finalized")]=new Map,ct?.({ReactiveElement:ft}),(st.reactiveElementVersions??=[]).push("2.0.4");const bt=globalThis,gt=bt.trustedTypes,vt=gt?gt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ot="$lit$",xt=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+xt,wt=`<${yt}>`,kt=document,qt=()=>kt.createComment(""),St=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Qt=Array.isArray,$t=t=>Qt(t)||"function"==typeof t?.[Symbol.iterator],Pt="[ \t\n\f\r]",Ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Zt=/>/g,Tt=RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,Mt=/"/g,Et=/^(?:script|style|textarea|title)$/i,jt=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),zt=jt(1),Xt=(jt(2),jt(3),Symbol.for("lit-noChange")),_t=Symbol.for("lit-nothing"),Dt=new WeakMap,Ut=kt.createTreeWalker(kt,129);function Vt(t,e){if(!Qt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==vt?vt.createHTML(e):e}const Lt=(t,e)=>{const o=t.length-1,r=[];let i,n=2===e?"<svg>":3===e?"<math>":"",a=Ct;for(let e=0;e<o;e++){const o=t[e];let s,l,d=-1,c=0;for(;c<o.length&&(a.lastIndex=c,l=a.exec(o),null!==l);)c=a.lastIndex,a===Ct?"!--"===l[1]?a=Rt:void 0!==l[1]?a=Zt:void 0!==l[2]?(Et.test(l[2])&&(i=RegExp("</"+l[2],"g")),a=Tt):void 0!==l[3]&&(a=Tt):a===Tt?">"===l[0]?(a=i??Ct,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?Tt:'"'===l[3]?Mt:At):a===Mt||a===At?a=Tt:a===Rt||a===Zt?a=Ct:(a=Tt,i=void 0);const h=a===Tt&&t[e+1].startsWith("/>")?" ":"";n+=a===Ct?o+wt:d>=0?(r.push(s),o.slice(0,d)+Ot+o.slice(d)+xt+h):o+xt+(-2===d?e:h)}return[Vt(t,n+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class Wt{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let i=0,n=0;const a=t.length-1,s=this.parts,[l,d]=Lt(t,e);if(this.el=Wt.createElement(l,o),Ut.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=Ut.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Ot)){const e=d[n++],o=r.getAttribute(t).split(xt),a=/([.?@])?(.*)/.exec(e);s.push({type:1,index:i,name:a[2],strings:o,ctor:"."===a[1]?Gt:"?"===a[1]?Ft:"@"===a[1]?Ht:Nt}),r.removeAttribute(t)}else t.startsWith(xt)&&(s.push({type:6,index:i}),r.removeAttribute(t));if(Et.test(r.tagName)){const t=r.textContent.split(xt),e=t.length-1;if(e>0){r.textContent=gt?gt.emptyScript:"";for(let o=0;o<e;o++)r.append(t[o],qt()),Ut.nextNode(),s.push({type:2,index:++i});r.append(t[e],qt())}}}else if(8===r.nodeType)if(r.data===yt)s.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(xt,t+1));)s.push({type:7,index:i}),t+=xt.length-1}i++}}static createElement(t,e){const o=kt.createElement("template");return o.innerHTML=t,o}}function Bt(t,e,o=t,r){if(e===Xt)return e;let i=void 0!==r?o._$Co?.[r]:o._$Cl;const n=St(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),void 0===n?i=void 0:(i=new n(t),i._$AT(t,o,r)),void 0!==r?(o._$Co??=[])[r]=i:o._$Cl=i),void 0!==i&&(e=Bt(t,i._$AS(t,e.values),i,r)),e}class Yt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,r=(t?.creationScope??kt).importNode(e,!0);Ut.currentNode=r;let i=Ut.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let e;2===s.type?e=new It(i,i.nextSibling,this,t):1===s.type?e=new s.ctor(i,s.name,s.strings,this,t):6===s.type&&(e=new Kt(i,this,t)),this._$AV.push(e),s=o[++a]}n!==s?.index&&(i=Ut.nextNode(),n++)}return Ut.currentNode=kt,r}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class It{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,r){this.type=2,this._$AH=_t,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Bt(this,t,e),St(t)?t===_t||null==t||""===t?(this._$AH!==_t&&this._$AR(),this._$AH=_t):t!==this._$AH&&t!==Xt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):$t(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==_t&&St(this._$AH)?this._$AA.nextSibling.data=t:this.T(kt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Wt.createElement(Vt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new Yt(r,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=Dt.get(t.strings);return void 0===e&&Dt.set(t.strings,e=new Wt(t)),e}k(t){Qt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,r=0;for(const i of t)r===e.length?e.push(o=new It(this.O(qt()),this.O(qt()),this,this.options)):o=e[r],o._$AI(i),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,r,i){this.type=1,this._$AH=_t,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=_t}_$AI(t,e=this,o,r){const i=this.strings;let n=!1;if(void 0===i)t=Bt(this,t,e,0),n=!St(t)||t!==this._$AH&&t!==Xt,n&&(this._$AH=t);else{const r=t;let a,s;for(t=i[0],a=0;a<i.length-1;a++)s=Bt(this,r[o+a],e,a),s===Xt&&(s=this._$AH[a]),n||=!St(s)||s!==this._$AH[a],s===_t?t=_t:t!==_t&&(t+=(s??"")+i[a+1]),this._$AH[a]=s}n&&!r&&this.j(t)}j(t){t===_t?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Gt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_t?void 0:t}}class Ft extends Nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_t)}}class Ht extends Nt{constructor(t,e,o,r,i){super(t,e,o,r,i),this.type=5}_$AI(t,e=this){if((t=Bt(this,t,e,0)??_t)===Xt)return;const o=this._$AH,r=t===_t&&o!==_t||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==_t&&(o===_t||r);r&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Kt{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){Bt(this,t)}}const Jt={M:Ot,P:xt,A:yt,C:1,L:Lt,R:Yt,D:$t,V:Bt,I:It,H:Nt,N:Ft,U:Ht,B:Gt,F:Kt},te=bt.litHtmlPolyfillSupport;te?.(Wt,It),(bt.litHtmlVersions??=[]).push("3.2.1");class ee extends ft{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const r=o?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=o?.renderBefore??null;r._$litPart$=i=new It(e.insertBefore(qt(),t),t,void 0,o??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Xt}}ee._$litElement$=!0,ee.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ee});const oe=globalThis.litElementPolyfillSupport;oe?.({LitElement:ee}),(globalThis.litElementVersions??=[]).push("4.1.1");const re=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ie={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:ut},ne=(t=ie,e,o)=>{const{kind:r,metadata:i}=o;let n=globalThis.litPropertyMetadata.get(i);if(void 0===n&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(o.name,t),"accessor"===r){const{name:r}=o;return{set(o){const i=e.get.call(this);e.set.call(this,o),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=o;return function(o){const i=this[r];e.call(this,o),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function ae(t){return(e,o)=>"object"==typeof o?ne(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function se(t){return ae({...t,state:!0,attribute:!1})}var le=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},de=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ce=class extends ee{constructor(){super(...arguments),this.name=null,this.apiEndpoint=null}connectedCallback(){super.connectedCallback();const t={};null==this.name&&console.error("qbo-api name is required."),null==this.apiEndpoint&&console.error("qbo-api apiEndpoint is required."),this.querySelectorAll("header").forEach((e=>{const o=e.getAttribute("name"),r=e.textContent;o&&r&&(t[o]=r)})),t.ContentType&&(t["Content-Type"]=t.ContentType,delete t.ContentType),this.apiEndpoint?.startsWith("http")||(this.apiEndpoint=new URL(this.apiEndpoint??"",document.location.origin).href),function(t,e,o={"Content-Type":"application/json"},r){C.container.registerInstance(t,new T(e,o,r))}(this.name,this.apiEndpoint,t,this.method)}render(){return zt``}};le([ae({type:String}),de("design:type",Object)],ce.prototype,"name",void 0),le([ae({type:String}),de("design:type",Object)],ce.prototype,"apiEndpoint",void 0),le([ae(),de("design:type",Object)],ce.prototype,"method",void 0),ce=le([re("qbo-api")],ce);var he=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},pe=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ue=class extends ee{constructor(){super(...arguments),this.display="normal",this.trigger="header",this.renderInHost=!0,this.hasExpandedContent=!1,this.minimize=t=>{this.display="minimize"},this.normal=t=>{this.display="normal"},this.maximize=t=>{this.display="maximize"}}static{this.styles=[K``]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick),document.addEventListener("qbo-card-minimize",this.minimize),document.addEventListener("qbo-card-normal",this.normal),document.addEventListener("qbo-card-maximize",this.maximize),this.hasExpandedContent=null!=this.querySelector(".expanded"),"normal"!==this.display||this.hasExpandedContent||(this.display="maximize")}disconnectedCallback(){this.removeEventListener("click",this.handleClick),document.removeEventListener("qbo-card-minimize",this.minimize),document.removeEventListener("qbo-card-normal",this.normal),document.removeEventListener("qbo-card-maximize",this.maximize),super.disconnectedCallback()}attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),"display"===t&&(this.classList.remove("normal","minimize","maximize"),o&&this.classList.add(o))}handleClick(t){t.composedPath()[0]===this.querySelector(this.trigger)&&(t.ctrlKey?this.shrink():this.grow())}shrink(){switch(this.display){case"minimize":return void(this.display="maximize");case"maximize":return void(this.display=this.hasExpandedContent?"normal":"minimize");default:return void(this.display="minimize")}}grow(){switch(this.display){case"minimize":return void(this.display=this.hasExpandedContent?"normal":"maximize");case"maximize":return void(this.display="minimize");default:return void(this.display="maximize")}}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}render(){return zt`<slot></slot>`}};he([ae({reflect:!0}),pe("design:type",String)],ue.prototype,"display",void 0),he([ae(),pe("design:type",String)],ue.prototype,"trigger",void 0),he([ae(),pe("design:type",Boolean)],ue.prototype,"renderInHost",void 0),he([ae(),pe("design:type",Object)],ue.prototype,"columns",void 0),ue=he([re("qbo-card")],ue),K`@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxC7mw9c.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRzS7mw9c.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxi7mw9c.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxy7mw9c.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--qbo-font:Montserrat,Arial,sans-serif;--qbo-color:#333;--qbo-border-color:#999;--qbo-border-radius:4px;--qbo-background-color:#fff;--qbo-padding-horizontal:0.75rem;--qbo-padding-vertical:0.375rem;--qbo-padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);--qbo-margin:0.5rem;--qbo-margin-horizontal:0.5rem;--qbo-margin-vertical:0.5rem;--qbo-focus-border-color:#80bdff;--qbo-focus-box-shadow:rgba(0, 123, 255, 0.25);--qbo-line-height:var(--qbo-line-height);--qbo-button-bg:#007bff;--qbo-button-border:#007bff;--qbo-button-bg-hover:#0056b3;--qbo-button-border-hover:#004085;--qbo-button-color:#fff;--qbo-button-padding:var(--qbo-padding);--qbo-button-border-radius:var(--qbo-border-radius);--qbo-nav-color:#333;--qbo-nav-background-color:#fff;--qbo-nav-background-hover:#81181d;--qbo-nav-background-hover-color:#999;--qbo-primary-bg:#007bff;--qbo-primary-color:#fff;--qbo-primary-border:#007bff;--qbo-primary-hover-bg:#0056b3;--qbo-primary-hover-border:#004085;--qbo-secondary-bg:#6c757d;--qbo-secondary-color:#ffffff;--qbo-secondary-border:#6c757d;--qbo-secondary-hover-bg:#5a6268;--qbo-secondary-hover-border:#545b62;--qbo-success-bg:#28a745;--qbo-success-color:#ffffff;--qbo-success-border:#28a745;--qbo-success-hover-bg:#218838;--qbo-success-hover-border:#1e7e34;--qbo-danger-bg:#dc3545;--qbo-danger-color:#ffffff;--qbo-danger-border:#dc3545;--qbo-danger-hover-bg:#c82333;--qbo-danger-hover-border:#bd2130;--qbo-info-bg:#17a2b8;--qbo-info-color:#ffffff;--qbo-info-border:#17a2b8;--qbo-info-hover-bg:#138496;--qbo-info-hover-border:#117a8b;--qbo-light-bg:#f8f9fa;--qbo-light-color:#212529;--qbo-light-border:#f8f9fa;--qbo-light-hover-bg:#e2e6ea;--qbo-light-hover-border:#dae0e5;--qbo-dark-bg:#343a40;--qbo-dark-color:#ffffff;--qbo-dark-border:#343a40;--qbo-dark-hover-bg:#23272b;--qbo-dark-hover-border:#1d2124;--qbo-table-header-color:var(--qbo-color);--qbo-table-header-background:color-mix(in srgb, var(--qbo-border-color) 50%, var(--qbo-background-color) 50%);--qbo-table-footer-color:color-mix(in srgb, var(--qbo-color) 70%, var(--qbo-background-color) 70%);--qbo-table-footer-background:var(--qbo-background-color);--qbo-table-padding:0.25em;--qbo-file-height:500px;--qbo-label-margin-bottom:0.25em;--qbo-label-margin-top:0.25em;--qbo-h3-card-color:#595959}.qbo-theme-dark{--qbo-color:#e0e0e0;--qbo-border-color:grey;--qbo-background-color:#121212;--qbo-nav-color:#000;--qbo-nav-background-color:#fff;--qbo-svg-filter:brightness(0) invert(1)}.qbo-theme-light{font-family:var(--qbo-font);color:var(--qbo-color);margin:0;background-color:var(--qbo-background-color)}.qbo-row{display:flex;flex-wrap:wrap;gap:var(--qbo-margin)}div.qbo-row-padding-top{padding-top:.375rem}.qbo-card,.qbo-col{flex:1 0 0;max-width:100%;box-sizing:border-box}.qbo-col-1{flex:0 0 calc(8.33% - var(--qbo-margin)/ 2);max-width:calc(8.33% - var(--qbo-margin)/ 2)}.qbo-col-2{flex:0 0 calc(16.66% - var(--qbo-margin)/ 2);max-width:calc(16.66% - var(--qbo-margin)/ 2)}.qbo-col-3{flex:0 0 calc(25% - var(--qbo-margin)/ 2);max-width:calc(25% - var(--qbo-margin)/ 2)}.qbo-col-4{flex:0 0 calc(33.33% - var(--qbo-margin)/ 2);max-width:calc(33.33% - var(--qbo-margin)/ 2)}.qbo-col-5{flex:0 0 calc(41.66% - var(--qbo-margin)/ 2);max-width:calc(41.66% - var(--qbo-margin)/ 2)}.qbo-col-6{flex:0 0 calc(50% - var(--qbo-margin)/ 2);max-width:calc(50% - var(--qbo-margin)/ 2)}.qbo-col-7{flex:0 0 calc(58.33% - var(--qbo-margin)/ 2);max-width:calc(58.33% - var(--qbo-margin)/ 2)}.qbo-col-8{flex:0 0 calc(66.66% - var(--qbo-margin)/ 2);max-width:calc(66.66% - var(--qbo-margin)/ 2)}.qbo-col-9{flex:0 0 calc(75% - var(--qbo-margin)/ 2);max-width:calc(75% - var(--qbo-margin)/ 2)}.qbo-col-10{flex:0 0 calc(83.33% - var(--qbo-margin)/ 2);max-width:calc(83.33% - var(--qbo-margin)/ 2)}.qbo-col-11{flex:0 0 calc(91.66% - var(--qbo-margin)/ 2);max-width:calc(91.66% - var(--qbo-margin)/ 2)}.qbo-col-12{flex:0 0 calc(100% - var(--qbo-margin)/ 2);max-width:calc(100% - var(--qbo-margin)/ 2)}.qbo-col-auto{flex:0 0 auto;max-width:none}.qbo-card{border:1px solid var(--qbo-border-color)!important;border-radius:var(--qbo-border-radius)!important;box-shadow:2px 2px 3px var(--qbo-border-color);padding:.5em;position:inherit!important;overflow:auto}.qbo-card-bottom{margin-bottom:.5em}.qbo-card-left{margin-left:.5em}.qbo-card-right{margin-right:.5em}.qbo-card-top{margin-top:.5em}svg{height:1rem;width:1rem}.qbo-col-noborder>.qbo-form{margin-top:.25em}.qbo-col-noborder>.qbo-form.qbo-form-status{margin-top:0}.qbo-form label{display:flex;flex-direction:column;font-size:.9rem;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial;margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form label:first-child{margin-top:var(--qbo-label-margin-top)!important}.qbo-form.qbo-form-status label:first-child{margin-top:0!important}.qbo-form span{display:flex;flex-direction:column;font-size:.9rem;font-weight:600;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial}.qbo-form span:not(:last-child){margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form span:empty::after{color:color-mix(in oklab,var(--qbo-color) 25%,var(--qbo-background-color));content:"null";font-style:italic;font-weight:initial;min-height:1.125em}.qbo-form small{display:block;font-size:.8rem;color:color-mix(in srgb,var(--qbo-color) 60%,transparent)}.qbo-form input,.qbo-form select,.qbo-form textarea{width:100%;box-sizing:border-box;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem;line-height:1;color:var(--qbo-color);background-color:var(--qbo-background-color);background-clip:padding-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-family:var(--qbo-font);margin-top:.1rem;margin-right:1rem}.qbo-form input[type=color]{width:3rem;height:calc(1.5em + .75rem + 0px);padding:.375rem;background-color:transparent;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none}.qbo-form input:focus,.qbo-form select:focus,.qbo-form textarea:focus{color:var(--qbo-color);border-color:var(--qbo-focus-border-color);outline:0;box-shadow:0 0 0 .2rem var(--qbo-focus-box-shadow)}.qbo-form input[disabled],.qbo-form select[disabled],.qbo-form textarea[disabled]{color:color-mix(in oklab,var(--qbo-color) 50%,var(--qbo-background-color));cursor:not-allowed;opacity:1}.qbo-form div{display:flex;align-items:center}.qbo-form div span{display:inline-flex;font-weight:100;align-items:center;padding:.375rem .75rem;font-size:1rem;text-align:center;white-space:nowrap;border-right:none;border-radius:.25rem 0 0 .25rem}.qbo-form div input,.qbo-form div select,.qbo-form div textarea{flex:1 1 auto;padding:.375rem .75rem;font-size:1rem;background-clip:padding-box;margin:0}.qbo-form .form-check{display:flex;align-items:center;margin-bottom:1rem}.qbo-form .form-check input[type=checkbox],.qbo-form .form-check input[type=radio]{width:auto;margin-right:.5rem}.qbo-form .form-check label{margin-bottom:0;font-weight:400;color:var(--qbo-color)}.qbo-button,button{display:inline-block;font-weight:400;color:var(--qbo-color);background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem!important;line-height:var(--qbo-line-height);text-align:center;vertical-align:middle;cursor:pointer;margin-right:var(--qbo-margin);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.qbo-button svg,button svg{vertical-align:top}.qbo-button:focus,.qbo-button:hover,button:focus,button:hover{background-color:var(--qbo-border-color);text-decoration:none;line-height:var(--qbo-line-height);border-radius:var(--qbo-border-radius);transition:background-color .15s ease-in-out,border-color .15s ease-in-out}.qbo-button:disabled,button:disabled{opacity:.65;cursor:not-allowed;background-color:var(--qbo-button-bg);border-color:var(--qbo-button-border);color:var(--qbo-button-color)}.primary{background-color:var(--qbo-primary-bg);border:1px solid var(--qbo-primary-border);color:var(--qbo-primary-color)}.primary:focus,.primary:hover{background-color:var(--qbo-primary-hover-bg);border:1px solid var(--qbo-primary-hover-border)}.secondary{background-color:var(--qbo-secondary-bg);border:1px solid var(--qbo-secondary-border);color:var(--qbo-secondary-color)}.secondary:focus,.secondary:hover{background-color:var(--qbo-secondary-hover-bg);border:1px solid var(--qbo-secondary-hover-border)}.icon{height:1rem;width:1rem;filter:var(--qbo-svg-filter)}.icon use{display:block}.icon.right{position:relative;padding-left:1.25rem;background-image:url("https://devqmp.quandis.io/core/ui/images/qbo-icons.svg#i-arrow-down-circle");background-repeat:no-repeat;background-position:left center}nav.qbo-main-menu{background:linear-gradient(to bottom,#d9d9d9,#fff);padding-top:4px}nav{--qbo-background-color:var(--qbo-nav-background-color, black);--qbo-color:var(--qbo-nav-color, white);--qbo-svg-filter:brightness(0) invert(1);display:flex;flex-direction:row;color:var(--qbo-nav-color,#fff)}nav menu{list-style-type:none;padding-inline-start:20px;margin-block-start:0.5em;margin-block-end:0.5em}nav menu li{border:0;cursor:pointer;display:inline-block;line-height:var(--qbo-line-height);padding:5px}nav menu li svg{filter:invert(0)!important}nav menu li:focus,nav menu li:hover{background-color:var(--qbo-nav-background-hover,grey);border:0;border-radius:.5em;color:#fff;text-decoration:none}nav menu li:focus span>svg,nav menu li:focus>svg,nav menu li:hover span>svg,nav menu li:hover>svg{filter:var(--qbo-svg-filter)!important}nav>img{padding-inline-start:8px}nav>span{font-size:1.75em;font-weight:500;margin-top:4px;padding-inline-start:10px}nav a{color:var(--qbo-color)}nav svg.label{vertical-align:text-top}nav svg.toggle{vertical-align:text-bottom}menu.qbo-toolbar{list-style-type:none;padding-left:0;display:flex;flex-direction:row;margin-right:var(--qbo-margin)}menu.qbo-toolbar>li{display:inline-block;margin-right:0;color:var(--qbo-color);background-color:#eee;border:1px solid var(--qbo-border-color);padding:.4rem .5rem .2rem .5rem;line-height:var(--qbo-line-height);cursor:pointer;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-decoration:none}menu.qbo-toolbar>li:first-child{border-top-left-radius:var(--qbo-border-radius);border-bottom-left-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li:last-child{border-top-right-radius:var(--qbo-border-radius);border-bottom-right-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li.active,menu.qbo-toolbar>li:focus,menu.qbo-toolbar>li:hover{background-color:#81181d;border-color:#81181d;line-height:var(--qbo-line-height);text-decoration:none;transition:background-color .15s ease-in-out,border-color .15s ease-in-out}menu.qbo-toolbar>li.active svg,menu.qbo-toolbar>li:focus svg,menu.qbo-toolbar>li:hover svg{filter:brightness(0) invert(1)}menu.qbo-toolbar.vertical{align-items:flex-start;flex-direction:column;margin-right:0;margin-top:0}qbo-menu aside,qbo-menu menu{background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);box-sizing:border-box;height:auto;list-style-type:none;margin:0;padding-left:0;position:absolute;visibility:hidden}qbo-menu aside.open,qbo-menu menu.open{background:linear-gradient(to top,#f0f0f0,#fff 90%);border-bottom:1px solid var(--qbo-border-color);color:var(--qbo-color);display:block;padding-bottom:1.25em;visibility:visible;z-index:1}qbo-menu aside.open>header,qbo-menu menu.open>header{font-size:1.5em;font-weight:500;margin-left:10px}qbo-menu aside.open>header>svg,qbo-menu menu.open>header>svg{height:1.5rem;margin-bottom:.2em;vertical-align:bottom;width:1.5rem}qbo-menu aside.open>p,qbo-menu menu.open>p{margin-left:10px}qbo-menu aside{width:0;margin:var(--qbo-margin);padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);padding-bottom:.6em;overflow-y:scroll;top:53px!important;width:100%;background-color:#f0f0f0;border:0;border-radius:0;border-bottom-left-radius:.7em;border-bottom-right-radius:.7em;color:var(--qbo-nav-color,#fff);height:auto;left:0;margin:0;overflow-y:auto}qbo-menu aside>h1{color:var(--qbo-color);margin-block-end:0;margin-left:1em}qbo-menu aside>p{color:var(--qbo-color);margin-block-start:0;margin-left:1.2em}qbo-menu li{display:list-item!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);line-height:var(--qbo-line-height);text-align:left;white-space:nowrap;cursor:pointer;text-decoration:none}qbo-menu li:hover{background-color:var(--qbo-border-color)}qbo-menu menu li.disabled{color:#6c757d;pointer-events:none;background-color:transparent}qbo-menu menu .dropdown-divider{height:1px;margin:.5rem 0;overflow:hidden;background-color:#e9ecef}qbo-menu menu .dropdown-header{padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}qbo-popover{background-color:#f0f0f0;border:1px solid #81181d;border-radius:var(--qbo-border-radius);color:var(--qbo-color);display:none;margin:.6em 0 0 0;padding:0 1em 0 1em;position:absolute;z-index:1}qbo-popover h3{margin-block-end:0.5em;margin-block-start:0.5em}qbo-popover p{margin-block-start:0;white-space:nowrap}qbo-popover.open{display:inherit;visibility:visible}details>a{margin-left:1.5em}div.qbo-row-subsequent{margin-top:.5em}h3.title{color:var(--qbo-h3-card-color);font-size:1.5em;font-weight:500;line-height:1.2;margin-bottom:0;margin-top:0}h4.title{color:var(--qbo-h3-card-color);font-size:1.25rem;font-weight:500;margin-block:0.5em 0;margin-bottom:.25em;margin-top:.25em}p.detail{margin-block-end:0.5em;margin-block-start:0;margin-left:.5em}div.qbo-col-noborder{border:0!important;box-shadow:initial}.qbo-height-10{height:10vh}.qbo-height-20{height:20vh}.qbo-height-30{height:30vh}.qbo-height-40{height:40vh}.qbo-height-50{height:50vh}.qbo-height-60{height:60vh}.qbo-height-70{height:70vh}.qbo-height-80{height:80vh}.qbo-height-90{height:90vh}.qbo-height-100{height:100vh}`;const me=K`@charset "UTF-8";@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxC7mw9c.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRzS7mw9c.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxi7mw9c.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRxy7mw9c.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:italic;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Montserrat;font-style:normal;font-weight:100 900;font-display:swap;src:url(https://fonts.gstatic.com/s/montserrat/v29/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--qbo-font:Montserrat,Arial,sans-serif;--qbo-color:#333;--qbo-border-color:#999;--qbo-border-radius:4px;--qbo-background-color:#fff;--qbo-padding-horizontal:0.75rem;--qbo-padding-vertical:0.375rem;--qbo-padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);--qbo-margin:0.5rem;--qbo-margin-horizontal:0.5rem;--qbo-margin-vertical:0.5rem;--qbo-focus-border-color:#80bdff;--qbo-focus-box-shadow:rgba(0, 123, 255, 0.25);--qbo-line-height:var(--qbo-line-height);--qbo-button-bg:#007bff;--qbo-button-border:#007bff;--qbo-button-bg-hover:#0056b3;--qbo-button-border-hover:#004085;--qbo-button-color:#fff;--qbo-button-padding:var(--qbo-padding);--qbo-button-border-radius:var(--qbo-border-radius);--qbo-nav-color:#333;--qbo-nav-background-color:#fff;--qbo-nav-background-hover:#81181d;--qbo-nav-background-hover-color:#999;--qbo-primary-bg:#007bff;--qbo-primary-color:#fff;--qbo-primary-border:#007bff;--qbo-primary-hover-bg:#0056b3;--qbo-primary-hover-border:#004085;--qbo-secondary-bg:#6c757d;--qbo-secondary-color:#ffffff;--qbo-secondary-border:#6c757d;--qbo-secondary-hover-bg:#5a6268;--qbo-secondary-hover-border:#545b62;--qbo-success-bg:#28a745;--qbo-success-color:#ffffff;--qbo-success-border:#28a745;--qbo-success-hover-bg:#218838;--qbo-success-hover-border:#1e7e34;--qbo-danger-bg:#dc3545;--qbo-danger-color:#ffffff;--qbo-danger-border:#dc3545;--qbo-danger-hover-bg:#c82333;--qbo-danger-hover-border:#bd2130;--qbo-info-bg:#17a2b8;--qbo-info-color:#ffffff;--qbo-info-border:#17a2b8;--qbo-info-hover-bg:#138496;--qbo-info-hover-border:#117a8b;--qbo-light-bg:#f8f9fa;--qbo-light-color:#212529;--qbo-light-border:#f8f9fa;--qbo-light-hover-bg:#e2e6ea;--qbo-light-hover-border:#dae0e5;--qbo-dark-bg:#343a40;--qbo-dark-color:#ffffff;--qbo-dark-border:#343a40;--qbo-dark-hover-bg:#23272b;--qbo-dark-hover-border:#1d2124;--qbo-table-header-color:var(--qbo-color);--qbo-table-header-background:color-mix(in srgb, var(--qbo-border-color) 50%, var(--qbo-background-color) 50%);--qbo-table-footer-color:color-mix(in srgb, var(--qbo-color) 70%, var(--qbo-background-color) 70%);--qbo-table-footer-background:var(--qbo-background-color);--qbo-table-padding:0.25em;--qbo-file-height:500px;--qbo-label-margin-bottom:0.25em;--qbo-label-margin-top:0.25em;--qbo-h3-card-color:#595959}.qbo-theme-dark{--qbo-color:#e0e0e0;--qbo-border-color:grey;--qbo-background-color:#121212;--qbo-nav-color:#000;--qbo-nav-background-color:#fff;--qbo-svg-filter:brightness(0) invert(1)}.qbo-theme-light{font-family:var(--qbo-font);color:var(--qbo-color);margin:0;background-color:var(--qbo-background-color)}.qbo-row,.qbo-row-viewer{display:flex;flex-wrap:wrap;gap:var(--qbo-margin)}div.qbo-row-padding-top{padding-top:.375rem}.qbo-card,.qbo-col{flex:1 0 0;max-width:100%;box-sizing:border-box}.qbo-col-1,qbo-card[columns="1"]{flex:0 0 calc(8.33% - var(--qbo-margin)/ 2);max-width:calc(8.33% - var(--qbo-margin)/ 2)}.qbo-col-2,qbo-card[columns="2"]{flex:0 0 calc(16.66% - var(--qbo-margin)/ 2);max-width:calc(16.66% - var(--qbo-margin)/ 2)}.qbo-col-3,qbo-card[columns="3"]{flex:0 0 calc(25% - var(--qbo-margin)/ 2);max-width:calc(25% - var(--qbo-margin)/ 2)}.qbo-col-4,qbo-card[columns="4"]{flex:0 0 calc(33.33% - var(--qbo-margin)/ 2);max-width:calc(33.33% - var(--qbo-margin)/ 2)}.qbo-col-5{flex:0 0 calc(41.66% - var(--qbo-margin)/ 2);max-width:calc(41.66% - var(--qbo-margin)/ 2)}.qbo-col-6,qbo-card[columns="6"]{flex:0 0 calc(50% - var(--qbo-margin)/ 2);max-width:calc(50% - var(--qbo-margin)/ 2)}.qbo-col-7,qbo-card[columns="7"]{flex:0 0 calc(58.33% - var(--qbo-margin)/ 2);max-width:calc(58.33% - var(--qbo-margin)/ 2)}.qbo-col-8,qbo-card[columns="8"]{flex:0 0 calc(66.66% - var(--qbo-margin)/ 2);max-width:calc(66.66% - var(--qbo-margin)/ 2)}.qbo-col-9,qbo-card[columns="9"]{flex:0 0 calc(75% - var(--qbo-margin)/ 2);max-width:calc(75% - var(--qbo-margin)/ 2)}.qbo-col-10,qbo-card[columns="10"]{flex:0 0 calc(83.33% - var(--qbo-margin)/ 2);max-width:calc(83.33% - var(--qbo-margin)/ 2)}.qbo-col-11,qbo-card[columns="11"]{flex:0 0 calc(91.66% - var(--qbo-margin)/ 2);max-width:calc(91.66% - var(--qbo-margin)/ 2)}.qbo-col-12,qbo-card[columns="12"]{flex:0 0 calc(100% - var(--qbo-margin)/ 2);max-width:calc(100% - var(--qbo-margin)/ 2)}.qbo-col-auto,qbo-card[columns=auto]{flex:0 0 auto;max-width:none}.qbo-card{border:1px solid var(--qbo-border-color)!important;border-radius:var(--qbo-border-radius)!important;box-shadow:2px 2px 3px var(--qbo-border-color);padding:.5em;position:inherit!important;overflow:auto}.qbo-card-bottom{margin-bottom:.5em}.qbo-card-left{margin-left:.5em}.qbo-card-right{margin-right:.5em}.qbo-card-top{margin-top:.5em}svg{height:1rem;width:1rem}.qbo-col-noborder>.qbo-form{margin-top:.25em}.qbo-col-noborder>.qbo-form.qbo-form-status{margin-top:0}.qbo-form label{display:flex;flex-direction:column;font-size:.9rem;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial;margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form label:first-child{margin-top:var(--qbo-label-margin-top)!important}.qbo-form.qbo-form-status label:first-child{margin-top:0!important}.qbo-form span{display:flex;flex-direction:column;font-size:.9rem;font-weight:600;color:var(--qbo-color);font-family:var(--qbo-font);line-height:initial}.qbo-form span:not(:last-child){margin-bottom:var(--qbo-label-margin-bottom)!important}.qbo-form span:empty::after{color:color-mix(in oklab,var(--qbo-color) 25%,var(--qbo-background-color));content:"null";font-style:italic;font-weight:initial;min-height:1.125em}.qbo-form small{display:block;font-size:.8rem;color:color-mix(in srgb,var(--qbo-color) 60%,transparent)}.qbo-form input,.qbo-form select,.qbo-form textarea{width:100%;box-sizing:border-box;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem;line-height:1;color:var(--qbo-color);background-color:var(--qbo-background-color);background-clip:padding-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;font-family:var(--qbo-font);margin-top:.1rem;margin-right:1rem}.qbo-form input[type=color]{width:3rem;height:calc(1.5em + .75rem + 0px);padding:.375rem;background-color:transparent;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none}.qbo-form input:focus,.qbo-form select:focus,.qbo-form textarea:focus{color:var(--qbo-color);border-color:var(--qbo-focus-border-color);outline:0;box-shadow:0 0 0 .2rem var(--qbo-focus-box-shadow)}.qbo-form input[disabled],.qbo-form select[disabled],.qbo-form textarea[disabled]{color:color-mix(in oklab,var(--qbo-color) 50%,var(--qbo-background-color));cursor:not-allowed;opacity:1}.qbo-form div{display:flex;align-items:center}.qbo-form div span{display:inline-flex;font-weight:100;align-items:center;padding:.375rem .75rem;font-size:1rem;text-align:center;white-space:nowrap;border-right:none;border-radius:.25rem 0 0 .25rem}.qbo-form div input,.qbo-form div select,.qbo-form div textarea{flex:1 1 auto;padding:.375rem .75rem;font-size:1rem;background-clip:padding-box;margin:0}.qbo-form .form-check{display:flex;align-items:center;margin-bottom:1rem}.qbo-form .form-check input[type=checkbox],.qbo-form .form-check input[type=radio]{width:auto;margin-right:.5rem}.qbo-form .form-check label{margin-bottom:0;font-weight:400;color:var(--qbo-color)}.qbo-button,button{display:inline-block;font-weight:400;color:var(--qbo-color);background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);font-size:1rem!important;line-height:var(--qbo-line-height);text-align:center;vertical-align:middle;cursor:pointer;margin-right:var(--qbo-margin);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.qbo-button svg,button svg{vertical-align:top}.qbo-button:focus,.qbo-button:hover,button:focus,button:hover{background-color:var(--qbo-border-color);text-decoration:none;line-height:var(--qbo-line-height);border-radius:var(--qbo-border-radius);transition:background-color .15s ease-in-out,border-color .15s ease-in-out}.qbo-button:disabled,button:disabled{opacity:.65;cursor:not-allowed;background-color:var(--qbo-button-bg);border-color:var(--qbo-button-border);color:var(--qbo-button-color)}.primary{background-color:var(--qbo-primary-bg);border:1px solid var(--qbo-primary-border);color:var(--qbo-primary-color)}.primary:focus,.primary:hover{background-color:var(--qbo-primary-hover-bg);border:1px solid var(--qbo-primary-hover-border)}.secondary{background-color:var(--qbo-secondary-bg);border:1px solid var(--qbo-secondary-border);color:var(--qbo-secondary-color)}.secondary:focus,.secondary:hover{background-color:var(--qbo-secondary-hover-bg);border:1px solid var(--qbo-secondary-hover-border)}.icon,nav.qbo-mainmenu>div>div>ul i.qbo-icon{height:1rem;width:1rem;filter:var(--qbo-svg-filter)}.icon use,nav.qbo-mainmenu>div>div>ul i.qbo-icon use{display:block}.icon.right,nav.qbo-mainmenu>div>div>ul i.right.qbo-icon{position:relative;padding-left:1.25rem;background-image:url("https://devqmp.quandis.io/core/ui/images/qbo-icons.svg#i-arrow-down-circle");background-repeat:no-repeat;background-position:left center}nav.qbo-main-menu{background:linear-gradient(to bottom,#d9d9d9,#fff);padding-top:4px}nav{--qbo-background-color:var(--qbo-nav-background-color, black);--qbo-color:var(--qbo-nav-color, white);--qbo-svg-filter:brightness(0) invert(1);display:flex;flex-direction:row;color:var(--qbo-nav-color,#fff)}nav menu{list-style-type:none;padding-inline-start:20px;margin-block-start:0.5em;margin-block-end:0.5em}nav menu li{border:0;cursor:pointer;display:inline-block;line-height:var(--qbo-line-height);padding:5px}nav menu li svg{filter:invert(0)!important}nav menu li:focus,nav menu li:hover{background-color:var(--qbo-nav-background-hover,grey);border:0;border-radius:.5em;color:#fff;text-decoration:none}nav menu li:focus span>svg,nav menu li:focus>svg,nav menu li:hover span>svg,nav menu li:hover>svg{filter:var(--qbo-svg-filter)!important}nav>img{padding-inline-start:8px}nav>span{font-size:1.75em;font-weight:500;margin-top:4px;padding-inline-start:10px}nav a{color:var(--qbo-color)}nav svg.label{vertical-align:text-top}nav svg.toggle{vertical-align:text-bottom}menu.qbo-toolbar{list-style-type:none;padding-left:0;display:flex;flex-direction:row;margin-right:var(--qbo-margin)}menu.qbo-toolbar>li{display:inline-block;margin-right:0;color:var(--qbo-color);background-color:#eee;border:1px solid var(--qbo-border-color);padding:.4rem .5rem .2rem .5rem;line-height:var(--qbo-line-height);cursor:pointer;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;text-decoration:none}menu.qbo-toolbar>li:first-child{border-top-left-radius:var(--qbo-border-radius);border-bottom-left-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li:last-child{border-top-right-radius:var(--qbo-border-radius);border-bottom-right-radius:var(--qbo-border-radius)}menu.qbo-toolbar>li.active,menu.qbo-toolbar>li:focus,menu.qbo-toolbar>li:hover{background-color:#81181d;border-color:#81181d;line-height:var(--qbo-line-height);text-decoration:none;transition:background-color .15s ease-in-out,border-color .15s ease-in-out}menu.qbo-toolbar>li.active svg,menu.qbo-toolbar>li:focus svg,menu.qbo-toolbar>li:hover svg{filter:brightness(0) invert(1)}menu.qbo-toolbar.vertical{align-items:flex-start;flex-direction:column;margin-right:0;margin-top:0}qbo-menu aside,qbo-menu menu{background-color:var(--qbo-background-color);border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);box-sizing:border-box;height:auto;list-style-type:none;margin:0;padding-left:0;position:absolute;visibility:hidden}qbo-menu aside.open,qbo-menu menu.open{background:linear-gradient(to top,#f0f0f0,#fff 90%);border-bottom:1px solid var(--qbo-border-color);color:var(--qbo-color);display:block;padding-bottom:1.25em;visibility:visible;z-index:1}qbo-menu aside.open>header,qbo-menu menu.open>header{font-size:1.5em;font-weight:500;margin-left:10px}qbo-menu aside.open>header>svg,qbo-menu menu.open>header>svg{height:1.5rem;margin-bottom:.2em;vertical-align:bottom;width:1.5rem}qbo-menu aside.open>p,qbo-menu menu.open>p{margin-left:10px}qbo-menu aside{width:0;margin:var(--qbo-margin);padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);padding-bottom:.6em;overflow-y:scroll;top:53px!important;width:100%;background-color:#f0f0f0;border:0;border-radius:0;border-bottom-left-radius:.7em;border-bottom-right-radius:.7em;color:var(--qbo-nav-color,#fff);height:auto;left:0;margin:0;overflow-y:auto}qbo-menu aside>h1{color:var(--qbo-color);margin-block-end:0;margin-left:1em}qbo-menu aside>p{color:var(--qbo-color);margin-block-start:0;margin-left:1.2em}qbo-menu li{display:list-item!important;padding:var(--qbo-padding-vertical) var(--qbo-padding-horizontal);line-height:var(--qbo-line-height);text-align:left;white-space:nowrap;cursor:pointer;text-decoration:none}qbo-menu li:hover{background-color:var(--qbo-border-color)}.qbo-paginate qbo-menu menu li.disabled,qbo-menu menu .qbo-paginate li.disabled,qbo-menu menu li.disabled{color:#6c757d;pointer-events:none;background-color:transparent}nav.qbo-mainmenu>div>div>ul qbo-menu menu hr,qbo-menu menu .dropdown-divider,qbo-menu menu nav.qbo-mainmenu>div>div>ul hr{height:1px;margin:.5rem 0;overflow:hidden;background-color:#e9ecef}qbo-menu menu .dropdown-header{padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}qbo-popover{background-color:#f0f0f0;border:1px solid #81181d;border-radius:var(--qbo-border-radius);color:var(--qbo-color);display:none;margin:.6em 0 0 0;padding:0 1em 0 1em;position:absolute;z-index:1}qbo-popover h3{margin-block-end:0.5em;margin-block-start:0.5em}qbo-popover p{margin-block-start:0;white-space:nowrap}qbo-popover.open{display:inherit;visibility:visible}details>a{margin-left:1.5em}div.qbo-row-subsequent{margin-top:.5em}h3.title{color:var(--qbo-h3-card-color);font-size:1.5em;font-weight:500;line-height:1.2;margin-bottom:0;margin-top:0}h4.title{color:var(--qbo-h3-card-color);font-size:1.25rem;font-weight:500;margin-block:0.5em 0;margin-bottom:.25em;margin-top:.25em}p.detail{margin-block-end:0.5em;margin-block-start:0;margin-left:.5em}div.qbo-col-noborder{border:0!important;box-shadow:initial}.qbo-height-10{height:10vh}.qbo-height-20{height:20vh}.qbo-height-30{height:30vh}.qbo-height-40{height:40vh}.qbo-height-50{height:50vh}.qbo-height-60{height:60vh}.qbo-height-70{height:70vh}.qbo-height-80{height:80vh}.qbo-height-90{height:90vh}.qbo-height-100{height:100vh}.qbo-breadcrumb{z-index:999!important}nav.qbo-breadcrumb>div>nav{--bs-breadcrumb-divider:">"}nav.qbo-breadcrumb>div>nav>ul{margin-bottom:.5rem}@media all and (min-width:992px){.navbar .dropdown-menu li,.navbar .qbo-menu-context>menu li,.navbar .qbo-menu-context>ul li,.navbar qbo-menu[type=context]>menu li,.navbar qbo-menu[type=context]>ul li,nav.qbo-mainmenu .dropdown-menu li,nav.qbo-mainmenu .qbo-menu-context>menu li,nav.qbo-mainmenu .qbo-menu-context>ul li,nav.qbo-mainmenu qbo-menu[type=context]>menu li,nav.qbo-mainmenu qbo-menu[type=context]>ul li{position:relative}.navbar .dropdown-menu .submenu,.navbar .qbo-menu-context>menu .submenu,.navbar .qbo-menu-context>ul .submenu,.navbar qbo-menu[type=context]>menu .submenu,.navbar qbo-menu[type=context]>ul .submenu,nav.qbo-mainmenu .dropdown-menu .submenu,nav.qbo-mainmenu .qbo-menu-context>menu .submenu,nav.qbo-mainmenu .qbo-menu-context>ul .submenu,nav.qbo-mainmenu qbo-menu[type=context]>menu .submenu,nav.qbo-mainmenu qbo-menu[type=context]>ul .submenu{display:none;position:absolute;left:100%;top:-7px}.navbar .dropdown-menu>li:hover,.navbar .qbo-menu-context>menu>li:hover,.navbar .qbo-menu-context>ul>li:hover,.navbar qbo-menu[type=context]>menu>li:hover,.navbar qbo-menu[type=context]>ul>li:hover,nav.qbo-mainmenu .dropdown-menu>li:hover,nav.qbo-mainmenu .qbo-menu-context>menu>li:hover,nav.qbo-mainmenu .qbo-menu-context>ul>li:hover,nav.qbo-mainmenu qbo-menu[type=context]>menu>li:hover,nav.qbo-mainmenu qbo-menu[type=context]>ul>li:hover{background-color:#f1f1f1}.navbar .dropdown-menu>li:hover>.submenu,.navbar .qbo-menu-context>menu>li:hover>.submenu,.navbar .qbo-menu-context>ul>li:hover>.submenu,.navbar qbo-menu[type=context]>menu>li:hover>.submenu,.navbar qbo-menu[type=context]>ul>li:hover>.submenu,nav.qbo-mainmenu .dropdown-menu>li:hover>.submenu,nav.qbo-mainmenu .qbo-menu-context>menu>li:hover>.submenu,nav.qbo-mainmenu .qbo-menu-context>ul>li:hover>.submenu,nav.qbo-mainmenu qbo-menu[type=context]>menu>li:hover>.submenu,nav.qbo-mainmenu qbo-menu[type=context]>ul>li:hover>.submenu{display:block}.navbar .nav-item .dropdown-mainmenu,.navbar .qbo-menu-side li .dropdown-mainmenu,.navbar qbo-menu[type=side] li .dropdown-mainmenu,.qbo-menu-side .navbar li .dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu li .dropdown-mainmenu,nav.qbo-mainmenu .nav-item .dropdown-mainmenu,nav.qbo-mainmenu .qbo-menu-side li .dropdown-mainmenu,nav.qbo-mainmenu qbo-menu[type=side] li .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] .navbar li .dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu li .dropdown-mainmenu{display:none;margin-top:0}.navbar .nav-item:hover .dropdown-mainmenu,.navbar .nav-item:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.navbar .qbo-menu-side li:hover .dropdown-mainmenu,.navbar .qbo-menu-side li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.navbar qbo-menu[type=side] li:hover .dropdown-mainmenu,.navbar qbo-menu[type=side] li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.qbo-menu-side .navbar li:hover .dropdown-mainmenu,.qbo-menu-side .navbar li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu li:hover .dropdown-mainmenu,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu .nav-item:hover .dropdown-mainmenu,nav.qbo-mainmenu .qbo-menu-side li:hover .dropdown-mainmenu,nav.qbo-mainmenu qbo-menu[type=side] li:hover .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul .nav-item:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover .dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:hover>ul.qbo-dropdown-mainmenu,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] .navbar li:hover .dropdown-mainmenu,qbo-menu[type=side] .navbar li:hover nav.qbo-mainmenu>div>div>ul li.qbo-nav-item>ul.qbo-dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu li:hover .dropdown-mainmenu,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li:hover li.qbo-nav-item>ul.qbo-dropdown-mainmenu{display:block}.navbar .navbar-brand span,nav.qbo-mainmenu .navbar-brand span,nav.qbo-mainmenu>div>a span{margin-right:5px}}@media (max-width:991px){.navbar .dropdown-menu .dropdown-menu,.navbar .dropdown-menu .qbo-menu-context>menu,.navbar .dropdown-menu .qbo-menu-context>ul,.navbar .dropdown-menu qbo-menu[type=context]>menu,.navbar .dropdown-menu qbo-menu[type=context]>ul,.navbar .qbo-menu-context>menu .dropdown-menu,.navbar .qbo-menu-context>menu .qbo-menu-context>menu,.navbar .qbo-menu-context>menu .qbo-menu-context>ul,.navbar .qbo-menu-context>menu qbo-menu[type=context]>menu,.navbar .qbo-menu-context>menu qbo-menu[type=context]>ul,.navbar .qbo-menu-context>ul .dropdown-menu,.navbar .qbo-menu-context>ul .qbo-menu-context>menu,.navbar .qbo-menu-context>ul .qbo-menu-context>ul,.navbar .qbo-menu-context>ul qbo-menu[type=context]>menu,.navbar .qbo-menu-context>ul qbo-menu[type=context]>ul,.navbar qbo-menu[type=context]>menu .dropdown-menu,.navbar qbo-menu[type=context]>menu .qbo-menu-context>menu,.navbar qbo-menu[type=context]>menu .qbo-menu-context>ul,.navbar qbo-menu[type=context]>menu qbo-menu[type=context]>menu,.navbar qbo-menu[type=context]>menu qbo-menu[type=context]>ul,.navbar qbo-menu[type=context]>ul .dropdown-menu,.navbar qbo-menu[type=context]>ul .qbo-menu-context>menu,.navbar qbo-menu[type=context]>ul .qbo-menu-context>ul,.navbar qbo-menu[type=context]>ul qbo-menu[type=context]>menu,.navbar qbo-menu[type=context]>ul qbo-menu[type=context]>ul,nav.qbo-mainmenu .dropdown-menu .dropdown-menu,nav.qbo-mainmenu .dropdown-menu .qbo-menu-context>menu,nav.qbo-mainmenu .dropdown-menu .qbo-menu-context>ul,nav.qbo-mainmenu .dropdown-menu qbo-menu[type=context]>menu,nav.qbo-mainmenu .dropdown-menu qbo-menu[type=context]>ul,nav.qbo-mainmenu .qbo-menu-context>menu .dropdown-menu,nav.qbo-mainmenu .qbo-menu-context>menu .qbo-menu-context>menu,nav.qbo-mainmenu .qbo-menu-context>menu .qbo-menu-context>ul,nav.qbo-mainmenu .qbo-menu-context>menu qbo-menu[type=context]>menu,nav.qbo-mainmenu .qbo-menu-context>menu qbo-menu[type=context]>ul,nav.qbo-mainmenu .qbo-menu-context>ul .dropdown-menu,nav.qbo-mainmenu .qbo-menu-context>ul .qbo-menu-context>menu,nav.qbo-mainmenu .qbo-menu-context>ul .qbo-menu-context>ul,nav.qbo-mainmenu .qbo-menu-context>ul qbo-menu[type=context]>menu,nav.qbo-mainmenu .qbo-menu-context>ul qbo-menu[type=context]>ul,nav.qbo-mainmenu qbo-menu[type=context]>menu .dropdown-menu,nav.qbo-mainmenu qbo-menu[type=context]>menu .qbo-menu-context>menu,nav.qbo-mainmenu qbo-menu[type=context]>menu .qbo-menu-context>ul,nav.qbo-mainmenu qbo-menu[type=context]>menu qbo-menu[type=context]>menu,nav.qbo-mainmenu qbo-menu[type=context]>menu qbo-menu[type=context]>ul,nav.qbo-mainmenu qbo-menu[type=context]>ul .dropdown-menu,nav.qbo-mainmenu qbo-menu[type=context]>ul .qbo-menu-context>menu,nav.qbo-mainmenu qbo-menu[type=context]>ul .qbo-menu-context>ul,nav.qbo-mainmenu qbo-menu[type=context]>ul qbo-menu[type=context]>menu,nav.qbo-mainmenu qbo-menu[type=context]>ul qbo-menu[type=context]>ul{margin-left:.7rem;margin-right:.7rem;margin-bottom:.5rem}}.navbar .nav-item nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul .nav-item li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item li>a.qbo-dropdown-item>span.qbo-submenuexpand,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li li>a.qbo-dropdown-item>span.qbo-submenuexpand,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul li>a.qbo-dropdown-item>span.qbo-submenuexpand,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li li>a.qbo-dropdown-item>span.qbo-submenuexpand{float:right}.navbar .nav-item .icon,.navbar .nav-item nav.qbo-mainmenu>div>div>ul i.qbo-icon,.navbar .qbo-menu-side li .icon,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.navbar qbo-menu[type=side] li .icon,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.qbo-menu-side .navbar li .icon,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul i.qbo-icon,.qbo-menu-side nav.qbo-mainmenu li .icon,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li i.qbo-icon,nav.qbo-mainmenu .nav-item .icon,nav.qbo-mainmenu .qbo-menu-side li .icon,nav.qbo-mainmenu qbo-menu[type=side] li .icon,nav.qbo-mainmenu>div>div>ul .nav-item i.qbo-icon,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li i.qbo-icon,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item .icon,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item i.qbo-icon,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li i.qbo-icon,qbo-menu[type=side] .navbar li .icon,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul i.qbo-icon,qbo-menu[type=side] nav.qbo-mainmenu li .icon,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li i.qbo-icon{margin-right:5px}.navbar .nav-item nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.navbar .qbo-menu-side li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.navbar qbo-menu[type=side] li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.qbo-menu-side .navbar li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,.qbo-menu-side nav.qbo-mainmenu>div>div>ul li a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul .nav-item a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul .qbo-menu-side li a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul li.qbo-nav-item a.qbo-doubleclick,nav.qbo-mainmenu>div>div>ul qbo-menu[type=side] li a.qbo-doubleclick,qbo-menu[type=side] .navbar li nav.qbo-mainmenu>div>div>ul a.qbo-doubleclick,qbo-menu[type=side] nav.qbo-mainmenu>div>div>ul li a.qbo-doubleclick{cursor:pointer}.bd-subnavbar,nav.qbo-breadcrumb{position:relative;z-index:1020;background-color:rgba(255,255,255,.95);box-shadow:0 .5rem 1rem rgba(0,0,0,.05),inset 0 -1px 0 rgba(0,0,0,.15)}.bd-subnavbar .dropdown-menu,.bd-subnavbar .qbo-menu-context>menu,.bd-subnavbar .qbo-menu-context>ul,.bd-subnavbar qbo-menu[type=context]>menu,.bd-subnavbar qbo-menu[type=context]>ul,nav.qbo-breadcrumb .dropdown-menu,nav.qbo-breadcrumb .qbo-menu-context>menu,nav.qbo-breadcrumb .qbo-menu-context>ul,nav.qbo-breadcrumb qbo-menu[type=context]>menu,nav.qbo-breadcrumb qbo-menu[type=context]>ul{font-size:.875rem;box-shadow:0 .5rem 1rem rgba(0,0,0,.05)}.bd-subnavbar .dropdown-item.current,.bd-subnavbar .qbo-menu-context li.current,.bd-subnavbar nav.qbo-mainmenu>div>div>ul li>a.current.qbo-dropdown-item,.bd-subnavbar qbo-menu[type=context] li.current,.qbo-menu-context .bd-subnavbar li.current,.qbo-menu-context nav.qbo-breadcrumb li.current,nav.qbo-breadcrumb .dropdown-item.current,nav.qbo-breadcrumb .qbo-menu-context li.current,nav.qbo-breadcrumb nav.qbo-mainmenu>div>div>ul li>a.current.qbo-dropdown-item,nav.qbo-breadcrumb qbo-menu[type=context] li.current,nav.qbo-mainmenu>div>div>ul .bd-subnavbar li>a.current.qbo-dropdown-item,nav.qbo-mainmenu>div>div>ul nav.qbo-breadcrumb li>a.current.qbo-dropdown-item,qbo-menu[type=context] .bd-subnavbar li.current,qbo-menu[type=context] nav.qbo-breadcrumb li.current{font-weight:600;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 1rem top .6rem;background-size:.75rem .75rem}@media (min-width:768px){.bd-subnavbar,nav.qbo-breadcrumb{position:sticky;top:0}}@media (min-width:768px){:root{scroll-padding-top:4rem}}.bd-content>h2:not(:first-child),div.qbo-container-layout>main>div>h2:not(:first-child){margin-top:3rem}.bd-content>h3,div.qbo-container-layout>main>div>h3{margin-top:2rem}.bd-content>ol li,.bd-content>ul li,div.qbo-container-layout>main>div>ol li,div.qbo-container-layout>main>div>ul li{margin-bottom:.25rem}.bd-content>ol li>p~ul,.bd-content>ul li>p~ul,div.qbo-container-layout>main>div>ol li>p~ul,div.qbo-container-layout>main>div>ul li>p~ul{margin-top:-.5rem;margin-bottom:1rem}.bd-content>.table,div.qbo-container-layout>main>div>.table{max-width:100%;margin-bottom:1.5rem;font-size:.875rem}@media (max-width:991.98px){.bd-content>.table,div.qbo-container-layout>main>div>.table{display:block;overflow-x:auto}.bd-content>.table.table-bordered,div.qbo-container-layout>main>div>.table.table-bordered{border:0}}.bd-content>.table td:first-child,.bd-content>.table th:first-child,div.qbo-container-layout>main>div>.table td:first-child,div.qbo-container-layout>main>div>.table th:first-child{padding-left:0}.bd-content>.table td:not(:last-child),.bd-content>.table th:not(:last-child),div.qbo-container-layout>main>div>.table td:not(:last-child),div.qbo-container-layout>main>div>.table th:not(:last-child){padding-right:1.5rem}.bd-content>.table td:first-child>code,div.qbo-container-layout>main>div>.table td:first-child>code{white-space:nowrap}@media (max-width:767.98px){.bd-sidebar,aside.qbo-sidebar{margin:0 -.75rem 1rem}}.bd-links,aside.qbo-sidebar>nav{overflow:auto;font-weight:600}@media (min-width:768px){.bd-links,aside.qbo-sidebar>nav{position:sticky;top:5rem;display:block!important;height:calc(100vh - 7rem);padding-left:.25rem;margin-left:-.25rem;overflow-y:auto}}@media (max-width:767.98px){.bd-links>ul,aside.qbo-sidebar>nav>ul{padding:1.5rem .75rem;background-color:#f8f9fa;border-bottom:1px solid #e9ecef}}.bd-links a,aside.qbo-sidebar>nav a{padding:.1875rem .5rem;margin-top:.125rem;margin-left:1.25rem;color:rgba(0,0,0,.65);text-decoration:none}.bd-links a:focus,.bd-links a:hover,aside.qbo-sidebar>nav a:focus,aside.qbo-sidebar>nav a:hover{color:rgba(0,0,0,.85);background-color:rgba(121,82,179,.1)}.bd-links .btn,.bd-links .qbo-btn-light,.bd-links button.qbo-btn,.bd-links button.qbo-primary,.bd-links button.qbo-primary-dropdown,.bd-links button.qbo-secondary,.bd-links qbo-icon[type=button],.bd-links qbo-icon[type=toggle],aside.qbo-sidebar>nav .btn,aside.qbo-sidebar>nav .qbo-btn-light,aside.qbo-sidebar>nav button.qbo-btn,aside.qbo-sidebar>nav button.qbo-primary,aside.qbo-sidebar>nav button.qbo-primary-dropdown,aside.qbo-sidebar>nav button.qbo-secondary,aside.qbo-sidebar>nav qbo-icon[type=button],aside.qbo-sidebar>nav qbo-icon[type=toggle],aside.qbo-sidebar>nav>ul>li>button{padding:.25rem .5rem;font-weight:600;color:rgba(0,0,0,.65);background-color:transparent;border:0}.bd-links .btn:focus,.bd-links .btn:hover,.bd-links .qbo-btn-light:focus,.bd-links .qbo-btn-light:hover,.bd-links button.qbo-btn:focus,.bd-links button.qbo-btn:hover,.bd-links button.qbo-primary-dropdown:focus,.bd-links button.qbo-primary-dropdown:hover,.bd-links button.qbo-primary:focus,.bd-links button.qbo-primary:hover,.bd-links button.qbo-secondary:focus,.bd-links button.qbo-secondary:hover,.bd-links qbo-icon[type=button]:focus,.bd-links qbo-icon[type=button]:hover,.bd-links qbo-icon[type=toggle]:focus,.bd-links qbo-icon[type=toggle]:hover,aside.qbo-sidebar>nav .btn:focus,aside.qbo-sidebar>nav .btn:hover,aside.qbo-sidebar>nav .qbo-btn-light:focus,aside.qbo-sidebar>nav .qbo-btn-light:hover,aside.qbo-sidebar>nav button.qbo-btn:focus,aside.qbo-sidebar>nav button.qbo-btn:hover,aside.qbo-sidebar>nav button.qbo-primary-dropdown:focus,aside.qbo-sidebar>nav button.qbo-primary-dropdown:hover,aside.qbo-sidebar>nav button.qbo-primary:focus,aside.qbo-sidebar>nav button.qbo-primary:hover,aside.qbo-sidebar>nav button.qbo-secondary:focus,aside.qbo-sidebar>nav button.qbo-secondary:hover,aside.qbo-sidebar>nav qbo-icon[type=button]:focus,aside.qbo-sidebar>nav qbo-icon[type=button]:hover,aside.qbo-sidebar>nav qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav qbo-icon[type=toggle]:hover,aside.qbo-sidebar>nav>ul>li>button:focus,aside.qbo-sidebar>nav>ul>li>button:hover{color:rgba(0,0,0,.85);background-color:rgba(121,82,179,.1)}.bd-links .btn:focus,.bd-links .qbo-btn-light:focus,.bd-links button.qbo-btn:focus,.bd-links button.qbo-primary-dropdown:focus,.bd-links button.qbo-primary:focus,.bd-links button.qbo-secondary:focus,.bd-links qbo-icon[type=button]:focus,.bd-links qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav .btn:focus,aside.qbo-sidebar>nav .qbo-btn-light:focus,aside.qbo-sidebar>nav button.qbo-btn:focus,aside.qbo-sidebar>nav button.qbo-primary-dropdown:focus,aside.qbo-sidebar>nav button.qbo-primary:focus,aside.qbo-sidebar>nav button.qbo-secondary:focus,aside.qbo-sidebar>nav qbo-icon[type=button]:focus,aside.qbo-sidebar>nav qbo-icon[type=toggle]:focus,aside.qbo-sidebar>nav>ul>li>button:focus{box-shadow:0 0 0 1px rgba(121,82,179,.7)}.bd-links .btn::before,.bd-links .qbo-btn-light::before,.bd-links button.qbo-btn::before,.bd-links button.qbo-primary-dropdown::before,.bd-links button.qbo-primary::before,.bd-links button.qbo-secondary::before,.bd-links qbo-icon[type=button]::before,.bd-links qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav .btn::before,aside.qbo-sidebar>nav .qbo-btn-light::before,aside.qbo-sidebar>nav button.qbo-btn::before,aside.qbo-sidebar>nav button.qbo-primary-dropdown::before,aside.qbo-sidebar>nav button.qbo-primary::before,aside.qbo-sidebar>nav button.qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[type=button]::before,aside.qbo-sidebar>nav qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button::before{width:1.25em;line-height:0;content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");transition:transform .35s ease;transform-origin:0.5em 50%}@media (prefers-reduced-motion:reduce){.bd-links .btn::before,.bd-links .qbo-btn-light::before,.bd-links button.qbo-btn::before,.bd-links button.qbo-primary-dropdown::before,.bd-links button.qbo-primary::before,.bd-links button.qbo-secondary::before,.bd-links qbo-icon[type=button]::before,.bd-links qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav .btn::before,aside.qbo-sidebar>nav .qbo-btn-light::before,aside.qbo-sidebar>nav button.qbo-btn::before,aside.qbo-sidebar>nav button.qbo-primary-dropdown::before,aside.qbo-sidebar>nav button.qbo-primary::before,aside.qbo-sidebar>nav button.qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[type=button]::before,aside.qbo-sidebar>nav qbo-icon[type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button::before{transition:none}}.bd-links .btn[aria-expanded=true],.bd-links [aria-expanded=true].qbo-btn-light,.bd-links button[aria-expanded=true].qbo-btn,.bd-links button[aria-expanded=true].qbo-primary,.bd-links button[aria-expanded=true].qbo-primary-dropdown,.bd-links button[aria-expanded=true].qbo-secondary,.bd-links qbo-icon[aria-expanded=true][type=button],.bd-links qbo-icon[aria-expanded=true][type=toggle],aside.qbo-sidebar>nav .btn[aria-expanded=true],aside.qbo-sidebar>nav [aria-expanded=true].qbo-btn-light,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-btn,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary-dropdown,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-secondary,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=button],aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=toggle],aside.qbo-sidebar>nav>ul>li>button[aria-expanded=true]{color:rgba(0,0,0,.85)}.bd-links .btn[aria-expanded=true]::before,.bd-links [aria-expanded=true].qbo-btn-light::before,.bd-links button[aria-expanded=true].qbo-btn::before,.bd-links button[aria-expanded=true].qbo-primary-dropdown::before,.bd-links button[aria-expanded=true].qbo-primary::before,.bd-links button[aria-expanded=true].qbo-secondary::before,.bd-links qbo-icon[aria-expanded=true][type=button]::before,.bd-links qbo-icon[aria-expanded=true][type=toggle]::before,aside.qbo-sidebar>nav .btn[aria-expanded=true]::before,aside.qbo-sidebar>nav [aria-expanded=true].qbo-btn-light::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-btn::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary-dropdown::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-primary::before,aside.qbo-sidebar>nav button[aria-expanded=true].qbo-secondary::before,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=button]::before,aside.qbo-sidebar>nav qbo-icon[aria-expanded=true][type=toggle]::before,aside.qbo-sidebar>nav>ul>li>button[aria-expanded=true]::before{transform:rotate(90deg)}.bd-links .active,.bd-links .qbo-paginate li.active,.bd-links nav.qbo-breadcrumb>div>nav>ul>li:last-child,.bd-links qbo-icon[selected],.qbo-paginate .bd-links li.active,aside.qbo-sidebar>nav .active,aside.qbo-sidebar>nav qbo-icon[selected]{font-weight:600;color:rgba(0,0,0,.85)}@media (min-width:768px){.bd-layout,div.qbo-container-layout{display:grid;gap:1.5rem;grid-template-areas:"sidebar main";grid-template-columns:1fr 3fr}}@media (min-width:992px){.bd-layout,div.qbo-container-layout{grid-template-columns:1fr 5fr}}.bd-sidebar,aside.qbo-sidebar{grid-area:sidebar}.bd-content,div.qbo-container-layout>main>div{grid-area:content;min-width:1px}.bd-example{position:relative;padding:1rem;margin:1rem -.75rem 0;border:solid #dee2e6;border-width:1px 0 0}.bd-example::after{display:block;clear:both;content:""}@media (min-width:576px){.bd-example{padding:1.5rem;margin-right:0;margin-left:0;border-width:1px;border-top-left-radius:.25rem;border-top-right-radius:.25rem}}.bd-example+p{margin-top:2rem}.bd-example>.form-control+.form-control,.qbo-paginate li.pageSize .bd-example>.form-control+input,.qbo-paginate li.pageSize .bd-example>input+.form-control,.qbo-paginate li.pageSize .bd-example>input+input{margin-top:.5rem}.bd-example>.alert+.alert,.bd-example>.nav+.nav,.bd-example>.navbar+.navbar,.bd-example>.navbar+nav.qbo-mainmenu,.bd-example>.progress+.progress,.bd-example>nav.qbo-mainmenu+.navbar,.bd-example>nav.qbo-mainmenu+nav.qbo-mainmenu,.qbo-menu-side .bd-example>.nav+menu,.qbo-menu-side .bd-example>menu+.nav,.qbo-menu-side .bd-example>menu+menu,qbo-menu[type=side] .bd-example>.nav+menu,qbo-menu[type=side] .bd-example>menu+.nav,qbo-menu[type=side] .bd-example>menu+menu{margin-top:1rem}.bd-example.qbo-menu-context>menu,.bd-example.qbo-menu-context>ul,.bd-example>.dropdown-menu,qbo-menu.bd-example[type=context]>menu,qbo-menu.bd-example[type=context]>ul{position:static;display:block}.bd-example>:last-child{margin-bottom:0}.bd-example>img+img,.bd-example>svg+svg{margin-left:.5rem}.bd-example>.btn,.bd-example>.btn-group,.bd-example>.qbo-btn-light,.bd-example>button.qbo-btn,.bd-example>button.qbo-primary,.bd-example>button.qbo-primary-dropdown,.bd-example>button.qbo-secondary,.bd-example>qbo-icon[type=button],.bd-example>qbo-icon[type=toggle],aside.qbo-sidebar>nav>ul>li.bd-example>button{margin:.25rem .125rem}.bd-example>.btn-toolbar+.btn-toolbar{margin-top:.5rem}.bd-example>.list-group{max-width:400px}.bd-example>[class*=list-group-horizontal]{max-width:100%}.bd-example .fixed-top,.bd-example .sticky-top{position:static;margin:-1rem -1rem 1rem}.bd-example .fixed-bottom{position:static;margin:1rem -1rem -1rem}@media (min-width:576px){.bd-example .fixed-top,.bd-example .sticky-top{margin:-1.5rem -1.5rem 1rem}.bd-example .fixed-bottom{margin:1rem -1.5rem -1.5rem}}.bd-example .pagination,.bd-example .qbo-paginate{margin-top:.5rem;margin-bottom:.5rem}.highlight{padding:1rem;margin-bottom:1rem;background-color:#f8f9fa}@media (min-width:576px){.highlight{padding:1rem 1.5rem}}.highlight pre{padding:0;margin-top:.65rem;margin-bottom:.65rem;white-space:pre;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#212529;word-wrap:normal}.bd-content .highlight,div.qbo-container-layout>main>div .highlight{margin-right:-.75rem;margin-left:-.75rem}@media (min-width:576px){.bd-content .highlight,div.qbo-container-layout>main>div .highlight{margin-right:0;margin-left:0}}.bd-brand-logos{color:#7952b3}.bd-brand-logos .inverse{color:#fff;background-color:#7952b3}.algolia-docsearch-footer--logo{color:inherit}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:var(--qbo-background-color);background-clip:border-box;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:var(--qbo-border-radius)}.card>.list-group:last-child .list-group-item:last-child{border-top-right-radius:var(--qbo-border-radius)}.card-header,.qbo-card header,qbo-card header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#999;border-bottom:1px solid var(--qbo-border-color)}.card-header:first-child,.qbo-card header:first-child,qbo-card header:first-child{border-radius:var(--qbo-border-radius)}.card-header+.list-group .list-group-item:first-child,.qbo-card header+.list-group .list-group-item:first-child,qbo-card header+.list-group .list-group-item:first-child{border-top:0}.card-footer,.qbo-card footer,qbo-card footer{padding:.75rem 1.25rem;background-color:#999;border-top:1px solid var(--qbo-border-color)}.card-footer:last-child,.qbo-card footer:last-child,qbo-card footer:last-child{border-radius:var(--qbo-border-radius)}.modal-dialog,.qbo-modal dialog,.qbo-modal div.qbo-modal-dialog{width:100%;max-width:500px;margin:0 auto}.modal-header,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-header,.qbo-modal header{padding:16px;border-bottom:1px solid #ddd;display:flex;justify-content:space-between;align-items:center}.modal-body,.qbo-modal div,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-body{padding:16px;font-size:1rem;color:#555}.modal-footer,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content div.qbo-modal-footer,.qbo-modal footer{padding:16px;border-top:1px solid #ddd;display:flex;justify-content:flex-end;gap:10px}.modal-content,.qbo-modal div.qbo-modal-dialog div.qbo-modal-content{background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1);overflow:hidden;display:flex;flex-direction:column}.page-item,.qbo-paginate li{margin:0 5px}.page-link,.qbo-paginate a{display:block;padding:8px 16px;text-decoration:none;color:#007bff;border:1px solid #ddd;border-radius:4px;transition:background-color .3s,color .3s}.input-group,.qbo-paginate li.pageSize,div.qbo-input-group{display:flex;align-items:center;width:100%}.input-group-sm .input,.input-group-sm .input-group-text,.input-group-sm .qbo-paginate li.pageSize span,.input-group-sm span.qbo-input-group-text,.qbo-paginate li.pageSize .input-group-sm span,.qbo-paginate.small li.pageSize .input,.qbo-paginate.small li.pageSize .input-group-text,.qbo-paginate.small li.pageSize li.pageSize span,.qbo-paginate.small li.pageSize span.qbo-input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize li.pageSize span,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize span.qbo-input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}@media (max-width:576px){.input-group-sm .input,.input-group-sm .input-group-text,.input-group-sm .qbo-paginate li.pageSize span,.input-group-sm span.qbo-input-group-text,.qbo-paginate li.pageSize .input-group-sm span,.qbo-paginate.small li.pageSize .input,.qbo-paginate.small li.pageSize .input-group-text,.qbo-paginate.small li.pageSize li.pageSize span,.qbo-paginate.small li.pageSize span.qbo-input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize .input-group-text,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize li.pageSize span,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize span.qbo-input-group-text{font-size:.75rem;padding:.2rem .4rem}}.input-group-text,.qbo-paginate li.pageSize span,span.qbo-input-group-text{background-color:#f8f9fa;border:1px solid #ced4da;padding:.375rem .75rem;color:#495057;font-size:1rem;border-radius:.25rem 0;cursor:pointer;transition:background-color .3s,border-color .3s}.input-group-text:hover,.qbo-paginate li.pageSize span:hover,span.qbo-input-group-text:hover{background-color:#e9ecef;border-color:#adb5bd}.qbo-paginate li.pageSize,.w-auto{width:auto}.justify-content-center,.qbo-paginate.center{display:flex;justify-content:center}.justify-content-end,.qbo-paginate.right{display:flex;justify-content:flex-end}.pagination-sm .page-link,.pagination-sm .qbo-paginate a,.qbo-paginate .pagination-sm a,.qbo-paginate .qbo-paginate.small a,.qbo-paginate aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate a,.qbo-paginate.small .page-link,.qbo-paginate.small .qbo-paginate a,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate .page-link,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate .qbo-paginate a{padding:4px 8px;font-size:.875rem;border-radius:3px}.form-control-sm,.qbo-paginate.small li.pageSize input,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize input{padding:.25rem .5rem;font-size:.875rem;height:calc(1.5em + .75rem + 2px);line-height:1.5;border-radius:.2rem;border:1px solid #ced4da}.form-control-sm:focus,.qbo-paginate.small li.pageSize input:focus,aside.qbo-sidebar>nav>ul>li>div>ul.qbo-paginate li.pageSize input:focus{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-select-sm{padding:.25rem .5rem;font-size:.875rem;height:calc(1.5em + .75rem + 2px);border-radius:.2rem;border:1px solid #ced4da}.list-unstyled,aside.qbo-sidebar>nav>ul,aside.qbo-sidebar>nav>ul>li>div>ul{list-style:none;padding-left:0;margin:0}.mb-0,aside.qbo-sidebar>nav>ul{margin-bottom:0}.py-3,aside.qbo-sidebar>nav>ul{padding-top:1rem;padding-bottom:1rem}.pt-sm-1{padding-top:0}@media (min-width:576px){.pt-sm-1{padding-top:.25rem}}.pt-md-1,aside.qbo-sidebar>nav>ul{padding-top:0}@media (min-width:768px){.pt-md-1,aside.qbo-sidebar>nav>ul{padding-top:.25rem}}.pt-lg-1{padding-top:0}@media (min-width:992px){.pt-lg-1{padding-top:.25rem}}.pt-xl-1{padding-top:0}@media (min-width:1200px){.pt-xl-1{padding-top:.25rem}}.d-inline-flex,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{display:inline-flex}.align-items-center,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{display:flex;align-items:center}.rounded,aside.qbo-sidebar>nav>ul>li>button,aside.qbo-sidebar>nav>ul>li>div>ul>li>a{border-radius:.25rem}.fw-normal,aside.qbo-sidebar>nav>ul>li>div>ul{font-weight:400}.pb-1,aside.qbo-sidebar>nav>ul>li>div>ul{padding-bottom:.25rem}.container-fluid,div.qbo-container-layout,nav.qbo-breadcrumb>div,nav.qbo-mainmenu>div{width:100%;max-width:100%;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.breadcrumb,nav.qbo-breadcrumb,nav.qbo-breadcrumb>div>nav>ul{list-style:none;padding:0;margin:0;display:flex}.breadcrumb-item,nav.qbo-breadcrumb>div>nav>ul>li{font-size:1rem}.breadcrumb-item a,nav.qbo-breadcrumb>div>nav>ul>li a{text-decoration:none;color:#007bff;transition:color .3s}.breadcrumb-item a:hover,nav.qbo-breadcrumb>div>nav>ul>li a:hover{color:#0056b3}.breadcrumb-item.active,.qbo-paginate li.breadcrumb-item.active,nav.qbo-breadcrumb>div>nav>ul>li.active,nav.qbo-breadcrumb>div>nav>ul>li:last-child,qbo-icon.breadcrumb-item[selected]{color:#6c757d}.breadcrumb-item+.breadcrumb-item::before,nav.qbo-breadcrumb>div>nav>ul>.breadcrumb-item+li::before,nav.qbo-breadcrumb>div>nav>ul>li+.breadcrumb-item::before,nav.qbo-breadcrumb>div>nav>ul>li+li::before{content:"›";margin:0 8px;color:#6c757d}@media (min-width:992px){.navbar-expand-lg,nav.qbo-mainmenu{flex-flow:row nowrap;justify-content:flex-start}}.bg-dark,nav.qbo-mainmenu{background-color:#343a40}.navbar,nav.qbo-mainmenu{display:flex;flex-direction:column;background-color:#343a40;padding:10px}.navbar ul,nav.qbo-mainmenu ul{list-style:none;padding:0;margin:0}.navbar li,nav.qbo-mainmenu li{margin:5px 0}.navbar a,nav.qbo-mainmenu a{color:#fff;text-decoration:none;padding:8px}.navbar a:hover,nav.qbo-mainmenu a:hover{background-color:#575757}.navbar-collapse,nav.qbo-mainmenu>div>div{display:none;flex-direction:column}.navbar-collapse.show,.qbo-menu-context>menu.navbar-collapse,div.navbar-collapse.qbo-show,nav.qbo-mainmenu>div>div.qbo-show,nav.qbo-mainmenu>div>div.show,qbo-menu[type=context]>menu.navbar-collapse{display:flex}@media (min-width:992px){.navbar,nav.qbo-mainmenu{flex-direction:row}.navbar-collapse,nav.qbo-mainmenu>div>div{display:flex;flex-direction:row}.navbar li,nav.qbo-mainmenu li{margin:0 15px}}.dropdown,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown{position:relative;display:inline-block}.dropdown-toggle,button.qbo-primary-dropdown,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown>a{background-color:#007bff;color:#fff;padding:8px 16px;border:none;cursor:pointer;font-size:16px;border-radius:4px}.dropdown-toggle:hover,button.qbo-primary-dropdown:hover,nav.qbo-mainmenu>div>div>ul li.qbo-dropdown>a:hover{background-color:#0056b3}.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:10px}.col-md-2{grid-column:span 2}.col-md-3{grid-column:span 3}.col-md-4{grid-column:span 4}.col-md-6{grid-column:span 6}.col-md-12{grid-column:span 12}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}.mt-5{margin-top:3rem}.col-form-label-sm{font-size:.875rem;padding-top:.25rem;padding-bottom:.25rem;line-height:1.25}.form-select{display:inline-block;width:100%;padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.form-select option{padding:.375rem .75rem}.btn-light,.qbo-btn-light{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #ced4da;border-radius:.25rem;background-color:#f8f9fa;color:#495057;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-light:hover,.qbo-btn-light:hover{background-color:#e2e6ea;border-color:#adb5bd;color:#495057}.btn-light:focus,.qbo-btn-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.btn-light:disabled,.qbo-btn-light:disabled{background-color:#e9ecef;border-color:#ced4da;color:#6c757d;cursor:not-allowed}.btn-primary,button.qbo-primary,button.qbo-primary-dropdown{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #007bff;border-radius:.25rem;background-color:#007bff;color:#fff;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-primary:hover,button.qbo-primary-dropdown:hover,button.qbo-primary:hover{background-color:#0056b3;border-color:#0056b3}.btn-primary:focus,button.qbo-primary-dropdown:focus,button.qbo-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(38,143,255,.25)}.btn-primary:disabled,button.qbo-primary-dropdown:disabled,button.qbo-primary:disabled{background-color:silver;border-color:silver;color:#6c757d;cursor:not-allowed}.btn-secondary,button.qbo-secondary{display:inline-block;padding:.375rem .75rem;font-size:1rem;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid #6c757d;border-radius:.25rem;background-color:#6c757d;color:#fff;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.btn-secondary:hover,button.qbo-secondary:hover{background-color:#5a6268;border-color:#545b62}.btn-secondary:focus,button.qbo-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.25)}.btn-secondary:disabled,button.qbo-secondary:disabled{background-color:#e2e6ea;border-color:#ced4da;color:#6c757d;cursor:not-allowed}.dropdown-toggle-split,button.qbo-primary-dropdown{display:inline-flex;align-items:center;position:relative;border:1px solid #ced4da;border-radius:.25rem}.dropdown-menu,.qbo-menu-context>menu,.qbo-menu-context>ul,qbo-menu[type=context]>menu,qbo-menu[type=context]>ul{display:none;position:absolute;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;top:100%;left:0;min-width:160px;z-index:1}.dropdown-toggle-split.open .dropdown-menu,.dropdown-toggle-split.open .qbo-menu-context>menu,.dropdown-toggle-split.open .qbo-menu-context>ul,.dropdown-toggle-split.open qbo-menu[type=context]>menu,.dropdown-toggle-split.open qbo-menu[type=context]>ul,button.open.qbo-primary-dropdown .dropdown-menu,button.open.qbo-primary-dropdown .qbo-menu-context>menu,button.open.qbo-primary-dropdown .qbo-menu-context>ul,button.open.qbo-primary-dropdown qbo-menu[type=context]>menu,button.open.qbo-primary-dropdown qbo-menu[type=context]>ul{display:block}.dropdown-menu a,.qbo-menu-context>menu a,.qbo-menu-context>ul a,qbo-menu[type=context]>menu a,qbo-menu[type=context]>ul a{color:#495057;padding:.375rem .75rem;text-decoration:none;display:block}.dropdown-menu a:hover,.qbo-menu-context>menu a:hover,.qbo-menu-context>ul a:hover,qbo-menu[type=context]>menu a:hover,qbo-menu[type=context]>ul a:hover{background-color:#f1f1f1}.flex-column,.qbo-menu-side menu,qbo-menu[type=side] menu{display:flex;flex-direction:column}.qbo-card header,qbo-card header{font-weight:700;font-size:1.25rem;cursor:pointer;position:relative;padding-left:1.25rem;background-repeat:no-repeat;background-position:left center;background-size:1rem 1rem}.qbo-card.minimize>*,qbo-card.minimize>*{display:none}.qbo-card.minimize header,qbo-card.minimize header{display:block}.qbo-card.normal>.expanded,qbo-card.normal>.expanded{display:none}.qbo-card>h3.title,qbo-card>h3.title{font-size:1.5em}.qbo-card>p.detail,qbo-card>p.detail{margin-left:0}qbo-card[display=maximize] header{background-image:url("/ui/images/qbo-icons.svg#i-arrow-down-circle")}qbo-card[display=minimize] header{background-image:url("/ui/images/qbo-icons.svg#i-arrow-right-circle")}qbo-card[display=normal] header{position:relative;padding-left:1.25rem;background-image:url("/ui/images/qbo-icons.svg#i-arrow-down-right-circle");background-repeat:no-repeat;background-position:left center;background-size:1rem 1rem}.qbo-modal{display:block}.qbo-paginate{display:flex;padding-left:0;list-style:none;border-radius:var(---qbo-border-radius)}.qbo-paginate a{cursor:pointer}.qbo-paginate li.disabled a{color:inherit;cursor:default}.qbo-paginate li.active a,.qbo-paginate nav.qbo-breadcrumb>div>nav>ul>li:last-child a{color:inherit;cursor:default;font-weight:700}.qbo-paginate li.pageSize input{background-color:inherit;border:1px solid var(--qbo-border-color);border-radius:var(--qbo-border-radius);width:5em}.qbo-paginate li.pageSize span{background-color:inherit;border:0;padding-right:.5em}nav.qbo-breadcrumb{border-bottom:1px solid rgba(0,0,0,.15);box-shadow:inherit;margin-bottom:.5rem;padding-bottom:.25rem!important;padding-top:.5rem!important}.navbar-dark,nav.qbo-mainmenu{color:#fff}.navbar-dark a,nav.qbo-mainmenu a{color:#fff;text-decoration:none}.navbar-dark a:hover,nav.qbo-mainmenu a:hover{color:#ddd}.navbar-dark .navbar-brand,nav.qbo-mainmenu .navbar-brand,nav.qbo-mainmenu>div>a{color:#fff}.navbar-dark .navbar-toggler-icon,nav.qbo-mainmenu .navbar-toggler-icon,nav.qbo-mainmenu>div>button>span{background-color:#fff}nav.qbo-mainmenu>div>div>ul li.qbo-nav-item:not(.qbo-dropdown){padding-top:5px}button.qbo-primary-dropdown{border-top-right-radius:inherit!important;border-bottom-right-radius:inherit!important}button.expandcollapse{background-color:#eee;float:left;margin-right:.5em;margin-top:.1em;padding:.2em .3em 0 .3em}button.qbo-option{background-color:#eee;margin-right:0;padding:.2em .3em 0 .3em}button.qbo-option-active{background-color:#81181d;border-color:#81181d}button.qbo-option-active svg{filter:brightness(0) invert(1)}div.qbo-option-group{float:right}div.qbo-card-buttons{margin-bottom:.5em}div.qbo-card-buttons>button{background-color:var(--qbo-background-color);border:1px solid var(--qbo-background-color);margin-right:0}div.qbo-card-buttons>button:hover{background-color:#eee;border:1px solid #eee}div.qbo-card-buttons>button.active{background-color:#81181d;border:1px solid #81181d;color:#fff}div.qbo-card-buttons>button.active svg{filter:brightness(0) invert(1)}.btn-close{background-color:#eee;margin-right:inherit;padding:.2em .75em .25em .75em}.qbo-icon::before,[class*=" qbo-icon-"]::before,[class^=qbo-icon-]::before{display:inline-block;font-family:bootstrap-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;line-height:1;vertical-align:-.125em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}span.qbo-input-group-text{margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.qbo-float-end{float:right}.qbo-pointer{cursor:pointer}qbo-resize{position:relative;display:block}qbo-resize svg{justify-content:center;align-items:center}qbo-resize:hover{background-color:#d3d3d3}qbo-resize.horizontal{width:5px;cursor:col-resize;padding-left:2px;padding-right:3px}qbo-resize.vertical{width:100%;height:5px;cursor:row-resize}.qbo-resize{flex:0 0 auto;width:auto}.qbo-menu-context,qbo-menu[type=context]{position:fixed;z-index:2}.qbo-menu-side,qbo-menu[type=side]{width:auto;padding:0 0;transition:width .1s;cursor:ew-resize;border-left:1px solid var(--bs-dark-border-subtle);border-right:1px solid var(--bs-dark-border-subtle)}.qbo-menu-side span,qbo-menu[type=side] span{display:none}.qbo-menu-side.expanded span,qbo-menu[type=side].expanded span{display:inline}tr.qbo-select-on{background-color:#d3d3d3}tr.qbo-select-on td{background-color:#d3d3d3}li.qbo-select-on{background-color:#d3d3d3}table{border:1px solid var(--qbo-border-color);border-collapse:initial!important;border-radius:4px;border-spacing:0px;margin-bottom:0;width:100%}table th{background:linear-gradient(to bottom,#d9d9d9,#fff);background-color:initial;color:#595959;padding:var(--qbo-table-padding);position:sticky;text-align:inherit;top:0}table td{font-size:.9rem;padding:var(--qbo-table-padding);vertical-align:top}table td span.bodyText{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:750px}table tbody tr:not(:last-child):hover{background:linear-gradient(to bottom,#fff,#f2f2f2)}table tbody tr:last-child:hover{background:linear-gradient(to bottom,#f2f2f2,#fff)}table tbody tr:not(:last-child) td{border-bottom:1px solid #f2f2f2}table tbody tr.qbo-filter td:last-child{padding-right:.5em}table tbody tr.qbo-filter td input{border:1px solid #81181d;border-radius:4px;padding-inline:initial;text-indent:.5em;width:100%}tfoot{font-size:.8rem;color:var(--qbo-table-footer-color);background-color:var(--qbo-table-footer-background);border:1px solid var(--qbo-border-color)}tfoot td,tfoot th{padding:calc(var(--qbo-table-padding)/ 2)}tfoot td{background:linear-gradient(to bottom,#fff,#d9d9d9);color:#595959;padding:.375rem}tfoot select{background:initial;border:0}.qbo-nowrap td,.qbo-nowrap th{white-space:nowrap;text-overflow:ellipsis}.qbo-truncate{max-width:0;overflow:hidden}details{padding-left:3px}.date,.numeric{text-align:right}.sort{cursor:pointer}.asc::after,.desc::after{display:inline-block;margin-left:.3rem;width:.7rem;height:.7rem;content:"";background-size:contain;background-repeat:no-repeat}.asc::after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7 14l5-5 5 5z"/></svg>')}.desc::after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7 10l5 5 5-5z"/></svg>')}.qbo-tabs{border-bottom:1px solid var(--qbo-border-color);display:flex;list-style:none;margin-block-start:0.375em;margin-bottom:.1em;padding-left:0}.qbo-tabs li{border:1px solid transparent;border-top-left-radius:var(--qbo-border-radius);border-top-right-radius:var(--qbo-border-radius);color:var(--qbo-h3-card-color);cursor:pointer;font-size:1.25rem;font-weight:500;margin-bottom:-1px;max-width:var(--qbo-tab-max-width);overflow:hidden;padding:.5rem 1rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.qbo-tabs li:hover{border-color:#81181d #81181d #fff;color:#81181d}.qbo-tabs li.active,.qbo-tabs nav.qbo-breadcrumb>div>nav>ul>li:last-child{border-color:#999 #999 #fff}.qbo-tabs li:not(:last-child){margin-right:.5rem}.qbo-row-viewer{padding-top:var(--qbo-padding-vertical)}.collapse:not(.show):not(div.qbo-show),aside.qbo-sidebar>nav:not(.show):not(div.qbo-show),aside.qbo-sidebar>nav>ul>li>div:not(.show):not(div.qbo-show),nav.qbo-mainmenu>div>div:not(.show):not(div.qbo-show){display:inherit!important}.collapse div.qbo-row-viewer,.collapse>div.qbo-row,.collapse>h3.title>div.qbo-option-group,aside.qbo-sidebar>nav div.qbo-row-viewer,aside.qbo-sidebar>nav>div.qbo-row,aside.qbo-sidebar>nav>h3.title>div.qbo-option-group,aside.qbo-sidebar>nav>ul>li>div>div.qbo-row,aside.qbo-sidebar>nav>ul>li>div>h3.title>div.qbo-option-group,nav.qbo-mainmenu>div>div div.qbo-row-viewer,nav.qbo-mainmenu>div>div>div.qbo-row,nav.qbo-mainmenu>div>div>h3.title>div.qbo-option-group{display:none}div.qbo-row-container{margin:.5em}div.qbo-row-container>div.qbo-row,div.qbo-row-container>div.qbo-row-viewer{margin-bottom:.5em}span.green{background-color:#d4efdf;border:1px solid #d4efdf;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}span.red{background-color:#f2d7d5;border:1px solid #f2d7d5;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}span.yellow{background-color:#fcf3cf;border:1px solid #fcf3cf;border-radius:4px;display:flex;min-height:1.125em;padding:.25em .5em .25em .5em}.progress-bar{position:absolute;top:0;left:0;width:100%;opacity:.1}.progress-bar.qbo-success{display:none}.progress-bar.qbo-queued{display:none}.qbo-module-viewer{height:100%;box-shadow:initial;padding:.375rem .75rem .375rem .75rem}.qbo-module-viewer h2{color:#595959;font-weight:400;margin-bottom:.25em;margin-top:0}.qbo-module-viewer h2 .btn-close{float:right}`;var fe=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},be=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ge=class extends ee{constructor(){super(...arguments),this._open=!1,this.target="",this.parent=null,this.menu=null,this.showContextMenu=t=>{t.preventDefault(),this._open=!0,this._updateMenuPosition(t)}}static{this.styles=[me]}connectedCallback(){super.connectedCallback(),this.getContextTarget(),document.addEventListener("click",this._handleClickOutside.bind(this))}getContextTarget(){this.target?this.parent=this.closest(this.target)??(()=>{const t=this.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.querySelector(this.target):null})()??document.querySelector(this.target)??document:this.parent=this.parentElement,this.parent.addEventListener("contextmenu",this.showContextMenu)}disconnectedCallback(){this.parent&&this.parent.removeEventListener("contextmenu",this.showContextMenu),document.removeEventListener("click",this._handleClickOutside.bind(this))}_handleClickOutside(t){!this._open||this.shadowRoot?.contains(t.target)||this.contains(t.target)||(this._open=!1)}async _updateMenuPosition(t){t.preventDefault(),this._open=!0,await this.updateComplete;const e=window.innerWidth,o=window.innerHeight,r=this.offsetWidth||0,i=this.offsetHeight||0;let n=t.clientX,a=t.clientY;n+r>e&&(n=e-r),a+i>o&&(a=o-i),console.log(`mouse event: ${t.clientX} x ${t.clientY} ; ${n} x ${a}`),this.style.left=n+"px",this.style.top=a+"px"}_handleClose(){this._open=!1}render(){return zt`${this._open?zt`<slot></slot>`:""}`}};fe([se(),be("design:type",Object)],ge.prototype,"_open",void 0),fe([ae({type:String}),be("design:type",Object)],ge.prototype,"target",void 0),ge=fe([re("qbo-contextmenu")],ge);var ve=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Oe=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const xe=(t=>{class e extends t{constructor(...t){super(...t),this.apiEndpoint=null,this.method="GET",this.error=!1,this.jsonData={},this.accept="application/json",this.headerTag='script[name="headers"]',this.html=null,this.fetchOnLoad=!0,this.headers=null,this.payload=null}async connectedCallback(){super.connectedCallback(),this.fetchOnLoad&&(this.headers=this.headers??this.getHeaders(),this.payload=this.payload??this.getPayload(this.headers),await this.fetchData(this.headers,this.payload))}getHeaders(){const t=this.querySelector(this.headerTag);let e={Accept:this.accept};if(t&&null!==t.textContent)try{e=JSON.parse(t.textContent)}catch(t){console.error("Error parsing header JSON:",t)}return e}getPayload(t){const e=this.querySelector('script[name="payload"]');let o=null;if(e&&null!==e.textContent)try{o=JSON.parse(e.textContent),o&&(t["Content-Type"]="application/json")}catch(t){console.error("Error parsing payload JSON:",t)}return o}async fetchData(t,e){if(null!==this.apiEndpoint){null!==e&&(this.method="POST");try{const t=A(this.apiEndpoint),o=await t.fetch(null,e);"application/json"===this.accept?(this.jsonData=o,this.html=null):(this.html=o,this.jsonData=null),this.dispatchEvent(new CustomEvent("qbo-updated",{bubbles:!0,composed:!0}))}catch(t){this.error=!0,dispatchEvent(new CustomEvent("qbo-error",{detail:t}))}}}}return ve([ae({type:URL}),Oe("design:type",Object)],e.prototype,"apiEndpoint",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"method",void 0),ve([ae({type:Boolean}),Oe("design:type",Object)],e.prototype,"error",void 0),ve([ae({type:Object}),Oe("design:type",Object)],e.prototype,"jsonData",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"accept",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"headerTag",void 0),ve([ae({type:String}),Oe("design:type",Object)],e.prototype,"html",void 0),ve([ae({type:Boolean}),Oe("design:type",Object)],e.prototype,"fetchOnLoad",void 0),ve([ae({attribute:!1}),Oe("design:type",Object)],e.prototype,"headers",void 0),ve([ae({attribute:!1}),Oe("design:type",Object)],e.prototype,"payload",void 0),e})(ee);var ye=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},we=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ke=class extends xe{constructor(){super(...arguments),this.listId=null,this.min=3,this.options=[],this.renderInHost=!0,this.text=null,this.value=null,this.fetchOnLoad=!1,this.endpoint=null,this.headers=null,this.payload={},this.targets=null}connectedCallback(){super.connectedCallback(),this.targets=document.querySelectorAll(`input[list=${this.listId}]`);const t=this;this.targets.forEach((function(e){e.addEventListener("keyup",t.buildDataList.bind(t)),e.hasAttribute("data-for")&&e.addEventListener("change",t.setOutputValue.bind(t))})),this.endpoint=this.apiEndpoint.toString(),this.headers=this.getHeaders(),this.payload=this.getPayload(this.headers)}disconnectedCallback(){const t=this;this.targets?.forEach((function(e){e.removeEventListener("keyup",t.buildDataList.bind(t)),e.hasAttribute("data-for")&&e.removeEventListener("change",t.setOutputValue.bind(t))})),super.disconnectedCallback()}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}async buildDataList(t){const e=t.target;e instanceof HTMLInputElement&&e.value.length>=this.min&&(null!=this.endpoint&&(this.apiEndpoint=new URL(this.endpoint.replace("{value}",`${e.value}`),this.baseURI)),await this.fetchData(this.headers,this.payload))}setOutputValue(t){const e=t.target;let o=null;if(e.hasAttribute("data-for")){const t=e.getAttribute("data-for");o=document.getElementById(t)||e.querySelector(t)||e.parentElement?.querySelector(t)||document.getElementsByName(t)[0]}if(e instanceof HTMLInputElement&&o instanceof HTMLInputElement){const t=this.text,r=this.options?.filter((function(o){return o[t]==e.value}));e.value=1==r?.length?r[0][`${this.text}`]:"",o.value=1==r?.length?r[0][`${this.value}`]:""}}render(){return this.options=R(this.jsonData),this.options&&0!==this.options.length?(null!=this.options&&(this.value??=Object.keys(this.options[0])[0],this.text??=Object.keys(this.options[0])[1]??this.value),zt`
|
|
3
3
|
<datalist id=${this.listId}>
|
|
4
4
|
${this.options.map((t=>zt`<option value="${t[this.text]}" data-value="${t[this.value]}"/>`))}
|
|
5
|
-
</datalist>`):zt``}};
|
|
5
|
+
</datalist>`):zt``}};ye([ae({type:String}),we("design:type",Object)],ke.prototype,"listId",void 0),ye([ae({type:Number}),we("design:type",Object)],ke.prototype,"min",void 0),ye([ae({type:Array}),we("design:type",Object)],ke.prototype,"options",void 0),ye([ae({type:Boolean}),we("design:type",Object)],ke.prototype,"renderInHost",void 0),ye([ae({type:String}),we("design:type",Object)],ke.prototype,"text",void 0),ye([ae({type:String}),we("design:type",Object)],ke.prototype,"value",void 0),ye([ae({type:Boolean}),we("design:type",Object)],ke.prototype,"fetchOnLoad",void 0),ke=ye([re("qbo-datalist")],ke);var qe=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Se=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Qe=class extends xe{constructor(){super(...arguments),this.open=!1,this.loading=!1,this.renderInHost=!1}static{this.styles=[K`
|
|
6
6
|
/* Add any custom styles here */
|
|
7
7
|
.foo { color: red; }
|
|
8
8
|
`]}async connectedCallback(){super.connectedCallback()}render(){return zt`<iframe src='sample.pdf' width='100%' height='800px' frameborder='0'></iframe>`}};qe([ae({type:Boolean}),Se("design:type",Object)],Qe.prototype,"open",void 0),qe([ae({type:Boolean}),Se("design:type",Object)],Qe.prototype,"loading",void 0),qe([ae({type:Boolean}),Se("design:type",Object)],Qe.prototype,"renderInHost",void 0),Qe=qe([re("qbo-docviewer")],Qe);var $e=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Pe=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Ce=new Map;Ce.set("defaultLayout",(t=>zt`<div slot="content">
|
|
@@ -89,7 +89,7 @@ ${Array.from(Je.keys()).map((e=>zt`<div class="col-3">
|
|
|
89
89
|
</li>
|
|
90
90
|
</div>
|
|
91
91
|
`))}
|
|
92
|
-
</div>`}renderIcon(t){null!=t.icon&&void 0!==t.icon||(console.warn("qbo-icon: icon attribute is required"),t.icon="warning");const e=Je.has(t.icon)?Je.get(t.icon):t.icon;return zt`<svg width="${t.width}" height="${t.width}" fill="${t.fill}" ?class=${t.getAttribute("class")}><use href="${t.sprite??Fe.spriteUrl}#${e}"></use></svg>`}render(){switch(this.type){case"icon":case"button":case"toggle":default:return this.renderIcon(this);case"standard":return this.renderStandard(this);case"all":return zt`${Ge(this.renderAll(this),zt`Loading...`)}`}}};He([ae(),Ke("design:type",String)],to.prototype,"type",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"sprite",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"icon",void 0),He([ae(),Ke("design:type",String)],to.prototype,"height",void 0),He([ae(),Ke("design:type",String)],to.prototype,"width",void 0),He([ae(),Ke("design:type",String)],to.prototype,"viewbox",void 0),He([ae(),Ke("design:type",String)],to.prototype,"fill",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"backgroundColor",void 0),He([ae(),Ke("design:type",Boolean)],to.prototype,"disabled",void 0),He([ae({type:Boolean,reflect:!0}),Ke("design:type",Object)],to.prototype,"renderInHost",void 0),He([ae({type:Boolean,reflect:!0}),Ke("design:type",Boolean)],to.prototype,"selected",void 0),to=Fe=He([re("qbo-icon")],to);const eo=Math.min,oo=Math.max,ro=Math.round,io=Math.floor,no=t=>({x:t,y:t}),ao={left:"right",right:"left",bottom:"top",top:"bottom"},so={start:"end",end:"start"};function lo(t,e,o){return oo(t,eo(e,o))}function co(t,e){return"function"==typeof t?t(e):t}function ho(t){return t.split("-")[0]}function po(t){return t.split("-")[1]}function uo(t){return"x"===t?"y":"x"}function mo(t){return"y"===t?"height":"width"}function fo(t){return["top","bottom"].includes(ho(t))?"y":"x"}function bo(t){return uo(fo(t))}function go(t){return t.replace(/start|end/g,(t=>so[t]))}function vo(t){return t.replace(/left|right|bottom|top/g,(t=>ao[t]))}function Oo(t){const{x:e,y:o,width:r,height:i}=t;return{width:r,height:i,top:o,left:e,right:e+r,bottom:o+i,x:e,y:o}}function yo(t,e,o){let{reference:r,floating:i}=t;const n=fo(e),a=bo(e),s=mo(a),l=ho(e),d="y"===n,c=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let u;switch(l){case"top":u={x:c,y:r.y-i.height};break;case"bottom":u={x:c,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:h};break;case"left":u={x:r.x-i.width,y:h};break;default:u={x:r.x,y:r.y}}switch(po(e)){case"start":u[a]-=p*(o&&d?-1:1);break;case"end":u[a]+=p*(o&&d?-1:1)}return u}async function xo(t,e){var o;void 0===e&&(e={});const{x:r,y:i,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:u=0}=co(e,t),m=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),f=s[p?"floating"===h?"reference":"floating":h],b=Oo(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(f)))||o?f:f.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===h?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),O=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},y=Oo(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-y.top+m.top)/O.y,bottom:(y.bottom-b.bottom+m.bottom)/O.y,left:(b.left-y.left+m.left)/O.x,right:(y.right-b.right+m.right)/O.x}}function wo(){return"undefined"!=typeof window}function ko(t){return Qo(t)?(t.nodeName||"").toLowerCase():"#document"}function qo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function So(t){var e;return null==(e=(Qo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Qo(t){return!!wo()&&(t instanceof Node||t instanceof qo(t).Node)}function $o(t){return!!wo()&&(t instanceof Element||t instanceof qo(t).Element)}function Po(t){return!!wo()&&(t instanceof HTMLElement||t instanceof qo(t).HTMLElement)}function Co(t){return!(!wo()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof qo(t).ShadowRoot)}function Ro(t){const{overflow:e,overflowX:o,overflowY:r,display:i}=jo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+o)&&!["inline","contents"].includes(i)}function Zo(t){return["table","td","th"].includes(ko(t))}function To(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Ao(t){const e=Mo(),o=$o(t)?jo(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!o[t]&&"none"!==o[t]))||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Mo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(ko(t))}function jo(t){return qo(t).getComputedStyle(t)}function zo(t){return $o(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Xo(t){if("html"===ko(t))return t;const e=t.assignedSlot||t.parentNode||Co(t)&&t.host||So(t);return Co(e)?e.host:e}function _o(t){const e=Xo(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Po(e)&&Ro(e)?e:_o(e)}function Do(t,e,o){var r;void 0===e&&(e=[]),void 0===o&&(o=!0);const i=_o(t),n=i===(null==(r=t.ownerDocument)?void 0:r.body),a=qo(i);if(n){const t=Uo(a);return e.concat(a,a.visualViewport||[],Ro(i)?i:[],t&&o?Do(t):[])}return e.concat(i,Do(i,[],o))}function Uo(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Vo(t){const e=jo(t);let o=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Po(t),n=i?t.offsetWidth:o,a=i?t.offsetHeight:r,s=ro(o)!==n||ro(r)!==a;return s&&(o=n,r=a),{width:o,height:r,$:s}}function Lo(t){return $o(t)?t:t.contextElement}function Wo(t){const e=Lo(t);if(!Po(e))return no(1);const o=e.getBoundingClientRect(),{width:r,height:i,$:n}=Vo(e);let a=(n?ro(o.width):o.width)/r,s=(n?ro(o.height):o.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Bo=no(0);function Yo(t){const e=qo(t);return Mo()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Bo}function Io(t,e,o,r){void 0===e&&(e=!1),void 0===o&&(o=!1);const i=t.getBoundingClientRect(),n=Lo(t);let a=no(1);e&&(r?$o(r)&&(a=Wo(r)):a=Wo(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==qo(t))&&e}(n,o,r)?Yo(n):no(0);let l=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,c=i.width/a.x,h=i.height/a.y;if(n){const t=qo(n),e=r&&$o(r)?qo(r):r;let o=t,i=Uo(o);for(;i&&r&&e!==o;){const t=Wo(i),e=i.getBoundingClientRect(),r=jo(i),n=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,d*=t.y,c*=t.x,h*=t.y,l+=n,d+=a,o=qo(i),i=Uo(o)}}return Oo({width:c,height:h,x:l,y:d})}function No(t,e){const o=zo(t).scrollLeft;return e?e.left+o:Io(So(t)).left+o}function Go(t,e,o){void 0===o&&(o=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(o?0:No(t,r)),y:r.top+e.scrollTop}}function Fo(t,e,o){let r;if("viewport"===e)r=function(t,e){const o=qo(t),r=So(t),i=o.visualViewport;let n=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){n=i.width,a=i.height;const t=Mo();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)r=function(t){const e=So(t),o=zo(t),r=t.ownerDocument.body,i=oo(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=oo(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+No(t);const s=-o.scrollTop;return"rtl"===jo(r).direction&&(a+=oo(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:a,y:s}}(So(t));else if($o(e))r=function(t,e){const o=Io(t,!0,"fixed"===e),r=o.top+t.clientTop,i=o.left+t.clientLeft,n=Po(t)?Wo(t):no(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:i*n.x,y:r*n.y}}(e,o);else{const o=Yo(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Oo(r)}function Ho(t,e){const o=Xo(t);return!(o===e||!$o(o)||Eo(o))&&("fixed"===jo(o).position||Ho(o,e))}function Ko(t,e,o){const r=Po(e),i=So(e),n="fixed"===o,a=Io(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=no(0);if(r||!r&&!n)if(("body"!==ko(e)||Ro(i))&&(s=zo(e)),r){const t=Io(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=No(i));const d=!i||r||n?no(0):Go(i,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Jo(t){return"static"===jo(t).position}function tr(t,e){if(!Po(t)||"fixed"===jo(t).position)return null;if(e)return e(t);let o=t.offsetParent;return So(t)===o&&(o=o.ownerDocument.body),o}function er(t,e){const o=qo(t);if(To(t))return o;if(!Po(t)){let e=Xo(t);for(;e&&!Eo(e);){if($o(e)&&!Jo(e))return e;e=Xo(e)}return o}let r=tr(t,e);for(;r&&Zo(r)&&Jo(r);)r=tr(r,e);return r&&Eo(r)&&Jo(r)&&!Ao(r)?o:r||function(t){let e=Xo(t);for(;Po(e)&&!Eo(e);){if(Ao(e))return e;if(To(e))return null;e=Xo(e)}return null}(t)||o}const or={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:r,strategy:i}=t;const n="fixed"===i,a=So(r),s=!!e&&To(e.floating);if(r===a||s&&n)return o;let l={scrollLeft:0,scrollTop:0},d=no(1);const c=no(0),h=Po(r);if((h||!h&&!n)&&(("body"!==ko(r)||Ro(a))&&(l=zo(r)),Po(r))){const t=Io(r);d=Wo(r),c.x=t.x+r.clientLeft,c.y=t.y+r.clientTop}const p=!a||h||n?no(0):Go(a,l,!0);return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:o.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:So,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:i}=t;const n="clippingAncestors"===o?To(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let r=Do(t,[],!1).filter((t=>$o(t)&&"body"!==ko(t))),i=null;const n="fixed"===jo(t).position;let a=n?Xo(t):t;for(;$o(a)&&!Eo(a);){const e=jo(a),o=Ao(a);o||"fixed"!==e.position||(i=null),(n?!o&&!i:!o&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||Ro(a)&&!o&&Ho(t,a))?r=r.filter((t=>t!==a)):i=e,a=Xo(a)}return e.set(t,r),r}(e,this._c):[].concat(o),a=[...n,r],s=a[0],l=a.reduce(((t,o)=>{const r=Fo(e,o,i);return t.top=oo(r.top,t.top),t.right=eo(r.right,t.right),t.bottom=eo(r.bottom,t.bottom),t.left=oo(r.left,t.left),t}),Fo(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:er,getElementRects:async function(t){const e=this.getOffsetParent||er,o=this.getDimensions,r=await o(t.floating);return{reference:Ko(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Vo(t);return{width:e,height:o}},getScale:Wo,isElement:$o,isRTL:function(t){return"rtl"===jo(t).direction}};function rr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const ir=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:r,placement:i}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=co(t,e),d={x:o,y:r},c=await xo(e,l),h=fo(ho(i)),p=uo(h);let u=d[p],m=d[h];if(n){const t="y"===p?"bottom":"right";u=lo(u+c["y"===p?"top":"left"],u,u-c[t])}if(a){const t="y"===h?"bottom":"right";m=lo(m+c["y"===h?"top":"left"],m,m-c[t])}const f=s.fn({...e,[p]:u,[h]:m});return{...f,data:{x:f.x-o,y:f.y-r,enabled:{[p]:n,[h]:a}}}}}},nr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,r;const{placement:i,middlewareData:n,rects:a,initialPlacement:s,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=co(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const g=ho(i),v=fo(s),O=ho(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=p||(O||!f?[vo(s)]:function(t){const e=vo(t);return[go(t),e,go(e)]}(s)),w="none"!==m;!p&&w&&x.push(...function(t,e,o,r){const i=po(t);let n=function(t,e,o){const r=["left","right"],i=["right","left"],n=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:r:e?r:i;case"left":case"right":return e?n:a;default:return[]}}(ho(t),"start"===o,r);return i&&(n=n.map((t=>t+"-"+i)),e&&(n=n.concat(n.map(go)))),n}(s,f,m,y));const k=[s,...x],q=await xo(e,b),S=[];let Q=(null==(r=n.flip)?void 0:r.overflows)||[];if(c&&S.push(q[g]),h){const t=function(t,e,o){void 0===o&&(o=!1);const r=po(t),i=bo(t),n=mo(i);let a="x"===i?r===(o?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=vo(a)),[a,vo(a)]}(i,a,y);S.push(q[t[0]],q[t[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every((t=>t<=0))){var $,P;const t=((null==($=n.flip)?void 0:$.index)||0)+1,e=k[t];if(e)return{data:{index:t,overflows:Q},reset:{placement:e}};let o=null==(P=Q.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:P.placement;if(!o)switch(u){case"bestFit":{var C;const t=null==(C=Q.filter((t=>{if(w){const e=fo(t.placement);return e===v||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(o=t);break}case"initialPlacement":o=s}if(i!==o)return{reset:{placement:o}}}return{}}}},ar=(t,e,o)=>{const r=new Map,i={platform:or,...o},n={...i.platform,_c:r};return(async(t,e,o)=>{const{placement:r="bottom",strategy:i="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:h}=yo(d,r,l),p=r,u={},m=0;for(let o=0;o<s.length;o++){const{name:n,fn:f}=s[o],{x:b,y:g,data:v,reset:O}=await f({x:c,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});c=null!=b?b:c,h=null!=g?g:h,u={...u,[n]:{...u[n],...v}},O&&m<=50&&(m++,"object"==typeof O&&(O.placement&&(p=O.placement),O.rects&&(d=!0===O.rects?await a.getElementRects({reference:t,floating:e,strategy:i}):O.rects),({x:c,y:h}=yo(d,p,l))),o=-1)}return{x:c,y:h,placement:p,strategy:i,middlewareData:u}})(t,e,{...i,platform:n})};var sr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},lr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class dr extends ee{constructor(){super(...arguments),this.placement="bottom-start",this.type="dropdown",this.target=null,this.isOpen=!1,this.middleware=[nr(),ir()],this.handleMenuOpen=t=>{t.preventDefault(),t.stopPropagation(),t.detail.menu!==this&&this.isOpen&&this.closeMenu()},this.handleOutsideClick=t=>{t.target,t.composedPath().includes(this)||this.closeMenu()},this.showContextMenu=t=>{const e=t;t.preventDefault(),t.stopPropagation(),this.isOpen=!0,this.menuContainer.classList.toggle("open",this.isOpen);const o={getBoundingClientRect:()=>({x:e.clientX,y:e.clientY,width:0,height:0,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY})};this.updateMenuPosition(o)},this.toggleMenu=t=>{t.target;const e=t.composedPath();e.includes(this.triggerButton)&&!e.includes(this.menuContainer)&&(this.isOpen=!this.isOpen,this.menuContainer.classList.toggle("open",this.isOpen),this.isOpen&&(this.updateMenuPosition(this.triggerButton),document.dispatchEvent(new CustomEvent("qbo-menu-open",{bubbles:!0,composed:!0,detail:{menu:this}}))))}}static{this.styles=K``}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),"context"===this.type?this.triggerButton.removeEventListener("contextmenu",this.showContextMenu):this.triggerButton.removeEventListener("click",this.toggleMenu)}firstUpdated(t){super.firstUpdated(t),this.triggerButton=this.querySelector("*[data-trigger]")||this.querySelector("button")||this.parentElement,this.menuContainer=this.querySelector("*[data-content]")||this.querySelector("aside")||this.querySelector("menu"),"context"===this.type?(this.target&&(this.triggerButton=this.closest(this.target)||(()=>{const t=this.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.querySelector(this.target):null})()||document.querySelector(this.target)||document),this.triggerButton.addEventListener("contextmenu",this.showContextMenu)):null!=this.triggerButton&&this.triggerButton.addEventListener("click",this.toggleMenu)}closeMenu(){this.isOpen=!1,this.menuContainer.classList.remove("open")}async updateMenuPosition(t){console.log(t,typeof t);const{x:e,y:o}=await ar(t,this.menuContainer,{placement:this.placement,middleware:this.middleware,strategy:"fixed"});Object.assign(this.menuContainer.style,{left:`${e}px`,top:`${o}px`})}render(){return zt`<slot></slot>`}}sr([ae({type:String}),lr("design:type",String)],dr.prototype,"placement",void 0),sr([ae(),lr("design:type",String)],dr.prototype,"type",void 0),sr([ae(),lr("design:type",Object)],dr.prototype,"target",void 0),sr([se(),lr("design:type",Object)],dr.prototype,"isOpen",void 0),customElements.get("qbo-menu")||customElements.define("qbo-menu",dr);var cr,hr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},pr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ur=class extends ee{constructor(){super(...arguments),this.renderInHost=!0,this.continuous=!1,this.interimResults=!1,this.maxAlternatives=1,this.for="input",this.class="input-group-text bi bi-headset",this.activeClass="bg-primary-subtle",this._recognition=null,this.target=null,this.listening=!1}static{cr=this}static{this.activeInstance=null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.listen);const t=new(window.SpeechRecognition||window.webkitSpeechRecognition);t.continuous=this.continuous,t.interimResults=this.interimResults,t.maxAlternatives=this.maxAlternatives,t.onresult=t=>{this.onResult(t)},t.onspeechend=t=>{this.stop(t)},t.onerror=t=>{this.error(t)},this._recognition=t,this.target=document.getElementById(this.for)||this.querySelector(this.for)||this.parentElement?.querySelector(this.for),null==this.target&&console.log(`qbo-microphone: no target found for ${this.for}`)}disconnectedCallback(){this.removeEventListener("click",this.listen),super.disconnectedCallback()}onResult(t){const e=t.results[t.results.length-1][0].transcript;if(console.log("Result: "+e),null==this.target)return;const o=this.target;if(o instanceof HTMLInputElement)"radio"===o.type?o.value===e&&(o.checked=!0):this.continuous?o.value+=e:o.value=e;else if(o instanceof HTMLTextAreaElement)this.continuous?o.value+=e:o.value=e;else if(o instanceof HTMLSelectElement)for(let t=0;t<o.options.length;t++)if(o.options[t].value===e||o.options[t].text===e){o.selectedIndex=t;break}}listen(t){this.listening?this.stop(t):this.start()}start(){this.listening=!0,cr.activeInstance=this,this.activeClass&&this.classList.add(this.activeClass),console.log("listening"),this._recognition.start()}stop(t){this.listening=!1,cr.activeInstance=null,this.activeClass&&this.classList.remove(this.activeClass),console.log("stopped listening"),this._recognition.stop(),this._recognition.abort()}error(t){console.log("Error during speech recognition:",t)}render(){return zt`<slot></slot>`}};hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"renderInHost",void 0),hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"continuous",void 0),hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"interimResults",void 0),hr([ae({type:Number}),pr("design:type",Object)],ur.prototype,"maxAlternatives",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"for",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"class",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"activeClass",void 0),ur=cr=hr([re("qbo-microphone")],ur);var mr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},fr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let br=class extends ee{constructor(){super(...arguments),this.display=25,this.start=0,this.count=0,this.pageLimit=10,this.currentPage=1,this.rollingView=!0,this.editSize=!0,this.displayCountText="Results per page:"}get maxPage(){return Math.floor(this.count/this.display)+(this.count%this.display==0?0:1)}static{this.styles=[me,K``]}goToPage(t){t<1?t=1:t>this.maxPage&&(t=this.maxPage),this.currentPage=t,this.dispatchEvent(new CustomEvent("change",{detail:{start:(t-1)*this.display,display:this.display,page:t},bubbles:!0,composed:!0}))}renderPage(t){return zt`<li class="${this.currentPage===t?"active":""}">
|
|
92
|
+
</div>`}renderIcon(t){null!=t.icon&&void 0!==t.icon||(console.warn("qbo-icon: icon attribute is required"),t.icon="warning");const e=Je.has(t.icon)?Je.get(t.icon):t.icon;return zt`<svg width="${t.width}" height="${t.width}" fill="${t.fill}" ?class=${t.getAttribute("class")}><use href="${t.sprite??Fe.spriteUrl}#${e}"></use></svg>`}render(){switch(this.type){case"icon":case"button":case"toggle":default:return this.renderIcon(this);case"standard":return this.renderStandard(this);case"all":return zt`${Ge(this.renderAll(this),zt`Loading...`)}`}}};He([ae(),Ke("design:type",String)],to.prototype,"type",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"sprite",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"icon",void 0),He([ae(),Ke("design:type",String)],to.prototype,"height",void 0),He([ae(),Ke("design:type",String)],to.prototype,"width",void 0),He([ae(),Ke("design:type",String)],to.prototype,"viewbox",void 0),He([ae(),Ke("design:type",String)],to.prototype,"fill",void 0),He([ae(),Ke("design:type",Object)],to.prototype,"backgroundColor",void 0),He([ae(),Ke("design:type",Boolean)],to.prototype,"disabled",void 0),He([ae({type:Boolean,reflect:!0}),Ke("design:type",Object)],to.prototype,"renderInHost",void 0),He([ae({type:Boolean,reflect:!0}),Ke("design:type",Boolean)],to.prototype,"selected",void 0),to=Fe=He([re("qbo-icon")],to);const eo=Math.min,oo=Math.max,ro=Math.round,io=Math.floor,no=t=>({x:t,y:t}),ao={left:"right",right:"left",bottom:"top",top:"bottom"},so={start:"end",end:"start"};function lo(t,e,o){return oo(t,eo(e,o))}function co(t,e){return"function"==typeof t?t(e):t}function ho(t){return t.split("-")[0]}function po(t){return t.split("-")[1]}function uo(t){return"x"===t?"y":"x"}function mo(t){return"y"===t?"height":"width"}function fo(t){return["top","bottom"].includes(ho(t))?"y":"x"}function bo(t){return uo(fo(t))}function go(t){return t.replace(/start|end/g,(t=>so[t]))}function vo(t){return t.replace(/left|right|bottom|top/g,(t=>ao[t]))}function Oo(t){const{x:e,y:o,width:r,height:i}=t;return{width:r,height:i,top:o,left:e,right:e+r,bottom:o+i,x:e,y:o}}function xo(t,e,o){let{reference:r,floating:i}=t;const n=fo(e),a=bo(e),s=mo(a),l=ho(e),d="y"===n,c=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let u;switch(l){case"top":u={x:c,y:r.y-i.height};break;case"bottom":u={x:c,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:h};break;case"left":u={x:r.x-i.width,y:h};break;default:u={x:r.x,y:r.y}}switch(po(e)){case"start":u[a]-=p*(o&&d?-1:1);break;case"end":u[a]+=p*(o&&d?-1:1)}return u}async function yo(t,e){var o;void 0===e&&(e={});const{x:r,y:i,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:p=!1,padding:u=0}=co(e,t),m=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),f=s[p?"floating"===h?"reference":"floating":h],b=Oo(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(f)))||o?f:f.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===h?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),O=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},x=Oo(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-x.top+m.top)/O.y,bottom:(x.bottom-b.bottom+m.bottom)/O.y,left:(b.left-x.left+m.left)/O.x,right:(x.right-b.right+m.right)/O.x}}function wo(){return"undefined"!=typeof window}function ko(t){return Qo(t)?(t.nodeName||"").toLowerCase():"#document"}function qo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function So(t){var e;return null==(e=(Qo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Qo(t){return!!wo()&&(t instanceof Node||t instanceof qo(t).Node)}function $o(t){return!!wo()&&(t instanceof Element||t instanceof qo(t).Element)}function Po(t){return!!wo()&&(t instanceof HTMLElement||t instanceof qo(t).HTMLElement)}function Co(t){return!(!wo()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof qo(t).ShadowRoot)}function Ro(t){const{overflow:e,overflowX:o,overflowY:r,display:i}=jo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+o)&&!["inline","contents"].includes(i)}function Zo(t){return["table","td","th"].includes(ko(t))}function To(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function Ao(t){const e=Mo(),o=$o(t)?jo(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!o[t]&&"none"!==o[t]))||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function Mo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Eo(t){return["html","body","#document"].includes(ko(t))}function jo(t){return qo(t).getComputedStyle(t)}function zo(t){return $o(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Xo(t){if("html"===ko(t))return t;const e=t.assignedSlot||t.parentNode||Co(t)&&t.host||So(t);return Co(e)?e.host:e}function _o(t){const e=Xo(t);return Eo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Po(e)&&Ro(e)?e:_o(e)}function Do(t,e,o){var r;void 0===e&&(e=[]),void 0===o&&(o=!0);const i=_o(t),n=i===(null==(r=t.ownerDocument)?void 0:r.body),a=qo(i);if(n){const t=Uo(a);return e.concat(a,a.visualViewport||[],Ro(i)?i:[],t&&o?Do(t):[])}return e.concat(i,Do(i,[],o))}function Uo(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Vo(t){const e=jo(t);let o=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Po(t),n=i?t.offsetWidth:o,a=i?t.offsetHeight:r,s=ro(o)!==n||ro(r)!==a;return s&&(o=n,r=a),{width:o,height:r,$:s}}function Lo(t){return $o(t)?t:t.contextElement}function Wo(t){const e=Lo(t);if(!Po(e))return no(1);const o=e.getBoundingClientRect(),{width:r,height:i,$:n}=Vo(e);let a=(n?ro(o.width):o.width)/r,s=(n?ro(o.height):o.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Bo=no(0);function Yo(t){const e=qo(t);return Mo()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Bo}function Io(t,e,o,r){void 0===e&&(e=!1),void 0===o&&(o=!1);const i=t.getBoundingClientRect(),n=Lo(t);let a=no(1);e&&(r?$o(r)&&(a=Wo(r)):a=Wo(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==qo(t))&&e}(n,o,r)?Yo(n):no(0);let l=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,c=i.width/a.x,h=i.height/a.y;if(n){const t=qo(n),e=r&&$o(r)?qo(r):r;let o=t,i=Uo(o);for(;i&&r&&e!==o;){const t=Wo(i),e=i.getBoundingClientRect(),r=jo(i),n=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,d*=t.y,c*=t.x,h*=t.y,l+=n,d+=a,o=qo(i),i=Uo(o)}}return Oo({width:c,height:h,x:l,y:d})}function No(t,e){const o=zo(t).scrollLeft;return e?e.left+o:Io(So(t)).left+o}function Go(t,e,o){void 0===o&&(o=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(o?0:No(t,r)),y:r.top+e.scrollTop}}function Fo(t,e,o){let r;if("viewport"===e)r=function(t,e){const o=qo(t),r=So(t),i=o.visualViewport;let n=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){n=i.width,a=i.height;const t=Mo();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)r=function(t){const e=So(t),o=zo(t),r=t.ownerDocument.body,i=oo(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=oo(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-o.scrollLeft+No(t);const s=-o.scrollTop;return"rtl"===jo(r).direction&&(a+=oo(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:a,y:s}}(So(t));else if($o(e))r=function(t,e){const o=Io(t,!0,"fixed"===e),r=o.top+t.clientTop,i=o.left+t.clientLeft,n=Po(t)?Wo(t):no(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:i*n.x,y:r*n.y}}(e,o);else{const o=Yo(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Oo(r)}function Ho(t,e){const o=Xo(t);return!(o===e||!$o(o)||Eo(o))&&("fixed"===jo(o).position||Ho(o,e))}function Ko(t,e,o){const r=Po(e),i=So(e),n="fixed"===o,a=Io(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=no(0);if(r||!r&&!n)if(("body"!==ko(e)||Ro(i))&&(s=zo(e)),r){const t=Io(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=No(i));const d=!i||r||n?no(0):Go(i,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Jo(t){return"static"===jo(t).position}function tr(t,e){if(!Po(t)||"fixed"===jo(t).position)return null;if(e)return e(t);let o=t.offsetParent;return So(t)===o&&(o=o.ownerDocument.body),o}function er(t,e){const o=qo(t);if(To(t))return o;if(!Po(t)){let e=Xo(t);for(;e&&!Eo(e);){if($o(e)&&!Jo(e))return e;e=Xo(e)}return o}let r=tr(t,e);for(;r&&Zo(r)&&Jo(r);)r=tr(r,e);return r&&Eo(r)&&Jo(r)&&!Ao(r)?o:r||function(t){let e=Xo(t);for(;Po(e)&&!Eo(e);){if(Ao(e))return e;if(To(e))return null;e=Xo(e)}return null}(t)||o}const or={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:r,strategy:i}=t;const n="fixed"===i,a=So(r),s=!!e&&To(e.floating);if(r===a||s&&n)return o;let l={scrollLeft:0,scrollTop:0},d=no(1);const c=no(0),h=Po(r);if((h||!h&&!n)&&(("body"!==ko(r)||Ro(a))&&(l=zo(r)),Po(r))){const t=Io(r);d=Wo(r),c.x=t.x+r.clientLeft,c.y=t.y+r.clientTop}const p=!a||h||n?no(0):Go(a,l,!0);return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:o.y*d.y-l.scrollTop*d.y+c.y+p.y}},getDocumentElement:So,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:r,strategy:i}=t;const n="clippingAncestors"===o?To(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let r=Do(t,[],!1).filter((t=>$o(t)&&"body"!==ko(t))),i=null;const n="fixed"===jo(t).position;let a=n?Xo(t):t;for(;$o(a)&&!Eo(a);){const e=jo(a),o=Ao(a);o||"fixed"!==e.position||(i=null),(n?!o&&!i:!o&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||Ro(a)&&!o&&Ho(t,a))?r=r.filter((t=>t!==a)):i=e,a=Xo(a)}return e.set(t,r),r}(e,this._c):[].concat(o),a=[...n,r],s=a[0],l=a.reduce(((t,o)=>{const r=Fo(e,o,i);return t.top=oo(r.top,t.top),t.right=eo(r.right,t.right),t.bottom=eo(r.bottom,t.bottom),t.left=oo(r.left,t.left),t}),Fo(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:er,getElementRects:async function(t){const e=this.getOffsetParent||er,o=this.getDimensions,r=await o(t.floating);return{reference:Ko(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Vo(t);return{width:e,height:o}},getScale:Wo,isElement:$o,isRTL:function(t){return"rtl"===jo(t).direction}};function rr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const ir=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:r,placement:i}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=co(t,e),d={x:o,y:r},c=await yo(e,l),h=fo(ho(i)),p=uo(h);let u=d[p],m=d[h];if(n){const t="y"===p?"bottom":"right";u=lo(u+c["y"===p?"top":"left"],u,u-c[t])}if(a){const t="y"===h?"bottom":"right";m=lo(m+c["y"===h?"top":"left"],m,m-c[t])}const f=s.fn({...e,[p]:u,[h]:m});return{...f,data:{x:f.x-o,y:f.y-r,enabled:{[p]:n,[h]:a}}}}}},nr=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,r;const{placement:i,middlewareData:n,rects:a,initialPlacement:s,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=co(t,e);if(null!=(o=n.arrow)&&o.alignmentOffset)return{};const g=ho(i),v=fo(s),O=ho(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(d.floating)),y=p||(O||!f?[vo(s)]:function(t){const e=vo(t);return[go(t),e,go(e)]}(s)),w="none"!==m;!p&&w&&y.push(...function(t,e,o,r){const i=po(t);let n=function(t,e,o){const r=["left","right"],i=["right","left"],n=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:r:e?r:i;case"left":case"right":return e?n:a;default:return[]}}(ho(t),"start"===o,r);return i&&(n=n.map((t=>t+"-"+i)),e&&(n=n.concat(n.map(go)))),n}(s,f,m,x));const k=[s,...y],q=await yo(e,b),S=[];let Q=(null==(r=n.flip)?void 0:r.overflows)||[];if(c&&S.push(q[g]),h){const t=function(t,e,o){void 0===o&&(o=!1);const r=po(t),i=bo(t),n=mo(i);let a="x"===i?r===(o?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=vo(a)),[a,vo(a)]}(i,a,x);S.push(q[t[0]],q[t[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every((t=>t<=0))){var $,P;const t=((null==($=n.flip)?void 0:$.index)||0)+1,e=k[t];if(e)return{data:{index:t,overflows:Q},reset:{placement:e}};let o=null==(P=Q.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:P.placement;if(!o)switch(u){case"bestFit":{var C;const t=null==(C=Q.filter((t=>{if(w){const e=fo(t.placement);return e===v||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(o=t);break}case"initialPlacement":o=s}if(i!==o)return{reset:{placement:o}}}return{}}}},ar=(t,e,o)=>{const r=new Map,i={platform:or,...o},n={...i.platform,_c:r};return(async(t,e,o)=>{const{placement:r="bottom",strategy:i="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:h}=xo(d,r,l),p=r,u={},m=0;for(let o=0;o<s.length;o++){const{name:n,fn:f}=s[o],{x:b,y:g,data:v,reset:O}=await f({x:c,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});c=null!=b?b:c,h=null!=g?g:h,u={...u,[n]:{...u[n],...v}},O&&m<=50&&(m++,"object"==typeof O&&(O.placement&&(p=O.placement),O.rects&&(d=!0===O.rects?await a.getElementRects({reference:t,floating:e,strategy:i}):O.rects),({x:c,y:h}=xo(d,p,l))),o=-1)}return{x:c,y:h,placement:p,strategy:i,middlewareData:u}})(t,e,{...i,platform:n})};var sr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},lr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class dr extends ee{constructor(){super(...arguments),this.placement="bottom-start",this.type="dropdown",this.target=null,this.isOpen=!1,this.middleware=[nr(),ir()],this.handleMenuOpen=t=>{t.preventDefault(),t.stopPropagation(),t.detail.menu!==this&&this.isOpen&&this.closeMenu()},this.handleOutsideClick=t=>{t.target,t.composedPath().includes(this)||this.closeMenu()},this.showContextMenu=t=>{const e=t;t.preventDefault(),t.stopPropagation(),this.isOpen=!0,this.menuContainer.classList.toggle("open",this.isOpen);const o={getBoundingClientRect:()=>({x:e.clientX,y:e.clientY,width:0,height:0,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY})};this.updateMenuPosition(o)},this.toggleMenu=t=>{t.target;const e=t.composedPath();e.includes(this.triggerButton)&&!e.includes(this.menuContainer)&&(this.isOpen=!this.isOpen,this.menuContainer.classList.toggle("open",this.isOpen),this.isOpen&&(this.updateMenuPosition(this.triggerButton),document.dispatchEvent(new CustomEvent("qbo-menu-open",{bubbles:!0,composed:!0,detail:{menu:this}}))))}}static{this.styles=K``}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),"context"===this.type?this.triggerButton.removeEventListener("contextmenu",this.showContextMenu):this.triggerButton.removeEventListener("click",this.toggleMenu)}firstUpdated(t){super.firstUpdated(t),this.triggerButton=this.querySelector("*[data-trigger]")||this.querySelector("button")||this.parentElement,this.menuContainer=this.querySelector("*[data-content]")||this.querySelector("aside")||this.querySelector("menu"),"context"===this.type?(this.target&&(this.triggerButton=this.closest(this.target)||(()=>{const t=this.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.querySelector(this.target):null})()||document.querySelector(this.target)||document),this.triggerButton.addEventListener("contextmenu",this.showContextMenu)):null!=this.triggerButton&&this.triggerButton.addEventListener("click",this.toggleMenu)}closeMenu(){this.isOpen=!1,this.menuContainer.classList.remove("open")}async updateMenuPosition(t){console.log(t,typeof t);const{x:e,y:o}=await ar(t,this.menuContainer,{placement:this.placement,middleware:this.middleware,strategy:"fixed"});Object.assign(this.menuContainer.style,{left:`${e}px`,top:`${o}px`})}render(){return zt`<slot></slot>`}}sr([ae({type:String}),lr("design:type",String)],dr.prototype,"placement",void 0),sr([ae(),lr("design:type",String)],dr.prototype,"type",void 0),sr([ae(),lr("design:type",Object)],dr.prototype,"target",void 0),sr([se(),lr("design:type",Object)],dr.prototype,"isOpen",void 0),customElements.get("qbo-menu")||customElements.define("qbo-menu",dr);var cr,hr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},pr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ur=class extends ee{constructor(){super(...arguments),this.renderInHost=!0,this.continuous=!1,this.interimResults=!1,this.maxAlternatives=1,this.for="input",this.class="input-group-text bi bi-headset",this.activeClass="bg-primary-subtle",this._recognition=null,this.target=null,this.listening=!1}static{cr=this}static{this.activeInstance=null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.listen);const t=new(window.SpeechRecognition||window.webkitSpeechRecognition);t.continuous=this.continuous,t.interimResults=this.interimResults,t.maxAlternatives=this.maxAlternatives,t.onresult=t=>{this.onResult(t)},t.onspeechend=t=>{this.stop(t)},t.onerror=t=>{this.error(t)},this._recognition=t,this.target=document.getElementById(this.for)||this.querySelector(this.for)||this.parentElement?.querySelector(this.for),null==this.target&&console.log(`qbo-microphone: no target found for ${this.for}`)}disconnectedCallback(){this.removeEventListener("click",this.listen),super.disconnectedCallback()}onResult(t){const e=t.results[t.results.length-1][0].transcript;if(console.log("Result: "+e),null==this.target)return;const o=this.target;if(o instanceof HTMLInputElement)"radio"===o.type?o.value===e&&(o.checked=!0):this.continuous?o.value+=e:o.value=e;else if(o instanceof HTMLTextAreaElement)this.continuous?o.value+=e:o.value=e;else if(o instanceof HTMLSelectElement)for(let t=0;t<o.options.length;t++)if(o.options[t].value===e||o.options[t].text===e){o.selectedIndex=t;break}}listen(t){this.listening?this.stop(t):this.start()}start(){this.listening=!0,cr.activeInstance=this,this.activeClass&&this.classList.add(this.activeClass),console.log("listening"),this._recognition.start()}stop(t){this.listening=!1,cr.activeInstance=null,this.activeClass&&this.classList.remove(this.activeClass),console.log("stopped listening"),this._recognition.stop(),this._recognition.abort()}error(t){console.log("Error during speech recognition:",t)}render(){return zt`<slot></slot>`}};hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"renderInHost",void 0),hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"continuous",void 0),hr([ae({type:Boolean}),pr("design:type",Object)],ur.prototype,"interimResults",void 0),hr([ae({type:Number}),pr("design:type",Object)],ur.prototype,"maxAlternatives",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"for",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"class",void 0),hr([ae({type:String}),pr("design:type",Object)],ur.prototype,"activeClass",void 0),ur=cr=hr([re("qbo-microphone")],ur);var mr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},fr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let br=class extends ee{constructor(){super(...arguments),this.display=25,this.start=0,this.count=0,this.pageLimit=10,this.currentPage=1,this.rollingView=!0,this.editSize=!0,this.displayCountText="Results per page:"}get maxPage(){return Math.floor(this.count/this.display)+(this.count%this.display==0?0:1)}static{this.styles=[me,K``]}goToPage(t){t<1?t=1:t>this.maxPage&&(t=this.maxPage),this.currentPage=t,this.dispatchEvent(new CustomEvent("change",{detail:{start:(t-1)*this.display,display:this.display,page:t},bubbles:!0,composed:!0}))}renderPage(t){return zt`<li class="${this.currentPage===t?"active":""}">
|
|
93
93
|
<a @click="${e=>this.goToPage(t)}">${t}</a>
|
|
94
94
|
</li>`}renderSpacer(){return zt`<li class="disabled"><a>...</a></li>`}renderPageNumbers(){const t=[];let e=this.maxPage>this.pageLimit?this.currentPage-Math.floor(this.pageLimit/2):1;e<1&&(e=1),e+this.pageLimit>this.maxPage&&(e=this.maxPage-this.pageLimit+1),e<1&&(e=1);let o=this.maxPage>this.pageLimit?e+this.pageLimit-1:this.maxPage;o<=1&&(o=1),e>1&&(t.push(this.renderPage(1)),t.push(this.renderSpacer()));for(let r=e;r<=o;r++)t.push(this.renderPage(r));return o<this.maxPage&&(t.push(this.renderSpacer()),t.push(this.renderPage(this.maxPage))),t}setDisplaySize(t){const e=t.target,o=parseInt(e.value);isNaN(o)||(this.display=o,this.start=0,this.goToPage(1))}renderPageSize(){return zt`<li class="pageSize">
|
|
95
95
|
<span>${this.displayCountText}</span>
|
|
@@ -110,14 +110,14 @@ ${Array.from(Je.keys()).map((e=>zt`<div class="col-3">
|
|
|
110
110
|
</li>
|
|
111
111
|
${this.editSize?this.renderPageSize():zt``}
|
|
112
112
|
</ul>
|
|
113
|
-
</nav>`}};mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"display",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"start",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"count",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"pageLimit",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"currentPage",void 0),mr([ae({type:Boolean}),fr("design:type",Object)],br.prototype,"rollingView",void 0),mr([ae({type:Boolean}),fr("design:type",Object)],br.prototype,"editSize",void 0),mr([ae({type:String}),fr("design:type",Object)],br.prototype,"displayCountText",void 0),br=mr([re("qbo-paginate")],br);var gr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},vr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Or=class extends ee{constructor(){super(...arguments),this.placement="bottom",this.selector="*[data-popover-trigger]",this.isOpen=!1,this.middleware=[nr(),ir()],this.handleMenuOpen=t=>{t.preventDefault(),t.stopPropagation(),t.detail.menu!==this&&this.isOpen&&this.closeMenu()},this.toggleMenu=t=>{this.isOpen=!this.isOpen,this.classList.toggle("open",this.isOpen),this.isOpen&&(this.setPosition(),document.dispatchEvent(new CustomEvent("qbo-popover-open",{bubbles:!0,composed:!0,detail:{menu:this}})))}}async setPosition(){const{x:t,y:e}=await ar(this.triggerElement,this,{placement:this.placement,middleware:this.middleware});Object.assign(this.style,{left:`${t}px`,top:`${e}px`})}connectedCallback(){super.connectedCallback(),document.addEventListener("qbo-popover-open",this.handleMenuOpen)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("qbo-popover-open",this.handleMenuOpen),null!=this.triggerElement&&(this.triggerElement.removeEventListener("mouseover",this.toggleMenu),this.triggerElement.removeEventListener("mouseout",this.toggleMenu))}firstUpdated(t){super.firstUpdated(t),this.triggerElement=this.parentElement?.querySelector(this.selector)||this.shadowRoot?.querySelector(this.selector)||document.querySelector(this.selector)||this.parentElement,null!=this.triggerElement&&(this.triggerElement.addEventListener("mouseover",this.toggleMenu),this.triggerElement.addEventListener("mouseout",this.toggleMenu))}closeMenu(){this.isOpen=!1,this.classList.remove("open")}render(){return zt`<slot></slot>`}};gr([ae({type:String}),vr("design:type",String)],Or.prototype,"placement",void 0),gr([ae({type:String}),vr("design:type",Object)],Or.prototype,"selector",void 0),gr([se(),vr("design:type",Object)],Or.prototype,"isOpen",void 0),Or=gr([re("qbo-popover")],Or);class
|
|
113
|
+
</nav>`}};mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"display",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"start",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"count",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"pageLimit",void 0),mr([ae({type:Number}),fr("design:type",Object)],br.prototype,"currentPage",void 0),mr([ae({type:Boolean}),fr("design:type",Object)],br.prototype,"rollingView",void 0),mr([ae({type:Boolean}),fr("design:type",Object)],br.prototype,"editSize",void 0),mr([ae({type:String}),fr("design:type",Object)],br.prototype,"displayCountText",void 0),br=mr([re("qbo-paginate")],br);var gr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},vr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Or=class extends ee{constructor(){super(...arguments),this.placement="bottom",this.selector="*[data-popover-trigger]",this.isOpen=!1,this.middleware=[nr(),ir()],this.handleMenuOpen=t=>{t.preventDefault(),t.stopPropagation(),t.detail.menu!==this&&this.isOpen&&this.closeMenu()},this.toggleMenu=t=>{this.isOpen=!this.isOpen,this.classList.toggle("open",this.isOpen),this.isOpen&&(this.setPosition(),document.dispatchEvent(new CustomEvent("qbo-popover-open",{bubbles:!0,composed:!0,detail:{menu:this}})))}}async setPosition(){const{x:t,y:e}=await ar(this.triggerElement,this,{placement:this.placement,middleware:this.middleware});Object.assign(this.style,{left:`${t}px`,top:`${e}px`})}connectedCallback(){super.connectedCallback(),document.addEventListener("qbo-popover-open",this.handleMenuOpen)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("qbo-popover-open",this.handleMenuOpen),null!=this.triggerElement&&(this.triggerElement.removeEventListener("mouseover",this.toggleMenu),this.triggerElement.removeEventListener("mouseout",this.toggleMenu))}firstUpdated(t){super.firstUpdated(t),this.triggerElement=this.parentElement?.querySelector(this.selector)||this.shadowRoot?.querySelector(this.selector)||document.querySelector(this.selector)||this.parentElement,null!=this.triggerElement&&(this.triggerElement.addEventListener("mouseover",this.toggleMenu),this.triggerElement.addEventListener("mouseout",this.toggleMenu))}closeMenu(){this.isOpen=!1,this.classList.remove("open")}render(){return zt`<slot></slot>`}};gr([ae({type:String}),vr("design:type",String)],Or.prototype,"placement",void 0),gr([ae({type:String}),vr("design:type",Object)],Or.prototype,"selector",void 0),gr([se(),vr("design:type",Object)],Or.prototype,"isOpen",void 0),Or=gr([re("qbo-popover")],Or);class xr extends ze{constructor(t){if(super(t),this.it=_t,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_t||null==t)return this._t=void 0,this.it=t;if(t===Xt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}xr.directiveName="unsafeHTML",xr.resultType=1;const yr=je(xr);var wr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},kr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let qr=class extends xe{constructor(){super(...arguments),this.open=!1,this.loading=!1,this.renderInHost=!1}static{this.styles=[K`
|
|
114
114
|
/* Add any custom styles here */
|
|
115
115
|
.foo { color: red; }
|
|
116
116
|
`]}async connectedCallback(){super.connectedCallback(),this.handleOutsideClick=this.handleOutsideClick.bind(this)}toggle(){this.open=!this.open,this.open?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}show(){this.open=!0,document.addEventListener("click",this.handleOutsideClick)}hide(t){t.target.closest('[data-dismiss="modal"]')&&(this.open=!1,document.removeEventListener("click",this.handleOutsideClick))}handleOutsideClick(t){this.open&&!this.contains(t.target)&&(this.open=!1,document.removeEventListener("click",this.handleOutsideClick))}render(){return zt`
|
|
117
117
|
<slot name="button" @click="${this.toggle}">
|
|
118
118
|
<button class="btn">Popup</button>
|
|
119
119
|
</slot>
|
|
120
|
-
<slot name="content" @click="${this.hide}" style="display:${this.open?"flex":"none"}">${
|
|
120
|
+
<slot name="content" @click="${this.hide}" style="display:${this.open?"flex":"none"}">${yr(this.html)}</slot>
|
|
121
121
|
`}};wr([ae({type:Boolean}),kr("design:type",Object)],qr.prototype,"open",void 0),wr([ae({type:Boolean}),kr("design:type",Object)],qr.prototype,"loading",void 0),wr([ae({type:Boolean}),kr("design:type",Object)],qr.prototype,"renderInHost",void 0),qr=wr([re("qbo-popup")],qr);var Sr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Qr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let $r=class extends ee{constructor(){super(...arguments),this.open=!1,this.loading=!1,this.renderInHost=!1,this.title="Popup",this.eventName="qbo-popup",this.listen=!0}async connectedCallback(){super.connectedCallback(),this.handleOutsideClick=this.handleOutsideClick.bind(this)}toggle(){this.open=!this.open,this.open?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}show(){this.open=!0,document.addEventListener("click",this.handleOutsideClick)}hide(t){if(t.target.closest('[data-dismiss="modal"]')){this.open=!1,this.src=null;const t=this.querySelector("iframe")??this.renderRoot.querySelector("iframe");null!=t&&t.removeAttribute("src"),document.removeEventListener("click",this.handleOutsideClick)}}handleOutsideClick(t){}firstUpdated(){const t=this;t.targetElement=document.querySelector(t.target)??document,t.targetContainer=t.querySelector("iframe")??t.renderRoot.querySelector("iframe"),t.targetElement.addEventListener(t.eventName,(e=>{t.showElement(e.target)})),t.listen&&t.targetElement.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t instanceof HTMLAnchorElement));null!=e&&(e.dispatchEvent(new CustomEvent(this.eventName,{bubbles:!0,composed:!0})),t.preventDefault())}))}showElement(t){this.src=t.href.replace("youtube.com/watch","youtube.com/embed");const e=this.querySelector("iframe")??this.renderRoot.querySelector("iframe");null!=e&&(e.src=this.src,this.show())}render(){return zt`
|
|
122
122
|
<slot name="button" @click="${this.toggle}"></slot>
|
|
123
123
|
<slot name="content" @click="${this.hide}" style="display:${this.open?"flex":"none"}">
|
|
@@ -245,7 +245,7 @@ ${Array.from(Je.keys()).map((e=>zt`<div class="col-3">
|
|
|
245
245
|
`]}async connectedCallback(){if(this.optionText??=this.optionValue,super.connectedCallback(),null!==this.jsonData){const t=A(this.apiEndpoint);this.jsonData=await t.fetch(null,{})}}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}render(){return this.options=R(this.jsonData),this.options?(this.optionValue??=Object.keys(this.options[0])[0],this.optionText??=Object.keys(this.options[0])[1]??this.optionValue,zt`<select ?disabled=${this.hasAttribute("disabled")} class=${this.getAttribute("class")}>
|
|
246
246
|
<option value="${this.emptyOptionValue}">${this.emptyOptionText}</option>
|
|
247
247
|
${this.options.map((t=>zt`<option value="${t[this.optionValue]}" ?selected="${t[this.optionValue]==this.defaultValue}">${t[this.optionText]}</option>`))}
|
|
248
|
-
</select>`):zt`<select ?disabled=${this.hasAttribute("disabled")} class=${this.getAttribute("class")}></select>`}};Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"apiEndpoint",void 0),Er([ae({type:Boolean}),jr("design:type",Object)],zr.prototype,"loading",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"optionText",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"optionValue",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"defaultValue",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"emptyOptionText",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"emptyOptionValue",void 0),Er([ae({type:Array}),jr("design:type",Object)],zr.prototype,"options",void 0),Er([ae({type:Object}),jr("design:type",Object)],zr.prototype,"jsonData",void 0),Er([ae({type:Boolean}),jr("design:type",Object)],zr.prototype,"renderInHost",void 0),zr=Er([re("qbo-select")],zr);var Xr,_r=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Dr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};!function(t){t.Single="single",t.Multi="multi"}(Xr||(Xr={}));let Ur=class extends ee{constructor(){super(...arguments),this.classSelected="qbo-select-on",this.classUnselected="qbo-select-off",this.selector="*[data-selectable]",this.parent=null,this.type=null,this.selected=!1,this.mode=Xr.Single,this.toggleCheckbox=!0,this.selectedItems=[],this.target=null,this._previousItem=null}static{this.styles=[me,K``]}clear(){const t=this.getItems();t?.forEach((t=>{this.setItem(t,!1)}))}toggleAll(){this.selected=!this.selected;const t=this.getItems();t?.forEach((t=>{this.setItem(t,this.selected)})),this.dispatchSelectionEvent()}render(){return zt`<slot @click=${this.toggleAll}><qbo-icon .type="${this.type}" icon="${this.selected?"check-square":"square"}" /></slot>`}connectedCallback(){super.connectedCallback(),this.parent&&(this.target=this.closest(this.parent),null==this.target&&console.warn(`Parent ${this.parent} not found`)),this.target??=this,this.target.addEventListener("click",this.itemClick.bind(this))}disconnectedCallback(){this.target?.removeEventListener("click",this.itemClick),super.disconnectedCallback()}getItems(){return Array.from(this.target?.querySelectorAll(this.selector)||[])}itemClick(t){const e=t.target,o=e.matches(this.selector)?e:e.closest(this.selector);if(!o||!this.target?.contains(o))return;const r=t;this.mode!==Xr.Single||r.shiftKey||r.ctrlKey||!this._previousItem||this._previousItem===o||this.setItem(this._previousItem,!1);const i=this.setItem(o);if(r.shiftKey&&this._previousItem){const t=this.getItems();let e=!1;t.forEach((t=>{t!==o&&t!==this._previousItem||(e=!e),e&&this.setItem(t,i)})),window.getSelection()?.removeAllRanges()}this._previousItem=o,this.dispatchSelectionEvent()}setItem(t,e=null){if(null===e&&(e=!t.classList.contains(this.classSelected)),t.classList.toggle(this.classSelected,e),t.classList.toggle(this.classUnselected,!e),this.toggleCheckbox){const o=t instanceof HTMLInputElement&&"checkbox"===t.type?t:t.querySelector("input[type=checkbox]");o&&(o.checked=e)}const o=this.selectedItems.indexOf(t);return e&&-1===o?this.selectedItems.push(t):e||-1===o||this.selectedItems.splice(o,1),e}dispatchSelectionEvent(){const t=this.selectedItems.map((t=>t.dataset.selectable)),e=new CustomEvent("change",{detail:{items:this.selectedItems,values:t},bubbles:!0,composed:!0});this.dispatchEvent(e)}};_r([ae(),Dr("design:type",String)],Ur.prototype,"classSelected",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"classUnselected",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"selector",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"parent",void 0),_r([ae(),Dr("design:type",Object)],Ur.prototype,"type",void 0),_r([ae({type:Boolean}),Dr("design:type",Object)],Ur.prototype,"selected",void 0),_r([ae({type:Xr}),Dr("design:type",Object)],Ur.prototype,"mode",void 0),_r([ae(),Dr("design:type",Boolean)],Ur.prototype,"toggleCheckbox",void 0),_r([ae({attribute:!1}),Dr("design:type",Object)],Ur.prototype,"target",void 0),Ur=_r([re("qbo-selectable")],Ur);var Vr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Lr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Wr=class extends
|
|
248
|
+
</select>`):zt`<select ?disabled=${this.hasAttribute("disabled")} class=${this.getAttribute("class")}></select>`}};Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"apiEndpoint",void 0),Er([ae({type:Boolean}),jr("design:type",Object)],zr.prototype,"loading",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"optionText",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"optionValue",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"defaultValue",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"emptyOptionText",void 0),Er([ae({type:String}),jr("design:type",Object)],zr.prototype,"emptyOptionValue",void 0),Er([ae({type:Array}),jr("design:type",Object)],zr.prototype,"options",void 0),Er([ae({type:Object}),jr("design:type",Object)],zr.prototype,"jsonData",void 0),Er([ae({type:Boolean}),jr("design:type",Object)],zr.prototype,"renderInHost",void 0),zr=Er([re("qbo-select")],zr);var Xr,_r=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Dr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};!function(t){t.Single="single",t.Multi="multi"}(Xr||(Xr={}));let Ur=class extends ee{constructor(){super(...arguments),this.classSelected="qbo-select-on",this.classUnselected="qbo-select-off",this.selector="*[data-selectable]",this.parent=null,this.type=null,this.selected=!1,this.mode=Xr.Single,this.toggleCheckbox=!0,this.selectedItems=[],this.target=null,this._previousItem=null}static{this.styles=[me,K``]}clear(){const t=this.getItems();t?.forEach((t=>{this.setItem(t,!1)}))}toggleAll(){this.selected=!this.selected;const t=this.getItems();t?.forEach((t=>{this.setItem(t,this.selected)})),this.dispatchSelectionEvent()}render(){return zt`<slot @click=${this.toggleAll}><qbo-icon .type="${this.type}" icon="${this.selected?"check-square":"square"}" /></slot>`}connectedCallback(){super.connectedCallback(),this.parent&&(this.target=this.closest(this.parent),null==this.target&&console.warn(`Parent ${this.parent} not found`)),this.target??=this,this.target.addEventListener("click",this.itemClick.bind(this))}disconnectedCallback(){this.target?.removeEventListener("click",this.itemClick),super.disconnectedCallback()}getItems(){return Array.from(this.target?.querySelectorAll(this.selector)||[])}itemClick(t){const e=t.target,o=e.matches(this.selector)?e:e.closest(this.selector);if(!o||!this.target?.contains(o))return;const r=t;this.mode!==Xr.Single||r.shiftKey||r.ctrlKey||!this._previousItem||this._previousItem===o||this.setItem(this._previousItem,!1);const i=this.setItem(o);if(r.shiftKey&&this._previousItem){const t=this.getItems();let e=!1;t.forEach((t=>{t!==o&&t!==this._previousItem||(e=!e),e&&this.setItem(t,i)})),window.getSelection()?.removeAllRanges()}this._previousItem=o,this.dispatchSelectionEvent()}setItem(t,e=null){if(null===e&&(e=!t.classList.contains(this.classSelected)),t.classList.toggle(this.classSelected,e),t.classList.toggle(this.classUnselected,!e),this.toggleCheckbox){const o=t instanceof HTMLInputElement&&"checkbox"===t.type?t:t.querySelector("input[type=checkbox]");o&&(o.checked=e)}const o=this.selectedItems.indexOf(t);return e&&-1===o?this.selectedItems.push(t):e||-1===o||this.selectedItems.splice(o,1),e}dispatchSelectionEvent(){const t=this.selectedItems.map((t=>t.dataset.selectable)),e=new CustomEvent("change",{detail:{items:this.selectedItems,values:t},bubbles:!0,composed:!0});this.dispatchEvent(e)}};_r([ae(),Dr("design:type",String)],Ur.prototype,"classSelected",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"classUnselected",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"selector",void 0),_r([ae({type:String}),Dr("design:type",Object)],Ur.prototype,"parent",void 0),_r([ae(),Dr("design:type",Object)],Ur.prototype,"type",void 0),_r([ae({type:Boolean}),Dr("design:type",Object)],Ur.prototype,"selected",void 0),_r([ae({type:Xr}),Dr("design:type",Object)],Ur.prototype,"mode",void 0),_r([ae(),Dr("design:type",Boolean)],Ur.prototype,"toggleCheckbox",void 0),_r([ae({attribute:!1}),Dr("design:type",Object)],Ur.prototype,"target",void 0),Ur=_r([re("qbo-selectable")],Ur);var Vr=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Lr=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Wr=class extends xe{constructor(){super(...arguments),this.loading=!1,this.renderInHost=!1,this.qboClass="table table-striped table-hover",this.dataSelector=null,this.options=null}async connectedCallback(){super.connectedCallback()}createRenderRoot(){return this.renderInHost?this:super.createRenderRoot()}render(){this.options=R(this.jsonData)??this.loadData()??[{Loading:"..."}],this.querySelector("tbody"),this.querySelector("template"),function(t,e,o,r=!0){if(null!=t&&null!=e){for(;r&&t.firstChild;)t.removeChild(t.firstChild);o.map(((o,r)=>{const i=e.content.cloneNode(!0);null!=i.firstElementChild&&(i.firstElementChild.setAttribute("data-index",`${r}`),i.firstElementChild.innerHTML=Z(i.firstElementChild?.innerHTML??"",o)),t.appendChild(i)}))}}(this.querySelector("tbody"),this.querySelector("template"),this.options);const t=Object.keys(this.options[0]);return zt`<slot>
|
|
249
249
|
<table class=${this.qboClass}>
|
|
250
250
|
<thead>
|
|
251
251
|
${null!=this.querySelector("*[slot=header]")?zt`<tr><th colspan="${t.length}"><slot name="header"></slot></th></tr>`:null}
|
|
@@ -339,7 +339,7 @@ ${Array.from(Je.keys()).map((e=>zt`<div class="col-3">
|
|
|
339
339
|
<button type="button" class="cancel" @click="${this.cancelChanges}">Cancel</button>
|
|
340
340
|
</div>
|
|
341
341
|
</div>
|
|
342
|
-
</form>`}}ui([ae({type:URL}),mi("design:type",Object)],fi.prototype,"apiEndpoint",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"buttonClass",void 0),ui([ae({type:Object}),mi("design:type",Object)],fi.prototype,"configData",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"formClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"rowClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"searchClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"theme",void 0),customElements.define("qbo-config-editor",fi);let bi=[],gi=[];function vi(t){if(t<768)return!1;for(let e=0,o=bi.length;;){let r=e+o>>1;if(t<bi[r])o=r;else{if(!(t>=gi[r]))return!0;e=r+1}if(e==o)return!1}}function Oi(t){return t>=127462&&t<=127487}function yi(t,e,o=!0,r=!0){return(o?xi:wi)(t,e,r)}function xi(t,e,o){if(e==t.length)return e;e&&qi(t.charCodeAt(e))&&Si(t.charCodeAt(e-1))&&e--;let r=ki(t,e);for(e+=Qi(r);e<t.length;){let i=ki(t,e);if(8205==r||8205==i||o&&vi(i))e+=Qi(i),r=i;else{if(!Oi(i))break;{let o=0,r=e-2;for(;r>=0&&Oi(ki(t,r));)o++,r-=2;if(o%2==0)break;e+=2}}}return e}function wi(t,e,o){for(;e>0;){let r=xi(t,e-2,o);if(r<e)return r;e--}return 0}function ki(t,e){let o=t.charCodeAt(e);if(!Si(o)||e+1==t.length)return o;let r=t.charCodeAt(e+1);return qi(r)?r-56320+(o-55296<<10)+65536:o}function qi(t){return t>=56320&&t<57344}function Si(t){return t>=55296&&t<56320}function Qi(t){return t<65536?1:2}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4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[e])})();class $i{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,o){[t,e]=ji(this,t,e);let r=[];return this.decompose(0,t,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(e,this.length,r,1),Ci.from(r,this.length-(e-t)+o.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=ji(this,t,e);let o=[];return this.decompose(t,e,o,0),Ci.from(o,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),o=this.length-this.scanIdentical(t,-1),r=new Ti(this),i=new Ti(t);for(let t=e,n=e;;){if(r.next(t),i.next(t),t=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(n+=r.value.length,r.done||n>=o)return!0}}iter(t=1){return new Ti(this,t)}iterRange(t,e=this.length){return new Ai(this,t,e)}iterLines(t,e){let o;if(null==t)o=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;o=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Mi(o)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Pi(t):Ci.from(Pi.split(t,[])):$i.empty}}class Pi extends $i{constructor(t,e=function(t){let e=-1;for(let o of t)e+=o.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.text[i],a=r+n.length;if((e?o:a)>=t)return new Ei(r,a,o,n);r=a+1,o++}}decompose(t,e,o,r){let i=t<=0&&e>=this.length?this:new Pi(Zi(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=o.pop(),e=Ri(i.text,t.text.slice(),0,i.length);if(e.length<=32)o.push(new Pi(e,t.length+i.length));else{let t=e.length>>1;o.push(new Pi(e.slice(0,t)),new Pi(e.slice(t)))}}else o.push(i)}replace(t,e,o){if(!(o instanceof Pi))return super.replace(t,e,o);[t,e]=ji(this,t,e);let r=Ri(this.text,Ri(o.text,Zi(this.text,0,t)),e),i=this.length+o.length-(e-t);return r.length<=32?new Pi(r,i):Ci.from(Pi.split(r,[]),i)}sliceString(t,e=this.length,o="\n"){[t,e]=ji(this,t,e);let r="";for(let i=0,n=0;i<=e&&n<this.text.length;n++){let a=this.text[n],s=i+a.length;i>t&&n&&(r+=o),t<s&&e>i&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let o=[],r=-1;for(let i of t)o.push(i),r+=i.length+1,32==o.length&&(e.push(new Pi(o,r)),o=[],r=-1);return r>-1&&e.push(new Pi(o,r)),e}}class Ci extends $i{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.children[i],a=r+n.length,s=o+n.lines-1;if((e?s:a)>=t)return n.lineInner(t,e,o,r);r=a+1,o=s+1}}decompose(t,e,o,r){for(let i=0,n=0;n<=e&&i<this.children.length;i++){let a=this.children[i],s=n+a.length;if(t<=s&&e>=n){let i=r&((n<=t?1:0)|(s>=e?2:0));n>=t&&s<=e&&!i?o.push(a):a.decompose(t-n,e-n,o,i)}n=s+1}}replace(t,e,o){if([t,e]=ji(this,t,e),o.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let n=this.children[r],a=i+n.length;if(t>=i&&e<=a){let s=n.replace(t-i,e-i,o),l=this.lines-n.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let i=this.children.slice();return i[r]=s,new Ci(i,this.length-(e-t)+o.length)}return super.replace(i,a,s)}i=a+1}return super.replace(t,e,o)}sliceString(t,e=this.length,o="\n"){[t,e]=ji(this,t,e);let r="";for(let i=0,n=0;i<this.children.length&&n<=e;i++){let a=this.children[i],s=n+a.length;n>t&&i&&(r+=o),t<s&&e>n&&(r+=a.sliceString(t-n,e-n,o)),n=s+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Ci))return 0;let o=0,[r,i,n,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,i+=e){if(r==n||i==a)return o;let s=this.children[r],l=t.children[i];if(s!=l)return o+s.scanIdentical(l,e);o+=s.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let o=0;for(let e of t)o+=e.lines;if(o<32){let o=[];for(let e of t)e.flatten(o);return new Pi(o,e)}let r=Math.max(32,o>>5),i=r<<1,n=r>>1,a=[],s=0,l=-1,d=[];function c(t){let e;if(t.lines>i&&t instanceof Ci)for(let e of t.children)c(e);else t.lines>n&&(s>n||!s)?(h(),a.push(t)):t instanceof Pi&&s&&(e=d[d.length-1])instanceof Pi&&t.lines+e.lines<=32?(s+=t.lines,l+=t.length+1,d[d.length-1]=new Pi(e.text.concat(t.text),e.length+1+t.length)):(s+t.lines>r&&h(),s+=t.lines,l+=t.length+1,d.push(t))}function h(){0!=s&&(a.push(1==d.length?d[0]:Ci.from(d,l)),l=-1,s=d.length=0)}for(let e of t)c(e);return h(),1==a.length?a[0]:new Ci(a,e)}}function Ri(t,e,o=0,r=1e9){for(let i=0,n=0,a=!0;n<t.length&&i<=r;n++){let s=t[n],l=i+s.length;l>=o&&(l>r&&(s=s.slice(0,r-i)),i<o&&(s=s.slice(o-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function Zi(t,e,o){return Ri(t,[""],e,o)}$i.empty=new Pi([""],0);class Ti{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Pi?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],i=this.offsets[o],n=i>>1,a=r instanceof Pi?r.text.length:r.children.length;if(n==(e>0?a:0)){if(0==o)return this.done=!0,this.value="",this;e>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[o]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof Pi){let i=r.text[n+(e<0?-1:0)];if(this.offsets[o]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=r.children[n+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[o]+=e):(e<0&&this.offsets[o]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof Pi?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class Ai{constructor(t,e,o){this.value="",this.done=!1,this.cursor=new Ti(t,e>o?-1:1),this.pos=e>o?t.length:0,this.from=Math.min(e,o),this.to=Math.max(e,o)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let o=e<0?this.pos-this.from:this.to-this.pos;t>o&&(t=o),o-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=o?r:e<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Mi{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:o,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&($i.prototype[Symbol.iterator]=function(){return this.iter()},Ti.prototype[Symbol.iterator]=Ai.prototype[Symbol.iterator]=Mi.prototype[Symbol.iterator]=function(){return this});class Ei{constructor(t,e,o,r){this.from=t,this.to=e,this.number=o,this.text=r}get length(){return this.to-this.from}}function ji(t,e,o){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,o))]}function zi(t,e,o=!0,r=!0){return yi(t,e,o,r)}function Xi(t,e){let o=t.charCodeAt(e);if(!((r=o)>=55296&&r<56320&&e+1!=t.length))return o;var r;let i=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(i)?i-56320+(o-55296<<10)+65536:o}function _i(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Di(t){return t<65536?1:2}const Ui=/\r\n?|\n/;var Vi=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Vi||(Vi={}));class Li{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e+1];t+=o<0?this.sections[e]:o}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,o=0,r=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];n<0?(t(o,r,i),r+=i):r+=n,o+=i}}iterChangedRanges(t,e=!1){Ii(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];r<0?t.push(o,r):t.push(r,o)}return new Li(t)}composeDesc(t){return this.empty?t:t.empty?this:Gi(this,t)}mapDesc(t,e=!1){return t.empty?this:Ni(this,t,e)}mapPos(t,e=-1,o=Vi.Simple){let r=0,i=0;for(let n=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++],l=r+a;if(s<0){if(l>t)return i+(t-r);i+=a}else{if(o!=Vi.Simple&&l>=t&&(o==Vi.TrackDel&&r<t&&l>t||o==Vi.TrackBefore&&r<t||o==Vi.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return i}touchesRange(t,e=t){for(let o=0,r=0;o<this.sections.length&&r<=e;){let i=r+this.sections[o++];if(this.sections[o++]>=0&&r<=e&&i>=t)return!(r<t&&i>e)||"cover";r=i}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+o+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Li(t)}static create(t){return new Li(t)}}class Wi extends Li{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Ii(this,((e,o,r,i,n)=>t=t.replace(r,r+(o-e),n)),!1),t}mapDesc(t,e=!1){return Ni(this,t,e,!0)}invert(t){let e=this.sections.slice(),o=[];for(let r=0,i=0;r<e.length;r+=2){let n=e[r],a=e[r+1];if(a>=0){e[r]=a,e[r+1]=n;let s=r>>1;for(;o.length<s;)o.push($i.empty);o.push(n?t.slice(i,i+n):$i.empty)}i+=n}return new Wi(e,o)}compose(t){return this.empty?t:t.empty?this:Gi(this,t,!0)}map(t,e=!1){return t.empty?this:Ni(this,t,e,!0)}iterChanges(t,e=!1){Ii(this,t,e)}get desc(){return Li.create(this.sections)}filter(t){let e=[],o=[],r=[],i=new Fi(this);t:for(let n=0,a=0;;){let s=n==t.length?1e9:t[n++];for(;a<s||a==s&&0==i.len;){if(i.done)break t;let t=Math.min(i.len,s-a);Bi(r,t,-1);let n=-1==i.ins?-1:0==i.off?i.ins:0;Bi(e,t,n),n>0&&Yi(o,e,i.text),i.forward(t),a+=t}let l=t[n++];for(;a<l;){if(i.done)break t;let t=Math.min(i.len,l-a);Bi(e,t,-1),Bi(r,t,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(t),a+=t}}return{changes:new Wi(e,o),filtered:Li.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e],r=this.sections[e+1];r<0?t.push(o):0==r?t.push([o]):t.push([o].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,o){let r=[],i=[],n=0,a=null;function s(t=!1){if(!t&&!r.length)return;n<e&&Bi(r,e-n,-1);let o=new Wi(r,i);a=a?a.compose(o.map(a)):o,r=[],i=[],n=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof Wi){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:t,to:a=t,insert:d}=l;if(t>a||t<0||a>e)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let c=d?"string"==typeof d?$i.of(d.split(o||Ui)):d:$i.empty,h=c.length;if(t==a&&0==h)return;t<n&&s(),t>n&&Bi(r,t-n,-1),Bi(r,a-t,h),Yi(i,r,c),n=a}}(t),s(!a),a}static empty(t){return new Wi(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],o=[];for(let r=0;r<t.length;r++){let i=t[r];if("number"==typeof i)e.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)e.push(i[0],0);else{for(;o.length<r;)o.push($i.empty);o[r]=$i.of(i.slice(1)),e.push(i[0],o[r].length)}}}return new Wi(e,o)}static createSet(t,e){return new Wi(t,e)}}function Bi(t,e,o,r=!1){if(0==e&&o<=0)return;let i=t.length-2;i>=0&&o<=0&&o==t[i+1]?t[i]+=e:i>=0&&0==e&&0==t[i]?t[i+1]+=o:r?(t[i]+=e,t[i+1]+=o):t.push(e,o)}function Yi(t,e,o){if(0==o.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(o);else{for(;t.length<r;)t.push($i.empty);t.push(o)}}function Ii(t,e,o){let r=t.inserted;for(let i=0,n=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,n+=s;else{let d=i,c=n,h=$i.empty;for(;d+=s,c+=l,l&&r&&(h=h.append(r[a-2>>1])),!(o||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,d,n,c,h),i=d,n=c}}}function Ni(t,e,o,r=!1){let i=[],n=r?[]:null,a=new Fi(t),s=new Fi(e);for(let t=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let t=Math.min(a.len,s.len);Bi(i,t,-1),a.forward(t),s.forward(t)}else if(s.ins>=0&&(a.ins<0||t==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!o))){let e=s.len;for(Bi(i,s.ins,-1);e;){let o=Math.min(a.len,e);a.ins>=0&&t<a.i&&a.len<=o&&(Bi(i,0,a.ins),n&&Yi(n,i,a.text),t=a.i),a.forward(o),e-=o}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return n?Wi.createSet(i,n):Li.create(i);throw new Error("Mismatched change set lengths")}{let e=0,o=a.len;for(;o;)if(-1==s.ins){let t=Math.min(o,s.len);e+=t,o-=t,s.forward(t)}else{if(!(0==s.ins&&s.len<o))break;o-=s.len,s.next()}Bi(i,e,t<a.i?a.ins:0),n&&t<a.i&&Yi(n,i,a.text),t=a.i,a.forward(a.len-o)}}}}function Gi(t,e,o=!1){let r=[],i=o?[]:null,n=new Fi(t),a=new Fi(e);for(let t=!1;;){if(n.done&&a.done)return i?Wi.createSet(r,i):Li.create(r);if(0==n.ins)Bi(r,n.len,0,t),n.next();else if(0!=a.len||a.done){if(n.done||a.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,a.len),o=r.length;if(-1==n.ins){let o=-1==a.ins?-1:a.off?0:a.ins;Bi(r,e,o,t),i&&o&&Yi(i,r,a.text)}else-1==a.ins?(Bi(r,n.off?0:n.len,e,t),i&&Yi(i,r,n.textBit(e))):(Bi(r,n.off?0:n.len,a.off?0:a.ins,t),i&&!a.off&&Yi(i,r,a.text));t=(n.ins>e||a.ins>=0&&a.len>e)&&(t||r.length>o),n.forward2(e),a.forward(e)}}else Bi(r,0,a.ins,t),i&&Yi(i,r,a.text),a.next()}}class Fi{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?$i.empty:t[e]}textBit(t){let{inserted:e}=this.set,o=this.i-2>>1;return o>=e.length&&!t?$i.empty:e[o].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Hi{constructor(t,e,o){this.from=t,this.to=e,this.flags=o}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let o,r;return this.empty?o=r=t.mapPos(this.from,e):(o=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new Hi(o,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return Ki.range(t,e);let o=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return Ki.range(this.anchor,o)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Ki.range(t.anchor,t.head)}static create(t,e,o){return new Hi(t,e,o)}}class Ki{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:Ki.create(this.ranges.map((o=>o.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(t.ranges[o],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new Ki([this.main],0)}addRange(t,e=!0){return Ki.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let o=this.ranges.slice();return o[e]=t,Ki.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ki(t.ranges.map((t=>Hi.fromJSON(t))),t.main)}static single(t,e=t){return new Ki([Ki.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<t.length;r++){let i=t[r];if(i.empty?i.from<=o:i.from<o)return Ki.normalized(t.slice(),e);o=i.to}return new Ki(t,e)}static cursor(t,e=0,o,r){return Hi.create(t,t,(0==e?0:e<0?8:16)|(null==o?7:Math.min(6,o))|(null!=r?r:16777215)<<6)}static range(t,e,o,r){let i=(null!=o?o:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?Hi.create(e,t,48|i):Hi.create(t,e,(e>t?8:0)|i)}static normalized(t,e=0){let o=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(o);for(let o=1;o<t.length;o++){let r=t[o],i=t[o-1];if(r.empty?r.from<=i.to:r.from<i.to){let n=i.from,a=Math.max(r.to,i.to);o<=e&&e--,t.splice(--o,2,r.anchor>r.head?Ki.range(a,n):Ki.range(n,a))}}return new Ki(t,e)}}function Ji(t,e){for(let o of t.ranges)if(o.to>e)throw new RangeError("Selection points outside of document")}let tn=0;class en{constructor(t,e,o,r,i){this.combine=t,this.compareInput=e,this.compare=o,this.isStatic=r,this.id=tn++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new en(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:on),!!t.static,t.enables)}of(t){return new rn([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new rn(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new rn(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(o=>e(o.field(t))))}}function on(t,e){return t==e||t.length==e.length&&t.every(((t,o)=>t===e[o]))}class rn{constructor(t,e,o,r){this.dependencies=t,this.facet=e,this.type=o,this.value=r,this.id=tn++}dynamicSlot(t){var e;let o=this.value,r=this.facet.compareInput,i=this.id,n=t[i]>>1,a=2==this.type,s=!1,l=!1,d=[];for(let o of this.dependencies)"doc"==o?s=!0:"selection"==o?l=!0:1&(null!==(e=t[o.id])&&void 0!==e?e:1)||d.push(t[o.id]);return{create:t=>(t.values[n]=o(t),1),update(t,e){if(s&&e.docChanged||l&&(e.docChanged||e.selection)||an(t,d)){let e=o(t);if(a?!nn(e,t.values[n],r):!r(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let s,l=e.config.address[i];if(null!=l){let i=gn(e,l);if(this.dependencies.every((o=>o instanceof en?e.facet(o)===t.facet(o):!(o instanceof dn)||e.field(o,!1)==t.field(o,!1)))||(a?nn(s=o(t),i,r):r(s=o(t),i)))return t.values[n]=i,0}else s=o(t);return t.values[n]=s,1}}}}function nn(t,e,o){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1;return!0}function an(t,e){let o=!1;for(let r of e)1&bn(t,r)&&(o=!0);return o}function sn(t,e,o){let r=o.map((e=>t[e.id])),i=o.map((t=>t.type)),n=r.filter((t=>!(1&t))),a=t[e.id]>>1;function s(t){let o=[];for(let e=0;e<r.length;e++){let n=gn(t,r[e]);if(2==i[e])for(let t of n)o.push(t);else o.push(n)}return e.combine(o)}return{create(t){for(let e of r)bn(t,e);return t.values[a]=s(t),1},update(t,o){if(!an(t,n))return 0;let r=s(t);return e.compare(r,t.values[a])?0:(t.values[a]=r,1)},reconfigure(t,i){let n=an(t,r),l=i.config.facets[e.id],d=i.facet(e);if(l&&!n&&on(o,l))return t.values[a]=d,0;let c=s(t);return e.compare(c,d)?(t.values[a]=d,0):(t.values[a]=c,1)}}}const ln=en.define({static:!0});class dn{constructor(t,e,o,r,i){this.id=t,this.createF=e,this.updateF=o,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let e=new dn(tn++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ln).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,o)=>{let r=t.values[e],i=this.updateF(r,o);return this.compareF(r,i)?0:(t.values[e]=i,1)},reconfigure:(t,o)=>{let r,i=t.facet(ln),n=o.facet(ln);return(r=i.find((t=>t.field==this)))&&r!=n.find((t=>t.field==this))?(t.values[e]=r.create(t),1):null!=o.config.address[this.id]?(t.values[e]=o.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,ln.of({field:this,create:t})]}get extension(){return this}}function cn(t){return e=>new pn(e,t)}const hn={highest:cn(0),high:cn(1),default:cn(2),low:cn(3),lowest:cn(4)};class pn{constructor(t,e){this.inner=t,this.prec=e}}class un{of(t){return new mn(this,t)}reconfigure(t){return un.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class mn{constructor(t,e){this.compartment=t,this.inner=e}}class fn{constructor(t,e,o,r,i,n){for(this.base=t,this.compartments=e,this.dynamicSlots=o,this.address=r,this.staticValues=i,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,o){let r=[],i=Object.create(null),n=new Map;for(let o of function(t,e,o){let r=[[],[],[],[],[]],i=new Map;return function t(n,a){let s=i.get(n);if(null!=s){if(s<=a)return;let t=r[s].indexOf(n);t>-1&&r[s].splice(t,1),n instanceof mn&&o.delete(n.compartment)}if(i.set(n,a),Array.isArray(n))for(let e of n)t(e,a);else if(n instanceof mn){if(o.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(n.compartment)||n.inner;o.set(n.compartment,r),t(r,a)}else if(n instanceof pn)t(n.inner,n.prec);else if(n instanceof dn)r[a].push(n),n.provides&&t(n.provides,a);else if(n instanceof rn)r[a].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,a)}}(t,2),r.reduce(((t,e)=>t.concat(e)))}(t,e,n))o instanceof dn?r.push(o):(i[o.facet.id]||(i[o.facet.id]=[])).push(o);let a=Object.create(null),s=[],l=[];for(let t of r)a[t.id]=l.length<<1,l.push((e=>t.slot(e)));let d=null==o?void 0:o.config.facets;for(let t in i){let e=i[t],r=e[0].facet,n=d&&d[t]||[];if(e.every((t=>0==t.type)))if(a[r.id]=s.length<<1|1,on(n,e))s.push(o.facet(r));else{let t=r.combine(e.map((t=>t.value)));s.push(o&&r.compare(t,o.facet(r))?o.facet(r):t)}else{for(let t of e)0==t.type?(a[t.id]=s.length<<1|1,s.push(t.value)):(a[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));a[r.id]=l.length<<1,l.push((t=>sn(t,r,e)))}}let c=l.map((t=>t(a)));return new fn(t,n,c,a,s,i)}}function bn(t,e){if(1&e)return 2;let o=e>>1,r=t.status[o];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[o]=4;let i=t.computeSlot(t,t.config.dynamicSlots[o]);return t.status[o]=2|i}function gn(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const vn=en.define(),On=en.define({combine:t=>t.some((t=>t)),static:!0}),yn=en.define({combine:t=>t.length?t[0]:void 0,static:!0}),xn=en.define(),wn=en.define(),kn=en.define(),qn=en.define({combine:t=>!!t.length&&t[0]});class Sn{constructor(t,e){this.type=t,this.value=e}static define(){return new Qn}}class Qn{of(t){return new Sn(this,t)}}class $n{constructor(t){this.map=t}of(t){return new Pn(this,t)}}class Pn{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Pn(this.type,e)}is(t){return this.type==t}static define(t={}){return new $n(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let o=[];for(let r of t){let t=r.map(e);t&&o.push(t)}return o}}Pn.reconfigure=Pn.define(),Pn.appendConfig=Pn.define();class Cn{constructor(t,e,o,r,i,n){this.startState=t,this.changes=e,this.selection=o,this.effects=r,this.annotations=i,this.scrollIntoView=n,this._doc=null,this._state=null,o&&Ji(o,e.newLength),i.some((t=>t.type==Cn.time))||(this.annotations=i.concat(Cn.time.of(Date.now())))}static create(t,e,o,r,i,n){return new Cn(t,e,o,r,i,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(Cn.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Rn(t,e){let o=[];for(let r=0,i=0;;){let n,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))n=t[r++],a=t[r++];else{if(!(i<e.length))return o;n=e[i++],a=e[i++]}!o.length||o[o.length-1]<n?o.push(n,a):o[o.length-1]<a&&(o[o.length-1]=a)}}function Zn(t,e,o){var r;let i,n,a;return o?(i=e.changes,n=Wi.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(n):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:Pn.mapEffects(t.effects,i).concat(Pn.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Tn(t,e,o){let r=e.selection,i=En(e.annotations);return e.userEvent&&(i=i.concat(Cn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Wi?e.changes:Wi.of(e.changes||[],o,t.facet(yn)),selection:r&&(r instanceof Ki?r:Ki.single(r.anchor,r.head)),effects:En(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function An(t,e,o){let r=Tn(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(o=!1);for(let i=1;i<e.length;i++){!1===e[i].filter&&(o=!1);let n=!!e[i].sequential;r=Zn(r,Tn(t,e[i],n?r.changes.newLength:t.doc.length),n)}let i=Cn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,o=e.facet(kn),r=t;for(let i=o.length-1;i>=0;i--){let n=o[i](t);n&&Object.keys(n).length&&(r=Zn(r,Tn(e,n,t.changes.newLength),!0))}return r==t?t:Cn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(o?function(t){let e=t.startState,o=!0;for(let r of e.facet(xn)){let e=r(t);if(!1===e){o=!1;break}Array.isArray(e)&&(o=!0===o?e:Rn(o,e))}if(!0!==o){let r,i;if(!1===o)i=t.changes.invertedDesc,r=Wi.empty(e.doc.length);else{let e=t.changes.filter(o);r=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=Cn.create(e,r,t.selection&&t.selection.map(i),Pn.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(wn);for(let o=r.length-1;o>=0;o--){let i=r[o](t);t=i instanceof Cn?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Cn?i[0]:An(e,En(i),!1)}return t}(i):i)}Cn.time=Sn.define(),Cn.userEvent=Sn.define(),Cn.addToHistory=Sn.define(),Cn.remote=Sn.define();const Mn=[];function En(t){return null==t?Mn:Array.isArray(t)?t:[t]}var jn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(jn||(jn={}));const zn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xn;try{Xn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Zt){}class _n{constructor(t,e,o,r,i,n){this.config=t,this.doc=e,this.selection=o,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=i,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)bn(this,t<<1);this.computeSlot=null}field(t,e=!0){let o=this.config.address[t.id];if(null!=o)return bn(this,o),gn(this,o);if(e)throw new RangeError("Field is not present in this state")}update(...t){return An(this,t,!0)}applyTransaction(t){let e,o=this.config,{base:r,compartments:i}=o;for(let e of t.effects)e.is(un.reconfigure)?(o&&(i=new Map,o.compartments.forEach(((t,e)=>i.set(e,t))),o=null),i.set(e.value.compartment,e.value.extension)):e.is(Pn.reconfigure)?(o=null,r=e.value):e.is(Pn.appendConfig)&&(o=null,r=En(r).concat(e.value));o?e=t.startState.values.slice():(o=fn.resolve(r,i,this),e=new _n(o,this.doc,this.selection,o.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let n=t.startState.facet(On)?t.newSelection:t.newSelection.asSingle();new _n(o,t.newDoc,n,e,((e,o)=>o.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:Ki.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,o=t(e.ranges[0]),r=this.changes(o.changes),i=[o.range],n=En(o.effects);for(let o=1;o<e.ranges.length;o++){let a=t(e.ranges[o]),s=this.changes(a.changes),l=s.map(r);for(let t=0;t<o;t++)i[t]=i[t].map(l);let d=r.mapDesc(s,!0);i.push(a.range.map(d)),r=r.compose(l),n=Pn.mapEffects(n,l).concat(Pn.mapEffects(En(a.effects),d))}return{changes:r,selection:Ki.create(i,e.mainIndex),effects:n}}changes(t=[]){return t instanceof Wi?t:Wi.of(t,this.doc.length,this.facet(_n.lineSeparator))}toText(t){return $i.of(t.split(this.facet(_n.lineSeparator)||Ui))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(bn(this,e),gn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let o in t){let r=t[o];r instanceof dn&&null!=this.config.address[r.id]&&(e[o]=r.spec.toJSON(this.field(t[o]),this))}return e}static fromJSON(t,e={},o){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o)for(let e in o)if(Object.prototype.hasOwnProperty.call(t,e)){let i=o[e],n=t[e];r.push(i.init((t=>i.spec.fromJSON(n,t))))}return _n.create({doc:t.doc,selection:Ki.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=fn.resolve(t.extensions||[],new Map),o=t.doc instanceof $i?t.doc:$i.of((t.doc||"").split(e.staticFacet(_n.lineSeparator)||Ui)),r=t.selection?t.selection instanceof Ki?t.selection:Ki.single(t.selection.anchor,t.selection.head):Ki.single(0);return Ji(r,o.length),e.staticFacet(On)||(r=r.asSingle()),new _n(e,o,r,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(_n.tabSize)}get lineBreak(){return this.facet(_n.lineSeparator)||"\n"}get readOnly(){return this.facet(qn)}phrase(t,...e){for(let e of this.facet(_n.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,o)=>{if("$"==o)return"$";let r=+(o||1);return!r||r>e.length?t:e[r-1]}))),t}languageDataAt(t,e,o=-1){let r=[];for(let i of this.facet(vn))for(let n of i(this,e,o))Object.prototype.hasOwnProperty.call(n,t)&&r.push(n[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return jn.Space;if(function(t){if(Xn)return Xn.test(t);for(let e=0;e<t.length;e++){let o=t[e];if(/\w/.test(o)||o>""&&(o.toUpperCase()!=o.toLowerCase()||zn.test(o)))return!0}return!1}(t))return jn.Word;for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return jn.Word;return jn.Other};var e}wordAt(t){let{text:e,from:o,length:r}=this.doc.lineAt(t),i=this.charCategorizer(t),n=t-o,a=t-o;for(;n>0;){let t=zi(e,n,!1);if(i(e.slice(t,n))!=jn.Word)break;n=t}for(;a<r;){let t=zi(e,a);if(i(e.slice(a,t))!=jn.Word)break;a=t}return n==a?null:Ki.range(n+o,a+o)}}function Dn(t,e,o={}){let r={};for(let e of t)for(let t of Object.keys(e)){let i=e[t],n=r[t];if(void 0===n)r[t]=i;else if(n===i||void 0===i);else{if(!Object.hasOwnProperty.call(o,t))throw new Error("Config merge conflict for field "+t);r[t]=o[t](n,i)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}_n.allowMultipleSelections=On,_n.tabSize=en.define({combine:t=>t.length?t[0]:4}),_n.lineSeparator=yn,_n.readOnly=qn,_n.phrases=en.define({compare(t,e){let o=Object.keys(t),r=Object.keys(e);return o.length==r.length&&o.every((o=>t[o]==e[o]))}}),_n.languageData=vn,_n.changeFilter=xn,_n.transactionFilter=wn,_n.transactionExtender=kn,un.reconfigure=Pn.define();class Un{eq(t){return this==t}range(t,e=t){return Vn.create(t,e,this)}}Un.prototype.startSide=Un.prototype.endSide=0,Un.prototype.point=!1,Un.prototype.mapMode=Vi.TrackDel;class Vn{constructor(t,e,o){this.from=t,this.to=e,this.value=o}static create(t,e,o){return new Vn(t,e,o)}}function Ln(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Wn{constructor(t,e,o,r){this.from=t,this.to=e,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,o,r=0){let i=o?this.to:this.from;for(let n=r,a=i.length;;){if(n==a)return n;let r=n+a>>1,s=i[r]-t||(o?this.value[r].endSide:this.value[r].startSide)-e;if(r==n)return s>=0?n:a;s>=0?a=r:n=r+1}}between(t,e,o,r){for(let i=this.findIndex(e,-1e9,!0),n=this.findIndex(o,1e9,!1,i);i<n;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}map(t,e){let o=[],r=[],i=[],n=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,d,c=this.value[s],h=this.from[s]+t,p=this.to[s]+t;if(h==p){let t=e.mapPos(h,c.startSide,c.mapMode);if(null==t)continue;if(l=d=t,c.startSide!=c.endSide&&(d=e.mapPos(h,c.endSide),d<l))continue}else if(l=e.mapPos(h,c.startSide),d=e.mapPos(p,c.endSide),l>d||l==d&&c.startSide>0&&c.endSide<=0)continue;(d-l||c.endSide-c.startSide)<0||(n<0&&(n=l),c.point&&(a=Math.max(a,d-l)),o.push(c),r.push(l-n),i.push(d-n))}return{mapped:o.length?new Wn(r,i,o,a):null,pos:n}}}class Bn{constructor(t,e,o,r){this.chunkPos=t,this.chunk=e,this.nextLayer=o,this.maxPoint=r}static create(t,e,o,r){return new Bn(t,e,o,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:o=!1,filterFrom:r=0,filterTo:i=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(o&&(e=e.slice().sort(Ln)),this.isEmpty)return e.length?Bn.of(e):this;let a=new Nn(this,null,-1).goto(0),s=0,l=[],d=new Yn;for(;a.value||s<e.length;)if(s<e.length&&(a.from-e[s].from||a.startSide-e[s].value.startSide)>=0){let t=e[s++];d.addInner(t.from,t.to,t.value)||l.push(t)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==e.length||this.chunkEnd(a.chunkIndex)<e[s].from)&&(!n||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&d.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!n||r>a.to||i<a.from||n(a.from,a.to,a.value))&&(d.addInner(a.from,a.to,a.value)||l.push(Vn.create(a.from,a.to,a.value))),a.next());return d.finishInner(this.nextLayer.isEmpty&&!l.length?Bn.empty:this.nextLayer.update({add:l,filter:n,filterFrom:r,filterTo:i}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],o=[],r=-1;for(let i=0;i<this.chunk.length;i++){let n=this.chunkPos[i],a=this.chunk[i],s=t.touchesRange(n,n+a.length);if(!1===s)r=Math.max(r,a.maxPoint),e.push(a),o.push(t.mapPos(n));else if(!0===s){let{mapped:i,pos:s}=a.map(n,t);i&&(r=Math.max(r,i.maxPoint),e.push(i),o.push(s))}}let i=this.nextLayer.map(t);return 0==e.length?i:new Bn(o,e,i||Bn.empty,r)}between(t,e,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],n=this.chunk[r];if(e>=i&&t<=i+n.length&&!1===n.between(i,t-i,e-i,o))return}this.nextLayer.between(t,e,o)}}iter(t=0){return Gn.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Gn.from(t).goto(e)}static compare(t,e,o,r,i=-1){let n=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),a=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),s=In(n,a,o),l=new Hn(n,s,i),d=new Hn(a,s,i);o.iterGaps(((t,e,o)=>Kn(l,t,d,e,o,r))),o.empty&&0==o.length&&Kn(l,0,d,0,0,r)}static eq(t,e,o=0,r){null==r&&(r=999999999);let i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),n=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(i.length!=n.length)return!1;if(!i.length)return!0;let a=In(i,n),s=new Hn(i,a,0).goto(o),l=new Hn(n,a,0).goto(o);for(;;){if(s.to!=l.to||!Jn(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(t,e,o,r,i=-1){let n=new Hn(t,null,i).goto(e),a=e,s=n.openStart;for(;;){let t=Math.min(n.to,o);if(n.point){let o=n.activeForPoint(n.to),i=n.pointFrom<e?o.length+1:n.point.startSide<0?o.length:Math.min(o.length,s);r.point(a,t,n.point,o,i,n.pointRank),s=Math.min(n.openEnd(t),o.length)}else t>a&&(r.span(a,t,n.active,s),s=n.openEnd(t));if(n.to>o)return s+(n.point&&n.to>o?1:0);a=n.to,n.next()}}static of(t,e=!1){let o=new Yn;for(let r of t instanceof Vn?[t]:e?function(t){if(t.length>1)for(let e=t[0],o=1;o<t.length;o++){let r=t[o];if(Ln(e,r)>0)return t.slice().sort(Ln);e=r}return t}(t):t)o.add(r.from,r.to,r.value);return o.finish()}static join(t){if(!t.length)return Bn.empty;let e=t[t.length-1];for(let o=t.length-2;o>=0;o--)for(let r=t[o];r!=Bn.empty;r=r.nextLayer)e=new Bn(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}Bn.empty=new Bn([],[],null,-1),Bn.empty.nextLayer=Bn.empty;class Yn{finishChunk(t){this.chunks.push(new Wn(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,t&&(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(t,e,o){this.addInner(t,e,o)||(this.nextLayer||(this.nextLayer=new Yn)).add(t,e,o)}addInner(t,e,o){let r=t-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=o,this.lastFrom=t,this.lastTo=e,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let o=e.value.length-1;return this.last=e.value[o],this.lastFrom=e.from[o]+t,this.lastTo=e.to[o]+t,!0}finish(){return this.finishInner(Bn.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Bn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function In(t,e,o){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let i=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=r.get(t.chunk[e]);null==n||(o?o.mapPos(n):n)!=t.chunkPos[e]||(null==o?void 0:o.touchesRange(n,n+t.chunk[e].length))||i.add(t.chunk[e])}return i}class Nn{constructor(t,e,o,r=0){this.layer=t,this.skip=e,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,o){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],o=t+e.from[this.rangeIndex];if(this.from=o,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==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=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Gn{constructor(t){this.heap=t}static from(t,e=null,o=-1){let r=[];for(let i=0;i<t.length;i++)for(let n=t[i];!n.isEmpty;n=n.nextLayer)n.maxPoint>=o&&r.push(new Nn(n,e,o,i));return 1==r.length?r[0]:new Gn(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let o of this.heap)o.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Fn(this.heap,t);return this.next(),this}forward(t,e){for(let o of this.heap)o.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Fn(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Fn(this.heap,0)}}}function Fn(t,e){for(let o=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),o.compare(i)<0)break;t[r]=o,t[e]=i,e=r}}class Hn{constructor(t,e,o){this.minPoint=o,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=Gn.from(t,e,o)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){ta(this.active,t),ta(this.activeTo,t),ta(this.activeRank,t),this.minActive=oa(this.active,this.activeTo)}addActive(t){let e=0,{value:o,to:r,rank:i}=this.cursor;for(;e<this.activeRank.length&&(i-this.activeRank[e]||r-this.activeTo[e])>0;)e++;ea(this.active,e,o),ea(this.activeTo,e,r),ea(this.activeRank,e,i),t&&ea(t,e,this.cursor.from),this.minActive=oa(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let o=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]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&ta(o,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(o),this.cursor.next()}}}if(o){this.openStart=0;for(let e=o.length-1;e>=0&&o[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>t||this.activeTo[o]==t&&this.active[o].endSide>=this.point.endSide)&&e.push(this.active[o]);return e.reverse()}openEnd(t){let e=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>t;o--)e++;return e}}function Kn(t,e,o,r,i,n){t.goto(e),o.goto(r);let a=r+i,s=r,l=r-e;for(;;){let e=t.to+l-o.to,r=e||t.endSide-o.endSide,i=r<0?t.to+l:o.to,d=Math.min(i,a);if(t.point||o.point?t.point&&o.point&&(t.point==o.point||t.point.eq(o.point))&&Jn(t.activeForPoint(t.to),o.activeForPoint(o.to))||n.comparePoint(s,d,t.point,o.point):d>s&&!Jn(t.active,o.active)&&n.compareRange(s,d,t.active,o.active),i>a)break;(e||t.openEnd!=o.openEnd)&&n.boundChange&&n.boundChange(i),s=i,r<=0&&t.next(),r>=0&&o.next()}}function Jn(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!=e[o]&&!t[o].eq(e[o]))return!1;return!0}function ta(t,e){for(let o=e,r=t.length-1;o<r;o++)t[o]=t[o+1];t.pop()}function ea(t,e,o){for(let o=t.length-1;o>=e;o--)t[o+1]=t[o];t[e]=o}function oa(t,e){let o=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[o].endSide)<0&&(o=i,r=e[i]);return o}function ra(t,e,o=t.length){let r=0;for(let i=0;i<o&&i<t.length;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=zi(t,i));return r}function ia(t,e,o,r){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=9==t.charCodeAt(r)?o-i%o:1,r=zi(t,r)}return!0===r?-1:t.length}const na="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),aa="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),sa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class la{constructor(t,e){this.rules=[];let{finish:o}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function i(t,e,n,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),d=l&&"keyframes"==l[1];if(l&&null==e)return n.push(t[0]+";");for(let o in e){let a=e[o];if(/&/.test(o))i(o.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),a,n);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+o+") should be a primitive value.");i(r(o),a,s,d)}else null!=a&&s.push(o.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+a+";")}(s.length||d)&&n.push((!o||l||a?t:t.map(o)).join(", ")+" {"+s.join(" ")+"}")}for(let e in t)i(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=sa[na]||1;return sa[na]=t+1,"ͼ"+t.toString(36)}static mount(t,e,o){let r=t[aa],i=o&&o.nonce;r?i&&r.setNonce(i):r=new ca(t,i),r.mount(Array.isArray(e)?e:[e],t)}}let da=new Map;class ca{constructor(t,e){let o=t.ownerDocument||t,r=o.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=da.get(o);if(e)return t[aa]=e;this.sheet=new r.CSSStyleSheet,da.set(o,this)}else this.styleTag=o.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[aa]=this}mount(t,e){let o=this.sheet,r=0,i=0;for(let e=0;e<t.length;e++){let n=t[e],a=this.modules.indexOf(n);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),-1==a){if(this.modules.splice(i++,0,n),o)for(let t=0;t<n.rules.length;t++)o.insertRule(n.rules[t],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=n.rules.length,i++}}if(o)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let o=e.head||e;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var ha={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:"'"},pa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ua="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ma="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),fa=0;fa<10;fa++)ha[48+fa]=ha[96+fa]=String(fa);for(fa=1;fa<=24;fa++)ha[fa+111]="F"+fa;for(fa=65;fa<=90;fa++)ha[fa]=String.fromCharCode(fa+32),pa[fa]=String.fromCharCode(fa);for(var ba in ha)pa.hasOwnProperty(ba)||(pa[ba]=ha[ba]);function ga(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function va(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Oa(t,e){if(!e.anchorNode)return!1;try{return va(t,e.anchorNode)}catch(t){return!1}}function ya(t){return 3==t.nodeType?Aa(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function xa(t,e,o,r){return!!o&&(qa(t,e,o,r,-1)||qa(t,e,o,r,1))}function wa(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ka(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function qa(t,e,o,r,i){for(;;){if(t==o&&e==r)return!0;if(e==(i<0?0:Sa(t))){if("DIV"==t.nodeName)return!1;let o=t.parentNode;if(!o||1!=o.nodeType)return!1;e=wa(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?Sa(t):0}}}function Sa(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Qa(t,e){let o=e?t.left:t.right;return{left:o,right:o,top:t.top,bottom:t.bottom}}function $a(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Pa(t,e){let o=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.width-t.offsetWidth)<1)&&(o=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:o,scaleY:r}}class Ca{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:o}=t;this.set(e,Math.min(t.anchorOffset,e?Sa(e):0),o,Math.min(t.focusOffset,o?Sa(o):0))}set(t,e,o,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=o,this.focusOffset=r}}let Ra,Za=null;function Ta(t){if(t.setActive)return t.setActive();if(Za)return t.focus(Za);let e=[];for(let o=t;o&&(e.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(t.focus(null==Za?{get preventScroll(){return Za={preventScroll:!0},!0}}:void 0),!Za){Za=!1;for(let t=0;t<e.length;){let o=e[t++],r=e[t++],i=e[t++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=i&&(o.scrollLeft=i)}}}function Aa(t,e,o=e){let r=Ra||(Ra=document.createRange());return r.setEnd(t,o),r.setStart(t,e),r}function Ma(t,e,o,r){let i={key:e,code:e,keyCode:o,which:o,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let n=new KeyboardEvent("keydown",i);n.synthetic=!0,t.dispatchEvent(n);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),n.defaultPrevented||a.defaultPrevented}function Ea(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function ja(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function za(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r>0)return{node:o,offset:r};if(1==o.nodeType&&r>0){if("false"==o.contentEditable)return null;o=o.childNodes[r-1],r=Sa(o)}else{if(!o.parentNode||ka(o))return null;r=wa(o),o=o.parentNode}}}function Xa(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r<o.nodeValue.length)return{node:o,offset:r};if(1==o.nodeType&&r<o.childNodes.length){if("false"==o.contentEditable)return null;o=o.childNodes[r],r=0}else{if(!o.parentNode||ka(o))return null;r=wa(o)+1,o=o.parentNode}}}class _a{constructor(t,e,o=!0){this.node=t,this.offset=e,this.precise=o}static before(t,e){return new _a(t.parentNode,wa(t),e)}static after(t,e){return new _a(t.parentNode,wa(t)+1,e)}}const Da=[];class Ua{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let o of this.children){if(o==t)return e;e+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let o,r=this.dom,i=null;for(let n of this.children){if(7&n.flags){if(!n.dom&&(o=i?i.nextSibling:r.firstChild)){let t=Ua.get(o);(!t||!t.parent&&t.canReuseDOM(n))&&n.reuseDOM(o)}n.sync(t,e),n.flags&=-8}if(o=i?i.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&o!=n.dom&&(e.written=!0),n.dom.parentNode==r)for(;o&&o!=n.dom;)o=Va(o);else r.insertBefore(n.dom,o);i=n.dom}for(o=i?i.nextSibling:r.firstChild,o&&e&&e.node==r&&(e.written=!0);o;)o=Va(o)}else if(1&this.flags)for(let o of this.children)7&o.flags&&(o.sync(t,e),o.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let o;if(t==this.dom)o=this.dom.childNodes[e];else{let r=0==Sa(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}o=r<0?t:t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!Ua.get(o);)o=o.nextSibling;if(!o)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==o)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,o=0){let r=-1,i=-1,n=-1,a=-1;for(let s=0,l=o,d=o;s<this.children.length;s++){let o=this.children[s],c=l+o.length;if(l<t&&c>e)return o.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=s,i=l),l>e&&o.dom.parentNode==this.dom){n=s,a=d;break}d=c,l=c+o.breakAfter}return{from:i,to:a<0?o+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:n<this.children.length&&n>=0?this.children[n].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,o=Da){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&o.indexOf(t)<0&&t.destroy()}o.length<250?this.children.splice(t,e-t,...o):this.children=[].concat(this.children.slice(0,t),o,this.children.slice(e));for(let t=0;t<o.length;t++)o[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new La(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,o,r,i,n){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function Va(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}Ua.prototype.breakAfter=0;class La{constructor(t,e,o){this.children=t,this.pos=e,this.i=o,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function Wa(t,e,o,r,i,n,a,s,l){let{children:d}=t,c=d.length?d[e]:null,h=n.length?n[n.length-1]:null,p=h?h.breakAfter:a;if(!(e==r&&c&&!a&&!p&&n.length<2&&c.merge(o,i,n.length?h:null,0==o,s,l))){if(r<d.length){let t=d[r];t&&(i<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==r&&(t=t.split(i),i=0),!p&&h&&t.merge(0,i,h,!0,0,l)?n[n.length-1]=t:((i||t.children.length&&!t.children[0].length)&&t.merge(0,i,null,!1,0,l),n.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,o>0&&(!a&&n.length&&c.merge(o,c.length,n[0],!1,s,0)?c.breakAfter=n.shift().breakAfter:(o<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(o,c.length,null,!1,s,0),e++));e<r&&n.length;)if(d[r-1].become(n[n.length-1]))r--,n.pop(),l=n.length?0:s;else{if(!d[e].become(n[0]))break;e++,n.shift(),s=n.length?0:l}!n.length&&e&&r<d.length&&!d[e-1].breakAfter&&d[r].merge(0,0,d[e-1],!1,s,l)&&e--,(e<r||n.length)&&t.replaceChildren(e,r,n)}}function Ba(t,e,o,r,i,n){let a=t.childCursor(),{i:s,off:l}=a.findPos(o,1),{i:d,off:c}=a.findPos(e,-1),h=e-o;for(let t of r)h+=t.length;t.length+=h,Wa(t,d,c,s,l,r,0,i,n)}let Ya="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Ia="undefined"!=typeof document?document:{documentElement:{style:{}}};const Na=/Edge\/(\d+)/.exec(Ya.userAgent),Ga=/MSIE \d/.test(Ya.userAgent),Fa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ya.userAgent),Ha=!!(Ga||Fa||Na),Ka=!Ha&&/gecko\/(\d+)/i.test(Ya.userAgent),Ja=!Ha&&/Chrome\/(\d+)/.exec(Ya.userAgent),ts="webkitFontSmoothing"in Ia.documentElement.style,es=!Ha&&/Apple Computer/.test(Ya.vendor),os=es&&(/Mobile\/\w+/.test(Ya.userAgent)||Ya.maxTouchPoints>2);var rs={mac:os||/Mac/.test(Ya.platform),windows:/Win/.test(Ya.platform),linux:/Linux|X11/.test(Ya.platform),ie:Ha,ie_version:Ga?Ia.documentMode||6:Fa?+Fa[1]:Na?+Na[1]:0,gecko:Ka,gecko_version:Ka?+(/Firefox\/(\d+)/.exec(Ya.userAgent)||[0,0])[1]:0,chrome:!!Ja,chrome_version:Ja?+Ja[1]:0,ios:os,android:/Android\b/.test(Ya.userAgent),webkit:ts,safari:es,webkit_version:ts?+(/\bAppleWebKit\/(\d+)/.exec(Ya.userAgent)||[0,0])[1]:0,tabSize:null!=Ia.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class is extends Ua{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,o){return!(8&this.flags||o&&(!(o instanceof is)||this.length-(e-t)+o.length>256||8&o.flags)||(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new is(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new _a(this.dom,t)}domBoundsAround(t,e,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,o){let r=t.nodeValue.length;e>r&&(e=r);let i=e,n=e,a=0;0==e&&o<0||e==r&&o>=0?rs.chrome||rs.gecko||(e?(i--,a=1):n<r&&(n++,a=-1)):o<0?i--:n<r&&n++;let s=Aa(t,i,n).getClientRects();if(!s.length)return null;let l=s[(a?a<0:o>=0)?0:s.length-1];return rs.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(t=>t.width))||l),a?Qa(l,a<0):l||null}(this.dom,t,e)}}class ns extends Ua{constructor(t,e=[],o=0){super(),this.mark=t,this.children=e,this.length=o;for(let t of e)t.setParent(this)}setAttrs(t){if(Ea(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof ns&&o.mark.eq(this.mark))||t&&i<=0||e<this.length&&n<=0)||(Ba(this,t,e,o?o.children.slice():[],i-1,n-1),this.markDirty(),0))}split(t){let e=[],o=0,r=-1,i=0;for(let n of this.children){let a=o+n.length;a>t&&e.push(o<t?n.split(t-o):n),r<0&&o>=t&&(r=i),o=a,i++}let n=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new ns(this.mark,e,n)}domAtPos(t){return ls(this,t)}coordsAt(t,e){return cs(this,t,e)}}class as extends Ua{static create(t,e,o){return new as(t,e,o)}constructor(t,e,o){super(),this.widget=t,this.length=e,this.side=o,this.prevWidget=null}split(t){let e=as.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof as&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}become(t){return t instanceof as&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return $i.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,o=e&&e.state.doc,r=this.posAtStart;return o?o.slice(r,r+this.length):$i.empty}domAtPos(t){return(this.length?0==t:this.side>0)?_a.before(this.dom):_a.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let o=this.widget.coordsAt(this.dom,t,e);if(o)return o;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let n=this.side?this.side<0:t>0;for(let e=n?r.length-1:0;i=r[e],!(t>0?0==e:e==r.length-1||i.top<i.bottom);e+=n?-1:1);return Qa(i,!n)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ss extends Ua{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof ss&&t.side==this.side}split(){return new ss(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?_a.before(this.dom):_a.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return $i.empty}get isHidden(){return!0}}function ls(t,e){let o=t.dom,{children:r}=t,i=0;for(let t=0;i<r.length;i++){let n=r[i],a=t+n.length;if(!(a==t&&n.getSide()<=0)){if(e>t&&e<a&&n.dom.parentNode==o)return n.domAtPos(e-t);if(e<=t)break;t=a}}for(let t=i;t>0;t--){let e=r[t-1];if(e.dom.parentNode==o)return e.domAtPos(e.length)}for(let t=i;t<r.length;t++){let e=r[t];if(e.dom.parentNode==o)return e.domAtPos(0)}return new _a(o,0)}function ds(t,e,o){let r,{children:i}=t;o>0&&e instanceof ns&&i.length&&(r=i[i.length-1])instanceof ns&&r.mark.eq(e.mark)?ds(r,e.children[0],o-1):(i.push(e),e.setParent(t)),t.length+=e.length}function cs(t,e,o){let r=null,i=-1,n=null,a=-1;!function t(e,s){for(let l=0,d=0;l<e.children.length&&d<=s;l++){let c=e.children[l],h=d+c.length;h>=s&&(c.children.length?t(c,s-d):(!n||n.isHidden&&o>0)&&(h>s||d==h&&c.getSide()>0)?(n=c,a=s-d):(d<s||d==h&&c.getSide()<0&&!c.isHidden)&&(r=c,i=s-d)),d=h}}(t,e);let s=(o<0?r:n)||r||n;return s?s.coordsAt(Math.max(0,s==r?i:a),o):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let o=ya(e);return o[o.length-1]||null}(t)}function hs(t,e){for(let o in t)"class"==o&&e.class?e.class+=" "+t.class:"style"==o&&e.style?e.style+=";"+t.style:e[o]=t[o];return e}is.prototype.children=as.prototype.children=ss.prototype.children=Da;const ps=Object.create(null);function us(t,e,o){if(t==e)return!0;t||(t=ps),e||(e=ps);let r=Object.keys(t),i=Object.keys(e);if(r.length-(o&&r.indexOf(o)>-1?1:0)!=i.length-(o&&i.indexOf(o)>-1?1:0))return!1;for(let n of r)if(n!=o&&(-1==i.indexOf(n)||t[n]!==e[n]))return!1;return!0}function ms(t,e,o){let r=!1;if(e)for(let i in e)o&&i in o||(r=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(o)for(let i in o)e&&e[i]==o[i]||(r=!0,"style"==i?t.style.cssText=o[i]:t.setAttribute(i,o[i]));return r}function fs(t){let e=Object.create(null);for(let o=0;o<t.attributes.length;o++){let r=t.attributes[o];e[r.name]=r.value}return e}class bs{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var gs=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(gs||(gs={}));class vs extends Un{constructor(t,e,o,r){super(),this.startSide=t,this.endSide=e,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Os(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),o=!!t.block;return e+=o&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new xs(t,e,e,o,t.widget||null,!1)}static replace(t){let e,o,r=!!t.block;if(t.isBlockGap)e=-5e8,o=4e8;else{let{start:i,end:n}=ws(t,r);e=(i?r?-3e8:-1:5e8)-1,o=1+(n?r?2e8:1:-6e8)}return new xs(t,e,o,r,t.widget||null,!0)}static line(t){return new ys(t)}static set(t,e=!1){return Bn.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}vs.none=Bn.empty;class Os extends vs{constructor(t){let{start:e,end:o}=ws(t);super(e?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,o;return this==t||t instanceof Os&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(o=t.attrs)||void 0===o?void 0:o.class))&&us(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Os.prototype.point=!1;class ys extends vs{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof ys&&this.spec.class==t.spec.class&&us(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}ys.prototype.mapMode=Vi.TrackBefore,ys.prototype.point=!0;class xs extends vs{constructor(t,e,o,r,i,n){super(e,o,i,t),this.block=r,this.isReplace=n,this.mapMode=r?e<=0?Vi.TrackBefore:Vi.TrackAfter:Vi.TrackDel}get type(){return this.startSide!=this.endSide?gs.WidgetRange:this.startSide<=0?gs.WidgetBefore:gs.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof xs&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function ws(t,e=!1){let{inclusiveStart:o,inclusiveEnd:r}=t;return null==o&&(o=t.inclusive),null==r&&(r=t.inclusive),{start:null!=o?o:e,end:null!=r?r:e}}function ks(t,e,o,r=0){let i=o.length-1;i>=0&&o[i]+r>=t?o[i]=Math.max(o[i],e):o.push(t,e)}xs.prototype.point=!0;class qs extends Ua{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,o,r,i,n){if(o){if(!(o instanceof qs))return!1;this.dom||o.transferDOM(this)}return r&&this.setDeco(o?o.attrs:null),Ba(this,t,e,o?o.children.slice():[],i,n),!0}split(t){let e=new qs;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:o,off:r}=this.childPos(t);r&&(e.append(this.children[o].split(r),0),this.children[o].merge(r,this.children[o].length,null,!1,0,0),o++);for(let t=o;t<this.children.length;t++)e.append(this.children[t],0);for(;o>0&&0==this.children[o-1].length;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){us(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){ds(this,t,e)}addLineDeco(t){let e=t.spec.attributes,o=t.spec.class;e&&(this.attrs=hs(e,this.attrs||{})),o&&(this.attrs=hs({class:o},this.attrs||{}))}domAtPos(t){return ls(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var o;this.dom?4&this.flags&&(Ea(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(ms(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&Ua.get(r)instanceof ns;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(o=Ua.get(r))||void 0===o?void 0:o.isEditable)||rs.ios&&this.children.some((t=>t instanceof is))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let o of this.children){if(!(o instanceof is)||/[^ -~]/.test(o.text))return null;let r=ya(o.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let o=cs(this,t,e);if(!this.children.length&&o&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=o.bottom-o.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:o.top+r,bottom:o.bottom-r,left:o.left,right:o.left}}}return o}become(t){return t instanceof qs&&0==this.children.length&&0==t.children.length&&us(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let o=0,r=0;o<t.children.length;o++){let i=t.children[o],n=r+i.length;if(n>=e){if(i instanceof qs)return i;if(n>e)break}r=n+i.breakAfter}return null}}class Ss extends Ua{constructor(t,e,o){super(),this.widget=t,this.length=e,this.deco=o,this.breakAfter=0,this.prevWidget=null}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Ss&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?_a.before(this.dom):_a.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let o=new Ss(this.widget,e,this.deco);return o.breakAfter=this.breakAfter,o}get children(){return Da}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):$i.empty}domBoundsAround(){return null}become(t){return t instanceof Ss&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof Qs?null:Qa(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:o}=this.deco;return e!=o&&(t<0?e<0:o>0)}}class Qs extends bs{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class $s{constructor(t,e,o,r){this.doc=t,this.pos=e,this.end=o,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Ss&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new qs),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Ps(new ss(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Ss||this.getLine()}buildText(t,e,o){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:o,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-o)),this.getLine().append(Ps(new is(this.text.slice(this.textOff,this.textOff+r)),e),o),this.atCursorPos=!0,this.textOff+=r,t-=r,o=0}}span(t,e,o,r){this.buildText(e-t,o,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,o,r,i,n){if(this.disallowBlockEffectsFor[n]&&o instanceof xs){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=e-t;if(o instanceof xs)if(o.block)o.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ss(o.widget||Cs.block,a,o));else{let n=as.create(o.widget||Cs.inline,a,a?0:o.startSide),s=this.atCursorPos&&!n.isEditable&&i<=r.length&&(t<e||o.startSide>0),l=!n.isEditable&&(t<e||i>r.length||o.startSide<=0),d=this.getLine();2!=this.pendingBuffer||s||n.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(d.append(Ps(new ss(1),r),i),i=r.length+Math.max(0,i-r.length)),d.append(Ps(n,r),i),this.atCursorPos=l,this.pendingBuffer=l?t<e||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,o,r,i){let n=new $s(t,e,o,i);return n.openEnd=Bn.spans(r,e,o,n),n.openStart<0&&(n.openStart=n.openEnd),n.finish(n.openEnd),n}}function Ps(t,e){for(let o of e)t=new ns(o,[t],t.length);return t}class Cs extends bs{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Cs.inline=new Cs("span"),Cs.block=new Cs("div");var Rs=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Rs||(Rs={}));const Zs=Rs.LTR,Ts=Rs.RTL;function As(t){let e=[];for(let o=0;o<t.length;o++)e.push(1<<+t[o]);return e}const Ms=As("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Es=As("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),js=Object.create(null),zs=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),o=t.charCodeAt(1);js[e]=o,js[o]=-e}function Xs(t){return t<=247?Ms[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?Es[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const _s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ds{get dir(){return this.level%2?Ts:Zs}constructor(t,e,o){this.from=t,this.to=e,this.level=o}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,o,r){let i=-1;for(let n=0;n<t.length;n++){let a=t[n];if(a.from<=e&&a.to>=e){if(a.level==o)return n;(i<0||(0!=r?r<0?a.from<e:a.to>e:t[i].level>a.level))&&(i=n)}}if(i<0)throw new RangeError("Index out of range");return i}}function Us(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Us(r.inner,i.inner))return!1}return!0}const Vs=[];function Ls(t,e,o,r,i,n,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,d=0;l<o;){let e=!0,c=!1;if(d==n.length||l<n[d].from){let t=Vs[l];t!=s&&(e=!1,c=16==t)}let h=e||1!=s?null:[],p=e?r:r+1,u=l;t:for(;;)if(d<n.length&&u==n[d].from){if(c)break t;let m=n[d];if(!e)for(let t=m.to,e=d+1;;){if(t==o)break t;if(!(e<n.length&&n[e].from==t)){if(Vs[t]==s)break t;break}t=n[e++].to}d++,h?h.push(m):(m.from>l&&a.push(new Ds(l,m.from,p)),Ws(t,m.direction==Zs!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.to),u=m.to}else{if(u==o||(e?Vs[u]!=s:Vs[u]==s))break;u++}h?Ls(t,l,u,r+1,i,h,a):l<u&&a.push(new Ds(l,u,p)),l=u}else for(let l=o,d=n.length;l>e;){let o=!0,c=!1;if(!d||l>n[d-1].to){let t=Vs[l-1];t!=s&&(o=!1,c=16==t)}let h=o||1!=s?null:[],p=o?r:r+1,u=l;t:for(;;)if(d&&u==n[d-1].to){if(c)break t;let m=n[--d];if(!o)for(let t=m.from,o=d;;){if(t==e)break t;if(!o||n[o-1].to!=t){if(Vs[t-1]==s)break t;break}t=n[--o].from}h?h.push(m):(m.to<l&&a.push(new Ds(m.to,l,p)),Ws(t,m.direction==Zs!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.from),u=m.from}else{if(u==e||(o?Vs[u-1]!=s:Vs[u-1]==s))break;u--}h?Ls(t,u,l,r+1,i,h,a):u<l&&a.push(new Ds(u,l,p)),l=u}}function Ws(t,e,o,r,i,n,a){let s=e%2?2:1;!function(t,e,o,r,i){for(let n=0;n<=r.length;n++){let a=n?r[n-1].to:e,s=n<r.length?r[n].from:o,l=n?256:i;for(let e=a,o=l,r=l;e<s;e++){let i=Xs(t.charCodeAt(e));512==i?i=o:8==i&&4==r&&(i=16),Vs[e]=4==i?2:i,7&i&&(r=i),o=i}for(let t=a,e=l,r=l;t<s;t++){let i=Vs[t];if(128==i)t<s-1&&e==Vs[t+1]&&24&e?i=Vs[t]=e:Vs[t]=256;else if(64==i){let i=t+1;for(;i<s&&64==Vs[i];)i++;let n=t&&8==e||i<o&&8==Vs[i]?1==r?1:8:256;for(let e=t;e<i;e++)Vs[e]=n;t=i-1}else 8==i&&1==r&&(Vs[t]=1);e=i,7&i&&(r=i)}}}(t,i,n,r,s),function(t,e,o,r,i){let n=1==i?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let d=a?r[a-1].to:e,c=a<r.length?r[a].from:o;for(let e,o,r,a=d;a<c;a++)if(o=js[e=t.charCodeAt(a)])if(o<0){for(let t=s-3;t>=0;t-=3)if(zs[t+1]==-o){let e=zs[t+2],o=2&e?i:4&e?1&e?n:i:0;o&&(Vs[a]=Vs[zs[t]]=o),s=t;break}}else{if(189==zs.length)break;zs[s++]=a,zs[s++]=e,zs[s++]=l}else if(2==(r=Vs[a])||1==r){let t=r==i;l=t?0:1;for(let e=s-3;e>=0;e-=3){let o=zs[e+2];if(2&o)break;if(t)zs[e+2]|=2;else{if(4&o)break;zs[e+2]|=4}}}}}(t,i,n,r,s),function(t,e,o,r){for(let i=0,n=r;i<=o.length;i++){let a=i?o[i-1].to:t,s=i<o.length?o[i].from:e;for(let l=a;l<s;){let a=Vs[l];if(256==a){let a=l+1;for(;;)if(a==s){if(i==o.length)break;a=o[i++].to,s=i<o.length?o[i].from:e}else{if(256!=Vs[a])break;a++}let d=1==n,c=d==(1==(a<e?Vs[a]:r))?d?1:2:r;for(let e=a,r=i,n=r?o[r-1].to:t;e>l;)e==n&&(e=o[--r].from,n=r?o[r-1].to:t),Vs[--e]=c;l=a}else n=a,l++}}}(i,n,r,s),Ls(t,i,n,e,o,r,a)}function Bs(t){return[new Ds(0,t,0)]}let Ys="";function Is(t,e,o,r,i){var n;let a=r.head-t.from,s=Ds.find(e,a,null!==(n=r.bidiLevel)&&void 0!==n?n:-1,r.assoc),l=e[s],d=l.side(i,o);if(a==d){let t=s+=i?1:-1;if(t<0||t>=e.length)return null;l=e[s=t],a=l.side(!i,o),d=l.side(i,o)}let c=zi(t.text,a,l.forward(i,o));(c<l.from||c>l.to)&&(c=d),Ys=t.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return h&&c==d&&h.level+(i?0:1)<l.level?Ki.cursor(h.side(!i,o)+t.from,h.forward(i,o)?1:-1,h.level):Ki.cursor(c+t.from,l.forward(i,o)?-1:1,l.level)}function Ns(t,e,o){for(let r=e;r<o;r++){let e=Xs(t.charCodeAt(r));if(1==e)return Zs;if(2==e||4==e)return Ts}return Zs}const Gs=en.define(),Fs=en.define(),Hs=en.define(),Ks=en.define(),Js=en.define(),tl=en.define(),el=en.define(),ol=en.define(),rl=en.define(),il=en.define({combine:t=>t.some((t=>t))}),nl=en.define({combine:t=>t.some((t=>t))}),al=en.define();class sl{constructor(t,e="nearest",o="nearest",r=5,i=5,n=!1){this.range=t,this.y=e,this.x=o,this.yMargin=r,this.xMargin=i,this.isSnapshot=n}map(t){return t.empty?this:new sl(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 sl(Ki.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ll=Pn.define({map:(t,e)=>t.map(e)}),dl=Pn.define();function cl(t,e,o){let r=t.facet(Ks);r.length?r[0](e):window.onerror?window.onerror(String(e),o,void 0,void 0,e):o?console.error(o+":",e):console.error(e)}const hl=en.define({combine:t=>!t.length||t[0]});let pl=0;const ul=en.define();class ml{constructor(t,e,o,r,i){this.id=t,this.create=e,this.domEventHandlers=o,this.domEventObservers=r,this.extension=i(this)}static define(t,e){const{eventHandlers:o,eventObservers:r,provide:i,decorations:n}=e||{};return new ml(pl++,t,o,r,(t=>{let e=[ul.of(t)];return n&&e.push(vl.of((e=>{let o=e.plugin(t);return o?n(o):vs.none}))),i&&e.push(i(t)),e}))}static fromClass(t,e){return ml.define((e=>new t(e)),e)}}class fl{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(cl(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){cl(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){cl(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const bl=en.define(),gl=en.define(),vl=en.define(),Ol=en.define(),yl=en.define(),xl=en.define();function wl(t,e){let o=t.state.facet(xl);if(!o.length)return o;let r=o.map((e=>e instanceof Function?e(t):e)),i=[];return Bn.spans(r,e.from,e.to,{point(){},span(t,o,r,n){let a=t-e.from,s=o-e.from,l=i;for(let t=r.length-1;t>=0;t--,n--){let o,i=r[t].spec.bidiIsolate;if(null==i&&(i=Ns(e.text,a,s)),n>0&&l.length&&(o=l[l.length-1]).to==a&&o.direction==i)o.to=s,l=o.inner;else{let t={from:a,to:s,direction:i,inner:[]};l.push(t),l=t.inner}}}}),i}const kl=en.define();function ql(t){let e=0,o=0,r=0,i=0;for(let n of t.state.facet(kl)){let a=n(t);a&&(null!=a.left&&(e=Math.max(e,a.left)),null!=a.right&&(o=Math.max(o,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(i=Math.max(i,a.bottom)))}return{left:e,right:o,top:r,bottom:i}}const Sl=en.define();class Ql{constructor(t,e,o,r){this.fromA=t,this.toA=e,this.fromB=o,this.toB=r}join(t){return new Ql(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(t){let e=t.length,o=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),t.splice(e-1,1)}}return t.splice(e,0,o),t}static extendWithRanges(t,e){if(0==e.length)return t;let o=[];for(let r=0,i=0,n=0,a=0;;r++){let s=r==t.length?null:t[r],l=n-a,d=s?s.fromB:1e9;for(;i<e.length&&e[i]<d;){let t=e[i],r=e[i+1],n=Math.max(a,t),s=Math.min(d,r);if(n<=s&&new Ql(n+l,s+l,n,s).addToSet(o),r>d)break;i+=2}if(!s)return o;new Ql(s.fromA,s.toA,s.fromB,s.toB).addToSet(o),n=s.toA,a=s.toB}}}class $l{constructor(t,e,o){this.view=t,this.state=e,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=Wi.empty(this.startState.doc.length);for(let t of o)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges(((t,e,o,i)=>r.push(new Ql(t,e,o,i)))),this.changedRanges=r}static create(t,e,o){return new $l(t,e,o)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Pl extends Ua{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=vs.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.setDOM(t.contentDOM),this.children=[new qs],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ql(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let o=t.changedRanges;this.minWidth>0&&o.length&&(o.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let o=!1;return e&&t.iterChangedRanges(((t,r)=>{t<e.to&&r>e.from&&(o=!0)})),o}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let i=r>-1?function(t,e,o){let r=Cl(t,o);if(!r)return null;let{node:i,from:n,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s))return null;if(t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,d=new Ql(l.mapPos(n),l.mapPos(a),n,a),c=[];for(let e=i.parentNode;;e=e.parentNode){let o=Ua.get(e);if(o instanceof ns)c.push({node:e,deco:o.mark});else{if(o instanceof qs||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:d,text:i,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Os({inclusive:!0,attributes:fs(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;o=new Ql(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(o.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(rs.ie||rs.chrome)&&!i&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let n=function(t,e,o){let r=new Rl;return Bn.compare(t,e,o,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return o=Ql.extendWithRanges(o,n),!!(7&this.flags||0!=o.length)&&(this.updateInner(o,t.startState.doc.length,i),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,o){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,o);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=rs.chrome||rs.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof Ss&&t.widget instanceof Qs&&i.push(t.dom);r.updateGaps(i)}updateChildren(t,e,o){let r=o?o.range.addToSet(t.slice()):t,i=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let n,a,s,l,{fromA:d,toA:c,fromB:h,toB:p}=e;if(o&&o.range.fromB<p&&o.range.toB>h){let t=$s.build(this.view.state.doc,h,o.range.fromB,this.decorations,this.dynamicDecorationMap),e=$s.build(this.view.state.doc,o.range.toB,p,this.decorations,this.dynamicDecorationMap);a=t.breakAtStart,s=t.openStart,l=e.openEnd;let r=this.compositionView(o);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),n=t.content.concat(r).concat(e.content)}else({content:n,breakAtStart:a,openStart:s,openEnd:l}=$s.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:u,off:m}=i.findPos(c,1),{i:f,off:b}=i.findPos(d,-1);Wa(this,f,b,u,m,n,a,s,l)}o&&this.fixCompositionDOM(o)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(dl)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new is(t.text.nodeValue);e.flags|=8;for(let{deco:o}of t.marks)e=new ns(o,[e],e.length);let o=new qs;return o.append(e,0),o}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let o=Ua.get(t);o&&o!=e&&(o.dom=null),e.setDOM(t)},o=this.childPos(t.range.fromB,1),r=this.children[o.i];e(t.line,r);for(let i=t.marks.length-1;i>=-1;i--)o=r.childPos(o.off,1),r=r.children[o.i],e(i>=0?t.marks[i].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let o=this.view.root.activeElement,r=o==this.dom,i=!r&&!(this.view.state.facet(hl)||this.dom.tabIndex>-1)&&Oa(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(!(r||e||i))return;let n=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(rs.gecko&&a.empty&&!this.hasComposition&&1==(d=s).node.nodeType&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=l=new _a(t,0),n=!0}var d;let c=this.view.observer.selectionRange;!n&&c.focusNode&&(xa(s.node,s.offset,c.anchorNode,c.anchorOffset)&&xa(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore((()=>{rs.android&&rs.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let o=t;o&&o!=e;o=o.assignedSlot||o.parentNode)if(1==o.nodeType&&"false"==o.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=ga(this.view.root);if(t)if(a.empty){if(rs.gecko){let t=(e=s.node,r=s.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?za:Xa)(s.node,s.offset);e&&(s=new _a(e.node,e.offset))}}t.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=a.bidiLevel)}else if(t.extend){t.collapse(s.node,s.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),e.setEnd(l.node,l.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),o&&o.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new _a(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new _a(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&xa(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,o=ga(t.root),{anchorNode:r,anchorOffset:i}=t.observer.selectionRange;if(!(o&&e.empty&&e.assoc&&o.modify))return;let n=qs.find(this,e.head);if(!n)return;let a=n.posAtStart;if(e.head==a||e.head==a+n.length)return;let s=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!s||!l||s.bottom>l.top)return;let d=this.domAtPos(e.head+e.assoc);o.collapse(d.node,d.offset),o.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&o.collapse(r,i)}moveToLine(t){let e,o=this.dom;if(t.node!=o)return t;for(let r=t.offset;!e&&r<o.childNodes.length;r++){let t=Ua.get(o.childNodes[r]);t instanceof qs&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=Ua.get(o.childNodes[r]);t instanceof qs&&(e=t.domAtPos(t.length))}return e?new _a(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=Ua.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,e)+o.posAtStart}domAtPos(t){let{i:e,off:o}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(o<t.length||t instanceof qs)break;e++,o=0}return this.children[e].domAtPos(o)}coordsAt(t,e){let o=null,r=0;for(let i=this.length,n=this.children.length-1;n>=0;n--){let a=this.children[n],s=i-a.breakAfter,l=s-a.length;if(s<t)break;if(l<=t&&(l<t||a.covers(-1))&&(s>t||a.covers(1))&&(!o||a instanceof qs&&!(o instanceof qs&&e>=0)))o=a,r=l;else if(o&&l==t&&s==t&&a instanceof Ss&&Math.abs(e)<2){if(a.deco.startSide<0)break;n&&(o=null)}i=l}return o?o.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:o}=this.childPos(t,1),r=this.children[e];if(!(r instanceof qs))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(o,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}o=e}if(!(r instanceof is))return null;let i=zi(r.text,o);if(i==o)return null;let n=Aa(r.dom,o,i).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:o,to:r}=t,i=this.view.contentDOM.clientWidth,n=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==Rs.LTR;for(let t=0,l=0;l<this.children.length;l++){let d=this.children[l],c=t+d.length;if(c>r)break;if(t>=o){let o=d.dom.getBoundingClientRect();if(e.push(o.height),n){let e=d.dom.lastChild,r=e?ya(e):[];if(r.length){let e=r[r.length-1],n=s?e.right-o.left:o.right-e.left;n>a&&(a=n,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+d.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Rs.RTL:Rs.LTR}measureTextSize(){for(let t of this.children)if(t instanceof qs){let e=t.measureTextSize();if(e)return e}let t,e,o,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=ya(r.firstChild)[0];t=r.getBoundingClientRect().height,e=i?i.width/27:7,o=i?i.height:t,r.remove()})),{lineHeight:t,charWidth:e,textHeight:o}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new La(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let o=0,r=0;;r++){let i=r==e.viewports.length?null:e.viewports[r],n=i?i.from-1:this.length;if(n>o){let r=(e.lineBlockAt(n).bottom-e.lineBlockAt(o).top)/this.view.scaleY;t.push(vs.replace({widget:new Qs(r),block:!0,inclusive:!0,isBlockGap:!0}).range(o,n))}if(!i)break;o=i.to+1}return vs.set(t)}updateDeco(){let t=1,e=this.view.state.facet(vl).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),o=!1,r=this.view.state.facet(Ol).map(((t,e)=>{let r="function"==typeof t;return r&&(o=!0),r?t(this.view):t}));for(r.length&&(this.dynamicDecorationMap[t++]=o,e.push(Bn.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(al))try{if(e(this.view,t.range,t))return!0}catch(t){cl(this.view.state,t,"scroll handler")}let e,{range:o}=t,r=this.coordsAt(o.head,o.empty?o.assoc:o.head>o.anchor?-1:1);if(!r)return;!o.empty&&(e=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let i=ql(this.view),n={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(t,e,o,r,i,n,a,s){let l=t.ownerDocument,d=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(1==c.nodeType){let t,p=c==l.body,u=1,m=1;if(p)t=$a(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:u,scaleY:m}=Pa(c,e)),t={left:e.left,right:e.left+c.clientWidth*u,top:e.top,bottom:e.top+c.clientHeight*m}}let f=0,b=0;if("nearest"==i)e.top<t.top?(b=-(t.top-e.top+a),o>0&&e.bottom>t.bottom+b&&(b=e.bottom-t.bottom+b+a)):e.bottom>t.bottom&&(b=e.bottom-t.bottom+a,o<0&&e.top-b<t.top&&(b=-(t.top+b-e.top+a)));else{let r=e.bottom-e.top,n=t.bottom-t.top;b=("center"==i&&r<=n?e.top+r/2-n/2:"start"==i||"center"==i&&o<0?e.top-a:e.bottom-n+a)-t.top}if("nearest"==r?e.left<t.left?(f=-(t.left-e.left+n),o>0&&e.right>t.right+f&&(f=e.right-t.right+f+n)):e.right>t.right&&(f=e.right-t.right+n,o<0&&e.left<t.left+f&&(f=-(t.left+f-e.left+n))):f=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==s?e.left-n:e.right-(t.right-t.left)+n)-t.left,f||b)if(p)d.scrollBy(f,b);else{let t=0,o=0;if(b){let t=c.scrollTop;c.scrollTop+=b/m,o=(c.scrollTop-t)*m}if(f){let e=c.scrollLeft;c.scrollLeft+=f/u,t=(c.scrollLeft-e)*u}e={left:e.left-t,top:e.top-o,right:e.right-t,bottom:e.bottom-o},t&&Math.abs(t-f)<1&&(r="nearest"),o&&Math.abs(o-b)<1&&(i="nearest")}if(p)break;c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,n,o.head<o.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,a),-a),Math.max(Math.min(t.yMargin,s),-s),this.view.textDirection==Rs.LTR)}}function Cl(t,e){let o=t.observer.selectionRange;if(!o.focusNode)return null;let r=za(o.focusNode,o.focusOffset),i=Xa(o.focusNode,o.focusOffset),n=r||i;if(i&&r&&i.node!=r.node){let e=Ua.get(i.node);if(!e||e instanceof is&&e.text!=i.node.nodeValue)n=i;else if(t.docView.lastCompositionAfterCursor){let t=Ua.get(r.node);!t||t instanceof is&&t.text!=r.node.nodeValue||(n=i)}}if(t.docView.lastCompositionAfterCursor=n!=r,!n)return null;let a=e-n.offset;return{from:a,to:a+n.node.nodeValue.length,node:n.node}}let Rl=class{constructor(){this.changes=[]}compareRange(t,e){ks(t,e,this.changes)}comparePoint(t,e){ks(t,e,this.changes)}boundChange(t){ks(t,t,this.changes)}};function Zl(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Tl(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Al(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Ml(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function El(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function jl(t,e,o){let r,i,n,a,s,l,d,c,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=ya(p);for(let u=0;u<t.length;u++){let m=t[u];i&&Al(i,m)&&(m=Ml(El(m,i.bottom),i.top));let f=Zl(e,m),b=Tl(o,m);if(0==f&&0==b)return 3==p.nodeType?zl(p,e,o):jl(p,e,o);if(!r||a>b||a==b&&n>f){r=p,i=m,n=f,a=b;let s=b?o<m.top?-1:1:f?e<m.left?-1:1:0;h=!s||(s>0?u<t.length-1:u>0)}0==f?o>m.bottom&&(!d||d.bottom<m.bottom)?(s=p,d=m):o<m.top&&(!c||c.top>m.top)&&(l=p,c=m):d&&Al(d,m)?d=El(d,m.bottom):c&&Al(c,m)&&(c=Ml(c,m.top))}}if(d&&d.bottom>=o?(r=s,i=d):c&&c.top<=o&&(r=l,i=c),!r)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?zl(r,p,o):h&&"false"!=r.contentEditable?jl(r,p,o):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}}function zl(t,e,o){let r=t.nodeValue.length,i=-1,n=1e9,a=0;for(let s=0;s<r;s++){let r=Aa(t,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let d=r[l];if(d.top==d.bottom)continue;a||(a=e-d.left);let c=(d.top>o?d.top-o:o-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&c<n){let o=e>=(d.left+d.right)/2,r=o;if((rs.chrome||rs.gecko)&&Aa(t,s).getBoundingClientRect().left==d.right&&(r=!o),c<=0)return{node:t,offset:s+(r?1:0)};i=s+(r?1:0),n=c}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function Xl(t,e,o,r=-1){var i,n;let a,s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,{docHeight:d}=t.viewState,{x:c,y:h}=e,p=h-l;if(p<0)return 0;if(p>d)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;a=t.elementAtHeight(p),a.type!=gs.Text;)for(;p=r>0?a.bottom+e:a.top-e,!(p>=0&&p<=d);){if(i)return o?null:0;i=!0,r=-r}h=l+p;let u=a.from;if(u<t.viewport.from)return 0==t.viewport.from?0:o?null:_l(t,s,a,c,h);if(u>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:o?null:_l(t,s,a,c,h);let m=t.dom.ownerDocument,f=t.root.elementFromPoint?t.root:m,b=f.elementFromPoint(c,h);b&&!t.contentDOM.contains(b)&&(b=null),b||(c=Math.max(s.left+1,Math.min(s.right-1,c)),b=f.elementFromPoint(c,h),b&&!t.contentDOM.contains(b)&&(b=null));let g,v=-1;if(b&&0!=(null===(i=t.docView.nearest(b))||void 0===i?void 0:i.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,h);t&&({offsetNode:g,offset:v}=t)}else if(m.caretRangeFromPoint){let e=m.caretRangeFromPoint(c,h);e&&(({startContainer:g,startOffset:v}=e),(!t.contentDOM.contains(g)||rs.safari&&function(t,e,o){let r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return Aa(t,r-1,r).getBoundingClientRect().left>o}(g,v,c)||rs.chrome&&function(t,e,o){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return o-(1==t.nodeType?t.getBoundingClientRect():Aa(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(g,v,c))&&(g=void 0))}g&&(v=Math.min(Sa(g),v))}if(!g||!t.docView.dom.contains(g)){let e=qs.find(t.docView,u);if(!e)return p>a.top+a.height/2?a.to:a.from;({node:g,offset:v}=jl(e.dom,c,h))}let O=t.docView.nearest(g);if(!O)return null;if(O.isWidget&&1==(null===(n=O.dom)||void 0===n?void 0:n.nodeType)){let t=O.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?O.posAtStart:O.posAtEnd}return O.localPosFromDOM(g,v)+O.posAtStart}function _l(t,e,o,r,i){let n=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&o.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;n+=Math.floor((i-o.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(o.from,o.to);return o.from+ia(a,n,t.state.tabSize)}function Dl(t,e){let o=t.lineBlockAt(e);if(Array.isArray(o.type))for(let t of o.type)if(t.to>e||t.to==e&&(t.to==o.to||t.type==gs.Text))return t;return o}function Ul(t,e,o,r){let i=t.state.doc.lineAt(e.head),n=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let e=Is(i,n,a,s,o),d=Ys;if(!e){if(i.number==(o?t.state.doc.lines:1))return s;d="\n",i=t.state.doc.line(i.number+(o?1:-1)),n=t.bidiSpans(i),e=t.visualLineSide(i,!o)}if(l){if(!l(d))return s}else{if(!r)return e;l=r(d)}s=e}}function Vl(t,e,o){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,((t,i,n)=>{if(e>t&&e<i){let n=r||o||(e-t<i-e?-1:1);e=n<0?t:i,r=n}}));if(!r)return e}}function Ll(t,e,o){let r=Vl(t.state.facet(yl).map((e=>e(t))),o.from,e.head>o.from?-1:1);return r==o.from?o:Ki.cursor(r,r<o.from?1:-1)}const Wl="";class Bl{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(_n.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Wl}readRange(t,e){if(!t)return this;let o=t.parentNode;for(let r=t;;){this.findPointBefore(o,r);let t=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==e)break;let n=Ua.get(r),a=Ua.get(i);(n&&a?n.breakAfter:(n?n.breakAfter:ka(r))||ka(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=i}return this.findPointBefore(o,e),this}readTextNode(t){let e=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,e.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,n=-1,a=1;if(this.lineSeparator?(n=e.indexOf(this.lineSeparator,o),a=this.lineSeparator.length):(i=r.exec(e))&&(n=i.index,a=i[0].length),this.append(e.slice(o,n<0?e.length:n)),n<0)break;if(this.lineBreak(),a>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=a-1);o=n+a}}readNode(t){if(t.cmIgnore)return;let e=Ua.get(t),o=e&&e.overrideDOMText;if(null!=o){this.findPointInside(t,o.length);for(let t=o.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==e&&(o.pos=this.text.length)}findPointInside(t,e){for(let o of this.points)(3==t.nodeType?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+(Yl(t,o.node,o.offset)?e:0))}}function Yl(t,e,o){for(;;){if(!e||o<Sa(e))return!1;if(e==t)return!0;o=wa(e)+1,e=e.parentNode}}class Il{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Nl{constructor(t,e,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:i,impreciseAnchor:n}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,o,0))){let e=i||n?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}=t.observer.selectionRange;return o&&(e.push(new Il(o,r)),i==o&&n==r||e.push(new Il(i,n))),e}(t),o=new Bl(e,t.state);o.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=o.text,this.newSel=function(t,e){if(0==t.length)return null;let o=t[0].pos,r=2==t.length?t[1].pos:o;return o>-1&&r>-1?Ki.single(o+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,o=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!va(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!va(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((rs.ios||rs.chrome)&&t.state.selection.main.empty&&o!=r&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(o,r),i=Math.max(o,r),n=a.from-e,s=a.to-i;0!=n&&1!=n&&0!=e||0!=s&&-1!=s&&i!=t.state.doc.length||(o=0,r=t.state.doc.length)}this.newSel=Ki.single(r,o)}}}function Gl(t,e){let o,{newSel:r}=e,i=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:a}=e.bounds,s=i.from,l=null;(8===n||rs.android&&e.text.length<a-r)&&(s=i.to,l="end");let d=function(t,e,o,r){let i=Math.min(t.length,e.length),n=0;for(;n<i&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;return"end"==r&&(o-=a+Math.max(0,n-Math.min(a,s))-n),a<n&&t.length<e.length?(n-=o<=n&&o>=a?n-o:0,s=n+(s-a),a=n):s<n&&(n-=o<=n&&o>=s?n-o:0,a=n+(a-s),s=n),{from:n,toA:a,toB:s}}(t.state.doc.sliceString(r,a,Wl),e.text,s-r,l);d&&(rs.chrome&&13==n&&d.toB==d.from+2&&e.text.slice(d.from,d.toB)==Wl+Wl&&d.toB--,o={from:r+d.from,to:r+d.toA,insert:$i.of(e.text.slice(d.from,d.toB).split(Wl))})}else r&&(!t.hasFocus&&t.state.facet(hl)||r.main.eq(i))&&(r=null);if(!o&&!r)return!1;if(!o&&e.typeOver&&!i.empty&&r&&r.main.empty?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(rs.mac||rs.android)&&o&&o.from==o.to&&o.from==i.head-1&&/^\. ?$/.test(o.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==o.insert.length&&(r=Ki.single(r.main.anchor-1,r.main.head-1)),o={from:o.from,to:o.to,insert:$i.of([o.insert.toString().replace("."," ")])}):o&&o.from>=i.from&&o.to<=i.to&&(o.from!=i.from||o.to!=i.to)&&i.to-i.from-(o.to-o.from)<=4?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,o.from).append(o.insert).append(t.state.doc.slice(o.to,i.to))}:rs.chrome&&o&&o.from==o.to&&o.from==i.head&&"\n "==o.insert.toString()&&t.lineWrapping&&(r&&(r=Ki.single(r.main.anchor-1,r.main.head-1)),o={from:i.from,to:i.to,insert:$i.of([" "])}),o)return Fl(t,o,r,n);if(r&&!r.main.eq(i)){let e=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),o=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:o}),!0}return!1}function Fl(t,e,o,r=-1){if(rs.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(rs.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&" "==t.state.sliceDoc(e.from,i.from))&&1==e.insert.length&&2==e.insert.lines&&Ma(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ma(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&0==e.insert.length&&Ma(t.contentDOM,"Delete",46)))return!0;let n,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s=()=>n||(n=function(t,e,o){let r,i=t.state,n=i.selection.main;if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!o||o.main.empty&&o.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let o=n.from<e.from?i.sliceDoc(n.from,e.from):"",a=n.to>e.to?i.sliceDoc(e.to,n.to):"";r=i.replaceSelection(t.state.toText(o+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let a=i.changes(e),s=o&&o.main.to<=a.newLength?o.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let l,d=t.state.sliceDoc(e.from,e.to),c=o&&Cl(t,o.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(n.head);let h=n.to-e.to,p=n.to-n.from;r=i.changeByRange((o=>{if(o.from==n.from&&o.to==n.to)return{changes:a,range:s||o.map(a)};let r=o.to-h,c=r-d.length;if(o.to-o.from!=p||t.state.sliceDoc(c,r)!=d||o.to>=l.from&&o.from<=l.to)return{range:o};let u=i.changes({from:c,to:r,insert:e.insert}),m=o.to-n.to;return{changes:u,range:s?Ki.range(Math.max(0,s.anchor+m),Math.max(0,s.head+m)):o.map(u)}}))}else r={changes:a,selection:s&&i.selection.replaceRange(s)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}(t,e,o));return t.state.facet(tl).some((o=>o(t,e.from,e.to,a,s)))||t.dispatch(s()),!0}class Hl{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,rs.safari&&t.contentDOM.addEventListener("input",(()=>null)),rs.gecko&&function(t){qd.has(t)||(qd.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let o,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(o=Ua.get(r))&&o.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then((()=>this.runHandlers(t.type,t))):this.runHandlers(t.type,t)))}runHandlers(t,e){let o=this.handlers[t];if(o){for(let t of o.observers)t(this.view,e);for(let t of o.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Jl(t),o=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,n=o[t];n&&i!=!n.handlers.length&&(r.removeEventListener(t,this.handleEvent),n=null),n||r.addEventListener(t,this.handleEvent,{passive:i})}for(let t in o)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&od.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),rs.android&&rs.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!rs.ios||t.synthetic||t.altKey||t.metaKey||!((e=td.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||ed.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,Ma(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(rs.safari&&!rs.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Kl(t,e){return(o,r)=>{try{return e.call(t,r,o)}catch(t){cl(o.state,t)}}}function Jl(t){let e=Object.create(null);function o(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let r in t.domEventHandlers){let i=t.domEventHandlers[r];i&&o(r).handlers.push(Kl(e.value,i))}if(t&&t.domEventObservers)for(let r in t.domEventObservers){let i=t.domEventObservers[r];i&&o(r).observers.push(Kl(e.value,i))}}for(let t in nd)o(t).handlers.push(nd[t]);for(let t in ad)o(t).observers.push(ad[t]);return e}const td=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ed="dthko",od=[16,17,18,20,91,92,224,225];function rd(t){return.7*Math.max(0,t)+8}class id{constructor(t,e,o,r){this.view=t,this.startEvent=e,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,o,r=t.ownerDocument;for(let i=t.parentNode;i&&!(i==r.body||e&&o);)if(1==i.nodeType)!o&&i.scrollHeight>i.clientHeight&&(o=i),!e&&i.scrollWidth>i.clientWidth&&(e=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:e,y:o}}(t.contentDOM),this.atoms=t.state.facet(yl).map((e=>e(t)));let i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(_n.allowMultipleSelections)&&function(t,e){let o=t.state.facet(Gs);return o.length?o[0](e):rs.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:o}=t.state.selection;if(o.empty)return!1;let r=ga(t.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let t=0;t<i.length;t++){let o=i[t];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(t,e)||1!=vd(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let e=0,o=0,r=0,i=0,n=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:n}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=ql(this.view);t.clientX-s.left<=r+6?e=-rd(r-t.clientX):t.clientX+s.right>=n-6&&(e=rd(t.clientX-n)),t.clientY-s.top<=i+6?o=-rd(i-t.clientY):t.clientY+s.bottom>=a-6&&(o=rd(t.clientY-a)),this.setScrollSpeed(e,o)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let o=0;o<t.ranges.length;o++){let r=t.ranges[o],i=null;if(r.empty){let t=Vl(this.atoms,r.from,0);t!=r.from&&(i=Ki.cursor(t,-1))}else{let t=Vl(this.atoms,r.from,-1),e=Vl(this.atoms,r.to,1);t==r.from&&e==r.to||(i=Ki.range(r.from==r.anchor?t:e,r.from==r.head?t:e))}i&&(e||(e=t.ranges.slice()),e[o]=i)}return e?Ki.create(e,t.mainIndex):t}select(t){let{view:e}=this,o=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&o.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const nd=Object.create(null),ad=Object.create(null),sd=rs.ie&&rs.ie_version<15||rs.ios&&rs.webkit_version<604;function ld(t,e,o){for(let r of t.facet(e))o=r(o,t);return o}function dd(t,e){e=ld(t.state,ol,e);let o,{state:r}=t,i=1,n=r.toText(e),a=n.lines==r.selection.ranges.length;if(null!=yd&&r.selection.ranges.every((t=>t.empty))&&yd==n.toString()){let t=-1;o=r.changeByRange((o=>{let s=r.doc.lineAt(o.from);if(s.from==t)return{range:o};t=s.from;let l=r.toText((a?n.line(i++).text:e)+r.lineBreak);return{changes:{from:s.from,insert:l},range:Ki.cursor(o.from+l.length)}}))}else o=a?r.changeByRange((t=>{let e=n.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:Ki.cursor(t.from+e.length)}})):r.replaceSelection(n);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}function cd(t,e,o,r){if(1==r)return Ki.cursor(e,o);if(2==r)return function(t,e,o=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),n=e-i.from;if(0==i.length)return Ki.cursor(e);0==n?o=1:n==i.length&&(o=-1);let a=n,s=n;o<0?a=zi(i.text,n,!1):s=zi(i.text,n);let l=r(i.text.slice(a,s));for(;a>0;){let t=zi(i.text,a,!1);if(r(i.text.slice(t,a))!=l)break;a=t}for(;s<i.length;){let t=zi(i.text,s);if(r(i.text.slice(s,t))!=l)break;s=t}return Ki.range(a+i.from,s+i.from)}(t.state,e,o);{let o=qs.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),i=o?o.posAtStart:r.from,n=o?o.posAtEnd:r.to;return n<t.state.doc.length&&n==r.to&&n++,Ki.range(i,n)}}ad.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},nd.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),ad.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},ad.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},nd.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let r of t.state.facet(Hs))if(o=r(t,e),o)break;if(o||0!=e.button||(o=function(t,e){let o=ud(t,e),r=vd(e),i=t.state.selection;return{update(t){t.docChanged&&(o.pos=t.changes.mapPos(o.pos),i=i.map(t.changes))},get(e,n,a){let s,l=ud(t,e),d=cd(t,l.pos,l.bias,r);if(o.pos!=l.pos&&!n){let e=cd(t,o.pos,o.bias,r),i=Math.min(e.from,d.from),n=Math.max(e.to,d.to);d=i<d.from?Ki.range(i,n):Ki.range(n,i)}return n?i.replaceRange(i.main.extend(d.from,d.to)):a&&1==r&&i.ranges.length>1&&(s=function(t,e){for(let o=0;o<t.ranges.length;o++){let{from:r,to:i}=t.ranges[o];if(r<=e&&i>=e)return Ki.create(t.ranges.slice(0,o).concat(t.ranges.slice(o+1)),t.mainIndex==o?0:t.mainIndex-(t.mainIndex>o?1:0))}return null}(i,l.pos))?s:a?i.addRange(d):Ki.create([d])}}}(t,e)),o){let r=!t.hasFocus;t.inputState.startMouseSelection(new id(t,e,o,r)),r&&t.observer.ignore((()=>{Ta(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}return!1};let hd=(t,e,o)=>e>=o.top&&e<=o.bottom&&t>=o.left&&t<=o.right;function pd(t,e,o,r){let i=qs.find(t.docView,e);if(!i)return 1;let n=e-i.posAtStart;if(0==n)return 1;if(n==i.length)return-1;let a=i.coordsAt(n,-1);if(a&&hd(o,r,a))return-1;let s=i.coordsAt(n,1);return s&&hd(o,r,s)?1:a&&a.bottom>=r?-1:1}function ud(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:o,bias:pd(t,o,e.clientX,e.clientY)}}const md=rs.ie&&rs.ie_version<=11;let fd=null,bd=0,gd=0;function vd(t){if(!md)return t.detail;let e=fd,o=gd;return fd=t,gd=Date.now(),bd=!e||o>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(bd+1)%3:1}function Od(t,e,o,r){if(!(o=ld(t.state,ol,o)))return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,a=r&&n&&function(t,e){let o=t.state.facet(Fs);return o.length?o[0](e):rs.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:n.from,to:n.to}:null,s={from:i,insert:o},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}nd.dragstart=(t,e)=>{let{selection:{main:o}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=o.to||e<=o.from)&&(o=Ki.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=o,e.dataTransfer&&(e.dataTransfer.setData("Text",ld(t.state,rl,t.state.sliceDoc(o.from,o.to))),e.dataTransfer.effectAllowed="copyMove"),!1},nd.dragend=t=>(t.inputState.draggedContent=null,!1),nd.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let o=e.dataTransfer.files;if(o&&o.length){let r=Array(o.length),i=0,n=()=>{++i==o.length&&Od(t,e,r.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<o.length;t++){let e=new FileReader;e.onerror=n,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),n()},e.readAsText(o[t])}return!0}{let o=e.dataTransfer.getData("Text");if(o)return Od(t,e,o,!0),!0}return!1},nd.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let o=sd?null:e.clipboardData;return o?(dd(t,o.getData("text/plain")||o.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let o=e.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((()=>{t.focus(),o.remove(),dd(t,o.value)}),50)}(t),!1)};let yd=null;nd.copy=nd.cut=(t,e)=>{let{text:o,ranges:r,linewise:i}=function(t){let e=[],o=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),o.push(r));if(!e.length){let i=-1;for(let{from:r}of t.selection.ranges){let n=t.doc.lineAt(r);n.number>i&&(e.push(n.text),o.push({from:n.from,to:Math.min(t.doc.length,n.to+1)})),i=n.number}r=!0}return{text:ld(t,rl,e.join(t.lineBreak)),ranges:o,linewise:r}}(t.state);if(!o&&!i)return!1;yd=i?o:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let n=sd?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",o),!0):(function(t,e){let o=t.dom.parentNode;if(!o)return;let r=o.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((()=>{r.remove(),t.focus()}),50)}(t,o),!1)};const xd=Sn.define();function wd(t,e){let o=[];for(let r of t.facet(el)){let i=r(t,e);i&&o.push(i)}return o?t.update({effects:o,annotations:xd.of(!0)}):null}function kd(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let o=wd(t.state,e);o?t.dispatch(o):t.update([])}}),10)}ad.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),kd(t)},ad.blur=t=>{t.observer.clearSelectionRange(),kd(t)},ad.compositionstart=ad.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},ad.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,rs.chrome&&rs.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},ad.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},nd.beforeinput=(t,e)=>{var o,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(o=e.dataTransfer)||void 0===o?void 0:o.getData("text/plain"),i=e.getTargetRanges();if(r&&i.length){let e=i[0],o=t.posAtDOM(e.startContainer,e.startOffset),n=t.posAtDOM(e.endContainer,e.endOffset);return Fl(t,{from:o,to:n,insert:t.state.toText(r)},null),!0}}let i;if(rs.chrome&&rs.android&&(i=td.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return rs.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),rs.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>ad.compositionend(t,e)),20),!1};const qd=new Set,Sd=["pre-wrap","normal","pre-line","break-spaces"];let Qd=!1;function $d(){Qd=!1}class Pd{constructor(t){this.lineWrapping=t,this.doc=$i.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let o=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((e-t-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Sd.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let o=0;o<t.length;o++){let r=t[o];r<0?o++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,o,r,i,n){let a=Sd.indexOf(t)>-1,s=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=e,this.charWidth=o,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return s}}class Cd{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class Rd{constructor(t,e,o,r,i){this.from=t,this.length=e,this.top=o,this.height=r,this._content=i}get type(){return"number"==typeof this._content?gs.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 xs?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new Rd(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Zd=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Zd||(Zd={}));const Td=.001;class Ad{constructor(t,e,o=2){this.length=t,this.height=e,this.flags=o}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Td&&(Qd=!0),this.height=t)}replace(t,e,o){return Ad.of(o)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,o,r){let i=this,n=o.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:d,toB:c}=r[a],h=i.lineAt(s,Zd.ByPosNoHeight,o.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,Zd.ByPosNoHeight,o,0,0);for(c+=p.to-l,l=p.to;a>0&&h.from<=r[a-1].toA;)s=r[a-1].fromA,d=r[a-1].fromB,a--,s<h.from&&(h=i.lineAt(s,Zd.ByPosNoHeight,o,0,0));d+=h.from-s,s=h.from;let u=Dd.build(o.setDoc(n),t,d,c);i=Md(i,i.replace(s,l,u))}return i.updateHeight(o,0)}static empty(){return new jd(0,0)}static of(t){if(1==t.length)return t[0];let e=0,o=t.length,r=0,i=0;for(;;)if(e==o)if(r>2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),o+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let e=t[o];e.break?t.splice(o,1,e.left,null,e.right):t.splice(o,1,e.left,e.right),o+=2+e.break,i-=e.size}}else if(r<i){let o=t[e++];o&&(r+=o.size)}else{let e=t[--o];e&&(i+=e.size)}let n=0;return null==t[e-1]?(n=1,e--):null==t[e]&&(n=1,o++),new Xd(Ad.of(t.slice(0,e)),n,Ad.of(t.slice(o)))}}function Md(t,e){return t==e?t:(t.constructor!=e.constructor&&(Qd=!0),e)}Ad.prototype.size=1;class Ed extends Ad{constructor(t,e,o){super(t,e),this.deco=o}blockAt(t,e,o,r){return new Rd(r,this.length,o,this.height,this.deco||0)}lineAt(t,e,o,r,i){return this.blockAt(0,o,r,i)}forEachLine(t,e,o,r,i,n){t<=i+this.length&&e>=i&&n(this.blockAt(0,o,r,i))}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class jd extends Ed{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,o,r){return new Rd(r,this.length,o,this.height,this.breaks)}replace(t,e,o){let r=o[0];return 1==o.length&&(r instanceof jd||r instanceof zd&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof zd?r=new jd(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Ad.of(o)}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(o||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class zd extends Ad{constructor(t){super(t,0)}heightMetrics(t,e){let o,r=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,n=i-r+1,a=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*n);o=e/n,this.length>n+1&&(a=(this.height-e)/(this.length-n-1))}else o=this.height/n;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(t,e,o,r){let{firstLine:i,lastLine:n,perLine:a,perChar:s}=this.heightMetrics(e,r);if(e.lineWrapping){let i=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-o)/this.height))*this.length)),n=e.doc.lineAt(i),l=a+n.length*s,d=Math.max(o,t-l/2);return new Rd(n.from,n.length,d,l,0)}{let r=Math.max(0,Math.min(n-i,Math.floor((t-o)/a))),{from:s,length:l}=e.doc.line(i+r);return new Rd(s,l,o+a*r,a,0)}}lineAt(t,e,o,r,i){if(e==Zd.ByHeight)return this.blockAt(t,o,r,i);if(e==Zd.ByPosNoHeight){let{from:e,to:r}=o.doc.lineAt(t);return new Rd(e,r-e,0,0,0)}let{firstLine:n,perLine:a,perChar:s}=this.heightMetrics(o,i),l=o.doc.lineAt(t),d=a+l.length*s,c=l.number-n,h=r+a*c+s*(l.from-i-c);return new Rd(l.from,l.length,Math.max(r,Math.min(h,r+this.height-d)),d,0)}forEachLine(t,e,o,r,i,n){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(o,i);for(let d=t,c=r;d<=e;){let e=o.doc.lineAt(d);if(d==t){let o=e.number-a;c+=s*o+l*(t-i-o)}let r=s+l*e.length;n(new Rd(e.from,e.length,c,r,0)),c+=r,d=e.to+1}}replace(t,e,o){let r=this.length-e;if(r>0){let t=o[o.length-1];t instanceof zd?o[o.length-1]=new zd(t.length+r):o.push(null,new zd(r-1))}if(t>0){let e=o[0];e instanceof zd?o[0]=new zd(t+e.length):o.unshift(new zd(t-1),null)}return Ad.of(o)}decomposeLeft(t,e){e.push(new zd(t-1),null)}decomposeRight(t,e){e.push(null,new zd(this.length-t-1))}updateHeight(t,e=0,o=!1,r){let i=e+this.length;if(r&&r.from<=e+this.length&&r.more){let o=[],n=Math.max(e,r.from),a=-1;for(r.from>e&&o.push(new zd(r.from-e-1).updateHeight(t,e));n<=i&&r.more;){let e=t.doc.lineAt(n).length;o.length&&o.push(null);let i=r.heights[r.index++];-1==a?a=i:Math.abs(i-a)>=Td&&(a=-2);let s=new jd(e,i);s.outdated=!1,o.push(s),n+=e+1}n<=i&&o.push(null,new zd(i-n).updateHeight(t,n));let s=Ad.of(o);return(a<0||Math.abs(s.height-this.height)>=Td||Math.abs(a-this.heightMetrics(t,e).perLine)>=Td)&&(Qd=!0),Md(this,s)}return(o||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Xd extends Ad{constructor(t,e,o){super(t.length+e+o.length,t.height+o.height,e|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return 1&this.flags}blockAt(t,e,o,r){let i=o+this.left.height;return t<i?this.left.blockAt(t,e,o,r):this.right.blockAt(t,e,i,r+this.left.length+this.break)}lineAt(t,e,o,r,i){let n=r+this.left.height,a=i+this.left.length+this.break,s=e==Zd.ByHeight?t<n:t<a,l=s?this.left.lineAt(t,e,o,r,i):this.right.lineAt(t,e,o,n,a);if(this.break||(s?l.to<a:l.from>a))return l;let d=e==Zd.ByPosNoHeight?Zd.ByPosNoHeight:Zd.ByPos;return s?l.join(this.right.lineAt(a,d,o,n,a)):this.left.lineAt(a,d,o,r,i).join(l)}forEachLine(t,e,o,r,i,n){let a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t<s&&this.left.forEachLine(t,e,o,r,i,n),e>=s&&this.right.forEachLine(t,e,o,a,s,n);else{let l=this.lineAt(s,Zd.ByPos,o,r,i);t<l.from&&this.left.forEachLine(t,l.from-1,o,r,i,n),l.to>=t&&l.from<=e&&n(l),e>l.to&&this.right.forEachLine(l.to+1,e,o,a,s,n)}}replace(t,e,o){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,o));let i=[];t>0&&this.decomposeLeft(t,i);let n=i.length;for(let t of o)i.push(t);if(t>0&&_d(i,n-1),e<this.length){let t=i.length;this.decomposeRight(e,i),_d(i,t)}return Ad.of(i)}decomposeLeft(t,e){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(o++,t>=o&&e.push(null)),t>o&&this.right.decomposeLeft(t-o,e)}decomposeRight(t,e){let o=this.left.length,r=o+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<o&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?Ad.of(this.break?[t,null,e]:[t,e]):(this.left=Md(this.left,t),this.right=Md(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,o=!1,r){let{left:i,right:n}=this,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,o,r):i.updateHeight(t,e,o),r&&r.from<=a+n.length&&r.more?s=n=n.updateHeight(t,a,o,r):n.updateHeight(t,a,o),s?this.balanced(i,n):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function _d(t,e){let o,r;null==t[e]&&(o=t[e-1])instanceof zd&&(r=t[e+1])instanceof zd&&t.splice(e-1,3,new zd(o.length+1+r.length))}class Dd{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof jd?o.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new jd(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,o){if(t<e||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,i=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let n=e-t;o.block?this.addBlock(new Ed(n,r,o)):(n||i||r>=5)&&this.addLineDeco(r,i,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new jd(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let o=new zd(e-t);return this.oracle.doc.lineAt(t).to==e&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof jd)return t;let e=new jd(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+o}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof jd||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new jd(0,-1));let o=t;for(let t of this.nodes)t instanceof jd&&t.updateHeight(this.oracle,o),o+=t?t.length:1;return this.nodes}static build(t,e,o,r){let i=new Dd(o,t);return Bn.spans(e,o,r,i,0),i.finish(o)}}class Ud{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,o,r){(t<e||o&&o.heightRelevant||r&&r.heightRelevant)&&ks(t,e,this.changes,5)}}function Vd(t,e){let o=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,n=Math.max(0,o.left),a=Math.min(i.innerWidth,o.right),s=Math.max(0,o.top),l=Math.min(i.innerHeight,o.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let o=e,r=window.getComputedStyle(o);if((o.scrollHeight>o.clientHeight||o.scrollWidth>o.clientWidth)&&"visible"!=r.overflow){let r=o.getBoundingClientRect();n=Math.max(n,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(e==t.parentNode?i.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?o.offsetParent:o.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-o.left,right:Math.max(n,a)-o.left,top:s-(o.top+e),bottom:Math.max(s,l)-(o.top+e)}}function Ld(t,e){let o=t.getBoundingClientRect();return{left:0,right:o.right-o.left,top:e,bottom:o.bottom-(o.top+e)}}class Wd{constructor(t,e,o,r){this.from=t,this.to=e,this.size=o,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(t,e){return vs.replace({widget:new Bd(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class Bd extends bs{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Yd{constructor(t){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.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Fd,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Rs.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(gl).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new Pd(e),this.stateDeco=t.facet(vl).filter((t=>"function"!=typeof t)),this.heightMap=Ad.empty().applyChanges(this.stateDeco,$i.empty,this.heightOracle.setDoc(t.doc),[new Ql(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=vs.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let o=0;o<=1;o++){let r=o?e.head:e.anchor;if(!t.some((({from:t,to:e})=>r>=t&&r<=e))){let{from:e,to:o}=this.lineBlockAt(r);t.push(new Id(e,o))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?Fd:new Hd(this.heightOracle,this.heightMap,this.viewports),t.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,(t=>{this.viewportLines.push(Kd(t,this.scaler))}))}update(t,e=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(vl).filter((t=>"function"!=typeof t));let r=t.changedRanges,i=Ql.extendWithRanges(r,function(t,e,o){let r=new Ud;return Bn.compare(t,e,o,r,0),r.changes}(o,this.stateDeco,t?t.changes:Wi.empty(this.state.doc.length))),n=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);$d(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=n||Qd)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let s=i.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<s.from||e.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,e));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(nl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,o=window.getComputedStyle(e),r=this.heightOracle,i=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?Rs.RTL:Rs.LTR;let n=this.heightOracle.mustRefreshForWrapping(i),a=e.getBoundingClientRect(),s=n||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,d=0;if(a.width&&a.height){let{scaleX:t,scaleY:o}=Pa(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=t,this.scaleY=o,l|=16,n=s=!0)}let c=(parseInt(o.paddingTop)||0)*this.scaleY,h=(parseInt(o.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==h||(this.paddingTop=c,this.paddingBottom=h,l|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=16);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=ja(t.scrollDOM);let u=(this.printing?Ld:Vd)(e,this.paddingTop),m=u.top-this.pixelViewport.top,f=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),o=t.ownerDocument.defaultView||window;return e.left<o.innerWidth&&e.right>0&&e.top<o.innerHeight&&e.bottom>0}(t.dom))return 0;let g=a.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,l|=16),s){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(n=!0),n||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:o,charWidth:a,textHeight:s}=t.docView.measureTextSize();n=o>0&&r.refresh(i,o,a,s,g/a,e),n&&(t.docView.minWidth=0,l|=16)}m>0&&f>0?d=Math.max(m,f):m<0&&f<0&&(d=Math.min(m,f)),$d();for(let o of this.viewports){let i=o.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(o);this.heightMap=(n?Ad.empty().applyChanges(this.stateDeco,$i.empty,this.heightOracle,[new Ql(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,n,new Cd(o.from,i))}Qd&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:n,visibleBottom:a}=this,s=new Id(r.lineAt(n-1e3*o,Zd.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-o),Zd.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(t<s.from||t>s.to){let o,n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(t,Zd.ByPos,i,0,0);o="center"==e.y?(a.top+a.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<s.from?a.top:a.bottom-n,s=new Id(r.lineAt(o-500,Zd.ByHeight,i,0,0).from,r.lineAt(o+n+500,Zd.ByHeight,i,0,0).to)}}return s}mapViewport(t,e){let o=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new Id(this.heightMap.lineAt(o,Zd.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Zd.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,Zd.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(e,Zd.ByPos,this.heightOracle,0,0),{visibleTop:n,visibleBottom:a}=this;return(0==t||r<=n-Math.max(10,Math.min(-o,250)))&&(e==this.state.doc.length||i>=a+Math.max(10,Math.min(o,250)))&&r>n-2e3&&i<a+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let o=[];for(let r of t)e.touchesRange(r.from,r.to)||o.push(new Wd(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return o}ensureLineGaps(t,e){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,i=r>>1,n=r<<1;if(this.defaultTextDirection!=Rs.LTR&&!o)return[];let a=[],s=(r,n,l,d)=>{if(n-r<i)return;let c=this.state.selection.main,h=[c.from];c.empty||h.push(c.to);for(let t of h)if(t>r&&t<n)return s(r,t-10,l,d),void s(t+10,n,l,d);let p=function(t,e){for(let o of t)if(e(o))return o}(t,(t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<i&&Math.abs(t.to-n)<i&&!h.some((e=>t.from<e&&t.to>e))));if(!p){if(n<l.to&&e&&o&&e.visibleRanges.some((t=>t.from<=n&&t.to>=n))){let t=e.moveToLineBoundary(Ki.cursor(n),!1,!0).head;t>r&&(n=t)}let t=this.gapSize(l,r,n,d);p=new Wd(r,n,t,o||t<2e6?t:2e6)}a.push(p)},l=e=>{if(e.length<n||e.type!=gs.Text)return;let i=function(t,e,o){let r=[],i=t,n=0;return Bn.spans(o,t,e,{span(){},point(t,e){t>i&&(r.push({from:i,to:t}),n+=t-i),i=e}},20),i<e&&(r.push({from:i,to:e}),n+=e-i),{total:n,ranges:r}}(e.from,e.to,this.stateDeco);if(i.total<n)return;let a,l,d=this.scrollTarget?this.scrollTarget.range.head:null;if(o){let t,o,n=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=d){let r=Gd(i,d),a=((this.visibleBottom-this.visibleTop)/2+n)/e.height;t=r-a,o=r+a}else t=(this.visibleTop-e.top-n)/e.height,o=(this.visibleBottom-e.top+n)/e.height;a=Nd(i,t),l=Nd(i,o)}else{let o=i.total*this.heightOracle.charWidth,n=r*this.heightOracle.charWidth,s=0;if(o>2e6)for(let o of t)o.from>=e.from&&o.from<e.to&&o.size!=o.displaySize&&o.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=o.size-o.displaySize);let c,h,p=this.pixelViewport.left+s,u=this.pixelViewport.right+s;if(null!=d){let t=Gd(i,d),e=((u-p)/2+n)/o;c=t-e,h=t+e}else c=(p-n)/o,h=(u+n)/o;a=Nd(i,c),l=Nd(i,h)}a>e.from&&s(e.from,a,e,i),l<e.to&&s(l,e.to,e,i)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(l):l(t);return a}gapSize(t,e,o,r){let i=Gd(r,o)-Gd(r,e);return this.heightOracle.lineWrapping?t.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(t){Wd.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=vs.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let o=[];Bn.spans(e,this.viewport.from,this.viewport.to,{span(t,e){o.push({from:t,to:e})},point(){}},20);let r=0;if(o.length!=this.visibleRanges.length)r=12;else for(let e=0;e<o.length&&!(8&r);e++){let i=this.visibleRanges[e],n=o[e];i.from==n.from&&i.to==n.to||(r|=4,t&&t.mapPos(i.from,-1)==n.from&&t.mapPos(i.to,1)==n.to||(r|=8))}return this.visibleRanges=o,r}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Kd(this.heightMap.lineAt(t,Zd.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||Kd(this.heightMap.lineAt(this.scaler.fromDOM(t),Zd.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Kd(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Id{constructor(t,e){this.from=t,this.to=e}}function Nd({total:t,ranges:e},o){if(o<=0)return e[0].from;if(o>=1)return e[e.length-1].to;let r=Math.floor(t*o);for(let t=0;;t++){let{from:o,to:i}=e[t],n=i-o;if(r<=n)return o+r;r-=n}}function Gd(t,e){let o=0;for(let{from:r,to:i}of t.ranges){if(e<=i){o+=e-r;break}o+=i-r}return o/t.total}const Fd={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class Hd{constructor(t,e,o){let r=0,i=0,n=0;this.viewports=o.map((({from:o,to:i})=>{let n=e.lineAt(o,Zd.ByPos,t,0,0).top,a=e.lineAt(i,Zd.ByPos,t,0,0).bottom;return r+=a-n,{from:o,to:i,top:n,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=n+(t.top-i)*this.scale,n=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.top)return r+(t-o)*this.scale;if(t<=i.bottom)return i.domTop+(t-i.top);o=i.bottom,r=i.domBottom}}fromDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.domTop)return o+(t-r)/this.scale;if(t<=i.domBottom)return i.top+(t-i.domTop);o=i.bottom,r=i.domBottom}}eq(t){return t instanceof Hd&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,o)=>e.from==t.viewports[o].from&&e.to==t.viewports[o].to))}}function Kd(t,e){if(1==e.scale)return t;let o=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Rd(t.from,t.length,o,r-o,Array.isArray(t._content)?t._content.map((t=>Kd(t,e))):t._content)}const Jd=en.define({combine:t=>t.join(" ")}),tc=en.define({combine:t=>t.indexOf(!0)>-1}),ec=la.newName(),oc=la.newName(),rc=la.newName(),ic={"&light":"."+oc,"&dark":"."+rc};function nc(t,e,o){return new la(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!o||!o[e])throw new RangeError(`Unsupported selector: ${e}`);return o[e]})):t+" "+e})}const ac=nc("."+ec,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-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",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ic),sc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},lc=rs.ie&&rs.ie_version<=11;class dc{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new Ca,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=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(rs.ie&&rs.ie_version<=11||rs.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||rs.chrome&&rs.chrome_version<126||(this.editContext=new pc(t),t.state.facet(hl)&&(t.contentDOM.editContext=this.editContext.editContext)),lc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,o)=>e!=t[o])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(hl)?o.root.activeElement!=this.dom:!Oa(this.dom,r))return;let i=r.anchorNode&&o.docView.nearest(r.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(rs.ie&&rs.ie_version<=11||rs.android&&rs.chrome)&&!o.state.selection.main.empty&&r.focusNode&&xa(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=ga(t.root);if(!e)return!1;let o=rs.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return hc(t,o)}let o=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),o=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),o?hc(t,o):null}(this.view,e)||e;if(!o||this.selectionRange.eq(o))return!1;let r=Oa(this.dom,o);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let o=e.focusNode,r=e.focusOffset;if(!o||e.anchorNode!=o||e.anchorOffset!=r)return!1;for(r=Math.min(r,Sa(o));;)if(r){if(1!=o.nodeType)return!1;let t=o.childNodes[r-1];"false"==t.contentEditable?r--:(o=t,r=Sa(o))}else{if(o==t)return!0;r=wa(o),o=o.parentNode}}(this.dom,o)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let o=this.dom;o;)if(1==o.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sc),lc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),lc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var o;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&Ma(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(o=this.delayedAndroidKey)||void 0===o?void 0:o.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 t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,o=-1,r=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:o}=t):(e=Math.min(t.from,e),o=Math.max(t.to,o)))}return{from:e,to:o,typeOver:r}}readChange(){let{from:t,to:e,typeOver:o}=this.processRecords(),r=this.selectionChanged&&Oa(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Nl(this.view,t,e,o);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let o=this.view.state,r=Gl(this.view,e);return this.view.state==o&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let o=cc(e,t.previousSibling||t.target.previousSibling,-1),r=cc(e,t.nextSibling||t.target.nextSibling,1);return{from:o?e.posAfter(o):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(hl)!=t.state.facet(hl)&&(t.view.contentDOM.editContext=t.state.facet(hl)?this.editContext.editContext:null))}destroy(){var t,e,o;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(o=this.resizeScroll)||void 0===o||o.disconnect();for(let t of this.scrollTargets)t.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 cc(t,e,o){for(;e;){let r=Ua.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:o>0?e.nextSibling:e.previousSibling}return null}function hc(t,e){let o=e.startContainer,r=e.startOffset,i=e.endContainer,n=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return xa(a.node,a.offset,i,n)&&([o,r,i,n]=[i,n,o,r]),{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}}class pc{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let o=t.state.selection.main,{anchor:r,head:i}=o,n=this.toEditorPos(e.updateRangeStart),a=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:n,drifted:!1});let s={from:n,to:a,insert:$i.of(e.text.split("\n"))};if(s.from==this.from&&r<this.from?s.from=r:s.to==this.to&&r>this.to&&(s.to=r),s.from!=s.to||s.insert.length){if((rs.mac||rs.android)&&s.from==i-1&&/^\. ?$/.test(e.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(s={from:n,to:a,insert:$i.of([e.text.replace("."," ")])}),this.pendingContextChange=s,!t.state.readOnly){let o=this.to-this.from+(s.to-s.from+s.insert.length);Fl(t,s,Ki.single(this.toEditorPos(e.selectionStart,o),this.toEditorPos(e.selectionEnd,o)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))}else{let r=Ki.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd));r.main.eq(o)||t.dispatch({selection:r,userEvent:"select"})}},this.handlers.characterboundsupdate=o=>{let r=[],i=null;for(let e=this.toEditorPos(o.rangeStart),n=this.toEditorPos(o.rangeEnd);e<n;e++){let o=t.coordsForChar(e);i=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||i||new DOMRect,r.push(i)}e.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=e=>{let o=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if("None"!=e&&"None"!=r){let i=this.toEditorPos(t.rangeStart),n=this.toEditorPos(t.rangeEnd);if(i<n){let t=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==r?1:2}px`;o.push(vs.mark({attributes:{style:t}}).range(i,n))}}}t.dispatch({effects:dl.of(vs.set(o))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=ga(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,o=!1,r=this.pendingContextChange;return t.changes.iterChanges(((i,n,a,s,l)=>{if(o)return;let d=l.length-(n-i);if(r&&n>=r.to){if(r.from==i&&r.to==n&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=d,void(this.to+=d);r=null,this.revertPending(t.state)}if(i+=e,(n+=e)<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||n>this.to||this.to-this.from+l.length>3e4)return void(o=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(n),l.toString()),this.to+=d}e+=d})),r&&!o&&this.revertPending(t.state),!o}update(t){let e=this.pendingContextChange,o=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(o.from,o.to)&&t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==o&&this.editContext.selectionEnd==r||this.editContext.updateSelection(o,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let o=this.composing;return o&&o.drifted?o.editorBase+(t-o.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class uc{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var 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),t.parent&&t.parent.appendChild(this.dom);let{dispatch:o}=t;this.dispatchTransactions=t.dispatchTransactions||o&&(t=>t.forEach((t=>o(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Yd(t.state||_n.create(t)),t.scrollTo&&t.scrollTo.is(ll)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ul).map((t=>new fl(t)));for(let t of this.plugins)t.update(this);this.observer=new dc(this),this.inputState=new Hl(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Pl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof Cn?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,o=!1,r=!1,i=this.state;for(let e of t){if(e.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=e.state}if(this.destroyed)return void(this.viewState.state=i);let n=this.hasFocus,a=0,s=null;t.some((t=>t.annotation(xd)))?(this.inputState.notifiedFocused=n,a=1):n!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=n,s=wd(i,n),s||(a=1));let l=this.observer.delayedAndroidKey,d=null;if(l?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(_n.phrases)!=this.state.facet(_n.phrases))return this.setState(i);e=$l.create(this,i,t),e.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new sl(t.empty?t:Ki.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(ll)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=bc.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),o=this.docView.update(e),this.state.facet(Sl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(o,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(Jd)!=e.state.facet(Jd)&&(this.viewState.mustMeasureContent=!0),(o||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(Js))try{t(e)}catch(t){cl(this.state,t,"update listener")}(s||d)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),d&&!Gl(this,d)&&l.force&&Ma(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Yd(t),this.plugins=t.facet(ul).map((t=>new fl(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Pl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(ul),o=t.state.facet(ul);if(e!=o){let r=[];for(let i of o){let o=e.indexOf(i);if(o<0)r.push(new fl(i));else{let e=this.plugins[o];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){cl(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:n}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(n=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(n<0)if(ja(o))i=-1,n=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);i=t.from,n=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((t=>{try{return t.read(this)}catch(t){return cl(this.state,t),fc}})),d=$l.create(this,this.state,[]),c=!1;d.flags|=a,e?e.flags|=a:e=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),c=this.docView.update(d),c&&this.docViewUpdate());for(let t=0;t<s.length;t++)if(l[t]!=fc)try{let e=s[t];e.write&&e.write(l[t],this)}catch(t){cl(this.state,t)}if(c&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,n=-1;continue}{let t=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-n;if(t>1||t<-1){r+=t,o.scrollTop=r/this.scaleY,n=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(Js))t(e)}get themeClasses(){return ec+" "+(this.state.facet(tc)?rc:oc)+" "+this.state.facet(Jd)}updateAttrs(){let t=gc(this,bl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(hl)?"true":"false",class:"cm-content",style:`${rs.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),gc(this,gl,e);let o=this.observer.ignore((()=>{let o=ms(this.contentDOM,this.contentAttrs,e),r=ms(this.dom,this.editorAttrs,t);return o||r}));return this.editorAttrs=t,this.contentAttrs=e,o}showAnnouncements(t){let e=!0;for(let o of t)for(let t of o.effects)t.is(uc.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(Sl);let t=this.state.facet(uc.cspNonce);la.mount(this.root,this.styleModules.concat(ac).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.spec!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null),e&&e.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(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,o){return Ll(this,t,Ul(this,t,e,o))}moveByGroup(t,e){return Ll(this,t,Ul(this,t,e,(e=>function(t,e,o){let r=t.state.charCategorizer(e),i=r(o);return t=>{let e=r(t);return i==jn.Space&&(i=e),i==e}}(this,t.head,e))))}visualLineSide(t,e){let o=this.bidiSpans(t),r=this.textDirectionAt(t.from),i=o[e?o.length-1:0];return Ki.cursor(i.side(e,r)+t.from,i.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,o=!0){return function(t,e,o,r){let i=Dl(t,e.head),n=r&&i.type==gs.Text&&(t.lineWrapping||i.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(n){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(i.from),a=t.posAtCoords({x:o==(r==Rs.LTR)?e.right-1:e.left+1,y:(n.top+n.bottom)/2});if(null!=a)return Ki.cursor(a,o?-1:1)}return Ki.cursor(o?i.to:i.from,o?-1:1)}(this,t,e,o)}moveVertically(t,e,o){return Ll(this,t,function(t,e,o,r){let i=e.head,n=o?1:-1;if(i==(o?t.state.doc.length:0))return Ki.cursor(i,e.assoc);let a,s=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),d=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(d)null==s&&(s=d.left-l.left),a=n<0?d.top:d.bottom;else{let e=t.viewState.lineBlockAt(i);null==s&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-e.from))),a=(n<0?e.top:e.bottom)+c}let h=l.left+s,p=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let o=a+(p+e)*n,r=Xl(t,{x:h,y:o},!1,n);if(o<l.top||o>l.bottom||(n<0?r<i:r>i)){let e=t.docView.coordsForChar(r),i=!e||o<e.top?-1:1;return Ki.cursor(r,i,void 0,s)}}}(this,t,e,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Xl(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let o=this.docView.coordsAt(t,e);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(t),i=this.bidiSpans(r);return Qa(o,i[Ds.find(i,t-r.from,-1,e)].dir==Rs.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(il)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>mc)return Bs(t.length);let e,o=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==o&&(r.fresh||Us(r.isolates,e=wl(this,t))))return r.order;e||(e=wl(this,t));let r=function(t,e,o){if(!t)return[new Ds(0,0,e==Ts?1:0)];if(e==Zs&&!o.length&&!_s.test(t))return Bs(t.length);if(o.length)for(;t.length>Vs.length;)Vs[Vs.length]=256;let r=[],i=e==Zs?0:1;return Ws(t,i,i,o,0,t.length,r),r}(t.text,o,e);return this.bidiCache.push(new bc(t.from,t.to,o,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||rs.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Ta(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.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(t,e={}){return ll.of(new sl("number"==typeof t?Ki.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,o=this.viewState.scrollAnchorAt(t);return ll.of(new sl(Ki.cursor(o.from),"start","start",o.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return ml.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return ml.define((()=>({})),{eventObservers:t})}static theme(t,e){let o=la.newName(),r=[Jd.of(o),Sl.of(nc(`.${o}`,t))];return e&&e.dark&&r.push(tc.of(!0)),r}static baseTheme(t){return hn.lowest(Sl.of(nc("."+ec,t,ic)))}static findFromDOM(t){var e;let o=t.querySelector(".cm-content"),r=o&&Ua.get(o)||Ua.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}uc.styleModule=Sl,uc.inputHandler=tl,uc.clipboardInputFilter=ol,uc.clipboardOutputFilter=rl,uc.scrollHandler=al,uc.focusChangeEffect=el,uc.perLineTextDirection=il,uc.exceptionSink=Ks,uc.updateListener=Js,uc.editable=hl,uc.mouseSelectionStyle=Hs,uc.dragMovesSelection=Fs,uc.clickAddsSelectionRange=Gs,uc.decorations=vl,uc.outerDecorations=Ol,uc.atomicRanges=yl,uc.bidiIsolatedRanges=xl,uc.scrollMargins=kl,uc.darkTheme=tc,uc.cspNonce=en.define({combine:t=>t.length?t[0]:""}),uc.contentAttributes=gl,uc.editorAttributes=bl,uc.lineWrapping=uc.contentAttributes.of({class:"cm-lineWrapping"}),uc.announce=Pn.define();const mc=4096,fc={};class bc{constructor(t,e,o,r,i,n){this.from=t,this.to=e,this.dir=o,this.isolates=r,this.fresh=i,this.order=n}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let o=[],r=t.length?t[t.length-1].dir:Rs.LTR;for(let i=Math.max(0,t.length-10);i<t.length;i++){let n=t[i];n.dir!=r||e.touchesRange(n.from,n.to)||o.push(new bc(e.mapPos(n.from,1),e.mapPos(n.to,-1),n.dir,n.isolates,!1,n.order))}return o}}function gc(t,e,o){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let e=r[i],n="function"==typeof e?e(t):e;n&&hs(n,o)}return o}const vc=rs.mac?"mac":rs.windows?"win":rs.linux?"linux":"key";function Oc(t,e,o){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==o&&e.shiftKey&&(t="Shift-"+t),t}const yc=hn.default(uc.domEventHandlers({keydown:(t,e)=>$c(kc(e.state),t,e,"editor")})),xc=en.define({enables:yc}),wc=new WeakMap;function kc(t){let e=t.facet(xc),o=wc.get(e);return o||wc.set(e,o=function(t,e=vc){let o=Object.create(null),r=Object.create(null),i=(t,e)=>{let o=r[t];if(null==o)r[t]=e;else if(o!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},n=(t,r,n,a,s)=>{var l,d;let c=o[t]||(o[t]=Object.create(null)),h=r.split(/ (?!$)/).map((t=>function(t,e){const o=t.split(/-(?!$)/);let r,i,n,a,s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;++t){const s=o[t];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==e?a=!0:i=!0}}return r&&(s="Alt-"+s),i&&(s="Ctrl-"+s),a&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(t,e)));for(let e=1;e<h.length;e++){let o=h.slice(0,e).join(" ");i(o,!0),c[o]||(c[o]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=qc={view:e,prefix:o,scope:t};return setTimeout((()=>{qc==r&&(qc=null)}),Sc),!0}]})}let p=h.join(" ");i(p,!1);let u=c[p]||(c[p]={preventDefault:!1,stopPropagation:!1,run:(null===(d=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===d?void 0:d.slice())||[]});n&&u.run.push(n),a&&(u.preventDefault=!0),s&&(u.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=o[e]||(o[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let e in t)t[e].run.push((t=>i(t,Qc)))}let i=r[e]||r.key;if(i)for(let e of t)n(e,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&n(e,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return o}(e.reduce(((t,e)=>t.concat(e)),[]))),o}let qc=null;const Sc=4e3;let Qc=null;function $c(t,e,o,r){Qc=e;let i=function(t){var e=!(ua&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||ma&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?pa:ha)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),n=Di(Xi(i,0))==i.length&&" "!=i,a="",s=!1,l=!1,d=!1;qc&&qc.view==o&&qc.scope==r&&(a=qc.prefix+" ",od.indexOf(e.keyCode)<0&&(l=!0,qc=null));let c,h,p=new Set,u=t=>{if(t){for(let e of t.run)if(!p.has(e)&&(p.add(e),e(o)))return t.stopPropagation&&(d=!0),!0;t.preventDefault&&(t.stopPropagation&&(d=!0),l=!0)}return!1},m=t[r];return m&&(u(m[a+Oc(i,e,!n)])?s=!0:n&&(e.altKey||e.metaKey||e.ctrlKey)&&!(rs.windows&&e.ctrlKey&&e.altKey)&&(c=ha[e.keyCode])&&c!=i?(u(m[a+Oc(c,e,!0)])||e.shiftKey&&(h=pa[e.keyCode])!=i&&h!=c&&u(m[a+Oc(h,e,!1)]))&&(s=!0):n&&e.shiftKey&&u(m[a+Oc(i,e,!0)])&&(s=!0),!s&&u(m._any)&&(s=!0)),l&&(s=!0),s&&d&&e.stopPropagation(),Qc=null,s}class Pc{constructor(t,e,o,r,i){this.className=t,this.left=e,this.top=o,this.width=r,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,o){if(o.empty){let r=t.coordsAtPos(o.head,o.assoc||1);if(!r)return[];let i=Cc(t);return[new Pc(e,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(t,e,o){if(o.to<=t.viewport.from||o.from>=t.viewport.to)return[];let r=Math.max(o.from,t.viewport.from),i=Math.min(o.to,t.viewport.to),n=t.textDirection==Rs.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=Cc(t),d=a.querySelector(".cm-line"),c=d&&window.getComputedStyle(d),h=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),p=s.right-(c?parseInt(c.paddingRight):0),u=Dl(t,r),m=Dl(t,i),f=u.type==gs.Text?u:null,b=m.type==gs.Text?m:null;if(f&&(t.lineWrapping||u.widgetLineBreaks)&&(f=Rc(t,r,1,f)),b&&(t.lineWrapping||m.widgetLineBreaks)&&(b=Rc(t,i,-1,b)),f&&b&&f.from==b.from&&f.to==b.to)return v(O(o.from,o.to,f));{let e=f?O(o.from,null,f):y(u,!1),r=b?O(null,o.to,b):y(m,!0),i=[];return(f||u).to<(b||m).from-(f&&b?1:0)||u.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?i.push(g(h,e.bottom,p,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==gs.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),v(e).concat(i).concat(v(r))}function g(t,o,r,i){return new Pc(e,t-l.left,o-l.top,r-t,i-o)}function v({top:t,bottom:e,horizontal:o}){let r=[];for(let i=0;i<o.length;i+=2)r.push(g(o[i],t,o[i+1],e));return r}function O(e,o,r){let i=1e9,a=-1e9,s=[];function l(e,o,l,d,c){let u=t.coordsAtPos(e,e==r.to?-2:2),m=t.coordsAtPos(l,l==r.from?2:-2);u&&m&&(i=Math.min(u.top,m.top,i),a=Math.max(u.bottom,m.bottom,a),c==Rs.LTR?s.push(n&&o?h:u.left,n&&d?p:m.right):s.push(!n&&d?h:m.left,!n&&o?p:u.right))}let d=null!=e?e:r.from,c=null!=o?o:r.to;for(let r of t.visibleRanges)if(r.to>d&&r.from<c)for(let i=Math.max(r.from,d),n=Math.min(r.to,c);;){let r=t.state.doc.lineAt(i);for(let a of t.bidiSpans(r)){let t=a.from+r.from,s=a.to+r.from;if(t>=n)break;s>i&&l(Math.max(t,i),null==e&&t<=d,Math.min(s,n),null==o&&s>=c,a.dir)}if(i=r.to+1,i>=n)break}return 0==s.length&&l(d,null==e,c,null==o,t.textDirection),{top:i,bottom:a,horizontal:s}}function y(t,e){let o=s.top+(e?t.top:t.bottom);return{top:o,bottom:o,horizontal:[]}}}(t,e,o)}}function Cc(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Rs.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Rc(t,e,o,r){let i=t.coordsAtPos(e,2*o);if(!i)return r;let n=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:n.left+1,y:a}),l=t.posAtCoords({x:n.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class Zc{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(Tc)!=t.state.facet(Tc)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,o=t.facet(Tc);for(;e<o.length&&o[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e])))){let e=this.dom.firstChild,o=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[o].constructor&&r.update(e,this.drawn[o])?(e=e.nextSibling,o++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Tc=en.define();function Ac(t){return[ml.define((e=>new Zc(e,t))),Tc.of(t)]}const Mc=!(rs.ios&&rs.webkit&&rs.webkit_version<534),Ec=en.define({combine:t=>Dn(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function jc(t={}){return[Ec.of(t),Xc,Dc,Vc,nl.of(!0)]}function zc(t){return t.startState.facet(Ec)!=t.state.facet(Ec)}const Xc=Ac({above:!0,markers(t){let{state:e}=t,o=e.facet(Ec),r=[];for(let i of e.selection.ranges){let n=i==e.selection.main;if(i.empty?!n||Mc:o.drawRangeCursor){let e=n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:Ki.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Pc.forRange(t,e,o))r.push(i)}}return r},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let o=zc(t);return o&&_c(t.state,e),t.docChanged||t.selectionSet||o},mount(t,e){_c(e.state,t)},class:"cm-cursorLayer"});function _c(t,e){e.style.animationDuration=t.facet(Ec).cursorBlinkRate+"ms"}const Dc=Ac({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Pc.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||zc(t),class:"cm-selectionLayer"}),Uc={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Mc&&(Uc[".cm-line"].caretColor=Uc[".cm-content"].caretColor="transparent !important");const Vc=hn.highest(uc.theme(Uc)),Lc=Pn.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Wc=dn.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Lc)?e.value:t),t))}),Bc=ml.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let o=t.state.field(Wc);null==o?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wc)!=o||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wc),o=null!=e&&t.coordsAtPos(e);if(!o)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:o.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:o.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:o.bottom-o.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:o}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/o+"px",this.cursor.style.height=t.height/o+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wc)!=t&&this.view.dispatch({effects:Lc.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Yc(t,e,o,r,i){e.lastIndex=0;for(let n,a=t.iterRange(o,r),s=o;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;n=e.exec(a.value);)i(s+n.index,n)}class Ic{constructor(t){const{regexp:e,decoration:o,decorate:r,boundary:i,maxLength:n=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,o,i)=>r(i,o,o+t[0].length,t,e);else if("function"==typeof o)this.addMatch=(t,e,r,i)=>{let n=o(t,e,r);n&&i(r,r+t[0].length,n)};else{if(!o)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,i)=>i(r,r+t[0].length,o)}this.boundary=i,this.maxLength=n}createDeco(t){let e=new Yn,o=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let o=t.visibleRanges;if(1==o.length&&o[0].from==t.viewport.from&&o[0].to==t.viewport.to)return o;let r=[];for(let{from:i,to:n}of o)i=Math.max(t.state.doc.lineAt(i).from,i-e),n=Math.min(t.state.doc.lineAt(n).to,n+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=n:r.push({from:i,to:n});return r}(t,this.maxLength))Yc(t.state.doc,this.regexp,e,r,((e,r)=>this.addMatch(r,t,e,o)));return e.finish()}updateDeco(t,e){let o=1e9,r=-1;return t.docChanged&&t.changes.iterChanges(((e,i,n,a)=>{a>=t.view.viewport.from&&n<=t.view.viewport.to&&(o=Math.min(n,o),r=Math.max(a,r))})),t.viewportMoved||r-o>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),o,r):e}updateRange(t,e,o,r){for(let i of t.visibleRanges){let n=Math.max(i.from,o),a=Math.min(i.to,r);if(a>n){let o=t.state.doc.lineAt(n),r=o.to<a?t.state.doc.lineAt(a):o,s=Math.max(i.from,o.from),l=Math.min(i.to,r.to);if(this.boundary){for(;n>o.from;n--)if(this.boundary.test(o.text[n-1-o.from])){s=n;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let d,c=[],h=(t,e,o)=>c.push(o.range(t,e));if(o==r)for(this.regexp.lastIndex=s-o.from;(d=this.regexp.exec(o.text))&&d.index<l-o.from;)this.addMatch(d,t,d.index+o.from,h);else Yc(t.state.doc,this.regexp,s,l,((e,o)=>this.addMatch(o,t,e,h)));e=e.update({filterFrom:s,filterTo:l,filter:(t,e)=>t<s||e>l,add:c})}}return e}}const Nc=null!=/x/.unicode?"gu":"g",Gc=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Nc),Fc={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Hc=null;const Kc=en.define({combine(t){let e=Dn(t,{render:null,specialChars:Gc,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Hc&&"undefined"!=typeof document&&document.body){let e=document.body.style;Hc=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Hc||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Nc)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Nc)),e}});function Jc(t={}){return[Kc.of(t),th||(th=ml.fromClass(class{constructor(t){this.view=t,this.decorations=vs.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Kc)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Ic({regexp:t.specialChars,decoration:(e,o,r)=>{let{doc:i}=o.state,n=Xi(e[0],0);if(9==n){let t=i.lineAt(r),e=o.state.tabSize,n=ra(t.text,e,r-t.from);return vs.replace({widget:new oh((e-n%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=vs.replace({widget:new eh(t,n)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Kc);t.startState.facet(Kc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let th=null;class eh extends bs{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),o=t.state.phrase("Control character")+" "+(Fc[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,o,e);if(r)return r;let i=document.createElement("span");return i.textContent=e,i.title=o,i.setAttribute("aria-label",o),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class oh extends bs{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const rh=vs.line({class:"cm-activeLine"}),ih=ml.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,o=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(o.push(rh.range(i.from)),e=i.from)}return vs.set(o)}},{decorations:t=>t.decorations}),nh=2e3;function ah(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(o),i=o-r.from,n=i>nh?-1:i==r.length?function(t,e){let o=t.coordsAtPos(t.viewport.from);return o?Math.round(Math.abs((o.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):ra(r.text,t.state.tabSize,o-r.from);return{line:r.number,col:n,off:i}}function sh(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return uc.mouseSelectionStyle.of(((t,o)=>e(o)?function(t,e){let o=ah(t,e),r=t.state.selection;return o?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(o.line).from),i=t.state.doc.lineAt(e);o={line:i.number,col:o.col,off:Math.min(o.off,i.length)},r=r.map(t.changes)}},get(e,i,n){let a=ah(t,e);if(!a)return r;let s=function(t,e,o){let r=Math.min(e.line,o.line),i=Math.max(e.line,o.line),n=[];if(e.off>nh||o.off>nh||e.col<0||o.col<0){let a=Math.min(e.off,o.off),s=Math.max(e.off,o.off);for(let e=r;e<=i;e++){let o=t.doc.line(e);o.length<=s&&n.push(Ki.range(o.from+a,o.to+s))}}else{let a=Math.min(e.col,o.col),s=Math.max(e.col,o.col);for(let e=r;e<=i;e++){let o=t.doc.line(e),r=ia(o.text,a,t.tabSize,!0);if(r<0)n.push(Ki.cursor(o.to));else{let e=ia(o.text,s,t.tabSize);n.push(Ki.range(o.from+r,o.from+e))}}}return n}(t.state,o,a);return s.length?n?Ki.create(s.concat(r.ranges)):Ki.create(s):r}}:null}(t,o):null))}const lh={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},dh={style:"cursor: crosshair"};function ch(t={}){let[e,o]=lh[t.key||"Alt"],r=ml.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||o(t))},keyup(t){t.keyCode!=e&&o(t)||this.set(!1)},mousemove(t){this.set(o(t))}}});return[r,uc.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?dh:null}))]}const hh="-10000px";class ph{constructor(t,e,o,r){this.facet=e,this.createTooltipView=o,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let i=null;this.tooltipViews=this.tooltips.map((t=>i=o(t,i)))}update(t,e){var o;let r=t.state.facet(this.facet),i=r.filter((t=>t));if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[],a=e?[]:null;for(let o=0;o<i.length;o++){let r=i[o],s=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(s=t)}if(s<0)n[o]=this.createTooltipView(r,o?n[o-1]:null),a&&(a[o]=!!r.above);else{let r=n[o]=this.tooltipViews[s];a&&(a[o]=e[s]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)n.indexOf(t)<0&&(this.removeTooltipView(t),null===(o=t.destroy)||void 0===o||o.call(t));return e&&(a.forEach(((t,o)=>e[o]=t)),e.length=a.length),this.input=r,this.tooltips=i,this.tooltipViews=n,!0}}function uh(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const mh=en.define({combine:t=>{var e,o,r;return{position:rs.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(o=t.find((t=>t.parent)))||void 0===o?void 0:o.parent)||null,tooltipSpace:(null===(r=t.find((t=>t.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||uh}}}),fh=new WeakMap,bh=ml.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(mh);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new ph(t,yh,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let o=e||t.geometryChanged,r=t.state.facet(mh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;o=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(t,e){let o=t.create(this.view),r=e?e.dom:null;if(o.dom.classList.add("cm-tooltip"),t.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",o.dom.appendChild(t)}return o.dom.style.position=this.position,o.dom.style.top=hh,o.dom.style.left="0px",this.container.insertBefore(o.dom,r),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var t,e,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(o=this.intersectionObserver)||void 0===o||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(rs.gecko)o=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==hh&&"0px"==t.style.left){let e=t.getBoundingClientRect();o=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(o||"absolute"==this.position)if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=ql(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let o=this.manager.tooltipViews[e];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(mh).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:o}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:o,space:r,scaleX:i,scaleY:n}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],d=this.manager.tooltipViews[s],{dom:c}=d,h=t.pos[s],p=t.size[s];if(!h||!1!==l.clip&&(h.bottom<=Math.max(o.top,r.top)||h.top>=Math.min(o.bottom,r.bottom)||h.right<Math.max(o.left,r.left)-.1||h.left>Math.min(o.right,r.right)+.1)){c.style.top=hh;continue}let u=l.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=u?7:0,f=p.right-p.left,b=null!==(e=fh.get(d))&&void 0!==e?e:p.bottom-p.top,g=d.offset||Oh,v=this.view.textDirection==Rs.LTR,O=p.width>r.right-r.left?v?r.left:r.right-p.width:v?Math.max(r.left,Math.min(h.left-(u?14:0)+g.x,r.right-f)):Math.min(Math.max(r.left,h.left-f+(u?14:0)-g.x),r.right-f),y=this.above[s];!l.strictSide&&(y?h.top-b-m-g.y<r.top:h.bottom+b+m+g.y>r.bottom)&&y==r.bottom-h.bottom>h.top-r.top&&(y=this.above[s]=!y);let x=(y?h.top-r.top:r.bottom-h.bottom)-m;if(x<b&&!1!==d.resize){if(x<this.view.defaultLineHeight){c.style.top=hh;continue}fh.set(d,b),c.style.height=(b=x)/n+"px"}else c.style.height&&(c.style.height="");let w=y?h.top-b-m-g.y:h.bottom+m+g.y,k=O+f;if(!0!==d.overlap)for(let t of a)t.left<k&&t.right>O&&t.top<w+b&&t.bottom>w&&(w=y?t.top-b-2-m:t.bottom+m+2);if("absolute"==this.position?(c.style.top=(w-t.parent.top)/n+"px",gh(c,(O-t.parent.left)/i)):(c.style.top=w/n+"px",gh(c,O/i)),u){let t=h.left+(v?g.x:-g.x)-(O+14-7);u.style.left=t/i+"px"}!0!==d.overlap&&a.push({left:O,top:w,right:k,bottom:w+b}),c.classList.toggle("cm-tooltip-above",y),c.classList.toggle("cm-tooltip-below",!y),d.positioned&&d.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=hh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function gh(t,e){let o=parseInt(t.style.left,10);(isNaN(o)||Math.abs(e-o)>1)&&(t.style.left=e+"px")}const vh=uc.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Oh={x:0,y:0},yh=en.define({enables:[bh,vh]}),xh=en.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class wh{static create(t){return new wh(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ph(t,xh,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let o=t.create(this.view);return o.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(o.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&o.mount&&o.mount(this.view),o}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let o of this.manager.tooltipViews){let r=o[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const kh=yh.compute([xh],(t=>{let e=t.facet(xh);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:wh.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class qh{constructor(t,e,o,r,i){this.view=t,this.source=e,this.field=o,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,o=t.docView.nearest(e.target);if(!o)return;let r,i=1;if(o instanceof as)r=o.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let o=t.coordsAtPos(r);if(!o||e.y<o.top||e.y>o.bottom||e.x<o.left-t.defaultCharacterWidth||e.x>o.right+t.defaultCharacterWidth)return;let n=t.bidiSpans(t.state.doc.lineAt(r)).find((t=>t.from<=r&&t.to>=r)),a=n&&n.dir==Rs.RTL?-1:1;i=e.x<o.left?-a:a}let n=this.source(t,r,i);if(null==n?void 0:n.then){let e=this.pending={pos:r};n.then((o=>{this.pending==e&&(this.pending=null,!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])}))}),(e=>cl(t.state,e,"hover tooltip")))}else!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])})}get tooltip(){let t=this.view.plugin(bh),e=t?t.manager.tooltips.findIndex((t=>t.create==wh.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,o;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(t,e){let o,{left:r,right:i,top:n,bottom:a}=t.getBoundingClientRect();if(o=t.querySelector(".cm-tooltip-arrow")){let t=o.getBoundingClientRect();n=Math.min(t.top,n),a=Math.max(t.bottom,a)}return e.clientX>=r-Sh&&e.clientX<=i+Sh&&e.clientY>=n-Sh&&e.clientY<=a+Sh}(i.dom,t)||this.pending){let{pos:i}=r[0]||this.pending,n=null!==(o=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==o?o:i;(i==n?this.view.posAtCoords(this.lastMove)==i:function(t,e,o,r,i){let n=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(n.left>r||n.right<r||n.top>i||Math.min(n.bottom,a)<i)return!1;let s=t.posAtCoords({x:r,y:i},!1);return s>=e&&s<=o}(this.view,i,n,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=o=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(o.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Sh=4;function Qh(t,e={}){let o=Pn.define(),r=dn.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(r,t)))),r.docChanged)){let e=[];for(let o of t){let t=r.changes.mapPos(o.pos,-1,Vi.TrackDel);if(null!=t){let i=Object.assign(Object.create(null),o);i.pos=t,null!=i.end&&(i.end=r.changes.mapPos(i.end)),e.push(i)}}t=e}for(let e of r.effects)e.is(o)&&(t=e.value),e.is(Ph)&&(t=[]);return t},provide:t=>xh.from(t)});return{active:r,extension:[r,ml.define((i=>new qh(i,t,r,o,e.hoverTime||300))),kh]}}function $h(t,e){let o=t.plugin(bh);if(!o)return null;let r=o.manager.tooltips.indexOf(e);return r<0?null:o.manager.tooltipViews[r]}const Ph=Pn.define(),Ch=en.define({combine(t){let e,o;for(let r of t)e=e||r.topContainer,o=o||r.bottomContainer;return{topContainer:e,bottomContainer:o}}});function Rh(t,e){let o=t.plugin(Zh),r=o?o.specs.indexOf(e):-1;return r>-1?o.panels[r]:null}const Zh=ml.fromClass(class{constructor(t){this.input=t.state.facet(Mh),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Ch);this.top=new Th(t,!0,e.topContainer),this.bottom=new Th(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Ch);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Th(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Th(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let o=t.state.facet(Mh);if(o!=this.input){let e=o.filter((t=>t)),r=[],i=[],n=[],a=[];for(let o of e){let e,s=this.specs.indexOf(o);s<0?(e=o(t.view),a.push(e)):(e=this.panels[s],e.update&&e.update(t)),r.push(e),(e.top?i:n).push(e)}this.specs=e,this.panels=r,this.top.sync(i),this.bottom.sync(n);for(let t of a)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>uc.scrollMargins.of((e=>{let o=e.plugin(t);return o&&{top:o.top.scrollMargin(),bottom:o.bottom.scrollMargin()}}))});class Th{constructor(t,e,o){this.view=t,this.top=e,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=Ah(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=Ah(t)}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 t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function Ah(t){let e=t.nextSibling;return t.remove(),e}const Mh=en.define({enables:Zh});class Eh extends Un{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Eh.prototype.elementClass="",Eh.prototype.toDOM=void 0,Eh.prototype.mapMode=Vi.TrackBefore,Eh.prototype.startSide=Eh.prototype.endSide=-1,Eh.prototype.point=!0;const jh=en.define(),zh=en.define(),Xh={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Bn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},_h=en.define();function Dh(t){return[Vh(),_h.of(Object.assign(Object.assign({},Xh),t))]}const Uh=en.define({combine:t=>t.some((t=>t))});function Vh(t){let e=[Lh];return t&&!1===t.fixed&&e.push(Uh.of(!0)),e}const Lh=ml.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(_h).map((e=>new Ih(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(Uh),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,o=t.view.viewport,r=Math.min(e.to,o.to)-Math.max(e.from,o.from);this.syncGutters(r<.8*(o.to-o.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Uh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let o=Bn.iter(this.view.state.facet(jh),this.view.viewport.from),r=[],i=this.gutters.map((t=>new Yh(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==gs.Text&&e){Bh(o,r,n.from);for(let t of i)t.line(this.view,n,r);e=!1}else if(n.widget)for(let t of i)t.widget(this.view,n)}else if(t.type==gs.Text){Bh(o,r,t.from);for(let e of i)e.line(this.view,t,r)}else if(t.widget)for(let e of i)e.widget(this.view,t);for(let t of i)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(_h),o=t.state.facet(_h),r=t.docChanged||t.heightChanged||t.viewportChanged||!Bn.eq(t.startState.facet(jh),t.state.facet(jh),t.view.viewport.from,t.view.viewport.to);if(e==o)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let i=[];for(let r of o){let o=e.indexOf(r);o<0?i.push(new Ih(this.view,r)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)this.dom.appendChild(t.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>uc.scrollMargins.of((e=>{let o=e.plugin(t);return o&&0!=o.gutters.length&&o.fixed?e.textDirection==Rs.LTR?{left:o.dom.offsetWidth*e.scaleX}:{right:o.dom.offsetWidth*e.scaleX}:null}))});function Wh(t){return Array.isArray(t)?t:[t]}function Bh(t,e,o){for(;t.value&&t.from<=o;)t.from==o&&e.push(t.value),t.next()}class Yh{constructor(t,e,o){this.gutter=t,this.height=o,this.i=0,this.cursor=Bn.iter(t.markers,e.from)}addElement(t,e,o){let{gutter:r}=this,i=(e.top-this.height)/t.scaleY,n=e.height/t.scaleY;if(this.i==r.elements.length){let e=new Nh(t,n,i,o);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,n,i,o);this.height=e.bottom,this.i++}line(t,e,o){let r=[];Bh(this.cursor,r,e.from),o.length&&(r=r.concat(o));let i=this.gutter.config.lineMarker(t,e,r);i&&r.unshift(i);let n=this.gutter;(0!=r.length||n.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let o=this.gutter.config.widgetMarker(t,e.widget,e),r=o?[o]:null;for(let o of t.state.facet(zh)){let i=o(t,e.widget,e);i&&(r||(r=[])).push(i)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Ih{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in e.domEventHandlers)this.dom.addEventListener(o,(r=>{let i,n=r.target;if(n!=this.dom&&this.dom.contains(n)){for(;n.parentNode!=this.dom;)n=n.parentNode;let t=n.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=r.clientY;let a=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[o](t,a,r)&&r.preventDefault()}));this.markers=Wh(e.markers(t)),e.initialSpacer&&(this.spacer=new Nh(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Wh(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let o=t.view.viewport;return!Bn.eq(this.markers,e,o.from,o.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Nh{constructor(t,e,o,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,o,r)}update(t,e,o,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!t[o].compare(e[o]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let o="cm-gutterElement",r=this.dom.firstChild;for(let i=0,n=0;;){let a=n,s=i<e.length?e[i++]:null,l=!1;if(s){let t=s.elementClass;t&&(o+=" "+t);for(let t=n;t<this.markers.length;t++)if(this.markers[t].compare(s)){a=t,l=!0;break}}else a=this.markers.length;for(;n<a;){let t=this.markers[n++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(t),r)),l&&n++}this.dom.className=o,this.markers=e}destroy(){this.setMarkers(null,[])}}const Gh=en.define(),Fh=en.define(),Hh=en.define({combine:t=>Dn(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let o=Object.assign({},t);for(let t in e){let r=o[t],i=e[t];o[t]=r?(t,e,o)=>r(t,e,o)||i(t,e,o):i}return o}})});class Kh extends Eh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Jh(t,e){return t.state.facet(Hh).formatNumber(e,t.state)}const tp=_h.compute([Hh],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Gh),lineMarker:(t,e,o)=>o.some((t=>t.toDOM))?null:new Kh(Jh(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,o)=>{for(let r of t.state.facet(Fh)){let i=r(t,e,o);if(i)return i}return null},lineMarkerChange:t=>t.startState.facet(Hh)!=t.state.facet(Hh),initialSpacer:t=>new Kh(Jh(t,op(t.state.doc.lines))),updateSpacer(t,e){let o=Jh(e.view,op(e.view.state.doc.lines));return o==t.number?t:new Kh(o)},domEventHandlers:t.facet(Hh).domEventHandlers})));function ep(t={}){return[Hh.of(t),Vh(),tp]}function op(t){let e=9;for(;e<t;)e=10*e+9;return e}const rp=new class extends Eh{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},ip=jh.compute(["selection"],(t=>{let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>o&&(o=i,e.push(rp.range(i)))}return Bn.of(e)})),np=1024;let ap=0;class sp{constructor(t,e){this.from=t,this.to=e}}class lp{constructor(t={}){this.id=ap++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=hp.match(t)),e=>{let o=t(e);return void 0===o?null:[this,o]}}}lp.closedBy=new lp({deserialize:t=>t.split(" ")}),lp.openedBy=new lp({deserialize:t=>t.split(" ")}),lp.group=new lp({deserialize:t=>t.split(" ")}),lp.isolate=new lp({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),lp.contextHash=new lp({perNode:!0}),lp.lookAhead=new lp({perNode:!0}),lp.mounted=new lp({perNode:!0});class dp{constructor(t,e,o){this.tree=t,this.overlay=e,this.parser=o}static get(t){return t&&t.props&&t.props[lp.mounted.id]}}const cp=Object.create(null);class hp{constructor(t,e,o,r=0){this.name=t,this.props=e,this.id=o,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):cp,o=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new hp(t.name||"",e,t.id,o);if(t.props)for(let o of t.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[o[0].id]=o[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(lp.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let o in t)for(let r of o.split(" "))e[r]=t[o];return t=>{for(let o=t.prop(lp.group),r=-1;r<(o?o.length:0);r++){let i=e[r<0?t.name:o[r]];if(i)return i}}}}hp.none=new hp("",Object.create(null),0,8);class pp{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let o of this.types){let r=null;for(let e of t){let t=e(o);t&&(r||(r=Object.assign({},o.props)),r[t[0].id]=t[1])}e.push(r?new hp(o.name,r,o.id,o.flags):o)}return new pp(e)}}const up=new WeakMap,mp=new WeakMap;var fp;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(fp||(fp={}));class bp{constructor(t,e,o,r,i){if(this.type=t,this.children=e,this.positions=o,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[t,e]of i)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=dp.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let o=t.toString();o&&(e&&(e+=","),e+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Cp(this.topNode,t)}cursorAt(t,e=0,o=0){let r=up.get(this)||this.topNode,i=new Cp(r);return i.moveTo(t,e),up.set(this,i._tree),i}get topNode(){return new wp(this,0,0,null)}resolve(t,e=0){let o=yp(up.get(this)||this.topNode,t,e,!1);return up.set(this,o),o}resolveInner(t,e=0){let o=yp(mp.get(this)||this.topNode,t,e,!0);return mp.set(this,o),o}resolveStack(t,e=0){return function(t,e,o){let r=t.resolveInner(e,o),i=null;for(let t=r instanceof wp?r:r.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(i||(i=[r])).push(n.resolve(e,o)),t=n}else{let n=dp.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let a=new wp(n.tree,n.overlay[0].from+t.from,-1,t);(i||(i=[r])).push(yp(a,e,o,!1))}}return i?$p(i):r}(this,t,e)}iterate(t){let{enter:e,leave:o,from:r=0,to:i=this.length}=t,n=t.mode||0,a=(n&fp.IncludeAnonymous)>0;for(let t=this.cursor(n|fp.IncludeAnonymous);;){let n=!1;if(t.from<=i&&t.to>=r&&(!a&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&o&&(a||!t.type.isAnonymous)&&o(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Ap(hp.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,o)=>new bp(this.type,t,e,o,this.propValues)),t.makeTree||((t,e,o)=>new bp(hp.none,t,e,o)))}static build(t){return function(t){var e;let{buffer:o,nodeSet:r,maxBufferLength:i=np,reused:n=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(o)?new gp(o,o.length):o,l=r.types,d=0,c=0;function h(t,e,o,b,g,v){let{id:O,start:y,end:x,size:w}=s,k=c,q=d;for(;w<0;){if(s.next(),-1==w){let e=n[O];return o.push(e),void b.push(y-t)}if(-3==w)return void(d=O);if(-4==w)return void(c=O);throw new RangeError(`Unrecognized record size: ${w}`)}let S,Q,$=l[O],P=y-t;if(x-y<=i&&(Q=function(t,e){let o=s.fork(),r=0,n=0,l=0,d=o.end-i,c={size:0,start:0,skip:0};t:for(let i=o.pos-t;o.pos>i;){let t=o.size;if(o.id==e&&t>=0){c.size=r,c.start=n,c.skip=l,l+=4,r+=4,o.next();continue}let s=o.pos-t;if(t<0||s<i||o.start<d)break;let h=o.id>=a?4:0,p=o.start;for(o.next();o.pos>s;){if(o.size<0){if(-3!=o.size)break t;h+=4}else o.id>=a&&(h+=4);o.next()}n=p,r+=t,l+=h}return(e<0||r==t)&&(c.size=r,c.start=n,c.skip=l),c.size>4?c:void 0}(s.pos-e,g))){let e=new Uint16Array(Q.size-Q.skip),o=s.pos-Q.size,i=e.length;for(;s.pos>o;)i=f(Q.start,e,i);S=new vp(e,x-Q.start,r),P=Q.start-t}else{let t=s.pos-w;s.next();let e=[],o=[],r=O>=a?O:-1,n=0,l=x;for(;s.pos>t;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-i&&(u(e,o,y,n,s.end,l,r,k,q),n=e.length,l=s.end),s.next()):v>2500?p(y,t,e,o):h(y,t,e,o,r,v+1);if(r>=0&&n>0&&n<e.length&&u(e,o,y,n,y,l,r,k,q),e.reverse(),o.reverse(),r>-1&&n>0){let t=function(t,e){return(o,r,i)=>{let n,a,s=0,l=o.length-1;if(l>=0&&(n=o[l])instanceof bp){if(!l&&n.type==t&&n.length==i)return n;(a=n.prop(lp.lookAhead))&&(s=r[l]+n.length+a)}return m(t,o,r,i,s,e)}}($,q);S=Ap($,e,o,0,e.length,0,x-y,t,t)}else S=m($,e,o,x-y,k-x,q)}o.push(S),b.push(P)}function p(t,e,o,n){let a=[],l=0,d=-1;for(;s.pos>e;){let{id:t,start:e,end:o,size:r}=s;if(r>4)s.next();else{if(d>-1&&e<d)break;d<0&&(d=o-i),a.push(t,e,o),l++,s.next()}}if(l){let e=new Uint16Array(4*l),i=a[a.length-2];for(let t=a.length-3,o=0;t>=0;t-=3)e[o++]=a[t],e[o++]=a[t+1]-i,e[o++]=a[t+2]-i,e[o++]=o;o.push(new vp(e,a[2]-i,r)),n.push(i-t)}}function u(t,e,o,i,n,a,s,l,d){let c=[],h=[];for(;t.length>i;)c.push(t.pop()),h.push(e.pop()+o-n);t.push(m(r.types[s],c,h,a-n,l-a,d)),e.push(n-o)}function m(t,e,o,r,i,n,a){if(n){let t=[lp.contextHash,n];a=a?[t].concat(a):[t]}if(i>25){let t=[lp.lookAhead,i];a=a?[t].concat(a):[t]}return new bp(t,e,o,r,a)}function f(t,e,o){let{id:r,start:i,end:n,size:l}=s;if(s.next(),l>=0&&r<a){let a=o;if(l>4){let r=s.pos-(l-4);for(;s.pos>r;)o=f(t,e,o)}e[--o]=a,e[--o]=n-t,e[--o]=i-t,e[--o]=r}else-3==l?d=r:-4==l&&(c=r);return o}let b=[],g=[];for(;s.pos>0;)h(t.start||0,t.bufferStart||0,b,g,-1,0);let v=null!==(e=t.length)&&void 0!==e?e:b.length?g[0]+b[0].length:0;return new bp(l[t.topID],b.reverse(),g.reverse(),v)}(t)}}bp.empty=new bp(hp.none,[],[],0);class gp{constructor(t,e){this.buffer=t,this.index=e}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 gp(this.buffer,this.index)}}class vp{constructor(t,e,o){this.buffer=t,this.length=e,this.set=o}get type(){return hp.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],o=this.buffer[t+3],r=this.set.types[e],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),o==(t+=4))return i;let n=[];for(;t<o;)n.push(this.childString(t)),t=this.buffer[t+3];return i+"("+n.join(",")+")"}findChild(t,e,o,r,i){let{buffer:n}=this,a=-1;for(let s=t;s!=e&&!(Op(i,r,n[s+1],n[s+2])&&(a=s,o>0));s=n[s+3]);return a}slice(t,e,o){let r=this.buffer,i=new Uint16Array(e-t),n=0;for(let a=t,s=0;a<e;){i[s++]=r[a++],i[s++]=r[a++]-o;let e=i[s++]=r[a++]-o;i[s++]=r[a++]-t,n=Math.max(n,e)}return new vp(i,n,this.set)}}function Op(t,e,o,r){switch(t){case-2:return o<e;case-1:return r>=e&&o<e;case 0:return o<e&&r>e;case 1:return o<=e&&r>e;case 2:return r>e;case 4:return!0}}function yp(t,e,o,r){for(var i;t.from==t.to||(o<1?t.from>=e:t.from>e)||(o>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof wp&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=r?0:fp.IgnoreOverlays;if(r)for(let r=t,a=r.parent;a;r=a,a=r.parent)r instanceof wp&&r.index<0&&(null===(i=a.enter(e,o,n))||void 0===i?void 0:i.from)!=r.from&&(t=a);for(;;){let r=t.enter(e,o,n);if(!r)return t;t=r}}class xp{cursor(t=0){return new Cp(this,t)}getChild(t,e=null,o=null){let r=kp(this,t,e,o);return r.length?r[0]:null}getChildren(t,e=null,o=null){return kp(this,t,e,o)}resolve(t,e=0){return yp(this,t,e,!1)}resolveInner(t,e=0){return yp(this,t,e,!0)}matchContext(t){return qp(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),o=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(o=e,e=t.prevSibling):e=t}return o}get node(){return this}get next(){return this.parent}}class wp extends xp{constructor(t,e,o,r){super(),this._tree=t,this.from=e,this.index=o,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,e,o,r,i=0){for(let n=this;;){for(let{children:a,positions:s}=n._tree,l=e>0?a.length:-1;t!=l;t+=e){let l=a[t],d=s[t]+n.from;if(Op(r,o,d,d+l.length))if(l instanceof vp){if(i&fp.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,e,o-d,r);if(a>-1)return new Qp(new Sp(n,l,t,d),null,a)}else if(i&fp.IncludeAnonymous||!l.type.isAnonymous||Rp(l)){let a;if(!(i&fp.IgnoreMounts)&&(a=dp.get(l))&&!a.overlay)return new wp(a.tree,d,t,n);let s=new wp(l,d,t,n);return i&fp.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(e<0?l.children.length-1:0,e,o,r)}}if(i&fp.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,o=0){let r;if(!(o&fp.IgnoreOverlays)&&(r=dp.get(this._tree))&&r.overlay){let o=t-this.from;for(let{from:t,to:i}of r.overlay)if((e>0?t<=o:t<o)&&(e<0?i>=o:i>o))return new wp(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,o)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 kp(t,e,o,r){let i=t.cursor(),n=[];if(!i.firstChild())return n;if(null!=o)for(let t=!1;!t;)if(t=i.type.is(o),!i.nextSibling())return n;for(;;){if(null!=r&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return null==r?n:[]}}function qp(t,e,o=e.length-1){for(let r=t;o>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[o]&&e[o]!=r.name)return!1;o--}}return!0}class Sp{constructor(t,e,o,r){this.parent=t,this.buffer=e,this.index=o,this.start=r}}class Qp extends xp{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(t,e,o){super(),this.context=t,this._parent=e,this.index=o,this.type=t.buffer.set.types[t.buffer.buffer[o]]}child(t,e,o){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,o);return i<0?null:new Qp(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,o=0){if(o&fp.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return i<0?null:new Qp(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Qp(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Qp(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:o}=this.context,r=this.index+4,i=o.buffer[this.index+3];if(i>r){let n=o.buffer[this.index+1];t.push(o.slice(r,i,n)),e.push(0)}return new bp(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function $p(t){if(!t.length)return null;let e=0,o=t[0];for(let r=1;r<t.length;r++){let i=t[r];(i.from>o.from||i.to<o.to)&&(o=i,e=r)}let r=o instanceof wp&&o.index<0?null:o.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Pp(i,o)}class Pp{constructor(t,e){this.heads=t,this.node=e}get next(){return $p(this.heads)}}class Cp{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof wp)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:o,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=o+r.buffer[t+1],this.to=o+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof wp?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,o){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,o,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,o);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,o=this.mode){return this.buffer?!(o&fp.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fp.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&fp.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,o=this.stack.length-1;if(t<0){let t=o<0?0:this.stack[o]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(o<0?e.buffer.length:e.buffer[this.stack[o]+3]))return this.yieldBuf(t)}return o<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,o,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:o}=r)}else({index:e,_parent:o}=this._tree);for(;o;({index:e,_parent:o}=o))if(e>-1)for(let r=e+t,i=t<0?-1:o._tree.children.length;r!=i;r+=t){let t=o._tree.children[r];if(this.mode&fp.IncludeAnonymous||t instanceof vp||!t.type.isAnonymous||Rp(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,o=0;if(t&&t.context==this.buffer)t:for(let r=this.index,i=this.stack.length;i>=0;){for(let n=t;n;n=n._parent)if(n.index==r){if(r==this.index)return n;e=n,o=i+1;break t}r=this.stack[--i]}for(let t=o;t<this.stack.length;t++)e=new Qp(this.buffer,e,this.stack[t]);return this.bufferNode=new Qp(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let o=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&e&&e(this),r=this.type.isAnonymous,!o)return;if(this.nextSibling())break;this.parent(),o--,r=!0}}}matchContext(t){if(!this.buffer)return qp(this.node.parent,t);let{buffer:e}=this.buffer,{types:o}=e.set;for(let r=t.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return qp(this._tree,t,r);let n=o[e.buffer[this.stack[i]]];if(!n.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}}function Rp(t){return t.children.some((t=>t instanceof vp||!t.type.isAnonymous||Rp(t)))}const Zp=new WeakMap;function Tp(t,e){if(!t.isAnonymous||e instanceof vp||e.type!=t)return 1;let o=Zp.get(e);if(null==o){o=1;for(let r of e.children){if(r.type!=t||!(r instanceof bp)){o=1;break}o+=Tp(t,r)}Zp.set(e,o)}return o}function Ap(t,e,o,r,i,n,a,s,l){let d=0;for(let o=r;o<i;o++)d+=Tp(t,e[o]);let c=Math.ceil(1.5*d/8),h=[],p=[];return function e(o,r,i,a,s){for(let d=i;d<a;){let i=d,u=r[d],m=Tp(t,o[d]);for(d++;d<a;d++){let e=Tp(t,o[d]);if(m+e>=c)break;m+=e}if(d==i+1){if(m>c){let t=o[i];e(t.children,t.positions,0,t.children.length,r[i]+s);continue}h.push(o[i])}else{let e=r[d-1]+o[d-1].length-u;h.push(Ap(t,o,r,i,d,u,e,null,l))}p.push(u+s-n)}}(e,o,r,i,0),(s||l)(h,p,a)}class Mp{constructor(){this.map=new WeakMap}setBuffer(t,e,o){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,o)}getBuffer(t,e){let o=this.map.get(t);return o&&o.get(e)}set(t,e){t instanceof Qp?this.setBuffer(t.context.buffer,t.index,e):t instanceof wp&&this.map.set(t.tree,e)}get(t){return t instanceof Qp?this.getBuffer(t.context.buffer,t.index):t instanceof wp?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Ep{constructor(t,e,o,r,i=!1,n=!1){this.from=t,this.to=e,this.tree=o,this.offset=r,this.open=(i?1:0)|(n?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],o=!1){let r=[new Ep(0,t.length,t,0,!1,o)];for(let o of e)o.to>t.length&&r.push(o);return r}static applyChanges(t,e,o=128){if(!e.length)return t;let r=[],i=1,n=t.length?t[0]:null;for(let a=0,s=0,l=0;;a++){let d=a<e.length?e[a]:null,c=d?d.fromA:1e9;if(c-s>=o)for(;n&&n.from<c;){let e=n;if(s>=e.from||c<=e.to||l){let t=Math.max(e.from,s)-l,o=Math.min(e.to,c)-l;e=t>=o?null:new Ep(t,o,e.tree,e.offset+l,a>0,!!d)}if(e&&r.push(e),n.to>c)break;n=i<t.length?t[i++]:null}if(!d)break;s=d.toA,l=d.toA-d.toB}return r}}class jp{startParse(t,e,o){return"string"==typeof t&&(t=new zp(t)),o=o?o.length?o.map((t=>new sp(t.from,t.to))):[new sp(0,0)]:[new sp(0,t.length)],this.createParse(t,e||[],o)}parse(t,e,o){let r=this.startParse(t,e,o);for(;;){let t=r.advance();if(t)return t}}}class zp{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class Xp{constructor(t,e,o,r,i){this.parser=t,this.parse=e,this.overlay=o,this.target=r,this.from=i}}function _p(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Dp{constructor(t,e,o,r,i,n,a){this.parser=t,this.predicate=e,this.mounts=o,this.index=r,this.start=i,this.target=n,this.prev=a,this.depth=0,this.ranges=[]}}const Up=new lp({perNode:!0});class Vp{constructor(t,e,o,r,i){this.nest=e,this.input=o,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new bp(t.type,t.children,t.positions,t.length,t.propValues.concat([[Up,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let o=Object.assign(Object.create(null),t.target.props);o[lp.mounted.id]=new dp(e,t.overlay,t.parser),t.target.props=o}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new Ip(this.fragments),e=null,o=null,r=new Cp(new wp(this.baseTree,this.ranges[0].from,0,null),fp.IncludeAnonymous|fp.IgnoreMounts);t:for(let i,n;;){let a,s=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)s=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find((t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay));if(t)for(let o of t.mount.overlay){let i=o.from+t.pos,n=o.to+t.pos;i>=r.from&&n<=r.to&&!e.ranges.some((t=>t.from<n&&t.to>i))&&e.ranges.push({from:i,to:n})}}s=!1}else if(o&&(n=Lp(o.ranges,r.from,r.to)))s=2!=n;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||Bp(r);let n=t.findMounts(r.from,i.parser);if("function"==typeof i.overlay)e=new Dp(i.parser,i.overlay,n,this.inner.length,r.from,r.tree,e);else{let t=Np(this.ranges,i.overlay||(r.from<r.to?[new sp(r.from,r.to)]:[]));t.length&&_p(t),!t.length&&i.overlay||this.inner.push(new Xp(i.parser,t.length?i.parser.startParse(this.input,Fp(n,t),t):i.parser.startParse(""),i.overlay?i.overlay.map((t=>new sp(t.from-r.from,t.to-r.from))):null,r.tree,t.length?t[0].from:r.from)),i.overlay?t.length&&(o={ranges:t,depth:0,prev:o}):s=!1}}else if(e&&(a=e.predicate(r))&&(!0===a&&(a=new sp(r.from,r.to)),a.from<a.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==a.from?e.ranges[t]={from:e.ranges[t].from,to:a.to}:e.ranges.push(a)}if(s&&r.firstChild())e&&e.depth++,o&&o.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=Np(this.ranges,e.ranges);t.length&&(_p(t),this.inner.splice(e.index,0,new Xp(e.parser,e.parser.startParse(this.input,Fp(e.mounts,t),t),e.ranges.map((t=>new sp(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}o&&! --o.depth&&(o=o.prev)}}}}function Lp(t,e,o){for(let r of t){if(r.from>=o)break;if(r.to>e)return r.from<=e&&r.to>=o?2:1}return 0}function Wp(t,e,o,r,i,n){if(e<o){let a=t.buffer[e+1];r.push(t.slice(e,o,a)),i.push(a-n)}}function Bp(t){let{node:e}=t,o=[],r=e.context.buffer;do{o.push(t.index),t.parent()}while(!t.tree);let i=t.tree,n=i.children.indexOf(r),a=i.children[n],s=a.buffer,l=[n];i.children[n]=function t(r,i,n,d,c,h){let p=o[h],u=[],m=[];Wp(a,r,p,u,m,d);let f=s[p+1],b=s[p+2];l.push(u.length);let g=h?t(p+4,s[p+3],a.set.types[s[p]],f,b-f,h-1):e.toTree();return u.push(g),m.push(f-d),Wp(a,s[p+3],i,u,m,d),new bp(n,u,m,c)}(0,s.length,hp.none,0,a.length,o.length-1);for(let e of l){let o=t.tree.children[e],r=t.tree.positions[e];t.yield(new wp(o,r+t.from,e,t._tree))}}class Yp{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(fp.IncludeAnonymous|fp.IgnoreMounts)}moveTo(t){let{cursor:e}=this,o=t-this.offset;for(;!this.done&&e.from<o;)e.to>=t&&e.enter(o,1,fp.IgnoreOverlays|fp.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof bp))break;e=e.children[0]}return!1}}class Ip{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let o=this.curFrag=t[0];this.curTo=null!==(e=o.tree.prop(Up))&&void 0!==e?e:o.to,this.inner=new Yp(o.tree,-o.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(Up))&&void 0!==t?t:e.to,this.inner=new Yp(e.tree,-e.offset)}}findMounts(t,e){var o;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let i=null===(o=t.tree)||void 0===o?void 0:o.prop(lp.mounted);if(i&&i.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let o=this.fragments[e];if(o.from>=t.to)break;o.tree==this.curFrag.tree&&r.push({frag:o,pos:t.from-o.offset,mount:i})}}}return r}}function Np(t,e){let o=null,r=e;for(let i=1,n=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;n<r.length;n++){let t=r[n];if(t.from>=s)break;t.to<=a||(o||(r=o=e.slice()),t.from<a?(o[n]=new sp(t.from,a),t.to>s&&o.splice(n+1,0,new sp(s,t.to))):t.to>s?o[n--]=new sp(s,t.to):o.splice(n--,1))}}return r}function Gp(t,e,o,r){let i=0,n=0,a=!1,s=!1,l=-1e9,d=[];for(;;){let c=i==t.length?1e9:a?t[i].to:t[i].from,h=n==e.length?1e9:s?e[n].to:e[n].from;if(a!=s){let t=Math.max(l,o),e=Math.min(c,h,r);t<e&&d.push(new sp(t,e))}if(l=Math.min(c,h),1e9==l)break;c==l&&(a?(a=!1,i++):a=!0),h==l&&(s?(s=!1,n++):s=!0)}return d}function Fp(t,e){let o=[];for(let{pos:r,mount:i,frag:n}of t){let t=r+(i.overlay?i.overlay[0].from:0),a=t+i.tree.length,s=Math.max(n.from,t),l=Math.min(n.to,a);if(i.overlay){let a=Gp(e,i.overlay.map((t=>new sp(t.from+r,t.to+r))),s,l);for(let e=0,r=s;;e++){let s=e==a.length,d=s?l:a[e].from;if(d>r&&o.push(new Ep(r,d,i.tree,-t,n.from>=r||n.openStart,n.to<=d||n.openEnd)),s)break;r=a[e].to}}else o.push(new Ep(s,l,i.tree,-t,n.from>=t||n.openStart,n.to<=a||n.openEnd))}return o}let Hp=0;class Kp{constructor(t,e,o,r){this.name=t,this.set=e,this.base=o,this.modified=r,this.id=Hp++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let o="string"==typeof t?t:"?";if(t instanceof Kp&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let r=new Kp(o,[],null,[]);if(r.set.push(r),e)for(let t of e.set)r.set.push(t);return r}static defineModifier(t){let e=new tu(t);return t=>t.modified.indexOf(e)>-1?t:tu.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let Jp=0;class tu{constructor(t){this.name=t,this.instances=[],this.id=Jp++}static get(t,e){if(!e.length)return t;let o=e[0].instances.find((o=>o.base==t&&function(t,e){return t.length==e.length&&t.every(((t,o)=>t==e[o]))}(e,o.modified)));if(o)return o;let r=[],i=new Kp(t.name,r,t,e);for(let t of e)t.instances.push(i);let n=function(t){let e=[[]];for(let o=0;o<t.length;o++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[o]));return e.sort(((t,e)=>e.length-t.length))}(e);for(let e of t.set)if(!e.modified.length)for(let t of n)r.push(tu.get(e,t));return i}}function eu(t){let e=Object.create(null);for(let o in t){let r=t[o];Array.isArray(r)||(r=[r]);for(let t of o.split(" "))if(t){let o=[],i=2,n=t;for(let e=0;;){if("..."==n&&e>0&&e+3==t.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(n);if(!r)throw new RangeError("Invalid path: "+t);if(o.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let a=t[e++];if(e==t.length&&"!"==a){i=0;break}if("/"!=a)throw new RangeError("Invalid path: "+t);n=t.slice(e)}let a=o.length-1,s=o[a];if(!s)throw new RangeError("Invalid path: "+t);let l=new ru(r,i,a>0?o.slice(0,a):null);e[s]=l.sort(e[s])}}return ou.add(e)}const ou=new lp;class ru{constructor(t,e,o,r){this.tags=t,this.mode=e,this.context=o,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function iu(t,e){let o=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)o[t.id]=e.class;else o[e.tag.id]=e.class;let{scope:r,all:i=null}=e||{};return{style:t=>{let e=i;for(let r of t)for(let t of r.set){let r=o[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function nu(t,e,o,r=0,i=t.length){let n=new au(r,Array.isArray(e)?e:[e],o);n.highlightRange(t.cursor(),r,i,"",n.highlighters),n.flush(i)}ru.empty=new ru([],2,null);class au{constructor(t,e,o){this.at=t,this.highlighters=e,this.span=o,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,o,r,i){let{type:n,from:a,to:s}=t;if(a>=o||s<=e)return;n.isTop&&(i=this.highlighters.filter((t=>!t.scope||t.scope(n))));let l=r,d=function(t){let e=t.type.prop(ou);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||ru.empty,c=function(t,e){let o=null;for(let r of t){let t=r.style(e);t&&(o=o?o+" "+t:t)}return o}(i,d.tags);if(c&&(l&&(l+=" "),l+=c,1==d.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,a),l),d.opaque)return;let h=t.tree&&t.tree.prop(lp.mounted);if(h&&h.overlay){let n=t.node.enter(h.overlay[0].from+a,1),d=this.highlighters.filter((t=>!t.scope||t.scope(h.tree.type))),c=t.firstChild();for(let p=0,u=a;;p++){let m=p<h.overlay.length?h.overlay[p]:null,f=m?m.from+a:s,b=Math.max(e,u),g=Math.min(o,f);if(b<g&&c)for(;t.from<g&&(this.highlightRange(t,b,g,r,i),this.startSpan(Math.min(g,t.to),l),!(t.to>=f)&&t.nextSibling()););if(!m||f>o)break;u=m.to+a,u>e&&(this.highlightRange(n.cursor(),Math.max(e,m.from+a),Math.min(o,u),"",d),this.startSpan(Math.min(o,u),l))}c&&t.parent()}else if(t.firstChild()){h&&(r="");do{if(!(t.to<=e)){if(t.from>=o)break;this.highlightRange(t,e,o,r,i),this.startSpan(Math.min(o,t.to),l)}}while(t.nextSibling());t.parent()}}}const su=Kp.define,lu=su(),du=su(),cu=su(du),hu=su(du),pu=su(),uu=su(pu),mu=su(pu),fu=su(),bu=su(fu),gu=su(),vu=su(),Ou=su(),yu=su(Ou),xu=su(),wu={comment:lu,lineComment:su(lu),blockComment:su(lu),docComment:su(lu),name:du,variableName:su(du),typeName:cu,tagName:su(cu),propertyName:hu,attributeName:su(hu),className:su(du),labelName:su(du),namespace:su(du),macroName:su(du),literal:pu,string:uu,docString:su(uu),character:su(uu),attributeValue:su(uu),number:mu,integer:su(mu),float:su(mu),bool:su(pu),regexp:su(pu),escape:su(pu),color:su(pu),url:su(pu),keyword:gu,self:su(gu),null:su(gu),atom:su(gu),unit:su(gu),modifier:su(gu),operatorKeyword:su(gu),controlKeyword:su(gu),definitionKeyword:su(gu),moduleKeyword:su(gu),operator:vu,derefOperator:su(vu),arithmeticOperator:su(vu),logicOperator:su(vu),bitwiseOperator:su(vu),compareOperator:su(vu),updateOperator:su(vu),definitionOperator:su(vu),typeOperator:su(vu),controlOperator:su(vu),punctuation:Ou,separator:su(Ou),bracket:yu,angleBracket:su(yu),squareBracket:su(yu),paren:su(yu),brace:su(yu),content:fu,heading:bu,heading1:su(bu),heading2:su(bu),heading3:su(bu),heading4:su(bu),heading5:su(bu),heading6:su(bu),contentSeparator:su(fu),list:su(fu),quote:su(fu),emphasis:su(fu),strong:su(fu),link:su(fu),monospace:su(fu),strikethrough:su(fu),inserted:su(),deleted:su(),changed:su(),invalid:su(),meta:xu,documentMeta:su(xu),annotation:su(xu),processingInstruction:su(xu),definition:Kp.defineModifier("definition"),constant:Kp.defineModifier("constant"),function:Kp.defineModifier("function"),standard:Kp.defineModifier("standard"),local:Kp.defineModifier("local"),special:Kp.defineModifier("special")};for(let t in wu){let e=wu[t];e instanceof Kp&&(e.name=t)}var ku;iu([{tag:wu.link,class:"tok-link"},{tag:wu.heading,class:"tok-heading"},{tag:wu.emphasis,class:"tok-emphasis"},{tag:wu.strong,class:"tok-strong"},{tag:wu.keyword,class:"tok-keyword"},{tag:wu.atom,class:"tok-atom"},{tag:wu.bool,class:"tok-bool"},{tag:wu.url,class:"tok-url"},{tag:wu.labelName,class:"tok-labelName"},{tag:wu.inserted,class:"tok-inserted"},{tag:wu.deleted,class:"tok-deleted"},{tag:wu.literal,class:"tok-literal"},{tag:wu.string,class:"tok-string"},{tag:wu.number,class:"tok-number"},{tag:[wu.regexp,wu.escape,wu.special(wu.string)],class:"tok-string2"},{tag:wu.variableName,class:"tok-variableName"},{tag:wu.local(wu.variableName),class:"tok-variableName tok-local"},{tag:wu.definition(wu.variableName),class:"tok-variableName tok-definition"},{tag:wu.special(wu.variableName),class:"tok-variableName2"},{tag:wu.definition(wu.propertyName),class:"tok-propertyName tok-definition"},{tag:wu.typeName,class:"tok-typeName"},{tag:wu.namespace,class:"tok-namespace"},{tag:wu.className,class:"tok-className"},{tag:wu.macroName,class:"tok-macroName"},{tag:wu.propertyName,class:"tok-propertyName"},{tag:wu.operator,class:"tok-operator"},{tag:wu.comment,class:"tok-comment"},{tag:wu.meta,class:"tok-meta"},{tag:wu.invalid,class:"tok-invalid"},{tag:wu.punctuation,class:"tok-punctuation"}]);const qu=new lp;function Su(t){return en.define({combine:t?e=>e.concat(t):void 0})}const Qu=new lp;class $u{constructor(t,e,o=[],r=""){this.data=t,this.name=r,_n.prototype.hasOwnProperty("tree")||Object.defineProperty(_n.prototype,"tree",{get(){return Ru(this)}}),this.parser=e,this.extension=[_u.of(this),_n.languageData.of(((t,e,o)=>{let r=Pu(t,e,o),i=r.type.prop(qu);if(!i)return[];let n=t.facet(i),a=r.type.prop(Qu);if(a){let i=r.resolve(e-r.from,o);for(let e of a)if(e.test(i,t)){let o=t.facet(e.facet);return"replace"==e.type?o:o.concat(n)}}return n}))].concat(o)}isActiveAt(t,e,o=-1){return Pu(t,e,o).type.prop(qu)==this.data}findRegions(t){let e=t.facet(_u);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let o=[],r=(t,e)=>{if(t.prop(qu)==this.data)return void o.push({from:e,to:e+t.length});let i=t.prop(lp.mounted);if(i){if(i.tree.prop(qu)==this.data){if(i.overlay)for(let t of i.overlay)o.push({from:t.from+e,to:t.to+e});else o.push({from:e,to:e+t.length});return}if(i.overlay){let t=o.length;if(r(i.tree,i.overlay[0].from+e),o.length>t)return}}for(let o=0;o<t.children.length;o++){let i=t.children[o];i instanceof bp&&r(i,t.positions[o]+e)}};return r(Ru(t),0),o}get allowsNesting(){return!0}}function Pu(t,e,o){let r=t.facet(_u),i=Ru(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,o,fp.ExcludeBuffers))t.type.isTop&&(i=t);return i}$u.setState=Pn.define();class Cu extends $u{constructor(t,e,o){super(t,e,[],o),this.parser=e}static define(t){let e=Su(t.languageData);return new Cu(e,t.parser.configure({props:[qu.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new Cu(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ru(t){let e=t.field($u.state,!1);return e?e.tree:bp.empty}class Zu{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let o=this.cursorPos-this.string.length;return t<o||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-o,e-o)}}let Tu=null;class Au{constructor(t,e,o=[],r,i,n,a,s){this.parser=t,this.state=e,this.fragments=o,this.tree=r,this.treeLen=i,this.viewport=n,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,e,o){return new Au(t,e,[],bp.empty,0,o,[],null)}startParse(){return this.parser.startParse(new Zu(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=bp.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var o;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(Ep.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(o=this.parse.stoppedAt)&&void 0!==o?o:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Ep.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Tu;Tu=this;try{return t()}finally{Tu=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Mu(t,e.from,e.to);return t}changes(t,e){let{fragments:o,tree:r,treeLen:i,viewport:n,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,o,r,i)=>e.push({fromA:t,toA:o,fromB:r,toB:i}))),o=Ep.applyChanges(o,e),r=bp.empty,i=0,n={from:t.mapPos(n.from,-1),to:t.mapPos(n.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let o=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);o<r&&a.push({from:o,to:r})}}}return new Au(this.parser,e,o,r,i,n,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:o,to:r}=this.skipped[e];o<t.to&&r>t.from&&(this.fragments=Mu(this.fragments,o,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends jp{createParse(e,o,r){let i=r[0].from,n=r[r.length-1].to;return{parsedPos:i,advance(){let e=Tu;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=n,new bp(hp.none,[],[],n-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Tu}}function Mu(t,e,o){return Ep.applyChanges(t,[{fromA:e,toA:o,fromB:e,toB:o}])}class Eu{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,o)||e.takeTree(),new Eu(e)}static init(t){let e=Math.min(3e3,t.doc.length),o=Au.create(t.facet(_u).parser,t,{from:0,to:e});return o.work(20,e)||o.takeTree(),new Eu(o)}}$u.state=dn.define({create:Eu.init,update(t,e){for(let t of e.effects)if(t.is($u.setState))return t.value;return e.startState.facet(_u)!=e.state.facet(_u)?Eu.init(e.state):t.apply(e)}});let ju=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(ju=t=>{let e=-1,o=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(o):cancelIdleCallback(e)});const zu="undefined"!=typeof navigator&&(null===(ku=navigator.scheduling)||void 0===ku?void 0:ku.isInputPending)?()=>navigator.scheduling.isInputPending():null,Xu=ml.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field($u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field($u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=ju(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,i=o.field($u.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let n=Date.now()+Math.min(this.chunkBudget,100,t&&!zu?Math.max(25,t.timeRemaining()-5):1e9),a=i.context.treeLen<r&&o.doc.length>r+1e3,s=i.context.work((()=>zu&&zu()||Date.now()>n),r+(a?0:1e5));this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:$u.setState.of(new Eu(i.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>cl(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),_u=en.define({combine:t=>t.length?t[0]:null,enables:t=>[$u.state,Xu,uc.contentAttributes.compute([t],(e=>{let o=e.facet(t);return o&&o.name?{"data-language":o.name}:{}}))]});class Du{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const Uu=en.define(),Vu=en.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Lu(t){let e=t.facet(Vu);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Wu(t,e){let o="",r=t.tabSize,i=t.facet(Vu)[0];if("\t"==i){for(;e>=r;)o+="\t",e-=r;i=" "}for(let t=0;t<e;t++)o+=i;return o}function Bu(t,e){t instanceof _n&&(t=new Yu(t));for(let o of t.state.facet(Uu)){let r=o(t,e);if(void 0!==r)return r}let o=Ru(t.state);return o.length>=e?function(t,e,o){let r=e.resolveStack(o),i=e.resolveInner(o,-1).resolve(o,0).enterUnfinishedNodesBefore(o);if(i!=r.node){let t=[];for(let e=i;e&&(e.from!=r.node.from||e.type!=r.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return Nu(r,t,o)}(t,o,e):null}class Yu{constructor(t,e={}){this.state=t,this.options=e,this.unit=Lu(t)}lineAt(t,e=1){let o=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=o.from&&r<=o.to?i&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(t,e);return o.slice(t-r,Math.min(o.length,t+100-r))}column(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.countColumn(o,t-r),n=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return n>-1&&(i+=n-this.countColumn(o,o.search(/\S|$/))),i}countColumn(t,e=t.length){return ra(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(r);if(t>-1)return t}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Iu=new lp;function Nu(t,e,o){for(let r=t;r;r=r.next){let t=Gu(r.node);if(t)return t(Hu.create(e,o,r))}return 0}function Gu(t){let e=t.type.prop(Iu);if(e)return e;let o,r=t.firstChild;if(r&&(o=r.type.prop(lp.closedBy))){let e=t.lastChild,r=e&&o.indexOf(e.name)>-1;return t=>tm(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?Fu:null}function Fu(){return 0}class Hu extends Yu{constructor(t,e,o){super(t.state,t.options),this.base=t,this.pos=e,this.context=o}get node(){return this.context.node}static create(t,e,o){return new Hu(t,e,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let o=t.resolve(e.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(Ku(o,t))break;e=this.state.doc.lineAt(o.from)}return this.lineIndent(e.from)}continue(){return Nu(this.context.next,this.base,this.pos)}}function Ku(t,e){for(let o=e;o;o=o.parent)if(t==o)return!0;return!1}function Ju({closing:t,align:e=!0,units:o=1}){return r=>tm(r,e,o,t)}function tm(t,e,o,r,i){let n=t.textAfter,a=n.match(/^\s*/)[0].length,s=r&&n.slice(a,a+r.length)==r||i==t.pos+a,l=e?function(t){let e=t.node,o=e.childAfter(e.from),r=e.lastChild;if(!o)return null;let i=t.options.simulateBreak,n=t.state.doc.lineAt(o.from),a=null==i||i<=n.from?n.to:Math.min(n.to,i);for(let t=o.to;;){let i=e.childAfter(t);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=a)return null;let t=/^ */.exec(n.text.slice(o.to-n.from))[0].length;return{from:o.from,to:o.to+t}}t=i.to}}(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*o)}function em({except:t,units:e=1}={}){return o=>{let r=t&&t.test(o.textAfter);return o.baseIndent+(r?0:e*o.unit)}}const om=en.define(),rm=new lp;function im(t){let e=t.firstChild,o=t.lastChild;return e&&e.to<o.from?{from:e.to,to:o.type.isError?t.to:o.from}:null}function nm(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function am(t,e,o){for(let r of t.facet(om)){let i=r(t,e,o);if(i)return i}return function(t,e,o){let r=Ru(t);if(r.length<o)return null;let i=null;for(let n=r.resolveStack(o,1);n;n=n.next){let a=n.node;if(a.to<=o||a.from>o)continue;if(i&&a.from<e)break;let s=a.type.prop(rm);if(s&&(a.to<r.length-50||r.length==t.doc.length||!nm(a))){let r=s(a,t);r&&r.from<=o&&r.from>=e&&r.to>o&&(i=r)}}return i}(t,e,o)}function sm(t,e){let o=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return o>=r?void 0:{from:o,to:r}}const lm=Pn.define({map:sm}),dm=Pn.define({map:sm});function cm(t){let e=[];for(let{head:o}of t.state.selection.ranges)e.some((t=>t.from<=o&&t.to>=o))||e.push(t.lineBlockAt(o));return e}const hm=dn.define({create:()=>vs.none,update(t,e){t=t.map(e.changes);for(let o of e.effects)if(o.is(lm)&&!um(t,o.value.from,o.value.to)){let{preparePlaceholder:r}=e.state.facet(vm),i=r?vs.replace({widget:new wm(r(e.state,o.value))}):xm;t=t.update({add:[i.range(o.value.from,o.value.to)]})}else o.is(dm)&&(t=t.update({filter:(t,e)=>o.value.from!=t||o.value.to!=e,filterFrom:o.value.from,filterTo:o.value.to}));if(e.selection){let o=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(o=!0)})),o&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>uc.decorations.from(t),toJSON(t,e){let o=[];return t.between(0,e.doc.length,((t,e)=>{o.push(t,e)})),o},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let o=0;o<t.length;){let r=t[o++],i=t[o++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");e.push(xm.range(r,i))}return vs.set(e,!0)}});function pm(t,e,o){var r;let i=null;return null===(r=t.field(hm,!1))||void 0===r||r.between(e,o,((t,e)=>{(!i||i.from>t)&&(i={from:t,to:e})})),i}function um(t,e,o){let r=!1;return t.between(e,e,((t,i)=>{t==e&&i==o&&(r=!0)})),r}function mm(t,e){return t.field(hm,!1)?e:e.concat(Pn.appendConfig.of(Om()))}function fm(t,e,o=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return uc.announce.of(`${t.state.phrase(o?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const bm=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of cm(t)){let o=am(t.state,e.from,e.to);if(o)return t.dispatch({effects:mm(t.state,[lm.of(o),fm(t,o)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(hm,!1))return!1;let e=[];for(let o of cm(t)){let r=pm(t.state,o.from,o.to);r&&e.push(dm.of(r),fm(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,o=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),n=am(e,i.from,i.to);n&&o.push(lm.of(n)),r=(n?t.lineBlockAt(n.to):i).to+1}return o.length&&t.dispatch({effects:mm(t.state,o)}),!!o.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(hm,!1);if(!e||!e.size)return!1;let o=[];return e.between(0,t.state.doc.length,((t,e)=>{o.push(dm.of({from:t,to:e}))})),t.dispatch({effects:o}),!0}}],gm={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vm=en.define({combine:t=>Dn(t,gm)});function Om(t){let e=[hm,Qm];return t&&e.push(vm.of(t)),e}function ym(t,e){let{state:o}=t,r=o.facet(vm),i=e=>{let o=t.lineBlockAt(t.posAtDOM(e.target)),r=pm(t.state,o.from,o.to);r&&t.dispatch({effects:dm.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let n=document.createElement("span");return n.textContent=r.placeholderText,n.setAttribute("aria-label",o.phrase("folded code")),n.title=o.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const xm=vs.replace({widget:new class extends bs{toDOM(t){return ym(t,null)}}});class wm extends bs{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return ym(t,this.value)}}const km={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class qm extends Eh{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Sm(t={}){let e=Object.assign(Object.assign({},km),t),o=new qm(e,!0),r=new qm(e,!1),i=ml.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(_u)!=t.state.facet(_u)||t.startState.field(hm,!1)!=t.state.field(hm,!1)||Ru(t.startState)!=Ru(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new Yn;for(let i of t.viewportLineBlocks){let n=pm(t.state,i.from,i.to)?r:am(t.state,i.from,i.to)?o:null;n&&e.add(i.from,i.from,n)}return e.finish()}}),{domEventHandlers:n}=e;return[i,Dh({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||Bn.empty},initialSpacer:()=>new qm(e,!1),domEventHandlers:Object.assign(Object.assign({},n),{click:(t,e,o)=>{if(n.click&&n.click(t,e,o))return!0;let r=pm(t.state,e.from,e.to);if(r)return t.dispatch({effects:dm.of(r)}),!0;let i=am(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:lm.of(i)}),!0)}})}),Om()]}const Qm=uc.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class $m{constructor(t,e){let o;function r(t){let e=la.newName();return(o||(o=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?r(e.all):void 0,n=e.scope;this.scope=n instanceof $u?t=>t.prop(qu)==n.data:n?t=>t==n:void 0,this.style=iu(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:i}).style,this.module=o?new la(o):null,this.themeType=e.themeType}static define(t,e){return new $m(t,e||{})}}const Pm=en.define(),Cm=en.define({combine:t=>t.length?[t[0]]:null});function Rm(t){let e=t.facet(Pm);return e.length?e:t.facet(Cm)}function Zm(t,e){let o,r=[Am];return t instanceof $m&&(t.module&&r.push(uc.styleModule.of(t.module)),o=t.themeType),(null==e?void 0:e.fallback)?r.push(Cm.of(t)):o?r.push(Pm.computeN([uc.darkTheme],(e=>e.facet(uc.darkTheme)==("dark"==o)?[t]:[]))):r.push(Pm.of(t)),r}class Tm{constructor(t){this.markCache=Object.create(null),this.tree=Ru(t.state),this.decorations=this.buildDeco(t,Rm(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=Ru(t.state),o=Rm(t.state),r=o!=Rm(t.startState),{viewport:i}=t.view,n=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!r&&e.type==this.tree.type&&n>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=n):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,o),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return vs.none;let o=new Yn;for(let{from:r,to:i}of t.visibleRanges)nu(this.tree,e,((t,e,r)=>{o.add(t,e,this.markCache[r]||(this.markCache[r]=vs.mark({class:r})))}),r,i);return o.finish()}}const Am=hn.high(ml.fromClass(Tm,{decorations:t=>t.decorations})),Mm=$m.define([{tag:wu.meta,color:"#404740"},{tag:wu.link,textDecoration:"underline"},{tag:wu.heading,textDecoration:"underline",fontWeight:"bold"},{tag:wu.emphasis,fontStyle:"italic"},{tag:wu.strong,fontWeight:"bold"},{tag:wu.strikethrough,textDecoration:"line-through"},{tag:wu.keyword,color:"#708"},{tag:[wu.atom,wu.bool,wu.url,wu.contentSeparator,wu.labelName],color:"#219"},{tag:[wu.literal,wu.inserted],color:"#164"},{tag:[wu.string,wu.deleted],color:"#a11"},{tag:[wu.regexp,wu.escape,wu.special(wu.string)],color:"#e40"},{tag:wu.definition(wu.variableName),color:"#00f"},{tag:wu.local(wu.variableName),color:"#30a"},{tag:[wu.typeName,wu.namespace],color:"#085"},{tag:wu.className,color:"#167"},{tag:[wu.special(wu.variableName),wu.macroName],color:"#256"},{tag:wu.definition(wu.propertyName),color:"#00c"},{tag:wu.comment,color:"#940"},{tag:wu.invalid,color:"#f00"}]),Em=uc.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),jm="()[]{}",zm=en.define({combine:t=>Dn(t,{afterCursor:!0,brackets:jm,maxScanDistance:1e4,renderMatch:Dm})}),Xm=vs.mark({class:"cm-matchingBracket"}),_m=vs.mark({class:"cm-nonmatchingBracket"});function Dm(t){let e=[],o=t.matched?Xm:_m;return e.push(o.range(t.start.from,t.start.to)),t.end&&e.push(o.range(t.end.from,t.end.to)),e}const Um=dn.define({create:()=>vs.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let o=[],r=e.state.facet(zm);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=Im(e.state,t.head,-1,r)||t.head>0&&Im(e.state,t.head-1,1,r)||r.afterCursor&&(Im(e.state,t.head,1,r)||t.head<e.state.doc.length&&Im(e.state,t.head+1,-1,r));i&&(o=o.concat(r.renderMatch(i,e.state)))}return vs.set(o,!0)},provide:t=>uc.decorations.from(t)}),Vm=[Um,Em];function Lm(t={}){return[zm.of(t),Vm]}const Wm=new lp;function Bm(t,e,o){let r=t.prop(e<0?lp.openedBy:lp.closedBy);if(r)return r;if(1==t.name.length){let r=o.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[o[r+e]]}return null}function Ym(t){let e=t.type.prop(Wm);return e?e(t.node):t}function Im(t,e,o,r={}){let i=r.maxScanDistance||1e4,n=r.brackets||jm,a=Ru(t),s=a.resolveInner(e,o);for(let t=s;t;t=t.parent){let r=Bm(t.type,o,n);if(r&&t.from<t.to){let i=Ym(t);if(i&&(o>0?e>=i.from&&e<i.to:e>i.from&&e<=i.to))return Nm(0,0,o,t,i,r,n)}}return function(t,e,o,r,i,n,a){let s=o<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=o>0)return null;let d={from:o<0?e-1:e,to:o>0?e+1:e},c=t.doc.iterRange(e,o>0?t.doc.length:0),h=0;for(let t=0;!c.next().done&&t<=n;){let n=c.value;o<0&&(t+=n.length);let s=e+t*o;for(let t=o>0?0:n.length-1,e=o>0?n.length:-1;t!=e;t+=o){let e=a.indexOf(n[t]);if(!(e<0||r.resolveInner(s+t,1).type!=i))if(e%2==0==o>0)h++;else{if(1==h)return{start:d,end:{from:s+t,to:s+t+1},matched:e>>1==l>>1};h--}}o>0&&(t+=n.length)}return c.done?{start:d,matched:!1}:null}(t,e,o,a,s.type,i,n)}function Nm(t,e,o,r,i,n,a){let s=r.parent,l={from:i.from,to:i.to},d=0,c=null==s?void 0:s.cursor();if(c&&(o<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(o<0?c.to<=r.from:c.from>=r.to){if(0==d&&n.indexOf(c.type.name)>-1&&c.from<c.to){let t=Ym(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Bm(c.type,o,a))d++;else if(Bm(c.type,-o,a)){if(0==d){let t=Ym(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}d--}}}while(o<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const Gm=Object.create(null),Fm=[hp.none],Hm=[],Km=Object.create(null),Jm=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Jm[t]=ef(Gm,e);function tf(t,e){Hm.indexOf(t)>-1||(Hm.push(t),console.warn(e))}function ef(t,e){let o=[];for(let r of e.split(" ")){let e=[];for(let o of r.split(".")){let r=t[o]||wu[o];r?"function"==typeof r?e.length?e=e.map(r):tf(o,`Modifier ${o} used at start of tag`):e.length?tf(o,`Tag ${o} used as modifier`):e=Array.isArray(r)?r:[r]:tf(o,`Unknown highlighting tag ${o}`)}for(let t of e)o.push(t)}if(!o.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+o.map((t=>t.id)),n=Km[i];if(n)return n.id;let a=Km[i]=hp.define({id:Fm.length,name:r,props:[eu({[r]:o})]});return Fm.push(a),a.id}function of(t,e){return({state:o,dispatch:r})=>{if(o.readOnly)return!1;let i=t(e,o);return!!i&&(r(o.update(i)),!0)}}Rs.RTL,Rs.LTR;const rf=of(cf,0),nf=of(df,0),af=of(((t,e)=>df(t,e,function(t){let e=[];for(let o of t.selection.ranges){let r=t.doc.lineAt(o.from),i=o.to<=r.to?r:t.doc.lineAt(o.to);i.from>r.from&&i.from==o.to&&(i=o.to==r.to+1?r:t.doc.lineAt(o.to-1));let n=e.length-1;n>=0&&e[n].to>r.from?e[n].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}(e))),0);function sf(t,e){let o=t.languageDataAt("commentTokens",e);return o.length?o[0]:{}}const lf=50;function df(t,e,o=e.selection.ranges){let r=o.map((t=>sf(e,t.from).block));if(!r.every((t=>t)))return null;let i=o.map(((t,o)=>function(t,{open:e,close:o},r,i){let n,a,s=t.sliceDoc(r-lf,r),l=t.sliceDoc(i,i+lf),d=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,h=s.length-d;if(s.slice(h-e.length,h)==e&&l.slice(c,c+o.length)==o)return{open:{pos:r-d,margin:d&&1},close:{pos:i+c,margin:c&&1}};i-r<=2*lf?n=a=t.sliceDoc(r,i):(n=t.sliceDoc(r,r+lf),a=t.sliceDoc(i-lf,i));let p=/^\s*/.exec(n)[0].length,u=/\s*$/.exec(a)[0].length,m=a.length-u-o.length;return n.slice(p,p+e.length)==e&&a.slice(m,m+o.length)==o?{open:{pos:r+p+e.length,margin:/\s/.test(n.charAt(p+e.length))?1:0},close:{pos:i-u-o.length,margin:/\s/.test(a.charAt(m-1))?1:0}}:null}(e,r[o],t.from,t.to)));if(2!=t&&!i.every((t=>t)))return{changes:e.changes(o.map(((t,e)=>i[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}])))};if(1!=t&&i.some((t=>t))){let t=[];for(let e,o=0;o<i.length;o++)if(e=i[o]){let i=r[o],{open:n,close:a}=e;t.push({from:n.pos-i.open.length,to:n.pos+n.margin},{from:a.pos-a.margin,to:a.pos+i.close.length})}return{changes:t}}return null}function cf(t,e,o=e.selection.ranges){let r=[],i=-1;for(let{from:t,to:n}of o){let o=r.length,a=1e9,s=sf(e,t).line;if(s){for(let o=t;o<=n;){let l=e.doc.lineAt(o);if(l.from>i&&(t==n||n>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,o=l.text.slice(t,t+s.length)==s?t:-1;t<l.text.length&&t<a&&(a=t),r.push({line:l,comment:o,token:s,indent:t,empty:e,single:!1})}o=l.to+1}if(a<1e9)for(let t=o;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=a);r.length==o+1&&(r[o].single=!0)}}if(2!=t&&r.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:o,indent:i,empty:n,single:a}of r)!a&&n||t.push({from:e.from+i,insert:o+" "});let o=e.changes(t);return{changes:o,selection:e.selection.map(o,1)}}if(1!=t&&r.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:o,token:i}of r)if(o>=0){let r=e.from+o,n=r+i.length;" "==e.text[n-e.from]&&n++,t.push({from:r,to:n})}return{changes:t}}return null}const hf=Sn.define(),pf=Sn.define(),uf=en.define(),mf=en.define({combine:t=>Dn(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(o,r)=>t(o,r)||e(o,r)})}),ff=dn.define({create:()=>Tf.empty,update(t,e){let o=e.state.facet(mf),r=e.annotation(hf);if(r){let i=wf.fromTransaction(e,r.selection),n=r.side,a=0==n?t.undone:t.done;return a=i?kf(a,a.length,o.minDepth,i):$f(a,e.startState.selection),new Tf(0==n?r.rest:a,0==n?a:r.rest)}let i=e.annotation(pf);if("full"!=i&&"before"!=i||(t=t.isolate()),!1===e.annotation(Cn.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let n=wf.fromTransaction(e),a=e.annotation(Cn.time),s=e.annotation(Cn.userEvent);return n?t=t.addChanges(n,a,s,o,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,o.newGroupDelay)),"full"!=i&&"after"!=i||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new Tf(t.done.map(wf.fromJSON),t.undone.map(wf.fromJSON))});function bf(t={}){return[ff,mf.of(t),uc.domEventHandlers({beforeinput(t,e){let o="historyUndo"==t.inputType?vf:"historyRedo"==t.inputType?Of:null;return!!o&&(t.preventDefault(),o(e))}})]}function gf(t,e){return function({state:o,dispatch:r}){if(!e&&o.readOnly)return!1;let i=o.field(ff,!1);if(!i)return!1;let n=i.pop(t,o,e);return!!n&&(r(n),!0)}}const vf=gf(0,!1),Of=gf(1,!1),yf=gf(0,!0),xf=gf(1,!0);class wf{constructor(t,e,o,r,i){this.changes=t,this.effects=e,this.mapped=o,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new wf(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,o;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(o=this.startSelection)||void 0===o?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new wf(t.changes&&Wi.fromJSON(t.changes),[],t.mapped&&Li.fromJSON(t.mapped),t.startSelection&&Ki.fromJSON(t.startSelection),t.selectionsAfter.map(Ki.fromJSON))}static fromTransaction(t,e){let o=Sf;for(let e of t.startState.facet(uf)){let r=e(t);r.length&&(o=o.concat(r))}return!o.length&&t.changes.empty?null:new wf(t.changes.invert(t.startState.doc),o,void 0,e||t.startState.selection,Sf)}static selection(t){return new wf(void 0,Sf,void 0,void 0,t)}}function kf(t,e,o,r){let i=e+1>o+20?e-o-1:0,n=t.slice(i,e);return n.push(r),n}function qf(t,e){return t.length?e.length?t.concat(e):t:e}const Sf=[],Qf=200;function $f(t,e){if(t.length){let o=t[t.length-1],r=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-Qf));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),kf(t,t.length-1,1e9,o.setSelAfter(r)))}return[wf.selection([e])]}function Pf(t){let e=t[t.length-1],o=t.slice();return o[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),o}function Cf(t,e){if(!t.length)return t;let o=t.length,r=Sf;for(;o;){let i=Rf(t[o-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,o);return e[o-1]=i,e}e=i.mapped,o--,r=i.selectionsAfter}return r.length?[wf.selection(r)]:Sf}function Rf(t,e,o){let r=qf(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Sf,o);if(!t.changes)return wf.selection(r);let i=t.changes.map(e),n=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(n):n;return new wf(i,Pn.mapEffects(t.effects,e),a,t.startSelection.map(n),r)}const Zf=/^(input\.type|delete)($|\.)/;class Tf{constructor(t,e,o=0,r=void 0){this.done=t,this.undone=e,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new Tf(this.done,this.undone):this}addChanges(t,e,o,r,i){let n=this.done,a=n[n.length-1];return n=a&&a.changes&&!a.changes.empty&&t.changes&&(!o||Zf.test(o))&&(!a.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(t,e){let o=[],r=!1;return t.iterChangedRanges(((t,e)=>o.push(t,e))),e.iterChangedRanges(((t,e,i,n)=>{for(let t=0;t<o.length;){let e=o[t++],a=o[t++];n>=e&&i<=a&&(r=!0)}})),r}(a.changes,t.changes))||"input.type.compose"==o)?kf(n,n.length-1,r.minDepth,new wf(t.changes.compose(a.changes),qf(Pn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Sf)):kf(n,n.length,r.minDepth,t),new Tf(n,Sf,e,o)}addSelection(t,e,o,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Sf;return i.length>0&&e-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter(((t,o)=>t.empty!=e.ranges[o].empty)).length}(i[i.length-1],t)?this:new Tf($f(this.done,t),this.undone,e,o)}addMapping(t){return new Tf(Cf(this.done,t),Cf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,o){let r=0==t?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],n=i.selectionsAfter[0]||e.selection;if(o&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:hf.of({side:t,rest:Pf(r),selection:n}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let o=1==r.length?Sf:r.slice(0,r.length-1);return i.mapped&&(o=Cf(o,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:hf.of({side:t,rest:o,selection:n}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}Tf.empty=new Tf(Sf,Sf);const Af=[{key:"Mod-z",run:vf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Of,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Of,preventDefault:!0},{key:"Mod-u",run:yf,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:xf,preventDefault:!0}];function Mf(t,e){return Ki.create(t.ranges.map(e),t.mainIndex)}function Ef(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function jf({state:t,dispatch:e},o){let r=Mf(t.selection,o);return!r.eq(t.selection,!0)&&(e(Ef(t,r)),!0)}function zf(t,e){return Ki.cursor(e?t.to:t.from)}function Xf(t,e){return jf(t,(o=>o.empty?t.moveByChar(o,e):zf(o,e)))}function _f(t){return t.textDirectionAt(t.state.selection.main.head)==Rs.LTR}const Df=t=>Xf(t,!_f(t)),Uf=t=>Xf(t,_f(t));function Vf(t,e){return jf(t,(o=>o.empty?t.moveByGroup(o,e):zf(o,e)))}function Lf(t,e,o){if(e.type.prop(o))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Wf(t,e,o){let r,i,n=Ru(t).resolveInner(e.head),a=o?lp.closedBy:lp.openedBy;for(let r=e.head;;){let e=o?n.childAfter(r):n.childBefore(r);if(!e)break;Lf(t,e,a)?n=e:r=o?e.to:e.from}return i=n.type.prop(a)&&(r=o?Im(t,n.from,1):Im(t,n.to,-1))&&r.matched?o?r.end.to:r.end.from:o?n.to:n.from,Ki.cursor(i,o?-1:1)}function Bf(t,e){return jf(t,(o=>{if(!o.empty)return zf(o,e);let r=t.moveVertically(o,e);return r.head!=o.head?r:t.moveToLineBoundary(o,e)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const Yf=t=>Bf(t,!1),If=t=>Bf(t,!0);function Nf(t){let e,o=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,i=0;if(o){for(let e of t.state.facet(uc.scrollMargins)){let o=e(t);(null==o?void 0:o.top)&&(r=Math.max(null==o?void 0:o.top,r)),(null==o?void 0:o.bottom)&&(i=Math.max(null==o?void 0:o.bottom,i))}e=t.scrollDOM.clientHeight-r-i}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:o,height:Math.max(t.defaultLineHeight,e-5)}}function Gf(t,e){let o,r=Nf(t),{state:i}=t,n=Mf(i.selection,(o=>o.empty?t.moveVertically(o,e,r.height):zf(o,e)));if(n.eq(i.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;e&&e.top>s&&e.bottom<l&&(o=uc.scrollIntoView(n.main.head,{y:"start",yMargin:e.top-s}))}return t.dispatch(Ef(i,n),{effects:o}),!0}const Ff=t=>Gf(t,!1),Hf=t=>Gf(t,!0);function Kf(t,e,o){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,o);if(i.head==e.head&&i.head!=(o?r.to:r.from)&&(i=t.moveToLineBoundary(e,o,!1)),!o&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=Ki.cursor(r.from+o))}return i}function Jf(t,e){let o=Mf(t.state.selection,(t=>{let o=e(t);return Ki.range(t.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)}));return!o.eq(t.state.selection)&&(t.dispatch(Ef(t.state,o)),!0)}function tb(t,e){return Jf(t,(o=>t.moveByChar(o,e)))}const eb=t=>tb(t,!_f(t)),ob=t=>tb(t,_f(t));function rb(t,e){return Jf(t,(o=>t.moveByGroup(o,e)))}function ib(t,e){return Jf(t,(o=>t.moveVertically(o,e)))}const nb=t=>ib(t,!1),ab=t=>ib(t,!0);function sb(t,e){return Jf(t,(o=>t.moveVertically(o,e,Nf(t).height)))}const lb=t=>sb(t,!1),db=t=>sb(t,!0),cb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:0})),!0),hb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.doc.length})),!0),pb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.selection.main.anchor,head:0})),!0),ub=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function mb(t,e){if(t.state.readOnly)return!1;let o="delete.selection",{state:r}=t,i=r.changeByRange((r=>{let{from:i,to:n}=r;if(i==n){let a=e(r);a<i?(o="delete.backward",a=fb(t,a,!1)):a>i&&(o="delete.forward",a=fb(t,a,!0)),i=Math.min(i,a),n=Math.max(n,a)}else i=fb(t,i,!1),n=fb(t,n,!0);return i==n?{range:r}:{changes:{from:i,to:n},range:Ki.cursor(i,i<r.head?-1:1)}}));return!i.changes.empty&&(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:o,effects:"delete.selection"==o?uc.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function fb(t,e,o){if(t instanceof uc)for(let r of t.state.facet(uc.atomicRanges).map((e=>e(t))))r.between(e,e,((t,r)=>{t<e&&r>e&&(e=o?r:t)}));return e}const bb=(t,e,o)=>mb(t,(r=>{let i,n,a=r.from,{state:s}=t,l=s.doc.lineAt(a);if(o&&!e&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(i=l.text.slice(0,a-l.from))){if("\t"==i[i.length-1])return a-1;let t=ra(i,s.tabSize)%Lu(s)||Lu(s);for(let e=0;e<t&&" "==i[i.length-1-e];e++)a--;n=a}else n=zi(l.text,a-l.from,e,e)+l.from,n==a&&l.number!=(e?s.doc.lines:1)?n+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(n-l.from,a-l.from))&&(n=zi(l.text,n-l.from,!1,!1)+l.from);return n})),gb=t=>bb(t,!1,!0),vb=t=>bb(t,!0,!1),Ob=(t,e)=>mb(t,(o=>{let r=o.head,{state:i}=t,n=i.doc.lineAt(r),a=i.charCategorizer(r);for(let t=null;;){if(r==(e?n.to:n.from)){r==o.head&&n.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let s=zi(n.text,r-n.from,e)+n.from,l=n.text.slice(Math.min(r,s)-n.from,Math.max(r,s)-n.from),d=a(l);if(null!=t&&d!=t)break;" "==l&&r==o.head||(t=d),r=s}return r})),yb=t=>Ob(t,!1);function xb(t){let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),n=t.doc.lineAt(r.to);if(r.empty||r.to!=n.from||(n=t.doc.lineAt(r.to-1)),o>=i.number){let t=e[e.length-1];t.to=n.to,t.ranges.push(r)}else e.push({from:i.from,to:n.to,ranges:[r]});o=n.number+1}return e}function wb(t,e,o){if(t.readOnly)return!1;let r=[],i=[];for(let e of xb(t)){if(o?e.to==t.doc.length:0==e.from)continue;let n=t.doc.lineAt(o?e.to+1:e.from-1),a=n.length+1;if(o){r.push({from:e.to,to:n.to},{from:e.from,insert:n.text+t.lineBreak});for(let o of e.ranges)i.push(Ki.range(Math.min(t.doc.length,o.anchor+a),Math.min(t.doc.length,o.head+a)))}else{r.push({from:n.from,to:e.from},{from:e.to,insert:t.lineBreak+n.text});for(let t of e.ranges)i.push(Ki.range(t.anchor-a,t.head-a))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:Ki.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0)}function kb(t,e,o){if(t.readOnly)return!1;let r=[];for(let e of xb(t))o?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const qb=Qb(!1),Sb=Qb(!0);function Qb(t){return({state:e,dispatch:o})=>{if(e.readOnly)return!1;let r=e.changeByRange((o=>{let{from:r,to:i}=o,n=e.doc.lineAt(r),a=!t&&r==i&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let o,r=Ru(t).resolveInner(e),i=r.childBefore(e),n=r.childAfter(e);return i&&n&&i.to<=e&&n.from>=e&&(o=i.type.prop(lp.closedBy))&&o.indexOf(n.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(n.from).from&&!/\S/.test(t.sliceDoc(i.to,n.from))?{from:i.to,to:n.from}:null}(e,r);t&&(r=i=(i<=n.to?n:e.doc.lineAt(i)).to);let s=new Yu(e,{simulateBreak:r,simulateDoubleBreak:!!a}),l=Bu(s,r);for(null==l&&(l=ra(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));i<n.to&&/\s/.test(n.text[i-n.from]);)i++;a?({from:r,to:i}=a):r>n.from&&r<n.from+100&&!/\S/.test(n.text.slice(0,r))&&(r=n.from);let d=["",Wu(e,l)];return a&&d.push(Wu(e,s.lineIndent(n.from,-1))),{changes:{from:r,to:i,insert:$i.of(d)},range:Ki.cursor(r+1+d[1].length)}}));return o(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function $b(t,e){let o=-1;return t.changeByRange((r=>{let i=[];for(let n=r.from;n<=r.to;){let a=t.doc.lineAt(n);a.number>o&&(r.empty||r.to>a.from)&&(e(a,i,r),o=a.number),n=a.to+1}let n=t.changes(i);return{changes:i,range:Ki.range(n.mapPos(r.anchor,1),n.mapPos(r.head,1))}}))}const Pb=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update($b(t,((e,o)=>{o.push({from:e.from,insert:t.facet(Vu)})})),{userEvent:"input.indent"})),!0),Cb=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update($b(t,((e,o)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let i=ra(r,t.tabSize),n=0,a=Wu(t,Math.max(0,i-Lu(t)));for(;n<r.length&&n<a.length&&r.charCodeAt(n)==a.charCodeAt(n);)n++;o.push({from:e.from+n,to:e.from+r.length,insert:a.slice(n)})})),{userEvent:"delete.dedent"})),!0),Rb=[{key:"ArrowLeft",run:Df,shift:eb,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>Vf(t,!_f(t)),shift:t=>rb(t,!_f(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>jf(t,(e=>Kf(t,e,!_f(t)))),shift:t=>Jf(t,(e=>Kf(t,e,!_f(t)))),preventDefault:!0},{key:"ArrowRight",run:Uf,shift:ob,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>Vf(t,_f(t)),shift:t=>rb(t,_f(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>jf(t,(e=>Kf(t,e,_f(t)))),shift:t=>Jf(t,(e=>Kf(t,e,_f(t)))),preventDefault:!0},{key:"ArrowUp",run:Yf,shift:nb,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cb,shift:pb},{mac:"Ctrl-ArrowUp",run:Ff,shift:lb},{key:"ArrowDown",run:If,shift:ab,preventDefault:!0},{mac:"Cmd-ArrowDown",run:hb,shift:ub},{mac:"Ctrl-ArrowDown",run:Hf,shift:db},{key:"PageUp",run:Ff,shift:lb},{key:"PageDown",run:Hf,shift:db},{key:"Home",run:t=>jf(t,(e=>Kf(t,e,!1))),shift:t=>Jf(t,(e=>Kf(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:cb,shift:pb},{key:"End",run:t=>jf(t,(e=>Kf(t,e,!0))),shift:t=>Jf(t,(e=>Kf(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:hb,shift:ub},{key:"Enter",run:qb,shift:qb},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:gb,shift:gb},{key:"Delete",run:vb},{key:"Mod-Backspace",mac:"Alt-Backspace",run:yb},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Ob(t,!0)},{mac:"Mod-Backspace",run:t=>mb(t,(e=>{let o=t.moveToLineBoundary(e,!1).head;return e.head>o?o:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>mb(t,(e=>{let o=t.moveToLineBoundary(e,!0).head;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:Df,shift:eb,preventDefault:!0},{key:"Ctrl-f",run:Uf,shift:ob},{key:"Ctrl-p",run:Yf,shift:nb},{key:"Ctrl-n",run:If,shift:ab},{key:"Ctrl-a",run:t=>jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>Jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>Jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:vb},{key:"Ctrl-h",run:gb},{key:"Ctrl-k",run:t=>mb(t,(e=>{let o=t.lineBlockAt(e.head).to;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:yb},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:$i.of(["",""])},range:Ki.cursor(t.from)})));return e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let o=e.from,r=t.doc.lineAt(o),i=o==r.from?o-1:zi(r.text,o-r.from,!1)+r.from,n=o==r.to?o+1:zi(r.text,o-r.from,!0)+r.from;return{changes:{from:i,to:n,insert:t.doc.slice(o,n).append(t.doc.slice(i,o))},range:Ki.cursor(n)}}));return!o.changes.empty&&(e(t.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hf}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),Zb=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>jf(t,(e=>Wf(t.state,e,!_f(t)))),shift:t=>Jf(t,(e=>Wf(t.state,e,!_f(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>jf(t,(e=>Wf(t.state,e,_f(t)))),shift:t=>Jf(t,(e=>Wf(t.state,e,_f(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>wb(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>kb(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>wb(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>kb(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let o=t.selection,r=null;return o.ranges.length>1?r=Ki.create([o.main]):o.main.empty||(r=Ki.create([Ki.cursor(o.main.head)])),!!r&&(e(Ef(t,r)),!0)}},{key:"Mod-Enter",run:Sb},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let o=xb(t).map((({from:e,to:o})=>Ki.range(e,Math.min(o+1,t.doc.length))));return e(t.update({selection:Ki.create(o),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let o=Mf(t.selection,(e=>{let o=Ru(t),r=o.resolveStack(e.from,1);if(e.empty){let t=o.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:o}=t;if((o.from<e.from&&o.to>=e.to||o.to>e.to&&o.from<=e.from)&&t.next)return Ki.range(o.to,o.from)}return e}));return!o.eq(t.selection)&&(e(Ef(t,o)),!0)},preventDefault:!0},{key:"Mod-[",run:Cb},{key:"Mod-]",run:Pb},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=Object.create(null),r=new Yu(t,{overrideIndentation:t=>{let e=o[t];return null==e?-1:e}}),i=$b(t,((e,i,n)=>{let a=Bu(r,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let s=/^\s*/.exec(e.text)[0],l=Wu(t,a);(s!=l||n.from<e.from+s.length)&&(o[e.from]=a,i.push({from:e.from,to:e.from+s.length,insert:l}))}));return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,o=e.changes(xb(e).map((({from:t,to:o})=>(t>0?t--:o<e.doc.length&&o++,{from:t,to:o})))),r=Mf(e.selection,(e=>{let o;if(t.lineWrapping){let r=t.lineBlockAt(e.head),i=t.coordsAtPos(e.head,e.assoc||1);i&&(o=r.bottom+t.documentTop-i.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,o)})).map(o);return t.dispatch({changes:o,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,o){let r=!1,i=Mf(t.selection,(e=>{let i=Im(t,e.head,-1)||Im(t,e.head,1)||e.head>0&&Im(t,e.head-1,1)||e.head<t.doc.length&&Im(t,e.head+1,-1);if(!i||!i.end)return e;r=!0;let n=i.start.from==e.head?i.end.to:i.end.from;return o?Ki.range(e.anchor,n):Ki.cursor(n)}));return!!r&&(e(Ef(t,i)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,o=e.doc.lineAt(e.selection.main.from),r=sf(t.state,o.from);return r.line?rf(t):!!r.block&&af(t)}},{key:"Alt-A",run:nf},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(Rb),Tb={key:"Tab",run:Pb,shift:Cb};class Ab{constructor(t,e,o,r,i,n,a,s,l,d=0,c){this.p=t,this.stack=e,this.state=o,this.reducePos=r,this.pos=i,this.score=n,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,o=0){let r=t.parser.context;return new Ab(t,[],e,o,o,0,[],0,r?new Mb(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let o=t>>19,r=65535&t,{parser:i}=this.p,n=this.reducePos<this.pos-25;n&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==o)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,n?8:4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(o-1)-(262144&t?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,d=this.reducePos-l;d>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=d));let c=s?this.stack[s-1]:0,h=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&t){let t=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,t,h+4,!0)}if(262144&t)this.state=this.stack[s];else{let t=this.stack[s-3];this.state=i.getGoto(t,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(t,e,o,r=4,i=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==o)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=o)}}if(i&&this.pos!=o){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4]){let t=!1;for(let e=i;e>0&&this.buffer[e-2]>o;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;i>0&&this.buffer[i-2]>o;)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]=t,this.buffer[i+1]=e,this.buffer[i+2]=o,this.buffer[i+3]=r}else this.buffer.push(t,e,o,r)}shift(t,e,o,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,o),e<=this.p.parser.maxNode&&this.buffer.push(e,o,r,4);else{let i=t,{parser:n}=this.p;(r>this.pos||e<=n.maxNode)&&(this.pos=r,n.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,o),this.shiftContext(e,o),e<=n.maxNode&&this.buffer.push(e,o,r,4)}}apply(t,e,o,r){65536&t?this.reduce(t):this.shift(t,e,o,r)}useNode(t,e){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=t)&&(this.p.reused.push(t),o++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let o=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new Ab(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let o=t<=this.p.parser.maxNode;o&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,o?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new Eb(this);;){let o=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==o)return!1;if(!(65536&o))return!0;e.reduce(o)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let o=[];for(let r,i=0;i<e.length;i+=2)(r=e[i+1])!=this.state&&this.p.parser.hasAction(r,t)&&o.push(e[i],r);if(this.stack.length<120)for(let t=0;o.length<8&&t<e.length;t+=2){let r=e[t+1];o.some(((t,e)=>1&e&&t==r))||o.push(e[t],r)}e=o}let o=[];for(let t=0;t<e.length&&o.length<4;t+=2){let r=e[t+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(e[t],this.pos),i.reducePos=this.pos,i.score-=200,o.push(i)}return o}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let o=e>>19,r=65535&e,i=this.stack.length-3*o;if(i<0||t.getGoto(this.stack[i],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],o=(r,i)=>{if(!e.includes(r))return e.push(r),t.allActions(r,(e=>{if(393216&e);else if(65536&e){let o=(e>>19)-i;if(o>1){let r=65535&e,i=this.stack.length-3*o;if(i>=0&&t.getGoto(this.stack[i],r,!1)>=0)return o<<19|65536|r}}else{let t=o(e,i+1);if(null!=t)return t}}))};return o(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(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new Mb(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Mb{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class Eb{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,o=t>>19;0==o?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(o-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class jb{constructor(t,e,o){this.stack=t,this.pos=e,this.index=o,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new jb(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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,0==this.index&&this.maybeNext()}fork(){return new jb(this.stack,this.pos,this.index)}}function zb(t,e=Uint16Array){if("string"!=typeof t)return t;let o=null;for(let r=0,i=0;r<t.length;){let n=0;for(;;){let e=t.charCodeAt(r++),o=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let i=e-32;if(i>=46&&(i-=46,o=!0),n+=i,o)break;n*=46}o?o[i++]=n:o=new e(n)}return o}class Xb{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const _b=new Xb;class Db{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=_b,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let o=this.range,r=this.rangeIndex,i=this.pos+t;for(;i<o.from;){if(!r)return null;let t=this.ranges[--r];i-=o.from-t.to,o=t}for(;e<0?i>o.to:i>=o.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];i+=t.from-o.to,o=t}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,o,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,o=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)o=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),o=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),o}acceptToken(t,e=0){let o=e?this.resolveOffset(e,-1):this.pos;if(null==o||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=o}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=_b,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let o="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(o+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return o}}class Ub{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:o}=e.p;Wb(this.data,t,e,this.id,o.data,o.tokenPrecTable)}}Ub.prototype.contextual=Ub.prototype.fallback=Ub.prototype.extend=!1;class Vb{constructor(t,e,o){this.precTable=e,this.elseToken=o,this.data="string"==typeof t?zb(t):t}token(t,e){let o=t.pos,r=0;for(;;){let o=t.next<0,i=t.resolveOffset(1,1);if(Wb(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(o||r++,null==i)break;t.reset(i,t.token)}r&&(t.reset(o,t.token),t.acceptToken(this.elseToken,r))}}Vb.prototype.contextual=Ub.prototype.fallback=Ub.prototype.extend=!1;class Lb{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Wb(t,e,o,r,i,n){let a=0,s=1<<r,{dialect:l}=o.p.parser;t:for(;s&t[a];){let o=t[a+1];for(let r=a+3;r<o;r+=2)if((t[r+1]&s)>0){let o=t[r];if(l.allows(o)&&(-1==e.token.value||e.token.value==o||Yb(o,e.token.value,i,n))){e.acceptToken(o);break}}let r=e.next,d=0,c=t[a+2];if(!(e.next<0&&c>d&&65535==t[o+3*c-3])){for(;d<c;){let i=d+c>>1,n=o+i+(i<<1),s=t[n],l=t[n+1]||65536;if(r<s)c=i;else{if(!(r>=l)){a=t[n+2],e.advance();continue t}d=i+1}}break}a=t[o+3*c-1]}}function Bb(t,e,o){for(let r,i=e;65535!=(r=t[i]);i++)if(r==o)return i-e;return-1}function Yb(t,e,o,r){let i=Bb(o,r,e);return i<0||Bb(o,r,t)<i}const Ib="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let Nb=null;function Gb(t,e,o){let r=t.cursor(fp.IncludeAnonymous);for(r.moveTo(e);;)if(!(o<0?r.childBefore(e):r.childAfter(e)))for(;;){if((o<0?r.to<e:r.from>e)&&!r.type.isError)return o<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(o<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return o<0?0:t.length}}class Fb{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Gb(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Gb(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let o=this.trees[e],r=this.index[e];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=o.children[r],n=this.start[e]+o.positions[r];if(n>t)return this.nextStart=n,null;if(i instanceof bp){if(n==t){if(n<this.safeFrom)return null;let t=n+i.length;if(t<=this.safeTo){let e=i.prop(lp.lookAhead);if(!e||t+e<this.fragment.to)return i}}this.index[e]++,n+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+i.length}}}class Hb{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new Xb))}getActions(t){let e=0,o=null,{parser:r}=t.p,{tokenizers:i}=r,n=r.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&n))continue;let l=i[r],d=this.tokens[r];if((!o||l.fallback)&&((l.contextual||d.start!=t.pos||d.mask!=n||d.context!=a)&&(this.updateCachedToken(d,l,t),d.mask=n,d.context=a),d.lookAhead>d.end+25&&(s=Math.max(d.lookAhead,s)),0!=d.value)){let r=e;if(d.extended>-1&&(e=this.addActions(t,d.extended,d.end,e)),e=this.addActions(t,d.value,d.end,e),!l.extend&&(o=d,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return s&&t.setLookAhead(s),o||t.pos!=this.stream.end||(o=new Xb,o.value=t.p.parser.eofTerm,o.start=o.end=t.pos,e=this.addActions(t,o.value,o.end,e)),this.mainToken=o,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new Xb,{pos:o,p:r}=t;return e.start=o,e.end=Math.min(o+1,r.stream.end),e.value=o==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,o){let r=this.stream.clipPos(o.pos);if(e.token(this.stream.reset(r,t),o),t.value>-1){let{parser:e}=o.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let i=e.specializers[r](this.stream.read(t.start,t.end),o);if(i>=0&&o.p.parser.dialect.allows(i>>1)){1&i?t.extended=i>>1:t.value=i>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,o,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=o,r}addActions(t,e,o,r){let{state:i}=t,{parser:n}=t.p,{data:a}=n;for(let t=0;t<2;t++)for(let s=n.stateSlot(i,t?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==r&&2==a[s+1]&&(r=this.putAction(ig(a,s+2),e,o,r));break}s=ig(a,s+2)}a[s]==e&&(r=this.putAction(ig(a,s+1),e,o,r))}return r}}class Kb{constructor(t,e,o,r){this.parser=t,this.input=e,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 Db(e,r),this.tokens=new Hb(t,this.stream),this.topTerm=t.top[1];let{from:i}=r[0];this.stacks=[Ab.start(this,t.top[0],i)],this.fragments=o.length&&this.stream.end-i>4*t.bufferLength?new Fb(o,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,o=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==o.length){let[t]=o;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<o.length;n++){let a=o[n];for(;;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,o))continue;{t||(t=[],e=[]),t.push(a);let o=this.tokens.getMainToken(a);e.push(o.value,o.end)}}break}}if(!i.length){let e=t&&function(t){let e=null;for(let o of t){let t=o.p.stoppedAt;(o.pos==o.p.stream.end||null!=t&&o.pos>t)&&o.p.parser.stateFlag(o.state,2)&&(!e||e.score<o.score)&&(e=o)}return e}(t);if(e)return Ib&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Ib&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let o=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,i);if(o)return Ib&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(i.length>t)for(i.sort(((t,e)=>e.score-t.score));i.length>t;)i.pop();i.some((t=>t.reducePos>r))&&this.recovering--}else if(i.length>1){t:for(let t=0;t<i.length-1;t++){let e=i[t];for(let o=t+1;o<i.length;o++){let r=i[o];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){i.splice(t--,1);continue t}i.splice(o--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let t=1;t<i.length;t++)i[t].pos<this.minStackPos&&(this.minStackPos=i[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,o){let r=t.pos,{parser:i}=this,n=Ib?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,o=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(t.state,a.type.id):-1;if(r>-1&&a.length&&(!e||(a.prop(lp.contextHash)||0)==o))return t.useNode(a,r),Ib&&console.log(n+this.stackID(t)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof bp)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof bp&&0==a.positions[0]))break;a=s}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),Ib&&console.log(n+this.stackID(t)+` (via always-reduce ${i.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let s=this.tokens.getActions(t);for(let a=0;a<s.length;){let l=s[a++],d=s[a++],c=s[a++],h=a==s.length||!o,p=h?t:t.split(),u=this.tokens.mainToken;if(p.apply(l,d,u?u.start:p.pos,c),Ib&&console.log(n+this.stackID(p)+` (via ${65536&l?`reduce of ${i.getName(65535&l)}`:"shift"} for ${i.getName(d)} @ ${r}${p==t?"":", split"})`),h)return!0;p.pos>r?e.push(p):o.push(p)}return!1}advanceFully(t,e){let o=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>o)return Jb(t,e),!0}}runRecovery(t,e,o){let r=null,i=!1;for(let n=0;n<t.length;n++){let a=t[n],s=e[n<<1],l=e[1+(n<<1)],d=Ib?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),Ib&&console.log(d+this.stackID(a)+" (restarted)"),this.advanceFully(a,o))continue}let c=a.split(),h=d;for(let t=0;c.forceReduce()&&t<10&&(Ib&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,o));t++)Ib&&(h=this.stackID(c)+" -> ");for(let t of a.recoverByInsert(s))Ib&&console.log(d+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,o);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),Ib&&console.log(d+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),Jb(a,o)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(t){return t.close(),bp.build({buffer:jb.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Nb||(Nb=new WeakMap)).get(t);return e||Nb.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Jb(t,e){for(let o=0;o<e.length;o++){let r=e[o];if(r.pos==t.pos&&r.sameState(t))return void(e[o].score<t.score&&(e[o]=t))}e.push(t)}class tg{constructor(t,e,o){this.source=t,this.flags=e,this.disabled=o}allows(t){return!this.disabled||0==this.disabled[t]}}const eg=t=>t;class og{constructor(t){this.start=t.start,this.shift=t.shift||eg,this.reduce=t.reduce||eg,this.reuse=t.reuse||eg,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class rg extends jp{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;o<t.repeatNodeCount;o++)e.push("");let o=Object.keys(t.topRules).map((e=>t.topRules[e][1])),r=[];for(let t=0;t<e.length;t++)r.push([]);function i(t,e,o){r[t].push([e,e.deserialize(String(o))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=lp[t]);for(let o=1;o<e.length;){let r=e[o++];if(r>=0)i(r,t,e[o++]);else{let n=e[o+-r];for(let a=-r;a>0;a--)i(e[o++],t,n);o++}}}this.nodeSet=new pp(e.map(((e,i)=>hp.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:r[i],top:o.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=np;let n=zb(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(ng),this.states=zb(t.states,Uint32Array),this.data=zb(t.stateData),this.goto=zb(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new Ub(n,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,o){let r=new Kb(this,t,e,o);for(let i of this.wrappers)r=i(r,t,e,o);return r}getGoto(t,e,o=!1){let r=this.goto;if(e>=r[0])return-1;for(let i=r[e+1];;){let e=r[i++],n=1&e,a=r[i++];if(n&&o)return a;for(let o=i+(e>>1);i<o;i++)if(r[i]==t)return a;if(n)return-1}}hasAction(t,e){let o=this.data;for(let r=0;r<2;r++)for(let i,n=this.stateSlot(t,r?2:1);;n+=3){if(65535==(i=o[n])){if(1!=o[n+1]){if(2==o[n+1])return ig(o,n+2);break}i=o[n=ig(o,n+2)]}if(i==e||0==i)return ig(o,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let o=this.stateSlot(t,4),r=o?e(o):void 0;for(let o=this.stateSlot(t,1);null==r;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=ig(this.data,o+2)}r=e(ig(this.data,o+1))}return r}nextStates(t){let e=[];for(let o=this.stateSlot(t,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=ig(this.data,o+2)}if(!(1&this.data[o+2])){let t=this.data[o+1];e.some(((e,o)=>1&o&&e==t))||e.push(this.data[o],t)}}return e}configure(t){let e=Object.assign(Object.create(rg.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let o=this.topRules[t.top];if(!o)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=o}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let o=t.tokenizers.find((t=>t.from==e));return o?o.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((o,r)=>{let i=t.specializers.find((t=>t.from==o.external));if(!i)return o;let n=Object.assign(Object.assign({},o),{external:i.to});return e.specializers[r]=ng(n),n}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),o=e.map((()=>!1));if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(o[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!o[t])for(let o,i=this.dialects[e[t]];65535!=(o=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new tg(t,o,r)}static deserialize(t){return new rg(t)}}function ig(t,e){return t[e]|t[e+1]<<16}function ng(t){if(t.external){let e=t.extend?1:0;return(o,r)=>t.external(o,r)<<1|e}return t.get}const ag={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},sg={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},lg={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 dg(t){return 9==t||10==t||13==t||32==t}let cg=null,hg=null,pg=0;function ug(t,e){let o=t.pos+e;if(pg==o&&hg==t)return cg;let r=t.peek(e);for(;dg(r);)r=t.peek(++e);let i="";for(;45==(n=r)||46==n||58==n||n>=65&&n<=90||95==n||n>=97&&n<=122||n>=161;)i+=String.fromCharCode(r),r=t.peek(++e);var n;return hg=t,pg=o,cg=i?i.toLowerCase():r==mg||r==fg?void 0:null}const mg=63,fg=33;function bg(t,e){this.name=t,this.parent=e}const gg=[6,10,7,8,9],vg=new og({start:null,shift:(t,e,o,r)=>gg.indexOf(e)>-1?new bg(ug(r,1)||"",t):t,reduce:(t,e)=>20==e&&t?t.parent:t,reuse(t,e,o,r){let i=e.type.id;return 6==i||36==i?new bg(ug(r,1)||"",t):t},strict:!1}),Og=new Lb(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let o=47==t.next;o&&t.advance();let r=ug(t,0);if(void 0===r)return;if(!r)return t.acceptToken(o?14:6);let i=e.context?e.context.name:null;if(o){if(r==i)return t.acceptToken(11);if(i&&sg[i])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(ag.hasOwnProperty(r))return t.acceptToken(10);i&&lg[i]&&lg[i][r]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),yg=new Lb((t=>{for(let e=0,o=0;;o++){if(t.next<0){o&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){o>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}})),xg=new Lb(((t,e)=>{if(47==t.next&&62==t.peek(1)){let o=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(o?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function wg(t,e,o){let r=2+t.length;return new Lb((i=>{for(let n=0,a=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(e);break}if(0==n&&60==i.next||1==n&&47==i.next||n>=2&&n<r&&i.next==t.charCodeAt(n-2))n++,a++;else if(2!=n&&n!=r||!dg(i.next)){if(n==r&&62==i.next){s>a?i.acceptToken(e,-a):i.acceptToken(o,-(a-2));break}if((10==i.next||13==i.next)&&s){i.acceptToken(e,1);break}n=a=0}else a++;i.advance()}}))}const kg=wg("script",54,1),qg=wg("style",55,2),Sg=wg("textarea",56,3),Qg=eu({"Text RawText":wu.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":wu.angleBracket,TagName:wu.tagName,"MismatchedCloseTag/TagName":[wu.tagName,wu.invalid],AttributeName:wu.attributeName,"AttributeValue UnquotedAttributeValue":wu.attributeValue,Is:wu.definitionOperator,"EntityReference CharacterReference":wu.character,Comment:wu.blockComment,ProcessingInst:wu.processingInstruction,DoctypeDecl:wu.documentMeta}),$g=rg.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOO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aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!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 IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:vg,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33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(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[kg,qg,Sg,xg,Og,yg,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function Pg(t,e){let o=Object.create(null);for(let r of t.getChildren(23)){let t=r.getChild(24),i=r.getChild(26)||r.getChild(27);t&&(o[e.read(t.from,t.to)]=i?26==i.type.id?e.read(i.from+1,i.to-1):e.read(i.from,i.to):"")}return o}function Cg(t,e){let o=t.getChild(22);return o?e.read(o.from,o.to):" "}function Rg(t,e,o){let r;for(let i of o)if(!i.attrs||i.attrs(r||(r=Pg(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function Zg(t=[],e=[]){let o=[],r=[],i=[],n=[];for(let e of t)("script"==e.tag?o:"style"==e.tag?r:"textarea"==e.tag?i:n).push(e);let a=e.length?Object.create(null):null;for(let t of e)(a[t.name]||(a[t.name]=[])).push(t);return s=(t,e)=>{let s=t.type.id;if(28==s)return Rg(t,e,o);if(31==s)return Rg(t,e,r);if(34==s)return Rg(t,e,i);if(20==s&&n.length){let o,r=t.node,i=r.firstChild,a=i&&Cg(i,e);if(a)for(let t of n)if(t.tag==a&&(!t.attrs||t.attrs(o||(o=Pg(i,e))))){let e=r.lastChild,o=37==e.type.id?e.from:r.to;if(o>i.to)return{parser:t.parser,overlay:[{from:i.to,to:o}]}}}if(a&&23==s){let o,r=t.node;if(o=r.firstChild){let t=a[e.read(o.from,o.to)];if(t)for(let o of t){if(o.tagName&&o.tagName!=Cg(r.parent,e))continue;let t=r.lastChild;if(26==t.type.id){let e=t.from+1,r=t.lastChild,i=t.to-(r&&r.isError?0:1);if(i>e)return{parser:o.parser,overlay:[{from:e,to:i}]}}else if(27==t.type.id)return{parser:o.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,o,r)=>new Vp(t,s,e,o,r);var s}const Tg=[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];function Ag(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Mg(t){return t>=48&&t<=57}const Eg=new Lb(((t,e)=>{for(let o=!1,r=0,i=0;;i++){let{next:n}=t;if(Ag(n)||45==n||95==n||o&&Mg(n))!o&&(45!=n||i>0)&&(o=!0),r===i&&45==n&&r++,t.advance();else{if(92!=n||10==t.peek(1)){o&&t.acceptToken(40==n?101:2==r&&e.canShift(2)?2:102);break}t.advance(),t.next>-1&&t.advance(),o=!0}}})),jg=new Lb((t=>{if(Tg.includes(t.peek(-1))){let{next:e}=t;(Ag(e)||95==e||35==e||46==e||91==e||58==e&&Ag(t.peek(1))||45==e||38==e)&&t.acceptToken(100)}})),zg=new Lb((t=>{if(!Tg.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),Ag(e)){do{t.advance()}while(Ag(t.next)||Mg(t.next));t.acceptToken(1)}}})),Xg=eu({"AtKeyword import charset namespace keyframes media supports":wu.definitionKeyword,"from to selector":wu.keyword,NamespaceName:wu.namespace,KeyframeName:wu.labelName,KeyframeRangeName:wu.operatorKeyword,TagName:wu.tagName,ClassName:wu.className,PseudoClassName:wu.constant(wu.className),IdName:wu.labelName,"FeatureName PropertyName":wu.propertyName,AttributeName:wu.attributeName,NumberLiteral:wu.number,KeywordQuery:wu.keyword,UnaryQueryOp:wu.operatorKeyword,"CallTag ValueName":wu.atom,VariableName:wu.variableName,Callee:wu.operatorKeyword,Unit:wu.unit,"UniversalSelector NestingSelector":wu.definitionOperator,MatchOp:wu.compareOperator,"ChildOp SiblingOp, LogicOp":wu.logicOperator,BinOp:wu.arithmeticOperator,Important:wu.modifier,Comment:wu.blockComment,ColorLiteral:wu.color,"ParenthesizedContent StringLiteral":wu.string,":":wu.punctuation,"PseudoOp #":wu.derefOperator,"; ,":wu.separator,"( )":wu.paren,"[ ]":wu.squareBracket,"{ }":wu.brace}),_g={__proto__:null,lang:34,"nth-child":34,"nth-last-child":34,"nth-of-type":34,"nth-last-of-type":34,dir:34,"host-context":34,url:62,"url-prefix":62,domain:62,regexp:62,selector:140},Dg={__proto__:null,"@import":120,"@media":144,"@charset":148,"@namespace":152,"@keyframes":158,"@supports":170},Ug={__proto__:null,not:134,only:134},Vg=rg.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#CiO$qQ[O'#DUO$vQ[O'#DXOOQP'#En'#EnO${QdO'#DhO%jQ[O'#DuO${QdO'#DwO%{Q[O'#DyO&WQ[O'#D|O&`Q[O'#ESO&nQ[O'#EUOOQS'#Em'#EmOOQS'#EX'#EXQYQ[OOO&uQXO'#CdO'jQWO'#DdO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@])C@]OOQP'#Ch'#ChOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E]O({QWO,58{O)TQ[O,59TO$qQ[O,59pO$vQ[O,59sO(aQ[O,59vO(aQ[O,59xO(aQ[O,59yO)`Q[O'#DcOOQS,58{,58{OOQP'#Cl'#ClOOQO'#DS'#DSOOQP,59T,59TO)gQWO,59TO)lQWO,59TOOQP'#DW'#DWOOQP,59p,59pOOQO'#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!vp$pR$p#}Q$l#qR%R$lQ!ogS#u!o#vR#v!pQ#f!_R$`#fQ$h#mR%O$hQ$|$gR%Y$|_cOPdhw!n#t^UOPdhw!n#tQ!uoQ!}tQ#OuQ#PvQ#}#RR$a#hR$R#SQ!VZQ!d]Q#V!TQ#q!m[$P#S$Q$[$s$x%UQ$S#UQ$U#XS$j#q$lQ$o#{R%Q$kR$O#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$^#dR$_#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,25,""],["openedBy",18,"(",33,"[",51,"{"],["closedBy",19,")",34,"]",52,"}"]],propSources:[Xg],skippedNodes:[0,3,88],repeatNodeCount:11,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#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o<%lO%^nFfSr^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSq^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUp`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!cQp`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!UUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!T^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!SQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[jg,zg,Eg,1,2,3,4,new Vb("m~RRYZ[z{a~~g~aO#_~~dP!P!Qg~lO#`~~",28,106)],topRules:{StyleSheet:[0,4],Styles:[1,87]},specialized:[{term:101,get:t=>_g[t]||-1},{term:59,get:t=>Dg[t]||-1},{term:102,get:t=>Ug[t]||-1}],tokenPrec:1219});let Lg=null;function Wg(){if(!Lg&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],o=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),o.has(r)||(e.push(r),o.add(r)));Lg=e.sort().map((t=>({type:"property",label:t,apply:t+": "})))}return Lg||[]}const Bg=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),Yg=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),Ig=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),Ng=["@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((t=>({type:"keyword",label:t}))),Gg=/^(\w[\w-]*|-\w[\w-]*|)$/,Fg=/^-(-[\w-]*)?$/,Hg=new Mp,Kg=["Declaration"];function Jg(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function tv(t,e,o){if(e.to-e.from>4096){let r=Hg.get(e);if(r)return r;let i=[],n=new Set,a=e.cursor(fp.IncludeAnonymous);if(a.firstChild())do{for(let e of tv(t,a.node,o))n.has(e.label)||(n.add(e.label),i.push(e))}while(a.nextSibling());return Hg.set(e,i),i}{let r=[],i=new Set;return e.cursor().iterate((e=>{var n;if(o(e)&&e.matchContext(Kg)&&":"==(null===(n=e.node.nextSibling)||void 0===n?void 0:n.name)){let o=t.sliceString(e.from,e.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}})),r}}const ev=t=>e=>{let{state:o,pos:r}=e,i=Ru(o).resolveInner(r,-1),n=i.type.isError&&i.from==i.to-1&&"-"==o.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(n||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Wg(),validFor:Gg};if("ValueName"==i.name)return{from:i.from,options:Yg,validFor:Gg};if("PseudoClassName"==i.name)return{from:i.from,options:Bg,validFor:Gg};if(t(i)||(e.explicit||n)&&function(t,e){var o;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(o=t.parent)||void 0===o?void 0:o.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(i,o.doc))return{from:t(i)||n?i.from:r,options:tv(o.doc,Jg(i),t),validFor:Fg};if("TagName"==i.name){for(let{parent:t}=i;t;t=t.parent)if("Block"==t.name)return{from:i.from,options:Wg(),validFor:Gg};return{from:i.from,options:Ig,validFor:Gg}}if("AtKeyword"==i.name)return{from:i.from,options:Ng,validFor:Gg};if(!e.explicit)return null;let a=i.resolve(r),s=a.childBefore(r);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:r,options:Bg,validFor:Gg}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:r,options:Yg,validFor:Gg}:"Block"==a.name||"Styles"==a.name?{from:r,options:Wg(),validFor:Gg}:null},ov=ev((t=>"VariableName"==t.name)),rv=Cu.define({name:"css",parser:Vg.configure({props:[Iu.add({Declaration:em()}),rm.add({"Block KeyframeList":im})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function iv(){return new Du(rv,rv.data.of({autocomplete:ov}))}const nv=[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],av=new og({start:!1,shift:(t,e)=>5==e||6==e||318==e?t:319==e,strict:!1}),sv=new Lb(((t,e)=>{let{next:o}=t;(125==o||-1==o||e.context)&&t.acceptToken(316)}),{contextual:!0,fallback:!0}),lv=new Lb(((t,e)=>{let o,{next:r}=t;nv.indexOf(r)>-1||(47!=r||47!=(o=t.peek(1))&&42!=o)&&(125==r||59==r||-1==r||e.context||t.acceptToken(314))}),{contextual:!0}),dv=new Lb(((t,e)=>{91!=t.next||e.context||t.acceptToken(315)}),{contextual:!0}),cv=new Lb(((t,e)=>{let{next:o}=t;if(43==o||45==o){if(t.advance(),o==t.next){t.advance();let o=!e.context&&e.canShift(1);t.acceptToken(o?1:2)}}else 63==o&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function hv(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const pv=new Lb(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let o=0;for(;nv.indexOf(t.next)>-1;)t.advance(),o++;if(hv(t.next,!0)){for(t.advance(),o++;hv(t.next,!1);)t.advance(),o++;for(;nv.indexOf(t.next)>-1;)t.advance(),o++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!hv(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),o++}}t.acceptToken(4,-o)})),uv=eu({"get set async static":wu.modifier,"for while do if else switch try catch finally return throw break continue default case":wu.controlKeyword,"in of await yield void typeof delete instanceof":wu.operatorKeyword,"let var const using function class extends":wu.definitionKeyword,"import export from":wu.moduleKeyword,"with debugger as new":wu.keyword,TemplateString:wu.special(wu.string),super:wu.atom,BooleanLiteral:wu.bool,this:wu.self,null:wu.null,Star:wu.modifier,VariableName:wu.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":wu.function(wu.variableName),VariableDefinition:wu.definition(wu.variableName),Label:wu.labelName,PropertyName:wu.propertyName,PrivatePropertyName:wu.special(wu.propertyName),"CallExpression/MemberExpression/PropertyName":wu.function(wu.propertyName),"FunctionDeclaration/VariableDefinition":wu.function(wu.definition(wu.variableName)),"ClassDeclaration/VariableDefinition":wu.definition(wu.className),"NewExpression/VariableName":wu.className,PropertyDefinition:wu.definition(wu.propertyName),PrivatePropertyDefinition:wu.definition(wu.special(wu.propertyName)),UpdateOp:wu.updateOperator,"LineComment Hashbang":wu.lineComment,BlockComment:wu.blockComment,Number:wu.number,String:wu.string,Escape:wu.escape,ArithOp:wu.arithmeticOperator,LogicOp:wu.logicOperator,BitOp:wu.bitwiseOperator,CompareOp:wu.compareOperator,RegExp:wu.regexp,Equals:wu.definitionOperator,Arrow:wu.function(wu.punctuation),": Spread":wu.punctuation,"( )":wu.paren,"[ ]":wu.squareBracket,"{ }":wu.brace,"InterpolationStart InterpolationEnd":wu.special(wu.brace),".":wu.derefOperator,", ;":wu.separator,"@":wu.meta,TypeName:wu.typeName,TypeDefinition:wu.definition(wu.typeName),"type enum interface implements namespace module declare":wu.definitionKeyword,"abstract global Privacy readonly override":wu.modifier,"is keyof unique infer asserts":wu.operatorKeyword,JSXAttributeValue:wu.attributeValue,JSXText:wu.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":wu.angleBracket,"JSXIdentifier JSXNameSpacedName":wu.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":wu.attributeName,"JSXBuiltin/JSXIdentifier":wu.standard(wu.tagName)}),mv={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},fv={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},bv={__proto__:null,"<":189},gv=rg.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O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6v3OQ7V3dQ7W<qQ7a<sQ7b<{Q8`5mQ8|6iQ9Q6rQ9[<|Q9b=VQ9c=WQ:c9SQ:y9}Q;R:aQ;x#SR=g=sR#[WR'X!el!tQ!r!v!y!z'^'j'k'l-`-p1g5q5sS'T!e-WU*g$|*X*lS-T'U']S0O*h*nQ0W*oQ2m-^Q4m0UR4r0XR(y#xQ!fQT-_'^-`]!qQ!r'^-`1g5qQ#p]R'g;wR)d$dY!uQ'^-`1g5qQ'i!rS's!v!yS'u!z5sS-o'j'kQ-q'lR2{-pT#kZ%dS#jZ%dS%jm,jU(e#h#i#lS.T(f(gQ.X(hQ0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c>mOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList 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 in 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 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:378,context:av,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[uv],skippedNodes:[0,5,6,276],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_$h&j(Up(X!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$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`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#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!S~~!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(a~~",141,338),new Vb("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:t=>mv[t]||-1},{term:341,get:t=>fv[t]||-1},{term:93,get:t=>bv[t]||-1}],tokenPrec:15116});class vv{constructor(t,e,o,r){this.state=t,this.pos=e,this.explicit=o,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=Ru(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),o=Math.max(e.from,this.pos-250),r=e.text.slice(o-e.from,this.pos-e.from),i=r.search(kv(t,!1));return i<0?null:{from:o+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,o){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function Ov(t){let e=Object.keys(t).join(""),o=/\w/.test(e);return o&&(e=e.replace(/\w/g,"")),`[${o?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function yv(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[o,r]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),o=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)o[r[t]]=!0}let r=Ov(e)+Ov(o)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let i=t.matchBefore(r);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:o}:null}}class xv{constructor(t,e,o,r){this.completion=t,this.source=e,this.match=o,this.score=r}}function wv(t){return t.selection.main.from}function kv(t,e){var o;let{source:r}=t,i=e&&"^"!=r[0],n="$"!=r[r.length-1];return i||n?new RegExp(`${i?"^":""}(?:${r})${n?"$":""}`,null!==(o=t.flags)&&void 0!==o?o:t.ignoreCase?"i":""):t}const qv=Sn.define(),Sv=new WeakMap;function Qv(t){if(!Array.isArray(t))return t;let e=Sv.get(t);return e||Sv.set(t,e=yv(t)),e}const $v=Pn.define(),Pv=Pn.define();class Cv{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let o=Xi(t,e),r=Di(o);this.chars.push(o);let i=t.slice(e,e+r),n=i.toUpperCase();this.folded.push(Xi(n==i?i.toLowerCase():n,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:o,any:r,precise:i,byWord:n}=this;if(1==e.length){let r=Xi(t,0),i=Di(r),n=i==t.length?0:-100;if(r==e[0]);else{if(r!=o[0])return null;n+=-200}return this.ret(n,[0,i])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=e.length,l=0;if(a<0){for(let i=0,n=Math.min(t.length,200);i<n&&l<s;){let n=Xi(t,i);n!=e[l]&&n!=o[l]||(r[l++]=i),i+=Di(n)}if(l<s)return null}let d=0,c=0,h=!1,p=0,u=-1,m=-1,f=/[a-z]/.test(t),b=!0;for(let r=0,l=Math.min(t.length,200),g=0;r<l&&c<s;){let l=Xi(t,r);a<0&&(d<s&&l==e[d]&&(i[d++]=r),p<s&&(l==e[p]||l==o[p]?(0==p&&(u=r),m=r+1,p++):p=0));let v,O=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=_i(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==O&&f||0==g&&0!=O)&&(e[c]==l||o[c]==l&&(h=!0)?n[c++]=r:n.length&&(b=!1)),g=O,r+=Di(l)}return c==s&&0==n[0]&&b?this.result((h?-200:0)-100,n,t):p==s&&0==u?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):p==s?this.ret(-900-t.length,[u,m]):c==s?this.result((h?-200:0)-100-700+(b?0:-1100),n,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,o){let r=[],i=0;for(let t of e){let e=t+(this.astral?Di(Xi(o,t)):1);i&&r[i-1]==t?r[i-1]=e:(r[i++]=t,r[i++]=e)}return this.ret(t-o.length,r)}}class Rv{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),o=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==o?null:(this.matched=[0,e.length],this.score=o+(t.length==this.pattern.length?0:-100),this)}}const Zv=en.define({combine:t=>Dn(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Av,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>o=>Tv(t(o),e(o)),optionClass:(t,e)=>o=>Tv(t(o),e(o)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function Tv(t,e){return t?e?t+" "+e:t:e}function Av(t,e,o,r,i,n){let a,s,l=t.textDirection==Rs.RTL,d=l,c=!1,h="top",p=e.left-i.left,u=i.right-e.right,m=r.right-r.left,f=r.bottom-r.top;if(d&&p<Math.min(m,u)?d=!1:!d&&u<Math.min(m,p)&&(d=!0),m<=(d?p:u))a=Math.max(i.top,Math.min(o.top,i.bottom-f))-e.top,s=Math.min(400,d?p:u);else{c=!0,s=Math.min(400,(l?e.right:i.right-e.left)-30);let t=i.bottom-e.bottom;t>=f||t>e.top?a=o.bottom-e.top:(h="bottom",a=e.bottom-o.top)}return{style:`${h}: ${a/((e.bottom-e.top)/n.offsetHeight)}px; max-width: ${s/((e.right-e.left)/n.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":d?"left":"right")}}function Mv(t,e,o){if(t<=o)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/o);return{from:t*o,to:(t+1)*o}}let r=Math.floor((t-e)/o);return{from:t-(r+1)*o,to:t-r*o}}class Ev{constructor(t,e,o){this.view=t,this.stateField=e,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:i,selected:n}=r.open,a=t.state.facet(Zv);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,o,r){let i=document.createElement("span");i.className="cm-completionLabel";let n=t.displayLabel||t.label,a=0;for(let t=0;t<r.length;){let e=r[t++],o=r[t++];e>a&&i.appendChild(document.createTextNode(n.slice(a,e)));let s=i.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(n.slice(e,o))),s.className="cm-completionMatchedText",a=o}return a<n.length&&i.appendChild(document.createTextNode(n.slice(a))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Mv(i.length,n,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(o=>{let{options:r}=t.state.field(e).open;for(let e,i=o.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void o.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let o=t.state.field(this.stateField,!1);o&&o.tooltip&&t.state.facet(Zv).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:Pv.of(null)})})),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let o=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),o!=r){let{options:i,selected:n,disabled:a}=o.open;r.open&&r.open.options==i||(this.range=Mv(i.length,n,t.state.facet(Zv).maxRenderedOptions),this.showOptions(i,o.id)),this.updateSel(),a!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=Mv(e.options.length,e.selected,this.view.state.facet(Zv).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:o}=e.options[e.selected],{info:r}=o;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(o);if(!i)return;"then"in i?i.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,o)})).catch((t=>cl(this.view.state,t,"completion info"))):this.addInfoPane(i,o)}}addInfoPane(t,e){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",null!=t.nodeType)o.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;o.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let o=this.list.firstChild,r=this.range.from;o;o=o.nextSibling,r++)"LI"==o.nodeName&&o.id?r==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),e=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected"):r--;return e&&function(t,e){let o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=o.height/t.offsetHeight;r.top<o.top?t.scrollTop-=(o.top-r.top)/i:r.bottom>o.bottom&&(t.scrollTop+=(r.bottom-o.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return r.top>Math.min(i.bottom,e.bottom)-10||r.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(Zv).positionInfo(this.view,e,r,o,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,o){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",(t=>{t.target==r&&t.preventDefault()}));let i=null;for(let n=o.from;n<o.to;n++){let{completion:a,match:s}=t[n],{section:l}=a;if(l){let t="string"==typeof l?l:l.name;t!=i&&(n>o.from||0==o.from)&&(i=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const d=r.appendChild(document.createElement("li"));d.id=e+"-"+n,d.setAttribute("role","option");let c=this.optionClass(a);c&&(d.className=c);for(let t of this.optionContent){let e=t(a,this.view.state,this.view,s);e&&d.appendChild(e)}}return o.from&&r.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function jv(t,e){return o=>new Ev(o,t,e)}function zv(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class Xv{constructor(t,e,o,r,i,n){this.options=t,this.attrs=e,this.tooltip=o,this.timestamp=r,this.selected=i,this.disabled=n}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new Xv(this.options,Vv(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,o,r,i,n){if(r&&!n&&t.some((t=>t.isPending)))return r.setDisabled();let a=function(t,e){let o=[],r=null,i=t=>{o.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some((e=>e.name==t))||r.push("string"==typeof e?{name:t}:e)}},n=e.facet(Zv);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)i(new xv(e,r.source,t?t(e):[],1e9-o.length));else{let o,a=e.sliceDoc(r.from,r.to),s=n.filterStrict?new Rv(a):new Cv(a);for(let e of r.result.options)if(o=s.match(e.label)){let n=e.displayLabel?t?t(e,o.matched):[]:o.matched;i(new xv(e,r.source,n,o.score+(e.boost||0)))}}}if(r){let t=Object.create(null),e=0,i=(t,e)=>{var o,r;return(null!==(o=t.rank)&&void 0!==o?o:1e9)-(null!==(r=e.rank)&&void 0!==r?r:1e9)||(t.name<e.name?-1:1)};for(let o of r.sort(i))e-=1e5,t[o.name]=e;for(let e of o){let{section:o}=e.completion;o&&(e.score+=t["string"==typeof o?o:o.name])}}let a=[],s=null,l=n.compareCompletions;for(let t of o.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let e=t.completion;!s||s.label!=e.label||s.detail!=e.detail||null!=s.type&&null!=e.type&&s.type!=e.type||s.apply!=e.apply||s.boost!=e.boost?a.push(t):zv(t.completion)>zv(s)&&(a[a.length-1]=t),s=t.completion}return a}(t,e);if(!a.length)return r&&t.some((t=>t.isPending))?r.setDisabled():null;let s=e.facet(Zv).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<a.length;e++)if(a[e].completion==t){s=e;break}}return new Xv(a,Vv(o,s),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:Hv,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new Xv(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Xv(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class _v{constructor(t,e,o){this.active=t,this.id=e,this.open=o}static start(){return new _v(Lv,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,o=e.facet(Zv),r=(o.override||e.languageDataAt("autocomplete",wv(e)).map(Qv)).map((e=>{let r=this.active.find((t=>t.source==e))||new Bv(e,this.active.some((t=>0!=t.state))?1:0);return r.update(t,o)}));r.length==this.active.length&&r.every(((t,e)=>t==this.active[e]))&&(r=this.active);let i=this.open,n=t.effects.some((t=>t.is(Iv)));i&&t.docChanged&&(i=i.map(t.changes)),t.selection||r.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let o=0,r=0;;){for(;o<t.length&&!t[o].hasResult();)o++;for(;r<e.length&&!e[r].hasResult();)r++;let i=o==t.length,n=r==e.length;if(i||n)return i==n;if(t[o++].result!=e[r++].result)return!1}}(r,this.active)||n?i=Xv.build(r,e,this.id,i,o,n):i&&i.disabled&&!r.some((t=>t.isPending))&&(i=null),!i&&r.every((t=>!t.isPending))&&r.some((t=>t.hasResult()))&&(r=r.map((t=>t.hasResult()?new Bv(t.source,0):t)));for(let e of t.effects)e.is(Nv)&&(i=i&&i.setSelected(e.value,this.id));return r==this.active&&i==this.open?this:new _v(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Dv:Uv}}const Dv={"aria-autocomplete":"list"},Uv={};function Vv(t,e){let o={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(o["aria-activedescendant"]=t+"-"+e),o}const Lv=[];function Wv(t,e){if(t.isUserEvent("input.complete")){let o=t.annotation(qv);if(o&&e.activateOnCompletion(o))return 12}let o=t.isUserEvent("input.type");return o&&e.activateOnTyping?5:o?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Bv{constructor(t,e,o=!1){this.source=t,this.state=e,this.explicit=o}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let o=Wv(t,e),r=this;(8&o||16&o&&this.touches(t))&&(r=new Bv(r.source,0)),4&o&&0==r.state&&(r=new Bv(this.source,1)),r=r.updateFor(t,o);for(let e of t.effects)if(e.is($v))r=new Bv(r.source,1,e.value);else if(e.is(Pv))r=new Bv(r.source,0);else if(e.is(Iv))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(wv(t.state))}}class Yv extends Bv{constructor(t,e,o,r,i,n){super(t,3,e),this.limit=o,this.result=r,this.from=i,this.to=n}hasResult(){return!0}updateFor(t,e){var o;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),n=t.changes.mapPos(this.to,1),a=wv(t.state);if(a>n||!r||2&e&&(wv(t.startState)==this.from||a<this.limit))return new Bv(this.source,4&e?1:0);let s=t.changes.mapPos(this.limit);return function(t,e,o,r){if(!t)return!1;let i=e.sliceDoc(o,r);return"function"==typeof t?t(i,o,r,e):kv(t,!0).test(i)}(r.validFor,t.state,i,n)?new Yv(this.source,this.explicit,s,r,i,n):r.update&&(r=r.update(r,i,n,new vv(t.state,a,!1)))?new Yv(this.source,this.explicit,s,r,r.from,null!==(o=r.to)&&void 0!==o?o:wv(t.state)):new Bv(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new Yv(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Bv(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const Iv=Pn.define({map:(t,e)=>t.map((t=>t.map(e)))}),Nv=Pn.define(),Gv=dn.define({create:()=>_v.start(),update:(t,e)=>t.update(e),provide:t=>[yh.from(t,(t=>t.tooltip)),uc.contentAttributes.from(t,(t=>t.attrs))]});function Fv(t,e){const o=e.completion.apply||e.completion.label;let r=t.state.field(Gv).active.find((t=>t.source==e.source));return r instanceof Yv&&("string"==typeof o?t.dispatch(Object.assign(Object.assign({},function(t,e,o,r){let{main:i}=t.selection,n=o-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange((s=>{if(s!=i&&o!=r&&t.sliceDoc(s.from+n,s.from+a)!=t.sliceDoc(o,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+n,to:r==i.from?s.to:s.from+a,insert:l},range:Ki.cursor(s.from+n+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,o,r.from,r.to)),{annotations:qv.of(e.completion)})):o(t,e.completion,r.from,r.to),!0)}const Hv=jv(Gv,Fv);function Kv(t,e="option"){return o=>{let r=o.state.field(Gv,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<o.state.facet(Zv).interactionDelay)return!1;let i,n=1;"page"==e&&(i=$h(o,r.open.tooltip))&&(n=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+n*(t?1:-1):t?0:a-1;return s<0?s="page"==e?0:a-1:s>=a&&(s="page"==e?a-1:0),o.dispatch({effects:Nv.of(s)}),!0}}const Jv=t=>!!t.state.field(Gv,!1)&&(t.dispatch({effects:$v.of(!0)}),!0);class tO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const eO=ml.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Gv).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Gv),o=t.state.facet(Zv);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Gv)==e)return;let r=t.transactions.some((t=>{let e=Wv(t,o);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e<this.running.length;e++){let o=this.running[e];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>50&&Date.now()-o.time>1e3){for(let t of o.context.abortListeners)try{t()}catch(t){cl(this.view.state,t)}o.context.abortListeners=null,this.running.splice(e--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is($v)))))&&(this.pendingStart=!0);let i=this.pendingStart?50:o.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),i):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Gv);for(let t of e.active)t.isPending&&!this.running.some((e=>e.active.source==t.source))&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Zv).updateSyncTime))}startQuery(t){let{state:e}=this.view,o=wv(e),r=new vv(e,o,t.explicit,this.view),i=new tO(t,r);this.running.push(i),Promise.resolve(t.source(r)).then((t=>{i.context.aborted||(i.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:Pv.of(null)}),cl(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Zv).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],o=this.view.state.facet(Zv),r=this.view.state.field(Gv);for(let i=0;i<this.running.length;i++){let n=this.running[i];if(void 0===n.done)continue;if(this.running.splice(i--,1),n.done){let r=wv(n.updates.length?n.updates[0].startState:this.view.state),i=Math.min(r,n.done.from+(n.active.explicit?0:1)),a=new Yv(n.active.source,n.active.explicit,i,n.done,n.done.from,null!==(t=n.done.to)&&void 0!==t?t:r);for(let t of n.updates)a=a.update(t,o);if(a.hasResult()){e.push(a);continue}}let a=r.active.find((t=>t.source==n.active.source));if(a&&a.isPending)if(null==n.done){let t=new Bv(n.active.source,0);for(let e of n.updates)t=t.update(e,o);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Iv.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Gv,!1);if(e&&e.tooltip&&this.view.state.facet(Zv).closeOnBlur){let o=e.open&&$h(this.view,e.open.tooltip);o&&o.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:Pv.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:$v.of(!1)})),20),this.composing=0}}}),oO="object"==typeof navigator&&/Win/.test(navigator.platform),rO=hn.highest(uc.domEventHandlers({keydown(t,e){let o=e.state.field(Gv,!1);if(!o||!o.open||o.open.disabled||o.open.selected<0||t.key.length>1||t.ctrlKey&&(!oO||!t.altKey)||t.metaKey)return!1;let r=o.open.options[o.open.selected],i=o.active.find((t=>t.source==r.source)),n=r.completion.commitCharacters||i.result.commitCharacters;return n&&n.indexOf(t.key)>-1&&Fv(e,r),!1}})),iO=uc.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class nO{constructor(t,e,o,r){this.field=t,this.line=e,this.from=o,this.to=r}}class aO{constructor(t,e,o){this.field=t,this.from=e,this.to=o}map(t){let e=t.mapPos(this.from,-1,Vi.TrackDel),o=t.mapPos(this.to,1,Vi.TrackDel);return null==e||null==o?null:new aO(this.field,e,o)}}class sO{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let o=[],r=[e],i=t.doc.lineAt(e),n=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(o.length){let o=n,a=/^\t*/.exec(i)[0].length;for(let e=0;e<a;e++)o+=t.facet(Vu);r.push(e+o.length-a),i=o+i.slice(a)}o.push(i),e+=i.length+1}let a=this.fieldPositions.map((t=>new aO(t.field,r[t.line]+t.from,r[t.line]+t.to)));return{text:o,ranges:a}}static parse(t){let e,o=[],r=[],i=[];for(let n of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(n);){let t=e[1]?+e[1]:null,a=e[2]||e[3]||"",s=-1,l=a.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<o.length;e++)(null!=t?o[e].seq==t:l&&o[e].name==l)&&(s=e);if(s<0){let e=0;for(;e<o.length&&(null==t||null!=o[e].seq&&o[e].seq<t);)e++;o.splice(e,0,{seq:t,name:l}),s=e;for(let t of i)t.field>=s&&t.field++}i.push(new nO(s,r.length,e.index,e.index+l.length)),n=n.slice(0,e.index)+a+n.slice(e.index+e[0].length)}n=n.replace(/\\([{}])/g,((t,e,o)=>{for(let t of i)t.line==r.length&&t.from>o&&(t.from--,t.to--);return e})),r.push(n)}return new sO(r,i)}}let lO=vs.widget({widget:new class extends bs{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),dO=vs.mark({class:"cm-snippetField"});class cO{constructor(t,e){this.ranges=t,this.active=e,this.deco=vs.set(t.map((t=>(t.from==t.to?lO:dO).range(t.from,t.to))))}map(t){let e=[];for(let o of this.ranges){let r=o.map(t);if(!r)return null;e.push(r)}return new cO(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const hO=Pn.define({map:(t,e)=>t&&t.map(e)}),pO=Pn.define(),uO=dn.define({create:()=>null,update(t,e){for(let o of e.effects){if(o.is(hO))return o.value;if(o.is(pO)&&t)return new cO(t.ranges,o.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>uc.decorations.from(t,(t=>t?t.deco:vs.none))});function mO(t,e){return Ki.create(t.filter((t=>t.field==e)).map((t=>Ki.range(t.from,t.to))))}function fO(t){let e=sO.parse(t);return(t,o,r,i)=>{let{text:n,ranges:a}=e.instantiate(t.state,r),{main:s}=t.state.selection,l={changes:{from:r,to:i==s.from?s.to:i,insert:$i.of(n)},scrollIntoView:!0,annotations:o?[qv.of(o),Cn.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=mO(a,0)),a.some((t=>t.field>0))){let e=new cO(a,0),o=l.effects=[hO.of(e)];void 0===t.state.field(uO,!1)&&o.push(Pn.appendConfig.of([uO,OO,xO,iO]))}t.dispatch(t.state.update(l))}}function bO(t){return({state:e,dispatch:o})=>{let r=e.field(uO,!1);if(!r||t<0&&0==r.active)return!1;let i=r.active+t,n=t>0&&!r.ranges.some((e=>e.field==i+t));return o(e.update({selection:mO(r.ranges,i),effects:hO.of(n?null:new cO(r.ranges,i)),scrollIntoView:!0})),!0}}const gO=[{key:"Tab",run:bO(1),shift:bO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(uO,!1)&&(e(t.update({effects:hO.of(null)})),!0)}],vO=en.define({combine:t=>t.length?t[0]:gO}),OO=hn.highest(xc.compute([vO],(t=>t.facet(vO))));function yO(t,e){return Object.assign(Object.assign({},e),{apply:fO(t)})}const xO=uc.domEventHandlers({mousedown(t,e){let o,r=e.state.field(uO,!1);if(!r||null==(o=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=r.ranges.find((t=>t.from<=o&&t.to>=o));return!(!i||i.field==r.active||(e.dispatch({selection:mO(r.ranges,i.field),effects:hO.of(r.ranges.some((t=>t.field>i.field))?new cO(r.ranges,i.field):null),scrollIntoView:!0}),0))}}),wO={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},kO=Pn.define({map(t,e){let o=e.mapPos(t,-1,Vi.TrackAfter);return null==o?void 0:o}}),qO=new class extends Un{};qO.startSide=1,qO.endSide=-1;const SO=dn.define({create:()=>Bn.empty,update(t,e){if(t=t.map(e.changes),e.selection){let o=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=o.from&&t<=o.to})}for(let o of e.effects)o.is(kO)&&(t=t.update({add:[qO.range(o.value,o.value+1)]}));return t}}),QO="()[]{}<>«»»«[]{}";function $O(t){for(let e=0;e<16;e+=2)if(QO.charCodeAt(e)==t)return QO.charAt(e+1);return _i(t<128?t:t+1)}function PO(t,e){return t.languageDataAt("closeBrackets",e)[0]||wO}const CO="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),RO=uc.inputHandler.of(((t,e,o,r)=>{if((CO?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||2==r.length&&1==Di(Xi(r,0))||e!=i.from||o!=i.to)return!1;let n=function(t,e){let o=PO(t,t.selection.main.head),r=o.brackets||wO.brackets;for(let i of r){let n=$O(Xi(i,0));if(e==i)return n==i?jO(t,i,r.indexOf(i+i+i)>-1,o):MO(t,i,n,o.before||wO.before);if(e==n&&TO(t,t.selection.main.from))return EO(t,0,n)}return null}(t.state,r);return!!n&&(t.dispatch(n),!0)})),ZO=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=PO(t,t.selection.main.head).brackets||wO.brackets,r=null,i=t.changeByRange((e=>{if(e.empty){let r=function(t,e){let o=t.sliceString(e-2,e);return Di(Xi(o,0))==o.length?o:o.slice(1)}(t.doc,e.head);for(let i of o)if(i==r&&AO(t.doc,e.head)==$O(Xi(i,0)))return{changes:{from:e.head-i.length,to:e.head+i.length},range:Ki.cursor(e.head-i.length)}}return{range:r=e}}));return r||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function TO(t,e){let o=!1;return t.field(SO).between(0,t.doc.length,(t=>{t==e&&(o=!0)})),o}function AO(t,e){let o=t.sliceString(e,e+2);return o.slice(0,Di(Xi(o,0)))}function MO(t,e,o,r){let i=null,n=t.changeByRange((n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:o,from:n.to}],effects:kO.of(n.to+e.length),range:Ki.range(n.anchor+e.length,n.head+e.length)};let a=AO(t.doc,n.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+o,from:n.head},effects:kO.of(n.head+e.length),range:Ki.cursor(n.head+e.length)}:{range:i=n}}));return i?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function EO(t,e,o){let r=null,i=t.changeByRange((e=>e.empty&&AO(t.doc,e.head)==o?{changes:{from:e.head,to:e.head+o.length,insert:o},range:Ki.cursor(e.head+o.length)}:r={range:e}));return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function jO(t,e,o,r){let i=r.stringPrefixes||wO.stringPrefixes,n=null,a=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:kO.of(r.to+e.length),range:Ki.range(r.anchor+e.length,r.head+e.length)};let a,s=r.head,l=AO(t.doc,s);if(l==e){if(zO(t,s))return{changes:{insert:e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)};if(TO(t,s)){let r=o&&t.sliceDoc(s,s+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:s,to:s+r.length,insert:r},range:Ki.cursor(s+r.length)}}}else{if(o&&t.sliceDoc(s-2*e.length,s)==e+e&&(a=XO(t,s-2*e.length,i))>-1&&zO(t,a))return{changes:{insert:e+e+e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)};if(t.charCategorizer(s)(l)!=jn.Word&&XO(t,s,i)>-1&&!function(t,e,o,r){let i=Ru(t).resolveInner(e,-1),n=r.reduce(((t,e)=>Math.max(t,e.length)),0);for(let a=0;a<5;a++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+o.length+n)),s=a.indexOf(o);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>o.length+s;){if(t.sliceDoc(e.to-o.length,e.to)==o)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,s,e,i))return{changes:{insert:e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)}}return{range:n=r}}));return n?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function zO(t,e){let o=Ru(t).resolveInner(e+1);return o.parent&&o.from==e}function XO(t,e,o){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=jn.Word)return e;for(let i of o){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=jn.Word)return o}return-1}function _O(t={}){return[rO,Gv,Zv.of(t),eO,UO,iO]}const DO=[{key:"Ctrl-Space",run:Jv},{mac:"Alt-`",run:Jv},{key:"Escape",run:t=>{let e=t.state.field(Gv,!1);return!(!e||!e.active.some((t=>0!=t.state))||(t.dispatch({effects:Pv.of(null)}),0))}},{key:"ArrowDown",run:Kv(!0)},{key:"ArrowUp",run:Kv(!1)},{key:"PageDown",run:Kv(!0,"page")},{key:"PageUp",run:Kv(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(Gv,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Zv).interactionDelay)&&Fv(t,e.open.options[e.open.selected])}}],UO=hn.highest(xc.computeN([Zv],(t=>t.facet(Zv).defaultKeymap?[DO]:[]))),VO=[yO("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),yO("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),yO("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),yO("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),yO("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),yO("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),yO("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),yO("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),yO("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),yO('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),yO('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LO=VO.concat([yO("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),yO("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),yO("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),WO=new Mp,BO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function YO(t){return(e,o)=>{let r=e.node.getChild("VariableDefinition");return r&&o(r,t),!0}}const IO=["FunctionDeclaration"],NO={FunctionDeclaration:YO("function"),ClassDeclaration:YO("class"),ClassExpression:()=>!0,EnumDeclaration:YO("constant"),TypeAliasDeclaration:YO("type"),NamespaceDeclaration:YO("namespace"),VariableDefinition(t,e){t.matchContext(IO)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function GO(t,e){let o=WO.get(e);if(o)return o;let r=[],i=!0;function n(e,o){let i=t.sliceString(e.from,e.to);r.push({label:i,type:o})}return e.cursor(fp.IncludeAnonymous).iterate((e=>{if(i)i=!1;else if(e.name){let t=NO[e.name];if(t&&t(e,n)||BO.has(e.name))return!1}else if(e.to-e.from>8192){for(let o of GO(t,e.node))r.push(o);return!1}})),WO.set(e,r),r}const FO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,HO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function KO(t){let e=Ru(t.state).resolveInner(t.pos,-1);if(HO.indexOf(e.name)>-1)return null;let o="VariableName"==e.name||e.to-e.from<20&&FO.test(t.state.sliceDoc(e.from,e.to));if(!o&&!t.explicit)return null;let r=[];for(let o=e;o;o=o.parent)BO.has(o.name)&&(r=r.concat(GO(t.state.doc,o)));return{options:r,from:o?e.from:t.pos,validFor:FO}}const JO=Cu.define({name:"javascript",parser:gv.configure({props:[Iu.add({IfStatement:em({except:/^\s*({|else\b)/}),TryStatement:em({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,o=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(o?0:r?1:2)*t.unit},Block:Ju({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":em({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),rm.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":im,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),ty={test:t=>/^JSX/.test(t.name),facet:Su({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ey=JO.configure({dialect:"ts"},"typescript"),oy=JO.configure({dialect:"jsx",props:[Qu.add((t=>t.isTop?[ty]:void 0))]}),ry=JO.configure({dialect:"jsx ts",props:[Qu.add((t=>t.isTop?[ty]:void 0))]},"typescript");let iy=t=>({label:t,type:"keyword"});const ny="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(iy),ay=ny.concat(["declare","implements","private","protected","public"].map(iy));function sy(t={}){let e=t.jsx?t.typescript?ry:oy:t.typescript?ey:JO,o=t.typescript?LO.concat(ay):VO.concat(ny);return new Du(e,[JO.data.of({autocomplete:(r=HO,i=yv(o),t=>{for(let e=Ru(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return i(t)})}),JO.data.of({autocomplete:KO}),t.jsx?cy:[]]);var r,i}function ly(t,e,o=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,o));return""}const dy="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),cy=uc.inputHandler.of(((t,e,o,r,i)=>{if((dy?t.composing:t.compositionStarted)||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!JO.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange((t=>{var e;let o,{head:i}=t,n=Ru(a).resolveInner(i-1,-1);if("JSXStartTag"==n.name&&(n=n.parent),a.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==n.name&&n.to>i);else{if(">"==r&&"JSXFragmentTag"==n.name)return{range:t,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==n.name){let t=n.parent,r=t.parent;if(r&&t.from==i-2&&((o=ly(a.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${o}>`;return{range:Ki.cursor(i+t.length,-1),changes:{from:i,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(n);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(a.doc.sliceString(i,i+2))&&(o=ly(a.doc,e,i)))return{range:t,changes:{from:i,insert:`</${o}>`}}}}return{range:t}}));return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),hy=["_blank","_self","_top","_parent"],py=["ascii","utf-8","utf-16","latin1","latin1"],uy=["get","post","put","delete"],my=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],fy=["true","false"],by={},gy={a:{attrs:{href:null,ping:null,type:null,media:null,target:hy,hreflang:null}},abbr:by,address:by,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:by,aside:by,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:by,base:{attrs:{href:null,target:hy}},bdi:by,bdo:by,blockquote:{attrs:{cite:null}},body:by,br:by,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:my,formmethod:uy,formnovalidate:["novalidate"],formtarget:hy,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:by,center:by,cite:by,code:by,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:by,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:by,div:by,dl:by,dt:by,em:by,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:by,figure:by,footer:by,form:{attrs:{action:null,name:null,"accept-charset":py,autocomplete:["on","off"],enctype:my,method:uy,novalidate:["novalidate"],target:hy}},h1:by,h2:by,h3:by,h4:by,h5:by,h6:by,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:by,hgroup:by,hr:by,html:{attrs:{manifest:null}},i:by,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:my,formmethod:uy,formnovalidate:["novalidate"],formtarget:hy,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:by,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:by,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:by,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:py,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:by,noscript:by,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:by,param:{attrs:{name:null,value:null}},pre:by,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:by,rt:by,ruby:by,samp:by,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:py}},section:by,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:by,source:{attrs:{src:null,type:null,media:null}},span:by,strong:by,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:by,summary:by,sup:by,table:by,tbody:by,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:by,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:by,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:by,time:{attrs:{datetime:null}},title:by,tr:by,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:by,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:by},vy={accesskey:null,class:null,contenteditable:fy,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:fy,autocorrect:fy,autocapitalize:fy,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":fy,"aria-autocomplete":["inline","list","both","none"],"aria-busy":fy,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":fy,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":fy,"aria-hidden":fy,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":fy,"aria-multiselectable":fy,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":fy,"aria-relevant":null,"aria-required":fy,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Oy="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let t of Oy)vy[t]=null;class yy{constructor(t,e){this.tags=Object.assign(Object.assign({},gy),t),this.globalAttrs=Object.assign(Object.assign({},vy),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function xy(t,e,o=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,o)):""}function wy(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function ky(t,e,o){let r=o.tags[xy(t,wy(e))];return(null==r?void 0:r.children)||o.allTags}function qy(t,e){let o=[];for(let r=wy(e);r&&!r.type.isTop;r=wy(r.parent)){let i=xy(t,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&o.indexOf(i)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&o.push(i)}return o}yy.default=new yy;const Sy=/^[:\-\.\w\u00b7-\uffff]*$/;function Qy(t,e,o,r,i){let n=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",a=wy(o,!0);return{from:r,to:i,options:ky(t.doc,a,e).map((t=>({label:t,type:"type"}))).concat(qy(t.doc,o).map(((t,e)=>({label:"/"+t,apply:"/"+t+n,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function $y(t,e,o,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:o,to:r,options:qy(t.doc,e).map(((t,e)=>({label:t,apply:t+i,type:"type",boost:99-e}))),validFor:Sy}}function Py(t){let{extraTags:e,extraGlobalAttributes:o}=t,r=o||e?new yy(e,o):yy.default;return t=>function(t,e){let{state:o,pos:r}=e,i=Ru(o).resolveInner(r,-1),n=i.resolve(r);for(let t,e=r;n==i&&(t=i.childBefore(e));){let o=t.lastChild;if(!o||!o.type.isError||o.from<o.to)break;n=i=t,e=o.from}return"TagName"==i.name?i.parent&&/CloseTag$/.test(i.parent.name)?$y(o,i,i.from,r):Qy(o,t,i,i.from,r):"StartTag"==i.name?Qy(o,t,i,r,r):"StartCloseTag"==i.name||"IncompleteCloseTag"==i.name?$y(o,i,r,r):"OpenTag"==i.name||"SelfClosingTag"==i.name||"AttributeName"==i.name?function(t,e,o,r,i){let n=wy(o),a=n?e.tags[xy(t.doc,n)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:r,to:i,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames).map((t=>({label:t,type:"property"}))),validFor:Sy}}(o,t,i,"AttributeName"==i.name?i.from:r,r):"Is"==i.name||"AttributeValue"==i.name||"UnquotedAttributeValue"==i.name?function(t,e,o,r,i){var n;let a,s=null===(n=o.parent)||void 0===n?void 0:n.getChild("AttributeName"),l=[];if(s){let n=t.sliceDoc(s.from,s.to),d=e.globalAttrs[n];if(!d){let r=wy(o),i=r?e.tags[xy(t.doc,r)]:null;d=(null==i?void 0:i.attrs)&&i.attrs[n]}if(d){let e=t.sliceDoc(r,i).toLowerCase(),o='"',n='"';/^['"]/.test(e)?(a='"'==e[0]?/^[^"]*$/:/^[^']*$/,o="",n=t.sliceDoc(i,i+1)==e[0]?"":e[0],e=e.slice(1),r++):a=/^[^\s<>='"]*$/;for(let t of d)l.push({label:t,apply:o+t+n,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}(o,t,i,"Is"==i.name?r:i.from,r):!e.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,o,r){let i=[],n=0;for(let r of ky(t.doc,o,e))i.push({label:"<"+r,type:"type"});for(let e of qy(t.doc,o))i.push({label:"</"+e+">",type:"type",boost:99-n++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(o,t,i,r)}(r,t)}const Cy=JO.parser.configure({top:"SingleExpression"}),Ry=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:ey.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:oy.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:ry.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:Cy},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:JO.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:rv.parser}],Zy=[{name:"style",parser:rv.parser.configure({top:"Styles"})}].concat(Oy.map((t=>({name:t,parser:JO.parser})))),Ty=Cu.define({name:"html",parser:$g.configure({props:[Iu.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,o=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;o=e=t}return o&&(!(e=o.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(o.from)+t.unit:null}}),rm.add({Element(t){let e=t.firstChild,o=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==o.name?o.from:t.to}:null}}),Wm.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Ay=Ty.configure({wrap:Zg(Ry,Zy)});function My(t={}){let e,o="";!1===t.matchClosingTags&&(o="noMatch"),!0===t.selfClosingTags&&(o=(o?o+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=Zg((t.nestedLanguages||[]).concat(Ry),(t.nestedAttributes||[]).concat(Zy)));let r=e?Ty.configure({wrap:e,dialect:o}):o?Ay.configure({dialect:o}):Ay;return new Du(r,[Ay.data.of({autocomplete:Py(t)}),!1!==t.autoCloseTags?jy:[],sy().support,iv().support])}const Ey=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),jy=uc.inputHandler.of(((t,e,o,r,i)=>{if(t.composing||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!Ay.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange((t=>{var e,o,i;let n,s=a.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,d=Ru(a).resolveInner(l,-1);if(s&&">"==r&&"EndTag"==d.name){let r=d.parent;if("CloseTag"!=(null===(o=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===o?void 0:o.name)&&(n=xy(a.doc,r.parent,l))&&!Ey.has(n))return{range:t,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${n}>`}}}else if(s&&"/"==r&&"IncompleteCloseTag"==d.name){let t=d.parent;if(d.from==l-2&&"CloseTag"!=(null===(i=t.lastChild)||void 0===i?void 0:i.name)&&(n=xy(a.doc,t,l))&&!Ey.has(n)){let t=l+(">"===a.doc.sliceString(l,l+1)?1:0),e=`${n}>`;return{range:Ki.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function zy(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,o=arguments[1];if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o)){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var i=o[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)Xy(t,arguments[e]);return t}function Xy(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var o=0;o<e.length;o++)Xy(t,e[o])}}const _y="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Dy{constructor(t,e,o=0,r=t.length,i,n){this.test=n,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(o,r),this.bufferStart=o,this.normalize=i?t=>i(_y(t)):_y,this.query=this.normalize(e)}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 Xi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=_i(t),o=this.bufferStart+this.bufferPos;this.bufferPos+=Di(t);let r=this.normalize(e);if(r.length)for(let t=0,i=o;;t++){let n=r.charCodeAt(t),a=this.match(n,i,this.bufferPos+this.bufferStart);if(t==r.length-1){if(a)return this.value=a,this;break}i==o&&t<e.length&&e.charCodeAt(t)==n&&i++}}}match(t,e,o){let r=null;for(let e=0;e<this.matches.length;e+=2){let i=this.matches[e],n=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?r={from:this.matches[e+1],to:o}:(this.matches[e]++,n=!0)),n||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:o}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(Dy.prototype[Symbol.iterator]=function(){return this});const Uy={from:-1,to:-1,match:/.*/.exec("")},Vy="gm"+(null==/x/.unicode?"":"u");class Ly{constructor(t,e,o,r=0,i=t.length){if(this.text=t,this.to=i,this.curLine="",this.done=!1,this.value=Uy,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Yy(t,e,o,r,i);this.re=new RegExp(e,Vy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.iter=t.iter();let n=t.lineAt(r);this.curLineStart=n.from,this.matchPos=Iy(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let o=this.curLineStart+e.index,r=o+e[0].length;if(this.matchPos=Iy(this.text,r+(o==r?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<r||o>this.value.to)&&(!this.test||this.test(o,r,e)))return this.value={from:o,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const Wy=new WeakMap;class By{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,o){let r=Wy.get(t);if(!r||r.from>=o||r.to<=e){let r=new By(e,t.sliceString(e,o));return Wy.set(t,r),r}if(r.from==e&&r.to==o)return r;let{text:i,from:n}=r;return n>e&&(i=t.sliceString(e,n)+i,n=e),r.to<o&&(i+=t.sliceString(r.to,o)),Wy.set(t,new By(n,i)),new By(e,i.slice(e-n,o-n))}}class Yy{constructor(t,e,o,r,i){this.text=t,this.to=i,this.done=!1,this.value=Uy,this.matchPos=Iy(t,r),this.re=new RegExp(e,Vy+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.flat=By.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,o=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,o,e)))return this.value={from:t,to:o,match:e},this.matchPos=Iy(this.text,o+(t==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=By.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Iy(t,e){if(e>=t.length)return e;let o,r=t.lineAt(e);for(;e<r.to&&(o=r.text.charCodeAt(e-r.from))>=56320&&o<57344;)e++;return e}function Ny(t){let e=zy("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function o(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,i=r.doc.lineAt(r.selection.main.head),[,n,a,s,l]=o,d=s?+s.slice(1):0,c=a?+a:i.number;if(a&&l){let t=c/100;n&&(t=t*("-"==n?-1:1)+i.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else a&&n&&(c=c*("-"==n?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),p=Ki.cursor(h.from+Math.max(0,Math.min(d,h.length)));t.dispatch({effects:[Gy.of(!1),uc.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:zy("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Gy.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),o())},onsubmit:t=>{t.preventDefault(),o()}},zy("label",t.state.phrase("Go to line"),": ",e)," ",zy("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Ly.prototype[Symbol.iterator]=Yy.prototype[Symbol.iterator]=function(){return this});const Gy=Pn.define(),Fy=dn.define({create:()=>!0,update(t,e){for(let o of e.effects)o.is(Gy)&&(t=o.value);return t},provide:t=>Mh.from(t,(t=>t?Ny:null))}),Hy=uc.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Ky={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Jy=en.define({combine:t=>Dn(t,Ky,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function tx(t){let e=[nx,ix];return t&&e.push(Jy.of(t)),e}const ex=vs.mark({class:"cm-selectionMatch"}),ox=vs.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function rx(t,e,o,r){return!(0!=o&&t(e.sliceDoc(o-1,o))==jn.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==jn.Word)}const ix=ml.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Jy),{state:o}=t,r=o.selection;if(r.ranges.length>1)return vs.none;let i,n=r.main,a=null;if(n.empty){if(!e.highlightWordAroundCursor)return vs.none;let t=o.wordAt(n.head);if(!t)return vs.none;a=o.charCategorizer(n.head),i=o.sliceDoc(t.from,t.to)}else{let t=n.to-n.from;if(t<e.minSelectionLength||t>200)return vs.none;if(e.wholeWords){if(i=o.sliceDoc(n.from,n.to),a=o.charCategorizer(n.head),!rx(a,o,n.from,n.to)||!function(t,e,o,r){return t(e.sliceDoc(o,o+1))==jn.Word&&t(e.sliceDoc(r-1,r))==jn.Word}(a,o,n.from,n.to))return vs.none}else if(i=o.sliceDoc(n.from,n.to),!i)return vs.none}let s=[];for(let r of t.visibleRanges){let t=new Dy(o.doc,i,r.from,r.to);for(;!t.next().done;){let{from:r,to:i}=t.value;if((!a||rx(a,o,r,i))&&(n.empty&&r<=n.from&&i>=n.to?s.push(ox.range(r,i)):(r>=n.to||i<=n.from)&&s.push(ex.range(r,i)),s.length>e.maxMatches))return vs.none}}return vs.set(s)}},{decorations:t=>t.decorations}),nx=uc.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),ax=en.define({combine:t=>Dn(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Ex(t),scrollToMatch:t=>uc.scrollIntoView(t)})});class sx{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Vy),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new mx(this):new cx(this)}getCursor(t,e=0,o){let r=t.doc?t:_n.create({doc:t});return null==o&&(o=r.doc.length),this.regexp?hx(this,r,e,o):dx(this,r,e,o)}}class lx{constructor(t){this.spec=t}}function dx(t,e,o,r){return new Dy(e.doc,t.unquoted,o,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(o,r,i,n)=>((n>o||n+i.length<r)&&(n=Math.max(0,o-2),i=t.sliceString(n,Math.min(t.length,r+2))),!(e(px(i,o-n))==jn.Word&&e(ux(i,o-n))==jn.Word||e(ux(i,r-n))==jn.Word&&e(px(i,r-n))==jn.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class cx extends lx{constructor(t){super(t)}nextMatch(t,e,o){let r=dx(this.spec,t,o,t.doc.length).nextOverlapping();if(r.done){let o=Math.min(t.doc.length,e+this.spec.unquoted.length);r=dx(this.spec,t,0,o).nextOverlapping()}return r.done||r.value.from==e&&r.value.to==o?null:r.value}prevMatchInRange(t,e,o){for(let r=o;;){let o=Math.max(e,r-1e4-this.spec.unquoted.length),i=dx(this.spec,t,o,r),n=null;for(;!i.nextOverlapping().done;)n=i.value;if(n)return n;if(o==e)return null;r-=1e4}}prevMatch(t,e,o){let r=this.prevMatchInRange(t,0,e);return r||(r=this.prevMatchInRange(t,Math.max(0,o-this.spec.unquoted.length),t.doc.length)),!r||r.from==e&&r.to==o?null:r}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let o=dx(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=dx(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function hx(t,e,o,r){return new Ly(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(i=e.charCategorizer(e.selection.main.head),(t,e,o)=>!o[0].length||(i(px(o.input,o.index))!=jn.Word||i(ux(o.input,o.index))!=jn.Word)&&(i(ux(o.input,o.index+o[0].length))!=jn.Word||i(px(o.input,o.index+o[0].length))!=jn.Word)):void 0},o,r);var i}function px(t,e){return t.slice(zi(t,e,!1),e)}function ux(t,e){return t.slice(e,zi(t,e))}class mx extends lx{nextMatch(t,e,o){let r=hx(this.spec,t,o,t.doc.length).next();return r.done&&(r=hx(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,o){for(let r=1;;r++){let i=Math.max(e,o-1e4*r),n=hx(this.spec,t,i,o),a=null;for(;!n.next().done;)a=n.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}prevMatch(t,e,o){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,((e,o)=>{if("&"==o)return t.match[0];if("$"==o)return"$";for(let e=o.length;e>0;e--){let r=+o.slice(0,e);if(r>0&&r<t.match.length)return t.match[r]+o.slice(e)}return e}))}matchAll(t,e){let o=hx(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=hx(this.spec,t,Math.max(0,e-250),Math.min(o+250,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const fx=Pn.define(),bx=Pn.define(),gx=dn.define({create:t=>new vx(Cx(t).create(),null),update(t,e){for(let o of e.effects)o.is(fx)?t=new vx(o.value.create(),t.panel):o.is(bx)&&(t=new vx(t.query,o.value?Px:null));return t},provide:t=>Mh.from(t,(t=>t.panel))});class vx{constructor(t,e){this.query=t,this.panel=e}}const Ox=vs.mark({class:"cm-searchMatch"}),yx=vs.mark({class:"cm-searchMatch cm-searchMatch-selected"}),xx=ml.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(gx))}update(t){let e=t.state.field(gx);(e!=t.startState.field(gx)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return vs.none;let{view:o}=this,r=new Yn;for(let e=0,i=o.visibleRanges,n=i.length;e<n;e++){let{from:a,to:s}=i[e];for(;e<n-1&&s>i[e+1].from-500;)s=i[++e].to;t.highlight(o.state,a,s,((t,e)=>{let i=o.state.selection.ranges.some((o=>o.from==t&&o.to==e));r.add(t,e,i?yx:Ox)}))}return r.finish()}},{decorations:t=>t.decorations});function wx(t){return e=>{let o=e.state.field(gx,!1);return o&&o.query.spec.valid?t(e,o):Tx(e)}}const kx=wx(((t,{query:e})=>{let{to:o}=t.state.selection.main,r=e.nextMatch(t.state,o,o);if(!r)return!1;let i=Ki.single(r.from,r.to),n=t.state.facet(ax);return t.dispatch({selection:i,effects:[_x(t,r),n.scrollToMatch(i.main,t)],userEvent:"select.search"}),Zx(t),!0})),qx=wx(((t,{query:e})=>{let{state:o}=t,{from:r}=o.selection.main,i=e.prevMatch(o,r,r);if(!i)return!1;let n=Ki.single(i.from,i.to),a=t.state.facet(ax);return t.dispatch({selection:n,effects:[_x(t,i),a.scrollToMatch(n.main,t)],userEvent:"select.search"}),Zx(t),!0})),Sx=wx(((t,{query:e})=>{let o=e.matchAll(t.state,1e3);return!(!o||!o.length||(t.dispatch({selection:Ki.create(o.map((t=>Ki.range(t.from,t.to)))),userEvent:"select.search.matches"}),0))})),Qx=wx(((t,{query:e})=>{let{state:o}=t,{from:r,to:i}=o.selection.main;if(o.readOnly)return!1;let n=e.nextMatch(o,r,r);if(!n)return!1;let a,s,l=n,d=[],c=[];if(l.from==r&&l.to==i&&(s=o.toText(e.getReplacement(l)),d.push({from:l.from,to:l.to,insert:s}),l=e.nextMatch(o,l.from,l.to),c.push(uc.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(r).number)+"."))),l){let e=0==d.length||d[0].from>=n.to?0:n.to-n.from-s.length;a=Ki.single(l.from-e,l.to-e),c.push(_x(t,l)),c.push(o.facet(ax).scrollToMatch(a.main,t))}return t.dispatch({changes:d,selection:a,effects:c,userEvent:"input.replace"}),!0})),$x=wx(((t,{query:e})=>{if(t.state.readOnly)return!1;let o=e.matchAll(t.state,1e9).map((t=>{let{from:o,to:r}=t;return{from:o,to:r,insert:e.getReplacement(t)}}));if(!o.length)return!1;let r=t.state.phrase("replaced $ matches",o.length)+".";return t.dispatch({changes:o,effects:uc.announce.of(r),userEvent:"input.replace.all"}),!0}));function Px(t){return t.state.facet(ax).createPanel(t)}function Cx(t,e){var o,r,i,n,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let d=t.facet(ax);return new sx({search:(null!==(o=null==e?void 0:e.literal)&&void 0!==o?o:d.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:d.caseSensitive,literal:null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:d.literal,regexp:null!==(n=null==e?void 0:e.regexp)&&void 0!==n?n:d.regexp,wholeWord:null!==(a=null==e?void 0:e.wholeWord)&&void 0!==a?a:d.wholeWord})}function Rx(t){let e=Rh(t,Px);return e&&e.dom.querySelector("[main-field]")}function Zx(t){let e=Rx(t);e&&e==t.root.activeElement&&e.select()}const Tx=t=>{let e=t.state.field(gx,!1);if(e&&e.panel){let o=Rx(t);if(o&&o!=t.root.activeElement){let r=Cx(t.state,e.query.spec);r.valid&&t.dispatch({effects:fx.of(r)}),o.focus(),o.select()}}else t.dispatch({effects:[bx.of(!0),e?fx.of(Cx(t.state,e.query.spec)):Pn.appendConfig.of(Ux)]});return!0},Ax=t=>{let e=t.state.field(gx,!1);if(!e||!e.panel)return!1;let o=Rh(t,Px);return o&&o.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:bx.of(!1)}),!0},Mx=[{key:"Mod-f",run:Tx,scope:"editor search-panel"},{key:"F3",run:kx,shift:qx,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:kx,shift:qx,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ax,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let o=t.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:r,to:i}=o.main,n=[],a=0;for(let e=new Dy(t.doc,t.sliceDoc(r,i));!e.next().done;){if(n.length>1e3)return!1;e.value.from==r&&(a=n.length),n.push(Ki.range(e.value.from,e.value.to))}return e(t.update({selection:Ki.create(n,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=Rh(t,Ny);if(!e){let o=[Gy.of(!0)];null==t.state.field(Fy,!1)&&o.push(Pn.appendConfig.of([Fy,Hy])),t.dispatch({effects:o}),e=Rh(t,Ny)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:o}=t.selection;if(o.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:o}=t,r=Ki.create(o.ranges.map((e=>t.wordAt(e.head)||Ki.cursor(e.head))),o.mainIndex);return!r.eq(o)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(o[0].from,o[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=r)))return!1;let i=function(t,e){let{main:o,ranges:r}=t.selection,i=t.wordAt(o.head),n=i&&i.from==o.from&&i.to==o.to;for(let o=!1,i=new Dy(t.doc,e,r[r.length-1].to);;){if(i.next(),!i.done){if(o&&r.some((t=>t.from==i.value.from)))continue;if(n){let e=t.wordAt(i.value.from);if(!e||e.from!=i.value.from||e.to!=i.value.to)continue}return i.value}if(o)return null;i=new Dy(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}}(t,r);return!!i&&(e(t.update({selection:t.selection.addRange(Ki.range(i.from,i.to),!1),effects:uc.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Ex{constructor(t){this.view=t;let e=this.query=t.state.field(gx).query.spec;function o(t,e,o){return zy("button",{class:"cm-button",name:t,onclick:e,type:"button"},o)}this.commit=this.commit.bind(this),this.searchField=zy("input",{value:e.search,placeholder:jx(t,"Find"),"aria-label":jx(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zy("input",{value:e.replace,placeholder:jx(t,"Replace"),"aria-label":jx(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zy("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=zy("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=zy("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=zy("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,o("next",(()=>kx(t)),[jx(t,"next")]),o("prev",(()=>qx(t)),[jx(t,"previous")]),o("select",(()=>Sx(t)),[jx(t,"all")]),zy("label",null,[this.caseField,jx(t,"match case")]),zy("label",null,[this.reField,jx(t,"regexp")]),zy("label",null,[this.wordField,jx(t,"by word")]),...t.state.readOnly?[]:[zy("br"),this.replaceField,o("replace",(()=>Qx(t)),[jx(t,"replace")]),o("replaceAll",(()=>$x(t)),[jx(t,"replace all")])],zy("button",{name:"close",onclick:()=>Ax(t),"aria-label":jx(t,"close"),type:"button"},["×"])])}commit(){let t=new sx({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:fx.of(t)}))}keydown(t){var e,o;o=t,$c(kc((e=this.view).state),o,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?qx:kx)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Qx(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(fx)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ax).top}}function jx(t,e){return t.state.phrase(e)}const zx=30,Xx=/[\s\.,:;?!]/;function _x(t,{from:e,to:o}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(o).to,n=Math.max(r.from,e-zx),a=Math.min(i,o+zx),s=t.state.sliceDoc(n,a);if(n!=r.from)for(let t=0;t<zx;t++)if(!Xx.test(s[t+1])&&Xx.test(s[t])){s=s.slice(t);break}if(a!=i)for(let t=s.length-1;t>s.length-zx;t--)if(!Xx.test(s[t-1])&&Xx.test(s[t])){s=s.slice(0,t);break}return uc.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Dx=uc.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"}}),Ux=[gx,hn.low(xx),Dx];class Vx{constructor(t,e,o){this.from=t,this.to=e,this.diagnostic=o}}class Lx{constructor(t,e,o){this.diagnostics=t,this.panel=e,this.selected=o}static init(t,e,o){let r=t,i=o.facet(tw).markerFilter;i&&(r=i(r,o));let n=t.slice().sort(((t,e)=>t.from-e.from||t.to-e.to)),a=new Yn,s=[],l=0;for(let t=0;;){let e,r,i=t==n.length?null:n[t];if(!i&&!s.length)break;for(s.length?(e=l,r=s.reduce(((t,e)=>Math.min(t,e.to)),i&&i.from>e?i.from:1e8)):(e=i.from,r=i.to,s.push(i),t++);t<n.length;){let o=n[t];if(o.from!=e||!(o.to>o.from||o.to==e)){r=Math.min(o.from,r);break}s.push(o),t++,r=Math.min(o.to,r)}let d=dw(s);if(s.some((t=>t.from==t.to||t.from==t.to-1&&o.doc.lineAt(t.from).to==t.from)))a.add(e,e,vs.widget({widget:new rw(d),diagnostics:s.slice()}));else{let t=s.reduce(((t,e)=>e.markClass?t+" "+e.markClass:t),"");a.add(e,r,vs.mark({class:"cm-lintRange cm-lintRange-"+d+t,diagnostics:s.slice(),inclusiveEnd:s.some((t=>t.to>r))}))}l=r;for(let t=0;t<s.length;t++)s[t].to<=l&&s.splice(t--,1)}let d=a.finish();return new Lx(d,e,Wx(d))}}function Wx(t,e=null,o=0){let r=null;return t.between(o,1e9,((t,o,{spec:i})=>{if(!(e&&i.diagnostics.indexOf(e)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new Vx(r.from,o,r.diagnostic)}else r=new Vx(t,o,e||i.diagnostics[0])})),r}const Bx=Pn.define(),Yx=Pn.define(),Ix=Pn.define(),Nx=dn.define({create:()=>new Lx(vs.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let o=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=Wx(o,t.selected.diagnostic,i)||Wx(o,null,i)}!o.size&&i&&e.state.facet(tw).autoPanel&&(i=null),t=new Lx(o,i,r)}for(let o of e.effects)if(o.is(Bx)){let r=e.state.facet(tw).autoPanel?o.value.length?nw.open:null:t.panel;t=Lx.init(o.value,r,e.state)}else o.is(Yx)?t=new Lx(t.diagnostics,o.value?nw.open:null,t.selected):o.is(Ix)&&(t=new Lx(t.diagnostics,t.panel,o.value));return t},provide:t=>[Mh.from(t,(t=>t.panel)),uc.decorations.from(t,(t=>t.diagnostics))]}),Gx=vs.mark({class:"cm-lintRange cm-lintRange-active"});function Fx(t,e,o){let r,{diagnostics:i}=t.state.field(Nx),n=-1,a=-1;i.between(e-(o<0?1:0),e+(o>0?1:0),((t,i,{spec:s})=>{if(e>=t&&e<=i&&(t==i||(e>t||o>0)&&(e<i||o<0)))return r=s.diagnostics,n=t,a=i,!1}));let s=t.state.facet(tw).tooltipFilter;return r&&s&&(r=s(r,t.state)),r?{pos:n,end:a,above:t.state.doc.lineAt(n).to<a,create:()=>({dom:Hx(t,r)})}:null}function Hx(t,e){return zy("ul",{class:"cm-tooltip-lint"},e.map((e=>ow(t,e,!1))))}const Kx=t=>{let e=t.state.field(Nx,!1);return!(!e||!e.panel||(t.dispatch({effects:Yx.of(!1)}),0))},Jx=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Nx,!1);var o,r;e&&e.panel||t.dispatch({effects:(o=t.state,r=[Yx.of(!0)],o.field(Nx,!1)?r:r.concat(Pn.appendConfig.of(cw)))});let i=Rh(t,nw.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Nx,!1);if(!e)return!1;let o=t.state.selection.main,r=e.diagnostics.iter(o.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==o.from&&r.to==o.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],tw=en.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},Dn(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?o=>t(o)||e(o):t:e}))});function ew(t){let e=[];if(t)t:for(let{name:o}of t){for(let t=0;t<o.length;t++){let r=o[t];if(/[a-zA-Z]/.test(r)&&!e.some((t=>t.toLowerCase()==r.toLowerCase()))){e.push(r);continue t}}e.push("")}return e}function ow(t,e,o){var r;let i=o?ew(e.actions):[];return zy("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},zy("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map(((o,r)=>{let n=!1,a=r=>{if(r.preventDefault(),n)return;n=!0;let i=Wx(t.state.field(Nx).diagnostics,e);i&&o.apply(t,i.from,i.to)},{name:s}=o,l=i[r]?s.indexOf(i[r]):-1,d=l<0?s:[s.slice(0,l),zy("u",s.slice(l,l+1)),s.slice(l+1)];return zy("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${i[r]})"`}.`},d)})),e.source&&zy("div",{class:"cm-diagnosticSource"},e.source))}class rw extends bs{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return zy("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class iw{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=ow(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nw{constructor(t){this.view=t,this.items=[],this.list=zy("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Kx(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:o}=this.items[this.selectedIndex],r=ew(o.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==e.keyCode){let e=Wx(this.view.state.field(Nx).diagnostics,o);e&&o.actions[i].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=zy("div",{class:"cm-panel-lint"},this.list,zy("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Kx(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Nx).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Nx),o=0,r=!1,i=null,n=new Set;for(t.between(0,this.view.state.doc.length,((t,a,{spec:s})=>{for(let t of s.diagnostics){if(n.has(t))continue;n.add(t);let a,s=-1;for(let e=o;e<this.items.length;e++)if(this.items[e].diagnostic==t){s=e;break}s<0?(a=new iw(this.view,t),this.items.splice(o,0,a),r=!0):(a=this.items[s],s>o&&(this.items.splice(o,s-o),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),o++}}));o<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new iw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let o=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/o:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/o)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)e();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=Wx(this.view.state.field(Nx).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Ix.of(e)})}static open(t){return new nw(t)}}function aw(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const sw=uc.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:aw("#d11")},".cm-lintRange-warning":{backgroundImage:aw("orange")},".cm-lintRange-info":{backgroundImage:aw("#999")},".cm-lintRange-hint":{backgroundImage:aw("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function lw(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function dw(t){let e="hint",o=1;for(let r of t){let t=lw(r.severity);t>o&&(o=t,e=r.severity)}return e}const cw=[Nx,uc.decorations.compute([Nx],(t=>{let{selected:e,panel:o}=t.field(Nx);return e&&o&&e.from!=e.to?vs.set([Gx.range(e.from,e.to)]):vs.none})),Qh(Fx,{hideOn:function(t,e){let o=e.pos,r=e.end||o,i=t.state.facet(tw).hideOn(t,o,r);if(null!=i)return i;let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(Bx)))&&!t.changes.touchesRange(n.from,Math.max(n.to,r)))}}),sw],hw=(()=>[ep(),ip,Jc(),bf(),Sm(),jc(),[Wc,Bc],_n.allowMultipleSelections.of(!0),_n.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let o=t.newDoc,{head:r}=t.newSelection.main,i=o.lineAt(r);if(r>i.from+200)return t;let n=o.sliceString(i.from,r);if(!e.some((t=>t.test(n))))return t;let{state:a}=t,s=-1,l=[];for(let{head:t}of a.selection.ranges){let e=a.doc.lineAt(t);if(e.from==s)continue;s=e.from;let o=Bu(a,e.from);if(null==o)continue;let r=/^\s*/.exec(e.text)[0],i=Wu(a,o);r!=i&&l.push({from:e.from,to:e.from+r.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t})),Zm(Mm,{fallback:!0}),Lm(),[RO,SO],_O(),sh(),ch(),ih,tx(),xc.of([...ZO,...Zb,...Mx,...Af,...bm,...DO,...Jx])])();var pw=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},uw=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const mw={},fw=new Map;function bw(t){return(e,o)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,o);const i=fw.get(r)||new Map;i.set(t??o,e[o]),fw.set(r,i)}}const gw=t=>{class e extends t{static{this.styles=[pi,K`
|
|
342
|
+
</form>`}}ui([ae({type:URL}),mi("design:type",Object)],fi.prototype,"apiEndpoint",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"buttonClass",void 0),ui([ae({type:Object}),mi("design:type",Object)],fi.prototype,"configData",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"formClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"rowClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"searchClass",void 0),ui([ae({type:String}),mi("design:type",Object)],fi.prototype,"theme",void 0),customElements.define("qbo-config-editor",fi);let bi=[],gi=[];function vi(t){if(t<768)return!1;for(let e=0,o=bi.length;;){let r=e+o>>1;if(t<bi[r])o=r;else{if(!(t>=gi[r]))return!0;e=r+1}if(e==o)return!1}}function Oi(t){return t>=127462&&t<=127487}function xi(t,e,o=!0,r=!0){return(o?yi:wi)(t,e,r)}function yi(t,e,o){if(e==t.length)return e;e&&qi(t.charCodeAt(e))&&Si(t.charCodeAt(e-1))&&e--;let r=ki(t,e);for(e+=Qi(r);e<t.length;){let i=ki(t,e);if(8205==r||8205==i||o&&vi(i))e+=Qi(i),r=i;else{if(!Oi(i))break;{let o=0,r=e-2;for(;r>=0&&Oi(ki(t,r));)o++,r-=2;if(o%2==0)break;e+=2}}}return e}function wi(t,e,o){for(;e>0;){let r=yi(t,e-2,o);if(r<e)return r;e--}return 0}function ki(t,e){let o=t.charCodeAt(e);if(!Si(o)||e+1==t.length)return o;let r=t.charCodeAt(e+1);return qi(r)?r-56320+(o-55296<<10)+65536:o}function qi(t){return t>=56320&&t<57344}function Si(t){return t>=55296&&t<56320}function Qi(t){return t<65536?1:2}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let e=0,o=0;e<t.length;e++)(e%2?gi:bi).push(o+=t[e])})();class $i{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,o){[t,e]=ji(this,t,e);let r=[];return this.decompose(0,t,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(e,this.length,r,1),Ci.from(r,this.length-(e-t)+o.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=ji(this,t,e);let o=[];return this.decompose(t,e,o,0),Ci.from(o,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),o=this.length-this.scanIdentical(t,-1),r=new Ti(this),i=new Ti(t);for(let t=e,n=e;;){if(r.next(t),i.next(t),t=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(n+=r.value.length,r.done||n>=o)return!0}}iter(t=1){return new Ti(this,t)}iterRange(t,e=this.length){return new Ai(this,t,e)}iterLines(t,e){let o;if(null==t)o=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;o=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Mi(o)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Pi(t):Ci.from(Pi.split(t,[])):$i.empty}}class Pi extends $i{constructor(t,e=function(t){let e=-1;for(let o of t)e+=o.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.text[i],a=r+n.length;if((e?o:a)>=t)return new Ei(r,a,o,n);r=a+1,o++}}decompose(t,e,o,r){let i=t<=0&&e>=this.length?this:new Pi(Zi(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=o.pop(),e=Ri(i.text,t.text.slice(),0,i.length);if(e.length<=32)o.push(new Pi(e,t.length+i.length));else{let t=e.length>>1;o.push(new Pi(e.slice(0,t)),new Pi(e.slice(t)))}}else o.push(i)}replace(t,e,o){if(!(o instanceof Pi))return super.replace(t,e,o);[t,e]=ji(this,t,e);let r=Ri(this.text,Ri(o.text,Zi(this.text,0,t)),e),i=this.length+o.length-(e-t);return r.length<=32?new Pi(r,i):Ci.from(Pi.split(r,[]),i)}sliceString(t,e=this.length,o="\n"){[t,e]=ji(this,t,e);let r="";for(let i=0,n=0;i<=e&&n<this.text.length;n++){let a=this.text[n],s=i+a.length;i>t&&n&&(r+=o),t<s&&e>i&&(r+=a.slice(Math.max(0,t-i),e-i)),i=s+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let o=[],r=-1;for(let i of t)o.push(i),r+=i.length+1,32==o.length&&(e.push(new Pi(o,r)),o=[],r=-1);return r>-1&&e.push(new Pi(o,r)),e}}class Ci extends $i{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,o,r){for(let i=0;;i++){let n=this.children[i],a=r+n.length,s=o+n.lines-1;if((e?s:a)>=t)return n.lineInner(t,e,o,r);r=a+1,o=s+1}}decompose(t,e,o,r){for(let i=0,n=0;n<=e&&i<this.children.length;i++){let a=this.children[i],s=n+a.length;if(t<=s&&e>=n){let i=r&((n<=t?1:0)|(s>=e?2:0));n>=t&&s<=e&&!i?o.push(a):a.decompose(t-n,e-n,o,i)}n=s+1}}replace(t,e,o){if([t,e]=ji(this,t,e),o.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let n=this.children[r],a=i+n.length;if(t>=i&&e<=a){let s=n.replace(t-i,e-i,o),l=this.lines-n.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let i=this.children.slice();return i[r]=s,new Ci(i,this.length-(e-t)+o.length)}return super.replace(i,a,s)}i=a+1}return super.replace(t,e,o)}sliceString(t,e=this.length,o="\n"){[t,e]=ji(this,t,e);let r="";for(let i=0,n=0;i<this.children.length&&n<=e;i++){let a=this.children[i],s=n+a.length;n>t&&i&&(r+=o),t<s&&e>n&&(r+=a.sliceString(t-n,e-n,o)),n=s+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Ci))return 0;let o=0,[r,i,n,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,i+=e){if(r==n||i==a)return o;let s=this.children[r],l=t.children[i];if(s!=l)return o+s.scanIdentical(l,e);o+=s.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let o=0;for(let e of t)o+=e.lines;if(o<32){let o=[];for(let e of t)e.flatten(o);return new Pi(o,e)}let r=Math.max(32,o>>5),i=r<<1,n=r>>1,a=[],s=0,l=-1,d=[];function c(t){let e;if(t.lines>i&&t instanceof Ci)for(let e of t.children)c(e);else t.lines>n&&(s>n||!s)?(h(),a.push(t)):t instanceof Pi&&s&&(e=d[d.length-1])instanceof Pi&&t.lines+e.lines<=32?(s+=t.lines,l+=t.length+1,d[d.length-1]=new Pi(e.text.concat(t.text),e.length+1+t.length)):(s+t.lines>r&&h(),s+=t.lines,l+=t.length+1,d.push(t))}function h(){0!=s&&(a.push(1==d.length?d[0]:Ci.from(d,l)),l=-1,s=d.length=0)}for(let e of t)c(e);return h(),1==a.length?a[0]:new Ci(a,e)}}function Ri(t,e,o=0,r=1e9){for(let i=0,n=0,a=!0;n<t.length&&i<=r;n++){let s=t[n],l=i+s.length;l>=o&&(l>r&&(s=s.slice(0,r-i)),i<o&&(s=s.slice(o-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function Zi(t,e,o){return Ri(t,[""],e,o)}$i.empty=new Pi([""],0);class Ti{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Pi?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],i=this.offsets[o],n=i>>1,a=r instanceof Pi?r.text.length:r.children.length;if(n==(e>0?a:0)){if(0==o)return this.done=!0,this.value="",this;e>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[o]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof Pi){let i=r.text[n+(e<0?-1:0)];if(this.offsets[o]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=r.children[n+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[o]+=e):(e<0&&this.offsets[o]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof Pi?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class Ai{constructor(t,e,o){this.value="",this.done=!1,this.cursor=new Ti(t,e>o?-1:1),this.pos=e>o?t.length:0,this.from=Math.min(e,o),this.to=Math.max(e,o)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let o=e<0?this.pos-this.from:this.to-this.pos;t>o&&(t=o),o-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=o?r:e<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Mi{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:o,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&($i.prototype[Symbol.iterator]=function(){return this.iter()},Ti.prototype[Symbol.iterator]=Ai.prototype[Symbol.iterator]=Mi.prototype[Symbol.iterator]=function(){return this});class Ei{constructor(t,e,o,r){this.from=t,this.to=e,this.number=o,this.text=r}get length(){return this.to-this.from}}function ji(t,e,o){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,o))]}function zi(t,e,o=!0,r=!0){return xi(t,e,o,r)}function Xi(t,e){let o=t.charCodeAt(e);if(!((r=o)>=55296&&r<56320&&e+1!=t.length))return o;var r;let i=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(i)?i-56320+(o-55296<<10)+65536:o}function _i(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Di(t){return t<65536?1:2}const Ui=/\r\n?|\n/;var Vi=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Vi||(Vi={}));class Li{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e+1];t+=o<0?this.sections[e]:o}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,o=0,r=0;e<this.sections.length;){let i=this.sections[e++],n=this.sections[e++];n<0?(t(o,r,i),r+=i):r+=n,o+=i}}iterChangedRanges(t,e=!1){Ii(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];r<0?t.push(o,r):t.push(r,o)}return new Li(t)}composeDesc(t){return this.empty?t:t.empty?this:Gi(this,t)}mapDesc(t,e=!1){return t.empty?this:Ni(this,t,e)}mapPos(t,e=-1,o=Vi.Simple){let r=0,i=0;for(let n=0;n<this.sections.length;){let a=this.sections[n++],s=this.sections[n++],l=r+a;if(s<0){if(l>t)return i+(t-r);i+=a}else{if(o!=Vi.Simple&&l>=t&&(o==Vi.TrackDel&&r<t&&l>t||o==Vi.TrackBefore&&r<t||o==Vi.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!a)return t==r||e<0?i:i+s;i+=s}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return i}touchesRange(t,e=t){for(let o=0,r=0;o<this.sections.length&&r<=e;){let i=r+this.sections[o++];if(this.sections[o++]>=0&&r<=e&&i>=t)return!(r<t&&i>e)||"cover";r=i}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let o=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+o+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Li(t)}static create(t){return new Li(t)}}class Wi extends Li{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Ii(this,((e,o,r,i,n)=>t=t.replace(r,r+(o-e),n)),!1),t}mapDesc(t,e=!1){return Ni(this,t,e,!0)}invert(t){let e=this.sections.slice(),o=[];for(let r=0,i=0;r<e.length;r+=2){let n=e[r],a=e[r+1];if(a>=0){e[r]=a,e[r+1]=n;let s=r>>1;for(;o.length<s;)o.push($i.empty);o.push(n?t.slice(i,i+n):$i.empty)}i+=n}return new Wi(e,o)}compose(t){return this.empty?t:t.empty?this:Gi(this,t,!0)}map(t,e=!1){return t.empty?this:Ni(this,t,e,!0)}iterChanges(t,e=!1){Ii(this,t,e)}get desc(){return Li.create(this.sections)}filter(t){let e=[],o=[],r=[],i=new Fi(this);t:for(let n=0,a=0;;){let s=n==t.length?1e9:t[n++];for(;a<s||a==s&&0==i.len;){if(i.done)break t;let t=Math.min(i.len,s-a);Bi(r,t,-1);let n=-1==i.ins?-1:0==i.off?i.ins:0;Bi(e,t,n),n>0&&Yi(o,e,i.text),i.forward(t),a+=t}let l=t[n++];for(;a<l;){if(i.done)break t;let t=Math.min(i.len,l-a);Bi(e,t,-1),Bi(r,t,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(t),a+=t}}return{changes:new Wi(e,o),filtered:Li.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let o=this.sections[e],r=this.sections[e+1];r<0?t.push(o):0==r?t.push([o]):t.push([o].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,o){let r=[],i=[],n=0,a=null;function s(t=!1){if(!t&&!r.length)return;n<e&&Bi(r,e-n,-1);let o=new Wi(r,i);a=a?a.compose(o.map(a)):o,r=[],i=[],n=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof Wi){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:t,to:a=t,insert:d}=l;if(t>a||t<0||a>e)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let c=d?"string"==typeof d?$i.of(d.split(o||Ui)):d:$i.empty,h=c.length;if(t==a&&0==h)return;t<n&&s(),t>n&&Bi(r,t-n,-1),Bi(r,a-t,h),Yi(i,r,c),n=a}}(t),s(!a),a}static empty(t){return new Wi(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],o=[];for(let r=0;r<t.length;r++){let i=t[r];if("number"==typeof i)e.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)e.push(i[0],0);else{for(;o.length<r;)o.push($i.empty);o[r]=$i.of(i.slice(1)),e.push(i[0],o[r].length)}}}return new Wi(e,o)}static createSet(t,e){return new Wi(t,e)}}function Bi(t,e,o,r=!1){if(0==e&&o<=0)return;let i=t.length-2;i>=0&&o<=0&&o==t[i+1]?t[i]+=e:i>=0&&0==e&&0==t[i]?t[i+1]+=o:r?(t[i]+=e,t[i+1]+=o):t.push(e,o)}function Yi(t,e,o){if(0==o.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(o);else{for(;t.length<r;)t.push($i.empty);t.push(o)}}function Ii(t,e,o){let r=t.inserted;for(let i=0,n=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,n+=s;else{let d=i,c=n,h=$i.empty;for(;d+=s,c+=l,l&&r&&(h=h.append(r[a-2>>1])),!(o||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,d,n,c,h),i=d,n=c}}}function Ni(t,e,o,r=!1){let i=[],n=r?[]:null,a=new Fi(t),s=new Fi(e);for(let t=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let t=Math.min(a.len,s.len);Bi(i,t,-1),a.forward(t),s.forward(t)}else if(s.ins>=0&&(a.ins<0||t==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!o))){let e=s.len;for(Bi(i,s.ins,-1);e;){let o=Math.min(a.len,e);a.ins>=0&&t<a.i&&a.len<=o&&(Bi(i,0,a.ins),n&&Yi(n,i,a.text),t=a.i),a.forward(o),e-=o}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return n?Wi.createSet(i,n):Li.create(i);throw new Error("Mismatched change set lengths")}{let e=0,o=a.len;for(;o;)if(-1==s.ins){let t=Math.min(o,s.len);e+=t,o-=t,s.forward(t)}else{if(!(0==s.ins&&s.len<o))break;o-=s.len,s.next()}Bi(i,e,t<a.i?a.ins:0),n&&t<a.i&&Yi(n,i,a.text),t=a.i,a.forward(a.len-o)}}}}function Gi(t,e,o=!1){let r=[],i=o?[]:null,n=new Fi(t),a=new Fi(e);for(let t=!1;;){if(n.done&&a.done)return i?Wi.createSet(r,i):Li.create(r);if(0==n.ins)Bi(r,n.len,0,t),n.next();else if(0!=a.len||a.done){if(n.done||a.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,a.len),o=r.length;if(-1==n.ins){let o=-1==a.ins?-1:a.off?0:a.ins;Bi(r,e,o,t),i&&o&&Yi(i,r,a.text)}else-1==a.ins?(Bi(r,n.off?0:n.len,e,t),i&&Yi(i,r,n.textBit(e))):(Bi(r,n.off?0:n.len,a.off?0:a.ins,t),i&&!a.off&&Yi(i,r,a.text));t=(n.ins>e||a.ins>=0&&a.len>e)&&(t||r.length>o),n.forward2(e),a.forward(e)}}else Bi(r,0,a.ins,t),i&&Yi(i,r,a.text),a.next()}}class Fi{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?$i.empty:t[e]}textBit(t){let{inserted:e}=this.set,o=this.i-2>>1;return o>=e.length&&!t?$i.empty:e[o].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Hi{constructor(t,e,o){this.from=t,this.to=e,this.flags=o}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let o,r;return this.empty?o=r=t.mapPos(this.from,e):(o=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new Hi(o,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return Ki.range(t,e);let o=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return Ki.range(this.anchor,o)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Ki.range(t.anchor,t.head)}static create(t,e,o){return new Hi(t,e,o)}}class Ki{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:Ki.create(this.ranges.map((o=>o.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(t.ranges[o],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new Ki([this.main],0)}addRange(t,e=!0){return Ki.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let o=this.ranges.slice();return o[e]=t,Ki.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ki(t.ranges.map((t=>Hi.fromJSON(t))),t.main)}static single(t,e=t){return new Ki([Ki.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<t.length;r++){let i=t[r];if(i.empty?i.from<=o:i.from<o)return Ki.normalized(t.slice(),e);o=i.to}return new Ki(t,e)}static cursor(t,e=0,o,r){return Hi.create(t,t,(0==e?0:e<0?8:16)|(null==o?7:Math.min(6,o))|(null!=r?r:16777215)<<6)}static range(t,e,o,r){let i=(null!=o?o:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?Hi.create(e,t,48|i):Hi.create(t,e,(e>t?8:0)|i)}static normalized(t,e=0){let o=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(o);for(let o=1;o<t.length;o++){let r=t[o],i=t[o-1];if(r.empty?r.from<=i.to:r.from<i.to){let n=i.from,a=Math.max(r.to,i.to);o<=e&&e--,t.splice(--o,2,r.anchor>r.head?Ki.range(a,n):Ki.range(n,a))}}return new Ki(t,e)}}function Ji(t,e){for(let o of t.ranges)if(o.to>e)throw new RangeError("Selection points outside of document")}let tn=0;class en{constructor(t,e,o,r,i){this.combine=t,this.compareInput=e,this.compare=o,this.isStatic=r,this.id=tn++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new en(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:on),!!t.static,t.enables)}of(t){return new rn([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new rn(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new rn(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(o=>e(o.field(t))))}}function on(t,e){return t==e||t.length==e.length&&t.every(((t,o)=>t===e[o]))}class rn{constructor(t,e,o,r){this.dependencies=t,this.facet=e,this.type=o,this.value=r,this.id=tn++}dynamicSlot(t){var e;let o=this.value,r=this.facet.compareInput,i=this.id,n=t[i]>>1,a=2==this.type,s=!1,l=!1,d=[];for(let o of this.dependencies)"doc"==o?s=!0:"selection"==o?l=!0:1&(null!==(e=t[o.id])&&void 0!==e?e:1)||d.push(t[o.id]);return{create:t=>(t.values[n]=o(t),1),update(t,e){if(s&&e.docChanged||l&&(e.docChanged||e.selection)||an(t,d)){let e=o(t);if(a?!nn(e,t.values[n],r):!r(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let s,l=e.config.address[i];if(null!=l){let i=gn(e,l);if(this.dependencies.every((o=>o instanceof en?e.facet(o)===t.facet(o):!(o instanceof dn)||e.field(o,!1)==t.field(o,!1)))||(a?nn(s=o(t),i,r):r(s=o(t),i)))return t.values[n]=i,0}else s=o(t);return t.values[n]=s,1}}}}function nn(t,e,o){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1;return!0}function an(t,e){let o=!1;for(let r of e)1&bn(t,r)&&(o=!0);return o}function sn(t,e,o){let r=o.map((e=>t[e.id])),i=o.map((t=>t.type)),n=r.filter((t=>!(1&t))),a=t[e.id]>>1;function s(t){let o=[];for(let e=0;e<r.length;e++){let n=gn(t,r[e]);if(2==i[e])for(let t of n)o.push(t);else o.push(n)}return e.combine(o)}return{create(t){for(let e of r)bn(t,e);return t.values[a]=s(t),1},update(t,o){if(!an(t,n))return 0;let r=s(t);return e.compare(r,t.values[a])?0:(t.values[a]=r,1)},reconfigure(t,i){let n=an(t,r),l=i.config.facets[e.id],d=i.facet(e);if(l&&!n&&on(o,l))return t.values[a]=d,0;let c=s(t);return e.compare(c,d)?(t.values[a]=d,0):(t.values[a]=c,1)}}}const ln=en.define({static:!0});class dn{constructor(t,e,o,r,i){this.id=t,this.createF=e,this.updateF=o,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let e=new dn(tn++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ln).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,o)=>{let r=t.values[e],i=this.updateF(r,o);return this.compareF(r,i)?0:(t.values[e]=i,1)},reconfigure:(t,o)=>{let r,i=t.facet(ln),n=o.facet(ln);return(r=i.find((t=>t.field==this)))&&r!=n.find((t=>t.field==this))?(t.values[e]=r.create(t),1):null!=o.config.address[this.id]?(t.values[e]=o.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,ln.of({field:this,create:t})]}get extension(){return this}}function cn(t){return e=>new pn(e,t)}const hn={highest:cn(0),high:cn(1),default:cn(2),low:cn(3),lowest:cn(4)};class pn{constructor(t,e){this.inner=t,this.prec=e}}class un{of(t){return new mn(this,t)}reconfigure(t){return un.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class mn{constructor(t,e){this.compartment=t,this.inner=e}}class fn{constructor(t,e,o,r,i,n){for(this.base=t,this.compartments=e,this.dynamicSlots=o,this.address=r,this.staticValues=i,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,o){let r=[],i=Object.create(null),n=new Map;for(let o of function(t,e,o){let r=[[],[],[],[],[]],i=new Map;return function t(n,a){let s=i.get(n);if(null!=s){if(s<=a)return;let t=r[s].indexOf(n);t>-1&&r[s].splice(t,1),n instanceof mn&&o.delete(n.compartment)}if(i.set(n,a),Array.isArray(n))for(let e of n)t(e,a);else if(n instanceof mn){if(o.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(n.compartment)||n.inner;o.set(n.compartment,r),t(r,a)}else if(n instanceof pn)t(n.inner,n.prec);else if(n instanceof dn)r[a].push(n),n.provides&&t(n.provides,a);else if(n instanceof rn)r[a].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,a)}}(t,2),r.reduce(((t,e)=>t.concat(e)))}(t,e,n))o instanceof dn?r.push(o):(i[o.facet.id]||(i[o.facet.id]=[])).push(o);let a=Object.create(null),s=[],l=[];for(let t of r)a[t.id]=l.length<<1,l.push((e=>t.slot(e)));let d=null==o?void 0:o.config.facets;for(let t in i){let e=i[t],r=e[0].facet,n=d&&d[t]||[];if(e.every((t=>0==t.type)))if(a[r.id]=s.length<<1|1,on(n,e))s.push(o.facet(r));else{let t=r.combine(e.map((t=>t.value)));s.push(o&&r.compare(t,o.facet(r))?o.facet(r):t)}else{for(let t of e)0==t.type?(a[t.id]=s.length<<1|1,s.push(t.value)):(a[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));a[r.id]=l.length<<1,l.push((t=>sn(t,r,e)))}}let c=l.map((t=>t(a)));return new fn(t,n,c,a,s,i)}}function bn(t,e){if(1&e)return 2;let o=e>>1,r=t.status[o];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[o]=4;let i=t.computeSlot(t,t.config.dynamicSlots[o]);return t.status[o]=2|i}function gn(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const vn=en.define(),On=en.define({combine:t=>t.some((t=>t)),static:!0}),xn=en.define({combine:t=>t.length?t[0]:void 0,static:!0}),yn=en.define(),wn=en.define(),kn=en.define(),qn=en.define({combine:t=>!!t.length&&t[0]});class Sn{constructor(t,e){this.type=t,this.value=e}static define(){return new Qn}}class Qn{of(t){return new Sn(this,t)}}class $n{constructor(t){this.map=t}of(t){return new Pn(this,t)}}class Pn{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Pn(this.type,e)}is(t){return this.type==t}static define(t={}){return new $n(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let o=[];for(let r of t){let t=r.map(e);t&&o.push(t)}return o}}Pn.reconfigure=Pn.define(),Pn.appendConfig=Pn.define();class Cn{constructor(t,e,o,r,i,n){this.startState=t,this.changes=e,this.selection=o,this.effects=r,this.annotations=i,this.scrollIntoView=n,this._doc=null,this._state=null,o&&Ji(o,e.newLength),i.some((t=>t.type==Cn.time))||(this.annotations=i.concat(Cn.time.of(Date.now())))}static create(t,e,o,r,i,n){return new Cn(t,e,o,r,i,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(Cn.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Rn(t,e){let o=[];for(let r=0,i=0;;){let n,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))n=t[r++],a=t[r++];else{if(!(i<e.length))return o;n=e[i++],a=e[i++]}!o.length||o[o.length-1]<n?o.push(n,a):o[o.length-1]<a&&(o[o.length-1]=a)}}function Zn(t,e,o){var r;let i,n,a;return o?(i=e.changes,n=Wi.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(n):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:Pn.mapEffects(t.effects,i).concat(Pn.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Tn(t,e,o){let r=e.selection,i=En(e.annotations);return e.userEvent&&(i=i.concat(Cn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Wi?e.changes:Wi.of(e.changes||[],o,t.facet(xn)),selection:r&&(r instanceof Ki?r:Ki.single(r.anchor,r.head)),effects:En(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function An(t,e,o){let r=Tn(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(o=!1);for(let i=1;i<e.length;i++){!1===e[i].filter&&(o=!1);let n=!!e[i].sequential;r=Zn(r,Tn(t,e[i],n?r.changes.newLength:t.doc.length),n)}let i=Cn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,o=e.facet(kn),r=t;for(let i=o.length-1;i>=0;i--){let n=o[i](t);n&&Object.keys(n).length&&(r=Zn(r,Tn(e,n,t.changes.newLength),!0))}return r==t?t:Cn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(o?function(t){let e=t.startState,o=!0;for(let r of e.facet(yn)){let e=r(t);if(!1===e){o=!1;break}Array.isArray(e)&&(o=!0===o?e:Rn(o,e))}if(!0!==o){let r,i;if(!1===o)i=t.changes.invertedDesc,r=Wi.empty(e.doc.length);else{let e=t.changes.filter(o);r=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=Cn.create(e,r,t.selection&&t.selection.map(i),Pn.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(wn);for(let o=r.length-1;o>=0;o--){let i=r[o](t);t=i instanceof Cn?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Cn?i[0]:An(e,En(i),!1)}return t}(i):i)}Cn.time=Sn.define(),Cn.userEvent=Sn.define(),Cn.addToHistory=Sn.define(),Cn.remote=Sn.define();const Mn=[];function En(t){return null==t?Mn:Array.isArray(t)?t:[t]}var jn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(jn||(jn={}));const zn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xn;try{Xn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Zt){}class _n{constructor(t,e,o,r,i,n){this.config=t,this.doc=e,this.selection=o,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=i,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)bn(this,t<<1);this.computeSlot=null}field(t,e=!0){let o=this.config.address[t.id];if(null!=o)return bn(this,o),gn(this,o);if(e)throw new RangeError("Field is not present in this state")}update(...t){return An(this,t,!0)}applyTransaction(t){let e,o=this.config,{base:r,compartments:i}=o;for(let e of t.effects)e.is(un.reconfigure)?(o&&(i=new Map,o.compartments.forEach(((t,e)=>i.set(e,t))),o=null),i.set(e.value.compartment,e.value.extension)):e.is(Pn.reconfigure)?(o=null,r=e.value):e.is(Pn.appendConfig)&&(o=null,r=En(r).concat(e.value));o?e=t.startState.values.slice():(o=fn.resolve(r,i,this),e=new _n(o,this.doc,this.selection,o.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let n=t.startState.facet(On)?t.newSelection:t.newSelection.asSingle();new _n(o,t.newDoc,n,e,((e,o)=>o.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:Ki.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,o=t(e.ranges[0]),r=this.changes(o.changes),i=[o.range],n=En(o.effects);for(let o=1;o<e.ranges.length;o++){let a=t(e.ranges[o]),s=this.changes(a.changes),l=s.map(r);for(let t=0;t<o;t++)i[t]=i[t].map(l);let d=r.mapDesc(s,!0);i.push(a.range.map(d)),r=r.compose(l),n=Pn.mapEffects(n,l).concat(Pn.mapEffects(En(a.effects),d))}return{changes:r,selection:Ki.create(i,e.mainIndex),effects:n}}changes(t=[]){return t instanceof Wi?t:Wi.of(t,this.doc.length,this.facet(_n.lineSeparator))}toText(t){return $i.of(t.split(this.facet(_n.lineSeparator)||Ui))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(bn(this,e),gn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let o in t){let r=t[o];r instanceof dn&&null!=this.config.address[r.id]&&(e[o]=r.spec.toJSON(this.field(t[o]),this))}return e}static fromJSON(t,e={},o){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o)for(let e in o)if(Object.prototype.hasOwnProperty.call(t,e)){let i=o[e],n=t[e];r.push(i.init((t=>i.spec.fromJSON(n,t))))}return _n.create({doc:t.doc,selection:Ki.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=fn.resolve(t.extensions||[],new Map),o=t.doc instanceof $i?t.doc:$i.of((t.doc||"").split(e.staticFacet(_n.lineSeparator)||Ui)),r=t.selection?t.selection instanceof Ki?t.selection:Ki.single(t.selection.anchor,t.selection.head):Ki.single(0);return Ji(r,o.length),e.staticFacet(On)||(r=r.asSingle()),new _n(e,o,r,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(_n.tabSize)}get lineBreak(){return this.facet(_n.lineSeparator)||"\n"}get readOnly(){return this.facet(qn)}phrase(t,...e){for(let e of this.facet(_n.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,o)=>{if("$"==o)return"$";let r=+(o||1);return!r||r>e.length?t:e[r-1]}))),t}languageDataAt(t,e,o=-1){let r=[];for(let i of this.facet(vn))for(let n of i(this,e,o))Object.prototype.hasOwnProperty.call(n,t)&&r.push(n[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return jn.Space;if(function(t){if(Xn)return Xn.test(t);for(let e=0;e<t.length;e++){let o=t[e];if(/\w/.test(o)||o>""&&(o.toUpperCase()!=o.toLowerCase()||zn.test(o)))return!0}return!1}(t))return jn.Word;for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return jn.Word;return jn.Other};var e}wordAt(t){let{text:e,from:o,length:r}=this.doc.lineAt(t),i=this.charCategorizer(t),n=t-o,a=t-o;for(;n>0;){let t=zi(e,n,!1);if(i(e.slice(t,n))!=jn.Word)break;n=t}for(;a<r;){let t=zi(e,a);if(i(e.slice(a,t))!=jn.Word)break;a=t}return n==a?null:Ki.range(n+o,a+o)}}function Dn(t,e,o={}){let r={};for(let e of t)for(let t of Object.keys(e)){let i=e[t],n=r[t];if(void 0===n)r[t]=i;else if(n===i||void 0===i);else{if(!Object.hasOwnProperty.call(o,t))throw new Error("Config merge conflict for field "+t);r[t]=o[t](n,i)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}_n.allowMultipleSelections=On,_n.tabSize=en.define({combine:t=>t.length?t[0]:4}),_n.lineSeparator=xn,_n.readOnly=qn,_n.phrases=en.define({compare(t,e){let o=Object.keys(t),r=Object.keys(e);return o.length==r.length&&o.every((o=>t[o]==e[o]))}}),_n.languageData=vn,_n.changeFilter=yn,_n.transactionFilter=wn,_n.transactionExtender=kn,un.reconfigure=Pn.define();class Un{eq(t){return this==t}range(t,e=t){return Vn.create(t,e,this)}}Un.prototype.startSide=Un.prototype.endSide=0,Un.prototype.point=!1,Un.prototype.mapMode=Vi.TrackDel;class Vn{constructor(t,e,o){this.from=t,this.to=e,this.value=o}static create(t,e,o){return new Vn(t,e,o)}}function Ln(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Wn{constructor(t,e,o,r){this.from=t,this.to=e,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,o,r=0){let i=o?this.to:this.from;for(let n=r,a=i.length;;){if(n==a)return n;let r=n+a>>1,s=i[r]-t||(o?this.value[r].endSide:this.value[r].startSide)-e;if(r==n)return s>=0?n:a;s>=0?a=r:n=r+1}}between(t,e,o,r){for(let i=this.findIndex(e,-1e9,!0),n=this.findIndex(o,1e9,!1,i);i<n;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}map(t,e){let o=[],r=[],i=[],n=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,d,c=this.value[s],h=this.from[s]+t,p=this.to[s]+t;if(h==p){let t=e.mapPos(h,c.startSide,c.mapMode);if(null==t)continue;if(l=d=t,c.startSide!=c.endSide&&(d=e.mapPos(h,c.endSide),d<l))continue}else if(l=e.mapPos(h,c.startSide),d=e.mapPos(p,c.endSide),l>d||l==d&&c.startSide>0&&c.endSide<=0)continue;(d-l||c.endSide-c.startSide)<0||(n<0&&(n=l),c.point&&(a=Math.max(a,d-l)),o.push(c),r.push(l-n),i.push(d-n))}return{mapped:o.length?new Wn(r,i,o,a):null,pos:n}}}class Bn{constructor(t,e,o,r){this.chunkPos=t,this.chunk=e,this.nextLayer=o,this.maxPoint=r}static create(t,e,o,r){return new Bn(t,e,o,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:o=!1,filterFrom:r=0,filterTo:i=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(o&&(e=e.slice().sort(Ln)),this.isEmpty)return e.length?Bn.of(e):this;let a=new Nn(this,null,-1).goto(0),s=0,l=[],d=new Yn;for(;a.value||s<e.length;)if(s<e.length&&(a.from-e[s].from||a.startSide-e[s].value.startSide)>=0){let t=e[s++];d.addInner(t.from,t.to,t.value)||l.push(t)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==e.length||this.chunkEnd(a.chunkIndex)<e[s].from)&&(!n||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&d.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!n||r>a.to||i<a.from||n(a.from,a.to,a.value))&&(d.addInner(a.from,a.to,a.value)||l.push(Vn.create(a.from,a.to,a.value))),a.next());return d.finishInner(this.nextLayer.isEmpty&&!l.length?Bn.empty:this.nextLayer.update({add:l,filter:n,filterFrom:r,filterTo:i}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],o=[],r=-1;for(let i=0;i<this.chunk.length;i++){let n=this.chunkPos[i],a=this.chunk[i],s=t.touchesRange(n,n+a.length);if(!1===s)r=Math.max(r,a.maxPoint),e.push(a),o.push(t.mapPos(n));else if(!0===s){let{mapped:i,pos:s}=a.map(n,t);i&&(r=Math.max(r,i.maxPoint),e.push(i),o.push(s))}}let i=this.nextLayer.map(t);return 0==e.length?i:new Bn(o,e,i||Bn.empty,r)}between(t,e,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],n=this.chunk[r];if(e>=i&&t<=i+n.length&&!1===n.between(i,t-i,e-i,o))return}this.nextLayer.between(t,e,o)}}iter(t=0){return Gn.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Gn.from(t).goto(e)}static compare(t,e,o,r,i=-1){let n=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),a=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),s=In(n,a,o),l=new Hn(n,s,i),d=new Hn(a,s,i);o.iterGaps(((t,e,o)=>Kn(l,t,d,e,o,r))),o.empty&&0==o.length&&Kn(l,0,d,0,0,r)}static eq(t,e,o=0,r){null==r&&(r=999999999);let i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),n=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(i.length!=n.length)return!1;if(!i.length)return!0;let a=In(i,n),s=new Hn(i,a,0).goto(o),l=new Hn(n,a,0).goto(o);for(;;){if(s.to!=l.to||!Jn(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(t,e,o,r,i=-1){let n=new Hn(t,null,i).goto(e),a=e,s=n.openStart;for(;;){let t=Math.min(n.to,o);if(n.point){let o=n.activeForPoint(n.to),i=n.pointFrom<e?o.length+1:n.point.startSide<0?o.length:Math.min(o.length,s);r.point(a,t,n.point,o,i,n.pointRank),s=Math.min(n.openEnd(t),o.length)}else t>a&&(r.span(a,t,n.active,s),s=n.openEnd(t));if(n.to>o)return s+(n.point&&n.to>o?1:0);a=n.to,n.next()}}static of(t,e=!1){let o=new Yn;for(let r of t instanceof Vn?[t]:e?function(t){if(t.length>1)for(let e=t[0],o=1;o<t.length;o++){let r=t[o];if(Ln(e,r)>0)return t.slice().sort(Ln);e=r}return t}(t):t)o.add(r.from,r.to,r.value);return o.finish()}static join(t){if(!t.length)return Bn.empty;let e=t[t.length-1];for(let o=t.length-2;o>=0;o--)for(let r=t[o];r!=Bn.empty;r=r.nextLayer)e=new Bn(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}Bn.empty=new Bn([],[],null,-1),Bn.empty.nextLayer=Bn.empty;class Yn{finishChunk(t){this.chunks.push(new Wn(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,t&&(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(t,e,o){this.addInner(t,e,o)||(this.nextLayer||(this.nextLayer=new Yn)).add(t,e,o)}addInner(t,e,o){let r=t-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=o,this.lastFrom=t,this.lastTo=e,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let o=e.value.length-1;return this.last=e.value[o],this.lastFrom=e.from[o]+t,this.lastTo=e.to[o]+t,!0}finish(){return this.finishInner(Bn.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Bn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function In(t,e,o){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let i=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=r.get(t.chunk[e]);null==n||(o?o.mapPos(n):n)!=t.chunkPos[e]||(null==o?void 0:o.touchesRange(n,n+t.chunk[e].length))||i.add(t.chunk[e])}return i}class Nn{constructor(t,e,o,r=0){this.layer=t,this.skip=e,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,o){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],o=t+e.from[this.rangeIndex];if(this.from=o,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==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=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Gn{constructor(t){this.heap=t}static from(t,e=null,o=-1){let r=[];for(let i=0;i<t.length;i++)for(let n=t[i];!n.isEmpty;n=n.nextLayer)n.maxPoint>=o&&r.push(new Nn(n,e,o,i));return 1==r.length?r[0]:new Gn(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let o of this.heap)o.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Fn(this.heap,t);return this.next(),this}forward(t,e){for(let o of this.heap)o.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Fn(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Fn(this.heap,0)}}}function Fn(t,e){for(let o=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),o.compare(i)<0)break;t[r]=o,t[e]=i,e=r}}class Hn{constructor(t,e,o){this.minPoint=o,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=Gn.from(t,e,o)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){ta(this.active,t),ta(this.activeTo,t),ta(this.activeRank,t),this.minActive=oa(this.active,this.activeTo)}addActive(t){let e=0,{value:o,to:r,rank:i}=this.cursor;for(;e<this.activeRank.length&&(i-this.activeRank[e]||r-this.activeTo[e])>0;)e++;ea(this.active,e,o),ea(this.activeTo,e,r),ea(this.activeRank,e,i),t&&ea(t,e,this.cursor.from),this.minActive=oa(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let o=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]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&ta(o,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(o),this.cursor.next()}}}if(o){this.openStart=0;for(let e=o.length-1;e>=0&&o[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>t||this.activeTo[o]==t&&this.active[o].endSide>=this.point.endSide)&&e.push(this.active[o]);return e.reverse()}openEnd(t){let e=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>t;o--)e++;return e}}function Kn(t,e,o,r,i,n){t.goto(e),o.goto(r);let a=r+i,s=r,l=r-e;for(;;){let e=t.to+l-o.to,r=e||t.endSide-o.endSide,i=r<0?t.to+l:o.to,d=Math.min(i,a);if(t.point||o.point?t.point&&o.point&&(t.point==o.point||t.point.eq(o.point))&&Jn(t.activeForPoint(t.to),o.activeForPoint(o.to))||n.comparePoint(s,d,t.point,o.point):d>s&&!Jn(t.active,o.active)&&n.compareRange(s,d,t.active,o.active),i>a)break;(e||t.openEnd!=o.openEnd)&&n.boundChange&&n.boundChange(i),s=i,r<=0&&t.next(),r>=0&&o.next()}}function Jn(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!=e[o]&&!t[o].eq(e[o]))return!1;return!0}function ta(t,e){for(let o=e,r=t.length-1;o<r;o++)t[o]=t[o+1];t.pop()}function ea(t,e,o){for(let o=t.length-1;o>=e;o--)t[o+1]=t[o];t[e]=o}function oa(t,e){let o=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[o].endSide)<0&&(o=i,r=e[i]);return o}function ra(t,e,o=t.length){let r=0;for(let i=0;i<o&&i<t.length;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=zi(t,i));return r}function ia(t,e,o,r){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=9==t.charCodeAt(r)?o-i%o:1,r=zi(t,r)}return!0===r?-1:t.length}const na="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),aa="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),sa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class la{constructor(t,e){this.rules=[];let{finish:o}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function i(t,e,n,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),d=l&&"keyframes"==l[1];if(l&&null==e)return n.push(t[0]+";");for(let o in e){let a=e[o];if(/&/.test(o))i(o.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),a,n);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+o+") should be a primitive value.");i(r(o),a,s,d)}else null!=a&&s.push(o.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+a+";")}(s.length||d)&&n.push((!o||l||a?t:t.map(o)).join(", ")+" {"+s.join(" ")+"}")}for(let e in t)i(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=sa[na]||1;return sa[na]=t+1,"ͼ"+t.toString(36)}static mount(t,e,o){let r=t[aa],i=o&&o.nonce;r?i&&r.setNonce(i):r=new ca(t,i),r.mount(Array.isArray(e)?e:[e],t)}}let da=new Map;class ca{constructor(t,e){let o=t.ownerDocument||t,r=o.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=da.get(o);if(e)return t[aa]=e;this.sheet=new r.CSSStyleSheet,da.set(o,this)}else this.styleTag=o.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[aa]=this}mount(t,e){let o=this.sheet,r=0,i=0;for(let e=0;e<t.length;e++){let n=t[e],a=this.modules.indexOf(n);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),-1==a){if(this.modules.splice(i++,0,n),o)for(let t=0;t<n.rules.length;t++)o.insertRule(n.rules[t],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=n.rules.length,i++}}if(o)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let o=e.head||e;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var ha={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:"'"},pa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ua="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ma="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),fa=0;fa<10;fa++)ha[48+fa]=ha[96+fa]=String(fa);for(fa=1;fa<=24;fa++)ha[fa+111]="F"+fa;for(fa=65;fa<=90;fa++)ha[fa]=String.fromCharCode(fa+32),pa[fa]=String.fromCharCode(fa);for(var ba in ha)pa.hasOwnProperty(ba)||(pa[ba]=ha[ba]);function ga(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function va(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Oa(t,e){if(!e.anchorNode)return!1;try{return va(t,e.anchorNode)}catch(t){return!1}}function xa(t){return 3==t.nodeType?Aa(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function ya(t,e,o,r){return!!o&&(qa(t,e,o,r,-1)||qa(t,e,o,r,1))}function wa(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ka(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function qa(t,e,o,r,i){for(;;){if(t==o&&e==r)return!0;if(e==(i<0?0:Sa(t))){if("DIV"==t.nodeName)return!1;let o=t.parentNode;if(!o||1!=o.nodeType)return!1;e=wa(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?Sa(t):0}}}function Sa(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Qa(t,e){let o=e?t.left:t.right;return{left:o,right:o,top:t.top,bottom:t.bottom}}function $a(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Pa(t,e){let o=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.width-t.offsetWidth)<1)&&(o=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:o,scaleY:r}}class Ca{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:o}=t;this.set(e,Math.min(t.anchorOffset,e?Sa(e):0),o,Math.min(t.focusOffset,o?Sa(o):0))}set(t,e,o,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=o,this.focusOffset=r}}let Ra,Za=null;function Ta(t){if(t.setActive)return t.setActive();if(Za)return t.focus(Za);let e=[];for(let o=t;o&&(e.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(t.focus(null==Za?{get preventScroll(){return Za={preventScroll:!0},!0}}:void 0),!Za){Za=!1;for(let t=0;t<e.length;){let o=e[t++],r=e[t++],i=e[t++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=i&&(o.scrollLeft=i)}}}function Aa(t,e,o=e){let r=Ra||(Ra=document.createRange());return r.setEnd(t,o),r.setStart(t,e),r}function Ma(t,e,o,r){let i={key:e,code:e,keyCode:o,which:o,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let n=new KeyboardEvent("keydown",i);n.synthetic=!0,t.dispatchEvent(n);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),n.defaultPrevented||a.defaultPrevented}function Ea(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function ja(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function za(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r>0)return{node:o,offset:r};if(1==o.nodeType&&r>0){if("false"==o.contentEditable)return null;o=o.childNodes[r-1],r=Sa(o)}else{if(!o.parentNode||ka(o))return null;r=wa(o),o=o.parentNode}}}function Xa(t,e){for(let o=t,r=e;;){if(3==o.nodeType&&r<o.nodeValue.length)return{node:o,offset:r};if(1==o.nodeType&&r<o.childNodes.length){if("false"==o.contentEditable)return null;o=o.childNodes[r],r=0}else{if(!o.parentNode||ka(o))return null;r=wa(o)+1,o=o.parentNode}}}class _a{constructor(t,e,o=!0){this.node=t,this.offset=e,this.precise=o}static before(t,e){return new _a(t.parentNode,wa(t),e)}static after(t,e){return new _a(t.parentNode,wa(t)+1,e)}}const Da=[];class Ua{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let o of this.children){if(o==t)return e;e+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let o,r=this.dom,i=null;for(let n of this.children){if(7&n.flags){if(!n.dom&&(o=i?i.nextSibling:r.firstChild)){let t=Ua.get(o);(!t||!t.parent&&t.canReuseDOM(n))&&n.reuseDOM(o)}n.sync(t,e),n.flags&=-8}if(o=i?i.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&o!=n.dom&&(e.written=!0),n.dom.parentNode==r)for(;o&&o!=n.dom;)o=Va(o);else r.insertBefore(n.dom,o);i=n.dom}for(o=i?i.nextSibling:r.firstChild,o&&e&&e.node==r&&(e.written=!0);o;)o=Va(o)}else if(1&this.flags)for(let o of this.children)7&o.flags&&(o.sync(t,e),o.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let o;if(t==this.dom)o=this.dom.childNodes[e];else{let r=0==Sa(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}o=r<0?t:t.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!Ua.get(o);)o=o.nextSibling;if(!o)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==o)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,o=0){let r=-1,i=-1,n=-1,a=-1;for(let s=0,l=o,d=o;s<this.children.length;s++){let o=this.children[s],c=l+o.length;if(l<t&&c>e)return o.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=s,i=l),l>e&&o.dom.parentNode==this.dom){n=s,a=d;break}d=c,l=c+o.breakAfter}return{from:i,to:a<0?o+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:n<this.children.length&&n>=0?this.children[n].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,o=Da){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&o.indexOf(t)<0&&t.destroy()}o.length<250?this.children.splice(t,e-t,...o):this.children=[].concat(this.children.slice(0,t),o,this.children.slice(e));for(let t=0;t<o.length;t++)o[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new La(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,o,r,i,n){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function Va(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}Ua.prototype.breakAfter=0;class La{constructor(t,e,o){this.children=t,this.pos=e,this.i=o,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function Wa(t,e,o,r,i,n,a,s,l){let{children:d}=t,c=d.length?d[e]:null,h=n.length?n[n.length-1]:null,p=h?h.breakAfter:a;if(!(e==r&&c&&!a&&!p&&n.length<2&&c.merge(o,i,n.length?h:null,0==o,s,l))){if(r<d.length){let t=d[r];t&&(i<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==r&&(t=t.split(i),i=0),!p&&h&&t.merge(0,i,h,!0,0,l)?n[n.length-1]=t:((i||t.children.length&&!t.children[0].length)&&t.merge(0,i,null,!1,0,l),n.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,o>0&&(!a&&n.length&&c.merge(o,c.length,n[0],!1,s,0)?c.breakAfter=n.shift().breakAfter:(o<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(o,c.length,null,!1,s,0),e++));e<r&&n.length;)if(d[r-1].become(n[n.length-1]))r--,n.pop(),l=n.length?0:s;else{if(!d[e].become(n[0]))break;e++,n.shift(),s=n.length?0:l}!n.length&&e&&r<d.length&&!d[e-1].breakAfter&&d[r].merge(0,0,d[e-1],!1,s,l)&&e--,(e<r||n.length)&&t.replaceChildren(e,r,n)}}function Ba(t,e,o,r,i,n){let a=t.childCursor(),{i:s,off:l}=a.findPos(o,1),{i:d,off:c}=a.findPos(e,-1),h=e-o;for(let t of r)h+=t.length;t.length+=h,Wa(t,d,c,s,l,r,0,i,n)}let Ya="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Ia="undefined"!=typeof document?document:{documentElement:{style:{}}};const Na=/Edge\/(\d+)/.exec(Ya.userAgent),Ga=/MSIE \d/.test(Ya.userAgent),Fa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ya.userAgent),Ha=!!(Ga||Fa||Na),Ka=!Ha&&/gecko\/(\d+)/i.test(Ya.userAgent),Ja=!Ha&&/Chrome\/(\d+)/.exec(Ya.userAgent),ts="webkitFontSmoothing"in Ia.documentElement.style,es=!Ha&&/Apple Computer/.test(Ya.vendor),os=es&&(/Mobile\/\w+/.test(Ya.userAgent)||Ya.maxTouchPoints>2);var rs={mac:os||/Mac/.test(Ya.platform),windows:/Win/.test(Ya.platform),linux:/Linux|X11/.test(Ya.platform),ie:Ha,ie_version:Ga?Ia.documentMode||6:Fa?+Fa[1]:Na?+Na[1]:0,gecko:Ka,gecko_version:Ka?+(/Firefox\/(\d+)/.exec(Ya.userAgent)||[0,0])[1]:0,chrome:!!Ja,chrome_version:Ja?+Ja[1]:0,ios:os,android:/Android\b/.test(Ya.userAgent),webkit:ts,safari:es,webkit_version:ts?+(/\bAppleWebKit\/(\d+)/.exec(Ya.userAgent)||[0,0])[1]:0,tabSize:null!=Ia.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class is extends Ua{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,o){return!(8&this.flags||o&&(!(o instanceof is)||this.length-(e-t)+o.length>256||8&o.flags)||(this.text=this.text.slice(0,t)+(o?o.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new is(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new _a(this.dom,t)}domBoundsAround(t,e,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,o){let r=t.nodeValue.length;e>r&&(e=r);let i=e,n=e,a=0;0==e&&o<0||e==r&&o>=0?rs.chrome||rs.gecko||(e?(i--,a=1):n<r&&(n++,a=-1)):o<0?i--:n<r&&n++;let s=Aa(t,i,n).getClientRects();if(!s.length)return null;let l=s[(a?a<0:o>=0)?0:s.length-1];return rs.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(t=>t.width))||l),a?Qa(l,a<0):l||null}(this.dom,t,e)}}class ns extends Ua{constructor(t,e=[],o=0){super(),this.mark=t,this.children=e,this.length=o;for(let t of e)t.setParent(this)}setAttrs(t){if(Ea(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof ns&&o.mark.eq(this.mark))||t&&i<=0||e<this.length&&n<=0)||(Ba(this,t,e,o?o.children.slice():[],i-1,n-1),this.markDirty(),0))}split(t){let e=[],o=0,r=-1,i=0;for(let n of this.children){let a=o+n.length;a>t&&e.push(o<t?n.split(t-o):n),r<0&&o>=t&&(r=i),o=a,i++}let n=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new ns(this.mark,e,n)}domAtPos(t){return ls(this,t)}coordsAt(t,e){return cs(this,t,e)}}class as extends Ua{static create(t,e,o){return new as(t,e,o)}constructor(t,e,o){super(),this.widget=t,this.length=e,this.side=o,this.prevWidget=null}split(t){let e=as.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof as&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}become(t){return t instanceof as&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return $i.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,o=e&&e.state.doc,r=this.posAtStart;return o?o.slice(r,r+this.length):$i.empty}domAtPos(t){return(this.length?0==t:this.side>0)?_a.before(this.dom):_a.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let o=this.widget.coordsAt(this.dom,t,e);if(o)return o;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let n=this.side?this.side<0:t>0;for(let e=n?r.length-1:0;i=r[e],!(t>0?0==e:e==r.length-1||i.top<i.bottom);e+=n?-1:1);return Qa(i,!n)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ss extends Ua{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof ss&&t.side==this.side}split(){return new ss(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?_a.before(this.dom):_a.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return $i.empty}get isHidden(){return!0}}function ls(t,e){let o=t.dom,{children:r}=t,i=0;for(let t=0;i<r.length;i++){let n=r[i],a=t+n.length;if(!(a==t&&n.getSide()<=0)){if(e>t&&e<a&&n.dom.parentNode==o)return n.domAtPos(e-t);if(e<=t)break;t=a}}for(let t=i;t>0;t--){let e=r[t-1];if(e.dom.parentNode==o)return e.domAtPos(e.length)}for(let t=i;t<r.length;t++){let e=r[t];if(e.dom.parentNode==o)return e.domAtPos(0)}return new _a(o,0)}function ds(t,e,o){let r,{children:i}=t;o>0&&e instanceof ns&&i.length&&(r=i[i.length-1])instanceof ns&&r.mark.eq(e.mark)?ds(r,e.children[0],o-1):(i.push(e),e.setParent(t)),t.length+=e.length}function cs(t,e,o){let r=null,i=-1,n=null,a=-1;!function t(e,s){for(let l=0,d=0;l<e.children.length&&d<=s;l++){let c=e.children[l],h=d+c.length;h>=s&&(c.children.length?t(c,s-d):(!n||n.isHidden&&o>0)&&(h>s||d==h&&c.getSide()>0)?(n=c,a=s-d):(d<s||d==h&&c.getSide()<0&&!c.isHidden)&&(r=c,i=s-d)),d=h}}(t,e);let s=(o<0?r:n)||r||n;return s?s.coordsAt(Math.max(0,s==r?i:a),o):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let o=xa(e);return o[o.length-1]||null}(t)}function hs(t,e){for(let o in t)"class"==o&&e.class?e.class+=" "+t.class:"style"==o&&e.style?e.style+=";"+t.style:e[o]=t[o];return e}is.prototype.children=as.prototype.children=ss.prototype.children=Da;const ps=Object.create(null);function us(t,e,o){if(t==e)return!0;t||(t=ps),e||(e=ps);let r=Object.keys(t),i=Object.keys(e);if(r.length-(o&&r.indexOf(o)>-1?1:0)!=i.length-(o&&i.indexOf(o)>-1?1:0))return!1;for(let n of r)if(n!=o&&(-1==i.indexOf(n)||t[n]!==e[n]))return!1;return!0}function ms(t,e,o){let r=!1;if(e)for(let i in e)o&&i in o||(r=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(o)for(let i in o)e&&e[i]==o[i]||(r=!0,"style"==i?t.style.cssText=o[i]:t.setAttribute(i,o[i]));return r}function fs(t){let e=Object.create(null);for(let o=0;o<t.attributes.length;o++){let r=t.attributes[o];e[r.name]=r.value}return e}class bs{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var gs=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(gs||(gs={}));class vs extends Un{constructor(t,e,o,r){super(),this.startSide=t,this.endSide=e,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Os(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),o=!!t.block;return e+=o&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new ys(t,e,e,o,t.widget||null,!1)}static replace(t){let e,o,r=!!t.block;if(t.isBlockGap)e=-5e8,o=4e8;else{let{start:i,end:n}=ws(t,r);e=(i?r?-3e8:-1:5e8)-1,o=1+(n?r?2e8:1:-6e8)}return new ys(t,e,o,r,t.widget||null,!0)}static line(t){return new xs(t)}static set(t,e=!1){return Bn.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}vs.none=Bn.empty;class Os extends vs{constructor(t){let{start:e,end:o}=ws(t);super(e?-1:5e8,o?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,o;return this==t||t instanceof Os&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(o=t.attrs)||void 0===o?void 0:o.class))&&us(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Os.prototype.point=!1;class xs extends vs{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof xs&&this.spec.class==t.spec.class&&us(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}xs.prototype.mapMode=Vi.TrackBefore,xs.prototype.point=!0;class ys extends vs{constructor(t,e,o,r,i,n){super(e,o,i,t),this.block=r,this.isReplace=n,this.mapMode=r?e<=0?Vi.TrackBefore:Vi.TrackAfter:Vi.TrackDel}get type(){return this.startSide!=this.endSide?gs.WidgetRange:this.startSide<=0?gs.WidgetBefore:gs.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof ys&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function ws(t,e=!1){let{inclusiveStart:o,inclusiveEnd:r}=t;return null==o&&(o=t.inclusive),null==r&&(r=t.inclusive),{start:null!=o?o:e,end:null!=r?r:e}}function ks(t,e,o,r=0){let i=o.length-1;i>=0&&o[i]+r>=t?o[i]=Math.max(o[i],e):o.push(t,e)}ys.prototype.point=!0;class qs extends Ua{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,o,r,i,n){if(o){if(!(o instanceof qs))return!1;this.dom||o.transferDOM(this)}return r&&this.setDeco(o?o.attrs:null),Ba(this,t,e,o?o.children.slice():[],i,n),!0}split(t){let e=new qs;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:o,off:r}=this.childPos(t);r&&(e.append(this.children[o].split(r),0),this.children[o].merge(r,this.children[o].length,null,!1,0,0),o++);for(let t=o;t<this.children.length;t++)e.append(this.children[t],0);for(;o>0&&0==this.children[o-1].length;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){us(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){ds(this,t,e)}addLineDeco(t){let e=t.spec.attributes,o=t.spec.class;e&&(this.attrs=hs(e,this.attrs||{})),o&&(this.attrs=hs({class:o},this.attrs||{}))}domAtPos(t){return ls(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var o;this.dom?4&this.flags&&(Ea(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(ms(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&Ua.get(r)instanceof ns;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(o=Ua.get(r))||void 0===o?void 0:o.isEditable)||rs.ios&&this.children.some((t=>t instanceof is))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let o of this.children){if(!(o instanceof is)||/[^ -~]/.test(o.text))return null;let r=xa(o.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let o=cs(this,t,e);if(!this.children.length&&o&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=o.bottom-o.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:o.top+r,bottom:o.bottom-r,left:o.left,right:o.left}}}return o}become(t){return t instanceof qs&&0==this.children.length&&0==t.children.length&&us(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let o=0,r=0;o<t.children.length;o++){let i=t.children[o],n=r+i.length;if(n>=e){if(i instanceof qs)return i;if(n>e)break}r=n+i.breakAfter}return null}}class Ss extends Ua{constructor(t,e,o){super(),this.widget=t,this.length=e,this.deco=o,this.breakAfter=0,this.prevWidget=null}merge(t,e,o,r,i,n){return!(o&&(!(o instanceof Ss&&this.widget.compare(o.widget))||t>0&&i<=0||e<this.length&&n<=0)||(this.length=t+(o?o.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?_a.before(this.dom):_a.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let o=new Ss(this.widget,e,this.deco);return o.breakAfter=this.breakAfter,o}get children(){return Da}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):$i.empty}domBoundsAround(){return null}become(t){return t instanceof Ss&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof Qs?null:Qa(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:o}=this.deco;return e!=o&&(t<0?e<0:o>0)}}class Qs extends bs{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class $s{constructor(t,e,o,r){this.doc=t,this.pos=e,this.end=o,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Ss&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new qs),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Ps(new ss(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Ss||this.getLine()}buildText(t,e,o){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:o,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-o)),this.getLine().append(Ps(new is(this.text.slice(this.textOff,this.textOff+r)),e),o),this.atCursorPos=!0,this.textOff+=r,t-=r,o=0}}span(t,e,o,r){this.buildText(e-t,o,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,o,r,i,n){if(this.disallowBlockEffectsFor[n]&&o instanceof ys){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=e-t;if(o instanceof ys)if(o.block)o.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Ss(o.widget||Cs.block,a,o));else{let n=as.create(o.widget||Cs.inline,a,a?0:o.startSide),s=this.atCursorPos&&!n.isEditable&&i<=r.length&&(t<e||o.startSide>0),l=!n.isEditable&&(t<e||i>r.length||o.startSide<=0),d=this.getLine();2!=this.pendingBuffer||s||n.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(d.append(Ps(new ss(1),r),i),i=r.length+Math.max(0,i-r.length)),d.append(Ps(n,r),i),this.atCursorPos=l,this.pendingBuffer=l?t<e||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,o,r,i){let n=new $s(t,e,o,i);return n.openEnd=Bn.spans(r,e,o,n),n.openStart<0&&(n.openStart=n.openEnd),n.finish(n.openEnd),n}}function Ps(t,e){for(let o of e)t=new ns(o,[t],t.length);return t}class Cs extends bs{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Cs.inline=new Cs("span"),Cs.block=new Cs("div");var Rs=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Rs||(Rs={}));const Zs=Rs.LTR,Ts=Rs.RTL;function As(t){let e=[];for(let o=0;o<t.length;o++)e.push(1<<+t[o]);return e}const Ms=As("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Es=As("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),js=Object.create(null),zs=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),o=t.charCodeAt(1);js[e]=o,js[o]=-e}function Xs(t){return t<=247?Ms[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?Es[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const _s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ds{get dir(){return this.level%2?Ts:Zs}constructor(t,e,o){this.from=t,this.to=e,this.level=o}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,o,r){let i=-1;for(let n=0;n<t.length;n++){let a=t[n];if(a.from<=e&&a.to>=e){if(a.level==o)return n;(i<0||(0!=r?r<0?a.from<e:a.to>e:t[i].level>a.level))&&(i=n)}}if(i<0)throw new RangeError("Index out of range");return i}}function Us(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Us(r.inner,i.inner))return!1}return!0}const Vs=[];function Ls(t,e,o,r,i,n,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,d=0;l<o;){let e=!0,c=!1;if(d==n.length||l<n[d].from){let t=Vs[l];t!=s&&(e=!1,c=16==t)}let h=e||1!=s?null:[],p=e?r:r+1,u=l;t:for(;;)if(d<n.length&&u==n[d].from){if(c)break t;let m=n[d];if(!e)for(let t=m.to,e=d+1;;){if(t==o)break t;if(!(e<n.length&&n[e].from==t)){if(Vs[t]==s)break t;break}t=n[e++].to}d++,h?h.push(m):(m.from>l&&a.push(new Ds(l,m.from,p)),Ws(t,m.direction==Zs!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.to),u=m.to}else{if(u==o||(e?Vs[u]!=s:Vs[u]==s))break;u++}h?Ls(t,l,u,r+1,i,h,a):l<u&&a.push(new Ds(l,u,p)),l=u}else for(let l=o,d=n.length;l>e;){let o=!0,c=!1;if(!d||l>n[d-1].to){let t=Vs[l-1];t!=s&&(o=!1,c=16==t)}let h=o||1!=s?null:[],p=o?r:r+1,u=l;t:for(;;)if(d&&u==n[d-1].to){if(c)break t;let m=n[--d];if(!o)for(let t=m.from,o=d;;){if(t==e)break t;if(!o||n[o-1].to!=t){if(Vs[t-1]==s)break t;break}t=n[--o].from}h?h.push(m):(m.to<l&&a.push(new Ds(m.to,l,p)),Ws(t,m.direction==Zs!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.from),u=m.from}else{if(u==e||(o?Vs[u-1]!=s:Vs[u-1]==s))break;u--}h?Ls(t,u,l,r+1,i,h,a):u<l&&a.push(new Ds(u,l,p)),l=u}}function Ws(t,e,o,r,i,n,a){let s=e%2?2:1;!function(t,e,o,r,i){for(let n=0;n<=r.length;n++){let a=n?r[n-1].to:e,s=n<r.length?r[n].from:o,l=n?256:i;for(let e=a,o=l,r=l;e<s;e++){let i=Xs(t.charCodeAt(e));512==i?i=o:8==i&&4==r&&(i=16),Vs[e]=4==i?2:i,7&i&&(r=i),o=i}for(let t=a,e=l,r=l;t<s;t++){let i=Vs[t];if(128==i)t<s-1&&e==Vs[t+1]&&24&e?i=Vs[t]=e:Vs[t]=256;else if(64==i){let i=t+1;for(;i<s&&64==Vs[i];)i++;let n=t&&8==e||i<o&&8==Vs[i]?1==r?1:8:256;for(let e=t;e<i;e++)Vs[e]=n;t=i-1}else 8==i&&1==r&&(Vs[t]=1);e=i,7&i&&(r=i)}}}(t,i,n,r,s),function(t,e,o,r,i){let n=1==i?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let d=a?r[a-1].to:e,c=a<r.length?r[a].from:o;for(let e,o,r,a=d;a<c;a++)if(o=js[e=t.charCodeAt(a)])if(o<0){for(let t=s-3;t>=0;t-=3)if(zs[t+1]==-o){let e=zs[t+2],o=2&e?i:4&e?1&e?n:i:0;o&&(Vs[a]=Vs[zs[t]]=o),s=t;break}}else{if(189==zs.length)break;zs[s++]=a,zs[s++]=e,zs[s++]=l}else if(2==(r=Vs[a])||1==r){let t=r==i;l=t?0:1;for(let e=s-3;e>=0;e-=3){let o=zs[e+2];if(2&o)break;if(t)zs[e+2]|=2;else{if(4&o)break;zs[e+2]|=4}}}}}(t,i,n,r,s),function(t,e,o,r){for(let i=0,n=r;i<=o.length;i++){let a=i?o[i-1].to:t,s=i<o.length?o[i].from:e;for(let l=a;l<s;){let a=Vs[l];if(256==a){let a=l+1;for(;;)if(a==s){if(i==o.length)break;a=o[i++].to,s=i<o.length?o[i].from:e}else{if(256!=Vs[a])break;a++}let d=1==n,c=d==(1==(a<e?Vs[a]:r))?d?1:2:r;for(let e=a,r=i,n=r?o[r-1].to:t;e>l;)e==n&&(e=o[--r].from,n=r?o[r-1].to:t),Vs[--e]=c;l=a}else n=a,l++}}}(i,n,r,s),Ls(t,i,n,e,o,r,a)}function Bs(t){return[new Ds(0,t,0)]}let Ys="";function Is(t,e,o,r,i){var n;let a=r.head-t.from,s=Ds.find(e,a,null!==(n=r.bidiLevel)&&void 0!==n?n:-1,r.assoc),l=e[s],d=l.side(i,o);if(a==d){let t=s+=i?1:-1;if(t<0||t>=e.length)return null;l=e[s=t],a=l.side(!i,o),d=l.side(i,o)}let c=zi(t.text,a,l.forward(i,o));(c<l.from||c>l.to)&&(c=d),Ys=t.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return h&&c==d&&h.level+(i?0:1)<l.level?Ki.cursor(h.side(!i,o)+t.from,h.forward(i,o)?1:-1,h.level):Ki.cursor(c+t.from,l.forward(i,o)?-1:1,l.level)}function Ns(t,e,o){for(let r=e;r<o;r++){let e=Xs(t.charCodeAt(r));if(1==e)return Zs;if(2==e||4==e)return Ts}return Zs}const Gs=en.define(),Fs=en.define(),Hs=en.define(),Ks=en.define(),Js=en.define(),tl=en.define(),el=en.define(),ol=en.define(),rl=en.define(),il=en.define({combine:t=>t.some((t=>t))}),nl=en.define({combine:t=>t.some((t=>t))}),al=en.define();class sl{constructor(t,e="nearest",o="nearest",r=5,i=5,n=!1){this.range=t,this.y=e,this.x=o,this.yMargin=r,this.xMargin=i,this.isSnapshot=n}map(t){return t.empty?this:new sl(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 sl(Ki.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const ll=Pn.define({map:(t,e)=>t.map(e)}),dl=Pn.define();function cl(t,e,o){let r=t.facet(Ks);r.length?r[0](e):window.onerror?window.onerror(String(e),o,void 0,void 0,e):o?console.error(o+":",e):console.error(e)}const hl=en.define({combine:t=>!t.length||t[0]});let pl=0;const ul=en.define();class ml{constructor(t,e,o,r,i){this.id=t,this.create=e,this.domEventHandlers=o,this.domEventObservers=r,this.extension=i(this)}static define(t,e){const{eventHandlers:o,eventObservers:r,provide:i,decorations:n}=e||{};return new ml(pl++,t,o,r,(t=>{let e=[ul.of(t)];return n&&e.push(vl.of((e=>{let o=e.plugin(t);return o?n(o):vs.none}))),i&&e.push(i(t)),e}))}static fromClass(t,e){return ml.define((e=>new t(e)),e)}}class fl{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(cl(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){cl(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){cl(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const bl=en.define(),gl=en.define(),vl=en.define(),Ol=en.define(),xl=en.define(),yl=en.define();function wl(t,e){let o=t.state.facet(yl);if(!o.length)return o;let r=o.map((e=>e instanceof Function?e(t):e)),i=[];return Bn.spans(r,e.from,e.to,{point(){},span(t,o,r,n){let a=t-e.from,s=o-e.from,l=i;for(let t=r.length-1;t>=0;t--,n--){let o,i=r[t].spec.bidiIsolate;if(null==i&&(i=Ns(e.text,a,s)),n>0&&l.length&&(o=l[l.length-1]).to==a&&o.direction==i)o.to=s,l=o.inner;else{let t={from:a,to:s,direction:i,inner:[]};l.push(t),l=t.inner}}}}),i}const kl=en.define();function ql(t){let e=0,o=0,r=0,i=0;for(let n of t.state.facet(kl)){let a=n(t);a&&(null!=a.left&&(e=Math.max(e,a.left)),null!=a.right&&(o=Math.max(o,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(i=Math.max(i,a.bottom)))}return{left:e,right:o,top:r,bottom:i}}const Sl=en.define();class Ql{constructor(t,e,o,r){this.fromA=t,this.toA=e,this.fromB=o,this.toB=r}join(t){return new Ql(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(t){let e=t.length,o=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),t.splice(e-1,1)}}return t.splice(e,0,o),t}static extendWithRanges(t,e){if(0==e.length)return t;let o=[];for(let r=0,i=0,n=0,a=0;;r++){let s=r==t.length?null:t[r],l=n-a,d=s?s.fromB:1e9;for(;i<e.length&&e[i]<d;){let t=e[i],r=e[i+1],n=Math.max(a,t),s=Math.min(d,r);if(n<=s&&new Ql(n+l,s+l,n,s).addToSet(o),r>d)break;i+=2}if(!s)return o;new Ql(s.fromA,s.toA,s.fromB,s.toB).addToSet(o),n=s.toA,a=s.toB}}}class $l{constructor(t,e,o){this.view=t,this.state=e,this.transactions=o,this.flags=0,this.startState=t.state,this.changes=Wi.empty(this.startState.doc.length);for(let t of o)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges(((t,e,o,i)=>r.push(new Ql(t,e,o,i)))),this.changedRanges=r}static create(t,e,o){return new $l(t,e,o)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Pl extends Ua{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=vs.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.setDOM(t.contentDOM),this.children=[new qs],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ql(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let o=t.changedRanges;this.minWidth>0&&o.length&&(o.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let o=!1;return e&&t.iterChangedRanges(((t,r)=>{t<e.to&&r>e.from&&(o=!0)})),o}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let i=r>-1?function(t,e,o){let r=Cl(t,o);if(!r)return null;let{node:i,from:n,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s))return null;if(t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,d=new Ql(l.mapPos(n),l.mapPos(a),n,a),c=[];for(let e=i.parentNode;;e=e.parentNode){let o=Ua.get(e);if(o instanceof ns)c.push({node:e,deco:o.mark});else{if(o instanceof qs||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:d,text:i,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Os({inclusive:!0,attributes:fs(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;o=new Ql(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(o.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(rs.ie||rs.chrome)&&!i&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let n=function(t,e,o){let r=new Rl;return Bn.compare(t,e,o,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return o=Ql.extendWithRanges(o,n),!!(7&this.flags||0!=o.length)&&(this.updateInner(o,t.startState.doc.length,i),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,o){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,o);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=rs.chrome||rs.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof Ss&&t.widget instanceof Qs&&i.push(t.dom);r.updateGaps(i)}updateChildren(t,e,o){let r=o?o.range.addToSet(t.slice()):t,i=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let n,a,s,l,{fromA:d,toA:c,fromB:h,toB:p}=e;if(o&&o.range.fromB<p&&o.range.toB>h){let t=$s.build(this.view.state.doc,h,o.range.fromB,this.decorations,this.dynamicDecorationMap),e=$s.build(this.view.state.doc,o.range.toB,p,this.decorations,this.dynamicDecorationMap);a=t.breakAtStart,s=t.openStart,l=e.openEnd;let r=this.compositionView(o);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),n=t.content.concat(r).concat(e.content)}else({content:n,breakAtStart:a,openStart:s,openEnd:l}=$s.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:u,off:m}=i.findPos(c,1),{i:f,off:b}=i.findPos(d,-1);Wa(this,f,b,u,m,n,a,s,l)}o&&this.fixCompositionDOM(o)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(dl)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new is(t.text.nodeValue);e.flags|=8;for(let{deco:o}of t.marks)e=new ns(o,[e],e.length);let o=new qs;return o.append(e,0),o}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let o=Ua.get(t);o&&o!=e&&(o.dom=null),e.setDOM(t)},o=this.childPos(t.range.fromB,1),r=this.children[o.i];e(t.line,r);for(let i=t.marks.length-1;i>=-1;i--)o=r.childPos(o.off,1),r=r.children[o.i],e(i>=0?t.marks[i].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let o=this.view.root.activeElement,r=o==this.dom,i=!r&&!(this.view.state.facet(hl)||this.dom.tabIndex>-1)&&Oa(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(!(r||e||i))return;let n=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(rs.gecko&&a.empty&&!this.hasComposition&&1==(d=s).node.nodeType&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=l=new _a(t,0),n=!0}var d;let c=this.view.observer.selectionRange;!n&&c.focusNode&&(ya(s.node,s.offset,c.anchorNode,c.anchorOffset)&&ya(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore((()=>{rs.android&&rs.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let o=t;o&&o!=e;o=o.assignedSlot||o.parentNode)if(1==o.nodeType&&"false"==o.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=ga(this.view.root);if(t)if(a.empty){if(rs.gecko){let t=(e=s.node,r=s.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?za:Xa)(s.node,s.offset);e&&(s=new _a(e.node,e.offset))}}t.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=a.bidiLevel)}else if(t.extend){t.collapse(s.node,s.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),e.setEnd(l.node,l.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),o&&o.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new _a(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new _a(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&ya(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,o=ga(t.root),{anchorNode:r,anchorOffset:i}=t.observer.selectionRange;if(!(o&&e.empty&&e.assoc&&o.modify))return;let n=qs.find(this,e.head);if(!n)return;let a=n.posAtStart;if(e.head==a||e.head==a+n.length)return;let s=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!s||!l||s.bottom>l.top)return;let d=this.domAtPos(e.head+e.assoc);o.collapse(d.node,d.offset),o.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&o.collapse(r,i)}moveToLine(t){let e,o=this.dom;if(t.node!=o)return t;for(let r=t.offset;!e&&r<o.childNodes.length;r++){let t=Ua.get(o.childNodes[r]);t instanceof qs&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=Ua.get(o.childNodes[r]);t instanceof qs&&(e=t.domAtPos(t.length))}return e?new _a(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=Ua.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let o=this.nearest(t);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(t,e)+o.posAtStart}domAtPos(t){let{i:e,off:o}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(o<t.length||t instanceof qs)break;e++,o=0}return this.children[e].domAtPos(o)}coordsAt(t,e){let o=null,r=0;for(let i=this.length,n=this.children.length-1;n>=0;n--){let a=this.children[n],s=i-a.breakAfter,l=s-a.length;if(s<t)break;if(l<=t&&(l<t||a.covers(-1))&&(s>t||a.covers(1))&&(!o||a instanceof qs&&!(o instanceof qs&&e>=0)))o=a,r=l;else if(o&&l==t&&s==t&&a instanceof Ss&&Math.abs(e)<2){if(a.deco.startSide<0)break;n&&(o=null)}i=l}return o?o.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:o}=this.childPos(t,1),r=this.children[e];if(!(r instanceof qs))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(o,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}o=e}if(!(r instanceof is))return null;let i=zi(r.text,o);if(i==o)return null;let n=Aa(r.dom,o,i).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:o,to:r}=t,i=this.view.contentDOM.clientWidth,n=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==Rs.LTR;for(let t=0,l=0;l<this.children.length;l++){let d=this.children[l],c=t+d.length;if(c>r)break;if(t>=o){let o=d.dom.getBoundingClientRect();if(e.push(o.height),n){let e=d.dom.lastChild,r=e?xa(e):[];if(r.length){let e=r[r.length-1],n=s?e.right-o.left:o.right-e.left;n>a&&(a=n,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+d.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Rs.RTL:Rs.LTR}measureTextSize(){for(let t of this.children)if(t instanceof qs){let e=t.measureTextSize();if(e)return e}let t,e,o,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=xa(r.firstChild)[0];t=r.getBoundingClientRect().height,e=i?i.width/27:7,o=i?i.height:t,r.remove()})),{lineHeight:t,charWidth:e,textHeight:o}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new La(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let o=0,r=0;;r++){let i=r==e.viewports.length?null:e.viewports[r],n=i?i.from-1:this.length;if(n>o){let r=(e.lineBlockAt(n).bottom-e.lineBlockAt(o).top)/this.view.scaleY;t.push(vs.replace({widget:new Qs(r),block:!0,inclusive:!0,isBlockGap:!0}).range(o,n))}if(!i)break;o=i.to+1}return vs.set(t)}updateDeco(){let t=1,e=this.view.state.facet(vl).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),o=!1,r=this.view.state.facet(Ol).map(((t,e)=>{let r="function"==typeof t;return r&&(o=!0),r?t(this.view):t}));for(r.length&&(this.dynamicDecorationMap[t++]=o,e.push(Bn.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(al))try{if(e(this.view,t.range,t))return!0}catch(t){cl(this.view.state,t,"scroll handler")}let e,{range:o}=t,r=this.coordsAt(o.head,o.empty?o.assoc:o.head>o.anchor?-1:1);if(!r)return;!o.empty&&(e=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let i=ql(this.view),n={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(t,e,o,r,i,n,a,s){let l=t.ownerDocument,d=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(1==c.nodeType){let t,p=c==l.body,u=1,m=1;if(p)t=$a(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:u,scaleY:m}=Pa(c,e)),t={left:e.left,right:e.left+c.clientWidth*u,top:e.top,bottom:e.top+c.clientHeight*m}}let f=0,b=0;if("nearest"==i)e.top<t.top?(b=e.top-(t.top+a),o>0&&e.bottom>t.bottom+b&&(b=e.bottom-t.bottom+a)):e.bottom>t.bottom&&(b=e.bottom-t.bottom+a,o<0&&e.top-b<t.top&&(b=e.top-(t.top+a)));else{let r=e.bottom-e.top,n=t.bottom-t.top;b=("center"==i&&r<=n?e.top+r/2-n/2:"start"==i||"center"==i&&o<0?e.top-a:e.bottom-n+a)-t.top}if("nearest"==r?e.left<t.left?(f=e.left-(t.left+n),o>0&&e.right>t.right+f&&(f=e.right-t.right+n)):e.right>t.right&&(f=e.right-t.right+n,o<0&&e.left<t.left+f&&(f=e.left-(t.left+n))):f=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==s?e.left-n:e.right-(t.right-t.left)+n)-t.left,f||b)if(p)d.scrollBy(f,b);else{let t=0,o=0;if(b){let t=c.scrollTop;c.scrollTop+=b/m,o=(c.scrollTop-t)*m}if(f){let e=c.scrollLeft;c.scrollLeft+=f/u,t=(c.scrollLeft-e)*u}e={left:e.left-t,top:e.top-o,right:e.right-t,bottom:e.bottom-o},t&&Math.abs(t-f)<1&&(r="nearest"),o&&Math.abs(o-b)<1&&(i="nearest")}if(p)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,n,o.head<o.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,a),-a),Math.max(Math.min(t.yMargin,s),-s),this.view.textDirection==Rs.LTR)}}function Cl(t,e){let o=t.observer.selectionRange;if(!o.focusNode)return null;let r=za(o.focusNode,o.focusOffset),i=Xa(o.focusNode,o.focusOffset),n=r||i;if(i&&r&&i.node!=r.node){let e=Ua.get(i.node);if(!e||e instanceof is&&e.text!=i.node.nodeValue)n=i;else if(t.docView.lastCompositionAfterCursor){let t=Ua.get(r.node);!t||t instanceof is&&t.text!=r.node.nodeValue||(n=i)}}if(t.docView.lastCompositionAfterCursor=n!=r,!n)return null;let a=e-n.offset;return{from:a,to:a+n.node.nodeValue.length,node:n.node}}let Rl=class{constructor(){this.changes=[]}compareRange(t,e){ks(t,e,this.changes)}comparePoint(t,e){ks(t,e,this.changes)}boundChange(t){ks(t,t,this.changes)}};function Zl(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Tl(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Al(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Ml(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function El(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function jl(t,e,o){let r,i,n,a,s,l,d,c,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=xa(p);for(let u=0;u<t.length;u++){let m=t[u];i&&Al(i,m)&&(m=Ml(El(m,i.bottom),i.top));let f=Zl(e,m),b=Tl(o,m);if(0==f&&0==b)return 3==p.nodeType?zl(p,e,o):jl(p,e,o);if(!r||a>b||a==b&&n>f){r=p,i=m,n=f,a=b;let s=b?o<m.top?-1:1:f?e<m.left?-1:1:0;h=!s||(s>0?u<t.length-1:u>0)}0==f?o>m.bottom&&(!d||d.bottom<m.bottom)?(s=p,d=m):o<m.top&&(!c||c.top>m.top)&&(l=p,c=m):d&&Al(d,m)?d=El(d,m.bottom):c&&Al(c,m)&&(c=Ml(c,m.top))}}if(d&&d.bottom>=o?(r=s,i=d):c&&c.top<=o&&(r=l,i=c),!r)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?zl(r,p,o):h&&"false"!=r.contentEditable?jl(r,p,o):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}}function zl(t,e,o){let r=t.nodeValue.length,i=-1,n=1e9,a=0;for(let s=0;s<r;s++){let r=Aa(t,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let d=r[l];if(d.top==d.bottom)continue;a||(a=e-d.left);let c=(d.top>o?d.top-o:o-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&c<n){let o=e>=(d.left+d.right)/2,r=o;if((rs.chrome||rs.gecko)&&Aa(t,s).getBoundingClientRect().left==d.right&&(r=!o),c<=0)return{node:t,offset:s+(r?1:0)};i=s+(r?1:0),n=c}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function Xl(t,e,o,r=-1){var i,n;let a,s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,{docHeight:d}=t.viewState,{x:c,y:h}=e,p=h-l;if(p<0)return 0;if(p>d)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;a=t.elementAtHeight(p),a.type!=gs.Text;)for(;p=r>0?a.bottom+e:a.top-e,!(p>=0&&p<=d);){if(i)return o?null:0;i=!0,r=-r}h=l+p;let u=a.from;if(u<t.viewport.from)return 0==t.viewport.from?0:o?null:_l(t,s,a,c,h);if(u>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:o?null:_l(t,s,a,c,h);let m=t.dom.ownerDocument,f=t.root.elementFromPoint?t.root:m,b=f.elementFromPoint(c,h);b&&!t.contentDOM.contains(b)&&(b=null),b||(c=Math.max(s.left+1,Math.min(s.right-1,c)),b=f.elementFromPoint(c,h),b&&!t.contentDOM.contains(b)&&(b=null));let g,v=-1;if(b&&0!=(null===(i=t.docView.nearest(b))||void 0===i?void 0:i.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,h);t&&({offsetNode:g,offset:v}=t)}else if(m.caretRangeFromPoint){let e=m.caretRangeFromPoint(c,h);e&&(({startContainer:g,startOffset:v}=e),(!t.contentDOM.contains(g)||rs.safari&&function(t,e,o){let r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return Aa(t,r-1,r).getBoundingClientRect().left>o}(g,v,c)||rs.chrome&&function(t,e,o){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return o-(1==t.nodeType?t.getBoundingClientRect():Aa(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(g,v,c))&&(g=void 0))}g&&(v=Math.min(Sa(g),v))}if(!g||!t.docView.dom.contains(g)){let e=qs.find(t.docView,u);if(!e)return p>a.top+a.height/2?a.to:a.from;({node:g,offset:v}=jl(e.dom,c,h))}let O=t.docView.nearest(g);if(!O)return null;if(O.isWidget&&1==(null===(n=O.dom)||void 0===n?void 0:n.nodeType)){let t=O.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?O.posAtStart:O.posAtEnd}return O.localPosFromDOM(g,v)+O.posAtStart}function _l(t,e,o,r,i){let n=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&o.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;n+=Math.floor((i-o.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(o.from,o.to);return o.from+ia(a,n,t.state.tabSize)}function Dl(t,e){let o=t.lineBlockAt(e);if(Array.isArray(o.type))for(let t of o.type)if(t.to>e||t.to==e&&(t.to==o.to||t.type==gs.Text))return t;return o}function Ul(t,e,o,r){let i=t.state.doc.lineAt(e.head),n=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let e=Is(i,n,a,s,o),d=Ys;if(!e){if(i.number==(o?t.state.doc.lines:1))return s;d="\n",i=t.state.doc.line(i.number+(o?1:-1)),n=t.bidiSpans(i),e=t.visualLineSide(i,!o)}if(l){if(!l(d))return s}else{if(!r)return e;l=r(d)}s=e}}function Vl(t,e,o){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,((t,i,n)=>{if(e>t&&e<i){let n=r||o||(e-t<i-e?-1:1);e=n<0?t:i,r=n}}));if(!r)return e}}function Ll(t,e,o){let r=Vl(t.state.facet(xl).map((e=>e(t))),o.from,e.head>o.from?-1:1);return r==o.from?o:Ki.cursor(r,r<o.from?1:-1)}const Wl="";class Bl{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(_n.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Wl}readRange(t,e){if(!t)return this;let o=t.parentNode;for(let r=t;;){this.findPointBefore(o,r);let t=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==e)break;let n=Ua.get(r),a=Ua.get(i);(n&&a?n.breakAfter:(n?n.breakAfter:ka(r))||ka(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=i}return this.findPointBefore(o,e),this}readTextNode(t){let e=t.nodeValue;for(let o of this.points)o.node==t&&(o.pos=this.text.length+Math.min(o.offset,e.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,n=-1,a=1;if(this.lineSeparator?(n=e.indexOf(this.lineSeparator,o),a=this.lineSeparator.length):(i=r.exec(e))&&(n=i.index,a=i[0].length),this.append(e.slice(o,n<0?e.length:n)),n<0)break;if(this.lineBreak(),a>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=a-1);o=n+a}}readNode(t){if(t.cmIgnore)return;let e=Ua.get(t),o=e&&e.overrideDOMText;if(null!=o){this.findPointInside(t,o.length);for(let t=o.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let o of this.points)o.node==t&&t.childNodes[o.offset]==e&&(o.pos=this.text.length)}findPointInside(t,e){for(let o of this.points)(3==t.nodeType?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+(Yl(t,o.node,o.offset)?e:0))}}function Yl(t,e,o){for(;;){if(!e||o<Sa(e))return!1;if(e==t)return!0;o=wa(e)+1,e=e.parentNode}}class Il{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Nl{constructor(t,e,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:i,impreciseAnchor:n}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,o,0))){let e=i||n?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}=t.observer.selectionRange;return o&&(e.push(new Il(o,r)),i==o&&n==r||e.push(new Il(i,n))),e}(t),o=new Bl(e,t.state);o.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=o.text,this.newSel=function(t,e){if(0==t.length)return null;let o=t[0].pos,r=2==t.length?t[1].pos:o;return o>-1&&r>-1?Ki.single(o+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,o=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!va(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!va(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if((rs.ios||rs.chrome)&&t.state.selection.main.empty&&o!=r&&(a.from>0||a.to<t.state.doc.length)){let e=Math.min(o,r),i=Math.max(o,r),n=a.from-e,s=a.to-i;0!=n&&1!=n&&0!=e||0!=s&&-1!=s&&i!=t.state.doc.length||(o=0,r=t.state.doc.length)}this.newSel=Ki.single(r,o)}}}function Gl(t,e){let o,{newSel:r}=e,i=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:a}=e.bounds,s=i.from,l=null;(8===n||rs.android&&e.text.length<a-r)&&(s=i.to,l="end");let d=function(t,e,o,r){let i=Math.min(t.length,e.length),n=0;for(;n<i&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;return"end"==r&&(o-=a+Math.max(0,n-Math.min(a,s))-n),a<n&&t.length<e.length?(n-=o<=n&&o>=a?n-o:0,s=n+(s-a),a=n):s<n&&(n-=o<=n&&o>=s?n-o:0,a=n+(a-s),s=n),{from:n,toA:a,toB:s}}(t.state.doc.sliceString(r,a,Wl),e.text,s-r,l);d&&(rs.chrome&&13==n&&d.toB==d.from+2&&e.text.slice(d.from,d.toB)==Wl+Wl&&d.toB--,o={from:r+d.from,to:r+d.toA,insert:$i.of(e.text.slice(d.from,d.toB).split(Wl))})}else r&&(!t.hasFocus&&t.state.facet(hl)||r.main.eq(i))&&(r=null);if(!o&&!r)return!1;if(!o&&e.typeOver&&!i.empty&&r&&r.main.empty?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(rs.mac||rs.android)&&o&&o.from==o.to&&o.from==i.head-1&&/^\. ?$/.test(o.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==o.insert.length&&(r=Ki.single(r.main.anchor-1,r.main.head-1)),o={from:o.from,to:o.to,insert:$i.of([o.insert.toString().replace("."," ")])}):o&&o.from>=i.from&&o.to<=i.to&&(o.from!=i.from||o.to!=i.to)&&i.to-i.from-(o.to-o.from)<=4?o={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,o.from).append(o.insert).append(t.state.doc.slice(o.to,i.to))}:rs.chrome&&o&&o.from==o.to&&o.from==i.head&&"\n "==o.insert.toString()&&t.lineWrapping&&(r&&(r=Ki.single(r.main.anchor-1,r.main.head-1)),o={from:i.from,to:i.to,insert:$i.of([" "])}),o)return Fl(t,o,r,n);if(r&&!r.main.eq(i)){let e=!1,o="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),o=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:o}),!0}return!1}function Fl(t,e,o,r=-1){if(rs.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(rs.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&" "==t.state.sliceDoc(e.from,i.from))&&1==e.insert.length&&2==e.insert.lines&&Ma(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ma(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&0==e.insert.length&&Ma(t.contentDOM,"Delete",46)))return!0;let n,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s=()=>n||(n=function(t,e,o){let r,i=t.state,n=i.selection.main;if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!o||o.main.empty&&o.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let o=n.from<e.from?i.sliceDoc(n.from,e.from):"",a=n.to>e.to?i.sliceDoc(e.to,n.to):"";r=i.replaceSelection(t.state.toText(o+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let a=i.changes(e),s=o&&o.main.to<=a.newLength?o.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let l,d=t.state.sliceDoc(e.from,e.to),c=o&&Cl(t,o.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(n.head);let h=n.to-e.to,p=n.to-n.from;r=i.changeByRange((o=>{if(o.from==n.from&&o.to==n.to)return{changes:a,range:s||o.map(a)};let r=o.to-h,c=r-d.length;if(o.to-o.from!=p||t.state.sliceDoc(c,r)!=d||o.to>=l.from&&o.from<=l.to)return{range:o};let u=i.changes({from:c,to:r,insert:e.insert}),m=o.to-n.to;return{changes:u,range:s?Ki.range(Math.max(0,s.anchor+m),Math.max(0,s.head+m)):o.map(u)}}))}else r={changes:a,selection:s&&i.selection.replaceRange(s)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}(t,e,o));return t.state.facet(tl).some((o=>o(t,e.from,e.to,a,s)))||t.dispatch(s()),!0}class Hl{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,rs.safari&&t.contentDOM.addEventListener("input",(()=>null)),rs.gecko&&function(t){qd.has(t)||(qd.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let o,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(o=Ua.get(r))&&o.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then((()=>this.runHandlers(t.type,t))):this.runHandlers(t.type,t)))}runHandlers(t,e){let o=this.handlers[t];if(o){for(let t of o.observers)t(this.view,e);for(let t of o.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Jl(t),o=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,n=o[t];n&&i!=!n.handlers.length&&(r.removeEventListener(t,this.handleEvent),n=null),n||r.addEventListener(t,this.handleEvent,{passive:i})}for(let t in o)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&od.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),rs.android&&rs.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!rs.ios||t.synthetic||t.altKey||t.metaKey||!((e=td.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||ed.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,Ma(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(rs.safari&&!rs.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Kl(t,e){return(o,r)=>{try{return e.call(t,r,o)}catch(t){cl(o.state,t)}}}function Jl(t){let e=Object.create(null);function o(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let r in t.domEventHandlers){let i=t.domEventHandlers[r];i&&o(r).handlers.push(Kl(e.value,i))}if(t&&t.domEventObservers)for(let r in t.domEventObservers){let i=t.domEventObservers[r];i&&o(r).observers.push(Kl(e.value,i))}}for(let t in nd)o(t).handlers.push(nd[t]);for(let t in ad)o(t).observers.push(ad[t]);return e}const td=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ed="dthko",od=[16,17,18,20,91,92,224,225];function rd(t){return.7*Math.max(0,t)+8}class id{constructor(t,e,o,r){this.view=t,this.startEvent=e,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,o,r=t.ownerDocument;for(let i=t.parentNode;i&&!(i==r.body||e&&o);)if(1==i.nodeType)!o&&i.scrollHeight>i.clientHeight&&(o=i),!e&&i.scrollWidth>i.clientWidth&&(e=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:e,y:o}}(t.contentDOM),this.atoms=t.state.facet(xl).map((e=>e(t)));let i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(_n.allowMultipleSelections)&&function(t,e){let o=t.state.facet(Gs);return o.length?o[0](e):rs.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:o}=t.state.selection;if(o.empty)return!1;let r=ga(t.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let t=0;t<i.length;t++){let o=i[t];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}(t,e)||1!=vd(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let e=0,o=0,r=0,i=0,n=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:n}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=ql(this.view);t.clientX-s.left<=r+6?e=-rd(r-t.clientX):t.clientX+s.right>=n-6&&(e=rd(t.clientX-n)),t.clientY-s.top<=i+6?o=-rd(i-t.clientY):t.clientY+s.bottom>=a-6&&(o=rd(t.clientY-a)),this.setScrollSpeed(e,o)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let o=0;o<t.ranges.length;o++){let r=t.ranges[o],i=null;if(r.empty){let t=Vl(this.atoms,r.from,0);t!=r.from&&(i=Ki.cursor(t,-1))}else{let t=Vl(this.atoms,r.from,-1),e=Vl(this.atoms,r.to,1);t==r.from&&e==r.to||(i=Ki.range(r.from==r.anchor?t:e,r.from==r.head?t:e))}i&&(e||(e=t.ranges.slice()),e[o]=i)}return e?Ki.create(e,t.mainIndex):t}select(t){let{view:e}=this,o=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&o.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const nd=Object.create(null),ad=Object.create(null),sd=rs.ie&&rs.ie_version<15||rs.ios&&rs.webkit_version<604;function ld(t,e,o){for(let r of t.facet(e))o=r(o,t);return o}function dd(t,e){e=ld(t.state,ol,e);let o,{state:r}=t,i=1,n=r.toText(e),a=n.lines==r.selection.ranges.length;if(null!=xd&&r.selection.ranges.every((t=>t.empty))&&xd==n.toString()){let t=-1;o=r.changeByRange((o=>{let s=r.doc.lineAt(o.from);if(s.from==t)return{range:o};t=s.from;let l=r.toText((a?n.line(i++).text:e)+r.lineBreak);return{changes:{from:s.from,insert:l},range:Ki.cursor(o.from+l.length)}}))}else o=a?r.changeByRange((t=>{let e=n.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:Ki.cursor(t.from+e.length)}})):r.replaceSelection(n);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}function cd(t,e,o,r){if(1==r)return Ki.cursor(e,o);if(2==r)return function(t,e,o=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),n=e-i.from;if(0==i.length)return Ki.cursor(e);0==n?o=1:n==i.length&&(o=-1);let a=n,s=n;o<0?a=zi(i.text,n,!1):s=zi(i.text,n);let l=r(i.text.slice(a,s));for(;a>0;){let t=zi(i.text,a,!1);if(r(i.text.slice(t,a))!=l)break;a=t}for(;s<i.length;){let t=zi(i.text,s);if(r(i.text.slice(s,t))!=l)break;s=t}return Ki.range(a+i.from,s+i.from)}(t.state,e,o);{let o=qs.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),i=o?o.posAtStart:r.from,n=o?o.posAtEnd:r.to;return n<t.state.doc.length&&n==r.to&&n++,Ki.range(i,n)}}ad.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},nd.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),ad.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},ad.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},nd.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let r of t.state.facet(Hs))if(o=r(t,e),o)break;if(o||0!=e.button||(o=function(t,e){let o=ud(t,e),r=vd(e),i=t.state.selection;return{update(t){t.docChanged&&(o.pos=t.changes.mapPos(o.pos),i=i.map(t.changes))},get(e,n,a){let s,l=ud(t,e),d=cd(t,l.pos,l.bias,r);if(o.pos!=l.pos&&!n){let e=cd(t,o.pos,o.bias,r),i=Math.min(e.from,d.from),n=Math.max(e.to,d.to);d=i<d.from?Ki.range(i,n):Ki.range(n,i)}return n?i.replaceRange(i.main.extend(d.from,d.to)):a&&1==r&&i.ranges.length>1&&(s=function(t,e){for(let o=0;o<t.ranges.length;o++){let{from:r,to:i}=t.ranges[o];if(r<=e&&i>=e)return Ki.create(t.ranges.slice(0,o).concat(t.ranges.slice(o+1)),t.mainIndex==o?0:t.mainIndex-(t.mainIndex>o?1:0))}return null}(i,l.pos))?s:a?i.addRange(d):Ki.create([d])}}}(t,e)),o){let r=!t.hasFocus;t.inputState.startMouseSelection(new id(t,e,o,r)),r&&t.observer.ignore((()=>{Ta(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}return!1};let hd=(t,e,o)=>e>=o.top&&e<=o.bottom&&t>=o.left&&t<=o.right;function pd(t,e,o,r){let i=qs.find(t.docView,e);if(!i)return 1;let n=e-i.posAtStart;if(0==n)return 1;if(n==i.length)return-1;let a=i.coordsAt(n,-1);if(a&&hd(o,r,a))return-1;let s=i.coordsAt(n,1);return s&&hd(o,r,s)?1:a&&a.bottom>=r?-1:1}function ud(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:o,bias:pd(t,o,e.clientX,e.clientY)}}const md=rs.ie&&rs.ie_version<=11;let fd=null,bd=0,gd=0;function vd(t){if(!md)return t.detail;let e=fd,o=gd;return fd=t,gd=Date.now(),bd=!e||o>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(bd+1)%3:1}function Od(t,e,o,r){if(!(o=ld(t.state,ol,o)))return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,a=r&&n&&function(t,e){let o=t.state.facet(Fs);return o.length?o[0](e):rs.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:n.from,to:n.to}:null,s={from:i,insert:o},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}nd.dragstart=(t,e)=>{let{selection:{main:o}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=o.to||e<=o.from)&&(o=Ki.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=o,e.dataTransfer&&(e.dataTransfer.setData("Text",ld(t.state,rl,t.state.sliceDoc(o.from,o.to))),e.dataTransfer.effectAllowed="copyMove"),!1},nd.dragend=t=>(t.inputState.draggedContent=null,!1),nd.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let o=e.dataTransfer.files;if(o&&o.length){let r=Array(o.length),i=0,n=()=>{++i==o.length&&Od(t,e,r.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<o.length;t++){let e=new FileReader;e.onerror=n,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),n()},e.readAsText(o[t])}return!0}{let o=e.dataTransfer.getData("Text");if(o)return Od(t,e,o,!0),!0}return!1},nd.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let o=sd?null:e.clipboardData;return o?(dd(t,o.getData("text/plain")||o.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let o=e.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout((()=>{t.focus(),o.remove(),dd(t,o.value)}),50)}(t),!1)};let xd=null;nd.copy=nd.cut=(t,e)=>{let{text:o,ranges:r,linewise:i}=function(t){let e=[],o=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),o.push(r));if(!e.length){let i=-1;for(let{from:r}of t.selection.ranges){let n=t.doc.lineAt(r);n.number>i&&(e.push(n.text),o.push({from:n.from,to:Math.min(t.doc.length,n.to+1)})),i=n.number}r=!0}return{text:ld(t,rl,e.join(t.lineBreak)),ranges:o,linewise:r}}(t.state);if(!o&&!i)return!1;xd=i?o:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let n=sd?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",o),!0):(function(t,e){let o=t.dom.parentNode;if(!o)return;let r=o.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((()=>{r.remove(),t.focus()}),50)}(t,o),!1)};const yd=Sn.define();function wd(t,e){let o=[];for(let r of t.facet(el)){let i=r(t,e);i&&o.push(i)}return o?t.update({effects:o,annotations:yd.of(!0)}):null}function kd(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let o=wd(t.state,e);o?t.dispatch(o):t.update([])}}),10)}ad.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),kd(t)},ad.blur=t=>{t.observer.clearSelectionRange(),kd(t)},ad.compositionstart=ad.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},ad.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,rs.chrome&&rs.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},ad.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},nd.beforeinput=(t,e)=>{var o,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(o=e.dataTransfer)||void 0===o?void 0:o.getData("text/plain"),i=e.getTargetRanges();if(r&&i.length){let e=i[0],o=t.posAtDOM(e.startContainer,e.startOffset),n=t.posAtDOM(e.endContainer,e.endOffset);return Fl(t,{from:o,to:n,insert:t.state.toText(r)},null),!0}}let i;if(rs.chrome&&rs.android&&(i=td.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return rs.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),rs.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>ad.compositionend(t,e)),20),!1};const qd=new Set,Sd=["pre-wrap","normal","pre-line","break-spaces"];let Qd=!1;function $d(){Qd=!1}class Pd{constructor(t){this.lineWrapping=t,this.doc=$i.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let o=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((e-t-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Sd.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let o=0;o<t.length;o++){let r=t[o];r<0?o++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,o,r,i,n){let a=Sd.indexOf(t)>-1,s=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=e,this.charWidth=o,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return s}}class Cd{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class Rd{constructor(t,e,o,r,i){this.from=t,this.length=e,this.top=o,this.height=r,this._content=i}get type(){return"number"==typeof this._content?gs.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 ys?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new Rd(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Zd=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Zd||(Zd={}));const Td=.001;class Ad{constructor(t,e,o=2){this.length=t,this.height=e,this.flags=o}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>Td&&(Qd=!0),this.height=t)}replace(t,e,o){return Ad.of(o)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,o,r){let i=this,n=o.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:d,toB:c}=r[a],h=i.lineAt(s,Zd.ByPosNoHeight,o.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,Zd.ByPosNoHeight,o,0,0);for(c+=p.to-l,l=p.to;a>0&&h.from<=r[a-1].toA;)s=r[a-1].fromA,d=r[a-1].fromB,a--,s<h.from&&(h=i.lineAt(s,Zd.ByPosNoHeight,o,0,0));d+=h.from-s,s=h.from;let u=Dd.build(o.setDoc(n),t,d,c);i=Md(i,i.replace(s,l,u))}return i.updateHeight(o,0)}static empty(){return new jd(0,0)}static of(t){if(1==t.length)return t[0];let e=0,o=t.length,r=0,i=0;for(;;)if(e==o)if(r>2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),o+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let e=t[o];e.break?t.splice(o,1,e.left,null,e.right):t.splice(o,1,e.left,e.right),o+=2+e.break,i-=e.size}}else if(r<i){let o=t[e++];o&&(r+=o.size)}else{let e=t[--o];e&&(i+=e.size)}let n=0;return null==t[e-1]?(n=1,e--):null==t[e]&&(n=1,o++),new Xd(Ad.of(t.slice(0,e)),n,Ad.of(t.slice(o)))}}function Md(t,e){return t==e?t:(t.constructor!=e.constructor&&(Qd=!0),e)}Ad.prototype.size=1;class Ed extends Ad{constructor(t,e,o){super(t,e),this.deco=o}blockAt(t,e,o,r){return new Rd(r,this.length,o,this.height,this.deco||0)}lineAt(t,e,o,r,i){return this.blockAt(0,o,r,i)}forEachLine(t,e,o,r,i,n){t<=i+this.length&&e>=i&&n(this.blockAt(0,o,r,i))}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class jd extends Ed{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,o,r){return new Rd(r,this.length,o,this.height,this.breaks)}replace(t,e,o){let r=o[0];return 1==o.length&&(r instanceof jd||r instanceof zd&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof zd?r=new jd(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Ad.of(o)}updateHeight(t,e=0,o=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(o||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class zd extends Ad{constructor(t){super(t,0)}heightMetrics(t,e){let o,r=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,n=i-r+1,a=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*n);o=e/n,this.length>n+1&&(a=(this.height-e)/(this.length-n-1))}else o=this.height/n;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(t,e,o,r){let{firstLine:i,lastLine:n,perLine:a,perChar:s}=this.heightMetrics(e,r);if(e.lineWrapping){let i=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-o)/this.height))*this.length)),n=e.doc.lineAt(i),l=a+n.length*s,d=Math.max(o,t-l/2);return new Rd(n.from,n.length,d,l,0)}{let r=Math.max(0,Math.min(n-i,Math.floor((t-o)/a))),{from:s,length:l}=e.doc.line(i+r);return new Rd(s,l,o+a*r,a,0)}}lineAt(t,e,o,r,i){if(e==Zd.ByHeight)return this.blockAt(t,o,r,i);if(e==Zd.ByPosNoHeight){let{from:e,to:r}=o.doc.lineAt(t);return new Rd(e,r-e,0,0,0)}let{firstLine:n,perLine:a,perChar:s}=this.heightMetrics(o,i),l=o.doc.lineAt(t),d=a+l.length*s,c=l.number-n,h=r+a*c+s*(l.from-i-c);return new Rd(l.from,l.length,Math.max(r,Math.min(h,r+this.height-d)),d,0)}forEachLine(t,e,o,r,i,n){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(o,i);for(let d=t,c=r;d<=e;){let e=o.doc.lineAt(d);if(d==t){let o=e.number-a;c+=s*o+l*(t-i-o)}let r=s+l*e.length;n(new Rd(e.from,e.length,c,r,0)),c+=r,d=e.to+1}}replace(t,e,o){let r=this.length-e;if(r>0){let t=o[o.length-1];t instanceof zd?o[o.length-1]=new zd(t.length+r):o.push(null,new zd(r-1))}if(t>0){let e=o[0];e instanceof zd?o[0]=new zd(t+e.length):o.unshift(new zd(t-1),null)}return Ad.of(o)}decomposeLeft(t,e){e.push(new zd(t-1),null)}decomposeRight(t,e){e.push(null,new zd(this.length-t-1))}updateHeight(t,e=0,o=!1,r){let i=e+this.length;if(r&&r.from<=e+this.length&&r.more){let o=[],n=Math.max(e,r.from),a=-1;for(r.from>e&&o.push(new zd(r.from-e-1).updateHeight(t,e));n<=i&&r.more;){let e=t.doc.lineAt(n).length;o.length&&o.push(null);let i=r.heights[r.index++];-1==a?a=i:Math.abs(i-a)>=Td&&(a=-2);let s=new jd(e,i);s.outdated=!1,o.push(s),n+=e+1}n<=i&&o.push(null,new zd(i-n).updateHeight(t,n));let s=Ad.of(o);return(a<0||Math.abs(s.height-this.height)>=Td||Math.abs(a-this.heightMetrics(t,e).perLine)>=Td)&&(Qd=!0),Md(this,s)}return(o||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Xd extends Ad{constructor(t,e,o){super(t.length+e+o.length,t.height+o.height,e|(t.outdated||o.outdated?2:0)),this.left=t,this.right=o,this.size=t.size+o.size}get break(){return 1&this.flags}blockAt(t,e,o,r){let i=o+this.left.height;return t<i?this.left.blockAt(t,e,o,r):this.right.blockAt(t,e,i,r+this.left.length+this.break)}lineAt(t,e,o,r,i){let n=r+this.left.height,a=i+this.left.length+this.break,s=e==Zd.ByHeight?t<n:t<a,l=s?this.left.lineAt(t,e,o,r,i):this.right.lineAt(t,e,o,n,a);if(this.break||(s?l.to<a:l.from>a))return l;let d=e==Zd.ByPosNoHeight?Zd.ByPosNoHeight:Zd.ByPos;return s?l.join(this.right.lineAt(a,d,o,n,a)):this.left.lineAt(a,d,o,r,i).join(l)}forEachLine(t,e,o,r,i,n){let a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)t<s&&this.left.forEachLine(t,e,o,r,i,n),e>=s&&this.right.forEachLine(t,e,o,a,s,n);else{let l=this.lineAt(s,Zd.ByPos,o,r,i);t<l.from&&this.left.forEachLine(t,l.from-1,o,r,i,n),l.to>=t&&l.from<=e&&n(l),e>l.to&&this.right.forEachLine(l.to+1,e,o,a,s,n)}}replace(t,e,o){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,o),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,o));let i=[];t>0&&this.decomposeLeft(t,i);let n=i.length;for(let t of o)i.push(t);if(t>0&&_d(i,n-1),e<this.length){let t=i.length;this.decomposeRight(e,i),_d(i,t)}return Ad.of(i)}decomposeLeft(t,e){let o=this.left.length;if(t<=o)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(o++,t>=o&&e.push(null)),t>o&&this.right.decomposeLeft(t-o,e)}decomposeRight(t,e){let o=this.left.length,r=o+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<o&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?Ad.of(this.break?[t,null,e]:[t,e]):(this.left=Md(this.left,t),this.right=Md(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,o=!1,r){let{left:i,right:n}=this,a=e+i.length+this.break,s=null;return r&&r.from<=e+i.length&&r.more?s=i=i.updateHeight(t,e,o,r):i.updateHeight(t,e,o),r&&r.from<=a+n.length&&r.more?s=n=n.updateHeight(t,a,o,r):n.updateHeight(t,a,o),s?this.balanced(i,n):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function _d(t,e){let o,r;null==t[e]&&(o=t[e-1])instanceof zd&&(r=t[e+1])instanceof zd&&t.splice(e-1,3,new zd(o.length+1+r.length))}class Dd{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof jd?o.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new jd(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,o){if(t<e||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,i=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let n=e-t;o.block?this.addBlock(new Ed(n,r,o)):(n||i||r>=5)&&this.addLineDeco(r,i,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new jd(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let o=new zd(e-t);return this.oracle.doc.lineAt(t).to==e&&(o.flags|=4),o}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof jd)return t;let e=new jd(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+o}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof jd||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new jd(0,-1));let o=t;for(let t of this.nodes)t instanceof jd&&t.updateHeight(this.oracle,o),o+=t?t.length:1;return this.nodes}static build(t,e,o,r){let i=new Dd(o,t);return Bn.spans(e,o,r,i,0),i.finish(o)}}class Ud{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,o,r){(t<e||o&&o.heightRelevant||r&&r.heightRelevant)&&ks(t,e,this.changes,5)}}function Vd(t,e){let o=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,n=Math.max(0,o.left),a=Math.min(i.innerWidth,o.right),s=Math.max(0,o.top),l=Math.min(i.innerHeight,o.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let o=e,r=window.getComputedStyle(o);if((o.scrollHeight>o.clientHeight||o.scrollWidth>o.clientWidth)&&"visible"!=r.overflow){let r=o.getBoundingClientRect();n=Math.max(n,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(e==t.parentNode?i.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?o.offsetParent:o.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-o.left,right:Math.max(n,a)-o.left,top:s-(o.top+e),bottom:Math.max(s,l)-(o.top+e)}}function Ld(t,e){let o=t.getBoundingClientRect();return{left:0,right:o.right-o.left,top:e,bottom:o.bottom-(o.top+e)}}class Wd{constructor(t,e,o,r){this.from=t,this.to=e,this.size=o,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++){let r=t[o],i=e[o];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(t,e){return vs.replace({widget:new Bd(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class Bd extends bs{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Yd{constructor(t){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.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Fd,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Rs.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(gl).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new Pd(e),this.stateDeco=t.facet(vl).filter((t=>"function"!=typeof t)),this.heightMap=Ad.empty().applyChanges(this.stateDeco,$i.empty,this.heightOracle.setDoc(t.doc),[new Ql(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=vs.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let o=0;o<=1;o++){let r=o?e.head:e.anchor;if(!t.some((({from:t,to:e})=>r>=t&&r<=e))){let{from:e,to:o}=this.lineBlockAt(r);t.push(new Id(e,o))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?Fd:new Hd(this.heightOracle,this.heightMap,this.viewports),t.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,(t=>{this.viewportLines.push(Kd(t,this.scaler))}))}update(t,e=null){this.state=t.state;let o=this.stateDeco;this.stateDeco=this.state.facet(vl).filter((t=>"function"!=typeof t));let r=t.changedRanges,i=Ql.extendWithRanges(r,function(t,e,o){let r=new Ud;return Bn.compare(t,e,o,r,0),r.changes}(o,this.stateDeco,t?t.changes:Wi.empty(this.state.doc.length))),n=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);$d(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=n||Qd)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let s=i.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<s.from||e.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,e));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(nl)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,o=window.getComputedStyle(e),r=this.heightOracle,i=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?Rs.RTL:Rs.LTR;let n=this.heightOracle.mustRefreshForWrapping(i),a=e.getBoundingClientRect(),s=n||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,d=0;if(a.width&&a.height){let{scaleX:t,scaleY:o}=Pa(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||o>.005&&Math.abs(this.scaleY-o)>.005)&&(this.scaleX=t,this.scaleY=o,l|=16,n=s=!0)}let c=(parseInt(o.paddingTop)||0)*this.scaleY,h=(parseInt(o.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==h||(this.paddingTop=c,this.paddingBottom=h,l|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=16);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=ja(t.scrollDOM);let u=(this.printing?Ld:Vd)(e,this.paddingTop),m=u.top-this.pixelViewport.top,f=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),o=t.ownerDocument.defaultView||window;return e.left<o.innerWidth&&e.right>0&&e.top<o.innerHeight&&e.bottom>0}(t.dom))return 0;let g=a.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,l|=16),s){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(n=!0),n||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:o,charWidth:a,textHeight:s}=t.docView.measureTextSize();n=o>0&&r.refresh(i,o,a,s,g/a,e),n&&(t.docView.minWidth=0,l|=16)}m>0&&f>0?d=Math.max(m,f):m<0&&f<0&&(d=Math.min(m,f)),$d();for(let o of this.viewports){let i=o.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(o);this.heightMap=(n?Ad.empty().applyChanges(this.stateDeco,$i.empty,this.heightOracle,[new Ql(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,n,new Cd(o.from,i))}Qd&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),l|=this.updateForViewport()),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let o=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:n,visibleBottom:a}=this,s=new Id(r.lineAt(n-1e3*o,Zd.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-o),Zd.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(t<s.from||t>s.to){let o,n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(t,Zd.ByPos,i,0,0);o="center"==e.y?(a.top+a.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<s.from?a.top:a.bottom-n,s=new Id(r.lineAt(o-500,Zd.ByHeight,i,0,0).from,r.lineAt(o+n+500,Zd.ByHeight,i,0,0).to)}}return s}mapViewport(t,e){let o=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new Id(this.heightMap.lineAt(o,Zd.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Zd.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,Zd.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(e,Zd.ByPos,this.heightOracle,0,0),{visibleTop:n,visibleBottom:a}=this;return(0==t||r<=n-Math.max(10,Math.min(-o,250)))&&(e==this.state.doc.length||i>=a+Math.max(10,Math.min(o,250)))&&r>n-2e3&&i<a+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let o=[];for(let r of t)e.touchesRange(r.from,r.to)||o.push(new Wd(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return o}ensureLineGaps(t,e){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,i=r>>1,n=r<<1;if(this.defaultTextDirection!=Rs.LTR&&!o)return[];let a=[],s=(r,n,l,d)=>{if(n-r<i)return;let c=this.state.selection.main,h=[c.from];c.empty||h.push(c.to);for(let t of h)if(t>r&&t<n)return s(r,t-10,l,d),void s(t+10,n,l,d);let p=function(t,e){for(let o of t)if(e(o))return o}(t,(t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<i&&Math.abs(t.to-n)<i&&!h.some((e=>t.from<e&&t.to>e))));if(!p){if(n<l.to&&e&&o&&e.visibleRanges.some((t=>t.from<=n&&t.to>=n))){let t=e.moveToLineBoundary(Ki.cursor(n),!1,!0).head;t>r&&(n=t)}let t=this.gapSize(l,r,n,d);p=new Wd(r,n,t,o||t<2e6?t:2e6)}a.push(p)},l=e=>{if(e.length<n||e.type!=gs.Text)return;let i=function(t,e,o){let r=[],i=t,n=0;return Bn.spans(o,t,e,{span(){},point(t,e){t>i&&(r.push({from:i,to:t}),n+=t-i),i=e}},20),i<e&&(r.push({from:i,to:e}),n+=e-i),{total:n,ranges:r}}(e.from,e.to,this.stateDeco);if(i.total<n)return;let a,l,d=this.scrollTarget?this.scrollTarget.range.head:null;if(o){let t,o,n=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=d){let r=Gd(i,d),a=((this.visibleBottom-this.visibleTop)/2+n)/e.height;t=r-a,o=r+a}else t=(this.visibleTop-e.top-n)/e.height,o=(this.visibleBottom-e.top+n)/e.height;a=Nd(i,t),l=Nd(i,o)}else{let o=i.total*this.heightOracle.charWidth,n=r*this.heightOracle.charWidth,s=0;if(o>2e6)for(let o of t)o.from>=e.from&&o.from<e.to&&o.size!=o.displaySize&&o.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=o.size-o.displaySize);let c,h,p=this.pixelViewport.left+s,u=this.pixelViewport.right+s;if(null!=d){let t=Gd(i,d),e=((u-p)/2+n)/o;c=t-e,h=t+e}else c=(p-n)/o,h=(u+n)/o;a=Nd(i,c),l=Nd(i,h)}a>e.from&&s(e.from,a,e,i),l<e.to&&s(l,e.to,e,i)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(l):l(t);return a}gapSize(t,e,o,r){let i=Gd(r,o)-Gd(r,e);return this.heightOracle.lineWrapping?t.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(t){Wd.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=vs.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let o=[];Bn.spans(e,this.viewport.from,this.viewport.to,{span(t,e){o.push({from:t,to:e})},point(){}},20);let r=0;if(o.length!=this.visibleRanges.length)r=12;else for(let e=0;e<o.length&&!(8&r);e++){let i=this.visibleRanges[e],n=o[e];i.from==n.from&&i.to==n.to||(r|=4,t&&t.mapPos(i.from,-1)==n.from&&t.mapPos(i.to,1)==n.to||(r|=8))}return this.visibleRanges=o,r}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Kd(this.heightMap.lineAt(t,Zd.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||Kd(this.heightMap.lineAt(this.scaler.fromDOM(t),Zd.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Kd(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Id{constructor(t,e){this.from=t,this.to=e}}function Nd({total:t,ranges:e},o){if(o<=0)return e[0].from;if(o>=1)return e[e.length-1].to;let r=Math.floor(t*o);for(let t=0;;t++){let{from:o,to:i}=e[t],n=i-o;if(r<=n)return o+r;r-=n}}function Gd(t,e){let o=0;for(let{from:r,to:i}of t.ranges){if(e<=i){o+=e-r;break}o+=i-r}return o/t.total}const Fd={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class Hd{constructor(t,e,o){let r=0,i=0,n=0;this.viewports=o.map((({from:o,to:i})=>{let n=e.lineAt(o,Zd.ByPos,t,0,0).top,a=e.lineAt(i,Zd.ByPos,t,0,0).bottom;return r+=a-n,{from:o,to:i,top:n,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=n+(t.top-i)*this.scale,n=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.top)return r+(t-o)*this.scale;if(t<=i.bottom)return i.domTop+(t-i.top);o=i.bottom,r=i.domBottom}}fromDOM(t){for(let e=0,o=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.domTop)return o+(t-r)/this.scale;if(t<=i.domBottom)return i.top+(t-i.domTop);o=i.bottom,r=i.domBottom}}eq(t){return t instanceof Hd&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,o)=>e.from==t.viewports[o].from&&e.to==t.viewports[o].to))}}function Kd(t,e){if(1==e.scale)return t;let o=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Rd(t.from,t.length,o,r-o,Array.isArray(t._content)?t._content.map((t=>Kd(t,e))):t._content)}const Jd=en.define({combine:t=>t.join(" ")}),tc=en.define({combine:t=>t.indexOf(!0)>-1}),ec=la.newName(),oc=la.newName(),rc=la.newName(),ic={"&light":"."+oc,"&dark":"."+rc};function nc(t,e,o){return new la(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!o||!o[e])throw new RangeError(`Unsupported selector: ${e}`);return o[e]})):t+" "+e})}const ac=nc("."+ec,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-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",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ic),sc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},lc=rs.ie&&rs.ie_version<=11;class dc{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new Ca,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=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(rs.ie&&rs.ie_version<=11||rs.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||rs.chrome&&rs.chrome_version<126||(this.editContext=new pc(t),t.state.facet(hl)&&(t.contentDOM.editContext=this.editContext.editContext)),lc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,o)=>e!=t[o])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(hl)?o.root.activeElement!=this.dom:!Oa(this.dom,r))return;let i=r.anchorNode&&o.docView.nearest(r.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(rs.ie&&rs.ie_version<=11||rs.android&&rs.chrome)&&!o.state.selection.main.empty&&r.focusNode&&ya(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=ga(t.root);if(!e)return!1;let o=rs.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return hc(t,o)}let o=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),o=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),o?hc(t,o):null}(this.view,e)||e;if(!o||this.selectionRange.eq(o))return!1;let r=Oa(this.dom,o);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let o=e.focusNode,r=e.focusOffset;if(!o||e.anchorNode!=o||e.anchorOffset!=r)return!1;for(r=Math.min(r,Sa(o));;)if(r){if(1!=o.nodeType)return!1;let t=o.childNodes[r-1];"false"==t.contentEditable?r--:(o=t,r=Sa(o))}else{if(o==t)return!0;r=wa(o),o=o.parentNode}}(this.dom,o)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let o=this.dom;o;)if(1==o.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==o?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sc),lc&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),lc&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var o;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&Ma(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(o=this.delayedAndroidKey)||void 0===o?void 0:o.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 t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,o=-1,r=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:o}=t):(e=Math.min(t.from,e),o=Math.max(t.to,o)))}return{from:e,to:o,typeOver:r}}readChange(){let{from:t,to:e,typeOver:o}=this.processRecords(),r=this.selectionChanged&&Oa(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Nl(this.view,t,e,o);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let o=this.view.state,r=Gl(this.view,e);return this.view.state==o&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let o=cc(e,t.previousSibling||t.target.previousSibling,-1),r=cc(e,t.nextSibling||t.target.nextSibling,1);return{from:o?e.posAfter(o):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(hl)!=t.state.facet(hl)&&(t.view.contentDOM.editContext=t.state.facet(hl)?this.editContext.editContext:null))}destroy(){var t,e,o;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(o=this.resizeScroll)||void 0===o||o.disconnect();for(let t of this.scrollTargets)t.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 cc(t,e,o){for(;e;){let r=Ua.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:o>0?e.nextSibling:e.previousSibling}return null}function hc(t,e){let o=e.startContainer,r=e.startOffset,i=e.endContainer,n=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return ya(a.node,a.offset,i,n)&&([o,r,i,n]=[i,n,o,r]),{anchorNode:o,anchorOffset:r,focusNode:i,focusOffset:n}}class pc{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let o=t.state.selection.main,{anchor:r,head:i}=o,n=this.toEditorPos(e.updateRangeStart),a=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:n,drifted:!1});let s={from:n,to:a,insert:$i.of(e.text.split("\n"))};if(s.from==this.from&&r<this.from?s.from=r:s.to==this.to&&r>this.to&&(s.to=r),s.from!=s.to||s.insert.length){if((rs.mac||rs.android)&&s.from==i-1&&/^\. ?$/.test(e.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(s={from:n,to:a,insert:$i.of([e.text.replace("."," ")])}),this.pendingContextChange=s,!t.state.readOnly){let o=this.to-this.from+(s.to-s.from+s.insert.length);Fl(t,s,Ki.single(this.toEditorPos(e.selectionStart,o),this.toEditorPos(e.selectionEnd,o)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))}else{let r=Ki.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd));r.main.eq(o)||t.dispatch({selection:r,userEvent:"select"})}},this.handlers.characterboundsupdate=o=>{let r=[],i=null;for(let e=this.toEditorPos(o.rangeStart),n=this.toEditorPos(o.rangeEnd);e<n;e++){let o=t.coordsForChar(e);i=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||i||new DOMRect,r.push(i)}e.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=e=>{let o=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if("None"!=e&&"None"!=r){let i=this.toEditorPos(t.rangeStart),n=this.toEditorPos(t.rangeEnd);if(i<n){let t=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==r?1:2}px`;o.push(vs.mark({attributes:{style:t}}).range(i,n))}}}t.dispatch({effects:dl.of(vs.set(o))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=ga(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,o=!1,r=this.pendingContextChange;return t.changes.iterChanges(((i,n,a,s,l)=>{if(o)return;let d=l.length-(n-i);if(r&&n>=r.to){if(r.from==i&&r.to==n&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=d,void(this.to+=d);r=null,this.revertPending(t.state)}if(i+=e,(n+=e)<=this.from)this.from+=d,this.to+=d;else if(i<this.to){if(i<this.from||n>this.to||this.to-this.from+l.length>3e4)return void(o=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(n),l.toString()),this.to+=d}e+=d})),r&&!o&&this.revertPending(t.state),!o}update(t){let e=this.pendingContextChange,o=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(o.from,o.to)&&t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==o&&this.editContext.selectionEnd==r||this.editContext.updateSelection(o,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let o=this.composing;return o&&o.drifted?o.editorBase+(t-o.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class uc{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var 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),t.parent&&t.parent.appendChild(this.dom);let{dispatch:o}=t;this.dispatchTransactions=t.dispatchTransactions||o&&(t=>t.forEach((t=>o(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Yd(t.state||_n.create(t)),t.scrollTo&&t.scrollTo.is(ll)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ul).map((t=>new fl(t)));for(let t of this.plugins)t.update(this);this.observer=new dc(this),this.inputState=new Hl(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Pl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof Cn?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,o=!1,r=!1,i=this.state;for(let e of t){if(e.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=e.state}if(this.destroyed)return void(this.viewState.state=i);let n=this.hasFocus,a=0,s=null;t.some((t=>t.annotation(yd)))?(this.inputState.notifiedFocused=n,a=1):n!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=n,s=wd(i,n),s||(a=1));let l=this.observer.delayedAndroidKey,d=null;if(l?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(_n.phrases)!=this.state.facet(_n.phrases))return this.setState(i);e=$l.create(this,i,t),e.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new sl(t.empty?t:Ki.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(ll)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=bc.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),o=this.docView.update(e),this.state.facet(Sl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(o,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(Jd)!=e.state.facet(Jd)&&(this.viewState.mustMeasureContent=!0),(o||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(Js))try{t(e)}catch(t){cl(this.state,t,"update listener")}(s||d)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),d&&!Gl(this,d)&&l.force&&Ma(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Yd(t),this.plugins=t.facet(ul).map((t=>new fl(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Pl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(ul),o=t.state.facet(ul);if(e!=o){let r=[];for(let i of o){let o=e.indexOf(i);if(o<0)r.push(new fl(i));else{let e=this.plugins[o];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){cl(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:n}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(n=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(n<0)if(ja(o))i=-1,n=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);i=t.from,n=t.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((t=>{try{return t.read(this)}catch(t){return cl(this.state,t),fc}})),d=$l.create(this,this.state,[]),c=!1;d.flags|=a,e?e.flags|=a:e=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),c=this.docView.update(d),c&&this.docViewUpdate());for(let t=0;t<s.length;t++)if(l[t]!=fc)try{let e=s[t];e.write&&e.write(l[t],this)}catch(t){cl(this.state,t)}if(c&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,n=-1;continue}{let t=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-n;if(t>1||t<-1){r+=t,o.scrollTop=r/this.scaleY,n=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(Js))t(e)}get themeClasses(){return ec+" "+(this.state.facet(tc)?rc:oc)+" "+this.state.facet(Jd)}updateAttrs(){let t=gc(this,bl,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(hl)?"true":"false",class:"cm-content",style:`${rs.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),gc(this,gl,e);let o=this.observer.ignore((()=>{let o=ms(this.contentDOM,this.contentAttrs,e),r=ms(this.dom,this.editorAttrs,t);return o||r}));return this.editorAttrs=t,this.contentAttrs=e,o}showAnnouncements(t){let e=!0;for(let o of t)for(let t of o.effects)t.is(uc.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(Sl);let t=this.state.facet(uc.cspNonce);la.mount(this.root,this.styleModules.concat(ac).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.spec!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null),e&&e.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(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,o){return Ll(this,t,Ul(this,t,e,o))}moveByGroup(t,e){return Ll(this,t,Ul(this,t,e,(e=>function(t,e,o){let r=t.state.charCategorizer(e),i=r(o);return t=>{let e=r(t);return i==jn.Space&&(i=e),i==e}}(this,t.head,e))))}visualLineSide(t,e){let o=this.bidiSpans(t),r=this.textDirectionAt(t.from),i=o[e?o.length-1:0];return Ki.cursor(i.side(e,r)+t.from,i.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,o=!0){return function(t,e,o,r){let i=Dl(t,e.head),n=r&&i.type==gs.Text&&(t.lineWrapping||i.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(n){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(i.from),a=t.posAtCoords({x:o==(r==Rs.LTR)?e.right-1:e.left+1,y:(n.top+n.bottom)/2});if(null!=a)return Ki.cursor(a,o?-1:1)}return Ki.cursor(o?i.to:i.from,o?-1:1)}(this,t,e,o)}moveVertically(t,e,o){return Ll(this,t,function(t,e,o,r){let i=e.head,n=o?1:-1;if(i==(o?t.state.doc.length:0))return Ki.cursor(i,e.assoc);let a,s=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),d=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(d)null==s&&(s=d.left-l.left),a=n<0?d.top:d.bottom;else{let e=t.viewState.lineBlockAt(i);null==s&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-e.from))),a=(n<0?e.top:e.bottom)+c}let h=l.left+s,p=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let o=a+(p+e)*n,r=Xl(t,{x:h,y:o},!1,n);if(o<l.top||o>l.bottom||(n<0?r<i:r>i)){let e=t.docView.coordsForChar(r),i=!e||o<e.top?-1:1;return Ki.cursor(r,i,void 0,s)}}}(this,t,e,o))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Xl(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let o=this.docView.coordsAt(t,e);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(t),i=this.bidiSpans(r);return Qa(o,i[Ds.find(i,t-r.from,-1,e)].dir==Rs.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(il)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>mc)return Bs(t.length);let e,o=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==o&&(r.fresh||Us(r.isolates,e=wl(this,t))))return r.order;e||(e=wl(this,t));let r=function(t,e,o){if(!t)return[new Ds(0,0,e==Ts?1:0)];if(e==Zs&&!o.length&&!_s.test(t))return Bs(t.length);if(o.length)for(;t.length>Vs.length;)Vs[Vs.length]=256;let r=[],i=e==Zs?0:1;return Ws(t,i,i,o,0,t.length,r),r}(t.text,o,e);return this.bidiCache.push(new bc(t.from,t.to,o,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||rs.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Ta(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.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(t,e={}){return ll.of(new sl("number"==typeof t?Ki.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,o=this.viewState.scrollAnchorAt(t);return ll.of(new sl(Ki.cursor(o.from),"start","start",o.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return ml.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return ml.define((()=>({})),{eventObservers:t})}static theme(t,e){let o=la.newName(),r=[Jd.of(o),Sl.of(nc(`.${o}`,t))];return e&&e.dark&&r.push(tc.of(!0)),r}static baseTheme(t){return hn.lowest(Sl.of(nc("."+ec,t,ic)))}static findFromDOM(t){var e;let o=t.querySelector(".cm-content"),r=o&&Ua.get(o)||Ua.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}uc.styleModule=Sl,uc.inputHandler=tl,uc.clipboardInputFilter=ol,uc.clipboardOutputFilter=rl,uc.scrollHandler=al,uc.focusChangeEffect=el,uc.perLineTextDirection=il,uc.exceptionSink=Ks,uc.updateListener=Js,uc.editable=hl,uc.mouseSelectionStyle=Hs,uc.dragMovesSelection=Fs,uc.clickAddsSelectionRange=Gs,uc.decorations=vl,uc.outerDecorations=Ol,uc.atomicRanges=xl,uc.bidiIsolatedRanges=yl,uc.scrollMargins=kl,uc.darkTheme=tc,uc.cspNonce=en.define({combine:t=>t.length?t[0]:""}),uc.contentAttributes=gl,uc.editorAttributes=bl,uc.lineWrapping=uc.contentAttributes.of({class:"cm-lineWrapping"}),uc.announce=Pn.define();const mc=4096,fc={};class bc{constructor(t,e,o,r,i,n){this.from=t,this.to=e,this.dir=o,this.isolates=r,this.fresh=i,this.order=n}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let o=[],r=t.length?t[t.length-1].dir:Rs.LTR;for(let i=Math.max(0,t.length-10);i<t.length;i++){let n=t[i];n.dir!=r||e.touchesRange(n.from,n.to)||o.push(new bc(e.mapPos(n.from,1),e.mapPos(n.to,-1),n.dir,n.isolates,!1,n.order))}return o}}function gc(t,e,o){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let e=r[i],n="function"==typeof e?e(t):e;n&&hs(n,o)}return o}const vc=rs.mac?"mac":rs.windows?"win":rs.linux?"linux":"key";function Oc(t,e,o){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==o&&e.shiftKey&&(t="Shift-"+t),t}const xc=hn.default(uc.domEventHandlers({keydown:(t,e)=>$c(kc(e.state),t,e,"editor")})),yc=en.define({enables:xc}),wc=new WeakMap;function kc(t){let e=t.facet(yc),o=wc.get(e);return o||wc.set(e,o=function(t,e=vc){let o=Object.create(null),r=Object.create(null),i=(t,e)=>{let o=r[t];if(null==o)r[t]=e;else if(o!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},n=(t,r,n,a,s)=>{var l,d;let c=o[t]||(o[t]=Object.create(null)),h=r.split(/ (?!$)/).map((t=>function(t,e){const o=t.split(/-(?!$)/);let r,i,n,a,s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;++t){const s=o[t];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==e?a=!0:i=!0}}return r&&(s="Alt-"+s),i&&(s="Ctrl-"+s),a&&(s="Meta-"+s),n&&(s="Shift-"+s),s}(t,e)));for(let e=1;e<h.length;e++){let o=h.slice(0,e).join(" ");i(o,!0),c[o]||(c[o]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=qc={view:e,prefix:o,scope:t};return setTimeout((()=>{qc==r&&(qc=null)}),Sc),!0}]})}let p=h.join(" ");i(p,!1);let u=c[p]||(c[p]={preventDefault:!1,stopPropagation:!1,run:(null===(d=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===d?void 0:d.slice())||[]});n&&u.run.push(n),a&&(u.preventDefault=!0),s&&(u.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=o[e]||(o[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let e in t)t[e].run.push((t=>i(t,Qc)))}let i=r[e]||r.key;if(i)for(let e of t)n(e,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&n(e,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return o}(e.reduce(((t,e)=>t.concat(e)),[]))),o}let qc=null;const Sc=4e3;let Qc=null;function $c(t,e,o,r){Qc=e;let i=function(t){var e=!(ua&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||ma&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?pa:ha)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),n=Di(Xi(i,0))==i.length&&" "!=i,a="",s=!1,l=!1,d=!1;qc&&qc.view==o&&qc.scope==r&&(a=qc.prefix+" ",od.indexOf(e.keyCode)<0&&(l=!0,qc=null));let c,h,p=new Set,u=t=>{if(t){for(let e of t.run)if(!p.has(e)&&(p.add(e),e(o)))return t.stopPropagation&&(d=!0),!0;t.preventDefault&&(t.stopPropagation&&(d=!0),l=!0)}return!1},m=t[r];return m&&(u(m[a+Oc(i,e,!n)])?s=!0:n&&(e.altKey||e.metaKey||e.ctrlKey)&&!(rs.windows&&e.ctrlKey&&e.altKey)&&(c=ha[e.keyCode])&&c!=i?(u(m[a+Oc(c,e,!0)])||e.shiftKey&&(h=pa[e.keyCode])!=i&&h!=c&&u(m[a+Oc(h,e,!1)]))&&(s=!0):n&&e.shiftKey&&u(m[a+Oc(i,e,!0)])&&(s=!0),!s&&u(m._any)&&(s=!0)),l&&(s=!0),s&&d&&e.stopPropagation(),Qc=null,s}class Pc{constructor(t,e,o,r,i){this.className=t,this.left=e,this.top=o,this.width=r,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,o){if(o.empty){let r=t.coordsAtPos(o.head,o.assoc||1);if(!r)return[];let i=Cc(t);return[new Pc(e,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(t,e,o){if(o.to<=t.viewport.from||o.from>=t.viewport.to)return[];let r=Math.max(o.from,t.viewport.from),i=Math.min(o.to,t.viewport.to),n=t.textDirection==Rs.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=Cc(t),d=a.querySelector(".cm-line"),c=d&&window.getComputedStyle(d),h=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),p=s.right-(c?parseInt(c.paddingRight):0),u=Dl(t,r),m=Dl(t,i),f=u.type==gs.Text?u:null,b=m.type==gs.Text?m:null;if(f&&(t.lineWrapping||u.widgetLineBreaks)&&(f=Rc(t,r,1,f)),b&&(t.lineWrapping||m.widgetLineBreaks)&&(b=Rc(t,i,-1,b)),f&&b&&f.from==b.from&&f.to==b.to)return v(O(o.from,o.to,f));{let e=f?O(o.from,null,f):x(u,!1),r=b?O(null,o.to,b):x(m,!0),i=[];return(f||u).to<(b||m).from-(f&&b?1:0)||u.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?i.push(g(h,e.bottom,p,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==gs.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),v(e).concat(i).concat(v(r))}function g(t,o,r,i){return new Pc(e,t-l.left,o-l.top,r-t,i-o)}function v({top:t,bottom:e,horizontal:o}){let r=[];for(let i=0;i<o.length;i+=2)r.push(g(o[i],t,o[i+1],e));return r}function O(e,o,r){let i=1e9,a=-1e9,s=[];function l(e,o,l,d,c){let u=t.coordsAtPos(e,e==r.to?-2:2),m=t.coordsAtPos(l,l==r.from?2:-2);u&&m&&(i=Math.min(u.top,m.top,i),a=Math.max(u.bottom,m.bottom,a),c==Rs.LTR?s.push(n&&o?h:u.left,n&&d?p:m.right):s.push(!n&&d?h:m.left,!n&&o?p:u.right))}let d=null!=e?e:r.from,c=null!=o?o:r.to;for(let r of t.visibleRanges)if(r.to>d&&r.from<c)for(let i=Math.max(r.from,d),n=Math.min(r.to,c);;){let r=t.state.doc.lineAt(i);for(let a of t.bidiSpans(r)){let t=a.from+r.from,s=a.to+r.from;if(t>=n)break;s>i&&l(Math.max(t,i),null==e&&t<=d,Math.min(s,n),null==o&&s>=c,a.dir)}if(i=r.to+1,i>=n)break}return 0==s.length&&l(d,null==e,c,null==o,t.textDirection),{top:i,bottom:a,horizontal:s}}function x(t,e){let o=s.top+(e?t.top:t.bottom);return{top:o,bottom:o,horizontal:[]}}}(t,e,o)}}function Cc(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Rs.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Rc(t,e,o,r){let i=t.coordsAtPos(e,2*o);if(!i)return r;let n=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:n.left+1,y:a}),l=t.posAtCoords({x:n.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class Zc{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(Tc)!=t.state.facet(Tc)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,o=t.facet(Tc);for(;e<o.length&&o[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e])))){let e=this.dom.firstChild,o=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[o].constructor&&r.update(e,this.drawn[o])?(e=e.nextSibling,o++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Tc=en.define();function Ac(t){return[ml.define((e=>new Zc(e,t))),Tc.of(t)]}const Mc=!(rs.ios&&rs.webkit&&rs.webkit_version<534),Ec=en.define({combine:t=>Dn(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function jc(t={}){return[Ec.of(t),Xc,Dc,Vc,nl.of(!0)]}function zc(t){return t.startState.facet(Ec)!=t.state.facet(Ec)}const Xc=Ac({above:!0,markers(t){let{state:e}=t,o=e.facet(Ec),r=[];for(let i of e.selection.ranges){let n=i==e.selection.main;if(i.empty?!n||Mc:o.drawRangeCursor){let e=n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=i.empty?i:Ki.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Pc.forRange(t,e,o))r.push(i)}}return r},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let o=zc(t);return o&&_c(t.state,e),t.docChanged||t.selectionSet||o},mount(t,e){_c(e.state,t)},class:"cm-cursorLayer"});function _c(t,e){e.style.animationDuration=t.facet(Ec).cursorBlinkRate+"ms"}const Dc=Ac({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Pc.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||zc(t),class:"cm-selectionLayer"}),Uc={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Mc&&(Uc[".cm-line"].caretColor=Uc[".cm-content"].caretColor="transparent !important");const Vc=hn.highest(uc.theme(Uc)),Lc=Pn.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Wc=dn.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Lc)?e.value:t),t))}),Bc=ml.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let o=t.state.field(Wc);null==o?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wc)!=o||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Wc),o=null!=e&&t.coordsAtPos(e);if(!o)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:o.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:o.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:o.bottom-o.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:o}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/o+"px",this.cursor.style.height=t.height/o+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Wc)!=t&&this.view.dispatch({effects:Lc.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Yc(t,e,o,r,i){e.lastIndex=0;for(let n,a=t.iterRange(o,r),s=o;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;n=e.exec(a.value);)i(s+n.index,n)}class Ic{constructor(t){const{regexp:e,decoration:o,decorate:r,boundary:i,maxLength:n=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,o,i)=>r(i,o,o+t[0].length,t,e);else if("function"==typeof o)this.addMatch=(t,e,r,i)=>{let n=o(t,e,r);n&&i(r,r+t[0].length,n)};else{if(!o)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,i)=>i(r,r+t[0].length,o)}this.boundary=i,this.maxLength=n}createDeco(t){let e=new Yn,o=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let o=t.visibleRanges;if(1==o.length&&o[0].from==t.viewport.from&&o[0].to==t.viewport.to)return o;let r=[];for(let{from:i,to:n}of o)i=Math.max(t.state.doc.lineAt(i).from,i-e),n=Math.min(t.state.doc.lineAt(n).to,n+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=n:r.push({from:i,to:n});return r}(t,this.maxLength))Yc(t.state.doc,this.regexp,e,r,((e,r)=>this.addMatch(r,t,e,o)));return e.finish()}updateDeco(t,e){let o=1e9,r=-1;return t.docChanged&&t.changes.iterChanges(((e,i,n,a)=>{a>=t.view.viewport.from&&n<=t.view.viewport.to&&(o=Math.min(n,o),r=Math.max(a,r))})),t.viewportMoved||r-o>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),o,r):e}updateRange(t,e,o,r){for(let i of t.visibleRanges){let n=Math.max(i.from,o),a=Math.min(i.to,r);if(a>n){let o=t.state.doc.lineAt(n),r=o.to<a?t.state.doc.lineAt(a):o,s=Math.max(i.from,o.from),l=Math.min(i.to,r.to);if(this.boundary){for(;n>o.from;n--)if(this.boundary.test(o.text[n-1-o.from])){s=n;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let d,c=[],h=(t,e,o)=>c.push(o.range(t,e));if(o==r)for(this.regexp.lastIndex=s-o.from;(d=this.regexp.exec(o.text))&&d.index<l-o.from;)this.addMatch(d,t,d.index+o.from,h);else Yc(t.state.doc,this.regexp,s,l,((e,o)=>this.addMatch(o,t,e,h)));e=e.update({filterFrom:s,filterTo:l,filter:(t,e)=>t<s||e>l,add:c})}}return e}}const Nc=null!=/x/.unicode?"gu":"g",Gc=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Nc),Fc={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Hc=null;const Kc=en.define({combine(t){let e=Dn(t,{render:null,specialChars:Gc,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Hc&&"undefined"!=typeof document&&document.body){let e=document.body.style;Hc=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Hc||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Nc)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Nc)),e}});function Jc(t={}){return[Kc.of(t),th||(th=ml.fromClass(class{constructor(t){this.view=t,this.decorations=vs.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Kc)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Ic({regexp:t.specialChars,decoration:(e,o,r)=>{let{doc:i}=o.state,n=Xi(e[0],0);if(9==n){let t=i.lineAt(r),e=o.state.tabSize,n=ra(t.text,e,r-t.from);return vs.replace({widget:new oh((e-n%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=vs.replace({widget:new eh(t,n)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Kc);t.startState.facet(Kc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let th=null;class eh extends bs{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),o=t.state.phrase("Control character")+" "+(Fc[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,o,e);if(r)return r;let i=document.createElement("span");return i.textContent=e,i.title=o,i.setAttribute("aria-label",o),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class oh extends bs{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const rh=vs.line({class:"cm-activeLine"}),ih=ml.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,o=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(o.push(rh.range(i.from)),e=i.from)}return vs.set(o)}},{decorations:t=>t.decorations}),nh=2e3;function ah(t,e){let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(o),i=o-r.from,n=i>nh?-1:i==r.length?function(t,e){let o=t.coordsAtPos(t.viewport.from);return o?Math.round(Math.abs((o.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):ra(r.text,t.state.tabSize,o-r.from);return{line:r.number,col:n,off:i}}function sh(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return uc.mouseSelectionStyle.of(((t,o)=>e(o)?function(t,e){let o=ah(t,e),r=t.state.selection;return o?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(o.line).from),i=t.state.doc.lineAt(e);o={line:i.number,col:o.col,off:Math.min(o.off,i.length)},r=r.map(t.changes)}},get(e,i,n){let a=ah(t,e);if(!a)return r;let s=function(t,e,o){let r=Math.min(e.line,o.line),i=Math.max(e.line,o.line),n=[];if(e.off>nh||o.off>nh||e.col<0||o.col<0){let a=Math.min(e.off,o.off),s=Math.max(e.off,o.off);for(let e=r;e<=i;e++){let o=t.doc.line(e);o.length<=s&&n.push(Ki.range(o.from+a,o.to+s))}}else{let a=Math.min(e.col,o.col),s=Math.max(e.col,o.col);for(let e=r;e<=i;e++){let o=t.doc.line(e),r=ia(o.text,a,t.tabSize,!0);if(r<0)n.push(Ki.cursor(o.to));else{let e=ia(o.text,s,t.tabSize);n.push(Ki.range(o.from+r,o.from+e))}}}return n}(t.state,o,a);return s.length?n?Ki.create(s.concat(r.ranges)):Ki.create(s):r}}:null}(t,o):null))}const lh={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},dh={style:"cursor: crosshair"};function ch(t={}){let[e,o]=lh[t.key||"Alt"],r=ml.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||o(t))},keyup(t){t.keyCode!=e&&o(t)||this.set(!1)},mousemove(t){this.set(o(t))}}});return[r,uc.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?dh:null}))]}const hh="-10000px";class ph{constructor(t,e,o,r){this.facet=e,this.createTooltipView=o,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let i=null;this.tooltipViews=this.tooltips.map((t=>i=o(t,i)))}update(t,e){var o;let r=t.state.facet(this.facet),i=r.filter((t=>t));if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[],a=e?[]:null;for(let o=0;o<i.length;o++){let r=i[o],s=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(s=t)}if(s<0)n[o]=this.createTooltipView(r,o?n[o-1]:null),a&&(a[o]=!!r.above);else{let r=n[o]=this.tooltipViews[s];a&&(a[o]=e[s]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)n.indexOf(t)<0&&(this.removeTooltipView(t),null===(o=t.destroy)||void 0===o||o.call(t));return e&&(a.forEach(((t,o)=>e[o]=t)),e.length=a.length),this.input=r,this.tooltips=i,this.tooltipViews=n,!0}}function uh(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const mh=en.define({combine:t=>{var e,o,r;return{position:rs.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(o=t.find((t=>t.parent)))||void 0===o?void 0:o.parent)||null,tooltipSpace:(null===(r=t.find((t=>t.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||uh}}}),fh=new WeakMap,bh=ml.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(mh);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new ph(t,xh,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let o=e||t.geometryChanged,r=t.state.facet(mh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;o=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(t,e){let o=t.create(this.view),r=e?e.dom:null;if(o.dom.classList.add("cm-tooltip"),t.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",o.dom.appendChild(t)}return o.dom.style.position=this.position,o.dom.style.top=hh,o.dom.style.left="0px",this.container.insertBefore(o.dom,r),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var t,e,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(o=this.intersectionObserver)||void 0===o||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(rs.gecko)o=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==hh&&"0px"==t.style.left){let e=t.getBoundingClientRect();o=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(o||"absolute"==this.position)if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=ql(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let o=this.manager.tooltipViews[e];return o.getCoords?o.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(mh).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:o}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:o,space:r,scaleX:i,scaleY:n}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],d=this.manager.tooltipViews[s],{dom:c}=d,h=t.pos[s],p=t.size[s];if(!h||!1!==l.clip&&(h.bottom<=Math.max(o.top,r.top)||h.top>=Math.min(o.bottom,r.bottom)||h.right<Math.max(o.left,r.left)-.1||h.left>Math.min(o.right,r.right)+.1)){c.style.top=hh;continue}let u=l.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,m=u?7:0,f=p.right-p.left,b=null!==(e=fh.get(d))&&void 0!==e?e:p.bottom-p.top,g=d.offset||Oh,v=this.view.textDirection==Rs.LTR,O=p.width>r.right-r.left?v?r.left:r.right-p.width:v?Math.max(r.left,Math.min(h.left-(u?14:0)+g.x,r.right-f)):Math.min(Math.max(r.left,h.left-f+(u?14:0)-g.x),r.right-f),x=this.above[s];!l.strictSide&&(x?h.top-b-m-g.y<r.top:h.bottom+b+m+g.y>r.bottom)&&x==r.bottom-h.bottom>h.top-r.top&&(x=this.above[s]=!x);let y=(x?h.top-r.top:r.bottom-h.bottom)-m;if(y<b&&!1!==d.resize){if(y<this.view.defaultLineHeight){c.style.top=hh;continue}fh.set(d,b),c.style.height=(b=y)/n+"px"}else c.style.height&&(c.style.height="");let w=x?h.top-b-m-g.y:h.bottom+m+g.y,k=O+f;if(!0!==d.overlap)for(let t of a)t.left<k&&t.right>O&&t.top<w+b&&t.bottom>w&&(w=x?t.top-b-2-m:t.bottom+m+2);if("absolute"==this.position?(c.style.top=(w-t.parent.top)/n+"px",gh(c,(O-t.parent.left)/i)):(c.style.top=w/n+"px",gh(c,O/i)),u){let t=h.left+(v?g.x:-g.x)-(O+14-7);u.style.left=t/i+"px"}!0!==d.overlap&&a.push({left:O,top:w,right:k,bottom:w+b}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),d.positioned&&d.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=hh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function gh(t,e){let o=parseInt(t.style.left,10);(isNaN(o)||Math.abs(e-o)>1)&&(t.style.left=e+"px")}const vh=uc.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Oh={x:0,y:0},xh=en.define({enables:[bh,vh]}),yh=en.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class wh{static create(t){return new wh(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ph(t,yh,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let o=t.create(this.view);return o.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(o.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&o.mount&&o.mount(this.view),o}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let o of this.manager.tooltipViews){let r=o[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const kh=xh.compute([yh],(t=>{let e=t.facet(yh);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:wh.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class qh{constructor(t,e,o,r,i){this.view=t,this.source=e,this.field=o,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,o=t.docView.nearest(e.target);if(!o)return;let r,i=1;if(o instanceof as)r=o.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let o=t.coordsAtPos(r);if(!o||e.y<o.top||e.y>o.bottom||e.x<o.left-t.defaultCharacterWidth||e.x>o.right+t.defaultCharacterWidth)return;let n=t.bidiSpans(t.state.doc.lineAt(r)).find((t=>t.from<=r&&t.to>=r)),a=n&&n.dir==Rs.RTL?-1:1;i=e.x<o.left?-a:a}let n=this.source(t,r,i);if(null==n?void 0:n.then){let e=this.pending={pos:r};n.then((o=>{this.pending==e&&(this.pending=null,!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])}))}),(e=>cl(t.state,e,"hover tooltip")))}else!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])})}get tooltip(){let t=this.view.plugin(bh),e=t?t.manager.tooltips.findIndex((t=>t.create==wh.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,o;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(t,e){let o,{left:r,right:i,top:n,bottom:a}=t.getBoundingClientRect();if(o=t.querySelector(".cm-tooltip-arrow")){let t=o.getBoundingClientRect();n=Math.min(t.top,n),a=Math.max(t.bottom,a)}return e.clientX>=r-Sh&&e.clientX<=i+Sh&&e.clientY>=n-Sh&&e.clientY<=a+Sh}(i.dom,t)||this.pending){let{pos:i}=r[0]||this.pending,n=null!==(o=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==o?o:i;(i==n?this.view.posAtCoords(this.lastMove)==i:function(t,e,o,r,i){let n=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(n.left>r||n.right<r||n.top>i||Math.min(n.bottom,a)<i)return!1;let s=t.posAtCoords({x:r,y:i},!1);return s>=e&&s<=o}(this.view,i,n,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=o=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(o.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Sh=4;function Qh(t,e={}){let o=Pn.define(),r=dn.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(r,t)))),r.docChanged)){let e=[];for(let o of t){let t=r.changes.mapPos(o.pos,-1,Vi.TrackDel);if(null!=t){let i=Object.assign(Object.create(null),o);i.pos=t,null!=i.end&&(i.end=r.changes.mapPos(i.end)),e.push(i)}}t=e}for(let e of r.effects)e.is(o)&&(t=e.value),e.is(Ph)&&(t=[]);return t},provide:t=>yh.from(t)});return{active:r,extension:[r,ml.define((i=>new qh(i,t,r,o,e.hoverTime||300))),kh]}}function $h(t,e){let o=t.plugin(bh);if(!o)return null;let r=o.manager.tooltips.indexOf(e);return r<0?null:o.manager.tooltipViews[r]}const Ph=Pn.define(),Ch=en.define({combine(t){let e,o;for(let r of t)e=e||r.topContainer,o=o||r.bottomContainer;return{topContainer:e,bottomContainer:o}}});function Rh(t,e){let o=t.plugin(Zh),r=o?o.specs.indexOf(e):-1;return r>-1?o.panels[r]:null}const Zh=ml.fromClass(class{constructor(t){this.input=t.state.facet(Mh),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Ch);this.top=new Th(t,!0,e.topContainer),this.bottom=new Th(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Ch);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Th(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Th(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let o=t.state.facet(Mh);if(o!=this.input){let e=o.filter((t=>t)),r=[],i=[],n=[],a=[];for(let o of e){let e,s=this.specs.indexOf(o);s<0?(e=o(t.view),a.push(e)):(e=this.panels[s],e.update&&e.update(t)),r.push(e),(e.top?i:n).push(e)}this.specs=e,this.panels=r,this.top.sync(i),this.bottom.sync(n);for(let t of a)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>uc.scrollMargins.of((e=>{let o=e.plugin(t);return o&&{top:o.top.scrollMargin(),bottom:o.bottom.scrollMargin()}}))});class Th{constructor(t,e,o){this.view=t,this.top=e,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=Ah(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=Ah(t)}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 t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function Ah(t){let e=t.nextSibling;return t.remove(),e}const Mh=en.define({enables:Zh});class Eh extends Un{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Eh.prototype.elementClass="",Eh.prototype.toDOM=void 0,Eh.prototype.mapMode=Vi.TrackBefore,Eh.prototype.startSide=Eh.prototype.endSide=-1,Eh.prototype.point=!0;const jh=en.define(),zh=en.define(),Xh={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Bn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},_h=en.define();function Dh(t){return[Vh(),_h.of(Object.assign(Object.assign({},Xh),t))]}const Uh=en.define({combine:t=>t.some((t=>t))});function Vh(t){let e=[Lh];return t&&!1===t.fixed&&e.push(Uh.of(!0)),e}const Lh=ml.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(_h).map((e=>new Ih(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(Uh),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,o=t.view.viewport,r=Math.min(e.to,o.to)-Math.max(e.from,o.from);this.syncGutters(r<.8*(o.to-o.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Uh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let o=Bn.iter(this.view.state.facet(jh),this.view.viewport.from),r=[],i=this.gutters.map((t=>new Yh(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==gs.Text&&e){Bh(o,r,n.from);for(let t of i)t.line(this.view,n,r);e=!1}else if(n.widget)for(let t of i)t.widget(this.view,n)}else if(t.type==gs.Text){Bh(o,r,t.from);for(let e of i)e.line(this.view,t,r)}else if(t.widget)for(let e of i)e.widget(this.view,t);for(let t of i)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(_h),o=t.state.facet(_h),r=t.docChanged||t.heightChanged||t.viewportChanged||!Bn.eq(t.startState.facet(jh),t.state.facet(jh),t.view.viewport.from,t.view.viewport.to);if(e==o)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let i=[];for(let r of o){let o=e.indexOf(r);o<0?i.push(new Ih(this.view,r)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)this.dom.appendChild(t.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>uc.scrollMargins.of((e=>{let o=e.plugin(t);return o&&0!=o.gutters.length&&o.fixed?e.textDirection==Rs.LTR?{left:o.dom.offsetWidth*e.scaleX}:{right:o.dom.offsetWidth*e.scaleX}:null}))});function Wh(t){return Array.isArray(t)?t:[t]}function Bh(t,e,o){for(;t.value&&t.from<=o;)t.from==o&&e.push(t.value),t.next()}class Yh{constructor(t,e,o){this.gutter=t,this.height=o,this.i=0,this.cursor=Bn.iter(t.markers,e.from)}addElement(t,e,o){let{gutter:r}=this,i=(e.top-this.height)/t.scaleY,n=e.height/t.scaleY;if(this.i==r.elements.length){let e=new Nh(t,n,i,o);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,n,i,o);this.height=e.bottom,this.i++}line(t,e,o){let r=[];Bh(this.cursor,r,e.from),o.length&&(r=r.concat(o));let i=this.gutter.config.lineMarker(t,e,r);i&&r.unshift(i);let n=this.gutter;(0!=r.length||n.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let o=this.gutter.config.widgetMarker(t,e.widget,e),r=o?[o]:null;for(let o of t.state.facet(zh)){let i=o(t,e.widget,e);i&&(r||(r=[])).push(i)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Ih{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in e.domEventHandlers)this.dom.addEventListener(o,(r=>{let i,n=r.target;if(n!=this.dom&&this.dom.contains(n)){for(;n.parentNode!=this.dom;)n=n.parentNode;let t=n.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=r.clientY;let a=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[o](t,a,r)&&r.preventDefault()}));this.markers=Wh(e.markers(t)),e.initialSpacer&&(this.spacer=new Nh(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Wh(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let o=t.view.viewport;return!Bn.eq(this.markers,e,o.from,o.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Nh{constructor(t,e,o,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,o,r)}update(t,e,o,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!t[o].compare(e[o]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let o="cm-gutterElement",r=this.dom.firstChild;for(let i=0,n=0;;){let a=n,s=i<e.length?e[i++]:null,l=!1;if(s){let t=s.elementClass;t&&(o+=" "+t);for(let t=n;t<this.markers.length;t++)if(this.markers[t].compare(s)){a=t,l=!0;break}}else a=this.markers.length;for(;n<a;){let t=this.markers[n++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(t),r)),l&&n++}this.dom.className=o,this.markers=e}destroy(){this.setMarkers(null,[])}}const Gh=en.define(),Fh=en.define(),Hh=en.define({combine:t=>Dn(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let o=Object.assign({},t);for(let t in e){let r=o[t],i=e[t];o[t]=r?(t,e,o)=>r(t,e,o)||i(t,e,o):i}return o}})});class Kh extends Eh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Jh(t,e){return t.state.facet(Hh).formatNumber(e,t.state)}const tp=_h.compute([Hh],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Gh),lineMarker:(t,e,o)=>o.some((t=>t.toDOM))?null:new Kh(Jh(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,o)=>{for(let r of t.state.facet(Fh)){let i=r(t,e,o);if(i)return i}return null},lineMarkerChange:t=>t.startState.facet(Hh)!=t.state.facet(Hh),initialSpacer:t=>new Kh(Jh(t,op(t.state.doc.lines))),updateSpacer(t,e){let o=Jh(e.view,op(e.view.state.doc.lines));return o==t.number?t:new Kh(o)},domEventHandlers:t.facet(Hh).domEventHandlers})));function ep(t={}){return[Hh.of(t),Vh(),tp]}function op(t){let e=9;for(;e<t;)e=10*e+9;return e}const rp=new class extends Eh{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},ip=jh.compute(["selection"],(t=>{let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>o&&(o=i,e.push(rp.range(i)))}return Bn.of(e)})),np=1024;let ap=0;class sp{constructor(t,e){this.from=t,this.to=e}}class lp{constructor(t={}){this.id=ap++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=hp.match(t)),e=>{let o=t(e);return void 0===o?null:[this,o]}}}lp.closedBy=new lp({deserialize:t=>t.split(" ")}),lp.openedBy=new lp({deserialize:t=>t.split(" ")}),lp.group=new lp({deserialize:t=>t.split(" ")}),lp.isolate=new lp({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),lp.contextHash=new lp({perNode:!0}),lp.lookAhead=new lp({perNode:!0}),lp.mounted=new lp({perNode:!0});class dp{constructor(t,e,o){this.tree=t,this.overlay=e,this.parser=o}static get(t){return t&&t.props&&t.props[lp.mounted.id]}}const cp=Object.create(null);class hp{constructor(t,e,o,r=0){this.name=t,this.props=e,this.id=o,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):cp,o=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new hp(t.name||"",e,t.id,o);if(t.props)for(let o of t.props)if(Array.isArray(o)||(o=o(r)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[o[0].id]=o[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(lp.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let o in t)for(let r of o.split(" "))e[r]=t[o];return t=>{for(let o=t.prop(lp.group),r=-1;r<(o?o.length:0);r++){let i=e[r<0?t.name:o[r]];if(i)return i}}}}hp.none=new hp("",Object.create(null),0,8);class pp{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let o of this.types){let r=null;for(let e of t){let t=e(o);t&&(r||(r=Object.assign({},o.props)),r[t[0].id]=t[1])}e.push(r?new hp(o.name,r,o.id,o.flags):o)}return new pp(e)}}const up=new WeakMap,mp=new WeakMap;var fp;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(fp||(fp={}));class bp{constructor(t,e,o,r,i){if(this.type=t,this.children=e,this.positions=o,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[t,e]of i)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=dp.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let o=t.toString();o&&(e&&(e+=","),e+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Cp(this.topNode,t)}cursorAt(t,e=0,o=0){let r=up.get(this)||this.topNode,i=new Cp(r);return i.moveTo(t,e),up.set(this,i._tree),i}get topNode(){return new wp(this,0,0,null)}resolve(t,e=0){let o=xp(up.get(this)||this.topNode,t,e,!1);return up.set(this,o),o}resolveInner(t,e=0){let o=xp(mp.get(this)||this.topNode,t,e,!0);return mp.set(this,o),o}resolveStack(t,e=0){return function(t,e,o){let r=t.resolveInner(e,o),i=null;for(let t=r instanceof wp?r:r.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(i||(i=[r])).push(n.resolve(e,o)),t=n}else{let n=dp.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let a=new wp(n.tree,n.overlay[0].from+t.from,-1,t);(i||(i=[r])).push(xp(a,e,o,!1))}}return i?$p(i):r}(this,t,e)}iterate(t){let{enter:e,leave:o,from:r=0,to:i=this.length}=t,n=t.mode||0,a=(n&fp.IncludeAnonymous)>0;for(let t=this.cursor(n|fp.IncludeAnonymous);;){let n=!1;if(t.from<=i&&t.to>=r&&(!a&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&o&&(a||!t.type.isAnonymous)&&o(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Ap(hp.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,o)=>new bp(this.type,t,e,o,this.propValues)),t.makeTree||((t,e,o)=>new bp(hp.none,t,e,o)))}static build(t){return function(t){var e;let{buffer:o,nodeSet:r,maxBufferLength:i=np,reused:n=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(o)?new gp(o,o.length):o,l=r.types,d=0,c=0;function h(t,e,o,b,g,v){let{id:O,start:x,end:y,size:w}=s,k=c,q=d;for(;w<0;){if(s.next(),-1==w){let e=n[O];return o.push(e),void b.push(x-t)}if(-3==w)return void(d=O);if(-4==w)return void(c=O);throw new RangeError(`Unrecognized record size: ${w}`)}let S,Q,$=l[O],P=x-t;if(y-x<=i&&(Q=function(t,e){let o=s.fork(),r=0,n=0,l=0,d=o.end-i,c={size:0,start:0,skip:0};t:for(let i=o.pos-t;o.pos>i;){let t=o.size;if(o.id==e&&t>=0){c.size=r,c.start=n,c.skip=l,l+=4,r+=4,o.next();continue}let s=o.pos-t;if(t<0||s<i||o.start<d)break;let h=o.id>=a?4:0,p=o.start;for(o.next();o.pos>s;){if(o.size<0){if(-3!=o.size)break t;h+=4}else o.id>=a&&(h+=4);o.next()}n=p,r+=t,l+=h}return(e<0||r==t)&&(c.size=r,c.start=n,c.skip=l),c.size>4?c:void 0}(s.pos-e,g))){let e=new Uint16Array(Q.size-Q.skip),o=s.pos-Q.size,i=e.length;for(;s.pos>o;)i=f(Q.start,e,i);S=new vp(e,y-Q.start,r),P=Q.start-t}else{let t=s.pos-w;s.next();let e=[],o=[],r=O>=a?O:-1,n=0,l=y;for(;s.pos>t;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-i&&(u(e,o,x,n,s.end,l,r,k,q),n=e.length,l=s.end),s.next()):v>2500?p(x,t,e,o):h(x,t,e,o,r,v+1);if(r>=0&&n>0&&n<e.length&&u(e,o,x,n,x,l,r,k,q),e.reverse(),o.reverse(),r>-1&&n>0){let t=function(t,e){return(o,r,i)=>{let n,a,s=0,l=o.length-1;if(l>=0&&(n=o[l])instanceof bp){if(!l&&n.type==t&&n.length==i)return n;(a=n.prop(lp.lookAhead))&&(s=r[l]+n.length+a)}return m(t,o,r,i,s,e)}}($,q);S=Ap($,e,o,0,e.length,0,y-x,t,t)}else S=m($,e,o,y-x,k-y,q)}o.push(S),b.push(P)}function p(t,e,o,n){let a=[],l=0,d=-1;for(;s.pos>e;){let{id:t,start:e,end:o,size:r}=s;if(r>4)s.next();else{if(d>-1&&e<d)break;d<0&&(d=o-i),a.push(t,e,o),l++,s.next()}}if(l){let e=new Uint16Array(4*l),i=a[a.length-2];for(let t=a.length-3,o=0;t>=0;t-=3)e[o++]=a[t],e[o++]=a[t+1]-i,e[o++]=a[t+2]-i,e[o++]=o;o.push(new vp(e,a[2]-i,r)),n.push(i-t)}}function u(t,e,o,i,n,a,s,l,d){let c=[],h=[];for(;t.length>i;)c.push(t.pop()),h.push(e.pop()+o-n);t.push(m(r.types[s],c,h,a-n,l-a,d)),e.push(n-o)}function m(t,e,o,r,i,n,a){if(n){let t=[lp.contextHash,n];a=a?[t].concat(a):[t]}if(i>25){let t=[lp.lookAhead,i];a=a?[t].concat(a):[t]}return new bp(t,e,o,r,a)}function f(t,e,o){let{id:r,start:i,end:n,size:l}=s;if(s.next(),l>=0&&r<a){let a=o;if(l>4){let r=s.pos-(l-4);for(;s.pos>r;)o=f(t,e,o)}e[--o]=a,e[--o]=n-t,e[--o]=i-t,e[--o]=r}else-3==l?d=r:-4==l&&(c=r);return o}let b=[],g=[];for(;s.pos>0;)h(t.start||0,t.bufferStart||0,b,g,-1,0);let v=null!==(e=t.length)&&void 0!==e?e:b.length?g[0]+b[0].length:0;return new bp(l[t.topID],b.reverse(),g.reverse(),v)}(t)}}bp.empty=new bp(hp.none,[],[],0);class gp{constructor(t,e){this.buffer=t,this.index=e}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 gp(this.buffer,this.index)}}class vp{constructor(t,e,o){this.buffer=t,this.length=e,this.set=o}get type(){return hp.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],o=this.buffer[t+3],r=this.set.types[e],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),o==(t+=4))return i;let n=[];for(;t<o;)n.push(this.childString(t)),t=this.buffer[t+3];return i+"("+n.join(",")+")"}findChild(t,e,o,r,i){let{buffer:n}=this,a=-1;for(let s=t;s!=e&&!(Op(i,r,n[s+1],n[s+2])&&(a=s,o>0));s=n[s+3]);return a}slice(t,e,o){let r=this.buffer,i=new Uint16Array(e-t),n=0;for(let a=t,s=0;a<e;){i[s++]=r[a++],i[s++]=r[a++]-o;let e=i[s++]=r[a++]-o;i[s++]=r[a++]-t,n=Math.max(n,e)}return new vp(i,n,this.set)}}function Op(t,e,o,r){switch(t){case-2:return o<e;case-1:return r>=e&&o<e;case 0:return o<e&&r>e;case 1:return o<=e&&r>e;case 2:return r>e;case 4:return!0}}function xp(t,e,o,r){for(var i;t.from==t.to||(o<1?t.from>=e:t.from>e)||(o>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof wp&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=r?0:fp.IgnoreOverlays;if(r)for(let r=t,a=r.parent;a;r=a,a=r.parent)r instanceof wp&&r.index<0&&(null===(i=a.enter(e,o,n))||void 0===i?void 0:i.from)!=r.from&&(t=a);for(;;){let r=t.enter(e,o,n);if(!r)return t;t=r}}class yp{cursor(t=0){return new Cp(this,t)}getChild(t,e=null,o=null){let r=kp(this,t,e,o);return r.length?r[0]:null}getChildren(t,e=null,o=null){return kp(this,t,e,o)}resolve(t,e=0){return xp(this,t,e,!1)}resolveInner(t,e=0){return xp(this,t,e,!0)}matchContext(t){return qp(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),o=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(o=e,e=t.prevSibling):e=t}return o}get node(){return this}get next(){return this.parent}}class wp extends yp{constructor(t,e,o,r){super(),this._tree=t,this.from=e,this.index=o,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,e,o,r,i=0){for(let n=this;;){for(let{children:a,positions:s}=n._tree,l=e>0?a.length:-1;t!=l;t+=e){let l=a[t],d=s[t]+n.from;if(Op(r,o,d,d+l.length))if(l instanceof vp){if(i&fp.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,e,o-d,r);if(a>-1)return new Qp(new Sp(n,l,t,d),null,a)}else if(i&fp.IncludeAnonymous||!l.type.isAnonymous||Rp(l)){let a;if(!(i&fp.IgnoreMounts)&&(a=dp.get(l))&&!a.overlay)return new wp(a.tree,d,t,n);let s=new wp(l,d,t,n);return i&fp.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(e<0?l.children.length-1:0,e,o,r)}}if(i&fp.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,o=0){let r;if(!(o&fp.IgnoreOverlays)&&(r=dp.get(this._tree))&&r.overlay){let o=t-this.from;for(let{from:t,to:i}of r.overlay)if((e>0?t<=o:t<o)&&(e<0?i>=o:i>o))return new wp(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,o)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 kp(t,e,o,r){let i=t.cursor(),n=[];if(!i.firstChild())return n;if(null!=o)for(let t=!1;!t;)if(t=i.type.is(o),!i.nextSibling())return n;for(;;){if(null!=r&&i.type.is(r))return n;if(i.type.is(e)&&n.push(i.node),!i.nextSibling())return null==r?n:[]}}function qp(t,e,o=e.length-1){for(let r=t;o>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[o]&&e[o]!=r.name)return!1;o--}}return!0}class Sp{constructor(t,e,o,r){this.parent=t,this.buffer=e,this.index=o,this.start=r}}class Qp extends yp{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(t,e,o){super(),this.context=t,this._parent=e,this.index=o,this.type=t.buffer.set.types[t.buffer.buffer[o]]}child(t,e,o){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,o);return i<0?null:new Qp(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,o=0){if(o&fp.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return i<0?null:new Qp(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Qp(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Qp(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:o}=this.context,r=this.index+4,i=o.buffer[this.index+3];if(i>r){let n=o.buffer[this.index+1];t.push(o.slice(r,i,n)),e.push(0)}return new bp(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function $p(t){if(!t.length)return null;let e=0,o=t[0];for(let r=1;r<t.length;r++){let i=t[r];(i.from>o.from||i.to<o.to)&&(o=i,e=r)}let r=o instanceof wp&&o.index<0?null:o.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Pp(i,o)}class Pp{constructor(t,e){this.heads=t,this.node=e}get next(){return $p(this.heads)}}class Cp{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof wp)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:o,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=o+r.buffer[t+1],this.to=o+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof wp?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,o){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,o,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,o);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,o=this.mode){return this.buffer?!(o&fp.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fp.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&fp.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,o=this.stack.length-1;if(t<0){let t=o<0?0:this.stack[o]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(o<0?e.buffer.length:e.buffer[this.stack[o]+3]))return this.yieldBuf(t)}return o<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,o,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:o}=r)}else({index:e,_parent:o}=this._tree);for(;o;({index:e,_parent:o}=o))if(e>-1)for(let r=e+t,i=t<0?-1:o._tree.children.length;r!=i;r+=t){let t=o._tree.children[r];if(this.mode&fp.IncludeAnonymous||t instanceof vp||!t.type.isAnonymous||Rp(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,o=0;if(t&&t.context==this.buffer)t:for(let r=this.index,i=this.stack.length;i>=0;){for(let n=t;n;n=n._parent)if(n.index==r){if(r==this.index)return n;e=n,o=i+1;break t}r=this.stack[--i]}for(let t=o;t<this.stack.length;t++)e=new Qp(this.buffer,e,this.stack[t]);return this.bufferNode=new Qp(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let o=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&e&&e(this),r=this.type.isAnonymous,!o)return;if(this.nextSibling())break;this.parent(),o--,r=!0}}}matchContext(t){if(!this.buffer)return qp(this.node.parent,t);let{buffer:e}=this.buffer,{types:o}=e.set;for(let r=t.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return qp(this._tree,t,r);let n=o[e.buffer[this.stack[i]]];if(!n.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}}function Rp(t){return t.children.some((t=>t instanceof vp||!t.type.isAnonymous||Rp(t)))}const Zp=new WeakMap;function Tp(t,e){if(!t.isAnonymous||e instanceof vp||e.type!=t)return 1;let o=Zp.get(e);if(null==o){o=1;for(let r of e.children){if(r.type!=t||!(r instanceof bp)){o=1;break}o+=Tp(t,r)}Zp.set(e,o)}return o}function Ap(t,e,o,r,i,n,a,s,l){let d=0;for(let o=r;o<i;o++)d+=Tp(t,e[o]);let c=Math.ceil(1.5*d/8),h=[],p=[];return function e(o,r,i,a,s){for(let d=i;d<a;){let i=d,u=r[d],m=Tp(t,o[d]);for(d++;d<a;d++){let e=Tp(t,o[d]);if(m+e>=c)break;m+=e}if(d==i+1){if(m>c){let t=o[i];e(t.children,t.positions,0,t.children.length,r[i]+s);continue}h.push(o[i])}else{let e=r[d-1]+o[d-1].length-u;h.push(Ap(t,o,r,i,d,u,e,null,l))}p.push(u+s-n)}}(e,o,r,i,0),(s||l)(h,p,a)}class Mp{constructor(){this.map=new WeakMap}setBuffer(t,e,o){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,o)}getBuffer(t,e){let o=this.map.get(t);return o&&o.get(e)}set(t,e){t instanceof Qp?this.setBuffer(t.context.buffer,t.index,e):t instanceof wp&&this.map.set(t.tree,e)}get(t){return t instanceof Qp?this.getBuffer(t.context.buffer,t.index):t instanceof wp?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Ep{constructor(t,e,o,r,i=!1,n=!1){this.from=t,this.to=e,this.tree=o,this.offset=r,this.open=(i?1:0)|(n?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],o=!1){let r=[new Ep(0,t.length,t,0,!1,o)];for(let o of e)o.to>t.length&&r.push(o);return r}static applyChanges(t,e,o=128){if(!e.length)return t;let r=[],i=1,n=t.length?t[0]:null;for(let a=0,s=0,l=0;;a++){let d=a<e.length?e[a]:null,c=d?d.fromA:1e9;if(c-s>=o)for(;n&&n.from<c;){let e=n;if(s>=e.from||c<=e.to||l){let t=Math.max(e.from,s)-l,o=Math.min(e.to,c)-l;e=t>=o?null:new Ep(t,o,e.tree,e.offset+l,a>0,!!d)}if(e&&r.push(e),n.to>c)break;n=i<t.length?t[i++]:null}if(!d)break;s=d.toA,l=d.toA-d.toB}return r}}class jp{startParse(t,e,o){return"string"==typeof t&&(t=new zp(t)),o=o?o.length?o.map((t=>new sp(t.from,t.to))):[new sp(0,0)]:[new sp(0,t.length)],this.createParse(t,e||[],o)}parse(t,e,o){let r=this.startParse(t,e,o);for(;;){let t=r.advance();if(t)return t}}}class zp{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class Xp{constructor(t,e,o,r,i){this.parser=t,this.parse=e,this.overlay=o,this.target=r,this.from=i}}function _p(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Dp{constructor(t,e,o,r,i,n,a){this.parser=t,this.predicate=e,this.mounts=o,this.index=r,this.start=i,this.target=n,this.prev=a,this.depth=0,this.ranges=[]}}const Up=new lp({perNode:!0});class Vp{constructor(t,e,o,r,i){this.nest=e,this.input=o,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new bp(t.type,t.children,t.positions,t.length,t.propValues.concat([[Up,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let o=Object.assign(Object.create(null),t.target.props);o[lp.mounted.id]=new dp(e,t.overlay,t.parser),t.target.props=o}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new Ip(this.fragments),e=null,o=null,r=new Cp(new wp(this.baseTree,this.ranges[0].from,0,null),fp.IncludeAnonymous|fp.IgnoreMounts);t:for(let i,n;;){let a,s=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)s=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find((t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay));if(t)for(let o of t.mount.overlay){let i=o.from+t.pos,n=o.to+t.pos;i>=r.from&&n<=r.to&&!e.ranges.some((t=>t.from<n&&t.to>i))&&e.ranges.push({from:i,to:n})}}s=!1}else if(o&&(n=Lp(o.ranges,r.from,r.to)))s=2!=n;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.from<r.to||!i.overlay)){r.tree||Bp(r);let n=t.findMounts(r.from,i.parser);if("function"==typeof i.overlay)e=new Dp(i.parser,i.overlay,n,this.inner.length,r.from,r.tree,e);else{let t=Np(this.ranges,i.overlay||(r.from<r.to?[new sp(r.from,r.to)]:[]));t.length&&_p(t),!t.length&&i.overlay||this.inner.push(new Xp(i.parser,t.length?i.parser.startParse(this.input,Fp(n,t),t):i.parser.startParse(""),i.overlay?i.overlay.map((t=>new sp(t.from-r.from,t.to-r.from))):null,r.tree,t.length?t[0].from:r.from)),i.overlay?t.length&&(o={ranges:t,depth:0,prev:o}):s=!1}}else if(e&&(a=e.predicate(r))&&(!0===a&&(a=new sp(r.from,r.to)),a.from<a.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==a.from?e.ranges[t]={from:e.ranges[t].from,to:a.to}:e.ranges.push(a)}if(s&&r.firstChild())e&&e.depth++,o&&o.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=Np(this.ranges,e.ranges);t.length&&(_p(t),this.inner.splice(e.index,0,new Xp(e.parser,e.parser.startParse(this.input,Fp(e.mounts,t),t),e.ranges.map((t=>new sp(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}o&&! --o.depth&&(o=o.prev)}}}}function Lp(t,e,o){for(let r of t){if(r.from>=o)break;if(r.to>e)return r.from<=e&&r.to>=o?2:1}return 0}function Wp(t,e,o,r,i,n){if(e<o){let a=t.buffer[e+1];r.push(t.slice(e,o,a)),i.push(a-n)}}function Bp(t){let{node:e}=t,o=[],r=e.context.buffer;do{o.push(t.index),t.parent()}while(!t.tree);let i=t.tree,n=i.children.indexOf(r),a=i.children[n],s=a.buffer,l=[n];i.children[n]=function t(r,i,n,d,c,h){let p=o[h],u=[],m=[];Wp(a,r,p,u,m,d);let f=s[p+1],b=s[p+2];l.push(u.length);let g=h?t(p+4,s[p+3],a.set.types[s[p]],f,b-f,h-1):e.toTree();return u.push(g),m.push(f-d),Wp(a,s[p+3],i,u,m,d),new bp(n,u,m,c)}(0,s.length,hp.none,0,a.length,o.length-1);for(let e of l){let o=t.tree.children[e],r=t.tree.positions[e];t.yield(new wp(o,r+t.from,e,t._tree))}}class Yp{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(fp.IncludeAnonymous|fp.IgnoreMounts)}moveTo(t){let{cursor:e}=this,o=t-this.offset;for(;!this.done&&e.from<o;)e.to>=t&&e.enter(o,1,fp.IgnoreOverlays|fp.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof bp))break;e=e.children[0]}return!1}}class Ip{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let o=this.curFrag=t[0];this.curTo=null!==(e=o.tree.prop(Up))&&void 0!==e?e:o.to,this.inner=new Yp(o.tree,-o.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(Up))&&void 0!==t?t:e.to,this.inner=new Yp(e.tree,-e.offset)}}findMounts(t,e){var o;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let i=null===(o=t.tree)||void 0===o?void 0:o.prop(lp.mounted);if(i&&i.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let o=this.fragments[e];if(o.from>=t.to)break;o.tree==this.curFrag.tree&&r.push({frag:o,pos:t.from-o.offset,mount:i})}}}return r}}function Np(t,e){let o=null,r=e;for(let i=1,n=0;i<t.length;i++){let a=t[i-1].to,s=t[i].from;for(;n<r.length;n++){let t=r[n];if(t.from>=s)break;t.to<=a||(o||(r=o=e.slice()),t.from<a?(o[n]=new sp(t.from,a),t.to>s&&o.splice(n+1,0,new sp(s,t.to))):t.to>s?o[n--]=new sp(s,t.to):o.splice(n--,1))}}return r}function Gp(t,e,o,r){let i=0,n=0,a=!1,s=!1,l=-1e9,d=[];for(;;){let c=i==t.length?1e9:a?t[i].to:t[i].from,h=n==e.length?1e9:s?e[n].to:e[n].from;if(a!=s){let t=Math.max(l,o),e=Math.min(c,h,r);t<e&&d.push(new sp(t,e))}if(l=Math.min(c,h),1e9==l)break;c==l&&(a?(a=!1,i++):a=!0),h==l&&(s?(s=!1,n++):s=!0)}return d}function Fp(t,e){let o=[];for(let{pos:r,mount:i,frag:n}of t){let t=r+(i.overlay?i.overlay[0].from:0),a=t+i.tree.length,s=Math.max(n.from,t),l=Math.min(n.to,a);if(i.overlay){let a=Gp(e,i.overlay.map((t=>new sp(t.from+r,t.to+r))),s,l);for(let e=0,r=s;;e++){let s=e==a.length,d=s?l:a[e].from;if(d>r&&o.push(new Ep(r,d,i.tree,-t,n.from>=r||n.openStart,n.to<=d||n.openEnd)),s)break;r=a[e].to}}else o.push(new Ep(s,l,i.tree,-t,n.from>=t||n.openStart,n.to<=a||n.openEnd))}return o}let Hp=0;class Kp{constructor(t,e,o,r){this.name=t,this.set=e,this.base=o,this.modified=r,this.id=Hp++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let o="string"==typeof t?t:"?";if(t instanceof Kp&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let r=new Kp(o,[],null,[]);if(r.set.push(r),e)for(let t of e.set)r.set.push(t);return r}static defineModifier(t){let e=new tu(t);return t=>t.modified.indexOf(e)>-1?t:tu.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let Jp=0;class tu{constructor(t){this.name=t,this.instances=[],this.id=Jp++}static get(t,e){if(!e.length)return t;let o=e[0].instances.find((o=>o.base==t&&function(t,e){return t.length==e.length&&t.every(((t,o)=>t==e[o]))}(e,o.modified)));if(o)return o;let r=[],i=new Kp(t.name,r,t,e);for(let t of e)t.instances.push(i);let n=function(t){let e=[[]];for(let o=0;o<t.length;o++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[o]));return e.sort(((t,e)=>e.length-t.length))}(e);for(let e of t.set)if(!e.modified.length)for(let t of n)r.push(tu.get(e,t));return i}}function eu(t){let e=Object.create(null);for(let o in t){let r=t[o];Array.isArray(r)||(r=[r]);for(let t of o.split(" "))if(t){let o=[],i=2,n=t;for(let e=0;;){if("..."==n&&e>0&&e+3==t.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(n);if(!r)throw new RangeError("Invalid path: "+t);if(o.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let a=t[e++];if(e==t.length&&"!"==a){i=0;break}if("/"!=a)throw new RangeError("Invalid path: "+t);n=t.slice(e)}let a=o.length-1,s=o[a];if(!s)throw new RangeError("Invalid path: "+t);let l=new ru(r,i,a>0?o.slice(0,a):null);e[s]=l.sort(e[s])}}return ou.add(e)}const ou=new lp;class ru{constructor(t,e,o,r){this.tags=t,this.mode=e,this.context=o,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function iu(t,e){let o=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)o[t.id]=e.class;else o[e.tag.id]=e.class;let{scope:r,all:i=null}=e||{};return{style:t=>{let e=i;for(let r of t)for(let t of r.set){let r=o[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function nu(t,e,o,r=0,i=t.length){let n=new au(r,Array.isArray(e)?e:[e],o);n.highlightRange(t.cursor(),r,i,"",n.highlighters),n.flush(i)}ru.empty=new ru([],2,null);class au{constructor(t,e,o){this.at=t,this.highlighters=e,this.span=o,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,o,r,i){let{type:n,from:a,to:s}=t;if(a>=o||s<=e)return;n.isTop&&(i=this.highlighters.filter((t=>!t.scope||t.scope(n))));let l=r,d=function(t){let e=t.type.prop(ou);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||ru.empty,c=function(t,e){let o=null;for(let r of t){let t=r.style(e);t&&(o=o?o+" "+t:t)}return o}(i,d.tags);if(c&&(l&&(l+=" "),l+=c,1==d.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,a),l),d.opaque)return;let h=t.tree&&t.tree.prop(lp.mounted);if(h&&h.overlay){let n=t.node.enter(h.overlay[0].from+a,1),d=this.highlighters.filter((t=>!t.scope||t.scope(h.tree.type))),c=t.firstChild();for(let p=0,u=a;;p++){let m=p<h.overlay.length?h.overlay[p]:null,f=m?m.from+a:s,b=Math.max(e,u),g=Math.min(o,f);if(b<g&&c)for(;t.from<g&&(this.highlightRange(t,b,g,r,i),this.startSpan(Math.min(g,t.to),l),!(t.to>=f)&&t.nextSibling()););if(!m||f>o)break;u=m.to+a,u>e&&(this.highlightRange(n.cursor(),Math.max(e,m.from+a),Math.min(o,u),"",d),this.startSpan(Math.min(o,u),l))}c&&t.parent()}else if(t.firstChild()){h&&(r="");do{if(!(t.to<=e)){if(t.from>=o)break;this.highlightRange(t,e,o,r,i),this.startSpan(Math.min(o,t.to),l)}}while(t.nextSibling());t.parent()}}}const su=Kp.define,lu=su(),du=su(),cu=su(du),hu=su(du),pu=su(),uu=su(pu),mu=su(pu),fu=su(),bu=su(fu),gu=su(),vu=su(),Ou=su(),xu=su(Ou),yu=su(),wu={comment:lu,lineComment:su(lu),blockComment:su(lu),docComment:su(lu),name:du,variableName:su(du),typeName:cu,tagName:su(cu),propertyName:hu,attributeName:su(hu),className:su(du),labelName:su(du),namespace:su(du),macroName:su(du),literal:pu,string:uu,docString:su(uu),character:su(uu),attributeValue:su(uu),number:mu,integer:su(mu),float:su(mu),bool:su(pu),regexp:su(pu),escape:su(pu),color:su(pu),url:su(pu),keyword:gu,self:su(gu),null:su(gu),atom:su(gu),unit:su(gu),modifier:su(gu),operatorKeyword:su(gu),controlKeyword:su(gu),definitionKeyword:su(gu),moduleKeyword:su(gu),operator:vu,derefOperator:su(vu),arithmeticOperator:su(vu),logicOperator:su(vu),bitwiseOperator:su(vu),compareOperator:su(vu),updateOperator:su(vu),definitionOperator:su(vu),typeOperator:su(vu),controlOperator:su(vu),punctuation:Ou,separator:su(Ou),bracket:xu,angleBracket:su(xu),squareBracket:su(xu),paren:su(xu),brace:su(xu),content:fu,heading:bu,heading1:su(bu),heading2:su(bu),heading3:su(bu),heading4:su(bu),heading5:su(bu),heading6:su(bu),contentSeparator:su(fu),list:su(fu),quote:su(fu),emphasis:su(fu),strong:su(fu),link:su(fu),monospace:su(fu),strikethrough:su(fu),inserted:su(),deleted:su(),changed:su(),invalid:su(),meta:yu,documentMeta:su(yu),annotation:su(yu),processingInstruction:su(yu),definition:Kp.defineModifier("definition"),constant:Kp.defineModifier("constant"),function:Kp.defineModifier("function"),standard:Kp.defineModifier("standard"),local:Kp.defineModifier("local"),special:Kp.defineModifier("special")};for(let t in wu){let e=wu[t];e instanceof Kp&&(e.name=t)}var ku;iu([{tag:wu.link,class:"tok-link"},{tag:wu.heading,class:"tok-heading"},{tag:wu.emphasis,class:"tok-emphasis"},{tag:wu.strong,class:"tok-strong"},{tag:wu.keyword,class:"tok-keyword"},{tag:wu.atom,class:"tok-atom"},{tag:wu.bool,class:"tok-bool"},{tag:wu.url,class:"tok-url"},{tag:wu.labelName,class:"tok-labelName"},{tag:wu.inserted,class:"tok-inserted"},{tag:wu.deleted,class:"tok-deleted"},{tag:wu.literal,class:"tok-literal"},{tag:wu.string,class:"tok-string"},{tag:wu.number,class:"tok-number"},{tag:[wu.regexp,wu.escape,wu.special(wu.string)],class:"tok-string2"},{tag:wu.variableName,class:"tok-variableName"},{tag:wu.local(wu.variableName),class:"tok-variableName tok-local"},{tag:wu.definition(wu.variableName),class:"tok-variableName tok-definition"},{tag:wu.special(wu.variableName),class:"tok-variableName2"},{tag:wu.definition(wu.propertyName),class:"tok-propertyName tok-definition"},{tag:wu.typeName,class:"tok-typeName"},{tag:wu.namespace,class:"tok-namespace"},{tag:wu.className,class:"tok-className"},{tag:wu.macroName,class:"tok-macroName"},{tag:wu.propertyName,class:"tok-propertyName"},{tag:wu.operator,class:"tok-operator"},{tag:wu.comment,class:"tok-comment"},{tag:wu.meta,class:"tok-meta"},{tag:wu.invalid,class:"tok-invalid"},{tag:wu.punctuation,class:"tok-punctuation"}]);const qu=new lp;function Su(t){return en.define({combine:t?e=>e.concat(t):void 0})}const Qu=new lp;class $u{constructor(t,e,o=[],r=""){this.data=t,this.name=r,_n.prototype.hasOwnProperty("tree")||Object.defineProperty(_n.prototype,"tree",{get(){return Ru(this)}}),this.parser=e,this.extension=[_u.of(this),_n.languageData.of(((t,e,o)=>{let r=Pu(t,e,o),i=r.type.prop(qu);if(!i)return[];let n=t.facet(i),a=r.type.prop(Qu);if(a){let i=r.resolve(e-r.from,o);for(let e of a)if(e.test(i,t)){let o=t.facet(e.facet);return"replace"==e.type?o:o.concat(n)}}return n}))].concat(o)}isActiveAt(t,e,o=-1){return Pu(t,e,o).type.prop(qu)==this.data}findRegions(t){let e=t.facet(_u);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let o=[],r=(t,e)=>{if(t.prop(qu)==this.data)return void o.push({from:e,to:e+t.length});let i=t.prop(lp.mounted);if(i){if(i.tree.prop(qu)==this.data){if(i.overlay)for(let t of i.overlay)o.push({from:t.from+e,to:t.to+e});else o.push({from:e,to:e+t.length});return}if(i.overlay){let t=o.length;if(r(i.tree,i.overlay[0].from+e),o.length>t)return}}for(let o=0;o<t.children.length;o++){let i=t.children[o];i instanceof bp&&r(i,t.positions[o]+e)}};return r(Ru(t),0),o}get allowsNesting(){return!0}}function Pu(t,e,o){let r=t.facet(_u),i=Ru(t).topNode;if(!r||r.allowsNesting)for(let t=i;t;t=t.enter(e,o,fp.ExcludeBuffers))t.type.isTop&&(i=t);return i}$u.setState=Pn.define();class Cu extends $u{constructor(t,e,o){super(t,e,[],o),this.parser=e}static define(t){let e=Su(t.languageData);return new Cu(e,t.parser.configure({props:[qu.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new Cu(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ru(t){let e=t.field($u.state,!1);return e?e.tree:bp.empty}class Zu{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let o=this.cursorPos-this.string.length;return t<o||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-o,e-o)}}let Tu=null;class Au{constructor(t,e,o=[],r,i,n,a,s){this.parser=t,this.state=e,this.fragments=o,this.tree=r,this.treeLen=i,this.viewport=n,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,e,o){return new Au(t,e,[],bp.empty,0,o,[],null)}startParse(){return this.parser.startParse(new Zu(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=bp.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var o;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(Ep.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(o=this.parse.stoppedAt)&&void 0!==o?o:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Ep.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Tu;Tu=this;try{return t()}finally{Tu=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Mu(t,e.from,e.to);return t}changes(t,e){let{fragments:o,tree:r,treeLen:i,viewport:n,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,o,r,i)=>e.push({fromA:t,toA:o,fromB:r,toB:i}))),o=Ep.applyChanges(o,e),r=bp.empty,i=0,n={from:t.mapPos(n.from,-1),to:t.mapPos(n.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let o=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);o<r&&a.push({from:o,to:r})}}}return new Au(this.parser,e,o,r,i,n,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:o,to:r}=this.skipped[e];o<t.to&&r>t.from&&(this.fragments=Mu(this.fragments,o,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends jp{createParse(e,o,r){let i=r[0].from,n=r[r.length-1].to;return{parsedPos:i,advance(){let e=Tu;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=n,new bp(hp.none,[],[],n-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Tu}}function Mu(t,e,o){return Ep.applyChanges(t,[{fromA:e,toA:o,fromB:e,toB:o}])}class Eu{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),o=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,o)||e.takeTree(),new Eu(e)}static init(t){let e=Math.min(3e3,t.doc.length),o=Au.create(t.facet(_u).parser,t,{from:0,to:e});return o.work(20,e)||o.takeTree(),new Eu(o)}}$u.state=dn.define({create:Eu.init,update(t,e){for(let t of e.effects)if(t.is($u.setState))return t.value;return e.startState.facet(_u)!=e.state.facet(_u)?Eu.init(e.state):t.apply(e)}});let ju=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(ju=t=>{let e=-1,o=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(o):cancelIdleCallback(e)});const zu="undefined"!=typeof navigator&&(null===(ku=navigator.scheduling)||void 0===ku?void 0:ku.isInputPending)?()=>navigator.scheduling.isInputPending():null,Xu=ml.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field($u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field($u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=ju(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,i=o.field($u.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let n=Date.now()+Math.min(this.chunkBudget,100,t&&!zu?Math.max(25,t.timeRemaining()-5):1e9),a=i.context.treeLen<r&&o.doc.length>r+1e3,s=i.context.work((()=>zu&&zu()||Date.now()>n),r+(a?0:1e5));this.chunkBudget-=Date.now()-e,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:$u.setState.of(new Eu(i.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>cl(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),_u=en.define({combine:t=>t.length?t[0]:null,enables:t=>[$u.state,Xu,uc.contentAttributes.compute([t],(e=>{let o=e.facet(t);return o&&o.name?{"data-language":o.name}:{}}))]});class Du{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const Uu=en.define(),Vu=en.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Lu(t){let e=t.facet(Vu);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Wu(t,e){let o="",r=t.tabSize,i=t.facet(Vu)[0];if("\t"==i){for(;e>=r;)o+="\t",e-=r;i=" "}for(let t=0;t<e;t++)o+=i;return o}function Bu(t,e){t instanceof _n&&(t=new Yu(t));for(let o of t.state.facet(Uu)){let r=o(t,e);if(void 0!==r)return r}let o=Ru(t.state);return o.length>=e?function(t,e,o){let r=e.resolveStack(o),i=e.resolveInner(o,-1).resolve(o,0).enterUnfinishedNodesBefore(o);if(i!=r.node){let t=[];for(let e=i;e&&(e.from!=r.node.from||e.type!=r.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return Nu(r,t,o)}(t,o,e):null}class Yu{constructor(t,e={}){this.state=t,this.options=e,this.unit=Lu(t)}lineAt(t,e=1){let o=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=o.from&&r<=o.to?i&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(t,e);return o.slice(t-r,Math.min(o.length,t+100-r))}column(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.countColumn(o,t-r),n=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return n>-1&&(i+=n-this.countColumn(o,o.search(/\S|$/))),i}countColumn(t,e=t.length){return ra(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:o,from:r}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(r);if(t>-1)return t}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Iu=new lp;function Nu(t,e,o){for(let r=t;r;r=r.next){let t=Gu(r.node);if(t)return t(Hu.create(e,o,r))}return 0}function Gu(t){let e=t.type.prop(Iu);if(e)return e;let o,r=t.firstChild;if(r&&(o=r.type.prop(lp.closedBy))){let e=t.lastChild,r=e&&o.indexOf(e.name)>-1;return t=>tm(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?Fu:null}function Fu(){return 0}class Hu extends Yu{constructor(t,e,o){super(t.state,t.options),this.base=t,this.pos=e,this.context=o}get node(){return this.context.node}static create(t,e,o){return new Hu(t,e,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let o=t.resolve(e.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(Ku(o,t))break;e=this.state.doc.lineAt(o.from)}return this.lineIndent(e.from)}continue(){return Nu(this.context.next,this.base,this.pos)}}function Ku(t,e){for(let o=e;o;o=o.parent)if(t==o)return!0;return!1}function Ju({closing:t,align:e=!0,units:o=1}){return r=>tm(r,e,o,t)}function tm(t,e,o,r,i){let n=t.textAfter,a=n.match(/^\s*/)[0].length,s=r&&n.slice(a,a+r.length)==r||i==t.pos+a,l=e?function(t){let e=t.node,o=e.childAfter(e.from),r=e.lastChild;if(!o)return null;let i=t.options.simulateBreak,n=t.state.doc.lineAt(o.from),a=null==i||i<=n.from?n.to:Math.min(n.to,i);for(let t=o.to;;){let i=e.childAfter(t);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=a)return null;let t=/^ */.exec(n.text.slice(o.to-n.from))[0].length;return{from:o.from,to:o.to+t}}t=i.to}}(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*o)}function em({except:t,units:e=1}={}){return o=>{let r=t&&t.test(o.textAfter);return o.baseIndent+(r?0:e*o.unit)}}const om=en.define(),rm=new lp;function im(t){let e=t.firstChild,o=t.lastChild;return e&&e.to<o.from?{from:e.to,to:o.type.isError?t.to:o.from}:null}function nm(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function am(t,e,o){for(let r of t.facet(om)){let i=r(t,e,o);if(i)return i}return function(t,e,o){let r=Ru(t);if(r.length<o)return null;let i=null;for(let n=r.resolveStack(o,1);n;n=n.next){let a=n.node;if(a.to<=o||a.from>o)continue;if(i&&a.from<e)break;let s=a.type.prop(rm);if(s&&(a.to<r.length-50||r.length==t.doc.length||!nm(a))){let r=s(a,t);r&&r.from<=o&&r.from>=e&&r.to>o&&(i=r)}}return i}(t,e,o)}function sm(t,e){let o=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return o>=r?void 0:{from:o,to:r}}const lm=Pn.define({map:sm}),dm=Pn.define({map:sm});function cm(t){let e=[];for(let{head:o}of t.state.selection.ranges)e.some((t=>t.from<=o&&t.to>=o))||e.push(t.lineBlockAt(o));return e}const hm=dn.define({create:()=>vs.none,update(t,e){t=t.map(e.changes);for(let o of e.effects)if(o.is(lm)&&!um(t,o.value.from,o.value.to)){let{preparePlaceholder:r}=e.state.facet(vm),i=r?vs.replace({widget:new wm(r(e.state,o.value))}):ym;t=t.update({add:[i.range(o.value.from,o.value.to)]})}else o.is(dm)&&(t=t.update({filter:(t,e)=>o.value.from!=t||o.value.to!=e,filterFrom:o.value.from,filterTo:o.value.to}));if(e.selection){let o=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(o=!0)})),o&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>uc.decorations.from(t),toJSON(t,e){let o=[];return t.between(0,e.doc.length,((t,e)=>{o.push(t,e)})),o},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let o=0;o<t.length;){let r=t[o++],i=t[o++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");e.push(ym.range(r,i))}return vs.set(e,!0)}});function pm(t,e,o){var r;let i=null;return null===(r=t.field(hm,!1))||void 0===r||r.between(e,o,((t,e)=>{(!i||i.from>t)&&(i={from:t,to:e})})),i}function um(t,e,o){let r=!1;return t.between(e,e,((t,i)=>{t==e&&i==o&&(r=!0)})),r}function mm(t,e){return t.field(hm,!1)?e:e.concat(Pn.appendConfig.of(Om()))}function fm(t,e,o=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return uc.announce.of(`${t.state.phrase(o?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const bm=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of cm(t)){let o=am(t.state,e.from,e.to);if(o)return t.dispatch({effects:mm(t.state,[lm.of(o),fm(t,o)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(hm,!1))return!1;let e=[];for(let o of cm(t)){let r=pm(t.state,o.from,o.to);r&&e.push(dm.of(r),fm(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,o=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),n=am(e,i.from,i.to);n&&o.push(lm.of(n)),r=(n?t.lineBlockAt(n.to):i).to+1}return o.length&&t.dispatch({effects:mm(t.state,o)}),!!o.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(hm,!1);if(!e||!e.size)return!1;let o=[];return e.between(0,t.state.doc.length,((t,e)=>{o.push(dm.of({from:t,to:e}))})),t.dispatch({effects:o}),!0}}],gm={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},vm=en.define({combine:t=>Dn(t,gm)});function Om(t){let e=[hm,Qm];return t&&e.push(vm.of(t)),e}function xm(t,e){let{state:o}=t,r=o.facet(vm),i=e=>{let o=t.lineBlockAt(t.posAtDOM(e.target)),r=pm(t.state,o.from,o.to);r&&t.dispatch({effects:dm.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let n=document.createElement("span");return n.textContent=r.placeholderText,n.setAttribute("aria-label",o.phrase("folded code")),n.title=o.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=i,n}const ym=vs.replace({widget:new class extends bs{toDOM(t){return xm(t,null)}}});class wm extends bs{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return xm(t,this.value)}}const km={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class qm extends Eh{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Sm(t={}){let e=Object.assign(Object.assign({},km),t),o=new qm(e,!0),r=new qm(e,!1),i=ml.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(_u)!=t.state.facet(_u)||t.startState.field(hm,!1)!=t.state.field(hm,!1)||Ru(t.startState)!=Ru(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new Yn;for(let i of t.viewportLineBlocks){let n=pm(t.state,i.from,i.to)?r:am(t.state,i.from,i.to)?o:null;n&&e.add(i.from,i.from,n)}return e.finish()}}),{domEventHandlers:n}=e;return[i,Dh({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||Bn.empty},initialSpacer:()=>new qm(e,!1),domEventHandlers:Object.assign(Object.assign({},n),{click:(t,e,o)=>{if(n.click&&n.click(t,e,o))return!0;let r=pm(t.state,e.from,e.to);if(r)return t.dispatch({effects:dm.of(r)}),!0;let i=am(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:lm.of(i)}),!0)}})}),Om()]}const Qm=uc.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class $m{constructor(t,e){let o;function r(t){let e=la.newName();return(o||(o=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?r(e.all):void 0,n=e.scope;this.scope=n instanceof $u?t=>t.prop(qu)==n.data:n?t=>t==n:void 0,this.style=iu(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:i}).style,this.module=o?new la(o):null,this.themeType=e.themeType}static define(t,e){return new $m(t,e||{})}}const Pm=en.define(),Cm=en.define({combine:t=>t.length?[t[0]]:null});function Rm(t){let e=t.facet(Pm);return e.length?e:t.facet(Cm)}function Zm(t,e){let o,r=[Am];return t instanceof $m&&(t.module&&r.push(uc.styleModule.of(t.module)),o=t.themeType),(null==e?void 0:e.fallback)?r.push(Cm.of(t)):o?r.push(Pm.computeN([uc.darkTheme],(e=>e.facet(uc.darkTheme)==("dark"==o)?[t]:[]))):r.push(Pm.of(t)),r}class Tm{constructor(t){this.markCache=Object.create(null),this.tree=Ru(t.state),this.decorations=this.buildDeco(t,Rm(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=Ru(t.state),o=Rm(t.state),r=o!=Rm(t.startState),{viewport:i}=t.view,n=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!r&&e.type==this.tree.type&&n>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=n):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,o),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return vs.none;let o=new Yn;for(let{from:r,to:i}of t.visibleRanges)nu(this.tree,e,((t,e,r)=>{o.add(t,e,this.markCache[r]||(this.markCache[r]=vs.mark({class:r})))}),r,i);return o.finish()}}const Am=hn.high(ml.fromClass(Tm,{decorations:t=>t.decorations})),Mm=$m.define([{tag:wu.meta,color:"#404740"},{tag:wu.link,textDecoration:"underline"},{tag:wu.heading,textDecoration:"underline",fontWeight:"bold"},{tag:wu.emphasis,fontStyle:"italic"},{tag:wu.strong,fontWeight:"bold"},{tag:wu.strikethrough,textDecoration:"line-through"},{tag:wu.keyword,color:"#708"},{tag:[wu.atom,wu.bool,wu.url,wu.contentSeparator,wu.labelName],color:"#219"},{tag:[wu.literal,wu.inserted],color:"#164"},{tag:[wu.string,wu.deleted],color:"#a11"},{tag:[wu.regexp,wu.escape,wu.special(wu.string)],color:"#e40"},{tag:wu.definition(wu.variableName),color:"#00f"},{tag:wu.local(wu.variableName),color:"#30a"},{tag:[wu.typeName,wu.namespace],color:"#085"},{tag:wu.className,color:"#167"},{tag:[wu.special(wu.variableName),wu.macroName],color:"#256"},{tag:wu.definition(wu.propertyName),color:"#00c"},{tag:wu.comment,color:"#940"},{tag:wu.invalid,color:"#f00"}]),Em=uc.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),jm="()[]{}",zm=en.define({combine:t=>Dn(t,{afterCursor:!0,brackets:jm,maxScanDistance:1e4,renderMatch:Dm})}),Xm=vs.mark({class:"cm-matchingBracket"}),_m=vs.mark({class:"cm-nonmatchingBracket"});function Dm(t){let e=[],o=t.matched?Xm:_m;return e.push(o.range(t.start.from,t.start.to)),t.end&&e.push(o.range(t.end.from,t.end.to)),e}const Um=dn.define({create:()=>vs.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let o=[],r=e.state.facet(zm);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=Im(e.state,t.head,-1,r)||t.head>0&&Im(e.state,t.head-1,1,r)||r.afterCursor&&(Im(e.state,t.head,1,r)||t.head<e.state.doc.length&&Im(e.state,t.head+1,-1,r));i&&(o=o.concat(r.renderMatch(i,e.state)))}return vs.set(o,!0)},provide:t=>uc.decorations.from(t)}),Vm=[Um,Em];function Lm(t={}){return[zm.of(t),Vm]}const Wm=new lp;function Bm(t,e,o){let r=t.prop(e<0?lp.openedBy:lp.closedBy);if(r)return r;if(1==t.name.length){let r=o.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[o[r+e]]}return null}function Ym(t){let e=t.type.prop(Wm);return e?e(t.node):t}function Im(t,e,o,r={}){let i=r.maxScanDistance||1e4,n=r.brackets||jm,a=Ru(t),s=a.resolveInner(e,o);for(let t=s;t;t=t.parent){let r=Bm(t.type,o,n);if(r&&t.from<t.to){let i=Ym(t);if(i&&(o>0?e>=i.from&&e<i.to:e>i.from&&e<=i.to))return Nm(0,0,o,t,i,r,n)}}return function(t,e,o,r,i,n,a){let s=o<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=o>0)return null;let d={from:o<0?e-1:e,to:o>0?e+1:e},c=t.doc.iterRange(e,o>0?t.doc.length:0),h=0;for(let t=0;!c.next().done&&t<=n;){let n=c.value;o<0&&(t+=n.length);let s=e+t*o;for(let t=o>0?0:n.length-1,e=o>0?n.length:-1;t!=e;t+=o){let e=a.indexOf(n[t]);if(!(e<0||r.resolveInner(s+t,1).type!=i))if(e%2==0==o>0)h++;else{if(1==h)return{start:d,end:{from:s+t,to:s+t+1},matched:e>>1==l>>1};h--}}o>0&&(t+=n.length)}return c.done?{start:d,matched:!1}:null}(t,e,o,a,s.type,i,n)}function Nm(t,e,o,r,i,n,a){let s=r.parent,l={from:i.from,to:i.to},d=0,c=null==s?void 0:s.cursor();if(c&&(o<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(o<0?c.to<=r.from:c.from>=r.to){if(0==d&&n.indexOf(c.type.name)>-1&&c.from<c.to){let t=Ym(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Bm(c.type,o,a))d++;else if(Bm(c.type,-o,a)){if(0==d){let t=Ym(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}d--}}}while(o<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const Gm=Object.create(null),Fm=[hp.none],Hm=[],Km=Object.create(null),Jm=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Jm[t]=ef(Gm,e);function tf(t,e){Hm.indexOf(t)>-1||(Hm.push(t),console.warn(e))}function ef(t,e){let o=[];for(let r of e.split(" ")){let e=[];for(let o of r.split(".")){let r=t[o]||wu[o];r?"function"==typeof r?e.length?e=e.map(r):tf(o,`Modifier ${o} used at start of tag`):e.length?tf(o,`Tag ${o} used as modifier`):e=Array.isArray(r)?r:[r]:tf(o,`Unknown highlighting tag ${o}`)}for(let t of e)o.push(t)}if(!o.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+o.map((t=>t.id)),n=Km[i];if(n)return n.id;let a=Km[i]=hp.define({id:Fm.length,name:r,props:[eu({[r]:o})]});return Fm.push(a),a.id}function of(t,e){return({state:o,dispatch:r})=>{if(o.readOnly)return!1;let i=t(e,o);return!!i&&(r(o.update(i)),!0)}}Rs.RTL,Rs.LTR;const rf=of(cf,0),nf=of(df,0),af=of(((t,e)=>df(t,e,function(t){let e=[];for(let o of t.selection.ranges){let r=t.doc.lineAt(o.from),i=o.to<=r.to?r:t.doc.lineAt(o.to);i.from>r.from&&i.from==o.to&&(i=o.to==r.to+1?r:t.doc.lineAt(o.to-1));let n=e.length-1;n>=0&&e[n].to>r.from?e[n].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}(e))),0);function sf(t,e){let o=t.languageDataAt("commentTokens",e);return o.length?o[0]:{}}const lf=50;function df(t,e,o=e.selection.ranges){let r=o.map((t=>sf(e,t.from).block));if(!r.every((t=>t)))return null;let i=o.map(((t,o)=>function(t,{open:e,close:o},r,i){let n,a,s=t.sliceDoc(r-lf,r),l=t.sliceDoc(i,i+lf),d=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,h=s.length-d;if(s.slice(h-e.length,h)==e&&l.slice(c,c+o.length)==o)return{open:{pos:r-d,margin:d&&1},close:{pos:i+c,margin:c&&1}};i-r<=2*lf?n=a=t.sliceDoc(r,i):(n=t.sliceDoc(r,r+lf),a=t.sliceDoc(i-lf,i));let p=/^\s*/.exec(n)[0].length,u=/\s*$/.exec(a)[0].length,m=a.length-u-o.length;return n.slice(p,p+e.length)==e&&a.slice(m,m+o.length)==o?{open:{pos:r+p+e.length,margin:/\s/.test(n.charAt(p+e.length))?1:0},close:{pos:i-u-o.length,margin:/\s/.test(a.charAt(m-1))?1:0}}:null}(e,r[o],t.from,t.to)));if(2!=t&&!i.every((t=>t)))return{changes:e.changes(o.map(((t,e)=>i[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}])))};if(1!=t&&i.some((t=>t))){let t=[];for(let e,o=0;o<i.length;o++)if(e=i[o]){let i=r[o],{open:n,close:a}=e;t.push({from:n.pos-i.open.length,to:n.pos+n.margin},{from:a.pos-a.margin,to:a.pos+i.close.length})}return{changes:t}}return null}function cf(t,e,o=e.selection.ranges){let r=[],i=-1;for(let{from:t,to:n}of o){let o=r.length,a=1e9,s=sf(e,t).line;if(s){for(let o=t;o<=n;){let l=e.doc.lineAt(o);if(l.from>i&&(t==n||n>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,o=l.text.slice(t,t+s.length)==s?t:-1;t<l.text.length&&t<a&&(a=t),r.push({line:l,comment:o,token:s,indent:t,empty:e,single:!1})}o=l.to+1}if(a<1e9)for(let t=o;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=a);r.length==o+1&&(r[o].single=!0)}}if(2!=t&&r.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:o,indent:i,empty:n,single:a}of r)!a&&n||t.push({from:e.from+i,insert:o+" "});let o=e.changes(t);return{changes:o,selection:e.selection.map(o,1)}}if(1!=t&&r.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:o,token:i}of r)if(o>=0){let r=e.from+o,n=r+i.length;" "==e.text[n-e.from]&&n++,t.push({from:r,to:n})}return{changes:t}}return null}const hf=Sn.define(),pf=Sn.define(),uf=en.define(),mf=en.define({combine:t=>Dn(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(o,r)=>t(o,r)||e(o,r)})}),ff=dn.define({create:()=>Tf.empty,update(t,e){let o=e.state.facet(mf),r=e.annotation(hf);if(r){let i=wf.fromTransaction(e,r.selection),n=r.side,a=0==n?t.undone:t.done;return a=i?kf(a,a.length,o.minDepth,i):$f(a,e.startState.selection),new Tf(0==n?r.rest:a,0==n?a:r.rest)}let i=e.annotation(pf);if("full"!=i&&"before"!=i||(t=t.isolate()),!1===e.annotation(Cn.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let n=wf.fromTransaction(e),a=e.annotation(Cn.time),s=e.annotation(Cn.userEvent);return n?t=t.addChanges(n,a,s,o,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,o.newGroupDelay)),"full"!=i&&"after"!=i||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new Tf(t.done.map(wf.fromJSON),t.undone.map(wf.fromJSON))});function bf(t={}){return[ff,mf.of(t),uc.domEventHandlers({beforeinput(t,e){let o="historyUndo"==t.inputType?vf:"historyRedo"==t.inputType?Of:null;return!!o&&(t.preventDefault(),o(e))}})]}function gf(t,e){return function({state:o,dispatch:r}){if(!e&&o.readOnly)return!1;let i=o.field(ff,!1);if(!i)return!1;let n=i.pop(t,o,e);return!!n&&(r(n),!0)}}const vf=gf(0,!1),Of=gf(1,!1),xf=gf(0,!0),yf=gf(1,!0);class wf{constructor(t,e,o,r,i){this.changes=t,this.effects=e,this.mapped=o,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new wf(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,o;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(o=this.startSelection)||void 0===o?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new wf(t.changes&&Wi.fromJSON(t.changes),[],t.mapped&&Li.fromJSON(t.mapped),t.startSelection&&Ki.fromJSON(t.startSelection),t.selectionsAfter.map(Ki.fromJSON))}static fromTransaction(t,e){let o=Sf;for(let e of t.startState.facet(uf)){let r=e(t);r.length&&(o=o.concat(r))}return!o.length&&t.changes.empty?null:new wf(t.changes.invert(t.startState.doc),o,void 0,e||t.startState.selection,Sf)}static selection(t){return new wf(void 0,Sf,void 0,void 0,t)}}function kf(t,e,o,r){let i=e+1>o+20?e-o-1:0,n=t.slice(i,e);return n.push(r),n}function qf(t,e){return t.length?e.length?t.concat(e):t:e}const Sf=[],Qf=200;function $f(t,e){if(t.length){let o=t[t.length-1],r=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-Qf));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),kf(t,t.length-1,1e9,o.setSelAfter(r)))}return[wf.selection([e])]}function Pf(t){let e=t[t.length-1],o=t.slice();return o[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),o}function Cf(t,e){if(!t.length)return t;let o=t.length,r=Sf;for(;o;){let i=Rf(t[o-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,o);return e[o-1]=i,e}e=i.mapped,o--,r=i.selectionsAfter}return r.length?[wf.selection(r)]:Sf}function Rf(t,e,o){let r=qf(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Sf,o);if(!t.changes)return wf.selection(r);let i=t.changes.map(e),n=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(n):n;return new wf(i,Pn.mapEffects(t.effects,e),a,t.startSelection.map(n),r)}const Zf=/^(input\.type|delete)($|\.)/;class Tf{constructor(t,e,o=0,r=void 0){this.done=t,this.undone=e,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new Tf(this.done,this.undone):this}addChanges(t,e,o,r,i){let n=this.done,a=n[n.length-1];return n=a&&a.changes&&!a.changes.empty&&t.changes&&(!o||Zf.test(o))&&(!a.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(t,e){let o=[],r=!1;return t.iterChangedRanges(((t,e)=>o.push(t,e))),e.iterChangedRanges(((t,e,i,n)=>{for(let t=0;t<o.length;){let e=o[t++],a=o[t++];n>=e&&i<=a&&(r=!0)}})),r}(a.changes,t.changes))||"input.type.compose"==o)?kf(n,n.length-1,r.minDepth,new wf(t.changes.compose(a.changes),qf(Pn.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,Sf)):kf(n,n.length,r.minDepth,t),new Tf(n,Sf,e,o)}addSelection(t,e,o,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Sf;return i.length>0&&e-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter(((t,o)=>t.empty!=e.ranges[o].empty)).length}(i[i.length-1],t)?this:new Tf($f(this.done,t),this.undone,e,o)}addMapping(t){return new Tf(Cf(this.done,t),Cf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,o){let r=0==t?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],n=i.selectionsAfter[0]||e.selection;if(o&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:hf.of({side:t,rest:Pf(r),selection:n}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let o=1==r.length?Sf:r.slice(0,r.length-1);return i.mapped&&(o=Cf(o,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:hf.of({side:t,rest:o,selection:n}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}Tf.empty=new Tf(Sf,Sf);const Af=[{key:"Mod-z",run:vf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Of,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Of,preventDefault:!0},{key:"Mod-u",run:xf,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:yf,preventDefault:!0}];function Mf(t,e){return Ki.create(t.ranges.map(e),t.mainIndex)}function Ef(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function jf({state:t,dispatch:e},o){let r=Mf(t.selection,o);return!r.eq(t.selection,!0)&&(e(Ef(t,r)),!0)}function zf(t,e){return Ki.cursor(e?t.to:t.from)}function Xf(t,e){return jf(t,(o=>o.empty?t.moveByChar(o,e):zf(o,e)))}function _f(t){return t.textDirectionAt(t.state.selection.main.head)==Rs.LTR}const Df=t=>Xf(t,!_f(t)),Uf=t=>Xf(t,_f(t));function Vf(t,e){return jf(t,(o=>o.empty?t.moveByGroup(o,e):zf(o,e)))}function Lf(t,e,o){if(e.type.prop(o))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Wf(t,e,o){let r,i,n=Ru(t).resolveInner(e.head),a=o?lp.closedBy:lp.openedBy;for(let r=e.head;;){let e=o?n.childAfter(r):n.childBefore(r);if(!e)break;Lf(t,e,a)?n=e:r=o?e.to:e.from}return i=n.type.prop(a)&&(r=o?Im(t,n.from,1):Im(t,n.to,-1))&&r.matched?o?r.end.to:r.end.from:o?n.to:n.from,Ki.cursor(i,o?-1:1)}function Bf(t,e){return jf(t,(o=>{if(!o.empty)return zf(o,e);let r=t.moveVertically(o,e);return r.head!=o.head?r:t.moveToLineBoundary(o,e)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const Yf=t=>Bf(t,!1),If=t=>Bf(t,!0);function Nf(t){let e,o=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,i=0;if(o){for(let e of t.state.facet(uc.scrollMargins)){let o=e(t);(null==o?void 0:o.top)&&(r=Math.max(null==o?void 0:o.top,r)),(null==o?void 0:o.bottom)&&(i=Math.max(null==o?void 0:o.bottom,i))}e=t.scrollDOM.clientHeight-r-i}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:o,height:Math.max(t.defaultLineHeight,e-5)}}function Gf(t,e){let o,r=Nf(t),{state:i}=t,n=Mf(i.selection,(o=>o.empty?t.moveVertically(o,e,r.height):zf(o,e)));if(n.eq(i.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;e&&e.top>s&&e.bottom<l&&(o=uc.scrollIntoView(n.main.head,{y:"start",yMargin:e.top-s}))}return t.dispatch(Ef(i,n),{effects:o}),!0}const Ff=t=>Gf(t,!1),Hf=t=>Gf(t,!0);function Kf(t,e,o){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,o);if(i.head==e.head&&i.head!=(o?r.to:r.from)&&(i=t.moveToLineBoundary(e,o,!1)),!o&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=Ki.cursor(r.from+o))}return i}function Jf(t,e){let o=Mf(t.state.selection,(t=>{let o=e(t);return Ki.range(t.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)}));return!o.eq(t.state.selection)&&(t.dispatch(Ef(t.state,o)),!0)}function tb(t,e){return Jf(t,(o=>t.moveByChar(o,e)))}const eb=t=>tb(t,!_f(t)),ob=t=>tb(t,_f(t));function rb(t,e){return Jf(t,(o=>t.moveByGroup(o,e)))}function ib(t,e){return Jf(t,(o=>t.moveVertically(o,e)))}const nb=t=>ib(t,!1),ab=t=>ib(t,!0);function sb(t,e){return Jf(t,(o=>t.moveVertically(o,e,Nf(t).height)))}const lb=t=>sb(t,!1),db=t=>sb(t,!0),cb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:0})),!0),hb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.doc.length})),!0),pb=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.selection.main.anchor,head:0})),!0),ub=({state:t,dispatch:e})=>(e(Ef(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function mb(t,e){if(t.state.readOnly)return!1;let o="delete.selection",{state:r}=t,i=r.changeByRange((r=>{let{from:i,to:n}=r;if(i==n){let a=e(r);a<i?(o="delete.backward",a=fb(t,a,!1)):a>i&&(o="delete.forward",a=fb(t,a,!0)),i=Math.min(i,a),n=Math.max(n,a)}else i=fb(t,i,!1),n=fb(t,n,!0);return i==n?{range:r}:{changes:{from:i,to:n},range:Ki.cursor(i,i<r.head?-1:1)}}));return!i.changes.empty&&(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:o,effects:"delete.selection"==o?uc.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function fb(t,e,o){if(t instanceof uc)for(let r of t.state.facet(uc.atomicRanges).map((e=>e(t))))r.between(e,e,((t,r)=>{t<e&&r>e&&(e=o?r:t)}));return e}const bb=(t,e,o)=>mb(t,(r=>{let i,n,a=r.from,{state:s}=t,l=s.doc.lineAt(a);if(o&&!e&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(i=l.text.slice(0,a-l.from))){if("\t"==i[i.length-1])return a-1;let t=ra(i,s.tabSize)%Lu(s)||Lu(s);for(let e=0;e<t&&" "==i[i.length-1-e];e++)a--;n=a}else n=zi(l.text,a-l.from,e,e)+l.from,n==a&&l.number!=(e?s.doc.lines:1)?n+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(n-l.from,a-l.from))&&(n=zi(l.text,n-l.from,!1,!1)+l.from);return n})),gb=t=>bb(t,!1,!0),vb=t=>bb(t,!0,!1),Ob=(t,e)=>mb(t,(o=>{let r=o.head,{state:i}=t,n=i.doc.lineAt(r),a=i.charCategorizer(r);for(let t=null;;){if(r==(e?n.to:n.from)){r==o.head&&n.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let s=zi(n.text,r-n.from,e)+n.from,l=n.text.slice(Math.min(r,s)-n.from,Math.max(r,s)-n.from),d=a(l);if(null!=t&&d!=t)break;" "==l&&r==o.head||(t=d),r=s}return r})),xb=t=>Ob(t,!1);function yb(t){let e=[],o=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),n=t.doc.lineAt(r.to);if(r.empty||r.to!=n.from||(n=t.doc.lineAt(r.to-1)),o>=i.number){let t=e[e.length-1];t.to=n.to,t.ranges.push(r)}else e.push({from:i.from,to:n.to,ranges:[r]});o=n.number+1}return e}function wb(t,e,o){if(t.readOnly)return!1;let r=[],i=[];for(let e of yb(t)){if(o?e.to==t.doc.length:0==e.from)continue;let n=t.doc.lineAt(o?e.to+1:e.from-1),a=n.length+1;if(o){r.push({from:e.to,to:n.to},{from:e.from,insert:n.text+t.lineBreak});for(let o of e.ranges)i.push(Ki.range(Math.min(t.doc.length,o.anchor+a),Math.min(t.doc.length,o.head+a)))}else{r.push({from:n.from,to:e.from},{from:e.to,insert:t.lineBreak+n.text});for(let t of e.ranges)i.push(Ki.range(t.anchor-a,t.head-a))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:Ki.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0)}function kb(t,e,o){if(t.readOnly)return!1;let r=[];for(let e of yb(t))o?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const qb=Qb(!1),Sb=Qb(!0);function Qb(t){return({state:e,dispatch:o})=>{if(e.readOnly)return!1;let r=e.changeByRange((o=>{let{from:r,to:i}=o,n=e.doc.lineAt(r),a=!t&&r==i&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let o,r=Ru(t).resolveInner(e),i=r.childBefore(e),n=r.childAfter(e);return i&&n&&i.to<=e&&n.from>=e&&(o=i.type.prop(lp.closedBy))&&o.indexOf(n.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(n.from).from&&!/\S/.test(t.sliceDoc(i.to,n.from))?{from:i.to,to:n.from}:null}(e,r);t&&(r=i=(i<=n.to?n:e.doc.lineAt(i)).to);let s=new Yu(e,{simulateBreak:r,simulateDoubleBreak:!!a}),l=Bu(s,r);for(null==l&&(l=ra(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));i<n.to&&/\s/.test(n.text[i-n.from]);)i++;a?({from:r,to:i}=a):r>n.from&&r<n.from+100&&!/\S/.test(n.text.slice(0,r))&&(r=n.from);let d=["",Wu(e,l)];return a&&d.push(Wu(e,s.lineIndent(n.from,-1))),{changes:{from:r,to:i,insert:$i.of(d)},range:Ki.cursor(r+1+d[1].length)}}));return o(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function $b(t,e){let o=-1;return t.changeByRange((r=>{let i=[];for(let n=r.from;n<=r.to;){let a=t.doc.lineAt(n);a.number>o&&(r.empty||r.to>a.from)&&(e(a,i,r),o=a.number),n=a.to+1}let n=t.changes(i);return{changes:i,range:Ki.range(n.mapPos(r.anchor,1),n.mapPos(r.head,1))}}))}const Pb=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update($b(t,((e,o)=>{o.push({from:e.from,insert:t.facet(Vu)})})),{userEvent:"input.indent"})),!0),Cb=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update($b(t,((e,o)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let i=ra(r,t.tabSize),n=0,a=Wu(t,Math.max(0,i-Lu(t)));for(;n<r.length&&n<a.length&&r.charCodeAt(n)==a.charCodeAt(n);)n++;o.push({from:e.from+n,to:e.from+r.length,insert:a.slice(n)})})),{userEvent:"delete.dedent"})),!0),Rb=[{key:"ArrowLeft",run:Df,shift:eb,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>Vf(t,!_f(t)),shift:t=>rb(t,!_f(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>jf(t,(e=>Kf(t,e,!_f(t)))),shift:t=>Jf(t,(e=>Kf(t,e,!_f(t)))),preventDefault:!0},{key:"ArrowRight",run:Uf,shift:ob,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>Vf(t,_f(t)),shift:t=>rb(t,_f(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>jf(t,(e=>Kf(t,e,_f(t)))),shift:t=>Jf(t,(e=>Kf(t,e,_f(t)))),preventDefault:!0},{key:"ArrowUp",run:Yf,shift:nb,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cb,shift:pb},{mac:"Ctrl-ArrowUp",run:Ff,shift:lb},{key:"ArrowDown",run:If,shift:ab,preventDefault:!0},{mac:"Cmd-ArrowDown",run:hb,shift:ub},{mac:"Ctrl-ArrowDown",run:Hf,shift:db},{key:"PageUp",run:Ff,shift:lb},{key:"PageDown",run:Hf,shift:db},{key:"Home",run:t=>jf(t,(e=>Kf(t,e,!1))),shift:t=>Jf(t,(e=>Kf(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:cb,shift:pb},{key:"End",run:t=>jf(t,(e=>Kf(t,e,!0))),shift:t=>Jf(t,(e=>Kf(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:hb,shift:ub},{key:"Enter",run:qb,shift:qb},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:gb,shift:gb},{key:"Delete",run:vb},{key:"Mod-Backspace",mac:"Alt-Backspace",run:xb},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Ob(t,!0)},{mac:"Mod-Backspace",run:t=>mb(t,(e=>{let o=t.moveToLineBoundary(e,!1).head;return e.head>o?o:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>mb(t,(e=>{let o=t.moveToLineBoundary(e,!0).head;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:Df,shift:eb,preventDefault:!0},{key:"Ctrl-f",run:Uf,shift:ob},{key:"Ctrl-p",run:Yf,shift:nb},{key:"Ctrl-n",run:If,shift:ab},{key:"Ctrl-a",run:t=>jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>Jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>Jf(t,(e=>Ki.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:vb},{key:"Ctrl-h",run:gb},{key:"Ctrl-k",run:t=>mb(t,(e=>{let o=t.lineBlockAt(e.head).to;return e.head<o?o:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:xb},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:$i.of(["",""])},range:Ki.cursor(t.from)})));return e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let o=e.from,r=t.doc.lineAt(o),i=o==r.from?o-1:zi(r.text,o-r.from,!1)+r.from,n=o==r.to?o+1:zi(r.text,o-r.from,!0)+r.from;return{changes:{from:i,to:n,insert:t.doc.slice(o,n).append(t.doc.slice(i,o))},range:Ki.cursor(n)}}));return!o.changes.empty&&(e(t.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hf}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),Zb=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>jf(t,(e=>Wf(t.state,e,!_f(t)))),shift:t=>Jf(t,(e=>Wf(t.state,e,!_f(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>jf(t,(e=>Wf(t.state,e,_f(t)))),shift:t=>Jf(t,(e=>Wf(t.state,e,_f(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>wb(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>kb(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>wb(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>kb(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let o=t.selection,r=null;return o.ranges.length>1?r=Ki.create([o.main]):o.main.empty||(r=Ki.create([Ki.cursor(o.main.head)])),!!r&&(e(Ef(t,r)),!0)}},{key:"Mod-Enter",run:Sb},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let o=yb(t).map((({from:e,to:o})=>Ki.range(e,Math.min(o+1,t.doc.length))));return e(t.update({selection:Ki.create(o),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let o=Mf(t.selection,(e=>{let o=Ru(t),r=o.resolveStack(e.from,1);if(e.empty){let t=o.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:o}=t;if((o.from<e.from&&o.to>=e.to||o.to>e.to&&o.from<=e.from)&&t.next)return Ki.range(o.to,o.from)}return e}));return!o.eq(t.selection)&&(e(Ef(t,o)),!0)},preventDefault:!0},{key:"Mod-[",run:Cb},{key:"Mod-]",run:Pb},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=Object.create(null),r=new Yu(t,{overrideIndentation:t=>{let e=o[t];return null==e?-1:e}}),i=$b(t,((e,i,n)=>{let a=Bu(r,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let s=/^\s*/.exec(e.text)[0],l=Wu(t,a);(s!=l||n.from<e.from+s.length)&&(o[e.from]=a,i.push({from:e.from,to:e.from+s.length,insert:l}))}));return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,o=e.changes(yb(e).map((({from:t,to:o})=>(t>0?t--:o<e.doc.length&&o++,{from:t,to:o})))),r=Mf(e.selection,(e=>{let o;if(t.lineWrapping){let r=t.lineBlockAt(e.head),i=t.coordsAtPos(e.head,e.assoc||1);i&&(o=r.bottom+t.documentTop-i.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,o)})).map(o);return t.dispatch({changes:o,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,o){let r=!1,i=Mf(t.selection,(e=>{let i=Im(t,e.head,-1)||Im(t,e.head,1)||e.head>0&&Im(t,e.head-1,1)||e.head<t.doc.length&&Im(t,e.head+1,-1);if(!i||!i.end)return e;r=!0;let n=i.start.from==e.head?i.end.to:i.end.from;return o?Ki.range(e.anchor,n):Ki.cursor(n)}));return!!r&&(e(Ef(t,i)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,o=e.doc.lineAt(e.selection.main.from),r=sf(t.state,o.from);return r.line?rf(t):!!r.block&&af(t)}},{key:"Alt-A",run:nf},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(Rb),Tb={key:"Tab",run:Pb,shift:Cb};class Ab{constructor(t,e,o,r,i,n,a,s,l,d=0,c){this.p=t,this.stack=e,this.state=o,this.reducePos=r,this.pos=i,this.score=n,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,o=0){let r=t.parser.context;return new Ab(t,[],e,o,o,0,[],0,r?new Mb(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let o=t>>19,r=65535&t,{parser:i}=this.p,n=this.reducePos<this.pos-25;n&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==o)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,n?8:4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(o-1)-(262144&t?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,d=this.reducePos-l;d>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=d));let c=s?this.stack[s-1]:0,h=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&t){let t=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,t,h+4,!0)}if(262144&t)this.state=this.stack[s];else{let t=this.stack[s-3];this.state=i.getGoto(t,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(t,e,o,r=4,i=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==o)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=o)}}if(i&&this.pos!=o){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4]){let t=!1;for(let e=i;e>0&&this.buffer[e-2]>o;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;i>0&&this.buffer[i-2]>o;)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]=t,this.buffer[i+1]=e,this.buffer[i+2]=o,this.buffer[i+3]=r}else this.buffer.push(t,e,o,r)}shift(t,e,o,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,o),e<=this.p.parser.maxNode&&this.buffer.push(e,o,r,4);else{let i=t,{parser:n}=this.p;(r>this.pos||e<=n.maxNode)&&(this.pos=r,n.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,o),this.shiftContext(e,o),e<=n.maxNode&&this.buffer.push(e,o,r,4)}}apply(t,e,o,r){65536&t?this.reduce(t):this.shift(t,e,o,r)}useNode(t,e){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=t)&&(this.p.reused.push(t),o++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let o=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new Ab(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let o=t<=this.p.parser.maxNode;o&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,o?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new Eb(this);;){let o=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==o)return!1;if(!(65536&o))return!0;e.reduce(o)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let o=[];for(let r,i=0;i<e.length;i+=2)(r=e[i+1])!=this.state&&this.p.parser.hasAction(r,t)&&o.push(e[i],r);if(this.stack.length<120)for(let t=0;o.length<8&&t<e.length;t+=2){let r=e[t+1];o.some(((t,e)=>1&e&&t==r))||o.push(e[t],r)}e=o}let o=[];for(let t=0;t<e.length&&o.length<4;t+=2){let r=e[t+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(e[t],this.pos),i.reducePos=this.pos,i.score-=200,o.push(i)}return o}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let o=e>>19,r=65535&e,i=this.stack.length-3*o;if(i<0||t.getGoto(this.stack[i],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],o=(r,i)=>{if(!e.includes(r))return e.push(r),t.allActions(r,(e=>{if(393216&e);else if(65536&e){let o=(e>>19)-i;if(o>1){let r=65535&e,i=this.stack.length-3*o;if(i>=0&&t.getGoto(this.stack[i],r,!1)>=0)return o<<19|65536|r}}else{let t=o(e,i+1);if(null!=t)return t}}))};return o(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(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new Mb(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Mb{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class Eb{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,o=t>>19;0==o?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(o-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class jb{constructor(t,e,o){this.stack=t,this.pos=e,this.index=o,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new jb(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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,0==this.index&&this.maybeNext()}fork(){return new jb(this.stack,this.pos,this.index)}}function zb(t,e=Uint16Array){if("string"!=typeof t)return t;let o=null;for(let r=0,i=0;r<t.length;){let n=0;for(;;){let e=t.charCodeAt(r++),o=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let i=e-32;if(i>=46&&(i-=46,o=!0),n+=i,o)break;n*=46}o?o[i++]=n:o=new e(n)}return o}class Xb{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const _b=new Xb;class Db{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=_b,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let o=this.range,r=this.rangeIndex,i=this.pos+t;for(;i<o.from;){if(!r)return null;let t=this.ranges[--r];i-=o.from-t.to,o=t}for(;e<0?i>o.to:i>=o.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];i+=t.from-o.to,o=t}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,o,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,o=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)o=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),o=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),o}acceptToken(t,e=0){let o=e?this.resolveOffset(e,-1):this.pos;if(null==o||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=o}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=_b,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let o="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(o+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return o}}class Ub{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:o}=e.p;Wb(this.data,t,e,this.id,o.data,o.tokenPrecTable)}}Ub.prototype.contextual=Ub.prototype.fallback=Ub.prototype.extend=!1;class Vb{constructor(t,e,o){this.precTable=e,this.elseToken=o,this.data="string"==typeof t?zb(t):t}token(t,e){let o=t.pos,r=0;for(;;){let o=t.next<0,i=t.resolveOffset(1,1);if(Wb(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(o||r++,null==i)break;t.reset(i,t.token)}r&&(t.reset(o,t.token),t.acceptToken(this.elseToken,r))}}Vb.prototype.contextual=Ub.prototype.fallback=Ub.prototype.extend=!1;class Lb{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Wb(t,e,o,r,i,n){let a=0,s=1<<r,{dialect:l}=o.p.parser;t:for(;s&t[a];){let o=t[a+1];for(let r=a+3;r<o;r+=2)if((t[r+1]&s)>0){let o=t[r];if(l.allows(o)&&(-1==e.token.value||e.token.value==o||Yb(o,e.token.value,i,n))){e.acceptToken(o);break}}let r=e.next,d=0,c=t[a+2];if(!(e.next<0&&c>d&&65535==t[o+3*c-3])){for(;d<c;){let i=d+c>>1,n=o+i+(i<<1),s=t[n],l=t[n+1]||65536;if(r<s)c=i;else{if(!(r>=l)){a=t[n+2],e.advance();continue t}d=i+1}}break}a=t[o+3*c-1]}}function Bb(t,e,o){for(let r,i=e;65535!=(r=t[i]);i++)if(r==o)return i-e;return-1}function Yb(t,e,o,r){let i=Bb(o,r,e);return i<0||Bb(o,r,t)<i}const Ib="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let Nb=null;function Gb(t,e,o){let r=t.cursor(fp.IncludeAnonymous);for(r.moveTo(e);;)if(!(o<0?r.childBefore(e):r.childAfter(e)))for(;;){if((o<0?r.to<e:r.from>e)&&!r.type.isError)return o<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(o<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return o<0?0:t.length}}class Fb{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Gb(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Gb(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let o=this.trees[e],r=this.index[e];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=o.children[r],n=this.start[e]+o.positions[r];if(n>t)return this.nextStart=n,null;if(i instanceof bp){if(n==t){if(n<this.safeFrom)return null;let t=n+i.length;if(t<=this.safeTo){let e=i.prop(lp.lookAhead);if(!e||t+e<this.fragment.to)return i}}this.index[e]++,n+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+i.length}}}class Hb{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new Xb))}getActions(t){let e=0,o=null,{parser:r}=t.p,{tokenizers:i}=r,n=r.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&n))continue;let l=i[r],d=this.tokens[r];if((!o||l.fallback)&&((l.contextual||d.start!=t.pos||d.mask!=n||d.context!=a)&&(this.updateCachedToken(d,l,t),d.mask=n,d.context=a),d.lookAhead>d.end+25&&(s=Math.max(d.lookAhead,s)),0!=d.value)){let r=e;if(d.extended>-1&&(e=this.addActions(t,d.extended,d.end,e)),e=this.addActions(t,d.value,d.end,e),!l.extend&&(o=d,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return s&&t.setLookAhead(s),o||t.pos!=this.stream.end||(o=new Xb,o.value=t.p.parser.eofTerm,o.start=o.end=t.pos,e=this.addActions(t,o.value,o.end,e)),this.mainToken=o,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new Xb,{pos:o,p:r}=t;return e.start=o,e.end=Math.min(o+1,r.stream.end),e.value=o==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,o){let r=this.stream.clipPos(o.pos);if(e.token(this.stream.reset(r,t),o),t.value>-1){let{parser:e}=o.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let i=e.specializers[r](this.stream.read(t.start,t.end),o);if(i>=0&&o.p.parser.dialect.allows(i>>1)){1&i?t.extended=i>>1:t.value=i>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,o,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=o,r}addActions(t,e,o,r){let{state:i}=t,{parser:n}=t.p,{data:a}=n;for(let t=0;t<2;t++)for(let s=n.stateSlot(i,t?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==r&&2==a[s+1]&&(r=this.putAction(ig(a,s+2),e,o,r));break}s=ig(a,s+2)}a[s]==e&&(r=this.putAction(ig(a,s+1),e,o,r))}return r}}class Kb{constructor(t,e,o,r){this.parser=t,this.input=e,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 Db(e,r),this.tokens=new Hb(t,this.stream),this.topTerm=t.top[1];let{from:i}=r[0];this.stacks=[Ab.start(this,t.top[0],i)],this.fragments=o.length&&this.stream.end-i>4*t.bufferLength?new Fb(o,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,o=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==o.length){let[t]=o;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<o.length;n++){let a=o[n];for(;;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,o))continue;{t||(t=[],e=[]),t.push(a);let o=this.tokens.getMainToken(a);e.push(o.value,o.end)}}break}}if(!i.length){let e=t&&function(t){let e=null;for(let o of t){let t=o.p.stoppedAt;(o.pos==o.p.stream.end||null!=t&&o.pos>t)&&o.p.parser.stateFlag(o.state,2)&&(!e||e.score<o.score)&&(e=o)}return e}(t);if(e)return Ib&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Ib&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let o=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,i);if(o)return Ib&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(i.length>t)for(i.sort(((t,e)=>e.score-t.score));i.length>t;)i.pop();i.some((t=>t.reducePos>r))&&this.recovering--}else if(i.length>1){t:for(let t=0;t<i.length-1;t++){let e=i[t];for(let o=t+1;o<i.length;o++){let r=i[o];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){i.splice(t--,1);continue t}i.splice(o--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let t=1;t<i.length;t++)i[t].pos<this.minStackPos&&(this.minStackPos=i[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,o){let r=t.pos,{parser:i}=this,n=Ib?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,o=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(t.state,a.type.id):-1;if(r>-1&&a.length&&(!e||(a.prop(lp.contextHash)||0)==o))return t.useNode(a,r),Ib&&console.log(n+this.stackID(t)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof bp)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof bp&&0==a.positions[0]))break;a=s}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),Ib&&console.log(n+this.stackID(t)+` (via always-reduce ${i.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let s=this.tokens.getActions(t);for(let a=0;a<s.length;){let l=s[a++],d=s[a++],c=s[a++],h=a==s.length||!o,p=h?t:t.split(),u=this.tokens.mainToken;if(p.apply(l,d,u?u.start:p.pos,c),Ib&&console.log(n+this.stackID(p)+` (via ${65536&l?`reduce of ${i.getName(65535&l)}`:"shift"} for ${i.getName(d)} @ ${r}${p==t?"":", split"})`),h)return!0;p.pos>r?e.push(p):o.push(p)}return!1}advanceFully(t,e){let o=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>o)return Jb(t,e),!0}}runRecovery(t,e,o){let r=null,i=!1;for(let n=0;n<t.length;n++){let a=t[n],s=e[n<<1],l=e[1+(n<<1)],d=Ib?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),Ib&&console.log(d+this.stackID(a)+" (restarted)"),this.advanceFully(a,o))continue}let c=a.split(),h=d;for(let t=0;c.forceReduce()&&t<10&&(Ib&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,o));t++)Ib&&(h=this.stackID(c)+" -> ");for(let t of a.recoverByInsert(s))Ib&&console.log(d+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,o);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),Ib&&console.log(d+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),Jb(a,o)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(t){return t.close(),bp.build({buffer:jb.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Nb||(Nb=new WeakMap)).get(t);return e||Nb.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Jb(t,e){for(let o=0;o<e.length;o++){let r=e[o];if(r.pos==t.pos&&r.sameState(t))return void(e[o].score<t.score&&(e[o]=t))}e.push(t)}class tg{constructor(t,e,o){this.source=t,this.flags=e,this.disabled=o}allows(t){return!this.disabled||0==this.disabled[t]}}const eg=t=>t;class og{constructor(t){this.start=t.start,this.shift=t.shift||eg,this.reduce=t.reduce||eg,this.reuse=t.reuse||eg,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class rg extends jp{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let o=0;o<t.repeatNodeCount;o++)e.push("");let o=Object.keys(t.topRules).map((e=>t.topRules[e][1])),r=[];for(let t=0;t<e.length;t++)r.push([]);function i(t,e,o){r[t].push([e,e.deserialize(String(o))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=lp[t]);for(let o=1;o<e.length;){let r=e[o++];if(r>=0)i(r,t,e[o++]);else{let n=e[o+-r];for(let a=-r;a>0;a--)i(e[o++],t,n);o++}}}this.nodeSet=new pp(e.map(((e,i)=>hp.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:r[i],top:o.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=np;let n=zb(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(ng),this.states=zb(t.states,Uint32Array),this.data=zb(t.stateData),this.goto=zb(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new Ub(n,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,o){let r=new Kb(this,t,e,o);for(let i of this.wrappers)r=i(r,t,e,o);return r}getGoto(t,e,o=!1){let r=this.goto;if(e>=r[0])return-1;for(let i=r[e+1];;){let e=r[i++],n=1&e,a=r[i++];if(n&&o)return a;for(let o=i+(e>>1);i<o;i++)if(r[i]==t)return a;if(n)return-1}}hasAction(t,e){let o=this.data;for(let r=0;r<2;r++)for(let i,n=this.stateSlot(t,r?2:1);;n+=3){if(65535==(i=o[n])){if(1!=o[n+1]){if(2==o[n+1])return ig(o,n+2);break}i=o[n=ig(o,n+2)]}if(i==e||0==i)return ig(o,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let o=this.stateSlot(t,4),r=o?e(o):void 0;for(let o=this.stateSlot(t,1);null==r;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=ig(this.data,o+2)}r=e(ig(this.data,o+1))}return r}nextStates(t){let e=[];for(let o=this.stateSlot(t,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=ig(this.data,o+2)}if(!(1&this.data[o+2])){let t=this.data[o+1];e.some(((e,o)=>1&o&&e==t))||e.push(this.data[o],t)}}return e}configure(t){let e=Object.assign(Object.create(rg.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let o=this.topRules[t.top];if(!o)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=o}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let o=t.tokenizers.find((t=>t.from==e));return o?o.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((o,r)=>{let i=t.specializers.find((t=>t.from==o.external));if(!i)return o;let n=Object.assign(Object.assign({},o),{external:i.to});return e.specializers[r]=ng(n),n}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),o=e.map((()=>!1));if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(o[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!o[t])for(let o,i=this.dialects[e[t]];65535!=(o=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[o]=1;return new tg(t,o,r)}static deserialize(t){return new rg(t)}}function ig(t,e){return t[e]|t[e+1]<<16}function ng(t){if(t.external){let e=t.extend?1:0;return(o,r)=>t.external(o,r)<<1|e}return t.get}const ag={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},sg={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},lg={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 dg(t){return 9==t||10==t||13==t||32==t}let cg=null,hg=null,pg=0;function ug(t,e){let o=t.pos+e;if(pg==o&&hg==t)return cg;let r=t.peek(e);for(;dg(r);)r=t.peek(++e);let i="";for(;45==(n=r)||46==n||58==n||n>=65&&n<=90||95==n||n>=97&&n<=122||n>=161;)i+=String.fromCharCode(r),r=t.peek(++e);var n;return hg=t,pg=o,cg=i?i.toLowerCase():r==mg||r==fg?void 0:null}const mg=63,fg=33;function bg(t,e){this.name=t,this.parent=e}const gg=[6,10,7,8,9],vg=new og({start:null,shift:(t,e,o,r)=>gg.indexOf(e)>-1?new bg(ug(r,1)||"",t):t,reduce:(t,e)=>20==e&&t?t.parent:t,reuse(t,e,o,r){let i=e.type.id;return 6==i||36==i?new bg(ug(r,1)||"",t):t},strict:!1}),Og=new Lb(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let o=47==t.next;o&&t.advance();let r=ug(t,0);if(void 0===r)return;if(!r)return t.acceptToken(o?14:6);let i=e.context?e.context.name:null;if(o){if(r==i)return t.acceptToken(11);if(i&&sg[i])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(ag.hasOwnProperty(r))return t.acceptToken(10);i&&lg[i]&&lg[i][r]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),xg=new Lb((t=>{for(let e=0,o=0;;o++){if(t.next<0){o&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){o>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}})),yg=new Lb(((t,e)=>{if(47==t.next&&62==t.peek(1)){let o=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(o?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function wg(t,e,o){let r=2+t.length;return new Lb((i=>{for(let n=0,a=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(e);break}if(0==n&&60==i.next||1==n&&47==i.next||n>=2&&n<r&&i.next==t.charCodeAt(n-2))n++,a++;else if(2!=n&&n!=r||!dg(i.next)){if(n==r&&62==i.next){s>a?i.acceptToken(e,-a):i.acceptToken(o,-(a-2));break}if((10==i.next||13==i.next)&&s){i.acceptToken(e,1);break}n=a=0}else a++;i.advance()}}))}const kg=wg("script",54,1),qg=wg("style",55,2),Sg=wg("textarea",56,3),Qg=eu({"Text RawText":wu.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":wu.angleBracket,TagName:wu.tagName,"MismatchedCloseTag/TagName":[wu.tagName,wu.invalid],AttributeName:wu.attributeName,"AttributeValue UnquotedAttributeValue":wu.attributeValue,Is:wu.definitionOperator,"EntityReference CharacterReference":wu.character,Comment:wu.blockComment,ProcessingInst:wu.processingInstruction,DoctypeDecl:wu.documentMeta}),$g=rg.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E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#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^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 IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:vg,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Qg],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-_$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!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[kg,qg,Sg,yg,Og,xg,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function Pg(t,e){let o=Object.create(null);for(let r of t.getChildren(23)){let t=r.getChild(24),i=r.getChild(26)||r.getChild(27);t&&(o[e.read(t.from,t.to)]=i?26==i.type.id?e.read(i.from+1,i.to-1):e.read(i.from,i.to):"")}return o}function Cg(t,e){let o=t.getChild(22);return o?e.read(o.from,o.to):" "}function Rg(t,e,o){let r;for(let i of o)if(!i.attrs||i.attrs(r||(r=Pg(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function Zg(t=[],e=[]){let o=[],r=[],i=[],n=[];for(let e of t)("script"==e.tag?o:"style"==e.tag?r:"textarea"==e.tag?i:n).push(e);let a=e.length?Object.create(null):null;for(let t of e)(a[t.name]||(a[t.name]=[])).push(t);return s=(t,e)=>{let s=t.type.id;if(28==s)return Rg(t,e,o);if(31==s)return Rg(t,e,r);if(34==s)return Rg(t,e,i);if(20==s&&n.length){let o,r=t.node,i=r.firstChild,a=i&&Cg(i,e);if(a)for(let t of n)if(t.tag==a&&(!t.attrs||t.attrs(o||(o=Pg(i,e))))){let e=r.lastChild,o=37==e.type.id?e.from:r.to;if(o>i.to)return{parser:t.parser,overlay:[{from:i.to,to:o}]}}}if(a&&23==s){let o,r=t.node;if(o=r.firstChild){let t=a[e.read(o.from,o.to)];if(t)for(let o of t){if(o.tagName&&o.tagName!=Cg(r.parent,e))continue;let t=r.lastChild;if(26==t.type.id){let e=t.from+1,r=t.lastChild,i=t.to-(r&&r.isError?0:1);if(i>e)return{parser:o.parser,overlay:[{from:e,to:i}]}}else if(27==t.type.id)return{parser:o.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,o,r)=>new Vp(t,s,e,o,r);var s}const Tg=[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];function Ag(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Mg(t){return t>=48&&t<=57}const Eg=new Lb(((t,e)=>{for(let o=!1,r=0,i=0;;i++){let{next:n}=t;if(Ag(n)||45==n||95==n||o&&Mg(n))!o&&(45!=n||i>0)&&(o=!0),r===i&&45==n&&r++,t.advance();else{if(92!=n||10==t.peek(1)){o&&t.acceptToken(40==n?101:2==r&&e.canShift(2)?2:102);break}t.advance(),t.next>-1&&t.advance(),o=!0}}})),jg=new Lb((t=>{if(Tg.includes(t.peek(-1))){let{next:e}=t;(Ag(e)||95==e||35==e||46==e||91==e||58==e&&Ag(t.peek(1))||45==e||38==e)&&t.acceptToken(100)}})),zg=new Lb((t=>{if(!Tg.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),Ag(e)){do{t.advance()}while(Ag(t.next)||Mg(t.next));t.acceptToken(1)}}})),Xg=eu({"AtKeyword import charset namespace keyframes media supports":wu.definitionKeyword,"from to selector":wu.keyword,NamespaceName:wu.namespace,KeyframeName:wu.labelName,KeyframeRangeName:wu.operatorKeyword,TagName:wu.tagName,ClassName:wu.className,PseudoClassName:wu.constant(wu.className),IdName:wu.labelName,"FeatureName PropertyName":wu.propertyName,AttributeName:wu.attributeName,NumberLiteral:wu.number,KeywordQuery:wu.keyword,UnaryQueryOp:wu.operatorKeyword,"CallTag ValueName":wu.atom,VariableName:wu.variableName,Callee:wu.operatorKeyword,Unit:wu.unit,"UniversalSelector NestingSelector":wu.definitionOperator,MatchOp:wu.compareOperator,"ChildOp SiblingOp, LogicOp":wu.logicOperator,BinOp:wu.arithmeticOperator,Important:wu.modifier,Comment:wu.blockComment,ColorLiteral:wu.color,"ParenthesizedContent StringLiteral":wu.string,":":wu.punctuation,"PseudoOp #":wu.derefOperator,"; ,":wu.separator,"( )":wu.paren,"[ ]":wu.squareBracket,"{ }":wu.brace}),_g={__proto__:null,lang:34,"nth-child":34,"nth-last-child":34,"nth-of-type":34,"nth-last-of-type":34,dir:34,"host-context":34,url:62,"url-prefix":62,domain:62,regexp:62,selector:140},Dg={__proto__:null,"@import":120,"@media":144,"@charset":148,"@namespace":152,"@keyframes":158,"@supports":170},Ug={__proto__:null,not:134,only:134},Vg=rg.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#CiO$qQ[O'#DUO$vQ[O'#DXOOQP'#En'#EnO${QdO'#DhO%jQ[O'#DuO${QdO'#DwO%{Q[O'#DyO&WQ[O'#D|O&`Q[O'#ESO&nQ[O'#EUOOQS'#Em'#EmOOQS'#EX'#EXQYQ[OOO&uQXO'#CdO'jQWO'#DdO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@])C@]OOQP'#Ch'#ChOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E]O({QWO,58{O)TQ[O,59TO$qQ[O,59pO$vQ[O,59sO(aQ[O,59vO(aQ[O,59xO(aQ[O,59yO)`Q[O'#DcOOQS,58{,58{OOQP'#Cl'#ClOOQO'#DS'#DSOOQP,59T,59TO)gQWO,59TO)lQWO,59TOOQP'#DW'#DWOOQP,59p,59pOOQO'#DY'#DYO)qQ`O,59sOOQS'#Cq'#CqO${QdO'#CrO)yQvO'#CtO+ZQtO,5:SOOQO'#Cy'#CyO)lQWO'#CxO+oQWO'#CzO+tQ[O'#DPOOQS'#Ep'#EpOOQO'#Dk'#DkO+|Q[O'#DrO,[QWO'#EtO&`Q[O'#DpO,jQWO'#DsOOQO'#Eu'#EuO)OQWO,5:aO,oQpO,5:cOOQS'#D{'#D{O,wQWO,5:eO,|Q[O,5:eOOQO'#EO'#EOO-UQWO,5:hO-ZQWO,5:nO-cQWO,5:pOOQS-E8V-E8VO-kQdO,5:OO-{Q[O'#E_O.YQWO,5;_O.YQ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PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,25,""],["openedBy",18,"(",33,"[",51,"{"],["closedBy",19,")",34,"]",52,"}"]],propSources:[Xg],skippedNodes:[0,3,88],repeatNodeCount:11,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSp`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#[~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$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lO%^`JZP;=`<%l$}",tokenizers:[jg,zg,Eg,1,2,3,4,new Vb("m~RRYZ[z{a~~g~aO#_~~dP!P!Qg~lO#`~~",28,106)],topRules:{StyleSheet:[0,4],Styles:[1,87]},specialized:[{term:101,get:t=>_g[t]||-1},{term:59,get:t=>Dg[t]||-1},{term:102,get:t=>Ug[t]||-1}],tokenPrec:1219});let Lg=null;function Wg(){if(!Lg&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],o=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),o.has(r)||(e.push(r),o.add(r)));Lg=e.sort().map((t=>({type:"property",label:t,apply:t+": "})))}return Lg||[]}const Bg=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),Yg=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),Ig=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),Ng=["@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((t=>({type:"keyword",label:t}))),Gg=/^(\w[\w-]*|-\w[\w-]*|)$/,Fg=/^-(-[\w-]*)?$/,Hg=new Mp,Kg=["Declaration"];function Jg(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function tv(t,e,o){if(e.to-e.from>4096){let r=Hg.get(e);if(r)return r;let i=[],n=new Set,a=e.cursor(fp.IncludeAnonymous);if(a.firstChild())do{for(let e of tv(t,a.node,o))n.has(e.label)||(n.add(e.label),i.push(e))}while(a.nextSibling());return Hg.set(e,i),i}{let r=[],i=new Set;return e.cursor().iterate((e=>{var n;if(o(e)&&e.matchContext(Kg)&&":"==(null===(n=e.node.nextSibling)||void 0===n?void 0:n.name)){let o=t.sliceString(e.from,e.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}})),r}}const ev=t=>e=>{let{state:o,pos:r}=e,i=Ru(o).resolveInner(r,-1),n=i.type.isError&&i.from==i.to-1&&"-"==o.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(n||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Wg(),validFor:Gg};if("ValueName"==i.name)return{from:i.from,options:Yg,validFor:Gg};if("PseudoClassName"==i.name)return{from:i.from,options:Bg,validFor:Gg};if(t(i)||(e.explicit||n)&&function(t,e){var o;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(o=t.parent)||void 0===o?void 0:o.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(i,o.doc))return{from:t(i)||n?i.from:r,options:tv(o.doc,Jg(i),t),validFor:Fg};if("TagName"==i.name){for(let{parent:t}=i;t;t=t.parent)if("Block"==t.name)return{from:i.from,options:Wg(),validFor:Gg};return{from:i.from,options:Ig,validFor:Gg}}if("AtKeyword"==i.name)return{from:i.from,options:Ng,validFor:Gg};if(!e.explicit)return null;let a=i.resolve(r),s=a.childBefore(r);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:r,options:Bg,validFor:Gg}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:r,options:Yg,validFor:Gg}:"Block"==a.name||"Styles"==a.name?{from:r,options:Wg(),validFor:Gg}:null},ov=ev((t=>"VariableName"==t.name)),rv=Cu.define({name:"css",parser:Vg.configure({props:[Iu.add({Declaration:em()}),rm.add({"Block KeyframeList":im})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function iv(){return new Du(rv,rv.data.of({autocomplete:ov}))}const nv=[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],av=new og({start:!1,shift:(t,e)=>5==e||6==e||318==e?t:319==e,strict:!1}),sv=new Lb(((t,e)=>{let{next:o}=t;(125==o||-1==o||e.context)&&t.acceptToken(316)}),{contextual:!0,fallback:!0}),lv=new Lb(((t,e)=>{let o,{next:r}=t;nv.indexOf(r)>-1||(47!=r||47!=(o=t.peek(1))&&42!=o)&&(125==r||59==r||-1==r||e.context||t.acceptToken(314))}),{contextual:!0}),dv=new Lb(((t,e)=>{91!=t.next||e.context||t.acceptToken(315)}),{contextual:!0}),cv=new Lb(((t,e)=>{let{next:o}=t;if(43==o||45==o){if(t.advance(),o==t.next){t.advance();let o=!e.context&&e.canShift(1);t.acceptToken(o?1:2)}}else 63==o&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function hv(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const pv=new Lb(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let o=0;for(;nv.indexOf(t.next)>-1;)t.advance(),o++;if(hv(t.next,!0)){for(t.advance(),o++;hv(t.next,!1);)t.advance(),o++;for(;nv.indexOf(t.next)>-1;)t.advance(),o++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!hv(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),o++}}t.acceptToken(4,-o)})),uv=eu({"get set async static":wu.modifier,"for while do if else switch try catch finally return throw break continue default case":wu.controlKeyword,"in of await yield void typeof delete instanceof":wu.operatorKeyword,"let var const using function class extends":wu.definitionKeyword,"import export from":wu.moduleKeyword,"with debugger as new":wu.keyword,TemplateString:wu.special(wu.string),super:wu.atom,BooleanLiteral:wu.bool,this:wu.self,null:wu.null,Star:wu.modifier,VariableName:wu.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":wu.function(wu.variableName),VariableDefinition:wu.definition(wu.variableName),Label:wu.labelName,PropertyName:wu.propertyName,PrivatePropertyName:wu.special(wu.propertyName),"CallExpression/MemberExpression/PropertyName":wu.function(wu.propertyName),"FunctionDeclaration/VariableDefinition":wu.function(wu.definition(wu.variableName)),"ClassDeclaration/VariableDefinition":wu.definition(wu.className),"NewExpression/VariableName":wu.className,PropertyDefinition:wu.definition(wu.propertyName),PrivatePropertyDefinition:wu.definition(wu.special(wu.propertyName)),UpdateOp:wu.updateOperator,"LineComment Hashbang":wu.lineComment,BlockComment:wu.blockComment,Number:wu.number,String:wu.string,Escape:wu.escape,ArithOp:wu.arithmeticOperator,LogicOp:wu.logicOperator,BitOp:wu.bitwiseOperator,CompareOp:wu.compareOperator,RegExp:wu.regexp,Equals:wu.definitionOperator,Arrow:wu.function(wu.punctuation),": Spread":wu.punctuation,"( )":wu.paren,"[ ]":wu.squareBracket,"{ }":wu.brace,"InterpolationStart InterpolationEnd":wu.special(wu.brace),".":wu.derefOperator,", ;":wu.separator,"@":wu.meta,TypeName:wu.typeName,TypeDefinition:wu.definition(wu.typeName),"type enum interface implements namespace module declare":wu.definitionKeyword,"abstract global Privacy readonly override":wu.modifier,"is keyof unique infer asserts":wu.operatorKeyword,JSXAttributeValue:wu.attributeValue,JSXText:wu.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":wu.angleBracket,"JSXIdentifier JSXNameSpacedName":wu.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":wu.attributeName,"JSXBuiltin/JSXIdentifier":wu.standard(wu.tagName)}),mv={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},fv={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},bv={__proto__:null,"<":189},gv=rg.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#HQO<qQ`O'#HTO>YQ`O'#CeO>jQ`O'#HaO>rQ`O'#HgO>rQ`O'#HiO`QlO'#HkO>rQ`O'#HmO>rQ`O'#HpO>wQ`O'#HvO>|Q!0LsO'#H|O%[QlO'#IOO?XQ!0LsO'#IQO?dQ!0LsO'#ISO9kQ!0LrO'#IUO?oQ!0MxO'#CiO@qQpO'#DjQOQ`OOO%[QlO'#EOOAXQ`O'#ERO:YQMhO'#ElOAdQ`O'#ElOAoQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Do'#DoOOQ!0Lb'#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0n+ZQ3Q.UU3R.V.W.YS6x3S3TR9T6yd#^W#W#Z%g(R([*W+W.O/hr#gZm#h#i#l%d(f(g(h+Z.U.V.W.Y3S3T6yS*Z$x*_Q/o*[Q1|,jQ2d-QQ4W/kQ6g2[Q7i4XQ8{6hT=_'V+XV#aW%g*WU#`W%g*WS(S#W([U(X#Z+W/hS-V'V+XT-y(R.OV'[!e%h*XQ$lfR)v$qT)k$l)lR3}/PT*]$x*_T*e${*WQ0q+cQ1_,QQ3V.aQ5j1aQ5u1iQ6}3ZQ8g5xQ9W6|Q:Q8fQ:d9VQ:|:SQ;U:fQ;`:}R;c;VnqOXst!Z#d%l&p&r&s&u,n,s2S2VQ&j!VR,c>mOXst!U!V!Z#d%l&g&p&r&s&u,n,s2S2VR,j&mT%km,jR1c,SR,b&eQ&T|R+z&UR+p&OT&n!W&qT&o!W&qT2U,s2V",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList 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 in 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 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:378,context:av,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",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:1,168:1,198:1},specialized:[{term:325,get:t=>mv[t]||-1},{term:341,get:t=>fv[t]||-1},{term:93,get:t=>bv[t]||-1}],tokenPrec:15116});class vv{constructor(t,e,o,r){this.state=t,this.pos=e,this.explicit=o,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=Ru(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),o=Math.max(e.from,this.pos-250),r=e.text.slice(o-e.from,this.pos-e.from),i=r.search(kv(t,!1));return i<0?null:{from:o+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,o){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function Ov(t){let e=Object.keys(t).join(""),o=/\w/.test(e);return o&&(e=e.replace(/\w/g,"")),`[${o?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function xv(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[o,r]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),o=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)o[r[t]]=!0}let r=Ov(e)+Ov(o)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let i=t.matchBefore(r);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:o}:null}}class yv{constructor(t,e,o,r){this.completion=t,this.source=e,this.match=o,this.score=r}}function wv(t){return t.selection.main.from}function kv(t,e){var o;let{source:r}=t,i=e&&"^"!=r[0],n="$"!=r[r.length-1];return i||n?new RegExp(`${i?"^":""}(?:${r})${n?"$":""}`,null!==(o=t.flags)&&void 0!==o?o:t.ignoreCase?"i":""):t}const qv=Sn.define(),Sv=new WeakMap;function Qv(t){if(!Array.isArray(t))return t;let e=Sv.get(t);return e||Sv.set(t,e=xv(t)),e}const $v=Pn.define(),Pv=Pn.define();class Cv{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let o=Xi(t,e),r=Di(o);this.chars.push(o);let i=t.slice(e,e+r),n=i.toUpperCase();this.folded.push(Xi(n==i?i.toLowerCase():n,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:o,any:r,precise:i,byWord:n}=this;if(1==e.length){let r=Xi(t,0),i=Di(r),n=i==t.length?0:-100;if(r==e[0]);else{if(r!=o[0])return null;n+=-200}return this.ret(n,[0,i])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=e.length,l=0;if(a<0){for(let i=0,n=Math.min(t.length,200);i<n&&l<s;){let n=Xi(t,i);n!=e[l]&&n!=o[l]||(r[l++]=i),i+=Di(n)}if(l<s)return null}let d=0,c=0,h=!1,p=0,u=-1,m=-1,f=/[a-z]/.test(t),b=!0;for(let r=0,l=Math.min(t.length,200),g=0;r<l&&c<s;){let l=Xi(t,r);a<0&&(d<s&&l==e[d]&&(i[d++]=r),p<s&&(l==e[p]||l==o[p]?(0==p&&(u=r),m=r+1,p++):p=0));let v,O=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=_i(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==O&&f||0==g&&0!=O)&&(e[c]==l||o[c]==l&&(h=!0)?n[c++]=r:n.length&&(b=!1)),g=O,r+=Di(l)}return c==s&&0==n[0]&&b?this.result((h?-200:0)-100,n,t):p==s&&0==u?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):p==s?this.ret(-900-t.length,[u,m]):c==s?this.result((h?-200:0)-100-700+(b?0:-1100),n,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,o){let r=[],i=0;for(let t of e){let e=t+(this.astral?Di(Xi(o,t)):1);i&&r[i-1]==t?r[i-1]=e:(r[i++]=t,r[i++]=e)}return this.ret(t-o.length,r)}}class Rv{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),o=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==o?null:(this.matched=[0,e.length],this.score=o+(t.length==this.pattern.length?0:-100),this)}}const Zv=en.define({combine:t=>Dn(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Av,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>o=>Tv(t(o),e(o)),optionClass:(t,e)=>o=>Tv(t(o),e(o)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function Tv(t,e){return t?e?t+" "+e:t:e}function Av(t,e,o,r,i,n){let a,s,l=t.textDirection==Rs.RTL,d=l,c=!1,h="top",p=e.left-i.left,u=i.right-e.right,m=r.right-r.left,f=r.bottom-r.top;if(d&&p<Math.min(m,u)?d=!1:!d&&u<Math.min(m,p)&&(d=!0),m<=(d?p:u))a=Math.max(i.top,Math.min(o.top,i.bottom-f))-e.top,s=Math.min(400,d?p:u);else{c=!0,s=Math.min(400,(l?e.right:i.right-e.left)-30);let t=i.bottom-e.bottom;t>=f||t>e.top?a=o.bottom-e.top:(h="bottom",a=e.bottom-o.top)}return{style:`${h}: ${a/((e.bottom-e.top)/n.offsetHeight)}px; max-width: ${s/((e.right-e.left)/n.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":d?"left":"right")}}function Mv(t,e,o){if(t<=o)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/o);return{from:t*o,to:(t+1)*o}}let r=Math.floor((t-e)/o);return{from:t-(r+1)*o,to:t-r*o}}class Ev{constructor(t,e,o){this.view=t,this.stateField=e,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:i,selected:n}=r.open,a=t.state.facet(Zv);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,o,r){let i=document.createElement("span");i.className="cm-completionLabel";let n=t.displayLabel||t.label,a=0;for(let t=0;t<r.length;){let e=r[t++],o=r[t++];e>a&&i.appendChild(document.createTextNode(n.slice(a,e)));let s=i.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(n.slice(e,o))),s.className="cm-completionMatchedText",a=o}return a<n.length&&i.appendChild(document.createTextNode(n.slice(a))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Mv(i.length,n,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(o=>{let{options:r}=t.state.field(e).open;for(let e,i=o.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void o.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let o=t.state.field(this.stateField,!1);o&&o.tooltip&&t.state.facet(Zv).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:Pv.of(null)})})),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let o=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),o!=r){let{options:i,selected:n,disabled:a}=o.open;r.open&&r.open.options==i||(this.range=Mv(i.length,n,t.state.facet(Zv).maxRenderedOptions),this.showOptions(i,o.id)),this.updateSel(),a!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=Mv(e.options.length,e.selected,this.view.state.facet(Zv).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:o}=e.options[e.selected],{info:r}=o;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(o);if(!i)return;"then"in i?i.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,o)})).catch((t=>cl(this.view.state,t,"completion info"))):this.addInfoPane(i,o)}}addInfoPane(t,e){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",null!=t.nodeType)o.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;o.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let o=this.list.firstChild,r=this.range.from;o;o=o.nextSibling,r++)"LI"==o.nodeName&&o.id?r==t?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),e=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected"):r--;return e&&function(t,e){let o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=o.height/t.offsetHeight;r.top<o.top?t.scrollTop-=(o.top-r.top)/i:r.bottom>o.bottom&&(t.scrollTop+=(r.bottom-o.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return r.top>Math.min(i.bottom,e.bottom)-10||r.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(Zv).positionInfo(this.view,e,r,o,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,o){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",(t=>{t.target==r&&t.preventDefault()}));let i=null;for(let n=o.from;n<o.to;n++){let{completion:a,match:s}=t[n],{section:l}=a;if(l){let t="string"==typeof l?l:l.name;t!=i&&(n>o.from||0==o.from)&&(i=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const d=r.appendChild(document.createElement("li"));d.id=e+"-"+n,d.setAttribute("role","option");let c=this.optionClass(a);c&&(d.className=c);for(let t of this.optionContent){let e=t(a,this.view.state,this.view,s);e&&d.appendChild(e)}}return o.from&&r.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function jv(t,e){return o=>new Ev(o,t,e)}function zv(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class Xv{constructor(t,e,o,r,i,n){this.options=t,this.attrs=e,this.tooltip=o,this.timestamp=r,this.selected=i,this.disabled=n}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new Xv(this.options,Vv(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,o,r,i,n){if(r&&!n&&t.some((t=>t.isPending)))return r.setDisabled();let a=function(t,e){let o=[],r=null,i=t=>{o.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some((e=>e.name==t))||r.push("string"==typeof e?{name:t}:e)}},n=e.facet(Zv);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)i(new yv(e,r.source,t?t(e):[],1e9-o.length));else{let o,a=e.sliceDoc(r.from,r.to),s=n.filterStrict?new Rv(a):new Cv(a);for(let e of r.result.options)if(o=s.match(e.label)){let n=e.displayLabel?t?t(e,o.matched):[]:o.matched;i(new yv(e,r.source,n,o.score+(e.boost||0)))}}}if(r){let t=Object.create(null),e=0,i=(t,e)=>{var o,r;return(null!==(o=t.rank)&&void 0!==o?o:1e9)-(null!==(r=e.rank)&&void 0!==r?r:1e9)||(t.name<e.name?-1:1)};for(let o of r.sort(i))e-=1e5,t[o.name]=e;for(let e of o){let{section:o}=e.completion;o&&(e.score+=t["string"==typeof o?o:o.name])}}let a=[],s=null,l=n.compareCompletions;for(let t of o.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let e=t.completion;!s||s.label!=e.label||s.detail!=e.detail||null!=s.type&&null!=e.type&&s.type!=e.type||s.apply!=e.apply||s.boost!=e.boost?a.push(t):zv(t.completion)>zv(s)&&(a[a.length-1]=t),s=t.completion}return a}(t,e);if(!a.length)return r&&t.some((t=>t.isPending))?r.setDisabled():null;let s=e.facet(Zv).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<a.length;e++)if(a[e].completion==t){s=e;break}}return new Xv(a,Vv(o,s),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:Hv,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new Xv(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Xv(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class _v{constructor(t,e,o){this.active=t,this.id=e,this.open=o}static start(){return new _v(Lv,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,o=e.facet(Zv),r=(o.override||e.languageDataAt("autocomplete",wv(e)).map(Qv)).map((e=>{let r=this.active.find((t=>t.source==e))||new Bv(e,this.active.some((t=>0!=t.state))?1:0);return r.update(t,o)}));r.length==this.active.length&&r.every(((t,e)=>t==this.active[e]))&&(r=this.active);let i=this.open,n=t.effects.some((t=>t.is(Iv)));i&&t.docChanged&&(i=i.map(t.changes)),t.selection||r.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let o=0,r=0;;){for(;o<t.length&&!t[o].hasResult();)o++;for(;r<e.length&&!e[r].hasResult();)r++;let i=o==t.length,n=r==e.length;if(i||n)return i==n;if(t[o++].result!=e[r++].result)return!1}}(r,this.active)||n?i=Xv.build(r,e,this.id,i,o,n):i&&i.disabled&&!r.some((t=>t.isPending))&&(i=null),!i&&r.every((t=>!t.isPending))&&r.some((t=>t.hasResult()))&&(r=r.map((t=>t.hasResult()?new Bv(t.source,0):t)));for(let e of t.effects)e.is(Nv)&&(i=i&&i.setSelected(e.value,this.id));return r==this.active&&i==this.open?this:new _v(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Dv:Uv}}const Dv={"aria-autocomplete":"list"},Uv={};function Vv(t,e){let o={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(o["aria-activedescendant"]=t+"-"+e),o}const Lv=[];function Wv(t,e){if(t.isUserEvent("input.complete")){let o=t.annotation(qv);if(o&&e.activateOnCompletion(o))return 12}let o=t.isUserEvent("input.type");return o&&e.activateOnTyping?5:o?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Bv{constructor(t,e,o=!1){this.source=t,this.state=e,this.explicit=o}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let o=Wv(t,e),r=this;(8&o||16&o&&this.touches(t))&&(r=new Bv(r.source,0)),4&o&&0==r.state&&(r=new Bv(this.source,1)),r=r.updateFor(t,o);for(let e of t.effects)if(e.is($v))r=new Bv(r.source,1,e.value);else if(e.is(Pv))r=new Bv(r.source,0);else if(e.is(Iv))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(wv(t.state))}}class Yv extends Bv{constructor(t,e,o,r,i,n){super(t,3,e),this.limit=o,this.result=r,this.from=i,this.to=n}hasResult(){return!0}updateFor(t,e){var o;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),n=t.changes.mapPos(this.to,1),a=wv(t.state);if(a>n||!r||2&e&&(wv(t.startState)==this.from||a<this.limit))return new Bv(this.source,4&e?1:0);let s=t.changes.mapPos(this.limit);return function(t,e,o,r){if(!t)return!1;let i=e.sliceDoc(o,r);return"function"==typeof t?t(i,o,r,e):kv(t,!0).test(i)}(r.validFor,t.state,i,n)?new Yv(this.source,this.explicit,s,r,i,n):r.update&&(r=r.update(r,i,n,new vv(t.state,a,!1)))?new Yv(this.source,this.explicit,s,r,r.from,null!==(o=r.to)&&void 0!==o?o:wv(t.state)):new Bv(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new Yv(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Bv(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const Iv=Pn.define({map:(t,e)=>t.map((t=>t.map(e)))}),Nv=Pn.define(),Gv=dn.define({create:()=>_v.start(),update:(t,e)=>t.update(e),provide:t=>[xh.from(t,(t=>t.tooltip)),uc.contentAttributes.from(t,(t=>t.attrs))]});function Fv(t,e){const o=e.completion.apply||e.completion.label;let r=t.state.field(Gv).active.find((t=>t.source==e.source));return r instanceof Yv&&("string"==typeof o?t.dispatch(Object.assign(Object.assign({},function(t,e,o,r){let{main:i}=t.selection,n=o-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange((s=>{if(s!=i&&o!=r&&t.sliceDoc(s.from+n,s.from+a)!=t.sliceDoc(o,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+n,to:r==i.from?s.to:s.from+a,insert:l},range:Ki.cursor(s.from+n+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,o,r.from,r.to)),{annotations:qv.of(e.completion)})):o(t,e.completion,r.from,r.to),!0)}const Hv=jv(Gv,Fv);function Kv(t,e="option"){return o=>{let r=o.state.field(Gv,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<o.state.facet(Zv).interactionDelay)return!1;let i,n=1;"page"==e&&(i=$h(o,r.open.tooltip))&&(n=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+n*(t?1:-1):t?0:a-1;return s<0?s="page"==e?0:a-1:s>=a&&(s="page"==e?a-1:0),o.dispatch({effects:Nv.of(s)}),!0}}const Jv=t=>!!t.state.field(Gv,!1)&&(t.dispatch({effects:$v.of(!0)}),!0);class tO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const eO=ml.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Gv).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Gv),o=t.state.facet(Zv);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Gv)==e)return;let r=t.transactions.some((t=>{let e=Wv(t,o);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e<this.running.length;e++){let o=this.running[e];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>50&&Date.now()-o.time>1e3){for(let t of o.context.abortListeners)try{t()}catch(t){cl(this.view.state,t)}o.context.abortListeners=null,this.running.splice(e--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is($v)))))&&(this.pendingStart=!0);let i=this.pendingStart?50:o.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),i):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Gv);for(let t of e.active)t.isPending&&!this.running.some((e=>e.active.source==t.source))&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Zv).updateSyncTime))}startQuery(t){let{state:e}=this.view,o=wv(e),r=new vv(e,o,t.explicit,this.view),i=new tO(t,r);this.running.push(i),Promise.resolve(t.source(r)).then((t=>{i.context.aborted||(i.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:Pv.of(null)}),cl(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(Zv).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],o=this.view.state.facet(Zv),r=this.view.state.field(Gv);for(let i=0;i<this.running.length;i++){let n=this.running[i];if(void 0===n.done)continue;if(this.running.splice(i--,1),n.done){let r=wv(n.updates.length?n.updates[0].startState:this.view.state),i=Math.min(r,n.done.from+(n.active.explicit?0:1)),a=new Yv(n.active.source,n.active.explicit,i,n.done,n.done.from,null!==(t=n.done.to)&&void 0!==t?t:r);for(let t of n.updates)a=a.update(t,o);if(a.hasResult()){e.push(a);continue}}let a=r.active.find((t=>t.source==n.active.source));if(a&&a.isPending)if(null==n.done){let t=new Bv(n.active.source,0);for(let e of n.updates)t=t.update(e,o);t.isPending||e.push(t)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Iv.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Gv,!1);if(e&&e.tooltip&&this.view.state.facet(Zv).closeOnBlur){let o=e.open&&$h(this.view,e.open.tooltip);o&&o.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:Pv.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:$v.of(!1)})),20),this.composing=0}}}),oO="object"==typeof navigator&&/Win/.test(navigator.platform),rO=hn.highest(uc.domEventHandlers({keydown(t,e){let o=e.state.field(Gv,!1);if(!o||!o.open||o.open.disabled||o.open.selected<0||t.key.length>1||t.ctrlKey&&(!oO||!t.altKey)||t.metaKey)return!1;let r=o.open.options[o.open.selected],i=o.active.find((t=>t.source==r.source)),n=r.completion.commitCharacters||i.result.commitCharacters;return n&&n.indexOf(t.key)>-1&&Fv(e,r),!1}})),iO=uc.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class nO{constructor(t,e,o,r){this.field=t,this.line=e,this.from=o,this.to=r}}class aO{constructor(t,e,o){this.field=t,this.from=e,this.to=o}map(t){let e=t.mapPos(this.from,-1,Vi.TrackDel),o=t.mapPos(this.to,1,Vi.TrackDel);return null==e||null==o?null:new aO(this.field,e,o)}}class sO{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let o=[],r=[e],i=t.doc.lineAt(e),n=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(o.length){let o=n,a=/^\t*/.exec(i)[0].length;for(let e=0;e<a;e++)o+=t.facet(Vu);r.push(e+o.length-a),i=o+i.slice(a)}o.push(i),e+=i.length+1}let a=this.fieldPositions.map((t=>new aO(t.field,r[t.line]+t.from,r[t.line]+t.to)));return{text:o,ranges:a}}static parse(t){let e,o=[],r=[],i=[];for(let n of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(n);){let t=e[1]?+e[1]:null,a=e[2]||e[3]||"",s=-1,l=a.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<o.length;e++)(null!=t?o[e].seq==t:l&&o[e].name==l)&&(s=e);if(s<0){let e=0;for(;e<o.length&&(null==t||null!=o[e].seq&&o[e].seq<t);)e++;o.splice(e,0,{seq:t,name:l}),s=e;for(let t of i)t.field>=s&&t.field++}i.push(new nO(s,r.length,e.index,e.index+l.length)),n=n.slice(0,e.index)+a+n.slice(e.index+e[0].length)}n=n.replace(/\\([{}])/g,((t,e,o)=>{for(let t of i)t.line==r.length&&t.from>o&&(t.from--,t.to--);return e})),r.push(n)}return new sO(r,i)}}let lO=vs.widget({widget:new class extends bs{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),dO=vs.mark({class:"cm-snippetField"});class cO{constructor(t,e){this.ranges=t,this.active=e,this.deco=vs.set(t.map((t=>(t.from==t.to?lO:dO).range(t.from,t.to))))}map(t){let e=[];for(let o of this.ranges){let r=o.map(t);if(!r)return null;e.push(r)}return new cO(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const hO=Pn.define({map:(t,e)=>t&&t.map(e)}),pO=Pn.define(),uO=dn.define({create:()=>null,update(t,e){for(let o of e.effects){if(o.is(hO))return o.value;if(o.is(pO)&&t)return new cO(t.ranges,o.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>uc.decorations.from(t,(t=>t?t.deco:vs.none))});function mO(t,e){return Ki.create(t.filter((t=>t.field==e)).map((t=>Ki.range(t.from,t.to))))}function fO(t){let e=sO.parse(t);return(t,o,r,i)=>{let{text:n,ranges:a}=e.instantiate(t.state,r),{main:s}=t.state.selection,l={changes:{from:r,to:i==s.from?s.to:i,insert:$i.of(n)},scrollIntoView:!0,annotations:o?[qv.of(o),Cn.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=mO(a,0)),a.some((t=>t.field>0))){let e=new cO(a,0),o=l.effects=[hO.of(e)];void 0===t.state.field(uO,!1)&&o.push(Pn.appendConfig.of([uO,OO,yO,iO]))}t.dispatch(t.state.update(l))}}function bO(t){return({state:e,dispatch:o})=>{let r=e.field(uO,!1);if(!r||t<0&&0==r.active)return!1;let i=r.active+t,n=t>0&&!r.ranges.some((e=>e.field==i+t));return o(e.update({selection:mO(r.ranges,i),effects:hO.of(n?null:new cO(r.ranges,i)),scrollIntoView:!0})),!0}}const gO=[{key:"Tab",run:bO(1),shift:bO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(uO,!1)&&(e(t.update({effects:hO.of(null)})),!0)}],vO=en.define({combine:t=>t.length?t[0]:gO}),OO=hn.highest(yc.compute([vO],(t=>t.facet(vO))));function xO(t,e){return Object.assign(Object.assign({},e),{apply:fO(t)})}const yO=uc.domEventHandlers({mousedown(t,e){let o,r=e.state.field(uO,!1);if(!r||null==(o=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=r.ranges.find((t=>t.from<=o&&t.to>=o));return!(!i||i.field==r.active||(e.dispatch({selection:mO(r.ranges,i.field),effects:hO.of(r.ranges.some((t=>t.field>i.field))?new cO(r.ranges,i.field):null),scrollIntoView:!0}),0))}}),wO={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},kO=Pn.define({map(t,e){let o=e.mapPos(t,-1,Vi.TrackAfter);return null==o?void 0:o}}),qO=new class extends Un{};qO.startSide=1,qO.endSide=-1;const SO=dn.define({create:()=>Bn.empty,update(t,e){if(t=t.map(e.changes),e.selection){let o=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=o.from&&t<=o.to})}for(let o of e.effects)o.is(kO)&&(t=t.update({add:[qO.range(o.value,o.value+1)]}));return t}}),QO="()[]{}<>«»»«[]{}";function $O(t){for(let e=0;e<16;e+=2)if(QO.charCodeAt(e)==t)return QO.charAt(e+1);return _i(t<128?t:t+1)}function PO(t,e){return t.languageDataAt("closeBrackets",e)[0]||wO}const CO="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),RO=uc.inputHandler.of(((t,e,o,r)=>{if((CO?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||2==r.length&&1==Di(Xi(r,0))||e!=i.from||o!=i.to)return!1;let n=function(t,e){let o=PO(t,t.selection.main.head),r=o.brackets||wO.brackets;for(let i of r){let n=$O(Xi(i,0));if(e==i)return n==i?jO(t,i,r.indexOf(i+i+i)>-1,o):MO(t,i,n,o.before||wO.before);if(e==n&&TO(t,t.selection.main.from))return EO(t,0,n)}return null}(t.state,r);return!!n&&(t.dispatch(n),!0)})),ZO=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let o=PO(t,t.selection.main.head).brackets||wO.brackets,r=null,i=t.changeByRange((e=>{if(e.empty){let r=function(t,e){let o=t.sliceString(e-2,e);return Di(Xi(o,0))==o.length?o:o.slice(1)}(t.doc,e.head);for(let i of o)if(i==r&&AO(t.doc,e.head)==$O(Xi(i,0)))return{changes:{from:e.head-i.length,to:e.head+i.length},range:Ki.cursor(e.head-i.length)}}return{range:r=e}}));return r||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function TO(t,e){let o=!1;return t.field(SO).between(0,t.doc.length,(t=>{t==e&&(o=!0)})),o}function AO(t,e){let o=t.sliceString(e,e+2);return o.slice(0,Di(Xi(o,0)))}function MO(t,e,o,r){let i=null,n=t.changeByRange((n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:o,from:n.to}],effects:kO.of(n.to+e.length),range:Ki.range(n.anchor+e.length,n.head+e.length)};let a=AO(t.doc,n.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+o,from:n.head},effects:kO.of(n.head+e.length),range:Ki.cursor(n.head+e.length)}:{range:i=n}}));return i?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function EO(t,e,o){let r=null,i=t.changeByRange((e=>e.empty&&AO(t.doc,e.head)==o?{changes:{from:e.head,to:e.head+o.length,insert:o},range:Ki.cursor(e.head+o.length)}:r={range:e}));return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function jO(t,e,o,r){let i=r.stringPrefixes||wO.stringPrefixes,n=null,a=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:kO.of(r.to+e.length),range:Ki.range(r.anchor+e.length,r.head+e.length)};let a,s=r.head,l=AO(t.doc,s);if(l==e){if(zO(t,s))return{changes:{insert:e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)};if(TO(t,s)){let r=o&&t.sliceDoc(s,s+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:s,to:s+r.length,insert:r},range:Ki.cursor(s+r.length)}}}else{if(o&&t.sliceDoc(s-2*e.length,s)==e+e&&(a=XO(t,s-2*e.length,i))>-1&&zO(t,a))return{changes:{insert:e+e+e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)};if(t.charCategorizer(s)(l)!=jn.Word&&XO(t,s,i)>-1&&!function(t,e,o,r){let i=Ru(t).resolveInner(e,-1),n=r.reduce(((t,e)=>Math.max(t,e.length)),0);for(let a=0;a<5;a++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+o.length+n)),s=a.indexOf(o);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>o.length+s;){if(t.sliceDoc(e.to-o.length,e.to)==o)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,s,e,i))return{changes:{insert:e+e,from:s},effects:kO.of(s+e.length),range:Ki.cursor(s+e.length)}}return{range:n=r}}));return n?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function zO(t,e){let o=Ru(t).resolveInner(e+1);return o.parent&&o.from==e}function XO(t,e,o){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=jn.Word)return e;for(let i of o){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=jn.Word)return o}return-1}function _O(t={}){return[rO,Gv,Zv.of(t),eO,UO,iO]}const DO=[{key:"Ctrl-Space",run:Jv},{mac:"Alt-`",run:Jv},{key:"Escape",run:t=>{let e=t.state.field(Gv,!1);return!(!e||!e.active.some((t=>0!=t.state))||(t.dispatch({effects:Pv.of(null)}),0))}},{key:"ArrowDown",run:Kv(!0)},{key:"ArrowUp",run:Kv(!1)},{key:"PageDown",run:Kv(!0,"page")},{key:"PageUp",run:Kv(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(Gv,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Zv).interactionDelay)&&Fv(t,e.open.options[e.open.selected])}}],UO=hn.highest(yc.computeN([Zv],(t=>t.facet(Zv).defaultKeymap?[DO]:[]))),VO=[xO("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),xO("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),xO("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),xO("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),xO("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),xO("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),xO("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),xO("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),xO("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),xO('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),xO('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LO=VO.concat([xO("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),xO("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),xO("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),WO=new Mp,BO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function YO(t){return(e,o)=>{let r=e.node.getChild("VariableDefinition");return r&&o(r,t),!0}}const IO=["FunctionDeclaration"],NO={FunctionDeclaration:YO("function"),ClassDeclaration:YO("class"),ClassExpression:()=>!0,EnumDeclaration:YO("constant"),TypeAliasDeclaration:YO("type"),NamespaceDeclaration:YO("namespace"),VariableDefinition(t,e){t.matchContext(IO)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function GO(t,e){let o=WO.get(e);if(o)return o;let r=[],i=!0;function n(e,o){let i=t.sliceString(e.from,e.to);r.push({label:i,type:o})}return e.cursor(fp.IncludeAnonymous).iterate((e=>{if(i)i=!1;else if(e.name){let t=NO[e.name];if(t&&t(e,n)||BO.has(e.name))return!1}else if(e.to-e.from>8192){for(let o of GO(t,e.node))r.push(o);return!1}})),WO.set(e,r),r}const FO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,HO=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function KO(t){let e=Ru(t.state).resolveInner(t.pos,-1);if(HO.indexOf(e.name)>-1)return null;let o="VariableName"==e.name||e.to-e.from<20&&FO.test(t.state.sliceDoc(e.from,e.to));if(!o&&!t.explicit)return null;let r=[];for(let o=e;o;o=o.parent)BO.has(o.name)&&(r=r.concat(GO(t.state.doc,o)));return{options:r,from:o?e.from:t.pos,validFor:FO}}const JO=Cu.define({name:"javascript",parser:gv.configure({props:[Iu.add({IfStatement:em({except:/^\s*({|else\b)/}),TryStatement:em({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,o=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(o?0:r?1:2)*t.unit},Block:Ju({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":em({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),rm.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":im,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),tx={test:t=>/^JSX/.test(t.name),facet:Su({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ex=JO.configure({dialect:"ts"},"typescript"),ox=JO.configure({dialect:"jsx",props:[Qu.add((t=>t.isTop?[tx]:void 0))]}),rx=JO.configure({dialect:"jsx ts",props:[Qu.add((t=>t.isTop?[tx]:void 0))]},"typescript");let ix=t=>({label:t,type:"keyword"});const nx="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(ix),ax=nx.concat(["declare","implements","private","protected","public"].map(ix));function sx(t={}){let e=t.jsx?t.typescript?rx:ox:t.typescript?ex:JO,o=t.typescript?LO.concat(ax):VO.concat(nx);return new Du(e,[JO.data.of({autocomplete:(r=HO,i=xv(o),t=>{for(let e=Ru(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return i(t)})}),JO.data.of({autocomplete:KO}),t.jsx?cx:[]]);var r,i}function lx(t,e,o=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,o));return""}const dx="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),cx=uc.inputHandler.of(((t,e,o,r,i)=>{if((dx?t.composing:t.compositionStarted)||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!JO.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange((t=>{var e;let o,{head:i}=t,n=Ru(a).resolveInner(i-1,-1);if("JSXStartTag"==n.name&&(n=n.parent),a.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==n.name&&n.to>i);else{if(">"==r&&"JSXFragmentTag"==n.name)return{range:t,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==n.name){let t=n.parent,r=t.parent;if(r&&t.from==i-2&&((o=lx(a.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${o}>`;return{range:Ki.cursor(i+t.length,-1),changes:{from:i,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(n);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(a.doc.sliceString(i,i+2))&&(o=lx(a.doc,e,i)))return{range:t,changes:{from:i,insert:`</${o}>`}}}}return{range:t}}));return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),hx=["_blank","_self","_top","_parent"],px=["ascii","utf-8","utf-16","latin1","latin1"],ux=["get","post","put","delete"],mx=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],fx=["true","false"],bx={},gx={a:{attrs:{href:null,ping:null,type:null,media:null,target:hx,hreflang:null}},abbr:bx,address:bx,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:bx,aside:bx,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:bx,base:{attrs:{href:null,target:hx}},bdi:bx,bdo:bx,blockquote:{attrs:{cite:null}},body:bx,br:bx,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:mx,formmethod:ux,formnovalidate:["novalidate"],formtarget:hx,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:bx,center:bx,cite:bx,code:bx,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:bx,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:bx,div:bx,dl:bx,dt:bx,em:bx,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:bx,figure:bx,footer:bx,form:{attrs:{action:null,name:null,"accept-charset":px,autocomplete:["on","off"],enctype:mx,method:ux,novalidate:["novalidate"],target:hx}},h1:bx,h2:bx,h3:bx,h4:bx,h5:bx,h6:bx,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:bx,hgroup:bx,hr:bx,html:{attrs:{manifest:null}},i:bx,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:mx,formmethod:ux,formnovalidate:["novalidate"],formtarget:hx,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:bx,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:bx,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:bx,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:px,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:bx,noscript:bx,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:bx,param:{attrs:{name:null,value:null}},pre:bx,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:bx,rt:bx,ruby:bx,samp:bx,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:px}},section:bx,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:bx,source:{attrs:{src:null,type:null,media:null}},span:bx,strong:bx,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:bx,summary:bx,sup:bx,table:bx,tbody:bx,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:bx,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:bx,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:bx,time:{attrs:{datetime:null}},title:bx,tr:bx,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:bx,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:bx},vx={accesskey:null,class:null,contenteditable:fx,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:fx,autocorrect:fx,autocapitalize:fx,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":fx,"aria-autocomplete":["inline","list","both","none"],"aria-busy":fx,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":fx,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":fx,"aria-hidden":fx,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":fx,"aria-multiselectable":fx,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":fx,"aria-relevant":null,"aria-required":fx,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Ox="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let t of Ox)vx[t]=null;class xx{constructor(t,e){this.tags=Object.assign(Object.assign({},gx),t),this.globalAttrs=Object.assign(Object.assign({},vx),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function yx(t,e,o=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,o)):""}function wx(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function kx(t,e,o){let r=o.tags[yx(t,wx(e))];return(null==r?void 0:r.children)||o.allTags}function qx(t,e){let o=[];for(let r=wx(e);r&&!r.type.isTop;r=wx(r.parent)){let i=yx(t,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&o.indexOf(i)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&o.push(i)}return o}xx.default=new xx;const Sx=/^[:\-\.\w\u00b7-\uffff]*$/;function Qx(t,e,o,r,i){let n=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",a=wx(o,!0);return{from:r,to:i,options:kx(t.doc,a,e).map((t=>({label:t,type:"type"}))).concat(qx(t.doc,o).map(((t,e)=>({label:"/"+t,apply:"/"+t+n,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function $x(t,e,o,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:o,to:r,options:qx(t.doc,e).map(((t,e)=>({label:t,apply:t+i,type:"type",boost:99-e}))),validFor:Sx}}function Px(t){let{extraTags:e,extraGlobalAttributes:o}=t,r=o||e?new xx(e,o):xx.default;return t=>function(t,e){let{state:o,pos:r}=e,i=Ru(o).resolveInner(r,-1),n=i.resolve(r);for(let t,e=r;n==i&&(t=i.childBefore(e));){let o=t.lastChild;if(!o||!o.type.isError||o.from<o.to)break;n=i=t,e=o.from}return"TagName"==i.name?i.parent&&/CloseTag$/.test(i.parent.name)?$x(o,i,i.from,r):Qx(o,t,i,i.from,r):"StartTag"==i.name?Qx(o,t,i,r,r):"StartCloseTag"==i.name||"IncompleteCloseTag"==i.name?$x(o,i,r,r):"OpenTag"==i.name||"SelfClosingTag"==i.name||"AttributeName"==i.name?function(t,e,o,r,i){let n=wx(o),a=n?e.tags[yx(t.doc,n)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:r,to:i,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames).map((t=>({label:t,type:"property"}))),validFor:Sx}}(o,t,i,"AttributeName"==i.name?i.from:r,r):"Is"==i.name||"AttributeValue"==i.name||"UnquotedAttributeValue"==i.name?function(t,e,o,r,i){var n;let a,s=null===(n=o.parent)||void 0===n?void 0:n.getChild("AttributeName"),l=[];if(s){let n=t.sliceDoc(s.from,s.to),d=e.globalAttrs[n];if(!d){let r=wx(o),i=r?e.tags[yx(t.doc,r)]:null;d=(null==i?void 0:i.attrs)&&i.attrs[n]}if(d){let e=t.sliceDoc(r,i).toLowerCase(),o='"',n='"';/^['"]/.test(e)?(a='"'==e[0]?/^[^"]*$/:/^[^']*$/,o="",n=t.sliceDoc(i,i+1)==e[0]?"":e[0],e=e.slice(1),r++):a=/^[^\s<>='"]*$/;for(let t of d)l.push({label:t,apply:o+t+n,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}(o,t,i,"Is"==i.name?r:i.from,r):!e.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,o,r){let i=[],n=0;for(let r of kx(t.doc,o,e))i.push({label:"<"+r,type:"type"});for(let e of qx(t.doc,o))i.push({label:"</"+e+">",type:"type",boost:99-n++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(o,t,i,r)}(r,t)}const Cx=JO.parser.configure({top:"SingleExpression"}),Rx=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:ex.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:ox.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:rx.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:Cx},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:JO.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:rv.parser}],Zx=[{name:"style",parser:rv.parser.configure({top:"Styles"})}].concat(Ox.map((t=>({name:t,parser:JO.parser})))),Tx=Cu.define({name:"html",parser:$g.configure({props:[Iu.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,o=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;o=e=t}return o&&(!(e=o.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(o.from)+t.unit:null}}),rm.add({Element(t){let e=t.firstChild,o=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==o.name?o.from:t.to}:null}}),Wm.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Ax=Tx.configure({wrap:Zg(Rx,Zx)});function Mx(t={}){let e,o="";!1===t.matchClosingTags&&(o="noMatch"),!0===t.selfClosingTags&&(o=(o?o+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=Zg((t.nestedLanguages||[]).concat(Rx),(t.nestedAttributes||[]).concat(Zx)));let r=e?Tx.configure({wrap:e,dialect:o}):o?Ax.configure({dialect:o}):Ax;return new Du(r,[Ax.data.of({autocomplete:Px(t)}),!1!==t.autoCloseTags?jx:[],sx().support,iv().support])}const Ex=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),jx=uc.inputHandler.of(((t,e,o,r,i)=>{if(t.composing||t.state.readOnly||e!=o||">"!=r&&"/"!=r||!Ax.isActiveAt(t.state,e,-1))return!1;let n=i(),{state:a}=n,s=a.changeByRange((t=>{var e,o,i;let n,s=a.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,d=Ru(a).resolveInner(l,-1);if(s&&">"==r&&"EndTag"==d.name){let r=d.parent;if("CloseTag"!=(null===(o=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===o?void 0:o.name)&&(n=yx(a.doc,r.parent,l))&&!Ex.has(n))return{range:t,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${n}>`}}}else if(s&&"/"==r&&"IncompleteCloseTag"==d.name){let t=d.parent;if(d.from==l-2&&"CloseTag"!=(null===(i=t.lastChild)||void 0===i?void 0:i.name)&&(n=yx(a.doc,t,l))&&!Ex.has(n)){let t=l+(">"===a.doc.sliceString(l,l+1)?1:0),e=`${n}>`;return{range:Ki.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!s.changes.empty&&(t.dispatch([n,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function zx(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,o=arguments[1];if(o&&"object"==typeof o&&null==o.nodeType&&!Array.isArray(o)){for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){var i=o[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)Xx(t,arguments[e]);return t}function Xx(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var o=0;o<e.length;o++)Xx(t,e[o])}}const _x="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Dx{constructor(t,e,o=0,r=t.length,i,n){this.test=n,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(o,r),this.bufferStart=o,this.normalize=i?t=>i(_x(t)):_x,this.query=this.normalize(e)}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 Xi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=_i(t),o=this.bufferStart+this.bufferPos;this.bufferPos+=Di(t);let r=this.normalize(e);if(r.length)for(let t=0,i=o;;t++){let n=r.charCodeAt(t),a=this.match(n,i,this.bufferPos+this.bufferStart);if(t==r.length-1){if(a)return this.value=a,this;break}i==o&&t<e.length&&e.charCodeAt(t)==n&&i++}}}match(t,e,o){let r=null;for(let e=0;e<this.matches.length;e+=2){let i=this.matches[e],n=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?r={from:this.matches[e+1],to:o}:(this.matches[e]++,n=!0)),n||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:o}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(Dx.prototype[Symbol.iterator]=function(){return this});const Ux={from:-1,to:-1,match:/.*/.exec("")},Vx="gm"+(null==/x/.unicode?"":"u");class Lx{constructor(t,e,o,r=0,i=t.length){if(this.text=t,this.to=i,this.curLine="",this.done=!1,this.value=Ux,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Yx(t,e,o,r,i);this.re=new RegExp(e,Vx+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.iter=t.iter();let n=t.lineAt(r);this.curLineStart=n.from,this.matchPos=Ix(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let o=this.curLineStart+e.index,r=o+e[0].length;if(this.matchPos=Ix(this.text,r+(o==r?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<r||o>this.value.to)&&(!this.test||this.test(o,r,e)))return this.value={from:o,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const Wx=new WeakMap;class Bx{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,o){let r=Wx.get(t);if(!r||r.from>=o||r.to<=e){let r=new Bx(e,t.sliceString(e,o));return Wx.set(t,r),r}if(r.from==e&&r.to==o)return r;let{text:i,from:n}=r;return n>e&&(i=t.sliceString(e,n)+i,n=e),r.to<o&&(i+=t.sliceString(r.to,o)),Wx.set(t,new Bx(n,i)),new Bx(e,i.slice(e-n,o-n))}}class Yx{constructor(t,e,o,r,i){this.text=t,this.to=i,this.done=!1,this.value=Ux,this.matchPos=Ix(t,r),this.re=new RegExp(e,Vx+((null==o?void 0:o.ignoreCase)?"i":"")),this.test=null==o?void 0:o.test,this.flat=Bx.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,o=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,o,e)))return this.value={from:t,to:o,match:e},this.matchPos=Ix(this.text,o+(t==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Bx.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Ix(t,e){if(e>=t.length)return e;let o,r=t.lineAt(e);for(;e<r.to&&(o=r.text.charCodeAt(e-r.from))>=56320&&o<57344;)e++;return e}function Nx(t){let e=zx("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function o(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,i=r.doc.lineAt(r.selection.main.head),[,n,a,s,l]=o,d=s?+s.slice(1):0,c=a?+a:i.number;if(a&&l){let t=c/100;n&&(t=t*("-"==n?-1:1)+i.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else a&&n&&(c=c*("-"==n?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),p=Ki.cursor(h.from+Math.max(0,Math.min(d,h.length)));t.dispatch({effects:[Gx.of(!1),uc.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:zx("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Gx.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),o())},onsubmit:t=>{t.preventDefault(),o()}},zx("label",t.state.phrase("Go to line"),": ",e)," ",zx("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),zx("button",{name:"close",onclick:()=>{t.dispatch({effects:Gx.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(Lx.prototype[Symbol.iterator]=Yx.prototype[Symbol.iterator]=function(){return this});const Gx=Pn.define(),Fx=dn.define({create:()=>!0,update(t,e){for(let o of e.effects)o.is(Gx)&&(t=o.value);return t},provide:t=>Mh.from(t,(t=>t?Nx:null))}),Hx=uc.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Kx={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Jx=en.define({combine:t=>Dn(t,Kx,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function ty(t){let e=[ny,iy];return t&&e.push(Jx.of(t)),e}const ey=vs.mark({class:"cm-selectionMatch"}),oy=vs.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ry(t,e,o,r){return!(0!=o&&t(e.sliceDoc(o-1,o))==jn.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==jn.Word)}const iy=ml.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Jx),{state:o}=t,r=o.selection;if(r.ranges.length>1)return vs.none;let i,n=r.main,a=null;if(n.empty){if(!e.highlightWordAroundCursor)return vs.none;let t=o.wordAt(n.head);if(!t)return vs.none;a=o.charCategorizer(n.head),i=o.sliceDoc(t.from,t.to)}else{let t=n.to-n.from;if(t<e.minSelectionLength||t>200)return vs.none;if(e.wholeWords){if(i=o.sliceDoc(n.from,n.to),a=o.charCategorizer(n.head),!ry(a,o,n.from,n.to)||!function(t,e,o,r){return t(e.sliceDoc(o,o+1))==jn.Word&&t(e.sliceDoc(r-1,r))==jn.Word}(a,o,n.from,n.to))return vs.none}else if(i=o.sliceDoc(n.from,n.to),!i)return vs.none}let s=[];for(let r of t.visibleRanges){let t=new Dx(o.doc,i,r.from,r.to);for(;!t.next().done;){let{from:r,to:i}=t.value;if((!a||ry(a,o,r,i))&&(n.empty&&r<=n.from&&i>=n.to?s.push(oy.range(r,i)):(r>=n.to||i<=n.from)&&s.push(ey.range(r,i)),s.length>e.maxMatches))return vs.none}}return vs.set(s)}},{decorations:t=>t.decorations}),ny=uc.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),ay=en.define({combine:t=>Dn(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Ey(t),scrollToMatch:t=>uc.scrollIntoView(t)})});class sy{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Vx),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new my(this):new cy(this)}getCursor(t,e=0,o){let r=t.doc?t:_n.create({doc:t});return null==o&&(o=r.doc.length),this.regexp?hy(this,r,e,o):dy(this,r,e,o)}}class ly{constructor(t){this.spec=t}}function dy(t,e,o,r){return new Dx(e.doc,t.unquoted,o,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(o,r,i,n)=>((n>o||n+i.length<r)&&(n=Math.max(0,o-2),i=t.sliceString(n,Math.min(t.length,r+2))),!(e(py(i,o-n))==jn.Word&&e(uy(i,o-n))==jn.Word||e(uy(i,r-n))==jn.Word&&e(py(i,r-n))==jn.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class cy extends ly{constructor(t){super(t)}nextMatch(t,e,o){let r=dy(this.spec,t,o,t.doc.length).nextOverlapping();if(r.done){let o=Math.min(t.doc.length,e+this.spec.unquoted.length);r=dy(this.spec,t,0,o).nextOverlapping()}return r.done||r.value.from==e&&r.value.to==o?null:r.value}prevMatchInRange(t,e,o){for(let r=o;;){let o=Math.max(e,r-1e4-this.spec.unquoted.length),i=dy(this.spec,t,o,r),n=null;for(;!i.nextOverlapping().done;)n=i.value;if(n)return n;if(o==e)return null;r-=1e4}}prevMatch(t,e,o){let r=this.prevMatchInRange(t,0,e);return r||(r=this.prevMatchInRange(t,Math.max(0,o-this.spec.unquoted.length),t.doc.length)),!r||r.from==e&&r.to==o?null:r}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let o=dy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=dy(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function hy(t,e,o,r){return new Lx(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(i=e.charCategorizer(e.selection.main.head),(t,e,o)=>!o[0].length||(i(py(o.input,o.index))!=jn.Word||i(uy(o.input,o.index))!=jn.Word)&&(i(uy(o.input,o.index+o[0].length))!=jn.Word||i(py(o.input,o.index+o[0].length))!=jn.Word)):void 0},o,r);var i}function py(t,e){return t.slice(zi(t,e,!1),e)}function uy(t,e){return t.slice(e,zi(t,e))}class my extends ly{nextMatch(t,e,o){let r=hy(this.spec,t,o,t.doc.length).next();return r.done&&(r=hy(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,o){for(let r=1;;r++){let i=Math.max(e,o-1e4*r),n=hy(this.spec,t,i,o),a=null;for(;!n.next().done;)a=n.value;if(a&&(i==e||a.from>i+10))return a;if(i==e)return null}}prevMatch(t,e,o){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,o,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,((e,o)=>{if("&"==o)return t.match[0];if("$"==o)return"$";for(let e=o.length;e>0;e--){let r=+o.slice(0,e);if(r>0&&r<t.match.length)return t.match[r]+o.slice(e)}return e}))}matchAll(t,e){let o=hy(this.spec,t,0,t.doc.length),r=[];for(;!o.next().done;){if(r.length>=e)return null;r.push(o.value)}return r}highlight(t,e,o,r){let i=hy(this.spec,t,Math.max(0,e-250),Math.min(o+250,t.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const fy=Pn.define(),by=Pn.define(),gy=dn.define({create:t=>new vy(Cy(t).create(),null),update(t,e){for(let o of e.effects)o.is(fy)?t=new vy(o.value.create(),t.panel):o.is(by)&&(t=new vy(t.query,o.value?Py:null));return t},provide:t=>Mh.from(t,(t=>t.panel))});class vy{constructor(t,e){this.query=t,this.panel=e}}const Oy=vs.mark({class:"cm-searchMatch"}),xy=vs.mark({class:"cm-searchMatch cm-searchMatch-selected"}),yy=ml.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(gy))}update(t){let e=t.state.field(gy);(e!=t.startState.field(gy)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return vs.none;let{view:o}=this,r=new Yn;for(let e=0,i=o.visibleRanges,n=i.length;e<n;e++){let{from:a,to:s}=i[e];for(;e<n-1&&s>i[e+1].from-500;)s=i[++e].to;t.highlight(o.state,a,s,((t,e)=>{let i=o.state.selection.ranges.some((o=>o.from==t&&o.to==e));r.add(t,e,i?xy:Oy)}))}return r.finish()}},{decorations:t=>t.decorations});function wy(t){return e=>{let o=e.state.field(gy,!1);return o&&o.query.spec.valid?t(e,o):Ty(e)}}const ky=wy(((t,{query:e})=>{let{to:o}=t.state.selection.main,r=e.nextMatch(t.state,o,o);if(!r)return!1;let i=Ki.single(r.from,r.to),n=t.state.facet(ay);return t.dispatch({selection:i,effects:[_y(t,r),n.scrollToMatch(i.main,t)],userEvent:"select.search"}),Zy(t),!0})),qy=wy(((t,{query:e})=>{let{state:o}=t,{from:r}=o.selection.main,i=e.prevMatch(o,r,r);if(!i)return!1;let n=Ki.single(i.from,i.to),a=t.state.facet(ay);return t.dispatch({selection:n,effects:[_y(t,i),a.scrollToMatch(n.main,t)],userEvent:"select.search"}),Zy(t),!0})),Sy=wy(((t,{query:e})=>{let o=e.matchAll(t.state,1e3);return!(!o||!o.length||(t.dispatch({selection:Ki.create(o.map((t=>Ki.range(t.from,t.to)))),userEvent:"select.search.matches"}),0))})),Qy=wy(((t,{query:e})=>{let{state:o}=t,{from:r,to:i}=o.selection.main;if(o.readOnly)return!1;let n=e.nextMatch(o,r,r);if(!n)return!1;let a,s,l=n,d=[],c=[];if(l.from==r&&l.to==i&&(s=o.toText(e.getReplacement(l)),d.push({from:l.from,to:l.to,insert:s}),l=e.nextMatch(o,l.from,l.to),c.push(uc.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(r).number)+"."))),l){let e=0==d.length||d[0].from>=n.to?0:n.to-n.from-s.length;a=Ki.single(l.from-e,l.to-e),c.push(_y(t,l)),c.push(o.facet(ay).scrollToMatch(a.main,t))}return t.dispatch({changes:d,selection:a,effects:c,userEvent:"input.replace"}),!0})),$y=wy(((t,{query:e})=>{if(t.state.readOnly)return!1;let o=e.matchAll(t.state,1e9).map((t=>{let{from:o,to:r}=t;return{from:o,to:r,insert:e.getReplacement(t)}}));if(!o.length)return!1;let r=t.state.phrase("replaced $ matches",o.length)+".";return t.dispatch({changes:o,effects:uc.announce.of(r),userEvent:"input.replace.all"}),!0}));function Py(t){return t.state.facet(ay).createPanel(t)}function Cy(t,e){var o,r,i,n,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let d=t.facet(ay);return new sy({search:(null!==(o=null==e?void 0:e.literal)&&void 0!==o?o:d.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:d.caseSensitive,literal:null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:d.literal,regexp:null!==(n=null==e?void 0:e.regexp)&&void 0!==n?n:d.regexp,wholeWord:null!==(a=null==e?void 0:e.wholeWord)&&void 0!==a?a:d.wholeWord})}function Ry(t){let e=Rh(t,Py);return e&&e.dom.querySelector("[main-field]")}function Zy(t){let e=Ry(t);e&&e==t.root.activeElement&&e.select()}const Ty=t=>{let e=t.state.field(gy,!1);if(e&&e.panel){let o=Ry(t);if(o&&o!=t.root.activeElement){let r=Cy(t.state,e.query.spec);r.valid&&t.dispatch({effects:fy.of(r)}),o.focus(),o.select()}}else t.dispatch({effects:[by.of(!0),e?fy.of(Cy(t.state,e.query.spec)):Pn.appendConfig.of(Uy)]});return!0},Ay=t=>{let e=t.state.field(gy,!1);if(!e||!e.panel)return!1;let o=Rh(t,Py);return o&&o.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:by.of(!1)}),!0},My=[{key:"Mod-f",run:Ty,scope:"editor search-panel"},{key:"F3",run:ky,shift:qy,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ky,shift:qy,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ay,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let o=t.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:r,to:i}=o.main,n=[],a=0;for(let e=new Dx(t.doc,t.sliceDoc(r,i));!e.next().done;){if(n.length>1e3)return!1;e.value.from==r&&(a=n.length),n.push(Ki.range(e.value.from,e.value.to))}return e(t.update({selection:Ki.create(n,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=Rh(t,Nx);if(!e){let o=[Gx.of(!0)];null==t.state.field(Fx,!1)&&o.push(Pn.appendConfig.of([Fx,Hx])),t.dispatch({effects:o}),e=Rh(t,Nx)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:o}=t.selection;if(o.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:o}=t,r=Ki.create(o.ranges.map((e=>t.wordAt(e.head)||Ki.cursor(e.head))),o.mainIndex);return!r.eq(o)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(o[0].from,o[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=r)))return!1;let i=function(t,e){let{main:o,ranges:r}=t.selection,i=t.wordAt(o.head),n=i&&i.from==o.from&&i.to==o.to;for(let o=!1,i=new Dx(t.doc,e,r[r.length-1].to);;){if(i.next(),!i.done){if(o&&r.some((t=>t.from==i.value.from)))continue;if(n){let e=t.wordAt(i.value.from);if(!e||e.from!=i.value.from||e.to!=i.value.to)continue}return i.value}if(o)return null;i=new Dx(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}}(t,r);return!!i&&(e(t.update({selection:t.selection.addRange(Ki.range(i.from,i.to),!1),effects:uc.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Ey{constructor(t){this.view=t;let e=this.query=t.state.field(gy).query.spec;function o(t,e,o){return zx("button",{class:"cm-button",name:t,onclick:e,type:"button"},o)}this.commit=this.commit.bind(this),this.searchField=zx("input",{value:e.search,placeholder:jy(t,"Find"),"aria-label":jy(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zx("input",{value:e.replace,placeholder:jy(t,"Replace"),"aria-label":jy(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zx("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=zx("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=zx("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=zx("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,o("next",(()=>ky(t)),[jy(t,"next")]),o("prev",(()=>qy(t)),[jy(t,"previous")]),o("select",(()=>Sy(t)),[jy(t,"all")]),zx("label",null,[this.caseField,jy(t,"match case")]),zx("label",null,[this.reField,jy(t,"regexp")]),zx("label",null,[this.wordField,jy(t,"by word")]),...t.state.readOnly?[]:[zx("br"),this.replaceField,o("replace",(()=>Qy(t)),[jy(t,"replace")]),o("replaceAll",(()=>$y(t)),[jy(t,"replace all")])],zx("button",{name:"close",onclick:()=>Ay(t),"aria-label":jy(t,"close"),type:"button"},["×"])])}commit(){let t=new sy({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:fy.of(t)}))}keydown(t){var e,o;o=t,$c(kc((e=this.view).state),o,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?qy:ky)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Qy(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(fy)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ay).top}}function jy(t,e){return t.state.phrase(e)}const zy=30,Xy=/[\s\.,:;?!]/;function _y(t,{from:e,to:o}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(o).to,n=Math.max(r.from,e-zy),a=Math.min(i,o+zy),s=t.state.sliceDoc(n,a);if(n!=r.from)for(let t=0;t<zy;t++)if(!Xy.test(s[t+1])&&Xy.test(s[t])){s=s.slice(t);break}if(a!=i)for(let t=s.length-1;t>s.length-zy;t--)if(!Xy.test(s[t-1])&&Xy.test(s[t])){s=s.slice(0,t);break}return uc.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Dy=uc.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"}}),Uy=[gy,hn.low(yy),Dy];class Vy{constructor(t,e,o){this.from=t,this.to=e,this.diagnostic=o}}class Ly{constructor(t,e,o){this.diagnostics=t,this.panel=e,this.selected=o}static init(t,e,o){let r=t,i=o.facet(tw).markerFilter;i&&(r=i(r,o));let n=t.slice().sort(((t,e)=>t.from-e.from||t.to-e.to)),a=new Yn,s=[],l=0;for(let t=0;;){let e,r,i=t==n.length?null:n[t];if(!i&&!s.length)break;for(s.length?(e=l,r=s.reduce(((t,e)=>Math.min(t,e.to)),i&&i.from>e?i.from:1e8)):(e=i.from,r=i.to,s.push(i),t++);t<n.length;){let o=n[t];if(o.from!=e||!(o.to>o.from||o.to==e)){r=Math.min(o.from,r);break}s.push(o),t++,r=Math.min(o.to,r)}let d=dw(s);if(s.some((t=>t.from==t.to||t.from==t.to-1&&o.doc.lineAt(t.from).to==t.from)))a.add(e,e,vs.widget({widget:new rw(d),diagnostics:s.slice()}));else{let t=s.reduce(((t,e)=>e.markClass?t+" "+e.markClass:t),"");a.add(e,r,vs.mark({class:"cm-lintRange cm-lintRange-"+d+t,diagnostics:s.slice(),inclusiveEnd:s.some((t=>t.to>r))}))}l=r;for(let t=0;t<s.length;t++)s[t].to<=l&&s.splice(t--,1)}let d=a.finish();return new Ly(d,e,Wy(d))}}function Wy(t,e=null,o=0){let r=null;return t.between(o,1e9,((t,o,{spec:i})=>{if(!(e&&i.diagnostics.indexOf(e)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new Vy(r.from,o,r.diagnostic)}else r=new Vy(t,o,e||i.diagnostics[0])})),r}const By=Pn.define(),Yy=Pn.define(),Iy=Pn.define(),Ny=dn.define({create:()=>new Ly(vs.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let o=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=Wy(o,t.selected.diagnostic,i)||Wy(o,null,i)}!o.size&&i&&e.state.facet(tw).autoPanel&&(i=null),t=new Ly(o,i,r)}for(let o of e.effects)if(o.is(By)){let r=e.state.facet(tw).autoPanel?o.value.length?nw.open:null:t.panel;t=Ly.init(o.value,r,e.state)}else o.is(Yy)?t=new Ly(t.diagnostics,o.value?nw.open:null,t.selected):o.is(Iy)&&(t=new Ly(t.diagnostics,t.panel,o.value));return t},provide:t=>[Mh.from(t,(t=>t.panel)),uc.decorations.from(t,(t=>t.diagnostics))]}),Gy=vs.mark({class:"cm-lintRange cm-lintRange-active"});function Fy(t,e,o){let r,{diagnostics:i}=t.state.field(Ny),n=-1,a=-1;i.between(e-(o<0?1:0),e+(o>0?1:0),((t,i,{spec:s})=>{if(e>=t&&e<=i&&(t==i||(e>t||o>0)&&(e<i||o<0)))return r=s.diagnostics,n=t,a=i,!1}));let s=t.state.facet(tw).tooltipFilter;return r&&s&&(r=s(r,t.state)),r?{pos:n,end:a,above:t.state.doc.lineAt(n).to<a,create:()=>({dom:Hy(t,r)})}:null}function Hy(t,e){return zx("ul",{class:"cm-tooltip-lint"},e.map((e=>ow(t,e,!1))))}const Ky=t=>{let e=t.state.field(Ny,!1);return!(!e||!e.panel||(t.dispatch({effects:Yy.of(!1)}),0))},Jy=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Ny,!1);var o,r;e&&e.panel||t.dispatch({effects:(o=t.state,r=[Yy.of(!0)],o.field(Ny,!1)?r:r.concat(Pn.appendConfig.of(cw)))});let i=Rh(t,nw.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Ny,!1);if(!e)return!1;let o=t.state.selection.main,r=e.diagnostics.iter(o.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==o.from&&r.to==o.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],tw=en.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},Dn(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?o=>t(o)||e(o):t:e}))});function ew(t){let e=[];if(t)t:for(let{name:o}of t){for(let t=0;t<o.length;t++){let r=o[t];if(/[a-zA-Z]/.test(r)&&!e.some((t=>t.toLowerCase()==r.toLowerCase()))){e.push(r);continue t}}e.push("")}return e}function ow(t,e,o){var r;let i=o?ew(e.actions):[];return zx("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},zx("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map(((o,r)=>{let n=!1,a=r=>{if(r.preventDefault(),n)return;n=!0;let i=Wy(t.state.field(Ny).diagnostics,e);i&&o.apply(t,i.from,i.to)},{name:s}=o,l=i[r]?s.indexOf(i[r]):-1,d=l<0?s:[s.slice(0,l),zx("u",s.slice(l,l+1)),s.slice(l+1)];return zx("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${i[r]})"`}.`},d)})),e.source&&zx("div",{class:"cm-diagnosticSource"},e.source))}class rw extends bs{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return zx("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class iw{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=ow(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nw{constructor(t){this.view=t,this.items=[],this.list=zx("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Ky(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:o}=this.items[this.selectedIndex],r=ew(o.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==e.keyCode){let e=Wy(this.view.state.field(Ny).diagnostics,o);e&&o.actions[i].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=zx("div",{class:"cm-panel-lint"},this.list,zx("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Ky(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Ny).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Ny),o=0,r=!1,i=null,n=new Set;for(t.between(0,this.view.state.doc.length,((t,a,{spec:s})=>{for(let t of s.diagnostics){if(n.has(t))continue;n.add(t);let a,s=-1;for(let e=o;e<this.items.length;e++)if(this.items[e].diagnostic==t){s=e;break}s<0?(a=new iw(this.view,t),this.items.splice(o,0,a),r=!0):(a=this.items[s],s>o&&(this.items.splice(o,s-o),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),o++}}));o<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new iw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let o=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/o:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/o)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;t!=o.dom;)e();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=Wy(this.view.state.field(Ny).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Iy.of(e)})}static open(t){return new nw(t)}}function aw(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const sw=uc.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:aw("#d11")},".cm-lintRange-warning":{backgroundImage:aw("orange")},".cm-lintRange-info":{backgroundImage:aw("#999")},".cm-lintRange-hint":{backgroundImage:aw("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function lw(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function dw(t){let e="hint",o=1;for(let r of t){let t=lw(r.severity);t>o&&(o=t,e=r.severity)}return e}const cw=[Ny,uc.decorations.compute([Ny],(t=>{let{selected:e,panel:o}=t.field(Ny);return e&&o&&e.from!=e.to?vs.set([Gy.range(e.from,e.to)]):vs.none})),Qh(Fy,{hideOn:function(t,e){let o=e.pos,r=e.end||o,i=t.state.facet(tw).hideOn(t,o,r);if(null!=i)return i;let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(By)))&&!t.changes.touchesRange(n.from,Math.max(n.to,r)))}}),sw],hw=(()=>[ep(),ip,Jc(),bf(),Sm(),jc(),[Wc,Bc],_n.allowMultipleSelections.of(!0),_n.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let o=t.newDoc,{head:r}=t.newSelection.main,i=o.lineAt(r);if(r>i.from+200)return t;let n=o.sliceString(i.from,r);if(!e.some((t=>t.test(n))))return t;let{state:a}=t,s=-1,l=[];for(let{head:t}of a.selection.ranges){let e=a.doc.lineAt(t);if(e.from==s)continue;s=e.from;let o=Bu(a,e.from);if(null==o)continue;let r=/^\s*/.exec(e.text)[0],i=Wu(a,o);r!=i&&l.push({from:e.from,to:e.from+r.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t})),Zm(Mm,{fallback:!0}),Lm(),[RO,SO],_O(),sh(),ch(),ih,ty(),yc.of([...ZO,...Zb,...My,...Af,...bm,...DO,...Jy])])();var pw=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},uw=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const mw={},fw=new Map;function bw(t){return(e,o)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,o);const i=fw.get(r)||new Map;i.set(t??o,e[o]),fw.set(r,i)}}const gw=t=>{class e extends t{static{this.styles=[pi,K`
|
|
343
343
|
:host {
|
|
344
344
|
display: block;
|
|
345
345
|
position: relative;
|
|
@@ -354,7 +354,7 @@ input.working {
|
|
|
354
354
|
background-color: #f3f3f3;
|
|
355
355
|
cursor: wait;
|
|
356
356
|
}
|
|
357
|
-
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>zt`<span>Template matching type '${t.type}' not defined</span>`,this.templateEndpoint="/configuration/template",this.prefix=null,this.map=void 0,this.editor=null,this.editorType=this.type,this.editorCoding=!1}async connectedCallback(){super.connectedCallback(),this.prefix??=this.constructor.name,fw.has(this.prefix)||fw.set(this.prefix,new Map),this.map=fw.get(this.prefix),void 0===this.map&&console.error(`The prefix ${this.prefix} is not defined in the templates map.`),this.map&&this.type&&!this.map.has(this.type)&&await this.loadScript(this.prefix),this.addEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this))}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){const e=this.shadowRoot?.querySelector(".qbo-code");if(!e||!t.target.closest(".qbo-code header"))return;const o=window.getComputedStyle(e);e.style.left="auto"===o.left?`${e.getBoundingClientRect().left}px`:o.left,e.style.top="auto"===o.top?`${e.getBoundingClientRect().top}px`:o.top,this.dragging=!0,this.offsetX=t.clientX-parseFloat(o.left||"0"),this.offsetY=t.clientY-parseFloat(o.top||"0")}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code");if(e){const o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e.style.left=`${o}px`,e.style.top=`${r}px`}}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}flattenObjectKeys(t,e=""){return Object.keys(t).reduce(((o,r)=>{const i=e.length?`${e}.`:"";return"object"==typeof t[r]&&null!==t[r]?o=o.concat(this.flattenObjectKeys(t[r],`${i}${r}`)):o.push(`${i}${r}`),o}),[])}flattenComponentKeys(t){const e=[],o=Object.getPrototypeOf(t);return Object.getOwnPropertyNames(o).forEach((r=>{"constructor"===r||r.startsWith("_")||Reflect.getMetadata("design:type",o,r)&&("object"==typeof t[r]&&null!==t[r]?e.push(...this.flattenObjectKeys(t[r],r)):e.push(r))})),e.map((t=>({label:t,type:"variable"})))}_isSerializable(t){if("function"==typeof t||void 0===t)return!1;try{JSON.stringify(t)}catch(t){return!1}return!0}getComponent(){let t={};return new Set(Object.keys(this)).forEach((e=>{e.startsWith("_")||"constructor"!==e&&"shadowRoot"!==e&&"renderOptions"!==e&&"renderRoot"!==e&&"editor"!==e&&"function"!=typeof this[e]&&(t[e]=this[e])})),t}async loadScript(t){mw[t]||(mw[t]=this.fetchScript(t));try{const e=await mw[t];e?(this.appendScriptToHead(e),console.log(`Template script for ${this.prefix} loaded and executed.`),this.requestUpdate()):console.error(`Template script for ${this.prefix} is not defined.`)}catch(t){console.error(`Template script for ${this.prefix} failed to load:`,t)}}async fetchScript(t){const e=await fetch(`${this.templateEndpoint}/search/${t}`);return e.ok?e.text():(console.error(`Failed to fetch templates from: ${this.templateEndpoint}/search/${t}`),null)}appendScriptToHead(t){const e=document.createElement("script");e.type="text/javascript",e.text=t,document.head.appendChild(e)}requestEdit(t){t.ctrlKey&&this.closest(".qbo-design")&&this.toggleEdit(!this.editing)}toggleEdit(t){this.editing=t,this.editing||(this.testTemplate=void 0,this.editor?.destroy(),this.editor=null)}setTemplate(t){const e=new Function("component",`return qbo4.configuration.html\`${t}\``);try{e(this),this.editorError=void 0,this.testTemplate=e}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}resetTemplate(t){this.editorType=t.target.value,this.map?.has(t.target.value)&&(this.testTemplate=this.map.get(t.target.value)??this.defaultTemplate);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editor?.dispatch(this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}}))}updated(t){super.update(t);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editing&&(this.editor??=new uc({doc:e,extensions:[hw,
|
|
357
|
+
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>zt`<span>Template matching type '${t.type}' not defined</span>`,this.templateEndpoint="/configuration/template",this.prefix=null,this.map=void 0,this.editor=null,this.editorType=this.type,this.editorCoding=!1}async connectedCallback(){super.connectedCallback(),this.prefix??=this.constructor.name,fw.has(this.prefix)||fw.set(this.prefix,new Map),this.map=fw.get(this.prefix),void 0===this.map&&console.error(`The prefix ${this.prefix} is not defined in the templates map.`),this.map&&this.type&&!this.map.has(this.type)&&await this.loadScript(this.prefix),this.addEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this))}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){const e=this.shadowRoot?.querySelector(".qbo-code");if(!e||!t.target.closest(".qbo-code header"))return;const o=window.getComputedStyle(e);e.style.left="auto"===o.left?`${e.getBoundingClientRect().left}px`:o.left,e.style.top="auto"===o.top?`${e.getBoundingClientRect().top}px`:o.top,this.dragging=!0,this.offsetX=t.clientX-parseFloat(o.left||"0"),this.offsetY=t.clientY-parseFloat(o.top||"0")}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code");if(e){const o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e.style.left=`${o}px`,e.style.top=`${r}px`}}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}flattenObjectKeys(t,e=""){return Object.keys(t).reduce(((o,r)=>{const i=e.length?`${e}.`:"";return"object"==typeof t[r]&&null!==t[r]?o=o.concat(this.flattenObjectKeys(t[r],`${i}${r}`)):o.push(`${i}${r}`),o}),[])}flattenComponentKeys(t){const e=[],o=Object.getPrototypeOf(t);return Object.getOwnPropertyNames(o).forEach((r=>{"constructor"===r||r.startsWith("_")||Reflect.getMetadata("design:type",o,r)&&("object"==typeof t[r]&&null!==t[r]?e.push(...this.flattenObjectKeys(t[r],r)):e.push(r))})),e.map((t=>({label:t,type:"variable"})))}_isSerializable(t){if("function"==typeof t||void 0===t)return!1;try{JSON.stringify(t)}catch(t){return!1}return!0}getComponent(){let t={};return new Set(Object.keys(this)).forEach((e=>{e.startsWith("_")||"constructor"!==e&&"shadowRoot"!==e&&"renderOptions"!==e&&"renderRoot"!==e&&"editor"!==e&&"function"!=typeof this[e]&&(t[e]=this[e])})),t}async loadScript(t){mw[t]||(mw[t]=this.fetchScript(t));try{const e=await mw[t];e?(this.appendScriptToHead(e),console.log(`Template script for ${this.prefix} loaded and executed.`),this.requestUpdate()):console.error(`Template script for ${this.prefix} is not defined.`)}catch(t){console.error(`Template script for ${this.prefix} failed to load:`,t)}}async fetchScript(t){const e=await fetch(`${this.templateEndpoint}/search/${t}`);return e.ok?e.text():(console.error(`Failed to fetch templates from: ${this.templateEndpoint}/search/${t}`),null)}appendScriptToHead(t){const e=document.createElement("script");e.type="text/javascript",e.text=t,document.head.appendChild(e)}requestEdit(t){t.ctrlKey&&this.closest(".qbo-design")&&this.toggleEdit(!this.editing)}toggleEdit(t){this.editing=t,this.editing||(this.testTemplate=void 0,this.editor?.destroy(),this.editor=null)}setTemplate(t){const e=new Function("component",`return qbo4.configuration.html\`${t}\``);try{e(this),this.editorError=void 0,this.testTemplate=e}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}resetTemplate(t){this.editorType=t.target.value,this.map?.has(t.target.value)&&(this.testTemplate=this.map.get(t.target.value)??this.defaultTemplate);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editor?.dispatch(this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}}))}updated(t){super.update(t);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editing&&(this.editor??=new uc({doc:e,extensions:[hw,Mx(),yc.of([Tb]),uc.updateListener.of((t=>{this.setTemplate(t.state.doc.toString())}))],parent:this.shadowRoot?.querySelector("div.editor")}))}edit(){this.editorType=this.type,this.testTemplate??=this.map?.get(this.type)??this.defaultTemplate;const t=Math.random().toString(36).substring(2,15);return zt`
|
|
358
358
|
<dialog class="qbo-code" open>
|
|
359
359
|
<header>
|
|
360
360
|
<h5>Edit Template</h5>
|
|
@@ -374,7 +374,7 @@ input.working {
|
|
|
374
374
|
<button type="submit" @click=${this.save} ?disabled="${this.editorCoding}">Save</button>
|
|
375
375
|
<button type="reset" @click=${this.cancel} ?disabled="${this.editorCoding}">Cancel</button>
|
|
376
376
|
</footer>
|
|
377
|
-
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){console.error(t)}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=fw.get(this.prefix)),this.type&&this.map?.has(this.type)&&(t=this.map.get(this.type)),this.editing?zt`${this.edit()}${this.testTemplate(this)}`:t(this)}}return pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"editorError",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"type",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"editing",void 0),pw([ae({attribute:!1}),uw("design:type",Function)],e.prototype,"defaultTemplate",void 0),pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"testTemplate",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"templateEndpoint",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"prefix",void 0),pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"map",void 0),pw([ae({attribute:!1}),uw("design:type",Boolean)],e.prototype,"editorCoding",void 0),e},vw=gw(ee);var Ow=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},
|
|
377
|
+
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){console.error(t)}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=fw.get(this.prefix)),this.type&&this.map?.has(this.type)&&(t=this.map.get(this.type)),this.editing?zt`${this.edit()}${this.testTemplate(this)}`:t(this)}}return pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"editorError",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"type",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"editing",void 0),pw([ae({attribute:!1}),uw("design:type",Function)],e.prototype,"defaultTemplate",void 0),pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"testTemplate",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"templateEndpoint",void 0),pw([ae(),uw("design:type",Object)],e.prototype,"prefix",void 0),pw([ae({attribute:!1}),uw("design:type",Object)],e.prototype,"map",void 0),pw([ae({attribute:!1}),uw("design:type",Boolean)],e.prototype,"editorCoding",void 0),e},vw=gw(ee);var Ow=function(t,e,o,r){var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},xw=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let yw=class extends ee{constructor(){super(...arguments),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.editorError=null,this.editing=!1,this.storageKey="qbo-css",this.customcss="",this.editorCoding=!1,this.templateEndpoint="/configuration/css",this.editor=null,this.styleElement=null}static{this.styles=[pi]}async connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this)),this.customcss=localStorage.getItem(this.storageKey)??""}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){if(!t.target.closest(".qbo-code header"))return;this.dragging=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.offsetX=t.clientX-e.getBoundingClientRect().left,this.offsetY=t.clientY-e.getBoundingClientRect().top)}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code"),o=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e&&(e.style.left=`${o}px`,e.style.top=`${r}px`)}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}requestEdit(t){t.composedPath().some((t=>t instanceof Element&&t.classList.contains("qbo-code")))||!this.editing&&t.target.closest(".qbo-design")&&this.toggleEdit(!0)}toggleEdit(t){this.editing=t,this.editing||(this.editor?.destroy(),this.editor=null)}cancel(){this.setCss(this.customcss),this.toggleEdit(!1)}firstUpdated(t){super.firstUpdated(t);const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(localStorage.getItem(this.storageKey)??"")),document.head.appendChild(e),this.styleElement=e}updated(t){super.update(t),this.editing&&(this.editor??=new uc({doc:this.styleElement?.textContent??"",extensions:[hw,iv(),yc.of([Tb]),uc.updateListener.of((t=>{this.setCss(t.state.doc.toString())}))],parent:this.shadowRoot?.querySelector("div.editor")}))}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,o=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CssTemplate:this.editor.state.doc.toString(),Prompt:e})});if(this.editorCoding=!1,o.ok){const t=await o.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${o.statusText}`)}catch(t){this.editorCoding=!1,console.error(t)}}save(){this.toggleEdit(!1)}setCss(t){if(localStorage.setItem(this.storageKey,t),null!=this.styleElement)try{this.styleElement.textContent=t,this.editorError=void 0}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}edit(){return zt`
|
|
378
378
|
<dialog class="qbo-code" open>
|
|
379
379
|
<header>
|
|
380
380
|
<h5>Edit Css</h5>
|
|
@@ -388,5 +388,5 @@ input.working {
|
|
|
388
388
|
<button type="submit" @click=${this.save}>Save</button>
|
|
389
389
|
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
390
390
|
</footer>
|
|
391
|
-
</dialog>`}render(){return zt`${this.editing?this.edit():zt``}<slot>css edit</slot>`}};function ww(){const t=window.customElements.define;window.customElements.define=function(e,o,r){window.customElements.get(e)?console.error(`Custom element ${e} already defined`):t.call(this,e,o,r)}}Ow([ae({attribute:!1}),
|
|
391
|
+
</dialog>`}render(){return zt`${this.editing?this.edit():zt``}<slot>css edit</slot>`}};function ww(){const t=window.customElements.define;window.customElements.define=function(e,o,r){window.customElements.get(e)?console.error(`Custom element ${e} already defined`):t.call(this,e,o,r)}}Ow([ae({attribute:!1}),xw("design:type",Object)],yw.prototype,"editorError",void 0),Ow([ae(),xw("design:type",Object)],yw.prototype,"editing",void 0),Ow([ae(),xw("design:type",String)],yw.prototype,"storageKey",void 0),Ow([ae(),xw("design:type",String)],yw.prototype,"customcss",void 0),Ow([ae({attribute:!1}),xw("design:type",Boolean)],yw.prototype,"editorCoding",void 0),Ow([ae(),xw("design:type",Object)],yw.prototype,"templateEndpoint",void 0),yw=Ow([re("qbo-css")],yw),window.qbo4=window.qbo4||{},window.qbo4.configuration={templates:Map,html:zt,css:K}})(),r})()));
|
|
392
392
|
//# sourceMappingURL=qbo4.configuration.min.js.map
|