@spectric/ui 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -6,25 +6,25 @@
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Ds,defineProperty:Ls,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:Bs,getOwnPropertySymbols:js,getPrototypeOf:zs}=Object,re=globalThis,Er=re.trustedTypes,Rs=Er?Er.emptyScript:"",Nt=re.reactiveElementPolyfillSupport,ze=(o,t)=>o,st={toAttribute(o,t){switch(t){case Boolean:o=o?Rs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let s=o;switch(t){case Boolean:s=o!==null;break;case Number:s=o===null?null:Number(o);break;case Object:case Array:try{s=JSON.parse(o)}catch{s=null}}return s}},Bt=(o,t)=>!Ds(o,t),Cr={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Bt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),re.litPropertyMetadata??(re.litPropertyMetadata=new WeakMap);class _e extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Cr){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,s);n!==void 0&&Ls(this.prototype,t,n)}}static getPropertyDescriptor(t,s,i){const{get:n,set:e}=Ns(this.prototype,t)??{get(){return this[s]},set(p){this[s]=p}};return{get(){return n==null?void 0:n.call(this)},set(p){const h=n==null?void 0:n.call(this);e.call(this,p),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Cr}static _$Ei(){if(this.hasOwnProperty(ze("elementProperties")))return;const t=zs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ze("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ze("properties"))){const s=this.properties,i=[...Bs(s),...js(s)];for(const n of i)this.createProperty(n,s[n])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,n]of s)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const n=this._$Eu(s,i);n!==void 0&&this._$Eh.set(n,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const n of i)s.unshift(xr(n))}else t!==void 0&&s.push(xr(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(s=>s(this))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Os(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){var e;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const p=(((e=i.converter)==null?void 0:e.toAttribute)!==void 0?i.converter:st).toAttribute(s,i.type);this._$Em=t,p==null?this.removeAttribute(n):this.setAttribute(n,p),this._$Em=null}}_$AK(t,s){var e;const i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const p=i.getPropertyOptions(n),h=typeof p.converter=="function"?{fromAttribute:p.converter}:((e=p.converter)==null?void 0:e.fromAttribute)!==void 0?p.converter:st;this._$Em=n,this[n]=h.fromAttribute(s,p.type),this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Bt)(this[t],s))return;this.P(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,p]of this._$Ep)this[e]=p;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[e,p]of n)p.wrapped!==!0||this._$AL.has(e)||this[e]===void 0||this.P(e,this[e],p)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(n=>{var e;return(e=n.hostUpdate)==null?void 0:e.call(n)}),this.update(s)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(s)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(t){}firstUpdated(t){}}_e.elementStyles=[],_e.shadowRootOptions={mode:"open"},_e[ze("elementProperties")]=new Map,_e[ze("finalized")]=new Map,Nt==null||Nt({ReactiveElement:_e}),(re.reactiveElementVersions??(re.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:Ds,defineProperty:Ls,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:Bs,getOwnPropertySymbols:js,getPrototypeOf:zs}=Object,re=globalThis,Er=re.trustedTypes,Rs=Er?Er.emptyScript:"",Nt=re.reactiveElementPolyfillSupport,Me=(o,t)=>o,st={toAttribute(o,t){switch(t){case Boolean:o=o?Rs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let s=o;switch(t){case Boolean:s=o!==null;break;case Number:s=o===null?null:Number(o);break;case Object:case Array:try{s=JSON.parse(o)}catch{s=null}}return s}},Bt=(o,t)=>!Ds(o,t),Cr={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Bt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),re.litPropertyMetadata??(re.litPropertyMetadata=new WeakMap);class Se extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Cr){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,s);n!==void 0&&Ls(this.prototype,t,n)}}static getPropertyDescriptor(t,s,i){const{get:n,set:e}=Ns(this.prototype,t)??{get(){return this[s]},set(p){this[s]=p}};return{get(){return n==null?void 0:n.call(this)},set(p){const h=n==null?void 0:n.call(this);e.call(this,p),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Cr}static _$Ei(){if(this.hasOwnProperty(Me("elementProperties")))return;const t=zs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Me("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Me("properties"))){const s=this.properties,i=[...Bs(s),...js(s)];for(const n of i)this.createProperty(n,s[n])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,n]of s)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const n=this._$Eu(s,i);n!==void 0&&this._$Eh.set(n,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const n of i)s.unshift(xr(n))}else t!==void 0&&s.push(xr(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(s=>s(this))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Os(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){var e;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const p=(((e=i.converter)==null?void 0:e.toAttribute)!==void 0?i.converter:st).toAttribute(s,i.type);this._$Em=t,p==null?this.removeAttribute(n):this.setAttribute(n,p),this._$Em=null}}_$AK(t,s){var e;const i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const p=i.getPropertyOptions(n),h=typeof p.converter=="function"?{fromAttribute:p.converter}:((e=p.converter)==null?void 0:e.fromAttribute)!==void 0?p.converter:st;this._$Em=n,this[n]=h.fromAttribute(s,p.type),this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Bt)(this[t],s))return;this.P(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,p]of this._$Ep)this[e]=p;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[e,p]of n)p.wrapped!==!0||this._$AL.has(e)||this[e]===void 0||this.P(e,this[e],p)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(n=>{var e;return(e=n.hostUpdate)==null?void 0:e.call(n)}),this.update(s)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(s)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(t){}firstUpdated(t){}}Se.elementStyles=[],Se.shadowRootOptions={mode:"open"},Se[Me("elementProperties")]=new Map,Se[Me("finalized")]=new Map,Nt==null||Nt({ReactiveElement:Se}),(re.reactiveElementVersions??(re.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const Re=globalThis,ot=Re.trustedTypes,kr=ot?ot.createPolicy("lit-html",{createHTML:o=>o}):void 0,jt="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,zt="?"+X,Ms=`<${zt}>`,pe=document,Me=()=>pe.createComment(""),Ie=o=>o===null||typeof o!="object"&&typeof o!="function",Rt=Array.isArray,Pr=o=>Rt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Mt=`[
14
- \f\r]`,Ue=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tr=/-->/g,Or=/>/g,ue=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Dr=/'/g,Lr=/"/g,Nr=/^(?:script|style|textarea|title)$/i,Is=o=>(t,...s)=>({_$litType$:o,strings:t,values:s}),A=Is(1),ie=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),Br=new WeakMap,de=pe.createTreeWalker(pe,129);function jr(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return kr!==void 0?kr.createHTML(t):t}const zr=(o,t)=>{const s=o.length-1,i=[];let n,e=t===2?"<svg>":t===3?"<math>":"",p=Ue;for(let h=0;h<s;h++){const g=o[h];let $,C,y=-1,E=0;for(;E<g.length&&(p.lastIndex=E,C=p.exec(g),C!==null);)E=p.lastIndex,p===Ue?C[1]==="!--"?p=Tr:C[1]!==void 0?p=Or:C[2]!==void 0?(Nr.test(C[2])&&(n=RegExp("</"+C[2],"g")),p=ue):C[3]!==void 0&&(p=ue):p===ue?C[0]===">"?(p=n??Ue,y=-1):C[1]===void 0?y=-2:(y=p.lastIndex-C[2].length,$=C[1],p=C[3]===void 0?ue:C[3]==='"'?Lr:Dr):p===Lr||p===Dr?p=ue:p===Tr||p===Or?p=Ue:(p=ue,n=void 0);const x=p===ue&&o[h+1].startsWith("/>")?" ":"";e+=p===Ue?g+Ms:y>=0?(i.push($),g.slice(0,y)+jt+g.slice(y)+X+x):g+X+(y===-2?h:x)}return[jr(o,e+(o[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Fe{constructor({strings:t,_$litType$:s},i){let n;this.parts=[];let e=0,p=0;const h=t.length-1,g=this.parts,[$,C]=zr(t,s);if(this.el=Fe.createElement($,i),de.currentNode=this.el.content,s===2||s===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(n=de.nextNode())!==null&&g.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const y of n.getAttributeNames())if(y.endsWith(jt)){const E=C[p++],x=n.getAttribute(y).split(X),k=/([.?@])?(.*)/.exec(E);g.push({type:1,index:e,name:k[2],strings:x,ctor:k[1]==="."?Mr:k[1]==="?"?Ir:k[1]==="@"?Ur:He}),n.removeAttribute(y)}else y.startsWith(X)&&(g.push({type:6,index:e}),n.removeAttribute(y));if(Nr.test(n.tagName)){const y=n.textContent.split(X),E=y.length-1;if(E>0){n.textContent=ot?ot.emptyScript:"";for(let x=0;x<E;x++)n.append(y[x],Me()),de.nextNode(),g.push({type:2,index:++e});n.append(y[E],Me())}}}else if(n.nodeType===8)if(n.data===zt)g.push({type:2,index:e});else{let y=-1;for(;(y=n.data.indexOf(X,y+1))!==-1;)g.push({type:7,index:e}),y+=X.length-1}e++}}static createElement(t,s){const i=pe.createElement("template");return i.innerHTML=t,i}}function he(o,t,s=o,i){var p,h;if(t===ie)return t;let n=i!==void 0?(p=s._$Co)==null?void 0:p[i]:s._$Cl;const e=Ie(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==e&&((h=n==null?void 0:n._$AO)==null||h.call(n,!1),e===void 0?n=void 0:(n=new e(o),n._$AT(o,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),n!==void 0&&(t=he(o,n._$AS(o,t.values),n,i)),t}let Rr=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,n=((t==null?void 0:t.creationScope)??pe).importNode(s,!0);de.currentNode=n;let e=de.nextNode(),p=0,h=0,g=i[0];for(;g!==void 0;){if(p===g.index){let $;g.type===2?$=new Se(e,e.nextSibling,this,t):g.type===1?$=new g.ctor(e,g.name,g.strings,this,t):g.type===6&&($=new Fr(e,this,t)),this._$AV.push($),g=i[++h]}p!==(g==null?void 0:g.index)&&(e=de.nextNode(),p++)}return de.currentNode=pe,n}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}};class Se{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,i,n){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=he(this,t,s),Ie(t)?t===P||t==null||t===""?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==P&&Ie(this._$AH)?this._$AA.nextSibling.data=t:this.T(pe.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Fe.createElement(jr(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)==null?void 0:e._$AD)===n)this._$AH.p(s);else{const p=new Rr(n,this),h=p.u(this.options);p.p(s),this.T(h),this._$AH=p}}_$AC(t){let s=Br.get(t.strings);return s===void 0&&Br.set(t.strings,s=new Fe(t)),s}k(t){Rt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const e of t)n===s.length?s.push(i=new Se(this.O(Me()),this.O(Me()),this,this.options)):i=s[n],i._$AI(e),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}}class He{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,n,e){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=s,this._$AM=n,this.options=e,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=P}_$AI(t,s=this,i,n){const e=this.strings;let p=!1;if(e===void 0)t=he(this,t,s,0),p=!Ie(t)||t!==this._$AH&&t!==ie,p&&(this._$AH=t);else{const h=t;let g,$;for(t=e[0],g=0;g<e.length-1;g++)$=he(this,h[i+g],s,g),$===ie&&($=this._$AH[g]),p||(p=!Ie($)||$!==this._$AH[g]),$===P?t=P:t!==P&&(t+=($??"")+e[g+1]),this._$AH[g]=$}p&&!n&&this.j(t)}j(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mr extends He{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===P?void 0:t}}class Ir extends He{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==P)}}class Ur extends He{constructor(t,s,i,n,e){super(t,s,i,n,e),this.type=5}_$AI(t,s=this){if((t=he(this,t,s,0)??P)===ie)return;const i=this._$AH,n=t===P&&i!==P||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,e=t!==P&&(i===P||n);n&&this.element.removeEventListener(this.name,this,i),e&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Fr{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){he(this,t)}}const Us={M:jt,P:X,A:zt,C:1,L:zr,R:Rr,D:Pr,V:he,I:Se,H:He,N:Ir,U:Ur,B:Mr,F:Fr},It=Re.litHtmlPolyfillSupport;It==null||It(Fe,Se),(Re.litHtmlVersions??(Re.litHtmlVersions=[])).push("3.2.1");const Qe=(o,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const e=(s==null?void 0:s.renderBefore)??null;i._$litPart$=n=new Se(t.insertBefore(Me(),e),e,void 0,s??{})}return n._$AI(o),n};/**
13
+ */const Ie=globalThis,ot=Ie.trustedTypes,kr=ot?ot.createPolicy("lit-html",{createHTML:o=>o}):void 0,jt="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,zt="?"+X,Ms=`<${zt}>`,pe=document,Ue=()=>pe.createComment(""),Fe=o=>o===null||typeof o!="object"&&typeof o!="function",Rt=Array.isArray,Pr=o=>Rt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Mt=`[
14
+ \f\r]`,He=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tr=/-->/g,Or=/>/g,ue=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Dr=/'/g,Lr=/"/g,Nr=/^(?:script|style|textarea|title)$/i,Is=o=>(t,...s)=>({_$litType$:o,strings:t,values:s}),A=Is(1),ie=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),Br=new WeakMap,de=pe.createTreeWalker(pe,129);function jr(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return kr!==void 0?kr.createHTML(t):t}const zr=(o,t)=>{const s=o.length-1,i=[];let n,e=t===2?"<svg>":t===3?"<math>":"",p=He;for(let h=0;h<s;h++){const g=o[h];let $,C,y=-1,E=0;for(;E<g.length&&(p.lastIndex=E,C=p.exec(g),C!==null);)E=p.lastIndex,p===He?C[1]==="!--"?p=Tr:C[1]!==void 0?p=Or:C[2]!==void 0?(Nr.test(C[2])&&(n=RegExp("</"+C[2],"g")),p=ue):C[3]!==void 0&&(p=ue):p===ue?C[0]===">"?(p=n??He,y=-1):C[1]===void 0?y=-2:(y=p.lastIndex-C[2].length,$=C[1],p=C[3]===void 0?ue:C[3]==='"'?Lr:Dr):p===Lr||p===Dr?p=ue:p===Tr||p===Or?p=He:(p=ue,n=void 0);const x=p===ue&&o[h+1].startsWith("/>")?" ":"";e+=p===He?g+Ms:y>=0?(i.push($),g.slice(0,y)+jt+g.slice(y)+X+x):g+X+(y===-2?h:x)}return[jr(o,e+(o[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Qe{constructor({strings:t,_$litType$:s},i){let n;this.parts=[];let e=0,p=0;const h=t.length-1,g=this.parts,[$,C]=zr(t,s);if(this.el=Qe.createElement($,i),de.currentNode=this.el.content,s===2||s===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(n=de.nextNode())!==null&&g.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const y of n.getAttributeNames())if(y.endsWith(jt)){const E=C[p++],x=n.getAttribute(y).split(X),k=/([.?@])?(.*)/.exec(E);g.push({type:1,index:e,name:k[2],strings:x,ctor:k[1]==="."?Mr:k[1]==="?"?Ir:k[1]==="@"?Ur:qe}),n.removeAttribute(y)}else y.startsWith(X)&&(g.push({type:6,index:e}),n.removeAttribute(y));if(Nr.test(n.tagName)){const y=n.textContent.split(X),E=y.length-1;if(E>0){n.textContent=ot?ot.emptyScript:"";for(let x=0;x<E;x++)n.append(y[x],Ue()),de.nextNode(),g.push({type:2,index:++e});n.append(y[E],Ue())}}}else if(n.nodeType===8)if(n.data===zt)g.push({type:2,index:e});else{let y=-1;for(;(y=n.data.indexOf(X,y+1))!==-1;)g.push({type:7,index:e}),y+=X.length-1}e++}}static createElement(t,s){const i=pe.createElement("template");return i.innerHTML=t,i}}function he(o,t,s=o,i){var p,h;if(t===ie)return t;let n=i!==void 0?(p=s._$Co)==null?void 0:p[i]:s._$Cl;const e=Fe(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==e&&((h=n==null?void 0:n._$AO)==null||h.call(n,!1),e===void 0?n=void 0:(n=new e(o),n._$AT(o,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),n!==void 0&&(t=he(o,n._$AS(o,t.values),n,i)),t}let Rr=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,n=((t==null?void 0:t.creationScope)??pe).importNode(s,!0);de.currentNode=n;let e=de.nextNode(),p=0,h=0,g=i[0];for(;g!==void 0;){if(p===g.index){let $;g.type===2?$=new Ae(e,e.nextSibling,this,t):g.type===1?$=new g.ctor(e,g.name,g.strings,this,t):g.type===6&&($=new Fr(e,this,t)),this._$AV.push($),g=i[++h]}p!==(g==null?void 0:g.index)&&(e=de.nextNode(),p++)}return de.currentNode=pe,n}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}};class Ae{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,i,n){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=he(this,t,s),Fe(t)?t===P||t==null||t===""?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==P&&Fe(this._$AH)?this._$AA.nextSibling.data=t:this.T(pe.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Qe.createElement(jr(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)==null?void 0:e._$AD)===n)this._$AH.p(s);else{const p=new Rr(n,this),h=p.u(this.options);p.p(s),this.T(h),this._$AH=p}}_$AC(t){let s=Br.get(t.strings);return s===void 0&&Br.set(t.strings,s=new Qe(t)),s}k(t){Rt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const e of t)n===s.length?s.push(i=new Ae(this.O(Ue()),this.O(Ue()),this,this.options)):i=s[n],i._$AI(e),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}}class qe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,n,e){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=s,this._$AM=n,this.options=e,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=P}_$AI(t,s=this,i,n){const e=this.strings;let p=!1;if(e===void 0)t=he(this,t,s,0),p=!Fe(t)||t!==this._$AH&&t!==ie,p&&(this._$AH=t);else{const h=t;let g,$;for(t=e[0],g=0;g<e.length-1;g++)$=he(this,h[i+g],s,g),$===ie&&($=this._$AH[g]),p||(p=!Fe($)||$!==this._$AH[g]),$===P?t=P:t!==P&&(t+=($??"")+e[g+1]),this._$AH[g]=$}p&&!n&&this.j(t)}j(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mr extends qe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===P?void 0:t}}class Ir extends qe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==P)}}class Ur extends qe{constructor(t,s,i,n,e){super(t,s,i,n,e),this.type=5}_$AI(t,s=this){if((t=he(this,t,s,0)??P)===ie)return;const i=this._$AH,n=t===P&&i!==P||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,e=t!==P&&(i===P||n);n&&this.element.removeEventListener(this.name,this,i),e&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Fr{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){he(this,t)}}const Us={M:jt,P:X,A:zt,C:1,L:zr,R:Rr,D:Pr,V:he,I:Ae,H:qe,N:Ir,U:Ur,B:Mr,F:Fr},It=Ie.litHtmlPolyfillSupport;It==null||It(Qe,Ae),(Ie.litHtmlVersions??(Ie.litHtmlVersions=[])).push("3.2.1");const We=(o,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const e=(s==null?void 0:s.renderBefore)??null;i._$litPart$=n=new Ae(t.insertBefore(Ue(),e),e,void 0,s??{})}return n._$AI(o),n};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */let O=class extends _e{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Qe(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return ie}};O._$litElement$=!0,O.finalized=!0,(_i=globalThis.litElementHydrateSupport)==null||_i.call(globalThis,{LitElement:O});const Ut=globalThis.litElementPolyfillSupport;Ut==null||Ut({LitElement:O}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
19
+ */let O=class extends Se{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=We(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return ie}};O._$litElement$=!0,O.finalized=!0,(_i=globalThis.litElementHydrateSupport)==null||_i.call(globalThis,{LitElement:O});const Ut=globalThis.litElementPolyfillSupport;Ut==null||Ut({LitElement:O}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const Ft={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},qe=o=>(...t)=>({_$litDirective$:o,values:t});let nt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this._$Ct=t,this._$AM=s,this._$Ci=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
23
+ */const Ft={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ve=o=>(...t)=>({_$litDirective$:o,values:t});let nt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this._$Ct=t,this._$AM=s,this._$Ci=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
24
24
  * @license
25
25
  * Copyright 2018 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const Hr="important",Fs=" !"+Hr,Ht=qe(class extends nt{constructor(o){var t;if(super(o),o.type!==Ft.ATTRIBUTE||o.name!=="style"||((t=o.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,s)=>{const i=o[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[t]){const{style:s}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in t){const n=t[i];if(n!=null){this.ft.add(i);const e=typeof n=="string"&&n.endsWith(Fs);i.includes("-")||e?s.setProperty(i,e?n.slice(0,-11):n,e?Hr:""):s[i]=n}}return ie}}),Hs=F`
27
+ */const Hr="important",Fs=" !"+Hr,Ht=Ve(class extends nt{constructor(o){var t;if(super(o),o.type!==Ft.ATTRIBUTE||o.name!=="style"||((t=o.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,s)=>{const i=o[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[t]){const{style:s}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in t){const n=t[i];if(n!=null){this.ft.add(i);const e=typeof n=="string"&&n.endsWith(Fs);i.includes("-")||e?s.setProperty(i,e?n.slice(0,-11):n,e?Hr:""):s[i]=n}}return ie}}),Hs=F`
28
28
  :host{
29
29
  display: inline-block;
30
30
  --text-on-color: var(--spectric-text-on-color, #ffffff);
@@ -277,7 +277,7 @@ opacity:1
277
277
  * @license
278
278
  * Copyright 2017 Google LLC
279
279
  * SPDX-License-Identifier: BSD-3-Clause
280
- */function We(o){return v({...o,state:!0,attribute:!1})}/**
280
+ */function xe(o){return v({...o,state:!0,attribute:!1})}/**
281
281
  * @license
282
282
  * Copyright 2017 Google LLC
283
283
  * SPDX-License-Identifier: BSD-3-Clause
@@ -289,7 +289,7 @@ opacity:1
289
289
  * @license
290
290
  * Copyright 2017 Google LLC
291
291
  * SPDX-License-Identifier: BSD-3-Clause
292
- */function at(o){return(t,s)=>Qr(t,s,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(o))??null}})}class qr{constructor(t,s,i,n){this._handler=i,this._type=s,this._handler=i,this._options=n||!1,t instanceof Promise?t.then(e=>{this._handler&&(this._node=e,this._node.addEventListener(this._type,this._handler,this._options))}):typeof t=="function"?(this._node=t(),this._node.addEventListener(this._type,this._handler,this._options)):(this._node=t,this._node.addEventListener(this._type,this._handler,this._options))}dispose(){this._handler&&(this._node&&this._node.removeEventListener(this._type,this._handler,this._options),this._node=void 0,this._handler=void 0)}}class Ve extends O{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(t,s,i,n){if(this._disposableListeners.find(p=>p.event===s&&p.target===t&&p.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:t,event:s,handler:i,options:n}),this._connected&&this.registerDisposable(new qr(t,s,i,n))}registerDisposable(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(t),t}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:t,event:s,handler:i,options:n})=>{this.registerDisposable(new qr(t,s,i,n))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(t=>{t.dispose()}),this._isDisposed=!0}}var Ws=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,q=(o,t,s,i)=>{for(var n=i>1?void 0:i?Vs(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Ws(t,s,n),n},Wr=(o=>(o.large="large",o.medium="medium",o.small="small",o.xsmall="xsmall",o.xxsmall="xxsmall",o.tiny="tiny",o))(Wr||{}),Vr=(o=>(o.primary="primary",o.secondary="secondary",o.text="text",o))(Vr||{});const Ys={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};d.SpectricButton=class extends Ve{constructor(){super(),this.variant="primary",this.disabled=!1,this.size="small",this.label="",this.danger=!1,this.icon=!1,this.tooltipPosition="right",this._onClick=t=>{if(t instanceof CustomEvent||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),this.disabled))return;const s={bubbles:!0,composed:!0,detail:t};this.dispatchEvent(new CustomEvent("click",s))},this.addDisposableListener(this,"click",this._onClick,{capture:!0})}render(){const t=Ys[this.variant]||"spectric-button--primary";return A`
292
+ */function at(o){return(t,s)=>Qr(t,s,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(o))??null}})}class qr{constructor(t,s,i,n){this._handler=i,this._type=s,this._handler=i,this._options=n||!1,t instanceof Promise?t.then(e=>{this._handler&&(this._node=e,this._node.addEventListener(this._type,this._handler,this._options))}):typeof t=="function"?(this._node=t(),this._node.addEventListener(this._type,this._handler,this._options)):(this._node=t,this._node.addEventListener(this._type,this._handler,this._options))}dispose(){this._handler&&(this._node&&this._node.removeEventListener(this._type,this._handler,this._options),this._node=void 0,this._handler=void 0)}}class Ye extends O{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(t,s,i,n){if(this._disposableListeners.find(p=>p.event===s&&p.target===t&&p.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:t,event:s,handler:i,options:n}),this._connected&&this.registerDisposable(new qr(t,s,i,n))}registerDisposable(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(t),t}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:t,event:s,handler:i,options:n})=>{this.registerDisposable(new qr(t,s,i,n))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(t=>{t.dispose()}),this._isDisposed=!0}}var Ws=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,q=(o,t,s,i)=>{for(var n=i>1?void 0:i?Vs(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Ws(t,s,n),n},Wr=(o=>(o.large="large",o.medium="medium",o.small="small",o.xsmall="xsmall",o.xxsmall="xxsmall",o.tiny="tiny",o))(Wr||{}),Vr=(o=>(o.primary="primary",o.secondary="secondary",o.text="text",o))(Vr||{});const Ys={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};d.SpectricButton=class extends Ye{constructor(){super(),this.variant="primary",this.disabled=!1,this.size="small",this.label="",this.danger=!1,this.icon=!1,this.tooltipPosition="right",this._onClick=t=>{if(t instanceof CustomEvent||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),this.disabled))return;const s={bubbles:!0,composed:!0,detail:t};this.dispatchEvent(new CustomEvent("click",s))},this.addDisposableListener(this,"click",this._onClick,{capture:!0})}render(){const t=Ys[this.variant]||"spectric-button--primary";return A`
293
293
  ${this.tooltip?A`<spectric-tooltip .text=${this.tooltip} .position=${this.tooltipPosition||"right"} .triggerTarget=${this}></spectric-tooltip>`:null}
294
294
  <button
295
295
  type="button"
@@ -308,11 +308,11 @@ opacity:1
308
308
  * @license
309
309
  * Copyright 2017 Google LLC
310
310
  * SPDX-License-Identifier: BSD-3-Clause
311
- */const Ye=(o,t)=>{var i;const s=o._$AN;if(s===void 0)return!1;for(const n of s)(i=n._$AO)==null||i.call(n,t,!1),Ye(n,t);return!0},ct=o=>{let t,s;do{if((t=o._$AM)===void 0)break;s=t._$AN,s.delete(o),o=t}while((s==null?void 0:s.size)===0)},Zr=o=>{for(let t;t=o._$AM;o=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(o))break;s.add(o),ro(t)}};function eo(o){this._$AN!==void 0?(ct(this),this._$AM=o,Zr(this)):this._$AM=o}function to(o,t=!1,s=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Ye(i[e],!1),ct(i[e]);else i!=null&&(Ye(i,!1),ct(i));else Ye(this,o)}const ro=o=>{o.type==Ft.CHILD&&(o._$AP??(o._$AP=to),o._$AQ??(o._$AQ=eo))};class Xr extends nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Zr(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),s&&(Ye(this,t),ct(this))}setValue(t){if(Xs(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
311
+ */const Ke=(o,t)=>{var i;const s=o._$AN;if(s===void 0)return!1;for(const n of s)(i=n._$AO)==null||i.call(n,t,!1),Ke(n,t);return!0},ct=o=>{let t,s;do{if((t=o._$AM)===void 0)break;s=t._$AN,s.delete(o),o=t}while((s==null?void 0:s.size)===0)},Zr=o=>{for(let t;t=o._$AM;o=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(o))break;s.add(o),ro(t)}};function eo(o){this._$AN!==void 0?(ct(this),this._$AM=o,Zr(this)):this._$AM=o}function to(o,t=!1,s=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Ke(i[e],!1),ct(i[e]);else i!=null&&(Ke(i,!1),ct(i));else Ke(this,o)}const ro=o=>{o.type==Ft.CHILD&&(o._$AP??(o._$AP=to),o._$AQ??(o._$AQ=eo))};class Xr extends nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Zr(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),s&&(Ke(this,t),ct(this))}setValue(t){if(Xs(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
312
312
  * @license
313
313
  * Copyright 2020 Google LLC
314
314
  * SPDX-License-Identifier: BSD-3-Clause
315
- */const lt=()=>new io;let io=class{};const Vt=new WeakMap,pt=qe(class extends Xr{render(o){return P}update(o,[t]){var i;const s=t!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=o.options)==null?void 0:i.host,this.rt(this.ct=o.element)),P}rt(o){if(this.isConnected||(o=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let s=Vt.get(t);s===void 0&&(s=new WeakMap,Vt.set(t,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t;return typeof this.Y=="function"?(o=Vt.get(this.ht??globalThis))==null?void 0:o.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),so=class{constructor(t){return this.buffer=t,this.u8=new Uint8Array(t),new Proxy(this,{get(s,i){return s[i]?s[i]:s.getBit(i)}})}getBit(t){var s=this.u8[t>>3],i=t&7;return s>>7-i&1}setBit(t,s){var i=t&7;s?this.u8[t>>3]|=128>>i:this.u8[t>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(t,s){for(let i=s||0,n=0,e=t.length;n<e;i++,n++)this.setBit(i,t[n])}subarray(t,s){let i=[];t=t||0,s=s||this.length,s=s>this.length?this.length:s;for(let n=t;n<s;n++)i.push(this.getBit(n));return i}},Gr=o=>{var t;return(...s)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{o.apply(void 0,s)})}};var oo=Object.defineProperty,no=Object.getOwnPropertyDescriptor,ve=(o,t,s,i)=>{for(var n=i>1?void 0:i?no(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oo(t,s,n),n};const ao=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],ut={width:200,height:200},dt={width:10,height:10};d.BitDisplayCanvas=class extends Ve{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:lt(),canvas:lt(),scrollDiv:lt()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let t=new ResizeObserver(this.onResize);t.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=t,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var s={};ao.forEach(i=>{this.addDisposableListener(this._canvas,i,Gr(async n=>{n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault();var e=await this._canvas;let p=e.getBoundingClientRect(),h={x:Math.floor(Math.abs(n.clientX-p.left)),y:Math.floor(Math.abs(n.clientY-p.top))},g=this.canvasPositionToBit(h);if(i==="mousemove"&&s[i]==g)return;s[i]=g;let $="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(g!=-1){let C=new CustomEvent($,{detail:{bitIndex:g,position:h,nativeEvent:n}});this.dispatchEvent(C)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(t){t.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new so(this.arrayBuffer));const s=["arrayBuffer","scale","frameWidth","width","height"];for(const i of s)if(t.has(i)){this.paint();return}}canvasPositionToBit(t){let s=Math.floor(t.x/this.scale),i=Math.floor(t.y/this.scale);return s>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+s)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:t,_bitArray:s}=this;if(t<=0)return;this.calculateViewport();const{width:i=ut.width,height:n=ut.height}=this,e=this.getPxPerBit(),p=this.refs.canvas.value.getContext("2d");if(!p)return;this.state.scale!=e&&(p.reset(),p.scale(e,e));let h=getComputedStyle(this);p.fillStyle=h.color,p.clearRect(0,0,i,n);let g=0;for(let $=this.yStart*t+this.xStart,C=s.length;$<C;$++){let y=$%t-this.xStart;if(!(y<0)){if(Math.floor(y*e)>i){g++,$=g*t+this.yStart*t+this.xStart-1;continue}if(Math.floor(g*e)>n)break;s.getBit($)===1&&p.fillRect(y,g,1,1),($+1)%t===0&&$>=t-1&&g++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:t,_bitArray:s}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const n=s.length/t*i,e=t*i,p=this.refs.scrollDiv.value;p.style.width=e+"px",p.style.height=n+"px"}}render(){const{height:t=ut.height,width:s=ut.width}=this;return A`
315
+ */const lt=()=>new io;let io=class{};const Vt=new WeakMap,pt=Ve(class extends Xr{render(o){return P}update(o,[t]){var i;const s=t!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=o.options)==null?void 0:i.host,this.rt(this.ct=o.element)),P}rt(o){if(this.isConnected||(o=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let s=Vt.get(t);s===void 0&&(s=new WeakMap,Vt.set(t,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t;return typeof this.Y=="function"?(o=Vt.get(this.ht??globalThis))==null?void 0:o.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),so=class{constructor(t){return this.buffer=t,this.u8=new Uint8Array(t),new Proxy(this,{get(s,i){return s[i]?s[i]:s.getBit(i)}})}getBit(t){var s=this.u8[t>>3],i=t&7;return s>>7-i&1}setBit(t,s){var i=t&7;s?this.u8[t>>3]|=128>>i:this.u8[t>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(t,s){for(let i=s||0,n=0,e=t.length;n<e;i++,n++)this.setBit(i,t[n])}subarray(t,s){let i=[];t=t||0,s=s||this.length,s=s>this.length?this.length:s;for(let n=t;n<s;n++)i.push(this.getBit(n));return i}},Gr=o=>{var t;return(...s)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{o.apply(void 0,s)})}};var oo=Object.defineProperty,no=Object.getOwnPropertyDescriptor,ve=(o,t,s,i)=>{for(var n=i>1?void 0:i?no(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oo(t,s,n),n};const ao=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],ut={width:200,height:200},dt={width:10,height:10};d.BitDisplayCanvas=class extends Ye{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:lt(),canvas:lt(),scrollDiv:lt()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let t=new ResizeObserver(this.onResize);t.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=t,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var s={};ao.forEach(i=>{this.addDisposableListener(this._canvas,i,Gr(async n=>{n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault();var e=await this._canvas;let p=e.getBoundingClientRect(),h={x:Math.floor(Math.abs(n.clientX-p.left)),y:Math.floor(Math.abs(n.clientY-p.top))},g=this.canvasPositionToBit(h);if(i==="mousemove"&&s[i]==g)return;s[i]=g;let $="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(g!=-1){let C=new CustomEvent($,{detail:{bitIndex:g,position:h,nativeEvent:n}});this.dispatchEvent(C)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(t){t.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new so(this.arrayBuffer));const s=["arrayBuffer","scale","frameWidth","width","height"];for(const i of s)if(t.has(i)){this.paint();return}}canvasPositionToBit(t){let s=Math.floor(t.x/this.scale),i=Math.floor(t.y/this.scale);return s>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+s)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:t,_bitArray:s}=this;if(t<=0)return;this.calculateViewport();const{width:i=ut.width,height:n=ut.height}=this,e=this.getPxPerBit(),p=this.refs.canvas.value.getContext("2d");if(!p)return;this.state.scale!=e&&(p.reset(),p.scale(e,e));let h=getComputedStyle(this);p.fillStyle=h.color,p.clearRect(0,0,i,n);let g=0;for(let $=this.yStart*t+this.xStart,C=s.length;$<C;$++){let y=$%t-this.xStart;if(!(y<0)){if(Math.floor(y*e)>i){g++,$=g*t+this.yStart*t+this.xStart-1;continue}if(Math.floor(g*e)>n)break;s.getBit($)===1&&p.fillRect(y,g,1,1),($+1)%t===0&&$>=t-1&&g++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:t,_bitArray:s}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const n=s.length/t*i,e=t*i,p=this.refs.scrollDiv.value;p.style.width=e+"px",p.style.height=n+"px"}}render(){const{height:t=ut.height,width:s=ut.width}=this;return A`
316
316
  <div
317
317
  id="viewport"
318
318
  ${pt(this.refs.viewport)}
@@ -480,12 +480,12 @@ opacity:1
480
480
  <slot name="end"></slot>
481
481
  </div>
482
482
  </header>
483
- `}},d.Header.styles=co,ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showCreateAccount",2),ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showLoginButton",2),ht([v({type:String,reflect:!0})],d.Header.prototype,"username",2),d.Header=ht([D("spectric-header")],d.Header);var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Ae=(o,t,s,i)=>{for(var n=i>1?void 0:i?ho(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&uo(t,s,n),n};const fo={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let me=class extends O{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=o=>{o.preventDefault(),o.stopPropagation();const t={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:s,text:i,headerStyle:n,dismissable:e}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:s,text:i,headerStyle:n,dismissable:e},...t}))}}render(){if(!this._dismissed)return A`
483
+ `}},d.Header.styles=co,ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showCreateAccount",2),ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showLoginButton",2),ht([v({type:String,reflect:!0})],d.Header.prototype,"username",2),d.Header=ht([D("spectric-header")],d.Header);var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Ee=(o,t,s,i)=>{for(var n=i>1?void 0:i?ho(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&uo(t,s,n),n};const fo={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let me=class extends O{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=o=>{o.preventDefault(),o.stopPropagation();const t={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:s,text:i,headerStyle:n,dismissable:e}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:s,text:i,headerStyle:n,dismissable:e},...t}))}}render(){if(!this._dismissed)return A`
484
484
  <header style=${Ht({...fo,...this.headerStyle})}>
485
485
  <div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
486
486
  ${this.dismissable?A`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>`:null}
487
487
  </header>
488
- `}};Ae([v({type:Boolean,reflect:!0})],me.prototype,"dismissable",2),Ae([v({type:String,reflect:!0})],me.prototype,"text",2),Ae([v({type:String,reflect:!0})],me.prototype,"bannerId",2),Ae([v({type:Object})],me.prototype,"headerStyle",2),Ae([v({state:!0,type:Boolean,attribute:!1})],me.prototype,"_dismissed",2),me=Ae([D("spectric-banner")],me);const go=F`
488
+ `}};Ee([v({type:Boolean,reflect:!0})],me.prototype,"dismissable",2),Ee([v({type:String,reflect:!0})],me.prototype,"text",2),Ee([v({type:String,reflect:!0})],me.prototype,"bannerId",2),Ee([v({type:Object})],me.prototype,"headerStyle",2),Ee([v({state:!0,type:Boolean,attribute:!1})],me.prototype,"_dismissed",2),me=Ee([D("spectric-banner")],me);const go=F`
489
489
 
490
490
  :host {
491
491
  height:100vh;
@@ -645,7 +645,7 @@ article{
645
645
  * @license
646
646
  * Copyright 2018 Google LLC
647
647
  * SPDX-License-Identifier: BSD-3-Clause
648
- */const Yt=o=>o??P;class bo extends Xr{constructor(){super(...arguments),this.prevData={}}render(t){return P}update(t,[s]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)==null?void 0:i.host)||this.element,this.apply(s),this.groom(s),this.prevData={...s}}apply(t){if(!t)return;const{element:s}=this;for(const i in t){const n=t[i];s[i]!==n&&(s[i]=n)}}groom(t){const{prevData:s,element:i}=this;if(s)for(const n in s)(!t||!(n in t)&&i[n]===s[n])&&(i[n]=void 0)}}const Ke=qe(bo);var Kt=(o=>(o.None="none",o.Uscui="us.cui",o.Usclassified="us.classified",o.Usunclassified="us.unclassified",o.Usconfidential="us.confidential",o.Ussecret="us.secret",o.Ustopsecret="us.topsecret",o.UstopsecretSi="us.topsecret.si",o.Uknotset="uk.notset",o.Ukofficial="uk.official",o.Uksecret="uk.secret",o.Uktopsecret="uk.topsecret",o.Caprotected_a="ca.protected_a",o.Caprotected_b="ca.protected_b",o.Caprotected_c="ca.protected_c",o.Caconfidential="ca.confidential",o.Casecret="ca.secret",o.Catopsecret="ca.topsecret",o.Auunofficial="au.unofficial",o.Auofficial="au.official",o.Auofficialsensitive="au.officialsensitive",o.Auconfidential="au.confidential",o.Ausecret="au.secret",o.Autopsecret="au.topsecret",o))(Kt||{});const ft={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,W=(o,t,s,i)=>{for(var n=i>1?void 0:i?mo(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&vo(t,s,n),n};d.SpectricPage=class extends O{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=Kt.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!ft[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=Kt.None);const t=this.classificationLevel?this.classificationText||ft[this.classificationLevel].content:"",s=this.showHeader?A`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Yt(this.username)}>
648
+ */const Yt=o=>o??P;class bo extends Xr{constructor(){super(...arguments),this.prevData={}}render(t){return P}update(t,[s]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)==null?void 0:i.host)||this.element,this.apply(s),this.groom(s),this.prevData={...s}}apply(t){if(!t)return;const{element:s}=this;for(const i in t){const n=t[i];s[i]!==n&&(s[i]=n)}}groom(t){const{prevData:s,element:i}=this;if(s)for(const n in s)(!t||!(n in t)&&i[n]===s[n])&&(i[n]=void 0)}}const Ze=Ve(bo);var Kt=(o=>(o.None="none",o.Uscui="us.cui",o.Usclassified="us.classified",o.Usunclassified="us.unclassified",o.Usconfidential="us.confidential",o.Ussecret="us.secret",o.Ustopsecret="us.topsecret",o.UstopsecretSi="us.topsecret.si",o.Uknotset="uk.notset",o.Ukofficial="uk.official",o.Uksecret="uk.secret",o.Uktopsecret="uk.topsecret",o.Caprotected_a="ca.protected_a",o.Caprotected_b="ca.protected_b",o.Caprotected_c="ca.protected_c",o.Caconfidential="ca.confidential",o.Casecret="ca.secret",o.Catopsecret="ca.topsecret",o.Auunofficial="au.unofficial",o.Auofficial="au.official",o.Auofficialsensitive="au.officialsensitive",o.Auconfidential="au.confidential",o.Ausecret="au.secret",o.Autopsecret="au.topsecret",o))(Kt||{});const ft={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,W=(o,t,s,i)=>{for(var n=i>1?void 0:i?mo(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&vo(t,s,n),n};d.SpectricPage=class extends O{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=Kt.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!ft[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=Kt.None);const t=this.classificationLevel?this.classificationText||ft[this.classificationLevel].content:"",s=this.showHeader?A`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Yt(this.username)}>
649
649
  <slot name="branding" slot="branding"></slot>
650
650
  <slot name="name" slot="name"></slot>
651
651
  <slot name="center" slot="center"></slot>
@@ -653,10 +653,10 @@ article{
653
653
  </spectric-header>`:null;return A`
654
654
  ${this.classificationLevel&&t?A`
655
655
  <!-- Classification Banner -->
656
- <spectric-banner ${Ke({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>
656
+ <spectric-banner ${Ze({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>
657
657
  `:null}
658
658
  <spectric-theme theme=${Yt(this.theme)}>
659
- ${this.notifications?this.notifications.map(i=>A`<spectric-banner ${Ke(i)} ></spectric-banner>`):null}
659
+ ${this.notifications?this.notifications.map(i=>A`<spectric-banner ${Ze(i)} ></spectric-banner>`):null}
660
660
  ${this.headerSticky?s:null}
661
661
  <article>
662
662
  ${this.headerSticky?null:s}
@@ -666,7 +666,7 @@ article{
666
666
  </section>
667
667
  </article>
668
668
  </spectric-theme>
669
- ${this.classificationLevel&&t?A`<spectric-banner ${Ke({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>`:null}
669
+ ${this.classificationLevel&&t?A`<spectric-banner ${Ze({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>`:null}
670
670
 
671
671
  `}},d.SpectricPage.styles=go,W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showHeader",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"headerSticky",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationLevel",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationText",2),W([v({type:Array,reflect:!0})],d.SpectricPage.prototype,"notifications",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showCreateAccount",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showLoginButton",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"username",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"theme",2),d.SpectricPage=W([D("spectric-page")],d.SpectricPage);var yo=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,T=(o,t,s,i)=>{for(var n=i>1?void 0:i?$o(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&yo(t,s,n),n},Jr=(o=>(o.Text="text",o.TextArea="text-area",o.number="number",o.color="color",o.date="date",o.datetime="datetime-local",o.email="email",o.file="file",o.hidden="hidden",o.password="password",o.checkbox="checkbox",o))(Jr||{});d.SpectricInput=class extends O{constructor(){super(...arguments),this.placeholder="",this.readonly=!1,this.variant="text",this.disabled=!1,this.label="",this.hidePasswordLabel="Hide",this.showPasswordLabel="Show",this.showPasswordVisibilityToggle=!0,this.helperText="",this.invalid=!1,this.required=!1,this.invalidText="",this.name="",this.pattern="",this.maxCount=0,this._value="",this._showPassword=!1,this.autocomplete="off",this._handleInput=({target:t})=>{const s=t;this.value=s.value,this.invalid=!s.validity.valid},this.handleTogglePasswordVisibility=()=>{this._showPassword=!this._showPassword,this.requestUpdate()}}createRenderRoot(){return this}get selectionStart(){return this._input?this._input.selectionStart:null}get value(){return this._input?this.variant=="number"?parseFloat(this._input.value):this._input.value:this._value}set value(t){const s=this._value;this._value=t,this.requestUpdate("value",s),this._input&&(this._input.value=String(t))}blur(){this._input&&this._input.blur()}focus(t){this._input&&(this._input.blur(),this._input.focus(t))}setSelectionRange(t,s,i="none"){this._input&&this._input.setSelectionRange(t,s,i)}updated(t){t.has("checked")&&this.dispatchEvent(new Event("change",{bubbles:!0}))}render(){switch(this.variant){case"text":case"password":case"number":case"email":case"date":case"datetime-local":case"file":case"color":return A`
672
672
  <div class="inputWrapper">
@@ -682,15 +682,15 @@ article{
682
682
  ?disabled="${this.disabled}"
683
683
  aria-describedby="helper-text"
684
684
  id="input"
685
- name="${xe(this.name)}"
686
- pattern="${xe(this.pattern)}"
687
- placeholder="${xe(this.placeholder)}"
688
- autocomplete="${xe(this.autocomplete)}"
685
+ name="${Ce(this.name)}"
686
+ pattern="${Ce(this.pattern)}"
687
+ placeholder="${Ce(this.placeholder)}"
688
+ autocomplete="${Ce(this.autocomplete)}"
689
689
  ?readonly="${this.readonly}"
690
690
  ?required="${this.required}"
691
- type="${xe(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
691
+ type="${Ce(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
692
692
  .value="${this._value}"
693
- maxlength="${xe(this.maxCount>0?this.maxCount:void 0)}"
693
+ maxlength="${Ce(this.maxCount>0?this.maxCount:void 0)}"
694
694
  @input="${this._handleInput}"
695
695
  @change=${()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))}}
696
696
  />
@@ -720,11 +720,11 @@ article{
720
720
  ${this.label}
721
721
  </div>
722
722
  </label>
723
- `}return`Not yet implemented ${this.variant}`}},T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"checked",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"placeholder",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"readonly",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"variant",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"disabled",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"label",2),T([v()],d.SpectricInput.prototype,"hidePasswordLabel",2),T([v()],d.SpectricInput.prototype,"showPasswordLabel",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"showPasswordVisibilityToggle",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"helperText",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"invalid",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"required",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"invalidText",2),T([v()],d.SpectricInput.prototype,"name",2),T([v()],d.SpectricInput.prototype,"pattern",2),T([v({type:Number,reflect:!0})],d.SpectricInput.prototype,"maxCount",2),T([v({reflect:!0})],d.SpectricInput.prototype,"autocomplete",2),T([v({reflect:!0})],d.SpectricInput.prototype,"value",1),T([fe("input")],d.SpectricInput.prototype,"_input",2),d.SpectricInput=T([D("spectric-input")],d.SpectricInput);const xe=o=>Yt(o===""?void 0:o??void 0),wo="end of input",_o={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class ei extends Error{constructor(t,s){let i=t.message;if(t.expected){const p=t.expected.map(g=>_o[g.description]||g.description).join(", ");let h=t.found?`"${t.found}"`:wo;i=`Expected ${p} but ${h} found.`}const n=[i,s,"-".repeat(t.location.start.offset)+"^"].join(`
724
- `);super(n),this.name="DQLSyntaxError",this.shortMessage=i}}function Ee(o){return{type:"literal",value:o}}function Zt(o){return o.value}const So=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Ee,toOpenSearchQuery:Zt},Symbol.toStringTag,{value:"Module"})),{SyntaxError:Hc,parse:gt}=function(){function o(i,n){function e(){this.constructor=i}e.prototype=n.prototype,i.prototype=new e}function t(i,n,e,p){this.message=i,this.expected=n,this.found=e,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,Error);function s(i){var n=arguments.length>1?arguments[1]:{},e={},p={start:us,Literal:$r},h=us,g=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r!==null?r:we.function.buildNode("is","*","*")},$=function(){return jc},C=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("or",[r,a])},y=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("and",[r,a])},E=function(r){return r.type==="cursor"?r:Z("not",[r])},x="(",k={type:"literal",value:"(",description:'"("'},N=")",z={type:"literal",value:")",description:'")"'},M=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},Y=":",U={type:"literal",value:":",description:'":"'},Oe="{",nr={type:"literal",value:"{",description:'"{"'},ar="}",cr={type:"literal",value:"}",description:'"}"'},la=function(r,a,l){return a.type==="cursor"?{...a,nestedPath:a.nestedPath?`${r.value}.${a.nestedPath}`:r.value}:l.type==="cursor"?{...l,suggestionTypes:["conjunction"]}:Z("nested",[r,a])},pa={type:"other",description:"fieldName"},ua=function(r,a,l){if(l.type==="cursor")return{...l,suggestionTypes:["conjunction"]};const u=Uc(a,l);return Z("range",[r,u])},da=function(r,a){return a.type==="cursor"?{...a,fieldName:r.value,suggestionTypes:["value","conjunction"]}:a(r)},ha=function(r){if(r.type==="cursor"){const l=`${r.prefix}${r.suffix}`.trim();return{...r,fieldName:l,suggestionTypes:["field","operator","conjunction"]}}const a=ce(null);return r(a)},fa=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},ga=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("or",[r(u),a(u)])},ba=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("and",[r(u),a(u)])},va=function(r){return r.type==="cursor"?{...list,suggestionTypes:["value"]}:a=>Z("not",[r(a)])},ma={type:"other",description:"value"},ya=function(r){if(r.type==="cursor")return r;const a=ce(!0);return l=>Z("is",[l,r,a])},$a=function(r){if(r.type==="cursor")return r;!Mc&&r.type==="wildcard"&&we.wildcard.hasLeadingWildcard(r)&&H("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const a=ce(!1);return l=>Z("is",[l,r,a])},wa={type:"other",description:"OR"},Si="or",Ai={type:"literal",value:"or",description:'"or"'},_a={type:"other",description:"AND"},xi="and",Ei={type:"literal",value:"and",description:'"and"'},Sa={type:"other",description:"NOT"},Ci="not",ki={type:"literal",value:"not",description:'"not"'},Aa={type:"other",description:"literal"},Ge='"',Je={type:"literal",value:'"',description:'"\\""'},lr=function(r,a,l){const{start:u,end:b}=fc();return{type:"cursor",start:u.offset,end:b.offset-a.length,prefix:r.join(""),suffix:l.join(""),text:hc().replace(a,"")}},xa=function(r){return ce(r.join(""))},et="\\",tt={type:"literal",value:"\\",description:'"\\\\"'},Ea=/^[\\"]/,Ca={type:"class",value:'[\\\\"]',description:'[\\\\"]'},yt=function(r){return r},ka=/^[^"]/,Pa={type:"class",value:'[^"]',description:'[^"]'},Ta=function(r){const a=r.join("").trim();return a==="null"?ce(null):a==="true"?ce(!0):a==="false"?ce(!1):r.includes(Cs)?Ic(a):ce(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(a)?isFinite(a)&&(a>Number.MAX_SAFE_INTEGER||a<Number.MIN_SAFE_INTEGER)?BigInt(a):Number(a):a)},Pi={type:"any",description:"any character"},$t="*",wt={type:"literal",value:"*",description:'"*"'},Oa=function(){return Cs},Ti="\\t",Da={type:"literal",value:"\\t",description:'"\\\\t"'},La=function(){return" "},Oi="\\r",Na={type:"literal",value:"\\r",description:'"\\\\r"'},Ba=function(){return"\r"},Di="\\n",ja={type:"literal",value:"\\n",description:'"\\\\n"'},za=function(){return`
725
- `},Ra=function(r){return r},Ma=/^[\\():<>"*{}]/,Ia={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},Li="<=",Ua={type:"literal",value:"<=",description:'"<="'},Fa=function(){return"lte"},Ni=">=",Ha={type:"literal",value:">=",description:'">="'},Qa=function(){return"gte"},Bi="<",ji={type:"literal",value:"<",description:'"<"'},qa=function(){return"lt"},zi=">",Ri={type:"literal",value:">",description:'">"'},Wa=function(){return"gt"},Va={type:"other",description:"whitespace"},Ya=/^[ \t\r\n]/,Ka={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},Za=function(){return zc},Mi="@kuery-cursor@",Xa={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},Ga=function(){return Rc},Ii="||",Ja={type:"literal",value:"||",description:'"||"'},ec=function(){H("LuceneOr")},Ui="&&",tc={type:"literal",value:"&&",description:'"&&"'},Fi=function(){H("LuceneAnd")},Hi="+",Qi={type:"literal",value:"+",description:'"+"'},qi="-",Wi={type:"literal",value:"-",description:'"-"'},Vi=function(){H("LuceneNot")},Yi="!",Ki={type:"literal",value:"!",description:'"!"'},Zi="_exists_",rc={type:"literal",value:"_exists_",description:'"_exists_"'},ic=function(){H("LuceneExists")},Xi=function(){H("LuceneRange")},Gi="?",Ji={type:"literal",value:"?",description:'"?"'},sc=function(){H("LuceneWildcard")},pr="/",ur={type:"literal",value:"/",description:'"/"'},es=/^[^\/]/,ts={type:"class",value:"[^/]",description:"[^/]"},oc=function(){H("LuceneRegex")},dr="~",hr={type:"literal",value:"~",description:'"~"'},De=/^[0-9]/,Le={type:"class",value:"[0-9]",description:"[0-9]"},nc=function(){H("LuceneFuzzy")},ac=function(){H("LuceneProximity")},rs="^",is={type:"literal",value:"^",description:'"^"'},cc=function(){H("LuceneBoost")},lc=function(){return char},pc="=",uc={type:"literal",value:"=",description:'"="'},ss="[",os={type:"literal",value:"[",description:'"["'},ns="]",as={type:"literal",value:"]",description:'"]"'},cs="TO",dc={type:"literal",value:"TO",description:'"TO"'},c=0,S=0,_t=[{line:1,column:1,seenCR:!1}],K=0,fr=[],f=0,St;if("startRule"in n){if(!(n.startRule in p))throw new Error(`Can't start parsing from rule "`+n.startRule+'".');h=p[n.startRule]}function hc(){return i.substring(S,c)}function fc(){return At(S,c)}function H(r){throw ps(r,null,i.substring(S,c),At(S,c))}function ls(r){var a=_t[r],l,u;if(a)return a;for(l=r-1;!_t[l];)l--;for(a=_t[l],a={line:a.line,column:a.column,seenCR:a.seenCR};l<r;)u=i.charAt(l),u===`
726
- `?(a.seenCR||a.line++,a.column=1,a.seenCR=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(a.line++,a.column=1,a.seenCR=!0):(a.column++,a.seenCR=!1),l++;return _t[r]=a,a}function At(r,a){var l=ls(r),u=ls(a);return{start:{offset:r,line:l.line,column:l.column},end:{offset:a,line:u.line,column:u.column}}}function m(r){c<K||(c>K&&(K=c,fr=[]),fr.push(r))}function ps(r,a,l,u){function b(L){var B=1;for(L.sort(function(le,Q){return le.description<Q.description?-1:le.description>Q.description?1:0});B<L.length;)L[B-1]===L[B]?L.splice(B,1):B++}function _(L,B){function le(Fc){function Ot(ee){return ee.charCodeAt(0).toString(16).toUpperCase()}return Fc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(ee){return"\\x0"+Ot(ee)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(ee){return"\\x"+Ot(ee)}).replace(/[\u0100-\u0FFF]/g,function(ee){return"\\u0"+Ot(ee)}).replace(/[\u1000-\uFFFF]/g,function(ee){return"\\u"+Ot(ee)})}var Q=new Array(L.length),ks,Ps,it;for(it=0;it<L.length;it++)Q[it]=L[it].description;return ks=L.length>1?Q.slice(0,-1).join(", ")+" or "+Q[L.length-1]:Q[0],Ps=B?'"'+le(B)+'"':"end of input","Expected "+ks+" but "+Ps+" found."}return a!==null&&b(a),new t(r!==null?r:_(a,l),a,l,u)}function us(){var r,a,l,u;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();return a!==e?(l=xt(),l===e&&(l=null),l!==e?(u=Pt(),u!==e?(S=r,a=g(l,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r}function xt(){var r,a,l,u;return r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=Ac(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=gr(),a!==e?(l=Et(),l!==e?(u=xt(),u!==e?(S=r,a=C(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gr())),r}function gr(){var r,a,l,u;return r=c,a=ds(),a!==e?(l=Ct(),l!==e?(u=gr(),u!==e?(S=r,a=y(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=ds()),r}function ds(){var r,a,l;return r=c,a=yr(),a!==e?(l=hs(),l!==e?(S=r,a=E(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=hs()),r}function hs(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=xt(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=M(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=gc()),r}function gc(){var r,a,l,u,b,_,L,B,le,Q;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();if(b!==e)if(i.charCodeAt(c)===123?(_=Oe,c++):(_=e,f===0&&m(nr)),_!==e){for(L=[],B=w();B!==e;)L.push(B),B=w();L!==e?(B=xt(),B!==e?(le=Pt(),le!==e?(i.charCodeAt(c)===125?(Q=ar,c++):(Q=e,f===0&&m(cr)),Q!==e?(S=r,a=la(a,B,le),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r===e&&(r=bc()),r}function bc(){var r;return r=vc(),r===e&&(r=mc(),r===e&&(r=yc())),r}function br(){var r;return f++,r=$r(),f--,r===e&&f===0&&m(pa),r}function vc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(u=ys(),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=$r(),_!==e?(S=r,a=ua(a,u,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function mc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=vr(),_!==e?(S=r,a=da(a,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function yc(){var r,a;return r=c,a=bs(),a!==e&&(S=r,a=ha(a)),r=a,r}function vr(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=fs(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=fa(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=bs()),r}function fs(){var r,a,l,u;return r=c,a=mr(),a!==e?(l=Et(),l!==e?(u=fs(),u!==e?(S=r,a=ga(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=mr()),r}function mr(){var r,a,l,u;return r=c,a=gs(),a!==e?(l=Ct(),l!==e?(u=mr(),u!==e?(S=r,a=ba(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gs()),r}function gs(){var r,a,l;return r=c,a=yr(),a!==e?(l=vr(),l!==e?(S=r,a=va(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=vr()),r}function bs(){var r,a;return f++,r=c,a=kt(),a!==e&&(S=r,a=ya(a)),r=a,r===e&&(r=c,a=vs(),a!==e&&(S=r,a=$a(a)),r=a),f--,r===e&&(a=e,f===0&&m(ma)),r}function Et(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=$s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(wa)),r}function Ct(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=ws(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(_a)),r}function yr(){var r,a,l,u;if(f++,r=c,i.substr(c,3).toLowerCase()===Ci?(a=i.substr(c,3),c+=3):(a=e,f===0&&m(ki)),a!==e){if(l=[],u=w(),u!==e)for(;u!==e;)l.push(u),u=w();else l=e;l!==e?(a=[a,l],r=a):(c=r,r=e)}else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=_s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(Sa)),r}function $r(){var r;return f++,r=kt(),r===e&&(r=vs()),f--,r===e&&f===0&&m(Aa),r}function kt(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=Ne();u!==e;)l.push(u),u=Ne();if(l!==e)if(u=rt(),u!==e){for(b=[],_=Ne();_!==e;)b.push(_),_=Ne();b!==e?(i.charCodeAt(c)===34?(_=Ge,c++):(_=e,f===0&&m(Je)),_!==e?(S=r,a=lr(l,u,b),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;if(r===e)if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=Ne();u!==e;)l.push(u),u=Ne();l!==e?(i.charCodeAt(c)===34?(u=Ge,c++):(u=e,f===0&&m(Je)),u!==e?(S=r,a=xa(l),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Ne(){var r,a,l;return r=wr(),r===e&&(r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(Ea.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Ca)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=c,f++,l=rt(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(ka.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Pa)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e))),r}function vs(){var r,a,l,u,b;for(r=c,a=[],l=Be();l!==e;)a.push(l),l=Be();if(a!==e)if(l=rt(),l!==e){for(u=[],b=Be();b!==e;)u.push(b),b=Be();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e){if(r=c,a=[],l=Be(),l!==e)for(;l!==e;)a.push(l),l=Be();else a=e;a!==e&&(S=r,a=Ta(a)),r=a}return r}function Be(){var r,a,l,u,b;return r=wr(),r===e&&(r=wc(),r===e&&(r=_c(),r===e&&(r=$c(),r===e&&(r=c,a=c,f++,l=ms(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Sc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(u=c,f++,b=rt(),f--,b===e?u=void 0:(c=u,u=e),u!==e?(i.length>c?(b=i.charAt(c),c++):(b=e,f===0&&m(Pi)),b!==e?(S=r,a=yt(b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))))),r}function $c(){var r,a;return r=c,i.charCodeAt(c)===42?(a=$t,c++):(a=e,f===0&&m(wt)),a!==e&&(S=r,a=Oa()),r=a,r}function Pt(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(l=rt(),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e)for(r=[],a=w();a!==e;)r.push(a),a=w();return r}function wr(){var r,a;return r=c,i.substr(c,2)===Ti?(a=Ti,c+=2):(a=e,f===0&&m(Da)),a!==e&&(S=r,a=La()),r=a,r===e&&(r=c,i.substr(c,2)===Oi?(a=Oi,c+=2):(a=e,f===0&&m(Na)),a!==e&&(S=r,a=Ba()),r=a,r===e&&(r=c,i.substr(c,2)===Di?(a=Di,c+=2):(a=e,f===0&&m(ja)),a!==e&&(S=r,a=za()),r=a)),r}function wc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=ms(),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r}function _c(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l===e&&(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l===e&&(i.substr(c,3).toLowerCase()===Ci?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(ki)))),l!==e?(S=r,a=Ra(l),r=a):(c=r,r=e)):(c=r,r=e),r}function Sc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=yr())),r}function ms(){var r;return Ma.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ia)),r}function ys(){var r,a;return r=c,i.substr(c,2)===Li?(a=Li,c+=2):(a=e,f===0&&m(Ua)),a!==e&&(S=r,a=Fa()),r=a,r===e&&(r=c,i.substr(c,2)===Ni?(a=Ni,c+=2):(a=e,f===0&&m(Ha)),a!==e&&(S=r,a=Qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===60?(a=Bi,c++):(a=e,f===0&&m(ji)),a!==e&&(S=r,a=qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===62?(a=zi,c++):(a=e,f===0&&m(Ri)),a!==e&&(S=r,a=Wa()),r=a))),r}function w(){var r;return f++,Ya.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ka)),f--,r===e&&f===0&&m(Va),r}function rt(){var r,a,l;return r=c,S=c,a=Za(),a?a=void 0:a=e,a!==e?(i.substr(c,14)===Mi?(l=Mi,c+=14):(l=e,f===0&&m(Xa)),l!==e?(S=r,a=Ga(),r=a):(c=r,r=e)):(c=r,r=e),r}function $s(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ii?(l=Ii,c+=2):(l=e,f===0&&m(Ja)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=ec(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function ws(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ui?(l=Ui,c+=2):(l=e,f===0&&m(tc)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=Fi(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,i.charCodeAt(c)===43?(a=Hi,c++):(a=e,f===0&&m(Qi)),a!==e&&(S=r,a=Fi()),r=a),r}function _s(){var r,a;return r=c,i.charCodeAt(c)===45?(a=qi,c++):(a=e,f===0&&m(Wi)),a!==e&&(S=r,a=Vi()),r=a,r===e&&(r=c,i.charCodeAt(c)===33?(a=Yi,c++):(a=e,f===0&&m(Ki)),a!==e&&(S=r,a=Vi()),r=a),r}function Ac(){var r;return r=xc(),r===e&&(r=Ss(),r===e&&(r=Ec())),r}function xc(){var r,a,l,u,b,_;if(r=c,a=je(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=Ss(),_!==e?(a=[a,l,u,b,_],r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Ss(){var r;return r=Cc(),r===e&&(r=_r(),r===e&&(r=kc(),r===e&&(r=Pc(),r===e&&(r=Tc(),r===e&&(r=Oc()))))),r}function Ec(){var r,a,l,u,b,_;if(r=c,i.substr(c,8)===Zi?(a=Zi,c+=8):(a=e,f===0&&m(rc)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=je(),_!==e?(S=r,a=ic(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Cc(){var r,a,l,u,b,_,L;if(r=c,a=ys(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=je(),u!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;if(r===e)if(r=c,a=Nc(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=je(),u!==e?(b=Es(),b!==e?(_=je(),_!==e?(L=Bc(),L!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function _r(){var r,a,l,u,b;for(r=c,a=[],l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));l!==e;)a.push(l),l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));if(a!==e)if(i.charCodeAt(c)===63?(l=Gi,c++):(l=e,f===0&&m(Ji)),l!==e){for(u=[],b=_r();b!==e;)u.push(b),b=_r();u!==e?(S=r,a=sc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function kc(){var r,a,l,u;if(r=c,i.charCodeAt(c)===47?(a=pr,c++):(a=e,f===0&&m(ur)),a!==e){for(l=[],es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));u!==e;)l.push(u),es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));l!==e?(i.charCodeAt(c)===47?(u=pr,c++):(u=e,f===0&&m(ur)),u!==e?(S=r,a=oc(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Pc(){var r,a,l,u,b;if(r=c,a=As(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));b!==e;)u.push(b),De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));u!==e?(S=r,a=nc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Tc(){var r,a,l,u,b;if(r=c,a=kt(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));b!==e;)u.push(b),De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));u!==e?(S=r,a=ac(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Oc(){var r,a,l,u,b;if(r=c,a=je(),a!==e)if(i.charCodeAt(c)===94?(l=rs,c++):(l=e,f===0&&m(is)),l!==e){for(u=[],De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));b!==e;)u.push(b),De.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Le));u!==e?(S=r,a=cc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function je(){var r;return r=kt(),r===e&&(r=As()),r}function As(){var r,a;if(r=[],a=Tt(),a!==e)for(;a!==e;)r.push(a),a=Tt();else r=e;return r}function Tt(){var r,a,l,u;return r=wr(),r===e&&(r=Lc(),r===e&&(r=c,a=c,f++,l=xs(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Dc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(i.length>c?(u=i.charAt(c),c++):(u=e,f===0&&m(Pi)),u!==e?(a=[a,l,u],r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))),r}function Dc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=$s(),r===e&&(r=ws(),r===e&&(r=_s(),r===e&&(r=Es()))))),r}function Lc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=xs(),l!==e?(S=r,a=lc(),r=a):(c=r,r=e)):(c=r,r=e),r}function xs(){var r;return i.charCodeAt(c)===43?(r=Hi,c++):(r=e,f===0&&m(Qi)),r===e&&(i.charCodeAt(c)===45?(r=qi,c++):(r=e,f===0&&m(Wi)),r===e&&(i.charCodeAt(c)===61?(r=pc,c++):(r=e,f===0&&m(uc)),r===e&&(i.charCodeAt(c)===62?(r=zi,c++):(r=e,f===0&&m(Ri)),r===e&&(i.charCodeAt(c)===60?(r=Bi,c++):(r=e,f===0&&m(ji)),r===e&&(i.charCodeAt(c)===33?(r=Yi,c++):(r=e,f===0&&m(Ki)),r===e&&(i.charCodeAt(c)===40?(r=x,c++):(r=e,f===0&&m(k)),r===e&&(i.charCodeAt(c)===41?(r=N,c++):(r=e,f===0&&m(z)),r===e&&(i.charCodeAt(c)===123?(r=Oe,c++):(r=e,f===0&&m(nr)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr)),r===e&&(i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===94?(r=rs,c++):(r=e,f===0&&m(is)),r===e&&(i.charCodeAt(c)===34?(r=Ge,c++):(r=e,f===0&&m(Je)),r===e&&(i.charCodeAt(c)===126?(r=dr,c++):(r=e,f===0&&m(hr)),r===e&&(i.charCodeAt(c)===42?(r=$t,c++):(r=e,f===0&&m(wt)),r===e&&(i.charCodeAt(c)===63?(r=Gi,c++):(r=e,f===0&&m(Ji)),r===e&&(i.charCodeAt(c)===58?(r=Y,c++):(r=e,f===0&&m(U)),r===e&&(i.charCodeAt(c)===92?(r=et,c++):(r=e,f===0&&m(tt)),r===e&&(i.charCodeAt(c)===47?(r=pr,c++):(r=e,f===0&&m(ur))))))))))))))))))))),r}function Es(){var r,a,l,u,b;if(r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2)===cs?(l=cs,c+=2):(l=e,f===0&&m(dc)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Nc(){var r;return i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===123?(r=Oe,c++):(r=e,f===0&&m(nr))),r}function Bc(){var r;return i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr))),r}const{errorOnLuceneSyntax:jc,parseCursor:zc,cursorSymbol:Rc,allowLeadingWildcards:Mc=!0,helpers:{nodeTypes:we}}=n,Z=we.function.buildNodeWithArgumentNodes,ce=we.literal.buildNode,Ic=we.wildcard.buildNode,Uc=we.namedArg.buildNode,{wildcardSymbol:Cs}=we.wildcard;if(St=h(),St!==e&&c===i.length)return St;throw St!==e&&c<i.length&&m({type:"end",description:"end of input"}),ps(null,fr,K<i.length?i.charAt(K):null,K<i.length?At(K,K+1):At(K,K))}return{SyntaxError:t,parse:s}}(),Xt=(o,t={},s=gt)=>{if(typeof o>"u")throw new Error("expression must be a string, got undefined instead");return s(o,{...t,helpers:{nodeTypes:J}})},Ce=(o,t={})=>Xt(o,{...t,startRule:"Literal"},gt),bt=(o,t={})=>{try{return Xt(o,t,gt)}catch(s){throw s.name==="SyntaxError"?new ei(s,o):s}},Ao=o=>{try{return Xt(o,{errorOnLuceneSyntax:!0},gt),!1}catch(t){return t.message.startsWith("Lucene")}},j=(o,t,s,i)=>(t=void 0,!o||!o.type||!J[o.type]?j(J.function.buildNode("and",[]),t):J[o.type].toOpenSearchQuery(o,t,s,i)),G="@kuery-wildcard@";function xo(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Eo(o){return o.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function Co(o){return o.includes(G)?{type:"wildcard",value:o}:Ce(o)}function ti(o,t){const{value:s}=o,i=s.split(G).map(xo).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(t)}function ko(o){const{value:t}=o;return t.split(G).join("*")}function Gt(o){const{value:t}=o;return t.split(G).map(Eo).join("*")}function Po(o){const{value:t}=o;return t.startsWith(G)&&t.replace(G,"").length>0}const To=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Co,hasLeadingWildcard:Po,test:ti,toOpenSearchQuery:ko,toQueryStringQuery:Gt,wildcardSymbol:G},Symbol.toStringTag,{value:"Module"}));function Jt(o,t){if(!t)return[];if(o.type==="literal"){const s=Zt(o),i=t.fields.find(n=>n.name===s);return i?[i]:[]}else if(o.type==="wildcard")return t.fields.filter(i=>ti(o,i.name))}function Qc(o){return o}function ri(o,t,s){const i={...o,value:s?`${s}.${o.value}`:o.value};if(!t||i.type==="wildcard"&&!s)return i;const e=Jt(i,t).reduce((p,h)=>{const g=h.subType&&h.subType.nested?h.subType.nested.path:void 0;return s&&!g?[...p,`${h.name} is not a nested field but is in nested group "${s}" in the DQL expression.`]:g&&!s?[...p,`${h.name} is a nested field, but is not in a nested group in the DQL expression.`]:g!==s?[...p,`Nested field ${h.name} is being queried with the incorrect nested path. The correct path is ${h.subType.nested.path}.`]:p},[]);if(e.length>0)throw new Error(e.join(`
727
- `));return i}function Oo(o,t,s=!1){if(o===void 0)throw new Error("fieldName is a required argument");if(t===void 0)throw new Error("value is a required argument");const i=typeof o=="string"?Ce(o):Ee(o),n=typeof t=="string"?Ce(t):Ee(t),e=Ee(s);return{arguments:[i,n,e]}}function Do(o,t,s={},i={}){const{arguments:[n,e,p]}=o,h=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),g=j(h),$=e!==void 0?j(e):e,C=p.value?"phrase":"best_fields";if(h.value===null)return e.type==="wildcard"?{query_string:{query:Gt(e)}}:{multi_match:{type:C,query:$,lenient:!0}};const y=t?Jt(h,t):[];y&&y.length===0&&y.push({name:j(h),scripted:!1,type:""});const E=e.type==="wildcard"&&$==="*",x=h.type==="wildcard"&&g==="*"||y&&t&&y.length===t.fields.length;return E&&x?{match_all:{}}:{bool:{should:y.reduce((z,M)=>{const Y=U=>{var Oe;return h.type!=="wildcard"||!((Oe=M.subType)!=null&&Oe.nested)||i!=null&&i.nested?U:{nested:{path:M.subType.nested.path,query:U,score_mode:"none"}}};if(M.scripted)return[];if(E)return[...z,Y({exists:{field:M.name}})];if(e.type==="wildcard")return[...z,Y({query_string:{fields:[M.name],query:Gt(e)}})];if(M.type==="date"){const U=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return[...z,Y({range:{[M.name]:{gte:$,lte:$,...U}}})]}else{const U=C==="phrase"?"match_phrase":"match";return[...z,Y({[U]:{[M.name]:$}})]}},[])||[],minimum_should_match:1}}}const Lo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Oo,toOpenSearchQuery:Do},Symbol.toStringTag,{value:"Module"}));function No(o){return{arguments:o}}function Bo(o,t,s={},i={}){return{bool:{filter:(o.arguments||[]).map(e=>j(e,t,s,i))}}}const jo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:No,toOpenSearchQuery:Bo},Symbol.toStringTag,{value:"Module"}));function zo(o){return{arguments:o}}function Ro(o,t,s={},i={}){return{bool:{should:(o.arguments||[]).map(e=>j(e,t,s,i)),minimum_should_match:1}}}const Mo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:zo,toOpenSearchQuery:Ro},Symbol.toStringTag,{value:"Module"}));function Io(o){return{arguments:[o]}}function Uo(o,t,s={},i={}){const[n]=o.arguments;return{bool:{must_not:j(n,t,s,i)}}}const Fo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Io,toOpenSearchQuery:Uo},Symbol.toStringTag,{value:"Module"}));function Ho(o,...t){let s={};for(let i of t)s[i]=o[i];return s}function Qo(o,t){const s=Ho(t,"gt","lt","gte","lte","format"),i=typeof o=="string"?Ce(o):J.literal.buildNode(o),n=Object.entries(s).map(e=>{let[p,h]=e;return J.namedArg.buildNode(p,h)});return{arguments:[i,...n]}}function qo(o,t,s={},i={}){const[n,...e]=o.arguments,p=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),h=t?Jt(p,t):[],g=Wo(e),$=Object.fromEntries(Object.entries(g).map(([y,E])=>[y,j(E)]));return h&&h.length===0&&h.push({name:j(p),scripted:!1,type:""}),{bool:{should:h.map(y=>{const E=x=>{var k;return p.type!=="wildcard"||!((k=y.subType)!=null&&k.nested)||i.nested?x:{nested:{path:y.subType.nested.path,query:x,score_mode:"none"}}};if(y.scripted)return{};if(y.type==="date"){const x=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return E({range:{[y.name]:{...$,...x}}})}return E({range:{[y.name]:$}})}),minimum_should_match:1}}}function Wo(o){if(o.gt&&o.gte||o.lt&&o.lte)throw new Error("range ends cannot be both inclusive and exclusive");const t=["gte","lte","format"];return o.reduce((s,i,n)=>(i.type==="namedArg"?s[i.name]=i.value:s[t[n]]=i,s),{})}const Vo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Qo,toOpenSearchQuery:qo},Symbol.toStringTag,{value:"Module"}));function Yo(o){return{arguments:[Ee(o)]}}function Ko(o,t,s={},i={}){const{arguments:[n]}=o,e={...n,value:i!=null&&i.nested?`${i.nested.path}.${n.value}`:n.value},p=Zt(e),h=((t==null?void 0:t.fields)||[]).find(g=>g.name===p);if(h&&h.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:p}}}const Zo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Yo,toOpenSearchQuery:Ko},Symbol.toStringTag,{value:"Module"}));function Xo(o,t){return{arguments:[typeof o=="string"?Ce(o):Ee(o),t]}}function Go(o,t,s={},i={}){var g;const[n,e]=o.arguments,p=j(n),h=(g=i==null?void 0:i.nested)!=null&&g.path?`${i.nested.path}.${p}`:p;return{nested:{path:h,query:j(e,t,s,{...i,nested:{path:h}}),score_mode:"none"}}}const er={is:Lo,and:jo,or:Mo,not:Fo,range:Vo,exists:Zo,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Xo,toOpenSearchQuery:Go},Symbol.toStringTag,{value:"Module"}))};function Jo(o,...t){const s=er[o];if(s===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,...s.buildNodeParams(...t)}}function en(o,t){if(er[o]===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,arguments:t}}function tn(o,t,s,i){return er[o.function].toOpenSearchQuery(o,t,s,i)}const rn=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Jo,buildNodeWithArgumentNodes:en,toOpenSearchQuery:tn},Symbol.toStringTag,{value:"Module"}));function sn(o,t){const s=t.type==="literal"?t:J.literal.buildNode(t);return{type:"namedArg",name:o,value:s}}function on(o){return j(o.value)}const J={function:rn,literal:So,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:sn,toOpenSearchQuery:on},Symbol.toStringTag,{value:"Module"})),wildcard:To},nn=G,an=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" AND ")+")",cn=(o,t)=>{var{arguments:[s,i,n]}=o;let e="=";i.type==="wildcard"&&(e="");let p=ye(i);n=n.value||typeof p=="string",i.type==="literal"&&n&&(p=`'${p}'`),i.type==="literal"&&!n&&(p=`${p}`);let h=ye(s);return h==null?t&&n?`(${t.filter(g=>g.type==="string").map(g=>`${g.name} ILIKE '%${i.value}%'`).join(" OR ")})`:t&&!n&&(i.value===!0||i.value===!1)?`(${t.filter(g=>g.type==="boolean").map(g=>`${g.name}=${i.value}`).join(" OR ")})`:"":h+e+p},ln=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" OR ")+")",pn=(o,t)=>{const[s]=o.arguments;return"NOT ("+ye(s,t)+")"},un={gt:">",lt:"<",gte:">=",lte:"<="},dn={is:cn,and:an,or:ln,not:pn,range:o=>{const[t,s]=o.arguments;let i=s.value;const n=un[s.name];let e=ye(i);return i.type==="literal"&&(e=`${e}`),`${t.value} ${n} ${e}`},exists:o=>{const[t]=o.arguments;return`${t.value} IS NOT NULL`},nested:o=>(console.warn("Nested types dont exist in CQL",o),"")},hn={function:(o,t)=>dn[o.function](o,t),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return` LIKE '${t.split(nn).join("%")}'`}},ye=(o,t)=>{const s=hn[o.type];return s(o,t)},fn=G,gn=o=>({$and:(o.arguments||[]).map(i=>se(i))}),bn=o=>{const{arguments:[t,s]}=o;let i=se(s);if(s.type==="wildcard"&&s.value==="@kuery-wildcard@")return ii(o);let e={};return e[se(t)]={$eq:i},e},vn=o=>({$or:(o.arguments||[]).map(s=>se(s))}),mn=o=>{const[t]=o.arguments;let s={};return s={$ne:se(t)},s},yn={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},$n=o=>{const[t,s]=o.arguments;let i=s.value;const n=yn[s.name];let e=se(i),p={};return p[t.value]={},p[t.value][n]=e,p},ii=o=>{const[t]=o.arguments;return{[se(t)]:{$ne:null}}},wn={is:bn,and:gn,or:vn,not:mn,range:$n,exists:ii,nested:o=>(console.warn("TODO Implement nested search",o),"")},_n={function:o=>wn[o.function](o),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return`/${t.split(fn).join(".*")}/`}},se=(o,t)=>{const s=_n[o.type];return s(o,t)},Sn=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:ei,doesKueryExpressionHaveLuceneSyntaxError:Ao,fromKueryExpression:bt,fromLiteralExpression:Ce,nodeTypes:J,parse:bt,toCql:ye,toDSL:j,toMongo:se,toOpenSearchQuery:j},Symbol.toStringTag,{value:"Module"})),An=F`
723
+ `}return`Not yet implemented ${this.variant}`}},T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"checked",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"placeholder",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"readonly",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"variant",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"disabled",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"label",2),T([v()],d.SpectricInput.prototype,"hidePasswordLabel",2),T([v()],d.SpectricInput.prototype,"showPasswordLabel",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"showPasswordVisibilityToggle",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"helperText",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"invalid",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"required",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"invalidText",2),T([v()],d.SpectricInput.prototype,"name",2),T([v()],d.SpectricInput.prototype,"pattern",2),T([v({type:Number,reflect:!0})],d.SpectricInput.prototype,"maxCount",2),T([v({reflect:!0})],d.SpectricInput.prototype,"autocomplete",2),T([v({reflect:!0})],d.SpectricInput.prototype,"value",1),T([fe("input")],d.SpectricInput.prototype,"_input",2),d.SpectricInput=T([D("spectric-input")],d.SpectricInput);const Ce=o=>Yt(o===""?void 0:o??void 0),wo="end of input",_o={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class ei extends Error{constructor(t,s){let i=t.message;if(t.expected){const p=t.expected.map(g=>_o[g.description]||g.description).join(", ");let h=t.found?`"${t.found}"`:wo;i=`Expected ${p} but ${h} found.`}const n=[i,s,"-".repeat(t.location.start.offset)+"^"].join(`
724
+ `);super(n),this.name="DQLSyntaxError",this.shortMessage=i}}function ke(o){return{type:"literal",value:o}}function Zt(o){return o.value}const So=Object.freeze(Object.defineProperty({__proto__:null,buildNode:ke,toOpenSearchQuery:Zt},Symbol.toStringTag,{value:"Module"})),{SyntaxError:Hc,parse:gt}=function(){function o(i,n){function e(){this.constructor=i}e.prototype=n.prototype,i.prototype=new e}function t(i,n,e,p){this.message=i,this.expected=n,this.found=e,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,Error);function s(i){var n=arguments.length>1?arguments[1]:{},e={},p={start:us,Literal:$r},h=us,g=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r!==null?r:_e.function.buildNode("is","*","*")},$=function(){return jc},C=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("or",[r,a])},y=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("and",[r,a])},E=function(r){return r.type==="cursor"?r:Z("not",[r])},x="(",k={type:"literal",value:"(",description:'"("'},N=")",z={type:"literal",value:")",description:'")"'},M=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},Y=":",U={type:"literal",value:":",description:'":"'},Le="{",nr={type:"literal",value:"{",description:'"{"'},ar="}",cr={type:"literal",value:"}",description:'"}"'},la=function(r,a,l){return a.type==="cursor"?{...a,nestedPath:a.nestedPath?`${r.value}.${a.nestedPath}`:r.value}:l.type==="cursor"?{...l,suggestionTypes:["conjunction"]}:Z("nested",[r,a])},pa={type:"other",description:"fieldName"},ua=function(r,a,l){if(l.type==="cursor")return{...l,suggestionTypes:["conjunction"]};const u=Uc(a,l);return Z("range",[r,u])},da=function(r,a){return a.type==="cursor"?{...a,fieldName:r.value,suggestionTypes:["value","conjunction"]}:a(r)},ha=function(r){if(r.type==="cursor"){const l=`${r.prefix}${r.suffix}`.trim();return{...r,fieldName:l,suggestionTypes:["field","operator","conjunction"]}}const a=ce(null);return r(a)},fa=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},ga=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("or",[r(u),a(u)])},ba=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("and",[r(u),a(u)])},va=function(r){return r.type==="cursor"?{...list,suggestionTypes:["value"]}:a=>Z("not",[r(a)])},ma={type:"other",description:"value"},ya=function(r){if(r.type==="cursor")return r;const a=ce(!0);return l=>Z("is",[l,r,a])},$a=function(r){if(r.type==="cursor")return r;!Mc&&r.type==="wildcard"&&_e.wildcard.hasLeadingWildcard(r)&&H("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const a=ce(!1);return l=>Z("is",[l,r,a])},wa={type:"other",description:"OR"},Si="or",Ai={type:"literal",value:"or",description:'"or"'},_a={type:"other",description:"AND"},xi="and",Ei={type:"literal",value:"and",description:'"and"'},Sa={type:"other",description:"NOT"},Ci="not",ki={type:"literal",value:"not",description:'"not"'},Aa={type:"other",description:"literal"},Ge='"',Je={type:"literal",value:'"',description:'"\\""'},lr=function(r,a,l){const{start:u,end:b}=fc();return{type:"cursor",start:u.offset,end:b.offset-a.length,prefix:r.join(""),suffix:l.join(""),text:hc().replace(a,"")}},xa=function(r){return ce(r.join(""))},et="\\",tt={type:"literal",value:"\\",description:'"\\\\"'},Ea=/^[\\"]/,Ca={type:"class",value:'[\\\\"]',description:'[\\\\"]'},yt=function(r){return r},ka=/^[^"]/,Pa={type:"class",value:'[^"]',description:'[^"]'},Ta=function(r){const a=r.join("").trim();return a==="null"?ce(null):a==="true"?ce(!0):a==="false"?ce(!1):r.includes(Cs)?Ic(a):ce(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(a)?isFinite(a)&&(a>Number.MAX_SAFE_INTEGER||a<Number.MIN_SAFE_INTEGER)?BigInt(a):Number(a):a)},Pi={type:"any",description:"any character"},$t="*",wt={type:"literal",value:"*",description:'"*"'},Oa=function(){return Cs},Ti="\\t",Da={type:"literal",value:"\\t",description:'"\\\\t"'},La=function(){return" "},Oi="\\r",Na={type:"literal",value:"\\r",description:'"\\\\r"'},Ba=function(){return"\r"},Di="\\n",ja={type:"literal",value:"\\n",description:'"\\\\n"'},za=function(){return`
725
+ `},Ra=function(r){return r},Ma=/^[\\():<>"*{}]/,Ia={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},Li="<=",Ua={type:"literal",value:"<=",description:'"<="'},Fa=function(){return"lte"},Ni=">=",Ha={type:"literal",value:">=",description:'">="'},Qa=function(){return"gte"},Bi="<",ji={type:"literal",value:"<",description:'"<"'},qa=function(){return"lt"},zi=">",Ri={type:"literal",value:">",description:'">"'},Wa=function(){return"gt"},Va={type:"other",description:"whitespace"},Ya=/^[ \t\r\n]/,Ka={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},Za=function(){return zc},Mi="@kuery-cursor@",Xa={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},Ga=function(){return Rc},Ii="||",Ja={type:"literal",value:"||",description:'"||"'},ec=function(){H("LuceneOr")},Ui="&&",tc={type:"literal",value:"&&",description:'"&&"'},Fi=function(){H("LuceneAnd")},Hi="+",Qi={type:"literal",value:"+",description:'"+"'},qi="-",Wi={type:"literal",value:"-",description:'"-"'},Vi=function(){H("LuceneNot")},Yi="!",Ki={type:"literal",value:"!",description:'"!"'},Zi="_exists_",rc={type:"literal",value:"_exists_",description:'"_exists_"'},ic=function(){H("LuceneExists")},Xi=function(){H("LuceneRange")},Gi="?",Ji={type:"literal",value:"?",description:'"?"'},sc=function(){H("LuceneWildcard")},pr="/",ur={type:"literal",value:"/",description:'"/"'},es=/^[^\/]/,ts={type:"class",value:"[^/]",description:"[^/]"},oc=function(){H("LuceneRegex")},dr="~",hr={type:"literal",value:"~",description:'"~"'},Ne=/^[0-9]/,Be={type:"class",value:"[0-9]",description:"[0-9]"},nc=function(){H("LuceneFuzzy")},ac=function(){H("LuceneProximity")},rs="^",is={type:"literal",value:"^",description:'"^"'},cc=function(){H("LuceneBoost")},lc=function(){return char},pc="=",uc={type:"literal",value:"=",description:'"="'},ss="[",os={type:"literal",value:"[",description:'"["'},ns="]",as={type:"literal",value:"]",description:'"]"'},cs="TO",dc={type:"literal",value:"TO",description:'"TO"'},c=0,S=0,_t=[{line:1,column:1,seenCR:!1}],K=0,fr=[],f=0,St;if("startRule"in n){if(!(n.startRule in p))throw new Error(`Can't start parsing from rule "`+n.startRule+'".');h=p[n.startRule]}function hc(){return i.substring(S,c)}function fc(){return At(S,c)}function H(r){throw ps(r,null,i.substring(S,c),At(S,c))}function ls(r){var a=_t[r],l,u;if(a)return a;for(l=r-1;!_t[l];)l--;for(a=_t[l],a={line:a.line,column:a.column,seenCR:a.seenCR};l<r;)u=i.charAt(l),u===`
726
+ `?(a.seenCR||a.line++,a.column=1,a.seenCR=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(a.line++,a.column=1,a.seenCR=!0):(a.column++,a.seenCR=!1),l++;return _t[r]=a,a}function At(r,a){var l=ls(r),u=ls(a);return{start:{offset:r,line:l.line,column:l.column},end:{offset:a,line:u.line,column:u.column}}}function m(r){c<K||(c>K&&(K=c,fr=[]),fr.push(r))}function ps(r,a,l,u){function b(L){var B=1;for(L.sort(function(le,Q){return le.description<Q.description?-1:le.description>Q.description?1:0});B<L.length;)L[B-1]===L[B]?L.splice(B,1):B++}function _(L,B){function le(Fc){function Ot(ee){return ee.charCodeAt(0).toString(16).toUpperCase()}return Fc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(ee){return"\\x0"+Ot(ee)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(ee){return"\\x"+Ot(ee)}).replace(/[\u0100-\u0FFF]/g,function(ee){return"\\u0"+Ot(ee)}).replace(/[\u1000-\uFFFF]/g,function(ee){return"\\u"+Ot(ee)})}var Q=new Array(L.length),ks,Ps,it;for(it=0;it<L.length;it++)Q[it]=L[it].description;return ks=L.length>1?Q.slice(0,-1).join(", ")+" or "+Q[L.length-1]:Q[0],Ps=B?'"'+le(B)+'"':"end of input","Expected "+ks+" but "+Ps+" found."}return a!==null&&b(a),new t(r!==null?r:_(a,l),a,l,u)}function us(){var r,a,l,u;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();return a!==e?(l=xt(),l===e&&(l=null),l!==e?(u=Pt(),u!==e?(S=r,a=g(l,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r}function xt(){var r,a,l,u;return r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=Ac(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=gr(),a!==e?(l=Et(),l!==e?(u=xt(),u!==e?(S=r,a=C(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gr())),r}function gr(){var r,a,l,u;return r=c,a=ds(),a!==e?(l=Ct(),l!==e?(u=gr(),u!==e?(S=r,a=y(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=ds()),r}function ds(){var r,a,l;return r=c,a=yr(),a!==e?(l=hs(),l!==e?(S=r,a=E(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=hs()),r}function hs(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=xt(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=M(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=gc()),r}function gc(){var r,a,l,u,b,_,L,B,le,Q;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();if(b!==e)if(i.charCodeAt(c)===123?(_=Le,c++):(_=e,f===0&&m(nr)),_!==e){for(L=[],B=w();B!==e;)L.push(B),B=w();L!==e?(B=xt(),B!==e?(le=Pt(),le!==e?(i.charCodeAt(c)===125?(Q=ar,c++):(Q=e,f===0&&m(cr)),Q!==e?(S=r,a=la(a,B,le),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r===e&&(r=bc()),r}function bc(){var r;return r=vc(),r===e&&(r=mc(),r===e&&(r=yc())),r}function br(){var r;return f++,r=$r(),f--,r===e&&f===0&&m(pa),r}function vc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(u=ys(),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=$r(),_!==e?(S=r,a=ua(a,u,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function mc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=vr(),_!==e?(S=r,a=da(a,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function yc(){var r,a;return r=c,a=bs(),a!==e&&(S=r,a=ha(a)),r=a,r}function vr(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=fs(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=fa(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=bs()),r}function fs(){var r,a,l,u;return r=c,a=mr(),a!==e?(l=Et(),l!==e?(u=fs(),u!==e?(S=r,a=ga(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=mr()),r}function mr(){var r,a,l,u;return r=c,a=gs(),a!==e?(l=Ct(),l!==e?(u=mr(),u!==e?(S=r,a=ba(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gs()),r}function gs(){var r,a,l;return r=c,a=yr(),a!==e?(l=vr(),l!==e?(S=r,a=va(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=vr()),r}function bs(){var r,a;return f++,r=c,a=kt(),a!==e&&(S=r,a=ya(a)),r=a,r===e&&(r=c,a=vs(),a!==e&&(S=r,a=$a(a)),r=a),f--,r===e&&(a=e,f===0&&m(ma)),r}function Et(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=$s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(wa)),r}function Ct(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=ws(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(_a)),r}function yr(){var r,a,l,u;if(f++,r=c,i.substr(c,3).toLowerCase()===Ci?(a=i.substr(c,3),c+=3):(a=e,f===0&&m(ki)),a!==e){if(l=[],u=w(),u!==e)for(;u!==e;)l.push(u),u=w();else l=e;l!==e?(a=[a,l],r=a):(c=r,r=e)}else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=_s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(Sa)),r}function $r(){var r;return f++,r=kt(),r===e&&(r=vs()),f--,r===e&&f===0&&m(Aa),r}function kt(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=je();u!==e;)l.push(u),u=je();if(l!==e)if(u=rt(),u!==e){for(b=[],_=je();_!==e;)b.push(_),_=je();b!==e?(i.charCodeAt(c)===34?(_=Ge,c++):(_=e,f===0&&m(Je)),_!==e?(S=r,a=lr(l,u,b),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;if(r===e)if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=je();u!==e;)l.push(u),u=je();l!==e?(i.charCodeAt(c)===34?(u=Ge,c++):(u=e,f===0&&m(Je)),u!==e?(S=r,a=xa(l),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function je(){var r,a,l;return r=wr(),r===e&&(r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(Ea.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Ca)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=c,f++,l=rt(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(ka.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Pa)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e))),r}function vs(){var r,a,l,u,b;for(r=c,a=[],l=ze();l!==e;)a.push(l),l=ze();if(a!==e)if(l=rt(),l!==e){for(u=[],b=ze();b!==e;)u.push(b),b=ze();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e){if(r=c,a=[],l=ze(),l!==e)for(;l!==e;)a.push(l),l=ze();else a=e;a!==e&&(S=r,a=Ta(a)),r=a}return r}function ze(){var r,a,l,u,b;return r=wr(),r===e&&(r=wc(),r===e&&(r=_c(),r===e&&(r=$c(),r===e&&(r=c,a=c,f++,l=ms(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Sc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(u=c,f++,b=rt(),f--,b===e?u=void 0:(c=u,u=e),u!==e?(i.length>c?(b=i.charAt(c),c++):(b=e,f===0&&m(Pi)),b!==e?(S=r,a=yt(b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))))),r}function $c(){var r,a;return r=c,i.charCodeAt(c)===42?(a=$t,c++):(a=e,f===0&&m(wt)),a!==e&&(S=r,a=Oa()),r=a,r}function Pt(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(l=rt(),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e)for(r=[],a=w();a!==e;)r.push(a),a=w();return r}function wr(){var r,a;return r=c,i.substr(c,2)===Ti?(a=Ti,c+=2):(a=e,f===0&&m(Da)),a!==e&&(S=r,a=La()),r=a,r===e&&(r=c,i.substr(c,2)===Oi?(a=Oi,c+=2):(a=e,f===0&&m(Na)),a!==e&&(S=r,a=Ba()),r=a,r===e&&(r=c,i.substr(c,2)===Di?(a=Di,c+=2):(a=e,f===0&&m(ja)),a!==e&&(S=r,a=za()),r=a)),r}function wc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=ms(),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r}function _c(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l===e&&(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l===e&&(i.substr(c,3).toLowerCase()===Ci?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(ki)))),l!==e?(S=r,a=Ra(l),r=a):(c=r,r=e)):(c=r,r=e),r}function Sc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=yr())),r}function ms(){var r;return Ma.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ia)),r}function ys(){var r,a;return r=c,i.substr(c,2)===Li?(a=Li,c+=2):(a=e,f===0&&m(Ua)),a!==e&&(S=r,a=Fa()),r=a,r===e&&(r=c,i.substr(c,2)===Ni?(a=Ni,c+=2):(a=e,f===0&&m(Ha)),a!==e&&(S=r,a=Qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===60?(a=Bi,c++):(a=e,f===0&&m(ji)),a!==e&&(S=r,a=qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===62?(a=zi,c++):(a=e,f===0&&m(Ri)),a!==e&&(S=r,a=Wa()),r=a))),r}function w(){var r;return f++,Ya.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ka)),f--,r===e&&f===0&&m(Va),r}function rt(){var r,a,l;return r=c,S=c,a=Za(),a?a=void 0:a=e,a!==e?(i.substr(c,14)===Mi?(l=Mi,c+=14):(l=e,f===0&&m(Xa)),l!==e?(S=r,a=Ga(),r=a):(c=r,r=e)):(c=r,r=e),r}function $s(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ii?(l=Ii,c+=2):(l=e,f===0&&m(Ja)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=ec(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function ws(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ui?(l=Ui,c+=2):(l=e,f===0&&m(tc)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=Fi(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,i.charCodeAt(c)===43?(a=Hi,c++):(a=e,f===0&&m(Qi)),a!==e&&(S=r,a=Fi()),r=a),r}function _s(){var r,a;return r=c,i.charCodeAt(c)===45?(a=qi,c++):(a=e,f===0&&m(Wi)),a!==e&&(S=r,a=Vi()),r=a,r===e&&(r=c,i.charCodeAt(c)===33?(a=Yi,c++):(a=e,f===0&&m(Ki)),a!==e&&(S=r,a=Vi()),r=a),r}function Ac(){var r;return r=xc(),r===e&&(r=Ss(),r===e&&(r=Ec())),r}function xc(){var r,a,l,u,b,_;if(r=c,a=Re(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=Ss(),_!==e?(a=[a,l,u,b,_],r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Ss(){var r;return r=Cc(),r===e&&(r=_r(),r===e&&(r=kc(),r===e&&(r=Pc(),r===e&&(r=Tc(),r===e&&(r=Oc()))))),r}function Ec(){var r,a,l,u,b,_;if(r=c,i.substr(c,8)===Zi?(a=Zi,c+=8):(a=e,f===0&&m(rc)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=Re(),_!==e?(S=r,a=ic(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Cc(){var r,a,l,u,b,_,L;if(r=c,a=ys(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Re(),u!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;if(r===e)if(r=c,a=Nc(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Re(),u!==e?(b=Es(),b!==e?(_=Re(),_!==e?(L=Bc(),L!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function _r(){var r,a,l,u,b;for(r=c,a=[],l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));l!==e;)a.push(l),l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));if(a!==e)if(i.charCodeAt(c)===63?(l=Gi,c++):(l=e,f===0&&m(Ji)),l!==e){for(u=[],b=_r();b!==e;)u.push(b),b=_r();u!==e?(S=r,a=sc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function kc(){var r,a,l,u;if(r=c,i.charCodeAt(c)===47?(a=pr,c++):(a=e,f===0&&m(ur)),a!==e){for(l=[],es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));u!==e;)l.push(u),es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));l!==e?(i.charCodeAt(c)===47?(u=pr,c++):(u=e,f===0&&m(ur)),u!==e?(S=r,a=oc(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Pc(){var r,a,l,u,b;if(r=c,a=As(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=nc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Tc(){var r,a,l,u,b;if(r=c,a=kt(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=ac(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Oc(){var r,a,l,u,b;if(r=c,a=Re(),a!==e)if(i.charCodeAt(c)===94?(l=rs,c++):(l=e,f===0&&m(is)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=cc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Re(){var r;return r=kt(),r===e&&(r=As()),r}function As(){var r,a;if(r=[],a=Tt(),a!==e)for(;a!==e;)r.push(a),a=Tt();else r=e;return r}function Tt(){var r,a,l,u;return r=wr(),r===e&&(r=Lc(),r===e&&(r=c,a=c,f++,l=xs(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Dc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(i.length>c?(u=i.charAt(c),c++):(u=e,f===0&&m(Pi)),u!==e?(a=[a,l,u],r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))),r}function Dc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=$s(),r===e&&(r=ws(),r===e&&(r=_s(),r===e&&(r=Es()))))),r}function Lc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=xs(),l!==e?(S=r,a=lc(),r=a):(c=r,r=e)):(c=r,r=e),r}function xs(){var r;return i.charCodeAt(c)===43?(r=Hi,c++):(r=e,f===0&&m(Qi)),r===e&&(i.charCodeAt(c)===45?(r=qi,c++):(r=e,f===0&&m(Wi)),r===e&&(i.charCodeAt(c)===61?(r=pc,c++):(r=e,f===0&&m(uc)),r===e&&(i.charCodeAt(c)===62?(r=zi,c++):(r=e,f===0&&m(Ri)),r===e&&(i.charCodeAt(c)===60?(r=Bi,c++):(r=e,f===0&&m(ji)),r===e&&(i.charCodeAt(c)===33?(r=Yi,c++):(r=e,f===0&&m(Ki)),r===e&&(i.charCodeAt(c)===40?(r=x,c++):(r=e,f===0&&m(k)),r===e&&(i.charCodeAt(c)===41?(r=N,c++):(r=e,f===0&&m(z)),r===e&&(i.charCodeAt(c)===123?(r=Le,c++):(r=e,f===0&&m(nr)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr)),r===e&&(i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===94?(r=rs,c++):(r=e,f===0&&m(is)),r===e&&(i.charCodeAt(c)===34?(r=Ge,c++):(r=e,f===0&&m(Je)),r===e&&(i.charCodeAt(c)===126?(r=dr,c++):(r=e,f===0&&m(hr)),r===e&&(i.charCodeAt(c)===42?(r=$t,c++):(r=e,f===0&&m(wt)),r===e&&(i.charCodeAt(c)===63?(r=Gi,c++):(r=e,f===0&&m(Ji)),r===e&&(i.charCodeAt(c)===58?(r=Y,c++):(r=e,f===0&&m(U)),r===e&&(i.charCodeAt(c)===92?(r=et,c++):(r=e,f===0&&m(tt)),r===e&&(i.charCodeAt(c)===47?(r=pr,c++):(r=e,f===0&&m(ur))))))))))))))))))))),r}function Es(){var r,a,l,u,b;if(r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2)===cs?(l=cs,c+=2):(l=e,f===0&&m(dc)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Nc(){var r;return i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===123?(r=Le,c++):(r=e,f===0&&m(nr))),r}function Bc(){var r;return i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr))),r}const{errorOnLuceneSyntax:jc,parseCursor:zc,cursorSymbol:Rc,allowLeadingWildcards:Mc=!0,helpers:{nodeTypes:_e}}=n,Z=_e.function.buildNodeWithArgumentNodes,ce=_e.literal.buildNode,Ic=_e.wildcard.buildNode,Uc=_e.namedArg.buildNode,{wildcardSymbol:Cs}=_e.wildcard;if(St=h(),St!==e&&c===i.length)return St;throw St!==e&&c<i.length&&m({type:"end",description:"end of input"}),ps(null,fr,K<i.length?i.charAt(K):null,K<i.length?At(K,K+1):At(K,K))}return{SyntaxError:t,parse:s}}(),Xt=(o,t={},s=gt)=>{if(typeof o>"u")throw new Error("expression must be a string, got undefined instead");return s(o,{...t,helpers:{nodeTypes:J}})},Pe=(o,t={})=>Xt(o,{...t,startRule:"Literal"},gt),bt=(o,t={})=>{try{return Xt(o,t,gt)}catch(s){throw s.name==="SyntaxError"?new ei(s,o):s}},Ao=o=>{try{return Xt(o,{errorOnLuceneSyntax:!0},gt),!1}catch(t){return t.message.startsWith("Lucene")}},j=(o,t,s,i)=>(t=void 0,!o||!o.type||!J[o.type]?j(J.function.buildNode("and",[]),t):J[o.type].toOpenSearchQuery(o,t,s,i)),G="@kuery-wildcard@";function xo(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Eo(o){return o.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function Co(o){return o.includes(G)?{type:"wildcard",value:o}:Pe(o)}function ti(o,t){const{value:s}=o,i=s.split(G).map(xo).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(t)}function ko(o){const{value:t}=o;return t.split(G).join("*")}function Gt(o){const{value:t}=o;return t.split(G).map(Eo).join("*")}function Po(o){const{value:t}=o;return t.startsWith(G)&&t.replace(G,"").length>0}const To=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Co,hasLeadingWildcard:Po,test:ti,toOpenSearchQuery:ko,toQueryStringQuery:Gt,wildcardSymbol:G},Symbol.toStringTag,{value:"Module"}));function Jt(o,t){if(!t)return[];if(o.type==="literal"){const s=Zt(o),i=t.fields.find(n=>n.name===s);return i?[i]:[]}else if(o.type==="wildcard")return t.fields.filter(i=>ti(o,i.name))}function Qc(o){return o}function ri(o,t,s){const i={...o,value:s?`${s}.${o.value}`:o.value};if(!t||i.type==="wildcard"&&!s)return i;const e=Jt(i,t).reduce((p,h)=>{const g=h.subType&&h.subType.nested?h.subType.nested.path:void 0;return s&&!g?[...p,`${h.name} is not a nested field but is in nested group "${s}" in the DQL expression.`]:g&&!s?[...p,`${h.name} is a nested field, but is not in a nested group in the DQL expression.`]:g!==s?[...p,`Nested field ${h.name} is being queried with the incorrect nested path. The correct path is ${h.subType.nested.path}.`]:p},[]);if(e.length>0)throw new Error(e.join(`
727
+ `));return i}function Oo(o,t,s=!1){if(o===void 0)throw new Error("fieldName is a required argument");if(t===void 0)throw new Error("value is a required argument");const i=typeof o=="string"?Pe(o):ke(o),n=typeof t=="string"?Pe(t):ke(t),e=ke(s);return{arguments:[i,n,e]}}function Do(o,t,s={},i={}){const{arguments:[n,e,p]}=o,h=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),g=j(h),$=e!==void 0?j(e):e,C=p.value?"phrase":"best_fields";if(h.value===null)return e.type==="wildcard"?{query_string:{query:Gt(e)}}:{multi_match:{type:C,query:$,lenient:!0}};const y=t?Jt(h,t):[];y&&y.length===0&&y.push({name:j(h),scripted:!1,type:""});const E=e.type==="wildcard"&&$==="*",x=h.type==="wildcard"&&g==="*"||y&&t&&y.length===t.fields.length;return E&&x?{match_all:{}}:{bool:{should:y.reduce((z,M)=>{const Y=U=>{var Le;return h.type!=="wildcard"||!((Le=M.subType)!=null&&Le.nested)||i!=null&&i.nested?U:{nested:{path:M.subType.nested.path,query:U,score_mode:"none"}}};if(M.scripted)return[];if(E)return[...z,Y({exists:{field:M.name}})];if(e.type==="wildcard")return[...z,Y({query_string:{fields:[M.name],query:Gt(e)}})];if(M.type==="date"){const U=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return[...z,Y({range:{[M.name]:{gte:$,lte:$,...U}}})]}else{const U=C==="phrase"?"match_phrase":"match";return[...z,Y({[U]:{[M.name]:$}})]}},[])||[],minimum_should_match:1}}}const Lo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Oo,toOpenSearchQuery:Do},Symbol.toStringTag,{value:"Module"}));function No(o){return{arguments:o}}function Bo(o,t,s={},i={}){return{bool:{filter:(o.arguments||[]).map(e=>j(e,t,s,i))}}}const jo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:No,toOpenSearchQuery:Bo},Symbol.toStringTag,{value:"Module"}));function zo(o){return{arguments:o}}function Ro(o,t,s={},i={}){return{bool:{should:(o.arguments||[]).map(e=>j(e,t,s,i)),minimum_should_match:1}}}const Mo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:zo,toOpenSearchQuery:Ro},Symbol.toStringTag,{value:"Module"}));function Io(o){return{arguments:[o]}}function Uo(o,t,s={},i={}){const[n]=o.arguments;return{bool:{must_not:j(n,t,s,i)}}}const Fo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Io,toOpenSearchQuery:Uo},Symbol.toStringTag,{value:"Module"}));function Ho(o,...t){let s={};for(let i of t)s[i]=o[i];return s}function Qo(o,t){const s=Ho(t,"gt","lt","gte","lte","format"),i=typeof o=="string"?Pe(o):J.literal.buildNode(o),n=Object.entries(s).map(e=>{let[p,h]=e;return J.namedArg.buildNode(p,h)});return{arguments:[i,...n]}}function qo(o,t,s={},i={}){const[n,...e]=o.arguments,p=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),h=t?Jt(p,t):[],g=Wo(e),$=Object.fromEntries(Object.entries(g).map(([y,E])=>[y,j(E)]));return h&&h.length===0&&h.push({name:j(p),scripted:!1,type:""}),{bool:{should:h.map(y=>{const E=x=>{var k;return p.type!=="wildcard"||!((k=y.subType)!=null&&k.nested)||i.nested?x:{nested:{path:y.subType.nested.path,query:x,score_mode:"none"}}};if(y.scripted)return{};if(y.type==="date"){const x=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return E({range:{[y.name]:{...$,...x}}})}return E({range:{[y.name]:$}})}),minimum_should_match:1}}}function Wo(o){if(o.gt&&o.gte||o.lt&&o.lte)throw new Error("range ends cannot be both inclusive and exclusive");const t=["gte","lte","format"];return o.reduce((s,i,n)=>(i.type==="namedArg"?s[i.name]=i.value:s[t[n]]=i,s),{})}const Vo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Qo,toOpenSearchQuery:qo},Symbol.toStringTag,{value:"Module"}));function Yo(o){return{arguments:[ke(o)]}}function Ko(o,t,s={},i={}){const{arguments:[n]}=o,e={...n,value:i!=null&&i.nested?`${i.nested.path}.${n.value}`:n.value},p=Zt(e),h=((t==null?void 0:t.fields)||[]).find(g=>g.name===p);if(h&&h.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:p}}}const Zo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Yo,toOpenSearchQuery:Ko},Symbol.toStringTag,{value:"Module"}));function Xo(o,t){return{arguments:[typeof o=="string"?Pe(o):ke(o),t]}}function Go(o,t,s={},i={}){var g;const[n,e]=o.arguments,p=j(n),h=(g=i==null?void 0:i.nested)!=null&&g.path?`${i.nested.path}.${p}`:p;return{nested:{path:h,query:j(e,t,s,{...i,nested:{path:h}}),score_mode:"none"}}}const er={is:Lo,and:jo,or:Mo,not:Fo,range:Vo,exists:Zo,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Xo,toOpenSearchQuery:Go},Symbol.toStringTag,{value:"Module"}))};function Jo(o,...t){const s=er[o];if(s===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,...s.buildNodeParams(...t)}}function en(o,t){if(er[o]===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,arguments:t}}function tn(o,t,s,i){return er[o.function].toOpenSearchQuery(o,t,s,i)}const rn=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Jo,buildNodeWithArgumentNodes:en,toOpenSearchQuery:tn},Symbol.toStringTag,{value:"Module"}));function sn(o,t){const s=t.type==="literal"?t:J.literal.buildNode(t);return{type:"namedArg",name:o,value:s}}function on(o){return j(o.value)}const J={function:rn,literal:So,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:sn,toOpenSearchQuery:on},Symbol.toStringTag,{value:"Module"})),wildcard:To},nn=G,an=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" AND ")+")",cn=(o,t)=>{var{arguments:[s,i,n]}=o;let e="=";i.type==="wildcard"&&(e="");let p=ye(i);n=n.value||typeof p=="string",i.type==="literal"&&n&&(p=`'${p}'`),i.type==="literal"&&!n&&(p=`${p}`);let h=ye(s);return h==null?t&&n?`(${t.filter(g=>g.type==="string").map(g=>`${g.name} ILIKE '%${i.value}%'`).join(" OR ")})`:t&&!n&&(i.value===!0||i.value===!1)?`(${t.filter(g=>g.type==="boolean").map(g=>`${g.name}=${i.value}`).join(" OR ")})`:"":h+e+p},ln=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" OR ")+")",pn=(o,t)=>{const[s]=o.arguments;return"NOT ("+ye(s,t)+")"},un={gt:">",lt:"<",gte:">=",lte:"<="},dn={is:cn,and:an,or:ln,not:pn,range:o=>{const[t,s]=o.arguments;let i=s.value;const n=un[s.name];let e=ye(i);return i.type==="literal"&&(e=`${e}`),`${t.value} ${n} ${e}`},exists:o=>{const[t]=o.arguments;return`${t.value} IS NOT NULL`},nested:o=>(console.warn("Nested types dont exist in CQL",o),"")},hn={function:(o,t)=>dn[o.function](o,t),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return` LIKE '${t.split(nn).join("%")}'`}},ye=(o,t)=>{const s=hn[o.type];return s(o,t)},fn=G,gn=o=>({$and:(o.arguments||[]).map(i=>se(i))}),bn=o=>{const{arguments:[t,s]}=o;let i=se(s);if(s.type==="wildcard"&&s.value==="@kuery-wildcard@")return ii(o);let e={};return e[se(t)]={$eq:i},e},vn=o=>({$or:(o.arguments||[]).map(s=>se(s))}),mn=o=>{const[t]=o.arguments;let s={};return s={$ne:se(t)},s},yn={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},$n=o=>{const[t,s]=o.arguments;let i=s.value;const n=yn[s.name];let e=se(i),p={};return p[t.value]={},p[t.value][n]=e,p},ii=o=>{const[t]=o.arguments;return{[se(t)]:{$ne:null}}},wn={is:bn,and:gn,or:vn,not:mn,range:$n,exists:ii,nested:o=>(console.warn("TODO Implement nested search",o),"")},_n={function:o=>wn[o.function](o),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return`/${t.split(fn).join(".*")}/`}},se=(o,t)=>{const s=_n[o.type];return s(o,t)},Sn=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:ei,doesKueryExpressionHaveLuceneSyntaxError:Ao,fromKueryExpression:bt,fromLiteralExpression:Pe,nodeTypes:J,parse:bt,toCql:ye,toDSL:j,toMongo:se,toOpenSearchQuery:j},Symbol.toStringTag,{value:"Module"})),An=F`
728
728
  :host {
729
729
  --dialog-padding: var(--spectric-dialog-padding, 5px);
730
730
  --dialog-background:var(--spectric-background,rgb(246, 249, 252));
@@ -771,7 +771,7 @@ spectric-button{
771
771
  right: 0;
772
772
  top: 0;
773
773
  }
774
- `;var xn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,oe=(o,t,s,i)=>{for(var n=i>1?void 0:i?En(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&xn(t,s,n),n};const tr="spectric-dialog";d.DialogElement=class extends O{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async t=>{const s=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||s===t.target&&(this.open=!1)},this._handleKeyDown=t=>{this.closeOnEscape||t.preventDefault(),this.open&&this.closeOnEscape&&t.key==="Escape"&&(this.open=!1)},this._onClose=t=>{t.preventDefault(),t.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(t,s){let i=document.createElement(tr);i.addEventListener("close",()=>{i.remove()});for(let e in t)i[e]=t[e];let n=document.createDocumentFragment();return Qe(s,n),i.appendChild(n),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(t=>t.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(t=>t.removeEventListener("keydown",this._handleKeyDown))}updated(t){t.has("open")&&this.dialogElement.then(s=>{this.open?s.showModal():s.close()})}render(){return A`
774
+ `;var xn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,oe=(o,t,s,i)=>{for(var n=i>1?void 0:i?En(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&xn(t,s,n),n};const tr="spectric-dialog";d.DialogElement=class extends O{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async t=>{const s=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||s===t.target&&(this.open=!1)},this._handleKeyDown=t=>{this.closeOnEscape||t.preventDefault(),this.open&&this.closeOnEscape&&t.key==="Escape"&&(this.open=!1)},this._onClose=t=>{t.preventDefault(),t.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(t,s){let i=document.createElement(tr);i.addEventListener("close",()=>{i.remove()});for(let e in t)i[e]=t[e];let n=document.createDocumentFragment();return We(s,n),i.appendChild(n),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(t=>t.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(t=>t.removeEventListener("keydown",this._handleKeyDown))}updated(t){t.has("open")&&this.dialogElement.then(s=>{this.open?s.showModal():s.close()})}render(){return A`
775
775
  <dialog class=${this.hideBackdrop?"":"backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
776
776
  <spectric-panel>
777
777
  <div class="modal">
@@ -797,7 +797,7 @@ spectric-button{
797
797
  <spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${t=>t.stopPropagation()}></spectric-input>
798
798
  <div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
799
799
  ${this.completions.map((t,s)=>A`<div @click=${()=>{this.completionIndex=s,this._selectCompletion()}} class=${this.completionIndex==s?"option active":"option"}><span class="optiontype ${t.type}">${t.type}</span> <span class="value">${t.value}</span> <span class="label">${t.label}</span></span> </div></div>`)}
800
- </div>`}},V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"placeholder",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"value",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"outputLanguage",2),V([We()],d.SpectricQuery.prototype,"completions",2),V([We()],d.SpectricQuery.prototype,"completionIndex",2),V([v({type:Array,reflect:!0})],d.SpectricQuery.prototype,"fields",2),V([fe(".autocomplete")],d.SpectricQuery.prototype,"_autocomplete",2),V([at(".autocomplete")],d.SpectricQuery.prototype,"_asyncAutocomplete",2),V([fe("spectric-input")],d.SpectricQuery.prototype,"_input",2),d.SpectricQuery=V([D("spectric-query")],d.SpectricQuery);const ni=F`
800
+ </div>`}},V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"placeholder",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"value",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"outputLanguage",2),V([xe()],d.SpectricQuery.prototype,"completions",2),V([xe()],d.SpectricQuery.prototype,"completionIndex",2),V([v({type:Array,reflect:!0})],d.SpectricQuery.prototype,"fields",2),V([fe(".autocomplete")],d.SpectricQuery.prototype,"_autocomplete",2),V([at(".autocomplete")],d.SpectricQuery.prototype,"_asyncAutocomplete",2),V([fe("spectric-input")],d.SpectricQuery.prototype,"_input",2),d.SpectricQuery=V([D("spectric-query")],d.SpectricQuery);const ni=F`
801
801
  border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
802
802
  background-color: var(--panel-color,#0b0b0b);
803
803
  --spectric-input-color: var(--spectric-background);
@@ -1020,7 +1020,7 @@ spectric-button{
1020
1020
  width: 5px;
1021
1021
  cursor: ew-resize;
1022
1022
  }
1023
- `;var Un=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,I=(o,t,s,i)=>{for(var n=i>1?void 0:i?Fn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Un(t,s,n),n},ui=(o=>(o.horizontal="horizontal",o.vertical="vertical",o))(ui||{});const di="spectric-splitview";d.SplitView=class extends Ve{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:s,orientation:i,invisible:n,min:e,max:p,useSavedState:h}=this,g=this.getAttribute("id");g&&this.useSavedState&&localStorage.setItem(`splitview-${g}`,String(s)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:s,invisible:n,min:e,max:p,useSavedState:h}}))},this._onMouseMove=Gr(s=>{if(this.isDragging){const i=this.getBoundingClientRect();let n,e;this.orientation==="horizontal"?(n=s.clientX-i.left,e=n/i.width*100):(n=s.clientY-i.top,e=n/i.height*100),e=Math.min(Math.max(e,this.min),this.max),this.percentage=e,this._emitChange()}}),this._assignSlot=s=>{if(!s.target)return;let n=s.target.assignedNodes().filter(e=>e instanceof HTMLElement);n.length>2&&console.log("cannot assign more than 2 elements to a split view"),n.forEach(e=>{if(this._panel1.assignedNodes().length===0){e.slot="panel1";return}if(this._panel2.assignedNodes().length===0){e.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let t=this.getAttribute("id");if(t&&this.useSavedState){let s=localStorage.getItem(`splitview-${t}`);s&&(this.percentage=parseFloat(s))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(t){t.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return A`
1023
+ `;var Un=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,I=(o,t,s,i)=>{for(var n=i>1?void 0:i?Fn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Un(t,s,n),n},ui=(o=>(o.horizontal="horizontal",o.vertical="vertical",o))(ui||{});const di="spectric-splitview";d.SplitView=class extends Ye{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:s,orientation:i,invisible:n,min:e,max:p,useSavedState:h}=this,g=this.getAttribute("id");g&&this.useSavedState&&localStorage.setItem(`splitview-${g}`,String(s)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:s,invisible:n,min:e,max:p,useSavedState:h}}))},this._onMouseMove=Gr(s=>{if(this.isDragging){const i=this.getBoundingClientRect();let n,e;this.orientation==="horizontal"?(n=s.clientX-i.left,e=n/i.width*100):(n=s.clientY-i.top,e=n/i.height*100),e=Math.min(Math.max(e,this.min),this.max),this.percentage=e,this._emitChange()}}),this._assignSlot=s=>{if(!s.target)return;let n=s.target.assignedNodes().filter(e=>e instanceof HTMLElement);n.length>2&&console.log("cannot assign more than 2 elements to a split view"),n.forEach(e=>{if(this._panel1.assignedNodes().length===0){e.slot="panel1";return}if(this._panel2.assignedNodes().length===0){e.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let t=this.getAttribute("id");if(t&&this.useSavedState){let s=localStorage.getItem(`splitview-${t}`);s&&(this.percentage=parseFloat(s))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(t){t.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return A`
1024
1024
  <div class="split-view ${this.orientation} ${this._error?"error":""} ${this.isDragging?"active":""}" style="--split-percentage: ${this.percentage}%;">
1025
1025
  <span class="error-display">${this._error}</span>
1026
1026
  <div class="panel" style="${this.orientation==="horizontal"?"flex: var(--split-percentage, 50%)":"max-height: var(--split-percentage, 50%)"}">
@@ -1032,7 +1032,7 @@ spectric-button{
1032
1032
  </div>
1033
1033
  </div>
1034
1034
  <slot @slotchange=${this._assignSlot} style="display:none"></slot>
1035
- `}},d.SplitView.styles=In,I([v({type:String})],d.SplitView.prototype,"orientation",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"percentage",2),I([v({type:Boolean})],d.SplitView.prototype,"invisible",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"min",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"max",2),I([v({type:Boolean,reflect:!0})],d.SplitView.prototype,"useSavedState",2),I([We()],d.SplitView.prototype,"isDragging",2),I([We()],d.SplitView.prototype,"_error",2),I([at(".splitter")],d.SplitView.prototype,"_splitter",2),I([fe("slot[name='panel1']")],d.SplitView.prototype,"_panel1",2),I([fe("slot[name='panel2']")],d.SplitView.prototype,"_panel2",2),d.SplitView=I([D(di)],d.SplitView);var Hn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,$e=(o,t,s,i)=>{for(var n=i>1?void 0:i?Qn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Hn(t,s,n),n};const hi="spectric-pagination";console.log("Pagination"),d.PaginationElement=class extends O{constructor(){super(...arguments),this.page=1,this.pageSize=10,this.pageSizeOptions=[10,20,50,100,1e3],this.size="xsmall",this._handlePageUp=()=>{this.page+=1,this._emitChange()},this._handlePageDown=()=>{this.page-=1,this._emitChange()},this._handleSizeChange=t=>{t.stopPropagation(),t.preventDefault();let s=parseInt(t.target.value);this.pageSize=s,this._emitChange()},this._emitChange=()=>{let{page:t,pageSize:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{page:t,pageSize:s}}))}}createRenderRoot(){return this}updated(t){t.has("pageSize")&&!this.pageSizeOptions.includes(this.pageSize)&&(this.pageSizeOptions=[...this.pageSizeOptions,this.pageSize].sort((s,i)=>s-i),requestAnimationFrame(()=>{this.select&&this.select.value!==String(this.pageSize)&&(this.select.value=String(this.pageSize))}))}render(){let t=this.page*this.pageSize,s=!0;this.totalItems&&t<this.totalItems&&(s=!1);let i="";return this.totalItems&&(i=`${this.page} of ${Math.ceil(this.totalItems/this.pageSize)}`),A`
1035
+ `}},d.SplitView.styles=In,I([v({type:String})],d.SplitView.prototype,"orientation",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"percentage",2),I([v({type:Boolean})],d.SplitView.prototype,"invisible",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"min",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"max",2),I([v({type:Boolean,reflect:!0})],d.SplitView.prototype,"useSavedState",2),I([xe()],d.SplitView.prototype,"isDragging",2),I([xe()],d.SplitView.prototype,"_error",2),I([at(".splitter")],d.SplitView.prototype,"_splitter",2),I([fe("slot[name='panel1']")],d.SplitView.prototype,"_panel1",2),I([fe("slot[name='panel2']")],d.SplitView.prototype,"_panel2",2),d.SplitView=I([D(di)],d.SplitView);var Hn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,$e=(o,t,s,i)=>{for(var n=i>1?void 0:i?Qn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Hn(t,s,n),n};const hi="spectric-pagination";console.log("Pagination"),d.PaginationElement=class extends O{constructor(){super(...arguments),this.page=1,this.pageSize=10,this.pageSizeOptions=[10,20,50,100,1e3],this.size="xsmall",this._handlePageUp=()=>{this.page+=1,this._emitChange()},this._handlePageDown=()=>{this.page-=1,this._emitChange()},this._handleSizeChange=t=>{t.stopPropagation(),t.preventDefault();let s=parseInt(t.target.value);this.pageSize=s,this._emitChange()},this._emitChange=()=>{let{page:t,pageSize:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{page:t,pageSize:s}}))}}createRenderRoot(){return this}updated(t){t.has("pageSize")&&!this.pageSizeOptions.includes(this.pageSize)&&(this.pageSizeOptions=[...this.pageSizeOptions,this.pageSize].sort((s,i)=>s-i),requestAnimationFrame(()=>{this.select&&this.select.value!==String(this.pageSize)&&(this.select.value=String(this.pageSize))}))}render(){let t=this.page*this.pageSize,s=!0;this.totalItems&&t<this.totalItems&&(s=!1);let i="";return this.totalItems&&(i=`${this.page} of ${Math.ceil(this.totalItems/this.pageSize)}`),A`
1036
1036
  <div class="spectric-pagination-container">
1037
1037
  <div>
1038
1038
  <!-- TODO/FIXME Make a select component and use it for cross browser styling-->
@@ -1066,18 +1066,18 @@ spectric-button{
1066
1066
  * @license
1067
1067
  * Copyright 2017 Google LLC
1068
1068
  * SPDX-License-Identifier: BSD-3-Clause
1069
- */const gi=o=>Zs(o)?o._$litType$.h:o.strings,Yn=qe(class extends nt{constructor(o){super(o),this.et=new WeakMap}render(o){return[o]}update(o,[t]){const s=Yr(this.it)?gi(this.it):null,i=Yr(t)?gi(t):null;if(s!==null&&(i===null||s!==i)){const n=qt(o).pop();let e=this.et.get(s);if(e===void 0){const p=document.createDocumentFragment();e=Qe(P,p),e.setConnected(!1),this.et.set(s,e)}Qt(e,[n]),ge(e,void 0,n)}if(i!==null){if(s===null||s!==i){const n=this.et.get(i);if(n!==void 0){const e=qt(n).pop();Js(o),ge(o,void 0,e),Qt(o,[e])}}this.it=t}else this.it=void 0;return this.render(t)}});var Kn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,Ze=(o,t,s,i)=>{for(var n=i>1?void 0:i?Zn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Kn(t,s,n),n};const Xn="spectric-table-cell";let ke=class extends O{constructor(){super(...arguments),this.styleRules={whiteSpace:"",width:""},this._handleFilterOut=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Pe(this.row,this.column.key)),this._emitFilter({include:!1,row:this.row,value:o,column:this.column})},this._handleFilterFor=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Pe(this.row,this.column.key)),this._emitFilter({include:!0,row:this.row,value:o,column:this.column})}}createRenderRoot(){return this}updated(o){}_emitFilter(o){this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:o}))}render(){let o;this.column.render?o=this.column.render(this.row,this.index,this.table):this.column.key&&typeof this.row=="object"?o=Pe(this.row,this.column.key):o=A`error`;let t=["cell-contents"];this.column.filterable&&t.push("filterable");let s=Yn(this.column.filterable?A`<div class="table-cell-actions">
1069
+ */const gi=o=>Zs(o)?o._$litType$.h:o.strings,Yn=Ve(class extends nt{constructor(o){super(o),this.et=new WeakMap}render(o){return[o]}update(o,[t]){const s=Yr(this.it)?gi(this.it):null,i=Yr(t)?gi(t):null;if(s!==null&&(i===null||s!==i)){const n=qt(o).pop();let e=this.et.get(s);if(e===void 0){const p=document.createDocumentFragment();e=We(P,p),e.setConnected(!1),this.et.set(s,e)}Qt(e,[n]),ge(e,void 0,n)}if(i!==null){if(s===null||s!==i){const n=this.et.get(i);if(n!==void 0){const e=qt(n).pop();Js(o),ge(o,void 0,e),Qt(o,[e])}}this.it=t}else this.it=void 0;return this.render(t)}});var Kn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,Te=(o,t,s,i)=>{for(var n=i>1?void 0:i?Zn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Kn(t,s,n),n};const Xn="spectric-table-cell";let we=class extends O{constructor(){super(...arguments),this.overflow="",this.styleRules={whiteSpace:"",width:""},this._handleFilterOut=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Oe(this.row,this.column.key)),this._emitFilter({include:!1,row:this.row,value:o,column:this.column})},this._handleFilterFor=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Oe(this.row,this.column.key)),this._emitFilter({include:!0,row:this.row,value:o,column:this.column})},this._displayTooltip=()=>{let o=this.querySelector("div"),t=this.querySelector("span");if(o&&t){let s=t.getBoundingClientRect(),i=o.getBoundingClientRect();s.width*s.height>i.width*i.height?(console.log("We need to show a tooltip witht he content because we are overflowing"),this.overflow=this.getRenderedValue()):this.overflow=""}}}createRenderRoot(){return this}updated(o){}_emitFilter(o){this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:o}))}getRenderedValue(){let o;return this.column.render?o=this.column.render(this.row,this.index,this.table):this.column.key&&typeof this.row=="object"?o=Oe(this.row,this.column.key):o=A`error`,o}render(){let o=this.getRenderedValue(),t=["cell-contents"];this.column.filterable&&t.push("filterable");let s=Yn(this.column.filterable?A`<div class="table-cell-actions">
1070
1070
  <spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon tooltip="Filter Out Value">-</spectric-button>
1071
1071
  <spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon tooltip="Filter For Value">+</spectric-button></div>`:null);return this.styleRules={width:this.column.width?this.column.width+"px":"",whiteSpace:this.column.whiteSpace||""},A`
1072
- <td style=${Ht(this.styleRules)}>
1072
+ <td style=${Ht(this.styleRules)} @mouseenter=${this._displayTooltip}>
1073
1073
  ${s}
1074
- <div class=${t.join(" ")}>${o}</div>
1074
+ <div class=${t.join(" ")}>${this.overflow?A`<spectric-tooltip .text=${this.overflow}></spectric-tooltip>`:null}<span>${o}</span></div>
1075
1075
  </td>
1076
- `}};Ze([v({type:Object,attribute:!1})],ke.prototype,"row",2),Ze([v({type:Number,attribute:!1})],ke.prototype,"index",2),Ze([v({type:Object,attribute:!1})],ke.prototype,"column",2),Ze([fe("td")],ke.prototype,"td",2),ke=Ze([D(Xn)],ke);const Pe=(o,t)=>{let s=t.split("."),i=o[s[0]];return s.length>1&&(i=Pe(i,s.slice(1).join("."))),i};/**
1076
+ `}};Te([v({type:Object,attribute:!1})],we.prototype,"row",2),Te([v({type:Number,attribute:!1})],we.prototype,"index",2),Te([v({type:Object,attribute:!1})],we.prototype,"column",2),Te([xe()],we.prototype,"overflow",2),Te([fe("td")],we.prototype,"td",2),we=Te([D(Xn)],we);const Oe=(o,t)=>{let s=t.split("."),i=o[s[0]];return i==null||s.length>1&&(i=Oe(i,s.slice(1).join("."))),i};/**
1077
1077
  * @license
1078
1078
  * Copyright 2017 Google LLC
1079
1079
  * SPDX-License-Identifier: BSD-3-Clause
1080
- */const bi=(o,t,s)=>{const i=new Map;for(let n=t;n<=s;n++)i.set(o[n],n);return i},vt=qe(class extends nt{constructor(o){if(super(o),o.type!==Ft.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,t,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const n=[],e=[];let p=0;for(const h of o)n[p]=i?i(h,p):p,e[p]=s(h,p),p++;return{values:e,keys:n}}render(o,t,s){return this.dt(o,t,s).values}update(o,[t,s,i]){const n=qt(o),{values:e,keys:p}=this.dt(t,s,i);if(!Array.isArray(n))return this.ut=p,e;const h=this.ut??(this.ut=[]),g=[];let $,C,y=0,E=n.length-1,x=0,k=e.length-1;for(;y<=E&&x<=k;)if(n[y]===null)y++;else if(n[E]===null)E--;else if(h[y]===p[x])g[x]=be(n[y],e[x]),y++,x++;else if(h[E]===p[k])g[k]=be(n[E],e[k]),E--,k--;else if(h[y]===p[k])g[k]=be(n[y],e[k]),ge(o,g[k+1],n[y]),y++,k--;else if(h[E]===p[x])g[x]=be(n[E],e[x]),ge(o,n[y],n[E]),E--,x++;else if($===void 0&&($=bi(p,x,k),C=bi(h,y,E)),$.has(h[y]))if($.has(h[E])){const N=C.get(p[x]),z=N!==void 0?n[N]:null;if(z===null){const M=ge(o,n[y]);be(M,e[x]),g[x]=M}else g[x]=be(z,e[x]),ge(o,n[y],z),n[N]=null;x++}else Wt(n[E]),E--;else Wt(n[y]),y++;for(;x<=k;){const N=ge(o,g[k+1]);be(N,e[x]),g[x++]=N}for(;y<=E;){const N=n[y++];N!==null&&Wt(N)}return this.ut=p,Qt(o,g),ie}});var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,or=(o,t,s,i)=>{for(var n=i>1?void 0:i?Jn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Gn(t,s,n),n};const ea="spectric-table-body";let mt=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[]}createRenderRoot(){return this}firstUpdated(o){this.data.length>100&&console.warn("Table is rendering excessive amounts of data to the DOM you should set rowHeight and use a virtualized scroll or use pagination")}render(){return A`
1080
+ */const bi=(o,t,s)=>{const i=new Map;for(let n=t;n<=s;n++)i.set(o[n],n);return i},vt=Ve(class extends nt{constructor(o){if(super(o),o.type!==Ft.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,t,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const n=[],e=[];let p=0;for(const h of o)n[p]=i?i(h,p):p,e[p]=s(h,p),p++;return{values:e,keys:n}}render(o,t,s){return this.dt(o,t,s).values}update(o,[t,s,i]){const n=qt(o),{values:e,keys:p}=this.dt(t,s,i);if(!Array.isArray(n))return this.ut=p,e;const h=this.ut??(this.ut=[]),g=[];let $,C,y=0,E=n.length-1,x=0,k=e.length-1;for(;y<=E&&x<=k;)if(n[y]===null)y++;else if(n[E]===null)E--;else if(h[y]===p[x])g[x]=be(n[y],e[x]),y++,x++;else if(h[E]===p[k])g[k]=be(n[E],e[k]),E--,k--;else if(h[y]===p[k])g[k]=be(n[y],e[k]),ge(o,g[k+1],n[y]),y++,k--;else if(h[E]===p[x])g[x]=be(n[E],e[x]),ge(o,n[y],n[E]),E--,x++;else if($===void 0&&($=bi(p,x,k),C=bi(h,y,E)),$.has(h[y]))if($.has(h[E])){const N=C.get(p[x]),z=N!==void 0?n[N]:null;if(z===null){const M=ge(o,n[y]);be(M,e[x]),g[x]=M}else g[x]=be(z,e[x]),ge(o,n[y],z),n[N]=null;x++}else Wt(n[E]),E--;else Wt(n[y]),y++;for(;x<=k;){const N=ge(o,g[k+1]);be(N,e[x]),g[x++]=N}for(;y<=E;){const N=n[y++];N!==null&&Wt(N)}return this.ut=p,Qt(o,g),ie}});var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,or=(o,t,s,i)=>{for(var n=i>1?void 0:i?Jn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Gn(t,s,n),n};const ea="spectric-table-body";let mt=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[]}createRenderRoot(){return this}firstUpdated(o){this.data.length>100&&console.warn("Table is rendering excessive amounts of data to the DOM you should set rowHeight and use a virtualized scroll or use pagination")}render(){return A`
1081
1081
  <body>
1082
1082
  ${vt(this.data,(o,t)=>A`
1083
1083
  <tr class="${t%2===0?"odd":""}">
@@ -1085,7 +1085,7 @@ spectric-button{
1085
1085
  </tr>`)}
1086
1086
 
1087
1087
  </body>
1088
- `}};or([v({type:Array,attribute:!1})],mt.prototype,"data",2),or([v({type:Array,attribute:!1})],mt.prototype,"columns",2),mt=or([D(ea)],mt);var ta=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Xe=(o,t,s,i)=>{for(var n=i>1?void 0:i?ra(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&ta(t,s,n),n};const ia="spectric-table-virtual-body";let Te=class extends Ve{constructor(){super(),this.data=[],this.columns=[],this.rowHeight=30,this.startIndex=0,this.addDisposableListener(()=>this.table.querySelector(".table-wrapper"),"scroll",()=>{const o=this.table.querySelector(".table-wrapper").scrollTop;requestAnimationFrame(()=>{this.startIndex=Math.floor(o/this.rowHeight)})})}firstUpdated(){this.columns.forEach(o=>{o.width||console.warn("When using virtual scrolling it is recomended to set the width of the columns to prevent columns widths from jittering during scroll")})}createRenderRoot(){return this}render(){let o=this.data.length,t=10,s=this.table.querySelector("spectric-table-header").clientHeight,i=this.table.querySelector(".table-wrapper"),n=Math.max(this.startIndex-t,0);const e=Math.ceil((i.clientHeight-s)/this.rowHeight),p=Math.min(n+e+t,o),h=p-n;let g=o*this.rowHeight,$=n*this.rowHeight+(i.scrollTop-n*this.rowHeight);p===o&&($=n*this.rowHeight);let C=h*this.rowHeight,y=g-$-C,E=this.startIndex!=0?A`
1088
+ `}};or([v({type:Array,attribute:!1})],mt.prototype,"data",2),or([v({type:Array,attribute:!1})],mt.prototype,"columns",2),mt=or([D(ea)],mt);var ta=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Xe=(o,t,s,i)=>{for(var n=i>1?void 0:i?ra(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&ta(t,s,n),n};const ia="spectric-table-virtual-body";let De=class extends Ye{constructor(){super(),this.data=[],this.columns=[],this.rowHeight=30,this.startIndex=0,this.addDisposableListener(()=>this.table.querySelector(".table-wrapper"),"scroll",()=>{const o=this.table.querySelector(".table-wrapper").scrollTop;requestAnimationFrame(()=>{this.startIndex=Math.floor(o/this.rowHeight)})})}firstUpdated(){this.columns.forEach(o=>{o.width||console.warn("When using virtual scrolling it is recomended to set the width of the columns to prevent columns widths from jittering during scroll")})}createRenderRoot(){return this}render(){let o=this.data.length,t=10,s=this.table.querySelector("spectric-table-header").clientHeight,i=this.table.querySelector(".table-wrapper"),n=Math.max(this.startIndex-t,0);const e=Math.ceil((i.clientHeight-s)/this.rowHeight),p=Math.min(n+e+t,o),h=p-n;let g=o*this.rowHeight,$=n*this.rowHeight+(i.scrollTop-n*this.rowHeight);p===o&&($=n*this.rowHeight);let C=h*this.rowHeight,y=g-$-C,E=this.startIndex!=0?A`
1089
1089
  <tr style="height:${$}px" class="virtual-scroll-spacer">
1090
1090
  <td colspan="${this.columns.length}"></td></tr>`:null,x=A`
1091
1091
  <tr style="height:${y}px" class="virtual-scroll-spacer">
@@ -1105,18 +1105,18 @@ spectric-button{
1105
1105
  ${y>0?x:null}
1106
1106
  </tbody>
1107
1107
 
1108
- `}};Xe([v({type:Array,attribute:!1})],Te.prototype,"data",2),Xe([v({type:Array,attribute:!1})],Te.prototype,"columns",2),Xe([v({type:Number,attribute:!1})],Te.prototype,"rowHeight",2),Xe([v({type:Number,state:!0})],Te.prototype,"startIndex",2),Te=Xe([D(ia)],Te);const sa=o=>o.map(({key:t,sortDirection:s,compareFn:i})=>(n,e)=>{if(!t)return;let p=Pe(n,t),h=Pe(e,t);if(i)return i(n,e);if(typeof p=="number"||typeof p=="bigint"||typeof p=="boolean"){let g=p-h;return s===R.descending&&(g=g*-1),g}else if(typeof p=="string")return p.localeCompare(h)*(s===R.descending?-1:1)});var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,ne=(o,t,s,i)=>{for(var n=i>1?void 0:i?na(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oa(t,s,n),n};const vi="spectric-table";var mi=(o=>(o.multi="multi",o.single="single",o.none="none",o))(mi||{}),yi=(o=>(o.multi="multi",o.single="single",o))(yi||{}),R=(o=>(o.ascending="ascending",o.descending="descending",o.none="none",o))(R||{});d.TableElement=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[],this.select="none",this.sort="single",this.rowHeight=25,this._handlePaginationChange=t=>{if(this.pagination){let s={...this.pagination,...t.detail},{totalItems:i,page:n,pageSize:e}=s;i&&n&&e&&(n-1)*e>i&&(s.page=1),this.pagination=s}this.dispatchEvent(new CustomEvent("paginationChange",{detail:t.detail})),this._emitChange()},this._handleSortChange=t=>{let s=t.detail,i=this.columns.find(n=>n.key==s.key);if(!i){console.warn("Unable to find sort column");return}this.sort=="single"&&this.columns.forEach(n=>{n.sortDirection="none"}),i.sortDirection=s.sortDirection,this.columns=[...this.columns],this._emitChange()},this._emitChange=()=>{let{pagination:t,columns:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{pagination:t,columns:s}}))},this.__DO_NOT_USE_filter=()=>{this.dispatchEvent(new CustomEvent("filter")),this.dispatchEvent(new CustomEvent("sortChange"))},this.selected=[],this._handleSelectAllChange=t=>{t.stopPropagation(),t.target.checked?this.selectAll():this.deselectAll()}}static getDefaultDataSorterAndPaginatior(t){return s=>{let i=s.columns.filter(h=>h.sortable&&h.sortDirection&&h.sortDirection!=="none"),n=[...t];if(i.length){let h=sa(i);n.sort((g,$)=>{for(let C of h){let y=C(g,$);if(y)return y}return 0})}if(!s.pagination)return n;let{page:e,pageSize:p}=s.pagination;return!e||!p?n:s.pagination?n.slice((e-1)*p,e*p):n}}createRenderRoot(){return this}deselectAll(){this.selected=[],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}selectAll(){this.selected=[...this.data],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}update(t){t.has("select")&&this.select==="single"&&this.selected.length>1&&(this.selected=[this.selected[0]],this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))),super.update(t)}render(){let t=this.columns.filter(i=>!i.hidden);return this.select!=="none"&&t.unshift({title:this.select==="multi"?A`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>`:null,render:i=>{let n=document.createElement("div"),e=this.selected.includes(i),p=A`<spectric-input variant="checkbox" class="table-checkbox-${this.select}" ${Ke({checked:e})} @change=${h=>{h.stopPropagation();let g=this.selected.findIndex($=>$===i);if(!(h.target.checked&&g!==-1)){{if(!h.target.checked&&g===-1)return;!h.target.checked&&g!==-1&&this.selected.splice(g,1)}h.target.checked&&(this.select==="single"&&(this.selected=[]),this.selected.push(i)),this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))}}}></spectric-input>`;return Qe(p,n),p}}),A`
1108
+ `}};Xe([v({type:Array,attribute:!1})],De.prototype,"data",2),Xe([v({type:Array,attribute:!1})],De.prototype,"columns",2),Xe([v({type:Number,attribute:!1})],De.prototype,"rowHeight",2),Xe([v({type:Number,state:!0})],De.prototype,"startIndex",2),De=Xe([D(ia)],De);const sa=o=>o.map(({key:t,sortDirection:s,compareFn:i})=>(n,e)=>{if(!t)return;let p=Oe(n,t),h=Oe(e,t);if(i)return i(n,e);if(typeof p=="number"||typeof p=="bigint"||typeof p=="boolean"){let g=p-h;return s===R.descending&&(g=g*-1),g}else if(typeof p=="string")return p.localeCompare(h)*(s===R.descending?-1:1)});var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,ne=(o,t,s,i)=>{for(var n=i>1?void 0:i?na(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oa(t,s,n),n};const vi="spectric-table";var mi=(o=>(o.multi="multi",o.single="single",o.none="none",o))(mi||{}),yi=(o=>(o.multi="multi",o.single="single",o))(yi||{}),R=(o=>(o.ascending="ascending",o.descending="descending",o.none="none",o))(R||{});d.TableElement=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[],this.select="none",this.sort="single",this.rowHeight=25,this._handlePaginationChange=t=>{if(this.pagination){let s={...this.pagination,...t.detail},{totalItems:i,page:n,pageSize:e}=s;i&&n&&e&&(n-1)*e>i&&(s.page=1),this.pagination=s}this.dispatchEvent(new CustomEvent("paginationChange",{detail:t.detail})),this._emitChange()},this._handleSortChange=t=>{let s=t.detail,i=this.columns.find(n=>n.key==s.key);if(!i){console.warn("Unable to find sort column");return}this.sort=="single"&&this.columns.forEach(n=>{n.sortDirection="none"}),i.sortDirection=s.sortDirection,this.columns=[...this.columns],this._emitChange()},this._emitChange=()=>{let{pagination:t,columns:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{pagination:t,columns:s}}))},this.__DO_NOT_USE_filter=()=>{this.dispatchEvent(new CustomEvent("filter")),this.dispatchEvent(new CustomEvent("sortChange"))},this.selected=[],this._handleSelectAllChange=t=>{t.stopPropagation(),t.target.checked?this.selectAll():this.deselectAll()}}static getDefaultDataSorterAndPaginatior(t){return s=>{let i=s.columns.filter(h=>h.sortable&&h.sortDirection&&h.sortDirection!=="none"),n=[...t];if(i.length){let h=sa(i);n.sort((g,$)=>{for(let C of h){let y=C(g,$);if(y)return y}return 0})}if(!s.pagination)return n;let{page:e,pageSize:p}=s.pagination;return!e||!p?n:s.pagination?n.slice((e-1)*p,e*p):n}}createRenderRoot(){return this}deselectAll(){this.selected=[],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}selectAll(){this.selected=[...this.data],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}update(t){t.has("select")&&this.select==="single"&&this.selected.length>1&&(this.selected=[this.selected[0]],this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))),super.update(t)}render(){let t=this.columns.filter(i=>!i.hidden);return this.select!=="none"&&t.unshift({title:this.select==="multi"?A`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>`:null,render:i=>{let n=document.createElement("div"),e=this.selected.includes(i),p=A`<spectric-input variant="checkbox" class="table-checkbox-${this.select}" ${Ze({checked:e})} @change=${h=>{h.stopPropagation();let g=this.selected.findIndex($=>$===i);if(!(h.target.checked&&g!==-1)){{if(!h.target.checked&&g===-1)return;!h.target.checked&&g!==-1&&this.selected.splice(g,1)}h.target.checked&&(this.select==="single"&&(this.selected=[]),this.selected.push(i)),this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))}}}></spectric-input>`;return We(p,n),p}}),A`
1109
1109
  <div class="table-wrapper" style="--rowHeight:${this.rowHeight-4}px">
1110
1110
  <div role="table">
1111
1111
  <spectric-table-header .columns=${t} @sortChange=${this._handleSortChange}></spectric-table-header>
1112
1112
  ${this.rowHeight>=25&&this.data.length>=100?A`<spectric-table-virtual-body .columns=${t} .data=${this.data} .table=${this} .rowHeight=${this.rowHeight}></spectric-table-virtual-body>`:A`<spectric-table-body .columns=${t} .data=${this.data} .table=${this}></spectric-table-body>`}
1113
1113
  </div>
1114
1114
  </div>
1115
- ${this.pagination?A`<spectric-pagination ${Ke(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>`:null}
1116
- `}},ne([v({type:Array,attribute:!1})],d.TableElement.prototype,"data",2),ne([v({type:Object,attribute:!1})],d.TableElement.prototype,"pagination",2),ne([v({attribute:!1})],d.TableElement.prototype,"columns",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"select",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"sort",2),ne([v({type:Number,reflect:!0})],d.TableElement.prototype,"rowHeight",2),ne([We()],d.TableElement.prototype,"selected",2),d.TableElement=ne([D(vi)],d.TableElement);var aa=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,ae=(o,t,s,i)=>{for(var n=i>1?void 0:i?ca(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&aa(t,s,n),n};const $i="spectric-tooltip";var wi=(o=>(o.top="top",o.bottom="bottom",o.left="left",o.right="right",o.mouse="mouse",o))(wi||{});d.TooltipElement=class extends Ve{constructor(){super(),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalTarget=document.body,this.open=!1,this._getMousePosition=t=>{this.mouseLocation={left:t.clientX,top:t.clientY},this.position=="mouse"&&this.open&&!this.mouseframe&&(this.mouseframe=requestAnimationFrame(()=>this.positionTooltip()))},this._hideTooltip=()=>{this.timer&&clearTimeout(this.timer),this.open=!1,this.portalElement.remove()},this.showToolTip=async()=>{this.timer&&clearTimeout(this.timer),await new Promise(s=>{this.timer=window.setTimeout(s,this.delay)}),this.portalElement.style.pointerEvents="none",this.portalElement.className=`spectric-tooltip-portal ${this.position}`;const t=A`<div class="tooltip-container">
1115
+ ${this.pagination?A`<spectric-pagination ${Ze(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>`:null}
1116
+ `}},ne([v({type:Array,attribute:!1})],d.TableElement.prototype,"data",2),ne([v({type:Object,attribute:!1})],d.TableElement.prototype,"pagination",2),ne([v({attribute:!1})],d.TableElement.prototype,"columns",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"select",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"sort",2),ne([v({type:Number,reflect:!0})],d.TableElement.prototype,"rowHeight",2),ne([xe()],d.TableElement.prototype,"selected",2),d.TableElement=ne([D(vi)],d.TableElement);var aa=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,ae=(o,t,s,i)=>{for(var n=i>1?void 0:i?ca(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&aa(t,s,n),n};const $i="spectric-tooltip";var wi=(o=>(o.top="top",o.bottom="bottom",o.left="left",o.right="right",o.mouse="mouse",o))(wi||{});d.TooltipElement=class extends Ye{constructor(){super(),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalTarget=document.body,this.open=!1,this._getMousePosition=t=>{this.mouseLocation={left:t.clientX,top:t.clientY},this.position=="mouse"&&this.open&&!this.mouseframe&&(this.mouseframe=requestAnimationFrame(()=>this.positionTooltip()))},this._hideTooltip=()=>{this.timer&&clearTimeout(this.timer),this.open=!1,this.portalElement.remove()},this.showToolTip=async()=>{this.timer&&clearTimeout(this.timer),await new Promise(s=>{this.timer=window.setTimeout(s,this.delay)}),this.portalElement.style.pointerEvents="none",this.portalElement.className=`spectric-tooltip-portal ${this.position}`;const t=A`<div class="tooltip-container">
1117
1117
  <span class="tooltip-caret"></span>
1118
1118
  <div class="tooltip-content">${this.text}</div>
1119
- </div>`;Qe(t,this.portalElement),!(!this.target||!this.target.checkVisibility())&&(this.portalTarget.appendChild(this.portalElement),this.open=!0,requestAnimationFrame(this.positionTooltip))},this.applyStyle=t=>{Object.entries(t).forEach(([s,i])=>{this.portalElement.style.setProperty(s,i)})},this.positionTooltip=()=>{if(!this.target)return;let t=getComputedStyle(this),s={"--spectric-primary":t.getPropertyValue("--spectric-primary"),"--spectric-background-inverse":t.getPropertyValue("--spectric-background-inverse"),"--spectric-background-hover":t.getPropertyValue("--spectric-background-hover"),"--spectric-text-on-color":t.getPropertyValue("--spectric-text-on-color"),"--spectric-border-radius":t.getPropertyValue("--spectric-border-radius")};const i=this.target.getBoundingClientRect(),n=this.portalElement.getBoundingClientRect();this.target!==document.body&&this.maxWidth&&this.maxWidth>0&&(n.width=Math.min(n.width,this.maxWidth));let e;this.position==="mouse"&&this.mouseLocation?(this.mouseframe=void 0,e={left:this.mouseLocation.left+10+"px",top:this.mouseLocation.top-n.height/2+"px"}):this.position==="top"?e={top:i.top-n.height+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="bottom"?e={top:i.bottom+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="left"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.left-n.width+"px"}:this.position==="right"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.right+"px"}:(e={left:"0px",top:"0px"},console.error("Unknown position... Maybe we sould implement auto?")),this.applyStyle({...s,...e}),this.position!=="mouse"&&this.portalElement.animate({opacity:[0,1]},{duration:this.animationDuration})},this.addDisposableListener(()=>this.target,"mousemove",this._getMousePosition),this.addDisposableListener(()=>this.target,"mouseover",this.showToolTip),this.addDisposableListener(()=>this.target,"mouseleave",this._hideTooltip)}get target(){return this.triggerTarget||this.parentElement}connectedCallback(){super.connectedCallback(),this.portalElement=document.createElement("div"),this.portalElement.className="spectric-tooltip-portal"}disconnectedCallback(){super.disconnectedCallback(),this.portalElement.remove(),this.portalElement=void 0}render(){return A`<!-- ToolTip -->`}},d.TooltipElement.styles=F`:host{max-height: 0px;
1119
+ </div>`;We(t,this.portalElement),!(!this.target||!this.target.checkVisibility())&&(this.portalTarget.appendChild(this.portalElement),this.open=!0,requestAnimationFrame(this.positionTooltip))},this.applyStyle=t=>{Object.entries(t).forEach(([s,i])=>{this.portalElement.style.setProperty(s,i)})},this.positionTooltip=()=>{if(!this.target)return;let t=getComputedStyle(this),s={"--spectric-primary":t.getPropertyValue("--spectric-primary"),"--spectric-background-inverse":t.getPropertyValue("--spectric-background-inverse"),"--spectric-background-hover":t.getPropertyValue("--spectric-background-hover"),"--spectric-text-on-color":t.getPropertyValue("--spectric-text-on-color"),"--spectric-border-radius":t.getPropertyValue("--spectric-border-radius")};const i=this.target.getBoundingClientRect(),n=this.portalElement.getBoundingClientRect();this.target!==document.body&&this.maxWidth&&this.maxWidth>0&&(n.width=Math.min(n.width,this.maxWidth));let e;this.position==="mouse"&&this.mouseLocation?(this.mouseframe=void 0,e={left:this.mouseLocation.left+10+"px",top:this.mouseLocation.top-n.height/2+"px"}):this.position==="top"?e={top:i.top-n.height+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="bottom"?e={top:i.bottom+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="left"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.left-n.width+"px"}:this.position==="right"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.right+"px"}:(e={left:"0px",top:"0px"},console.error("Unknown position... Maybe we sould implement auto?")),this.applyStyle({...s,...e}),this.position!=="mouse"&&this.portalElement.animate({opacity:[0,1]},{duration:this.animationDuration})},this.addDisposableListener(()=>this.target,"mousemove",this._getMousePosition),this.addDisposableListener(()=>this.target,"mouseover",this.showToolTip),this.addDisposableListener(()=>this.target,"mouseleave",this._hideTooltip)}get target(){return this.triggerTarget||this.parentElement}connectedCallback(){super.connectedCallback(),this.portalElement=document.createElement("div"),this.portalElement.className="spectric-tooltip-portal"}disconnectedCallback(){super.disconnectedCallback(),this.portalElement.remove(),this.portalElement=void 0}render(){return A`<!-- ToolTip -->`}},d.TooltipElement.styles=F`:host{max-height: 0px;
1120
1120
  max-width: 0px;
1121
1121
  display: none;
1122
1122
  pointer-events:none;}`,ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"delay",2),ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"animationDuration",2),ae([v({type:String,reflect:!1})],d.TooltipElement.prototype,"text",2),ae([v({type:String,reflect:!0})],d.TooltipElement.prototype,"position",2),ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"maxWidth",2),ae([v({attribute:!1})],d.TooltipElement.prototype,"portalTarget",2),ae([v({attribute:!1})],d.TooltipElement.prototype,"triggerTarget",2),d.TooltipElement=ae([D($i)],d.TooltipElement),d.ButtonSizes=Wr,d.ButtonVariants=Vr,d.CSSPropsControls=zn,d.DialogElementTag=tr,d.ElementTag=di,d.InputVariants=Jr,d.Orientations=ui,d.PaginationElementTag=hi,d.SupportedLanguages=si,d.TableElementTag=vi,d.TableSelectOptions=mi,d.TableSortDirection=R,d.TableSortOption=yi,d.ThemeSelections=Rn,d.TooltipElementTag=$i,d.TooltipPostions=wi,d.nodeTypes=J,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});