From fe1520e485884820a3f9aa956085a25b94f44fc9 Mon Sep 17 00:00:00 2001 From: guillemcordoba Date: Wed, 25 Oct 2023 16:16:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20holochai?= =?UTF-8?q?n-open-dev/common@969fc7c0b2a941b7abcd9390b436e4ca4f4c98a0=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stores/assets/index-4170edaf.js | 4512 +++++++++++++++++ ...{index-1490a141.css => index-76db6b81.css} | 2 +- stores/assets/index-99383f9b.js | 2997 ----------- .../playground-typescript-worker-ff9ed02e.js | 106 + stores/index.html | 83 +- 5 files changed, 4699 insertions(+), 3001 deletions(-) create mode 100644 stores/assets/index-4170edaf.js rename stores/assets/{index-1490a141.css => index-76db6b81.css} (97%) delete mode 100644 stores/assets/index-99383f9b.js create mode 100644 stores/assets/playground-typescript-worker-ff9ed02e.js diff --git a/stores/assets/index-4170edaf.js b/stores/assets/index-4170edaf.js new file mode 100644 index 0000000..125039f --- /dev/null +++ b/stores/assets/index-4170edaf.js @@ -0,0 +1,4512 @@ +var gGt=Object.freeze,mGt=Object.defineProperty;var q8n=(ch,oh,hh)=>oh in ch?mGt(ch,oh,{enumerable:!0,configurable:!0,writable:!0,value:hh}):ch[oh]=hh;var bGt=(ch,oh,hh)=>(q8n(ch,typeof oh!="symbol"?oh+"":oh,hh),hh);var _Gt=(ch,oh)=>gGt(mGt(ch,"raw",{value:gGt(oh||ch.slice())}));(function(){const oh=document.createElement("link").relList;if(oh&&oh.supports&&oh.supports("modulepreload"))return;for(const Eh of document.querySelectorAll('link[rel="modulepreload"]'))mh(Eh);new MutationObserver(Eh=>{for(const Ah of Eh)if(Ah.type==="childList")for(const $h of Ah.addedNodes)$h.tagName==="LINK"&&$h.rel==="modulepreload"&&mh($h)}).observe(document,{childList:!0,subtree:!0});function hh(Eh){const Ah={};return Eh.integrity&&(Ah.integrity=Eh.integrity),Eh.referrerPolicy&&(Ah.referrerPolicy=Eh.referrerPolicy),Eh.crossOrigin==="use-credentials"?Ah.credentials="include":Eh.crossOrigin==="anonymous"?Ah.credentials="omit":Ah.credentials="same-origin",Ah}function mh(Eh){if(Eh.ep)return;Eh.ep=!0;const Ah=hh(Eh);fetch(Eh.href,Ah)}})();const reveal="",black="",monokai$1="",styles$4="",monokai="";/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function __decorate$7(ch,oh,hh,mh){var Eh=arguments.length,Ah=Eh<3?oh:mh===null?mh=Object.getOwnPropertyDescriptor(oh,hh):mh,$h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ah=Reflect.decorate(ch,oh,hh,mh);else for(var Dh=ch.length-1;Dh>=0;Dh--)($h=ch[Dh])&&(Ah=(Eh<3?$h(Ah):Eh>3?$h(oh,hh,Ah):$h(oh,hh))||Ah);return Eh>3&&Ah&&Object.defineProperty(oh,hh,Ah),Ah}/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const t$d=window,e$l=t$d.ShadowRoot&&(t$d.ShadyCSS===void 0||t$d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$g=Symbol(),n$l=new WeakMap;let o$k=class{constructor(oh,hh,mh){if(this._$cssResult$=!0,mh!==s$g)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=oh,this.t=hh}get styleSheet(){let oh=this.o;const hh=this.t;if(e$l&&oh===void 0){const mh=hh!==void 0&&hh.length===1;mh&&(oh=n$l.get(hh)),oh===void 0&&((this.o=oh=new CSSStyleSheet).replaceSync(this.cssText),mh&&n$l.set(hh,oh))}return oh}toString(){return this.cssText}};const r$j=ch=>new o$k(typeof ch=="string"?ch:ch+"",void 0,s$g),i$h=(ch,...oh)=>{const hh=ch.length===1?ch[0]:oh.reduce((mh,Eh,Ah)=>mh+($h=>{if($h._$cssResult$===!0)return $h.cssText;if(typeof $h=="number")return $h;throw Error("Value passed to 'css' function must be a 'css' function result: "+$h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(Eh)+ch[Ah+1],ch[0]);return new o$k(hh,ch,s$g)},S$8=(ch,oh)=>{e$l?ch.adoptedStyleSheets=oh.map(hh=>hh instanceof CSSStyleSheet?hh:hh.styleSheet):oh.forEach(hh=>{const mh=document.createElement("style"),Eh=t$d.litNonce;Eh!==void 0&&mh.setAttribute("nonce",Eh),mh.textContent=hh.cssText,ch.appendChild(mh)})},c$e=e$l?ch=>ch:ch=>ch instanceof CSSStyleSheet?(oh=>{let hh="";for(const mh of oh.cssRules)hh+=mh.cssText;return r$j(hh)})(ch):ch;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var s$f;const e$k=window,r$i=e$k.trustedTypes,h$b=r$i?r$i.emptyScript:"",o$j=e$k.reactiveElementPolyfillSupport,n$k={toAttribute(ch,oh){switch(oh){case Boolean:ch=ch?h$b:null;break;case Object:case Array:ch=ch==null?ch:JSON.stringify(ch)}return ch},fromAttribute(ch,oh){let hh=ch;switch(oh){case Boolean:hh=ch!==null;break;case Number:hh=ch===null?null:Number(ch);break;case Object:case Array:try{hh=JSON.parse(ch)}catch{hh=null}}return hh}},a$c=(ch,oh)=>oh!==ch&&(oh==oh||ch==ch),l$e={attribute:!0,type:String,converter:n$k,reflect:!1,hasChanged:a$c},d$8="finalized";let u$9=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(oh){var hh;this.finalize(),((hh=this.h)!==null&&hh!==void 0?hh:this.h=[]).push(oh)}static get observedAttributes(){this.finalize();const oh=[];return this.elementProperties.forEach((hh,mh)=>{const Eh=this._$Ep(mh,hh);Eh!==void 0&&(this._$Ev.set(Eh,mh),oh.push(Eh))}),oh}static createProperty(oh,hh=l$e){if(hh.state&&(hh.attribute=!1),this.finalize(),this.elementProperties.set(oh,hh),!hh.noAccessor&&!this.prototype.hasOwnProperty(oh)){const mh=typeof oh=="symbol"?Symbol():"__"+oh,Eh=this.getPropertyDescriptor(oh,mh,hh);Eh!==void 0&&Object.defineProperty(this.prototype,oh,Eh)}}static getPropertyDescriptor(oh,hh,mh){return{get(){return this[hh]},set(Eh){const Ah=this[oh];this[hh]=Eh,this.requestUpdate(oh,Ah,mh)},configurable:!0,enumerable:!0}}static getPropertyOptions(oh){return this.elementProperties.get(oh)||l$e}static finalize(){if(this.hasOwnProperty(d$8))return!1;this[d$8]=!0;const oh=Object.getPrototypeOf(this);if(oh.finalize(),oh.h!==void 0&&(this.h=[...oh.h]),this.elementProperties=new Map(oh.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const hh=this.properties,mh=[...Object.getOwnPropertyNames(hh),...Object.getOwnPropertySymbols(hh)];for(const Eh of mh)this.createProperty(Eh,hh[Eh])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(oh){const hh=[];if(Array.isArray(oh)){const mh=new Set(oh.flat(1/0).reverse());for(const Eh of mh)hh.unshift(c$e(Eh))}else oh!==void 0&&hh.push(c$e(oh));return hh}static _$Ep(oh,hh){const mh=hh.attribute;return mh===!1?void 0:typeof mh=="string"?mh:typeof oh=="string"?oh.toLowerCase():void 0}_$Eu(){var oh;this._$E_=new Promise(hh=>this.enableUpdating=hh),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(oh=this.constructor.h)===null||oh===void 0||oh.forEach(hh=>hh(this))}addController(oh){var hh,mh;((hh=this._$ES)!==null&&hh!==void 0?hh:this._$ES=[]).push(oh),this.renderRoot!==void 0&&this.isConnected&&((mh=oh.hostConnected)===null||mh===void 0||mh.call(oh))}removeController(oh){var hh;(hh=this._$ES)===null||hh===void 0||hh.splice(this._$ES.indexOf(oh)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((oh,hh)=>{this.hasOwnProperty(hh)&&(this._$Ei.set(hh,this[hh]),delete this[hh])})}createRenderRoot(){var oh;const hh=(oh=this.shadowRoot)!==null&&oh!==void 0?oh:this.attachShadow(this.constructor.shadowRootOptions);return S$8(hh,this.constructor.elementStyles),hh}connectedCallback(){var oh;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(oh=this._$ES)===null||oh===void 0||oh.forEach(hh=>{var mh;return(mh=hh.hostConnected)===null||mh===void 0?void 0:mh.call(hh)})}enableUpdating(oh){}disconnectedCallback(){var oh;(oh=this._$ES)===null||oh===void 0||oh.forEach(hh=>{var mh;return(mh=hh.hostDisconnected)===null||mh===void 0?void 0:mh.call(hh)})}attributeChangedCallback(oh,hh,mh){this._$AK(oh,mh)}_$EO(oh,hh,mh=l$e){var Eh;const Ah=this.constructor._$Ep(oh,mh);if(Ah!==void 0&&mh.reflect===!0){const $h=(((Eh=mh.converter)===null||Eh===void 0?void 0:Eh.toAttribute)!==void 0?mh.converter:n$k).toAttribute(hh,mh.type);this._$El=oh,$h==null?this.removeAttribute(Ah):this.setAttribute(Ah,$h),this._$El=null}}_$AK(oh,hh){var mh;const Eh=this.constructor,Ah=Eh._$Ev.get(oh);if(Ah!==void 0&&this._$El!==Ah){const $h=Eh.getPropertyOptions(Ah),Dh=typeof $h.converter=="function"?{fromAttribute:$h.converter}:((mh=$h.converter)===null||mh===void 0?void 0:mh.fromAttribute)!==void 0?$h.converter:n$k;this._$El=Ah,this[Ah]=Dh.fromAttribute(hh,$h.type),this._$El=null}}requestUpdate(oh,hh,mh){let Eh=!0;oh!==void 0&&(((mh=mh||this.constructor.getPropertyOptions(oh)).hasChanged||a$c)(this[oh],hh)?(this._$AL.has(oh)||this._$AL.set(oh,hh),mh.reflect===!0&&this._$El!==oh&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(oh,mh))):Eh=!1),!this.isUpdatePending&&Eh&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(hh){Promise.reject(hh)}const oh=this.scheduleUpdate();return oh!=null&&await oh,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var oh;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((Eh,Ah)=>this[Ah]=Eh),this._$Ei=void 0);let hh=!1;const mh=this._$AL;try{hh=this.shouldUpdate(mh),hh?(this.willUpdate(mh),(oh=this._$ES)===null||oh===void 0||oh.forEach(Eh=>{var Ah;return(Ah=Eh.hostUpdate)===null||Ah===void 0?void 0:Ah.call(Eh)}),this.update(mh)):this._$Ek()}catch(Eh){throw hh=!1,this._$Ek(),Eh}hh&&this._$AE(mh)}willUpdate(oh){}_$AE(oh){var hh;(hh=this._$ES)===null||hh===void 0||hh.forEach(mh=>{var Eh;return(Eh=mh.hostUpdated)===null||Eh===void 0?void 0:Eh.call(mh)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(oh)),this.updated(oh)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(oh){return!0}update(oh){this._$EC!==void 0&&(this._$EC.forEach((hh,mh)=>this._$EO(mh,this[mh],hh)),this._$EC=void 0),this._$Ek()}updated(oh){}firstUpdated(oh){}};u$9[d$8]=!0,u$9.elementProperties=new Map,u$9.elementStyles=[],u$9.shadowRootOptions={mode:"open"},o$j==null||o$j({ReactiveElement:u$9}),((s$f=e$k.reactiveElementVersions)!==null&&s$f!==void 0?s$f:e$k.reactiveElementVersions=[]).push("1.6.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var t$c;const i$g=window,s$e=i$g.trustedTypes,e$j=s$e?s$e.createPolicy("lit-html",{createHTML:ch=>ch}):void 0,o$i="$lit$",n$j=`lit$${(Math.random()+"").slice(9)}$`,l$d="?"+n$j,h$a=`<${l$d}>`,r$h=document,u$8=()=>r$h.createComment(""),d$7=ch=>ch===null||typeof ch!="object"&&typeof ch!="function",c$d=Array.isArray,v$7=ch=>c$d(ch)||typeof(ch==null?void 0:ch[Symbol.iterator])=="function",a$b=`[ +\f\r]`,f$b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$5=/-->/g,m$7=/>/g,p$8=RegExp(`>|${a$b}(?:([^\\s"'>=/]+)(${a$b}*=${a$b}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),g$7=/'/g,$$6=/"/g,y$a=/^(?:script|style|textarea|title)$/i,w$7=ch=>(oh,...hh)=>({_$litType$:ch,strings:oh,values:hh}),x$a=w$7(1),T$6=Symbol.for("lit-noChange"),A$8=Symbol.for("lit-nothing"),E$6=new WeakMap,C$6=r$h.createTreeWalker(r$h,129,null,!1);function P$6(ch,oh){if(!Array.isArray(ch)||!ch.hasOwnProperty("raw"))throw Error("invalid template strings array");return e$j!==void 0?e$j.createHTML(oh):oh}const V$6=(ch,oh)=>{const hh=ch.length-1,mh=[];let Eh,Ah=oh===2?"":"",$h=f$b;for(let Dh=0;Dh"?($h=Eh??f$b,n1=-1):i1[1]===void 0?n1=-2:(n1=$h.lastIndex-i1[2].length,t1=i1[1],$h=i1[3]===void 0?p$8:i1[3]==='"'?$$6:g$7):$h===$$6||$h===g$7?$h=p$8:$h===_$5||$h===m$7?$h=f$b:($h=p$8,Eh=void 0);const _1=$h===p$8&&ch[Dh+1].startsWith("/>")?" ":"";Ah+=$h===f$b?jh+h$a:n1>=0?(mh.push(t1),jh.slice(0,n1)+o$i+jh.slice(n1)+n$j+_1):jh+n$j+(n1===-2?(mh.push(void 0),Dh):_1)}return[P$6(ch,Ah+(ch[hh]||"")+(oh===2?"":"")),mh]};let N$7=class wGt{constructor({strings:oh,_$litType$:hh},mh){let Eh;this.parts=[];let Ah=0,$h=0;const Dh=oh.length-1,jh=this.parts,[t1,i1]=V$6(oh,hh);if(this.el=wGt.createElement(t1,mh),C$6.currentNode=this.el.content,hh===2){const n1=this.el.content,p1=n1.firstChild;p1.remove(),n1.append(...p1.childNodes)}for(;(Eh=C$6.nextNode())!==null&&jh.length0){Eh.textContent=s$e?s$e.emptyScript:"";for(let _1=0;_12||mh[0]!==""||mh[1]!==""?(this._$AH=Array(mh.length-1).fill(new String),this.strings=mh):this._$AH=A$8}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(oh,hh=this,mh,Eh){const Ah=this.strings;let $h=!1;if(Ah===void 0)oh=S$7(this,oh,hh,0),$h=!d$7(oh)||oh!==this._$AH&&oh!==T$6,$h&&(this._$AH=oh);else{const Dh=oh;let jh,t1;for(oh=Ah[0],jh=0;jh{var mh,Eh;const Ah=(mh=hh==null?void 0:hh.renderBefore)!==null&&mh!==void 0?mh:oh;let $h=Ah._$litPart$;if($h===void 0){const Dh=(Eh=hh==null?void 0:hh.renderBefore)!==null&&Eh!==void 0?Eh:null;Ah._$litPart$=$h=new R$6(oh.insertBefore(u$8(),Dh),Dh,void 0,hh??{})}return $h._$AI(ch),$h};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var l$c,o$h;let s$d=class extends u$9{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var oh,hh;const mh=super.createRenderRoot();return(oh=(hh=this.renderOptions).renderBefore)!==null&&oh!==void 0||(hh.renderBefore=mh.firstChild),mh}update(oh){const hh=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(oh),this._$Do=D$4(hh,this.renderRoot,this.renderOptions)}connectedCallback(){var oh;super.connectedCallback(),(oh=this._$Do)===null||oh===void 0||oh.setConnected(!0)}disconnectedCallback(){var oh;super.disconnectedCallback(),(oh=this._$Do)===null||oh===void 0||oh.setConnected(!1)}render(){return T$6}};s$d.finalized=!0,s$d._$litElement$=!0,(l$c=globalThis.litElementHydrateSupport)===null||l$c===void 0||l$c.call(globalThis,{LitElement:s$d});const n$i=globalThis.litElementPolyfillSupport;n$i==null||n$i({LitElement:s$d});((o$h=globalThis.litElementVersions)!==null&&o$h!==void 0?o$h:globalThis.litElementVersions=[]).push("3.3.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const e$i=ch=>oh=>typeof oh=="function"?((hh,mh)=>(customElements.define(hh,mh),mh))(ch,oh):((hh,mh)=>{const{kind:Eh,elements:Ah}=mh;return{kind:Eh,elements:Ah,finisher($h){customElements.define(hh,$h)}}})(ch,oh);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const i$f=(ch,oh)=>oh.kind==="method"&&oh.descriptor&&!("value"in oh.descriptor)?{...oh,finisher(hh){hh.createProperty(oh.key,ch)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:oh.key,initializer(){typeof oh.initializer=="function"&&(this[oh.key]=oh.initializer.call(this))},finisher(hh){hh.createProperty(oh.key,ch)}},e$h=(ch,oh,hh)=>{oh.constructor.createProperty(hh,ch)};function n$h(ch){return(oh,hh)=>hh!==void 0?e$h(ch,oh,hh):i$f(ch,oh)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function t$b(ch){return n$h({...ch,state:!0})}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const o$g=({finisher:ch,descriptor:oh})=>(hh,mh)=>{var Eh;if(mh===void 0){const Ah=(Eh=hh.originalKey)!==null&&Eh!==void 0?Eh:hh.key,$h=oh!=null?{kind:"method",placement:"prototype",key:Ah,descriptor:oh(hh.key)}:{...hh,key:Ah};return ch!=null&&($h.finisher=function(Dh){ch(Dh,Ah)}),$h}{const Ah=hh.constructor;oh!==void 0&&Object.defineProperty(hh,mh,oh(mh)),ch==null||ch(Ah,mh)}};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function e$g(ch){return o$g({finisher:(oh,hh)=>{Object.assign(oh.prototype[hh],ch)}})}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function i$e(ch,oh){return o$g({descriptor:hh=>{const mh={get(){var Eh,Ah;return(Ah=(Eh=this.renderRoot)===null||Eh===void 0?void 0:Eh.querySelector(ch))!==null&&Ah!==void 0?Ah:null},enumerable:!0,configurable:!0};if(oh){const Eh=typeof hh=="symbol"?Symbol():"__"+hh;mh.get=function(){var Ah,$h;return this[Eh]===void 0&&(this[Eh]=($h=(Ah=this.renderRoot)===null||Ah===void 0?void 0:Ah.querySelector(ch))!==null&&$h!==void 0?$h:null),this[Eh]}}return mh}})}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function e$f(ch){return o$g({descriptor:oh=>({async get(){var hh;return await this.updateComplete,(hh=this.renderRoot)===null||hh===void 0?void 0:hh.querySelector(ch)},enumerable:!0,configurable:!0})})}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var n$g;((n$g=window.HTMLSlotElement)===null||n$g===void 0?void 0:n$g.prototype.assignedElements)!=null;function __decorate$6(ch,oh,hh,mh){var Eh=arguments.length,Ah=Eh<3?oh:mh===null?mh=Object.getOwnPropertyDescriptor(oh,hh):mh,$h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ah=Reflect.decorate(ch,oh,hh,mh);else for(var Dh=ch.length-1;Dh>=0;Dh--)($h=ch[Dh])&&(Ah=(Eh<3?$h(Ah):Eh>3?$h(oh,hh,Ah):$h(oh,hh))||Ah);return Eh>3&&Ah&&Object.defineProperty(oh,hh,Ah),Ah}typeof SuppressedError=="function"&&SuppressedError;const proxyMarker=Symbol("Comlink.proxy"),createEndpoint=Symbol("Comlink.endpoint"),releaseProxy=Symbol("Comlink.releaseProxy"),throwMarker=Symbol("Comlink.thrown"),isObject$1=ch=>typeof ch=="object"&&ch!==null||typeof ch=="function",proxyTransferHandler={canHandle:ch=>isObject$1(ch)&&ch[proxyMarker],serialize(ch){const{port1:oh,port2:hh}=new MessageChannel;return expose(ch,oh),[hh,[hh]]},deserialize(ch){return ch.start(),wrap(ch)}},throwTransferHandler={canHandle:ch=>isObject$1(ch)&&throwMarker in ch,serialize({value:ch}){let oh;return ch instanceof Error?oh={isError:!0,value:{message:ch.message,name:ch.name,stack:ch.stack}}:oh={isError:!1,value:ch},[oh,[]]},deserialize(ch){throw ch.isError?Object.assign(new Error(ch.value.message),ch.value):ch.value}},transferHandlers=new Map([["proxy",proxyTransferHandler],["throw",throwTransferHandler]]);function expose(ch,oh=self){oh.addEventListener("message",function hh(mh){if(!mh||!mh.data)return;const{id:Eh,type:Ah,path:$h}=Object.assign({path:[]},mh.data),Dh=(mh.data.argumentList||[]).map(fromWireValue);let jh;try{const t1=$h.slice(0,-1).reduce((n1,p1)=>n1[p1],ch),i1=$h.reduce((n1,p1)=>n1[p1],ch);switch(Ah){case"GET":jh=i1;break;case"SET":t1[$h.slice(-1)[0]]=fromWireValue(mh.data.value),jh=!0;break;case"APPLY":jh=i1.apply(t1,Dh);break;case"CONSTRUCT":{const n1=new i1(...Dh);jh=proxy(n1)}break;case"ENDPOINT":{const{port1:n1,port2:p1}=new MessageChannel;expose(ch,p1),jh=transfer(n1,[n1])}break;case"RELEASE":jh=void 0;break;default:return}}catch(t1){jh={value:t1,[throwMarker]:0}}Promise.resolve(jh).catch(t1=>({value:t1,[throwMarker]:0})).then(t1=>{const[i1,n1]=toWireValue(t1);oh.postMessage(Object.assign(Object.assign({},i1),{id:Eh}),n1),Ah==="RELEASE"&&(oh.removeEventListener("message",hh),closeEndPoint(oh))})}),oh.start&&oh.start()}function isMessagePort(ch){return ch.constructor.name==="MessagePort"}function closeEndPoint(ch){isMessagePort(ch)&&ch.close()}function wrap(ch,oh){return createProxy(ch,[],oh)}function throwIfProxyReleased(ch){if(ch)throw new Error("Proxy has been released and is not useable")}function createProxy(ch,oh=[],hh=function(){}){let mh=!1;const Eh=new Proxy(hh,{get(Ah,$h){if(throwIfProxyReleased(mh),$h===releaseProxy)return()=>requestResponseMessage(ch,{type:"RELEASE",path:oh.map(Dh=>Dh.toString())}).then(()=>{closeEndPoint(ch),mh=!0});if($h==="then"){if(oh.length===0)return{then:()=>Eh};const Dh=requestResponseMessage(ch,{type:"GET",path:oh.map(jh=>jh.toString())}).then(fromWireValue);return Dh.then.bind(Dh)}return createProxy(ch,[...oh,$h])},set(Ah,$h,Dh){throwIfProxyReleased(mh);const[jh,t1]=toWireValue(Dh);return requestResponseMessage(ch,{type:"SET",path:[...oh,$h].map(i1=>i1.toString()),value:jh},t1).then(fromWireValue)},apply(Ah,$h,Dh){throwIfProxyReleased(mh);const jh=oh[oh.length-1];if(jh===createEndpoint)return requestResponseMessage(ch,{type:"ENDPOINT"}).then(fromWireValue);if(jh==="bind")return createProxy(ch,oh.slice(0,-1));const[t1,i1]=processArguments(Dh);return requestResponseMessage(ch,{type:"APPLY",path:oh.map(n1=>n1.toString()),argumentList:t1},i1).then(fromWireValue)},construct(Ah,$h){throwIfProxyReleased(mh);const[Dh,jh]=processArguments($h);return requestResponseMessage(ch,{type:"CONSTRUCT",path:oh.map(t1=>t1.toString()),argumentList:Dh},jh).then(fromWireValue)}});return Eh}function myFlat(ch){return Array.prototype.concat.apply([],ch)}function processArguments(ch){const oh=ch.map(toWireValue);return[oh.map(hh=>hh[0]),myFlat(oh.map(hh=>hh[1]))]}const transferCache=new WeakMap;function transfer(ch,oh){return transferCache.set(ch,oh),ch}function proxy(ch){return Object.assign(ch,{[proxyMarker]:!0})}function toWireValue(ch){for(const[oh,hh]of transferHandlers)if(hh.canHandle(ch)){const[mh,Eh]=hh.serialize(ch);return[{type:"HANDLER",name:oh,value:mh},Eh]}return[{type:"RAW",value:ch},transferCache.get(ch)||[]]}function fromWireValue(ch){switch(ch.type){case"HANDLER":return transferHandlers.get(ch.name).deserialize(ch.value);case"RAW":return ch.value}}function requestResponseMessage(ch,oh,hh){return new Promise(mh=>{const Eh=generateUUID();ch.addEventListener("message",function Ah($h){!$h.data||!$h.data.id||$h.data.id!==Eh||(ch.removeEventListener("message",Ah),mh($h.data))}),ch.start&&ch.start(),ch.postMessage(Object.assign({id:Eh},oh),hh)})}function generateUUID(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const CONFIGURE_PROXY=1,CONNECT_PROJECT_TO_SW=3,ACKNOWLEDGE_SW_CONNECTION=4,UPDATE_SERVICE_WORKER=6;/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const endWithSlash=ch=>ch.endsWith("/")?ch:ch+"/",getRandomString=()=>crypto.getRandomValues(new Uint32Array(1))[0].toString(32),forceSkypackRawMode=ch=>(ch.hostname==="cdn.skypack.dev"&&(ch.pathname=ch.pathname.replace(/mode=imports\/(un)?optimized/,"mode=raw")),ch);function isArray(ch){return Array.isArray?Array.isArray(ch):getTag(ch)==="[object Array]"}const INFINITY=1/0;function baseToString(ch){if(typeof ch=="string")return ch;let oh=ch+"";return oh=="0"&&1/ch==-INFINITY?"-0":oh}function toString(ch){return ch==null?"":baseToString(ch)}function isString(ch){return typeof ch=="string"}function isNumber$1(ch){return typeof ch=="number"}function isBoolean(ch){return ch===!0||ch===!1||isObjectLike(ch)&&getTag(ch)=="[object Boolean]"}function isObject(ch){return typeof ch=="object"}function isObjectLike(ch){return isObject(ch)&&ch!==null}function isDefined(ch){return ch!=null}function isBlank$1(ch){return!ch.trim().length}function getTag(ch){return ch==null?ch===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(ch)}const EXTENDED_SEARCH_UNAVAILABLE="Extended search is not available",INCORRECT_INDEX_TYPE="Incorrect 'index' type",LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY=ch=>`Invalid value for key ${ch}`,PATTERN_LENGTH_TOO_LARGE=ch=>`Pattern length exceeds max of ${ch}.`,MISSING_KEY_PROPERTY=ch=>`Missing ${ch} property in key`,INVALID_KEY_WEIGHT_VALUE=ch=>`Property 'weight' in key '${ch}' must be a positive integer`,hasOwn=Object.prototype.hasOwnProperty;class KeyStore{constructor(oh){this._keys=[],this._keyMap={};let hh=0;oh.forEach(mh=>{let Eh=createKey(mh);hh+=Eh.weight,this._keys.push(Eh),this._keyMap[Eh.id]=Eh,hh+=Eh.weight}),this._keys.forEach(mh=>{mh.weight/=hh})}get(oh){return this._keyMap[oh]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function createKey(ch){let oh=null,hh=null,mh=null,Eh=1,Ah=null;if(isString(ch)||isArray(ch))mh=ch,oh=createKeyPath(ch),hh=createKeyId(ch);else{if(!hasOwn.call(ch,"name"))throw new Error(MISSING_KEY_PROPERTY("name"));const $h=ch.name;if(mh=$h,hasOwn.call(ch,"weight")&&(Eh=ch.weight,Eh<=0))throw new Error(INVALID_KEY_WEIGHT_VALUE($h));oh=createKeyPath($h),hh=createKeyId($h),Ah=ch.getFn}return{path:oh,id:hh,weight:Eh,src:mh,getFn:Ah}}function createKeyPath(ch){return isArray(ch)?ch:ch.split(".")}function createKeyId(ch){return isArray(ch)?ch.join("."):ch}function get(ch,oh){let hh=[],mh=!1;const Eh=(Ah,$h,Dh)=>{if(isDefined(Ah))if(!$h[Dh])hh.push(Ah);else{let jh=$h[Dh];const t1=Ah[jh];if(!isDefined(t1))return;if(Dh===$h.length-1&&(isString(t1)||isNumber$1(t1)||isBoolean(t1)))hh.push(toString(t1));else if(isArray(t1)){mh=!0;for(let i1=0,n1=t1.length;i1ch.score===oh.score?ch.idx{this._keysMap[hh.id]=mh})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,isString(this.docs[0])?this.docs.forEach((oh,hh)=>{this._addString(oh,hh)}):this.docs.forEach((oh,hh)=>{this._addObject(oh,hh)}),this.norm.clear())}add(oh){const hh=this.size();isString(oh)?this._addString(oh,hh):this._addObject(oh,hh)}removeAt(oh){this.records.splice(oh,1);for(let hh=oh,mh=this.size();hh{let $h=Eh.getFn?Eh.getFn(oh):this.getFn(oh,Eh.path);if(isDefined($h)){if(isArray($h)){let Dh=[];const jh=[{nestedArrIndex:-1,value:$h}];for(;jh.length;){const{nestedArrIndex:t1,value:i1}=jh.pop();if(isDefined(i1))if(isString(i1)&&!isBlank$1(i1)){let n1={v:i1,i:t1,n:this.norm.get(i1)};Dh.push(n1)}else isArray(i1)&&i1.forEach((n1,p1)=>{jh.push({nestedArrIndex:p1,value:n1})})}mh.$[Ah]=Dh}else if(isString($h)&&!isBlank$1($h)){let Dh={v:$h,n:this.norm.get($h)};mh.$[Ah]=Dh}}}),this.records.push(mh)}toJSON(){return{keys:this.keys,records:this.records}}}function createIndex(ch,oh,{getFn:hh=Config.getFn,fieldNormWeight:mh=Config.fieldNormWeight}={}){const Eh=new FuseIndex({getFn:hh,fieldNormWeight:mh});return Eh.setKeys(ch.map(createKey)),Eh.setSources(oh),Eh.create(),Eh}function parseIndex(ch,{getFn:oh=Config.getFn,fieldNormWeight:hh=Config.fieldNormWeight}={}){const{keys:mh,records:Eh}=ch,Ah=new FuseIndex({getFn:oh,fieldNormWeight:hh});return Ah.setKeys(mh),Ah.setIndexRecords(Eh),Ah}function computeScore$1(ch,{errors:oh=0,currentLocation:hh=0,expectedLocation:mh=0,distance:Eh=Config.distance,ignoreLocation:Ah=Config.ignoreLocation}={}){const $h=oh/ch.length;if(Ah)return $h;const Dh=Math.abs(mh-hh);return Eh?$h+Dh/Eh:Dh?1:$h}function convertMaskToIndices(ch=[],oh=Config.minMatchCharLength){let hh=[],mh=-1,Eh=-1,Ah=0;for(let $h=ch.length;Ah<$h;Ah+=1){let Dh=ch[Ah];Dh&&mh===-1?mh=Ah:!Dh&&mh!==-1&&(Eh=Ah-1,Eh-mh+1>=oh&&hh.push([mh,Eh]),mh=-1)}return ch[Ah-1]&&Ah-mh>=oh&&hh.push([mh,Ah-1]),hh}const MAX_BITS=32;function search(ch,oh,hh,{location:mh=Config.location,distance:Eh=Config.distance,threshold:Ah=Config.threshold,findAllMatches:$h=Config.findAllMatches,minMatchCharLength:Dh=Config.minMatchCharLength,includeMatches:jh=Config.includeMatches,ignoreLocation:t1=Config.ignoreLocation}={}){if(oh.length>MAX_BITS)throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));const i1=oh.length,n1=ch.length,p1=Math.max(0,Math.min(mh,n1));let _1=Ah,x1=p1;const V1=Dh>1||jh,i0=V1?Array(n1):[];let r0;for(;(r0=ch.indexOf(oh,x1))>-1;){let ov=computeScore$1(oh,{currentLocation:r0,expectedLocation:p1,distance:Eh,ignoreLocation:t1});if(_1=Math.min(ov,_1),x1=r0+i1,V1){let S0=0;for(;S0=e0;ny-=1){let Zv=ny-1,Q2=hh[ch.charAt(Zv)];if(V1&&(i0[Zv]=+!!Q2),R0[ny]=(R0[ny+1]<<1|1)&Q2,ov&&(R0[ny]|=(D0[ny+1]|D0[ny])<<1|1|D0[ny+1]),R0[ny]&pv&&(J0=computeScore$1(oh,{errors:ov,currentLocation:Zv,expectedLocation:p1,distance:Eh,ignoreLocation:t1}),J0<=_1)){if(_1=J0,x1=Zv,x1<=p1)break;e0=Math.max(1,2*p1-x1)}}if(computeScore$1(oh,{errors:ov+1,currentLocation:p1,expectedLocation:p1,distance:Eh,ignoreLocation:t1})>_1)break;D0=R0}const Sy={isMatch:x1>=0,score:Math.max(.001,J0)};if(V1){const ov=convertMaskToIndices(i0,Dh);ov.length?jh&&(Sy.indices=ov):Sy.isMatch=!1}return Sy}function createPatternAlphabet(ch){let oh={};for(let hh=0,mh=ch.length;hh{this.chunks.push({pattern:p1,alphabet:createPatternAlphabet(p1),startIndex:_1})},n1=this.pattern.length;if(n1>MAX_BITS){let p1=0;const _1=n1%MAX_BITS,x1=n1-_1;for(;p1{const{isMatch:r0,score:D0,indices:J0}=search(oh,x1,V1,{location:Eh+i0,distance:Ah,threshold:$h,findAllMatches:Dh,minMatchCharLength:jh,includeMatches:mh,ignoreLocation:t1});r0&&(p1=!0),n1+=D0,r0&&J0&&(i1=[...i1,...J0])});let _1={isMatch:p1,score:p1?n1/this.chunks.length:1};return p1&&mh&&(_1.indices=i1),_1}}class BaseMatch{constructor(oh){this.pattern=oh}static isMultiMatch(oh){return getMatch(oh,this.multiRegex)}static isSingleMatch(oh){return getMatch(oh,this.singleRegex)}search(){}}function getMatch(ch,oh){const hh=ch.match(oh);return hh?hh[1]:null}class ExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(oh){const hh=oh===this.pattern;return{isMatch:hh,score:hh?0:1,indices:[0,this.pattern.length-1]}}}class InverseExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(oh){const mh=oh.indexOf(this.pattern)===-1;return{isMatch:mh,score:mh?0:1,indices:[0,oh.length-1]}}}class PrefixExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(oh){const hh=oh.startsWith(this.pattern);return{isMatch:hh,score:hh?0:1,indices:[0,this.pattern.length-1]}}}class InversePrefixExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(oh){const hh=!oh.startsWith(this.pattern);return{isMatch:hh,score:hh?0:1,indices:[0,oh.length-1]}}}class SuffixExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(oh){const hh=oh.endsWith(this.pattern);return{isMatch:hh,score:hh?0:1,indices:[oh.length-this.pattern.length,oh.length-1]}}}class InverseSuffixExactMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(oh){const hh=!oh.endsWith(this.pattern);return{isMatch:hh,score:hh?0:1,indices:[0,oh.length-1]}}}class FuzzyMatch extends BaseMatch{constructor(oh,{location:hh=Config.location,threshold:mh=Config.threshold,distance:Eh=Config.distance,includeMatches:Ah=Config.includeMatches,findAllMatches:$h=Config.findAllMatches,minMatchCharLength:Dh=Config.minMatchCharLength,isCaseSensitive:jh=Config.isCaseSensitive,ignoreLocation:t1=Config.ignoreLocation}={}){super(oh),this._bitapSearch=new BitapSearch(oh,{location:hh,threshold:mh,distance:Eh,includeMatches:Ah,findAllMatches:$h,minMatchCharLength:Dh,isCaseSensitive:jh,ignoreLocation:t1})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(oh){return this._bitapSearch.searchIn(oh)}}class IncludeMatch extends BaseMatch{constructor(oh){super(oh)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(oh){let hh=0,mh;const Eh=[],Ah=this.pattern.length;for(;(mh=oh.indexOf(this.pattern,hh))>-1;)hh=mh+Ah,Eh.push([mh,hh-1]);const $h=!!Eh.length;return{isMatch:$h,score:$h?0:1,indices:Eh}}}const searchers=[ExactMatch,IncludeMatch,PrefixExactMatch,InversePrefixExactMatch,InverseSuffixExactMatch,SuffixExactMatch,InverseExactMatch,FuzzyMatch],searchersLen=searchers.length,SPACE_RE=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,OR_TOKEN="|";function parseQuery(ch,oh={}){return ch.split(OR_TOKEN).map(hh=>{let mh=hh.trim().split(SPACE_RE).filter(Ah=>Ah&&!!Ah.trim()),Eh=[];for(let Ah=0,$h=mh.length;Ah<$h;Ah+=1){const Dh=mh[Ah];let jh=!1,t1=-1;for(;!jh&&++t1!!(ch[LogicalOperator.AND]||ch[LogicalOperator.OR]),isPath=ch=>!!ch[KeyType.PATH],isLeaf=ch=>!isArray(ch)&&isObject(ch)&&!isExpression(ch),convertToExplicit=ch=>({[LogicalOperator.AND]:Object.keys(ch).map(oh=>({[oh]:ch[oh]}))});function parse(ch,oh,{auto:hh=!0}={}){const mh=Eh=>{let Ah=Object.keys(Eh);const $h=isPath(Eh);if(!$h&&Ah.length>1&&!isExpression(Eh))return mh(convertToExplicit(Eh));if(isLeaf(Eh)){const jh=$h?Eh[KeyType.PATH]:Ah[0],t1=$h?Eh[KeyType.PATTERN]:Eh[jh];if(!isString(t1))throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(jh));const i1={keyId:createKeyId(jh),pattern:t1};return hh&&(i1.searcher=createSearcher(t1,oh)),i1}let Dh={children:[],operator:Ah[0]};return Ah.forEach(jh=>{const t1=Eh[jh];isArray(t1)&&t1.forEach(i1=>{Dh.children.push(mh(i1))})}),Dh};return isExpression(ch)||(ch=convertToExplicit(ch)),mh(ch)}function computeScore(ch,{ignoreFieldNorm:oh=Config.ignoreFieldNorm}){ch.forEach(hh=>{let mh=1;hh.matches.forEach(({key:Eh,norm:Ah,score:$h})=>{const Dh=Eh?Eh.weight:null;mh*=Math.pow($h===0&&Dh?Number.EPSILON:$h,(Dh||1)*(oh?1:Ah))}),hh.score=mh})}function transformMatches(ch,oh){const hh=ch.matches;oh.matches=[],isDefined(hh)&&hh.forEach(mh=>{if(!isDefined(mh.indices)||!mh.indices.length)return;const{indices:Eh,value:Ah}=mh;let $h={indices:Eh,value:Ah};mh.key&&($h.key=mh.key.src),mh.idx>-1&&($h.refIndex=mh.idx),oh.matches.push($h)})}function transformScore(ch,oh){oh.score=ch.score}function format(ch,oh,{includeMatches:hh=Config.includeMatches,includeScore:mh=Config.includeScore}={}){const Eh=[];return hh&&Eh.push(transformMatches),mh&&Eh.push(transformScore),ch.map(Ah=>{const{idx:$h}=Ah,Dh={item:oh[$h],refIndex:$h};return Eh.length&&Eh.forEach(jh=>{jh(Ah,Dh)}),Dh})}class Fuse{constructor(oh,hh={},mh){this.options={...Config,...hh},this.options.useExtendedSearch,this._keyStore=new KeyStore(this.options.keys),this.setCollection(oh,mh)}setCollection(oh,hh){if(this._docs=oh,hh&&!(hh instanceof FuseIndex))throw new Error(INCORRECT_INDEX_TYPE);this._myIndex=hh||createIndex(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(oh){isDefined(oh)&&(this._docs.push(oh),this._myIndex.add(oh))}remove(oh=()=>!1){const hh=[];for(let mh=0,Eh=this._docs.length;mh-1&&(jh=jh.slice(0,hh)),format(jh,this._docs,{includeMatches:mh,includeScore:Eh})}_searchStringList(oh){const hh=createSearcher(oh,this.options),{records:mh}=this._myIndex,Eh=[];return mh.forEach(({v:Ah,i:$h,n:Dh})=>{if(!isDefined(Ah))return;const{isMatch:jh,score:t1,indices:i1}=hh.searchIn(Ah);jh&&Eh.push({item:Ah,idx:$h,matches:[{score:t1,value:Ah,norm:Dh,indices:i1}]})}),Eh}_searchLogical(oh){const hh=parse(oh,this.options),mh=(Dh,jh,t1)=>{if(!Dh.children){const{keyId:n1,searcher:p1}=Dh,_1=this._findMatches({key:this._keyStore.get(n1),value:this._myIndex.getValueForItemAtKeyId(jh,n1),searcher:p1});return _1&&_1.length?[{idx:t1,item:jh,matches:_1}]:[]}const i1=[];for(let n1=0,p1=Dh.children.length;n1{if(isDefined(Dh)){let t1=mh(hh,Dh,jh);t1.length&&(Ah[jh]||(Ah[jh]={idx:jh,item:Dh,matches:[]},$h.push(Ah[jh])),t1.forEach(({matches:i1})=>{Ah[jh].matches.push(...i1)}))}}),$h}_searchObjectList(oh){const hh=createSearcher(oh,this.options),{keys:mh,records:Eh}=this._myIndex,Ah=[];return Eh.forEach(({$:$h,i:Dh})=>{if(!isDefined($h))return;let jh=[];mh.forEach((t1,i1)=>{jh.push(...this._findMatches({key:t1,value:$h[i1],searcher:hh}))}),jh.length&&Ah.push({idx:Dh,item:$h,matches:jh})}),Ah}_findMatches({key:oh,value:hh,searcher:mh}){if(!isDefined(hh))return[];let Eh=[];if(isArray(hh))hh.forEach(({v:Ah,i:$h,n:Dh})=>{if(!isDefined(Ah))return;const{isMatch:jh,score:t1,indices:i1}=mh.searchIn(Ah);jh&&Eh.push({score:t1,key:oh,value:Ah,idx:$h,norm:Dh,indices:i1})});else{const{v:Ah,n:$h}=hh,{isMatch:Dh,score:jh,indices:t1}=mh.searchIn(Ah);Dh&&Eh.push({score:jh,key:oh,value:Ah,norm:$h,indices:t1})}return Eh}}Fuse.version="6.6.2";Fuse.createIndex=createIndex;Fuse.parseIndex=parseIndex;Fuse.config=Config;Fuse.parseQuery=parse;register$1(ExtendedSearch);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function sortCompletionItems(ch,oh){return ch?new Fuse(ch??[],{threshold:.3,shouldSort:!0,isCaseSensitive:!0,includeScore:!0,includeMatches:!0,keys:["name"],minMatchCharLength:Math.max(oh.length/1.2,1)}).search(oh).map(Ah=>{var $h;return{text:Ah.item.name,displayText:Ah.item.name,score:($h=Ah.score)!==null&&$h!==void 0?$h:0,matches:Ah.matches,get details(){return Ah.item.details}}}).sort((Ah,$h)=>Ah.score===$h.score?Ah.text.localeCompare($h.text):Ah.score-$h.score):[]}function completionEntriesAsEditorCompletions(ch,oh=""){var hh;return(hh=ch==null?void 0:ch.map(mh=>({text:oh+mh.name,displayText:mh.name,score:Number.parseInt(mh.sortText),get details(){return mh.details}})))!==null&&hh!==void 0?hh:[]}function populateCompletionInfoWithDetailGetters(ch,oh,hh,mh){const Eh=ch;return Eh.entries=ch==null?void 0:ch.entries.map(Ah=>({...Ah,_details:void 0,get details(){return this._details||(this._details=mh(oh,hh,Ah.name)),this._details}})),Eh}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const npmVersion="0.18.1",serviceWorkerHash="1dae6563";/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class Deferred{constructor(){this.settled=!1,this.promise=new Promise((oh,hh)=>{this._resolve=oh,this._reject=hh})}resolve(oh){this.settled=!0,this._resolve(oh)}reject(oh){this.settled=!0,this._reject(oh)}}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const unreachable=ch=>ch,errorNotFound={status:404,body:"Playground file not found"},errorCancelled={status:503,body:"Playground build cancelled"};class PlaygroundBuild{constructor(oh){this.diagnostics=new Map,this._state="active",this._stateChange=new Deferred,this._files=new Map,this._diagnosticsCallback=oh}state(){return this._state}get stateChange(){return this._stateChange.promise}cancel(){this._errorPendingFileRequests(errorCancelled),this._changeState("cancelled")}async getFile(oh){let hh=this._files.get(oh);if(hh===void 0){if(this._state==="done")return errorNotFound;if(this._state==="cancelled")return errorCancelled;hh=new Deferred,this._files.set(oh,hh)}return hh.promise}onOutput(oh){if(this._state==="active")if(oh.kind==="file")this._onFile(oh);else if(oh.kind==="diagnostic")this._onDiagnostic(oh);else if(oh.kind==="done")this._onDone();else throw new Error(`Unexpected BuildOutput kind: ${unreachable(oh).kind}`)}_changeState(oh){this._state=oh,this._stateChange.resolve(),this._stateChange=new Deferred}_onFile(oh){let hh=this._files.get(oh.file.name);hh===void 0&&(hh=new Deferred,this._files.set(oh.file.name,hh)),hh.resolve(oh.file)}_onDiagnostic(oh){let hh=this.diagnostics.get(oh.filename);hh===void 0&&(hh=[],this.diagnostics.set(oh.filename,hh)),hh.push(oh.diagnostic),this._diagnosticsDebounceId===void 0&&(this._diagnosticsDebounceId=requestAnimationFrame(()=>{this._state!=="cancelled"&&(this._diagnosticsDebounceId=void 0,this._diagnosticsCallback())}))}_onDone(){this._errorPendingFileRequests(errorNotFound),this._changeState("done")}_errorPendingFileRequests(oh){for(const hh of this._files.values())hh.settled||hh.resolve(oh)}}/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const sessions=new Set,generateUniqueSessionId=()=>{let ch;do ch=getRandomString();while(sessions.has(ch));return sessions.add(ch),ch};class FilesChangedEvent extends Event{constructor(oh=!1){super("filesChanged"),this.projectLoaded=oh}}let PlaygroundProject=class extends s$d{constructor(){super(...arguments),this._source={type:"none"},this.sandboxBaseUrl=`https://unpkg.com/playground-elements@${npmVersion}/`,this.sandboxScope=`__playground_swfs_${serviceWorkerHash}/`,this._modified=!1,this._sessionId=generateUniqueSessionId(),this._deferredTypeScriptWorkerApi=new Deferred,this._validImportMap={},this.lastSave=Promise.resolve(),this.savePending=!1}get projectSrc(){if(this._source.type==="url")return this._source.url}set projectSrc(oh){oh?(this._source.type!=="url"||this._source.url!==oh)&&(this._source={type:"url",url:oh}):this._source.type==="url"&&(this._source={type:"none"})}get config(){var oh;return{files:Object.fromEntries(((oh=this._files)!==null&&oh!==void 0?oh:[]).map(hh=>[hh.name,{...hh,name:void 0}])),importMap:this._validImportMap}}set config(oh){oh?this._source={type:"direct",config:oh}:this._source.type==="direct"&&(this._source={type:"none"})}get files(){return this._files}get diagnostics(){var oh;return(oh=this._build)===null||oh===void 0?void 0:oh.diagnostics}get modified(){return this._modified===void 0&&(this._files===void 0&&this._pristineFiles===void 0?this._modified=!1:this._files===void 0||this._pristineFiles===void 0?this._modified=!0:this._modified=!playgroundFilesDeepEqual(this._files,this._pristineFiles)),this._modified}set _importMap(oh){const hh=validateImportMap(oh);if(hh.length>0){for(const mh of hh)console.error(mh);this._validImportMap={}}else this._validImportMap=oh}get _importMap(){return this._validImportMap}get _normalizedSandboxBaseUrl(){const oh=new URL(this.sandboxBaseUrl,import.meta.url);return oh.pathname=endWithSlash(oh.pathname),oh}get baseUrl(){return this._serviceWorkerAPI===void 0||this._files===void 0?void 0:new URL(`${endWithSlash(this.sandboxScope)}${this._sessionId}/`,this._normalizedSandboxBaseUrl).href}get _serviceWorkerProxyIframeUrl(){return new URL(`playground-service-worker-proxy.html#playground-session-id=${this._sessionId}`,this._normalizedSandboxBaseUrl).href}async update(oh){oh.has("_source")&&this._loadProjectFromSource(),(oh.has("sandboxScope")||oh.has("sandboxBaseUrl")||oh.has("_serviceWorkerAPI"))&&this.dispatchEvent(new CustomEvent("urlChanged")),super.update(oh)}async _loadProjectFromSource(){const oh=this._source;switch(oh.type){case"none":this._files=void 0,this._importMap={};break;case"direct":{const{files:hh,importMap:mh}=await expandProjectConfig(oh.config,document.baseURI);if(oh!==this._source)return;this._files=hh,this._importMap=mh}break;case"slot":this._files=oh.files,this._importMap=oh.importMap;break;case"url":{const{files:hh,importMap:mh}=await fetchProjectConfig(new URL(oh.url,document.baseURI).href);if(oh!==this._source)return;this._files=hh,this._importMap=mh}break}this._pristineFiles=this._files&&JSON.parse(JSON.stringify(this._files)),this._modified=!1,this.dispatchEvent(new FilesChangedEvent(!0)),this.save()}render(){return x$a` + + + `}_slotChange(){var oh;const{type:hh}=this._source;if(hh!=="none"&&hh!=="slot")return;const mh=[];let Eh;for(const Ah of this._slot.assignedElements({flatten:!0})){const $h=Ah.getAttribute("type");if(!($h!=null&&$h.startsWith("sample/")))continue;const Dh=$h.substring(7);let jh=(oh=Ah.textContent)!==null&&oh!==void 0?oh:"";if(Dh==="html"&&(jh=jh.replace(/<\//g,"0||Eh!==void 0)&&(this._source={type:"slot",files:mh,importMap:Eh??{}})}async firstUpdated(){const oh=forceSkypackRawMode(new URL("/common/stores/assets/playground-typescript-worker-ff9ed02e.js",self.location));let hh;if(oh.origin===window.location.origin)hh=new Worker(oh);else{const Eh=await(await fetch(oh.href)).text(),Ah=URL.createObjectURL(new Blob([Eh],{type:"application/javascript"}));hh=new Worker(Ah),URL.revokeObjectURL(Ah)}this._deferredTypeScriptWorkerApi.resolve(wrap(hh))}_onServiceWorkerProxyIframeLoad(){const{port1:oh,port2:hh}=new MessageChannel;oh.addEventListener("message",mh=>{mh.data.type===CONNECT_PROJECT_TO_SW&&this._onNewServiceWorkerPort(mh.data.port)}),oh.start(),this._postMessageToServiceWorkerProxyIframe({type:CONFIGURE_PROXY,scope:this.sandboxScope,port:hh},[hh])}_onNewServiceWorkerPort(oh){const hh=mh=>{mh.data.type===ACKNOWLEDGE_SW_CONNECTION&&(oh.removeEventListener("message",hh),mh.data.version===serviceWorkerHash?(this._serviceWorkerAPI=wrap(oh),this._serviceWorkerAPI.setFileAPI(proxy({getFile:Eh=>this._getFile(Eh)}),this._sessionId)):(console.info(`Playground service worker is outdated. Want ${serviceWorkerHash} but got ${mh.data.version}. Waiting for update.`),this._postMessageToServiceWorkerProxyIframe({type:UPDATE_SERVICE_WORKER})))};oh.addEventListener("message",hh),oh.start()}_postMessageToServiceWorkerProxyIframe(oh,hh){const mh=this._serviceWorkerProxyIframe.contentWindow;if(!mh)throw new Error("Unexpected internal error: service worker proxy iframe had no contentWindow");mh.postMessage(oh,"*",hh)}async _getFile(oh){return this._build===void 0?{status:503,body:"Playground build not started"}:this._build.getFile(oh)}async save(){var oh,hh;(oh=this._build)===null||oh===void 0||oh.cancel();const mh=new PlaygroundBuild(()=>{this.dispatchEvent(new CustomEvent("diagnosticsChanged"))});this._build=mh,this.dispatchEvent(new CustomEvent("compileStart"));const Eh=await this._deferredTypeScriptWorkerApi.promise;mh.state()==="active"&&(Eh.compileProject((hh=this._files)!==null&&hh!==void 0?hh:[],{importMap:this._importMap},proxy(Ah=>mh.onOutput(Ah))),await mh.stateChange,mh.state()==="done"&&this.dispatchEvent(new CustomEvent("compileDone")))}async getCompletions(oh){var hh,mh,Eh;const Ah=oh.tokenUnderCursor.trim();if(!oh.isRefinement){const t1=await(await this._deferredTypeScriptWorkerApi.promise).getCompletions(oh.fileName,oh.fileContent,Ah,oh.cursorIndex,{importMap:this._importMap});if(t1){const i1=this._getCompletionDetails.bind(this);this._completionInfo=populateCompletionInfoWithDetailGetters(t1,oh.fileName,oh.cursorIndex,i1)}}const $h=oh.tokenUnderCursor==="."||oh.tokenUnderCursor==="";let Dh=[];return $h?Dh=completionEntriesAsEditorCompletions((hh=this._completionInfo)===null||hh===void 0?void 0:hh.entries,oh.tokenUnderCursor):Dh=sortCompletionItems((mh=this._completionInfo)===null||mh===void 0?void 0:mh.entries,Ah),(Eh=Dh[0])===null||Eh===void 0||Eh.details,Dh}async _getCompletionDetails(oh,hh,mh){return await(await this._deferredTypeScriptWorkerApi.promise).getCompletionItemDetails(oh,hh,{importMap:this._importMap},mh)}async saveDebounced(){this.savePending||(this.savePending=!0,await this.lastSave,this.savePending=!1,this.lastSave=this.save())}isValidNewFilename(oh){var hh;if(!oh)return!1;const mh=(hh=this._files)===null||hh===void 0?void 0:hh.find(Eh=>Eh.name===oh);return mh!==void 0?mh.hidden===!0:!0}editFile(oh,hh){oh.content=hh,this._modified=void 0,this.saveDebounced()}addFile(oh){var hh;if(!this._files||!this.isValidNewFilename(oh))return;const mh=(hh=this._files)===null||hh===void 0?void 0:hh.find(Eh=>Eh.name===oh);(mh==null?void 0:mh.hidden)===!0?mh.hidden=!1:this._files.push({name:oh,content:"",contentType:typeFromFilename(oh)}),this._modified=void 0,this.requestUpdate(),this.dispatchEvent(new FilesChangedEvent),this.save()}deleteFile(oh){if(!this._files)return;const hh=this._files.findIndex(mh=>mh.name===oh);hh<0||(this._files=[...this._files.slice(0,hh),...this._files.slice(hh+1)],this._modified=void 0,this.dispatchEvent(new FilesChangedEvent),this.save())}renameFile(oh,hh){if(!oh||!this._files||!this.isValidNewFilename(hh))return;const mh=this._files.find(Eh=>Eh.name===oh);mh&&(mh.name=hh,mh.contentType=typeFromFilename(hh),this._files=[...this._files],this._modified=void 0,this.dispatchEvent(new FilesChangedEvent),this.save())}};PlaygroundProject.styles=i$h` + iframe { + display: none; + } + `;__decorate$6([n$h({attribute:"project-src",hasChanged:()=>!1})],PlaygroundProject.prototype,"projectSrc",null);__decorate$6([n$h({attribute:!1,hasChanged:()=>!1})],PlaygroundProject.prototype,"config",null);__decorate$6([t$b()],PlaygroundProject.prototype,"_source",void 0);__decorate$6([n$h({attribute:"sandbox-base-url"})],PlaygroundProject.prototype,"sandboxBaseUrl",void 0);__decorate$6([n$h({attribute:"sandbox-scope"})],PlaygroundProject.prototype,"sandboxScope",void 0);__decorate$6([t$b()],PlaygroundProject.prototype,"_serviceWorkerAPI",void 0);__decorate$6([i$e("slot")],PlaygroundProject.prototype,"_slot",void 0);__decorate$6([i$e("iframe")],PlaygroundProject.prototype,"_serviceWorkerProxyIframe",void 0);PlaygroundProject=__decorate$6([e$i("playground-project")],PlaygroundProject);const fetchProjectConfig=async(ch,oh=new Set,hh=new Set)=>{if(hh.has(ch))throw new Error(`Circular project config extends: ${[...hh.values(),ch].join(" extends ")}`);hh.add(ch);const mh=await fetch(ch);if(mh.status!==200)throw new Error(`Error ${mh.status} fetching project config from ${ch}: ${await mh.text()}`);let Eh;try{Eh=await mh.json()}catch(Ah){throw new Error(`Error parsing project config JSON from ${ch}: ${Ah.message}`)}return await expandProjectConfig(Eh,ch,oh,hh)},expandProjectConfig=async(ch,oh,hh=new Set,mh=new Set)=>{var Eh,Ah,$h,Dh,jh;const t1=[];for(const[_1,x1]of Object.entries((Eh=ch.files)!==null&&Eh!==void 0?Eh:{}))hh.has(_1)||(hh.add(_1),x1.content===void 0?t1.push((async()=>{var V1,i0;const r0=await fetch(new URL(_1,oh).href);return{...x1,name:_1,content:await r0.text(),contentType:(i0=(V1=r0.headers.get("Content-Type"))===null||V1===void 0?void 0:V1.toLowerCase())!==null&&i0!==void 0?i0:"text/plain"}})()):t1.push(Promise.resolve({...x1,name:_1,content:(Ah=x1.content)!==null&&Ah!==void 0?Ah:"",contentType:($h=typeFromFilename(_1))!==null&&$h!==void 0?$h:"text/plain"})));const i1=ch.extends?fetchProjectConfig(new URL(ch.extends,oh).href,hh,mh):void 0,n1=await Promise.all(t1),p1=(Dh=ch.importMap)!==null&&Dh!==void 0?Dh:{};if(i1){const _1=await i1;n1.push(..._1.files),p1.imports={...(jh=_1.importMap)===null||jh===void 0?void 0:jh.imports,...p1.imports}}return{files:n1,importMap:p1}},typeFromFilename=ch=>{const oh=ch.lastIndexOf(".");if(oh===-1||oh===ch.length-1)return;const hh=ch.slice(oh+1);return typeEnumToMimeType(hh)},typeEnumToMimeType=ch=>{if(ch!==void 0)switch(ch){case"ts":return"video/mp2t";case"js":return"application/javascript; charset=utf-8";case"json":return"application/json; charset=utf-8";case"jsx":return"text/jsx; charset=utf-8";case"tsx":return"text/typescript-jsx; charset=utf-8";case"html":return"text/html; charset=utf-8";case"css":return"text/css; charset=utf-8";case"svg":return"image/svg+xml";case"png":return"image/png";case"gif":return"image/gif";case"jpeg":case"jpg":return"image/jpeg";case"ico":return"image/vnd.microsoft.icon";case"webp":return"image/webp";case"webm":return"video/webm";case"mid":case"midi":return"audio/midi";case"mp3":return"audio/mpeg";case"weba":return"audio/webm"}},validateImportMap=ch=>{const oh=[];if(typeof ch!="object"||ch===null)return oh.push(`Import map is invalid because it must be an object, but it was ${ch===null?"null":typeof ch}.`),oh;const hh=Object.keys(ch).filter(Eh=>Eh!=="imports");hh.length>0&&oh.push(`Invalid import map properties: ${[...hh].join(", ")}. Only "imports" are currently supported.`);const mh=ch.imports;if(mh===void 0)return oh;if(typeof mh!="object"||mh===null)return oh.push(`Import map "imports" property is invalid because it must be an object, but it was ${mh===null?"null":typeof mh}.`),oh;for(const[Eh,Ah]of Object.entries(mh)){if(typeof Ah!="string"){oh.push(`Import map key "${Eh}" is invalid because address must be a string, but was ${Ah===null?"null":typeof Ah}`);continue}Eh.endsWith("/")&&!Ah.endsWith("/")&&oh.push(`Import map key "${Eh}" is invalid because address "${Ah}" must end in a forward-slash.`);try{new URL(Ah)}catch{oh.push(`Import map key "${Eh}" is invalid because address "${Ah}" is not a valid URL.`)}}return oh},outdent=ch=>{ch=ch.replace(/(^[\n\s]*\n)|(\n[\n\s]*$)/g,"");let oh;for(const hh of ch.split(/\n/g)){const mh=hh.match(/^\s*/)[0].length;(oh===void 0||mh{if(ch.length!==oh.length)return!1;for(let hh=0;hh(...oh)=>({_$litDirective$:ch,values:oh});let i$d=class{constructor(oh){}get _$AU(){return this._$AM._$AU}_$AT(oh,hh,mh){this._$Ct=oh,this._$AM=hh,this._$Ci=mh}_$AS(oh,hh){return this.update(oh,hh)}update(oh,hh){return this.render(...hh)}};/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{I:l$b}=j$6,e$d=ch=>ch.strings===void 0,r$g=()=>document.createComment(""),c$c=(ch,oh,hh)=>{var mh;const Eh=ch._$AA.parentNode,Ah=oh===void 0?ch._$AB:oh._$AA;if(hh===void 0){const $h=Eh.insertBefore(r$g(),Ah),Dh=Eh.insertBefore(r$g(),Ah);hh=new l$b($h,Dh,ch,ch.options)}else{const $h=hh._$AB.nextSibling,Dh=hh._$AM,jh=Dh!==ch;if(jh){let t1;(mh=hh._$AQ)===null||mh===void 0||mh.call(hh,ch),hh._$AM=ch,hh._$AP!==void 0&&(t1=ch._$AU)!==Dh._$AU&&hh._$AP(t1)}if($h!==Ah||jh){let t1=hh._$AA;for(;t1!==$h;){const i1=t1.nextSibling;Eh.insertBefore(t1,Ah),t1=i1}}}return hh},f$a=(ch,oh,hh=ch)=>(ch._$AI(oh,hh),ch),s$c={},a$a=(ch,oh=s$c)=>ch._$AH=oh,m$6=ch=>ch._$AH,p$7=ch=>{var oh;(oh=ch._$AP)===null||oh===void 0||oh.call(ch,!1,!0);let hh=ch._$AA;const mh=ch._$AB.nextSibling;for(;hh!==mh;){const Eh=hh.nextSibling;hh.remove(),hh=Eh}};/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const l$a=e$e(class extends i$d{constructor(ch){if(super(ch),ch.type!==t$a.PROPERTY&&ch.type!==t$a.ATTRIBUTE&&ch.type!==t$a.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!e$d(ch))throw Error("`live` bindings can only contain a single expression")}render(ch){return ch}update(ch,[oh]){if(oh===T$6||oh===A$8)return oh;const hh=ch.element,mh=ch.name;if(ch.type===t$a.PROPERTY){if(oh===hh[mh])return T$6}else if(ch.type===t$a.BOOLEAN_ATTRIBUTE){if(!!oh===hh.hasAttribute(mh))return T$6}else if(ch.type===t$a.ATTRIBUTE&&hh.getAttribute(mh)===oh+"")return T$6;return a$a(ch),oh}});/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const l$9=ch=>ch??A$8;/* @license CodeMirror, copyright (c) by Marijn Haverbeke and others +Distributed under an MIT license: https://codemirror.net/LICENSE */var e$c;function t$9(ch,oh,hh,mh,Eh,Ah){this.name=ch,this.tokenType=oh,this.depth=hh,this.parent=mh,this.startLine=Eh,this.startPos=Ah}function r$f(){this.stream=null,this.line=this.startPos=0,this.string=this.startLine="",this.copyInstance=null}e$c=function(){var ch=navigator.userAgent,oh=navigator.platform,hh=/gecko\/\d/i.test(ch),mh=/MSIE \d/.test(ch),Eh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ch),Ah=/Edge\/(\d+)/.exec(ch),$h=mh||Eh||Ah,Dh=$h&&(mh?document.documentMode||6:+(Ah||Eh)[1]),jh=!Ah&&/WebKit\//.test(ch),t1=jh&&/Qt\/\d+\.\d+/.test(ch),i1=!Ah&&/Chrome\/(\d+)/.exec(ch),n1=i1&&+i1[1],p1=/Opera\//.test(ch),_1=/Apple Computer/.test(navigator.vendor),x1=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ch),V1=/PhantomJS/.test(ch),i0=_1&&(/Mobile\/\w+/.test(ch)||navigator.maxTouchPoints>2),r0=/Android/.test(ch),D0=i0||r0||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ch),J0=i0||/Mac/.test(oh),Iy=/\bCrOS\b/.test(ch),pv=/win/i.test(oh),Sy=p1&&ch.match(/Version\/(\d*\.\d*)/);Sy&&(Sy=Number(Sy[1])),Sy&&Sy>=15&&(p1=!1,jh=!0);var ov=J0&&(t1||p1&&(Sy==null||Sy<12.11)),S0=hh||$h&&Dh>=9;function Z1(Ch){return RegExp("(^|\\s)"+Ch+"(?:$|\\s)\\s*")}var e0,Q0=function(Ch,Ih){var Vh=Ch.className,qh=Z1(Ih).exec(Vh);if(qh){var Qh=Vh.slice(qh.index+qh[0].length);Ch.className=Vh.slice(0,qh.index)+(Qh?qh[1]+Qh:"")}};function R0(Ch){for(var Ih=Ch.childNodes.length;Ih>0;--Ih)Ch.removeChild(Ch.firstChild);return Ch}function V0(Ch,Ih){return R0(Ch).appendChild(Ih)}function ny(Ch,Ih,Vh,qh){var Qh=document.createElement(Ch);if(Vh&&(Qh.className=Vh),qh&&(Qh.style.cssText=qh),typeof Ih=="string")Qh.appendChild(document.createTextNode(Ih));else if(Ih)for(var h1=0;h1=Ih)return I1+(Ih-h1);I1+=L1-h1,I1+=Vh-I1%Vh,h1=L1+1}}i0?y3=function(Ch){Ch.selectionStart=0,Ch.selectionEnd=Ch.value.length}:$h&&(y3=function(Ch){try{Ch.select()}catch{}});var pw=function(){this.id=null,this.f=null,this.time=0,this.handler=Px(this.onTimeout,this)};function gw(Ch,Ih){for(var Vh=0;Vh=Ih)return qh+Math.min(I1,Ih-Qh);if(Qh+=h1-qh,qh=h1+1,(Qh+=Vh-Qh%Vh)>=Ih)return qh}}var nk=[""];function gx(Ch){for(;nk.length<=Ch;)nk.push(yw(nk)+" ");return nk[Ch]}function yw(Ch){return Ch[Ch.length-1]}function eC(Ch,Ih){for(var Vh=[],qh=0;qh"€"&&(Ch.toUpperCase()!=Ch.toLowerCase()||k2.test(Ch))}function fC(Ch,Ih){return Ih?!!(Ih.source.indexOf("\\w")>-1&&Bv(Ch))||Ih.test(Ch):Bv(Ch)}function LN(Ch){for(var Ih in Ch)if(Ch.hasOwnProperty(Ih)&&Ch[Ih])return!1;return!0}var $L=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function mO(Ch){return Ch.charCodeAt(0)>=768&&$L.test(Ch)}function iN(Ch,Ih,Vh){for(;(Vh<0?Ih>0:IhVh?-1:1;;){if(Ih==Vh)return Ih;var Qh=(Ih+Vh)/2,h1=qh<0?Math.ceil(Qh):Math.floor(Qh);if(h1==Ih)return Ch(h1)?Ih:Vh;Ch(h1)?Vh=h1:Ih=h1+qh}}var bD=null;function a7(Ch,Ih,Vh){var qh;bD=null;for(var Qh=0;QhIh)return Qh;h1.to==Ih&&(h1.from!=h1.to&&Vh=="before"?qh=Qh:bD=Qh),h1.from==Ih&&(h1.from!=h1.to&&Vh!="before"?qh=Qh:bD=Qh)}return qh??bD}var hz=function(){var Ch=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ih=/[stwN]/,Vh=/[LRr]/,qh=/[Lb1n]/,Qh=/[1n]/;function h1(I1,L1,W1){this.level=I1,this.from=L1,this.to=W1}return function(I1,L1){var W1=L1=="ltr"?"L":"R";if(I1.length==0||L1=="ltr"&&!Ch.test(I1))return!1;for(var Q1,y0=I1.length,_0=[],iy=0;iy-1&&(qh[Ih]=Qh.slice(0,h1).concat(Qh.slice(h1+1)))}}}function E4(Ch,Ih){var Vh=o7(Ch,Ih);if(Vh.length)for(var qh=Array.prototype.slice.call(arguments,2),Qh=0;Qh0}function LL(Ch){Ch.prototype.on=function(Ih,Vh){Zx(this,Ih,Vh)},Ch.prototype.off=function(Ih,Vh){DO(this,Ih,Vh)}}function HO(Ch){Ch.preventDefault?Ch.preventDefault():Ch.returnValue=!1}function AI(Ch){Ch.stopPropagation?Ch.stopPropagation():Ch.cancelBubble=!0}function s7(Ch){return Ch.defaultPrevented!=null?Ch.defaultPrevented:Ch.returnValue==0}function PN(Ch){HO(Ch),AI(Ch)}function GB(Ch){return Ch.target||Ch.srcElement}function HB(Ch){var Ih=Ch.which;return Ih==null&&(1&Ch.button?Ih=1:2&Ch.button?Ih=3:4&Ch.button&&(Ih=2)),J0&&Ch.ctrlKey&&Ih==1&&(Ih=3),Ih}var kI,T9,p6=function(){if($h&&Dh<9)return!1;var Ch=ny("div");return"draggable"in Ch||"dragDrop"in Ch}();function dz(Ch){if(kI==null){var Ih=ny("span","​");V0(Ch,ny("span",[Ih,document.createTextNode("x")])),Ch.firstChild.offsetHeight!=0&&(kI=Ih.offsetWidth<=1&&Ih.offsetHeight>2&&!($h&&Dh<8))}var Vh=kI?ny("span","​"):ny("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return Vh.setAttribute("cm-text",""),Vh}function nq(Ch){if(T9!=null)return T9;var Ih=V0(Ch,document.createTextNode("AخA")),Vh=e0(Ih,0,1).getBoundingClientRect(),qh=e0(Ih,1,2).getBoundingClientRect();return R0(Ch),!(!Vh||Vh.left==Vh.right)&&(T9=qh.right-Vh.right<3)}var iM,FN=function(Ch){return Ch.split(/\r\n?|\n/)},JD=window.getSelection?function(Ch){try{return Ch.selectionStart!=Ch.selectionEnd}catch{return!1}}:function(Ch){var Ih;try{Ih=Ch.ownerDocument.selection.createRange()}catch{}return!(!Ih||Ih.parentElement()!=Ch)&&Ih.compareEndPoints("StartToEnd",Ih)!=0},fz="oncopy"in(iM=ny("div"))||(iM.setAttribute("oncopy","return;"),typeof iM.oncopy=="function"),aM=null,qB={},o$={};function YB(Ch,Ih){arguments.length>2&&(Ih.dependencies=Array.prototype.slice.call(arguments,2)),qB[Ch]=Ih}function eR(Ch){if(typeof Ch=="string"&&o$.hasOwnProperty(Ch))Ch=o$[Ch];else if(Ch&&typeof Ch.name=="string"&&o$.hasOwnProperty(Ch.name)){var Ih=o$[Ch.name];typeof Ih=="string"&&(Ih={name:Ih}),(Ch=Qy(Ih,Ch)).name=Ih.name}else{if(typeof Ch=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(Ch))return eR("application/xml");if(typeof Ch=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(Ch))return eR("application/json")}return typeof Ch=="string"?{name:Ch}:Ch||{name:"null"}}function s$(Ch,Ih){Ih=eR(Ih);var Vh=qB[Ih.name];if(!Vh)return s$(Ch,"text/plain");var qh=Vh(Ch,Ih);if(c7.hasOwnProperty(Ih.name)){var Qh=c7[Ih.name];for(var h1 in Qh)Qh.hasOwnProperty(h1)&&(qh.hasOwnProperty(h1)&&(qh["_"+h1]=qh[h1]),qh[h1]=Qh[h1])}if(qh.name=Ih.name,Ih.helperType&&(qh.helperType=Ih.helperType),Ih.modeProps)for(var I1 in Ih.modeProps)qh[I1]=Ih.modeProps[I1];return qh}var c7={};function pz(Ch,Ih){m2(Ih,c7.hasOwnProperty(Ch)?c7[Ch]:c7[Ch]={})}function PL(Ch,Ih){if(Ih===!0)return Ih;if(Ch.copyState)return Ch.copyState(Ih);var Vh={};for(var qh in Ih){var Qh=Ih[qh];Qh instanceof Array&&(Qh=Qh.concat([])),Vh[qh]=Qh}return Vh}function OI(Ch,Ih){for(var Vh;Ch.innerMode&&(Vh=Ch.innerMode(Ih))&&Vh.mode!=Ch;)Ih=Vh.state,Ch=Vh.mode;return Vh||{mode:Ch,state:Ih}}function l7(Ch,Ih,Vh){return!Ch.startState||Ch.startState(Ih,Vh)}var x4=function(Ch,Ih,Vh){this.pos=this.start=0,this.string=Ch,this.tabSize=Ih||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Vh};function mx(Ch,Ih){if((Ih-=Ch.first)<0||Ih>=Ch.size)throw Error("There is no line "+(Ih+Ch.first)+" in the document.");for(var Vh=Ch;!Vh.lines;)for(var qh=0;;++qh){var Qh=Vh.children[qh],h1=Qh.chunkSize();if(Ih=Ch.first&&IhVh?ev(Vh,mx(Ch,Vh).text.length):function(qh,Qh){var h1=qh.ch;return h1==null||h1>Qh?ev(qh.line,Qh):h1<0?ev(qh.line,0):qh}(Ih,mx(Ch,Ih.line).text.length)}function h7(Ch,Ih){for(var Vh=[],qh=0;qh=this.string.length},x4.prototype.sol=function(){return this.pos==this.lineStart},x4.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},x4.prototype.next=function(){if(this.posIh},x4.prototype.eatSpace=function(){for(var Ch=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>Ch},x4.prototype.skipToEnd=function(){this.pos=this.string.length},x4.prototype.skipTo=function(Ch){var Ih=this.string.indexOf(Ch,this.pos);if(Ih>-1)return this.pos=Ih,!0},x4.prototype.backUp=function(Ch){this.pos-=Ch},x4.prototype.column=function(){return this.lastColumnPos0?null:(qh&&Ih!==!1&&(this.pos+=qh[0].length),qh)}var Qh=function(h1){return Vh?h1.toLowerCase():h1};if(Qh(this.string.substr(this.pos,Ch.length))==Qh(Ch))return Ih!==!1&&(this.pos+=Ch.length),!0},x4.prototype.current=function(){return this.string.slice(this.start,this.pos)},x4.prototype.hideFirstChars=function(Ch,Ih){this.lineStart+=Ch;try{return Ih()}finally{this.lineStart-=Ch}},x4.prototype.lookAhead=function(Ch){var Ih=this.lineOracle;return Ih&&Ih.lookAhead(Ch)},x4.prototype.baseToken=function(){var Ch=this.lineOracle;return Ch&&Ch.baseToken(this.pos)};var Py=function(Ch,Ih){this.state=Ch,this.lookAhead=Ih},Rv=function(Ch,Ih,Vh,qh){this.state=Ih,this.doc=Ch,this.line=Vh,this.maxLookAhead=qh||0,this.baseTokens=null,this.baseTokenPos=1};function Z2(Ch,Ih,Vh,qh){var Qh=[Ch.state.modeGen],h1={};sM(Ch,Ih.text,Ch.doc.mode,Vh,function(Q1,y0){return Qh.push(Q1,y0)},h1,qh);for(var I1=Vh.state,L1=function(Q1){Vh.baseTokens=Qh;var y0=Ch.state.overlays[Q1],_0=1,iy=0;Vh.state=!0,sM(Ch,Ih.text,y0.mode,Vh,function(Z0,Zy){for(var xy=_0;iyZ0&&Qh.splice(_0,1,Z0,Qh[_0+1],nv),_0+=2,iy=Math.min(Z0,nv)}if(Zy)if(y0.opaque)Qh.splice(xy,_0-xy,Z0,"overlay "+Zy),_0=xy+2;else for(;xy<_0;xy+=2){var zv=Qh[xy+1];Qh[xy+1]=(zv?zv+" ":"")+"overlay "+Zy}},h1),Vh.state=I1,Vh.baseTokens=null,Vh.baseTokenPos=1},W1=0;W1Ch.options.maxHighlightLength&&PL(Ch.doc.mode,qh.state),h1=Z2(Ch,Ih,qh);Qh&&(qh.state=Qh),Ih.stateAfter=qh.save(!Qh),Ih.styles=h1.styles,h1.classes?Ih.styleClasses=h1.classes:Ih.styleClasses&&(Ih.styleClasses=null),Vh===Ch.doc.highlightFrontier&&(Ch.doc.modeFrontier=Math.max(Ch.doc.modeFrontier,++Ch.doc.highlightFrontier))}return Ih.styles}function tC(Ch,Ih,Vh){var qh=Ch.doc,Qh=Ch.display;if(!qh.mode.startState)return new Rv(qh,!0,Ih);var h1=function(W1,Q1,y0){for(var _0,iy,Z0=W1.doc,Zy=y0?-1:Q1-(W1.doc.mode.innerMode?1e3:100),xy=Q1;xy>Zy;--xy){if(xy<=Z0.first)return Z0.first;var nv=mx(Z0,xy-1),zv=nv.stateAfter;if(zv&&(!y0||xy+(zv instanceof Py?zv.lookAhead:0)<=Z0.modeFrontier))return xy;var Uv=qA(nv.text,null,W1.options.tabSize);(iy==null||_0>Uv)&&(iy=xy-1,_0=Uv)}return iy}(Ch,Ih,Vh),I1=h1>qh.first&&mx(qh,h1-1).stateAfter,L1=I1?Rv.fromSaved(qh,I1,h1):new Rv(qh,l7(qh.mode),h1);return qh.iter(h1,Ih,function(W1){j3(Ch,W1.text,L1);var Q1=L1.line;W1.stateAfter=Q1==Ih-1||Q1%5==0||Q1>=Qh.viewFrom&&Q1Ih.start)return h1}throw Error("Mode "+Ch.name+" failed to advance stream.")}Rv.prototype.lookAhead=function(Ch){var Ih=this.doc.getLine(this.line+Ch);return Ih!=null&&Ch>this.maxLookAhead&&(this.maxLookAhead=Ch),Ih},Rv.prototype.baseToken=function(Ch){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=Ch;)this.baseTokenPos+=2;var Ih=this.baseTokens[this.baseTokenPos+1];return{type:Ih&&Ih.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-Ch}},Rv.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Rv.fromSaved=function(Ch,Ih,Vh){return Ih instanceof Py?new Rv(Ch,PL(Ch.mode,Ih.state),Vh,Ih.lookAhead):new Rv(Ch,PL(Ch.mode,Ih),Vh)},Rv.prototype.save=function(Ch){var Ih=Ch!==!1?PL(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Py(Ih,this.maxLookAhead):Ih};var tR=function(Ch,Ih,Vh){this.start=Ch.start,this.end=Ch.pos,this.string=Ch.current(),this.type=Ih||null,this.state=Vh};function $5(Ch,Ih,Vh,qh){var Qh,h1,I1=Ch.doc,L1=I1.mode,W1=mx(I1,(Ih=CC(I1,Ih)).line),Q1=tC(Ch,Ih.line,Vh),y0=new x4(W1.text,Ch.options.tabSize,Q1);for(qh&&(h1=[]);(qh||y0.posCh.options.maxHighlightLength?(L1=!1,I1&&j3(Ch,Ih,qh,_0.pos),_0.pos=Ih.length,W1=null):W1=c$(oM(Vh,_0,qh.state,iy),h1),iy){var Z0=iy[0].name;Z0&&(W1="m-"+(W1?Z0+" "+W1:Z0))}if(!L1||y0!=W1){for(;Q1<_0.start;)Qh(Q1=Math.min(_0.start,Q1+5e3),y0);y0=W1}_0.start=_0.pos}for(;Q1<_0.pos;){var Zy=Math.min(_0.pos,Q1+5e3);Qh(Zy,y0),Q1=Zy}}var d7=!1,FL=!1;function x9(Ch,Ih,Vh){this.marker=Ch,this.from=Ih,this.to=Vh}function dK(Ch,Ih){if(Ch)for(var Vh=0;Vh=U2:Dx.to>U2);(nx||(nx=[])).push(new x9(IA,Dx.from,qk?null:Dx.to))}}return nx}(Vh,Qh,I1),W1=function(A2,U2,aC){var nx;if(A2)for(var v3=0;v3=U2:Dx.to>U2)||Dx.from==U2&&IA.type=="bookmark"&&(!aC||Dx.marker.insertLeft)){var qk=Dx.from==null||(IA.inclusiveLeft?Dx.from<=U2:Dx.from0&&L1)for(var f2=0;f2Ih)&&(!Vh||Bse(Vh,h1.marker)<0)&&(Vh=h1.marker)}return Vh}function v_e(Ch,Ih,Vh,qh,Qh){var h1=mx(Ch,Ih),I1=FL&&h1.markedSpans;if(I1)for(var L1=0;L1=0&&_0<=0||y0<=0&&_0>=0)&&(y0<=0&&(W1.marker.inclusiveRight&&Qh.inclusiveLeft?T2(Q1.to,Vh)>=0:T2(Q1.to,Vh)>0)||y0>=0&&(W1.marker.inclusiveRight&&Qh.inclusiveLeft?T2(Q1.from,qh)<=0:T2(Q1.from,qh)<0)))return!0}}}function BL(Ch){for(var Ih;Ih=y_e(Ch);)Ch=Ih.find(-1,!0).line;return Ch}function jse(Ch,Ih){var Vh=mx(Ch,Ih),qh=BL(Vh);return Vh==qh?Ih:RA(qh)}function w_e(Ch,Ih){if(Ih>Ch.lastLine())return Ih;var Vh,qh=mx(Ch,Ih);if(!VB(Ch,qh))return Ih;for(;Vh=ste(qh);)qh=Vh.find(1,!0).line;return RA(qh)+1}function VB(Ch,Ih){var Vh=FL&&Ih.markedSpans;if(Vh){for(var qh=void 0,Qh=0;QhIh.maxLineLength&&(Ih.maxLineLength=Qh,Ih.maxLine=qh)})}var rq=function(Ch,Ih,Vh){this.text=Ch,b_e(this,Ih),this.height=Vh?Vh(this):1};function L6e(Ch){Ch.parent=null,m_e(Ch)}rq.prototype.lineNo=function(){return RA(this)},LL(rq);var E_e={},P6e={};function S_e(Ch,Ih){if(!Ch||/^\s*$/.test(Ch))return null;var Vh=Ih.addModeClass?P6e:E_e;return Vh[Ch]||(Vh[Ch]=Ch.replace(/\S+/g,"cm-$&"))}function T_e(Ch,Ih){var Vh=Zv("span",null,null,jh?"padding-right: .1px":null),qh={pre:Zv("pre",[Vh],"CodeMirror-line"),content:Vh,col:0,pos:0,cm:Ch,trailingSpace:!1,splitSpaces:Ch.getOption("lineWrapping")};Ih.measure={};for(var Qh=0;Qh<=(Ih.rest?Ih.rest.length:0);Qh++){var h1=Qh?Ih.rest[Qh-1]:Ih.line,I1=void 0;qh.pos=0,qh.addToken=Hse,nq(Ch.display.measure)&&(I1=CI(h1,Ch.doc.direction))&&(qh.addToken=NI(qh.addToken,I1)),qh.map=[],B6e(h1,qh,Dw(Ch,h1,Ih!=Ch.display.externalMeasured&&RA(h1))),h1.styleClasses&&(h1.styleClasses.bgClass&&(qh.bgClass=px(h1.styleClasses.bgClass,qh.bgClass||"")),h1.styleClasses.textClass&&(qh.textClass=px(h1.styleClasses.textClass,qh.textClass||""))),qh.map.length==0&&qh.map.push(0,0,qh.content.appendChild(dz(Ch.display.measure))),Qh==0?(Ih.measure.map=qh.map,Ih.measure.cache={}):((Ih.measure.maps||(Ih.measure.maps=[])).push(qh.map),(Ih.measure.caches||(Ih.measure.caches=[])).push({}))}if(jh){var L1=qh.content.lastChild;(/\bcm-tab\b/.test(L1.className)||L1.querySelector&&L1.querySelector(".cm-tab"))&&(qh.content.className="cm-tab-wrap-hack")}return E4(Ch,"renderLine",Ch,Ih.line,qh.pre),qh.pre.className&&(qh.textClass=px(qh.pre.className,qh.textClass||"")),qh}function F6e(Ch){var Ih=ny("span","•","cm-invalidchar");return Ih.title="\\u"+Ch.charCodeAt(0).toString(16),Ih.setAttribute("aria-label",Ih.title),Ih}function Hse(Ch,Ih,Vh,qh,Qh,h1,I1){if(Ih){var L1,W1=Ch.splitSpaces?function(A2,U2){if(A2.length>1&&!/ /.test(A2))return A2;for(var aC=U2,nx="",v3=0;v3Q1&&_0.from<=Q1);iy++);if(_0.to>=y0)return Ch(Vh,qh,Qh,h1,I1,L1,W1);Ch(Vh,qh.slice(0,_0.to-Q1),Qh,h1,null,L1,W1),h1=null,qh=qh.slice(_0.to-Q1),Q1=_0.to}}}function iq(Ch,Ih,Vh,qh){var Qh=!qh&&Vh.widgetNode;Qh&&Ch.map.push(Ch.pos,Ch.pos+Ih,Qh),!qh&&Ch.cm.display.input.needsContentAttribute&&(Qh||(Qh=Ch.content.appendChild(document.createElement("span"))),Qh.setAttribute("cm-marker",Vh.id)),Qh&&(Ch.cm.display.input.setUneditable(Qh),Ch.content.appendChild(Qh)),Ch.pos+=Ih,Ch.trailingSpace=!1}function B6e(Ch,Ih,Vh){var qh=Ch.markedSpans,Qh=Ch.text,h1=0;if(qh)for(var I1,L1,W1,Q1,y0,_0,iy,Z0=Qh.length,Zy=0,xy=1,nv="",zv=0;;){if(zv==Zy){W1=Q1=y0=L1="",iy=null,_0=null,zv=1/0;for(var Uv=[],f2=void 0,H2=0;H2Zy||U2.collapsed&&A2.to==Zy&&A2.from==Zy)){if(A2.to!=null&&A2.to!=Zy&&zv>A2.to&&(zv=A2.to,Q1=""),U2.className&&(W1+=" "+U2.className),U2.css&&(L1=(L1?L1+";":"")+U2.css),U2.startStyle&&A2.from==Zy&&(y0+=" "+U2.startStyle),U2.endStyle&&A2.to==zv&&(f2||(f2=[])).push(U2.endStyle,A2.to),U2.title&&((iy||(iy={})).title=U2.title),U2.attributes)for(var aC in U2.attributes)(iy||(iy={}))[aC]=U2.attributes[aC];U2.collapsed&&(!_0||Bse(_0.marker,U2)<0)&&(_0=A2)}else A2.from>Zy&&zv>A2.from&&(zv=A2.from)}if(f2)for(var nx=0;nx=Z0)break;for(var Dx=Math.min(Z0,zv);;){if(nv){var IA=Zy+nv.length;if(!_0){var qk=IA>Dx?nv.slice(0,Dx-Zy):nv;Ih.addToken(Ih,qk,I1?I1+W1:W1,y0,Zy+qk.length==zv?Q1:"",L1,iy)}if(IA>=Dx){nv=nv.slice(Dx-Zy),Zy=Dx;break}Zy=IA,y0=""}nv=Qh.slice(h1,h1=Vh[xy++]),I1=S_e(Vh[xy++],Ih.cm.options)}}else for(var sA=1;sAVh)return{map:Ch.measure.maps[Qh],cache:Ch.measure.caches[Qh],before:!0}}}function ute(Ch,Ih,Vh,qh){return b7(Ch,gz(Ch,Ih),Vh,qh)}function yD(Ch,Ih){if(Ih>=Ch.display.viewFrom&&Ih=Vh.lineN&&Ih2&&iy.push((xy.bottom+nv.top)/2-Q1.top)}}iy.push(Q1.bottom-Q1.top)}}(Ch,Ih.view,Ih.rect),Ih.hasHeights=!0),h1=function(L1,W1,Q1,y0){var _0,iy=QB(W1.map,Q1,y0),Z0=iy.node,Zy=iy.start,xy=iy.end,nv=iy.collapse;if(Z0.nodeType==3){for(var zv=0;zv<4;zv++){for(;Zy&&mO(W1.line.text.charAt(iy.coverStart+Zy));)--Zy;for(;iy.coverStart+xy1}(qk))return sA;var l3=screen.logicalXDPI/screen.deviceXDPI,JC=screen.logicalYDPI/screen.deviceYDPI;return{left:sA.left*l3,right:sA.right*l3,top:sA.top*JC,bottom:sA.bottom*JC}}(L1.display.measure,_0))}else{var Uv;Zy>0&&(nv=y0="right"),_0=L1.options.lineWrapping&&(Uv=Z0.getClientRects()).length>1?Uv[y0=="right"?Uv.length-1:0]:Z0.getBoundingClientRect()}if($h&&Dh<9&&!Zy&&(!_0||!_0.left&&!_0.right)){var f2=Z0.parentNode.getClientRects()[0];_0=f2?{left:f2.left,right:f2.left+ZB(L1.display),top:f2.top,bottom:f2.bottom}:gK}for(var H2=_0.top-W1.rect.top,A2=_0.bottom-W1.rect.top,U2=(H2+A2)/2,aC=W1.view.measure.heights,nx=0;nxIh)&&(Qh=(h1=W1-L1)-1,Ih>=W1&&(I1="right")),Qh!=null){if(qh=Ch[Q1+2],L1==W1&&Vh==(qh.insertLeft?"left":"right")&&(I1=Vh),Vh=="left"&&Qh==0)for(;Q1&&Ch[Q1-2]==Ch[Q1-3]&&Ch[Q1-1].insertLeft;)qh=Ch[2+(Q1-=3)],I1="left";if(Vh=="right"&&Qh==W1-L1)for(;Q1=0&&(Vh=Ch[Qh]).left==Vh.right;Qh--);return Vh}function Kse(Ch){if(Ch.measure&&(Ch.measure.cache={},Ch.measure.heights=null,Ch.rest))for(var Ih=0;Ih=qh.text.length?(W1=qh.text.length,Q1="before"):W1<=0&&(W1=0,Q1="after"),!L1)return I1(Q1=="before"?W1-1:W1,Q1=="before");function y0(Zy,xy,nv){return I1(nv?Zy-1:Zy,L1[xy].level==1!=nv)}var _0=a7(L1,W1,Q1),iy=bD,Z0=y0(W1,_0,Q1=="before");return iy!=null&&(Z0.other=y0(W1,iy,Q1!="before")),Z0}function Zse(Ch,Ih){var Vh=0;Ih=CC(Ch.doc,Ih),Ch.options.lineWrapping||(Vh=ZB(Ch.display)*Ih.ch);var qh=mx(Ch.doc,Ih.line),Qh=C9(qh)+lte(Ch.display);return{left:Vh,right:Vh,top:Qh,bottom:Qh+qh.height}}function dte(Ch,Ih,Vh,qh,Qh){var h1=ev(Ch,Ih,Vh);return h1.xRel=Qh,qh&&(h1.outside=qh),h1}function fte(Ch,Ih,Vh){var qh=Ch.doc;if((Vh+=Ch.display.viewOffset)<0)return dte(qh.first,0,null,-1,-1);var Qh=d0(qh,Vh),h1=qh.first+qh.size-1;if(Qh>h1)return dte(qh.first+qh.size-1,mx(qh,h1).text.length,null,1,1);Ih<0&&(Ih=0);for(var I1=mx(qh,Qh);;){var L1=G6e(Ch,I1,Qh,Ih,Vh),W1=$6e(I1,L1.ch+(L1.xRel>0||L1.outside>0?1:0));if(!W1)return L1;var Q1=W1.find(1);if(Q1.line==Qh)return Q1;I1=mx(qh,Qh=Q1.line)}}function Jse(Ch,Ih,Vh,qh){qh-=lq(Ih);var Qh=Ih.text.length,h1=mD(function(I1){return b7(Ch,Vh,I1-1).bottom<=qh},Qh,0);return{begin:h1,end:Qh=mD(function(I1){return b7(Ch,Vh,I1).top>qh},h1,Qh)}}function bz(Ch,Ih,Vh,qh){return Vh||(Vh=gz(Ch,Ih)),Jse(Ch,Ih,Vh,uq(Ch,Ih,b7(Ch,Vh,qh),"line").top)}function pte(Ch,Ih,Vh,qh){return!(Ch.bottom<=Vh)&&(Ch.top>Vh||(qh?Ch.left:Ch.right)>Ih)}function G6e(Ch,Ih,Vh,qh,Qh){Qh-=C9(Ih);var h1=gz(Ch,Ih),I1=lq(Ih),L1=0,W1=Ih.text.length,Q1=!0,y0=CI(Ih,Ch.doc.direction);if(y0){var _0=(Ch.options.lineWrapping?H6e:O_e)(Ch,Ih,Vh,h1,y0,qh,Qh);L1=(Q1=_0.level!=1)?_0.from:_0.to-1,W1=Q1?_0.to:_0.from-1}var iy,Z0,Zy=null,xy=null,nv=mD(function(A2){var U2=b7(Ch,h1,A2);return U2.top+=I1,U2.bottom+=I1,!!pte(U2,qh,Qh,!1)&&(U2.top<=Qh&&U2.left<=qh&&(Zy=A2,xy=U2),!0)},L1,W1),zv=!1;if(xy){var Uv=qh-xy.left=H2.bottom?1:0}return dte(Vh,nv=iN(Ih.text,nv,1),Z0,zv,qh-iy)}function O_e(Ch,Ih,Vh,qh,Qh,h1,I1){var L1=mD(function(_0){var iy=Qh[_0],Z0=iy.level!=1;return pte(m6(Ch,ev(Vh,Z0?iy.to:iy.from,Z0?"before":"after"),"line",Ih,qh),h1,I1,!0)},0,Qh.length-1),W1=Qh[L1];if(L1>0){var Q1=W1.level!=1,y0=m6(Ch,ev(Vh,Q1?W1.from:W1.to,Q1?"after":"before"),"line",Ih,qh);pte(y0,h1,I1,!0)&&y0.top>I1&&(W1=Qh[L1-1])}return W1}function H6e(Ch,Ih,Vh,qh,Qh,h1,I1){var L1=Jse(Ch,Ih,qh,I1),W1=L1.begin,Q1=L1.end;/\s/.test(Ih.text.charAt(Q1-1))&&Q1--;for(var y0=null,_0=null,iy=0;iy=Q1||Z0.to<=W1)){var Zy=b7(Ch,qh,Z0.level!=1?Math.min(Q1,Z0.to)-1:Math.max(W1,Z0.from)).right,xy=Zyxy)&&(y0=Z0,_0=xy)}}return y0||(y0=Qh[Qh.length-1]),y0.fromQ1&&(y0={from:y0.from,to:Q1,level:y0.level}),y0}function DI(Ch){if(Ch.cachedTextHeight!=null)return Ch.cachedTextHeight;if(XB==null){XB=ny("pre",null,"CodeMirror-line-like");for(var Ih=0;Ih<49;++Ih)XB.appendChild(document.createTextNode("x")),XB.appendChild(ny("br"));XB.appendChild(document.createTextNode("x"))}V0(Ch.measure,XB);var Vh=XB.offsetHeight/50;return Vh>3&&(Ch.cachedTextHeight=Vh),R0(Ch.measure),Vh||1}function ZB(Ch){if(Ch.cachedCharWidth!=null)return Ch.cachedCharWidth;var Ih=ny("span","xxxxxxxxxx"),Vh=ny("pre",[Ih],"CodeMirror-line-like");V0(Ch.measure,Vh);var qh=Ih.getBoundingClientRect(),Qh=(qh.right-qh.left)/10;return Qh>2&&(Ch.cachedCharWidth=Qh),Qh||10}function bK(Ch){for(var Ih=Ch.display,Vh={},qh={},Qh=Ih.gutters.clientLeft,h1=Ih.gutters.firstChild,I1=0;h1;h1=h1.nextSibling,++I1){var L1=Ch.display.gutterSpecs[I1].className;Vh[L1]=h1.offsetLeft+h1.clientLeft+Qh,qh[L1]=h1.clientWidth}return{fixedPos:_K(Ih),gutterTotalWidth:Ih.gutters.offsetWidth,gutterLeft:Vh,gutterWidth:qh,wrapperWidth:Ih.wrapper.clientWidth}}function _K(Ch){return Ch.scroller.getBoundingClientRect().left-Ch.sizer.getBoundingClientRect().left}function gte(Ch){var Ih=DI(Ch.display),Vh=Ch.options.lineWrapping,qh=Vh&&Math.max(5,Ch.display.scroller.clientWidth/ZB(Ch.display)-3);return function(Qh){if(VB(Ch.doc,Qh))return 0;var h1=0;if(Qh.widgets)for(var I1=0;I10&&(W1=mx(Ch.doc,Q1.line).text).length==Q1.ch){var y0=qA(W1,W1.length,Ch.options.tabSize)-W1.length;Q1=ev(Q1.line,Math.max(0,Math.round((h1-Vse(Ch.display).left)/ZB(Ch.display))-y0))}return Q1}function RI(Ch,Ih){if(Ih>=Ch.display.viewTo||(Ih-=Ch.display.viewFrom)<0)return null;for(var Vh=Ch.display.view,qh=0;qhIh)&&(Qh.updateLineNumbers=Ih),Ch.curOp.viewChanged=!0,Ih>=Qh.viewTo)FL&&jse(Ch.doc,Ih)Qh.viewFrom?k9(Ch):(Qh.viewFrom+=qh,Qh.viewTo+=qh);else if(Ih<=Qh.viewFrom&&Vh>=Qh.viewTo)k9(Ch);else if(Ih<=Qh.viewFrom){var h1=mte(Ch,Vh,Vh+qh,1);h1?(Qh.view=Qh.view.slice(h1.index),Qh.viewFrom=h1.lineN,Qh.viewTo+=qh):k9(Ch)}else if(Vh>=Qh.viewTo){var I1=mte(Ch,Ih,Ih,-1);I1?(Qh.view=Qh.view.slice(0,I1.index),Qh.viewTo=I1.lineN):k9(Ch)}else{var L1=mte(Ch,Ih,Ih,-1),W1=mte(Ch,Vh,Vh+qh,1);L1&&W1?(Qh.view=Qh.view.slice(0,L1.index).concat(aq(Ch,L1.lineN,W1.lineN)).concat(Qh.view.slice(W1.index)),Qh.viewTo+=qh):k9(Ch)}var Q1=Qh.externalMeasured;Q1&&(Vh=Qh.lineN&&Ih=qh.viewTo)){var h1=qh.view[RI(Ch,Ih)];if(h1.node!=null){var I1=h1.changes||(h1.changes=[]);gw(I1,Vh)==-1&&I1.push(Vh)}}}function k9(Ch){Ch.display.viewFrom=Ch.display.viewTo=Ch.doc.first,Ch.display.view=[],Ch.display.viewOffset=0}function mte(Ch,Ih,Vh,qh){var Qh,h1=RI(Ch,Ih),I1=Ch.display.view;if(!FL||Vh==Ch.doc.first+Ch.doc.size)return{index:h1,lineN:Vh};for(var L1=Ch.display.viewFrom,W1=0;W10){if(h1==I1.length-1)return null;Qh=L1+I1[h1].size-Ih,h1++}else Qh=L1-Ih;Ih+=Qh,Vh+=Qh}for(;jse(Ch.doc,Vh)!=Vh;){if(h1==(qh<0?0:I1.length-1))return null;Vh+=qh*I1[h1-(qh<0?1:0)].size,h1+=qh}return{index:h1,lineN:Vh}}function N_e(Ch){for(var Ih=Ch.display.view,Vh=0,qh=0;qh=Ch.display.viewTo||W1.to().line0?I1:Ch.defaultCharWidth())+"px"}if(qh.other){var L1=Vh.appendChild(ny("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));L1.style.display="",L1.style.left=qh.other.left+"px",L1.style.top=qh.other.top+"px",L1.style.height=.85*(qh.other.bottom-qh.other.top)+"px"}}function bte(Ch,Ih){return Ch.top-Ih.top||Ch.left-Ih.left}function q6e(Ch,Ih,Vh){var qh=Ch.display,Qh=Ch.doc,h1=document.createDocumentFragment(),I1=Vse(Ch.display),L1=I1.left,W1=Math.max(qh.sizerWidth,KB(Ch)-qh.sizer.offsetLeft)-I1.right,Q1=Qh.direction=="ltr";function y0(f2,H2,A2,U2){H2<0&&(H2=0),H2=Math.round(H2),U2=Math.round(U2),h1.appendChild(ny("div",null,"CodeMirror-selected","position: absolute; left: "+f2+`px; + top: `+H2+"px; width: "+(A2??W1-f2)+`px; + height: `+(U2-H2)+"px"))}function _0(f2,H2,A2){var U2,aC,nx=mx(Qh,f2),v3=nx.text.length;function Dx(sA,l3){return hte(Ch,ev(f2,sA),"div",nx,l3)}function IA(sA,l3,JC){var L4=bz(Ch,nx,null,sA),Xk=l3=="ltr"==(JC=="after")?"left":"right";return Dx(JC=="after"?L4.begin:L4.end-(/\s/.test(nx.text.charAt(L4.end-1))?2:1),Xk)[Xk]}var qk=CI(nx,Qh.direction);return function(sA,l3,JC,L4){if(!sA)return L4(l3,JC,"ltr",0);for(var Xk=!1,Q3=0;Q3l3||l3==JC&&AC.to==l3)&&(L4(Math.max(AC.from,l3),Math.min(AC.to,JC),AC.level==1?"rtl":"ltr",Q3),Xk=!0)}Xk||L4(l3,JC,"ltr")}(qk,H2||0,A2??v3,function(sA,l3,JC,L4){var Xk=JC=="ltr",Q3=Dx(sA,Xk?"left":"right"),AC=Dx(l3-1,Xk?"right":"left"),MA=H2==null&&sA==0,$A=A2==null&&l3==v3,d5=L4==0,Qk=!qk||L4==qk.length-1;if(AC.top-Q3.top<=3){var BN=(Q1?$A:MA)&&Qk,gk=(Q1?MA:$A)&&d5?L1:(Xk?Q3:AC).left,WO=BN?W1:(Xk?AC:Q3).right;y0(gk,Q3.top,WO-gk,Q3.bottom)}else{var f5,Z3,WR,MI;Xk?(f5=Q1&&MA&&d5?L1:Q3.left,Z3=Q1?W1:IA(sA,JC,"before"),WR=Q1?L1:IA(l3,JC,"after"),MI=Q1&&$A&&Qk?W1:AC.right):(f5=Q1?IA(sA,JC,"before"):L1,Z3=!Q1&&MA&&d5?W1:Q3.right,WR=!Q1&&$A&&Qk?L1:AC.left,MI=Q1?IA(l3,JC,"after"):W1),y0(f5,Q3.top,Z3-f5,Q3.bottom),Q3.bottom0?Ih.blinker=setInterval(function(){Ch.hasFocus()||JB(Ch),Ih.cursorDiv.style.visibility=(Vh=!Vh)?"":"hidden"},Ch.options.cursorBlinkRate):Ch.options.cursorBlinkRate<0&&(Ih.cursorDiv.style.visibility="hidden")}}function D_e(Ch){Ch.hasFocus()||(Ch.display.input.focus(),Ch.state.focused||nce(Ch))}function cM(Ch){Ch.state.delayingBlurEvent=!0,setTimeout(function(){Ch.state.delayingBlurEvent&&(Ch.state.delayingBlurEvent=!1,Ch.state.focused&&JB(Ch))},100)}function nce(Ch,Ih){Ch.state.delayingBlurEvent&&!Ch.state.draggingText&&(Ch.state.delayingBlurEvent=!1),Ch.options.readOnly!="nocursor"&&(Ch.state.focused||(E4(Ch,"focus",Ch,Ih),Ch.state.focused=!0,$w(Ch.display.wrapper,"CodeMirror-focused"),Ch.curOp||Ch.display.selForContextMenu==Ch.doc.sel||(Ch.display.input.reset(),jh&&setTimeout(function(){return Ch.display.input.reset(!0)},20)),Ch.display.input.receivedFocus()),tce(Ch))}function JB(Ch,Ih){Ch.state.delayingBlurEvent||(Ch.state.focused&&(E4(Ch,"blur",Ch,Ih),Ch.state.focused=!1,Q0(Ch.display.wrapper,"CodeMirror-focused")),clearInterval(Ch.display.blinker),setTimeout(function(){Ch.state.focused||(Ch.display.shift=!1)},150))}function fq(Ch){for(var Ih=Ch.display,Vh=Ih.lineDiv.offsetTop,qh=Math.max(0,Ih.scroller.getBoundingClientRect().top),Qh=Ih.lineDiv.getBoundingClientRect().top,h1=0,I1=0;I1.005||Z0<-.005)&&(QhCh.display.sizerWidth){var xy=Math.ceil(y0/ZB(Ch.display));xy>Ch.display.maxLineLength&&(Ch.display.maxLineLength=xy,Ch.display.maxLine=L1.line,Ch.display.maxLineChanged=!0)}}}Math.abs(h1)>2&&(Ih.scroller.scrollTop+=h1)}function R_e(Ch){if(Ch.widgets)for(var Ih=0;Ih=I1&&(h1=d0(Ih,C9(mx(Ih,W1))-Ch.wrapper.clientHeight),I1=W1)}return{from:h1,to:Math.max(I1,h1+1)}}function yte(Ch,Ih){var Vh=Ch.display,qh=DI(Ch.display);Ih.top<0&&(Ih.top=0);var Qh=Ch.curOp&&Ch.curOp.scrollTop!=null?Ch.curOp.scrollTop:Vh.scroller.scrollTop,h1=cq(Ch),I1={};Ih.bottom-Ih.top>h1&&(Ih.bottom=Ih.top+h1);var L1=Ch.doc.height+Yse(Vh),W1=Ih.topL1-qh;if(Ih.topQh+h1){var y0=Math.min(Ih.top,(Q1?L1:Ih.bottom)-h1);y0!=Qh&&(I1.scrollTop=y0)}var _0=Ch.options.fixedGutter?0:Vh.gutters.offsetWidth,iy=Ch.curOp&&Ch.curOp.scrollLeft!=null?Ch.curOp.scrollLeft:Vh.scroller.scrollLeft-_0,Z0=KB(Ch)-Vh.gutters.offsetWidth,Zy=Ih.right-Ih.left>Z0;return Zy&&(Ih.right=Ih.left+Z0),Ih.left<10?I1.scrollLeft=0:Ih.leftZ0+iy-3&&(I1.scrollLeft=Ih.right+(Zy?0:10)-Z0),I1}function vK(Ch,Ih){Ih!=null&&(wK(Ch),Ch.curOp.scrollTop=(Ch.curOp.scrollTop==null?Ch.doc.scrollTop:Ch.curOp.scrollTop)+Ih)}function pq(Ch){wK(Ch);var Ih=Ch.getCursor();Ch.curOp.scrollToPos={from:Ih,to:Ih,margin:Ch.options.cursorScrollMargin}}function eU(Ch,Ih,Vh){Ih==null&&Vh==null||wK(Ch),Ih!=null&&(Ch.curOp.scrollLeft=Ih),Vh!=null&&(Ch.curOp.scrollTop=Vh)}function wK(Ch){var Ih=Ch.curOp.scrollToPos;Ih&&(Ch.curOp.scrollToPos=null,vte(Ch,Zse(Ch,Ih.from),Zse(Ch,Ih.to),Ih.margin))}function vte(Ch,Ih,Vh,qh){var Qh=yte(Ch,{left:Math.min(Ih.left,Vh.left),top:Math.min(Ih.top,Vh.top)-qh,right:Math.max(Ih.right,Vh.right),bottom:Math.max(Ih.bottom,Vh.bottom)+qh});eU(Ch,Qh.scrollLeft,Qh.scrollTop)}function gq(Ch,Ih){Math.abs(Ch.doc.scrollTop-Ih)<2||(hh||Tte(Ch,{top:Ih}),I_e(Ch,Ih,!0),hh&&Tte(Ch),vq(Ch,100))}function I_e(Ch,Ih,Vh){Ih=Math.max(0,Math.min(Ch.display.scroller.scrollHeight-Ch.display.scroller.clientHeight,Ih)),(Ch.display.scroller.scrollTop!=Ih||Vh)&&(Ch.doc.scrollTop=Ih,Ch.display.scrollbars.setScrollTop(Ih),Ch.display.scroller.scrollTop!=Ih&&(Ch.display.scroller.scrollTop=Ih))}function _z(Ch,Ih,Vh,qh){Ih=Math.max(0,Math.min(Ih,Ch.display.scroller.scrollWidth-Ch.display.scroller.clientWidth)),(Vh?Ih==Ch.doc.scrollLeft:Math.abs(Ch.doc.scrollLeft-Ih)<2)&&!qh||(Ch.doc.scrollLeft=Ih,oce(Ch),Ch.display.scroller.scrollLeft!=Ih&&(Ch.display.scroller.scrollLeft=Ih),Ch.display.scrollbars.setScrollLeft(Ih))}function mq(Ch){var Ih=Ch.display,Vh=Ih.gutters.offsetWidth,qh=Math.round(Ch.doc.height+Yse(Ch.display));return{clientHeight:Ih.scroller.clientHeight,viewHeight:Ih.wrapper.clientHeight,scrollWidth:Ih.scroller.scrollWidth,clientWidth:Ih.scroller.clientWidth,viewWidth:Ih.wrapper.clientWidth,barLeft:Ch.options.fixedGutter?Vh:0,docHeight:qh,scrollHeight:qh+HR(Ch)+Ih.barHeight,nativeBarWidth:Ih.nativeBarWidth,gutterWidth:Vh}}var yz=function(Ch,Ih,Vh){this.cm=Vh;var qh=this.vert=ny("div",[ny("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Qh=this.horiz=ny("div",[ny("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");qh.tabIndex=Qh.tabIndex=-1,Ch(qh),Ch(Qh),Zx(qh,"scroll",function(){qh.clientHeight&&Ih(qh.scrollTop,"vertical")}),Zx(Qh,"scroll",function(){Qh.clientWidth&&Ih(Qh.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,$h&&Dh<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yz.prototype.update=function(Ch){var Ih=Ch.scrollWidth>Ch.clientWidth+1,Vh=Ch.scrollHeight>Ch.clientHeight+1,qh=Ch.nativeBarWidth;if(Vh){this.vert.style.display="block",this.vert.style.bottom=Ih?qh+"px":"0";var Qh=Ch.viewHeight-(Ih?qh:0);this.vert.firstChild.style.height=Math.max(0,Ch.scrollHeight-Ch.clientHeight+Qh)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(Ih){this.horiz.style.display="block",this.horiz.style.right=Vh?qh+"px":"0",this.horiz.style.left=Ch.barLeft+"px";var h1=Ch.viewWidth-Ch.barLeft-(Vh?qh:0);this.horiz.firstChild.style.width=Math.max(0,Ch.scrollWidth-Ch.clientWidth+h1)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&Ch.clientHeight>0&&(qh==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Vh?qh:0,bottom:Ih?qh:0}},yz.prototype.setScrollLeft=function(Ch){this.horiz.scrollLeft!=Ch&&(this.horiz.scrollLeft=Ch),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yz.prototype.setScrollTop=function(Ch){this.vert.scrollTop!=Ch&&(this.vert.scrollTop=Ch),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yz.prototype.zeroWidthHack=function(){var Ch=J0&&!x1?"12px":"18px";this.horiz.style.height=this.vert.style.width=Ch,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new pw,this.disableVert=new pw},yz.prototype.enableZeroWidthBar=function(Ch,Ih,Vh){Ch.style.visibility="",Ih.set(1e3,function qh(){var Qh=Ch.getBoundingClientRect();(Vh=="vert"?document.elementFromPoint(Qh.right-1,(Qh.top+Qh.bottom)/2):document.elementFromPoint((Qh.right+Qh.left)/2,Qh.bottom-1))!=Ch?Ch.style.visibility="hidden":Ih.set(1e3,qh)})},yz.prototype.clear=function(){var Ch=this.horiz.parentNode;Ch.removeChild(this.horiz),Ch.removeChild(this.vert)};var EK=function(){};function bq(Ch,Ih){Ih||(Ih=mq(Ch));var Vh=Ch.display.barWidth,qh=Ch.display.barHeight;M_e(Ch,Ih);for(var Qh=0;Qh<4&&Vh!=Ch.display.barWidth||qh!=Ch.display.barHeight;Qh++)Vh!=Ch.display.barWidth&&Ch.options.lineWrapping&&fq(Ch),M_e(Ch,mq(Ch)),Vh=Ch.display.barWidth,qh=Ch.display.barHeight}function M_e(Ch,Ih){var Vh=Ch.display,qh=Vh.scrollbars.update(Ih);Vh.sizer.style.paddingRight=(Vh.barWidth=qh.right)+"px",Vh.sizer.style.paddingBottom=(Vh.barHeight=qh.bottom)+"px",Vh.heightForcer.style.borderBottom=qh.bottom+"px solid transparent",qh.right&&qh.bottom?(Vh.scrollbarFiller.style.display="block",Vh.scrollbarFiller.style.height=qh.bottom+"px",Vh.scrollbarFiller.style.width=qh.right+"px"):Vh.scrollbarFiller.style.display="",qh.bottom&&Ch.options.coverGutterNextToScrollbar&&Ch.options.fixedGutter?(Vh.gutterFiller.style.display="block",Vh.gutterFiller.style.height=qh.bottom+"px",Vh.gutterFiller.style.width=Ih.gutterWidth+"px"):Vh.gutterFiller.style.display=""}EK.prototype.update=function(){return{bottom:0,right:0}},EK.prototype.setScrollLeft=function(){},EK.prototype.setScrollTop=function(){},EK.prototype.clear=function(){};var SK={native:yz,null:EK};function _q(Ch){Ch.display.scrollbars&&(Ch.display.scrollbars.clear(),Ch.display.scrollbars.addClass&&Q0(Ch.display.wrapper,Ch.display.scrollbars.addClass)),Ch.display.scrollbars=new SK[Ch.options.scrollbarStyle](function(Ih){Ch.display.wrapper.insertBefore(Ih,Ch.display.scrollbarFiller),Zx(Ih,"mousedown",function(){Ch.state.focused&&setTimeout(function(){return Ch.display.input.focus()},0)}),Ih.setAttribute("cm-not-content","true")},function(Ih,Vh){Vh=="horizontal"?_z(Ch,Ih):gq(Ch,Ih)},Ch),Ch.display.scrollbars.addClass&&$w(Ch.display.wrapper,Ch.display.scrollbars.addClass)}var yq=0;function jL(Ch){var Ih;Ch.curOp={cm:Ch,viewChanged:!1,startHeight:Ch.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++yq,markArrays:null},Ih=Ch.curOp,f7?f7.ops.push(Ih):Ih.ownsGroup=f7={ops:[Ih],delayedCallbacks:[]}}function zL(Ch){var Ih=Ch.curOp;Ih&&function(Vh,qh){var Qh=Vh.ownsGroup;if(Qh)try{(function(h1){var I1=h1.delayedCallbacks,L1=0;do{for(;L1=Vh.viewTo)||Vh.maxLineChanged&&Ih.options.lineWrapping,Ch.update=Ch.mustUpdate&&new xK(Ih,Ch.mustUpdate&&{top:Ch.scrollTop,ensure:Ch.scrollToPos},Ch.forceUpdate)}function wte(Ch){Ch.updatedDisplay=Ch.mustUpdate&&rce(Ch.cm,Ch.update)}function vz(Ch){var Ih=Ch.cm,Vh=Ih.display;Ch.updatedDisplay&&fq(Ih),Ch.barMeasure=mq(Ih),Vh.maxLineChanged&&!Ih.options.lineWrapping&&(Ch.adjustWidthTo=ute(Ih,Vh.maxLine,Vh.maxLine.text.length).left+3,Ih.display.sizerWidth=Ch.adjustWidthTo,Ch.barMeasure.scrollWidth=Math.max(Vh.scroller.clientWidth,Vh.sizer.offsetLeft+Ch.adjustWidthTo+HR(Ih)+Ih.display.barWidth),Ch.maxScrollLeft=Math.max(0,Vh.sizer.offsetLeft+Ch.adjustWidthTo-KB(Ih))),(Ch.updatedDisplay||Ch.selectionChanged)&&(Ch.preparedSelection=Vh.input.prepareSelection())}function Ete(Ch){var Ih=Ch.cm;Ch.adjustWidthTo!=null&&(Ih.display.sizer.style.minWidth=Ch.adjustWidthTo+"px",Ch.maxScrollLeft1&&(xy=!0)),Uv.scrollLeft!=null&&(_z(Q1,Uv.scrollLeft),Math.abs(Q1.doc.scrollLeft-H2)>1&&(xy=!0)),!xy)break}return Z0}(Ih,CC(qh,Ch.scrollToPos.from),CC(qh,Ch.scrollToPos.to),Ch.scrollToPos.margin);(function(Q1,y0){if(!S4(Q1,"scrollCursorIntoView")){var _0=Q1.display,iy=_0.sizer.getBoundingClientRect(),Z0=null,Zy=_0.wrapper.ownerDocument;if(y0.top+iy.top<0?Z0=!0:y0.bottom+iy.top>(Zy.defaultView.innerHeight||Zy.documentElement.clientHeight)&&(Z0=!1),Z0!=null&&!V1){var xy=ny("div","​",null,`position: absolute; + top: `+(y0.top-_0.viewOffset-lte(Q1.display))+`px; + height: `+(y0.bottom-y0.top+HR(Q1)+_0.barHeight)+`px; + left: `+y0.left+"px; width: "+Math.max(2,y0.right-y0.left)+"px;");Q1.display.lineSpace.appendChild(xy),xy.scrollIntoView(Z0),Q1.display.lineSpace.removeChild(xy)}}})(Ih,Qh)}var h1=Ch.maybeHiddenMarkers,I1=Ch.maybeUnhiddenMarkers;if(h1)for(var L1=0;L1=Ch.display.viewTo)){var Vh=+new Date+Ch.options.workTime,qh=tC(Ch,Ih.highlightFrontier),Qh=[];Ih.iter(qh.line,Math.min(Ih.first+Ih.size,Ch.display.viewTo+500),function(h1){if(qh.line>=Ch.display.viewFrom){var I1=h1.styles,L1=h1.text.length>Ch.options.maxHighlightLength?PL(Ih.mode,qh.state):null,W1=Z2(Ch,h1,qh,!0);L1&&(qh.state=L1),h1.styles=W1.styles;var Q1=h1.styleClasses,y0=W1.classes;y0?h1.styleClasses=y0:Q1&&(h1.styleClasses=null);for(var _0=!I1||I1.length!=h1.styles.length||Q1!=y0&&(!Q1||!y0||Q1.bgClass!=y0.bgClass||Q1.textClass!=y0.textClass),iy=0;!_0&&iyVh)return vq(Ch,Ch.options.workDelay),!0}),Ih.highlightFrontier=qh.line,Ih.modeFrontier=Math.max(Ih.modeFrontier,qh.line),Qh.length&&II(Ch,function(){for(var h1=0;h1=Vh.viewFrom&&Ih.visible.to<=Vh.viewTo&&(Vh.updateLineNumbers==null||Vh.updateLineNumbers>=Vh.viewTo)&&Vh.renderedView==Vh.view&&N_e(Ch)==0)return!1;sce(Ch)&&(k9(Ch),Ih.dims=bK(Ch));var Qh=qh.first+qh.size,h1=Math.max(Ih.visible.from-Ch.options.viewportMargin,qh.first),I1=Math.min(Qh,Ih.visible.to+Ch.options.viewportMargin);Vh.viewFromI1&&Vh.viewTo-I1<20&&(I1=Math.min(Qh,Vh.viewTo)),FL&&(h1=jse(Ch.doc,h1),I1=w_e(Ch.doc,I1));var L1=h1!=Vh.viewFrom||I1!=Vh.viewTo||Vh.lastWrapHeight!=Ih.wrapperHeight||Vh.lastWrapWidth!=Ih.wrapperWidth;(function(y0,_0,iy){var Z0=y0.display;Z0.view.length==0||_0>=Z0.viewTo||iy<=Z0.viewFrom?(Z0.view=aq(y0,_0,iy),Z0.viewFrom=_0):(Z0.viewFrom>_0?Z0.view=aq(y0,_0,Z0.viewFrom).concat(Z0.view):Z0.viewFrom<_0&&(Z0.view=Z0.view.slice(RI(y0,_0))),Z0.viewFrom=_0,Z0.viewToiy&&(Z0.view=Z0.view.slice(0,RI(y0,iy)))),Z0.viewTo=iy})(Ch,h1,I1),Vh.viewOffset=C9(mx(Ch.doc,Vh.viewFrom)),Ch.display.mover.style.top=Vh.viewOffset+"px";var W1=N_e(Ch);if(!L1&&W1==0&&!Ih.force&&Vh.renderedView==Vh.view&&(Vh.updateLineNumbers==null||Vh.updateLineNumbers>=Vh.viewTo))return!1;var Q1=V6e(Ch);return W1>4&&(Vh.lineDiv.style.display="none"),function(y0,_0,iy){var Z0=y0.display,Zy=y0.options.lineNumbers,xy=Z0.lineDiv,nv=xy.firstChild;function zv(nx){var v3=nx.nextSibling;return jh&&J0&&y0.display.currentWheelTarget==nx?nx.style.display="none":nx.parentNode.removeChild(nx),v3}for(var Uv=Z0.view,f2=Z0.viewFrom,H2=0;H2-1&&(U2=!1),pK(y0,A2,f2,iy)),U2&&(R0(A2.lineNumber),A2.lineNumber.appendChild(document.createTextNode(sw(y0.options,f2)))),nv=A2.node.nextSibling}else{var aC=j6e(y0,A2,f2,iy);xy.insertBefore(aC,nv)}f2+=A2.size}for(;nv;)nv=zv(nv)}(Ch,Vh.updateLineNumbers,Ih.dims),W1>4&&(Vh.lineDiv.style.display=""),Vh.renderedView=Vh.view,function(y0){if(y0&&y0.activeElt&&y0.activeElt!=Qw(y0.activeElt.ownerDocument)&&(y0.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(y0.activeElt.nodeName)&&y0.anchorNode&&Q2(document.body,y0.anchorNode)&&Q2(document.body,y0.focusNode))){var _0=y0.activeElt.ownerDocument,iy=_0.defaultView.getSelection(),Z0=_0.createRange();Z0.setEnd(y0.anchorNode,y0.anchorOffset),Z0.collapse(!1),iy.removeAllRanges(),iy.addRange(Z0),iy.extend(y0.focusNode,y0.focusOffset)}}(Q1),R0(Vh.cursorDiv),R0(Vh.selectionDiv),Vh.gutters.style.height=Vh.sizer.style.minHeight=0,L1&&(Vh.lastWrapHeight=Ih.wrapperHeight,Vh.lastWrapWidth=Ih.wrapperWidth,vq(Ch,400)),Vh.updateLineNumbers=null,!0}function Ste(Ch,Ih){for(var Vh=Ih.viewport,qh=!0;;qh=!1){if(qh&&Ch.options.lineWrapping&&Ih.oldDisplayWidth!=KB(Ch))qh&&(Ih.visible=_te(Ch.display,Ch.doc,Vh));else if(Vh&&Vh.top!=null&&(Vh={top:Math.min(Ch.doc.height+Yse(Ch.display)-cq(Ch),Vh.top)}),Ih.visible=_te(Ch.display,Ch.doc,Vh),Ih.visible.from>=Ch.display.viewFrom&&Ih.visible.to<=Ch.display.viewTo)break;if(!rce(Ch,Ih))break;fq(Ch);var Qh=mq(Ch);yK(Ch),bq(Ch,Qh),ace(Ch,Qh),Ih.force=!1}Ih.signal(Ch,"update",Ch),Ch.display.viewFrom==Ch.display.reportedViewFrom&&Ch.display.viewTo==Ch.display.reportedViewTo||(Ih.signal(Ch,"viewportChange",Ch,Ch.display.viewFrom,Ch.display.viewTo),Ch.display.reportedViewFrom=Ch.display.viewFrom,Ch.display.reportedViewTo=Ch.display.viewTo)}function Tte(Ch,Ih){var Vh=new xK(Ch,Ih);if(rce(Ch,Vh)){fq(Ch),Ste(Ch,Vh);var qh=mq(Ch);yK(Ch),bq(Ch,qh),ace(Ch,qh),Vh.finish()}}function ice(Ch){var Ih=Ch.gutters.offsetWidth;Ch.sizer.style.marginLeft=Ih+"px",bO(Ch,"gutterChanged",Ch)}function ace(Ch,Ih){Ch.display.sizer.style.minHeight=Ih.docHeight+"px",Ch.display.heightForcer.style.top=Ih.docHeight+"px",Ch.display.gutters.style.height=Ih.docHeight+Ch.display.barHeight+HR(Ch)+"px"}function oce(Ch){var Ih=Ch.display,Vh=Ih.view;if(Ih.alignWidgets||Ih.gutters.firstChild&&Ch.options.fixedGutter){for(var qh=_K(Ih)-Ih.scroller.scrollLeft+Ch.doc.scrollLeft,Qh=Ih.gutters.offsetWidth,h1=qh+"px",I1=0;I1=105&&(Qh.wrapper.style.clipPath="inset(0px)"),Qh.wrapper.setAttribute("translate","no"),$h&&Dh<8&&(Qh.gutters.style.zIndex=-1,Qh.scroller.style.paddingRight=0),jh||hh&&D0||(Qh.scroller.draggable=!0),Ch&&(Ch.appendChild?Ch.appendChild(Qh.wrapper):Ch(Qh.wrapper)),Qh.viewFrom=Qh.viewTo=Ih.first,Qh.reportedViewFrom=Qh.reportedViewTo=Ih.first,Qh.view=[],Qh.renderedView=null,Qh.externalMeasured=null,Qh.viewOffset=0,Qh.lastWrapHeight=Qh.lastWrapWidth=0,Qh.updateLineNumbers=null,Qh.nativeBarWidth=Qh.barHeight=Qh.barWidth=0,Qh.scrollbarsClipped=!1,Qh.lineNumWidth=Qh.lineNumInnerWidth=Qh.lineNumChars=null,Qh.alignWidgets=!1,Qh.cachedCharWidth=Qh.cachedTextHeight=Qh.cachedPaddingH=null,Qh.maxLine=null,Qh.maxLineLength=0,Qh.maxLineChanged=!1,Qh.wheelDX=Qh.wheelDY=Qh.wheelStartX=Qh.wheelStartY=null,Qh.shift=!1,Qh.selForContextMenu=null,Qh.activeTouch=null,Qh.gutterSpecs=CK(qh.gutters,qh.lineNumbers),AK(Qh),Vh.init(Qh)}xK.prototype.signal=function(Ch,Ih){T4(Ch,Ih)&&this.events.push(arguments)},xK.prototype.finish=function(){for(var Ch=0;ChL1.clientWidth,Q1=L1.scrollHeight>L1.clientHeight;if(qh&&W1||Qh&&Q1){if(Qh&&J0&&jh){e:for(var y0=Ih.target,_0=I1.view;y0!=L1;y0=y0.parentNode)for(var iy=0;iy<_0.length;iy++)if(_0[iy].node==y0){Ch.display.currentWheelTarget=y0;break e}}if(qh&&!hh&&!p1&&h1!=null)return Qh&&Q1&&gq(Ch,Math.max(0,L1.scrollTop+Qh*h1)),_z(Ch,Math.max(0,L1.scrollLeft+qh*h1)),(!Qh||Qh&&Q1)&&HO(Ih),void(I1.wheelStartX=null);if(Qh&&h1!=null){var Z0=Qh*h1,Zy=Ch.doc.scrollTop,xy=Zy+I1.wrapper.clientHeight;Z0<0?Zy=Math.max(0,Zy+Z0-50):xy=Math.min(Ch.doc.height,xy+Z0+50),Tte(Ch,{top:Zy,bottom:xy})}wz<20&&Ih.deltaMode!==0&&(I1.wheelStartX==null?(I1.wheelStartX=L1.scrollLeft,I1.wheelStartY=L1.scrollTop,I1.wheelDX=qh,I1.wheelDY=Qh,setTimeout(function(){if(I1.wheelStartX!=null){var nv=L1.scrollLeft-I1.wheelStartX,zv=L1.scrollTop-I1.wheelStartY,Uv=zv&&I1.wheelDY&&zv/I1.wheelDY||nv&&I1.wheelDX&&nv/I1.wheelDX;I1.wheelStartX=I1.wheelStartY=null,Uv&&(u$=(u$*wz+Uv)/(wz+1),++wz)}},200)):(I1.wheelDX+=qh,I1.wheelDY+=Qh))}}$h?u$=-.53:hh?u$=15:i1?u$=-.7:_1&&(u$=-1/3);var lM=function(Ch,Ih){this.ranges=Ch,this.primIndex=Ih};lM.prototype.primary=function(){return this.ranges[this.primIndex]},lM.prototype.equals=function(Ch){if(Ch==this)return!0;if(Ch.primIndex!=this.primIndex||Ch.ranges.length!=this.ranges.length)return!1;for(var Ih=0;Ih=0&&T2(Ch,qh.to())<=0)return Vh}return-1};var Pk=function(Ch,Ih){this.anchor=Ch,this.head=Ih};function GL(Ch,Ih,Vh){var qh=Ch&&Ch.options.selectionsMayTouch,Qh=Ih[Vh];Ih.sort(function(iy,Z0){return T2(iy.from(),Z0.from())}),Vh=gw(Ih,Qh);for(var h1=1;h10:W1>=0){var Q1=C4(L1.from(),I1.from()),y0=Lk(L1.to(),I1.to()),_0=L1.empty()?I1.from()==I1.head:L1.from()==L1.head;h1<=Vh&&--Vh,Ih.splice(--h1,2,new Pk(_0?y0:Q1,_0?Q1:y0))}}return new lM(Ih,Vh)}function tU(Ch,Ih){return new lM([new Pk(Ch,Ih||Ch)],0)}function nU(Ch){return Ch.text?ev(Ch.from.line+Ch.text.length-1,yw(Ch.text).length+(Ch.text.length==1?Ch.from.ch:0)):Ch.to}function L_e(Ch,Ih){if(T2(Ch,Ih.from)<0)return Ch;if(T2(Ch,Ih.to)<=0)return nU(Ih);var Vh=Ch.line+Ih.text.length-(Ih.to.line-Ih.from.line)-1,qh=Ch.ch;return Ch.line==Ih.to.line&&(qh+=nU(Ih).ch-Ih.to.ch),ev(Vh,qh)}function kK(Ch,Ih){for(var Vh=[],qh=0;qh1&&Ch.remove(L1.line+1,Zy-1),Ch.insert(L1.line+1,zv)}bO(Ch,"change",Ch,Ih)}function rU(Ch,Ih,Vh){(function qh(Qh,h1,I1){if(Qh.linked)for(var L1=0;L1L1-(Ch.cm?Ch.cm.options.historyEventDelay:500)||Ih.origin.charAt(0)=="*"))&&(h1=function(Q1,y0){return y0?(U_e(Q1.done),yw(Q1.done)):Q1.done.length&&!yw(Q1.done).ranges?yw(Q1.done):Q1.done.length>1&&!Q1.done[Q1.done.length-2].ranges?(Q1.done.pop(),yw(Q1.done)):void 0}(Qh,Qh.lastOp==qh)))I1=yw(h1.changes),T2(Ih.from,Ih.to)==0&&T2(Ih.from,I1.to)==0?I1.to=nU(Ih):h1.changes.push(dce(Ch,Ih));else{var W1=yw(Qh.done);for(W1&&W1.ranges||Ate(Ch.sel,Qh.done),h1={changes:[dce(Ch,Ih)],generation:Qh.generation},Qh.done.push(h1);Qh.done.length>Qh.undoDepth;)Qh.done.shift(),Qh.done[0].ranges||Qh.done.shift()}Qh.done.push(Vh),Qh.generation=++Qh.maxGeneration,Qh.lastModTime=Qh.lastSelTime=L1,Qh.lastOp=Qh.lastSelOp=qh,Qh.lastOrigin=Qh.lastSelOrigin=Ih.origin,I1||E4(Ch,"historyAdded")}function Ate(Ch,Ih){var Vh=yw(Ih);Vh&&Vh.ranges&&Vh.equals(Ch)||Ih.push(Ch)}function z_e(Ch,Ih,Vh,qh){var Qh=Ih["spans_"+Ch.id],h1=0;Ch.iter(Math.max(Ch.first,Vh),Math.min(Ch.first+Ch.size,qh),function(I1){I1.markedSpans&&((Qh||(Qh=Ih["spans_"+Ch.id]={}))[h1]=I1.markedSpans),++h1})}function W6e(Ch){if(!Ch)return null;for(var Ih,Vh=0;Vh-1&&(yw(L1)[_0]=Q1[_0],delete Q1[_0])}}}return qh}function fce(Ch,Ih,Vh,qh){if(qh){var Qh=Ch.anchor;if(Vh){var h1=T2(Ih,Qh)<0;h1!=T2(Vh,Qh)<0?(Qh=Ih,Ih=Vh):h1!=T2(Ih,Vh)<0&&(Ih=Vh)}return new Pk(Qh,Ih)}return new Pk(Vh||Ih,Ih)}function kte(Ch,Ih,Vh,qh,Qh){Qh==null&&(Qh=Ch.cm&&(Ch.cm.display.shift||Ch.extend)),nR(Ch,new lM([fce(Ch.sel.primary(),Ih,Vh,Qh)],0),qh)}function H_e(Ch,Ih,Vh){for(var qh=[],Qh=Ch.cm&&(Ch.cm.display.shift||Ch.extend),h1=0;h1=Ih.ch:L1.to>Ih.ch))){if(Qh&&(E4(W1,"beforeCursorEnter"),W1.explicitlyCleared)){if(h1.markedSpans){--I1;continue}break}if(!W1.atomic)continue;if(Vh){var _0=W1.find(qh<0?1:-1),iy=void 0;if((qh<0?y0:Q1)&&(_0=X_e(Ch,_0,-qh,_0&&_0.line==Ih.line?h1:null)),_0&&_0.line==Ih.line&&(iy=T2(_0,Vh))&&(qh<0?iy<0:iy>0))return Sq(Ch,_0,Ih,qh,Qh)}var Z0=W1.find(qh<0?-1:1);return(qh<0?Q1:y0)&&(Z0=X_e(Ch,Z0,qh,Z0.line==Ih.line?h1:null)),Z0?Sq(Ch,Z0,Ih,qh,Qh):null}}return Ih}function Nte(Ch,Ih,Vh,qh,Qh){var h1=qh||1;return Sq(Ch,Ih,Vh,h1,Qh)||!Qh&&Sq(Ch,Ih,Vh,h1,!0)||Sq(Ch,Ih,Vh,-h1,Qh)||!Qh&&Sq(Ch,Ih,Vh,-h1,!0)||(Ch.cantEdit=!0,ev(Ch.first,0))}function X_e(Ch,Ih,Vh,qh){return Vh<0&&Ih.ch==0?Ih.line>Ch.first?CC(Ch,ev(Ih.line-1)):null:Vh>0&&Ih.ch==(qh||mx(Ch,Ih.line)).text.length?Ih.line0)){var xy=[Z0,1],nv=T2(Zy.from,iy.from),zv=T2(Zy.to,iy.to);(nv<0||!_0.inclusiveLeft&&!nv)&&xy.push({from:Zy.from,to:iy.from}),(zv>0||!_0.inclusiveRight&&!zv)&&xy.push({from:iy.to,to:Zy.to}),Q1.splice.apply(Q1,xy),Z0+=xy.length-3}}return Q1}(Ch,Ih.from,Ih.to);if(qh)for(var Qh=qh.length-1;Qh>=0;--Qh)J_e(Ch,{from:qh[Qh].from,to:qh[Qh].to,text:Qh?[""]:Ih.text,origin:Ih.origin});else J_e(Ch,Ih)}}function J_e(Ch,Ih){if(Ih.text.length!=1||Ih.text[0]!=""||T2(Ih.from,Ih.to)!=0){var Vh=kK(Ch,Ih);j_e(Ch,Ih,Vh,Ch.cm?Ch.cm.curOp.id:NaN),DK(Ch,Ih,Vh,Fse(Ch,Ih));var qh=[];rU(Ch,function(Qh,h1){h1||gw(qh,Qh.history)!=-1||(rye(Qh.history,Ih),qh.push(Qh.history)),DK(Qh,Ih,null,Fse(Qh,Ih))})}}function NK(Ch,Ih,Vh){var qh=Ch.cm&&Ch.cm.state.suppressEdits;if(!qh||Vh){for(var Qh,h1=Ch.history,I1=Ch.sel,L1=Ih=="undo"?h1.done:h1.undone,W1=Ih=="undo"?h1.undone:h1.done,Q1=0;Q1=0;--Z0){var Zy=iy(Z0);if(Zy)return Zy.v}}}}function eye(Ch,Ih){if(Ih!=0&&(Ch.first+=Ih,Ch.sel=new lM(eC(Ch.sel.ranges,function(Qh){return new Pk(ev(Qh.anchor.line+Ih,Qh.anchor.ch),ev(Qh.head.line+Ih,Qh.head.ch))}),Ch.sel.primIndex),Ch.cm)){qR(Ch.cm,Ch.first,Ch.first-Ih,Ih);for(var Vh=Ch.cm.display,qh=Vh.viewFrom;qhCh.lastLine())){if(Ih.from.lineh1&&(Ih={from:Ih.from,to:ev(h1,mx(Ch,h1).text.length),text:[Ih.text[0]],origin:Ih.origin}),Ih.removed=g6(Ch,Ih.from,Ih.to),Vh||(Vh=kK(Ch,Ih)),Ch.cm?function(I1,L1,W1){var Q1=I1.doc,y0=I1.display,_0=L1.from,iy=L1.to,Z0=!1,Zy=_0.line;I1.options.lineWrapping||(Zy=RA(BL(mx(Q1,_0.line))),Q1.iter(Zy,iy.line+1,function(f2){if(f2==y0.maxLine)return Z0=!0,!0})),Q1.sel.contains(L1.from,L1.to)>-1&&S9(I1),hce(Q1,L1,W1,gte(I1)),I1.options.lineWrapping||(Q1.iter(Zy,_0.line+L1.text.length,function(f2){var H2=cte(f2);H2>y0.maxLineLength&&(y0.maxLine=f2,y0.maxLineLength=H2,y0.maxLineChanged=!0,Z0=!1)}),Z0&&(I1.curOp.updateMaxLine=!0)),function(f2,H2){if(f2.modeFrontier=Math.min(f2.modeFrontier,H2),!(f2.highlightFrontierA2;U2--){var aC=mx(f2,U2).stateAfter;if(aC&&(!(aC instanceof Py)||U2+aC.lookAhead1||!(this.children[0]instanceof IK))){var L1=[];this.collapse(L1),this.children=[new IK(L1)],this.children[0].parent=this}},collapse:function(Ch){for(var Ih=0;Ih50){for(var I1=Qh.lines.length%25+25,L1=I1;L110);Ch.parent.maybeSpill()}},iterN:function(Ch,Ih,Vh){for(var qh=0;qh0||I1==0&&h1.clearWhenEmpty!==!1)return h1;if(h1.replacedWith&&(h1.collapsed=!0,h1.widgetNode=Zv("span",[h1.replacedWith],"CodeMirror-widget"),qh.handleMouseEvents||h1.widgetNode.setAttribute("cm-ignore-events","true"),qh.insertLeft&&(h1.widgetNode.insertLeft=!0)),h1.collapsed){if(v_e(Ch,Ih.line,Ih,Vh,h1)||Ih.line!=Vh.line&&v_e(Ch,Vh.line,Ih,Vh,h1))throw Error("Inserting collapsed marker partially overlapping an existing one");FL=!0}h1.addToHistory&&j_e(Ch,{from:Ih,to:Vh,origin:"markText"},Ch.sel,NaN);var L1,W1=Ih.line,Q1=Ch.cm;if(Ch.iter(W1,Vh.line+1,function(_0){Q1&&h1.collapsed&&!Q1.options.lineWrapping&&BL(_0)==Q1.display.maxLine&&(L1=!0),h1.collapsed&&W1!=Ih.line&&GR(_0,0),function(iy,Z0,Zy){var xy=Zy&&window.WeakSet&&(Zy.markedSpans||(Zy.markedSpans=new WeakSet));xy&&iy.markedSpans&&xy.has(iy.markedSpans)?iy.markedSpans.push(Z0):(iy.markedSpans=iy.markedSpans?iy.markedSpans.concat([Z0]):[Z0],xy&&xy.add(iy.markedSpans)),Z0.marker.attachLine(iy)}(_0,new x9(h1,W1==Ih.line?Ih.ch:null,W1==Vh.line?Vh.ch:null),Ch.cm&&Ch.cm.curOp),++W1}),h1.collapsed&&Ch.iter(Ih.line,Vh.line+1,function(_0){VB(Ch,_0)&&GR(_0,0)}),h1.clearOnEnter&&Zx(h1,"beforeCursorEnter",function(){return h1.clear()}),h1.readOnly&&(d7=!0,(Ch.history.done.length||Ch.history.undone.length)&&Ch.clearHistory()),h1.collapsed&&(h1.id=++aye,h1.atomic=!0),Q1){if(L1&&(Q1.curOp.updateMaxLine=!0),h1.collapsed)qR(Q1,Ih.line,Vh.line+1);else if(h1.className||h1.startStyle||h1.endStyle||h1.css||h1.attributes||h1.title)for(var y0=Ih.line;y0<=Vh.line;y0++)UL(Q1,y0,"text");h1.atomic&&W_e(Q1.doc),bO(Q1,"markerAdded",Q1,h1)}return h1}iU.prototype.clear=function(){if(!this.explicitlyCleared){var Ch=this.doc.cm,Ih=Ch&&!Ch.curOp;if(Ih&&jL(Ch),T4(this,"clear")){var Vh=this.find();Vh&&bO(this,"clear",Vh.from,Vh.to)}for(var qh=null,Qh=null,h1=0;h1Ch.display.maxLineLength&&(Ch.display.maxLine=Q1,Ch.display.maxLineLength=y0,Ch.display.maxLineChanged=!0)}qh!=null&&Ch&&this.collapsed&&qR(Ch,qh,Qh+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,Ch&&W_e(Ch.doc)),Ch&&bO(Ch,"markerCleared",Ch,this,qh,Qh),Ih&&zL(Ch),this.parent&&this.parent.clear()}},iU.prototype.find=function(Ch,Ih){var Vh,qh;Ch==null&&this.type=="bookmark"&&(Ch=1);for(var Qh=0;Qh=0;W1--)Tq(this,qh[W1]);L1?Y_e(this,L1):this.cm&&pq(this.cm)}),undo:h5(function(){NK(this,"undo")}),redo:h5(function(){NK(this,"redo")}),undoSelection:h5(function(){NK(this,"undo",!0)}),redoSelection:h5(function(){NK(this,"redo",!0)}),setExtending:function(Ch){this.extend=Ch},getExtending:function(){return this.extend},historySize:function(){for(var Ch=this.history,Ih=0,Vh=0,qh=0;qh=Ch.ch)&&Ih.push(Qh.marker.parent||Qh.marker)}return Ih},findMarks:function(Ch,Ih,Vh){Ch=CC(this,Ch),Ih=CC(this,Ih);var qh=[],Qh=Ch.line;return this.iter(Ch.line,Ih.line+1,function(h1){var I1=h1.markedSpans;if(I1)for(var L1=0;L1=W1.to||W1.from==null&&Qh!=Ch.line||W1.from!=null&&Qh==Ih.line&&W1.from>=Ih.ch||Vh&&!Vh(W1.marker)||qh.push(W1.marker.parent||W1.marker)}++Qh}),qh},getAllMarks:function(){var Ch=[];return this.iter(function(Ih){var Vh=Ih.markedSpans;if(Vh)for(var qh=0;qhCh)return Ih=Ch,!0;Ch-=h1,++Vh}),CC(this,ev(Vh,Ih))},indexFromPos:function(Ch){var Ih=(Ch=CC(this,Ch)).ch;if(Ch.lineIh&&(Ih=Ch.from),Ch.to!=null&&Ch.to-1)return Ih.state.draggingText(Ch),void setTimeout(function(){return Ih.display.input.focus()},20);try{var y0=Ch.dataTransfer.getData("Text");if(y0){var _0;if(Ih.state.draggingText&&!Ih.state.draggingText.copy&&(_0=Ih.listSelections()),Ote(Ih.doc,tU(Vh,Vh)),_0)for(var iy=0;iy<_0.length;++iy)xq(Ih.doc,"",_0[iy].anchor,_0[iy].head,"drag");Ih.replaceSelection(y0,"around","paste"),Ih.display.input.focus()}}catch{}}}}function lye(Ch){Ch.display.dragCursor&&(Ch.display.lineSpace.removeChild(Ch.display.dragCursor),Ch.display.dragCursor=null)}function uye(Ch){if(document.getElementsByClassName){for(var Ih=document.getElementsByClassName("CodeMirror"),Vh=[],qh=0;qh=0;L1--)xq(Ch.doc,"",qh[L1].from,qh[L1].to,"+delete");pq(Ch)})}function Ite(Ch,Ih,Vh){var qh=iN(Ch.text,Ih+Vh,Vh);return qh<0||qh>Ch.text.length?null:qh}function mce(Ch,Ih,Vh){var qh=Ite(Ch,Ih.ch,Vh);return qh==null?null:new ev(Ih.line,qh,Vh<0?"after":"before")}function Nq(Ch,Ih,Vh,qh,Qh){if(Ch){Ih.doc.direction=="rtl"&&(Qh=-Qh);var h1=CI(Vh,Ih.doc.direction);if(h1){var I1,L1=Qh<0?yw(h1):h1[0],W1=Qh<0==(L1.level==1)?"after":"before";if(L1.level>0||Ih.doc.direction=="rtl"){var Q1=gz(Ih,Vh);I1=Qh<0?Vh.text.length-1:0;var y0=b7(Ih,Q1,I1).top;I1=mD(function(_0){return b7(Ih,Q1,_0).top==y0},Qh<0==(L1.level==1)?L1.from:L1.to-1,I1),W1=="before"&&(I1=Ite(Vh,I1,1))}else I1=Qh<0?L1.to:L1.from;return new ev(qh,I1,W1)}}return new ev(qh,Qh<0?Vh.text.length:0,Qh<0?"before":"after")}N9.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},N9.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},N9.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},N9.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},N9.default=J0?N9.macDefault:N9.pcDefault;var Tz={selectAll:Q_e,singleSelection:function(Ch){return Ch.setSelection(Ch.getCursor("anchor"),Ch.getCursor("head"),aA)},killLine:function(Ch){return Oq(Ch,function(Ih){if(Ih.empty()){var Vh=mx(Ch.doc,Ih.head.line).text.length;return Ih.head.ch==Vh&&Ih.head.line0)Qh=new ev(Qh.line,Qh.ch+1),Ch.replaceRange(h1.charAt(Qh.ch-1)+h1.charAt(Qh.ch-2),ev(Qh.line,Qh.ch-2),Qh,"+transpose");else if(Qh.line>Ch.doc.first){var I1=mx(Ch.doc,Qh.line-1).text;I1&&(Qh=new ev(Qh.line,1),Ch.replaceRange(h1.charAt(0)+Ch.doc.lineSeparator()+I1.charAt(I1.length-1),ev(Qh.line-1,I1.length-1),Qh,"+transpose"))}}Vh.push(new Pk(Qh,Qh))}Ch.setSelections(Vh)})},newlineAndIndent:function(Ch){return II(Ch,function(){for(var Ih=Ch.listSelections(),Vh=Ih.length-1;Vh>=0;Vh--)Ch.replaceRange(Ch.doc.lineSeparator(),Ih[Vh].anchor,Ih[Vh].head,"+input");Ih=Ch.listSelections();for(var qh=0;qh-1&&(T2((y0=iy.ranges[y0]).from(),L1)<0||L1.xRel>0)&&(T2(y0.to(),L1)>0||L1.xRel<0)?function(Z0,Zy,xy,nv){var zv=Z0.display,Uv=!1,f2=L5(Z0,function(U2){jh&&(zv.scroller.draggable=!1),Z0.state.draggingText=!1,Z0.state.delayingBlurEvent&&(Z0.hasFocus()?Z0.state.delayingBlurEvent=!1:cM(Z0)),DO(zv.wrapper.ownerDocument,"mouseup",f2),DO(zv.wrapper.ownerDocument,"mousemove",H2),DO(zv.scroller,"dragstart",A2),DO(zv.scroller,"drop",f2),Uv||(HO(U2),nv.addNew||kte(Z0.doc,xy,null,null,nv.extend),jh&&!_1||$h&&Dh==9?setTimeout(function(){zv.wrapper.ownerDocument.body.focus({preventScroll:!0}),zv.input.focus()},20):zv.input.focus())}),H2=function(U2){Uv=Uv||Math.abs(Zy.clientX-U2.clientX)+Math.abs(Zy.clientY-U2.clientY)>=10},A2=function(){return Uv=!0};jh&&(zv.scroller.draggable=!0),Z0.state.draggingText=f2,f2.copy=!nv.moveOnDrag,Zx(zv.wrapper.ownerDocument,"mouseup",f2),Zx(zv.wrapper.ownerDocument,"mousemove",H2),Zx(zv.scroller,"dragstart",A2),Zx(zv.scroller,"drop",f2),Z0.state.delayingBlurEvent=!0,setTimeout(function(){return zv.input.focus()},20),zv.scroller.dragDrop&&zv.scroller.dragDrop()}(I1,Q1,L1,_0):function(Z0,Zy,xy,nv){$h&&cM(Z0);var zv=Z0.display,Uv=Z0.doc;HO(Zy);var f2,H2,A2=Uv.sel,U2=A2.ranges;if(nv.addNew&&!nv.extend?(H2=Uv.sel.contains(xy),f2=H2>-1?U2[H2]:new Pk(xy,xy)):(f2=Uv.sel.primary(),H2=Uv.sel.primIndex),nv.unit=="rectangle")nv.addNew||(f2=new Pk(xy,xy)),xy=A9(Z0,Zy,!0,!0),H2=-1;else{var aC=$te(Z0,xy,nv.unit);f2=nv.extend?fce(f2,aC.anchor,aC.head,nv.extend):aC}nv.addNew?H2==-1?(H2=U2.length,nR(Uv,GL(Z0,U2.concat([f2]),H2),{scroll:!1,origin:"*mouse"})):U2.length>1&&U2[H2].empty()&&nv.unit=="char"&&!nv.extend?(nR(Uv,GL(Z0,U2.slice(0,H2).concat(U2.slice(H2+1)),0),{scroll:!1,origin:"*mouse"}),A2=Uv.sel):pce(Uv,H2,f2,$k):(H2=0,nR(Uv,new lM([f2],0),$k),A2=Uv.sel);var nx=xy,v3=zv.wrapper.getBoundingClientRect(),Dx=0;function IA(JC){var L4=++Dx,Xk=A9(Z0,JC,!0,nv.unit=="rectangle");if(Xk)if(T2(Xk,nx)!=0){Z0.curOp.focus=Qw(Mw(Z0)),function(MA){if(T2(nx,MA)!=0)if(nx=MA,nv.unit=="rectangle"){for(var $A=[],d5=Z0.options.tabSize,Qk=qA(mx(Uv,xy.line).text,xy.ch,d5),BN=qA(mx(Uv,MA.line).text,MA.ch,d5),gk=Math.min(Qk,BN),WO=Math.max(Qk,BN),f5=Math.min(xy.line,MA.line),Z3=Math.min(Z0.lastLine(),Math.max(xy.line,MA.line));f5<=Z3;f5++){var WR=mx(Uv,f5).text,MI=ZC(WR,gk,d5);gk==WO?$A.push(new Pk(ev(f5,MI),ev(f5,MI))):WR.length>MI&&$A.push(new Pk(ev(f5,MI),ev(f5,ZC(WR,WO,d5))))}$A.length||$A.push(new Pk(xy,xy)),nR(Uv,GL(Z0,A2.ranges.slice(0,H2).concat($A),H2),{origin:"*mouse",scroll:!1}),Z0.scrollIntoView(MA)}else{var D9,xce=f2,YK=$te(Z0,MA,nv.unit),jte=xce.anchor;T2(YK.anchor,jte)>0?(D9=YK.head,jte=C4(xce.from(),YK.anchor)):(D9=YK.anchor,jte=Lk(xce.to(),YK.head));var wye=A2.ranges.slice(0);wye[H2]=function(Eye,aU){var $I=aU.anchor,oU=aU.head,eMe=mx(Eye.doc,$I.line);if(T2($I,oU)==0&&$I.sticky==oU.sticky)return aU;var Mq=CI(eMe);if(!Mq)return aU;var zte=a7(Mq,$I.ch,$I.sticky),VK=Mq[zte];if(VK.from!=$I.ch&&VK.to!=$I.ch)return aU;var WK,KK=zte+(VK.from==$I.ch==(VK.level!=1)?0:1);if(KK==0||KK==Mq.length)return aU;if(oU.line!=$I.line)WK=(oU.line-$I.line)*(Eye.doc.direction=="ltr"?1:-1)>0;else{var Cce=a7(Mq,oU.ch,oU.sticky),Sye=Cce-zte||(oU.ch-$I.ch)*(VK.level==1?-1:1);WK=Cce==KK-1||Cce==KK?Sye<0:Sye>0}var Ace=Mq[KK+(WK?-1:0)],Tye=WK==(Ace.level==1),xye=Tye?Ace.from:Ace.to,Cye=Tye?"after":"before";return $I.ch==xye&&$I.sticky==Cye?aU:new Pk(new ev($I.line,xye,Cye),oU)}(Z0,new Pk(CC(Uv,jte),D9)),nR(Uv,GL(Z0,wye,H2),$k)}}(Xk);var Q3=_te(zv,Uv);(Xk.line>=Q3.to||Xk.linev3.bottom?20:0;AC&&setTimeout(L5(Z0,function(){Dx==L4&&(zv.scroller.scrollTop+=AC,IA(JC))}),50)}}function qk(JC){Z0.state.selectingText=!1,Dx=1/0,JC&&(HO(JC),zv.input.focus()),DO(zv.wrapper.ownerDocument,"mousemove",sA),DO(zv.wrapper.ownerDocument,"mouseup",l3),Uv.history.lastSelOrigin=null}var sA=L5(Z0,function(JC){JC.buttons!==0&&HB(JC)?IA(JC):qk(JC)}),l3=L5(Z0,qk);Z0.state.selectingText=l3,Zx(zv.wrapper.ownerDocument,"mousemove",sA),Zx(zv.wrapper.ownerDocument,"mouseup",l3)}(I1,Q1,L1,_0)}(Ih,qh,h1,Ch):GB(Ch)==Vh.scroller&&HO(Ch):Qh==2?(qh&&kte(Ih.doc,qh),setTimeout(function(){return Vh.input.focus()},20)):Qh==3&&(S0?Ih.display.input.onContextMenu(Ch):cM(Ih)))}}}function $te(Ch,Ih,Vh){if(Vh=="char")return new Pk(Ih,Ih);if(Vh=="word")return Ch.findWordAt(Ih);if(Vh=="line")return new Pk(ev(Ih.line,0),CC(Ch.doc,ev(Ih.line+1,0)));var qh=Vh(Ch,Ih);return new Pk(qh.from,qh.to)}function wce(Ch,Ih,Vh,qh){var Qh,h1;if(Ih.touches)Qh=Ih.touches[0].clientX,h1=Ih.touches[0].clientY;else try{Qh=Ih.clientX,h1=Ih.clientY}catch{return!1}if(Qh>=Math.floor(Ch.display.gutters.getBoundingClientRect().right))return!1;qh&&HO(Ih);var I1=Ch.display,L1=I1.lineDiv.getBoundingClientRect();if(h1>L1.bottom||!T4(Ch,Vh))return s7(Ih);h1-=L1.top-I1.viewOffset;for(var W1=0;W1=Qh)return E4(Ch,Vh,Ch,d0(Ch.doc,h1),Ch.display.gutterSpecs[W1].className,Ih),s7(Ih)}}function Lte(Ch,Ih){return wce(Ch,Ih,"gutterClick",!0)}function bye(Ch,Ih){m7(Ch.display,Ih)||function(Vh,qh){return!!T4(Vh,"gutterContextMenu")&&wce(Vh,qh,"gutterContextMenu",!1)}(Ch,Ih)||S4(Ch,Ih,"contextmenu")||S0||Ch.display.input.onContextMenu(Ih)}function _ye(Ch){Ch.display.wrapper.className=Ch.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+Ch.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mK(Ch)}vce.prototype.compare=function(Ch,Ih,Vh){return this.time+400>Ch&&T2(Ih,this.pos)==0&&Vh==this.button};var xz={toString:function(){return"CodeMirror.Init"}},Cz={},Rq={};function Z6e(Ch,Ih,Vh){if(!Ih!=!(Vh&&Vh!=xz)){var qh=Ch.display.dragFunctions,Qh=Ih?Zx:DO;Qh(Ch.display.scroller,"dragstart",qh.start),Qh(Ch.display.scroller,"dragenter",qh.enter),Qh(Ch.display.scroller,"dragover",qh.over),Qh(Ch.display.scroller,"dragleave",qh.leave),Qh(Ch.display.scroller,"drop",qh.drop)}}function J6e(Ch){Ch.options.lineWrapping?($w(Ch.display.wrapper,"CodeMirror-wrap"),Ch.display.sizer.style.minWidth="",Ch.display.sizerWidth=null):(Q0(Ch.display.wrapper,"CodeMirror-wrap"),Gse(Ch)),ece(Ch),qR(Ch),mK(Ch),setTimeout(function(){return bq(Ch)},100)}function _O(Ch,Ih){var Vh=this;if(!(this instanceof _O))return new _O(Ch,Ih);this.options=Ih=Ih?m2(Ih):{},m2(Cz,Ih,!1);var qh=Ih.value;typeof qh=="string"?qh=new YO(qh,Ih.mode,null,Ih.lineSeparator,Ih.direction):Ih.mode&&(qh.modeOption=Ih.mode),this.doc=qh;var Qh=new _O.inputStyles[Ih.inputStyle](this),h1=this.display=new cce(Ch,qh,Qh,Ih);for(var I1 in h1.wrapper.CodeMirror=this,_ye(this),Ih.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),_q(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new pw,keySeq:null,specialChars:null},Ih.autofocus&&!D0&&h1.input.focus(),$h&&Dh<11&&setTimeout(function(){return Vh.display.input.reset(!0)},20),function(W1){var Q1=W1.display;Zx(Q1.scroller,"mousedown",L5(W1,mye)),Zx(Q1.scroller,"dblclick",$h&&Dh<11?L5(W1,function(xy){if(!S4(W1,xy)){var nv=A9(W1,xy);if(nv&&!Lte(W1,xy)&&!m7(W1.display,xy)){HO(xy);var zv=W1.findWordAt(nv);kte(W1.doc,zv.anchor,zv.head)}}}):function(xy){return S4(W1,xy)||HO(xy)}),Zx(Q1.scroller,"contextmenu",function(xy){return bye(W1,xy)}),Zx(Q1.input.getField(),"contextmenu",function(xy){Q1.scroller.contains(xy.target)||bye(W1,xy)});var y0,_0={end:0};function iy(){Q1.activeTouch&&(y0=setTimeout(function(){return Q1.activeTouch=null},1e3),(_0=Q1.activeTouch).end=+new Date)}function Z0(xy,nv){if(nv.left==null)return!0;var zv=nv.left-xy.left,Uv=nv.top-xy.top;return zv*zv+Uv*Uv>400}Zx(Q1.scroller,"touchstart",function(xy){if(!S4(W1,xy)&&!function(zv){if(zv.touches.length!=1)return!1;var Uv=zv.touches[0];return Uv.radiusX<=1&&Uv.radiusY<=1}(xy)&&!Lte(W1,xy)){Q1.input.ensurePolled(),clearTimeout(y0);var nv=+new Date;Q1.activeTouch={start:nv,moved:!1,prev:nv-_0.end<=300?_0:null},xy.touches.length==1&&(Q1.activeTouch.left=xy.touches[0].pageX,Q1.activeTouch.top=xy.touches[0].pageY)}}),Zx(Q1.scroller,"touchmove",function(){Q1.activeTouch&&(Q1.activeTouch.moved=!0)}),Zx(Q1.scroller,"touchend",function(xy){var nv=Q1.activeTouch;if(nv&&!m7(Q1,xy)&&nv.left!=null&&!nv.moved&&new Date-nv.start<300){var zv,Uv=W1.coordsChar(Q1.activeTouch,"page");zv=!nv.prev||Z0(nv,nv.prev)?new Pk(Uv,Uv):!nv.prev.prev||Z0(nv,nv.prev.prev)?W1.findWordAt(Uv):new Pk(ev(Uv.line,0),CC(W1.doc,ev(Uv.line+1,0))),W1.setSelection(zv.anchor,zv.head),W1.focus(),HO(xy)}iy()}),Zx(Q1.scroller,"touchcancel",iy),Zx(Q1.scroller,"scroll",function(){Q1.scroller.clientHeight&&(gq(W1,Q1.scroller.scrollTop),_z(W1,Q1.scroller.scrollLeft,!0),E4(W1,"scroll",W1))}),Zx(Q1.scroller,"mousewheel",function(xy){return h$(W1,xy)}),Zx(Q1.scroller,"DOMMouseScroll",function(xy){return h$(W1,xy)}),Zx(Q1.wrapper,"scroll",function(){return Q1.wrapper.scrollTop=Q1.wrapper.scrollLeft=0}),Q1.dragFunctions={enter:function(xy){S4(W1,xy)||PN(xy)},over:function(xy){S4(W1,xy)||(function(nv,zv){var Uv=A9(nv,zv);if(Uv){var f2=document.createDocumentFragment();dq(nv,Uv,f2),nv.display.dragCursor||(nv.display.dragCursor=ny("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),nv.display.lineSpace.insertBefore(nv.display.dragCursor,nv.display.cursorDiv)),V0(nv.display.dragCursor,f2)}}(W1,xy),PN(xy))},start:function(xy){return function(nv,zv){if($h&&(!nv.state.draggingText||+new Date-cye<100))PN(zv);else if(!S4(nv,zv)&&!m7(nv.display,zv)&&(zv.dataTransfer.setData("Text",nv.getSelection()),zv.dataTransfer.effectAllowed="copyMove",zv.dataTransfer.setDragImage&&!_1)){var Uv=ny("img",null,null,"position: fixed; left: 0; top: 0;");Uv.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p1&&(Uv.width=Uv.height=1,nv.display.wrapper.appendChild(Uv),Uv._top=Uv.offsetTop),zv.dataTransfer.setDragImage(Uv,0,0),p1&&Uv.parentNode.removeChild(Uv)}}(W1,xy)},drop:L5(W1,K6e),leave:function(xy){S4(W1,xy)||lye(W1)}};var Zy=Q1.input.getField();Zx(Zy,"keyup",function(xy){return yce.call(W1,xy)}),Zx(Zy,"keydown",L5(W1,_ce)),Zx(Zy,"keypress",L5(W1,gye)),Zx(Zy,"focus",function(xy){return nce(W1,xy)}),Zx(Zy,"blur",function(xy){return JB(W1,xy)})}(this),function(){var W1;Dte||(Zx(window,"resize",function(){W1==null&&(W1=setTimeout(function(){W1=null,uye(gce)},100))}),Zx(window,"blur",function(){return uye(JB)}),Dte=!0)}(),jL(this),this.curOp.forceUpdate=!0,F_e(this,qh),Ih.autofocus&&!D0||this.hasFocus()?setTimeout(function(){Vh.hasFocus()&&!Vh.state.focused&&nce(Vh)},20):JB(this),Rq)Rq.hasOwnProperty(I1)&&Rq[I1](this,Ih[I1],xz);sce(this),Ih.finishInit&&Ih.finishInit(this);for(var L1=0;L1150)){if(!qh)return;Vh="prev"}}else Q1=0,Vh="not";Vh=="prev"?Q1=Ih>h1.first?qA(mx(h1,Ih-1).text,null,I1):0:Vh=="add"?Q1=W1+Ch.options.indentUnit:Vh=="subtract"?Q1=W1-Ch.options.indentUnit:typeof Vh=="number"&&(Q1=W1+Vh),Q1=Math.max(0,Q1);var _0="",iy=0;if(Ch.options.indentWithTabs)for(var Z0=Math.floor(Q1/I1);Z0;--Z0)iy+=I1,_0+=" ";if(iyI1,W1=FN(Ih),Q1=null;if(L1&&qh.ranges.length>1)if(d$&&d$.text.join(` +`)==Ih){if(qh.ranges.length%d$.text.length==0){Q1=[];for(var y0=0;y0=0;iy--){var Z0=qh.ranges[iy],Zy=Z0.from(),xy=Z0.to();Z0.empty()&&(Vh&&Vh>0?Zy=ev(Zy.line,Zy.ch-Vh):Ch.state.overwrite&&!L1?xy=ev(xy.line,Math.min(mx(h1,xy.line).text.length,xy.ch+yw(W1).length)):L1&&d$&&d$.lineWise&&d$.text.join(` +`)==W1.join(` +`)&&(Zy=xy=ev(Zy.line,0)));var nv={from:Zy,to:xy,text:Q1?Q1[iy%Q1.length]:W1,origin:Qh||(L1?"paste":Ch.state.cutIncoming>I1?"cut":"+input")};Tq(Ch.doc,nv),bO(Ch,"inputRead",Ch,nv)}Ih&&!L1&&yye(Ch,Ih),pq(Ch),Ch.curOp.updateInput<2&&(Ch.curOp.updateInput=_0),Ch.curOp.typing=!0,Ch.state.pasteIncoming=Ch.state.cutIncoming=-1}function HK(Ch,Ih){var Vh=Ch.clipboardData&&Ch.clipboardData.getData("Text");if(Vh)return Ch.preventDefault(),Ih.isReadOnly()||Ih.options.disableInput||!Ih.hasFocus()||II(Ih,function(){return Ece(Ih,Vh,0,null,"paste")}),!0}function yye(Ch,Ih){if(Ch.options.electricChars&&Ch.options.smartIndent)for(var Vh=Ch.doc.sel,qh=Vh.ranges.length-1;qh>=0;qh--){var Qh=Vh.ranges[qh];if(!(Qh.head.ch>100||qh&&Vh.ranges[qh-1].head.line==Qh.head.line)){var h1=Ch.getModeAt(Qh.head),I1=!1;if(h1.electricChars){for(var L1=0;L1-1){I1=GK(Ch,Qh.head.line,"smart");break}}else h1.electricInput&&h1.electricInput.test(mx(Ch.doc,Qh.head.line).text.slice(0,Qh.head.ch))&&(I1=GK(Ch,Qh.head.line,"smart"));I1&&bO(Ch,"electricInput",Ch,Qh.head.line)}}}function Bte(Ch){for(var Ih=[],Vh=[],qh=0;qh0?0:-1));if(isNaN(H2))Uv=null;else{var A2=Vh>0?H2>=55296&&H2<56320:H2>=56320&&H2<57343;Uv=new ev(Ih.line,Math.max(0,Math.min(L1.text.length,Ih.ch+Vh*(A2?2:1))),-Vh)}}else Uv=Qh?function(U2,aC,nx,v3){var Dx=CI(aC,U2.doc.direction);if(!Dx)return mce(aC,nx,v3);nx.ch>=aC.text.length?(nx.ch=aC.text.length,nx.sticky="before"):nx.ch<=0&&(nx.ch=0,nx.sticky="after");var IA=a7(Dx,nx.ch,nx.sticky),qk=Dx[IA];if(U2.doc.direction=="ltr"&&qk.level%2==0&&(v3>0?qk.to>nx.ch:qk.from=qk.from&&Q3>=L4.begin)){var AC=Xk?"before":"after";return new ev(nx.line,Q3,AC)}}var MA=function(Qk,BN,gk){for(var WO=function(MI,D9){return D9?new ev(nx.line,l3(MI,1),"before"):new ev(nx.line,MI,"after")};Qk>=0&&Qk0==(f5.level!=1),WR=Z3?gk.begin:l3(gk.end,-1);if(f5.from<=WR&&WR0?L4.end:l3(L4.begin,-1);return d5==null||v3>0&&d5==aC.text.length||!($A=MA(v3>0?0:Dx.length-1,v3,JC(d5)))?null:$A}(Ch.cm,L1,Ih,Vh):mce(L1,Ih,Vh);if(Uv==null){if(zv||(f2=Ih.line+W1)=Ch.first+Ch.size||(Ih=new ev(f2,Ih.ch,Ih.sticky),!(L1=mx(Ch,f2))))return!1;Ih=Nq(Qh,Ch.cm,L1,Ih.line,W1)}else Ih=Uv;return!0}if(qh=="char"||qh=="codepoint")Q1();else if(qh=="column")Q1(!0);else if(qh=="word"||qh=="group")for(var y0=null,_0=qh=="group",iy=Ch.cm&&Ch.cm.getHelper(Ih,"wordChars"),Z0=!0;!(Vh<0)||Q1(!Z0);Z0=!1){var Zy=L1.text.charAt(Ih.ch)||` +`,xy=fC(Zy,iy)?"w":_0&&Zy==` +`?"n":!_0||/\s/.test(Zy)?null:"p";if(!_0||Z0||xy||(xy="s"),y0&&y0!=xy){Vh<0&&(Vh=1,Q1(),Ih.sticky="after");break}if(xy&&(y0=xy),Vh>0&&!Q1(!Z0))break}var nv=Nte(Ch,Ih,h1,I1,!0);return i3(h1,nv)&&(nv.hitSide=!0),nv}function vye(Ch,Ih,Vh,qh){var Qh,h1,I1=Ch.doc,L1=Ih.left;if(qh=="page"){var W1=Math.min(Ch.display.wrapper.clientHeight,tx(Ch).innerHeight||I1(Ch).documentElement.clientHeight),Q1=Math.max(W1-.5*DI(Ch.display),3);Qh=(Vh>0?Ih.bottom:Ih.top)+Vh*Q1}else qh=="line"&&(Qh=Vh>0?Ih.bottom+3:Ih.top-3);for(;(h1=fte(Ch,L1,Qh)).outside;){if(Vh<0?Qh<=0:Qh>=I1.height){h1.hitSide=!0;break}Qh+=5*Vh}return h1}var vA=function(Ch){this.cm=Ch,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new pw,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function HL(Ch,Ih){var Vh=yD(Ch,Ih.line);if(!Vh||Vh.hidden)return null;var qh=mx(Ch.doc,Ih.line),Qh=Wse(Vh,qh,Ih.line),h1=CI(qh,Ch.doc.direction),I1="left";h1&&(I1=a7(h1,Ih.ch)%2?"right":"left");var L1=QB(Qh.map,Ih.ch,I1);return L1.offset=L1.collapse=="right"?L1.end:L1.start,L1}function f$(Ch,Ih){return Ih&&(Ch.bad=!0),Ch}function y7(Ch,Ih,Vh){var qh;if(Ih==Ch.display.lineDiv){if(!(qh=Ch.display.lineDiv.childNodes[Vh]))return f$(Ch.clipPos(ev(Ch.display.viewTo-1)),!0);Ih=null,Vh=0}else for(qh=Ih;;qh=qh.parentNode){if(!qh||qh==Ch.display.lineDiv)return null;if(qh.parentNode&&qh.parentNode==Ch.display.lineDiv)break}for(var Qh=0;Qh=Ih.display.viewTo||Qh.line=Ih.display.viewFrom&&HL(Ih,qh)||{node:L1[0].measure.map[2],offset:0},Q1=Qh.lineqh.firstLine()&&(I1=ev(I1.line-1,mx(qh.doc,I1.line-1).length)),L1.ch==mx(qh.doc,L1.line).text.length&&L1.lineQh.viewTo-1)return!1;I1.line==Qh.viewFrom||(Ch=RI(qh,I1.line))==0?(Ih=RA(Qh.view[0].line),Vh=Qh.view[0].node):(Ih=RA(Qh.view[Ch].line),Vh=Qh.view[Ch-1].node.nextSibling);var W1,Q1,y0=RI(qh,L1.line);if(y0==Qh.view.length-1?(W1=Qh.viewTo-1,Q1=Qh.lineDiv.lastChild):(W1=RA(Qh.view[y0+1].line)-1,Q1=Qh.view[y0+1].node.previousSibling),!Vh)return!1;for(var _0=qh.doc.splitLines(function(aC,nx,v3,Dx,IA){var qk="",sA=!1,l3=aC.doc.lineSeparator(),JC=!1;function L4(){sA&&(qk+=l3,JC&&(qk+=l3),sA=JC=!1)}function Xk(AC){AC&&(L4(),qk+=AC)}function Q3(AC){if(AC.nodeType==1){var MA=AC.getAttribute("cm-text");if(MA)return void Xk(MA);var $A,d5=AC.getAttribute("cm-marker");if(d5){var Qk=aC.findMarks(ev(Dx,0),ev(IA+1,0),(WO=+d5,function(f5){return f5.id==WO}));return void(Qk.length&&($A=Qk[0].find(0))&&Xk(g6(aC.doc,$A.from,$A.to).join(l3)))}if(AC.getAttribute("contenteditable")=="false")return;var BN=/^(pre|div|p|li|table|br)$/i.test(AC.nodeName);if(!/^br$/i.test(AC.nodeName)&&AC.textContent.length==0)return;BN&&L4();for(var gk=0;gk1&&iy.length>1;)if(yw(_0)==yw(iy))_0.pop(),iy.pop(),W1--;else{if(_0[0]!=iy[0])break;_0.shift(),iy.shift(),Ih++}for(var Z0=0,Zy=0,xy=_0[0],nv=iy[0],zv=Math.min(xy.length,nv.length);Z0I1.ch&&Uv.charCodeAt(Uv.length-Zy-1)==f2.charCodeAt(f2.length-Zy-1);)Z0--,Zy++;_0[_0.length-1]=Uv.slice(0,Uv.length-Zy).replace(/^\u200b+/,""),_0[0]=_0[0].slice(Z0).replace(/\u200b+$/,"");var A2=ev(Ih,Z0),U2=ev(W1,iy.length?yw(iy).length-Zy:0);return _0.length>1||_0[0]||T2(A2,U2)?(xq(qh.doc,_0,A2,U2,"+input"),!0):void 0},vA.prototype.ensurePolled=function(){this.forceCompositionEnd()},vA.prototype.reset=function(){this.forceCompositionEnd()},vA.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},vA.prototype.readFromDOMSoon=function(){var Ch=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(Ch.readDOMTimeout=null,Ch.composing){if(!Ch.composing.done)return;Ch.composing=null}Ch.updateFromDOM()},80))},vA.prototype.updateFromDOM=function(){var Ch=this;!this.cm.isReadOnly()&&this.pollContent()||II(this.cm,function(){return qR(Ch.cm)})},vA.prototype.setUneditable=function(Ch){Ch.contentEditable="false"},vA.prototype.onKeyPress=function(Ch){Ch.charCode==0||this.composing||(Ch.preventDefault(),this.cm.isReadOnly()||L5(this.cm,Ece)(this.cm,String.fromCharCode(Ch.charCode==null?Ch.keyCode:Ch.charCode),0))},vA.prototype.readOnlyChanged=function(Ch){this.div.contentEditable=(Ch!="nocursor")+""},vA.prototype.onContextMenu=function(){},vA.prototype.resetPosition=function(){},vA.prototype.needsContentAttribute=!0;var VO=function(Ch){this.cm=Ch,this.prevInput="",this.pollingFast=!1,this.polling=new pw,this.hasSelection=!1,this.composing=null,this.resetting=!1};VO.prototype.init=function(Ch){var Ih=this,Vh=this,qh=this.cm;this.createField(Ch);var Qh=this.textarea;function h1(I1){if(!S4(qh,I1)){if(qh.somethingSelected())Fte({lineWise:!1,text:qh.getSelections()});else{if(!qh.options.lineWiseCopyCut)return;var L1=Bte(qh);Fte({lineWise:!0,text:L1.text}),I1.type=="cut"?qh.setSelections(L1.ranges,null,aA):(Vh.prevInput="",Qh.value=L1.text.join(` +`),y3(Qh))}I1.type=="cut"&&(qh.state.cutIncoming=+new Date)}}Ch.wrapper.insertBefore(this.wrapper,Ch.wrapper.firstChild),i0&&(Qh.style.width="0px"),Zx(Qh,"input",function(){$h&&Dh>=9&&Ih.hasSelection&&(Ih.hasSelection=null),Vh.poll()}),Zx(Qh,"paste",function(I1){S4(qh,I1)||HK(I1,qh)||(qh.state.pasteIncoming=+new Date,Vh.fastPoll())}),Zx(Qh,"cut",h1),Zx(Qh,"copy",h1),Zx(Ch.scroller,"paste",function(I1){if(!m7(Ch,I1)&&!S4(qh,I1)){if(!Qh.dispatchEvent)return qh.state.pasteIncoming=+new Date,void Vh.focus();var L1=new Event("paste");L1.clipboardData=I1.clipboardData,Qh.dispatchEvent(L1)}}),Zx(Ch.lineSpace,"selectstart",function(I1){m7(Ch,I1)||HO(I1)}),Zx(Qh,"compositionstart",function(){var I1=qh.getCursor("from");Vh.composing&&Vh.composing.range.clear(),Vh.composing={start:I1,range:qh.markText(I1,qh.getCursor("to"),{className:"CodeMirror-composing"})}}),Zx(Qh,"compositionend",function(){Vh.composing&&(Vh.poll(),Vh.composing.range.clear(),Vh.composing=null)})},VO.prototype.createField=function(Ch){this.wrapper=VR(),this.textarea=this.wrapper.firstChild},VO.prototype.screenReaderLabelChanged=function(Ch){Ch?this.textarea.setAttribute("aria-label",Ch):this.textarea.removeAttribute("aria-label")},VO.prototype.prepareSelection=function(){var Ch=this.cm,Ih=Ch.display,Vh=Ch.doc,qh=hq(Ch);if(Ch.options.moveInputWithCursor){var Qh=m6(Ch,Vh.sel.primary().head,"div"),h1=Ih.wrapper.getBoundingClientRect(),I1=Ih.lineDiv.getBoundingClientRect();qh.teTop=Math.max(0,Math.min(Ih.wrapper.clientHeight-10,Qh.top+I1.top-h1.top)),qh.teLeft=Math.max(0,Math.min(Ih.wrapper.clientWidth-10,Qh.left+I1.left-h1.left))}return qh},VO.prototype.showSelection=function(Ch){var Ih=this.cm.display;V0(Ih.cursorDiv,Ch.cursors),V0(Ih.selectionDiv,Ch.selection),Ch.teTop!=null&&(this.wrapper.style.top=Ch.teTop+"px",this.wrapper.style.left=Ch.teLeft+"px")},VO.prototype.reset=function(Ch){if(!(this.contextMenuPending||this.composing&&Ch)){var Ih=this.cm;if(this.resetting=!0,Ih.somethingSelected()){this.prevInput="";var Vh=Ih.getSelection();this.textarea.value=Vh,Ih.state.focused&&y3(this.textarea),$h&&Dh>=9&&(this.hasSelection=Vh)}else Ch||(this.prevInput=this.textarea.value="",$h&&Dh>=9&&(this.hasSelection=null));this.resetting=!1}},VO.prototype.getField=function(){return this.textarea},VO.prototype.supportsTouch=function(){return!1},VO.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!D0||Qw(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},VO.prototype.blur=function(){this.textarea.blur()},VO.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},VO.prototype.receivedFocus=function(){this.slowPoll()},VO.prototype.slowPoll=function(){var Ch=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){Ch.poll(),Ch.cm.state.focused&&Ch.slowPoll()})},VO.prototype.fastPoll=function(){var Ch=!1,Ih=this;Ih.pollingFast=!0,Ih.polling.set(20,function Vh(){Ih.poll()||Ch?(Ih.pollingFast=!1,Ih.slowPoll()):(Ch=!0,Ih.polling.set(60,Vh))})},VO.prototype.poll=function(){var Ch=this,Ih=this.cm,Vh=this.textarea,qh=this.prevInput;if(this.contextMenuPending||this.resetting||!Ih.state.focused||JD(Vh)&&!qh&&!this.composing||Ih.isReadOnly()||Ih.options.disableInput||Ih.state.keySeq)return!1;var Qh=Vh.value;if(Qh==qh&&!Ih.somethingSelected())return!1;if($h&&Dh>=9&&this.hasSelection===Qh||J0&&/[\uf700-\uf7ff]/.test(Qh))return Ih.display.input.reset(),!1;if(Ih.doc.sel==Ih.display.selForContextMenu){var h1=Qh.charCodeAt(0);if(h1!=8203||qh||(qh="​"),h1==8666)return this.reset(),this.cm.execCommand("undo")}for(var I1=0,L1=Math.min(qh.length,Qh.length);I11e3||Qh.indexOf(` +`)>-1?Vh.value=Ch.prevInput="":Ch.prevInput=Qh,Ch.composing&&(Ch.composing.range.clear(),Ch.composing.range=Ih.markText(Ch.composing.start,Ih.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},VO.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},VO.prototype.onKeyPress=function(){$h&&Dh>=9&&(this.hasSelection=null),this.fastPoll()},VO.prototype.onContextMenu=function(Ch){var Ih=this,Vh=Ih.cm,qh=Vh.display,Qh=Ih.textarea;Ih.contextMenuPending&&Ih.contextMenuPending();var h1=A9(Vh,Ch),I1=qh.scroller.scrollTop;if(h1&&!p1){Vh.options.resetSelectionOnContextMenu&&Vh.doc.sel.contains(h1)==-1&&L5(Vh,nR)(Vh.doc,tU(h1),aA);var L1,W1=Qh.style.cssText,Q1=Ih.wrapper.style.cssText,y0=Ih.wrapper.offsetParent.getBoundingClientRect();if(Ih.wrapper.style.cssText="position: static",Qh.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(Ch.clientY-y0.top-5)+"px; left: "+(Ch.clientX-y0.left-5)+`px; + z-index: 1000; background: `+($h?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`,jh&&(L1=Qh.ownerDocument.defaultView.scrollY),qh.input.focus(),jh&&Qh.ownerDocument.defaultView.scrollTo(null,L1),qh.input.reset(),Vh.somethingSelected()||(Qh.value=Ih.prevInput=" "),Ih.contextMenuPending=Z0,qh.selForContextMenu=Vh.doc.sel,clearTimeout(qh.detectingSelectAll),$h&&Dh>=9&&iy(),S0){PN(Ch);var _0=function(){DO(window,"mouseup",_0),setTimeout(Z0,20)};Zx(window,"mouseup",_0)}else setTimeout(Z0,50)}function iy(){if(Qh.selectionStart!=null){var Zy=Vh.somethingSelected(),xy="​"+(Zy?Qh.value:"");Qh.value="⇚",Qh.value=xy,Ih.prevInput=Zy?"":"​",Qh.selectionStart=1,Qh.selectionEnd=xy.length,qh.selForContextMenu=Vh.doc.sel}}function Z0(){if(Ih.contextMenuPending==Z0&&(Ih.contextMenuPending=!1,Ih.wrapper.style.cssText=Q1,Qh.style.cssText=W1,$h&&Dh<9&&qh.scrollbars.setScrollTop(qh.scroller.scrollTop=I1),Qh.selectionStart!=null)){(!$h||$h&&Dh<9)&&iy();var Zy=0,xy=function(){qh.selForContextMenu==Vh.doc.sel&&Qh.selectionStart==0&&Qh.selectionEnd>0&&Ih.prevInput=="​"?L5(Vh,Q_e)(Vh):Zy++<10?qh.detectingSelectAll=setTimeout(xy,500):(qh.selForContextMenu=null,qh.input.reset())};qh.detectingSelectAll=setTimeout(xy,200)}}},VO.prototype.readOnlyChanged=function(Ch){Ch||this.reset(),this.textarea.disabled=Ch=="nocursor",this.textarea.readOnly=!!Ch},VO.prototype.setUneditable=function(){},VO.prototype.needsContentAttribute=!1,function(Ch){var Ih=Ch.optionHandlers;function Vh(qh,Qh,h1,I1){Ch.defaults[qh]=Qh,h1&&(Ih[qh]=I1?function(L1,W1,Q1){Q1!=xz&&h1(L1,W1,Q1)}:h1)}Ch.defineOption=Vh,Ch.Init=xz,Vh("value","",function(qh,Qh){return qh.setValue(Qh)},!0),Vh("mode",null,function(qh,Qh){qh.doc.modeOption=Qh,uce(qh)},!0),Vh("indentUnit",2,uce,!0),Vh("indentWithTabs",!1),Vh("smartIndent",!0),Vh("tabSize",4,function(qh){OK(qh),mK(qh),qR(qh)},!0),Vh("lineSeparator",null,function(qh,Qh){if(qh.doc.lineSep=Qh,Qh){var h1=[],I1=qh.doc.first;qh.doc.iter(function(W1){for(var Q1=0;;){var y0=W1.text.indexOf(Qh,Q1);if(y0==-1)break;Q1=y0+Qh.length,h1.push(ev(I1,y0))}I1++});for(var L1=h1.length-1;L1>=0;L1--)xq(qh.doc,Qh,h1[L1],ev(h1[L1].line,h1[L1].ch+Qh.length))}}),Vh("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(qh,Qh,h1){qh.state.specialChars=RegExp(Qh.source+(Qh.test(" ")?"":"| "),"g"),h1!=xz&&qh.refresh()}),Vh("specialCharPlaceholder",F6e,function(qh){return qh.refresh()},!0),Vh("electricChars",!0),Vh("inputStyle",D0?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor")},!0),Vh("spellcheck",!1,function(qh,Qh){return qh.getInputField().spellcheck=Qh},!0),Vh("autocorrect",!1,function(qh,Qh){return qh.getInputField().autocorrect=Qh},!0),Vh("autocapitalize",!1,function(qh,Qh){return qh.getInputField().autocapitalize=Qh},!0),Vh("rtlMoveVisually",!pv),Vh("wholeLineUpdateBefore",!0),Vh("theme","default",function(qh){_ye(qh),wq(qh)},!0),Vh("keyMap","default",function(qh,Qh,h1){var I1=Rte(Qh),L1=h1!=xz&&Rte(h1);L1&&L1.detach&&L1.detach(qh,I1),I1.attach&&I1.attach(qh,L1||null)}),Vh("extraKeys",null),Vh("configureMouse",null),Vh("lineWrapping",!1,J6e,!0),Vh("gutters",[],function(qh,Qh){qh.display.gutterSpecs=CK(Qh,qh.options.lineNumbers),wq(qh)},!0),Vh("fixedGutter",!0,function(qh,Qh){qh.display.gutters.style.left=Qh?_K(qh.display)+"px":"0",qh.refresh()},!0),Vh("coverGutterNextToScrollbar",!1,function(qh){return bq(qh)},!0),Vh("scrollbarStyle","native",function(qh){_q(qh),bq(qh),qh.display.scrollbars.setScrollTop(qh.doc.scrollTop),qh.display.scrollbars.setScrollLeft(qh.doc.scrollLeft)},!0),Vh("lineNumbers",!1,function(qh,Qh){qh.display.gutterSpecs=CK(qh.options.gutters,Qh),wq(qh)},!0),Vh("firstLineNumber",1,wq,!0),Vh("lineNumberFormatter",function(qh){return qh},wq,!0),Vh("showCursorWhenSelecting",!1,yK,!0),Vh("resetSelectionOnContextMenu",!0),Vh("lineWiseCopyCut",!0),Vh("pasteLinesPerSelection",!0),Vh("selectionsMayTouch",!1),Vh("readOnly",!1,function(qh,Qh){Qh=="nocursor"&&(JB(qh),qh.display.input.blur()),qh.display.input.readOnlyChanged(Qh)}),Vh("screenReaderLabel",null,function(qh,Qh){Qh=Qh===""?null:Qh,qh.display.input.screenReaderLabelChanged(Qh)}),Vh("disableInput",!1,function(qh,Qh){Qh||qh.display.input.reset()},!0),Vh("dragDrop",!0,Z6e),Vh("allowDropFileTypes",null),Vh("cursorBlinkRate",530),Vh("cursorScrollMargin",0),Vh("cursorHeight",1,yK,!0),Vh("singleCursorHeightPerLine",!0,yK,!0),Vh("workTime",100),Vh("workDelay",100),Vh("flattenSpans",!0,OK,!0),Vh("addModeClass",!1,OK,!0),Vh("pollInterval",100),Vh("undoDepth",200,function(qh,Qh){return qh.doc.history.undoDepth=Qh}),Vh("historyEventDelay",1250),Vh("viewportMargin",10,function(qh){return qh.refresh()},!0),Vh("maxHighlightLength",1e4,OK,!0),Vh("moveInputWithCursor",!0,function(qh,Qh){Qh||qh.display.input.resetPosition()}),Vh("tabindex",null,function(qh,Qh){return qh.display.input.getField().tabIndex=Qh||""}),Vh("autofocus",null),Vh("direction","ltr",function(qh,Qh){return qh.doc.setDirection(Qh)},!0),Vh("phrases",null)}(_O),function(Ch){var Ih=Ch.optionHandlers,Vh=Ch.helpers={};Ch.prototype={constructor:Ch,focus:function(){tx(this).focus(),this.display.input.focus()},setOption:function(qh,Qh){var h1=this.options,I1=h1[qh];h1[qh]==Qh&&qh!="mode"||(h1[qh]=Qh,Ih.hasOwnProperty(qh)&&L5(this,Ih[qh])(this,Qh,I1),E4(this,"optionChange",this,qh))},getOption:function(qh){return this.options[qh]},getDoc:function(){return this.doc},addKeyMap:function(qh,Qh){this.state.keyMaps[Qh?"push":"unshift"](Rte(qh))},removeKeyMap:function(qh){for(var Qh=this.state.keyMaps,h1=0;h1h1&&(GK(this,L1.head.line,qh,!0),h1=L1.head.line,I1==this.doc.sel.primIndex&&pq(this));else{var W1=L1.from(),Q1=L1.to(),y0=Math.max(h1,W1.line);h1=Math.min(this.lastLine(),Q1.line-(Q1.ch?0:1))+1;for(var _0=y0;_00&&pce(this.doc,I1,new Pk(W1,iy[I1].to()),aA)}}}),getTokenAt:function(qh,Qh){return $5(this,qh,Qh)},getLineTokens:function(qh,Qh){return $5(this,ev(qh),Qh,!0)},getTokenTypeAt:function(qh){qh=CC(this.doc,qh);var Qh,h1=Dw(this,mx(this.doc,qh.line)),I1=0,L1=(h1.length-1)/2,W1=qh.ch;if(W1==0)Qh=h1[2];else for(;;){var Q1=I1+L1>>1;if((Q1?h1[2*Q1-1]:0)>=W1)L1=Q1;else{if(!(h1[2*Q1+1]W1&&(qh=W1,L1=!0),I1=mx(this.doc,qh)}else I1=qh;return uq(this,I1,{top:0,left:0},Qh||"page",h1||L1).top+(L1?this.doc.height-C9(I1):0)},defaultTextHeight:function(){return DI(this.display)},defaultCharWidth:function(){return ZB(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(qh,Qh,h1,I1,L1){var W1,Q1,y0=this.display,_0=(qh=m6(this,CC(this.doc,qh))).bottom,iy=qh.left;if(Qh.style.position="absolute",Qh.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Qh),y0.sizer.appendChild(Qh),I1=="over")_0=qh.top;else if(I1=="above"||I1=="near"){var Z0=Math.max(y0.wrapper.clientHeight,this.doc.height),Zy=Math.max(y0.sizer.clientWidth,y0.lineSpace.clientWidth);(I1=="above"||qh.bottom+Qh.offsetHeight>Z0)&&qh.top>Qh.offsetHeight?_0=qh.top-Qh.offsetHeight:qh.bottom+Qh.offsetHeight<=Z0&&(_0=qh.bottom),iy+Qh.offsetWidth>Zy&&(iy=Zy-Qh.offsetWidth)}Qh.style.top=_0+"px",Qh.style.left=Qh.style.right="",L1=="right"?(iy=y0.sizer.clientWidth-Qh.offsetWidth,Qh.style.right="0px"):(L1=="left"?iy=0:L1=="middle"&&(iy=(y0.sizer.clientWidth-Qh.offsetWidth)/2),Qh.style.left=iy+"px"),h1&&((Q1=yte(W1=this,{left:iy,top:_0,right:iy+Qh.offsetWidth,bottom:_0+Qh.offsetHeight})).scrollTop!=null&&gq(W1,Q1.scrollTop),Q1.scrollLeft!=null&&_z(W1,Q1.scrollLeft))},triggerOnKeyDown:YR(_ce),triggerOnKeyPress:YR(gye),triggerOnKeyUp:yce,triggerOnMouseDown:YR(mye),execCommand:function(qh){if(Tz.hasOwnProperty(qh))return Tz[qh].call(null,this)},triggerElectric:YR(function(qh){yye(this,qh)}),findPosH:function(qh,Qh,h1,I1){var L1=1;Qh<0&&(L1=-1,Qh=-Qh);for(var W1=CC(this.doc,qh),Q1=0;Q10&&Q1(Qh.charAt(h1-1));)--h1;for(;I1.5||this.options.lineWrapping)&&ece(this),E4(this,"refresh",this)}),swapDoc:YR(function(qh){var Qh=this.doc;return Qh.cm=null,this.state.selectingText&&this.state.selectingText(),F_e(this,qh),mK(this),this.display.input.reset(),eU(this,qh.scrollLeft,qh.scrollTop),this.curOp.forceScroll=!0,bO(this,"swapDoc",this,Qh),Qh}),phrase:function(qh){var Qh=this.options.phrases;return Qh&&Object.prototype.hasOwnProperty.call(Qh,qh)?Qh[qh]:qh},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},LL(Ch),Ch.registerHelper=function(qh,Qh,h1){Vh.hasOwnProperty(qh)||(Vh[qh]=Ch[qh]={_global:[]}),Vh[qh][Qh]=h1},Ch.registerGlobalHelper=function(qh,Qh,h1,I1){Ch.registerHelper(qh,Qh,I1),Vh[qh]._global.push({pred:h1,val:I1})}}(_O);var Tce="iter insert remove copy getEditor constructor".split(" ");for(var qK in YO.prototype)YO.prototype.hasOwnProperty(qK)&&gw(Tce,qK)<0&&(_O.prototype[qK]=function(Ch){return function(){return Ch.apply(this.doc,arguments)}}(YO.prototype[qK]));return LL(YO),_O.inputStyles={textarea:VO,contenteditable:vA},_O.defineMode=function(Ch){_O.defaults.mode||Ch=="null"||(_O.defaults.mode=Ch),YB.apply(this,arguments)},_O.defineMIME=function(Ch,Ih){o$[Ch]=Ih},_O.defineMode("null",function(){return{token:function(Ch){return Ch.skipToEnd()}}}),_O.defineMIME("text/plain","null"),_O.defineExtension=function(Ch,Ih){_O.prototype[Ch]=Ih},_O.defineDocExtension=function(Ch,Ih){YO.prototype[Ch]=Ih},_O.fromTextArea=function(Ch,Ih){if((Ih=Ih?m2(Ih):{}).value=Ch.value,!Ih.tabindex&&Ch.tabIndex&&(Ih.tabindex=Ch.tabIndex),!Ih.placeholder&&Ch.placeholder&&(Ih.placeholder=Ch.placeholder),Ih.autofocus==null){var Vh=Qw(Ch.ownerDocument);Ih.autofocus=Vh==Ch||Ch.getAttribute("autofocus")!=null&&Vh==document.body}function qh(){Ch.value=L1.getValue()}var Qh;if(Ch.form&&(Zx(Ch.form,"submit",qh),!Ih.leaveSubmitMethodAlone)){var h1=Ch.form;Qh=h1.submit;try{var I1=h1.submit=function(){qh(),h1.submit=Qh,h1.submit(),h1.submit=I1}}catch{}}Ih.finishInit=function(W1){W1.save=qh,W1.getTextArea=function(){return Ch},W1.toTextArea=function(){W1.toTextArea=isNaN,qh(),Ch.parentNode.removeChild(W1.getWrapperElement()),Ch.style.display="",Ch.form&&(DO(Ch.form,"submit",qh),Ih.leaveSubmitMethodAlone||typeof Ch.form.submit!="function"||(Ch.form.submit=Qh))}},Ch.style.display="none";var L1=_O(function(W1){return Ch.parentNode.insertBefore(W1,Ch.nextSibling)},Ih);return L1},function(Ch){Ch.off=DO,Ch.on=Zx,Ch.wheelEventPixels=_7,Ch.Doc=YO,Ch.splitLines=FN,Ch.countColumn=qA,Ch.findColumn=ZC,Ch.isWordChar=Bv,Ch.Pass=RC,Ch.signal=E4,Ch.Line=rq,Ch.changeEnd=nU,Ch.scrollbarModel=SK,Ch.Pos=ev,Ch.cmpPos=T2,Ch.modes=qB,Ch.mimeModes=o$,Ch.resolveMode=eR,Ch.getMode=s$,Ch.modeExtensions=c7,Ch.extendMode=pz,Ch.copyState=PL,Ch.startState=l7,Ch.innerMode=OI,Ch.commands=Tz,Ch.keyMap=N9,Ch.keyName=Sz,Ch.isModifierKey=hye,Ch.lookupKey=kq,Ch.normalizeKeyMap=Q6e,Ch.StringStream=x4,Ch.SharedTextMarker=LK,Ch.TextMarker=iU,Ch.LineWidget=$K,Ch.e_preventDefault=HO,Ch.e_stopPropagation=AI,Ch.e_stop=PN,Ch.addClass=$w,Ch.contains=Q2,Ch.rmClass=Q0,Ch.keyNames=b6}(_O),_O.version="5.65.9",_O},(window||self).CodeMirror=e$c(),function(ch){function oh(t1,i1){if(this.cm=t1,this.options=i1,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n1=this;t1.on("cursorActivity",this.activityFunc=function(){n1.cursorActivity()})}}ch.showHint=function(t1,i1,n1){if(!i1)return t1.showHint(n1);n1&&n1.async&&(i1.async=!0);var p1={hint:i1};if(n1)for(var _1 in n1)p1[_1]=n1[_1];return t1.showHint(p1)},ch.defineExtension("showHint",function(t1){t1=function(_1,x1,V1){var i0=_1.options.hintOptions,r0={};for(var D0 in jh)r0[D0]=jh[D0];if(i0)for(var D0 in i0)i0[D0]!==void 0&&(r0[D0]=i0[D0]);if(V1)for(var D0 in V1)V1[D0]!==void 0&&(r0[D0]=V1[D0]);return r0.hint.resolve&&(r0.hint=r0.hint.resolve(_1,x1)),r0}(this,this.getCursor("start"),t1);var i1=this.listSelections();if(!(i1.length>1)){if(this.somethingSelected()){if(!t1.hint.supportsSelection)return;for(var n1=0;n1V1.clientHeight+1;if(setTimeout(function(){$w=p1.getScrollInfo()}),px.bottom-Qw>0){var Mw=px.bottom-px.top,tx=px.top-(ov.bottom-ov.top)-2;Qw-px.toptx&&(V1.style.height=(Mw=tx)+"px"),V1.style.top=(Z1=ov.top-Mw)+R0+"px",e0=!1):V1.style.height=Qw-px.top-2+"px"}var Px,m2=px.right-Q2;if(y3&&(m2+=p1.display.nativeBarWidth),m2>0&&(px.right-px.left>Q2&&(V1.style.width=Q2-5+"px",m2-=px.right-px.left-Q2),V1.style.left=(S0=Math.max(ov.left-m2-Q0,0))+"px"),y3)for(var qA=V1.firstChild;qA;qA=qA.nextSibling)qA.style.paddingRight=p1.display.nativeBarWidth+"px";p1.addKeyMap(this.keyMap=function(gw,RC){var aA={Up:function(){RC.moveFocus(-1)},Down:function(){RC.moveFocus(1)},PageUp:function(){RC.moveFocus(1-RC.menuSize(),!0)},PageDown:function(){RC.moveFocus(RC.menuSize()-1,!0)},Home:function(){RC.setFocus(0)},End:function(){RC.setFocus(RC.length-1)},Enter:RC.pick,Tab:RC.pick,Esc:RC.close};/Mac/.test(navigator.platform)&&(aA["Ctrl-P"]=function(){RC.moveFocus(-1)},aA["Ctrl-N"]=function(){RC.moveFocus(1)});var $k=gw.options.customKeys,l4=$k?{}:aA;function ZC(yw,eC){var oA;oA=typeof eC!="string"?function(Qy){return eC(Qy,RC)}:aA.hasOwnProperty(eC)?aA[eC]:eC,l4[yw]=oA}if($k)for(var nk in $k)$k.hasOwnProperty(nk)&&ZC(nk,$k[nk]);var gx=gw.options.extraKeys;if(gx)for(var nk in gx)gx.hasOwnProperty(nk)&&ZC(nk,gx[nk]);return l4}(t1,{moveFocus:function(gw,RC){n1.changeActive(n1.selectedHint+gw,RC)},setFocus:function(gw){n1.changeActive(gw)},menuSize:function(){return n1.screenAmount()},length:r0.length,close:function(){t1.close()},pick:function(){n1.pick()},data:i1})),t1.options.closeOnUnfocus&&(p1.on("blur",this.onBlur=function(){Px=setTimeout(function(){t1.close()},100)}),p1.on("focus",this.onFocus=function(){clearTimeout(Px)})),p1.on("scroll",this.onScroll=function(){var gw=p1.getScrollInfo(),RC=p1.getWrapperElement().getBoundingClientRect();$w||($w=p1.getScrollInfo());var aA=Z1+$w.top-gw.top,$k=aA-(x1.pageYOffset||(_1.documentElement||_1.body).scrollTop);if(e0||($k+=V1.offsetHeight),$k<=RC.top||$k>=RC.bottom)return t1.close();V1.style.top=aA+"px",V1.style.left=S0+$w.left-gw.left+"px"}),ch.on(V1,"dblclick",function(gw){var RC=Ah(V1,gw.target||gw.srcElement);RC&&RC.hintId!=null&&(n1.changeActive(RC.hintId),n1.pick())}),ch.on(V1,"click",function(gw){var RC=Ah(V1,gw.target||gw.srcElement);RC&&RC.hintId!=null&&(n1.changeActive(RC.hintId),t1.options.completeOnSingleClick&&n1.pick())}),ch.on(V1,"mousedown",function(){setTimeout(function(){p1.focus()},20)});var pw=this.getSelectedHintRange();return pw.from===0&&pw.to===0||this.scrollToActive(),ch.signal(i1,"select",r0[this.selectedHint],V1.childNodes[this.selectedHint]),!0}function Dh(t1,i1,n1,p1){if(t1.async)t1(i1,p1,n1);else{var _1=t1(i1,n1);_1&&_1.then?_1.then(p1):p1(_1)}}oh.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&ch.signal(this.data,"close"),this.widget&&this.widget.close(),ch.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t1,i1){var n1=t1.list[i1],p1=this;this.cm.operation(function(){n1.hint?n1.hint(p1.cm,t1,n1):p1.cm.replaceRange(Eh(n1),n1.from||t1.from,n1.to||t1.to,"complete"),ch.signal(t1,"pick",n1),p1.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(mh(this.debounce),this.debounce=0);var t1=this.startPos;this.data&&(t1=this.data.from);var i1=this.cm.getCursor(),n1=this.cm.getLine(i1.line);if(i1.line!=this.startPos.line||n1.length-i1.ch!=this.startLen-this.startPos.ch||i1.ch=this.data.list.length?t1=i1?this.data.list.length-1:0:t1<0&&(t1=i1?0:this.data.list.length-1),this.selectedHint!=t1){var n1=this.hints.childNodes[this.selectedHint];n1&&(n1.className=n1.className.replace(" CodeMirror-hint-active",""),n1.removeAttribute("aria-selected")),(n1=this.hints.childNodes[this.selectedHint=t1]).className+=" CodeMirror-hint-active",n1.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",n1.id),this.scrollToActive(),ch.signal(this.data,"select",this.data.list[this.selectedHint],n1)}},scrollToActive:function(){var t1=this.getSelectedHintRange(),i1=this.hints.childNodes[t1.from],n1=this.hints.childNodes[t1.to],p1=this.hints.firstChild;i1.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n1.offsetTop+n1.offsetHeight-this.hints.clientHeight+p1.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t1=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t1),to:Math.min(this.data.list.length-1,this.selectedHint+t1)}}},ch.registerHelper("hint","auto",{resolve:function(t1,i1){var n1,p1=t1.getHelpers(i1,"hint");if(p1.length){var _1=function(x1,V1,i0){var r0=function(D0,J0){if(!D0.somethingSelected())return J0;for(var Iy=[],pv=0;pv0?V1(Iy):D0(J0+1)})})(0)};return _1.async=!0,_1.supportsSelection=!0,_1}return(n1=t1.getHelper(t1.getCursor(),"hintWords"))?function(x1){return ch.hint.fromList(x1,{words:n1})}:ch.hint.anyword?function(x1,V1){return ch.hint.anyword(x1,V1)}:function(){}}}),ch.registerHelper("hint","fromList",function(t1,i1){var n1,p1=t1.getCursor(),_1=t1.getTokenAt(p1),x1=ch.Pos(p1.line,_1.start),V1=p1;_1.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};ch.defineOption("hintOptions",null)}(CodeMirror),function(ch){function oh(Eh,Ah,$h,Dh){if($h&&$h.call){var jh=$h;$h=null}else jh=mh(Eh,$h,"rangeFinder");typeof Ah=="number"&&(Ah=ch.Pos(Ah,0));var t1=mh(Eh,$h,"minFoldSize");function i1(x1){var V1=jh(Eh,Ah);if(!V1||V1.to.line-V1.from.lineEh.firstLine();)Ah=ch.Pos(Ah.line-1,0),n1=i1(!1);if(n1&&!n1.cleared&&Dh!=="unfold"){var p1=function(x1,V1,i0){var r0=mh(x1,V1,"widget");if(typeof r0=="function"&&(r0=r0(i0.from,i0.to)),typeof r0=="string"){var D0=document.createTextNode(r0);(r0=document.createElement("span")).appendChild(D0),r0.className="CodeMirror-foldmarker"}else r0&&(r0=r0.cloneNode(!0));return r0}(Eh,$h,n1);ch.on(p1,"mousedown",function(x1){_1.clear(),ch.e_preventDefault(x1)});var _1=Eh.markText(n1.from,n1.to,{replacedWith:p1,clearOnEnter:mh(Eh,$h,"clearOnEnter"),__isFold:!0});_1.on("clear",function(x1,V1){ch.signal(Eh,"unfold",Eh,x1,V1)}),ch.signal(Eh,"fold",Eh,n1.from,n1.to)}}ch.newFoldFunction=function(Eh,Ah){return function($h,Dh){oh($h,Dh,{rangeFinder:Eh,widget:Ah})}},ch.defineExtension("foldCode",function(Eh,Ah,$h){oh(this,Eh,Ah,$h)}),ch.defineExtension("isFolded",function(Eh){for(var Ah=this.findMarksAt(Eh),$h=0;$h=0;p1--){var _1=i1[p1].from(),x1=i1[p1].to();_1.line>=t1||(x1.line>=t1&&(x1=mh(t1,0)),t1=_1.line,n1==null?jh.uncomment(_1,x1,Dh)?n1="un":(jh.lineComment(_1,x1,Dh),n1="line"):n1=="un"?jh.uncomment(_1,x1,Dh):jh.lineComment(_1,x1,Dh))}}),ch.defineExtension("lineComment",function(Dh,jh,t1){t1||(t1=oh);var i1=this,n1=$h(i1,Dh),p1=i1.getLine(Dh.line);if(p1!=null&&(_1=Dh,x1=p1,!/\bstring\b/.test(i1.getTokenTypeAt(mh(_1.line,0)))||/^[\'\"\`]/.test(x1))){var _1,x1,V1=t1.lineComment||n1.lineComment;if(V1){var i0=Math.min(jh.ch!=0||jh.line==Dh.line?jh.line+1:jh.line,i1.lastLine()+1),r0=t1.padding==null?" ":t1.padding,D0=t1.commentBlankLines||Dh.line==jh.line;i1.operation(function(){if(t1.indent){for(var J0=null,Iy=Dh.line;Iypv.length)&&(J0=pv)}for(Iy=Dh.line;Iyx1||i1.operation(function(){if(t1.fullLines!=0){var i0=hh.test(i1.getLine(x1));i1.replaceRange(V1+_1,mh(x1)),i1.replaceRange(p1+V1,mh(Dh.line,0));var r0=t1.blockCommentLead||n1.blockCommentLead;if(r0!=null)for(var D0=Dh.line+1;D0<=x1;++D0)(D0!=x1||i0)&&i1.replaceRange(r0+V1,mh(D0,0))}else{var J0=Eh(i1.getCursor("to"),jh)==0,Iy=!i1.somethingSelected();i1.replaceRange(_1,jh),J0&&i1.setSelection(Iy?jh:i1.getCursor("from"),jh),i1.replaceRange(p1,Dh)}})}}else(t1.lineComment||n1.lineComment)&&t1.fullLines!=0&&i1.lineComment(Dh,jh,t1)}),ch.defineExtension("uncomment",function(Dh,jh,t1){t1||(t1=oh);var i1,n1=this,p1=$h(n1,Dh),_1=Math.min(jh.ch!=0||jh.line==Dh.line?jh.line:jh.line-1,n1.lastLine()),x1=Math.min(Dh.line,_1),V1=t1.lineComment||p1.lineComment,i0=[],r0=t1.padding==null?" ":t1.padding;e:if(V1){for(var D0=x1;D0<=_1;++D0){var J0=n1.getLine(D0),Iy=J0.indexOf(V1);if(Iy>-1&&!/comment/.test(n1.getTokenTypeAt(mh(D0,Iy+1)))&&(Iy=-1),Iy==-1&&hh.test(J0)||Iy>-1&&hh.test(J0.slice(0,Iy)))break e;i0.push(J0)}if(n1.operation(function(){for(var Qw=x1;Qw<=_1;++Qw){var $w=i0[Qw-x1],px=$w.indexOf(V1),y3=px+V1.length;px<0||($w.slice(y3,y3+r0.length)==r0&&(y3+=r0.length),i1=!0,n1.replaceRange("",mh(Qw,px),mh(Qw,y3)))}}),i1)return!0}var pv=t1.blockCommentStart||p1.blockCommentStart,Sy=t1.blockCommentEnd||p1.blockCommentEnd;if(!pv||!Sy)return!1;var ov=t1.blockCommentLead||p1.blockCommentLead,S0=n1.getLine(x1),Z1=S0.indexOf(pv);if(Z1==-1)return!1;var e0=_1==x1?S0:n1.getLine(_1),Q0=e0.indexOf(Sy,_1==x1?Z1+pv.length:0),R0=mh(x1,Z1+1),V0=mh(_1,Q0+1);if(Q0==-1||!/comment/.test(n1.getTokenTypeAt(R0))||!/comment/.test(n1.getTokenTypeAt(V0))||n1.getRange(R0,V0,` +`).indexOf(Sy)>-1)return!1;var ny=S0.lastIndexOf(pv,Dh.ch),Zv=ny==-1?-1:S0.slice(0,Dh.ch).indexOf(Sy,ny+pv.length);if(ny!=-1&&Zv!=-1&&Zv+Sy.length!=Dh.ch)return!1;Zv=e0.indexOf(Sy,jh.ch);var Q2=e0.slice(jh.ch).lastIndexOf(pv,Zv-jh.ch);return ny=Zv==-1||Q2==-1?-1:jh.ch+Q2,(Zv==-1||ny==-1||ny==jh.ch)&&(n1.operation(function(){n1.replaceRange("",mh(_1,Q0-(r0&&e0.slice(Q0-r0.length,Q0)==r0?r0.length:0)),mh(_1,Q0+Sy.length));var Qw=Z1+pv.length;if(r0&&S0.slice(Qw,Qw+r0.length)==r0&&(Qw+=r0.length),n1.replaceRange("",mh(x1,Z1),mh(x1,Qw)),ov)for(var $w=x1+1;$w<=_1;++$w){var px=n1.getLine($w),y3=px.indexOf(ov);if(y3!=-1&&!hh.test(px.slice(0,y3))){var Mw=y3+ov.length;r0&&px.slice(Mw,Mw+r0.length)==r0&&(Mw+=r0.length),n1.replaceRange("",mh($w,y3),mh($w,Mw))}}}),!0)})}(CodeMirror),r$f.prototype.start=function(ch){return this.stream=ch,this.line=0,this.string=ch.string.slice(ch.start),this.startLine=ch.string,this.startPos=ch.start,this},r$f.prototype.startLinebreak=function(){return this.stream=null,this.line=this.startPos=0,this.string=` +`,this.startLine="",this},r$f.prototype.copy=function(){var ch=this.copyInstance||(this.copyInstance=new r$f);return ch.stream=this.stream,ch.startPos=this.startPos,ch.line=this.line,ch.startLine=this.startLine,ch.string=this.string,ch},r$f.prototype.updateStart=function(){this.startLine=this.stream?this.line==0?this.stream.string:this.stream.lookAhead(this.line):"",this.startPos=this.startLine.length-(this.string.length-1)},r$f.prototype.ahead=function(ch){for(;;){if(ch<=this.string.length)return!0;if(this.string.charCodeAt(this.string.length-1)!==10)this.string+=` +`;else{if(this.line===3||!this.stream||!this.stream.lookAhead)return!1;var oh=this.stream.lookAhead(this.line+1);if(oh==null)return!1;this.string+=oh+` +`,this.line++}}};var n$f=null;function i$c(ch,oh){this.State=function(hh,mh){function Eh($h,Dh){this.stack=$h,this.context=Dh}function Ah(){return null}return Eh.prototype.matchNext=function($h,Dh,jh,t1){for(var i1=this.stack.length-1,n1=this.stack[i1],p1=hh.nodes[n1],_1=0;_1Dh&&(n$f=Sy)}else x1=this.matchExpr(i0,$h,Dh),V1=p1[++_1]}if(x1<0){if(!(jh>0&&_1==p1.length-1))continue;jh--,x1=Dh}if(this.go(V1),!t1&&V1===-1||this.stack.length===0||x1>Dh||(x1=this.matchNext($h,Dh,_1==p1.length-1?jh:0,t1))>=0)return x1;this.stack.length=i1+1,this.stack[i1]=n1}return-1},Eh.prototype.go=function($h){for(this.stack.pop();this.context&&this.context.depth>this.stack.length;)this.context=this.context.parent;$h!==-1&&this.stack.push($h)},Eh.prototype.runMaybe=function($h,Dh,jh){return n$f=null,this.matchNext($h,Dh,jh,!0)},Eh.prototype.forward=function($h,Dh){var jh=this.runMaybe($h,Dh,2);return jh<0&&(this.stack.push(hh.token),jh=this.runMaybe($h,Dh,0)),jh},Eh.prototype.lookahead=function($h,Dh,jh){var t1=n$f,i1=new this.constructor([jh],null);for($h=$h.copy();;){$h.updateStart();var n1=i1.runMaybe($h,Dh,0);if(n1<0)return n$f=t1,!1;if(i1.stack.length===0)return n$f=t1,!0;Dh=n1}},Eh.prototype.matchExpr=function($h,Dh,jh){if(typeof $h=="string"){var t1=jh+$h.length;return Dh.ahead(t1)&&Dh.string.slice(jh,t1)===$h?t1:-1}if($h.exec){var i1=Dh.ahead(jh+1)&&$h.exec(jh>0?Dh.string.slice(jh):Dh.string);return i1?jh+i1[0].length:-1}var n1,p1=$h[0];if(p1===0){for(var _1=1;_1<$h.length;_1++)if((jh=this.matchExpr($h[_1],Dh,jh))<0)return-1;return jh}if(p1===1){_1=1;for(var x1=$h.length-1;;_1++){var V1=this.matchExpr($h[_1],Dh,jh);if(_1===x1||V1>-1)return V1}return-1}if(p1!==2&&p1!==3){if(p1===4)return Math.max(this.matchExpr($h[1],Dh,jh),jh);if(p1===5)return this.lookahead(Dh,jh,$h[1])?jh:-1;if(p1===6)return this.lookahead(Dh,jh,$h[1])?-1:jh;if(p1===7){var i0,r0,D0=jh?Dh.string.lastIndexOf(` +`,jh-1):-1;if(Dh.stream&&D0<0)i0=Dh.stream.string,r0=jh+Dh.stream.start;else{var J0=Dh.string.indexOf(` +`,jh);i0=Dh.string.slice(D0+1,J0<0?Dh.string.length:J0),r0=jh-(D0+1)}return mh.predicates[$h[1]](i0,r0,this.context,Dh.stream?(n1=Dh.stream,function(pv){return n1.lookAhead(pv)}):Ah)?jh:-1}throw Error("Unknown match type "+$h)}if(p1===3&&(jh=this.matchExpr($h[1],Dh,jh))<0)return-1;for(;;){var Iy=this.matchExpr($h[1],Dh,jh);if(Iy==-1)return jh;jh=Iy}},Eh.prototype.contextAt=function($h,Dh){var jh=this.copy(),t1=new r$f,i1=0,n1=this.context;for(t1.string=$h+` +`,t1.startLine=$h;;){var p1=jh.runMaybe(t1,i1,0);if(p1==-1)return jh.context;if(p1>Dh){var _1=jh.context;if(i1==Dh)e:for(;_1;){for(var x1=n1;x1;x1=x1.parent)if(x1===_1)break e;_1=_1.parent}return _1}i1=p1,n1=jh.context}},Eh.prototype.copy=function(){return new this.constructor(this.stack.slice(),this.context)},Eh.start=function(){return new this([hh.start],null)},Eh}(ch,oh||{}),this.mcx=new r$f}CodeMirror.GrammarMode=i$c,i$c.prototype.startState=function(){return this.State.start()},i$c.prototype.copyState=function(ch){return ch.copy()},i$c.prototype.token=function(ch,oh){ch.pos+=oh.forward(this.mcx.start(ch),0);for(var hh=n$f,mh=oh.context;mh;mh=mh.parent)mh.tokenType&&(hh=mh.tokenType+(hh?" "+hh:""));return ch.eol()&&oh.forward(this.mcx,ch.pos-ch.start),hh},i$c.prototype.blankLine=function(ch){ch.forward(this.mcx.startLinebreak(),0)},function(ch,oh){(function(hh){function mh(Z1){if(Z1&&Z1.__esModule)return Z1;var e0=Object.create(null);return Z1&&Object.keys(Z1).forEach(function(Q0){if(Q0!=="default"){var R0=Object.getOwnPropertyDescriptor(Z1,Q0);Object.defineProperty(e0,Q0,R0.get?R0:{enumerable:!0,get:function(){return Z1[Q0]}})}}),e0.default=Z1,Object.freeze(e0)}var Eh=mh(hh),Ah=[/^(?:var|let|const)(?![a-zA-Z¡-￿_0-9_\$])/,/^while(?![a-zA-Z¡-￿_0-9_\$])/,/^with(?![a-zA-Z¡-￿_0-9_\$])/,/^do(?![a-zA-Z¡-￿_0-9_\$])/,/^debugger(?![a-zA-Z¡-￿_0-9_\$])/,/^if(?![a-zA-Z¡-￿_0-9_\$])/,/^function(?![a-zA-Z¡-￿_0-9_\$])/,/^for(?![a-zA-Z¡-￿_0-9_\$])/,/^default(?![a-zA-Z¡-￿_0-9_\$])/,/^case(?![a-zA-Z¡-￿_0-9_\$])/,/^return(?![a-zA-Z¡-￿_0-9_\$])/,/^throw(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:break|continue)(?![a-zA-Z¡-￿_0-9_\$])/,/^switch(?![a-zA-Z¡-￿_0-9_\$])/,/^try(?![a-zA-Z¡-￿_0-9_\$])/,/^class(?![a-zA-Z¡-￿_0-9_\$])/,/^export(?![a-zA-Z¡-￿_0-9_\$])/,/^import(?![a-zA-Z¡-￿_0-9_\$])/,[0,"async",/^(?![a-zA-Z¡-￿_0-9_\$])/,[5,114]],[1,";",/^(?=\})/,[7,"canInsertSemi"]],/^[a-zA-Z¡-￿__\$][a-zA-Z¡-￿_0-9_\$]*/,/^extends(?![a-zA-Z¡-￿_0-9_\$])/,/^from(?![a-zA-Z¡-￿_0-9_\$])/,/^else(?![a-zA-Z¡-￿_0-9_\$])/,/^catch(?![a-zA-Z¡-￿_0-9_\$])/,/^finally(?![a-zA-Z¡-￿_0-9_\$])/,/^as(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:true|false|null|undefined|NaN|Infinity)(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:super|this)(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:delete|typeof|yield|await|void)(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:\.\.\.|\!|\+\+?|\-\-?)/,/^(?:0x[0-9a-fA-F_]+|0o[0-7_]+|0b[01_]+|(?:[0-9][0-9_]*(?:\.[0-9_]*)?|\.[0-9_]+)(?:[eE][\+\-]?[0-9_]+)?)/,/^\/(?![\/\*])(?:\\.|\[(?:(?!\]).)*\]|(?!\/).)+\/[gimyus]*/,/^(?:\+\+|\-\-)/,/^(?:(?:\+|\-|\%|\*|\/(?![\/\*])|\>\>?\>?|\<\",-1],[2,258,364,{name:"ParamList"}],[1,6,365],["=>",-1],[3,"operator","=>",367],[1,6,368],[2,129,-1,{name:"Block"},1,142,-1],[1,142,370,0,-1],[1,6,371],[",",372,0,-1],[1,6,373],[1,142,374,0,374],[1,6,371],[2,274,376,{name:"ObjectMember"},0,-1],[1,6,377],[",",378,0,-1],[1,6,379],[2,274,380,{name:"ObjectMember"},0,380],[1,6,377],[1,139,382],[1,6,383],[3,"operator","=",384,0,-1],[1,6,385],[1,142,-1],[3,"def",/^[a-zA-Z¡-￿__\$][a-zA-Z¡-￿_0-9_\$]*(?![a-z]|[A-Z]|[¡-￿]|_|[0-9]|_|\$| *\:)/,387,3,"property",Ah[20],391,3,"number",Ah[31],391,2,116,391,{name:"string",token:"string"},3,"operator","...",395],[1,6,388],[3,"operator","=",389,0,-1],[1,6,390],[1,142,-1],[1,6,392],[":",393],[1,6,394],[1,381,-1],[1,6,396],[1,381,-1]],start:0,token:5}),Dh=/(^|\s)variable($|\s)/;function jh(Z1){var e0=/^(if|for|do|while|try)\b/.exec(Z1.startLine.slice(Z1.startPos));return e0&&e0[1]}var t1={Block:"}",BlockOf:"}",ClassBody:"}",AnnotationTypeBody:"}",ObjectLiteral:"}",ObjectPattern:"}",EnumBody:"}",LambdaBlock:"}",WhenBody:"}",ObjType:"}",ArrayInitializer:"}",NamespaceBlock:"}",BraceTokens:"}",ArrayLiteral:"]",BracketTokens:"]",TupleType:"]",ParamList:")",SimpleParamList:")",ArgList:")",ParenExpr:")",CondExpr:")",ForSpec:")",ParenTokens:")",ParenthesizedExpression:")",ConstructorParamList:")",TypeParams:">",TypeArgs:">",TemplateArgs:">",TemplateParams:">"},i1=["Block","NamespaceBlock","ClassBody","AnnotationTypeBody","BlockOf","EnumBody"],n1=["Statement","ObjectMember","ClassItem","EnumConstant","AnnotationTypeItem","ArgExpr","StatementMaybeOf","NewExpr"];function p1(Z1,e0){for(var Q0=Z1.startLine;;Z1=Z1.parent){if(Z1.name=="CondExpr")return Eh.countColumn(Z1.startLine,Z1.startPos+1,e0.tabSize);if(n1.indexOf(Z1.name)>-1&&/(^\s*|[\(\{\[])$/.test(Z1.startLine.slice(0,Z1.startPos)))return Eh.countColumn(Z1.startLine,Z1.startPos,e0.tabSize);if(!Z1.parent||Z1.parent.startLine!=Q0)return Eh.countColumn(Z1.startLine,null,e0.tabSize)}}function _1(Z1,e0,Q0){if(!Z1)return 0;if(Z1.name=="string"||Z1.name=="comment")return Eh.Pass;var R0,V0,ny=t1[Z1.name],Zv=e0&&e0.charAt(0)==ny;if(ny&&Q0.align!==!1&&(!Q0.dontAlign||Q0.dontAlign.indexOf(Z1.name)<0)&&function(px){return!/^\s*((\/\/.*)?$|.*=>)/.test(px.startLine.slice(px.startPos+1))}(Z1))return Eh.countColumn(Z1.startLine,Z1.startPos,Q0.tabSize)+(Zv?0:1);if(ny&&i1.indexOf(Z1.name)>-1){var Q2=Z1.parent;Q2&&Q2.name=="Statement"&&Q2.parent&&Q2.parent.name=="Statement"&&jh(Q2.parent)&&!jh(Q2)&&(Q2=Q2.parent);var Qw=x1(Q2,Q0);return Zv||Z1.name=="NamespaceBlock"?Qw:/^(public|private|protected)\s*:/.test(e0)?Qw+1:!(V0=Z1.parent)||V0.name!="Statement"||!/^switch\b/.test(V0.startLine.slice(V0.startPos))||(R0=e0)&&/^\s*(case|default)\b/.test(R0)?Qw+Q0.indentUnit:Qw+2*Q0.indentUnit}var $w=p1(Z1,Q0);return ny?Zv&&(Q0.dontCloseBrackets||"").indexOf(ny)<0?$w:$w+Q0.indentUnit*((Q0.doubleIndentBrackets||"").indexOf(ny)<0?1:2):n1.indexOf(Z1.name)>-1?jh(Z1)?$w+Q0.indentUnit:$w+2*Q0.indentUnit:Z1.name=="Alternative"||Z1.name=="CatchFinally"?($w=p1(Z1.parent,Q0),!e0||/^((else|catch|finally)\b|\/[\/\*])/.test(e0)?$w:$w+Q0.indentUnit):Z1.name=="ArrowRest"?$w+Q0.indentUnit:Z1.name=="NewExpression"&&Z1.startLine.length>Z1.startPos+5?Eh.countColumn(Z1.startLine,Z1.startPos,Q0.tabSize)+2*Q0.indentUnit:Z1.name=="InitializerList"?$w+2:Z1.name!="ThrowsClause"||/throws\s*$/.test(Z1.startLine.slice(Z1.startPos))?_1(Z1.parent,e0,Q0):$w+2*Q0.indentUnit}function x1(Z1,e0){for(;;Z1=Z1.parent){if(!Z1)return 0;if(n1.indexOf(Z1.name)>-1||Z1.parent&&t1[Z1.parent.name])return Eh.countColumn(Z1.startLine,null,e0.tabSize)}}function V1(Z1,e0,Q0,R0){var V0=Z1.context&&Z1.context.name;if(V0=="DeclType"||V0=="BeforeStatement"||V0=="AnnotationHead"||V0=="Template"||V0=="str")return x1(Z1.context,R0);if((V0=="doccomment.braced"||V0=="doccomment.tagGroup")&&!/^[@*]/.test(e0))return Eh.countColumn(Z1.context.startLine,null,R0.tabSize)+2*R0.indentUnit;var ny=R0.forceContent&&/^\s*(\/\/.*)?$/.test(Q0)?"x":Q0;return _1(Z1.contextAt(ny,Q0.length-e0.length),e0,R0)}function i0(Z1,e0){for(var Q0=e0-1;Q0>=0;Q0--){var R0=Z1.charCodeAt(Q0);if(R0===10)break;if(R0!==32&&R0!==9)return!1}return!0}var r0=function(Z1){this.config=Z1};r0.prototype.startState=function(){return new D0},r0.prototype.copyState=function(Z1){return Z1.copy()},r0.prototype.shouldInterceptTokenizing=function(Z1){var e0=Z1.currentTemplateState;return e0!==void 0&&e0.mode!==null},r0.prototype.interceptTokenizing=function(Z1,e0){if(Z1.match("${")&&(Z1.backUp(2),!this.isEscaped(Z1,Z1.pos-2)))return{handled:!1};if(Z1.peek()==="`"&&!this.isEscaped(Z1,Z1.pos))return{handled:!1};var Q0=e0.currentTemplateState,R0=Q0.mode,V0=Q0.state,ny=R0.token(Z1,V0);return this.backupIfEmbeddedTokenizerOvershot(Z1),{handled:!0,style:ny}},r0.prototype.trackState=function(Z1,e0,Q0){if(Z1){var R0=Q0.currentTemplateState;R0&&R0.kind!=="inline-expression"?this.trackStateInTemplate(Z1,e0,Q0,R0):this.trackStateNotInTemplate(Z1,e0,Q0,R0),Q0.previousVariable=Z1==="variable"?e0.current():null}},r0.prototype.trackStateNotInTemplate=function(Z1,e0,Q0,R0){if(R0&&Z1==="string-2"&&e0.current().startsWith("}"))return Q0.templateStack.pop(),void e0.backUp(e0.current().length-1);if(Z1==="string-2"&&e0.current().startsWith("`")){var V0=this.getModeForTemplateTag(Q0.previousVariable),ny="template";V0?(e0.backUp(e0.current().length-1),Q0.templateStack.push(new Iy(ny,V0,CodeMirror.startState(V0)))):Q0.templateStack.push(new Iy(ny,null,null))}},r0.prototype.trackStateInTemplate=function(Z1,e0,Q0,R0){Z1!=="string-2"||!e0.current().endsWith("`")||this.isEscaped(e0.pos-1)?Z1!=="string-2"||!e0.current().endsWith("${")||this.isEscaped(e0.pos-2)||Q0.templateStack.push(new Iy("inline-expression",null,null)):Q0.templateStack.pop()},r0.prototype.backupIfEmbeddedTokenizerOvershot=function(Z1){for(var e0=Z1.current(),Q0=0;;){var R0=e0.slice(Q0).search(/`|\$\{/);if(R0===-1)return;R0+=Q0;var V0=e0.length-R0,ny=Z1.pos-V0;if(!this.isEscaped(Z1,ny))return void Z1.backUp(e0.length-R0);Q0=R0+1}},r0.prototype.isEscaped=function(Z1,e0){for(var Q0=!1,R0=e0;R0>0&&Z1.string[R0-1]==="\\";)Q0=!Q0,R0--;return Q0},r0.prototype.getModeForTemplateTag=function(Z1){if(!Z1)return null;Z1==="htm"&&(Z1="html");for(var e0=["google-"+Z1,""+Z1],Q0=0;Q0)",dontCloseBrackets:")",tabSize:Q0.tabSize,indentUnit:Q0.indentUnit,forceContent:!0}}return Z1&&(e0.__proto__=Z1),e0.prototype=Object.create(Z1&&Z1.prototype),e0.prototype.constructor=e0,e0.prototype.startState=function(){var Q0=Z1.prototype.startState.call(this);return Q0.embeddedParserState=this.embeddedParser.startState(),Q0},e0.prototype.copyState=function(Q0){var R0=Z1.prototype.copyState.call(this,Q0);return R0.embeddedParserState=this.embeddedParser.copyState(Q0.embeddedParserState),R0},e0.prototype.token=function(Q0,R0){var V0=R0.embeddedParserState;if(this.embeddedParser.shouldInterceptTokenizing(V0)){var ny=this.embeddedParser.interceptTokenizing(Q0,V0),Zv=ny.handled,Q2=ny.style;if(Zv)return Q2}var Qw=Z1.prototype.token.call(this,Q0,R0);return this.embeddedParser.trackState(Qw,Q0,V0),function($w,px,y3,Mw){if($w=="def"){var tx=function(m2,qA){for(var pw=m2;pw;pw=pw.parent)if(qA.indexOf(pw.name)>-1)return pw}(Mw.context,px),Px=y3.current();if(tx&&(tx.locals||(tx.locals=[]),tx.locals.indexOf(Px)==-1&&tx.locals.push(Px),Mw.context.name!="funcName"))return"def local"}else Dh.test($w)&&!/qualified/.test($w)&&function(m2,qA){for(var pw=m2;pw;pw=pw.parent)if(pw.locals&&pw.locals.indexOf(qA)>-1)return!0;return!1}(Mw.context,y3.current())&&($w=$w.replace(Dh,"$1variable-2$2"));return $w}(Qw,pv,Q0,R0)},e0.prototype.indent=function(Q0,R0,V0){return R0||(R0=V0="x"),V1(Q0,R0,V0,this.indentConf)},e0}(Eh.GrammarMode),ov={electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``"};for(var S0 in ov)Sy.prototype[S0]=ov[S0];Eh.registerHelper("wordChars","google-javascript",/[\w$]/),Eh.defineMode("google-javascript",function(Z1,e0){return new Sy(Z1,e0)})})((ch=typeof globalThis<"u"?globalThis:ch||self).CodeMirror)}(window),function(ch,oh){(function(hh){function mh(Z1){if(Z1&&Z1.__esModule)return Z1;var e0=Object.create(null);return Z1&&Object.keys(Z1).forEach(function(Q0){if(Q0!=="default"){var R0=Object.getOwnPropertyDescriptor(Z1,Q0);Object.defineProperty(e0,Q0,R0.get?R0:{enumerable:!0,get:function(){return Z1[Q0]}})}}),e0.default=Z1,Object.freeze(e0)}var Eh=mh(hh),Ah=[/^(?:var|let|const)(?![a-zA-Z¡-￿_0-9_\$])/,/^while(?![a-zA-Z¡-￿_0-9_\$])/,/^with(?![a-zA-Z¡-￿_0-9_\$])/,/^do(?![a-zA-Z¡-￿_0-9_\$])/,/^debugger(?![a-zA-Z¡-￿_0-9_\$])/,/^if(?![a-zA-Z¡-￿_0-9_\$])/,/^function(?![a-zA-Z¡-￿_0-9_\$])/,/^for(?![a-zA-Z¡-￿_0-9_\$])/,/^default(?![a-zA-Z¡-￿_0-9_\$])/,/^case(?![a-zA-Z¡-￿_0-9_\$])/,/^return(?![a-zA-Z¡-￿_0-9_\$])/,/^throw(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:break|continue)(?![a-zA-Z¡-￿_0-9_\$])/,/^switch(?![a-zA-Z¡-￿_0-9_\$])/,/^try(?![a-zA-Z¡-￿_0-9_\$])/,/^class(?![a-zA-Z¡-￿_0-9_\$])/,/^export(?![a-zA-Z¡-￿_0-9_\$])/,/^import(?![a-zA-Z¡-￿_0-9_\$])/,[0,"async",/^(?![a-zA-Z¡-￿_0-9_\$])/,[5,139]],/^[a-zA-Z¡-￿__\$][a-zA-Z¡-￿_0-9_\$]*/,/^extends(?![a-zA-Z¡-￿_0-9_\$])/,/^enum(?![a-zA-Z¡-￿_0-9_\$])/,[1,";",/^(?=\})/,[7,"canInsertSemi"]],/^from(?![a-zA-Z¡-￿_0-9_\$])/,[1,` +`," "," "],/^[a-zA-Z¡-￿__\$]/,/^const(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:true|false|null|undefined|NaN|Infinity)(?![a-zA-Z¡-￿_0-9_\$])/,/^new(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:0x[0-9a-fA-F_]+|0o[0-7_]+|0b[01_]+|(?:[0-9][0-9_]*(?:\.[0-9_]*)?|\.[0-9_]+)(?:[eE][\+\-]?[0-9_]+)?)/,/^else(?![a-zA-Z¡-￿_0-9_\$])/,/^catch(?![a-zA-Z¡-￿_0-9_\$])/,/^finally(?![a-zA-Z¡-￿_0-9_\$])/,/^as(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:super|this)(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:delete|typeof|yield|await|void)(?![a-zA-Z¡-￿_0-9_\$])/,/^(?:\.\.\.|\!|\+\+?|\-\-?)/,/^\/(?![\/\*])(?:\\.|\[(?:(?!\]).)*\]|(?!\/).)+\/[gimyus]*/,[0,/^[a-zA-Z¡-￿__\$]/,/^[a-zA-Z¡-￿_0-9_\$]*/,[5,508]],/^(?:\+\+|\-\-)/,/^(?:(?:\+|\-|\%|\*|\/(?![\/\*])|\>\>?\>?|\<\",-1],[3,"keyword",/^this(?![a-zA-Z¡-￿_0-9_\$])/,209,3,"atom",Ah[27],209,3,"keyword",/^typeof(?![a-zA-Z¡-￿_0-9_\$])/,177,3,"keyword",/^(?:keyof|readonly|unique)(?![a-zA-Z¡-￿_0-9_\$])/,178,[0,[5,393],"("],179,3,"keyword",Ah[28],180,0,180,0,181,2,396,209,{name:"TupleType"},2,233,209,{name:"ObjType"},2,141,209,{name:"string",token:"string"},3,"number",Ah[29],209],[1,6,182],[1,6,183],[1,6,184],[1,6,185],[[5,401],186,3,"type",Ah[19],187],[3,"variable",Ah[19],188],[1,176,209],[1,176,189],[2,171,190,{name:"TypeParams"},0,190],[3,"variable",Ah[19],191],[1,6,192],[1,6,193],[1,6,194],[1,6,195],[1,6,196],[2,404,209,{name:"TypeArgs"},0,209],[".",197,"[",198,0,209],[")",209],[2,409,199,{name:"ParamListSpec"}],[".",200],[1,6,201],[1,6,202],[1,6,203],[1,6,181],[3,"property",Ah[19],204],[1,165,205],[3,"operator","=>",206],[1,6,193],[1,6,207],[1,6,208],["]",204],[1,410,209],[1,6,210],[3,"operator",/^[\&\|]/,211,3,"keyword",Ah[20],211,"[",212,3,"operator","?",213,0,-1],[1,6,214],[1,6,215],[1,6,216],[1,176,217],[1,176,218,0,218],[1,176,219],[1,6,210],[1,6,220],[1,6,221],["]",217],[3,"operator",":",222],[1,6,223],[1,176,217],[Ah[19],225],[1,6,226],[".",-1],[1,176,228,0,-1],[1,6,229],[",",230,0,-1],[1,6,231],[1,176,232,0,232],[1,6,229],["{",234],[1,6,235],[1,416,236,0,236],[1,6,237],[/^[\,\;]/,238,"}",-1],[1,6,239],[1,416,240,0,240],[1,6,237],["{",242],[1,6,243],[1,449,244],[1,6,245],["}",-1],[1,463,247],[1,6,248],[3,"operator","!",249,0,249],[1,6,250],[":",251,0,253],[1,6,252],[1,176,253],[1,6,254],[3,"operator","=",255,0,-1],[1,6,256],[1,367,-1],["(",258],[1,6,259],[1,165,260],[1,6,261],[")",-1],[1,6,263],[3,"keyword",Ah[30],264,0,-1],[1,6,265],[2,7,-1,{name:"Statement"}],[2,171,267,{name:"TypeParams"},0,267],[1,6,268],[2,466,269,{name:"ParamList"}],[1,6,270],[":",271,0,273],[1,6,272],[1,410,273],[1,6,274],[2,161,-1,{name:"Block"},Ah[22],-1],[2,471,276,{name:"ForSpec"}],[1,6,277],[2,7,-1,{name:"Statement"}],[3,"keyword",Ah[31],279,0,287],[1,6,280],["(",281,0,282],[1,6,283],[1,6,284],[1,463,285],[2,161,287,{name:"Block"}],[1,6,286],[")",282],[1,6,288],[3,"keyword",Ah[32],289,0,-1],[1,6,290],[2,161,-1,{name:"Block"}],[2,171,292,{name:"TypeParams"},0,292],[1,6,293],[3,"keyword",Ah[20],294,0,296],[1,6,295],[1,176,296],[1,6,297],[3,"keyword",/^implements(?![a-zA-Z¡-￿_0-9_\$])/,298,0,300],[1,6,299],[1,227,300],[1,6,301],[2,482,-1,{name:"ClassBody"}],[1,308,303,0,-1],[1,6,304],[",",305,0,-1],[1,6,306],[1,308,307,0,307],[1,6,304],[3,"variable",/^[a-zA-Z¡-￿__\$][a-zA-Z¡-￿_0-9_\$]*(?= +as)/,309,3,"def",Ah[19],-1],[1,6,310],[3,"keyword",Ah[33],311],[1,6,312],[3,"def",Ah[19],-1],[0,314,2,490,-1,{name:"doccomment.braced"}],[[0,/^(?!\*\/|\@[a-zA-Z¡-￿_0-9]|\{)/,/^[^]/],315],[0,314,0,-1],[1,494,317],[1,313,317,0,-1],["\\",319,` +`,-1],[/^[^]/,-1],["<",321,3,"atom",Ah[27],-1,3,"keyword",Ah[34],-1,3,"keyword",Ah[35],327,3,"operator",Ah[36],327,3,"keyword",Ah[18],327,3,"keyword",Ah[28],329,3,"keyword",Ah[6],335,3,"keyword",Ah[15],341,2,500,-1,{name:"ArrowFunc"},3,"variable callee",Ah[38],346,3,"variable",Ah[19],-1,3,"number",Ah[29],-1,2,141,-1,{name:"string",token:"string"},3,"string-2",Ah[37],-1,1,150,-1,2,512,-1,{name:"ArrayLiteral"},2,517,-1,{name:"ObjectLiteral"},2,522,-1,{name:"ParenExpr"}],[1,6,322],[1,176,323],[1,6,324],[">",325],[1,6,326],[1,320,-1],[1,6,328],[1,320,-1],[1,6,330],[".",331,3,"variable callee",Ah[38],332,1,320,-1],[1,6,333],[1,6,334],[3,"keyword",/^target(?![a-zA-Z¡-￿_0-9_\$])/,-1],[2,404,-1,{name:"TypeArgs"},0,-1],[1,6,336],[3,"keyword","*",337,0,337],[1,6,338],[3,"def",Ah[19],339,0,339],[1,6,340],[2,266,-1,{name:"FunctionDef"}],[1,6,342],[[6,527],343,0,344],[3,"def type",Ah[19],344],[1,6,345],[1,291,-1],[1,6,347],[2,404,-1,{name:"TypeArgs"},0,-1],[3,"keyword",Ah[33],349,3,"operator","!",-1,3,"operator",Ah[39],-1,3,"operator",Ah[40],351,3,"keyword",Ah[41],351,2,528,-1,{name:"ArgList"},1,150,-1,Ah[43],353,"[",357,3,"operator","?",361],[1,6,350],[1,176,-1],[1,6,352],[1,165,-1],[1,6,354],[3,"property callee",Ah[44],355,3,"property",Ah[19],-1],[1,6,356],[2,404,-1,{name:"TypeArgs"},0,-1],[1,6,358],[1,165,359],[1,6,360],["]",-1],[1,6,362],[1,165,363],[1,6,364],[3,"operator",":",365],[1,6,366],[1,165,-1],[1,320,368],[1,6,369],[1,537,370,0,-1],[1,6,369],[3,"def type",Ah[19],372,0,-1],[1,6,373],[3,"keyword",Ah[20],374,0,375],[1,6,376],[1,6,377],[1,176,375],[3,"operator","=",378,0,379],[1,6,380],[1,6,381],[1,176,379],[",",382,0,-1],[1,6,383],[3,"def type",Ah[19],384,0,385],[1,6,386],[1,6,381],[3,"keyword",Ah[20],387,0,388],[1,6,389],[1,6,390],[1,176,388],[3,"operator","=",391,0,385],[1,6,392],[1,176,385],["(",394],[1,6,395],[[6,556],-1],["[",397],[1,6,398],[1,559,399],[1,6,400],["]",-1],[Ah[19],402],[1,6,403],[".",-1],["<",405],[1,6,406],[1,227,407],[1,6,408],[">",-1],[2,466,-1,{name:"ParamList"}],[[5,573],411,0,414],[3,"variable",Ah[19],412],[1,6,413],[3,"keyword",Ah[46],414],[1,6,415],[1,176,-1],[3,"keyword",Ah[28],417,0,417,0,425],[1,6,418],[2,171,419,{name:"TypeParams"},0,419],[1,6,420],[2,466,421,{name:"ParamList"}],[1,6,422],[":",423,0,-1],[1,6,424],[1,410,-1],[3,"keyword",Ah[42],426,"[",427,3,"def property",Ah[19],428,2,141,428,{name:"string",token:"string"},3,"number",Ah[29],428],[1,6,425],[1,6,429],[1,6,430],[[0,[5,576],/^[a-zA-Z¡-￿__\$]/,/^[a-zA-Z¡-￿_0-9_\$]*/],431,1,165,432],[/^\??/,433],[1,6,434],[1,6,435],[1,6,436],[":",437,3,"keyword",/^in(?![a-zA-Z¡-￿_0-9_\$])/,437],["]",438],[2,171,439,{name:"TypeParams"},0,439,0,440],[1,6,441],[1,6,442],[1,6,443],[1,6,444],[1,176,432],[":",445],[2,466,440,{name:"ParamList"}],[":",446,0,-1],[1,6,447],[1,6,448],[1,176,-1],[1,410,-1],[3,"def property",Ah[19],450,0,-1],[1,6,451],[3,"operator","=",452,0,453],[1,6,454],[1,6,455],[1,367,453],[",",456,0,-1],[1,6,457],[3,"def property",Ah[19],458,0,459],[1,6,460],[1,6,455],[3,"operator","=",461,0,459],[1,6,462],[1,367,459],[3,"operator","...",464,0,464],[1,6,465],[3,"def",Ah[19],-1,2,579,-1,{name:"ArrayPattern"},2,584,-1,{name:"ObjectPattern"}],["(",467],[1,6,468],[1,589,469],[1,6,470],[")",-1],["(",472],[1,6,473],[2,629,474,{name:"StatementMaybeOf"}],[1,6,475],[1,165,476,0,476,0,480],[1,6,477],[";",478],[1,6,479],[1,165,480,0,480],[1,6,481],[")",-1],["{",483],[1,6,484],[0,485,"@",486,"}",-1],[3,"keyword",Ah[42],487,3,"keyword",[0,"override",/^(?![a-zA-Z¡-￿_0-9_\$])/,[5,634]],487,2,635,488,{name:"ClassItem"}],[1,6,489],[1,6,485],[1,6,484],[1,165,488],["{",491],[1,494,492,1,313,493],[[0,/^(?!\}|\*\/)/,/^[^]/],492,0,493],[/^(?:\}|(?=\*\/))/,-1],[3,"tag",/^\@(?:member|param|arg(?:ument)?|module|namespace|typedef)(?![a-zA-Z¡-￿_0-9])/,495,3,"tag",/^\@[a-zA-Z¡-￿_0-9]+/,-1],[Ah[24],495,"{",496,0,497,0,-1],[2,656,498,{name:"doccomment.type"}],[3,"def",/^[a-zA-Z¡-￿_0-9]+/,-1,0,-1],["}",499],[[1,` +`," "," ",/^\*(?!\/)/],499,0,497],[3,"def",[0,/^[a-zA-Z¡-￿__\$]/,/^[a-zA-Z¡-￿_0-9_\$]*/,[5,660]],506,[5,666],501],[2,466,502,{name:"ParamList"}],[1,6,503],[":",504,0,506],[1,6,505],[1,410,506],[1,6,507],[2,673,-1,{name:"ArrowRest"}],[/^\<(?! )/,-1,/^ */,509],[1,678,510,0,511],[/^ */,511],["(",-1],["[",513],[1,6,514],[1,680,515],[1,6,516],["]",-1],["{",518],[1,6,519],[1,686,520],[1,6,521],["}",-1],["(",523],[1,6,524],[1,165,525],[1,6,526],[")",-1],[3,"keyword",Ah[20],-1],["(",529],[1,6,530],[1,680,531],[1,6,532],[")",-1],[/^ */,534],[1,678,535,0,536],[/^ */,536],["(",-1],[3,"keyword",Ah[33],538,3,"operator","!",-1,3,"operator",Ah[39],-1,3,"operator",Ah[40],540,3,"keyword",Ah[41],540,2,528,-1,{name:"ArgList"},1,150,-1,Ah[43],542,"[",546,3,"operator","?",550],[1,6,539],[1,176,-1],[1,6,541],[1,367,-1],[1,6,543],[3,"property callee",Ah[44],544,3,"property",Ah[19],-1],[1,6,545],[2,404,-1,{name:"TypeArgs"},0,-1],[1,6,547],[1,165,548],[1,6,549],["]",-1],[1,6,551],[1,165,552],[1,6,553],[3,"operator",":",554],[1,6,555],[1,367,-1],[/^(?:\)|\.\.\.)/,-1,Ah[19],557],[1,6,558],[/^[\?\:]/,-1],[Ah[45],560,0,561,0,-1],[1,6,562],[1,6,563],[":",561],[1,176,564],[1,6,565],[",",566,0,-1],[1,6,567],[Ah[45],568,0,569,0,570],[1,6,571],[1,6,572],[1,6,565],[":",569],[1,176,570],[Ah[19],574],[1,6,575],[3,"keyword",Ah[46],-1],[Ah[19],577],[1,6,578],[/^(?:\:|in)/,-1],["[",580],[1,6,581],[1,692,582],[1,6,583],["]",-1],["{",585],[1,6,586],[1,698,587],[1,6,588],["}",-1],["@",590,0,591,0,-1],[1,6,592],[3,"keyword",Ah[42],593,Ah[47],594],[1,165,595],[1,6,591],[1,6,596],[1,6,589],[1,463,597],[1,6,598],[/^\??/,599],[1,6,600],[":",601,0,602],[1,6,603],[1,6,604],[1,176,602],[3,"operator","=",605,0,606],[1,6,607],[1,6,608],[1,367,606],[",",609,0,-1],[1,6,610],["@",611,0,612,0,613],[1,6,614],[3,"keyword",Ah[42],615,Ah[47],616],[1,6,608],[1,165,617],[1,6,612],[1,6,618],[1,6,610],[1,463,619],[1,6,620],[/^\??/,621],[1,6,622],[":",623,0,624],[1,6,625],[1,6,626],[1,176,624],[3,"operator","=",627,0,613],[1,6,628],[1,367,613],[2,7,630,{name:"Statement"}],[1,6,631],[3,"keyword",/^of(?![a-zA-Z¡-￿_0-9_\$])/,632,0,-1],[1,6,633],[1,165,-1],[Ah[24],634,Ah[25],-1],[3,"keyword",Ah[48],636,0,636],[1,6,637],[3,"def property",Ah[19],642,"[",638,3,"number",Ah[29],642,2,141,642,{name:"string",token:"string"}],[1,6,639],[1,165,640],[1,6,641],["]",642],[1,6,643],[3,"keyword","*",644,0,644,/^[\!\?]?/,645],[1,6,646],[1,6,647],[2,266,-1,{name:"FunctionDef"}],[":",648,0,649],[1,6,650],[1,6,651],[1,176,649],[3,"operator","=",652,0,653],[1,6,654],[1,6,655],[1,165,653],[Ah[22],-1],[3,"type","{",657,3,"type",/^(?:(?!\{|\}|\*\/).)+/,656,` +`,658,0,-1],[2,656,659,{name:"doccomment.type"}],[/^[\t ]*(?:\*(?!\/)[\t ]*)?/,656],[/^(?=\*\/)/,656,3,"type","}",656],[1,6,661],[":",662,0,665],[1,6,663],[1,176,664],[1,6,665],["=>",-1],[2,466,667,{name:"ParamList"}],[1,6,668],[":",669,0,671],[1,6,670],[1,410,671],[1,6,672],["=>",-1],[3,"operator","=>",674],[1,6,675],[2,171,676,{name:"TypeParams"},0,676],[1,6,677],[2,161,-1,{name:"Block"},1,367,-1],["<",679],[1,678,679,[1,"=>",[0,/^(?!\>)/,/^[^]/]],679,">",-1],[1,367,681,0,-1],[1,6,682],[",",683,0,-1],[1,6,684],[1,367,685,0,685],[1,6,682],[2,704,687,{name:"ObjectMember"},0,-1],[1,6,688],[",",689,0,-1],[1,6,690],[2,704,691,{name:"ObjectMember"},0,691],[1,6,688],[1,719,693,0,693,0,-1],[1,6,694],[",",695,0,-1],[1,6,696],[1,719,697,0,697,0,697],[1,6,694],[1,724,699,0,-1],[1,6,700],[",",701,0,-1],[1,6,702],[1,724,703,0,703],[1,6,700],[3,"keyword",Ah[48],705,0,705],[1,6,706],[3,"keyword","*",707,0,707],[1,6,708],[3,"def property",Ah[19],709,"[",710,3,"number",Ah[29],709,2,141,709,{name:"string",token:"string"},3,"operator","...",711],[1,6,712],[1,6,713],[1,6,714],[2,266,-1,{name:"FunctionDef"},":",715,0,-1],[1,165,716],[1,367,-1],[1,6,717],[1,6,718],[1,367,-1],["]",709],[1,463,720],[1,6,721],[3,"operator","=",722,0,-1],[1,6,723],[1,367,-1],[3,"def",/^[a-zA-Z¡-￿__\$][a-zA-Z¡-￿_0-9_\$]*(?![a-z]|[A-Z]|[¡-￿]|_|[0-9]|_|\$| *\:)/,725,3,"property",Ah[19],729,3,"number",Ah[29],729,2,141,729,{name:"string",token:"string"},3,"operator","...",733],[1,6,726],[3,"operator","=",727,0,-1],[1,6,728],[1,367,-1],[1,6,730],[":",731],[1,6,732],[1,719,-1],[1,6,734],[1,719,-1]],start:0,token:5}),Dh=/(^|\s)variable($|\s)/;function jh(Z1){var e0=/^(if|for|do|while|try)\b/.exec(Z1.startLine.slice(Z1.startPos));return e0&&e0[1]}var t1={Block:"}",BlockOf:"}",ClassBody:"}",AnnotationTypeBody:"}",ObjectLiteral:"}",ObjectPattern:"}",EnumBody:"}",LambdaBlock:"}",WhenBody:"}",ObjType:"}",ArrayInitializer:"}",NamespaceBlock:"}",BraceTokens:"}",ArrayLiteral:"]",BracketTokens:"]",TupleType:"]",ParamList:")",SimpleParamList:")",ArgList:")",ParenExpr:")",CondExpr:")",ForSpec:")",ParenTokens:")",ParenthesizedExpression:")",ConstructorParamList:")",TypeParams:">",TypeArgs:">",TemplateArgs:">",TemplateParams:">"},i1=["Block","NamespaceBlock","ClassBody","AnnotationTypeBody","BlockOf","EnumBody"],n1=["Statement","ObjectMember","ClassItem","EnumConstant","AnnotationTypeItem","ArgExpr","StatementMaybeOf","NewExpr"];function p1(Z1,e0){for(var Q0=Z1.startLine;;Z1=Z1.parent){if(Z1.name=="CondExpr")return Eh.countColumn(Z1.startLine,Z1.startPos+1,e0.tabSize);if(n1.indexOf(Z1.name)>-1&&/(^\s*|[\(\{\[])$/.test(Z1.startLine.slice(0,Z1.startPos)))return Eh.countColumn(Z1.startLine,Z1.startPos,e0.tabSize);if(!Z1.parent||Z1.parent.startLine!=Q0)return Eh.countColumn(Z1.startLine,null,e0.tabSize)}}function _1(Z1,e0,Q0){if(!Z1)return 0;if(Z1.name=="string"||Z1.name=="comment")return Eh.Pass;var R0,V0,ny=t1[Z1.name],Zv=e0&&e0.charAt(0)==ny;if(ny&&Q0.align!==!1&&(!Q0.dontAlign||Q0.dontAlign.indexOf(Z1.name)<0)&&function(px){return!/^\s*((\/\/.*)?$|.*=>)/.test(px.startLine.slice(px.startPos+1))}(Z1))return Eh.countColumn(Z1.startLine,Z1.startPos,Q0.tabSize)+(Zv?0:1);if(ny&&i1.indexOf(Z1.name)>-1){var Q2=Z1.parent;Q2&&Q2.name=="Statement"&&Q2.parent&&Q2.parent.name=="Statement"&&jh(Q2.parent)&&!jh(Q2)&&(Q2=Q2.parent);var Qw=x1(Q2,Q0);return Zv||Z1.name=="NamespaceBlock"?Qw:/^(public|private|protected)\s*:/.test(e0)?Qw+1:!(V0=Z1.parent)||V0.name!="Statement"||!/^switch\b/.test(V0.startLine.slice(V0.startPos))||(R0=e0)&&/^\s*(case|default)\b/.test(R0)?Qw+Q0.indentUnit:Qw+2*Q0.indentUnit}var $w=p1(Z1,Q0);return ny?Zv&&(Q0.dontCloseBrackets||"").indexOf(ny)<0?$w:$w+Q0.indentUnit*((Q0.doubleIndentBrackets||"").indexOf(ny)<0?1:2):n1.indexOf(Z1.name)>-1?jh(Z1)?$w+Q0.indentUnit:$w+2*Q0.indentUnit:Z1.name=="Alternative"||Z1.name=="CatchFinally"?($w=p1(Z1.parent,Q0),!e0||/^((else|catch|finally)\b|\/[\/\*])/.test(e0)?$w:$w+Q0.indentUnit):Z1.name=="ArrowRest"?$w+Q0.indentUnit:Z1.name=="NewExpression"&&Z1.startLine.length>Z1.startPos+5?Eh.countColumn(Z1.startLine,Z1.startPos,Q0.tabSize)+2*Q0.indentUnit:Z1.name=="InitializerList"?$w+2:Z1.name!="ThrowsClause"||/throws\s*$/.test(Z1.startLine.slice(Z1.startPos))?_1(Z1.parent,e0,Q0):$w+2*Q0.indentUnit}function x1(Z1,e0){for(;;Z1=Z1.parent){if(!Z1)return 0;if(n1.indexOf(Z1.name)>-1||Z1.parent&&t1[Z1.parent.name])return Eh.countColumn(Z1.startLine,null,e0.tabSize)}}function V1(Z1,e0,Q0,R0){var V0=Z1.context&&Z1.context.name;if(V0=="DeclType"||V0=="BeforeStatement"||V0=="AnnotationHead"||V0=="Template"||V0=="str")return x1(Z1.context,R0);if((V0=="doccomment.braced"||V0=="doccomment.tagGroup")&&!/^[@*]/.test(e0))return Eh.countColumn(Z1.context.startLine,null,R0.tabSize)+2*R0.indentUnit;var ny=R0.forceContent&&/^\s*(\/\/.*)?$/.test(Q0)?"x":Q0;return _1(Z1.contextAt(ny,Q0.length-e0.length),e0,R0)}function i0(Z1,e0){for(var Q0=e0-1;Q0>=0;Q0--){var R0=Z1.charCodeAt(Q0);if(R0===10)break;if(R0!==32&&R0!==9)return!1}return!0}var r0=function(Z1){this.config=Z1};r0.prototype.startState=function(){return new D0},r0.prototype.copyState=function(Z1){return Z1.copy()},r0.prototype.shouldInterceptTokenizing=function(Z1){var e0=Z1.currentTemplateState;return e0!==void 0&&e0.mode!==null},r0.prototype.interceptTokenizing=function(Z1,e0){if(Z1.match("${")&&(Z1.backUp(2),!this.isEscaped(Z1,Z1.pos-2)))return{handled:!1};if(Z1.peek()==="`"&&!this.isEscaped(Z1,Z1.pos))return{handled:!1};var Q0=e0.currentTemplateState,R0=Q0.mode,V0=Q0.state,ny=R0.token(Z1,V0);return this.backupIfEmbeddedTokenizerOvershot(Z1),{handled:!0,style:ny}},r0.prototype.trackState=function(Z1,e0,Q0){if(Z1){var R0=Q0.currentTemplateState;R0&&R0.kind!=="inline-expression"?this.trackStateInTemplate(Z1,e0,Q0,R0):this.trackStateNotInTemplate(Z1,e0,Q0,R0),Q0.previousVariable=Z1==="variable"?e0.current():null}},r0.prototype.trackStateNotInTemplate=function(Z1,e0,Q0,R0){if(R0&&Z1==="string-2"&&e0.current().startsWith("}"))return Q0.templateStack.pop(),void e0.backUp(e0.current().length-1);if(Z1==="string-2"&&e0.current().startsWith("`")){var V0=this.getModeForTemplateTag(Q0.previousVariable),ny="template";V0?(e0.backUp(e0.current().length-1),Q0.templateStack.push(new Iy(ny,V0,CodeMirror.startState(V0)))):Q0.templateStack.push(new Iy(ny,null,null))}},r0.prototype.trackStateInTemplate=function(Z1,e0,Q0,R0){Z1!=="string-2"||!e0.current().endsWith("`")||this.isEscaped(e0.pos-1)?Z1!=="string-2"||!e0.current().endsWith("${")||this.isEscaped(e0.pos-2)||Q0.templateStack.push(new Iy("inline-expression",null,null)):Q0.templateStack.pop()},r0.prototype.backupIfEmbeddedTokenizerOvershot=function(Z1){for(var e0=Z1.current(),Q0=0;;){var R0=e0.slice(Q0).search(/`|\$\{/);if(R0===-1)return;R0+=Q0;var V0=e0.length-R0,ny=Z1.pos-V0;if(!this.isEscaped(Z1,ny))return void Z1.backUp(e0.length-R0);Q0=R0+1}},r0.prototype.isEscaped=function(Z1,e0){for(var Q0=!1,R0=e0;R0>0&&Z1.string[R0-1]==="\\";)Q0=!Q0,R0--;return Q0},r0.prototype.getModeForTemplateTag=function(Z1){if(!Z1)return null;Z1==="htm"&&(Z1="html");for(var e0=["google-"+Z1,""+Z1],Q0=0;Q0)",dontCloseBrackets:")",tabSize:Q0.tabSize,indentUnit:Q0.indentUnit,forceContent:!0}}return Z1&&(e0.__proto__=Z1),e0.prototype=Object.create(Z1&&Z1.prototype),e0.prototype.constructor=e0,e0.prototype.startState=function(){var Q0=Z1.prototype.startState.call(this);return Q0.embeddedParserState=this.templateTokenizer.startState(),Q0},e0.prototype.copyState=function(Q0){var R0=Z1.prototype.copyState.call(this,Q0);return R0.embeddedParserState=this.templateTokenizer.copyState(Q0.embeddedParserState),R0},e0.prototype.token=function(Q0,R0){var V0=R0.embeddedParserState;if(this.templateTokenizer.shouldInterceptTokenizing(V0)){var ny=this.templateTokenizer.interceptTokenizing(Q0,V0),Zv=ny.handled,Q2=ny.style;if(Zv)return Q2}var Qw=Z1.prototype.token.call(this,Q0,R0);return this.templateTokenizer.trackState(Qw,Q0,V0),function($w,px,y3,Mw){if($w=="def"){var tx=function(m2,qA){for(var pw=m2;pw;pw=pw.parent)if(qA.indexOf(pw.name)>-1)return pw}(Mw.context,px),Px=y3.current();if(tx&&(tx.locals||(tx.locals=[]),tx.locals.indexOf(Px)==-1&&tx.locals.push(Px),Mw.context.name!="funcName"))return"def local"}else Dh.test($w)&&!/qualified/.test($w)&&function(m2,qA){for(var pw=m2;pw;pw=pw.parent)if(pw.locals&&pw.locals.indexOf(qA)>-1)return!0;return!1}(Mw.context,y3.current())&&($w=$w.replace(Dh,"$1variable-2$2"));return $w}(Qw,pv,Q0,R0)},e0.prototype.indent=function(Q0,R0,V0){return R0||(R0=V0="x"),V1(Q0,R0,V0,this.indentConf)},e0}(Eh.GrammarMode),ov={electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``"};for(var S0 in ov)Sy.prototype[S0]=ov[S0];Eh.registerHelper("wordChars","google-typescript",/[\w$]/),Eh.defineMode("google-typescript",function(Z1,e0){return new Sy(Z1,e0)})})((ch=typeof globalThis<"u"?globalThis:ch||self).CodeMirror)}(window),function(ch,oh){(function(hh){function mh(_1){if(_1&&_1.__esModule)return _1;var x1=Object.create(null);return _1&&Object.keys(_1).forEach(function(V1){if(V1!=="default"){var i0=Object.getOwnPropertyDescriptor(_1,V1);Object.defineProperty(x1,V1,i0.get?i0:{enumerable:!0,get:function(){return _1[V1]}})}}),x1.default=_1,Object.freeze(x1)}var Eh=mh(hh),Ah=[[1,` +`," "," "],/^[a-zA-Z\-\.0-9_]+/],$h=Object.freeze({__proto__:null,nodes:[[1,3,0,0,1],[/^[^]/,0],[/^[^]/,-1],[2,4,-1,{name:"comment",token:"comment"},2,6,-1,{name:"doctype",token:"meta"},2,8,-1,{name:"tag"},3,"atom",/^\&(?:(?![\;\n\t ]).)*\;/,-1,[1,` +`,/^(?:(?![\&\<]).)+/],-1],["",-1],[/^(?:\<\!doctype|\<\!DOCTYPE)(?![a-zA-Z\-\.0-9_])/,7],[[0,/^(?!\>)/,/^[^]/],7,">",-1],[2,14,9,{name:"openTag"}],[3,"tag","/>",-1,[7,"selfClosing"],10,3,"tag",">",11],[3,"tag",">",-1],[1,3,11,/^(?=\<\/)/,12],[[7,"matchingTag"],13,0,-1],[2,21,-1,{name:"closeTag"}],[3,"tag",[0,"<",[6,24]],15],[Ah[0],15,3,"tag",Ah[1],16],[Ah[0],16,0,17],[3,"attribute",Ah[1],18,0,-1],[Ah[0],18,"=",19,0,20],[Ah[0],19,2,25,20,{name:"attributeValue",token:"string"}],[Ah[0],20,0,17],[3,"tag","",-1],[Ah[0],24,"/",-1],['"',26,"'",27,/^(?:(?![\n\t \>]).)*/,-1],[[0,/^(?!\")/,/^[^]/],26,'"',-1],[[0,/^(?!\')/,/^[^]/],27,"'",-1]],start:0,token:2});function Dh(_1){var x1=/^\s*([\w_\.-]+)/.exec(_1);return x1?x1[1].toLowerCase():"x"}function jh(_1){return Dh(_1.startLine.slice(_1.startPos+1))}var t1="area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "),i1={selfClosing:function(_1,x1,V1){return t1.indexOf(jh(V1))>-1},matchingTag:function(_1,x1,V1){return Dh(_1.slice(x1+2))==jh(V1)}},n1=function(_1){function x1(V1,i0){_1.call(this,$h,{predicates:i1}),this.conf=V1}return _1&&(x1.__proto__=_1),x1.prototype=Object.create(_1&&_1.prototype),x1.prototype.constructor=x1,x1.prototype.indent=function(V1,i0,r0){return function(D0,J0,Iy,pv){for(var Sy=D0.contextAt(Iy,Iy.length-J0.length),ov=/^\s*<\/\s*([\w_\.-]+)/.exec(J0);Sy;){if(Sy.name=="tag"){var S0=CodeMirror.countColumn(Sy.startLine,null,pv.tabSize);return ov&&ov[1].toLowerCase()==jh(Sy)?S0:S0+pv.indentUnit}if(Sy.name=="openTag")return CodeMirror.countColumn(Sy.startLine,null,pv.tabSize)+2*pv.indentUnit;Sy=Sy.parent}return 0}(V1,i0,r0,this.conf)},x1}(Eh.GrammarMode),p1=n1.prototype;p1.electricInput=/^\s*<\/.*?>/,p1.blockCommentStart="",p1.fold="xml",function(_1){_1.xmlCurrentTag=function(x1){var V1=x1.context;if(!V1||V1.name!="openTag"&&V1.name!="closeTag")return null;var i0=/^<\/?\s*([\w\-\.]+)/.exec(V1.startLine.slice(V1.startPos));return i0?{name:i0[1],close:V1.name=="closeTag"}:null},_1.xmlCurrentContext=function(x1){for(var V1=[],i0=x1.context;i0;i0=i0.parent)if(i0.name=="tag"){var r0=/^<\s*([\w\-\.]+)/.exec(i0.startLine.slice(i0.startPos));r0&&V1.push(r0[1])}return V1.reverse()}}(p1),Eh.defineMode("google-html",function(_1,x1){return new n1(_1,x1)})})((ch=typeof globalThis<"u"?globalThis:ch||self).CodeMirror)}(window),function(ch){function oh(Sy){for(var ov={},S0=0;S0*\/]/.test(Bv)?gw(null,"select-op"):Bv=="."&&Qy.match(/^-?[_a-z][_a-z0-9-]*/i)?gw("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(Bv)?gw(null,Bv):Qy.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(Qy.current())&&(k2.tokenize=$k),gw("variable callee","variable")):/[\w\\\-]/.test(Bv)?(Qy.eatWhile(/[\w\\\-]/),gw("property","word")):gw(null,null):/[\d.]/.test(Qy.peek())?(Qy.eatWhile(/[\w.%]/),gw("number","unit")):Qy.match(/^-[\w\\\-]*/)?(Qy.eatWhile(/[\w\\\-]/),Qy.match(/^\s*:/,!1)?gw("variable-2","variable-definition"):gw("variable-2","variable")):Qy.match(/^\w+-/)?gw("meta","meta"):void 0}function aA(Qy){return function(k2,Bv){for(var fC,LN=!1;(fC=k2.next())!=null;){if(fC==Qy&&!LN){Qy==")"&&k2.backUp(1);break}LN=!LN&&fC=="\\"}return(fC==Qy||!LN&&Qy!=")")&&(Bv.tokenize=null),gw("string","string")}}function $k(Qy,k2){return Qy.next(),Qy.match(/^\s*[\"\')]/,!1)?k2.tokenize=null:k2.tokenize=aA(")"),gw(null,"(")}function l4(Qy,k2,Bv){this.type=Qy,this.indent=k2,this.prev=Bv}function ZC(Qy,k2,Bv,fC){return Qy.context=new l4(Bv,k2.indentation()+(fC===!1?0:Q0),Qy.context),Bv}function nk(Qy){return Qy.context.prev&&(Qy.context=Qy.context.prev),Qy.context.type}function gx(Qy,k2,Bv){return oA[Bv.context.type](Qy,k2,Bv)}function yw(Qy,k2,Bv,fC){for(var LN=fC||1;LN>0;LN--)Bv.context=Bv.context.prev;return gx(Qy,k2,Bv)}function eC(Qy){var k2=Qy.current().toLowerCase();e0=tx.hasOwnProperty(k2)?"atom":Mw.hasOwnProperty(k2)?"keyword":"variable"}var oA={top:function(Qy,k2,Bv){if(Qy=="{")return ZC(Bv,k2,"block");if(Qy=="}"&&Bv.context.prev)return nk(Bv);if(qA&&/@component/i.test(Qy))return ZC(Bv,k2,"atComponentBlock");if(/^@(-moz-)?document$/i.test(Qy))return ZC(Bv,k2,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(Qy))return ZC(Bv,k2,"atBlock");if(/^@(font-face|counter-style)/i.test(Qy))return Bv.stateArg=Qy,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(Qy))return"keyframes";if(Qy&&Qy.charAt(0)=="@")return ZC(Bv,k2,"at");if(Qy=="hash")e0="builtin";else if(Qy=="word")e0="tag";else{if(Qy=="variable-definition")return"maybeprop";if(Qy=="interpolation")return ZC(Bv,k2,"interpolation");if(Qy==":")return"pseudo";if(Px&&Qy=="(")return ZC(Bv,k2,"parens")}return Bv.context.type},block:function(Qy,k2,Bv){if(Qy=="word"){var fC=k2.current().toLowerCase();return Qw.hasOwnProperty(fC)?(e0="property","maybeprop"):$w.hasOwnProperty(fC)?(e0=pw?"string-2":"property","maybeprop"):Px?(e0=k2.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(e0+=" error","maybeprop")}return Qy=="meta"?"block":Px||Qy!="hash"&&Qy!="qualifier"?oA.top(Qy,k2,Bv):(e0="error","block")},maybeprop:function(Qy,k2,Bv){return Qy==":"?ZC(Bv,k2,"prop"):gx(Qy,k2,Bv)},prop:function(Qy,k2,Bv){if(Qy==";")return nk(Bv);if(Qy=="{"&&Px)return ZC(Bv,k2,"propBlock");if(Qy=="}"||Qy=="{")return yw(Qy,k2,Bv);if(Qy=="(")return ZC(Bv,k2,"parens");if(Qy!="hash"||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(k2.current())){if(Qy=="word")eC(k2);else if(Qy=="interpolation")return ZC(Bv,k2,"interpolation")}else e0+=" error";return"prop"},propBlock:function(Qy,k2,Bv){return Qy=="}"?nk(Bv):Qy=="word"?(e0="property","maybeprop"):Bv.context.type},parens:function(Qy,k2,Bv){return Qy=="{"||Qy=="}"?yw(Qy,k2,Bv):Qy==")"?nk(Bv):Qy=="("?ZC(Bv,k2,"parens"):Qy=="interpolation"?ZC(Bv,k2,"interpolation"):(Qy=="word"&&eC(k2),"parens")},pseudo:function(Qy,k2,Bv){return Qy=="meta"?"pseudo":Qy=="word"?(e0="variable-3",Bv.context.type):gx(Qy,k2,Bv)},documentTypes:function(Qy,k2,Bv){return Qy=="word"&&V0.hasOwnProperty(k2.current())?(e0="tag",Bv.context.type):oA.atBlock(Qy,k2,Bv)},atBlock:function(Qy,k2,Bv){if(Qy=="(")return ZC(Bv,k2,"atBlock_parens");if(Qy=="}"||Qy==";")return yw(Qy,k2,Bv);if(Qy=="{")return nk(Bv)&&ZC(Bv,k2,Px?"block":"top");if(Qy=="interpolation")return ZC(Bv,k2,"interpolation");if(Qy=="word"){var fC=k2.current().toLowerCase();e0=fC=="only"||fC=="not"||fC=="and"||fC=="or"?"keyword":ny.hasOwnProperty(fC)?"attribute":Zv.hasOwnProperty(fC)?"property":Q2.hasOwnProperty(fC)?"keyword":Qw.hasOwnProperty(fC)?"property":$w.hasOwnProperty(fC)?pw?"string-2":"property":tx.hasOwnProperty(fC)?"atom":Mw.hasOwnProperty(fC)?"keyword":"error"}return Bv.context.type},atComponentBlock:function(Qy,k2,Bv){return Qy=="}"?yw(Qy,k2,Bv):Qy=="{"?nk(Bv)&&ZC(Bv,k2,Px?"block":"top",!1):(Qy=="word"&&(e0="error"),Bv.context.type)},atBlock_parens:function(Qy,k2,Bv){return Qy==")"?nk(Bv):Qy=="{"||Qy=="}"?yw(Qy,k2,Bv,2):oA.atBlock(Qy,k2,Bv)},restricted_atBlock_before:function(Qy,k2,Bv){return Qy=="{"?ZC(Bv,k2,"restricted_atBlock"):Qy=="word"&&Bv.stateArg=="@counter-style"?(e0="variable","restricted_atBlock_before"):gx(Qy,k2,Bv)},restricted_atBlock:function(Qy,k2,Bv){return Qy=="}"?(Bv.stateArg=null,nk(Bv)):Qy=="word"?(e0=Bv.stateArg=="@font-face"&&!px.hasOwnProperty(k2.current().toLowerCase())||Bv.stateArg=="@counter-style"&&!y3.hasOwnProperty(k2.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(Qy,k2,Bv){return Qy=="word"?(e0="variable","keyframes"):Qy=="{"?ZC(Bv,k2,"top"):gx(Qy,k2,Bv)},at:function(Qy,k2,Bv){return Qy==";"?nk(Bv):Qy=="{"||Qy=="}"?yw(Qy,k2,Bv):(Qy=="word"?e0="tag":Qy=="hash"&&(e0="builtin"),"at")},interpolation:function(Qy,k2,Bv){return Qy=="}"?nk(Bv):Qy=="{"||Qy==";"?yw(Qy,k2,Bv):(Qy=="word"?e0="variable":Qy!="variable"&&Qy!="("&&Qy!=")"&&(e0="error"),"interpolation")}};return{startState:function(Qy){return{tokenize:null,state:S0?"block":"top",stateArg:null,context:new l4(S0?"block":"top",Qy||0,null)}},token:function(Qy,k2){if(!k2.tokenize&&Qy.eatSpace())return null;var Bv=(k2.tokenize||RC)(Qy,k2);return Bv&&typeof Bv=="object"&&(Z1=Bv[1],Bv=Bv[0]),e0=Bv,Z1!="comment"&&(k2.state=oA[k2.state](Z1,Qy,k2)),e0},indent:function(Qy,k2){var Bv=Qy.context,fC=k2&&k2.charAt(0),LN=Bv.indent;return Bv.type!="prop"||fC!="}"&&fC!=")"||(Bv=Bv.prev),Bv.prev&&(fC!="}"||Bv.type!="block"&&Bv.type!="top"&&Bv.type!="interpolation"&&Bv.type!="restricted_atBlock"?(fC!=")"||Bv.type!="parens"&&Bv.type!="atBlock_parens")&&(fC!="{"||Bv.type!="at"&&Bv.type!="atBlock")||(LN=Math.max(0,Bv.indent-Q0)):LN=(Bv=Bv.prev).indent),LN},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:m2,fold:"brace"}});var hh=["domain","regexp","url","url-prefix"],mh=oh(hh),Eh=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],Ah=oh(Eh),$h=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],Dh=oh($h),jh=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],t1=oh(jh),i1=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],n1=oh(i1),p1=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],_1=oh(p1),x1=oh(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),V1=oh(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),i0=["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","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","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","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","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","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],r0=oh(i0),D0=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","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","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","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","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","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","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","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","repeating-conic-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","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","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","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","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","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","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"],J0=oh(D0),Iy=hh.concat(Eh).concat($h).concat(jh).concat(i1).concat(p1).concat(i0).concat(D0);function pv(Sy,ov){for(var S0,Z1=!1;(S0=Sy.next())!=null;){if(Z1&&S0=="/"){ov.tokenize=null;break}Z1=S0=="*"}return["comment","comment"]}ch.registerHelper("hintWords","css",Iy),ch.defineMIME("text/css",{documentTypes:mh,mediaTypes:Ah,mediaFeatures:Dh,mediaValueKeywords:t1,propertyKeywords:n1,nonStandardPropertyKeywords:_1,fontProperties:x1,counterDescriptors:V1,colorKeywords:r0,valueKeywords:J0,tokenHooks:{"/":function(Sy,ov){return!!Sy.eat("*")&&(ov.tokenize=pv,pv(Sy,ov))}},name:"css"}),ch.defineMIME("text/x-scss",{mediaTypes:Ah,mediaFeatures:Dh,mediaValueKeywords:t1,propertyKeywords:n1,nonStandardPropertyKeywords:_1,colorKeywords:r0,valueKeywords:J0,fontProperties:x1,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(Sy,ov){return Sy.eat("/")?(Sy.skipToEnd(),["comment","comment"]):Sy.eat("*")?(ov.tokenize=pv,pv(Sy,ov)):["operator","operator"]},":":function(Sy){return!!Sy.match(/^\s*\{/,!1)&&[null,null]},$:function(Sy){return Sy.match(/^[\w-]+/),Sy.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(Sy){return!!Sy.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),ch.defineMIME("text/x-less",{mediaTypes:Ah,mediaFeatures:Dh,mediaValueKeywords:t1,propertyKeywords:n1,nonStandardPropertyKeywords:_1,colorKeywords:r0,valueKeywords:J0,fontProperties:x1,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(Sy,ov){return Sy.eat("/")?(Sy.skipToEnd(),["comment","comment"]):Sy.eat("*")?(ov.tokenize=pv,pv(Sy,ov)):["operator","operator"]},"@":function(Sy){return Sy.eat("{")?[null,"interpolation"]:!Sy.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(Sy.eatWhile(/[\w\\\-]/),Sy.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),ch.defineMIME("text/x-gss",{documentTypes:mh,mediaTypes:Ah,mediaFeatures:Dh,propertyKeywords:n1,nonStandardPropertyKeywords:_1,fontProperties:x1,counterDescriptors:V1,colorKeywords:r0,valueKeywords:J0,supportsAtComponent:!0,tokenHooks:{"/":function(Sy,ov){return!!Sy.eat("*")&&(ov.tokenize=pv,pv(Sy,ov))}},name:"css",helperType:"gss"})}(CodeMirror),function(ch){ch.defineMode("javascript",function(oh,hh){var mh,Eh,Ah=oh.indentUnit,$h=hh.statementIndent,Dh=hh.jsonld,jh=hh.json||Dh,t1=hh.trackScope!==!1,i1=hh.typescript,n1=hh.wordCharacters||/[\w$\xa1-\uffff]/,p1=function(){function d0(Lk){return{type:Lk,style:"keyword"}}var sy=d0("keyword a"),sw=d0("keyword b"),ev=d0("keyword c"),T2=d0("keyword d"),i3=d0("operator"),M3={type:"atom",style:"atom"};return{if:d0("if"),while:sy,with:sy,else:sw,do:sw,try:sw,finally:sw,return:T2,break:T2,continue:T2,new:d0("new"),delete:ev,void:ev,throw:ev,debugger:d0("debugger"),var:d0("var"),const:d0("var"),let:d0("var"),function:d0("function"),catch:d0("catch"),for:d0("for"),switch:d0("switch"),case:d0("case"),default:d0("default"),in:i3,typeof:i3,instanceof:i3,true:M3,false:M3,null:M3,undefined:M3,NaN:M3,Infinity:M3,this:d0("this"),class:d0("class"),super:d0("atom"),yield:ev,export:d0("export"),import:d0("import"),extends:ev,await:ev}}(),_1=/[+\-*&%=<>!?|~^@]/,x1=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V1(d0,sy,sw){return mh=d0,Eh=sw,sy}function i0(d0,sy){var sw,ev=d0.next();if(ev=='"'||ev=="'")return sy.tokenize=(sw=ev,function(M3,Lk){var C4,_D=!1;if(Dh&&M3.peek()=="@"&&M3.match(x1))return Lk.tokenize=i0,V1("jsonld-keyword","meta");for(;(C4=M3.next())!=null&&(C4!=sw||_D);)_D=!_D&&C4=="\\";return _D||(Lk.tokenize=i0),V1("string","string")}),sy.tokenize(d0,sy);if(ev=="."&&d0.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return V1("number","number");if(ev=="."&&d0.match(".."))return V1("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ev))return V1(ev);if(ev=="="&&d0.eat(">"))return V1("=>","operator");if(ev=="0"&&d0.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return V1("number","number");if(/\d/.test(ev))return d0.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),V1("number","number");if(ev=="/")return d0.eat("*")?(sy.tokenize=r0,r0(d0,sy)):d0.eat("/")?(d0.skipToEnd(),V1("comment","comment")):RA(d0,sy,1)?(function(M3){for(var Lk,C4=!1,_D=!1;(Lk=M3.next())!=null;){if(!C4){if(Lk=="/"&&!_D)return;Lk=="["?_D=!0:_D&&Lk=="]"&&(_D=!1)}C4=!C4&&Lk=="\\"}}(d0),d0.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),V1("regexp","string-2")):(d0.eat("="),V1("operator","operator",d0.current()));if(ev=="`")return sy.tokenize=D0,D0(d0,sy);if(ev=="#"&&d0.peek()=="!")return d0.skipToEnd(),V1("meta","meta");if(ev=="#"&&d0.eatWhile(n1))return V1("variable","property");if(ev=="<"&&d0.match("!--")||ev=="-"&&d0.match("->")&&!/\S/.test(d0.string.slice(0,d0.start)))return d0.skipToEnd(),V1("comment","comment");if(_1.test(ev))return ev==">"&&sy.lexical&&sy.lexical.type==">"||(d0.eat("=")?ev!="!"&&ev!="="||d0.eat("="):/[<>*+\-|&?]/.test(ev)&&(d0.eat(ev),ev==">"&&d0.eat(ev))),ev=="?"&&d0.eat(".")?V1("."):V1("operator","operator",d0.current());if(n1.test(ev)){d0.eatWhile(n1);var T2=d0.current();if(sy.lastType!="."){if(p1.propertyIsEnumerable(T2)){var i3=p1[T2];return V1(i3.type,i3.style,T2)}if(T2=="async"&&d0.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return V1("async","keyword",T2)}return V1("variable","variable",T2)}}function r0(d0,sy){for(var sw,ev=!1;sw=d0.next();){if(sw=="/"&&ev){sy.tokenize=i0;break}ev=sw=="*"}return V1("comment","comment")}function D0(d0,sy){for(var sw,ev=!1;(sw=d0.next())!=null;){if(!ev&&(sw=="`"||sw=="$"&&d0.eat("{"))){sy.tokenize=i0;break}ev=!ev&&sw=="\\"}return V1("quasi","string-2",d0.current())}function J0(d0,sy){sy.fatArrowAt&&(sy.fatArrowAt=null);var sw=d0.string.indexOf("=>",d0.start);if(!(sw<0)){if(i1){var ev=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(d0.string.slice(d0.start,sw));ev&&(sw=ev.index)}for(var T2=0,i3=!1,M3=sw-1;M3>=0;--M3){var Lk=d0.string.charAt(M3),C4="([{}])".indexOf(Lk);if(C4>=0&&C4<3){if(!T2){++M3;break}if(--T2==0){Lk=="("&&(i3=!0);break}}else if(C4>=3&&C4<6)++T2;else if(n1.test(Lk))i3=!0;else if(/["'\/`]/.test(Lk))for(;;--M3){if(M3==0)return;if(d0.string.charAt(M3-1)==Lk&&d0.string.charAt(M3-2)!="\\"){M3--;break}}else if(i3&&!T2){++M3;break}}i3&&!T2&&(sy.fatArrowAt=M3)}}var Iy={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function pv(d0,sy,sw,ev,T2,i3){this.indented=d0,this.column=sy,this.type=sw,this.prev=T2,this.info=i3,ev!=null&&(this.align=ev)}function Sy(d0,sy){if(!t1)return!1;for(var sw=d0.localVars;sw;sw=sw.next)if(sw.name==sy)return!0;for(var ev=d0.context;ev;ev=ev.prev)for(sw=ev.vars;sw;sw=sw.next)if(sw.name==sy)return!0}function ov(d0,sy,sw,ev,T2){var i3=d0.cc;for(S0.state=d0,S0.stream=T2,S0.marked=null,S0.cc=i3,S0.style=sy,d0.lexical.hasOwnProperty("align")||(d0.lexical.align=!0);;)if((i3.length?i3.pop():jh?pw:m2)(sw,ev)){for(;i3.length&&i3[i3.length-1].lex;)i3.pop()();return S0.marked?S0.marked:sw=="variable"&&Sy(d0,ev)?"variable-2":sy}}var S0={state:null,column:null,marked:null,cc:null};function Z1(){for(var d0=arguments.length-1;d0>=0;d0--)S0.cc.push(arguments[d0])}function e0(){return Z1.apply(null,arguments),!0}function Q0(d0,sy){for(var sw=sy;sw;sw=sw.next)if(sw.name==d0)return!0;return!1}function R0(d0){var sy=S0.state;if(S0.marked="def",t1){if(sy.context){if(sy.lexical.info=="var"&&sy.context&&sy.context.block){var sw=V0(d0,sy.context);if(sw!=null)return void(sy.context=sw)}else if(!Q0(d0,sy.localVars))return void(sy.localVars=new Q2(d0,sy.localVars))}hh.globalVars&&!Q0(d0,sy.globalVars)&&(sy.globalVars=new Q2(d0,sy.globalVars))}}function V0(d0,sy){if(sy){if(sy.block){var sw=V0(d0,sy.prev);return sw?sw==sy.prev?sy:new Zv(sw,sy.vars,!0):null}return Q0(d0,sy.vars)?sy:new Zv(sy.prev,new Q2(d0,sy.vars),!1)}return null}function ny(d0){return d0=="public"||d0=="private"||d0=="protected"||d0=="abstract"||d0=="readonly"}function Zv(d0,sy,sw){this.prev=d0,this.vars=sy,this.block=sw}function Q2(d0,sy){this.name=d0,this.next=sy}var Qw=new Q2("this",new Q2("arguments",null));function $w(){S0.state.context=new Zv(S0.state.context,S0.state.localVars,!1),S0.state.localVars=Qw}function px(){S0.state.context=new Zv(S0.state.context,S0.state.localVars,!0),S0.state.localVars=null}function y3(){S0.state.localVars=S0.state.context.vars,S0.state.context=S0.state.context.prev}function Mw(d0,sy){var sw=function(){var ev=S0.state,T2=ev.indented;if(ev.lexical.type=="stat")T2=ev.lexical.indented;else for(var i3=ev.lexical;i3&&i3.type==")"&&i3.align;i3=i3.prev)T2=i3.indented;ev.lexical=new pv(T2,S0.stream.column(),d0,null,ev.lexical,sy)};return sw.lex=!0,sw}function tx(){var d0=S0.state;d0.lexical.prev&&(d0.lexical.type==")"&&(d0.indented=d0.lexical.indented),d0.lexical=d0.lexical.prev)}function Px(d0){return function sy(sw){return sw==d0?e0():d0==";"||sw=="}"||sw==")"||sw=="]"?Z1():e0(sy)}}function m2(d0,sy){return d0=="var"?e0(Mw("vardef",sy),s7,Px(";"),tx):d0=="keyword a"?e0(Mw("form"),RC,m2,tx):d0=="keyword b"?e0(Mw("form"),m2,tx):d0=="keyword d"?S0.stream.match(/^\s*$/,!1)?e0():e0(Mw("stat"),$k,Px(";"),tx):d0=="debugger"?e0(Px(";")):d0=="{"?e0(Mw("}"),px,mD,tx,y3):d0==";"?e0():d0=="if"?(S0.state.lexical.info=="else"&&S0.state.cc[S0.state.cc.length-1]==tx&&S0.state.cc.pop()(),e0(Mw("form"),RC,m2,tx,p6)):d0=="function"?e0(FN):d0=="for"?e0(Mw("form"),px,dz,m2,y3,tx):d0=="class"||i1&&sy=="interface"?(S0.marked="keyword",e0(Mw("form",d0=="class"?d0:sy),o$,tx)):d0=="variable"?i1&&sy=="declare"?(S0.marked="keyword",e0(m2)):i1&&(sy=="module"||sy=="enum"||sy=="type")&&S0.stream.match(/^\s*\w/,!1)?(S0.marked="keyword",sy=="enum"?e0(u7):sy=="type"?e0(fz,Px("operator"),DA,Px(";")):e0(Mw("form"),PN,Px("{"),Mw("}"),mD,tx,tx)):i1&&sy=="namespace"?(S0.marked="keyword",e0(Mw("form"),pw,m2,tx)):i1&&sy=="abstract"?(S0.marked="keyword",e0(m2)):e0(Mw("stat"),k2):d0=="switch"?e0(Mw("form"),RC,Px("{"),Mw("}","switch"),px,mD,tx,tx,y3):d0=="case"?e0(pw,Px(":")):d0=="default"?e0(Px(":")):d0=="catch"?e0(Mw("form"),$w,qA,m2,tx,y3):d0=="export"?e0(Mw("stat"),c7,tx):d0=="import"?e0(Mw("stat"),PL,tx):d0=="async"?e0(m2):sy=="@"?e0(pw,m2):Z1(Mw("stat"),pw,Px(";"),tx)}function qA(d0){if(d0=="(")return e0(aM,Px(")"))}function pw(d0,sy){return aA(d0,sy,!1)}function gw(d0,sy){return aA(d0,sy,!0)}function RC(d0){return d0!="("?Z1():e0(Mw(")"),$k,Px(")"),tx)}function aA(d0,sy,sw){if(S0.state.fatArrowAt==S0.stream.start){var ev=sw?eC:yw;if(d0=="(")return e0($w,Mw(")"),mO(aM,")"),tx,Px("=>"),ev,y3);if(d0=="variable")return Z1($w,PN,Px("=>"),ev,y3)}var T2=sw?ZC:l4;return Iy.hasOwnProperty(d0)?e0(T2):d0=="function"?e0(FN,T2):d0=="class"||i1&&sy=="interface"?(S0.marked="keyword",e0(Mw("form"),qB,tx)):d0=="keyword c"||d0=="async"?e0(sw?gw:pw):d0=="("?e0(Mw(")"),$k,Px(")"),tx,T2):d0=="operator"||d0=="spread"?e0(sw?gw:pw):d0=="["?e0(Mw("]"),g6,tx,T2):d0=="{"?iN(fC,"}",null,T2):d0=="quasi"?Z1(nk,T2):d0=="new"?e0(function(i3){return function(M3){return M3=="."?e0(i3?Qy:oA):M3=="variable"&&i1?e0(LL,i3?ZC:l4):Z1(i3?gw:pw)}}(sw)):e0()}function $k(d0){return d0.match(/[;\}\)\],]/)?Z1():Z1(pw)}function l4(d0,sy){return d0==","?e0($k):ZC(d0,sy,!1)}function ZC(d0,sy,sw){var ev=sw==0?l4:ZC,T2=sw==0?pw:gw;return d0=="=>"?e0($w,sw?eC:yw,y3):d0=="operator"?/\+\+|--/.test(sy)||i1&&sy=="!"?e0(ev):i1&&sy=="<"&&S0.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?e0(Mw(">"),mO(DA,">"),tx,ev):sy=="?"?e0(pw,Px(":"),T2):e0(T2):d0=="quasi"?Z1(nk,ev):d0!=";"?d0=="("?iN(gw,")","call",ev):d0=="."?e0(Bv,ev):d0=="["?e0(Mw("]"),$k,Px("]"),tx,ev):i1&&sy=="as"?(S0.marked="keyword",e0(DA,ev)):d0=="regexp"?(S0.state.lastType=S0.marked="operator",S0.stream.backUp(S0.stream.pos-S0.stream.start-1),e0(T2)):void 0:void 0}function nk(d0,sy){return d0!="quasi"?Z1():sy.slice(sy.length-2)!="${"?e0(nk):e0($k,gx)}function gx(d0){if(d0=="}")return S0.marked="string-2",S0.state.tokenize=D0,e0(nk)}function yw(d0){return J0(S0.stream,S0.state),Z1(d0=="{"?m2:pw)}function eC(d0){return J0(S0.stream,S0.state),Z1(d0=="{"?m2:gw)}function oA(d0,sy){if(sy=="target")return S0.marked="keyword",e0(l4)}function Qy(d0,sy){if(sy=="target")return S0.marked="keyword",e0(ZC)}function k2(d0){return d0==":"?e0(tx,m2):Z1(l4,Px(";"),tx)}function Bv(d0){if(d0=="variable")return S0.marked="property",e0()}function fC(d0,sy){return d0=="async"?(S0.marked="property",e0(fC)):d0=="variable"||S0.style=="keyword"?(S0.marked="property",sy=="get"||sy=="set"?e0(LN):(i1&&S0.state.fatArrowAt==S0.stream.start&&(sw=S0.stream.match(/^\s*:\s*/,!1))&&(S0.state.fatArrowAt=S0.stream.pos+sw[0].length),e0($L))):d0=="number"||d0=="string"?(S0.marked=Dh?"property":S0.style+" property",e0($L)):d0=="jsonld-keyword"?e0($L):i1&&ny(sy)?(S0.marked="keyword",e0(fC)):d0=="["?e0(pw,bD,Px("]"),$L):d0=="spread"?e0(gw,$L):sy=="*"?(S0.marked="keyword",e0(fC)):d0==":"?Z1($L):void 0;var sw}function LN(d0){return d0!="variable"?Z1($L):(S0.marked="property",e0(FN))}function $L(d0){return d0==":"?e0(gw):d0=="("?Z1(FN):void 0}function mO(d0,sy,sw){function ev(T2,i3){if(sw?sw.indexOf(T2)>-1:T2==","){var M3=S0.state.lexical;return M3.info=="call"&&(M3.pos=(M3.pos||0)+1),e0(function(Lk,C4){return Lk==sy||C4==sy?Z1():Z1(d0)},ev)}return T2==sy||i3==sy?e0():sw&&sw.indexOf(";")>-1?Z1(d0):e0(Px(sy))}return function(T2,i3){return T2==sy||i3==sy?e0():Z1(d0,ev)}}function iN(d0,sy,sw){for(var ev=3;ev"),DA):d0=="quasi"?Z1(E4,T4):void 0}function Zx(d0){if(d0=="=>")return e0(DA)}function o7(d0){return d0.match(/[\}\)\]]/)?e0():d0==","||d0==";"?e0(o7):Z1(DO,o7)}function DO(d0,sy){return d0=="variable"||S0.style=="keyword"?(S0.marked="property",e0(DO)):sy=="?"||d0=="number"||d0=="string"?e0(DO):d0==":"?e0(DA):d0=="["?e0(Px("variable"),a7,Px("]"),DO):d0=="("?Z1(JD,DO):d0.match(/[;\}\)\],]/)?void 0:e0()}function E4(d0,sy){return d0!="quasi"?Z1():sy.slice(sy.length-2)!="${"?e0(E4):e0(DA,S4)}function S4(d0){if(d0=="}")return S0.marked="string-2",S0.state.tokenize=D0,e0(E4)}function S9(d0,sy){return d0=="variable"&&S0.stream.match(/^\s*[?:]/,!1)||sy=="?"?e0(S9):d0==":"?e0(DA):d0=="spread"?e0(S9):Z1(DA)}function T4(d0,sy){return sy=="<"?e0(Mw(">"),mO(DA,">"),tx,T4):sy=="|"||d0=="."||sy=="&"?e0(DA):d0=="["?e0(DA,Px("]"),T4):sy=="extends"||sy=="implements"?(S0.marked="keyword",e0(DA)):sy=="?"?e0(DA,Px(":"),DA):void 0}function LL(d0,sy){if(sy=="<")return e0(Mw(">"),mO(DA,">"),tx,T4)}function HO(){return Z1(DA,AI)}function AI(d0,sy){if(sy=="=")return e0(DA)}function s7(d0,sy){return sy=="enum"?(S0.marked="keyword",e0(u7)):Z1(PN,bD,kI,T9)}function PN(d0,sy){return i1&&ny(sy)?(S0.marked="keyword",e0(PN)):d0=="variable"?(R0(sy),e0()):d0=="spread"?e0(PN):d0=="["?iN(HB,"]"):d0=="{"?iN(GB,"}"):void 0}function GB(d0,sy){return d0!="variable"||S0.stream.match(/^\s*:/,!1)?(d0=="variable"&&(S0.marked="property"),d0=="spread"?e0(PN):d0=="}"?Z1():d0=="["?e0(pw,Px("]"),Px(":"),GB):e0(Px(":"),PN,kI)):(R0(sy),e0(kI))}function HB(){return Z1(PN,kI)}function kI(d0,sy){if(sy=="=")return e0(gw)}function T9(d0){if(d0==",")return e0(s7)}function p6(d0,sy){if(d0=="keyword b"&&sy=="else")return e0(Mw("form","else"),m2,tx)}function dz(d0,sy){return sy=="await"?e0(dz):d0=="("?e0(Mw(")"),nq,tx):void 0}function nq(d0){return d0=="var"?e0(s7,iM):d0=="variable"?e0(iM):Z1(iM)}function iM(d0,sy){return d0==")"?e0():d0==";"?e0(iM):sy=="in"||sy=="of"?(S0.marked="keyword",e0(pw,iM)):Z1(pw,iM)}function FN(d0,sy){return sy=="*"?(S0.marked="keyword",e0(FN)):d0=="variable"?(R0(sy),e0(FN)):d0=="("?e0($w,Mw(")"),mO(aM,")"),tx,hz,m2,y3):i1&&sy=="<"?e0(Mw(">"),mO(HO,">"),tx,FN):void 0}function JD(d0,sy){return sy=="*"?(S0.marked="keyword",e0(JD)):d0=="variable"?(R0(sy),e0(JD)):d0=="("?e0($w,Mw(")"),mO(aM,")"),tx,hz,y3):i1&&sy=="<"?e0(Mw(">"),mO(HO,">"),tx,JD):void 0}function fz(d0,sy){return d0=="keyword"||d0=="variable"?(S0.marked="type",e0(fz)):sy=="<"?e0(Mw(">"),mO(HO,">"),tx):void 0}function aM(d0,sy){return sy=="@"&&e0(pw,aM),d0=="spread"?e0(aM):i1&&ny(sy)?(S0.marked="keyword",e0(aM)):i1&&d0=="this"?e0(bD,kI):Z1(PN,bD,kI)}function qB(d0,sy){return d0=="variable"?o$(d0,sy):YB(d0,sy)}function o$(d0,sy){if(d0=="variable")return R0(sy),e0(YB)}function YB(d0,sy){return sy=="<"?e0(Mw(">"),mO(HO,">"),tx,YB):sy=="extends"||sy=="implements"||i1&&d0==","?(sy=="implements"&&(S0.marked="keyword"),e0(i1?DA:pw,YB)):d0=="{"?e0(Mw("}"),eR,tx):void 0}function eR(d0,sy){return d0=="async"||d0=="variable"&&(sy=="static"||sy=="get"||sy=="set"||i1&&ny(sy))&&S0.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S0.marked="keyword",e0(eR)):d0=="variable"||S0.style=="keyword"?(S0.marked="property",e0(s$,eR)):d0=="number"||d0=="string"?e0(s$,eR):d0=="["?e0(pw,bD,Px("]"),s$,eR):sy=="*"?(S0.marked="keyword",e0(eR)):i1&&d0=="("?Z1(JD,eR):d0==";"||d0==","?e0(eR):d0=="}"?e0():sy=="@"?e0(pw,eR):void 0}function s$(d0,sy){if(sy=="!"||sy=="?")return e0(s$);if(d0==":")return e0(DA,kI);if(sy=="=")return e0(gw);var sw=S0.state.lexical.prev;return Z1(sw&&sw.info=="interface"?JD:FN)}function c7(d0,sy){return sy=="*"?(S0.marked="keyword",e0(mx,Px(";"))):sy=="default"?(S0.marked="keyword",e0(pw,Px(";"))):d0=="{"?e0(mO(pz,"}"),mx,Px(";")):Z1(m2)}function pz(d0,sy){return sy=="as"?(S0.marked="keyword",e0(Px("variable"))):d0=="variable"?Z1(gw,pz):void 0}function PL(d0){return d0=="string"?e0():d0=="("?Z1(pw):d0=="."?Z1(l4):Z1(OI,l7,mx)}function OI(d0,sy){return d0=="{"?iN(OI,"}"):(d0=="variable"&&R0(sy),sy=="*"&&(S0.marked="keyword"),e0(x4))}function l7(d0){if(d0==",")return e0(OI,l7)}function x4(d0,sy){if(sy=="as")return S0.marked="keyword",e0(OI)}function mx(d0,sy){if(sy=="from")return S0.marked="keyword",e0(pw)}function g6(d0){return d0=="]"?e0():Z1(mO(gw,"]"))}function u7(){return Z1(Mw("form"),PN,Px("{"),Mw("}"),mO(GR,"}"),tx,tx)}function GR(){return Z1(PN,kI)}function RA(d0,sy,sw){return sy.tokenize==i0&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(sy.lastType)||sy.lastType=="quasi"&&/\{\s*$/.test(d0.string.slice(0,d0.pos-(sw||0)))}return $w.lex=px.lex=!0,y3.lex=!0,tx.lex=!0,{startState:function(d0){var sy={tokenize:i0,lastType:"sof",cc:[],lexical:new pv((d0||0)-Ah,0,"block",!1),localVars:hh.localVars,context:hh.localVars&&new Zv(null,null,!1),indented:d0||0};return hh.globalVars&&typeof hh.globalVars=="object"&&(sy.globalVars=hh.globalVars),sy},token:function(d0,sy){if(d0.sol()&&(sy.lexical.hasOwnProperty("align")||(sy.lexical.align=!1),sy.indented=d0.indentation(),J0(d0,sy)),sy.tokenize!=r0&&d0.eatSpace())return null;var sw=sy.tokenize(d0,sy);return mh=="comment"?sw:(sy.lastType=mh!="operator"||Eh!="++"&&Eh!="--"?mh:"incdec",ov(sy,sw,mh,Eh,d0))},indent:function(d0,sy){if(d0.tokenize==r0||d0.tokenize==D0)return ch.Pass;if(d0.tokenize!=i0)return 0;var sw,ev=sy&&sy.charAt(0),T2=d0.lexical;if(!/^\s*else\b/.test(sy))for(var i3=d0.cc.length-1;i3>=0;--i3){var M3=d0.cc[i3];if(M3==tx)T2=T2.prev;else if(M3!=p6&&M3!=y3)break}for(;(T2.type=="stat"||T2.type=="form")&&(ev=="}"||(sw=d0.cc[d0.cc.length-1])&&(sw==l4||sw==ZC)&&!/^[,\.=+\-*:?[\(]/.test(sy));)T2=T2.prev;$h&&T2.type==")"&&T2.prev.type=="stat"&&(T2=T2.prev);var Lk=T2.type,C4=ev==Lk;return Lk=="vardef"?T2.indented+(d0.lastType=="operator"||d0.lastType==","?T2.info.length+1:0):Lk=="form"&&ev=="{"?T2.indented:Lk=="form"?T2.indented+Ah:Lk=="stat"?T2.indented+(function(_D,CC){return _D.lastType=="operator"||_D.lastType==","||_1.test(CC.charAt(0))||/[,.]/.test(CC.charAt(0))}(d0,sy)?$h||Ah:0):T2.info!="switch"||C4||hh.doubleIndentSwitch==0?T2.align?T2.column+(C4?0:1):T2.indented+(C4?0:Ah):T2.indented+(/^(?:case|default)\b/.test(sy)?Ah:2*Ah)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:jh?null:"/*",blockCommentEnd:jh?null:"*/",blockCommentContinue:jh?null:" * ",lineComment:jh?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:jh?"json":"javascript",jsonldMode:Dh,jsonMode:jh,expressionAllowed:RA,skipExpression:function(d0){ov(d0,"atom","atom","true",new ch.StringStream("",2,null))}}}),ch.registerHelper("wordChars","javascript",/[\w$]/),ch.defineMIME("text/javascript","javascript"),ch.defineMIME("text/ecmascript","javascript"),ch.defineMIME("application/javascript","javascript"),ch.defineMIME("application/x-javascript","javascript"),ch.defineMIME("application/ecmascript","javascript"),ch.defineMIME("application/json",{name:"javascript",json:!0}),ch.defineMIME("application/x-json",{name:"javascript",json:!0}),ch.defineMIME("application/manifest+json",{name:"javascript",json:!0}),ch.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),ch.defineMIME("text/typescript",{name:"javascript",typescript:!0}),ch.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(CodeMirror),function(ch){var oh={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},hh={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ch.defineMode("xml",function(mh,Eh){var Ah,$h,Dh=mh.indentUnit,jh={},t1=Eh.htmlMode?oh:hh;for(var i1 in t1)jh[i1]=t1[i1];for(var i1 in Eh)jh[i1]=Eh[i1];function n1(R0,V0){function ny(Q2){return V0.tokenize=Q2,Q2(R0,V0)}var Zv=R0.next();return Zv=="<"?R0.eat("!")?R0.eat("[")?R0.match("CDATA[")?ny(_1("atom","]]>")):null:R0.match("--")?ny(_1("comment","-->")):R0.match("DOCTYPE",!0,!0)?(R0.eatWhile(/[\w\._\-]/),ny(x1(1))):null:R0.eat("?")?(R0.eatWhile(/[\w\._\-]/),V0.tokenize=_1("meta","?>"),"meta"):(Ah=R0.eat("/")?"closeTag":"openTag",V0.tokenize=p1,"tag bracket"):Zv=="&"?(R0.eat("#")?R0.eat("x")?R0.eatWhile(/[a-fA-F\d]/)&&R0.eat(";"):R0.eatWhile(/[\d]/)&&R0.eat(";"):R0.eatWhile(/[\w\.\-:]/)&&R0.eat(";"))?"atom":"error":(R0.eatWhile(/[^&<]/),null)}function p1(R0,V0){var ny,Zv,Q2=R0.next();if(Q2==">"||Q2=="/"&&R0.eat(">"))return V0.tokenize=n1,Ah=Q2==">"?"endTag":"selfcloseTag","tag bracket";if(Q2=="=")return Ah="equals",null;if(Q2=="<"){V0.tokenize=n1,V0.state=J0,V0.tagName=V0.tagStart=null;var Qw=V0.tokenize(R0,V0);return Qw?Qw+" tag error":"tag error"}return/[\'\"]/.test(Q2)?(V0.tokenize=(ny=Q2,Zv=function($w,px){for(;!$w.eol();)if($w.next()==ny){px.tokenize=p1;break}return"string"},Zv.isInAttribute=!0,Zv),V0.stringStartCol=R0.column(),V0.tokenize(R0,V0)):(R0.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function _1(R0,V0){return function(ny,Zv){for(;!ny.eol();){if(ny.match(V0)){Zv.tokenize=n1;break}ny.next()}return R0}}function x1(R0){return function(V0,ny){for(var Zv;(Zv=V0.next())!=null;){if(Zv=="<")return ny.tokenize=x1(R0+1),ny.tokenize(V0,ny);if(Zv==">"){if(R0==1){ny.tokenize=n1;break}return ny.tokenize=x1(R0-1),ny.tokenize(V0,ny)}}return"meta"}}function V1(R0){return R0&&R0.toLowerCase()}function i0(R0,V0,ny){this.prev=R0.context,this.tagName=V0||"",this.indent=R0.indented,this.startOfLine=ny,(jh.doNotIndent.hasOwnProperty(V0)||R0.context&&R0.context.noIndent)&&(this.noIndent=!0)}function r0(R0){R0.context&&(R0.context=R0.context.prev)}function D0(R0,V0){for(var ny;;){if(!R0.context||(ny=R0.context.tagName,!jh.contextGrabbers.hasOwnProperty(V1(ny))||!jh.contextGrabbers[V1(ny)].hasOwnProperty(V1(V0))))return;r0(R0)}}function J0(R0,V0,ny){return R0=="openTag"?(ny.tagStart=V0.column(),Iy):R0=="closeTag"?pv:J0}function Iy(R0,V0,ny){return R0=="word"?(ny.tagName=V0.current(),$h="tag",S0):jh.allowMissingTagName&&R0=="endTag"?($h="tag bracket",S0(R0,V0,ny)):($h="error",Iy)}function pv(R0,V0,ny){if(R0=="word"){var Zv=V0.current();return ny.context&&ny.context.tagName!=Zv&&jh.implicitlyClosed.hasOwnProperty(V1(ny.context.tagName))&&r0(ny),ny.context&&ny.context.tagName==Zv||jh.matchClosing===!1?($h="tag",Sy):($h="tag error",ov)}return jh.allowMissingTagName&&R0=="endTag"?($h="tag bracket",Sy(R0,V0,ny)):($h="error",ov)}function Sy(R0,V0,ny){return R0!="endTag"?($h="error",Sy):(r0(ny),J0)}function ov(R0,V0,ny){return $h="error",Sy(R0,0,ny)}function S0(R0,V0,ny){if(R0=="word")return $h="attribute",Z1;if(R0=="endTag"||R0=="selfcloseTag"){var Zv=ny.tagName,Q2=ny.tagStart;return ny.tagName=ny.tagStart=null,R0=="selfcloseTag"||jh.autoSelfClosers.hasOwnProperty(V1(Zv))?D0(ny,Zv):(D0(ny,Zv),ny.context=new i0(ny,Zv,Q2==ny.indented)),J0}return $h="error",S0}function Z1(R0,V0,ny){return R0=="equals"?e0:(jh.allowMissing||($h="error"),S0(R0,0,ny))}function e0(R0,V0,ny){return R0=="string"?Q0:R0=="word"&&jh.allowUnquoted?($h="string",S0):($h="error",S0(R0,0,ny))}function Q0(R0,V0,ny){return R0=="string"?Q0:S0(R0,0,ny)}return n1.isInText=!0,{startState:function(R0){var V0={tokenize:n1,state:J0,indented:R0||0,tagName:null,tagStart:null,context:null};return R0!=null&&(V0.baseIndent=R0),V0},token:function(R0,V0){if(!V0.tagName&&R0.sol()&&(V0.indented=R0.indentation()),R0.eatSpace())return null;Ah=null;var ny=V0.tokenize(R0,V0);return(ny||Ah)&&ny!="comment"&&($h=null,V0.state=V0.state(Ah||ny,R0,V0),$h&&(ny=$h=="error"?ny+" error":$h)),ny},indent:function(R0,V0,ny){var Zv=R0.context;if(R0.tokenize.isInAttribute)return R0.tagStart==R0.indented?R0.stringStartCol+1:R0.indented+Dh;if(Zv&&Zv.noIndent)return ch.Pass;if(R0.tokenize!=p1&&R0.tokenize!=n1)return ny?ny.match(/^(\s*)/)[0].length:0;if(R0.tagName)return jh.multilineTagIndentPastTag!==!1?R0.tagStart+R0.tagName.length+2:R0.tagStart+Dh*(jh.multilineTagIndentFactor||1);if(jh.alignCDATA&&/$/,blockCommentStart:"",configuration:jh.htmlMode?"html":"xml",helperType:jh.htmlMode?"html":"xml",skipAttribute:function(R0){R0.state==e0&&(R0.state=S0)},xmlCurrentTag:function(R0){return R0.tagName?{name:R0.tagName,close:R0.type=="closeTag"}:null},xmlCurrentContext:function(R0){for(var V0=[],ny=R0.context;ny;ny=ny.prev)V0.push(ny.tagName);return V0.reverse()}}}),ch.defineMIME("text/xml","xml"),ch.defineMIME("application/xml","xml"),ch.mimeModes.hasOwnProperty("text/html")||ch.defineMIME("text/html",{name:"xml",htmlMode:!0})}(CodeMirror),function(ch){function oh(mh,Eh,Ah,$h){this.state=mh,this.mode=Eh,this.depth=Ah,this.prev=$h}function hh(mh){return new oh(ch.copyState(mh.mode,mh.state),mh.mode,mh.depth,mh.prev&&hh(mh.prev))}ch.defineMode("jsx",function(mh,Eh){var Ah=ch.getMode(mh,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),$h=ch.getMode(mh,Eh&&Eh.base||"javascript");function Dh(t1){var i1=t1.tagName;t1.tagName=null;var n1=Ah.indent(t1,"","");return t1.tagName=i1,n1}function jh(t1,i1){return i1.context.mode==Ah?function(n1,p1,_1){if(_1.depth==2)return n1.match(/^.*?\*\//)?_1.depth=1:n1.skipToEnd(),"comment";if(n1.peek()=="{"){Ah.skipAttribute(_1.state);var x1=Dh(_1.state),V1=_1.state.context;if(V1&&n1.match(/^[^>]*>\s*$/,!1)){for(;V1.prev&&!V1.startOfLine;)V1=V1.prev;V1.startOfLine?x1-=mh.indentUnit:_1.prev.state.lexical&&(x1=_1.prev.state.lexical.indented)}else _1.depth==1&&(x1+=mh.indentUnit);return p1.context=new oh(ch.startState($h,x1),$h,0,p1.context),null}if(_1.depth==1){if(n1.peek()=="<")return Ah.skipAttribute(_1.state),p1.context=new oh(ch.startState(Ah,Dh(_1.state)),Ah,0,p1.context),null;if(n1.match("//"))return n1.skipToEnd(),"comment";if(n1.match("/*"))return _1.depth=2,jh(n1,p1)}var i0,r0=Ah.token(n1,_1.state),D0=n1.current();return/\btag\b/.test(r0)?/>$/.test(D0)?_1.state.context?_1.depth=0:p1.context=p1.context.prev:/^-1&&n1.backUp(D0.length-i0),r0}(t1,i1,i1.context):function(n1,p1,_1){if(n1.peek()=="<"&&$h.expressionAllowed(n1,_1.state))return p1.context=new oh(ch.startState(Ah,$h.indent(_1.state,"","")),Ah,0,p1.context),$h.skipExpression(_1.state),null;var x1=$h.token(n1,_1.state);if(!x1&&_1.depth!=null){var V1=n1.current();V1=="{"?_1.depth++:V1=="}"&&--_1.depth==0&&(p1.context=p1.context.prev)}return x1}(t1,i1,i1.context)}return{startState:function(){return{context:new oh(ch.startState($h),$h)}},copyState:function(t1){return{context:hh(t1.context)}},token:jh,indent:function(t1,i1,n1){return t1.context.mode.indent(t1.context.state,i1,n1)},innerMode:function(t1){return t1.context}}},"xml","javascript"),ch.defineMIME("text/jsx","jsx"),ch.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}(CodeMirror);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const CodeMirror$1=window.CodeMirror,styles$3=i$h`/** + * This file is derived from \`code-mirror/lib/codemirror.css\`, modified in the + * following ways: + * + * - CSS custom properties added. + * - Rules for unused features and addons removed. + * - Unnecessary vendor prefixes removed. + * - \`.cm-s-default\` class selectors removed. + * - Empty rules removed. + */ + +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: var(--playground-code-font-family, monospace); + font-size: var(--playground-code-font-size, 14px); + padding: var(--playground-code-padding, 0); + height: 350px; + color: var(--playground-code-default-color, #000); + background: var(--playground-code-background, #fff); + direction: ltr; + /* CodeMirror uses z-indexes up to 6 to e.g. place scrollbars above the code + area. However, this can create undesirable stacking effects with the rest + of the page. Force a new stacking context. */ + isolation: isolate; + line-height: var(--playground-code-line-height, 1.4em); +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + padding: var( + --playground-code-line-padding, + 0 4px + ); /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + background: var( + --playground-code-background, + #fff + ); /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: var(--playground-code-gutter-border-right, none); + background: var( + --playground-code-gutter-background, + var(--playground-code-background, #fff) + ); + box-shadow: var(--playground-code-gutter-box-shadow, none); + white-space: nowrap; +} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: var(--playground-code-linenumber-color, #767676); + white-space: nowrap; + margin-right: 1em; +} +.CodeMirror-code > div > .CodeMirror-line { + /* Some extra room between the line number gutter and the line */ + padding-left: 0.7em; +} + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 2px solid + var( + --playground-code-cursor-color, + var(--playground-code-default-color, #000) + ); + border-right: none; + width: 0; +} + +@keyframes blink { + 0% { + } + 50% { + background: transparent; + } + 100% { + } +} + +/* DEFAULT THEME */ + +.cm-header, +.cm-strong { + font-weight: bold; +} +.cm-em { + font-style: italic; +} +.cm-link { + text-decoration: underline; +} +.cm-strikethrough { + text-decoration: line-through; +} + +.cm-keyword { + color: var(--playground-code-keyword-color, #708); +} +.cm-atom { + color: var(--playground-code-atom-color, #219); +} +.cm-number { + color: var(--playground-code-number-color, #164); +} +.cm-def { + color: var(--playground-code-def-color, #00f); +} +.cm-variable { + color: var(--playground-code-variable-color, #000); +} +.cm-property { + color: var(--playground-code-property-color, #000); +} +.cm-operator { + color: var(--playground-code-operator-color, #000); +} +.cm-variable-2 { + color: var(--playground-code-variable-2-color, #05a); +} +.cm-variable-3 { + color: var(--playground-code-variable-3-color, #085); +} +.cm-type { + color: var(--playground-code-type-color, #085); +} +.cm-comment { + color: var(--playground-code-comment-color, #a50); +} +.cm-string { + color: var(--playground-code-string-color, #a11); +} +.cm-string-2 { + color: var(--playground-code-string-2-color, #f50); +} +.cm-meta { + color: var(--playground-code-meta-color, #555); +} +.cm-qualifier { + color: var(--playground-code-qualifier-color, #555); +} +.cm-builtin { + color: var(--playground-code-builtin-color, #30a); +} +.cm-tag { + color: var(--playground-code-tag-color, #170); +} +.cm-attribute { + color: var(--playground-code-attribute-color, #00c); +} +.cm-callee { + color: var(--playground-code-callee-color, #000); +} + +.CodeMirror-composing { + border-bottom: 2px solid; +} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 50px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -50px; + margin-right: -50px; + padding-bottom: 50px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; + border-right: 50px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, +.CodeMirror-hscrollbar, +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + outline: none; +} +.CodeMirror-vscrollbar { + right: 0; + top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; + left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; + bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; + bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; + left: 0; + top: 0; + min-height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -50px; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; + bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper ::selection { + background: transparent; +} + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + font-variant-ligatures: contextual; +} +.CodeMirror-wrap pre.CodeMirror-line, +.CodeMirror-wrap pre.CodeMirror-line-like { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-rtl pre { + direction: rtl; +} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} +.CodeMirror-measure pre { + position: static; +} + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { + background: var(--playground-code-selection-background, #d7d4f0); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--playground-code-selection-background, #d7d4f0); +} +.CodeMirror-crosshair { + cursor: crosshair; +} +.CodeMirror-line::selection, +.CodeMirror-line > span::selection, +.CodeMirror-line > span > span::selection { + background: var(--playground-code-selection-background, #d7d4f0); +} + +/* Completions */ + +.CodeMirror-hints { + position: absolute; + z-index: 10; + overflow: hidden; + list-style: none; + + margin: 0; + padding: 0; + + box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, + rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px; + border: 1px solid var(--playground-code-selection-background, silver); + + background: var(--playground-code-background, white); + font-size: var(--playground-code-font-size, 14px); + font-family: var(--playground-code-font-family, monospace); + + max-height: 20em; + width: 600px; + max-width: min(600px, 80vw); + overflow-y: auto; +} + +.CodeMirror-hint { + margin: 0; + padding: 0 6px; + white-space: pre; + color: var(--playground-code-cursor-color, black); + cursor: pointer; + display: flex; + justify-content: space-between; +} + +@media (pointer: coarse) { + .CodeMirror-hint { + padding: 1em 6px; + } +} + +.CodeMirror-hint-active { + background: var(--playground-code-background, rgba(0, 0, 0, 0.2)); + filter: brightness(1.2); +} + +.CodeMirror-hint mark { + background: inherit; + color: var(--playground-code-qualifier-color, #555); +} + +.CodeMirror-hint .hint-object-name { + padding-right: 2em; + white-space: nowrap; +} + +.CodeMirror-hint .hint-object-details { + flex-basis: 80%; + font-size: calc(var(--playground-code-font-size, 14px) * 0.9); + color: var(--playground-code-string-2-color, white); + opacity: 0.8; + text-align: right; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Used to force a border model for a node */ +.cm-force-border { + padding-right: 0.1px; +} + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { + content: ''; +} + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { + background: none; +} +`;/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let PlaygroundInternalOverlay=class extends s$d{render(){return x$a`
`}};PlaygroundInternalOverlay.styles=i$h` + :host { + position: absolute; + width: 100%; + height: 100%; + box-sizing: border-box; + left: 0; + top: 0; + display: flex; + align-items: center; + justify-content: center; + background: transparent; + z-index: 9; + background: rgba(0, 0, 0, 0.32); + overflow-y: auto; + } + + #message { + background: #fff; + color: #000; + padding: 10px 20px; + border-radius: 5px; + box-shadow: rgba(0, 0, 0, 0.3) 0 2px 10px; + } + `;PlaygroundInternalOverlay=__decorate$6([e$i("playground-internal-overlay")],PlaygroundInternalOverlay);/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let PlaygroundCodeEditor=class extends s$d{constructor(){super(...arguments),this._docCache=new WeakMap,this.lineNumbers=!1,this.lineWrapping=!1,this.readonly=!1,this.noCompletions=!1,this._completionsOpen=!1,this._currentCompletionSelectionLabel="",this._currentCompletionRequestId=0,this.pragmas="on",this._showKeyboardHelp=!1,this._resizing=!1,this._valueChangingFromOutside=!1,this._diagnosticMarkers=[],this._diagnosticsMouseoverListenerActive=!1,this._onMouseOverWithDiagnostics=oh=>{var hh,mh,Eh;if(!(!((hh=this.diagnostics)===null||hh===void 0)&&hh.length))return;const Ah=(mh=oh.target.className)===null||mh===void 0?void 0:mh.match(/diagnostic-(\d+)/);if(Ah===null){this._tooltipDiagnostic=void 0;return}const $h=Number(Ah[1]),Dh=this.diagnostics[$h];if(Dh===((Eh=this._tooltipDiagnostic)===null||Eh===void 0?void 0:Eh.diagnostic))return;let jh="";const t1=this.getBoundingClientRect(),i1=oh.target.getBoundingClientRect(),n1=t1.y+t1.height/2;i1.y + ${this._showKeyboardHelp?x$a` +

+ Press Enter to start editing
+ Press Escape to exit editor +

+
`:A$8} + ${this._cmDom} +
+
+ ${(hh=this._tooltipDiagnostic)===null||hh===void 0?void 0:hh.diagnostic.message} +
+
+ + `}connectedCallback(){typeof ResizeObserver=="function"&&(this._resizeObserver=new ResizeObserver(()=>{var oh;this._resizing||(this._resizing=!0,(oh=this._codemirror)===null||oh===void 0||oh.refresh(),this._resizing=!1)}),this._resizeObserver.observe(this)),super.connectedCallback()}disconnectedCallback(){var oh;(oh=this._resizeObserver)===null||oh===void 0||oh.disconnect(),this._resizeObserver=void 0,super.disconnectedCallback()}_createView(){var oh;const hh=CodeMirror$1(mh=>{this._cmDom=mh,this._resizing=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{var Eh;(Eh=this._codemirror)===null||Eh===void 0||Eh.refresh(),this._resizing=!1})})},{value:(oh=this.value)!==null&&oh!==void 0?oh:"",lineNumbers:this.lineNumbers,lineWrapping:this.lineWrapping,mode:this._getLanguageMode(),readOnly:this.readonly,inputStyle:"contenteditable",tabindex:-1,extraKeys:{Tab:()=>{var mh;hh.replaceSelection(Array(((mh=hh.getOption("indentUnit"))!==null&&mh!==void 0?mh:2)+1).join(" "))},"Ctrl-Space":()=>{const mh=this.tokenUnderCursor.string.trim();this._requestCompletions({isRefinement:!1,tokenUnderCursor:mh})},"Ctrl-/":()=>hh.toggleComment(),"Cmd-/":()=>hh.toggleComment()}});hh.on("change",(mh,Eh)=>{this._value=hh.getValue(),this._valueChangingFromOutside?(this._applyHideAndFoldRegions(),this._showDiagnostics()):(this.dispatchEvent(new Event("change")),this._requestCompletionsIfNeeded(Eh))}),this.lineWrapping&&hh.on("renderLine",this._onRenderLine),this._codemirror=hh}_onRenderLine(oh,hh,mh){const Ah=oh.getOption("lineNumbers")?"0.7em":"4px",$h=oh.getOption("tabSize")||4,Dh=CodeMirror$1.countColumn(hh.text,null,$h);Dh>0&&(mh.style.textIndent=`-${Dh}ch`,mh.style.paddingLeft=`calc(${Ah} + ${Dh}ch)`)}_requestCompletionsIfNeeded(oh){if(this.noCompletions||!this._currentFiletypeSupportsCompletion()||!this._codemirror)return;const hh=this._codemirror.getTokenAt(oh.from),mh=this.tokenUnderCursor.string.trim(),Eh=mh.trim(),Ah=oh.origin==="+input",$h=(mh.length>1||hh.string===".")&&Ah,Dh=oh.origin==="complete";if(!(Eh.length<=0)){if(Dh){this._completions=[];return}this._requestCompletions({isRefinement:$h,tokenUnderCursor:mh})}}_requestCompletions({isRefinement:oh,tokenUnderCursor:hh}){if(this.noCompletions||!this._currentFiletypeSupportsCompletion()||!this._codemirror)return;const mh=++this._currentCompletionRequestId,Eh=this.cursorIndex;this.dispatchEvent(new CustomEvent("request-completions",{detail:{isRefinement:oh,fileContent:this.value,tokenUnderCursor:hh,cursorIndex:this.cursorIndex,provideCompletions:Ah=>this._onCompletionsProvided(mh,Ah,Eh)}}))}_onCompletionsProvided(oh,hh,mh){oh!==this._currentCompletionRequestId||mh!==this.cursorIndex||(this._completions=hh)}_currentFiletypeSupportsCompletion(){return this.type==="ts"}focus(){var oh;(oh=this._codemirrorEditable)===null||oh===void 0||oh.focus()}_completionsAsHints(){var oh,hh;const mh=this._codemirror,Eh=mh.getCursor("start"),Ah=mh.getTokenAt(Eh),$h=Eh.line,Dh=(hh=(oh=this._completions)===null||oh===void 0?void 0:oh.map((t1,i1)=>({text:t1.text,displayText:t1.displayText,render:(n1,p1,_1)=>{const x1=_1;this._renderHint(n1,p1,x1,i1===0?t1.details:void 0)},get details(){return t1.details}})))!==null&&hh!==void 0?hh:[],jh={from:{line:$h,ch:Ah.start},to:{line:$h,ch:Ah.end},list:Dh};return CodeMirror$1.on(jh,"select",async(t1,i1)=>{var n1;this._isCodeEditorHint(t1)&&this._currentCompletionSelectionLabel!==t1.text&&((n1=this._onCompletionSelectedChange)===null||n1===void 0||n1.call(this),this._renderHint(i1,jh,t1,t1.details))}),CodeMirror$1.on(jh,"shown",()=>{window.requestAnimationFrame(()=>{this._completionsOpen=!0})}),CodeMirror$1.on(jh,"close",()=>{window.requestAnimationFrame(()=>{this._completionsOpen=!1})}),jh}_isCodeEditorHint(oh){return typeof oh!="string"&&Object.prototype.hasOwnProperty.call(oh,"details")}_renderHint(oh,hh,mh,Eh){var Ah;if(!oh)return;const $h=hh.list.indexOf(mh),Dh=(Ah=this._completions)===null||Ah===void 0?void 0:Ah[$h],jh=this._buildHintObjectName(mh.displayText,Dh);this._renderCompletionItem(jh,oh),Eh!==void 0&&Eh.then(t1=>{this._renderCompletionItemWithDetails(jh,t1,oh),this._onCompletionSelectedChange=()=>this._renderHint(oh,hh,mh),this._currentCompletionSelectionLabel=mh.text})}_renderCompletionItem(oh,hh){D$4(x$a`${oh}`,hh)}_renderCompletionItemWithDetails(oh,hh,mh){D$4(x$a`${oh} + ${hh.text} `,mh)}_buildHintObjectName(oh,hh){var mh;const Eh=oh??"",Ah=(mh=hh==null?void 0:hh.matches)!==null&&mh!==void 0?mh:[];if(Ah.length<=0)return Eh;const Dh=Ah[0].indices[0],jh=Dh[0],t1=Dh[1],i1=Eh==null?void 0:Eh.substring(0,jh),n1=Eh==null?void 0:Eh.substring(jh,t1+1),p1=Eh==null?void 0:Eh.substring(t1+1);return x$a` + ${i1}${n1}${p1} + `}_showCompletions(){const oh=this._codemirror;if(!oh||!this._completions||this._completions.length<=0)return;const hh={hint:this._completionsAsHints.bind(this),completeSingle:!1,closeOnPick:!0,closeOnUnfocus:!0,container:this._focusContainer,alignWithWord:!0};oh.showHint(hh)}_onMousedown(){var oh;(oh=this._codemirrorEditable)===null||oh===void 0||oh.focus()}_onFocus(){this._showKeyboardHelp=!0}_onBlur(){this._showKeyboardHelp=!1}_onKeyDown(oh){var hh,mh;oh.key==="Enter"&&oh.target===this._focusContainer?((hh=this._codemirrorEditable)===null||hh===void 0||hh.focus(),oh.preventDefault()):oh.key==="Escape"&&(this._completionsOpen||(mh=this._focusContainer)===null||mh===void 0||mh.focus())}async _applyHideAndFoldRegions(){const oh=this._codemirror;if(!oh)return;for(const Dh of oh.getAllMarks())Dh.clear();if(this.pragmas==="off-visible")return;const hh=this._maskPatternForLang();if(hh===void 0)return;const mh=oh.getDoc(),Eh=(Dh,jh)=>{oh.foldCode(0,{widget:"…",rangeFinder:()=>({from:mh.posFromIndex(Dh),to:mh.posFromIndex(jh)})})},Ah=(Dh,jh,t1)=>{mh.markText(mh.posFromIndex(Dh),mh.posFromIndex(jh),{collapsed:!0,readOnly:t1})},$h=oh.getValue();for(const Dh of $h.matchAll(hh)){const[,jh,t1,i1,n1]=Dh,p1=Dh.index;if(p1===void 0)continue;const _1=p1+jh.length;Ah(p1,_1,!1);const x1=_1;let V1;if(i1&&n1){V1=x1+i1.length;const i0=V1,r0=V1+n1.length;Ah(i0,r0,!1)}else V1=$h.length;this.pragmas==="on"&&(t1==="fold"?Eh(x1,V1):t1==="hide"&&Ah(x1,V1,!0))}}_maskPatternForLang(){switch(this.type){case"js":case"ts":case"css":case"jsx":case"tsx":return/( *\/\* *playground-(?hide|fold) *\*\/\n?)(?:(.*?)( *\/\* *playground-\k-end *\*\/\n?))?/gs;case"html":return/( *\n?)(?:(.*?)( *\n?))?/gs;default:return}}_getLanguageMode(){switch(this.type){case"ts":return"google-typescript";case"js":case"json":return"google-javascript";case"html":return"google-html";case"css":return"css";case"jsx":case"tsx":return"jsx"}}_showDiagnostics(){const oh=this._codemirror;oh!==void 0&&oh.operation(()=>{var hh,mh,Eh;for(this._tooltipDiagnostic=void 0;this._diagnosticMarkers.length>0;)this._diagnosticMarkers.pop().clear();if(!(!((hh=this.diagnostics)===null||hh===void 0)&&hh.length)){this._diagnosticsMouseoverListenerActive&&((mh=this._cmDom)===null||mh===void 0||mh.removeEventListener("mouseover",this._onMouseOverWithDiagnostics),this._diagnosticsMouseoverListenerActive=!1);return}this._diagnosticsMouseoverListenerActive||((Eh=this._cmDom)===null||Eh===void 0||Eh.addEventListener("mouseover",this._onMouseOverWithDiagnostics),this._diagnosticsMouseoverListenerActive=!0);for(let Ah=0;Ah div { + background: var(--playground-code-background, #fff); + color: var(--playground-code-default-color, #000); + /* Kind of hacky... line number color tends to work out as a good + default border, because it's usually visible on top of the + background, but slightly muted. */ + border: 1px solid var(--playground-code-linenumber-color, #ccc); + padding: 5px; + } + `,styles$3];__decorate$6([n$h()],PlaygroundCodeEditor.prototype,"value",null);__decorate$6([n$h({attribute:!1})],PlaygroundCodeEditor.prototype,"documentKey",void 0);__decorate$6([n$h()],PlaygroundCodeEditor.prototype,"type",void 0);__decorate$6([n$h({type:Boolean,attribute:"line-numbers",reflect:!0})],PlaygroundCodeEditor.prototype,"lineNumbers",void 0);__decorate$6([n$h({type:Boolean,attribute:"line-wrapping",reflect:!0})],PlaygroundCodeEditor.prototype,"lineWrapping",void 0);__decorate$6([n$h({type:Boolean,reflect:!0})],PlaygroundCodeEditor.prototype,"readonly",void 0);__decorate$6([n$h({type:Boolean,attribute:"no-completions"})],PlaygroundCodeEditor.prototype,"noCompletions",void 0);__decorate$6([n$h({attribute:!1})],PlaygroundCodeEditor.prototype,"diagnostics",void 0);__decorate$6([t$b()],PlaygroundCodeEditor.prototype,"_completions",void 0);__decorate$6([t$b()],PlaygroundCodeEditor.prototype,"_completionsOpen",void 0);__decorate$6([n$h()],PlaygroundCodeEditor.prototype,"pragmas",void 0);__decorate$6([t$b()],PlaygroundCodeEditor.prototype,"_tooltipDiagnostic",void 0);__decorate$6([t$b()],PlaygroundCodeEditor.prototype,"_showKeyboardHelp",void 0);__decorate$6([i$e("#focusContainer")],PlaygroundCodeEditor.prototype,"_focusContainer",void 0);__decorate$6([i$e(".CodeMirror-code")],PlaygroundCodeEditor.prototype,"_codemirrorEditable",void 0);PlaygroundCodeEditor=__decorate$6([e$i("playground-code-editor")],PlaygroundCodeEditor);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class PlaygroundConnectedElement extends s$d{set project(oh){typeof oh=="string"?requestAnimationFrame(()=>{var hh;const mh=this.getRootNode();this._project=(hh=mh.getElementById(oh))!==null&&hh!==void 0?hh:void 0}):this._project=oh}}__decorate$6([n$h()],PlaygroundConnectedElement.prototype,"project",null);__decorate$6([t$b()],PlaygroundConnectedElement.prototype,"_project",void 0);/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let PlaygroundFileEditor=class extends PlaygroundConnectedElement{constructor(){super(...arguments),this.lineNumbers=!1,this.lineWrapping=!1,this.pragmas="on",this.readonly=!1,this.noCompletions=!1,this._onProjectFilesChanged=()=>{var oh,hh;(oh=this.filename)!==null&&oh!==void 0||(this.filename=(hh=this._files[0])===null||hh===void 0?void 0:hh.name),this.requestUpdate()},this._onCompileDone=()=>{this.requestUpdate()},this._onDiagnosticsChanged=()=>{this.requestUpdate()}}get _files(){var oh,hh;return(hh=(oh=this._project)===null||oh===void 0?void 0:oh.files)!==null&&hh!==void 0?hh:[]}get _currentFile(){return this.filename?this._files.find(oh=>oh.name===this.filename):void 0}async update(oh){if(oh.has("_project")){const hh=oh.get("_project");hh&&(hh.removeEventListener("filesChanged",this._onProjectFilesChanged),hh.removeEventListener("compileDone",this._onCompileDone),hh.removeEventListener("diagnosticsChanged",this._onDiagnosticsChanged)),this._project&&(this._project.addEventListener("filesChanged",this._onProjectFilesChanged),this._project.addEventListener("compileDone",this._onCompileDone),this._project.addEventListener("diagnosticsChanged",this._onDiagnosticsChanged)),this._onProjectFilesChanged()}super.update(oh)}render(){var oh,hh,mh,Eh,Ah,$h;return x$a` + ${this._files?x$a` + + + `:x$a``} + `}_onEdit(){this._project===void 0||this._currentFile===void 0||this._editor.value===void 0||this._project.editFile(this._currentFile,this._editor.value)}async _onRequestCompletions(oh){var hh,mh;const Eh=oh.detail;Eh.fileName=(hh=this.filename)!==null&&hh!==void 0?hh:"";const Ah=await((mh=this._project)===null||mh===void 0?void 0:mh.getCompletions(Eh));Ah&&Eh.provideCompletions(Ah)}};PlaygroundFileEditor.styles=i$h` + :host { + display: block; + /* Prevents scrollbars from changing container size and shifting layout + slightly. */ + box-sizing: border-box; + height: 350px; + } + + slot { + height: 100%; + display: block; + background: var(--playground-code-background, unset); + } + + playground-code-editor { + height: 100%; + border-radius: inherit; + border-top-left-radius: 0; + border-top-right-radius: 0; + } + `;__decorate$6([i$e("playground-code-editor")],PlaygroundFileEditor.prototype,"_editor",void 0);__decorate$6([n$h()],PlaygroundFileEditor.prototype,"filename",void 0);__decorate$6([n$h({type:Boolean,attribute:"line-numbers"})],PlaygroundFileEditor.prototype,"lineNumbers",void 0);__decorate$6([n$h({type:Boolean,attribute:"line-wrapping"})],PlaygroundFileEditor.prototype,"lineWrapping",void 0);__decorate$6([n$h()],PlaygroundFileEditor.prototype,"pragmas",void 0);__decorate$6([n$h({type:Boolean,reflect:!0})],PlaygroundFileEditor.prototype,"readonly",void 0);__decorate$6([n$h({type:Boolean,attribute:"no-completions"})],PlaygroundFileEditor.prototype,"noCompletions",void 0);PlaygroundFileEditor=__decorate$6([e$i("playground-file-editor")],PlaygroundFileEditor);const mimeTypeToTypeEnum=ch=>{if(ch===void 0)return;const oh=ch.indexOf(";");switch(oh!==-1&&(ch=ch.substring(0,oh)),ch){case"video/mp2t":return"ts";case"text/javascript":case"application/javascript":return"js";case"text/jsx":return"jsx";case"text/typescript-jsx":return"tsx";case"application/json":return"json";case"text/html":return"html";case"text/css":return"css"}};/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const o$f=e$e(class extends i$d{constructor(ch){var oh;if(super(ch),ch.type!==t$a.ATTRIBUTE||ch.name!=="class"||((oh=ch.strings)===null||oh===void 0?void 0:oh.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(ch){return" "+Object.keys(ch).filter(oh=>ch[oh]).join(" ")+" "}update(ch,[oh]){var hh,mh;if(this.it===void 0){this.it=new Set,ch.strings!==void 0&&(this.nt=new Set(ch.strings.join(" ").split(/\s/).filter(Ah=>Ah!=="")));for(const Ah in oh)oh[Ah]&&!(!((hh=this.nt)===null||hh===void 0)&&hh.has(Ah))&&this.it.add(Ah);return this.render(oh)}const Eh=ch.element.classList;this.it.forEach(Ah=>{Ah in oh||(Eh.remove(Ah),this.it.delete(Ah))});for(const Ah in oh){const $h=!!oh[Ah];$h===this.it.has(Ah)||!((mh=this.nt)===null||mh===void 0)&&mh.has(Ah)||($h?(Eh.add(Ah),this.it.add(Ah)):(Eh.remove(Ah),this.it.delete(Ah)))}return T$6}});function __decorate$5(ch,oh,hh,mh){var Eh=arguments.length,Ah=Eh<3?oh:mh===null?mh=Object.getOwnPropertyDescriptor(oh,hh):mh,$h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ah=Reflect.decorate(ch,oh,hh,mh);else for(var Dh=ch.length-1;Dh>=0;Dh--)($h=ch[Dh])&&(Ah=(Eh<3?$h(Ah):Eh>3?$h(oh,hh,Ah):$h(oh,hh))||Ah);return Eh>3&&Ah&&Object.defineProperty(oh,hh,Ah),Ah}typeof SuppressedError=="function"&&SuppressedError;function __decorate$4(ch,oh,hh,mh){var Eh=arguments.length,Ah=Eh<3?oh:mh===null?mh=Object.getOwnPropertyDescriptor(oh,hh):mh,$h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ah=Reflect.decorate(ch,oh,hh,mh);else for(var Dh=ch.length-1;Dh>=0;Dh--)($h=ch[Dh])&&(Ah=(Eh<3?$h(Ah):Eh>3?$h(oh,hh,Ah):$h(oh,hh))||Ah);return Eh>3&&Ah&&Object.defineProperty(oh,hh,Ah),Ah}typeof SuppressedError=="function"&&SuppressedError;/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */function matches(ch,oh){var hh=ch.matches||ch.webkitMatchesSelector||ch.msMatchesSelector;return hh.call(ch,oh)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const fn$3=()=>{},optionsBlock={get passive(){return!1}};document.addEventListener("x",fn$3,optionsBlock);document.removeEventListener("x",fn$3);/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class BaseElement extends s$d{click(){if(this.mdcRoot){this.mdcRoot.focus(),this.mdcRoot.click();return}super.click()}createFoundation(){this.mdcFoundation!==void 0&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}var extendStatics=function(ch,oh){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(hh,mh){hh.__proto__=mh}||function(hh,mh){for(var Eh in mh)Object.prototype.hasOwnProperty.call(mh,Eh)&&(hh[Eh]=mh[Eh])},extendStatics(ch,oh)};function __extends(ch,oh){if(typeof oh!="function"&&oh!==null)throw new TypeError("Class extends value "+String(oh)+" is not a constructor or null");extendStatics(ch,oh);function hh(){this.constructor=ch}ch.prototype=oh===null?Object.create(oh):(hh.prototype=oh.prototype,new hh)}var __assign=function(){return __assign=Object.assign||function(oh){for(var hh,mh=1,Eh=arguments.length;mh=ch.length&&(ch=void 0),{value:ch&&ch[mh++],done:!ch}}};throw new TypeError(oh?"Object is not iterable.":"Symbol.iterator is not defined.")}typeof SuppressedError=="function"&&SuppressedError;/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var MDCFoundation=function(){function ch(oh){oh===void 0&&(oh={}),this.adapter=oh}return Object.defineProperty(ch,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(ch,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(ch,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(ch,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),ch.prototype.init=function(){},ch.prototype.destroy=function(){},ch}();/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var cssClasses={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},strings={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},numbers={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};function getNormalizedEventCoords(ch,oh,hh){if(!ch)return{x:0,y:0};var mh=oh.x,Eh=oh.y,Ah=mh+hh.left,$h=Eh+hh.top,Dh,jh;if(ch.type==="touchstart"){var t1=ch;Dh=t1.changedTouches[0].pageX-Ah,jh=t1.changedTouches[0].pageY-$h}else{var i1=ch;Dh=i1.pageX-Ah,jh=i1.pageY-$h}return{x:Dh,y:jh}}/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var ACTIVATION_EVENT_TYPES=["touchstart","pointerdown","mousedown","keydown"],POINTER_DEACTIVATION_EVENT_TYPES=["touchend","pointerup","mouseup","contextmenu"],activatedTargets=[],MDCRippleFoundation=function(ch){__extends(oh,ch);function oh(hh){var mh=ch.call(this,__assign(__assign({},oh.defaultAdapter),hh))||this;return mh.activationAnimationHasEnded=!1,mh.activationTimer=0,mh.fgDeactivationRemovalTimer=0,mh.fgScale="0",mh.frame={width:0,height:0},mh.initialSize=0,mh.layoutFrame=0,mh.maxRadius=0,mh.unboundedCoords={left:0,top:0},mh.activationState=mh.defaultActivationState(),mh.activationTimerCallback=function(){mh.activationAnimationHasEnded=!0,mh.runDeactivationUXLogicIfReady()},mh.activateHandler=function(Eh){mh.activateImpl(Eh)},mh.deactivateHandler=function(){mh.deactivateImpl()},mh.focusHandler=function(){mh.handleFocus()},mh.blurHandler=function(){mh.handleBlur()},mh.resizeHandler=function(){mh.layout()},mh}return Object.defineProperty(oh,"cssClasses",{get:function(){return cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(oh,"strings",{get:function(){return strings},enumerable:!1,configurable:!0}),Object.defineProperty(oh,"numbers",{get:function(){return numbers},enumerable:!1,configurable:!0}),Object.defineProperty(oh,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),oh.prototype.init=function(){var hh=this,mh=this.supportsPressRipple();if(this.registerRootHandlers(mh),mh){var Eh=oh.cssClasses,Ah=Eh.ROOT,$h=Eh.UNBOUNDED;requestAnimationFrame(function(){hh.adapter.addClass(Ah),hh.adapter.isUnbounded()&&(hh.adapter.addClass($h),hh.layoutInternal())})}},oh.prototype.destroy=function(){var hh=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(oh.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(oh.cssClasses.FG_DEACTIVATION));var mh=oh.cssClasses,Eh=mh.ROOT,Ah=mh.UNBOUNDED;requestAnimationFrame(function(){hh.adapter.removeClass(Eh),hh.adapter.removeClass(Ah),hh.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},oh.prototype.activate=function(hh){this.activateImpl(hh)},oh.prototype.deactivate=function(){this.deactivateImpl()},oh.prototype.layout=function(){var hh=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){hh.layoutInternal(),hh.layoutFrame=0})},oh.prototype.setUnbounded=function(hh){var mh=oh.cssClasses.UNBOUNDED;hh?this.adapter.addClass(mh):this.adapter.removeClass(mh)},oh.prototype.handleFocus=function(){var hh=this;requestAnimationFrame(function(){return hh.adapter.addClass(oh.cssClasses.BG_FOCUSED)})},oh.prototype.handleBlur=function(){var hh=this;requestAnimationFrame(function(){return hh.adapter.removeClass(oh.cssClasses.BG_FOCUSED)})},oh.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},oh.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},oh.prototype.registerRootHandlers=function(hh){var mh,Eh;if(hh){try{for(var Ah=__values(ACTIVATION_EVENT_TYPES),$h=Ah.next();!$h.done;$h=Ah.next()){var Dh=$h.value;this.adapter.registerInteractionHandler(Dh,this.activateHandler)}}catch(jh){mh={error:jh}}finally{try{$h&&!$h.done&&(Eh=Ah.return)&&Eh.call(Ah)}finally{if(mh)throw mh.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},oh.prototype.registerDeactivationHandlers=function(hh){var mh,Eh;if(hh.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var Ah=__values(POINTER_DEACTIVATION_EVENT_TYPES),$h=Ah.next();!$h.done;$h=Ah.next()){var Dh=$h.value;this.adapter.registerDocumentInteractionHandler(Dh,this.deactivateHandler)}}catch(jh){mh={error:jh}}finally{try{$h&&!$h.done&&(Eh=Ah.return)&&Eh.call(Ah)}finally{if(mh)throw mh.error}}},oh.prototype.deregisterRootHandlers=function(){var hh,mh;try{for(var Eh=__values(ACTIVATION_EVENT_TYPES),Ah=Eh.next();!Ah.done;Ah=Eh.next()){var $h=Ah.value;this.adapter.deregisterInteractionHandler($h,this.activateHandler)}}catch(Dh){hh={error:Dh}}finally{try{Ah&&!Ah.done&&(mh=Eh.return)&&mh.call(Eh)}finally{if(hh)throw hh.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},oh.prototype.deregisterDeactivationHandlers=function(){var hh,mh;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var Eh=__values(POINTER_DEACTIVATION_EVENT_TYPES),Ah=Eh.next();!Ah.done;Ah=Eh.next()){var $h=Ah.value;this.adapter.deregisterDocumentInteractionHandler($h,this.deactivateHandler)}}catch(Dh){hh={error:Dh}}finally{try{Ah&&!Ah.done&&(mh=Eh.return)&&mh.call(Eh)}finally{if(hh)throw hh.error}}},oh.prototype.removeCssVars=function(){var hh=this,mh=oh.strings,Eh=Object.keys(mh);Eh.forEach(function(Ah){Ah.indexOf("VAR_")===0&&hh.adapter.updateCssVariable(mh[Ah],null)})},oh.prototype.activateImpl=function(hh){var mh=this;if(!this.adapter.isSurfaceDisabled()){var Eh=this.activationState;if(!Eh.isActivated){var Ah=this.previousActivationEvent,$h=Ah&&hh!==void 0&&Ah.type!==hh.type;if(!$h){Eh.isActivated=!0,Eh.isProgrammatic=hh===void 0,Eh.activationEvent=hh,Eh.wasActivatedByPointer=Eh.isProgrammatic?!1:hh!==void 0&&(hh.type==="mousedown"||hh.type==="touchstart"||hh.type==="pointerdown");var Dh=hh!==void 0&&activatedTargets.length>0&&activatedTargets.some(function(jh){return mh.adapter.containsEventTarget(jh)});if(Dh){this.resetActivationState();return}hh!==void 0&&(activatedTargets.push(hh.target),this.registerDeactivationHandlers(hh)),Eh.wasElementMadeActive=this.checkElementMadeActive(hh),Eh.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){activatedTargets=[],!Eh.wasElementMadeActive&&hh!==void 0&&(hh.key===" "||hh.keyCode===32)&&(Eh.wasElementMadeActive=mh.checkElementMadeActive(hh),Eh.wasElementMadeActive&&mh.animateActivation()),Eh.wasElementMadeActive||(mh.activationState=mh.defaultActivationState())})}}}},oh.prototype.checkElementMadeActive=function(hh){return hh!==void 0&&hh.type==="keydown"?this.adapter.isSurfaceActive():!0},oh.prototype.animateActivation=function(){var hh=this,mh=oh.strings,Eh=mh.VAR_FG_TRANSLATE_START,Ah=mh.VAR_FG_TRANSLATE_END,$h=oh.cssClasses,Dh=$h.FG_DEACTIVATION,jh=$h.FG_ACTIVATION,t1=oh.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var i1="",n1="";if(!this.adapter.isUnbounded()){var p1=this.getFgTranslationCoordinates(),_1=p1.startPoint,x1=p1.endPoint;i1=_1.x+"px, "+_1.y+"px",n1=x1.x+"px, "+x1.y+"px"}this.adapter.updateCssVariable(Eh,i1),this.adapter.updateCssVariable(Ah,n1),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(Dh),this.adapter.computeBoundingRect(),this.adapter.addClass(jh),this.activationTimer=setTimeout(function(){hh.activationTimerCallback()},t1)},oh.prototype.getFgTranslationCoordinates=function(){var hh=this.activationState,mh=hh.activationEvent,Eh=hh.wasActivatedByPointer,Ah;Eh?Ah=getNormalizedEventCoords(mh,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):Ah={x:this.frame.width/2,y:this.frame.height/2},Ah={x:Ah.x-this.initialSize/2,y:Ah.y-this.initialSize/2};var $h={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:Ah,endPoint:$h}},oh.prototype.runDeactivationUXLogicIfReady=function(){var hh=this,mh=oh.cssClasses.FG_DEACTIVATION,Eh=this.activationState,Ah=Eh.hasDeactivationUXRun,$h=Eh.isActivated,Dh=Ah||!$h;Dh&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(mh),this.fgDeactivationRemovalTimer=setTimeout(function(){hh.adapter.removeClass(mh)},numbers.FG_DEACTIVATION_MS))},oh.prototype.rmBoundedActivationClasses=function(){var hh=oh.cssClasses.FG_ACTIVATION;this.adapter.removeClass(hh),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},oh.prototype.resetActivationState=function(){var hh=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return hh.previousActivationEvent=void 0},oh.numbers.TAP_DELAY_MS)},oh.prototype.deactivateImpl=function(){var hh=this,mh=this.activationState;if(mh.isActivated){var Eh=__assign({},mh);mh.isProgrammatic?(requestAnimationFrame(function(){hh.animateDeactivation(Eh)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){hh.activationState.hasDeactivationUXRun=!0,hh.animateDeactivation(Eh),hh.resetActivationState()}))}},oh.prototype.animateDeactivation=function(hh){var mh=hh.wasActivatedByPointer,Eh=hh.wasElementMadeActive;(mh||Eh)&&this.runDeactivationUXLogicIfReady()},oh.prototype.layoutInternal=function(){var hh=this;this.frame=this.adapter.computeBoundingRect();var mh=Math.max(this.frame.height,this.frame.width),Eh=function(){var $h=Math.sqrt(Math.pow(hh.frame.width,2)+Math.pow(hh.frame.height,2));return $h+oh.numbers.PADDING};this.maxRadius=this.adapter.isUnbounded()?mh:Eh();var Ah=Math.floor(mh*oh.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&Ah%2!==0?this.initialSize=Ah-1:this.initialSize=Ah,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},oh.prototype.updateLayoutCssVars=function(){var hh=oh.strings,mh=hh.VAR_FG_SIZE,Eh=hh.VAR_LEFT,Ah=hh.VAR_TOP,$h=hh.VAR_FG_SCALE;this.adapter.updateCssVariable(mh,this.initialSize+"px"),this.adapter.updateCssVariable($h,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(Eh,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(Ah,this.unboundedCoords.top+"px"))},oh}(MDCFoundation);const MDCRippleFoundation$1=MDCRippleFoundation;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const i$b="important",n$e=" !"+i$b,o$e=e$e(class extends i$d{constructor(ch){var oh;if(super(ch),ch.type!==t$a.ATTRIBUTE||ch.name!=="style"||((oh=ch.strings)===null||oh===void 0?void 0:oh.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(ch){return Object.keys(ch).reduce((oh,hh)=>{const mh=ch[hh];return mh==null?oh:oh+`${hh=hh.includes("-")?hh:hh.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${mh};`},"")}update(ch,[oh]){const{style:hh}=ch.element;if(this.ht===void 0){this.ht=new Set;for(const mh in oh)this.ht.add(mh);return this.render(oh)}this.ht.forEach(mh=>{oh[mh]==null&&(this.ht.delete(mh),mh.includes("-")?hh.removeProperty(mh):hh[mh]="")});for(const mh in oh){const Eh=oh[mh];if(Eh!=null){this.ht.add(mh);const Ah=typeof Eh=="string"&&Eh.endsWith(n$e);mh.includes("-")||Ah?hh.setProperty(mh,Ah?Eh.slice(0,-11):Eh,Ah?i$b:""):hh[mh]=Eh}}return T$6}});/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class RippleBase extends BaseElement{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=MDCRippleFoundation$1}get isActive(){return matches(this.parentElement||this,":active")}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:oh=>{switch(oh){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0;break}},removeClass:oh=>{switch(oh){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1;break}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(oh,hh)=>{switch(oh){case"--mdc-ripple-fg-scale":this.fgScale=hh;break;case"--mdc-ripple-fg-size":this.fgSize=hh;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=hh;break;case"--mdc-ripple-fg-translate-start":this.translateStart=hh;break;case"--mdc-ripple-left":this.leftPos=hh;break;case"--mdc-ripple-top":this.topPos=hh;break}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(oh){this.waitForFoundation(()=>{this.mdcFoundation.activate(oh)})}endPress(){this.waitForFoundation(()=>{this.mdcFoundation.deactivate()})}startFocus(){this.waitForFoundation(()=>{this.mdcFoundation.handleFocus()})}endFocus(){this.waitForFoundation(()=>{this.mdcFoundation.handleBlur()})}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(oh){this.mdcFoundation?oh():this.updateComplete.then(oh)}update(oh){oh.has("disabled")&&this.disabled&&this.endHover(),super.update(oh)}render(){const oh=this.activated&&(this.primary||!this.accent),hh=this.selected&&(this.primary||!this.accent),mh={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":oh,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":hh,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return x$a` +
`}}__decorate$4([i$e(".mdc-ripple-surface")],RippleBase.prototype,"mdcRoot",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"primary",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"accent",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"unbounded",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"disabled",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"activated",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"selected",void 0);__decorate$4([n$h({type:Boolean})],RippleBase.prototype,"internalUseStateLayerCustomProperties",void 0);__decorate$4([t$b()],RippleBase.prototype,"hovering",void 0);__decorate$4([t$b()],RippleBase.prototype,"bgFocused",void 0);__decorate$4([t$b()],RippleBase.prototype,"fgActivation",void 0);__decorate$4([t$b()],RippleBase.prototype,"fgDeactivation",void 0);__decorate$4([t$b()],RippleBase.prototype,"fgScale",void 0);__decorate$4([t$b()],RippleBase.prototype,"fgSize",void 0);__decorate$4([t$b()],RippleBase.prototype,"translateStart",void 0);__decorate$4([t$b()],RippleBase.prototype,"translateEnd",void 0);__decorate$4([t$b()],RippleBase.prototype,"leftPos",void 0);__decorate$4([t$b()],RippleBase.prototype,"topPos",void 0);/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */const styles$2=i$h`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let Ripple=class extends RippleBase{};Ripple.styles=[styles$2];Ripple=__decorate$4([e$i("mwc-ripple")],Ripple);/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function tsDecorator(ch,oh,hh){const mh=ch.constructor;if(!hh){const Dh=`__${oh}`;if(hh=mh.getPropertyDescriptor(oh,Dh),!hh)throw new Error("@ariaProperty must be used after a @property decorator")}const Eh=hh;let Ah="";if(!Eh.set)throw new Error(`@ariaProperty requires a setter for ${oh}`);if(ch.dispatchWizEvent)return hh;const $h={configurable:!0,enumerable:!0,set(Dh){if(Ah===""){const jh=mh.getPropertyOptions(oh);Ah=typeof jh.attribute=="string"?jh.attribute:oh}this.hasAttribute(Ah)&&this.removeAttribute(Ah),Eh.set.call(this,Dh)}};return Eh.get&&($h.get=function(){return Eh.get.call(this)}),$h}function ariaProperty(ch,oh,hh){if(oh!==void 0)return tsDecorator(ch,oh,hh);throw new Error("@ariaProperty only supports TypeScript Decorators")}/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class RippleHandlers{constructor(oh){this.startPress=hh=>{oh().then(mh=>{mh&&mh.startPress(hh)})},this.endPress=()=>{oh().then(hh=>{hh&&hh.endPress()})},this.startFocus=()=>{oh().then(hh=>{hh&&hh.startFocus()})},this.endFocus=()=>{oh().then(hh=>{hh&&hh.endFocus()})},this.startHover=()=>{oh().then(hh=>{hh&&hh.startHover()})},this.endHover=()=>{oh().then(hh=>{hh&&hh.endHover()})}}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class IconButtonBase extends s$d{constructor(){super(...arguments),this.disabled=!1,this.icon="",this.shouldRenderRipple=!1,this.rippleHandlers=new RippleHandlers(()=>(this.shouldRenderRipple=!0,this.ripple))}renderRipple(){return this.shouldRenderRipple?x$a` + + `:""}focus(){const oh=this.buttonElement;oh&&(this.rippleHandlers.startFocus(),oh.focus())}blur(){const oh=this.buttonElement;oh&&(this.rippleHandlers.endFocus(),oh.blur())}render(){return x$a``}handleRippleMouseDown(oh){const hh=()=>{window.removeEventListener("mouseup",hh),this.handleRippleDeactivate()};window.addEventListener("mouseup",hh),this.rippleHandlers.startPress(oh)}handleRippleTouchStart(oh){this.rippleHandlers.startPress(oh)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}__decorate$5([n$h({type:Boolean,reflect:!0})],IconButtonBase.prototype,"disabled",void 0);__decorate$5([n$h({type:String})],IconButtonBase.prototype,"icon",void 0);__decorate$5([ariaProperty,n$h({type:String,attribute:"aria-label"})],IconButtonBase.prototype,"ariaLabel",void 0);__decorate$5([ariaProperty,n$h({type:String,attribute:"aria-haspopup"})],IconButtonBase.prototype,"ariaHasPopup",void 0);__decorate$5([i$e("button")],IconButtonBase.prototype,"buttonElement",void 0);__decorate$5([e$f("mwc-ripple")],IconButtonBase.prototype,"ripple",void 0);__decorate$5([t$b()],IconButtonBase.prototype,"shouldRenderRipple",void 0);__decorate$5([e$g({passive:!0})],IconButtonBase.prototype,"handleRippleMouseDown",null);__decorate$5([e$g({passive:!0})],IconButtonBase.prototype,"handleRippleTouchStart",null);/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */const styles$1=i$h`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{display:none}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:48px;max-width:48px}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}:host{display:inline-block;outline:none}:host([disabled]){pointer-events:none}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block}:host{--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let IconButton=class extends IconButtonBase{};IconButton.styles=[styles$1];IconButton=__decorate$5([e$i("mwc-icon-button")],IconButton);function __decorate$3(ch,oh,hh,mh){var Eh=arguments.length,Ah=Eh<3?oh:mh===null?mh=Object.getOwnPropertyDescriptor(oh,hh):mh,$h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ah=Reflect.decorate(ch,oh,hh,mh);else for(var Dh=ch.length-1;Dh>=0;Dh--)($h=ch[Dh])&&(Ah=(Eh<3?$h(Ah):Eh>3?$h(oh,hh,Ah):$h(oh,hh))||Ah);return Eh>3&&Ah&&Object.defineProperty(oh,hh,Ah),Ah}typeof SuppressedError=="function"&&SuppressedError;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class LinearProgressBase extends s$d{constructor(){super(...arguments),this.indeterminate=!1,this.progress=0,this.buffer=1,this.reverse=!1,this.closed=!1,this.stylePrimaryHalf="",this.stylePrimaryFull="",this.styleSecondaryQuarter="",this.styleSecondaryHalf="",this.styleSecondaryFull="",this.animationReady=!0,this.closedAnimationOff=!1,this.resizeObserver=null}connectedCallback(){super.connectedCallback(),this.rootEl&&this.attachResizeObserver()}render(){const oh={"mdc-linear-progress--closed":this.closed,"mdc-linear-progress--closed-animation-off":this.closedAnimationOff,"mdc-linear-progress--indeterminate":this.indeterminate,"mdc-linear-progress--animation-ready":this.animationReady},hh={"--mdc-linear-progress-primary-half":this.stylePrimaryHalf,"--mdc-linear-progress-primary-half-neg":this.stylePrimaryHalf!==""?`-${this.stylePrimaryHalf}`:"","--mdc-linear-progress-primary-full":this.stylePrimaryFull,"--mdc-linear-progress-primary-full-neg":this.stylePrimaryFull!==""?`-${this.stylePrimaryFull}`:"","--mdc-linear-progress-secondary-quarter":this.styleSecondaryQuarter,"--mdc-linear-progress-secondary-quarter-neg":this.styleSecondaryQuarter!==""?`-${this.styleSecondaryQuarter}`:"","--mdc-linear-progress-secondary-half":this.styleSecondaryHalf,"--mdc-linear-progress-secondary-half-neg":this.styleSecondaryHalf!==""?`-${this.styleSecondaryHalf}`:"","--mdc-linear-progress-secondary-full":this.styleSecondaryFull,"--mdc-linear-progress-secondary-full-neg":this.styleSecondaryFull!==""?`-${this.styleSecondaryFull}`:""},mh={"flex-basis":this.indeterminate?"100%":`${this.buffer*100}%`},Eh={transform:this.indeterminate?"scaleX(1)":`scaleX(${this.progress})`};return x$a` +
+
+
+
+
+
+
+ +
+
+ +
+
`}update(oh){oh.has("closed")&&(!this.closed||oh.get("closed")===void 0)&&this.syncClosedState(),super.update(oh)}async firstUpdated(oh){super.firstUpdated(oh),this.attachResizeObserver()}syncClosedState(){this.closedAnimationOff=this.closed}updated(oh){!oh.has("indeterminate")&&oh.has("reverse")&&this.indeterminate&&this.restartAnimation(),oh.has("indeterminate")&&oh.get("indeterminate")!==void 0&&this.indeterminate&&window.ResizeObserver&&this.calculateAndSetAnimationDimensions(this.rootEl.offsetWidth),super.updated(oh)}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),super.disconnectedCallback()}attachResizeObserver(){if(window.ResizeObserver){this.resizeObserver=new window.ResizeObserver(oh=>{if(this.indeterminate){for(const hh of oh)if(hh.contentRect){const mh=hh.contentRect.width;this.calculateAndSetAnimationDimensions(mh)}}}),this.resizeObserver.observe(this.rootEl);return}this.resizeObserver=null}calculateAndSetAnimationDimensions(oh){const hh=oh*.8367142,mh=oh*2.00611057,Eh=oh*.37651913,Ah=oh*.84386165,$h=oh*1.60277782;this.stylePrimaryHalf=`${hh}px`,this.stylePrimaryFull=`${mh}px`,this.styleSecondaryQuarter=`${Eh}px`,this.styleSecondaryHalf=`${Ah}px`,this.styleSecondaryFull=`${$h}px`,this.restartAnimation()}async restartAnimation(){this.animationReady=!1,await this.updateComplete,await new Promise(requestAnimationFrame),this.animationReady=!0,await this.updateComplete}open(){this.closed=!1}close(){this.closed=!0}}__decorate$3([i$e(".mdc-linear-progress")],LinearProgressBase.prototype,"rootEl",void 0);__decorate$3([n$h({type:Boolean,reflect:!0})],LinearProgressBase.prototype,"indeterminate",void 0);__decorate$3([n$h({type:Number})],LinearProgressBase.prototype,"progress",void 0);__decorate$3([n$h({type:Number})],LinearProgressBase.prototype,"buffer",void 0);__decorate$3([n$h({type:Boolean,reflect:!0})],LinearProgressBase.prototype,"reverse",void 0);__decorate$3([n$h({type:Boolean,reflect:!0})],LinearProgressBase.prototype,"closed",void 0);__decorate$3([ariaProperty,n$h({attribute:"aria-label"})],LinearProgressBase.prototype,"ariaLabel",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"stylePrimaryHalf",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"stylePrimaryFull",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"styleSecondaryQuarter",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"styleSecondaryHalf",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"styleSecondaryFull",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"animationReady",void 0);__decorate$3([t$b()],LinearProgressBase.prototype,"closedAnimationOff",void 0);/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */const styles=i$h`@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%);transform:translateX(var(--mdc-linear-progress-primary-half, 83.67142%))}100%{transform:translateX(200.611057%);transform:translateX(var(--mdc-linear-progress-primary-full, 200.611057%))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%);transform:translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%);transform:translateX(var(--mdc-linear-progress-secondary-half, 84.386165%))}100%{transform:translateX(160.277782%);transform:translateX(var(--mdc-linear-progress-secondary-full, 160.277782%))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(-10px)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%);transform:translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%))}100%{transform:translateX(-200.611057%);transform:translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%);transform:translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%))}100%{transform:translateX(-160.277782%);transform:translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid transparent;overflow:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;width:100%;height:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;width:100%;height:100%}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}.mdc-linear-progress__bar-inner{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E")}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6}.mdc-linear-progress{height:4px}.mdc-linear-progress__bar-inner{border-top-width:4px}.mdc-linear-progress__buffer-dots{background-size:10px 4px}:host{display:block}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6;background-color:var(--mdc-linear-progress-buffer-color, #e6e6e6)}.mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E");background-image:var(--mdc-linear-progress-buffering-dots-image, url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E"))}`;/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let LinearProgress=class extends LinearProgressBase{};LinearProgress.styles=[styles];LinearProgress=__decorate$3([e$i("mwc-linear-progress")],LinearProgress);/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let PlaygroundPreview=class extends PlaygroundConnectedElement{constructor(){super(),this.htmlFile="index.html",this.location="Result",this._loading=!0,this._showLoadingBar=!1,this._loadedAtLeastOnce=!1,this.reload=()=>{const oh=this.iframe;if(!oh)return;const{parentNode:hh,nextSibling:mh}=oh;hh&&oh.remove(),oh.src="",oh.src=this._indexUrl,hh&&hh.insertBefore(oh,mh),this._loading=!0,this._showLoadingBar=!0},navigator.serviceWorker===void 0&&(this._error=x$a`

+ Sorry! Preview unavailable because this browser doesn't + support + service workers. +

+

+ Note: Firefox + doesn't + support service workers in private browsing mode. +

`)}update(oh){if(oh.has("_project")){const hh=oh.get("_project");hh&&(hh.removeEventListener("urlChanged",this.reload),hh.removeEventListener("compileStart",this.reload)),this._project&&(this._project.addEventListener("urlChanged",this.reload),this._project.addEventListener("compileStart",this.reload))}super.update(oh)}get _indexUrl(){var oh;const hh=(oh=this._project)===null||oh===void 0?void 0:oh.baseUrl;return!hh||!this.htmlFile?"":new URL(this.htmlFile,hh).toString()}render(){return x$a` +
+ ${this.location} + + + + + + +
+ +
+ + + ${this._loadedAtLeastOnce?A$8:x$a``} + + +
+ + ${this._error?x$a` + + ${this._error} + `:A$8} + `}updated(){this.iframe&&this.iframe.src!==this._indexUrl&&(this.iframe.src=this._indexUrl)}async firstUpdated(){var oh,hh;this._loading&&!this._slotHasAnyVisibleChildren()&&(this._showLoadingBar=!0);const mh=this.shadowRoot.querySelector("mwc-linear-progress");await mh.updateComplete,(hh=(oh=mh.shadowRoot)===null||oh===void 0?void 0:oh.querySelector("[role=progressbar]"))===null||hh===void 0||hh.setAttribute("aria-label","Preview is loading")}_slotHasAnyVisibleChildren(){var oh;const hh=(oh=this._slot)===null||oh===void 0?void 0:oh.assignedNodes({flatten:!0});if(!hh)return!1;for(const mh of hh)if(mh.nodeType!==Node.COMMENT_NODE&&!(mh.nodeType===Node.TEXT_NODE&&(mh.textContent||"").trim()===""))return!0;return!1}_onIframeLoad(){this._indexUrl&&(this._loading=!1,this._loadedAtLeastOnce=!0,this._showLoadingBar=!1)}};PlaygroundPreview.styles=i$h` + :host { + display: flex; + flex-direction: column; + background: white; + font-family: sans-serif; + height: 350px; + position: relative; /* for the error message overlay */ + } + + #toolbar { + flex: 0 0 var(--playground-bar-height, 40px); + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: var(--playground-border, solid 1px #ddd); + font-size: 15px; + color: var(--playground-preview-toolbar-foreground-color, #444); + border-radius: inherit; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + background: var(--playground-preview-toolbar-background, white); + } + + #location { + margin: 0 10px; + } + + #reload-button { + --mdc-icon-button-size: 30px; + --mdc-icon-size: 18px; + } + + #content { + max-height: 100%; + position: relative; + flex: 1; + } + + #content.error { + display: none; + } + + #error { + padding: 0 20px; + } + + mwc-linear-progress { + /* There is no way to directly specify the height of a linear progress + bar, but zooming works well enough. It's 4px by default, and we want it to + be 2px to match the tab bar indicator.*/ + zoom: 0.5; + --mdc-linear-progress-buffer-color: transparent; + position: absolute; + top: -6px; + width: 100%; + --mdc-theme-primary: var(--playground-highlight-color, #6200ee); + } + + iframe, + slot { + width: 100%; + height: 100%; + } + + iframe { + border: none; + } + + [hidden] { + display: none; + } + `;__decorate$6([n$h({attribute:"html-file"})],PlaygroundPreview.prototype,"htmlFile",void 0);__decorate$6([n$h()],PlaygroundPreview.prototype,"location",void 0);__decorate$6([i$e("iframe",!0)],PlaygroundPreview.prototype,"iframe",void 0);__decorate$6([i$e("slot")],PlaygroundPreview.prototype,"_slot",void 0);__decorate$6([t$b()],PlaygroundPreview.prototype,"_loading",void 0);__decorate$6([t$b()],PlaygroundPreview.prototype,"_showLoadingBar",void 0);__decorate$6([t$b()],PlaygroundPreview.prototype,"_loadedAtLeastOnce",void 0);__decorate$6([t$b()],PlaygroundPreview.prototype,"_error",void 0);PlaygroundPreview=__decorate$6([e$i("playground-preview")],PlaygroundPreview);/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const t$8=globalThis,e$b=t$8.ShadowRoot&&(t$8.ShadyCSS===void 0||t$8.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$b=Symbol(),o$d=new WeakMap;let n$d=class{constructor(oh,hh,mh){if(this._$cssResult$=!0,mh!==s$b)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=oh,this.t=hh}get styleSheet(){let oh=this.o;const hh=this.t;if(e$b&&oh===void 0){const mh=hh!==void 0&&hh.length===1;mh&&(oh=o$d.get(hh)),oh===void 0&&((this.o=oh=new CSSStyleSheet).replaceSync(this.cssText),mh&&o$d.set(hh,oh))}return oh}toString(){return this.cssText}};const r$e=ch=>new n$d(typeof ch=="string"?ch:ch+"",void 0,s$b),i$a=(ch,...oh)=>{const hh=ch.length===1?ch[0]:oh.reduce((mh,Eh,Ah)=>mh+($h=>{if($h._$cssResult$===!0)return $h.cssText;if(typeof $h=="number")return $h;throw Error("Value passed to 'css' function must be a 'css' function result: "+$h+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(Eh)+ch[Ah+1],ch[0]);return new n$d(hh,ch,s$b)},S$6=(ch,oh)=>{if(e$b)ch.adoptedStyleSheets=oh.map(hh=>hh instanceof CSSStyleSheet?hh:hh.styleSheet);else for(const hh of oh){const mh=document.createElement("style"),Eh=t$8.litNonce;Eh!==void 0&&mh.setAttribute("nonce",Eh),mh.textContent=hh.cssText,ch.appendChild(mh)}},c$b=e$b?ch=>ch:ch=>ch instanceof CSSStyleSheet?(oh=>{let hh="";for(const mh of oh.cssRules)hh+=mh.cssText;return r$e(hh)})(ch):ch;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:i$9,defineProperty:e$a,getOwnPropertyDescriptor:r$d,getOwnPropertyNames:h$9,getOwnPropertySymbols:o$c,getPrototypeOf:n$c}=Object,a$9=globalThis,c$a=a$9.trustedTypes,l$8=c$a?c$a.emptyScript:"",p$6=a$9.reactiveElementPolyfillSupport,d$6=(ch,oh)=>ch,u$7={toAttribute(ch,oh){switch(oh){case Boolean:ch=ch?l$8:null;break;case Object:case Array:ch=ch==null?ch:JSON.stringify(ch)}return ch},fromAttribute(ch,oh){let hh=ch;switch(oh){case Boolean:hh=ch!==null;break;case Number:hh=ch===null?null:Number(ch);break;case Object:case Array:try{hh=JSON.parse(ch)}catch{hh=null}}return hh}},f$9=(ch,oh)=>!i$9(ch,oh),y$9={attribute:!0,type:String,converter:u$7,reflect:!1,hasChanged:f$9};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),a$9.litPropertyMetadata??(a$9.litPropertyMetadata=new WeakMap);let b$5=class extends HTMLElement{static addInitializer(oh){this._$Ei(),(this.l??(this.l=[])).push(oh)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(oh,hh=y$9){if(hh.state&&(hh.attribute=!1),this._$Ei(),this.elementProperties.set(oh,hh),!hh.noAccessor){const mh=Symbol(),Eh=this.getPropertyDescriptor(oh,mh,hh);Eh!==void 0&&e$a(this.prototype,oh,Eh)}}static getPropertyDescriptor(oh,hh,mh){const{get:Eh,set:Ah}=r$d(this.prototype,oh)??{get(){return this[hh]},set($h){this[hh]=$h}};return{get(){return Eh==null?void 0:Eh.call(this)},set($h){const Dh=Eh==null?void 0:Eh.call(this);Ah.call(this,$h),this.requestUpdate(oh,Dh,mh)},configurable:!0,enumerable:!0}}static getPropertyOptions(oh){return this.elementProperties.get(oh)??y$9}static _$Ei(){if(this.hasOwnProperty(d$6("elementProperties")))return;const oh=n$c(this);oh.finalize(),oh.l!==void 0&&(this.l=[...oh.l]),this.elementProperties=new Map(oh.elementProperties)}static finalize(){if(this.hasOwnProperty(d$6("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$6("properties"))){const hh=this.properties,mh=[...h$9(hh),...o$c(hh)];for(const Eh of mh)this.createProperty(Eh,hh[Eh])}const oh=this[Symbol.metadata];if(oh!==null){const hh=litPropertyMetadata.get(oh);if(hh!==void 0)for(const[mh,Eh]of hh)this.elementProperties.set(mh,Eh)}this._$Eh=new Map;for(const[hh,mh]of this.elementProperties){const Eh=this._$Eu(hh,mh);Eh!==void 0&&this._$Eh.set(Eh,hh)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(oh){const hh=[];if(Array.isArray(oh)){const mh=new Set(oh.flat(1/0).reverse());for(const Eh of mh)hh.unshift(c$b(Eh))}else oh!==void 0&&hh.push(c$b(oh));return hh}static _$Eu(oh,hh){const mh=hh.attribute;return mh===!1?void 0:typeof mh=="string"?mh:typeof oh=="string"?oh.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var oh;this._$Eg=new Promise(hh=>this.enableUpdating=hh),this._$AL=new Map,this._$E_(),this.requestUpdate(),(oh=this.constructor.l)==null||oh.forEach(hh=>hh(this))}addController(oh){var hh;(this._$ES??(this._$ES=[])).push(oh),this.renderRoot!==void 0&&this.isConnected&&((hh=oh.hostConnected)==null||hh.call(oh))}removeController(oh){var hh;(hh=this._$ES)==null||hh.splice(this._$ES.indexOf(oh)>>>0,1)}_$E_(){const oh=new Map,hh=this.constructor.elementProperties;for(const mh of hh.keys())this.hasOwnProperty(mh)&&(oh.set(mh,this[mh]),delete this[mh]);oh.size>0&&(this._$Ep=oh)}createRenderRoot(){const oh=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$6(oh,this.constructor.elementStyles),oh}connectedCallback(){var oh;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(oh=this._$ES)==null||oh.forEach(hh=>{var mh;return(mh=hh.hostConnected)==null?void 0:mh.call(hh)})}enableUpdating(oh){}disconnectedCallback(){var oh;(oh=this._$ES)==null||oh.forEach(hh=>{var mh;return(mh=hh.hostDisconnected)==null?void 0:mh.call(hh)})}attributeChangedCallback(oh,hh,mh){this._$AK(oh,mh)}_$EO(oh,hh){var Ah;const mh=this.constructor.elementProperties.get(oh),Eh=this.constructor._$Eu(oh,mh);if(Eh!==void 0&&mh.reflect===!0){const $h=(((Ah=mh.converter)==null?void 0:Ah.toAttribute)!==void 0?mh.converter:u$7).toAttribute(hh,mh.type);this._$Em=oh,$h==null?this.removeAttribute(Eh):this.setAttribute(Eh,$h),this._$Em=null}}_$AK(oh,hh){var Ah;const mh=this.constructor,Eh=mh._$Eh.get(oh);if(Eh!==void 0&&this._$Em!==Eh){const $h=mh.getPropertyOptions(Eh),Dh=typeof $h.converter=="function"?{fromAttribute:$h.converter}:((Ah=$h.converter)==null?void 0:Ah.fromAttribute)!==void 0?$h.converter:u$7;this._$Em=Eh,this[Eh]=Dh.fromAttribute(hh,$h.type),this._$Em=null}}requestUpdate(oh,hh,mh,Eh=!1,Ah){if(oh!==void 0){if(mh??(mh=this.constructor.getPropertyOptions(oh)),!(mh.hasChanged??f$9)(Eh?Ah:this[oh],hh))return;this.C(oh,hh,mh)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(oh,hh,mh){this._$AL.has(oh)||this._$AL.set(oh,hh),mh.reflect===!0&&this._$Em!==oh&&(this._$Ej??(this._$Ej=new Set)).add(oh)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(hh){Promise.reject(hh)}const oh=this.scheduleUpdate();return oh!=null&&await oh,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var mh;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[Ah,$h]of this._$Ep)this[Ah]=$h;this._$Ep=void 0}const Eh=this.constructor.elementProperties;if(Eh.size>0)for(const[Ah,$h]of Eh)$h.wrapped!==!0||this._$AL.has(Ah)||this[Ah]===void 0||this.C(Ah,this[Ah],$h)}let oh=!1;const hh=this._$AL;try{oh=this.shouldUpdate(hh),oh?(this.willUpdate(hh),(mh=this._$ES)==null||mh.forEach(Eh=>{var Ah;return(Ah=Eh.hostUpdate)==null?void 0:Ah.call(Eh)}),this.update(hh)):this._$ET()}catch(Eh){throw oh=!1,this._$ET(),Eh}oh&&this._$AE(hh)}willUpdate(oh){}_$AE(oh){var hh;(hh=this._$ES)==null||hh.forEach(mh=>{var Eh;return(Eh=mh.hostUpdated)==null?void 0:Eh.call(mh)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(oh)),this.updated(oh)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(oh){return!0}update(oh){this._$Ej&&(this._$Ej=this._$Ej.forEach(hh=>this._$EO(hh,this[hh]))),this._$ET()}updated(oh){}firstUpdated(oh){}};b$5.elementStyles=[],b$5.shadowRootOptions={mode:"open"},b$5[d$6("elementProperties")]=new Map,b$5[d$6("finalized")]=new Map,p$6==null||p$6({ReactiveElement:b$5}),(a$9.reactiveElementVersions??(a$9.reactiveElementVersions=[])).push("2.0.0");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const t$7=globalThis,i$8=t$7.trustedTypes,s$a=i$8?i$8.createPolicy("lit-html",{createHTML:ch=>ch}):void 0,e$9="$lit$",h$8=`lit$${(Math.random()+"").slice(9)}$`,o$b="?"+h$8,n$b=`<${o$b}>`,r$c=document,l$7=()=>r$c.createComment(""),c$9=ch=>ch===null||typeof ch!="object"&&typeof ch!="function",a$8=Array.isArray,u$6=ch=>a$8(ch)||typeof(ch==null?void 0:ch[Symbol.iterator])=="function",d$5=`[ +\f\r]`,f$8=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$6=/-->/g,_$4=/>/g,m$5=RegExp(`>|${d$5}(?:([^\\s"'>=/]+)(${d$5}*=${d$5}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),p$5=/'/g,g$6=/"/g,$$5=/^(?:script|style|textarea|title)$/i,y$8=ch=>(oh,...hh)=>({_$litType$:ch,strings:oh,values:hh}),x$9=y$8(1),w$6=Symbol.for("lit-noChange"),T$5=Symbol.for("lit-nothing"),A$7=new WeakMap,E$5=r$c.createTreeWalker(r$c,129);function C$5(ch,oh){if(!Array.isArray(ch)||!ch.hasOwnProperty("raw"))throw Error("invalid template strings array");return s$a!==void 0?s$a.createHTML(oh):oh}const P$5=(ch,oh)=>{const hh=ch.length-1,mh=[];let Eh,Ah=oh===2?"":"",$h=f$8;for(let Dh=0;Dh"?($h=Eh??f$8,n1=-1):i1[1]===void 0?n1=-2:(n1=$h.lastIndex-i1[2].length,t1=i1[1],$h=i1[3]===void 0?m$5:i1[3]==='"'?g$6:p$5):$h===g$6||$h===p$5?$h=m$5:$h===v$6||$h===_$4?$h=f$8:($h=m$5,Eh=void 0);const _1=$h===m$5&&ch[Dh+1].startsWith("/>")?" ":"";Ah+=$h===f$8?jh+n$b:n1>=0?(mh.push(t1),jh.slice(0,n1)+e$9+jh.slice(n1)+h$8+_1):jh+h$8+(n1===-2?Dh:_1)}return[C$5(ch,Ah+(ch[hh]||"")+(oh===2?"":"")),mh]};let V$5=class SGt{constructor({strings:oh,_$litType$:hh},mh){let Eh;this.parts=[];let Ah=0,$h=0;const Dh=oh.length-1,jh=this.parts,[t1,i1]=P$5(oh,hh);if(this.el=SGt.createElement(t1,mh),E$5.currentNode=this.el.content,hh===2){const n1=this.el.content.firstChild;n1.replaceWith(...n1.childNodes)}for(;(Eh=E$5.nextNode())!==null&&jh.length0){Eh.textContent=i$8?i$8.emptyScript:"";for(let _1=0;_12||mh[0]!==""||mh[1]!==""?(this._$AH=Array(mh.length-1).fill(new String),this.strings=mh):this._$AH=T$5}_$AI(oh,hh=this,mh,Eh){const Ah=this.strings;let $h=!1;if(Ah===void 0)oh=N$6(this,oh,hh,0),$h=!c$9(oh)||oh!==this._$AH&&oh!==w$6,$h&&(this._$AH=oh);else{const Dh=oh;let jh,t1;for(oh=Ah[0],jh=0;jh{const mh=(hh==null?void 0:hh.renderBefore)??oh;let Eh=mh._$litPart$;if(Eh===void 0){const Ah=(hh==null?void 0:hh.renderBefore)??null;mh._$litPart$=Eh=new M$5(oh.insertBefore(l$7(),Ah),Ah,void 0,hh??{})}return Eh._$AI(ch),Eh};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let s$9=class extends b$5{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var hh;const oh=super.createRenderRoot();return(hh=this.renderOptions).renderBefore??(hh.renderBefore=oh.firstChild),oh}update(oh){const hh=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(oh),this._$Do=j$5(hh,this.renderRoot,this.renderOptions)}connectedCallback(){var oh;super.connectedCallback(),(oh=this._$Do)==null||oh.setConnected(!0)}disconnectedCallback(){var oh;super.disconnectedCallback(),(oh=this._$Do)==null||oh.setConnected(!1)}render(){return w$6}};var yGt;s$9._$litElement$=!0,s$9.finalized=!0,(yGt=globalThis.litElementHydrateSupport)==null||yGt.call(globalThis,{LitElement:s$9});const r$b=globalThis.litElementPolyfillSupport;r$b==null||r$b({LitElement:s$9});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.0");var component_styles_default=i$a` + :host { + box-sizing: border-box; + } + + :host *, + :host *::before, + :host *::after { + box-sizing: inherit; + } + + [hidden] { + display: none !important; + } +`,icon_styles_default=i$a` + ${component_styles_default} + + :host { + display: inline-block; + width: 1em; + height: 1em; + box-sizing: content-box !important; + } + + svg { + display: block; + height: 100%; + width: 100%; + } +`,basePath="";function setBasePath(ch){basePath=ch}function getBasePath(ch=""){if(!basePath){const oh=[...document.getElementsByTagName("script")],hh=oh.find(mh=>mh.hasAttribute("data-shoelace"));if(hh)setBasePath(hh.getAttribute("data-shoelace"));else{const mh=oh.find(Ah=>/shoelace(\.min)?\.js($|\?)/.test(Ah.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(Ah.src));let Eh="";mh&&(Eh=mh.getAttribute("src")),setBasePath(Eh.split("/").slice(0,-1).join("/"))}}return basePath.replace(/\/$/,"")+(ch?`/${ch.replace(/^\//,"")}`:"")}var library={name:"default",resolver:ch=>getBasePath(`assets/icons/${ch}.svg`)},library_default_default=library,icons={caret:` + + + + `,check:` + + + + + + + + + + + `,"chevron-down":` + + + + `,"chevron-left":` + + + + `,"chevron-right":` + + + + `,copy:` + + + + `,eye:` + + + + + `,"eye-slash":` + + + + + + `,eyedropper:` + + + + `,"grip-vertical":` + + + + `,indeterminate:` + + + + + + + + + + `,"person-fill":` + + + + `,"play-fill":` + + + + `,"pause-fill":` + + + + `,radio:` + + + + + + + + `,"star-fill":` + + + + `,"x-lg":` + + + + `,"x-circle-fill":` + + + + `},systemLibrary={name:"system",resolver:ch=>ch in icons?`data:image/svg+xml,${encodeURIComponent(icons[ch])}`:""},library_system_default=systemLibrary,registry=[library_default_default,library_system_default],watchedIcons=[];function watchIcon(ch){watchedIcons.push(ch)}function unwatchIcon(ch){watchedIcons=watchedIcons.filter(oh=>oh!==ch)}function getIconLibrary(ch){return registry.find(oh=>oh.name===ch)}var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(ch,oh,hh)=>oh in ch?__defProp(ch,oh,{enumerable:!0,configurable:!0,writable:!0,value:hh}):ch[oh]=hh,__spreadValues=(ch,oh)=>{for(var hh in oh||(oh={}))__hasOwnProp.call(oh,hh)&&__defNormalProp(ch,hh,oh[hh]);if(__getOwnPropSymbols)for(var hh of __getOwnPropSymbols(oh))__propIsEnum.call(oh,hh)&&__defNormalProp(ch,hh,oh[hh]);return ch},__decorateClass=(ch,oh,hh,mh)=>{for(var Eh=mh>1?void 0:mh?__getOwnPropDesc(oh,hh):oh,Ah=ch.length-1,$h;Ah>=0;Ah--)($h=ch[Ah])&&(Eh=(mh?$h(oh,hh,Eh):$h(Eh))||Eh);return mh&&Eh&&__defProp(oh,hh,Eh),Eh};function watch(ch,oh){const hh=__spreadValues({waitUntilFirstUpdate:!1},oh);return(mh,Eh)=>{const{update:Ah}=mh,$h=Array.isArray(ch)?ch:[ch];mh.update=function(Dh){$h.forEach(jh=>{const t1=jh;if(Dh.has(t1)){const i1=Dh.get(t1),n1=this[t1];i1!==n1&&(!hh.waitUntilFirstUpdate||this.hasUpdated)&&this[Eh](i1,n1)}}),Ah.call(this,Dh)}}}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const o$a={attribute:!0,type:String,converter:u$7,reflect:!1,hasChanged:f$9},r$a=(ch=o$a,oh,hh)=>{const{kind:mh,metadata:Eh}=hh;let Ah=globalThis.litPropertyMetadata.get(Eh);if(Ah===void 0&&globalThis.litPropertyMetadata.set(Eh,Ah=new Map),Ah.set(hh.name,ch),mh==="accessor"){const{name:$h}=hh;return{set(Dh){const jh=oh.get.call(this);oh.set.call(this,Dh),this.requestUpdate($h,jh,ch)},init(Dh){return Dh!==void 0&&this.C($h,void 0,ch),Dh}}}if(mh==="setter"){const{name:$h}=hh;return function(Dh){const jh=this[$h];oh.call(this,Dh),this.requestUpdate($h,jh,ch)}}throw Error("Unsupported decorator location: "+mh)};function n$a(ch){return(oh,hh)=>typeof hh=="object"?r$a(ch,oh,hh):((mh,Eh,Ah)=>{const $h=Eh.hasOwnProperty(Ah);return Eh.constructor.createProperty(Ah,$h?{...mh,wrapped:!0}:mh),$h?Object.getOwnPropertyDescriptor(Eh,Ah):void 0})(ch,oh,hh)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function r$9(ch){return n$a({...ch,state:!0,attribute:!1})}var ShoelaceElement=class extends s$9{constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([ch,oh])=>{this.constructor.define(ch,oh)})}emit(ch,oh){const hh=new CustomEvent(ch,__spreadValues({bubbles:!0,cancelable:!1,composed:!0,detail:{}},oh));return this.dispatchEvent(hh),hh}static define(ch,oh=this,hh={}){const mh=customElements.get(ch);if(!mh){customElements.define(ch,class extends oh{},hh);return}let Eh=" (unknown version)",Ah=Eh;"version"in oh&&oh.version&&(Eh=" v"+oh.version),"version"in mh&&mh.version&&(Ah=" v"+mh.version),!(Eh&&Ah&&Eh===Ah)&&console.warn(`Attempted to register <${ch}>${Eh}, but <${ch}>${Ah} has already been registered.`)}};ShoelaceElement.version="2.11.1";ShoelaceElement.dependencies={};__decorateClass([n$a()],ShoelaceElement.prototype,"dir",2);__decorateClass([n$a()],ShoelaceElement.prototype,"lang",2);/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const e$8=(ch,oh)=>oh===void 0?(ch==null?void 0:ch._$litType$)!==void 0:(ch==null?void 0:ch._$litType$)===oh;var CACHEABLE_ERROR=Symbol(),RETRYABLE_ERROR=Symbol(),parser$1,iconCache=new Map,SlIcon=class extends ShoelaceElement{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(ch,oh){var hh;let mh;if(oh!=null&&oh.spriteSheet)return x$9` + + `;try{if(mh=await fetch(ch,{mode:"cors"}),!mh.ok)return mh.status===410?CACHEABLE_ERROR:RETRYABLE_ERROR}catch{return RETRYABLE_ERROR}try{const Eh=document.createElement("div");Eh.innerHTML=await mh.text();const Ah=Eh.firstElementChild;if(((hh=Ah==null?void 0:Ah.tagName)==null?void 0:hh.toLowerCase())!=="svg")return CACHEABLE_ERROR;parser$1||(parser$1=new DOMParser);const Dh=parser$1.parseFromString(Ah.outerHTML,"text/html").body.querySelector("svg");return Dh?(Dh.part.add("svg"),document.adoptNode(Dh)):CACHEABLE_ERROR}catch{return CACHEABLE_ERROR}}connectedCallback(){super.connectedCallback(),watchIcon(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),unwatchIcon(this)}getIconSource(){const ch=getIconLibrary(this.library);return this.name&&ch?{url:ch.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var ch;const{url:oh,fromLibrary:hh}=this.getIconSource(),mh=hh?getIconLibrary(this.library):void 0;if(!oh){this.svg=null;return}let Eh=iconCache.get(oh);if(Eh||(Eh=this.resolveIcon(oh,mh),iconCache.set(oh,Eh)),!this.initialRender)return;const Ah=await Eh;if(Ah===RETRYABLE_ERROR&&iconCache.delete(oh),oh===this.getIconSource().url){if(e$8(Ah)){this.svg=Ah;return}switch(Ah){case RETRYABLE_ERROR:case CACHEABLE_ERROR:this.svg=null,this.emit("sl-error");break;default:this.svg=Ah.cloneNode(!0),(ch=mh==null?void 0:mh.mutator)==null||ch.call(mh,this.svg),this.emit("sl-load")}}}render(){return this.svg}};SlIcon.styles=icon_styles_default;__decorateClass([r$9()],SlIcon.prototype,"svg",2);__decorateClass([n$a({reflect:!0})],SlIcon.prototype,"name",2);__decorateClass([n$a()],SlIcon.prototype,"src",2);__decorateClass([n$a()],SlIcon.prototype,"label",2);__decorateClass([n$a({reflect:!0})],SlIcon.prototype,"library",2);__decorateClass([watch("label")],SlIcon.prototype,"handleLabelChange",1);__decorateClass([watch(["name","src","library"])],SlIcon.prototype,"setIcon",1);SlIcon.define("sl-icon");var mdiAlert="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z",mdiFile="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",mdiFolder="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z";function wrapPathInSvg$1(ch){return`data:image/svg+xml;utf8,${wrapPathInSvgWithoutPrefix(ch)}`}function wrapPathInSvgWithoutPrefix(ch){return``}var p_e,vGt;let PlaygroundExercise=(p_e=class extends s$d{constructor(){super(...arguments),this.syntaxError=!1,this.exportError=!1}render(){return x$a(vGt||(vGt=_Gt([` + + + + - + + - +
@@ -23,6 +23,80 @@

@holochain-open-dev/stores

Reactive stores to build hApps

+
+ + + ## Readable stores + + - Simple object that holds a value + - You can subscribe to it to get notified whenever that value changes + + +

+export function subscribeAndLog<T>(store: Readable<T>) {
+  const unsubscribe = store.subscribe(value => console.log(value)); // Will log all the values 
+                                                                    // that the store gets
+  // After some other code has executed...
+
+  unsubscribe(); // Unsubscribes from the store, from this point on new
+                 // values from the store won't get logged
+}
+
+ + + + #### Exercise + + + + + + + +
+
@@ -41,6 +115,9 @@

Reactive stores to build hApps

+ + +