@spectric/ui 0.0.13 → 0.0.15
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/classes/DisposibleElement.d.ts +2 -2
- package/dist/components/Button.d.ts +4 -4
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/table/cell.d.ts +3 -3
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/custom-elements.json +7 -7
- package/dist/index.es.js +1605 -1564
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +87 -83
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/classes/DisposibleElement.ts +8 -8
- package/src/components/Button.ts +7 -9
- package/src/components/pagination/pagination.ts +14 -1
- package/src/components/table/cell.ts +17 -12
- package/src/components/table/table.ts +1 -3
- package/src/components/tooltip/tooltip.ts +7 -2
package/dist/index.umd.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var _i;const te=globalThis,Dt=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lt=Symbol(),Sr=new WeakMap;let Ar=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==Lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(Dt&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=Sr.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Sr.set(s,t))}return t}toString(){return this.cssText}};const Ts=o=>new Ar(typeof o=="string"?o:o+"",void 0,Lt),F=(o,...t)=>{const s=o.length===1?o[0]:t.reduce((i,n,e)=>i+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[e+1],o[0]);return new Ar(s,o,Lt)},Os=(o,t)=>{if(Dt)o.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),n=te.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=s.cssText,o.appendChild(i)}},xr=Dt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return Ts(s)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
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");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
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};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let O=class extends
|
|
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");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
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)}};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2018 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
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`
|
|
28
28
|
:host{
|
|
29
29
|
display: inline-block;
|
|
30
30
|
--text-on-color: var(--spectric-text-on-color, #ffffff);
|
|
@@ -273,60 +273,60 @@ opacity:1
|
|
|
273
273
|
* @license
|
|
274
274
|
* Copyright 2017 Google LLC
|
|
275
275
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
276
|
-
*/const
|
|
276
|
+
*/const Qs={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Bt},qs=(o=Qs,t,s)=>{const{kind:i,metadata:n}=s;let e=globalThis.litPropertyMetadata.get(n);if(e===void 0&&globalThis.litPropertyMetadata.set(n,e=new Map),e.set(s.name,o),i==="accessor"){const{name:p}=s;return{set(h){const g=t.get.call(this);t.set.call(this,h),this.requestUpdate(p,g,o)},init(h){return h!==void 0&&this.P(p,void 0,o),h}}}if(i==="setter"){const{name:p}=s;return function(h){const g=this[p];t.call(this,h),this.requestUpdate(p,g,o)}}throw Error("Unsupported decorator location: "+i)};function v(o){return(t,s)=>typeof s=="object"?qs(o,t,s):((i,n,e)=>{const p=n.hasOwnProperty(e);return n.constructor.createProperty(e,p?{...i,wrapped:!0}:i),p?Object.getOwnPropertyDescriptor(n,e):void 0})(o,t,s)}/**
|
|
277
277
|
* @license
|
|
278
278
|
* Copyright 2017 Google LLC
|
|
279
279
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
280
|
-
*/function
|
|
280
|
+
*/function We(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
|
|
284
|
-
*/const
|
|
284
|
+
*/const Qr=(o,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,s),s);/**
|
|
285
285
|
* @license
|
|
286
286
|
* Copyright 2017 Google LLC
|
|
287
287
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
288
|
-
*/function
|
|
288
|
+
*/function fe(o,t){return(s,i,n)=>{const e=p=>{var h;return((h=p.renderRoot)==null?void 0:h.querySelector(o))??null};return Qr(s,i,{get(){return e(this)}})}}/**
|
|
289
289
|
* @license
|
|
290
290
|
* Copyright 2017 Google LLC
|
|
291
291
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
292
|
-
*/function
|
|
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`
|
|
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"
|
|
296
296
|
?disabled=${this.disabled}
|
|
297
297
|
class=${["spectric-button",`spectric-button-danger--${this.danger||!1}`,`spectric-button--${this.size||"medium"}`,t].join(" ")}
|
|
298
|
-
style=${
|
|
298
|
+
style=${Ht({backgroundColor:this.backgroundColor})}
|
|
299
299
|
>
|
|
300
300
|
<span class="animation"></span>
|
|
301
301
|
<slot>${this.label}</slot>
|
|
302
302
|
</button>
|
|
303
|
-
`}},d.SpectricButton.styles=
|
|
303
|
+
`}},d.SpectricButton.styles=Hs,q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"variant",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"disabled",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"backgroundColor",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"size",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"label",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"danger",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"icon",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltip",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltipPosition",2),d.SpectricButton=q([D("spectric-button")],d.SpectricButton);/**
|
|
304
304
|
* @license
|
|
305
305
|
* Copyright 2020 Google LLC
|
|
306
306
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
307
|
-
*/const{I:
|
|
307
|
+
*/const{I:Ks}=Us,Yr=(o,t)=>(o==null?void 0:o._$litType$)!==void 0,Zs=o=>{var t;return((t=o==null?void 0:o._$litType$)==null?void 0:t.h)!=null},Xs=o=>o.strings===void 0,Kr=()=>document.createComment(""),ge=(o,t,s)=>{var e;const i=o._$AA.parentNode,n=t===void 0?o._$AB:t._$AA;if(s===void 0){const p=i.insertBefore(Kr(),n),h=i.insertBefore(Kr(),n);s=new Ks(p,h,o,o.options)}else{const p=s._$AB.nextSibling,h=s._$AM,g=h!==o;if(g){let $;(e=s._$AQ)==null||e.call(s,o),s._$AM=o,s._$AP!==void 0&&($=o._$AU)!==h._$AU&&s._$AP($)}if(p!==n||g){let $=s._$AA;for(;$!==p;){const C=$.nextSibling;i.insertBefore($,n),$=C}}}return s},be=(o,t,s=o)=>(o._$AI(t,s),o),Gs={},Qt=(o,t=Gs)=>o._$AH=t,qt=o=>o._$AH,Wt=o=>{var i;(i=o._$AP)==null||i.call(o,!1,!0);let t=o._$AA;const s=o._$AB.nextSibling;for(;t!==s;){const n=t.nextSibling;t.remove(),t=n}},Js=o=>{o._$AR()};/**
|
|
308
308
|
* @license
|
|
309
309
|
* Copyright 2017 Google LLC
|
|
310
310
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
311
|
-
*/const
|
|
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(){}}/**
|
|
312
312
|
* @license
|
|
313
313
|
* Copyright 2020 Google LLC
|
|
314
314
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
315
|
-
*/const
|
|
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`
|
|
316
316
|
<div
|
|
317
317
|
id="viewport"
|
|
318
|
-
${
|
|
318
|
+
${pt(this.refs.viewport)}
|
|
319
319
|
@scroll=${this.handleScroll}
|
|
320
|
-
style=${`width:${s+
|
|
320
|
+
style=${`width:${s+dt.width}px;height:${t+dt.height}px;overflow:auto;position:relative`}
|
|
321
321
|
>
|
|
322
322
|
<div
|
|
323
323
|
id="fakescrolldiv"
|
|
324
|
-
${
|
|
324
|
+
${pt(this.refs.scrollDiv)}
|
|
325
325
|
>
|
|
326
326
|
</div>
|
|
327
327
|
</div>
|
|
328
328
|
<canvas
|
|
329
|
-
${
|
|
329
|
+
${pt(this.refs.canvas)}
|
|
330
330
|
width=${s}
|
|
331
331
|
height=${t}
|
|
332
332
|
></canvas>
|
|
@@ -354,8 +354,8 @@ opacity:1
|
|
|
354
354
|
background-color:var(--background-color);
|
|
355
355
|
}
|
|
356
356
|
::-webkit-scrollbar {
|
|
357
|
-
height: ${
|
|
358
|
-
width: ${
|
|
357
|
+
height: ${dt.height}px;
|
|
358
|
+
width: ${dt.width}px;
|
|
359
359
|
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -426,7 +426,7 @@ opacity:1
|
|
|
426
426
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
`,
|
|
429
|
+
`,ve([v({type:Object,attribute:!1})],d.BitDisplayCanvas.prototype,"arrayBuffer",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"frameWidth",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"scale",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"width",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"height",2),ve([at("canvas")],d.BitDisplayCanvas.prototype,"_canvas",2),d.BitDisplayCanvas=ve([D("spectric-bit-display")],d.BitDisplayCanvas);const co=F`.spectric-header {
|
|
430
430
|
display: flex;
|
|
431
431
|
justify-content: space-between;
|
|
432
432
|
align-items: center;
|
|
@@ -461,7 +461,7 @@ opacity:1
|
|
|
461
461
|
color: #333;
|
|
462
462
|
font-size: 14px;
|
|
463
463
|
}
|
|
464
|
-
`;var
|
|
464
|
+
`;var lo=Object.defineProperty,po=Object.getOwnPropertyDescriptor,ht=(o,t,s,i)=>{for(var n=i>1?void 0:i?po(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&&lo(t,s,n),n};d.Header=class extends O{constructor(){super(...arguments),this.showCreateAccount=!1,this.showLoginButton=!1,this.username="",this.onLogout=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("logout",t))},this.onLogin=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("login",t))},this.onCreateAccount=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("createAccount",t))}}render(){return A`
|
|
465
465
|
<header>
|
|
466
466
|
<div class="spectric-header">
|
|
467
467
|
<div style="flex-grow:1;">
|
|
@@ -480,12 +480,12 @@ opacity:1
|
|
|
480
480
|
<slot name="end"></slot>
|
|
481
481
|
</div>
|
|
482
482
|
</header>
|
|
483
|
-
`}},d.Header.styles=
|
|
484
|
-
<header style=${
|
|
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`
|
|
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
|
-
`}};
|
|
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`
|
|
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
|
|
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)}>
|
|
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 ${
|
|
656
|
+
<spectric-banner ${Ke({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>
|
|
657
657
|
`:null}
|
|
658
|
-
<spectric-theme theme=${
|
|
659
|
-
${this.notifications?this.notifications.map(i=>A`<spectric-banner ${
|
|
658
|
+
<spectric-theme theme=${Yt(this.theme)}>
|
|
659
|
+
${this.notifications?this.notifications.map(i=>A`<spectric-banner ${Ke(i)} ></spectric-banner>`):null}
|
|
660
660
|
${this.headerSticky?s:null}
|
|
661
661
|
<article>
|
|
662
662
|
${this.headerSticky?null:s}
|
|
@@ -666,9 +666,9 @@ article{
|
|
|
666
666
|
</section>
|
|
667
667
|
</article>
|
|
668
668
|
</spectric-theme>
|
|
669
|
-
${this.classificationLevel&&t?A`<spectric-banner ${
|
|
669
|
+
${this.classificationLevel&&t?A`<spectric-banner ${Ke({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>`:null}
|
|
670
670
|
|
|
671
|
-
`}},d.SpectricPage.styles=
|
|
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">
|
|
673
673
|
<div class="text-input__label-helper-wrapper">
|
|
674
674
|
<div class="--text-input__label-wrapper">
|
|
@@ -682,15 +682,15 @@ article{
|
|
|
682
682
|
?disabled="${this.disabled}"
|
|
683
683
|
aria-describedby="helper-text"
|
|
684
684
|
id="input"
|
|
685
|
-
name="${
|
|
686
|
-
pattern="${
|
|
687
|
-
placeholder="${
|
|
688
|
-
autocomplete="${
|
|
685
|
+
name="${xe(this.name)}"
|
|
686
|
+
pattern="${xe(this.pattern)}"
|
|
687
|
+
placeholder="${xe(this.placeholder)}"
|
|
688
|
+
autocomplete="${xe(this.autocomplete)}"
|
|
689
689
|
?readonly="${this.readonly}"
|
|
690
690
|
?required="${this.required}"
|
|
691
|
-
type="${
|
|
691
|
+
type="${xe(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
|
|
692
692
|
.value="${this._value}"
|
|
693
|
-
maxlength="${
|
|
693
|
+
maxlength="${xe(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([
|
|
724
|
-
`);super(n),this.name="DQLSyntaxError",this.shortMessage=i}}function
|
|
725
|
-
`},
|
|
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 wt[r]=a,a}function St(r,a){var l=os(r),u=os(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,ur=[]),ur.push(r))}function ns(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(zc){function Tt(ee){return ee.charCodeAt(0).toString(16).toUpperCase()}return zc.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"+Tt(ee)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(ee){return"\\x"+Tt(ee)}).replace(/[\u0100-\u0FFF]/g,function(ee){return"\\u0"+Tt(ee)}).replace(/[\u1000-\uFFFF]/g,function(ee){return"\\u"+Tt(ee)})}var Q=new Array(L.length),As,xs,et;for(et=0;et<L.length;et++)Q[et]=L[et].description;return As=L.length>1?Q.slice(0,-1).join(", ")+" or "+Q[L.length-1]:Q[0],xs=B?'"'+le(B)+'"':"end of input","Expected "+As+" but "+xs+" found."}return a!==null&&b(a),new t(r!==null?r:_(a,l),a,l,u)}function as(){var r,a,l,u;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();return a!==e?(l=At(),l===e&&(l=null),l!==e?(u=Ct(),u!==e?(S=r,a=g(l,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r}function At(){var r,a,l,u;return r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=yc(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=dr(),a!==e?(l=xt(),l!==e?(u=At(),u!==e?(S=r,a=k(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=dr())),r}function dr(){var r,a,l,u;return r=c,a=cs(),a!==e?(l=Et(),l!==e?(u=dr(),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=cs()),r}function cs(){var r,a,l;return r=c,a=br(),a!==e?(l=ls(),l!==e?(S=r,a=E(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=ls()),r}function ls(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(C)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=At(),u!==e?(b=Ct(),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=pc()),r}function pc(){var r,a,l,u,b,_,L,B,le,Q;if(r=c,a=hr(),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?(_=Te,c++):(_=e,f===0&&m(ir)),_!==e){for(L=[],B=w();B!==e;)L.push(B),B=w();L!==e?(B=At(),B!==e?(le=Ct(),le!==e?(i.charCodeAt(c)===125?(Q=sr,c++):(Q=e,f===0&&m(or)),Q!==e?(S=r,a=sa(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=uc()),r}function uc(){var r;return r=dc(),r===e&&(r=hc(),r===e&&(r=fc())),r}function hr(){var r;return f++,r=vr(),f--,r===e&&f===0&&m(oa),r}function dc(){var r,a,l,u,b,_;if(r=c,a=hr(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(u=gs(),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=vr(),_!==e?(S=r,a=na(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 hc(){var r,a,l,u,b,_;if(r=c,a=hr(),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?(_=fr(),_!==e?(S=r,a=aa(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 fc(){var r,a;return r=c,a=ds(),a!==e&&(S=r,a=ca(a)),r=a,r}function fr(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(C)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=ps(),u!==e?(b=Ct(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=la(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=ds()),r}function ps(){var r,a,l,u;return r=c,a=gr(),a!==e?(l=xt(),l!==e?(u=ps(),u!==e?(S=r,a=pa(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=us(),a!==e?(l=Et(),l!==e?(u=gr(),u!==e?(S=r,a=ua(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=us()),r}function us(){var r,a,l;return r=c,a=br(),a!==e?(l=fr(),l!==e?(S=r,a=da(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=fr()),r}function ds(){var r,a;return f++,r=c,a=kt(),a!==e&&(S=r,a=fa(a)),r=a,r===e&&(r=c,a=hs(),a!==e&&(S=r,a=ga(a)),r=a),f--,r===e&&(a=e,f===0&&m(ha)),r}function xt(){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()===yi?(l=i.substr(c,2),c+=2):(l=e,f===0&&m($i)),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=bs(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(ba)),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,3).toLowerCase()===wi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(_i)),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=vs(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(va)),r}function br(){var r,a,l,u;if(f++,r=c,i.substr(c,3).toLowerCase()===Si?(a=i.substr(c,3),c+=3):(a=e,f===0&&m(Ai)),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=ms(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(ma)),r}function vr(){var r;return f++,r=kt(),r===e&&(r=hs()),f--,r===e&&f===0&&m(ya),r}function kt(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===34?(a=Ke,c++):(a=e,f===0&&m(Ze)),a!==e){for(l=[],u=Le();u!==e;)l.push(u),u=Le();if(l!==e)if(u=Je(),u!==e){for(b=[],_=Le();_!==e;)b.push(_),_=Le();b!==e?(i.charCodeAt(c)===34?(_=Ke,c++):(_=e,f===0&&m(Ze)),_!==e?(S=r,a=nr(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=Ke,c++):(a=e,f===0&&m(Ze)),a!==e){for(l=[],u=Le();u!==e;)l.push(u),u=Le();l!==e?(i.charCodeAt(c)===34?(u=Ke,c++):(u=e,f===0&&m(Ze)),u!==e?(S=r,a=$a(l),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Le(){var r,a,l;return r=mr(),r===e&&(r=c,i.charCodeAt(c)===92?(a=Xe,c++):(a=e,f===0&&m(Ge)),a!==e?(wa.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(_a)),l!==e?(S=r,a=mt(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=c,f++,l=Je(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(Sa.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Aa)),l!==e?(S=r,a=mt(l),r=a):(c=r,r=e)):(c=r,r=e))),r}function hs(){var r,a,l,u,b;for(r=c,a=[],l=Ne();l!==e;)a.push(l),l=Ne();if(a!==e)if(l=Je(),l!==e){for(u=[],b=Ne();b!==e;)u.push(b),b=Ne();u!==e?(S=r,a=nr(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=Ne(),l!==e)for(;l!==e;)a.push(l),l=Ne();else a=e;a!==e&&(S=r,a=xa(a)),r=a}return r}function Ne(){var r,a,l,u,b;return r=mr(),r===e&&(r=bc(),r===e&&(r=vc(),r===e&&(r=gc(),r===e&&(r=c,a=c,f++,l=fs(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=mc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(u=c,f++,b=Je(),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(xi)),b!==e?(S=r,a=mt(b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))))),r}function gc(){var r,a;return r=c,i.charCodeAt(c)===42?(a=yt,c++):(a=e,f===0&&m($t)),a!==e&&(S=r,a=Ea()),r=a,r}function Ct(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(l=Je(),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=nr(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 mr(){var r,a;return r=c,i.substr(c,2)===Ei?(a=Ei,c+=2):(a=e,f===0&&m(ka)),a!==e&&(S=r,a=Ca()),r=a,r===e&&(r=c,i.substr(c,2)===ki?(a=ki,c+=2):(a=e,f===0&&m(Pa)),a!==e&&(S=r,a=Ta()),r=a,r===e&&(r=c,i.substr(c,2)===Ci?(a=Ci,c+=2):(a=e,f===0&&m(Oa)),a!==e&&(S=r,a=Da()),r=a)),r}function bc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=Xe,c++):(a=e,f===0&&m(Ge)),a!==e?(l=fs(),l!==e?(S=r,a=mt(l),r=a):(c=r,r=e)):(c=r,r=e),r}function vc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=Xe,c++):(a=e,f===0&&m(Ge)),a!==e?(i.substr(c,2).toLowerCase()===yi?(l=i.substr(c,2),c+=2):(l=e,f===0&&m($i)),l===e&&(i.substr(c,3).toLowerCase()===wi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(_i)),l===e&&(i.substr(c,3).toLowerCase()===Si?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ai)))),l!==e?(S=r,a=La(l),r=a):(c=r,r=e)):(c=r,r=e),r}function mc(){var r;return r=xt(),r===e&&(r=Et(),r===e&&(r=br())),r}function fs(){var r;return Na.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ba)),r}function gs(){var r,a;return r=c,i.substr(c,2)===Pi?(a=Pi,c+=2):(a=e,f===0&&m(ja)),a!==e&&(S=r,a=za()),r=a,r===e&&(r=c,i.substr(c,2)===Ti?(a=Ti,c+=2):(a=e,f===0&&m(Ra)),a!==e&&(S=r,a=Ma()),r=a,r===e&&(r=c,i.charCodeAt(c)===60?(a=Oi,c++):(a=e,f===0&&m(Di)),a!==e&&(S=r,a=Ia()),r=a,r===e&&(r=c,i.charCodeAt(c)===62?(a=Li,c++):(a=e,f===0&&m(Ni)),a!==e&&(S=r,a=Ua()),r=a))),r}function w(){var r;return f++,Ha.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Qa)),f--,r===e&&f===0&&m(Fa),r}function Je(){var r,a,l;return r=c,S=c,a=qa(),a?a=void 0:a=e,a!==e?(i.substr(c,14)===Bi?(l=Bi,c+=14):(l=e,f===0&&m(Wa)),l!==e?(S=r,a=Va(),r=a):(c=r,r=e)):(c=r,r=e),r}function bs(){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)===ji?(l=ji,c+=2):(l=e,f===0&&m(Ya)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=Ka(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function vs(){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)===zi?(l=zi,c+=2):(l=e,f===0&&m(Za)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=Ri(),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=Mi,c++):(a=e,f===0&&m(Ii)),a!==e&&(S=r,a=Ri()),r=a),r}function ms(){var r,a;return r=c,i.charCodeAt(c)===45?(a=Ui,c++):(a=e,f===0&&m(Fi)),a!==e&&(S=r,a=Hi()),r=a,r===e&&(r=c,i.charCodeAt(c)===33?(a=Qi,c++):(a=e,f===0&&m(qi)),a!==e&&(S=r,a=Hi()),r=a),r}function yc(){var r;return r=$c(),r===e&&(r=ys(),r===e&&(r=wc())),r}function $c(){var r,a,l,u,b,_;if(r=c,a=Be(),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?(_=ys(),_!==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 ys(){var r;return r=_c(),r===e&&(r=yr(),r===e&&(r=Sc(),r===e&&(r=Ac(),r===e&&(r=xc(),r===e&&(r=Ec()))))),r}function wc(){var r,a,l,u,b,_;if(r=c,i.substr(c,8)===Wi?(a=Wi,c+=8):(a=e,f===0&&m(Xa)),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?(_=Be(),_!==e?(S=r,a=Ga(),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 _c(){var r,a,l,u,b,_,L;if(r=c,a=gs(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Be(),u!==e?(S=r,a=Vi(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;if(r===e)if(r=c,a=Pc(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Be(),u!==e?(b=_s(),b!==e?(_=Be(),_!==e?(L=Tc(),L!==e?(S=r,a=Vi(),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 yr(){var r,a,l,u,b;for(r=c,a=[],l=Pt(),l===e&&(i.charCodeAt(c)===42?(l=yt,c++):(l=e,f===0&&m($t)));l!==e;)a.push(l),l=Pt(),l===e&&(i.charCodeAt(c)===42?(l=yt,c++):(l=e,f===0&&m($t)));if(a!==e)if(i.charCodeAt(c)===63?(l=Yi,c++):(l=e,f===0&&m(Ki)),l!==e){for(u=[],b=yr();b!==e;)u.push(b),b=yr();u!==e?(S=r,a=Ja(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Sc(){var r,a,l,u;if(r=c,i.charCodeAt(c)===47?(a=ar,c++):(a=e,f===0&&m(cr)),a!==e){for(l=[],Zi.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(Xi));u!==e;)l.push(u),Zi.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(Xi));l!==e?(i.charCodeAt(c)===47?(u=ar,c++):(u=e,f===0&&m(cr)),u!==e?(S=r,a=ec(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Ac(){var r,a,l,u,b;if(r=c,a=$s(),a!==e)if(i.charCodeAt(c)===126?(l=lr,c++):(l=e,f===0&&m(pr)),l!==e){for(u=[],Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));b!==e;)u.push(b),Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));u!==e?(S=r,a=tc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function xc(){var r,a,l,u,b;if(r=c,a=kt(),a!==e)if(i.charCodeAt(c)===126?(l=lr,c++):(l=e,f===0&&m(pr)),l!==e){for(u=[],Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));b!==e;)u.push(b),Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));u!==e?(S=r,a=rc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Ec(){var r,a,l,u,b;if(r=c,a=Be(),a!==e)if(i.charCodeAt(c)===94?(l=Gi,c++):(l=e,f===0&&m(Ji)),l!==e){for(u=[],Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));b!==e;)u.push(b),Oe.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(De));u!==e?(S=r,a=ic(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Be(){var r;return r=kt(),r===e&&(r=$s()),r}function $s(){var r,a;if(r=[],a=Pt(),a!==e)for(;a!==e;)r.push(a),a=Pt();else r=e;return r}function Pt(){var r,a,l,u;return r=mr(),r===e&&(r=Cc(),r===e&&(r=c,a=c,f++,l=ws(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=kc(),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(xi)),u!==e?(a=[a,l,u],r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))),r}function kc(){var r;return r=xt(),r===e&&(r=Et(),r===e&&(r=bs(),r===e&&(r=vs(),r===e&&(r=ms(),r===e&&(r=_s()))))),r}function Cc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=Xe,c++):(a=e,f===0&&m(Ge)),a!==e?(l=ws(),l!==e?(S=r,a=sc(),r=a):(c=r,r=e)):(c=r,r=e),r}function ws(){var r;return i.charCodeAt(c)===43?(r=Mi,c++):(r=e,f===0&&m(Ii)),r===e&&(i.charCodeAt(c)===45?(r=Ui,c++):(r=e,f===0&&m(Fi)),r===e&&(i.charCodeAt(c)===61?(r=oc,c++):(r=e,f===0&&m(nc)),r===e&&(i.charCodeAt(c)===62?(r=Li,c++):(r=e,f===0&&m(Ni)),r===e&&(i.charCodeAt(c)===60?(r=Oi,c++):(r=e,f===0&&m(Di)),r===e&&(i.charCodeAt(c)===33?(r=Qi,c++):(r=e,f===0&&m(qi)),r===e&&(i.charCodeAt(c)===40?(r=x,c++):(r=e,f===0&&m(C)),r===e&&(i.charCodeAt(c)===41?(r=N,c++):(r=e,f===0&&m(z)),r===e&&(i.charCodeAt(c)===123?(r=Te,c++):(r=e,f===0&&m(ir)),r===e&&(i.charCodeAt(c)===125?(r=sr,c++):(r=e,f===0&&m(or)),r===e&&(i.charCodeAt(c)===91?(r=es,c++):(r=e,f===0&&m(ts)),r===e&&(i.charCodeAt(c)===93?(r=rs,c++):(r=e,f===0&&m(is)),r===e&&(i.charCodeAt(c)===94?(r=Gi,c++):(r=e,f===0&&m(Ji)),r===e&&(i.charCodeAt(c)===34?(r=Ke,c++):(r=e,f===0&&m(Ze)),r===e&&(i.charCodeAt(c)===126?(r=lr,c++):(r=e,f===0&&m(pr)),r===e&&(i.charCodeAt(c)===42?(r=yt,c++):(r=e,f===0&&m($t)),r===e&&(i.charCodeAt(c)===63?(r=Yi,c++):(r=e,f===0&&m(Ki)),r===e&&(i.charCodeAt(c)===58?(r=Y,c++):(r=e,f===0&&m(U)),r===e&&(i.charCodeAt(c)===92?(r=Xe,c++):(r=e,f===0&&m(Ge)),r===e&&(i.charCodeAt(c)===47?(r=ar,c++):(r=e,f===0&&m(cr))))))))))))))))))))),r}function _s(){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)===ss?(l=ss,c+=2):(l=e,f===0&&m(ac)),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 Pc(){var r;return i.charCodeAt(c)===91?(r=es,c++):(r=e,f===0&&m(ts)),r===e&&(i.charCodeAt(c)===123?(r=Te,c++):(r=e,f===0&&m(ir))),r}function Tc(){var r;return i.charCodeAt(c)===93?(r=rs,c++):(r=e,f===0&&m(is)),r===e&&(i.charCodeAt(c)===125?(r=sr,c++):(r=e,f===0&&m(or))),r}const{errorOnLuceneSyntax:Oc,parseCursor:Dc,cursorSymbol:Lc,allowLeadingWildcards:Nc=!0,helpers:{nodeTypes:me}}=n,Z=me.function.buildNodeWithArgumentNodes,ce=me.literal.buildNode,Bc=me.wildcard.buildNode,jc=me.namedArg.buildNode,{wildcardSymbol:Ss}=me.wildcard;if(_t=h(),_t!==e&&c===i.length)return _t;throw _t!==e&&c<i.length&&m({type:"end",description:"end of input"}),ns(null,ur,K<i.length?i.charAt(K):null,K<i.length?St(K,K+1):St(K,K))}return{SyntaxError:t,parse:s}}(),Yt=(o,t={},s=ft)=>{if(typeof o>"u")throw new Error("expression must be a string, got undefined instead");return s(o,{...t,helpers:{nodeTypes:J}})},xe=(o,t={})=>Yt(o,{...t,startRule:"Literal"},ft),gt=(o,t={})=>{try{return Yt(o,t,ft)}catch(s){throw s.name==="SyntaxError"?new Xr(s,o):s}},$o=o=>{try{return Yt(o,{errorOnLuceneSyntax:!0},ft),!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 wo(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _o(o){return o.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function So(o){return o.includes(G)?{type:"wildcard",value:o}:xe(o)}function Gr(o,t){const{value:s}=o,i=s.split(G).map(wo).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(t)}function Ao(o){const{value:t}=o;return t.split(G).join("*")}function Kt(o){const{value:t}=o;return t.split(G).map(_o).join("*")}function xo(o){const{value:t}=o;return t.startsWith(G)&&t.replace(G,"").length>0}const Eo=Object.freeze(Object.defineProperty({__proto__:null,buildNode:So,hasLeadingWildcard:xo,test:Gr,toOpenSearchQuery:Ao,toQueryStringQuery:Kt,wildcardSymbol:G},Symbol.toStringTag,{value:"Module"}));function Zt(o,t){if(!t)return[];if(o.type==="literal"){const s=Vt(o),i=t.fields.find(n=>n.name===s);return i?[i]:[]}else if(o.type==="wildcard")return t.fields.filter(i=>Gr(o,i.name))}function Mc(o){return o}function Jr(o,t,s){const i={...o,value:s?`${s}.${o.value}`:o.value};if(!t||i.type==="wildcard"&&!s)return i;const e=Zt(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
|
|
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`
|
|
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
|
|
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`
|
|
775
775
|
<dialog class=${this.hideBackdrop?"":"backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
|
|
776
776
|
<spectric-panel>
|
|
777
777
|
<div class="modal">
|
|
@@ -787,17 +787,17 @@ spectric-button{
|
|
|
787
787
|
</div>
|
|
788
788
|
</spectric-panel>
|
|
789
789
|
</dialog>
|
|
790
|
-
`}},d.DialogElement.styles
|
|
790
|
+
`}},d.DialogElement.styles=An,oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"open",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"dismissable",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"hideBackdrop",2),oe([v({type:String,reflect:!0})],d.DialogElement.prototype,"title",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnEscape",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnOutsideClick",2),oe([at("dialog")],d.DialogElement.prototype,"dialogElement",2),d.DialogElement=oe([D(tr)],d.DialogElement);var Cn=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,V=(o,t,s,i)=>{for(var n=i>1?void 0:i?kn(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&&Cn(t,s,n),n},si=(o=>(o.MONGO="toMongo",o.CQL="toCql",o.DSL="toDSL",o.AST="AST",o))(si||{});const oi={eq:{value:" : ",label:" equals some value"},gt:{value:" > ",label:" is greater than some value"},lt:{value:" < ",label:" is less than some value"},gte:{value:" >= ",label:" is greater than or equal to some value"},lte:{value:" <= ",label:" is less than or equal to some value"}},Pn={eq:{value:": ",label:" equals some value"},exists:{value:": *",label:" exists in any form"}},Tn=[{value:": true",label:" value is true"},{value:": false",label:"value is false"}],On=Object.fromEntries(Object.entries(oi).map(([o,t])=>[o,{value:t.value,label:(t.label||"").replace("value","date-time")}]));d.SpectricQuery=class extends O{constructor(){super(),this.placeholder="",this._value="",this.value="",this.outputLanguage="AST",this.completions=[],this.completionIndex=0,this.fields=[],this._parseQuery=(t=void 0)=>{let s;if(t&&(t!=null&&t.currentTarget)&&(this.value=t.currentTarget.value),this.value)try{t&&t.data=="("&&(this.value=this.value+" )",this._input.setSelectionRange(this.value.length-2,this.value.length-2));let e=this.value;this._input.selectionStart!==null&&(e=e.substring(0,this._input.selectionStart)+"@kuery-cursor@"+e.substring(this._input.selectionStart));let p=bt(e,{parseCursor:!0,cursorSymbol:"@kuery-cursor@",allowLeadingWildcards:!1});this.autoComplete(p)}catch{return}try{s=bt(this.value,{allowLeadingWildcards:!1})}catch{return}let i;this.outputLanguage=="AST"?i=s:i=Sn[this.outputLanguage](s,this.fields);let n=new CustomEvent("change",{detail:i});this.dispatchEvent(n)},this.getValuesForField=async(t,s)=>(console.log("getValuesForField isn't set no values returned",t,s),[]),this._selectCompletion=async()=>{if(!this.suggestion)return;let t=this.completions[this.completionIndex],s=this.value.substring(0,t.start)+t.value,i=s.length,n=this.value.substring(t.end);if(t.value.includes(n)?this.value=s:this.value=s+this.value.substring(t.end),this._input.value=this.value,this._input.setSelectionRange(i,i),t.onSelect){let e=await t.onSelect();e!==void 0&&(this.value+=e,setTimeout(()=>{this._input.focus()}))}this.completionIndex=0,this.completions=[],this._parseQuery(),this._input.focus()},this._handleArrows=t=>{var s;t.key==="Escape"&&(this.completions=[]),(t.key=="ArrowLeft"||t.key==="ArrowRight")&&setTimeout(this._parseQuery,100),this.completions.length&&["ArrowUp","ArrowDown","Enter","Tab"].includes(t.key)&&this.suggestion&&(t.preventDefault(),(t.key==="ArrowDown"||t.key==="Tab")&&(this.completionIndex+=1,this.completionIndex>this.completions.length-1&&(this.completionIndex=0)),t.key==="ArrowUp"&&(this.completionIndex-=1,this.completionIndex<0&&(this.completionIndex=this.completions.length-1)),(s=this._asyncAutocomplete)==null||s.then(i=>{let n=i.querySelector(".option.active");n&&n.scrollIntoView({block:"nearest"})}),t.key==="Enter"&&this._selectCompletion())},this.uuid=crypto.randomUUID()}createRenderRoot(){return this}async autoComplete(t){if(this.completions=[],t.type!=="cursor")return;let s=[];this.suggestion=t;let{start:i,end:n}=t;for(let e of t.suggestionTypes){if(e=="conjunction"&&t.text.endsWith(" ")&&s.push(...["and ","or "].map(p=>({type:e,value:p,start:n,end:n}))),e==="field"){let p=this.fields.filter(h=>h.name.includes(t.fieldName)||h.name.includes(t.prefix)).map(h=>[{type:e,value:h.name,start:i,end:n}]).flat();s.push(...p)}if(e==="operator"){let p=this.fields.find(h=>h.name===t.fieldName);p&&(p.type==="number"?s.push(...Object.values(oi).map(h=>({type:e,...h,start:n,end:n}))):p.type==="string"?p.format==="date-time"?s.push(...Object.values(On).map(h=>({type:e,...h,start:n,end:n,onSelect:async()=>{let g=await this.getValuesForField(t.fieldName,t.prefix);g.length===0&&(g=["now-1m","now-1d","now-1M"]);let $,C=lt();return await new Promise(y=>{let E=d.DialogElement.display({},A`
|
|
791
791
|
<div class="query-bar-date-quick-select">
|
|
792
|
-
${g.map(x=>A`<a href="#" @click=${
|
|
792
|
+
${g.map(x=>A`<a href="#" @click=${k=>{k.preventDefault(),$=`"${x}"`,y($),E.open=!1}}>${x}</a>`)}
|
|
793
793
|
</div>
|
|
794
|
-
<spectric-input variant="datetime-local" @change=${x=>{if(!x.target)return;$=`"${new Date(x.target.value+":00.000Z").toISOString()}"`,
|
|
795
|
-
<spectric-button ${
|
|
796
|
-
`)}),$}}))):s.push(...Object.values(
|
|
794
|
+
<spectric-input variant="datetime-local" @change=${x=>{if(!x.target)return;$=`"${new Date(x.target.value+":00.000Z").toISOString()}"`,C.value.disabled=$===void 0}}></spectric-input>
|
|
795
|
+
<spectric-button ${pt(C)} .disabled=${!0} @click=${()=>{y($),E.open=!1}}>Submit</spectric-button>
|
|
796
|
+
`)}),$}}))):s.push(...Object.values(Pn).map(h=>({type:e,...h,start:n,end:n}))):p.type==="boolean"&&s.push(...Tn.map(h=>({type:e,...h,start:n,end:n}))))}if(e==="value"){let p=this.fields.find(h=>h.name===t.fieldName);if(p&&p.type=="boolean")s.push({type:e,value:"true",start:i,end:n},{type:e,value:"false",start:i,end:n});else{console.log(`invoke callback to get values for ${t.fieldName}`);let h=await this.getValuesForField(t.fieldName,t.prefix);(p==null?void 0:p.type)==="string"&&(h=h.map(g=>`"${g}"`)),s.push(...h.map(g=>({type:e,value:g,start:i,end:n})))}}}if(this.completions=s,this.completions.length&&this._autocomplete){let{width:e,left:p,bottom:h}=this._input.getBoundingClientRect();this._autocomplete.showPopover(),"anchorName"in document.documentElement.style||(this._autocomplete.style.left=`${p+3.75}px`,this._autocomplete.style.top=`${h}px`),this._autocomplete.style.width=`${e-15}px`}}updated(t){t.has("outputLanguage")&&this._parseQuery()}render(){return A`
|
|
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([
|
|
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`
|
|
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);
|
|
@@ -805,7 +805,7 @@ spectric-button{
|
|
|
805
805
|
--spectric-text-primary:var(--text-primary);
|
|
806
806
|
--spectric-text-secondary:var(--text-secondary);
|
|
807
807
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
|
|
808
|
-
`,
|
|
808
|
+
`,ai=F`
|
|
809
809
|
border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
|
|
810
810
|
background-color: var(--panel-color-inverse,#0b0b0b);
|
|
811
811
|
color:var(--text-primary,#3c4c5b);
|
|
@@ -813,7 +813,7 @@ spectric-button{
|
|
|
813
813
|
--spectric-text-primary:var(--text-secondary);
|
|
814
814
|
--spectric-text-secondary:var(--text-primary);
|
|
815
815
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
|
|
816
|
-
`,
|
|
816
|
+
`,Dn=F`
|
|
817
817
|
:host{
|
|
818
818
|
display:block;
|
|
819
819
|
border:2px solid black;
|
|
@@ -823,20 +823,20 @@ spectric-button{
|
|
|
823
823
|
|
|
824
824
|
}
|
|
825
825
|
:host(spectric-panel[level='0']) {
|
|
826
|
-
${
|
|
826
|
+
${ni};
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
:host(spectric-panel[level='1']) {
|
|
830
|
-
${
|
|
830
|
+
${ai};
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
:host(spectric-panel[level='2']) {
|
|
834
|
-
${
|
|
834
|
+
${ni};
|
|
835
835
|
}
|
|
836
836
|
:host(spectric-panel[level='3']) {
|
|
837
|
-
${
|
|
837
|
+
${ai};
|
|
838
838
|
}
|
|
839
|
-
`;var
|
|
839
|
+
`;var Ln=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,rr=(o,t,s,i)=>{for(var n=i>1?void 0:i?Nn(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&&Ln(t,s,n),n};d.SpectricPanel=class extends O{constructor(){super(...arguments),this.level=0}updated(){this.layers||(this.layers=this.querySelectorAll("spectric-panel")),this.layers.forEach(t=>{t.setAttribute("level",((this.level+1)%4).toString())}),this.dispatchEvent(new CustomEvent("use-layer",{bubbles:!0,cancelable:!0,composed:!0,detail:{layer:this,level:this.level}}))}render(){return A` <slot></slot> `}},d.SpectricPanel.styles=Dn,rr([v({type:Number,reflect:!0})],d.SpectricPanel.prototype,"level",2),rr([v({attribute:!1})],d.SpectricPanel.prototype,"layers",2),d.SpectricPanel=rr([D("spectric-panel")],d.SpectricPanel);var Bn=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,ci=(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&&Bn(t,s,n),n};const zn={"--primary":{control:"color"},"--secondary":{control:"color"},"--tertiary":{control:"color"},"--disabled":{control:"color"},"--background":{control:"color"},"--background-inverse":{control:"color"},"--text-primary":{control:"color"},"--text-secondary":{control:"color"},"--text-on-color":{control:"color"},"--border-radius":{control:"text"}},li={"--secondary":"#77878b","--tertiary":"#c7c7c7","--disabled":"#000000","--text-primary":"#cccccc","--text-secondary":"#cccccc","--text-on-color":"#ededed","--background":"#181818","--background-inverse":"#37373d"},pi={...li,"--primary":"#ffd45a","--text-on-color":"#4f4f4f"},ir={undefined:{},light:{},dark:li,spectric:pi,spectricFlat:{...pi,"--border-radius":"1px"}},Rn=Object.fromEntries(Object.keys(ir).map(o=>[o,o])),Mn=`
|
|
840
840
|
--spectric-background: var(--background,#ffffff);
|
|
841
841
|
--spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
|
|
842
842
|
--spectric-background-inverse: var(--background-inverse,#f4f4f4);
|
|
@@ -879,12 +879,12 @@ spectric-button{
|
|
|
879
879
|
--spectric-text-on-color-disabled: var(--disabled,#c6c6c6)
|
|
880
880
|
--spectric-button-disabled: #c6c6c6;
|
|
881
881
|
color: var(--spectric-text-primary);
|
|
882
|
-
`;d.SpectricThemeProvider=class extends O{constructor(){super(...arguments),this.theme="undefined"}updated(t){if(t.has("theme")&&this.theme!=t.get("theme")){const s={old:t.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:s,bubbles:!0,composed:!0}))}}render(){let t=Object.keys(
|
|
882
|
+
`;d.SpectricThemeProvider=class extends O{constructor(){super(...arguments),this.theme="undefined"}updated(t){if(t.has("theme")&&this.theme!=t.get("theme")){const s={old:t.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:s,bubbles:!0,composed:!0}))}}render(){let t=Object.keys(ir).includes(this.theme)?this.theme:"undefined",s=Object.entries(ir[t]).map(i=>`${i[0]}:${i[1]};`).join(`
|
|
883
883
|
`);return A`
|
|
884
884
|
${this.theme&&this.theme!=="light"?A`
|
|
885
885
|
<style>:host{
|
|
886
886
|
${s};
|
|
887
|
-
${
|
|
887
|
+
${Mn}
|
|
888
888
|
}
|
|
889
889
|
/* Webkit psudo elements don't pick up variables defined by the host */
|
|
890
890
|
::-webkit-scrollbar-thumb {
|
|
@@ -957,7 +957,7 @@ spectric-button{
|
|
|
957
957
|
<slot></slot>
|
|
958
958
|
`}},d.SpectricThemeProvider.styles=F`:host{
|
|
959
959
|
display:contents;
|
|
960
|
-
}`,
|
|
960
|
+
}`,ci([v({reflect:!0})],d.SpectricThemeProvider.prototype,"theme",2),d.SpectricThemeProvider=ci([D("spectric-theme")],d.SpectricThemeProvider);const In=F`
|
|
961
961
|
:host {
|
|
962
962
|
display: block;
|
|
963
963
|
height: 100%;
|
|
@@ -1020,7 +1020,7 @@ spectric-button{
|
|
|
1020
1020
|
width: 5px;
|
|
1021
1021
|
cursor: ew-resize;
|
|
1022
1022
|
}
|
|
1023
|
-
`;var
|
|
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`
|
|
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=
|
|
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`
|
|
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-->
|
|
@@ -1053,7 +1053,7 @@ spectric-button{
|
|
|
1053
1053
|
</div>
|
|
1054
1054
|
`:null}
|
|
1055
1055
|
</div>
|
|
1056
|
-
`}}
|
|
1056
|
+
`}},$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"page",2),$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"pageSize",2),$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"totalItems",2),$e([v({type:Array})],d.PaginationElement.prototype,"pageSizeOptions",2),$e([fe("select")],d.PaginationElement.prototype,"select",2),$e([v({type:String,reflect:!0})],d.PaginationElement.prototype,"size",2),d.PaginationElement=$e([D(hi)],d.PaginationElement);var qn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,fi=(o,t,s,i)=>{for(var n=i>1?void 0:i?Wn(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&&qn(t,s,n),n};const Vn="spectric-table-header";let sr=class extends O{constructor(){super(...arguments),this.columns=[],this._handleSortChange=o=>{o=JSON.parse(JSON.stringify(o)),o.sortable&&(o.sortDirection===R.none||o.sortDirection===void 0?o.sortDirection=R.ascending:o.sortDirection===R.ascending?o.sortDirection=R.descending:o.sortDirection===R.descending&&(o.sortDirection=R.none),this.dispatchEvent(new CustomEvent("sortChange",{composed:!0,bubbles:!0,detail:o})))}}createRenderRoot(){return this}render(){return A`
|
|
1057
1057
|
<tr>
|
|
1058
1058
|
${this.columns.map(o=>{let t=["header-contents"];o.filterable,o.sortable&&t.push("sortable");let s=o.width?`width:${o.width}px;`:"",i=o.sortDirection===R.ascending?"🠉":o.sortDirection==R.descending?"🠋":"",n=o.sortDirection||R.none;return A`
|
|
1059
1059
|
<td @click=${()=>this._handleSortChange(o)} style="${s}">
|
|
@@ -1062,26 +1062,30 @@ spectric-button{
|
|
|
1062
1062
|
</div>
|
|
1063
1063
|
</td>`})}
|
|
1064
1064
|
</tr>
|
|
1065
|
-
`}};
|
|
1065
|
+
`}};fi([v({type:Array,attribute:!1})],sr.prototype,"columns",2),sr=fi([D(Vn)],sr);/**
|
|
1066
|
+
* @license
|
|
1067
|
+
* Copyright 2017 Google LLC
|
|
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">
|
|
1066
1070
|
<spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon tooltip="Filter Out Value">-</spectric-button>
|
|
1067
|
-
<spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon tooltip="Filter For Value">+</spectric-button></div
|
|
1068
|
-
<td>
|
|
1069
|
-
${
|
|
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)}>
|
|
1073
|
+
${s}
|
|
1070
1074
|
<div class=${t.join(" ")}>${o}</div>
|
|
1071
1075
|
</td>
|
|
1072
|
-
`}};
|
|
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 i==null||s.length>1&&(i=Pe(i,s.slice(1).join("."))),i};/**
|
|
1073
1077
|
* @license
|
|
1074
1078
|
* Copyright 2017 Google LLC
|
|
1075
1079
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1076
|
-
*/const
|
|
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`
|
|
1077
1081
|
<body>
|
|
1078
|
-
${
|
|
1082
|
+
${vt(this.data,(o,t)=>A`
|
|
1079
1083
|
<tr class="${t%2===0?"odd":""}">
|
|
1080
|
-
${
|
|
1084
|
+
${vt(this.columns,s=>A`<spectric-table-cell .column=${s} .index=${t} .row=${o} .columns=${this.columns}></spectric-table-cell>`)}
|
|
1081
1085
|
</tr>`)}
|
|
1082
1086
|
|
|
1083
1087
|
</body>
|
|
1084
|
-
`}};
|
|
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`
|
|
1085
1089
|
<tr style="height:${$}px" class="virtual-scroll-spacer">
|
|
1086
1090
|
<td colspan="${this.columns.length}"></td></tr>`:null,x=A`
|
|
1087
1091
|
<tr style="height:${y}px" class="virtual-scroll-spacer">
|
|
@@ -1090,30 +1094,30 @@ spectric-button{
|
|
|
1090
1094
|
<tbody>
|
|
1091
1095
|
${E}
|
|
1092
1096
|
</tbody>
|
|
1093
|
-
<div style="display:table-row-group;max-height:${
|
|
1097
|
+
<div style="display:table-row-group;max-height:${C}px; overflow:hidden;">
|
|
1094
1098
|
|
|
1095
|
-
${
|
|
1099
|
+
${vt(this.data.slice(Math.max(n,0),p),(k,N)=>A`
|
|
1096
1100
|
<tr class="${(N+n)%2===0?"odd":""}">
|
|
1097
|
-
${
|
|
1101
|
+
${vt(this.columns,z=>A`<spectric-table-cell .column=${z} .row=${k} .index=${N+n} .columns=${this.columns}></spectric-table-cell>`)}
|
|
1098
1102
|
</tr>`)}
|
|
1099
1103
|
</div>
|
|
1100
1104
|
<tbody>
|
|
1101
1105
|
${y>0?x:null}
|
|
1102
1106
|
</tbody>
|
|
1103
1107
|
|
|
1104
|
-
`}};
|
|
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`
|
|
1105
1109
|
<div class="table-wrapper" style="--rowHeight:${this.rowHeight-4}px">
|
|
1106
1110
|
<div role="table">
|
|
1107
1111
|
<spectric-table-header .columns=${t} @sortChange=${this._handleSortChange}></spectric-table-header>
|
|
1108
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>`}
|
|
1109
1113
|
</div>
|
|
1110
1114
|
</div>
|
|
1111
|
-
${this.pagination?A`<spectric-pagination ${
|
|
1112
|
-
`}},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([
|
|
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">
|
|
1113
1117
|
<span class="tooltip-caret"></span>
|
|
1114
1118
|
<div class="tooltip-content">${this.text}</div>
|
|
1115
|
-
</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;
|
|
1116
1120
|
max-width: 0px;
|
|
1117
1121
|
display: none;
|
|
1118
|
-
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(
|
|
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"})});
|
|
1119
1123
|
//# sourceMappingURL=index.umd.js.map
|