@umbraco-ui/uui 1.6.0-rc.1 → 1.6.0-rc.3
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/custom-elements.json +189 -14
- package/dist/uui.min.js +80 -71
- package/dist/uui.min.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +84 -83
- package/vscode-html-custom-data.json +87 -7
package/dist/uui.min.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(n
|
|
1
|
+
(function(n,Ee){typeof exports=="object"&&typeof module<"u"?Ee(exports):typeof define=="function"&&define.amd?define(["exports"],Ee):(n=typeof globalThis<"u"?globalThis:n||self,Ee(n.uui={}))})(this,function(n){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const Ee=window,Wi=Ee.ShadowRoot&&(Ee.ShadyCSS===void 0||Ee.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ki=Symbol(),Ir=new WeakMap;let Cr=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Ki)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Wi&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Ir.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ir.set(t,e))}return e}toString(){return this.cssText}};const Z=i=>new Cr(typeof i=="string"?i:i+"",void 0,Ki),p=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((r,o,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[a+1],i[0]);return new Cr(t,i,Ki)},Ul=(i,e)=>{Wi?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const r=document.createElement("style"),o=Ee.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,i.appendChild(r)})},Sr=Wi?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return Z(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Xi;const Xt=window,Pr=Xt.trustedTypes,El=Pr?Pr.emptyScript:"",Or=Xt.reactiveElementPolyfillSupport,Yi={toAttribute(i,e){switch(e){case Boolean:i=i?El:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},zr=(i,e)=>e!==i&&(e==e||i==i),Zi={attribute:!0,type:String,converter:Yi,reflect:!1,hasChanged:zr},Qi="finalized";let Ze=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const o=this._$Ep(r,t);o!==void 0&&(this._$Ev.set(o,r),e.push(o))}),e}static createProperty(e,t=Zi){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,r,t);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(o){const a=this[e];this[t]=o,this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Zi}static finalize(){if(this.hasOwnProperty(Qi))return!1;this[Qi]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of r)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)t.unshift(Sr(o))}else e!==void 0&&t.push(Sr(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Ul(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=Zi){var o;const a=this.constructor._$Ep(e,r);if(a!==void 0&&r.reflect===!0){const s=(((o=r.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?r.converter:Yi).toAttribute(t,r.type);this._$El=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$El=null}}_$AK(e,t){var r;const o=this.constructor,a=o._$Ev.get(e);if(a!==void 0&&this._$El!==a){const s=o.getPropertyOptions(a),c=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?s.converter:Yi;this._$El=a,this[a]=c.fromAttribute(t,s.type),this._$El=null}}requestUpdate(e,t,r){let o=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||zr)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,a)=>this[a]=o),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(o=>{var a;return(a=o.hostUpdate)===null||a===void 0?void 0:a.call(o)}),this.update(r)):this._$Ek()}catch(o){throw t=!1,this._$Ek(),o}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdated)===null||o===void 0?void 0:o.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,r)=>this._$EO(r,this[r],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Ze[Qi]=!0,Ze.elementProperties=new Map,Ze.elementStyles=[],Ze.shadowRootOptions={mode:"open"},Or?.({ReactiveElement:Ze}),((Xi=Xt.reactiveElementVersions)!==null&&Xi!==void 0?Xi:Xt.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var Ji;const Yt=window,Qe=Yt.trustedTypes,Ar=Qe?Qe.createPolicy("lit-html",{createHTML:i=>i}):void 0,Zt="$lit$",pe=`lit$${(Math.random()+"").slice(9)}$`,eo="?"+pe,kl=`<${eo}>`,Oe=document,It=()=>Oe.createComment(""),Ct=i=>i===null||typeof i!="object"&&typeof i!="function",jr=Array.isArray,Lr=i=>jr(i)||typeof i?.[Symbol.iterator]=="function",to=`[
|
|
14
|
+
\f\r]`,St=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tr=/-->/g,Nr=/>/g,ze=RegExp(`>|${to}(?:([^\\s"'>=/]+)(${to}*=${to}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mr=/'/g,Dr=/"/g,Br=/^(?:script|style|textarea|title)$/i,Vr=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),u=Vr(1),w=Vr(2),V=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),Hr=new WeakMap,Ae=Oe.createTreeWalker(Oe,129,null,!1);function Rr(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ar!==void 0?Ar.createHTML(e):e}const Fr=(i,e)=>{const t=i.length-1,r=[];let o,a=e===2?"<svg>":"",s=St;for(let c=0;c<t;c++){const h=i[c];let d,v,f=-1,y=0;for(;y<h.length&&(s.lastIndex=y,v=s.exec(h),v!==null);)y=s.lastIndex,s===St?v[1]==="!--"?s=Tr:v[1]!==void 0?s=Nr:v[2]!==void 0?(Br.test(v[2])&&(o=RegExp("</"+v[2],"g")),s=ze):v[3]!==void 0&&(s=ze):s===ze?v[0]===">"?(s=o??St,f=-1):v[1]===void 0?f=-2:(f=s.lastIndex-v[2].length,d=v[1],s=v[3]===void 0?ze:v[3]==='"'?Dr:Mr):s===Dr||s===Mr?s=ze:s===Tr||s===Nr?s=St:(s=ze,o=void 0);const $=s===ze&&i[c+1].startsWith("/>")?" ":"";a+=s===St?h+kl:f>=0?(r.push(d),h.slice(0,f)+Zt+h.slice(f)+pe+$):h+pe+(f===-2?(r.push(void 0),c):$)}return[Rr(i,a+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let io=class _l{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let a=0,s=0;const c=e.length-1,h=this.parts,[d,v]=Fr(e,t);if(this.el=_l.createElement(d,r),Ae.currentNode=this.el.content,t===2){const f=this.el.content,y=f.firstChild;y.remove(),f.append(...y.childNodes)}for(;(o=Ae.nextNode())!==null&&h.length<c;){if(o.nodeType===1){if(o.hasAttributes()){const f=[];for(const y of o.getAttributeNames())if(y.endsWith(Zt)||y.startsWith(pe)){const $=v[s++];if(f.push(y),$!==void 0){const E=o.getAttribute($.toLowerCase()+Zt).split(pe),x=/([.?@])?(.*)/.exec($);h.push({type:1,index:a,name:x[2],strings:E,ctor:x[1]==="."?qr:x[1]==="?"?Wr:x[1]==="@"?Kr:Pt})}else h.push({type:6,index:a})}for(const y of f)o.removeAttribute(y)}if(Br.test(o.tagName)){const f=o.textContent.split(pe),y=f.length-1;if(y>0){o.textContent=Qe?Qe.emptyScript:"";for(let $=0;$<y;$++)o.append(f[$],It()),Ae.nextNode(),h.push({type:2,index:++a});o.append(f[y],It())}}}else if(o.nodeType===8)if(o.data===eo)h.push({type:2,index:a});else{let f=-1;for(;(f=o.data.indexOf(pe,f+1))!==-1;)h.push({type:7,index:a}),f+=pe.length-1}a++}}static createElement(e,t){const r=Oe.createElement("template");return r.innerHTML=e,r}};function je(i,e,t=i,r){var o,a,s,c;if(e===V)return e;let h=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=Ct(e)?void 0:e._$litDirective$;return h?.constructor!==d&&((a=h?._$AO)===null||a===void 0||a.call(h,!1),d===void 0?h=void 0:(h=new d(i),h._$AT(i,t,r)),r!==void 0?((s=(c=t)._$Co)!==null&&s!==void 0?s:c._$Co=[])[r]=h:t._$Cl=h),h!==void 0&&(e=je(i,h._$AS(i,e.values),h,r)),e}let Gr=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:o}=this._$AD,a=((t=e?.creationScope)!==null&&t!==void 0?t:Oe).importNode(r,!0);Ae.currentNode=a;let s=Ae.nextNode(),c=0,h=0,d=o[0];for(;d!==void 0;){if(c===d.index){let v;d.type===2?v=new Qt(s,s.nextSibling,this,e):d.type===1?v=new d.ctor(s,d.name,d.strings,this,e):d.type===6&&(v=new Xr(s,this,e)),this._$AV.push(v),d=o[++h]}c!==d?.index&&(s=Ae.nextNode(),c++)}return Ae.currentNode=Oe,a}v(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Qt=class $l{constructor(e,t,r,o){var a;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(a=o?.isConnected)===null||a===void 0||a}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=je(this,e,t),Ct(e)?e===U||e==null||e===""?(this._$AH!==U&&this._$AR(),this._$AH=U):e!==this._$AH&&e!==V&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Lr(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==U&&Ct(this._$AH)?this._$AA.nextSibling.data=e:this.$(Oe.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,a=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=io.createElement(Rr(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===a)this._$AH.v(r);else{const s=new Gr(a,this),c=s.u(this.options);s.v(r),this.$(c),this._$AH=s}}_$AC(e){let t=Hr.get(e.strings);return t===void 0&&Hr.set(e.strings,t=new io(e)),t}T(e){jr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const a of e)o===t.length?t.push(r=new $l(this.k(It()),this.k(It()),this,this.options)):r=t[o],r._$AI(a),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},Pt=class{constructor(e,t,r,o,a){this.type=1,this._$AH=U,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,o){const a=this.strings;let s=!1;if(a===void 0)e=je(this,e,t,0),s=!Ct(e)||e!==this._$AH&&e!==V,s&&(this._$AH=e);else{const c=e;let h,d;for(e=a[0],h=0;h<a.length-1;h++)d=je(this,c[r+h],t,h),d===V&&(d=this._$AH[h]),s||(s=!Ct(d)||d!==this._$AH[h]),d===U?e=U:e!==U&&(e+=(d??"")+a[h+1]),this._$AH[h]=d}s&&!o&&this.j(e)}j(e){e===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},qr=class extends Pt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===U?void 0:e}};const xl=Qe?Qe.emptyScript:"";let Wr=class extends Pt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==U?this.element.setAttribute(this.name,xl):this.element.removeAttribute(this.name)}},Kr=class extends Pt{constructor(e,t,r,o,a){super(e,t,r,o,a),this.type=5}_$AI(e,t=this){var r;if((e=(r=je(this,e,t,0))!==null&&r!==void 0?r:U)===V)return;const o=this._$AH,a=e===U&&o!==U||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,s=e!==U&&(o===U||a);a&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},Xr=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){je(this,e)}};const Il={O:Zt,P:pe,A:eo,C:1,M:Fr,L:Gr,R:Lr,D:je,I:Qt,V:Pt,H:Wr,N:Kr,U:qr,F:Xr},Yr=Yt.litHtmlPolyfillSupport;Yr?.(io,Qt),((Ji=Yt.litHtmlVersions)!==null&&Ji!==void 0?Ji:Yt.litHtmlVersions=[]).push("2.8.0");const Cl=(i,e,t)=>{var r,o;const a=(r=t?.renderBefore)!==null&&r!==void 0?r:e;let s=a._$litPart$;if(s===void 0){const c=(o=t?.renderBefore)!==null&&o!==void 0?o:null;a._$litPart$=s=new Qt(e.insertBefore(It(),c),c,void 0,t??{})}return s._$AI(i),s};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
19
|
+
*/var oo,ro;let m=class extends Ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Cl(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return V}};m.finalized=!0,m._$litElement$=!0,(oo=globalThis.litElementHydrateSupport)===null||oo===void 0||oo.call(globalThis,{LitElement:m});const Zr=globalThis.litElementPolyfillSupport;Zr?.({LitElement:m}),((ro=globalThis.litElementVersions)!==null&&ro!==void 0?ro:globalThis.litElementVersions=[]).push("3.3.3");var Sl=`.uui-text {
|
|
20
20
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
21
21
|
font-size: 15px;
|
|
22
22
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -184,35 +184,31 @@
|
|
|
184
184
|
margin-top: var(--uui-size-layout-1,24px);
|
|
185
185
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
186
186
|
}
|
|
187
|
-
`;const
|
|
187
|
+
`;const Pl=Z(Sl);/**
|
|
188
188
|
* @license
|
|
189
189
|
* Copyright 2017 Google LLC
|
|
190
190
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
191
|
-
*/const
|
|
191
|
+
*/const Ol=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},zl=(i,e,t)=>{e.constructor.createProperty(t,i)};function l(i){return(e,t)=>t!==void 0?zl(i,e,t):Ol(i,e)}/**
|
|
192
192
|
* @license
|
|
193
193
|
* Copyright 2017 Google LLC
|
|
194
194
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
195
|
-
*/
|
|
195
|
+
*/function g(i){return l({...i,state:!0})}/**
|
|
196
196
|
* @license
|
|
197
197
|
* Copyright 2017 Google LLC
|
|
198
198
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
199
|
-
*/
|
|
199
|
+
*/const no=({finisher:i,descriptor:e})=>(t,r)=>{var o;if(r===void 0){const a=(o=t.originalKey)!==null&&o!==void 0?o:t.key,s=e!=null?{kind:"method",placement:"prototype",key:a,descriptor:e(t.key)}:{...t,key:a};return i!=null&&(s.finisher=function(c){i(c,a)}),s}{const a=t.constructor;e!==void 0&&Object.defineProperty(t,r,e(r)),i?.(a,r)}};/**
|
|
200
200
|
* @license
|
|
201
201
|
* Copyright 2017 Google LLC
|
|
202
202
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
203
|
-
*/
|
|
203
|
+
*/function C(i,e){return no({descriptor:t=>{const r={get(){var o,a;return(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(i))!==null&&a!==void 0?a:null},enumerable:!0,configurable:!0};if(e){const o=typeof t=="symbol"?Symbol():"__"+t;r.get=function(){var a,s;return this[o]===void 0&&(this[o]=(s=(a=this.renderRoot)===null||a===void 0?void 0:a.querySelector(i))!==null&&s!==void 0?s:null),this[o]}}return r}})}/**
|
|
204
204
|
* @license
|
|
205
205
|
* Copyright 2017 Google LLC
|
|
206
206
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
207
|
-
*/function
|
|
208
|
-
* @license
|
|
209
|
-
* Copyright 2017 Google LLC
|
|
210
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
211
|
-
*/function il(i){return Gi({descriptor:e=>({get(){var t,r;return(r=(t=this.renderRoot)===null||t===void 0?void 0:t.querySelectorAll(i))!==null&&r!==void 0?r:[]},enumerable:!0,configurable:!0})})}/**
|
|
207
|
+
*/function Al(i){return no({descriptor:e=>({get(){var t,r;return(r=(t=this.renderRoot)===null||t===void 0?void 0:t.querySelectorAll(i))!==null&&r!==void 0?r:[]},enumerable:!0,configurable:!0})})}/**
|
|
212
208
|
* @license
|
|
213
209
|
* Copyright 2021 Google LLC
|
|
214
210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
215
|
-
*/var qi;const ol=((qi=window.HTMLSlotElement)===null||qi===void 0?void 0:qi.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);function Ue(i){const{slot:e,selector:t}=i??{};return Gi({descriptor:r=>({get(){var o;const a="slot"+(e?`[name=${e}]`:":not([name])"),s=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(a),h=s!=null?ol(s,i):[];return t?h.filter(c=>c.matches(t)):h},enumerable:!0,configurable:!0})})}const rl=p`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,nl=K("uui-blink 0.9s infinite both"),al=p`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`,sl=K("pulse 0.8s ease-in-out infinite both"),ll=p`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,ul=K("uui-horizontal-shake 600ms ease backwards");var cl=Object.defineProperty,kr=Object.getOwnPropertySymbols,hl=Object.prototype.hasOwnProperty,dl=Object.prototype.propertyIsEnumerable,xr=(i,e,t)=>e in i?cl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,pl=(i,e)=>{for(var t in e||(e={}))hl.call(e,t)&&xr(i,t,e[t]);if(kr)for(var t of kr(e))dl.call(e,t)&&xr(i,t,e[t]);return i};let Wi=class extends Event{constructor(e,t={}){super(e,pl({},t)),this.detail=t.detail||{}}};var bl=Object.defineProperty,Ir=Object.getOwnPropertySymbols,ml=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable,Cr=(i,e,t)=>e in i?bl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Pr=(i,e)=>{for(var t in e||(e={}))ml.call(e,t)&&Cr(i,t,e[t]);if(Ir)for(var t of Ir(e))vl.call(e,t)&&Cr(i,t,e[t]);return i};let ze=class extends Wi{constructor(e,t={}){super(e,Pr(Pr({},{bubbles:!0}),t))}};ze.VALID="valid",ze.INVALID="invalid";var gl=Object.defineProperty,Sr=Object.getOwnPropertySymbols,fl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,Or=(i,e,t)=>e in i?gl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,zr=(i,e)=>{for(var t in e||(e={}))fl.call(e,t)&&Or(i,t,e[t]);if(Sr)for(var t of Sr(e))yl.call(e,t)&&Or(i,t,e[t]);return i};let Ae=class extends Wi{constructor(e,t={}){super(e,zr(zr({},{bubbles:!0,cancelable:!0}),t))}};Ae.SELECTED="selected",Ae.DESELECTED="deselected";var _l=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,$l=(i,e,t,r)=>{for(var o=r>1?void 0:r?wl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_l(e,t,o),o};const Ul=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return $l([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var El=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Ar=(i,e,t,r)=>{for(var o=r>1?void 0:r?kl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&El(e,t,o),o};const xl=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return Ar([l({type:String})],t.prototype,"label",2),Ar([f()],t.prototype,"_labelSlotHasContent",2),t};var Il=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Lr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Il(e,t,o),o};const Pl=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new Ae(Ae.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new Ae(Ae.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Lr([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Lr([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Sl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,zl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ol(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Sl(e,t,o),o};const Al=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return zl([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var Ll=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,Le=(i,e,t,r)=>{for(var o=r>1?void 0:r?jl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ll(e,t,o),o};const Tl=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,a){const s={flagKey:r,getMessageMethod:o,checkMethod:a};return this._validators.push(s),s}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const a in o.validity)a!=="valid"&&o.validity[a]&&(this._validityState[a]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new ze(ze.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new ze(ze.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){var r;(r=this._form)==null||r.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var r;for(const o in this._formCtrlElements)if(this._formCtrlElements[o].checkValidity()===!1)return!1;return(r=this._internals)==null?void 0:r.checkValidity()}get validity(){return this._validityState}get validationMessage(){var r;return(r=this._internals)==null?void 0:r.validationMessage}}return e.formAssociated=!0,Le([l({type:String})],e.prototype,"name",2),Le([l()],e.prototype,"value",1),Le([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),Le([l({type:Boolean,reflect:!0})],e.prototype,"required",2),Le([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),Le([l({type:Boolean,reflect:!0})],e.prototype,"error",2),Le([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e};let Nl=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const Ml=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},Dl=(i,e)=>{function t(o){const a=i.getBoundingClientRect(),s=i.ownerDocument.defaultView,h=a.left+s.scrollX,c=a.top+s.scrollY;let d;o instanceof TouchEvent?d=o.touches[0]:d=o;const v=d.pageX-h,g=d.pageY-c;e!=null&&e.onMove&&e.onMove(v,g)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e!=null&&e.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e!=null&&e.initialEvent&&t(e.initialEvent)},Bl=(i,e,t)=>Math.min(Math.max(i,e),t),Vl=(i,e,t)=>t+e-i,Hl=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},jr=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,a=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(a)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var Rl=Object.defineProperty,Fl=Object.getOwnPropertyDescriptor,Gl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Rl(e,t,o),o},Tr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Nr=(i,e,t)=>(Tr(i,e,"read from private field"),t?t.call(i):e.get(i)),Mr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ql=(i,e,t,r)=>(Tr(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const Wl=i=>{var e,t;class r extends i{constructor(...a){super(...a),Mr(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const s=jr(this,"id",this.popoverContainerElement);s&&(Nr(this,e)?s.hidePopover():s.showPopover())},Mr(this,t,s=>{requestAnimationFrame(()=>{ql(this,e,s.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",Nr(this,t))}}return e=new WeakMap,t=new WeakMap,Gl([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};function Kl(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}const Xl=["default","primary","secondary","outline","placeholder"],Yl=["default","positive","warning","danger"],Zl=["h1","h2","h3","h4","h5","h6"];function b(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}var Ql=Object.defineProperty,Jl=Object.getOwnPropertyDescriptor,eu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jl(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ql(e,t,o),o};n.UUIButtonGroupElement=class extends m{render(){return u`<slot></slot>`}},n.UUIButtonGroupElement.styles=[p`:host{display:inline-flex;align-items:stretch}::slotted(*){--uui-button-border-radius:0;flex-grow:1}::slotted([look=outline]:not(:first-child)){--uui-button-merge-border-left:1}::slotted([look=placeholder]:not(:first-child)){--uui-button-merge-border-left:1}::slotted(:first-child){--uui-button-border-radius:var(--uui-border-radius,3px) 0 0 var(--uui-border-radius,3px)}::slotted(:last-child){--uui-button-border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0}::slotted(uui-popover){width:unset;--uui-popover-toggle-slot-button-border-radius:0}::slotted(uui-popover:not(:first-child)){--uui-popover-toggle-slot-button-merge-border-left:1}::slotted(uui-popover:first-child){--uui-popover-toggle-slot-button-border-radius:var(--uui-border-radius,3px) 0 0 var(--uui-border-radius,3px)}::slotted(uui-popover:last-child){--uui-popover-toggle-slot-button-border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0}::slotted(:hover){z-index:1}`],n.UUIButtonGroupElement=eu([b("uui-button-group")],n.UUIButtonGroupElement);var tu=Object.defineProperty,iu=Object.getOwnPropertyDescriptor,ou=(i,e,t,r)=>{for(var o=r>1?void 0:r?iu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&tu(e,t,o),o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,p`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(uui-button:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(uui-button:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(uui-button:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:2;--uui-button-padding-right-factor:2}::slotted([look=outline]),::slotted([look=placeholder]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1}::slotted(uui-button[look=outline]:first-child),::slotted(uui-button[look=placeholder]:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:1.5}::slotted(uui-button[look=outline]:last-child),::slotted(uui-button[look=placeholder]:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:1.5}::slotted(uui-button[look=outline]:first-child:last-child),::slotted(uui-button[look=placeholder]:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}`],n.UUIActionBarElement=ou([b("uui-action-bar")],n.UUIActionBarElement);var ru=Object.defineProperty,nu=Object.getOwnPropertyDescriptor,Gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?nu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ru(e,t,o),o};n.UUIAvatarGroupElement=class extends m{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>${this._isLimitExceeded()?u`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}`}},n.UUIAvatarGroupElement.styles=[p`:host{display:inline-flex;align-items:center;padding-left:3px;padding-right:3px}::slotted(uui-avatar){margin-left:-.2em;margin-right:-.2em;border:.1em solid var(--uui-avatar-border-color)}#overflow-indication{margin-left:6px}`],Gt([Ue({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),Gt([f()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),Gt([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=Gt([b("uui-avatar-group")],n.UUIAvatarGroupElement);var au=Object.defineProperty,su=Object.getOwnPropertyDescriptor,Xe=(i,e,t,r)=>{for(var o=r>1?void 0:r?su(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&au(e,t,o),o};n.UUIAvatarElement=class extends m{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this._name="",this.initials=""}get name(){return this._name}set name(e){const t=this._name;this._name=e,this.initials=this.createInitials(this._name),this.requestUpdate("title",t)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=e.match(/(\w+)/g);return r!=null&&r.length?(t=r[0].substring(0,1),r.length>1&&(t+=r[r.length-1].substring(0,1)),t.toUpperCase()):t}renderImage(){return u`<img src="${this.imgSrc}" srcset="${this.imgSrcset}" alt="${this.initials}" title="${this.name}">`}render(){return u`${this.imgSrc?this.renderImage():""} ${this.imgSrc?"":this.initials}<slot></slot>`}},n.UUIAvatarElement.styles=[p`:host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;overflow:hidden;border-radius:50%;font-weight:700;-webkit-font-smoothing:subpixel-antialiased;width:calc(2em + 4px);height:calc(2em + 4px);user-select:none;aspect-ratio:1;background-color:var(--uui-palette-spanish-pink,#f5c1bc);color:var(--uui-palette-space-cadet,#1b264f)}:host([overflow]){overflow:unset}img{object-fit:cover;height:100%;width:100%;overflow:hidden;border-radius:50%}`],Xe([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),Xe([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),Xe([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),Xe([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",1),Xe([f()],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=Xe([b("uui-avatar")],n.UUIAvatarElement);var lu=Object.defineProperty,uu=Object.getOwnPropertyDescriptor,qt=(i,e,t,r)=>{for(var o=r>1?void 0:r?uu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&lu(e,t,o),o};n.UUIBadgeElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return u`<slot></slot>`}},n.UUIBadgeElement.styles=[p`:host{position:var(--uui-badge-position,absolute);display:flex;justify-content:center;align-items:center;padding:var(--uui-size-1,3px) var(--uui-size-2,6px);inset:var(--uui-badge-inset,-8px -8px auto auto);text-align:center;font-size:var(--uui-badge-font-size,var(--uui-type-small-size,12px));font-weight:900;line-height:1;margin-right:0;min-width:var(--uui-size-8,24px);min-height:var(--uui-size-8,24px);box-sizing:border-box;border-radius:var(--uui-size-4,12px);border:1px solid transparent}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}::slotted(uui-icon){margin-left:-.2em;margin-right:-.2em}@keyframes --uui-badge-bounce{0%{transform:translateY(0)}20%{transform:translateY(-6px)}40%{transform:translateY(0)}55%{transform:translateY(-3px)}70%{transform:translateY(0)}100%{transform:translateY(0)}}:host([attention]){animation-duration:1.4s;animation-iteration-count:infinite;animation-name:--uui-badge-bounce;animation-timing-function:ease}@media (prefers-reduced-motion){:host([attention]){animation:none}}`],qt([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),qt([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),qt([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=qt([b("uui-badge")],n.UUIBadgeElement);var cu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,du=(i,e,t,r)=>{for(var o=r>1?void 0:r?hu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&cu(e,t,o),o};const xt=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return du([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var pu=Object.defineProperty,bu=Object.getOwnPropertyDescriptor,Dr=(i,e,t,r)=>{for(var o=r>1?void 0:r?bu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&pu(e,t,o),o};const Q=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return Dr([l({type:String})],t.prototype,"label",2),Dr([f()],t.prototype,"_labelSlotHasContent",2),t};var mu=Object.defineProperty,Br=Object.getOwnPropertySymbols,vu=Object.prototype.hasOwnProperty,gu=Object.prototype.propertyIsEnumerable,Vr=(i,e,t)=>e in i?mu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fu=(i,e)=>{for(var t in e||(e={}))vu.call(e,t)&&Vr(i,t,e[t]);if(Br)for(var t of Br(e))gu.call(e,t)&&Vr(i,t,e[t]);return i};let yu=class extends Event{constructor(e,t={}){super(e,fu({},t)),this.detail=t.detail||{}}};var _u=Object.defineProperty,Hr=Object.getOwnPropertySymbols,wu=Object.prototype.hasOwnProperty,$u=Object.prototype.propertyIsEnumerable,Rr=(i,e,t)=>e in i?_u(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Fr=(i,e)=>{for(var t in e||(e={}))wu.call(e,t)&&Rr(i,t,e[t]);if(Hr)for(var t of Hr(e))$u.call(e,t)&&Rr(i,t,e[t]);return i};let Ye=class extends yu{constructor(e,t={}){super(e,Fr(Fr({},{bubbles:!0,cancelable:!0}),t))}};Ye.SELECTED="selected",Ye.DESELECTED="deselected";var Uu=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,Gr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Eu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Uu(e,t,o),o};const Ze=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new Ye(Ye.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new Ye(Ye.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Gr([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Gr([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var ku=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,Iu=(i,e,t,r)=>{for(var o=r>1?void 0:r?xu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ku(e,t,o),o};const Wt=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return Iu([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var Cu=Object.defineProperty,qr=Object.getOwnPropertySymbols,Pu=Object.prototype.hasOwnProperty,Su=Object.prototype.propertyIsEnumerable,Wr=(i,e,t)=>e in i?Cu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ou=(i,e)=>{for(var t in e||(e={}))Pu.call(e,t)&&Wr(i,t,e[t]);if(qr)for(var t of qr(e))Su.call(e,t)&&Wr(i,t,e[t]);return i};let Kr=class extends Event{constructor(e,t={}){super(e,Ou({},t)),this.detail=t.detail||{}}};var zu=Object.defineProperty,Xr=Object.getOwnPropertySymbols,Au=Object.prototype.hasOwnProperty,Lu=Object.prototype.propertyIsEnumerable,Yr=(i,e,t)=>e in i?zu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Zr=(i,e)=>{for(var t in e||(e={}))Au.call(e,t)&&Yr(i,t,e[t]);if(Xr)for(var t of Xr(e))Lu.call(e,t)&&Yr(i,t,e[t]);return i};let Qe=class extends Kr{constructor(e,t={}){super(e,Zr(Zr({},{bubbles:!0}),t))}};Qe.VALID="valid",Qe.INVALID="invalid";var ju=Object.defineProperty,Qr=Object.getOwnPropertySymbols,Tu=Object.prototype.hasOwnProperty,Nu=Object.prototype.propertyIsEnumerable,Jr=(i,e,t)=>e in i?ju(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,en=(i,e)=>{for(var t in e||(e={}))Tu.call(e,t)&&Jr(i,t,e[t]);if(Qr)for(var t of Qr(e))Nu.call(e,t)&&Jr(i,t,e[t]);return i};let tn=class extends Kr{constructor(e,t={}){super(e,en(en({},{bubbles:!0,cancelable:!0}),t))}};tn.SELECTED="selected",tn.DESELECTED="deselected";var Mu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,je=(i,e,t,r)=>{for(var o=r>1?void 0:r?Du(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Mu(e,t,o),o};const J=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,a){const s={flagKey:r,getMessageMethod:o,checkMethod:a};return this._validators.push(s),s}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const a in o.validity)a!=="valid"&&o.validity[a]&&(this._validityState[a]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new Qe(Qe.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new Qe(Qe.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){var r;(r=this._form)==null||r.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var r;for(const o in this._formCtrlElements)if(this._formCtrlElements[o].checkValidity()===!1)return!1;return(r=this._internals)==null?void 0:r.checkValidity()}get validity(){return this._validityState}get validationMessage(){var r;return(r=this._internals)==null?void 0:r.validationMessage}}return e.formAssociated=!0,je([l({type:String})],e.prototype,"name",2),je([l()],e.prototype,"value",1),je([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),je([l({type:Boolean,reflect:!0})],e.prototype,"required",2),je([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),je([l({type:Boolean,reflect:!0})],e.prototype,"error",2),je([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e},Bu=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,a=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(a)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var Vu=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Ru=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Vu(e,t,o),o},on=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},rn=(i,e,t)=>(on(i,e,"read from private field"),t?t.call(i):e.get(i)),nn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Fu=(i,e,t,r)=>(on(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const Gu=i=>{var e,t;class r extends i{constructor(...a){super(...a),nn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const s=Bu(this,"id",this.popoverContainerElement);s&&(rn(this,e)?s.hidePopover():s.showPopover())},nn(this,t,s=>{requestAnimationFrame(()=>{Fu(this,e,s.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",rn(this,t))}}return e=new WeakMap,t=new WeakMap,Ru([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};var qu=Object.defineProperty,an=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Ku=Object.prototype.propertyIsEnumerable,sn=(i,e,t)=>e in i?qu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Xu=(i,e)=>{for(var t in e||(e={}))Wu.call(e,t)&&sn(i,t,e[t]);if(an)for(var t of an(e))Ku.call(e,t)&&sn(i,t,e[t]);return i};let P=class extends Event{constructor(e,t={}){super(e,Xu({},t)),this.detail=t.detail||{}}};var Yu=Object.defineProperty,ln=Object.getOwnPropertySymbols,Zu=Object.prototype.hasOwnProperty,Qu=Object.prototype.propertyIsEnumerable,un=(i,e,t)=>e in i?Yu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,cn=(i,e)=>{for(var t in e||(e={}))Zu.call(e,t)&&un(i,t,e[t]);if(ln)for(var t of ln(e))Qu.call(e,t)&&un(i,t,e[t]);return i};let Je=class extends P{constructor(e,t={}){super(e,cn(cn({},{bubbles:!0}),t))}};Je.VALID="valid",Je.INVALID="invalid";var Ju=Object.defineProperty,hn=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,dn=(i,e,t)=>e in i?Ju(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,pn=(i,e)=>{for(var t in e||(e={}))ec.call(e,t)&&dn(i,t,e[t]);if(hn)for(var t of hn(e))tc.call(e,t)&&dn(i,t,e[t]);return i};let Ee=class extends P{constructor(e,t={}){super(e,pn(pn({},{bubbles:!0,cancelable:!0}),t))}};Ee.SELECTED="selected",Ee.DESELECTED="deselected";var ic=Object.defineProperty,bn=Object.getOwnPropertySymbols,oc=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable,mn=(i,e,t)=>e in i?ic(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,vn=(i,e)=>{for(var t in e||(e={}))oc.call(e,t)&&mn(i,t,e[t]);if(bn)for(var t of bn(e))rc.call(e,t)&&mn(i,t,e[t]);return i};let Kt=class extends P{constructor(e,t={}){super(e,vn(vn({},{bubbles:!0}),t))}};Kt.CHANGE="change";var nc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,Xt=(i,e,t,r)=>{for(var o=r>1?void 0:r?ac(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&nc(e,t,o),o};let ee=class extends J(Q("",m)){constructor(e="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){const t=this._value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}_onKeypress(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){var t;super.firstUpdated(e);const r=(t=this.shadowRoot)==null?void 0:t.querySelector("label");let o=!1;this._input.addEventListener("blur",()=>{o===!1&&this.style.setProperty("--uui-show-focus-outline","1"),o=!1}),r.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),o=!0}),r.addEventListener("mouseup",()=>{o=!1})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new Kt(Kt.CHANGE))}render(){return u`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled}" .checked="${this.checked}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}};ee.styles=[p`:host{display:inline-block}label{cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}input{position:absolute;height:0;width:0;margin-top:-4px}:host([label-position=left]) label{flex-direction:row-reverse}:host([label-position=top]) label{gap:var(--uui-size-half-base-unit);flex-direction:column-reverse}:host([label-position=bottom]) label{gap:var(--uui-size-half-base-unit);flex-direction:column}:host([disabled]) .label{opacity:.5}`],Xt([l({type:String,attribute:"label-position",reflect:!0})],ee.prototype,"labelPosition",2),Xt([l({type:Boolean})],ee.prototype,"checked",1),Xt([l({type:Boolean,reflect:!0})],ee.prototype,"disabled",2),Xt([C("#input")],ee.prototype,"_input",2);var sc=`.uui-text {
|
|
211
|
+
*/var ao;const jl=((ao=window.HTMLSlotElement)===null||ao===void 0?void 0:ao.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);function ke(i){const{slot:e,selector:t}=i??{};return no({descriptor:r=>({get(){var o;const a="slot"+(e?`[name=${e}]`:":not([name])"),s=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(a),c=s!=null?jl(s,i):[];return t?c.filter(h=>h.matches(t)):c},enumerable:!0,configurable:!0})})}const Ll=p`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,Tl=Z("uui-blink 0.9s infinite both"),Nl=p`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`,Ml=Z("pulse 0.8s ease-in-out infinite both"),Dl=p`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,Bl=Z("uui-horizontal-shake 600ms ease backwards");var Vl=Object.defineProperty,Qr=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Rl=Object.prototype.propertyIsEnumerable,Jr=(i,e,t)=>e in i?Vl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Fl=(i,e)=>{for(var t in e||(e={}))Hl.call(e,t)&&Jr(i,t,e[t]);if(Qr)for(var t of Qr(e))Rl.call(e,t)&&Jr(i,t,e[t]);return i};let so=class extends Event{constructor(e,t={}){super(e,Fl({},t)),this.detail=t.detail||{}}};var Gl=Object.defineProperty,en=Object.getOwnPropertySymbols,ql=Object.prototype.hasOwnProperty,Wl=Object.prototype.propertyIsEnumerable,tn=(i,e,t)=>e in i?Gl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,on=(i,e)=>{for(var t in e||(e={}))ql.call(e,t)&&tn(i,t,e[t]);if(en)for(var t of en(e))Wl.call(e,t)&&tn(i,t,e[t]);return i};let Le=class extends so{constructor(e,t={}){super(e,on(on({},{bubbles:!0}),t))}};Le.VALID="valid",Le.INVALID="invalid";var Kl=Object.defineProperty,rn=Object.getOwnPropertySymbols,Xl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable,nn=(i,e,t)=>e in i?Kl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,an=(i,e)=>{for(var t in e||(e={}))Xl.call(e,t)&&nn(i,t,e[t]);if(rn)for(var t of rn(e))Yl.call(e,t)&&nn(i,t,e[t]);return i};let Te=class extends so{constructor(e,t={}){super(e,an(an({},{bubbles:!0,cancelable:!0}),t))}};Te.SELECTED="selected",Te.DESELECTED="deselected";var Zl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,Jl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ql(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zl(e,t,o),o};const eu=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Jl([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var tu=Object.defineProperty,iu=Object.getOwnPropertyDescriptor,sn=(i,e,t,r)=>{for(var o=r>1?void 0:r?iu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&tu(e,t,o),o};const ou=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return sn([l({type:String})],t.prototype,"label",2),sn([g()],t.prototype,"_labelSlotHasContent",2),t};var ru=Object.defineProperty,nu=Object.getOwnPropertyDescriptor,ln=(i,e,t,r)=>{for(var o=r>1?void 0:r?nu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ru(e,t,o),o};const au=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new Te(Te.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new Te(Te.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return ln([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),ln([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var su=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,uu=(i,e,t,r)=>{for(var o=r>1?void 0:r?lu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&su(e,t,o),o};const cu=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return uu([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var hu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,Ne=(i,e,t,r)=>{for(var o=r>1?void 0:r?du(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&hu(e,t,o),o};const pu=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,a){const s={flagKey:r,getMessageMethod:o,checkMethod:a};return this._validators.push(s),s}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const a in o.validity)a!=="valid"&&o.validity[a]&&(this._validityState[a]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new Le(Le.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new Le(Le.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){var r;(r=this._form)==null||r.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var r;for(const o in this._formCtrlElements)if(this._formCtrlElements[o].checkValidity()===!1)return!1;return(r=this._internals)==null?void 0:r.checkValidity()}get validity(){return this._validityState}get validationMessage(){var r;return(r=this._internals)==null?void 0:r.validationMessage}}return e.formAssociated=!0,Ne([l({type:String})],e.prototype,"name",2),Ne([l()],e.prototype,"value",1),Ne([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),Ne([l({type:Boolean,reflect:!0})],e.prototype,"required",2),Ne([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),Ne([l({type:Boolean,reflect:!0})],e.prototype,"error",2),Ne([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e};let bu=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const mu=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},vu=(i,e)=>{function t(o){const a=i.getBoundingClientRect(),s=i.ownerDocument.defaultView,c=a.left+s.scrollX,h=a.top+s.scrollY;let d;o instanceof TouchEvent?d=o.touches[0]:d=o;const v=d.pageX-c,f=d.pageY-h;e!=null&&e.onMove&&e.onMove(v,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e!=null&&e.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e!=null&&e.initialEvent&&t(e.initialEvent)},gu=(i,e,t)=>Math.min(Math.max(i,e),t),fu=(i,e,t)=>t+e-i,yu=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},un=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,a=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(a)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function wu(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var _u=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,Uu=(i,e,t,r)=>{for(var o=r>1?void 0:r?$u(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_u(e,t,o),o},cn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},hn=(i,e,t)=>(cn(i,e,"read from private field"),t?t.call(i):e.get(i)),dn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Eu=(i,e,t,r)=>(cn(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const ku=i=>{var e,t;class r extends i{constructor(...a){super(...a),dn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const s=un(this,"id",this.popoverContainerElement);s&&(hn(this,e)?s.hidePopover():s.showPopover())},dn(this,t,s=>{requestAnimationFrame(()=>{Eu(this,e,s.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",hn(this,t))}}return e=new WeakMap,t=new WeakMap,Uu([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};function xu(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}const Iu=["default","primary","secondary","outline","placeholder"],Cu=["default","positive","warning","danger"],Su=["h1","h2","h3","h4","h5","h6"];function b(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}var Pu=Object.defineProperty,Ou=Object.getOwnPropertyDescriptor,zu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ou(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Pu(e,t,o),o};n.UUIButtonGroupElement=class extends m{render(){return u`<slot></slot>`}},n.UUIButtonGroupElement.styles=[p`:host{display:inline-flex;align-items:stretch}::slotted(*){--uui-button-border-radius:0;flex-grow:1}::slotted([look=outline]:not(:first-child)){--uui-button-merge-border-left:1}::slotted([look=placeholder]:not(:first-child)){--uui-button-merge-border-left:1}::slotted(:first-child){--uui-button-border-radius:var(--uui-border-radius,3px) 0 0 var(--uui-border-radius,3px)}::slotted(:last-child){--uui-button-border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0}::slotted(:hover){z-index:1}`],n.UUIButtonGroupElement=zu([b("uui-button-group")],n.UUIButtonGroupElement);var Au=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,Lu=(i,e,t,r)=>{for(var o=r>1?void 0:r?ju(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Au(e,t,o),o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,p`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(uui-button:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(uui-button:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(uui-button:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:2;--uui-button-padding-right-factor:2}::slotted([look=outline]),::slotted([look=placeholder]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1}::slotted(uui-button[look=outline]:first-child),::slotted(uui-button[look=placeholder]:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:1.5}::slotted(uui-button[look=outline]:last-child),::slotted(uui-button[look=placeholder]:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:1.5}::slotted(uui-button[look=outline]:first-child:last-child),::slotted(uui-button[look=placeholder]:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}`],n.UUIActionBarElement=Lu([b("uui-action-bar")],n.UUIActionBarElement);var Tu=Object.defineProperty,Nu=Object.getOwnPropertyDescriptor,Jt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Tu(e,t,o),o};n.UUIAvatarGroupElement=class extends m{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>${this._isLimitExceeded()?u`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}`}},n.UUIAvatarGroupElement.styles=[p`:host{display:inline-flex;align-items:center;padding-left:3px;padding-right:3px}::slotted(uui-avatar){margin-left:-.2em;margin-right:-.2em;border:.1em solid var(--uui-avatar-border-color)}#overflow-indication{margin-left:6px}`],Jt([ke({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),Jt([g()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),Jt([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=Jt([b("uui-avatar-group")],n.UUIAvatarGroupElement);var Mu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,Je=(i,e,t,r)=>{for(var o=r>1?void 0:r?Du(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Mu(e,t,o),o};n.UUIAvatarElement=class extends m{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this._name="",this.initials=""}get name(){return this._name}set name(e){const t=this._name;this._name=e,this.initials=this.createInitials(this._name),this.requestUpdate("title",t)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=e.match(/(\w+)/g);return r!=null&&r.length?(t=r[0].substring(0,1),r.length>1&&(t+=r[r.length-1].substring(0,1)),t.toUpperCase()):t}renderImage(){return u`<img src="${this.imgSrc}" srcset="${this.imgSrcset}" alt="${this.initials}" title="${this.name}">`}render(){return u`${this.imgSrc?this.renderImage():""} ${this.imgSrc?"":this.initials}<slot></slot>`}},n.UUIAvatarElement.styles=[p`:host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;overflow:hidden;border-radius:50%;font-weight:700;-webkit-font-smoothing:subpixel-antialiased;width:calc(2em + 4px);height:calc(2em + 4px);user-select:none;aspect-ratio:1;background-color:var(--uui-palette-spanish-pink,#f5c1bc);color:var(--uui-palette-space-cadet,#1b264f)}:host([overflow]){overflow:unset}img{object-fit:cover;height:100%;width:100%;overflow:hidden;border-radius:50%}`],Je([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),Je([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),Je([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),Je([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",1),Je([g()],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=Je([b("uui-avatar")],n.UUIAvatarElement);var Bu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,ei=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Bu(e,t,o),o};n.UUIBadgeElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return u`<slot></slot>`}},n.UUIBadgeElement.styles=[p`:host{position:var(--uui-badge-position,absolute);display:flex;justify-content:center;align-items:center;padding:var(--uui-size-1,3px) var(--uui-size-2,6px);inset:var(--uui-badge-inset,-8px -8px auto auto);text-align:center;font-size:var(--uui-badge-font-size,var(--uui-type-small-size,12px));font-weight:900;line-height:1;margin-right:0;min-width:var(--uui-size-8,24px);min-height:var(--uui-size-8,24px);box-sizing:border-box;border-radius:var(--uui-size-4,12px);border:1px solid transparent}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}::slotted(uui-icon){margin-left:-.2em;margin-right:-.2em}@keyframes --uui-badge-bounce{0%{transform:translateY(0)}20%{transform:translateY(-6px)}40%{transform:translateY(0)}55%{transform:translateY(-3px)}70%{transform:translateY(0)}100%{transform:translateY(0)}}:host([attention]){animation-duration:1.4s;animation-iteration-count:infinite;animation-name:--uui-badge-bounce;animation-timing-function:ease}@media (prefers-reduced-motion){:host([attention]){animation:none}}`],ei([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),ei([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),ei([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=ei([b("uui-badge")],n.UUIBadgeElement);var Hu=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,Fu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ru(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Hu(e,t,o),o};const Ot=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Fu([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var Gu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,pn=(i,e,t,r)=>{for(var o=r>1?void 0:r?qu(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Gu(e,t,o),o};const te=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return pn([l({type:String})],t.prototype,"label",2),pn([g()],t.prototype,"_labelSlotHasContent",2),t};var Wu=Object.defineProperty,bn=Object.getOwnPropertySymbols,Ku=Object.prototype.hasOwnProperty,Xu=Object.prototype.propertyIsEnumerable,mn=(i,e,t)=>e in i?Wu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Yu=(i,e)=>{for(var t in e||(e={}))Ku.call(e,t)&&mn(i,t,e[t]);if(bn)for(var t of bn(e))Xu.call(e,t)&&mn(i,t,e[t]);return i};let Zu=class extends Event{constructor(e,t={}){super(e,Yu({},t)),this.detail=t.detail||{}}};var Qu=Object.defineProperty,vn=Object.getOwnPropertySymbols,Ju=Object.prototype.hasOwnProperty,ec=Object.prototype.propertyIsEnumerable,gn=(i,e,t)=>e in i?Qu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fn=(i,e)=>{for(var t in e||(e={}))Ju.call(e,t)&&gn(i,t,e[t]);if(vn)for(var t of vn(e))ec.call(e,t)&&gn(i,t,e[t]);return i};let et=class extends Zu{constructor(e,t={}){super(e,fn(fn({},{bubbles:!0,cancelable:!0}),t))}};et.SELECTED="selected",et.DESELECTED="deselected";var tc=Object.defineProperty,ic=Object.getOwnPropertyDescriptor,yn=(i,e,t,r)=>{for(var o=r>1?void 0:r?ic(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&tc(e,t,o),o};const tt=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new et(et.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new et(et.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return yn([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),yn([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var oc=Object.defineProperty,rc=Object.getOwnPropertyDescriptor,nc=(i,e,t,r)=>{for(var o=r>1?void 0:r?rc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&oc(e,t,o),o};const ti=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return nc([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var ac=Object.defineProperty,wn=Object.getOwnPropertySymbols,sc=Object.prototype.hasOwnProperty,lc=Object.prototype.propertyIsEnumerable,_n=(i,e,t)=>e in i?ac(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,uc=(i,e)=>{for(var t in e||(e={}))sc.call(e,t)&&_n(i,t,e[t]);if(wn)for(var t of wn(e))lc.call(e,t)&&_n(i,t,e[t]);return i};let $n=class extends Event{constructor(e,t={}){super(e,uc({},t)),this.detail=t.detail||{}}};var cc=Object.defineProperty,Un=Object.getOwnPropertySymbols,hc=Object.prototype.hasOwnProperty,dc=Object.prototype.propertyIsEnumerable,En=(i,e,t)=>e in i?cc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,kn=(i,e)=>{for(var t in e||(e={}))hc.call(e,t)&&En(i,t,e[t]);if(Un)for(var t of Un(e))dc.call(e,t)&&En(i,t,e[t]);return i};let it=class extends $n{constructor(e,t={}){super(e,kn(kn({},{bubbles:!0}),t))}};it.VALID="valid",it.INVALID="invalid";var pc=Object.defineProperty,xn=Object.getOwnPropertySymbols,bc=Object.prototype.hasOwnProperty,mc=Object.prototype.propertyIsEnumerable,In=(i,e,t)=>e in i?pc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Cn=(i,e)=>{for(var t in e||(e={}))bc.call(e,t)&&In(i,t,e[t]);if(xn)for(var t of xn(e))mc.call(e,t)&&In(i,t,e[t]);return i};let Sn=class extends $n{constructor(e,t={}){super(e,Cn(Cn({},{bubbles:!0,cancelable:!0}),t))}};Sn.SELECTED="selected",Sn.DESELECTED="deselected";var vc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,Me=(i,e,t,r)=>{for(var o=r>1?void 0:r?gc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&vc(e,t,o),o};const ie=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,a){const s={flagKey:r,getMessageMethod:o,checkMethod:a};return this._validators.push(s),s}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const a in o.validity)a!=="valid"&&o.validity[a]&&(this._validityState[a]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new it(it.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new it(it.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){var r;(r=this._form)==null||r.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var r;for(const o in this._formCtrlElements)if(this._formCtrlElements[o].checkValidity()===!1)return!1;return(r=this._internals)==null?void 0:r.checkValidity()}get validity(){return this._validityState}get validationMessage(){var r;return(r=this._internals)==null?void 0:r.validationMessage}}return e.formAssociated=!0,Me([l({type:String})],e.prototype,"name",2),Me([l()],e.prototype,"value",1),Me([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),Me([l({type:Boolean,reflect:!0})],e.prototype,"required",2),Me([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),Me([l({type:Boolean,reflect:!0})],e.prototype,"error",2),Me([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e},fc=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,a=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(a)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var yc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,_c=(i,e,t,r)=>{for(var o=r>1?void 0:r?wc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&yc(e,t,o),o},Pn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},On=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),zn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$c=(i,e,t,r)=>(Pn(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const Uc=i=>{var e,t;class r extends i{constructor(...a){super(...a),zn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const s=fc(this,"id",this.popoverContainerElement);s&&(On(this,e)?s.hidePopover():s.showPopover())},zn(this,t,s=>{requestAnimationFrame(()=>{$c(this,e,s.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",On(this,t))}}return e=new WeakMap,t=new WeakMap,_c([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};var Ec=Object.defineProperty,An=Object.getOwnPropertySymbols,kc=Object.prototype.hasOwnProperty,xc=Object.prototype.propertyIsEnumerable,jn=(i,e,t)=>e in i?Ec(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ic=(i,e)=>{for(var t in e||(e={}))kc.call(e,t)&&jn(i,t,e[t]);if(An)for(var t of An(e))xc.call(e,t)&&jn(i,t,e[t]);return i};let P=class extends Event{constructor(e,t={}){super(e,Ic({},t)),this.detail=t.detail||{}}};var Cc=Object.defineProperty,Ln=Object.getOwnPropertySymbols,Sc=Object.prototype.hasOwnProperty,Pc=Object.prototype.propertyIsEnumerable,Tn=(i,e,t)=>e in i?Cc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Nn=(i,e)=>{for(var t in e||(e={}))Sc.call(e,t)&&Tn(i,t,e[t]);if(Ln)for(var t of Ln(e))Pc.call(e,t)&&Tn(i,t,e[t]);return i};let ot=class extends P{constructor(e,t={}){super(e,Nn(Nn({},{bubbles:!0}),t))}};ot.VALID="valid",ot.INVALID="invalid";var Oc=Object.defineProperty,Mn=Object.getOwnPropertySymbols,zc=Object.prototype.hasOwnProperty,Ac=Object.prototype.propertyIsEnumerable,Dn=(i,e,t)=>e in i?Oc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Bn=(i,e)=>{for(var t in e||(e={}))zc.call(e,t)&&Dn(i,t,e[t]);if(Mn)for(var t of Mn(e))Ac.call(e,t)&&Dn(i,t,e[t]);return i};let xe=class extends P{constructor(e,t={}){super(e,Bn(Bn({},{bubbles:!0,cancelable:!0}),t))}};xe.SELECTED="selected",xe.DESELECTED="deselected";var jc=Object.defineProperty,Vn=Object.getOwnPropertySymbols,Lc=Object.prototype.hasOwnProperty,Tc=Object.prototype.propertyIsEnumerable,Hn=(i,e,t)=>e in i?jc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Rn=(i,e)=>{for(var t in e||(e={}))Lc.call(e,t)&&Hn(i,t,e[t]);if(Vn)for(var t of Vn(e))Tc.call(e,t)&&Hn(i,t,e[t]);return i};let ii=class extends P{constructor(e,t={}){super(e,Rn(Rn({},{bubbles:!0}),t))}};ii.CHANGE="change";var Nc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,oi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nc(e,t,o),o};let oe=class extends ie(te("",m)){constructor(e="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){const t=this._value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}_onKeypress(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){var t;super.firstUpdated(e);const r=(t=this.shadowRoot)==null?void 0:t.querySelector("label");let o=!1;this._input.addEventListener("blur",()=>{o===!1&&this.style.setProperty("--uui-show-focus-outline","1"),o=!1}),r.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),o=!0}),r.addEventListener("mouseup",()=>{o=!1})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new ii(ii.CHANGE))}render(){return u`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled}" .checked="${this.checked}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}};oe.styles=[p`:host{display:inline-block}label{cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}input{position:absolute;height:0;width:0;margin-top:-4px}:host([label-position=left]) label{flex-direction:row-reverse}:host([label-position=top]) label{gap:var(--uui-size-half-base-unit);flex-direction:column-reverse}:host([label-position=bottom]) label{gap:var(--uui-size-half-base-unit);flex-direction:column}:host([disabled]) .label{opacity:.5}`],oi([l({type:String,attribute:"label-position",reflect:!0})],oe.prototype,"labelPosition",2),oi([l({type:Boolean})],oe.prototype,"checked",1),oi([l({type:Boolean,reflect:!0})],oe.prototype,"disabled",2),oi([C("#input")],oe.prototype,"_input",2);var Dc=`.uui-text {
|
|
216
212
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
217
213
|
font-size: 15px;
|
|
218
214
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -380,15 +376,15 @@
|
|
|
380
376
|
margin-top: var(--uui-size-layout-1,24px);
|
|
381
377
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
382
378
|
}
|
|
383
|
-
`;const
|
|
379
|
+
`;const Bc=Z(Dc);/**
|
|
384
380
|
* @license
|
|
385
381
|
* Copyright 2020 Google LLC
|
|
386
382
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
387
|
-
*/const
|
|
388
|
-
take care to ensure page security.`)})(r)+i[o+1],i[0]),r:
|
|
383
|
+
*/const lo=Symbol.for(""),Vc=i=>{if(i?.r===lo)return i?._$litStatic$},Hc=i=>({_$litStatic$:i,r:lo}),Fn=(i,...e)=>({_$litStatic$:e.reduce((t,r,o)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
384
|
+
take care to ensure page security.`)})(r)+i[o+1],i[0]),r:lo}),Gn=new Map,Rc=i=>(e,...t)=>{const r=t.length;let o,a;const s=[],c=[];let h,d=0,v=!1;for(;d<r;){for(h=e[d];d<r&&(a=t[d],(o=Vc(a))!==void 0);)h+=o+e[++d],v=!0;d!==r&&c.push(a),s.push(h),d++}if(d===r&&s.push(e[r]),v){const f=s.join("$$lit$$");(e=Gn.get(f))===void 0&&(s.raw=s,Gn.set(f,e=s)),t=c}return i(e,...t)},qn=Rc(u);var Fc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,De=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Fc(e,t,o),o};function uo(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}n.UUIBoxElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag=Fn`h5`,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=uo(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=uo(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=uo(e.target)}}set headlineVariant(e){e?this._headlineVariantTag=Hc(e):this._headlineVariantTag=Fn`h5`}renderHeader(){return qn`<div
|
|
389
385
|
id="header"
|
|
390
386
|
class="uui-text"
|
|
391
|
-
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
387
|
+
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
392
388
|
<${this._headlineVariantTag}
|
|
393
389
|
id="headline"
|
|
394
390
|
class="uui-h5"
|
|
@@ -397,10 +393,11 @@
|
|
|
397
393
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
398
394
|
</${this._headlineVariantTag}>
|
|
399
395
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
400
|
-
|
|
396
|
+
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
397
|
+
</div>`}render(){return qn`
|
|
401
398
|
${this.renderHeader()}
|
|
402
399
|
<slot></slot>
|
|
403
|
-
`}},n.UUIBoxElement.styles=[
|
|
400
|
+
`}},n.UUIBoxElement.styles=[Bc,p`
|
|
404
401
|
:host {
|
|
405
402
|
display: block;
|
|
406
403
|
box-shadow: var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,0.12) , 0 1px 2px rgba(0,0,0,0.24));
|
|
@@ -409,7 +406,8 @@
|
|
|
409
406
|
}
|
|
410
407
|
|
|
411
408
|
#header {
|
|
412
|
-
display:
|
|
409
|
+
display: flex;
|
|
410
|
+
column-gap: var(--uui-size-space-5,18px);
|
|
413
411
|
border-bottom: 1px solid var(--uui-color-divider-standalone,#e9e9eb);
|
|
414
412
|
padding: var(--uui-size-space-4,12px) var(--uui-size-space-5,18px);
|
|
415
413
|
}
|
|
@@ -418,34 +416,39 @@
|
|
|
418
416
|
display: block;
|
|
419
417
|
padding: var(--uui-box-default-padding, var(--uui-size-space-5,18px));
|
|
420
418
|
}
|
|
421
|
-
|
|
419
|
+
|
|
420
|
+
slot[name='header-actions'] {
|
|
421
|
+
display: block;
|
|
422
|
+
margin-left: auto;
|
|
423
|
+
}
|
|
424
|
+
`],De([l({type:String})],n.UUIBoxElement.prototype,"headline",2),De([l({attribute:"headline-variant"})],n.UUIBoxElement.prototype,"headlineVariant",1),De([g()],n.UUIBoxElement.prototype,"_headlineVariantTag",2),De([g()],n.UUIBoxElement.prototype,"_headlineSlotHasContent",2),De([g()],n.UUIBoxElement.prototype,"_headerSlotHasContent",2),De([g()],n.UUIBoxElement.prototype,"_headerActionsSlotHasContent",2),n.UUIBoxElement=De([b("uui-box")],n.UUIBoxElement);var qc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,co=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&qc(e,t,o),o};n.UUIBreadcrumbItemElement=class extends m{constructor(){super(...arguments),this.href="#",this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}renderLinkAndSeparator(){return u`<a id="link" href="${this.href}"><slot></slot></a><span part="separator"></span>`}renderCurrent(){return u`<span id="last-item"><slot></slot></span>`}render(){return u`${this.lastItem?this.renderCurrent():this.renderLinkAndSeparator()}`}},n.UUIBreadcrumbItemElement.styles=[p`:host{font-size:var(--uui-type-small-size,12px);color:currentColor}a,a:visited{color:currentColor}a:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}a:focus{color:var(--uui-color-focus,#3879ff)}[part=separator]::after{content:'/';speak:never;position:relative;top:1px;margin:-3px 1px 0;color:var(--uui-color-border,#d8d7d9)}#last-item,#link{padding:0 4px;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#link{cursor:pointer}`],co([l()],n.UUIBreadcrumbItemElement.prototype,"href",2),co([l({type:Boolean,attribute:"last-item"})],n.UUIBreadcrumbItemElement.prototype,"lastItem",2),n.UUIBreadcrumbItemElement=co([b("uui-breadcrumb-item")],n.UUIBreadcrumbItemElement);var Kc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,Wn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Kc(e,t,o),o};n.UUIBreadcrumbsElement=class extends m{elementIsBreadcrumbItem(e){return e instanceof n.UUIBreadcrumbItemElement}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation")}handleSlotChange(){if(this.slotNodes.length>0){const e=this.slotNodes[this.slotNodes.length-1];e.setAttribute("aria-current","page"),this.elementIsBreadcrumbItem(e)&&(e.lastItem=!0)}}render(){return u`<ol id="breadcrumbs-list"><slot @slotchange="${this.handleSlotChange}"></slot></ol>`}},n.UUIBreadcrumbsElement.styles=[p`:host{display:flex}#breadcrumbs-list{display:flex;list-style-type:decimal;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}`],Wn([ke({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],n.UUIBreadcrumbsElement.prototype,"slotNodes",2),n.UUIBreadcrumbsElement=Wn([b("uui-breadcrumbs")],n.UUIBreadcrumbsElement);const Yc=p`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,Zc=Z("uui-blink 0.9s infinite both"),Qc=p`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`;Z("pulse 0.8s ease-in-out infinite both");const ri=p`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,ni=Z("uui-horizontal-shake 600ms ease backwards");/**
|
|
422
425
|
* @license
|
|
423
426
|
* Copyright 2017 Google LLC
|
|
424
427
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
425
|
-
*/const
|
|
428
|
+
*/const Q={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},rt=i=>(...e)=>({_$litDirective$:i,values:e});let nt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
426
429
|
* @license
|
|
427
430
|
* Copyright 2018 Google LLC
|
|
428
431
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
429
|
-
*/const
|
|
432
|
+
*/const Kn="important",Jc=" !"+Kn,re=rt(class extends nt{constructor(i){var e;if(super(i),i.type!==Q.ATTRIBUTE||i.name!=="style"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[e]){const{style:t}=i.element;if(this.ht===void 0){this.ht=new Set;for(const r in e)this.ht.add(r);return this.render(e)}this.ht.forEach(r=>{e[r]==null&&(this.ht.delete(r),r.includes("-")?t.removeProperty(r):t[r]="")});for(const r in e){const o=e[r];if(o!=null){this.ht.add(r);const a=typeof o=="string"&&o.endsWith(Jc);r.includes("-")||a?t.setProperty(r,a?o.slice(0,-11):o,a?Kn:""):t[r]=o}}return V}});var eh=Object.defineProperty,Xn=Object.getOwnPropertySymbols,th=Object.prototype.hasOwnProperty,ih=Object.prototype.propertyIsEnumerable,Yn=(i,e,t)=>e in i?eh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Zn=(i,e)=>{for(var t in e||(e={}))th.call(e,t)&&Yn(i,t,e[t]);if(Xn)for(var t of Xn(e))ih.call(e,t)&&Yn(i,t,e[t]);return i};let ai=class extends P{constructor(e,t={}){super(e,Zn(Zn({},{bubbles:!0,composed:!0}),t))}};ai.CLICK="click";var oh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,si=(i,e,t,r)=>{for(var o=r>1?void 0:r?rh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&oh(e,t,o),o};n.UUIButtonInlineCreateElement=class extends m{constructor(){super(...arguments),this._position=0,this.vertical=!1}_onMouseMove(e){this._position=this.vertical?e.offsetY:e.offsetX}_handleClick(e){e.preventDefault(),e.stopImmediatePropagation(),this.dispatchEvent(new ai(ai.CLICK))}render(){return u`<button id="button-wrapper" @mousemove="${this._onMouseMove}" @click="${this._handleClick}" aria-label="${this.label?this.label:"create new element"}"><div id="plus" style="${re({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}"><svg id="plus-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z"/></svg></div></button>`}},n.UUIButtonInlineCreateElement.styles=[Yc,p`:host{display:flex;position:relative;z-index:1}:host(:not([vertical])){height:20px;width:100%;margin:-10px 0}:host([vertical]){height:100%;width:20px;margin:0 -10px}#button-wrapper{display:flex;justify-content:center;align-items:center;position:absolute;z-index:1;outline:0;transition:opacity .24s;display:inline-flex;width:100%;border:none;height:100%;padding:0;text-decoration:none;background:0 0;color:currentColor;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;opacity:0}:host(:focus) #button-wrapper,:host(:focus-within) #button-wrapper,:host(:hover) #button-wrapper{opacity:1}:host(:focus) #button-wrapper:before,:host(:focus-within) #button-wrapper:before,:host(:hover) #button-wrapper:before{animation:${Zc};background-color:var(--uui-color-interactive-emphasis,#3544b1);border-color:var(--uui-color-surface,#fff)!important}#button-wrapper:before{content:'';position:absolute;right:0;left:0;height:2px;background-color:transparent;border-top:1px solid transparent;border-bottom:1px solid transparent;border-radius:2px;pointer-events:none;transition:background-color 720ms ease-out,border-color 240ms}:host(:not([vertical])) #button-wrapper:before{top:50%;transform:translateY(-50%)}:host([vertical]) #button-wrapper:before{height:100%;width:2px;left:50%;transform:translateX(-50%);border-top:none;border-bottom:none;border-left:1px solid transparent;border-right:1px solid transparent}:host(:not([vertical]):not(:hover)) #plus:not(:focus){left:calc(50% - 2px)!important}:host([vertical]:not(:hover)) #plus:not(:focus){top:calc(50% - 2px)!important}#plus{position:absolute;display:flex;justify-content:center;align-items:center;pointer-events:none;box-sizing:border-box;width:28px;height:28px;border-radius:3em;font-size:14px;border:2px solid var(--uui-color-interactive-emphasis,#3544b1);color:var(--uui-color-interactive-emphasis,#3544b1);background-color:var(--uui-color-surface,#fff);opacity:0;transform:scale(0);transition:transform 240ms ease-in,opacity 240ms,left .1s linear 150ms,top .1s linear 150ms}:host(:focus) #plus,:host(:focus-within) #plus,:host(:hover) #plus{opacity:1;transform:scale(1);transition:transform 240ms cubic-bezier(.175,.885,.32,1.275),opacity 80ms,box-shadow 240ms cubic-bezier(.175,.885,.32,1.275);box-shadow:0 0 0 2px var(--uui-color-surface,#fff)}:host(:not([vertical])) #plus{margin-left:-21px}:host([vertical]) #plus{left:-4px;margin-top:-21px}#button-wrapper:focus #plus{border:2px solid var(--uui-color-focus,#3879ff);color:var(--uui-color-focus,#3879ff)}#plus-icon{width:50%;fill:currentColor}#button-wrapper:active #plus{transform:scale(1.1)}`],si([g()],n.UUIButtonInlineCreateElement.prototype,"_position",2),si([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),si([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),n.UUIButtonInlineCreateElement=si([b("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let nh=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const _=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},Qn=(i,e)=>{function t(o){const a=i.getBoundingClientRect(),s=i.ownerDocument.defaultView,c=a.left+s.scrollX,h=a.top+s.scrollY;let d;o instanceof TouchEvent?d=o.touches[0]:d=o;const v=d.pageX-c,f=d.pageY-h;e!=null&&e.onMove&&e.onMove(v,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e!=null&&e.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e!=null&&e.initialEvent&&t(e.initialEvent)},O=(i,e,t)=>Math.min(Math.max(i,e),t),Jn=(i,e,t)=>t+e-i,ah=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,a=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(a)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function sh(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}const li=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,lh=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,uh=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,ch=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`,ho=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,hh=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`,dh=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,ph=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`,bh=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;/**
|
|
430
433
|
* @license
|
|
431
434
|
* Copyright 2018 Google LLC
|
|
432
435
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
433
|
-
*/const x=i=>i??U;var jc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,te=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&jc(e,t,o),o};n.UUIButtonElement=class extends J(Q("",Gu(m))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}_onHostClick(e){var t;if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if((t=this._internals)!=null&&t.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(this._resetStateTimeout),(this.state==="success"||this.state==="failed")&&(this._resetStateTimeout=setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":w(this,"uui-loader-circle"),e=u`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":w(this,"uui-icon"),e=u`<uui-icon name="check" .fallback="${ei.strings[0]}"></uui-icon>`;break;case"failed":w(this,"uui-icon"),e=u`<uui-icon name="wrong" .fallback="${Cn.strings[0]}"></uui-icon>`;break;default:return U}return u`<div id="state">${e}</div>`}render(){return this.href?u`<a id="button" aria-label="${this.label}" href="${x(this.disabled?void 0:this.href)}" target="${x(this.target||void 0)}" rel="${x(this.target==="_blank"?"noopener noreferrer":void 0)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button id="button" ?disabled="${this.disabled}" aria-label="${this.label}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUIButtonElement.styles=[Yt,p`:host{position:relative;display:inline-flex;margin-left:calc(var(--uui-button-merge-border-left,0) * -1px);--uui-button-padding-left-factor:3;--uui-button-padding-right-factor:3;--uui-button-padding-top-factor:1;--uui-button-padding-bottom-factor:1;min-height:var(--uui-button-height,var(--uui-size-11,33px));max-height:100%;cursor:pointer;text-align:center;font-size:var(--uui-button-font-size,inherit);font-weight:var(--uui-button-font-weight,500);transition:background-color 80ms,border-color 80ms,color 80ms}:host([compact]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1;--uui-button-padding-top-factor:0;--uui-button-padding-bottom-factor:0}.label{line-height:normal;display:block;transition:opacity 120ms}:host([state]:not([state=''])) .label{opacity:0}#state{position:absolute;opacity:0;animation-name:fadeIn;animation-delay:40ms;animation-duration:360ms;animation-fill-mode:forwards;display:flex;justify-content:center;width:100%;height:100%;align-items:center}#button{width:100%;background-color:transparent;color:inherit;font-size:inherit;border-radius:inherit;font-family:inherit;font-weight:inherit;text-align:inherit;border:none;cursor:inherit;display:inline-flex;align-items:center;justify-content:var(--uui-button-content-align,center);text-decoration:none;color:currentColor;line-height:inherit;border-width:var(--uui-button-border-width,1px);border-style:solid;border-radius:var(--uui-button-border-radius,var(--uui-border-radius,3px));cursor:pointer;padding:calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));box-shadow:none}a:not([href]):active,button[disabled]:active{animation:${Zt}}#icon-check,#icon-wrong{fill:currentColor;display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}:host(:not([color]):not([look=primary])),:host([color='']:not([look=primary])),:host([color=default]:not([look=primary])){--uui-button-contrast-hover:var(--uui-color-default-emphasis,#3544b1)}:host([color=warning][look=outline]) #button,:host([color=warning][look=placeholder]) #button{--uui-button-contrast-hover:var(--color-standalone)}#button{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-emphasis:var(--uui-color-default-emphasis,#3544b1);--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]) #button{--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-emphasis:var(--uui-color-positive-emphasis,rgb(13, 155, 98));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]) #button{--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-emphasis:var(--uui-color-warning-emphasis,rgb(251, 224, 101));--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]) #button{--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-emphasis:var(--uui-color-danger-emphasis,rgb(226, 60, 107));--color-contrast:var(--uui-color-danger-contrast,white)}:host([disabled]) #button{--color:var(--uui-color-disabled,#f3f3f5);--color-standalone:var(--uui-color-disabled-contrast,#c4c4c4);--color-emphasis:var(--uui-color-disabled,#f3f3f5);--color-contrast:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent)}:host(:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,transparent)}:host([look=primary]) #button{background-color:var(--uui-button-background-color,var(--color));color:var(--uui-button-contrast,var(--color-contrast));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=primary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--color-emphasis));color:var(--uui-button-contrast-hover,var(--color-contrast));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=primary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=secondary]) #button{background-color:var(--uui-button-background-color,var(--uui-color-surface-alt,#f3f3f5));color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=secondary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=secondary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=outline]) #button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2));font-weight:var(--uui-button-font-weight,700)}:host([look=outline]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=outline][disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}:host([look=placeholder]) #button{border-style:dashed;background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2))}:host([look=placeholder]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=placeholder][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}`],te([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),te([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),te([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),te([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),te([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),te([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),te([l({type:String})],n.UUIButtonElement.prototype,"href",2),te([l({type:String})],n.UUIButtonElement.prototype,"target",2),te([C("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=te([b("uui-button")],n.UUIButtonElement);let ot=class extends P{};ot.OPEN="open";var Nc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,It=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nc(e,t,o),o};n.UUICardElement=class extends Wt(Ze(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new ot(ot.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new ot(ot.OPEN)))}render(){return u`<slot></slot>`}},n.UUICardElement.styles=[p`:host{position:relative;display:flex;width:100%;justify-content:center;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));border-radius:var(--uui-border-radius,3px);min-height:var(--uui-layout-medium);background-color:var(--uui-color-surface,#fff);--uui-card-border-width:3px;transition:box-shadow .1s ease-out}:host(*) *{outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(:focus){outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width)}:host([error])::before{content:'';position:absolute;pointer-events:none;inset:0;width:100%;height:100%;z-index:1;box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-danger,#d42054);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([selectable])::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-card-border-width) * -1);width:calc(100% + calc(var(--uui-card-border-width) * 2));height:calc(100% + calc(var(--uui-card-border-width) * 2));box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-card-border-width));transition:opacity .1s ease-out;opacity:0}:host([selectable]:hover)::after{opacity:.33}:host([selectable][selected]:hover)::after{opacity:.66}:host([selectable][selected])::after{opacity:1}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}a{text-decoration:none;color:inherit}`],It([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),It([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),It([l({type:String})],n.UUICardElement.prototype,"href",2),It([l({type:String})],n.UUICardElement.prototype,"target",2),n.UUICardElement=It([b("uui-card")],n.UUICardElement);var Dc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,Yi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Dc(e,t,o),o},Vc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Pn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Sn=(i,e,t)=>(Vc(i,e,"access private method"),t),Zi,On,Qi,zn;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),Pn(this,Zi),Pn(this,Qi),this.name="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return w(this,"uui-icon"),u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return u`${this.href?Sn(this,Qi,zn).call(this):Sn(this,Zi,On).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},Zi=new WeakSet,On=function(){return u`<div id="open-part" tabindex="${this.disabled?U:0}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></div>`},Qi=new WeakSet,zn=function(){return u`<a id="open-part" tabindex="${this.disabled?U:0}" href="${x(this.disabled?void 0:this.href)}" target="${x(this.target||void 0)}" rel="${x(this.target==="_blank"?"noopener noreferrer":void 0)}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></a>`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px) var(--uui-size-4,12px)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name]){display:block;margin:var(--uui-size-1,3px);margin-top:var(--uui-size-3,9px)}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:calc(2 * var(--uui-size-3,9px))}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer}:host([disabled]) #open-part{pointer-events:none}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}#name{margin-top:4px}`],Yi([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),Yi([f()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=Yi([b("uui-card-content-node")],n.UUICardContentNodeElement);var Hc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Fc=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Hc(e,t,o),o};n.UUISymbolFolderElement=class extends m{render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M450.962 169.833v-19.248c0-23.398-19.035-42.436-42.434-42.436H257.306c-5.885-16.926-21.99-29.1-40.885-29.1h-89.758c-20.545 0-37.795 14.391-42.191 33.623-13.891 7.016-23.486 21.45-23.486 37.912V169.897c-7.148 7.774-11.443 18.122-11.443 29.287v.956l.062.953c.045.704 4.639 70.713 5.469 95.492l3.137 93.62c.033 6.024.682 14.788 5.271 23.301 6.564 12.175 19.002 19.442 33.273 19.442h318.49c14.273 0 26.713-7.268 33.275-19.445 4.588-8.512 5.236-17.275 5.271-23.298l3.135-93.62c.832-24.782 5.424-94.788 5.471-95.492l.061-.953v-.956c0-11.203-4.314-21.574-11.496-29.351zM90.093 150.585c0-7.281 5.84-13.189 13.09-13.318h-.125c5.324 0 9.441-9.694 9.441-13.382l-.006-1.562c0-7.824 6.344-14.168 14.17-14.168h89.758c7.826 0 14.166 6.344 14.166 14.168v1.562c0 3.663 4.062 13.239 9.332 13.37h168.609c7.363 0 13.328 5.969 13.328 13.33v9.201H90.093v-9.201zm337.744 145.028c-.854 25.538-3.15 94.062-3.15 94.062 0 7.825-1.617 14.171-9.441 14.171H96.755c-7.822 0-9.439-6.346-9.439-14.171l-3.152-94.062c-.855-25.538-5.516-96.428-5.516-96.428 0-6.893 4.926-12.631 11.445-13.9l331.764-.009c6.547 1.251 11.494 6.998 11.494 13.909 0 .001-4.657 70.89-5.514 96.428z"/></svg>`}},n.UUISymbolFolderElement.styles=[p`:host{display:block;box-sizing:border-box;position:relative;max-width:100px}#icon{fill:var(--uui-color-border,#d8d7d9)}`],n.UUISymbolFolderElement=Fc([b("uui-symbol-folder")],n.UUISymbolFolderElement);var Gc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,An=(i,e,t,r)=>{for(var o=r>1?void 0:r?qc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Gc(e,t,o),o};n.UUISymbolFileElement=class extends m{constructor(){super(...arguments),this.type=""}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"/></svg> ${this.type?u`<span id="file-type">${this.type.toUpperCase()}</span>`:""}`}},n.UUISymbolFileElement.styles=[p`:host{position:relative;display:block}#file-type{position:absolute;bottom:24%;left:25.5%;margin-left:calc(var(--uui-size-3,9px) * -1);padding:0 var(--uui-size-3,9px);font-weight:700;background-color:var(--uui-color-surface-alt,#f3f3f5);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#icon{fill:var(--uui-color-border-standalone,#c2c2c2)}`],An([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=An([b("uui-symbol-file")],n.UUISymbolFileElement);var Wc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,ti=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Wc(e,t,o),o},Xc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ln=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},jn=(i,e,t)=>(Xc(i,e,"access private method"),t),Ji,Tn,eo,Nn;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),Ln(this,Ji),Ln(this,eo),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),w(this,"uui-symbol-folder"),w(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?u`<uui-symbol-folder id="folder-symbol"></uui-symbol-folder>`:u`<uui-symbol-file id="file-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return u`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?jn(this,eo,Nn).call(this):jn(this,Ji,Tn).call(this)}<div id="select-border"></div><slot name="tag"></slot><slot name="actions"></slot>`}},Ji=new WeakSet,Tn=function(){return u`<button id="open-part" tabindex="${this.disabled?U:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></button>`},eo=new WeakSet,Nn=function(){return u`<a id="open-part" tabindex="${this.disabled?U:"0"}" href="${x(this.disabled?void 0:this.href)}" target="${x(this.target||void 0)}" rel="${x(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,p`#file-symbol,#folder-symbol{align-self:center;margin:var(--uui-size-14,42px);width:80%}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%}#open-part{position:absolute;bottom:0;width:100%;background-color:var(--uui-color-surface,#fff);color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);display:flex;justify-content:flex-start;align-items:center;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}`],ti([l({type:String})],n.UUICardMediaElement.prototype,"name",2),ti([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),ti([f()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=ti([b("uui-card-media")],n.UUICardMediaElement);var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Mn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zc(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Yc(e,t,o),o},Qc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Dn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Bn=(i,e,t)=>(Qc(i,e,"access private method"),t),to,Vn,io,Hn;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),Dn(this,to),Dn(this,io),this.name=""}connectedCallback(){super.connectedCallback(),w(this,"uui-avatar")}render(){return u`<uui-avatar id="avatar" name="${this.name}" size="m"></uui-avatar>${this.href?Bn(this,io,Hn).call(this):Bn(this,to,Vn).call(this)}<slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},to=new WeakSet,Vn=function(){return u`<div id="open-part" tabindex="${this.disabled?U:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></div>`},io=new WeakSet,Hn=function(){return u`<a id="open-part" tabindex="${this.disabled?U:"0"}" href="${x(this.disabled?void 0:this.href)}" target="${x(this.target||void 0)}" rel="${x(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px);align-items:center}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:var(--uui-size-6,18px)}::slotted(*){text-align:center}slot[name=tag]{position:absolute;top:6px;right:6px;display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#avatar{margin:var(--uui-size-3,9px)}slot[name=icon]::slotted(*){font-size:1.2em}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer;margin:0 0 3px 0}:host([disabled]) #open-part{pointer-events:none}#open-part>span{vertical-align:center;margin-top:3px}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}`],Mn([l({type:String})],n.UUICardUserElement.prototype,"name",2),n.UUICardUserElement=Mn([b("uui-card-user")],n.UUICardUserElement);var Jc=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,Rn=(i,e,t,r)=>{for(var o=r>1?void 0:r?eh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Jc(e,t,o),o};n.UUICaretElement=class extends m{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return u`<svg viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUICaretElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform-origin:50% 50%;transition:transform 280ms cubic-bezier(.17,-.88,.82,1.84)}:host([open]) svg{transform:rotate(180deg)}`],Rn([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=Rn([b("uui-caret")],n.UUICaretElement);var th=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,oh=(i,e,t,r)=>{for(var o=r>1?void 0:r?ih(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&th(e,t,o),o};n.UUICheckboxElement=class extends ee{renderCheckbox(){return u`<div id="ticker"><div id="icon-check">${ei}</div></div>`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...ee.styles,Yt,p`:host{--uui-checkbox-size:18px}#ticker{position:relative;grid-area:'input';display:flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:var(--uui-checkbox-size);height:var(--uui-checkbox-size);border-radius:var(--uui-checkbox-border-radius,var(--uui-border-radius,3px));color:var(--uui-toggle-color,var(--uui-color-selected-contrast,#fff));background-color:var(--uui-toggle-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-checkbox-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-checkbox-size) * .7)}label:hover input:not([disabled])+#ticker{border-color:var(--uui-checkbox-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}label:focus #ticker{border-color:var(--uui-checkbox-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-check{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:fill 120ms,opacity 120ms;fill:var(--uui-color-selected-contrast,#fff);opacity:0}#ticker::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:calc(var(--uui-checkbox-border-radius,var(--uui-border-radius,3px)) * .5);background-color:var(--uui-color-selected,#3544b1);transition:transform 120ms ease,opacity 120ms,background-color 120ms;transform:scale(0);opacity:0}label:hover input:checked:not([disabled])+#ticker::before{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check{opacity:1}label:focus input:checked+#ticker{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:focus+#ticker{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) #ticker,:host(:not([pristine])[internals-invalid]) label:focus input:checked+#ticker,:host(:not([pristine])[internals-invalid]) label:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker{border:1px solid var(--uui-color-danger-standalone,#bf214e)}:host([disabled]) #ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:checked+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker::before{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker #icon-check{fill:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #ticker{animation:${Zt}}:host([disabled]) input:checked+#ticker #icon-check{fill:var(--uui-color-disabled-contrast,#c4c4c4)}`],n.UUICheckboxElement=oh([b("uui-checkbox")],n.UUICheckboxElement);/**
|
|
436
|
+
*/const I=i=>i??U;var mh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,ne=(i,e,t,r)=>{for(var o=r>1?void 0:r?vh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&mh(e,t,o),o};n.UUIButtonElement=class extends ie(te("",Uc(m))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}_onHostClick(e){var t;if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if((t=this._internals)!=null&&t.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(this._resetStateTimeout),(this.state==="success"||this.state==="failed")&&(this._resetStateTimeout=setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":_(this,"uui-loader-circle"),e=u`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":_(this,"uui-icon"),e=u`<uui-icon name="check" .fallback="${li.strings[0]}"></uui-icon>`;break;case"failed":_(this,"uui-icon"),e=u`<uui-icon name="wrong" .fallback="${bh.strings[0]}"></uui-icon>`;break;default:return U}return u`<div id="state">${e}</div>`}render(){return this.href?u`<a id="button" aria-label="${this.label}" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button id="button" ?disabled="${this.disabled}" aria-label="${this.label}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUIButtonElement.styles=[ri,p`:host{position:relative;display:inline-flex;margin-left:calc(var(--uui-button-merge-border-left,0) * -1px);--uui-button-padding-left-factor:3;--uui-button-padding-right-factor:3;--uui-button-padding-top-factor:1;--uui-button-padding-bottom-factor:1;min-height:var(--uui-button-height,var(--uui-size-11,33px));max-height:100%;cursor:pointer;text-align:center;font-size:var(--uui-button-font-size,inherit);font-weight:var(--uui-button-font-weight,500);transition:background-color 80ms,border-color 80ms,color 80ms}:host([compact]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1;--uui-button-padding-top-factor:0;--uui-button-padding-bottom-factor:0}.label{line-height:normal;display:block;transition:opacity 120ms}:host([state]:not([state=''])) .label{opacity:0}#state{position:absolute;opacity:0;animation-name:fadeIn;animation-delay:40ms;animation-duration:360ms;animation-fill-mode:forwards;display:flex;justify-content:center;width:100%;height:100%;align-items:center}#button{width:100%;background-color:transparent;color:inherit;font-size:inherit;border-radius:inherit;font-family:inherit;font-weight:inherit;text-align:inherit;border:none;cursor:inherit;display:inline-flex;align-items:center;justify-content:var(--uui-button-content-align,center);text-decoration:none;color:currentColor;line-height:inherit;border-width:var(--uui-button-border-width,1px);border-style:solid;border-radius:var(--uui-button-border-radius,var(--uui-border-radius,3px));cursor:pointer;padding:calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));box-shadow:none}a:not([href]):active,button[disabled]:active{animation:${ni}}#icon-check,#icon-wrong{display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}:host(:not([color]):not([look=primary])),:host([color='']:not([look=primary])),:host([color=default]:not([look=primary])){--uui-button-contrast-hover:var(--uui-color-default-emphasis,#3544b1)}:host([color=warning][look=outline]) #button,:host([color=warning][look=placeholder]) #button{--uui-button-contrast-hover:var(--color-standalone)}#button{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-emphasis:var(--uui-color-default-emphasis,#3544b1);--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]) #button{--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-emphasis:var(--uui-color-positive-emphasis,rgb(13, 155, 98));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]) #button{--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-emphasis:var(--uui-color-warning-emphasis,rgb(251, 224, 101));--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]) #button{--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-emphasis:var(--uui-color-danger-emphasis,rgb(226, 60, 107));--color-contrast:var(--uui-color-danger-contrast,white)}:host([disabled]) #button{--color:var(--uui-color-disabled,#f3f3f5);--color-standalone:var(--uui-color-disabled-contrast,#c4c4c4);--color-emphasis:var(--uui-color-disabled,#f3f3f5);--color-contrast:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent)}:host(:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,transparent)}:host([look=primary]) #button{background-color:var(--uui-button-background-color,var(--color));color:var(--uui-button-contrast,var(--color-contrast));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=primary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--color-emphasis));color:var(--uui-button-contrast-hover,var(--color-contrast));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=primary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=secondary]) #button{background-color:var(--uui-button-background-color,var(--uui-color-surface-alt,#f3f3f5));color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=secondary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=secondary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=outline]) #button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2));font-weight:var(--uui-button-font-weight,700)}:host([look=outline]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=outline][disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}:host([look=placeholder]) #button{border-style:dashed;background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2))}:host([look=placeholder]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=placeholder][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}`],ne([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),ne([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),ne([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),ne([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),ne([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),ne([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),ne([l({type:String})],n.UUIButtonElement.prototype,"href",2),ne([l({type:String})],n.UUIButtonElement.prototype,"target",2),ne([C("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=ne([b("uui-button")],n.UUIButtonElement);let at=class extends P{};at.OPEN="open";var gh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,zt=(i,e,t,r)=>{for(var o=r>1?void 0:r?fh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&gh(e,t,o),o};n.UUICardElement=class extends ti(tt(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new at(at.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new at(at.OPEN)))}render(){return u`<slot></slot>`}},n.UUICardElement.styles=[p`:host{position:relative;display:flex;width:100%;justify-content:center;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));border-radius:var(--uui-border-radius,3px);min-height:var(--uui-layout-medium);background-color:var(--uui-color-surface,#fff);--uui-card-border-width:3px;transition:box-shadow .1s ease-out}:host(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(*) *{outline-color:var(--uui-color-focus,#3879ff)}:host(:focus){outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width)}:host([error])::before{content:'';position:absolute;pointer-events:none;inset:0;width:100%;height:100%;z-index:1;box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-danger,#d42054);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([selectable])::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-card-border-width) * -1);width:calc(100% + calc(var(--uui-card-border-width) * 2));height:calc(100% + calc(var(--uui-card-border-width) * 2));box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-card-border-width));transition:opacity .1s ease-out;opacity:0}:host([selectable]:hover)::after{opacity:.33}:host([selectable][selected]:hover)::after{opacity:.66}:host([selectable][selected])::after{opacity:1}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}a{text-decoration:none;color:inherit}`],zt([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),zt([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),zt([l({type:String})],n.UUICardElement.prototype,"href",2),zt([l({type:String})],n.UUICardElement.prototype,"target",2),n.UUICardElement=zt([b("uui-card")],n.UUICardElement);var yh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,ui=(i,e,t,r)=>{for(var o=r>1?void 0:r?wh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&yh(e,t,o),o},_h=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ea=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ta=(i,e,t)=>(_h(i,e,"access private method"),t),po,ia,bo,oa;n.UUICardBlockTypeElement=class extends n.UUICardElement{constructor(){super(...arguments),ea(this,po),ea(this,bo),this.name=""}render(){return u`<div id="portrait" style="${re({backgroundColor:this.background})}"><slot></slot></div>${this.href?ta(this,bo,oa).call(this):ta(this,po,ia).call(this)}<slot name="tag"></slot><slot name="actions"></slot>`}},po=new WeakSet,ia=function(){return u`<button id="open-part" tabindex="${this.disabled?U:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><strong>${this.name}</strong><small>${this.description}</small></button>`},bo=new WeakSet,oa=function(){return u`<a id="open-part" tabindex="${this.disabled?U:"0"}" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}"><strong>${this.name}</strong><small>${this.description}</small></a>`},n.UUICardBlockTypeElement.styles=[...n.UUICardElement.styles,p`:host{flex-direction:column;justify-content:flex-start}:host(:hover) #info{color:var(--uui-color-interactive-emphasis,#3544b1)}#portrait{background-color:var(--uui-color-surface-alt,#f3f3f5);display:flex;justify-content:center;min-height:150px;max-height:150px}slot:not([name])::slotted(*){align-self:center;font-size:var(--uui-size-8,24px);border-radius:var(--uui-border-radius,3px);object-fit:cover;max-width:100%;max-height:100%}#open-part{text-align:left;background-color:var(--uui-color-surface,#fff);cursor:pointer;color:var(--uui-color-interactive,#1b264f);border:none;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px);display:flex;flex-direction:column;line-height:var(--uui-size-6,18px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover strong{text-decoration:underline}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}`],ui([l({type:String})],n.UUICardBlockTypeElement.prototype,"name",2),ui([l({type:String})],n.UUICardBlockTypeElement.prototype,"description",2),ui([l({type:String,attribute:"background"})],n.UUICardBlockTypeElement.prototype,"background",2),n.UUICardBlockTypeElement=ui([b("uui-card-block-type")],n.UUICardBlockTypeElement);var $h=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,mo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Uh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&$h(e,t,o),o},Eh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ra=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},na=(i,e,t)=>(Eh(i,e,"access private method"),t),vo,aa,go,sa;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),ra(this,vo),ra(this,go),this.name="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return _(this,"uui-icon"),u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return u`${this.href?na(this,go,sa).call(this):na(this,vo,aa).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},vo=new WeakSet,aa=function(){return u`<div id="open-part" tabindex="${this.disabled?U:0}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></div>`},go=new WeakSet,sa=function(){return u`<a id="open-part" tabindex="${this.disabled?U:0}" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></a>`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px) var(--uui-size-4,12px)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name]){display:block;margin:var(--uui-size-1,3px);margin-top:var(--uui-size-3,9px)}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:calc(2 * var(--uui-size-3,9px))}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer}:host([disabled]) #open-part{pointer-events:none}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}#name{margin-top:4px}`],mo([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),mo([g()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=mo([b("uui-card-content-node")],n.UUICardContentNodeElement);var kh=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,Ih=(i,e,t,r)=>{for(var o=r>1?void 0:r?xh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&kh(e,t,o),o};n.UUISymbolFolderElement=class extends m{render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M450.962 169.833v-19.248c0-23.398-19.035-42.436-42.434-42.436H257.306c-5.885-16.926-21.99-29.1-40.885-29.1h-89.758c-20.545 0-37.795 14.391-42.191 33.623-13.891 7.016-23.486 21.45-23.486 37.912V169.897c-7.148 7.774-11.443 18.122-11.443 29.287v.956l.062.953c.045.704 4.639 70.713 5.469 95.492l3.137 93.62c.033 6.024.682 14.788 5.271 23.301 6.564 12.175 19.002 19.442 33.273 19.442h318.49c14.273 0 26.713-7.268 33.275-19.445 4.588-8.512 5.236-17.275 5.271-23.298l3.135-93.62c.832-24.782 5.424-94.788 5.471-95.492l.061-.953v-.956c0-11.203-4.314-21.574-11.496-29.351zM90.093 150.585c0-7.281 5.84-13.189 13.09-13.318h-.125c5.324 0 9.441-9.694 9.441-13.382l-.006-1.562c0-7.824 6.344-14.168 14.17-14.168h89.758c7.826 0 14.166 6.344 14.166 14.168v1.562c0 3.663 4.062 13.239 9.332 13.37h168.609c7.363 0 13.328 5.969 13.328 13.33v9.201H90.093v-9.201zm337.744 145.028c-.854 25.538-3.15 94.062-3.15 94.062 0 7.825-1.617 14.171-9.441 14.171H96.755c-7.822 0-9.439-6.346-9.439-14.171l-3.152-94.062c-.855-25.538-5.516-96.428-5.516-96.428 0-6.893 4.926-12.631 11.445-13.9l331.764-.009c6.547 1.251 11.494 6.998 11.494 13.909 0 .001-4.657 70.89-5.514 96.428z"/></svg>`}},n.UUISymbolFolderElement.styles=[p`:host{display:block;box-sizing:border-box;position:relative;max-width:100px}#icon{fill:var(--uui-color-border,#d8d7d9)}`],n.UUISymbolFolderElement=Ih([b("uui-symbol-folder")],n.UUISymbolFolderElement);var Ch=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,la=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ch(e,t,o),o};n.UUISymbolFileElement=class extends m{constructor(){super(...arguments),this.type=""}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"/></svg> ${this.type?u`<span id="file-type">${this.type.toUpperCase()}</span>`:""}`}},n.UUISymbolFileElement.styles=[p`:host{position:relative;display:block}#file-type{position:absolute;bottom:24%;left:25.5%;margin-left:calc(var(--uui-size-3,9px) * -1);padding:0 var(--uui-size-3,9px);font-weight:700;background-color:var(--uui-color-surface-alt,#f3f3f5);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#icon{fill:var(--uui-color-border-standalone,#c2c2c2)}`],la([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=la([b("uui-symbol-file")],n.UUISymbolFileElement);var Ph=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,ci=(i,e,t,r)=>{for(var o=r>1?void 0:r?Oh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ph(e,t,o),o},zh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ua=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ca=(i,e,t)=>(zh(i,e,"access private method"),t),fo,ha,yo,da;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),ua(this,fo),ua(this,yo),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?u`<uui-symbol-folder id="folder-symbol"></uui-symbol-folder>`:u`<uui-symbol-file id="file-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return u`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?ca(this,yo,da).call(this):ca(this,fo,ha).call(this)}<div id="select-border"></div><slot name="tag"></slot><slot name="actions"></slot>`}},fo=new WeakSet,ha=function(){return u`<button id="open-part" tabindex="${this.disabled?U:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></button>`},yo=new WeakSet,da=function(){return u`<a id="open-part" tabindex="${this.disabled?U:"0"}" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,p`#file-symbol,#folder-symbol{align-self:center;margin:var(--uui-size-14,42px);width:80%}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%}#open-part{position:absolute;bottom:0;width:100%;background-color:var(--uui-color-surface,#fff);color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);display:flex;justify-content:flex-start;align-items:center;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}`],ci([l({type:String})],n.UUICardMediaElement.prototype,"name",2),ci([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),ci([g()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=ci([b("uui-card-media")],n.UUICardMediaElement);var Ah=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,wo=(i,e,t,r)=>{for(var o=r>1?void 0:r?jh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ah(e,t,o),o},Lh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},pa=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ba=(i,e,t)=>(Lh(i,e,"access private method"),t),_o,ma,$o,va;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),pa(this,_o),pa(this,$o),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=sh(e.target)}}connectedCallback(){super.connectedCallback(),_(this,"uui-avatar")}render(){return u`${this._avatarSlotHasContent?U:u`<uui-avatar id="avatar" name="${this.name}" size="m"></uui-avatar>`}<slot name="avatar" id="avatar" @slotchange="${this._avatarSlotChanged}"></slot>${this.href?ba(this,$o,va).call(this):ba(this,_o,ma).call(this)}<slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},_o=new WeakSet,ma=function(){return u`<div id="open-part" tabindex="${this.disabled?U:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></div>`},$o=new WeakSet,va=function(){return u`<a id="open-part" tabindex="${this.disabled?U:"0"}" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px);align-items:center}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:var(--uui-size-6,18px)}::slotted(*){text-align:center}slot[name=tag]{position:absolute;top:6px;right:6px;display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#avatar{margin:var(--uui-size-3,9px)}slot[name=icon]::slotted(*){font-size:1.2em}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer;margin:0 0 3px 0}:host([disabled]) #open-part{pointer-events:none}#open-part>span{vertical-align:center;margin-top:3px}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}`],wo([l({type:String})],n.UUICardUserElement.prototype,"name",2),wo([g()],n.UUICardUserElement.prototype,"_avatarSlotHasContent",2),n.UUICardUserElement=wo([b("uui-card-user")],n.UUICardUserElement);var Th=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,ga=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Th(e,t,o),o};n.UUICaretElement=class extends m{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return u`<svg viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUICaretElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform-origin:50% 50%;transition:transform 280ms cubic-bezier(.17,-.88,.82,1.84)}:host([open]) svg{transform:rotate(180deg)}`],ga([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=ga([b("uui-caret")],n.UUICaretElement);var Mh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Bh=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Mh(e,t,o),o};n.UUICheckboxElement=class extends oe{renderCheckbox(){return u`<div id="ticker"><div id="icon-check">${li}</div></div>`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...oe.styles,ri,p`:host{--uui-checkbox-size:18px}#ticker{position:relative;grid-area:'input';display:flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:var(--uui-checkbox-size);height:var(--uui-checkbox-size);border-radius:var(--uui-checkbox-border-radius,var(--uui-border-radius,3px));color:var(--uui-toggle-color,var(--uui-color-selected-contrast,#fff));background-color:var(--uui-toggle-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-checkbox-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-checkbox-size) * .7)}label:hover input:not([disabled])+#ticker{border-color:var(--uui-checkbox-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}label:focus #ticker{border-color:var(--uui-checkbox-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-check{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:fill 120ms,opacity 120ms;color:var(--uui-color-selected-contrast,#fff);opacity:0}#ticker::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:calc(var(--uui-checkbox-border-radius,var(--uui-border-radius,3px)) * .5);background-color:var(--uui-color-selected,#3544b1);transition:transform 120ms ease,opacity 120ms,background-color 120ms;transform:scale(0);opacity:0}label:hover input:checked:not([disabled])+#ticker::before{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check{opacity:1}label:focus input:checked+#ticker{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:focus+#ticker{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) #ticker,:host(:not([pristine])[internals-invalid]) label:focus input:checked+#ticker,:host(:not([pristine])[internals-invalid]) label:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker{border:1px solid var(--uui-color-danger-standalone,#bf214e)}:host([disabled]) #ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:checked+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker::before{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #ticker{animation:${ni}}:host([disabled]) input:checked+#ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],n.UUICheckboxElement=Bh([b("uui-checkbox")],n.UUICheckboxElement);/**
|
|
434
437
|
* @license
|
|
435
438
|
* Copyright 2018 Google LLC
|
|
436
439
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
437
|
-
*/const oo=tt(class extends it{constructor(i){var e;if(super(i),i.type!==X.ATTRIBUTE||i.name!=="class"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(e=>i[e]).join(" ")+" "}update(i,[e]){var t,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!(!((t=this.nt)===null||t===void 0)&&t.has(a))&&this.it.add(a);return this.render(e)}const o=i.element.classList;this.it.forEach(a=>{a in e||(o.remove(a),this.it.delete(a))});for(const a in e){const s=!!e[a];s===this.it.has(a)||!((r=this.nt)===null||r===void 0)&&r.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return D}});var rh={grad:.9,turn:360,rad:360/(2*Math.PI)},ce=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},L=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},G=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Fn=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Gn=function(i){return{r:G(i.r,0,255),g:G(i.g,0,255),b:G(i.b,0,255),a:G(i.a)}},ro=function(i){return{r:L(i.r),g:L(i.g),b:L(i.b),a:L(i.a,3)}},nh=/^#([0-9a-f]{3,8})$/i,ii=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},qn=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=Math.max(e,t,r),s=a-Math.min(e,t,r),h=s?a===e?(t-r)/s:a===t?2+(r-e)/s:4+(e-t)/s:0;return{h:60*(h<0?h+6:h),s:a?s/a*100:0,v:a/255*100,a:o}},Wn=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var a=Math.floor(e),s=r*(1-t),h=r*(1-(e-a)*t),c=r*(1-(1-e+a)*t),d=a%6;return{r:255*[r,h,s,s,c,r][d],g:255*[c,r,r,h,s,s][d],b:255*[s,s,c,r,r,h][d],a:o}},Kn=function(i){return{h:Fn(i.h),s:G(i.s,0,100),l:G(i.l,0,100),a:G(i.a)}},Xn=function(i){return{h:L(i.h),s:L(i.s),l:L(i.l),a:L(i.a,3)}},Yn=function(i){return Wn((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Ct=function(i){return{h:(e=qn(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},ah=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,lh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zn={string:[[function(i){var e=nh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?L(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?L(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=lh.exec(i)||uh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Gn({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=ah.exec(i)||sh.exec(i);if(!e)return null;var t,r,o=Kn({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(rh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Yn(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=o===void 0?1:o;return ce(e)&&ce(t)&&ce(r)?Gn({r:Number(e),g:Number(t),b:Number(r),a:Number(a)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,a=o===void 0?1:o;if(!ce(e)||!ce(t)||!ce(r))return null;var s=Kn({h:Number(e),s:Number(t),l:Number(r),a:Number(a)});return Yn(s)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,a=o===void 0?1:o;if(!ce(e)||!ce(t)||!ce(r))return null;var s=function(h){return{h:Fn(h.h),s:G(h.s,0,100),v:G(h.v,0,100),a:G(h.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(a)});return Wn(s)},"hsv"]]},Qn=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},ch=function(i){return typeof i=="string"?Qn(i.trim(),Zn.string):typeof i=="object"&&i!==null?Qn(i,Zn.object):[null,void 0]},no=function(i,e){var t=Ct(i);return{h:t.h,s:G(t.s+100*e,0,100),l:t.l,a:t.a}},ao=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Jn=function(i,e){var t=Ct(i);return{h:t.h,s:t.s,l:G(t.l+100*e,0,100),a:t.a}},ea=function(){function i(e){this.parsed=ch(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return L(ao(this.rgba),2)},i.prototype.isDark=function(){return ao(this.rgba)<.5},i.prototype.isLight=function(){return ao(this.rgba)>=.5},i.prototype.toHex=function(){return e=ro(this.rgba),t=e.r,r=e.g,o=e.b,s=(a=e.a)<1?ii(L(255*a)):"","#"+ii(t)+ii(r)+ii(o)+s;var e,t,r,o,a,s},i.prototype.toRgb=function(){return ro(this.rgba)},i.prototype.toRgbString=function(){return e=ro(this.rgba),t=e.r,r=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+o+", "+a+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,a},i.prototype.toHsl=function(){return Xn(Ct(this.rgba))},i.prototype.toHslString=function(){return e=Xn(Ct(this.rgba)),t=e.h,r=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+a+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,a},i.prototype.toHsv=function(){return e=qn(this.rgba),{h:L(e.h),s:L(e.s),v:L(e.v),a:L(e.a,3)};var e},i.prototype.invert=function(){return q({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),q(no(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),q(no(this.rgba,-e))},i.prototype.grayscale=function(){return q(no(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),q(Jn(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),q(Jn(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?q({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):L(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Ct(this.rgba);return typeof e=="number"?q({h:e,s:t.s,l:t.l,a:t.a}):L(t.h)},i.prototype.isEqual=function(e){return this.toHex()===q(e).toHex()},i}(),q=function(i){return i instanceof ea?i:new ea(i)},hh=Object.defineProperty,ta=Object.getOwnPropertySymbols,dh=Object.prototype.hasOwnProperty,ph=Object.prototype.propertyIsEnumerable,ia=(i,e,t)=>e in i?hh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,oa=(i,e)=>{for(var t in e||(e={}))dh.call(e,t)&&ia(i,t,e[t]);if(ta)for(var t of ta(e))ph.call(e,t)&&ia(i,t,e[t]);return i};let oi=class extends P{constructor(e,t={}){super(e,oa(oa({},{bubbles:!0}),t))}};oi.CHANGE="change";var bh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,he=(i,e,t,r)=>{for(var o=r>1?void 0:r?mh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&bh(e,t,o),o};n.UUIColorAreaElement=class extends m{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000",this.disabled=!1}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=q(e);if(r.isValid()){const{h:o,s:a,l:s}=r.toHsl();this.hue=o,this.saturation=a,this.lightness=s,this.brightness=this.getBrightness(s)}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled)return;const t=this.shadowRoot.querySelector(".color-area"),r=t.querySelector(".color-area__handle"),{width:o,height:a}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,kn(t,{onMove:(s,h)=>{isNaN(s)||isNaN(h)||(this.saturation=S(s/o*100,0,100),this.brightness=S(100-h/a*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=S(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=S(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=S(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=S(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return S(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return S((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=q({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new oi(oi.CHANGE))}getHexString(e,t,r,o=100){const a=q(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return a.isValid()?a.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return u`<div part="grid" class="color-area" style="${ue({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${oo({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${ue({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}" role="application" tabindex="${x(this.disabled?void 0:"0")}" aria-label="HSB" @keydown="${this.handleGridKeyDown}"></span></div>`}},n.UUIColorAreaElement.styles=[p`:host{display:inline-block;width:280px;height:200px}:host([disabled]){cursor:not-allowed}:host([disabled]) .color-area{user-select:none;pointer-events:none;opacity:.55}.color-area{position:relative;height:100%;width:100%;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);box-sizing:border-box;cursor:crosshair;forced-color-adjust:none}.color-area__handle{position:absolute;width:var(--uui-color-area-grid-handle-size,16px);height:var(--uui-color-area-grid-handle-size,16px);border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);border:solid 2px #fff;margin-top:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);margin-left:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);transition:150ms transform;box-sizing:inherit}.color-area__handle--dragging{cursor:none;transform:scale(1.5)}.color-area__handle--empty{display:none}`],he([f()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),he([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),he([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),he([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),he([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),he([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),he([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),he([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),n.UUIColorAreaElement=he([b("uui-color-area")],n.UUIColorAreaElement);/**
|
|
440
|
+
*/const Uo=rt(class extends nt{constructor(i){var e;if(super(i),i.type!==Q.ATTRIBUTE||i.name!=="class"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(e=>i[e]).join(" ")+" "}update(i,[e]){var t,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!(!((t=this.nt)===null||t===void 0)&&t.has(a))&&this.it.add(a);return this.render(e)}const o=i.element.classList;this.it.forEach(a=>{a in e||(o.remove(a),this.it.delete(a))});for(const a in e){const s=!!e[a];s===this.it.has(a)||!((r=this.nt)===null||r===void 0)&&r.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return V}});var Vh={grad:.9,turn:360,rad:360/(2*Math.PI)},be=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},L=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},W=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},fa=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ya=function(i){return{r:W(i.r,0,255),g:W(i.g,0,255),b:W(i.b,0,255),a:W(i.a)}},Eo=function(i){return{r:L(i.r),g:L(i.g),b:L(i.b),a:L(i.a,3)}},Hh=/^#([0-9a-f]{3,8})$/i,hi=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},wa=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=Math.max(e,t,r),s=a-Math.min(e,t,r),c=s?a===e?(t-r)/s:a===t?2+(r-e)/s:4+(e-t)/s:0;return{h:60*(c<0?c+6:c),s:a?s/a*100:0,v:a/255*100,a:o}},_a=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var a=Math.floor(e),s=r*(1-t),c=r*(1-(e-a)*t),h=r*(1-(1-e+a)*t),d=a%6;return{r:255*[r,c,s,s,h,r][d],g:255*[h,r,r,c,s,s][d],b:255*[s,s,h,r,r,c][d],a:o}},$a=function(i){return{h:fa(i.h),s:W(i.s,0,100),l:W(i.l,0,100),a:W(i.a)}},Ua=function(i){return{h:L(i.h),s:L(i.s),l:L(i.l),a:L(i.a,3)}},Ea=function(i){return _a((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},At=function(i){return{h:(e=wa(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Rh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ka={string:[[function(i){var e=Hh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?L(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?L(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Gh.exec(i)||qh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ya({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Rh.exec(i)||Fh.exec(i);if(!e)return null;var t,r,o=$a({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Vh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Ea(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=o===void 0?1:o;return be(e)&&be(t)&&be(r)?ya({r:Number(e),g:Number(t),b:Number(r),a:Number(a)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,a=o===void 0?1:o;if(!be(e)||!be(t)||!be(r))return null;var s=$a({h:Number(e),s:Number(t),l:Number(r),a:Number(a)});return Ea(s)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,a=o===void 0?1:o;if(!be(e)||!be(t)||!be(r))return null;var s=function(c){return{h:fa(c.h),s:W(c.s,0,100),v:W(c.v,0,100),a:W(c.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(a)});return _a(s)},"hsv"]]},xa=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Wh=function(i){return typeof i=="string"?xa(i.trim(),ka.string):typeof i=="object"&&i!==null?xa(i,ka.object):[null,void 0]},ko=function(i,e){var t=At(i);return{h:t.h,s:W(t.s+100*e,0,100),l:t.l,a:t.a}},xo=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Ia=function(i,e){var t=At(i);return{h:t.h,s:t.s,l:W(t.l+100*e,0,100),a:t.a}},Ca=function(){function i(e){this.parsed=Wh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return L(xo(this.rgba),2)},i.prototype.isDark=function(){return xo(this.rgba)<.5},i.prototype.isLight=function(){return xo(this.rgba)>=.5},i.prototype.toHex=function(){return e=Eo(this.rgba),t=e.r,r=e.g,o=e.b,s=(a=e.a)<1?hi(L(255*a)):"","#"+hi(t)+hi(r)+hi(o)+s;var e,t,r,o,a,s},i.prototype.toRgb=function(){return Eo(this.rgba)},i.prototype.toRgbString=function(){return e=Eo(this.rgba),t=e.r,r=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+o+", "+a+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,a},i.prototype.toHsl=function(){return Ua(At(this.rgba))},i.prototype.toHslString=function(){return e=Ua(At(this.rgba)),t=e.h,r=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+a+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,a},i.prototype.toHsv=function(){return e=wa(this.rgba),{h:L(e.h),s:L(e.s),v:L(e.v),a:L(e.a,3)};var e},i.prototype.invert=function(){return K({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),K(ko(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),K(ko(this.rgba,-e))},i.prototype.grayscale=function(){return K(ko(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),K(Ia(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),K(Ia(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?K({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):L(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=At(this.rgba);return typeof e=="number"?K({h:e,s:t.s,l:t.l,a:t.a}):L(t.h)},i.prototype.isEqual=function(e){return this.toHex()===K(e).toHex()},i}(),K=function(i){return i instanceof Ca?i:new Ca(i)},Kh=Object.defineProperty,Sa=Object.getOwnPropertySymbols,Xh=Object.prototype.hasOwnProperty,Yh=Object.prototype.propertyIsEnumerable,Pa=(i,e,t)=>e in i?Kh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Oa=(i,e)=>{for(var t in e||(e={}))Xh.call(e,t)&&Pa(i,t,e[t]);if(Sa)for(var t of Sa(e))Yh.call(e,t)&&Pa(i,t,e[t]);return i};let di=class extends P{constructor(e,t={}){super(e,Oa(Oa({},{bubbles:!0}),t))}};di.CHANGE="change";var Zh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,me=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zh(e,t,o),o};n.UUIColorAreaElement=class extends m{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000",this.disabled=!1}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=K(e);if(r.isValid()){const{h:o,s:a,l:s}=r.toHsl();this.hue=o,this.saturation=a,this.lightness=s,this.brightness=this.getBrightness(s)}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled)return;const t=this.shadowRoot.querySelector(".color-area"),r=t.querySelector(".color-area__handle"),{width:o,height:a}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,Qn(t,{onMove:(s,c)=>{isNaN(s)||isNaN(c)||(this.saturation=O(s/o*100,0,100),this.brightness=O(100-c/a*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=O(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=O(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=O(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=O(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return O(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return O((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=K({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new di(di.CHANGE))}getHexString(e,t,r,o=100){const a=K(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return a.isValid()?a.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return u`<div part="grid" class="color-area" style="${re({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${Uo({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${re({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}" role="application" tabindex="${I(this.disabled?void 0:"0")}" aria-label="HSB" @keydown="${this.handleGridKeyDown}"></span></div>`}},n.UUIColorAreaElement.styles=[p`:host{display:inline-block;width:280px;height:200px}:host([disabled]){cursor:not-allowed}:host([disabled]) .color-area{user-select:none;pointer-events:none;opacity:.55}.color-area{position:relative;height:100%;width:100%;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);box-sizing:border-box;cursor:crosshair;forced-color-adjust:none}.color-area__handle{position:absolute;width:var(--uui-color-area-grid-handle-size,16px);height:var(--uui-color-area-grid-handle-size,16px);border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);border:solid 2px #fff;margin-top:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);margin-left:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);transition:150ms transform;box-sizing:inherit}.color-area__handle--dragging{cursor:none;transform:scale(1.5)}.color-area__handle--empty{display:none}`],me([g()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),me([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),me([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),n.UUIColorAreaElement=me([b("uui-color-area")],n.UUIColorAreaElement);/**
|
|
438
441
|
* @license
|
|
439
442
|
* Copyright 2020 Google LLC
|
|
440
443
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
441
|
-
*/const{I:
|
|
444
|
+
*/const{I:Jh}=Il,za=i=>i.strings===void 0,Aa=()=>document.createComment(""),jt=(i,e,t)=>{var r;const o=i._$AA.parentNode,a=e===void 0?i._$AB:e._$AA;if(t===void 0){const s=o.insertBefore(Aa(),a),c=o.insertBefore(Aa(),a);t=new Jh(s,c,i,i.options)}else{const s=t._$AB.nextSibling,c=t._$AM,h=c!==i;if(h){let d;(r=t._$AQ)===null||r===void 0||r.call(t,i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==c._$AU&&t._$AP(d)}if(s!==a||h){let d=t._$AA;for(;d!==s;){const v=d.nextSibling;o.insertBefore(d,a),d=v}}}return t},Be=(i,e,t=i)=>(i._$AI(e,t),i),ed={},ja=(i,e=ed)=>i._$AH=e,td=i=>i._$AH,Io=i=>{var e;(e=i._$AP)===null||e===void 0||e.call(i,!1,!0);let t=i._$AA;const r=i._$AB.nextSibling;for(;t!==r;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
442
445
|
* @license
|
|
443
446
|
* Copyright 2020 Google LLC
|
|
444
447
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
445
|
-
*/const yh=tt(class extends it{constructor(i){if(super(i),i.type!==X.PROPERTY&&i.type!==X.ATTRIBUTE&&i.type!==X.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ra(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===D||e===U)return e;const t=i.element,r=i.name;if(i.type===X.PROPERTY){if(e===t[r])return D}else if(i.type===X.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return D}else if(i.type===X.ATTRIBUTE&&t.getAttribute(r)===e+"")return D;return aa(i),e}});var _h={grad:.9,turn:360,rad:360/(2*Math.PI)},de=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},j=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},W=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},sa=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},la=function(i){return{r:W(i.r,0,255),g:W(i.g,0,255),b:W(i.b,0,255),a:W(i.a)}},lo=function(i){return{r:j(i.r),g:j(i.g),b:j(i.b),a:j(i.a,3)}},wh=/^#([0-9a-f]{3,8})$/i,ri=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ua=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=Math.max(e,t,r),s=a-Math.min(e,t,r),h=s?a===e?(t-r)/s:a===t?2+(r-e)/s:4+(e-t)/s:0;return{h:60*(h<0?h+6:h),s:a?s/a*100:0,v:a/255*100,a:o}},ca=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var a=Math.floor(e),s=r*(1-t),h=r*(1-(e-a)*t),c=r*(1-(1-e+a)*t),d=a%6;return{r:255*[r,h,s,s,c,r][d],g:255*[c,r,r,h,s,s][d],b:255*[s,s,c,r,r,h][d],a:o}},ha=function(i){return{h:sa(i.h),s:W(i.s,0,100),l:W(i.l,0,100),a:W(i.a)}},da=function(i){return{h:j(i.h),s:j(i.s),l:j(i.l),a:j(i.a,3)}},pa=function(i){return ca((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},St=function(i){return{h:(e=ua(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},$h=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Uh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Eh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,uo={string:[[function(i){var e=wh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?j(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?j(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Eh.exec(i)||kh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:la({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=$h.exec(i)||Uh.exec(i);if(!e)return null;var t,r,o=ha({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(_h[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return pa(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=o===void 0?1:o;return de(e)&&de(t)&&de(r)?la({r:Number(e),g:Number(t),b:Number(r),a:Number(a)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,a=o===void 0?1:o;if(!de(e)||!de(t)||!de(r))return null;var s=ha({h:Number(e),s:Number(t),l:Number(r),a:Number(a)});return pa(s)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,a=o===void 0?1:o;if(!de(e)||!de(t)||!de(r))return null;var s=function(h){return{h:sa(h.h),s:W(h.s,0,100),v:W(h.v,0,100),a:W(h.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(a)});return ca(s)},"hsv"]]},ba=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},xh=function(i){return typeof i=="string"?ba(i.trim(),uo.string):typeof i=="object"&&i!==null?ba(i,uo.object):[null,void 0]},co=function(i,e){var t=St(i);return{h:t.h,s:W(t.s+100*e,0,100),l:t.l,a:t.a}},ho=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},ma=function(i,e){var t=St(i);return{h:t.h,s:t.s,l:W(t.l+100*e,0,100),a:t.a}},ni=function(){function i(e){this.parsed=xh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return j(ho(this.rgba),2)},i.prototype.isDark=function(){return ho(this.rgba)<.5},i.prototype.isLight=function(){return ho(this.rgba)>=.5},i.prototype.toHex=function(){return e=lo(this.rgba),t=e.r,r=e.g,o=e.b,s=(a=e.a)<1?ri(j(255*a)):"","#"+ri(t)+ri(r)+ri(o)+s;var e,t,r,o,a,s},i.prototype.toRgb=function(){return lo(this.rgba)},i.prototype.toRgbString=function(){return e=lo(this.rgba),t=e.r,r=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+o+", "+a+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,a},i.prototype.toHsl=function(){return da(St(this.rgba))},i.prototype.toHslString=function(){return e=da(St(this.rgba)),t=e.h,r=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+a+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,a},i.prototype.toHsv=function(){return e=ua(this.rgba),{h:j(e.h),s:j(e.s),v:j(e.v),a:j(e.a,3)};var e},i.prototype.invert=function(){return ie({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),ie(co(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ie(co(this.rgba,-e))},i.prototype.grayscale=function(){return ie(co(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ie(ma(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ie(ma(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?ie({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):j(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=St(this.rgba);return typeof e=="number"?ie({h:e,s:t.s,l:t.l,a:t.a}):j(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ie(e).toHex()},i}(),ie=function(i){return i instanceof ni?i:new ni(i)},va=[],Ih=function(i){i.forEach(function(e){va.indexOf(e)<0&&(e(ni,uo),va.push(e))})};function Ch(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var a={};i.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var h,c,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var v=this.toRgb(),g=1/0,y="black";if(!a.length)for(var $ in t)a[$]=new i(t[$]).toRgb();for(var E in t){var k=(h=v,c=a[E],Math.pow(h.r-c.r,2)+Math.pow(h.g-c.g,2)+Math.pow(h.b-c.b,2));k<g&&(g=k,y=E)}return y}},e.string.push([function(s){var h=s.toLowerCase(),c=h==="transparent"?"#0000":t[h];return c?new i(c).toRgb():null},"name"])}var Ph=Object.defineProperty,ga=Object.getOwnPropertySymbols,Sh=Object.prototype.hasOwnProperty,Oh=Object.prototype.propertyIsEnumerable,fa=(i,e,t)=>e in i?Ph(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ya=(i,e)=>{for(var t in e||(e={}))Sh.call(e,t)&&fa(i,t,e[t]);if(ga)for(var t of ga(e))Oh.call(e,t)&&fa(i,t,e[t]);return i};let ai=class extends P{constructor(e,t={}){super(e,ya(ya({},{bubbles:!0}),t))}};ai.CHANGE="change";var zh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,z=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ah(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&zh(e,t,o),o};Ih([Ch]);const _a="EyeDropper"in window;n.UUIColorPickerElement=class extends Q("label",m){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=ie("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),w(this,"uui-icon"),w(this,"uui-icon-registry-essential"),w(this,"uui-input"),w(this,"uui-button"),w(this,"uui-button-group"),w(this,"uui-popover"),w(this,"uui-color-swatches"),w(this,"uui-color-swatch"),w(this,"uui-color-area"),w(this,"uui-color-slider")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:a,g:s,b:h}=this._colord.toRgb(),{h:c,s:d,l:v}=this._colord.toHsl(),{v:g}=this._colord.toHsv(),y=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${a}, ${s}, ${h})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${c}, ${d}%, ${v}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${c}, ${d}%, ${v}%)`);case"hsva":return this.setLetterCase(`hsva(${c}, ${d}%, ${g}%, ${y})`);default:return""}}getBrightness(e){return S(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return S((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r=e.target,o={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(r.value)/100};this.setColor(o)}handleHueChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(r)}handleGridChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r=e.target,o={h:this.hue,s:r.saturation,l:r.lightness,a:this.alpha/100};this.setColor(o)}handleInputChange(e){var t;(t=this._swatches)==null||t.resetSelection();const r=e.target;r.value?(this.setColor(r.value),r.value=this.value):this.setColor("#000"),e.stopPropagation()}handleInputKeyDown(e){var t;e.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),(t=this._swatches)==null||t.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;t.value?this.setColor(t.value):this.setColor("#000")}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}openColorPicker(e){e.stopImmediatePropagation();const t=e.target,r=t.parentElement;r.open=!(r!=null&&r.open),t.setAttribute("aria-expanded",r.open.toString())}closeColorPicker(e){const t=e.target.querySelector("button[part=trigger]");t&&t.setAttribute("aria-expanded","false")}handleEyeDropper(){_a&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){this._colord=new ni(e);const{h:t,l:r,s:o,a}=this._colord.toHsl();return this.hue=t,this.saturation=o,this.lightness=r,this.alpha=this.opacity?a*100:100,this._syncValues(),this.dispatchEvent(new ai(ai.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return u`<div class="${oo({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}" aria-disabled="${this.disabled?"true":"false"}"><uui-color-area .value="${this.value}" ?disabled="${this.disabled}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" @change="${this.handleHueChange}"></uui-color-slider>${this.opacity?u`<uui-color-slider label="alpha" class="opacity-slider" .value="${Math.round(this.alpha)}" type="opacity" .color="${this.value}" ?disabled="${this.disabled}" @change="${this.handleAlphaChange}"></uui-color-slider>`:""}</div><button type="button" part="preview" class="color-picker__preview color-picker__transparent-bg" title="Copy" aria-label="Copy" style="${ue({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" @click="${this.handleCopy}"></button></div><div class="color-picker__user-input" aria-live="polite"><uui-input label="label" type="text" part="input" name="${this.name}" autocomplete="off" autocapitalize="off" spellcheck="false" .value="${yh(this.inputValue)}" ?disabled="${this.disabled}" @keydown="${this.handleInputKeyDown}" @change="${this.handleInputChange}"></uui-input><uui-button-group>${this.noFormatToggle?"":u`<uui-button label="Toggle color format" @click="${this.handleFormatToggle}" class="color-picker__toggle-format" ?disabled="${this.disabled}" compact="compact"><span>${this.format}</span></uui-button>`} ${_a?u`<uui-button label="Select a color" ?disabled="${this.disabled}" @click="${this.handleEyeDropper}" compact="compact"><uui-icon-registry-essential><uui-icon name="colorpicker"></uui-icon></uui-icon-registry-essential></uui-button>`:""}</uui-button-group></div>${this._renderSwatches()}</div>`}_renderSwatches(){return this.swatches?u`<uui-color-swatches id="swatches" class="color-picker__swatches" ?disabled="${this.disabled}" @change="${this.handleColorSwatchChange}">${this.swatches.map(e=>u`<uui-color-swatch label="${e}" .value="${e}"></uui-color-swatch>`)}</uui-color-swatches>`:U}_renderPreviewButton(){return u`<uui-popover placement="bottom-start" @close="${this.closeColorPicker}"><button type="button" part="trigger" slot="trigger" aria-label="${this.label||"Open Color picker"}" class="${oo({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}" style="${ue({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" ?disabled="${this.disabled}" @click="${this.openColorPicker}" aria-haspopup="true" aria-expanded="false"></button><div slot="popover">${this._renderColorPicker()}</div></uui-popover>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},n.UUIColorPickerElement.styles=[p`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;display:block;width:var(--uui-color-picker-width,280px)}.color-picker{width:100%;background-color:#fff;user-select:none;border:solid 1px #e4e4e7}.color-picker__user-input{display:flex;padding:0 .75rem .75rem .75rem}.color-picker__user-input uui-button{border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-left:none}.color-picker__preview,.color-picker__trigger{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;position:relative;width:2.25rem;height:2.25rem;border:none;border-radius:50%;background:0 0}.color-picker__preview{cursor:copy;margin-left:.75rem;border-radius:50%}.color-picker__trigger[disabled]{cursor:not-allowed;opacity:.5}.color-picker__preview::before,.color-picker__trigger::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-picker__preview-color--copied{animation:pulse .75s}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--uui-palette-space-cadet-light,#26356e)}70%{box-shadow:0 0 0 .5rem transparent}100%{box-shadow:0 0 0 0 transparent}}.color-picker__controls{padding:.75rem;display:flex;align-items:center}.color-picker__sliders{flex:1 1 auto}uui-color-slider:not(:last-of-type){margin-bottom:1rem}.color-picker__toggle-format{min-width:45px;--uui-button-font-size:0.8rem}.color-picker__toggle-format>span{text-transform:uppercase}uui-color-swatches{border-top:solid 1px #d4d4d8;padding:.75rem}button[slot=trigger]{border-radius:50%;cursor:pointer;width:36px;height:36px}uui-popover{display:block;width:100%;margin:5px 0}uui-input{font-size:.85rem;box-sizing:content-box;flex:1}uui-color-area{width:100%}`],z([C('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),z([C(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),z([C("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),z([f()],n.UUIColorPickerElement.prototype,"inputValue",2),z([f()],n.UUIColorPickerElement.prototype,"hue",2),z([f()],n.UUIColorPickerElement.prototype,"saturation",2),z([f()],n.UUIColorPickerElement.prototype,"lightness",2),z([f()],n.UUIColorPickerElement.prototype,"alpha",2),z([f()],n.UUIColorPickerElement.prototype,"_colord",2),z([l()],n.UUIColorPickerElement.prototype,"value",2),z([l()],n.UUIColorPickerElement.prototype,"format",2),z([l()],n.UUIColorPickerElement.prototype,"name",2),z([l()],n.UUIColorPickerElement.prototype,"size",2),z([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),z([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),z([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),z([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),z([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),z([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=z([b("uui-color-picker")],n.UUIColorPickerElement);var Lh=Object.defineProperty,wa=Object.getOwnPropertySymbols,jh=Object.prototype.hasOwnProperty,Th=Object.prototype.propertyIsEnumerable,$a=(i,e,t)=>e in i?Lh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ua=(i,e)=>{for(var t in e||(e={}))jh.call(e,t)&&$a(i,t,e[t]);if(wa)for(var t of wa(e))Th.call(e,t)&&$a(i,t,e[t]);return i};let si=class extends P{constructor(e,t={}){super(e,Ua(Ua({},{bubbles:!0}),t))}};si.CHANGE="change";var Nh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,pe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nh(e,t,o),o};n.UUIColorSliderElement=class extends Q("label",m){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.disabled=!1}willUpdate(e){e.has("type")&&(this.type==="hue"?(this.max=360,this.precision=1):this.type==="opacity"&&(this.max=100,this.precision=1))}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),kn(this.container,{onMove:(o,a)=>{this.vertical?this.value=xn(S(a/r*this.max,this.min,this.max),this.min,this.max):this.value=S(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=S(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=S(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=S(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=S(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return S(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return S(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new si(si.CHANGE))}get ccsPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/xn(this.value,this.min,this.max):this.max/this.value)}render(){return u`<div part="slider" id="color-slider" role="slider" aria-label="${this.label}" aria-orientation="${this.vertical?"vertical":"horizontal"}" aria-valuemin="${Math.round(this.min)}" aria-valuemax="${Math.round(this.max)}" aria-valuenow="${Math.round(this.value)}" @click="${this.handleClick}" @mousedown="${this.handleDrag}" @touchstart="${this.handleDrag}" @keydown="${this.handleKeyDown}">${this.type==="opacity"?u`<div id="current-hue" style="${ue({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
448
|
+
*/const id=rt(class extends nt{constructor(i){if(super(i),i.type!==Q.PROPERTY&&i.type!==Q.ATTRIBUTE&&i.type!==Q.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!za(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===V||e===U)return e;const t=i.element,r=i.name;if(i.type===Q.PROPERTY){if(e===t[r])return V}else if(i.type===Q.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return V}else if(i.type===Q.ATTRIBUTE&&t.getAttribute(r)===e+"")return V;return ja(i),e}});var od={grad:.9,turn:360,rad:360/(2*Math.PI)},ve=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},T=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},X=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},La=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Ta=function(i){return{r:X(i.r,0,255),g:X(i.g,0,255),b:X(i.b,0,255),a:X(i.a)}},Co=function(i){return{r:T(i.r),g:T(i.g),b:T(i.b),a:T(i.a,3)}},rd=/^#([0-9a-f]{3,8})$/i,pi=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Na=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=Math.max(e,t,r),s=a-Math.min(e,t,r),c=s?a===e?(t-r)/s:a===t?2+(r-e)/s:4+(e-t)/s:0;return{h:60*(c<0?c+6:c),s:a?s/a*100:0,v:a/255*100,a:o}},Ma=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var a=Math.floor(e),s=r*(1-t),c=r*(1-(e-a)*t),h=r*(1-(1-e+a)*t),d=a%6;return{r:255*[r,c,s,s,h,r][d],g:255*[h,r,r,c,s,s][d],b:255*[s,s,h,r,r,c][d],a:o}},Da=function(i){return{h:La(i.h),s:X(i.s,0,100),l:X(i.l,0,100),a:X(i.a)}},Ba=function(i){return{h:T(i.h),s:T(i.s),l:T(i.l),a:T(i.a,3)}},Va=function(i){return Ma((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Lt=function(i){return{h:(e=Na(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},nd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ad=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,So={string:[[function(i){var e=rd.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?T(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?T(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=sd.exec(i)||ld.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ta({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=nd.exec(i)||ad.exec(i);if(!e)return null;var t,r,o=Da({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(od[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Va(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,a=o===void 0?1:o;return ve(e)&&ve(t)&&ve(r)?Ta({r:Number(e),g:Number(t),b:Number(r),a:Number(a)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,a=o===void 0?1:o;if(!ve(e)||!ve(t)||!ve(r))return null;var s=Da({h:Number(e),s:Number(t),l:Number(r),a:Number(a)});return Va(s)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,a=o===void 0?1:o;if(!ve(e)||!ve(t)||!ve(r))return null;var s=function(c){return{h:La(c.h),s:X(c.s,0,100),v:X(c.v,0,100),a:X(c.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(a)});return Ma(s)},"hsv"]]},Ha=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},ud=function(i){return typeof i=="string"?Ha(i.trim(),So.string):typeof i=="object"&&i!==null?Ha(i,So.object):[null,void 0]},Po=function(i,e){var t=Lt(i);return{h:t.h,s:X(t.s+100*e,0,100),l:t.l,a:t.a}},Oo=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Ra=function(i,e){var t=Lt(i);return{h:t.h,s:t.s,l:X(t.l+100*e,0,100),a:t.a}},bi=function(){function i(e){this.parsed=ud(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return T(Oo(this.rgba),2)},i.prototype.isDark=function(){return Oo(this.rgba)<.5},i.prototype.isLight=function(){return Oo(this.rgba)>=.5},i.prototype.toHex=function(){return e=Co(this.rgba),t=e.r,r=e.g,o=e.b,s=(a=e.a)<1?pi(T(255*a)):"","#"+pi(t)+pi(r)+pi(o)+s;var e,t,r,o,a,s},i.prototype.toRgb=function(){return Co(this.rgba)},i.prototype.toRgbString=function(){return e=Co(this.rgba),t=e.r,r=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+o+", "+a+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,a},i.prototype.toHsl=function(){return Ba(Lt(this.rgba))},i.prototype.toHslString=function(){return e=Ba(Lt(this.rgba)),t=e.h,r=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+a+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,a},i.prototype.toHsv=function(){return e=Na(this.rgba),{h:T(e.h),s:T(e.s),v:T(e.v),a:T(e.a,3)};var e},i.prototype.invert=function(){return ae({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),ae(Po(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ae(Po(this.rgba,-e))},i.prototype.grayscale=function(){return ae(Po(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ae(Ra(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ae(Ra(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?ae({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):T(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Lt(this.rgba);return typeof e=="number"?ae({h:e,s:t.s,l:t.l,a:t.a}):T(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ae(e).toHex()},i}(),ae=function(i){return i instanceof bi?i:new bi(i)},Fa=[],cd=function(i){i.forEach(function(e){Fa.indexOf(e)<0&&(e(bi,So),Fa.push(e))})};function hd(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var a={};i.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,h,d=r[this.toHex()];if(d)return d;if(s!=null&&s.closest){var v=this.toRgb(),f=1/0,y="black";if(!a.length)for(var $ in t)a[$]=new i(t[$]).toRgb();for(var E in t){var x=(c=v,h=a[E],Math.pow(c.r-h.r,2)+Math.pow(c.g-h.g,2)+Math.pow(c.b-h.b,2));x<f&&(f=x,y=E)}return y}},e.string.push([function(s){var c=s.toLowerCase(),h=c==="transparent"?"#0000":t[c];return h?new i(h).toRgb():null},"name"])}var dd=Object.defineProperty,Ga=Object.getOwnPropertySymbols,pd=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,qa=(i,e,t)=>e in i?dd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Wa=(i,e)=>{for(var t in e||(e={}))pd.call(e,t)&&qa(i,t,e[t]);if(Ga)for(var t of Ga(e))bd.call(e,t)&&qa(i,t,e[t]);return i};let mi=class extends P{constructor(e,t={}){super(e,Wa(Wa({},{bubbles:!0}),t))}};mi.CHANGE="change";var md=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,A=(i,e,t,r)=>{for(var o=r>1?void 0:r?vd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&md(e,t,o),o};cd([hd]);const Ka="EyeDropper"in window;n.UUIColorPickerElement=class extends te("label",m){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=ae("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),_(this,"uui-icon"),_(this,"uui-icon-registry-essential"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-button-group"),_(this,"uui-color-swatches"),_(this,"uui-color-swatch"),_(this,"uui-color-area"),_(this,"uui-color-slider"),_(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:a,g:s,b:c}=this._colord.toRgb(),{h,s:d,l:v}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),y=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${a}, ${s}, ${c})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${h}, ${d}%, ${v}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${h}, ${d}%, ${v}%)`);case"hsva":return this.setLetterCase(`hsva(${h}, ${d}%, ${f}%, ${y})`);default:return""}}getBrightness(e){return O(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return O((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r=e.target,o={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(r.value)/100};this.setColor(o)}handleHueChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(r)}handleGridChange(e){var t;e.stopPropagation(),(t=this._swatches)==null||t.resetSelection();const r=e.target,o={h:this.hue,s:r.saturation,l:r.lightness,a:this.alpha/100};this.setColor(o)}handleInputChange(e){var t;(t=this._swatches)==null||t.resetSelection();const r=e.target;r.value?(this.setColor(r.value),r.value=this.value):this.setColor("#000"),e.stopPropagation()}handleInputKeyDown(e){var t;e.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),(t=this._swatches)==null||t.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;t.value?this.setColor(t.value):this.setColor("#000")}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){Ka&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){this._colord=new bi(e);const{h:t,l:r,s:o,a}=this._colord.toHsl();return this.hue=t,this.saturation=o,this.lightness=r,this.alpha=this.opacity?a*100:100,this._syncValues(),this.dispatchEvent(new mi(mi.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return u`<div class="${Uo({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}" aria-disabled="${this.disabled?"true":"false"}"><uui-color-area .value="${this.value}" ?disabled="${this.disabled}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" @change="${this.handleHueChange}"></uui-color-slider>${this.opacity?u`<uui-color-slider label="alpha" class="opacity-slider" .value="${Math.round(this.alpha)}" type="opacity" .color="${this.value}" ?disabled="${this.disabled}" @change="${this.handleAlphaChange}"></uui-color-slider>`:""}</div><button type="button" part="preview" class="color-picker__preview color-picker__transparent-bg" title="Copy" aria-label="Copy" style="${re({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" @click="${this.handleCopy}"></button></div><div class="color-picker__user-input" aria-live="polite"><uui-input label="label" type="text" part="input" name="${this.name}" autocomplete="off" autocapitalize="off" spellcheck="false" .value="${id(this.inputValue)}" ?disabled="${this.disabled}" @keydown="${this.handleInputKeyDown}" @change="${this.handleInputChange}"></uui-input><uui-button-group>${this.noFormatToggle?"":u`<uui-button label="Toggle color format" @click="${this.handleFormatToggle}" class="color-picker__toggle-format" ?disabled="${this.disabled}" compact="compact"><span>${this.format}</span></uui-button>`} ${Ka?u`<uui-button label="Select a color" ?disabled="${this.disabled}" @click="${this.handleEyeDropper}" compact="compact"><uui-icon-registry-essential><uui-icon name="colorpicker"></uui-icon></uui-icon-registry-essential></uui-button>`:""}</uui-button-group></div>${this._renderSwatches()}</div>`}_renderSwatches(){return this.swatches?u`<uui-color-swatches id="swatches" class="color-picker__swatches" ?disabled="${this.disabled}" @change="${this.handleColorSwatchChange}">${this.swatches.map(e=>u`<uui-color-swatch label="${e}" .value="${e}"></uui-color-swatch>`)}</uui-color-swatches>`:U}_renderPreviewButton(){return u`<button type="button" part="trigger" aria-label="${this.label||"Open Color picker"}" class="${Uo({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}" style="${re({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" ?disabled="${this.disabled}" aria-haspopup="true" aria-expanded="false" popovertarget="color-picker-popover"></button><uui-popover-container id="color-picker-popover">${this._renderColorPicker()}</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},n.UUIColorPickerElement.styles=[p`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;display:block;width:var(--uui-color-picker-width,280px)}uui-popover-container{width:inherit}.color-picker{width:100%;background-color:#fff;user-select:none;border:solid 1px #e4e4e7}.color-picker__user-input{display:flex;padding:0 .75rem .75rem .75rem}.color-picker__user-input uui-button{border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-left:none}.color-picker__preview,.color-picker__trigger{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;position:relative;width:2.25rem;height:2.25rem;border:none;border-radius:50%;background:0 0}.color-picker__preview{cursor:copy;margin-left:.75rem;border-radius:50%}.color-picker__trigger[disabled]{cursor:not-allowed;opacity:.5}.color-picker__preview::before,.color-picker__trigger::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-picker__preview-color--copied{animation:pulse .75s}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--uui-palette-space-cadet-light,#26356e)}70%{box-shadow:0 0 0 .5rem transparent}100%{box-shadow:0 0 0 0 transparent}}.color-picker__controls{padding:.75rem;display:flex;align-items:center}.color-picker__sliders{flex:1 1 auto}uui-color-slider:not(:last-of-type){margin-bottom:1rem}.color-picker__toggle-format{min-width:45px;--uui-button-font-size:0.8rem}.color-picker__toggle-format>span{text-transform:uppercase}uui-color-swatches{border-top:solid 1px #d4d4d8;padding:.75rem}button[slot=trigger]{border-radius:50%;cursor:pointer;width:36px;height:36px}uui-input{font-size:.85rem;box-sizing:content-box;flex:1}uui-color-area{width:100%}`],A([C('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),A([C(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),A([C("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),A([g()],n.UUIColorPickerElement.prototype,"inputValue",2),A([g()],n.UUIColorPickerElement.prototype,"hue",2),A([g()],n.UUIColorPickerElement.prototype,"saturation",2),A([g()],n.UUIColorPickerElement.prototype,"lightness",2),A([g()],n.UUIColorPickerElement.prototype,"alpha",2),A([g()],n.UUIColorPickerElement.prototype,"_colord",2),A([l()],n.UUIColorPickerElement.prototype,"value",2),A([l()],n.UUIColorPickerElement.prototype,"format",2),A([l()],n.UUIColorPickerElement.prototype,"name",2),A([l()],n.UUIColorPickerElement.prototype,"size",2),A([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),A([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),A([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),A([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),A([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),A([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=A([b("uui-color-picker")],n.UUIColorPickerElement);var gd=Object.defineProperty,Xa=Object.getOwnPropertySymbols,fd=Object.prototype.hasOwnProperty,yd=Object.prototype.propertyIsEnumerable,Ya=(i,e,t)=>e in i?gd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Za=(i,e)=>{for(var t in e||(e={}))fd.call(e,t)&&Ya(i,t,e[t]);if(Xa)for(var t of Xa(e))yd.call(e,t)&&Ya(i,t,e[t]);return i};let vi=class extends P{constructor(e,t={}){super(e,Za(Za({},{bubbles:!0}),t))}};vi.CHANGE="change";var wd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,ge=(i,e,t,r)=>{for(var o=r>1?void 0:r?_d(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&wd(e,t,o),o};n.UUIColorSliderElement=class extends te("label",m){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.disabled=!1}willUpdate(e){e.has("type")&&(this.type==="hue"?(this.max=360,this.precision=1):this.type==="opacity"&&(this.max=100,this.precision=1))}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),Qn(this.container,{onMove:(o,a)=>{this.vertical?this.value=Jn(O(a/r*this.max,this.min,this.max),this.min,this.max):this.value=O(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=O(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=O(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=O(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=O(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return O(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return O(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new vi(vi.CHANGE))}get ccsPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Jn(this.value,this.min,this.max):this.max/this.value)}render(){return u`<div part="slider" id="color-slider" role="slider" aria-label="${this.label}" aria-orientation="${this.vertical?"vertical":"horizontal"}" aria-valuemin="${Math.round(this.min)}" aria-valuemax="${Math.round(this.max)}" aria-valuenow="${Math.round(this.value)}" @click="${this.handleClick}" @mousedown="${this.handleDrag}" @touchstart="${this.handleDrag}" @keydown="${this.handleKeyDown}">${this.type==="opacity"?u`<div id="current-hue" style="${re({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
446
449
|
transparent 0%,
|
|
447
450
|
${this.color} 100%
|
|
448
|
-
)`})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.ccsPropCurrentValue}" tabindex="${
|
|
451
|
+
)`})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.ccsPropCurrentValue}" tabindex="${I(this.disabled?void 0:"0")}"></span></div>${Math.round(this.value)}`}},n.UUIColorSliderElement.styles=[p`:host{--uui-slider-height:15px;--uui-slider-handle-size:17px;--uui-slider-background-image:#fff;--uui-slider-background-size:100%;--uui-slider-background-position:top left;display:block}:host([type=hue]){--uui-slider-background-image:linear-gradient(
|
|
449
452
|
to right,
|
|
450
453
|
rgb(255, 0, 0) 0%,
|
|
451
454
|
rgb(255, 255, 0) 17%,
|
|
@@ -467,25 +470,25 @@
|
|
|
467
470
|
45deg,
|
|
468
471
|
var(--uui-palette-grey,#c4c4c4) 25%,
|
|
469
472
|
transparent 25%
|
|
470
|
-
),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, var(--uui-palette-grey,#c4c4c4) 25%, transparent 25%);--uui-slider-background-size:10px 10px;--uui-slider-background-position:0 0,0 0,-5px -5px,5px 5px}#color-slider{position:relative;background-image:var(--uui-slider-background-image);background-size:var(--uui-slider-background-size);background-position:var(--uui-slider-background-position);border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);width:100%;height:var(--uui-slider-height)}:host([vertical]) #color-slider{width:var(--uui-slider-height);height:300px}:host([disabled]){cursor:not-allowed}:host([disabled]) #color-slider{user-select:none;pointer-events:none;opacity:.55}#color-slider__handle{position:absolute;top:calc(50% - var(--uui-slider-handle-size)/ 2);width:var(--uui-slider-handle-size);height:var(--uui-slider-handle-size);background-color:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);margin-left:calc(var(--uui-slider-handle-size)/ -2);left:var(--current-value,0)}:host([vertical]) #color-slider__handle{left:unset;top:var(--current-value,100%);margin-left:-1px;margin-top:calc(var(--uui-slider-handle-size)/ -2)}::slotted(:first-child){border-radius:3px;position:absolute;top:0;left:0;width:100%;height:100%}#current-hue{border-radius:3px;position:absolute;inset:0}`],pe([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),pe([l()],n.UUIColorSliderElement.prototype,"color",2),pe([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),pe([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),pe([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),pe([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),pe([l()],n.UUIColorSliderElement.prototype,"value",2),pe([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),n.UUIColorSliderElement=pe([b("uui-color-slider")],n.UUIColorSliderElement);var Dh=Object.defineProperty,Bh=Object.getOwnPropertyDescriptor,Ot=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Dh(e,t,o),o};n.UUIColorSwatchElement=class extends Q("label",Ze(xt(m))){constructor(){super(),this.disabled=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){var e;return(e=this._value)!=null?e:""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){e.has("disabled")&&this.selectable&&(this.selectable=!this.disabled,this.deselectable=!this.disabled),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}render(){var e,t;return u`<button id="swatch" aria-label="${this.label}" aria-disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background-color:var(--uui-swatch-color,${(e=this.color)!=null?e:this.value})"></div><div class="color-swatch__check" style="fill:var(--uui-swatch-color,${(t=this.color)!=null?t:this.value})">${ei}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?u`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:U}},n.UUIColorSwatchElement.styles=[p`:host{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:box-shadow .1s ease-out;flex-direction:column}*,:host(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(:focus-within:not([disabled])){outline:0}:host(:focus:not([disabled])) #swatch{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-swatch-border-width,1px);outline-style:solid;outline-offset:var(--uui-swatch-border-width,1px)}:host([selectable]) #swatch{cursor:pointer}:host([disabled]){cursor:not-allowed;opacity:.5}#swatch{cursor:inherit;outline:0;background:0 0;border:none;padding:0;margin:0;text-align:left;border-radius:3px}:host(:not([selectable])) #swatch:focus{outline:0}:host([selectable]) #swatch::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-swatch-border-width,1px) * -1);width:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));height:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));box-sizing:border-box;border:var(--uui-swatch-border-width,2px) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-swatch-border-width,1px));transition:opacity .1s ease-out;opacity:0}:host([selectable]:not([disabled]):hover) #swatch::after{opacity:.33}:host([selectable][selected]:not([disabled]):hover) #swatch::after{opacity:.66}:host([selectable][selected]:not([disabled])) #swatch::after{opacity:1}.color-swatch{position:relative;width:var(--uui-swatch-size,25px);height:var(--uui-swatch-size,25px);border-radius:3px;display:flex;flex-direction:column;justify-content:center;align-items:center}:host([show-label]) .color-swatch{width:120px;height:50px}.color-swatch.color-swatch--transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-swatch__color{width:100%;height:100%;border:1px solid rgba(0,0,0,.125);border-radius:inherit;box-sizing:border-box}:host([show-label]) .color-swatch__color{border-radius:3px 3px 0 0}.color-swatch__check{position:absolute;vertical-align:middle;width:calc(var(--uui-swatch-size,25px)/ 2);height:calc(var(--uui-swatch-size,25px)/ 2);line-height:0;filter:invert(1) grayscale(1) contrast(9);pointer-events:none;opacity:0}:host([selected]) .color-swatch__check{opacity:1}.label,slot[name=label]::slotted(*){font-size:var(--uui-size-4,12px)}.color-swatch__label{max-width:120px;box-sizing:border-box;padding:var(--uui-size-space-1,3px) var(--uui-size-space-2,6px);line-height:1.5;display:flex;flex-direction:column;background:#fff;border:1px solid var(--uui-color-border,#d8d7d9);border-radius:0 0 3px 3px;font-size:var(--uui-size-4,12px)}.color-swatch__label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}`],Ot([l()],n.UUIColorSwatchElement.prototype,"value",1),Ot([l()],n.UUIColorSwatchElement.prototype,"color",1),Ot([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),Ot([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=Ot([b("uui-color-swatch")],n.UUIColorSwatchElement);var Vh=Object.defineProperty,Ea=Object.getOwnPropertySymbols,Hh=Object.prototype.hasOwnProperty,Rh=Object.prototype.propertyIsEnumerable,ka=(i,e,t)=>e in i?Vh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,xa=(i,e)=>{for(var t in e||(e={}))Hh.call(e,t)&&ka(i,t,e[t]);if(Ea)for(var t of Ea(e))Rh.call(e,t)&&ka(i,t,e[t]);return i};let rt=class extends P{constructor(e,t={}){super(e,xa(xa({},{bubbles:!0}),t))}};rt.CHANGE="change";var Fh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,li=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Fh(e,t,o),o};n.UUIColorSwatchesElement=class extends Q("label",m){constructor(){super(),this.value="",this.disabled=!1,this._onSelected=e=>{const t=e.target;this.swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new rt(rt.CHANGE)))},this._onDeselected=e=>{const t=e.target;this.swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new rt(rt.CHANGE))))},this.addEventListener(Ee.SELECTED,this._onSelected),this.addEventListener(Ee.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this.swatches||this.swatches.length===0||this.swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this.swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIColorSwatchesElement.styles=[p`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],li([l()],n.UUIColorSwatchesElement.prototype,"value",2),li([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),li([Ue({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"swatches",2),n.UUIColorSwatchesElement=li([b("uui-color-swatches")],n.UUIColorSwatchesElement);var qh=Object.defineProperty,Ia=Object.getOwnPropertySymbols,Wh=Object.prototype.hasOwnProperty,Kh=Object.prototype.propertyIsEnumerable,Ca=(i,e,t)=>e in i?qh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Pa=(i,e)=>{for(var t in e||(e={}))Wh.call(e,t)&&Ca(i,t,e[t]);if(Ia)for(var t of Ia(e))Kh.call(e,t)&&Ca(i,t,e[t]);return i};let Y=class extends P{constructor(e,t={}){super(e,Pa(Pa({},{bubbles:!0}),t))}};Y.CHANGE="change",Y.INNER_SLOT_CHANGE="inner-slot-change";var Xh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,Ne=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Xh(e,t,o),o};n.UUIComboboxListElement=class extends m{constructor(){super(...arguments),this.displayValue="",this._value="",this._onSlotChange=()=>{this._activeElement=void 0;for(let e=0;e<this._activeOptions.length;e++)e===0?this._activeElement=this._activeOptions[e]:this._activeOptions[e].active=!1;this._updateSelection(),this.dispatchEvent(new Y(Y.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new Y(Y.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new Y(Y.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex()+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{var t;if(!(this._options.length<=0))switch(e.key){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),(t=this._activeElement)==null||t.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(Ee.SELECTED,this._onSelected),this.addEventListener(Ee.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Ee.SELECTED,this._onSelected),this.removeEventListener(Ee.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}_getActiveIndex(){return this._activeElement?this._options.indexOf(this._activeElement):-1}_goToIndex(e){e=Math.min(Math.max(e,0),this._options.length-1),this._activeElement=this._options[e],this._activeElement&&this._activeElement.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>`}},n.UUIComboboxListElement.styles=[p`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Ne([l()],n.UUIComboboxListElement.prototype,"value",1),Ne([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Ne([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Ne([Ue({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Ne([Ue({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Ne([f()],n.UUIComboboxListElement.prototype,"_value",2),n.UUIComboboxListElement=Ne([b("uui-combobox-list")],n.UUIComboboxListElement);var Zh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,nt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qh(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zh(e,t,o),o};n.UUIComboboxListOptionElement=class extends Ze(xt(m)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){var e;return this._value?this._value:((e=this.textContent)==null?void 0:e.trim())||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){var e;return this._displayValue?this._displayValue:((e=this.textContent)==null?void 0:e.trim())||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return u`<slot></slot>`}},n.UUIComboboxListOptionElement.styles=[p`:host{position:relative;cursor:pointer;margin:0 6px;border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px}:host(:first-child){margin-top:6px}:host(:last-child){margin-bottom:6px}:host([selected]):host([active])::after{display:block;content:'';position:absolute;inset:0;outline:var(--uui-color-surface,#fff) solid 2px;outline-offset:-4px}:host(:hover){background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]){cursor:auto;color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]:hover){background-color:var(--uui-color-disabled,#f3f3f5)}:host([active]){outline-color:var(--uui-color-focus,#3879ff)}:host([selected]){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected,#3544b1)}:host([selected]:hover){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([selected][disabled]){color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}`],nt([f()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),nt([f()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),nt([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),nt([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),nt([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=nt([b("uui-combobox-list-option")],n.UUIComboboxListOptionElement);var Jh=Object.defineProperty,Sa=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable,Oa=(i,e,t)=>e in i?Jh(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,za=(i,e)=>{for(var t in e||(e={}))ed.call(e,t)&&Oa(i,t,e[t]);if(Sa)for(var t of Sa(e))td.call(e,t)&&Oa(i,t,e[t]);return i};let B=class extends P{constructor(e,t={}){super(e,za(za({},{bubbles:!0}),t))}};B.SEARCH="search",B.CHANGE="change";var id=Object.defineProperty,od=Object.getOwnPropertyDescriptor,Z=(i,e,t,r)=>{for(var o=r>1?void 0:r?od(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&id(e,t,o),o};n.UUIComboboxElement=class extends J(m){constructor(){super(...arguments),this.open=!1,this.closeLabel="Close",this.disabled=!1,this._displayValue="",this._search="",this._isPhone=!1,this._onPhoneChange=()=>{this._isPhone=this.phoneMediaQuery.matches},this._onMouseDown=()=>requestAnimationFrame(()=>this._input.focus()),this._onBlur=()=>requestAnimationFrame(()=>{var e;(e=this.shadowRoot)!=null&&e.activeElement||this._onClose()}),this._onInput=e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new B(B.SEARCH)),this._open()},this._onSlotChange=()=>{var e;this.value&&this.value!==((e=this._comboboxList)==null?void 0:e.value)&&this._updateValue(this.value)},this._onChange=()=>{var e;this.value=((e=this._comboboxList)==null?void 0:e.value)||"",this.search=this.value?this.search:"",this._onClose(),this.dispatchEvent(new B(B.CHANGE))},this._open=()=>{this.open||(this.open=!0)},this._onClose=()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new B(B.SEARCH)))},this._onKeyDown=e=>{this.open===!1&&e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.key==="ArrowUp"||e.key==="ArrowDown")&&this._open(),(e.key==="Escape"||e.key==="Enter")&&this._onClose()},this._onClear=e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._input.value=this._displayValue,this._input.focus(),this.dispatchEvent(new B(B.SEARCH)),this.dispatchEvent(new B(B.CHANGE)))},this._renderInput=()=>u`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" autocomplete="off" .disabled="${this.disabled}" @click="${this._open}" @input="${this._onInput}" @keydown="${this._onKeyDown}"><slot name="input-prepend" slot="prepend"></slot>${this.disabled?"":this._renderClearButton()} ${this._renderCaret()}<slot name="input-append" slot="append"></slot></uui-input>`,this._renderCaret=()=>u`<svg id="caret" slot="append" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`,this._renderClearButton=()=>this.value||this.search?u`<uui-button id="clear-button" @click="${this._onClear}" @keydown="${this._onClear}" label="clear" slot="append" compact="compact" style="height:100%"><uui-icon name="remove" .fallback="${In.strings[0]}"></uui-icon></uui-button>`:"",this._renderDropdown=()=>u`<div id="dropdown" slot="popover"><uui-scroll-container tabindex="-1" id="scroll-container"><slot></slot></uui-scroll-container></div>`}get value(){return this._value}set value(e){typeof e=="string"&&this._updateValue(e),super.value=e}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",this._onBlur),this.addEventListener("mousedown",this._onMouseDown),this.phoneMediaQuery=window.matchMedia("(max-width: 600px)"),this._onPhoneChange(),this.phoneMediaQuery.addEventListener("change",this._onPhoneChange),w(this,"uui-icon"),w(this,"uui-input"),w(this,"uui-button"),w(this,"uui-combobox-list"),w(this,"uui-scroll-container"),w(this,"uui-popover")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this._onBlur),this.removeEventListener("mousedown",this._onMouseDown),this.phoneMediaQuery.removeEventListener("change",this._onPhoneChange)}async firstUpdated(){var e;const t=(e=this._comboboxListElements)==null?void 0:e[0];t&&(this._comboboxList=t,this._comboboxList.for=this,this._comboboxList.addEventListener(Y.CHANGE,this._onChange),this._comboboxList.addEventListener(Y.INNER_SLOT_CHANGE,this._onSlotChange),await this.updateComplete,this._updateValue(this.value))}_updateValue(e){this._comboboxList&&(this._comboboxList.value=e,requestAnimationFrame(()=>this._displayValue=this._comboboxList.displayValue||""))}getFormElement(){return this._input}render(){return this._isPhone&&this.open?u`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${this._onClose}">${this.closeLabel}</uui-button>${this._renderInput()} ${this._renderDropdown()}</div>`:u`<uui-popover .open="${this.open}" .margin="${-1}" @close="${()=>this._onClose()}">${this._renderInput()} ${this._renderDropdown()}</uui-popover>`}},n.UUIComboboxElement.styles=[p`:host{display:inline-block}#combobox-input{width:100%;border-radius:var(--uui-size-1,3px)}#scroll-container{overflow-y:auto;width:100%;max-height:var(--uui-combobox-popover-max-height,500px)}#dropdown{overflow:hidden;z-index:-1;background-color:var(--uui-combobox-popover-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-color-border,#d8d7d9);border-radius:var(--uui-border-radius,3px);width:100%;height:100%;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23))}#caret{margin-right:var(--uui-size-3,9px);display:flex;width:1.15em;flex-shrink:0;margin-top:-1px}:host([disabled]) #caret{fill:var(--uui-color-disabled-contrast,#c4c4c4)}#phone-wrapper{position:fixed;inset:0;display:flex;flex-direction:column;z-index:1;font-size:1.1em}#phone-wrapper #dropdown{display:flex}#phone-wrapper #combobox-input{height:var(--uui-size-16,48px)}#phone-wrapper>uui-button{height:var(--uui-size-14,42px);width:100%}#phone-wrapper #scroll-container{max-height:unset}`],Z([l({attribute:"value",reflect:!0})],n.UUIComboboxElement.prototype,"value",1),Z([l({type:String})],n.UUIComboboxElement.prototype,"search",1),Z([l({type:Boolean})],n.UUIComboboxElement.prototype,"open",2),Z([l({type:String})],n.UUIComboboxElement.prototype,"closeLabel",2),Z([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),Z([C("#combobox-input")],n.UUIComboboxElement.prototype,"_input",2),Z([Ue({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),Z([f()],n.UUIComboboxElement.prototype,"_displayValue",2),Z([f()],n.UUIComboboxElement.prototype,"_search",2),Z([f()],n.UUIComboboxElement.prototype,"_isPhone",2),n.UUIComboboxElement=Z([b("uui-combobox")],n.UUIComboboxElement);var rd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,po=(i,e,t,r)=>{for(var o=r>1?void 0:r?nd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rd(e,t,o),o};n.UUIDialogLayoutElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return u`<h3 style="${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h3>`}renderContent(){return u`<slot></slot>`}renderActions(){return u`<slot id="actions" name="actions"></slot>`}render(){return u`${this.renderHeadline()} ${this.renderContent()} ${this.renderActions()}`}},n.UUIDialogLayoutElement.styles=[p`:host{display:block;padding:var(--uui-size-10,30px) var(--uui-size-14,42px);color:var(--uui-color-text,#060606)}#actions{margin-top:var(--uui-size-8,24px);display:flex;justify-content:end;gap:var(--uui-size-4,12px)}`],po([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),po([f()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=po([b("uui-dialog-layout")],n.UUIDialogLayoutElement);var ad=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,ld=(i,e,t,r)=>{for(var o=r>1?void 0:r?sd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ad(e,t,o),o};n.UUIDialogElement=class extends m{render(){return u`<slot></slot>`}},n.UUIDialogElement.styles=[p`:host{position:relative;display:block;max-width:580px;color:var(--uui-color-text,#060606);background-color:var(--uui-dialog-background-color,var(--uui-color-surface,#fff));box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22));border-radius:var(--uui-dialog-border-radius,calc(var(--uui-border-radius,3px) * 2))}`],n.UUIDialogElement=ld([b("uui-dialog")],n.UUIDialogElement);var ud=Object.defineProperty,Aa=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,La=(i,e,t)=>e in i?ud(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ja=(i,e)=>{for(var t in e||(e={}))cd.call(e,t)&&La(i,t,e[t]);if(Aa)for(var t of Aa(e))hd.call(e,t)&&La(i,t,e[t]);return i};let at=class extends P{constructor(e,t={}){super(e,ja(ja({},{bubbles:!0}),t))}};at.CHANGE="change";var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,zt=(i,e,t,r)=>{for(var o=r>1?void 0:r?pd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&dd(e,t,o),o};n.UUIFileDropzoneElement=class extends Q("",m){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const r=[],o=[];e.split(",").forEach(a=>{a=a.trim().toLowerCase(),new RegExp("[a-z]+\\/[a-z*]","s").test(a)?r.push(a):o.push(a.replace(/^\./,""))}),this._acceptedMimeTypes=r,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}connectedCallback(){super.connectedCallback(),w(this,"uui-symbol-file-dropzone")}async _getAllFileEntries(e){const t=[],r=[...e];for(;r.length>0;){const o=r.shift();if(o.kind==="file"){const a=o.getAsFile();if(!a)continue;this._isAccepted(a)&&t.push(a)}else if(o.kind==="directory"){if(!("webkitGetAsEntry"in o))continue;const a=o.webkitGetAsEntry();r.push(...await this._readAllDirectoryEntries(a.createReader()))}}return t}async _readAllDirectoryEntries(e){const t=[];let r=await this._readEntriesPromise(e);for(;r.length>0;)t.push(...r),r=await this._readEntriesPromise(e);return t}async _readEntriesPromise(e){return new Promise((t,r)=>{try{e.readEntries(t,r)}catch(o){console.log(o),r(o)}})}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),r=e.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o in this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("/*","")))return!0;return!1}async _onDrop(e){var t;e.preventDefault(),this._dropzone.classList.remove("hover");const r=(t=e.dataTransfer)==null?void 0:t.items;if(r){let o=await this._getAllFileEntries(r);this.multiple===!1&&o.length&&(o=[o[0]]),this.dispatchEvent(new at(at.CHANGE,{detail:{files:o}}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.dispatchEvent(new at(at.CHANGE,{detail:{files:e}}))}render(){return u`<div id="dropzone"><uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>${this.renderLabel()} <input @click="${e=>e.stopImmediatePropagation()}" id="input" type="file" accept="${this.accept}" ?multiple="${this.multiple}" @change="${this._onFileInputChange}" aria-label="${this.label}"><slot></slot></div>`}},n.UUIFileDropzoneElement.styles=[p`#dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;box-sizing:border-box;width:100%;height:100%;padding:var(--uui-size-4,12px);border:3px solid transparent;margin:-3px;backdrop-filter:blur(2px)}#dropzone.hover{border-color:var(--uui-color-default,#1b264f)}#dropzone.hover::before{content:'';position:absolute;inset:0;opacity:.2;border-color:var(--uui-color-default,#1b264f);background-color:var(--uui-color-default,#1b264f)}#symbol{color:var(--uui-color-default,#1b264f);max-width:100%;max-height:100%}#input{position:absolute;width:0;height:0;opacity:0;display:none}`],zt([C("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),zt([C("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),zt([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),zt([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=zt([b("uui-file-dropzone")],n.UUIFileDropzoneElement);let bd=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const a=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=-1;const h=10**r;do e/=o,++s;while(Math.round(Math.abs(e)*h)/h>=o&&s<a.length-1);return e.toFixed(r)+" "+a[s]}};var md=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,oe=(i,e,t,r)=>{for(var o=r>1?void 0:r?vd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&md(e,t,o),o};n.UUIFilePreviewElement=class extends m{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(r=>{this._src=r})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),w(this,"uui-symbol-file-thumbnail"),w(this,"uui-symbol-folder"),w(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?u`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?u`<uui-symbol-file-thumbnail .src="${this._src}" .alt="${this._name}" id="file-symbol"></uui-symbol-file-thumbnail>`:u`<uui-symbol-file id="file-symbol" .type="${this._extension}"></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return u`<span id="file-name" class="${this._url?"has-source":""}" @click="${()=>this._url?this._openSource():""}" @keydown="${()=>""}"><span id="file-name-start">${e}</span> <span id="file-name-end">${t}</span></span>`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return u`<slot id="actions" name="actions"></slot>${this._fileTypeTemplate()}<div id="file-info">${this._renderLongName()} <span id="file-size">${this._size&&!this._isDirectory?u`${bd.humanFileSize(this._size,!0)}`:""}</span></div>`}},n.UUIFilePreviewElement.styles=[p`:host{position:relative;display:grid;grid-template-rows:100px 50px;width:150px;height:150px;box-sizing:border-box;aspect-ratio:1;color:var(--uui-color-text,#060606)}:host(:hover) slot[name=actions]::slotted(*){opacity:1}slot[name=actions]::slotted(*){position:absolute;top:8px;right:8px;max-width:100%;height:32px;font-size:13px;opacity:0;z-index:1;transition:opacity 150ms}#file-symbol{aspect-ratio:1/1;margin:auto;max-width:100%;max-height:100%}#file-info{min-width:0;display:flex;text-align:center;flex-direction:column;font-size:1rem}#file-name{display:flex;justify-content:center}#file-name-start{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#file-name-end{white-space:nowrap}#file-size{opacity:.6}.has-source:hover{text-decoration:underline;cursor:pointer}`],oe([f()],n.UUIFilePreviewElement.prototype,"_name",2),oe([f()],n.UUIFilePreviewElement.prototype,"_url",2),oe([f()],n.UUIFilePreviewElement.prototype,"_extension",2),oe([f()],n.UUIFilePreviewElement.prototype,"_src",2),oe([f()],n.UUIFilePreviewElement.prototype,"_size",2),oe([f()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),oe([f()],n.UUIFilePreviewElement.prototype,"_file",2),oe([f()],n.UUIFilePreviewElement.prototype,"_isImage",2),oe([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=oe([b("uui-file-preview")],n.UUIFilePreviewElement);var gd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,ui=(i,e,t,r)=>{for(var o=r>1?void 0:r?fd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&gd(e,t,o),o};n.UUIFormLayoutItemElement=class extends m{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),w(this,"uui-form-validation-message")}render(){return u`<div id="label" style="${this._labelSlotHasContent?"":"display: none"}"><slot name="label" @slotchange="${this._labelSlotChanged}"></slot></div><div id="description" style="${this._descriptionSlotHasContent||this.description!==null?"":"display: none"}">${this.description}<slot name="description" @slotchange="${this._descriptionSlotChanged}"></slot></div><uui-form-validation-message><slot></slot><slot name="message" slot="message"></slot></uui-form-validation-message>`}},n.UUIFormLayoutItemElement.styles=[p`:host{position:relative;display:block;margin-top:var(--uui-size-space-5,18px);margin-bottom:var(--uui-size-space-5,18px)}#label{margin-top:-5px;margin-bottom:5px}#description{color:var(--uui-color-disabled-contrast,#c4c4c4);font-size:var(--uui-type-small-size,12px)}#label+#description{margin-top:-8px;min-height:8px}`],ui([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),ui([f()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),ui([f()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=ui([b("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
473
|
+
),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, var(--uui-palette-grey,#c4c4c4) 25%, transparent 25%);--uui-slider-background-size:10px 10px;--uui-slider-background-position:0 0,0 0,-5px -5px,5px 5px}#color-slider{position:relative;background-image:var(--uui-slider-background-image);background-size:var(--uui-slider-background-size);background-position:var(--uui-slider-background-position);border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);width:100%;height:var(--uui-slider-height)}:host([vertical]) #color-slider{width:var(--uui-slider-height);height:300px}:host([disabled]){cursor:not-allowed}:host([disabled]) #color-slider{user-select:none;pointer-events:none;opacity:.55}#color-slider__handle{position:absolute;top:calc(50% - var(--uui-slider-handle-size)/ 2);width:var(--uui-slider-handle-size);height:var(--uui-slider-handle-size);background-color:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);margin-left:calc(var(--uui-slider-handle-size)/ -2);left:var(--current-value,0)}:host([vertical]) #color-slider__handle{left:unset;top:var(--current-value,100%);margin-left:-1px;margin-top:calc(var(--uui-slider-handle-size)/ -2)}::slotted(:first-child){border-radius:3px;position:absolute;top:0;left:0;width:100%;height:100%}#current-hue{border-radius:3px;position:absolute;inset:0}`],ge([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),ge([l()],n.UUIColorSliderElement.prototype,"color",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),ge([l()],n.UUIColorSliderElement.prototype,"value",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),n.UUIColorSliderElement=ge([b("uui-color-slider")],n.UUIColorSliderElement);var $d=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,Tt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ud(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&$d(e,t,o),o};n.UUIColorSwatchElement=class extends te("label",tt(Ot(m))){constructor(){super(),this.disabled=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){var e;return(e=this._value)!=null?e:""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){e.has("disabled")&&this.selectable&&(this.selectable=!this.disabled,this.deselectable=!this.disabled),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}render(){var e,t;return u`<button id="swatch" aria-label="${this.label}" aria-disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background-color:var(--uui-swatch-color,${(e=this.color)!=null?e:this.value})"></div><div class="color-swatch__check" style="color:var(--uui-swatch-color,${(t=this.color)!=null?t:this.value})">${li}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?u`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:U}},n.UUIColorSwatchElement.styles=[p`:host{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:box-shadow .1s ease-out;flex-direction:column}*,:host(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(:focus-within:not([disabled])){outline:0}:host(:focus:not([disabled])) #swatch{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-swatch-border-width,1px);outline-style:solid;outline-offset:var(--uui-swatch-border-width,1px)}:host([selectable]) #swatch{cursor:pointer}:host([disabled]){cursor:not-allowed;opacity:.5}#swatch{cursor:inherit;outline:0;background:0 0;border:none;padding:0;margin:0;text-align:left;border-radius:3px}:host(:not([selectable])) #swatch:focus{outline:0}:host([selectable]) #swatch::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-swatch-border-width,1px) * -1);width:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));height:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));box-sizing:border-box;border:var(--uui-swatch-border-width,2px) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-swatch-border-width,1px));transition:opacity .1s ease-out;opacity:0}:host([selectable]:not([disabled]):hover) #swatch::after{opacity:.33}:host([selectable][selected]:not([disabled]):hover) #swatch::after{opacity:.66}:host([selectable][selected]:not([disabled])) #swatch::after{opacity:1}.color-swatch{position:relative;width:var(--uui-swatch-size,25px);height:var(--uui-swatch-size,25px);border-radius:3px;display:flex;flex-direction:column;justify-content:center;align-items:center}:host([show-label]) .color-swatch{width:120px;height:50px}.color-swatch.color-swatch--transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-swatch__color{width:100%;height:100%;border:1px solid rgba(0,0,0,.125);border-radius:inherit;box-sizing:border-box}:host([show-label]) .color-swatch__color{border-radius:3px 3px 0 0}.color-swatch__check{position:absolute;vertical-align:middle;width:calc(var(--uui-swatch-size,25px)/ 2);height:calc(var(--uui-swatch-size,25px)/ 2);line-height:0;filter:invert(1) grayscale(1) contrast(9);pointer-events:none;opacity:0}:host([selected]) .color-swatch__check{opacity:1}.label,slot[name=label]::slotted(*){font-size:var(--uui-size-4,12px)}.color-swatch__label{max-width:120px;box-sizing:border-box;padding:var(--uui-size-space-1,3px) var(--uui-size-space-2,6px);line-height:1.5;display:flex;flex-direction:column;background:#fff;border:1px solid var(--uui-color-border,#d8d7d9);border-radius:0 0 3px 3px;font-size:var(--uui-size-4,12px)}.color-swatch__label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}`],Tt([l()],n.UUIColorSwatchElement.prototype,"value",1),Tt([l()],n.UUIColorSwatchElement.prototype,"color",1),Tt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),Tt([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=Tt([b("uui-color-swatch")],n.UUIColorSwatchElement);var Ed=Object.defineProperty,Qa=Object.getOwnPropertySymbols,kd=Object.prototype.hasOwnProperty,xd=Object.prototype.propertyIsEnumerable,Ja=(i,e,t)=>e in i?Ed(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,es=(i,e)=>{for(var t in e||(e={}))kd.call(e,t)&&Ja(i,t,e[t]);if(Qa)for(var t of Qa(e))xd.call(e,t)&&Ja(i,t,e[t]);return i};let st=class extends P{constructor(e,t={}){super(e,es(es({},{bubbles:!0}),t))}};st.CHANGE="change";var Id=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,gi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Id(e,t,o),o};n.UUIColorSwatchesElement=class extends te("label",m){constructor(){super(),this.value="",this.disabled=!1,this._onSelected=e=>{const t=e.target;this.swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new st(st.CHANGE)))},this._onDeselected=e=>{const t=e.target;this.swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new st(st.CHANGE))))},this.addEventListener(xe.SELECTED,this._onSelected),this.addEventListener(xe.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this.swatches||this.swatches.length===0||this.swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this.swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIColorSwatchesElement.styles=[p`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],gi([l()],n.UUIColorSwatchesElement.prototype,"value",2),gi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),gi([ke({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"swatches",2),n.UUIColorSwatchesElement=gi([b("uui-color-swatches")],n.UUIColorSwatchesElement);var Sd=Object.defineProperty,ts=Object.getOwnPropertySymbols,Pd=Object.prototype.hasOwnProperty,Od=Object.prototype.propertyIsEnumerable,is=(i,e,t)=>e in i?Sd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,os=(i,e)=>{for(var t in e||(e={}))Pd.call(e,t)&&is(i,t,e[t]);if(ts)for(var t of ts(e))Od.call(e,t)&&is(i,t,e[t]);return i};let J=class extends P{constructor(e,t={}){super(e,os(os({},{bubbles:!0}),t))}};J.CHANGE="change",J.INNER_SLOT_CHANGE="inner-slot-change";var zd=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,Ie=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ad(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&zd(e,t,o),o},jd=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ld=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},rs=(i,e,t)=>(jd(i,e,"access private method"),t),fi,zo;n.UUIComboboxListElement=class extends m{constructor(){super(...arguments),Ld(this,fi),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{rs(this,fi,zo).call(this),this._updateSelection(),this.dispatchEvent(new J(J.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new J(J.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new J(J.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{var t;if(!(this._options.length<=0))switch(e.key){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),(t=this._getActiveElement)==null||t.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(xe.SELECTED,this._onSelected),this.addEventListener(xe.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(xe.SELECTED,this._onSelected),this.removeEventListener(xe.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(e=>e.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(e=>e.value===this._activeElementValue)}_goToIndex(e){if(this._options.length===0)return;e=Math.min(Math.max(e,0),this._options.length-1);const t=this._options[e];this._activeElementValue=t.value,rs(this,fi,zo).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>`}},fi=new WeakSet,zo=function(){for(let e=0;e<this._activeOptions.length;e++)this._activeOptions[e].active=!1;const i=this._getActiveElement;i?i.active=!0:this._goToIndex(0)},n.UUIComboboxListElement.styles=[p`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Ie([l()],n.UUIComboboxListElement.prototype,"value",1),Ie([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Ie([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Ie([ke({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Ie([ke({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Ie([g()],n.UUIComboboxListElement.prototype,"_value",2),Ie([g()],n.UUIComboboxListElement.prototype,"_activeElementValue",2),n.UUIComboboxListElement=Ie([b("uui-combobox-list")],n.UUIComboboxListElement);var Td=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,lt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Td(e,t,o),o};n.UUIComboboxListOptionElement=class extends tt(Ot(m)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){var e;return this._value?this._value:((e=this.textContent)==null?void 0:e.trim())||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){var e;return this._displayValue?this._displayValue:((e=this.textContent)==null?void 0:e.trim())||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return u`<slot></slot>`}},n.UUIComboboxListOptionElement.styles=[p`:host{position:relative;cursor:pointer;margin:0 4px;border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px;padding-left:4px}:host(:first-child){margin-top:6px}:host(:last-child){margin-bottom:6px}:host([selected]):host([active])::after{display:block;content:'';position:absolute;inset:0;outline:var(--uui-color-surface,#fff) solid 2px;outline-offset:-4px}:host(:hover){background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]){cursor:auto;color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]:hover){background-color:var(--uui-color-disabled,#f3f3f5)}:host([active]){outline-color:var(--uui-color-focus,#3879ff)}:host([selected]){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected,#3544b1)}:host([selected]:hover){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([selected][disabled]){color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}`],lt([g()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),lt([g()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),lt([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),lt([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),lt([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=lt([b("uui-combobox-list-option")],n.UUIComboboxListOptionElement);var Md=Object.defineProperty,ns=Object.getOwnPropertySymbols,Dd=Object.prototype.hasOwnProperty,Bd=Object.prototype.propertyIsEnumerable,as=(i,e,t)=>e in i?Md(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ss=(i,e)=>{for(var t in e||(e={}))Dd.call(e,t)&&as(i,t,e[t]);if(ns)for(var t of ns(e))Bd.call(e,t)&&as(i,t,e[t]);return i};let H=class extends P{constructor(e,t={}){super(e,ss(ss({},{bubbles:!0}),t))}};H.SEARCH="search",H.CHANGE="change";var Vd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,R=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Vd(e,t,o),o},Ao=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},k=(i,e,t)=>(Ao(i,e,"read from private field"),t?t.call(i):e.get(i)),N=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ls=(i,e,t,r)=>(Ao(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),jo=(i,e,t)=>(Ao(i,e,"access private method"),t),ee,ut,Nt,Mt,yi,wi,_i,Lo,To,No,Mo,$i,ct,Do,Ui,Ei,Bo,ki;n.UUIComboboxElement=class extends ie(m){constructor(){super(...arguments),N(this,Mt),this.closeLabel="Close",this.disabled=!1,N(this,ee,void 0),N(this,ut,void 0),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,N(this,Nt,()=>{this._isPhone=k(this,ut).matches}),N(this,wi,()=>requestAnimationFrame(()=>this._inputElement.focus())),N(this,_i,()=>requestAnimationFrame(()=>{var e;(e=this.shadowRoot)!=null&&e.activeElement||k(this,ct).call(this)})),N(this,Lo,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new H(H.SEARCH)),k(this,$i).call(this)}),N(this,To,()=>{var e;this.value&&this.value!==((e=k(this,ee))==null?void 0:e.value)&&jo(this,Mt,yi).call(this,this.value)}),N(this,No,()=>{var e;this.value=((e=k(this,ee))==null?void 0:e.value)||"",this.search=this.value?this.search:"",k(this,ct).call(this),this.dispatchEvent(new H(H.CHANGE))}),N(this,Mo,()=>{this.open=!this.open}),N(this,$i,()=>{this.open||(this.open=!0)}),N(this,ct,()=>{this.open&&(this.open=!1,this.search="",this._inputElement.value=this._displayValue,this.dispatchEvent(new H(H.SEARCH)))}),N(this,Do,e=>{this.open===!1&&e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.key==="ArrowUp"||e.key==="ArrowDown")&&k(this,$i).call(this),(e.key==="Escape"||e.key==="Enter")&&k(this,ct).call(this)}),N(this,Ui,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._inputElement.value=this._displayValue,this._inputElement.focus(),this.dispatchEvent(new H(H.SEARCH)),this.dispatchEvent(new H(H.CHANGE)))}),N(this,Ei,()=>u`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" autocomplete="off" .disabled="${this.disabled}" popovertarget="combobox-popover" @click="${k(this,Mo)}" @input="${k(this,Lo)}" @keydown="${k(this,Do)}"><slot name="input-prepend" slot="prepend"></slot>${this.disabled?"":k(this,Bo).call(this)}<div id="expand-symbol-wrapper" slot="append"><uui-symbol-expand .open="${this._isOpen}"></uui-symbol-expand></div><slot name="input-append" slot="append"></slot></uui-input>`),N(this,Bo,()=>this.value||this.search?u`<uui-button id="clear-button" @click="${k(this,Ui)}" @keydown="${k(this,Ui)}" label="clear" slot="append" compact="compact" style="height:100%"><uui-icon name="remove" .fallback="${ho.strings[0]}"></uui-icon></uui-button>`:""),N(this,ki,()=>u`<div id="dropdown"><uui-scroll-container tabindex="-1" id="scroll-container"><slot></slot></uui-scroll-container></div>`)}get value(){return this._value}set value(e){typeof e=="string"&&jo(this,Mt,yi).call(this,e),super.value=e}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}get open(){return this._isOpen}set open(e){const t=e;this._isOpen=e;const r=this._comboboxPopoverElement;if(r)if(e){const o=this._inputElement.offsetWidth;r.style.setProperty("--popover-width",`${o}px`),r.showPopover()}else r.hidePopover();this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",k(this,_i)),this.addEventListener("mousedown",k(this,wi)),ls(this,ut,window.matchMedia("(max-width: 600px)")),k(this,Nt).call(this),k(this,ut).addEventListener("change",k(this,Nt)),_(this,"uui-icon"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-combobox-list"),_(this,"uui-scroll-container"),_(this,"uui-popover-container"),_(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",k(this,_i)),this.removeEventListener("mousedown",k(this,wi)),k(this,ut).removeEventListener("change",k(this,Nt))}async firstUpdated(){var e;const t=(e=this._comboboxListElements)==null?void 0:e[0];t&&(ls(this,ee,t),k(this,ee).for=this,k(this,ee).addEventListener(J.CHANGE,k(this,No)),k(this,ee).addEventListener(J.INNER_SLOT_CHANGE,k(this,To)),await this.updateComplete,jo(this,Mt,yi).call(this,this.value))}getFormElement(){return this._inputElement}render(){return this._isPhone&&this.open?u`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${k(this,ct)}">${this.closeLabel}</uui-button>${k(this,Ei).call(this)} ${k(this,ki).call(this)}</div>`:u`${k(this,Ei).call(this)}<uui-popover-container id="combobox-popover" popover="manual" placement="bottom-end">${k(this,ki).call(this)}</uui-popover-container>`}},ee=new WeakMap,ut=new WeakMap,Nt=new WeakMap,Mt=new WeakSet,yi=function(i){k(this,ee)&&(k(this,ee).value=i,requestAnimationFrame(()=>this._displayValue=k(this,ee).displayValue||""))},wi=new WeakMap,_i=new WeakMap,Lo=new WeakMap,To=new WeakMap,No=new WeakMap,Mo=new WeakMap,$i=new WeakMap,ct=new WeakMap,Do=new WeakMap,Ui=new WeakMap,Ei=new WeakMap,Bo=new WeakMap,ki=new WeakMap,n.UUIComboboxElement.styles=[p`:host{display:inline-block}#combobox-input{width:100%;border-radius:var(--uui-size-1,3px)}#combobox-popover{width:var(--uui-dropdown-width,var(--popover-width,inherit))}#scroll-container{overflow-y:auto;width:100%;max-height:var(--uui-combobox-popover-max-height,500px)}#expand-symbol-wrapper{height:100%;padding-right:var(--uui-size-space-3,9px);display:flex;justify-content:center}#dropdown{overflow:hidden;z-index:-1;background-color:var(--uui-combobox-popover-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-color-border,#d8d7d9);border-radius:var(--uui-border-radius,3px);width:100%;height:100%;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23))}:host([disabled]) #caret{fill:var(--uui-color-disabled-contrast,#c4c4c4)}#phone-wrapper{position:fixed;inset:0;display:flex;flex-direction:column;z-index:1;font-size:1.1em}#phone-wrapper #dropdown{display:flex}#phone-wrapper #combobox-input{height:var(--uui-size-16,48px)}#phone-wrapper>uui-button{height:var(--uui-size-14,42px);width:100%}#phone-wrapper #scroll-container{max-height:unset}`],R([l({attribute:"value",reflect:!0})],n.UUIComboboxElement.prototype,"value",1),R([l({type:String})],n.UUIComboboxElement.prototype,"search",1),R([l({type:Boolean})],n.UUIComboboxElement.prototype,"open",1),R([l({type:String})],n.UUIComboboxElement.prototype,"closeLabel",2),R([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),R([C("#combobox-input")],n.UUIComboboxElement.prototype,"_inputElement",2),R([C("#combobox-popover")],n.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),R([ke({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),R([g()],n.UUIComboboxElement.prototype,"_displayValue",2),R([g()],n.UUIComboboxElement.prototype,"_search",2),R([g()],n.UUIComboboxElement.prototype,"_isPhone",2),R([g()],n.UUIComboboxElement.prototype,"_isOpen",2),n.UUIComboboxElement=R([b("uui-combobox")],n.UUIComboboxElement);var Rd=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,Vo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Rd(e,t,o),o};n.UUIDialogLayoutElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return u`<h3 style="${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h3>`}renderContent(){return u`<slot></slot>`}renderActions(){return u`<slot id="actions" name="actions"></slot>`}render(){return u`${this.renderHeadline()} ${this.renderContent()} ${this.renderActions()}`}},n.UUIDialogLayoutElement.styles=[p`:host{display:block;padding:var(--uui-size-10,30px) var(--uui-size-14,42px);color:var(--uui-color-text,#060606)}#actions{margin-top:var(--uui-size-8,24px);display:flex;justify-content:end;gap:var(--uui-size-4,12px)}`],Vo([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),Vo([g()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=Vo([b("uui-dialog-layout")],n.UUIDialogLayoutElement);var Gd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,Wd=(i,e,t,r)=>{for(var o=r>1?void 0:r?qd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Gd(e,t,o),o};n.UUIDialogElement=class extends m{render(){return u`<slot></slot>`}},n.UUIDialogElement.styles=[p`:host{position:relative;display:block;max-width:580px;color:var(--uui-color-text,#060606);background-color:var(--uui-dialog-background-color,var(--uui-color-surface,#fff));box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22));border-radius:var(--uui-dialog-border-radius,calc(var(--uui-border-radius,3px) * 2))}`],n.UUIDialogElement=Wd([b("uui-dialog")],n.UUIDialogElement);var Kd=Object.defineProperty,us=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Yd=Object.prototype.propertyIsEnumerable,cs=(i,e,t)=>e in i?Kd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,hs=(i,e)=>{for(var t in e||(e={}))Xd.call(e,t)&&cs(i,t,e[t]);if(us)for(var t of us(e))Yd.call(e,t)&&cs(i,t,e[t]);return i};let ht=class extends P{constructor(e,t={}){super(e,hs(hs({},{bubbles:!0}),t))}};ht.CHANGE="change";var Zd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,Dt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zd(e,t,o),o};n.UUIFileDropzoneElement=class extends te("",m){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const r=[],o=[];e.split(",").forEach(a=>{a=a.trim().toLowerCase(),new RegExp("[a-z]+\\/[a-z*]","s").test(a)?r.push(a):o.push(a.replace(/^\./,""))}),this._acceptedMimeTypes=r,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-file-dropzone")}async _getAllFileEntries(e){const t=[],r=[...e];for(;r.length>0;){const o=r.shift();if(o.kind==="file"){const a=o.getAsFile();if(!a)continue;this._isAccepted(a)&&t.push(a)}else if(o.kind==="directory"){if(!("webkitGetAsEntry"in o))continue;const a=o.webkitGetAsEntry();r.push(...await this._readAllDirectoryEntries(a.createReader()))}}return t}async _readAllDirectoryEntries(e){const t=[];let r=await this._readEntriesPromise(e);for(;r.length>0;)t.push(...r),r=await this._readEntriesPromise(e);return t}async _readEntriesPromise(e){return new Promise((t,r)=>{try{e.readEntries(t,r)}catch(o){console.log(o),r(o)}})}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),r=e.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o in this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("/*","")))return!0;return!1}async _onDrop(e){var t;e.preventDefault(),this._dropzone.classList.remove("hover");const r=(t=e.dataTransfer)==null?void 0:t.items;if(r){let o=await this._getAllFileEntries(r);this.multiple===!1&&o.length&&(o=[o[0]]),this.dispatchEvent(new ht(ht.CHANGE,{detail:{files:o}}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.dispatchEvent(new ht(ht.CHANGE,{detail:{files:e}}))}render(){return u`<div id="dropzone"><uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>${this.renderLabel()} <input @click="${e=>e.stopImmediatePropagation()}" id="input" type="file" accept="${this.accept}" ?multiple="${this.multiple}" @change="${this._onFileInputChange}" aria-label="${this.label}"><slot></slot></div>`}},n.UUIFileDropzoneElement.styles=[p`#dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;box-sizing:border-box;width:100%;height:100%;padding:var(--uui-size-4,12px);border:3px solid transparent;margin:-3px;backdrop-filter:blur(2px)}#dropzone.hover{border-color:var(--uui-color-default,#1b264f)}#dropzone.hover::before{content:'';position:absolute;inset:0;opacity:.2;border-color:var(--uui-color-default,#1b264f);background-color:var(--uui-color-default,#1b264f)}#symbol{color:var(--uui-color-default,#1b264f);max-width:100%;max-height:100%}#input{position:absolute;width:0;height:0;opacity:0;display:none}`],Dt([C("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),Dt([C("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),Dt([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),Dt([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=Dt([b("uui-file-dropzone")],n.UUIFileDropzoneElement);let Jd=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const a=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let s=-1;const c=10**r;do e/=o,++s;while(Math.round(Math.abs(e)*c)/c>=o&&s<a.length-1);return e.toFixed(r)+" "+a[s]}};var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,se=(i,e,t,r)=>{for(var o=r>1?void 0:r?tp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ep(e,t,o),o};n.UUIFilePreviewElement=class extends m{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(r=>{this._src=r})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-file-thumbnail"),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?u`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?u`<uui-symbol-file-thumbnail .src="${this._src}" .alt="${this._name}" id="file-symbol"></uui-symbol-file-thumbnail>`:u`<uui-symbol-file id="file-symbol" .type="${this._extension}"></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return u`<span id="file-name" class="${this._url?"has-source":""}" @click="${()=>this._url?this._openSource():""}" @keydown="${()=>""}"><span id="file-name-start">${e}</span> <span id="file-name-end">${t}</span></span>`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return u`<slot id="actions" name="actions"></slot>${this._fileTypeTemplate()}<div id="file-info">${this._renderLongName()} <span id="file-size">${this._size&&!this._isDirectory?u`${Jd.humanFileSize(this._size,!0)}`:""}</span></div>`}},n.UUIFilePreviewElement.styles=[p`:host{position:relative;display:grid;grid-template-rows:100px 50px;width:150px;height:150px;box-sizing:border-box;aspect-ratio:1;color:var(--uui-color-text,#060606)}:host(:hover) slot[name=actions]::slotted(*){opacity:1}slot[name=actions]::slotted(*){position:absolute;top:8px;right:8px;max-width:100%;height:32px;font-size:13px;opacity:0;z-index:1;transition:opacity 150ms}#file-symbol{aspect-ratio:1/1;margin:auto;max-width:100%;max-height:100%}#file-info{min-width:0;display:flex;text-align:center;flex-direction:column;font-size:1rem}#file-name{display:flex;justify-content:center}#file-name-start{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#file-name-end{white-space:nowrap}#file-size{opacity:.6}.has-source:hover{text-decoration:underline;cursor:pointer}`],se([g()],n.UUIFilePreviewElement.prototype,"_name",2),se([g()],n.UUIFilePreviewElement.prototype,"_url",2),se([g()],n.UUIFilePreviewElement.prototype,"_extension",2),se([g()],n.UUIFilePreviewElement.prototype,"_src",2),se([g()],n.UUIFilePreviewElement.prototype,"_size",2),se([g()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),se([g()],n.UUIFilePreviewElement.prototype,"_file",2),se([g()],n.UUIFilePreviewElement.prototype,"_isImage",2),se([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=se([b("uui-file-preview")],n.UUIFilePreviewElement);var ip=Object.defineProperty,op=Object.getOwnPropertyDescriptor,xi=(i,e,t,r)=>{for(var o=r>1?void 0:r?op(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ip(e,t,o),o};n.UUIFormLayoutItemElement=class extends m{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),_(this,"uui-form-validation-message")}render(){return u`<div id="label" style="${this._labelSlotHasContent?"":"display: none"}"><slot name="label" @slotchange="${this._labelSlotChanged}"></slot></div><div id="description" style="${this._descriptionSlotHasContent||this.description!==null?"":"display: none"}">${this.description}<slot name="description" @slotchange="${this._descriptionSlotChanged}"></slot></div><uui-form-validation-message><slot></slot><slot name="message" slot="message"></slot></uui-form-validation-message>`}},n.UUIFormLayoutItemElement.styles=[p`:host{position:relative;display:block;margin-top:var(--uui-size-space-5,18px);margin-bottom:var(--uui-size-space-5,18px)}#label{margin-top:-5px;margin-bottom:5px}#description{color:var(--uui-color-disabled-contrast,#c4c4c4);font-size:var(--uui-type-small-size,12px)}#label+#description{margin-top:-8px;min-height:8px}`],xi([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),xi([g()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),xi([g()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=xi([b("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
471
474
|
* @license
|
|
472
475
|
* Copyright 2017 Google LLC
|
|
473
476
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
474
|
-
*/const
|
|
477
|
+
*/const ds=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},Ho=rt(class extends nt{constructor(i){if(super(i),i.type!==Q.CHILD)throw Error("repeat() can only be used in text expressions")}ct(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const o=[],a=[];let s=0;for(const c of i)o[s]=r?r(c,s):s,a[s]=t(c,s),s++;return{values:a,keys:o}}render(i,e,t){return this.ct(i,e,t).values}update(i,[e,t,r]){var o;const a=td(i),{values:s,keys:c}=this.ct(e,t,r);if(!Array.isArray(a))return this.ut=c,s;const h=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],d=[];let v,f,y=0,$=a.length-1,E=0,x=s.length-1;for(;y<=$&&E<=x;)if(a[y]===null)y++;else if(a[$]===null)$--;else if(h[y]===c[E])d[E]=Be(a[y],s[E]),y++,E++;else if(h[$]===c[x])d[x]=Be(a[$],s[x]),$--,x--;else if(h[y]===c[x])d[x]=Be(a[y],s[x]),jt(i,d[x+1],a[y]),y++,x--;else if(h[$]===c[E])d[E]=Be(a[$],s[E]),jt(i,a[y],a[$]),$--,E++;else if(v===void 0&&(v=ds(c,E,x),f=ds(h,y,$)),v.has(h[y]))if(v.has(h[$])){const j=f.get(c[E]),$e=j!==void 0?a[j]:null;if($e===null){const Ue=jt(i,a[y]);Be(Ue,s[E]),d[E]=Ue}else d[E]=Be($e,s[E]),jt(i,a[y],$e),a[j]=null;E++}else Io(a[$]),$--;else Io(a[y]),y++;for(;E<=x;){const j=jt(i,d[x+1]);Be(j,s[E]),d[E++]=j}for(;y<=$;){const j=a[y++];j!==null&&Io(j)}return this.ut=c,ja(i,d),V}});var rp=Object.defineProperty,np=Object.getOwnPropertyDescriptor,ps=(i,e,t,r)=>{for(var o=r>1?void 0:r?np(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rp(e,t,o),o};n.UUIFormValidationMessageElement=class extends m{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=e=>{const t=e.composedPath()[0];t.pristine===!1?this._messages.set(t,t.validationMessage):this._messages.delete(t),this.requestUpdate()},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate()},this.for===null&&(this.for=this)}get for(){return this._for}set for(e){let t=null;if(typeof e=="string"){const a=this.getRootNode();t=a?.getElementById(e)}const r=t||this,o=this._for;o!==r&&(o!==null&&(o.removeEventListener(ot.INVALID,this._onControlInvalid),o.removeEventListener(ot.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(ot.INVALID,this._onControlInvalid),this._for.addEventListener(ot.VALID,this._onControlValid))}render(){return u`<slot></slot><div id="messages">${Ho(this._messages,e=>u`<div>${e[1]}</div>`)}<slot name="message"></slot></div>`}},n.UUIFormValidationMessageElement.styles=[p`#messages{color:var(--uui-color-danger-standalone,#bf214e)}`],ps([l({reflect:!1,attribute:!0})],n.UUIFormValidationMessageElement.prototype,"for",1),n.UUIFormValidationMessageElement=ps([b("uui-form-validation-message")],n.UUIFormValidationMessageElement);var ap=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,lp=(i,e,t,r)=>{for(var o=r>1?void 0:r?sp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ap(e,t,o),o};n.UUIFormElement=class extends m{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(e){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const t=e.target.assignedNodes({flatten:!0}).filter(r=>r instanceof HTMLFormElement);this._formElement=t.length>0?t[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(e){if(e.target===null)return;const t=e.target;if(!t.checkValidity()){t.setAttribute("submit-invalid","");return}t.removeAttribute("submit-invalid")}_onReset(e){e.target!==null&&e.target.removeAttribute("submit-invalid")}render(){return u`<slot @slotchange="${this._onSlotChanged}"></slot>`}},n.UUIFormElement=lp([b("uui-form")],n.UUIFormElement);/**
|
|
475
478
|
* @license
|
|
476
479
|
* Copyright 2017 Google LLC
|
|
477
480
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
478
|
-
*/class mo extends it{constructor(e){if(super(e),this.et=U,e.type!==X.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===U||e==null)return this.ft=void 0,this.et=e;if(e===D)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}mo.directiveName="unsafeHTML",mo.resultType=1;const vo=tt(mo);var Ed=Object.defineProperty,Ma=Object.getOwnPropertySymbols,kd=Object.prototype.hasOwnProperty,xd=Object.prototype.propertyIsEnumerable,Da=(i,e,t)=>e in i?Ed(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ba=(i,e)=>{for(var t in e||(e={}))kd.call(e,t)&&Da(i,t,e[t]);if(Ma)for(var t of Ma(e))xd.call(e,t)&&Da(i,t,e[t]);return i};let st=class extends P{constructor(e,t={}){super(e,Ba(Ba({},{bubbles:!0,composed:!0}),t)),this.icon=null}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};st.ICON_REQUEST="icon-request";var Id=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Me=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Id(e,t,o),o};n.UUIIconElement=class extends m{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new st(st.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?u`<slot name="fallback"></slot>`:vo(this.fallback):this._nameSvg!==null?vo(this._nameSvg):this.svg!==null?vo(this.svg):u`<slot></slot>`}},n.UUIIconElement.styles=[p`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor)}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],Me([f()],n.UUIIconElement.prototype,"_nameSvg",2),Me([l()],n.UUIIconElement.prototype,"label",2),Me([l()],n.UUIIconElement.prototype,"name",1),Me([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),Me([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),Me([f()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=Me([b("uui-icon")],n.UUIIconElement);let go=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},fo=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(st.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(st.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new go(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new go}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var Pd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,Va=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sd(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Pd(e,t,o),o};n.UUIIconRegistryElement=class extends m{constructor(){super(),this._icons={},this._registry=new fo,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return u`<slot></slot>`}},Va([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=Va([b("uui-icon-registry")],n.UUIIconRegistryElement);const Od=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22v-5"/><path d="M9 8V2"/><path d="M15 8V2"/><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/></svg>`,zd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,Ad=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,Ld=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`,jd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,Td=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,Nd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,Md=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,Dd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`,Bd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,Vd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,Hd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,Rd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,Fd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,Gd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,qd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,Wd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,Kd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`,Xd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,Yd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`,Zd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`,Qd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`,Jd=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,ep=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,tp=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`,ip=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,op=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`,rp=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`,np=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,ap=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`,sp=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`,lp=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;let Ha=class extends fo{constructor(){super(),this.defineIcon("add",Od.strings[0]),this.defineIcon("alert",zd.strings[0]),this.defineIcon("attachment",Ad.strings[0]),this.defineIcon("calendar",Ld.strings[0]),this.defineIcon("check",jd.strings[0]),this.defineIcon("clipboard",Td.strings[0]),this.defineIcon("code",Nd.strings[0]),this.defineIcon("colorpicker",Md.strings[0]),this.defineIcon("copy",Dd.strings[0]),this.defineIcon("delete",Bd.strings[0]),this.defineIcon("document",Vd.strings[0]),this.defineIcon("download",Hd.strings[0]),this.defineIcon("edit",Rd.strings[0]),this.defineIcon("favorite",Fd.strings[0]),this.defineIcon("folder",Gd.strings[0]),this.defineIcon("forbidden",qd.strings[0]),this.defineIcon("info",Wd.strings[0]),this.defineIcon("link",Kd.strings[0]),this.defineIcon("lock",Xd.strings[0]),this.defineIcon("pause",Yd.strings[0]),this.defineIcon("picture",Zd.strings[0]),this.defineIcon("play",Qd.strings[0]),this.defineIcon("remove",Jd.strings[0]),this.defineIcon("search",ep.strings[0]),this.defineIcon("see",tp.strings[0]),this.defineIcon("settings",ip.strings[0]),this.defineIcon("subtract",op.strings[0]),this.defineIcon("sync",rp.strings[0]),this.defineIcon("unlock",np.strings[0]),this.defineIcon("unsee",ap.strings[0]),this.defineIcon("wand",sp.strings[0]),this.defineIcon("wrong",lp.strings[0])}};var up=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,hp=(i,e,t,r)=>{for(var o=r>1?void 0:r?cp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&up(e,t,o),o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new Ha}},n.UUIIconRegistryEssentialElement=hp([b("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,lt=(i,e,t,r)=>{for(var o=r>1?void 0:r?pp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&dp(e,t,o),o};n.UUIInputFileElement=class extends J(m){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return this._value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),w(this,"uui-icon"),w(this,"uui-file-dropzone"),w(this,"uui-button"),w(this,"uui-action-bar"),w(this,"uui-file-preview")}getFormElement(){return this._dropZone}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],a=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=a;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,a),this._updateFileWrappers([a]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const a=o instanceof File;r.append(this.name,a?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return u`<uui-file-preview .file="${e}"><uui-action-bar slot="actions"><uui-button @click="${()=>this._removeFile(t)}" color="danger" label="${`Delete ${e.name}`}"><uui-icon name="delete" .fallback="${Pc.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return u`${bo(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return u`<uui-file-dropzone id="dropzone" ?multiple="${this.multiple}" .accept="${this.accept}" @change="${this._handleFilesChange}" label="Drop files here"></uui-file-dropzone><div id="files">${this._renderFiles()} ${this._files.length===0||this.multiple?u`<uui-button @click="${this._handleClick}" id="add-button" look="placeholder" label="Add"></uui-button>`:U}</div>`}},n.UUIInputFileElement.styles=[p`:host{width:100%;height:100%;position:relative;display:flex;box-sizing:border-box;border:1px solid var(--uui-color-border,#d8d7d9)}#input{position:absolute;width:0;height:0;opacity:0;display:none}#files{display:grid;box-sizing:border-box;justify-items:center;width:100%;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-rows:min-content;gap:16px;padding:16px;overflow:auto;max-height:100%}#dropzone{display:none;position:absolute;inset:0;z-index:10;justify-content:center;align-items:center}#add-button{width:150px;height:150px;display:flex;padding:16px;box-sizing:border-box;justify-content:center;align-items:stretch}`],lt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),lt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),lt([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),lt([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),lt([f()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=lt([b("uui-input-file")],n.UUIInputFileElement);var bp=Object.defineProperty,Ra=Object.getOwnPropertySymbols,mp=Object.prototype.hasOwnProperty,vp=Object.prototype.propertyIsEnumerable,Fa=(i,e,t)=>e in i?bp(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ga=(i,e)=>{for(var t in e||(e={}))mp.call(e,t)&&Fa(i,t,e[t]);if(Ra)for(var t of Ra(e))vp.call(e,t)&&Fa(i,t,e[t]);return i};let De=class extends P{constructor(e,t={}){super(e,Ga(Ga({},{bubbles:!0}),t))}};De.CHANGE="change",De.INPUT="input";var gp=Object.defineProperty,fp=Object.getOwnPropertyDescriptor,T=(i,e,t,r)=>{for(var o=r>1?void 0:r?fp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&gp(e,t,o),o};n.UUIInputElement=class extends J(Q("",m)){constructor(){super(),this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="",this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keypress",this._onKeypress),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&String(this._value).length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&String(this._value).length>this.maxlength)}get type(){return this._type}set type(e){this._type=e}firstUpdated(e){super.firstUpdated(e),this.addFormControlElement(this._input)}_onKeypress(e){this.type!=="color"&&e.key=="Enter"&&this.submit()}blur(){this._input.blur()}focus(){this._input.focus()}select(){this._input.select()}getFormElement(){return this._input}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new De(De.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new De(De.CHANGE))}renderPrepend(){return u`<slot name="prepend"></slot>`}renderAppend(){return u`<slot name="append"></slot>`}render(){return u`${this.renderPrepend()} ${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()} ${this.renderAppend()}`}renderInputWithAutoWidth(){return u`<div id="control">${this.renderInput()}${this.renderAutoWidthBackground()}</div>`}renderInput(){return u`<input id="input" .type="${this.type}" .value="${this.value}" .name="${this.name}" pattern="${x(this.pattern)}" min="${x(this.min)}" max="${x(this.max)}" step="${x(this.step)}" spellcheck="${this.spellcheck}" autocomplete="${x(this.autocomplete)}" placeholder="${x(this.placeholder)}" aria-label="${x(this.label)}" inputmode="${x(this.inputMode)}" ?disabled="${this.disabled}" ?autofocus="${this.autofocus}" ?required="${this.required}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">`}renderAutoWidthBackground(){return u`<div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return u`${this.value.length>0?this.value:this.placeholder}`}},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[p`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;box-sizing:border-box;background-color:var(--uui-input-background-color,var(--uui-color-surface,#fff));border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));--uui-button-height:100%;--auto-width-text-margin-right:0;--auto-width-text-margin-left:0}#control{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:center}#auto{border:0 1px solid transparent;visibility:hidden;white-space:pre;z-index:-1;height:0;padding:0 var(--uui-size-space-3,9px);margin:0 var(--auto-width-text-margin-right) 0 var(--auto-width-text-margin-left)}:host([auto-width]) #input{width:10px;min-width:100%}:host(:hover){border-color:var(--uui-input-border-color-hover,var(--uui-color-border-standalone,#c2c2c2))}:host(:focus-within){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:focus){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1))}:host([disabled]){background-color:var(--uui-input-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input{-webkit-text-fill-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([readonly]){background-color:var(--uui-input-background-color-readonly,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2))}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border-color:var(--uui-color-danger,#d42054)}input{font-family:inherit;padding:var(--uui-size-1,3px) var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:0;box-sizing:border-box;border:none;background:0 0;width:100%;height:inherit;text-align:inherit;outline:0}input[type=password]::-ms-reveal{display:none}input[type=color]{width:30px;padding:0;border:none}::slotted(uui-input){height:100%;--uui-input-border-width:0}`],T([l()],n.UUIInputElement.prototype,"min",2),T([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),T([l({type:String,attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),T([l()],n.UUIInputElement.prototype,"max",2),T([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),T([l({type:String,attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),T([l({type:Number})],n.UUIInputElement.prototype,"step",2),T([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),T([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),T([l()],n.UUIInputElement.prototype,"placeholder",2),T([l()],n.UUIInputElement.prototype,"autocomplete",2),T([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),T([l({type:String})],n.UUIInputElement.prototype,"type",1),T([l({type:String})],n.UUIInputElement.prototype,"pattern",2),T([l({type:String})],n.UUIInputElement.prototype,"inputMode",2),T([C("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=T([b("uui-input")],n.UUIInputElement);var yp=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,qa=(i,e,t,r)=>{for(var o=r>1?void 0:r?_p(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&yp(e,t,o),o};n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),this.locked=!0,this.readonly=!0}connectedCallback(){super.connectedCallback(),w(this,"uui-icon"),w(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked}renderIcon(){return this.locked===!0?u`<uui-icon name="lock" .fallback="${Sc.strings[0]}"></uui-icon>`:u`<uui-icon name="unlock" .fallback="${Ac.strings[0]}"></uui-icon>`}renderPrepend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?"Unlock input":"Lock input"}">${this.renderIcon()}</uui-button>`}},n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,p`#lock{height:100%;--uui-button-padding-left-factor:0.75;--uui-button-padding-right-factor:0.75;font-size:12px}:host([locked]) #input{cursor:not-allowed;opacity:.55}`],qa([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",2),n.UUIInputLockElement=qa([b("uui-input-lock")],n.UUIInputLockElement);var wp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,yo=(i,e,t,r)=>{for(var o=r>1?void 0:r?$p(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&wp(e,t,o),o};n.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),w(this,"uui-icon"),w(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?u`<uui-icon name="see" .fallback="${zc.strings[0]}"></uui-icon>`:u`<uui-icon name="unsee" .fallback="${Lc.strings[0]}"></uui-icon>`}renderAppend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onPasswordToggle}" compact="compact" label="${this.passwordType==="password"?"Show password":"Hide password"}" id="eye">${this.renderIcon()}</uui-button>`}},n.UUIInputPasswordElement.styles=[...n.UUIInputElement.styles,p`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],yo([f()],n.UUIInputPasswordElement.prototype,"passwordType",2),yo([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=yo([b("uui-input-password")],n.UUIInputPasswordElement);var Up=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,kp=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ep(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Up(e,t,o),o};n.UUIKeyboardShortcutElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[p`:host{display:inline-block;font-family:inherit;font-size:var(--uui-size-4,12px);color:var(--uui-color-text,#060606)}::slotted(:first-child)uui-key{margin-left:0}::slotted(:last-child)uui-key{margin-right:0}`],n.UUIKeyboardShortcutElement=kp([b("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var xp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,Cp=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ip(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&xp(e,t,o),o};n.UUIKeyElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyElement.styles=[p`:host{background:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border,#d8d7d9);font-family:inherit;font-size:var(--uui-type-small-size,12px);color:var(--uui-color-text,#060606);border-radius:5px;margin:0 5px;padding:5px 7px;box-sizing:border-box;user-select:none;text-transform:lowercase}`],n.UUIKeyElement=Cp([b("uui-key")],n.UUIKeyElement);var Pp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,ci=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Pp(e,t,o),o};n.UUILabelElement=class extends m{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){if(typeof this.for=="string"){const e=this.getRootNode();return e?.getElementById(this.for)||null}return this.for||null}render(){return u`<slot></slot>${this.required?u`<div id="required">*</div>`:""}`}},n.UUILabelElement.styles=[p`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],ci([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),ci([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),ci([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=ci([b("uui-label")],n.UUILabelElement);var Op=Object.defineProperty,zp=Object.getOwnPropertyDescriptor,_o=(i,e,t,r)=>{for(var o=r>1?void 0:r?zp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Op(e,t,o),o};const Ap=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUILoaderBarElement=class extends m{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=Ap(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return u`${this.progress?u`<div id="bar" style="max-width:${this.progress.toString()}"></div>`:""}<div id="bar-anim" class="${this.progress?"":"animate"}" style="animation-duration:${this.animationDuration}"></div><div id="bar-background"></div>`}},n.UUILoaderBarElement.styles=[p`:host{position:relative;display:block;width:100%;height:4px;overflow:hidden;color:var(--uui-color-default,#1b264f)}#bar,#bar-anim,#bar-background{position:absolute;inset:0;height:100%}#bar,#bar-background{background:currentColor}#bar{transition:max-width 120ms ease}#bar-background{opacity:.3}#bar-anim{transform:scaleX(.4);animation:bar-loading 1s infinite linear;background:linear-gradient(-90deg,#fff 0,#fff 25%,transparent 100%)}#bar-anim.animate{background:linear-gradient(-90deg,currentColor 0,currentColor 25%,transparent 100%)}@keyframes bar-loading{0%{transform-origin:-175% 0}100%{transform-origin:175% 0}}`],_o([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),_o([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=_o([b("uui-loader-bar")],n.UUILoaderBarElement);var Lp=Object.defineProperty,jp=Object.getOwnPropertyDescriptor,wo=(i,e,t,r)=>{for(var o=r>1?void 0:r?jp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Lp(e,t,o),o};n.UUILoaderCircleElement=class extends m{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?u`<span id="progress-display">${this.progress}</span>`:""}render(){return u`<svg id="spinner" class="${this.progress?"":"animate"}" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle id="bg" cx="50%" cy="50%" r="16"/><g><circle id="circle" cx="50%" cy="50%" r="16" style="${ue(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}},n.UUILoaderCircleElement.styles=[p`:host{vertical-align:middle;line-height:0;overflow:hidden;display:inline-flex;justify-content:center;align-items:center;position:relative;width:1em;height:1em;color:var(--uui-color-default,#1b264f)}#spinner{width:100%;height:100%}#spinner g{transform-origin:50% 50%;animation:18s linear infinite spinner-animation}#spinner.animate g{animation:.8s linear infinite spinner-animation}@keyframes spinner-animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#spinner.animate #circle{animation:1.4s ease-in infinite circle-animation}@keyframes circle-animation{0%{stroke-dashoffset:-55}38%{stroke-dashoffset:-88}100%{stroke-dashoffset:-55}}svg circle{fill:transparent;stroke:currentColor;stroke-width:6px}#bg{opacity:.5}#circle{stroke-linecap:round;stroke-dasharray:0 0;transform-origin:50% 50%;transform:rotate(-90deg);transition:stroke-dasharray 120ms ease}#progress-display{position:absolute;left:0;top:50%;right:0;stroke:currentColor;transform:translateY(-50%);font-size:.3em;font-weight:700;text-align:center;padding-top:.09em}`],wo([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),wo([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=wo([b("uui-loader-circle")],n.UUILoaderCircleElement);var Tp=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Mp=(i,e,t,r)=>{for(var o=r>1?void 0:r?Np(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Tp(e,t,o),o};n.UUILoaderElement=class extends m{render(){return u`<div></div><div></div><div></div>`}},n.UUILoaderElement.styles=[p`:host{color:var(--uui-color-default,#1b264f)}div{display:inline-block;width:var(--uui-size-2,6px);height:var(--uui-size-2,6px);border:2px solid currentColor;border-radius:100%;animation:loaderAnimation 1.4s infinite}div:nth-child(1n){animation-delay:0s}div:nth-child(2n){animation-delay:.15s}div:nth-child(3n){animation-delay:.3s}@keyframes loaderAnimation{0%{transform:scale(.5);background-color:currentColor}50%{transform:scale(1);background-color:transparent}100%{transform:scale(.5);background-color:currentColor}}`],n.UUILoaderElement=Mp([b("uui-loader")],n.UUILoaderElement);/**
|
|
481
|
+
*/class Ro extends nt{constructor(e){if(super(e),this.et=U,e.type!==Q.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===U||e==null)return this.ft=void 0,this.et=e;if(e===V)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ro.directiveName="unsafeHTML",Ro.resultType=1;const Fo=rt(Ro);var up=Object.defineProperty,bs=Object.getOwnPropertySymbols,cp=Object.prototype.hasOwnProperty,hp=Object.prototype.propertyIsEnumerable,ms=(i,e,t)=>e in i?up(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,vs=(i,e)=>{for(var t in e||(e={}))cp.call(e,t)&&ms(i,t,e[t]);if(bs)for(var t of bs(e))hp.call(e,t)&&ms(i,t,e[t]);return i};let dt=class extends P{constructor(e,t={}){super(e,vs(vs({},{bubbles:!0,composed:!0}),t)),this.icon=null}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};dt.ICON_REQUEST="icon-request";var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?pp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&dp(e,t,o),o};n.UUIIconElement=class extends m{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new dt(dt.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?u`<slot name="fallback"></slot>`:Fo(this.fallback):this._nameSvg!==null?Fo(this._nameSvg):this.svg!==null?Fo(this.svg):u`<slot></slot>`}},n.UUIIconElement.styles=[p`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor)}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],Ve([g()],n.UUIIconElement.prototype,"_nameSvg",2),Ve([l()],n.UUIIconElement.prototype,"label",2),Ve([l()],n.UUIIconElement.prototype,"name",1),Ve([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),Ve([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),Ve([g()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=Ve([b("uui-icon")],n.UUIIconElement);let Go=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},qo=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(dt.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(dt.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new Go(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Go}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var bp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,gs=(i,e,t,r)=>{for(var o=r>1?void 0:r?mp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&bp(e,t,o),o};n.UUIIconRegistryElement=class extends m{constructor(){super(),this._icons={},this._registry=new qo,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return u`<slot></slot>`}},gs([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=gs([b("uui-icon-registry")],n.UUIIconRegistryElement);const vp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22v-5"/><path d="M9 8V2"/><path d="M15 8V2"/><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/></svg>`,gp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,fp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,yp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`,wp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,_p=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,$p=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,Up=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,Ep=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`,kp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,xp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,Ip=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,Cp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,Sp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,Pp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,Op=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,zp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,Ap=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`,jp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,Lp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`,Tp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`,Np=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`,Mp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,Dp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,Bp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`,Vp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,Hp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`,Rp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`,Fp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,Gp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`,qp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`,Wp=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;let fs=class extends qo{constructor(){super(),this.defineIcon("add",vp.strings[0]),this.defineIcon("alert",gp.strings[0]),this.defineIcon("attachment",fp.strings[0]),this.defineIcon("calendar",yp.strings[0]),this.defineIcon("check",wp.strings[0]),this.defineIcon("clipboard",_p.strings[0]),this.defineIcon("code",$p.strings[0]),this.defineIcon("colorpicker",Up.strings[0]),this.defineIcon("copy",Ep.strings[0]),this.defineIcon("delete",kp.strings[0]),this.defineIcon("document",xp.strings[0]),this.defineIcon("download",Ip.strings[0]),this.defineIcon("edit",Cp.strings[0]),this.defineIcon("favorite",Sp.strings[0]),this.defineIcon("folder",Pp.strings[0]),this.defineIcon("forbidden",Op.strings[0]),this.defineIcon("info",zp.strings[0]),this.defineIcon("link",Ap.strings[0]),this.defineIcon("lock",jp.strings[0]),this.defineIcon("pause",Lp.strings[0]),this.defineIcon("picture",Tp.strings[0]),this.defineIcon("play",Np.strings[0]),this.defineIcon("remove",Mp.strings[0]),this.defineIcon("search",Dp.strings[0]),this.defineIcon("see",Bp.strings[0]),this.defineIcon("settings",Vp.strings[0]),this.defineIcon("subtract",Hp.strings[0]),this.defineIcon("sync",Rp.strings[0]),this.defineIcon("unlock",Fp.strings[0]),this.defineIcon("unsee",Gp.strings[0]),this.defineIcon("wand",qp.strings[0]),this.defineIcon("wrong",Wp.strings[0])}};var Kp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,Yp=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Kp(e,t,o),o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new fs}},n.UUIIconRegistryEssentialElement=Yp([b("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var Zp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,pt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zp(e,t,o),o};n.UUIInputFileElement=class extends ie(m){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return this._value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-file-dropzone"),_(this,"uui-button"),_(this,"uui-action-bar"),_(this,"uui-file-preview")}getFormElement(){return this._dropZone}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],a=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=a;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,a),this._updateFileWrappers([a]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const a=o instanceof File;r.append(this.name,a?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return u`<uui-file-preview .file="${e}"><uui-action-bar slot="actions"><uui-button @click="${()=>this._removeFile(t)}" color="danger" label="${`Delete ${e.name}`}"><uui-icon name="delete" .fallback="${lh.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return u`${Ho(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return u`<uui-file-dropzone id="dropzone" ?multiple="${this.multiple}" .accept="${this.accept}" @change="${this._handleFilesChange}" label="Drop files here"></uui-file-dropzone><div id="files">${this._renderFiles()} ${this._files.length===0||this.multiple?u`<uui-button @click="${this._handleClick}" id="add-button" look="placeholder" label="Add"></uui-button>`:U}</div>`}},n.UUIInputFileElement.styles=[p`:host{width:100%;height:100%;position:relative;display:flex;box-sizing:border-box;border:1px solid var(--uui-color-border,#d8d7d9)}#input{position:absolute;width:0;height:0;opacity:0;display:none}#files{display:grid;box-sizing:border-box;justify-items:center;width:100%;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-rows:min-content;gap:16px;padding:16px;overflow:auto;max-height:100%}#dropzone{display:none;position:absolute;inset:0;z-index:10;justify-content:center;align-items:center}#add-button{width:150px;height:150px;display:flex;padding:16px;box-sizing:border-box;justify-content:center;align-items:stretch}`],pt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),pt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),pt([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),pt([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),pt([g()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=pt([b("uui-input-file")],n.UUIInputFileElement);var Jp=Object.defineProperty,ys=Object.getOwnPropertySymbols,eb=Object.prototype.hasOwnProperty,tb=Object.prototype.propertyIsEnumerable,ws=(i,e,t)=>e in i?Jp(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,_s=(i,e)=>{for(var t in e||(e={}))eb.call(e,t)&&ws(i,t,e[t]);if(ys)for(var t of ys(e))tb.call(e,t)&&ws(i,t,e[t]);return i};let He=class extends P{constructor(e,t={}){super(e,_s(_s({},{bubbles:!0}),t))}};He.CHANGE="change",He.INPUT="input";var ib=Object.defineProperty,ob=Object.getOwnPropertyDescriptor,M=(i,e,t,r)=>{for(var o=r>1?void 0:r?ob(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ib(e,t,o),o};n.UUIInputElement=class extends ie(te("",m)){constructor(){super(),this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="",this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keypress",this._onKeypress),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&String(this._value).length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&String(this._value).length>this.maxlength)}get type(){return this._type}set type(e){this._type=e}firstUpdated(e){super.firstUpdated(e),this.addFormControlElement(this._input)}_onKeypress(e){this.type!=="color"&&e.key=="Enter"&&this.submit()}blur(){this._input.blur()}focus(){this._input.focus()}select(){this._input.select()}getFormElement(){return this._input}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new He(He.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new He(He.CHANGE))}renderPrepend(){return u`<slot name="prepend"></slot>`}renderAppend(){return u`<slot name="append"></slot>`}render(){return u`${this.renderPrepend()} ${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()} ${this.renderAppend()}`}renderInputWithAutoWidth(){return u`<div id="control">${this.renderInput()}${this.renderAutoWidthBackground()}</div>`}renderInput(){return u`<input id="input" .type="${this.type}" .value="${this.value}" .name="${this.name}" pattern="${I(this.pattern)}" min="${I(this.min)}" max="${I(this.max)}" step="${I(this.step)}" spellcheck="${this.spellcheck}" autocomplete="${I(this.autocomplete)}" placeholder="${I(this.placeholder)}" aria-label="${I(this.label)}" inputmode="${I(this.inputMode)}" ?disabled="${this.disabled}" ?autofocus="${this.autofocus}" ?required="${this.required}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">`}renderAutoWidthBackground(){return u`<div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return u`${this.value.length>0?this.value:this.placeholder}`}},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[p`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;box-sizing:border-box;background-color:var(--uui-input-background-color,var(--uui-color-surface,#fff));border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));--uui-button-height:100%;--auto-width-text-margin-right:0;--auto-width-text-margin-left:0}#control{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:center}#auto{border:0 1px solid transparent;visibility:hidden;white-space:pre;z-index:-1;height:0;padding:0 var(--uui-size-space-3,9px);margin:0 var(--auto-width-text-margin-right) 0 var(--auto-width-text-margin-left)}:host([auto-width]) #input{width:10px;min-width:100%}:host(:hover){border-color:var(--uui-input-border-color-hover,var(--uui-color-border-standalone,#c2c2c2))}:host(:focus-within){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:focus){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1))}:host([disabled]){background-color:var(--uui-input-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input{-webkit-text-fill-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([readonly]){background-color:var(--uui-input-background-color-readonly,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2))}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border-color:var(--uui-color-danger,#d42054)}input{font-family:inherit;padding:var(--uui-size-1,3px) var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:0;box-sizing:border-box;border:none;background:0 0;width:100%;height:inherit;text-align:inherit;outline:0}input[type=password]::-ms-reveal{display:none}input[type=color]{width:30px;padding:0;border:none}::slotted(uui-input),::slotted(uui-input-lock){height:100%;--uui-input-border-width:0}`],M([l()],n.UUIInputElement.prototype,"min",2),M([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),M([l({type:String,attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),M([l()],n.UUIInputElement.prototype,"max",2),M([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),M([l({type:String,attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),M([l({type:Number})],n.UUIInputElement.prototype,"step",2),M([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),M([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),M([l()],n.UUIInputElement.prototype,"placeholder",2),M([l()],n.UUIInputElement.prototype,"autocomplete",2),M([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),M([l({type:String})],n.UUIInputElement.prototype,"type",1),M([l({type:String})],n.UUIInputElement.prototype,"pattern",2),M([l({type:String})],n.UUIInputElement.prototype,"inputMode",2),M([C("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=M([b("uui-input")],n.UUIInputElement);var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,$s=(i,e,t,r)=>{for(var o=r>1?void 0:r?nb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rb(e,t,o),o};n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),this.locked=!0,this.readonly=!0}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked}renderIcon(){return this.locked===!0?u`<uui-icon name="lock" .fallback="${uh.strings[0]}"></uui-icon>`:u`<uui-icon name="unlock" .fallback="${dh.strings[0]}"></uui-icon>`}renderPrepend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?"Unlock input":"Lock input"}">${this.renderIcon()}</uui-button>`}},n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,p`#lock{height:100%;--uui-button-padding-left-factor:0.75;--uui-button-padding-right-factor:0.75;font-size:12px}:host([locked]) #input{cursor:not-allowed;opacity:.55}`],$s([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",2),n.UUIInputLockElement=$s([b("uui-input-lock")],n.UUIInputLockElement);var ab=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,Wo=(i,e,t,r)=>{for(var o=r>1?void 0:r?sb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ab(e,t,o),o};n.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?u`<uui-icon name="see" .fallback="${hh.strings[0]}"></uui-icon>`:u`<uui-icon name="unsee" .fallback="${ph.strings[0]}"></uui-icon>`}renderAppend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onPasswordToggle}" compact="compact" label="${this.passwordType==="password"?"Show password":"Hide password"}" id="eye">${this.renderIcon()}</uui-button>`}},n.UUIInputPasswordElement.styles=[...n.UUIInputElement.styles,p`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],Wo([g()],n.UUIInputPasswordElement.prototype,"passwordType",2),Wo([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=Wo([b("uui-input-password")],n.UUIInputPasswordElement);var lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,cb=(i,e,t,r)=>{for(var o=r>1?void 0:r?ub(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&lb(e,t,o),o};n.UUIKeyboardShortcutElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[p`:host{display:inline-block;font-family:inherit;font-size:var(--uui-size-4,12px);color:var(--uui-color-text,#060606)}::slotted(:first-child)uui-key{margin-left:0}::slotted(:last-child)uui-key{margin-right:0}`],n.UUIKeyboardShortcutElement=cb([b("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var hb=Object.defineProperty,db=Object.getOwnPropertyDescriptor,pb=(i,e,t,r)=>{for(var o=r>1?void 0:r?db(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&hb(e,t,o),o};n.UUIKeyElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyElement.styles=[p`:host{background:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border,#d8d7d9);font-family:inherit;font-size:var(--uui-type-small-size,12px);color:var(--uui-color-text,#060606);border-radius:5px;margin:0 5px;padding:5px 7px;box-sizing:border-box;user-select:none;text-transform:lowercase}`],n.UUIKeyElement=pb([b("uui-key")],n.UUIKeyElement);var bb=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,Ii=(i,e,t,r)=>{for(var o=r>1?void 0:r?mb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&bb(e,t,o),o};n.UUILabelElement=class extends m{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){if(typeof this.for=="string"){const e=this.getRootNode();return e?.getElementById(this.for)||null}return this.for||null}render(){return u`<slot></slot>${this.required?u`<div id="required">*</div>`:""}`}},n.UUILabelElement.styles=[p`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],Ii([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),Ii([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),Ii([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=Ii([b("uui-label")],n.UUILabelElement);var vb=Object.defineProperty,gb=Object.getOwnPropertyDescriptor,Ko=(i,e,t,r)=>{for(var o=r>1?void 0:r?gb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&vb(e,t,o),o};const fb=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUILoaderBarElement=class extends m{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=fb(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return u`${this.progress?u`<div id="bar" style="max-width:${this.progress.toString()}"></div>`:""}<div id="bar-anim" class="${this.progress?"":"animate"}" style="animation-duration:${this.animationDuration}"></div><div id="bar-background"></div>`}},n.UUILoaderBarElement.styles=[p`:host{position:relative;display:block;width:100%;height:4px;overflow:hidden;color:var(--uui-color-default,#1b264f)}#bar,#bar-anim,#bar-background{position:absolute;inset:0;height:100%}#bar,#bar-background{background:currentColor}#bar{transition:max-width 120ms ease}#bar-background{opacity:.3}#bar-anim{transform:scaleX(.4);animation:bar-loading 1s infinite linear;background:linear-gradient(-90deg,#fff 0,#fff 25%,transparent 100%)}#bar-anim.animate{background:linear-gradient(-90deg,currentColor 0,currentColor 25%,transparent 100%)}@keyframes bar-loading{0%{transform-origin:-175% 0}100%{transform-origin:175% 0}}`],Ko([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),Ko([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=Ko([b("uui-loader-bar")],n.UUILoaderBarElement);var yb=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,Xo=(i,e,t,r)=>{for(var o=r>1?void 0:r?wb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&yb(e,t,o),o};n.UUILoaderCircleElement=class extends m{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?u`<span id="progress-display">${this.progress}</span>`:""}render(){return u`<svg id="spinner" class="${this.progress?"":"animate"}" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle id="bg" cx="50%" cy="50%" r="16"/><g><circle id="circle" cx="50%" cy="50%" r="16" style="${re(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}},n.UUILoaderCircleElement.styles=[p`:host{vertical-align:middle;line-height:0;overflow:hidden;display:inline-flex;justify-content:center;align-items:center;position:relative;width:1em;height:1em;color:var(--uui-color-default,#1b264f)}#spinner{width:100%;height:100%}#spinner g{transform-origin:50% 50%;animation:18s linear infinite spinner-animation}#spinner.animate g{animation:.8s linear infinite spinner-animation}@keyframes spinner-animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#spinner.animate #circle{animation:1.4s ease-in infinite circle-animation}@keyframes circle-animation{0%{stroke-dashoffset:-55}38%{stroke-dashoffset:-88}100%{stroke-dashoffset:-55}}svg circle{fill:transparent;stroke:currentColor;stroke-width:6px}#bg{opacity:.5}#circle{stroke-linecap:round;stroke-dasharray:0 0;transform-origin:50% 50%;transform:rotate(-90deg);transition:stroke-dasharray 120ms ease}#progress-display{position:absolute;left:0;top:50%;right:0;stroke:currentColor;transform:translateY(-50%);font-size:.3em;font-weight:700;text-align:center;padding-top:.09em}`],Xo([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),Xo([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=Xo([b("uui-loader-circle")],n.UUILoaderCircleElement);var _b=Object.defineProperty,$b=Object.getOwnPropertyDescriptor,Ub=(i,e,t,r)=>{for(var o=r>1?void 0:r?$b(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_b(e,t,o),o};n.UUILoaderElement=class extends m{render(){return u`<div></div><div></div><div></div>`}},n.UUILoaderElement.styles=[p`:host{color:var(--uui-color-default,#1b264f)}div{display:inline-block;width:var(--uui-size-2,6px);height:var(--uui-size-2,6px);border:2px solid currentColor;border-radius:100%;animation:loaderAnimation 1.4s infinite}div:nth-child(1n){animation-delay:0s}div:nth-child(2n){animation-delay:.15s}div:nth-child(3n){animation-delay:.3s}@keyframes loaderAnimation{0%{transform:scale(.5);background-color:currentColor}50%{transform:scale(1);background-color:transparent}100%{transform:scale(.5);background-color:currentColor}}`],n.UUILoaderElement=Ub([b("uui-loader")],n.UUILoaderElement);/**
|
|
479
482
|
* @license
|
|
480
483
|
* Copyright 2017 Google LLC
|
|
481
484
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
482
|
-
*/const
|
|
485
|
+
*/const Bt=(i,e)=>{var t,r;const o=i._$AN;if(o===void 0)return!1;for(const a of o)(r=(t=a)._$AO)===null||r===void 0||r.call(t,e,!1),Bt(a,e);return!0},Ci=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},Us=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),xb(e)}};function Eb(i){this._$AN!==void 0?(Ci(this),this._$AM=i,Us(this)):this._$AM=i}function kb(i,e=!1,t=0){const r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(r))for(let a=t;a<r.length;a++)Bt(r[a],!1),Ci(r[a]);else r!=null&&(Bt(r,!1),Ci(r));else Bt(this,i)}const xb=i=>{var e,t,r,o;i.type==Q.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=kb),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=Eb))};let Ib=class extends nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Us(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,o;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)===null||r===void 0||r.call(this):(o=this.disconnected)===null||o===void 0||o.call(this)),t&&(Bt(this,e),Ci(this))}setValue(e){if(za(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};const Yo=new WeakMap,Zo=rt(class extends Ib{render(i){return U}update(i,[e]){var t;const r=e!==this.G;return r&&this.G!==void 0&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=e,this.dt=(t=i.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=i.element)),U}ot(i){var e;if(typeof this.G=="function"){const t=(e=this.dt)!==null&&e!==void 0?e:globalThis;let r=Yo.get(t);r===void 0&&(r=new WeakMap,Yo.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.dt,void 0),r.set(this.G,i),i!==void 0&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,e,t;return typeof this.G=="function"?(e=Yo.get((i=this.dt)!==null&&i!==void 0?i:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});let fe=class extends P{};fe.SHOW_CHILDREN="show-children",fe.HIDE_CHILDREN="hide-children",fe.CLICK_LABEL="click-label";var Cb=Object.defineProperty,Sb=Object.getOwnPropertyDescriptor,ye=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Cb(e,t,o),o};n.UUIMenuItemElement=class extends ti(tt(Ot(te("label",m)))){constructor(){super(...arguments),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.iconSlotHasContent=!1,this._labelButtonChanged=e=>{this.selectableTarget=e||this},this._iconSlotChanged=e=>{this.iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const e=this.showChildren?fe.HIDE_CHILDREN:fe.SHOW_CHILDREN,t=new fe(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)},this._onLabelClicked=()=>{const e=new fe(fe.CLICK_LABEL);this.dispatchEvent(e)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),_(this,"uui-symbol-expand"),_(this,"uui-loader-bar")}_renderLabelInside(){return u`<slot name="icon" id="icon" style="${this.iconSlotHasContent?"":"display: none;"}" @slotchange="${this._iconSlotChanged}"></slot>${this.renderLabel()}<slot name="badge" id="badge"></slot>`}_renderLabelAsAnchor(){return this.disabled?u`<span id="label-button" ${Zo(this._labelButtonChanged)}>${this._renderLabelInside()}</span>`:u`<a id="label-button" ${Zo(this._labelButtonChanged)} href="${I(this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}" @click="${this._onLabelClicked}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</a>`}_renderLabelAsButton(){return u`<button id="label-button" ${Zo(this._labelButtonChanged)} @click="${this._onLabelClicked}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</button>`}render(){return u`<div id="menu-item" aria-label="menuitem" role="menuitem">${this.hasChildren?u`<button id="caret-button" @click="${this._onCaretClicked}"><uui-symbol-expand ?open="${this.showChildren}"></uui-symbol-expand></button>`:""} ${this.href?this._renderLabelAsAnchor():this._renderLabelAsButton()}<div id="label-button-background"></div>${this.selectOnly===!1?u`<slot id="actions-container" name="actions"></slot>`:""} ${this.loading?u`<uui-loader-bar id="loader"></uui-loader-bar>`:""}</div>${this.showChildren?u`<slot></slot>`:""}`}},n.UUIMenuItemElement.styles=[p`:host{box-sizing:border-box;display:block;--uui-menu-item-child-indent:calc(var(--uui-menu-item-indent, 0) + 1);user-select:none;--flat-structure-reversed:calc(
|
|
483
486
|
1 - var(--uui-menu-item-flat-structure, 0)
|
|
484
|
-
)}#menu-item{position:relative;padding-left:calc(var(--uui-menu-item-indent,0) * var(--uui-size-4,12px));display:grid;grid-template-columns:calc(var(--flat-structure-reversed) * var(--uui-size-8,24px)) 1fr;grid-template-rows:1fr;white-space:nowrap}:host(:not([active],[selected],[disabled])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled],[select-mode=highlight])) #menu-item #label-button:hover~#label-button-background{background-color:var(--uui-color-surface-emphasis,#fafafa)}:host(:not([active],[selected])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled])) #menu-item #label-button:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-color-current-contrast,#1b264f)}:host([active]) #label-button-background{background-color:var(--uui-color-current,#f5c1bc)}:host([active]) #caret-button:hover,:host([active]) #label-button:hover~#label-button-background{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #menu-item{color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button,:host([selected]:not([select-mode=highlight],[disabled])) #label-button{color:var(--uui-color-selected-contrast,#fff)}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color:var(--uui-color-selected,#3544b1)}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button:hover,:host([selected]:not([select-mode=highlight],[disabled])) #label-button:hover~#label-button-background{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([select-mode=highlight]:not([disabled],[active],[selectable])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface-emphasis,#fafafa)}:host([select-mode=highlight][active]:not([disabled])) #menu-item #label-button-background{border-radius:var(--uui-border-radius,3px)}:host([select-mode=highlight][active][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #caret-button,:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button{color:var(--uui-color-interactive,#1b264f)}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([selected][selectable][select-mode=highlight]:not([active])) #menu-item #caret-button:hover{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([select-mode=highlight]:not([disabled])) #menu-item #label-button-background::after{border-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px;border:2px solid var(--uui-color-selected,#3544b1);opacity:0}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #caret-button:hover::after{border-top-left-radius:var(--uui-border-radius,3px);border-bottom-left-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px 0 1px 1px;border:2px solid var(--uui-color-selected,#3544b1);border-right:none}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button-background::after{opacity:1}:host([select-mode=highlight][selectable]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.33}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.66}:host([disabled]) #label-button{cursor:default}button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;padding:0;text-align:left;border:none;color:inherit;background-color:transparent;cursor:pointer;min-height:var(--uui-size-12,36px);z-index:1}#label-button{position:relative;flex-grow:1;grid-column-start:2;white-space:nowrap;overflow:hidden;padding-right:var(--uui-size-space-3,9px);padding-left:calc(var(--uui-menu-item-flat-structure) * var(--uui-size-space-3,9px));display:inline-flex;align-items:center;text-decoration:none;color:currentColor;min-height:var(--uui-size-12,36px);z-index:1}#label-button .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span#label-button{pointer-events:none}#caret-button{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0}#actions-container{opacity:0;transition:opacity 120ms;grid-column-start:3}:host(:not([disabled])) #menu-item:focus #actions-container,:host(:not([disabled])) #menu-item:focus-within #actions-container,:host(:not([disabled])) #menu-item:hover #actions-container{opacity:1}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;font-size:16px;margin-right:var(--uui-size-2,6px)}#badge{font-size:12px;--uui-badge-position:relative;--uui-badge-position:auto;display:block;margin-left:6px}:host([select-mode=highlight]) #label-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #label-button:focus-visible::after{content:'';border-radius:calc(var(--uui-border-radius,3px) - 1px);position:absolute;inset:3px 3px 3px -5px;border:2px solid var(--uui-color-focus,#3879ff)}:host([select-mode=highlight]) #caret-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #caret-button:focus-visible::after{content:'';position:absolute;inset:3px;border-radius:calc(var(--uui-border-radius,3px) - 1px);border:2px solid var(--uui-color-focus,#3879ff)}slot:not([name]){position:relative;display:block;width:100%}slot:not([name]){--uui-menu-item-indent:var(--uui-menu-item-child-indent)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-base-unit) * 4);margin-right:var(--uui-size-base-unit)}`],me([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),me([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),me([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),me([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),me([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),me([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),me([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),me([f()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=me([b("uui-menu-item")],n.UUIMenuItemElement);var Gp=Object.defineProperty,qp=Object.getOwnPropertyDescriptor,ut=(i,e,t,r)=>{for(var o=r>1?void 0:r?qp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Gp(e,t,o),o};let V=class extends m{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent("close",{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._closeModal()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=e,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(e){super.firstUpdated(e),this.isClosing||this.open()}_openModal(){var e,t;this.isOpen=!0,(e=this._dialogElement)==null||e.showModal(),(t=this._dialogElement)==null||t.addEventListener("cancel",this.close)}_closeModal(){var e;this.isClosing=!0,this.isOpen=!1,(e=this._dialogElement)==null||e.close(),this.dispatchEvent(new CustomEvent("close-end")),this.remove()}};V.styles=[p`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none}dialog::backdrop{background:0 0;opacity:0}dialog::after{content:'';position:absolute;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));pointer-events:none;opacity:1;transition:opacity var(--uui-modal-transition-duration,250ms);z-index:1}:host([index='0']) dialog::after{opacity:0}`],ut([C("dialog")],V.prototype,"_dialogElement",2),ut([l({type:Boolean,reflect:!0,attribute:"is-open"})],V.prototype,"isOpen",2),ut([l({type:Boolean,reflect:!0,attribute:"is-closing"})],V.prototype,"isClosing",2),ut([l({type:Number,reflect:!0})],V.prototype,"index",2),ut([l({type:Number,reflect:!0,attribute:"unique-index"})],V.prototype,"uniqueIndex",2),ut([l({type:Number,attribute:"transition-duration"})],V.prototype,"transitionDuration",1);var Wp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,Ka=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Wp(e,t,o),o},Xa=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ya=(i,e,t)=>(Xa(i,e,"read from private field"),t?t.call(i):e.get(i)),Za=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Xp=(i,e,t)=>(Xa(i,e,"access private method"),t),di,Eo,ko,Qa;n.UUIModalSidebarElement=class extends V{constructor(){super(),Za(this,di),Za(this,ko),this.size="full",this.addEventListener("close",Xp(this,ko,Qa).bind(this))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Ya(this,di,Eo)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}render(){return u`<dialog><slot></slot></dialog>`}},di=new WeakSet,Eo=function(){var i,e;return(e=(i=this._dialogElement)==null?void 0:i.getBoundingClientRect().width)!=null?e:0},ko=new WeakSet,Qa=function(i){i.preventDefault(),!this.isClosing&&(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Ya(this,di,Eo)+"px"),setTimeout(()=>{this._closeModal()},this.transitionDuration))},n.UUIModalSidebarElement.styles=[...V.styles,p`:host{--uui-modal-sidebar-left-gap:24px}@media (min-width:600px){:host{--uui-modal-sidebar-left-gap:64px}}dialog{height:100%;width:100%;box-sizing:border-box;max-width:calc(100% - var(--uui-modal-sidebar-left-gap));margin-left:auto;right:var(--uui-modal-offset);transition:right var(--uui-modal-transition-duration,250ms)}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}:host([hide]) dialog{display:none}:host([size=large]) dialog{max-width:min(1200px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=medium]) dialog{max-width:min(800px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=small]) dialog{max-width:min(400px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],Ka([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Ka([Fi("uui-modal-sidebar")],n.UUIModalSidebarElement);var Yp=Object.defineProperty,Zp=Object.getOwnPropertyDescriptor,ct=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Yp(e,t,o),o},Ja=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},es=(i,e,t)=>(Ja(i,e,"read from private field"),t?t.call(i):e.get(i)),pi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},bi=(i,e,t)=>(Ja(i,e,"access private method"),t),xo,Io,mi,Co,vi,Po;n.UUIModalContainerElement=class extends m{constructor(){super(),pi(this,mi),pi(this,vi),this.sidebarGap=64,this.transitionDurationMS=250,pi(this,xo,()=>{var e,t;if(this._modals=(t=(e=this.modalSlot)==null?void 0:e.assignedElements({flatten:!0}).filter(r=>r instanceof V))!=null?t:[],this._sidebars=this._modals.filter(r=>r instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}bi(this,mi,Co).call(this),bi(this,vi,Po).call(this)}),pi(this,Io,()=>{if(!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}bi(this,mi,Co).call(this),bi(this,vi,Po).call(this)}),this.addEventListener("close",es(this,Io))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return u`<slot @slotchange="${es(this,xo)}"></slot>`}},xo=new WeakMap,Io=new WeakMap,mi=new WeakSet,Co=function(){var i,e;this.setAttribute("backdrop","");const t=(e=(i=this._modals)==null?void 0:i.filter(r=>!r.isClosing).reverse())!=null?e:[];t?.forEach((r,o)=>{r.index=o,r.transitionDuration=this.transitionDurationMS}),t?.forEach(r=>{var o;const a=t?.filter(s=>s.constructor.name===r.constructor.name);r.uniqueIndex=(o=a?.indexOf(r))!=null?o:0})},vi=new WeakSet,Po=function(){requestAnimationFrame(()=>{var i,e,t,r,o,a,s,h;let c=0;const d=(e=(i=this._sidebars)==null?void 0:i.filter(v=>!v.isClosing).reverse())!=null?e:[];for(let v=0;v<d.length;v++){const g=d[v],y=d[v+1];if(g.style.setProperty("--uui-modal-offset",c+"px"),y!=null&&y.hasAttribute("hide"))break;const $=(o=(r=(t=g.shadowRoot)==null?void 0:t.querySelector("dialog"))==null?void 0:r.getBoundingClientRect().width)!=null?o:0,E=(h=(s=(a=y?.shadowRoot)==null?void 0:a.querySelector("dialog"))==null?void 0:s.getBoundingClientRect().width)!=null?h:0,k=$+c+this.sidebarGap-E;c=k>0?k:0}})},n.UUIModalContainerElement.styles=p`:host{position:fixed;--uui-modal-color-backdrop:rgba(0, 0, 0, 0.5)}:host::after{content:'';position:fixed;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));opacity:0;pointer-events:none;transition:opacity var(--uui-modal-transition-duration,250ms)}:host([backdrop])::after{opacity:1}`,ct([C("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),ct([f()],n.UUIModalContainerElement.prototype,"_modals",2),ct([f()],n.UUIModalContainerElement.prototype,"_sidebars",2),ct([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),ct([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=ct([Fi("uui-modal-container")],n.UUIModalContainerElement);var Qp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,eb=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jp(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Qp(e,t,o),o};n.UUIModalDialogElement=class extends V{render(){return u`<dialog><slot></slot></dialog>`}},n.UUIModalDialogElement.styles=[...V.styles,p`dialog{margin:auto;max-width:100%;max-height:100%;border-radius:12px}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}`],n.UUIModalDialogElement=eb([Fi("uui-modal-dialog")],n.UUIModalDialogElement);var tb=Object.defineProperty,ts=Object.getOwnPropertySymbols,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,is=(i,e,t)=>e in i?tb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,os=(i,e)=>{for(var t in e||(e={}))ib.call(e,t)&&is(i,t,e[t]);if(ts)for(var t of ts(e))ob.call(e,t)&&is(i,t,e[t]);return i};let ke=class extends P{constructor(e,t={}){super(e,os(os({},{bubbles:!0}),t))}};ke.CHANGE="change";var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?nb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rb(e,t,o),o};const ab=45,So=(i,e,t)=>Math.min(Math.max(i,e),t),sb=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);n.UUIPaginationElement=class extends m{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),w(this,"uui-button"),w(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((o,a)=>o+a.getBoundingClientRect().width,0),r=(e-t)/ab/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,r=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return sb(So(t,1,this.total),So(r,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=So(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new ke(ke.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new ke(ke.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new ke(ke.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to first page" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}">First</uui-button>`}renderPrevious(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to previous page" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}">Previous</uui-button>`}renderNext(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to next page" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}">Next</uui-button>`}renderLast(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to last page" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}">Last</uui-button>`}renderDots(){return u`<uui-button compact="compact" look="outline" role="listitem" tabindex="-1" class="dots" label="More pages">...</uui-button>`}renderPage(e){return u`<uui-button compact="compact" look="outline" role="listitem" label="Go to page ${e}" class="${"page"+(e===this._current?" active":"")}" tabindex="${e===this._current?"-1":""}" @click="${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}">${e}</uui-button>`}renderNavigationLeft(){return u`${this.renderFirst()} ${this.renderPrevious()} ${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return u`${this._visiblePages.includes(this.total)?"":this.renderDots()} ${this.renderNext()} ${this.renderLast()}`}render(){return u`<uui-button-group role="list" id="pages">${this.renderNavigationLeft()} ${this._visiblePages.map(e=>this.renderPage(e))} ${this.renderNavigationRight()}</uui-button-group>`}},n.UUIPaginationElement.styles=[p`uui-button-group{width:100%}uui-button{--uui-button-border-color:var(--uui-color-border-standalone,#c2c2c2);--uui-button-border-color-hover:var(--uui-color-interactive-emphasis,#3544b1);--uui-button-border-color-disabled:var(--uui-color-border-standalone,#c2c2c2)}.page{min-width:36px;max-width:72px}.page.active{--uui-button-background-color:var(--uui-color-current,#f5c1bc)}.nav{min-width:72px}.dots{pointer-events:none}.active{pointer-events:none}`],ve([il("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),ve([C("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),ve([l()],n.UUIPaginationElement.prototype,"label",2),ve([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),ve([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),ve([f()],n.UUIPaginationElement.prototype,"_range",2),ve([f()],n.UUIPaginationElement.prototype,"_visiblePages",2),ve([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=ve([b("uui-pagination")],n.UUIPaginationElement);let Oo=class extends P{};Oo.CLOSE="close";var lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,Lt=(i,e,t,r)=>{for(var o=r>1?void 0:r?ub(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&lb(e,t,o),o};function gi(i,e,t){return i<e?e:i>t?t:i}n.UUIPopoverElement=class extends m{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new Oo(Oo.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const r=t.position==="absolute",o=/(auto|scroll)/;let a=e;for(;a=a.parentElement;)if(t=getComputedStyle(a),!(r&&t.position==="static")&&(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(a),t.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){var e,t;if(!this.shadowRoot)return;const r=this.containerElement;if(!r)return;const o=(e=this.containerElement)==null?void 0:e.getBoundingClientRect(),a=(t=this._trigger)==null?void 0:t.getBoundingClientRect();if(a!=null&&o!=null){const s=this._scrollParents.map(se=>se.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,o,s));let h=this._currentPlacement.indexOf("top")!==-1,c=this._currentPlacement.indexOf("bottom")!==-1,d=this._currentPlacement.indexOf("left")!==-1,v=this._currentPlacement.indexOf("right")!==-1;const g=this._currentPlacement.indexOf("-start")!==-1,y=this._currentPlacement.indexOf("-end")!==-1;let $=.5,E=.5,k=.5,A=.5,_e=0,we=0;if(this.placement==="auto"){const se=this._scrollParents[0],Bt=se.clientWidth,qe=se.clientHeight,_t=a.x-o.width,wt=Bt-(a.x+a.width)-o.width,Jo=a.y-o.height,Pi=qe-(a.y+a.height)-o.height;let Si=.5,Oi=.5;const Iv=Math.max(_t,wt);let Rs=Math.max(Jo,Pi);Pi>Jo&&Pi>this.margin&&(Rs+=9999),Iv>Rs?(_t>wt?(Si=0,d=!0):(Si=1,v=!0),_e=this.margin):(Jo>Pi?(Oi=0,h=!0):(Oi=1,c=!0),we=this.margin),$=Si,E=Oi,k=1-Si,A=1-Oi}else h&&(A=1,E=0),c&&(A=0,E=1),(h||c)&&(we=this.margin,g&&(k=0,$=0),y&&(k=1,$=1)),d&&(k=1,$=0),v&&(k=0,$=1),(d||v)&&(_e=this.margin,g&&(A=0,E=0),y&&(A=1,E=1));const Zo=-o.width*k+a.width*$-_e*(k*2-1),Qo=-o.height*A+a.height*E-we*(A*2-1);let Fe=Zo,Ge=Qo;h||c?(this._scrollParents.forEach((se,Bt)=>{const qe=se===document.body?0:s[Bt].x,_t=-a.x+qe,wt=se.clientWidth-a.x-a.width+Zo+qe-(o.width-a.width)*(1-$);Fe=gi(Fe,_t,wt)}),Fe=gi(Fe,-o.width,a.width)):(d||v)&&(this._scrollParents.forEach((se,Bt)=>{const qe=se===document.body?0:s[Bt].y,_t=-a.y+qe,wt=se.clientHeight-a.y-a.height+Qo+qe-(o.height-a.height)*(1-E);Ge=gi(Ge,_t,wt)}),Ge=gi(Ge,-o.height,a.height)),(this._positionX!==Fe||this._positionY!==Ge)&&(this._positionX=Fe,this._positionY=Ge,Zo===Fe&&Qo===Ge&&this._stopScrollListener(),r.style.left=`${this._positionX}px`,r.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),a=o[0],s=o[1]||null;let h;return this._scrollParents.some((c,d)=>{const v=c===document.body?0:r[d].x,g=c===document.body?0:r[d].y;return a==="top"&&t.y-2<=g?(h="bottom",!0):a==="bottom"&&t.y+t.height+2>=c.clientHeight+g?(h="top",!0):a==="left"&&t.x-2<=v?(h="right",!0):a==="right"&&t.x+t.width+2>=c.clientWidth+v?(h="left",!0):!1}),h?(this._startScrollListener(),h+(s?`-${s}`:"")):e}render(){return u`<slot id="trigger" name="trigger" @slotchange="${this._onTriggerSlotChanged}"></slot><div id="container">${this._open?u`<slot name="popover"></slot>`:""}</div>`}},n.UUIPopoverElement.styles=[p`:host{position:relative;display:inline-block;width:100%}#container{position:absolute;width:100%;z-index:var(--uui-popover-z-index,1)}slot[name=popover]{display:block}#trigger{position:relative;width:100%}slot[name=trigger]::slotted(uui-button){--uui-button-border-radius:var(
|
|
487
|
+
)}#menu-item{position:relative;padding-left:calc(var(--uui-menu-item-indent,0) * var(--uui-size-4,12px));display:grid;grid-template-columns:calc(var(--flat-structure-reversed) * var(--uui-size-8,24px)) 1fr;grid-template-rows:1fr;white-space:nowrap}:host(:not([active],[selected],[disabled])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled],[select-mode=highlight])) #menu-item #label-button:hover~#label-button-background{background-color:var(--uui-color-surface-emphasis,#fafafa)}:host(:not([active],[selected])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled])) #menu-item #label-button:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-color-current-contrast,#1b264f)}:host([active]) #label-button-background{background-color:var(--uui-color-current,#f5c1bc)}:host([active]) #caret-button:hover,:host([active]) #label-button:hover~#label-button-background{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #menu-item{color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button,:host([selected]:not([select-mode=highlight],[disabled])) #label-button{color:var(--uui-color-selected-contrast,#fff)}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color:var(--uui-color-selected,#3544b1)}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button:hover,:host([selected]:not([select-mode=highlight],[disabled])) #label-button:hover~#label-button-background{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([select-mode=highlight]:not([disabled],[active],[selectable])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface-emphasis,#fafafa)}:host([select-mode=highlight][active]:not([disabled])) #menu-item #label-button-background{border-radius:var(--uui-border-radius,3px)}:host([select-mode=highlight][active][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #caret-button,:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button{color:var(--uui-color-interactive,#1b264f)}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([selected][selectable][select-mode=highlight]:not([active])) #menu-item #caret-button:hover{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([select-mode=highlight]:not([disabled])) #menu-item #label-button-background::after{border-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px;border:2px solid var(--uui-color-selected,#3544b1);opacity:0}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #caret-button:hover::after{border-top-left-radius:var(--uui-border-radius,3px);border-bottom-left-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px 0 1px 1px;border:2px solid var(--uui-color-selected,#3544b1);border-right:none}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button-background::after{opacity:1}:host([select-mode=highlight][selectable]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.33}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.66}:host([disabled]) #label-button{cursor:default}button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;padding:0;text-align:left;border:none;color:inherit;background-color:transparent;cursor:pointer;min-height:var(--uui-size-12,36px);z-index:1}#label-button{position:relative;flex-grow:1;grid-column-start:2;white-space:nowrap;overflow:hidden;padding-right:var(--uui-size-space-3,9px);padding-left:calc(var(--uui-menu-item-flat-structure) * var(--uui-size-space-3,9px));display:inline-flex;align-items:center;text-decoration:none;color:currentColor;min-height:var(--uui-size-12,36px);z-index:1}#label-button .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span#label-button{pointer-events:none}#caret-button{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0}#actions-container{opacity:0;transition:opacity 120ms;grid-column-start:3}:host(:not([disabled])) #menu-item:focus #actions-container,:host(:not([disabled])) #menu-item:focus-within #actions-container,:host(:not([disabled])) #menu-item:hover #actions-container{opacity:1}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;font-size:16px;margin-right:var(--uui-size-2,6px)}#badge{font-size:12px;--uui-badge-position:relative;--uui-badge-position:auto;display:block;margin-left:6px}:host([select-mode=highlight]) #label-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #label-button:focus-visible::after{content:'';border-radius:calc(var(--uui-border-radius,3px) - 1px);position:absolute;inset:3px 3px 3px -5px;border:2px solid var(--uui-color-focus,#3879ff)}:host([select-mode=highlight]) #caret-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #caret-button:focus-visible::after{content:'';position:absolute;inset:3px;border-radius:calc(var(--uui-border-radius,3px) - 1px);border:2px solid var(--uui-color-focus,#3879ff)}slot:not([name]){position:relative;display:block;width:100%}slot:not([name]){--uui-menu-item-indent:var(--uui-menu-item-child-indent)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-base-unit) * 4);margin-right:var(--uui-size-base-unit)}`],ye([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),ye([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),ye([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),ye([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),ye([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),ye([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),ye([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),ye([g()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=ye([b("uui-menu-item")],n.UUIMenuItemElement);var Pb=Object.defineProperty,Ob=Object.getOwnPropertyDescriptor,bt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ob(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Pb(e,t,o),o};let F=class extends m{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent("close",{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._closeModal()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=e,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(e){super.firstUpdated(e),this.isClosing||this.open()}_openModal(){var e,t;this.isOpen=!0,(e=this._dialogElement)==null||e.showModal(),(t=this._dialogElement)==null||t.addEventListener("cancel",this.close)}_closeModal(){var e;this.isClosing=!0,this.isOpen=!1,(e=this._dialogElement)==null||e.close(),this.dispatchEvent(new CustomEvent("close-end")),this.remove()}};F.styles=[p`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none}dialog::backdrop{background:0 0;opacity:0}dialog::after{content:'';position:absolute;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));pointer-events:none;opacity:1;transition:opacity var(--uui-modal-transition-duration,250ms);z-index:1}:host([index='0']) dialog::after{opacity:0}`],bt([C("dialog")],F.prototype,"_dialogElement",2),bt([l({type:Boolean,reflect:!0,attribute:"is-open"})],F.prototype,"isOpen",2),bt([l({type:Boolean,reflect:!0,attribute:"is-closing"})],F.prototype,"isClosing",2),bt([l({type:Number,reflect:!0})],F.prototype,"index",2),bt([l({type:Number,reflect:!0,attribute:"unique-index"})],F.prototype,"uniqueIndex",2),bt([l({type:Number,attribute:"transition-duration"})],F.prototype,"transitionDuration",1);var zb=Object.defineProperty,Ab=Object.getOwnPropertyDescriptor,Es=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ab(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&zb(e,t,o),o},ks=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},xs=(i,e,t)=>(ks(i,e,"read from private field"),t?t.call(i):e.get(i)),Is=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},jb=(i,e,t)=>(ks(i,e,"access private method"),t),Si,Qo,Jo,Cs;n.UUIModalSidebarElement=class extends F{constructor(){super(),Is(this,Si),Is(this,Jo),this.size="full",this.addEventListener("close",jb(this,Jo,Cs).bind(this))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-xs(this,Si,Qo)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}render(){return u`<dialog><slot></slot></dialog>`}},Si=new WeakSet,Qo=function(){var i,e;return(e=(i=this._dialogElement)==null?void 0:i.getBoundingClientRect().width)!=null?e:0},Jo=new WeakSet,Cs=function(i){i.preventDefault(),!this.isClosing&&(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-xs(this,Si,Qo)+"px"),setTimeout(()=>{this._closeModal()},this.transitionDuration))},n.UUIModalSidebarElement.styles=[...F.styles,p`:host{--uui-modal-sidebar-left-gap:24px}@media (min-width:600px){:host{--uui-modal-sidebar-left-gap:64px}}dialog{height:100%;width:100%;box-sizing:border-box;max-width:calc(100% - var(--uui-modal-sidebar-left-gap));margin-left:auto;right:var(--uui-modal-offset);transition:right var(--uui-modal-transition-duration,250ms)}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}:host([hide]) dialog{display:none}:host([size=large]) dialog{max-width:min(1200px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=medium]) dialog{max-width:min(800px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=small]) dialog{max-width:min(400px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],Es([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Es([b("uui-modal-sidebar")],n.UUIModalSidebarElement);var Lb=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Lb(e,t,o),o},Ss=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ps=(i,e,t)=>(Ss(i,e,"read from private field"),t?t.call(i):e.get(i)),Pi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Oi=(i,e,t)=>(Ss(i,e,"access private method"),t),er,tr,zi,ir,Ai,or;n.UUIModalContainerElement=class extends m{constructor(){super(),Pi(this,zi),Pi(this,Ai),this.sidebarGap=64,this.transitionDurationMS=250,Pi(this,er,()=>{var e,t;if(this._modals=(t=(e=this.modalSlot)==null?void 0:e.assignedElements({flatten:!0}).filter(r=>r instanceof F))!=null?t:[],this._sidebars=this._modals.filter(r=>r instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}Oi(this,zi,ir).call(this),Oi(this,Ai,or).call(this)}),Pi(this,tr,()=>{if(!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}Oi(this,zi,ir).call(this),Oi(this,Ai,or).call(this)}),this.addEventListener("close",Ps(this,tr))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return u`<slot @slotchange="${Ps(this,er)}"></slot>`}},er=new WeakMap,tr=new WeakMap,zi=new WeakSet,ir=function(){var i,e;this.setAttribute("backdrop","");const t=(e=(i=this._modals)==null?void 0:i.filter(r=>!r.isClosing).reverse())!=null?e:[];t?.forEach((r,o)=>{r.index=o,r.transitionDuration=this.transitionDurationMS}),t?.forEach(r=>{var o;const a=t?.filter(s=>s.constructor.name===r.constructor.name);r.uniqueIndex=(o=a?.indexOf(r))!=null?o:0})},Ai=new WeakSet,or=function(){requestAnimationFrame(()=>{var i,e,t,r,o,a,s,c;let h=0;const d=(e=(i=this._sidebars)==null?void 0:i.filter(v=>!v.isClosing).reverse())!=null?e:[];for(let v=0;v<d.length;v++){const f=d[v],y=d[v+1];if(f.style.setProperty("--uui-modal-offset",h+"px"),y!=null&&y.hasAttribute("hide"))break;const $=(o=(r=(t=f.shadowRoot)==null?void 0:t.querySelector("dialog"))==null?void 0:r.getBoundingClientRect().width)!=null?o:0,E=(c=(s=(a=y?.shadowRoot)==null?void 0:a.querySelector("dialog"))==null?void 0:s.getBoundingClientRect().width)!=null?c:0,x=$+h+this.sidebarGap-E;h=x>0?x:0}})},n.UUIModalContainerElement.styles=p`:host{position:fixed;--uui-modal-color-backdrop:rgba(0, 0, 0, 0.5)}:host::after{content:'';position:fixed;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));opacity:0;pointer-events:none;transition:opacity var(--uui-modal-transition-duration,250ms)}:host([backdrop])::after{opacity:1}`,mt([C("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),mt([g()],n.UUIModalContainerElement.prototype,"_modals",2),mt([g()],n.UUIModalContainerElement.prototype,"_sidebars",2),mt([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),mt([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=mt([b("uui-modal-container")],n.UUIModalContainerElement);var Nb=Object.defineProperty,Mb=Object.getOwnPropertyDescriptor,Db=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nb(e,t,o),o};n.UUIModalDialogElement=class extends F{render(){return u`<dialog><slot></slot></dialog>`}},n.UUIModalDialogElement.styles=[...F.styles,p`dialog{margin:auto;max-width:100%;max-height:100%;border-radius:12px}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}`],n.UUIModalDialogElement=Db([b("uui-modal-dialog")],n.UUIModalDialogElement);var Bb=Object.defineProperty,Os=Object.getOwnPropertySymbols,Vb=Object.prototype.hasOwnProperty,Hb=Object.prototype.propertyIsEnumerable,zs=(i,e,t)=>e in i?Bb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,As=(i,e)=>{for(var t in e||(e={}))Vb.call(e,t)&&zs(i,t,e[t]);if(Os)for(var t of Os(e))Hb.call(e,t)&&zs(i,t,e[t]);return i};let Ce=class extends P{constructor(e,t={}){super(e,As(As({},{bubbles:!0}),t))}};Ce.CHANGE="change";var Rb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,we=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Rb(e,t,o),o};const Gb=45,rr=(i,e,t)=>Math.min(Math.max(i,e),t),qb=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);n.UUIPaginationElement=class extends m{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),_(this,"uui-button"),_(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((o,a)=>o+a.getBoundingClientRect().width,0),r=(e-t)/Gb/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,r=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return qb(rr(t,1,this.total),rr(r,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=rr(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new Ce(Ce.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new Ce(Ce.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new Ce(Ce.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to first page" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}">First</uui-button>`}renderPrevious(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to previous page" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}">Previous</uui-button>`}renderNext(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to next page" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}">Next</uui-button>`}renderLast(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to last page" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}">Last</uui-button>`}renderDots(){return u`<uui-button compact="compact" look="outline" role="listitem" tabindex="-1" class="dots" label="More pages">...</uui-button>`}renderPage(e){return u`<uui-button compact="compact" look="outline" role="listitem" label="Go to page ${e}" class="${"page"+(e===this._current?" active":"")}" tabindex="${e===this._current?"-1":""}" @click="${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}">${e}</uui-button>`}renderNavigationLeft(){return u`${this.renderFirst()} ${this.renderPrevious()} ${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return u`${this._visiblePages.includes(this.total)?"":this.renderDots()} ${this.renderNext()} ${this.renderLast()}`}render(){return u`<uui-button-group role="list" id="pages">${this.renderNavigationLeft()} ${this._visiblePages.map(e=>this.renderPage(e))} ${this.renderNavigationRight()}</uui-button-group>`}},n.UUIPaginationElement.styles=[p`uui-button-group{width:100%}uui-button{--uui-button-border-color:var(--uui-color-border-standalone,#c2c2c2);--uui-button-border-color-hover:var(--uui-color-interactive-emphasis,#3544b1);--uui-button-border-color-disabled:var(--uui-color-border-standalone,#c2c2c2)}.page{min-width:36px;max-width:72px}.page.active{--uui-button-background-color:var(--uui-color-current,#f5c1bc)}.nav{min-width:72px}.dots{pointer-events:none}.active{pointer-events:none}`],we([Al("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),we([C("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),we([l()],n.UUIPaginationElement.prototype,"label",2),we([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),we([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),we([g()],n.UUIPaginationElement.prototype,"_range",2),we([g()],n.UUIPaginationElement.prototype,"_visiblePages",2),we([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=we([b("uui-pagination")],n.UUIPaginationElement);let nr=class extends P{};nr.CLOSE="close";var Wb=Object.defineProperty,Kb=Object.getOwnPropertyDescriptor,Vt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Wb(e,t,o),o};function ji(i,e,t){return i<e?e:i>t?t:i}n.UUIPopoverElement=class extends m{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new nr(nr.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const r=t.position==="absolute",o=/(auto|scroll)/;let a=e;for(;a=a.parentElement;)if(t=getComputedStyle(a),!(r&&t.position==="static")&&(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(a),t.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){var e,t;if(!this.shadowRoot)return;const r=this.containerElement;if(!r)return;const o=(e=this.containerElement)==null?void 0:e.getBoundingClientRect(),a=(t=this._trigger)==null?void 0:t.getBoundingClientRect();if(a!=null&&o!=null){const s=this._scrollParents.map(de=>de.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,o,s));let c=this._currentPlacement.indexOf("top")!==-1,h=this._currentPlacement.indexOf("bottom")!==-1,d=this._currentPlacement.indexOf("left")!==-1,v=this._currentPlacement.indexOf("right")!==-1;const f=this._currentPlacement.indexOf("-start")!==-1,y=this._currentPlacement.indexOf("-end")!==-1;let $=.5,E=.5,x=.5,j=.5,$e=0,Ue=0;if(this.placement==="auto"){const de=this._scrollParents[0],Kt=de.clientWidth,Ye=de.clientHeight,kt=a.x-o.width,xt=Kt-(a.x+a.width)-o.width,xr=a.y-o.height,Fi=Ye-(a.y+a.height)-o.height;let Gi=.5,qi=.5;const dg=Math.max(kt,xt);let wl=Math.max(xr,Fi);Fi>xr&&Fi>this.margin&&(wl+=9999),dg>wl?(kt>xt?(Gi=0,d=!0):(Gi=1,v=!0),$e=this.margin):(xr>Fi?(qi=0,c=!0):(qi=1,h=!0),Ue=this.margin),$=Gi,E=qi,x=1-Gi,j=1-qi}else c&&(j=1,E=0),h&&(j=0,E=1),(c||h)&&(Ue=this.margin,f&&(x=0,$=0),y&&(x=1,$=1)),d&&(x=1,$=0),v&&(x=0,$=1),(d||v)&&($e=this.margin,f&&(j=0,E=0),y&&(j=1,E=1));const Er=-o.width*x+a.width*$-$e*(x*2-1),kr=-o.height*j+a.height*E-Ue*(j*2-1);let Ke=Er,Xe=kr;c||h?(this._scrollParents.forEach((de,Kt)=>{const Ye=de===document.body?0:s[Kt].x,kt=-a.x+Ye,xt=de.clientWidth-a.x-a.width+Er+Ye-(o.width-a.width)*(1-$);Ke=ji(Ke,kt,xt)}),Ke=ji(Ke,-o.width,a.width)):(d||v)&&(this._scrollParents.forEach((de,Kt)=>{const Ye=de===document.body?0:s[Kt].y,kt=-a.y+Ye,xt=de.clientHeight-a.y-a.height+kr+Ye-(o.height-a.height)*(1-E);Xe=ji(Xe,kt,xt)}),Xe=ji(Xe,-o.height,a.height)),(this._positionX!==Ke||this._positionY!==Xe)&&(this._positionX=Ke,this._positionY=Xe,Er===Ke&&kr===Xe&&this._stopScrollListener(),r.style.left=`${this._positionX}px`,r.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),a=o[0],s=o[1]||null;let c;return this._scrollParents.some((h,d)=>{const v=h===document.body?0:r[d].x,f=h===document.body?0:r[d].y;return a==="top"&&t.y-2<=f?(c="bottom",!0):a==="bottom"&&t.y+t.height+2>=h.clientHeight+f?(c="top",!0):a==="left"&&t.x-2<=v?(c="right",!0):a==="right"&&t.x+t.width+2>=h.clientWidth+v?(c="left",!0):!1}),c?(this._startScrollListener(),c+(s?`-${s}`:"")):e}render(){return u`<slot id="trigger" name="trigger" @slotchange="${this._onTriggerSlotChanged}"></slot><div id="container">${this._open?u`<slot name="popover"></slot>`:""}</div>`}},n.UUIPopoverElement.styles=[p`:host{position:relative;display:inline-block;width:100%}#container{position:absolute;width:100%;z-index:var(--uui-popover-z-index,1)}slot[name=popover]{display:block}#trigger{position:relative;width:100%}slot[name=trigger]::slotted(uui-button){--uui-button-border-radius:var(
|
|
485
488
|
--uui-popover-toggle-slot-button-border-radius
|
|
486
489
|
);--uui-button-merge-border-left:var(
|
|
487
490
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
488
|
-
)}`],Lt([C("#container")],n.UUIPopoverElement.prototype,"containerElement",2),Lt([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),Lt([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),Lt([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=Lt([b("uui-popover")],n.UUIPopoverElement);function cb(){const i=this.addEventListener;this.addEventListener=function(t,r,o){if(t!=="focusout"){if(t==="beforetoggle"){this.polyfill_onBeforeToggle=a=>{this.dispatchEvent(new CustomEvent("polyfill-beforetoggle",{bubbles:!1,composed:!1,detail:{oldState:a.oldState,newState:a.newState}})),r(a)};return}i.call(this,t,r,o)}},this.polyfill_onFocusout=t=>{const r=t.relatedTarget;if(!r)return;const o=r?.closest("uui-popover-container"),a=r?.closest("[popovertarget]");!o&&!a&&this.hidePopover()},this.polyfill_onClick=t=>{t.composedPath().some(r=>{var o;return r.tagName==="UUI-POPOVER-CONTAINER"||((o=r.attributes)==null?void 0:o.popovertarget)})||this.hidePopover()},this.polyfill_onParentPopoverUpdate=t=>{t.detail.newState==="closed"&&this.hidePopover()};const e=t=>{var r;return t.parentElement?((r=t.parentElement)==null?void 0:r.tagName)==="UUI-POPOVER-CONTAINER"?t.parentElement:e(t.parentElement):null};this.polyfill_hasBeenMovedToBody||(this.style.display="none",this.style.position="fixed",this.style.inset="0",this.style.zIndex="9999"),this.showPopover=()=>{var t,r;this.polyfill_hasBeenMovedToBody||(this.polyfill_parentPopoverContainer=e(this)),this.polyfill_onBeforeToggle({oldState:"closed",newState:"open"}),this.style.display="block",(t=this.polyfill_parentPopoverContainer)==null||t.addEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),window.addEventListener("click",this.polyfill_onClick),window.addEventListener("focusout",this.polyfill_onFocusout),this.polyfill_originalParent=this.parentNode,this.polyfill_originalNextSibling=this.nextSibling;const o=this.getRootNode();if(o&&o.adoptedStyleSheets){const a=o.adoptedStyleSheets.reduce((c,d)=>c+Object.values(d.cssRules).reduce((v,g)=>v+`#${this.id} ${g.cssText}`,""),""),s=document.createElement("style");s.innerHTML=a,s.id="uui-popover-polyfill-style";const h=this.shadowRoot.host.querySelector("#uui-popover-polyfill-style");h&&h.parentNode.removeChild(h),this.insertAdjacentElement("beforeend",s)}this.parentNode!==document.body&&((r=this.parentNode)==null||r.removeChild(this),this.polyfill_hasBeenMovedToBody=!0,document.body.appendChild(this))},this.hidePopover=()=>{var t,r;this.polyfill_hasBeenMovedToBody&&(document.body.removeChild(this),this.polyfill_hasBeenMovedToBody=!1,(t=this.polyfill_originalParent)==null||t.insertBefore(this,this.polyfill_originalNextSibling)),window.removeEventListener("click",this.polyfill_onClick),window.removeEventListener("focusout",this.polyfill_onFocusout),(r=this.polyfill_parentPopoverContainer)==null||r.removeEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),this.polyfill_onBeforeToggle({oldState:"open",newState:"closed"}),this.style.display="none"}}var hb=Object.defineProperty,db=Object.getOwnPropertyDescriptor,Be=(i,e,t,r)=>{for(var o=r>1?void 0:r?db(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&hb(e,t,o),o},zo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},H=(i,e,t)=>(zo(i,e,"read from private field"),t?t.call(i):e.get(i)),ht=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},pb=(i,e,t,r)=>(zo(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),rs=(i,e,t)=>(zo(i,e,"access private method"),t),dt,fi,pt,jt,Ao,yi,Lo;n.UUIPopoverContainerElement=class extends m{constructor(){super(...arguments),ht(this,yi),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,ht(this,dt,null),ht(this,fi,e=>{var t;if(this._open=e.newState==="open",pb(this,dt,Cc(this,"popovertarget",this.id)),(t=H(this,dt))==null||t.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),!this._open){document.removeEventListener("scroll",H(this,pt));return}document.addEventListener("scroll",H(this,pt)),requestAnimationFrame(()=>{H(this,pt).call(this)})}),ht(this,pt,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",H(this,jt).call(this,3))}),ht(this,jt,e=>{if(H(this,Ao).call(this),e--,H(this,dt)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,a=this._actualPlacement.indexOf("right")!==-1,s=this._actualPlacement.indexOf("-start")!==-1,h=this._actualPlacement.indexOf("-end")!==-1,c=H(this,dt).getBoundingClientRect(),d=this.getBoundingClientRect();let v=0,g=0;r&&(v=c.top+c.height,s&&(g=c.left),h&&(g=c.left+c.width-d.width),!s&&!h&&(g=c.left+c.width/2-d.width/2)),t&&(v=c.top-d.height,s&&(g=c.left),h&&(g=c.left+c.width-d.width),!s&&!h&&(g=c.left+c.width/2-d.width/2)),o&&(g=c.left-d.width,s&&(v=c.top),h&&(v=c.top+c.height-d.height),!s&&!h&&(v=c.top+c.height/2-d.height/2)),a&&(g=c.left+c.width,s&&(v=c.top),h&&(v=c.top+c.height-d.height),!s&&!h&&(v=c.top+c.height/2-d.height/2));const y=window.innerWidth,$=window.innerHeight,E=Math.min(0,c.top+c.height),k=Math.max(Math.min(v,$-d.height),c.top-d.height);if(Math.max(E,k)!==v&&(t||r)&&e>0){rs(this,yi,Lo).call(this),H(this,jt).call(this,e);return}v=Math.max(E,k);const A=Math.min(0,c.left+c.width),_e=Math.max(Math.min(g,y-d.width),c.left-d.width),we=Math.max(A,_e);if(we!==g&&(o||a)&&e>0){rs(this,yi,Lo).call(this),H(this,jt).call(this,e);return}g=we,(v+d.height<0||v>$||g+d.width<0||g>y)&&this.hidePopover(),this.style.transform=`translate(${g}px, ${v}px)`,this.style.opacity="1"}),ht(this,Ao,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,H(this,pt).call(this)}connectedCallback(){!HTMLElement.prototype.hasOwnProperty("popover")&&cb.bind(this)(),this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",H(this,fi))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",H(this,fi))}render(){return u`<slot></slot>`}},dt=new WeakMap,fi=new WeakMap,pt=new WeakMap,jt=new WeakMap,Ao=new WeakMap,yi=new WeakSet,Lo=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},n.UUIPopoverContainerElement.styles=[p`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible}`],Be([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),Be([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),Be([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),Be([f()],n.UUIPopoverContainerElement.prototype,"_placement",2),Be([f()],n.UUIPopoverContainerElement.prototype,"_open",2),Be([f()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=Be([b("uui-popover-container")],n.UUIPopoverContainerElement);var bb=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,ns=(i,e,t,r)=>{for(var o=r>1?void 0:r?mb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&bb(e,t,o),o};const vb=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUIProgressBarElement=class extends m{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=vb(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return u`<div id="bar" style="${ue(this._getProgressStyle())}"></div>`}},n.UUIProgressBarElement.styles=[p`:host{width:100%;height:4px;position:relative;overflow:hidden;background:var(--uui-color-surface-alt,#f3f3f5);border-radius:100px;display:inline-block}#bar{transition:width 250ms ease;background:var(--uui-color-positive,#0b8152);height:100%;width:0%}`],ns([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=ns([b("uui-progress-bar")],n.UUIProgressBarElement);var gb=Object.defineProperty,as=Object.getOwnPropertySymbols,fb=Object.prototype.hasOwnProperty,yb=Object.prototype.propertyIsEnumerable,ss=(i,e,t)=>e in i?gb(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ls=(i,e)=>{for(var t in e||(e={}))fb.call(e,t)&&ss(i,t,e[t]);if(as)for(var t of as(e))yb.call(e,t)&&ss(i,t,e[t]);return i};let bt=class extends P{constructor(e,t={}){super(e,ls(ls({},{bubbles:!0}),t))}};bt.CHANGE="change";var _b=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,Ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?wb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_b(e,t,o),o},$b=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},us=(i,e,t)=>($b(i,e,"read from private field"),t?t.call(i):e.get(i)),cs=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},jo,To;n.UUIRadioElement=class extends m{constructor(){super(),this.name="",this.value="",this.label="",this._checked=!1,this._disabled=!1,cs(this,jo,()=>{this.style.setProperty("--uui-show-focus-outline","1")}),cs(this,To,()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("mousedown",us(this,To)),this.addEventListener("blur",us(this,jo))}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,e===!0?(this.setAttribute("aria-checked",""),this.disabled||this.setAttribute("tabindex","0")):(this.setAttribute("tabindex","-1"),this.removeAttribute("aria-checked")),this.requestUpdate("checked",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-hidden",e?"true":"false"),this.setAttribute("tabindex",e?"-1":"0"),this.requestUpdate("disabled",t)}focus(){this.inputElement.focus()}click(){this.inputElement.click()}_onChange(e){e.stopPropagation();const t=this.inputElement.checked;this.checked=t,t&&this.focus(),this.dispatchEvent(new bt(bt.CHANGE))}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.setAttribute("tabindex","0")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.hasAttribute("aria-checked")||this.removeAttribute("aria-checked")}render(){return u`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled}" @change="${this._onChange}"><div id="button"></div><div id="label">${this.label?u`<span>${this.label}</span>`:u`<slot></slot>`}</div></label>`}},jo=new WeakMap,To=new WeakMap,n.UUIRadioElement.styles=[Yt,p`:host{display:block;box-sizing:border-box;font-family:inherit;color:currentColor;--uui-radio-button-size:var(--uui-size-6,18px);margin:var(--uui-size-2,6px) 0}label{display:block;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;line-height:18px}#input{width:0;height:0;opacity:0;margin:0}.label{margin-top:2px}#button{box-sizing:border-box;display:inline-block;width:var(--uui-radio-button-size,18px);height:var(--uui-radio-button-size,18px);background-color:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border-standalone,#c2c2c2);border-radius:100%;margin-right:calc(var(--uui-size-2,6px) * 2);position:relative;flex:0 0 var(--uui-radio-button-size)}#button::after{content:'';width:calc(var(--uui-radio-button-size)/ 2);height:calc(var(--uui-radio-button-size)/ 2);background-color:var(--uui-color-selected,#3544b1);border-radius:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:all .15s ease-in-out}:host(:hover) #button{border:1px solid var(--uui-color-border-emphasis,#a1a1a1)}:host(:focus){outline:0}:host(:focus) #button{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}input:checked~#button::after{transform:translate(-50%,-50%) scale(1)}input:checked~#button{border:1px solid var(--uui-color-selected,#3544b1)}input:checked:hover~#button{border:1px solid var(--uui-color-selected-emphasis,#4656c8)}input:checked:hover~#button::after{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([disabled]) label{cursor:default;opacity:.5}:host([disabled]) .label{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button::after{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]:active) #button{animation:${Zt}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],Ve([C("#input")],n.UUIRadioElement.prototype,"inputElement",2),Ve([l({type:String})],n.UUIRadioElement.prototype,"name",2),Ve([l({type:String})],n.UUIRadioElement.prototype,"value",2),Ve([l({type:String})],n.UUIRadioElement.prototype,"label",2),Ve([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",1),Ve([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",1),n.UUIRadioElement=Ve([b("uui-radio")],n.UUIRadioElement);var Ub=Object.defineProperty,hs=Object.getOwnPropertySymbols,Eb=Object.prototype.hasOwnProperty,kb=Object.prototype.propertyIsEnumerable,ds=(i,e,t)=>e in i?Ub(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ps=(i,e)=>{for(var t in e||(e={}))Eb.call(e,t)&&ds(i,t,e[t]);if(hs)for(var t of hs(e))kb.call(e,t)&&ds(i,t,e[t]);return i};let _i=class extends P{constructor(e,t={}){super(e,ps(ps({},{bubbles:!0}),t))}};_i.CHANGE="change";var xb=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,bs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ib(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&xb(e,t,o),o};const Cb="ArrowLeft",Pb="ArrowUp",Sb="ArrowRight",Ob="ArrowDown",zb=" ";n.UUIRadioGroupElement=class extends J(m){constructor(){super(),this.disabled=!1,this._selected=null,this._radioElements=[],this._onChildBlur=()=>{this.pristine=!1},this._handleSelectOnClick=e=>{e.target.checked===!0&&(this.value=e.target.value,this._fireChangeEvent())},this.addEventListener("keydown",this._onKeydown),this.addEventListener("keypress",this._onKeypress),this.updateComplete.then(()=>{this._updateRadioElementsCheckedState(this.value)})}get value(){return this._value}set value(e){super.value=e,(e===null||e==="")&&this._makeFirstEnabledFocusable(),this._updateRadioElementsCheckedState(e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}focus(){var e,t;this._selected!==null?(e=this._radioElements[this._selected])==null||e.focus():(t=this._findNextEnabledElement())==null||t.focus()}click(){var e,t;this._selected!==null?(e=this._radioElements[this._selected])==null||e.click():(t=this._findNextEnabledElement())==null||t.click()}getFormElement(){if(this._radioElements&&this._selected)return this._radioElements[this._selected]}_setNameOnRadios(e){var t;(t=this._radioElements)==null||t.forEach(r=>r.name=e)}_updateRadioElementsCheckedState(e){this._radioElements.forEach((t,r)=>{t.value===e?(t.checked=!0,this._selected=r):t.checked=!1})}_setDisableOnRadios(e){var t;(t=this._radioElements)==null||t.forEach(r=>r.disabled=e)}_handleSlotChange(e){var t;if(e.stopPropagation(),(t=this._radioElements)==null||t.forEach(o=>{o.removeEventListener(bt.CHANGE,this._handleSelectOnClick),o.removeEventListener("blur",this._onChildBlur)}),this._selected=null,this._radioElements=e.target.assignedElements({flatten:!0}).filter(o=>o instanceof n.UUIRadioElement),this._radioElements.length===0)return;this._radioElements.forEach(o=>{o.addEventListener(bt.CHANGE,this._handleSelectOnClick),o.addEventListener("blur",this._onChildBlur)}),this._setNameOnRadios(this.name),this.disabled&&this._setDisableOnRadios(!0);const r=this._radioElements.filter(o=>o.checked===!0);r.length>1&&(this._radioElements.forEach(o=>{o.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),r.length===1?(this.value=r[0].value,this._selected=this._radioElements.indexOf(r[0]),r[0].disabled===!1?(this._radioElements.forEach(o=>{o.makeUnfocusable()}),r[0].makeFocusable()):this._makeFirstEnabledFocusable()):this._makeFirstEnabledFocusable()}_makeFirstEnabledFocusable(){var e,t;this._selected=null,(e=this._radioElements)==null||e.forEach(r=>{r.makeUnfocusable()}),(t=this._findNextEnabledElement())==null||t.makeFocusable()}_findNextEnabledElement(e=1){if(!this._radioElements)return null;const t=this._selected||0,r=this._radioElements.length;let o=this._selected===null?0:1;for(;o<r;){let a=(t+o*e)%r;if(a<0&&(a+=r),this._radioElements[a].disabled===!1)return this._radioElements[a];o++}return null}_selectPreviousElement(){var e,t;this.value=((e=this._findNextEnabledElement(-1))==null?void 0:e.value)||"",(t=this._radioElements[this._selected||0])==null||t.focus(),this._fireChangeEvent()}_selectNextElement(){var e,t;this.value=((e=this._findNextEnabledElement())==null?void 0:e.value)||"",(t=this._radioElements[this._selected||0])==null||t.focus(),this._fireChangeEvent()}_onKeydown(e){var t;switch(e.key){case Cb:case Pb:{e.preventDefault(),this._selectPreviousElement();break}case Sb:case Ob:{e.preventDefault(),this._selectNextElement();break}case zb:this._selected===null&&(this.value=(t=this._findNextEnabledElement())==null?void 0:t.value,this._fireChangeEvent())}}_onKeypress(e){e.key=="Enter"&&this.submit()}_fireChangeEvent(){this.pristine=!1,this.dispatchEvent(new _i(_i.CHANGE))}updated(e){super.updated(e),e.has("disabled")&&this._setDisableOnRadios(this.disabled),e.has("name")&&this._setNameOnRadios(e.get("name"))}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[p`:host{display:inline-block;padding-right:3px;border:1px solid transparent;border-radius:var(--uui-border-radius,3px)}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],bs([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),n.UUIRadioGroupElement=bs([b("uui-radio-group")],n.UUIRadioGroupElement);var Ab=Object.defineProperty,ms=Object.getOwnPropertySymbols,Lb=Object.prototype.hasOwnProperty,jb=Object.prototype.propertyIsEnumerable,vs=(i,e,t)=>e in i?Ab(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,gs=(i,e)=>{for(var t in e||(e={}))Lb.call(e,t)&&vs(i,t,e[t]);if(ms)for(var t of ms(e))jb.call(e,t)&&vs(i,t,e[t]);return i};let re=class extends P{constructor(e,t={}){super(e,gs(gs({},{bubbles:!0}),t))}};re.INPUT="input",re.CHANGE="change";var Tb=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,O=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Tb(e,t,o),o},Mb=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Db=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},mt=(i,e,t)=>(Mb(i,e,"access private method"),t),xe,He;const No={TOP:3,CENTER:2,BACK:1},Tt=18,ge=12,Bb=24;n.UUIRangeSliderElement=class extends J(m){constructor(){super(),Db(this,xe),this.disabled=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,this._onKeypress=e=>{e.key=="Enter"&&this.submit()},this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const r=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-r),a=Math.abs(this._highInputValue-r);o<a?this.setValueLow(r):this.setValueHigh(r)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const r=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-r),a=Math.abs(this._highInputValue-r);o<a?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keypress",this._onKeypress),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{var e;this._trackWidth=(e=this._outerTrack)==null?void 0:e.offsetWidth})}get min(){return this._min}set min(e){this._min=e,mt(this,xe,He).call(this)}get max(){return this._max}set max(e){this._max=e,mt(this,xe,He).call(this)}get step(){return this._step}set step(e){this._step=e,mt(this,xe,He).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,mt(this,xe,He).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,mt(this,xe,He).call(this)}get value(){return this._value}set value(e){super.value=e,mt(this,xe,He).call(this)}setValueLow(e){e=S(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=S(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,r){if(r){const o=this.startPoint.high-this.startPoint.low;e=S(e,this.min,this.max-o),t=S(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const e=this._minGap;this._highInputValue-e<this._min?(this.setValueHigh(this._lowInputValue+e),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-e),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=t/e*100,a=100-r/e*100;this._lowValuePercentStart=S(o,0,100),this._highValuePercentEnd=S(a,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-ge)/(this._trackWidth-ge*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,r=e-this.startPoint.mouse,o=this._max-this._min,a=r/(t+ge*2),s=Math.round(a*o/this._step)*this._step,h=this.startPoint.low+s,c=this.startPoint.high+s;this.setValue(h,c,!0),this.dispatchEvent(new re(re.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new re(re.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new re(re.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new re(re.CHANGE))}render(){return u`
|
|
491
|
+
)}`],Vt([C("#container")],n.UUIPopoverElement.prototype,"containerElement",2),Vt([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),Vt([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),Vt([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=Vt([b("uui-popover")],n.UUIPopoverElement);function Xb(){const i=this.addEventListener;this.addEventListener=function(t,r,o){if(t!=="focusout"){if(t==="beforetoggle"){this.polyfill_onBeforeToggle=a=>{this.dispatchEvent(new CustomEvent("polyfill-beforetoggle",{bubbles:!1,composed:!1,detail:{oldState:a.oldState,newState:a.newState}})),r(a)};return}i.call(this,t,r,o)}},this.polyfill_onFocusout=t=>{const r=t.relatedTarget;if(!r)return;const o=r?.closest("uui-popover-container"),a=r?.closest("[popovertarget]");!o&&!a&&this.hidePopover()},this.polyfill_onClick=t=>{t.composedPath().some(r=>{var o;return r.tagName==="UUI-POPOVER-CONTAINER"||((o=r.attributes)==null?void 0:o.popovertarget)})||this.hidePopover()},this.polyfill_onParentPopoverUpdate=t=>{t.detail.newState==="closed"&&this.hidePopover()};const e=t=>{var r;return t.parentElement?((r=t.parentElement)==null?void 0:r.tagName)==="UUI-POPOVER-CONTAINER"?t.parentElement:e(t.parentElement):null};this.polyfill_hasBeenMovedToBody||(this.style.display="none",this.style.position="fixed",this.style.inset="0",this.style.zIndex="9999"),this.showPopover=()=>{var t,r;this.polyfill_hasBeenMovedToBody||(this.polyfill_parentPopoverContainer=e(this)),this.polyfill_onBeforeToggle({oldState:"closed",newState:"open"}),this.style.display="block",(t=this.polyfill_parentPopoverContainer)==null||t.addEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),window.addEventListener("click",this.polyfill_onClick),window.addEventListener("focusout",this.polyfill_onFocusout),this.polyfill_originalParent=this.parentNode,this.polyfill_originalNextSibling=this.nextSibling;const o=this.getRootNode();if(o&&o.adoptedStyleSheets){const a=o.adoptedStyleSheets.reduce((h,d)=>h+Object.values(d.cssRules).reduce((v,f)=>v+`#${this.id} ${f.cssText}`,""),""),s=document.createElement("style");s.innerHTML=a,s.id="uui-popover-polyfill-style";const c=this.shadowRoot.host.querySelector("#uui-popover-polyfill-style");c&&c.parentNode.removeChild(c),this.insertAdjacentElement("beforeend",s)}this.parentNode!==document.body&&((r=this.parentNode)==null||r.removeChild(this),this.polyfill_hasBeenMovedToBody=!0,document.body.appendChild(this))},this.hidePopover=()=>{var t,r;this.polyfill_hasBeenMovedToBody&&(document.body.removeChild(this),this.polyfill_hasBeenMovedToBody=!1,(t=this.polyfill_originalParent)==null||t.insertBefore(this,this.polyfill_originalNextSibling)),window.removeEventListener("click",this.polyfill_onClick),window.removeEventListener("focusout",this.polyfill_onFocusout),(r=this.polyfill_parentPopoverContainer)==null||r.removeEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),this.polyfill_onBeforeToggle({oldState:"open",newState:"closed"}),this.style.display="none"}}var Yb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,Re=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Yb(e,t,o),o},ar=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(ar(i,e,"read from private field"),t?t.call(i):e.get(i)),vt=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Qb=(i,e,t,r)=>(ar(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),js=(i,e,t)=>(ar(i,e,"access private method"),t),gt,Li,ft,Ht,sr,Ti,lr;n.UUIPopoverContainerElement=class extends m{constructor(){super(...arguments),vt(this,Ti),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,vt(this,gt,null),vt(this,Li,e=>{var t;if(this._open=e.newState==="open",Qb(this,gt,ah(this,"popovertarget",this.id)),(t=G(this,gt))==null||t.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),!this._open){document.removeEventListener("scroll",G(this,ft));return}document.addEventListener("scroll",G(this,ft)),requestAnimationFrame(()=>{G(this,ft).call(this)})}),vt(this,ft,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",G(this,Ht).call(this,3))}),vt(this,Ht,e=>{if(G(this,sr).call(this),e--,G(this,gt)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,a=this._actualPlacement.indexOf("right")!==-1,s=this._actualPlacement.indexOf("-start")!==-1,c=this._actualPlacement.indexOf("-end")!==-1,h=G(this,gt).getBoundingClientRect(),d=this.getBoundingClientRect();let v=0,f=0;r&&(v=h.top+h.height,s&&(f=h.left),c&&(f=h.left+h.width-d.width),!s&&!c&&(f=h.left+h.width/2-d.width/2)),t&&(v=h.top-d.height,s&&(f=h.left),c&&(f=h.left+h.width-d.width),!s&&!c&&(f=h.left+h.width/2-d.width/2)),o&&(f=h.left-d.width,s&&(v=h.top),c&&(v=h.top+h.height-d.height),!s&&!c&&(v=h.top+h.height/2-d.height/2)),a&&(f=h.left+h.width,s&&(v=h.top),c&&(v=h.top+h.height-d.height),!s&&!c&&(v=h.top+h.height/2-d.height/2));const y=window.innerWidth,$=window.innerHeight,E=Math.min(0,h.top+h.height),x=Math.max(Math.min(v,$-d.height),h.top-d.height);if(Math.max(E,x)!==v&&(t||r)&&e>0){js(this,Ti,lr).call(this),G(this,Ht).call(this,e);return}v=Math.max(E,x);const j=Math.min(0,h.left+h.width),$e=Math.max(Math.min(f,y-d.width),h.left-d.width),Ue=Math.max(j,$e);if(Ue!==f&&(o||a)&&e>0){js(this,Ti,lr).call(this),G(this,Ht).call(this,e);return}f=Ue,(v+d.height<0||v>$||f+d.width<0||f>y)&&this.hidePopover(),this.style.transform=`translate(${f}px, ${v}px)`,this.style.opacity="1"}),vt(this,sr,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,G(this,ft).call(this)}connectedCallback(){!HTMLElement.prototype.hasOwnProperty("popover")&&Xb.bind(this)(),this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",G(this,Li))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",G(this,Li))}render(){return u`<slot></slot>`}},gt=new WeakMap,Li=new WeakMap,ft=new WeakMap,Ht=new WeakMap,sr=new WeakMap,Ti=new WeakSet,lr=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},n.UUIPopoverContainerElement.styles=[p`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible}`],Re([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),Re([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),Re([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),Re([g()],n.UUIPopoverContainerElement.prototype,"_placement",2),Re([g()],n.UUIPopoverContainerElement.prototype,"_open",2),Re([g()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=Re([b("uui-popover-container")],n.UUIPopoverContainerElement);var Jb=Object.defineProperty,em=Object.getOwnPropertyDescriptor,Ls=(i,e,t,r)=>{for(var o=r>1?void 0:r?em(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Jb(e,t,o),o};const tm=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUIProgressBarElement=class extends m{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=tm(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return u`<div id="bar" style="${re(this._getProgressStyle())}"></div>`}},n.UUIProgressBarElement.styles=[p`:host{width:100%;height:4px;position:relative;overflow:hidden;background:var(--uui-color-surface-alt,#f3f3f5);border-radius:100px;display:inline-block}#bar{transition:width 250ms ease;background:var(--uui-color-positive,#0b8152);height:100%;width:0%}`],Ls([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=Ls([b("uui-progress-bar")],n.UUIProgressBarElement);var im=Object.defineProperty,Ts=Object.getOwnPropertySymbols,om=Object.prototype.hasOwnProperty,rm=Object.prototype.propertyIsEnumerable,Ns=(i,e,t)=>e in i?im(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ms=(i,e)=>{for(var t in e||(e={}))om.call(e,t)&&Ns(i,t,e[t]);if(Ts)for(var t of Ts(e))rm.call(e,t)&&Ns(i,t,e[t]);return i};let yt=class extends P{constructor(e,t={}){super(e,Ms(Ms({},{bubbles:!0}),t))}};yt.CHANGE="change";var nm=Object.defineProperty,am=Object.getOwnPropertyDescriptor,Fe=(i,e,t,r)=>{for(var o=r>1?void 0:r?am(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&nm(e,t,o),o},sm=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ds=(i,e,t)=>(sm(i,e,"read from private field"),t?t.call(i):e.get(i)),Bs=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ur,cr;n.UUIRadioElement=class extends m{constructor(){super(),this.name="",this.value="",this.label="",this._checked=!1,this._disabled=!1,Bs(this,ur,()=>{this.style.setProperty("--uui-show-focus-outline","1")}),Bs(this,cr,()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("mousedown",Ds(this,cr)),this.addEventListener("blur",Ds(this,ur))}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,e===!0?(this.setAttribute("aria-checked",""),this.disabled||this.setAttribute("tabindex","0")):(this.setAttribute("tabindex","-1"),this.removeAttribute("aria-checked")),this.requestUpdate("checked",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-hidden",e?"true":"false"),this.setAttribute("tabindex",e?"-1":"0"),this.requestUpdate("disabled",t)}focus(){this.inputElement.focus()}click(){this.inputElement.click()}_onChange(e){e.stopPropagation();const t=this.inputElement.checked;this.checked=t,t&&this.focus(),this.dispatchEvent(new yt(yt.CHANGE))}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.setAttribute("tabindex","0")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.hasAttribute("aria-checked")||this.removeAttribute("aria-checked")}render(){return u`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled}" @change="${this._onChange}"><div id="button"></div><div id="label">${this.label?u`<span>${this.label}</span>`:u`<slot></slot>`}</div></label>`}},ur=new WeakMap,cr=new WeakMap,n.UUIRadioElement.styles=[ri,p`:host{display:block;box-sizing:border-box;font-family:inherit;color:currentColor;--uui-radio-button-size:var(--uui-size-6,18px);margin:var(--uui-size-2,6px) 0}label{display:block;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;line-height:18px}#input{width:0;height:0;opacity:0;margin:0}.label{margin-top:2px}#button{box-sizing:border-box;display:inline-block;width:var(--uui-radio-button-size,18px);height:var(--uui-radio-button-size,18px);background-color:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border-standalone,#c2c2c2);border-radius:100%;margin-right:calc(var(--uui-size-2,6px) * 2);position:relative;flex:0 0 var(--uui-radio-button-size)}#button::after{content:'';width:calc(var(--uui-radio-button-size)/ 2);height:calc(var(--uui-radio-button-size)/ 2);background-color:var(--uui-color-selected,#3544b1);border-radius:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:all .15s ease-in-out}:host(:hover) #button{border:1px solid var(--uui-color-border-emphasis,#a1a1a1)}:host(:focus){outline:0}:host(:focus) #button{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}input:checked~#button::after{transform:translate(-50%,-50%) scale(1)}input:checked~#button{border:1px solid var(--uui-color-selected,#3544b1)}input:checked:hover~#button{border:1px solid var(--uui-color-selected-emphasis,#4656c8)}input:checked:hover~#button::after{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([disabled]) label{cursor:default;opacity:.5}:host([disabled]) .label{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button::after{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]:active) #button{animation:${ni}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],Fe([C("#input")],n.UUIRadioElement.prototype,"inputElement",2),Fe([l({type:String})],n.UUIRadioElement.prototype,"name",2),Fe([l({type:String})],n.UUIRadioElement.prototype,"value",2),Fe([l({type:String})],n.UUIRadioElement.prototype,"label",2),Fe([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",1),Fe([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",1),n.UUIRadioElement=Fe([b("uui-radio")],n.UUIRadioElement);var lm=Object.defineProperty,Vs=Object.getOwnPropertySymbols,um=Object.prototype.hasOwnProperty,cm=Object.prototype.propertyIsEnumerable,Hs=(i,e,t)=>e in i?lm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Rs=(i,e)=>{for(var t in e||(e={}))um.call(e,t)&&Hs(i,t,e[t]);if(Vs)for(var t of Vs(e))cm.call(e,t)&&Hs(i,t,e[t]);return i};let Ni=class extends P{constructor(e,t={}){super(e,Rs(Rs({},{bubbles:!0}),t))}};Ni.CHANGE="change";var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Fs=(i,e,t,r)=>{for(var o=r>1?void 0:r?dm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&hm(e,t,o),o};const pm="ArrowLeft",bm="ArrowUp",mm="ArrowRight",vm="ArrowDown",gm=" ";n.UUIRadioGroupElement=class extends ie(m){constructor(){super(),this.disabled=!1,this._selected=null,this._radioElements=[],this._onChildBlur=()=>{this.pristine=!1},this._handleSelectOnClick=e=>{e.target.checked===!0&&(this.value=e.target.value,this._fireChangeEvent())},this.addEventListener("keydown",this._onKeydown),this.addEventListener("keypress",this._onKeypress),this.updateComplete.then(()=>{this._updateRadioElementsCheckedState(this.value)})}get value(){return this._value}set value(e){super.value=e,(e===null||e==="")&&this._makeFirstEnabledFocusable(),this._updateRadioElementsCheckedState(e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}focus(){var e,t;this._selected!==null?(e=this._radioElements[this._selected])==null||e.focus():(t=this._findNextEnabledElement())==null||t.focus()}click(){var e,t;this._selected!==null?(e=this._radioElements[this._selected])==null||e.click():(t=this._findNextEnabledElement())==null||t.click()}getFormElement(){if(this._radioElements&&this._selected)return this._radioElements[this._selected]}_setNameOnRadios(e){var t;(t=this._radioElements)==null||t.forEach(r=>r.name=e)}_updateRadioElementsCheckedState(e){this._radioElements.forEach((t,r)=>{t.value===e?(t.checked=!0,this._selected=r):t.checked=!1})}_setDisableOnRadios(e){var t;(t=this._radioElements)==null||t.forEach(r=>r.disabled=e)}_handleSlotChange(e){var t;if(e.stopPropagation(),(t=this._radioElements)==null||t.forEach(o=>{o.removeEventListener(yt.CHANGE,this._handleSelectOnClick),o.removeEventListener("blur",this._onChildBlur)}),this._selected=null,this._radioElements=e.target.assignedElements({flatten:!0}).filter(o=>o instanceof n.UUIRadioElement),this._radioElements.length===0)return;this._radioElements.forEach(o=>{o.addEventListener(yt.CHANGE,this._handleSelectOnClick),o.addEventListener("blur",this._onChildBlur)}),this._setNameOnRadios(this.name),this.disabled&&this._setDisableOnRadios(!0);const r=this._radioElements.filter(o=>o.checked===!0);r.length>1&&(this._radioElements.forEach(o=>{o.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),r.length===1?(this.value=r[0].value,this._selected=this._radioElements.indexOf(r[0]),r[0].disabled===!1?(this._radioElements.forEach(o=>{o.makeUnfocusable()}),r[0].makeFocusable()):this._makeFirstEnabledFocusable()):this._makeFirstEnabledFocusable()}_makeFirstEnabledFocusable(){var e,t;this._selected=null,(e=this._radioElements)==null||e.forEach(r=>{r.makeUnfocusable()}),(t=this._findNextEnabledElement())==null||t.makeFocusable()}_findNextEnabledElement(e=1){if(!this._radioElements)return null;const t=this._selected||0,r=this._radioElements.length;let o=this._selected===null?0:1;for(;o<r;){let a=(t+o*e)%r;if(a<0&&(a+=r),this._radioElements[a].disabled===!1)return this._radioElements[a];o++}return null}_selectPreviousElement(){var e,t;this.value=((e=this._findNextEnabledElement(-1))==null?void 0:e.value)||"",(t=this._radioElements[this._selected||0])==null||t.focus(),this._fireChangeEvent()}_selectNextElement(){var e,t;this.value=((e=this._findNextEnabledElement())==null?void 0:e.value)||"",(t=this._radioElements[this._selected||0])==null||t.focus(),this._fireChangeEvent()}_onKeydown(e){var t;switch(e.key){case pm:case bm:{e.preventDefault(),this._selectPreviousElement();break}case mm:case vm:{e.preventDefault(),this._selectNextElement();break}case gm:this._selected===null&&(this.value=(t=this._findNextEnabledElement())==null?void 0:t.value,this._fireChangeEvent())}}_onKeypress(e){e.key=="Enter"&&this.submit()}_fireChangeEvent(){this.pristine=!1,this.dispatchEvent(new Ni(Ni.CHANGE))}updated(e){super.updated(e),e.has("disabled")&&this._setDisableOnRadios(this.disabled),e.has("name")&&this._setNameOnRadios(e.get("name"))}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[p`:host{display:inline-block;padding-right:3px;border:1px solid transparent;border-radius:var(--uui-border-radius,3px)}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],Fs([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),n.UUIRadioGroupElement=Fs([b("uui-radio-group")],n.UUIRadioGroupElement);var fm=Object.defineProperty,Gs=Object.getOwnPropertySymbols,ym=Object.prototype.hasOwnProperty,wm=Object.prototype.propertyIsEnumerable,qs=(i,e,t)=>e in i?fm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ws=(i,e)=>{for(var t in e||(e={}))ym.call(e,t)&&qs(i,t,e[t]);if(Gs)for(var t of Gs(e))wm.call(e,t)&&qs(i,t,e[t]);return i};let le=class extends P{constructor(e,t={}){super(e,Ws(Ws({},{bubbles:!0}),t))}};le.INPUT="input",le.CHANGE="change";var _m=Object.defineProperty,$m=Object.getOwnPropertyDescriptor,z=(i,e,t,r)=>{for(var o=r>1?void 0:r?$m(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_m(e,t,o),o},Um=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Em=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},wt=(i,e,t)=>(Um(i,e,"access private method"),t),Se,Ge;const hr={TOP:3,CENTER:2,BACK:1},Rt=18,_e=12,km=24;n.UUIRangeSliderElement=class extends ie(m){constructor(){super(),Em(this,Se),this.disabled=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,this._onKeypress=e=>{e.key=="Enter"&&this.submit()},this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const r=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-r),a=Math.abs(this._highInputValue-r);o<a?this.setValueLow(r):this.setValueHigh(r)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const r=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-r),a=Math.abs(this._highInputValue-r);o<a?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keypress",this._onKeypress),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{var e;this._trackWidth=(e=this._outerTrack)==null?void 0:e.offsetWidth})}get min(){return this._min}set min(e){this._min=e,wt(this,Se,Ge).call(this)}get max(){return this._max}set max(e){this._max=e,wt(this,Se,Ge).call(this)}get step(){return this._step}set step(e){this._step=e,wt(this,Se,Ge).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,wt(this,Se,Ge).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,wt(this,Se,Ge).call(this)}get value(){return this._value}set value(e){super.value=e,wt(this,Se,Ge).call(this)}setValueLow(e){e=O(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=O(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,r){if(r){const o=this.startPoint.high-this.startPoint.low;e=O(e,this.min,this.max-o),t=O(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const e=this._minGap;this._highInputValue-e<this._min?(this.setValueHigh(this._lowInputValue+e),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-e),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=t/e*100,a=100-r/e*100;this._lowValuePercentStart=O(o,0,100),this._highValuePercentEnd=O(a,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-_e)/(this._trackWidth-_e*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,r=e-this.startPoint.mouse,o=this._max-this._min,a=r/(t+_e*2),s=Math.round(a*o/this._step)*this._step,c=this.startPoint.low+s,h=this.startPoint.high+s;this.setValue(c,h,!0),this.dispatchEvent(new le(le.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new le(le.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new le(le.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new le(le.CHANGE))}render(){return u`
|
|
489
492
|
<div id="range-slider">
|
|
490
493
|
${this._renderNativeInputs()}
|
|
491
494
|
<div id="inner-track">
|
|
@@ -502,7 +505,7 @@
|
|
|
502
505
|
`}_renderThumbValues(){return u`<div class="thumb-values">
|
|
503
506
|
<span><span>${this._lowInputValue}</span></span>
|
|
504
507
|
<span><span>${this._highInputValue}</span></span>
|
|
505
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-
|
|
508
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-_e*2)/e;if(t<km||e%1!==0)return;let r=0;const o=new Array(e+1).fill(t).map(a=>a*r++);return u`<div class="step-wrapper">
|
|
506
509
|
<svg height="100%" width="100%">
|
|
507
510
|
<rect x="9" y="9" height="3" rx="2" />
|
|
508
511
|
${this._renderStepCircles(o)}
|
|
@@ -510,7 +513,7 @@
|
|
|
510
513
|
${this._renderStepValues(e)}
|
|
511
514
|
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const r=new Array(e+1).fill(this._step).map(o=>this._min+o*t++);return u`<div class="step-values">
|
|
512
515
|
${r.map(o=>u`<span><span>${o}</span></span>`)}
|
|
513
|
-
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return
|
|
516
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return w`${e.map(r=>{const o=r+_e,a=this._lowInputValue-this._min,s=this._highInputValue-this._min;return o/t>=a&&o/t<=s?w`<circle class="track-step filled" cx="${o}" cy="5" r="4.5" />`:w`<circle class="track-step regular" cx="${o}" cy="5" r="4.5" />`})}`}_renderNativeInputs(){return u` <div class="native-wrapper">
|
|
514
517
|
<input
|
|
515
518
|
id="inputLow"
|
|
516
519
|
class="${this._movement?"focus":""}"
|
|
@@ -535,7 +538,7 @@
|
|
|
535
538
|
?disabled="${this.disabled}"
|
|
536
539
|
@input=${this._onHighInput}
|
|
537
540
|
@change=${this._onHighChange} />
|
|
538
|
-
</div>`}},
|
|
541
|
+
</div>`}},Se=new WeakSet,Ge=function(){const i=this.value.split(",");let e=Number(i[0])||0,t=Number(i[1])||0;t=O(t,this._min,this._max),e=this._min+Math.round((e-this._min)/this._step)*this._step,t=this._min+Math.round((t-this._min)/this._step)*this._step,this._lowInputValue=O(e,this._min,this._minGap?t-this._minGap:t-this._step),this._highInputValue=O(t,this._minGap?this._lowInputValue+this._minGap:this._lowInputValue+this._step,Math.min(this._maxGap?e+this._maxGap:this._max,this._max)),this._updateInnerColor(),this.requestUpdate()},n.UUIRangeSliderElement.formAssociated=!0,n.UUIRangeSliderElement.styles=[p`
|
|
539
542
|
:host {
|
|
540
543
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
541
544
|
--color-hover: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
|
|
@@ -563,8 +566,8 @@
|
|
|
563
566
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
564
567
|
position: absolute;
|
|
565
568
|
height: 3px;
|
|
566
|
-
left: ${
|
|
567
|
-
right: ${
|
|
569
|
+
left: ${_e}px; /* Match TRACK_MARGIN */
|
|
570
|
+
right: ${_e}px; /* Match TRACK_MARGIN */
|
|
568
571
|
}
|
|
569
572
|
|
|
570
573
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -578,10 +581,10 @@
|
|
|
578
581
|
display: flex;
|
|
579
582
|
flex-direction: column;
|
|
580
583
|
justify-content: center;
|
|
581
|
-
height: ${
|
|
584
|
+
height: ${Rt}px;
|
|
582
585
|
cursor: grab;
|
|
583
586
|
user-select: none;
|
|
584
|
-
z-index: ${
|
|
587
|
+
z-index: ${hr.CENTER};
|
|
585
588
|
}
|
|
586
589
|
|
|
587
590
|
:host([disabled]) #inner-color-thumb {
|
|
@@ -626,7 +629,7 @@
|
|
|
626
629
|
|
|
627
630
|
/** Steps */
|
|
628
631
|
.step-wrapper {
|
|
629
|
-
margin: 0 ${-1*
|
|
632
|
+
margin: 0 ${-1*_e}px;
|
|
630
633
|
height: 11px;
|
|
631
634
|
position: absolute;
|
|
632
635
|
left: 0;
|
|
@@ -665,7 +668,7 @@
|
|
|
665
668
|
|
|
666
669
|
.step-values {
|
|
667
670
|
box-sizing: border-box;
|
|
668
|
-
margin: 0 ${
|
|
671
|
+
margin: 0 ${_e}px; /* Match TRACK_MARGIN */
|
|
669
672
|
display: flex;
|
|
670
673
|
justify-content: space-between;
|
|
671
674
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -743,9 +746,9 @@
|
|
|
743
746
|
pointer-events: all;
|
|
744
747
|
cursor: grab;
|
|
745
748
|
position: relative;
|
|
746
|
-
z-index: ${
|
|
747
|
-
width: ${
|
|
748
|
-
height: ${
|
|
749
|
+
z-index: ${hr.TOP};
|
|
750
|
+
width: ${Rt}px;
|
|
751
|
+
height: ${Rt}px;
|
|
749
752
|
border-radius: 24px;
|
|
750
753
|
border: none;
|
|
751
754
|
background-color: var(--color-interactive);
|
|
@@ -782,9 +785,9 @@
|
|
|
782
785
|
pointer-events: all;
|
|
783
786
|
cursor: grab;
|
|
784
787
|
position: relative;
|
|
785
|
-
z-index: ${
|
|
786
|
-
width: ${
|
|
787
|
-
height: ${
|
|
788
|
+
z-index: ${hr.TOP};
|
|
789
|
+
width: ${Rt}px;
|
|
790
|
+
height: ${Rt}px;
|
|
788
791
|
border-radius: 24px;
|
|
789
792
|
border: none;
|
|
790
793
|
background-color: var(--color-interactive);
|
|
@@ -813,7 +816,7 @@
|
|
|
813
816
|
box-shadow: inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
814
817
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
815
818
|
}
|
|
816
|
-
`],O([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),O([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),O([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),O([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),O([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),O([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),O([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),O([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),O([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),O([f()],n.UUIRangeSliderElement.prototype,"_movement",2),O([f()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),O([f()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),O([f()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),O([f()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),O([f()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),O([C("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),O([C("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),O([C("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),O([C(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),O([C("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=O([b("uui-range-slider")],n.UUIRangeSliderElement);var Vb=Object.defineProperty,Hb=Object.getOwnPropertyDescriptor,Rb=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Vb(e,t,o),o};n.UUIRefListElement=class extends m{render(){return u`<slot></slot>`}},n.UUIRefListElement.styles=[p`:host{display:block}::slotted(:not(:first-child)){margin-top:1px}::slotted(:not(:first-child))::before{content:'';position:absolute;top:-1px;left:0;right:0;border-top:1px solid var(--uui-color-border,#d8d7d9)}`],n.UUIRefListElement=Rb([b("uui-ref-list")],n.UUIRefListElement);class vt extends P{}vt.OPEN="open";var Fb=Object.defineProperty,Gb=Object.getOwnPropertyDescriptor,Mo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Fb(e,t,o),o};n.UUIRefElement=class extends Wt(Ze(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new vt(vt.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new vt(vt.OPEN)))}},n.UUIRefElement.styles=[p`:host{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);--uui-card-before-opacity:0;transition:--uui-card-before-opacity 120ms}:host(:focus){outline-color:#6ab4f0}:host([error]){border:2px solid var(--uui-color-danger,#d42054);box-shadow:0 0 4px 0 var(--uui-color-danger,#d42054),inset 0 0 2px 0 var(--uui-color-danger,#d42054)}:host([border]){border:1px solid var(--uui-color-border,#d8d7d9)}:host([selectable]){cursor:pointer}:host([selectable]) #select-border{position:absolute;z-index:2;top:-2px;left:-2px;right:-2px;bottom:-2px;pointer-events:none;opacity:0;transition:opacity 120ms}:host([selectable]) #select-border::after{content:'';position:absolute;width:100%;height:100%;box-sizing:border-box;border:2px solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + 2px);box-shadow:0 0 4px 0 var(--uui-color-selected,#3544b1),inset 0 0 2px 0 var(--uui-color-selected,#3544b1)}:host([selected]) #select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border{opacity:.33}:host([selectable][selected]:hover) #select-border{opacity:.8}:host([selectable]:not([selected])) #open-part:hover+#select-border{opacity:0}:host([selectable][selected]) #open-part:hover+#select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border::after{animation:not-selected--hover 1.2s infinite}@keyframes not-selected--hover{0%,100%{opacity:.66}50%{opacity:1}}:host([selectable][selected]:hover) #select-border::after{animation:selected--hover 1.4s infinite}@keyframes selected--hover{0%,100%{opacity:1}50%{opacity:.66}}:host([selectable]) #open-part:hover+#select-border::after{animation:none}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}button{font-size:inherit;font-family:inherit;border:0;padding:0;background-color:transparent;text-align:left}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-2,6px) * 4);margin-right:var(--uui-size-2,6px)}#actions-container{opacity:0;transition:opacity 120ms}:host(:hover) #actions-container{opacity:1}:host([border]:not([disabled]):hover){border-color:var(--uui-color-border-emphasis,#a1a1a1)}:host([disabled]) #open-part{cursor:default}:host([border][disabled]){border-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=tag]{flex-grow:1;display:flex;justify-content:flex-end;align-items:center}`],Mo([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"disabled",2),Mo([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"error",2),n.UUIRefElement=Mo([b("uui-ref")],n.UUIRefElement);var qb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,wi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&qb(e,t,o),o};n.UUIRefNodeElement=class extends n.UUIRefElement{constructor(){super(...arguments),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}connectedCallback(){super.connectedCallback(),w(this,"uui-icon")}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}_renderFallbackIcon(){return u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return u`<button type="button" id="open-part" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}</span><div id="info"><div id="name">${this.name}</div>${this.renderDetail()}</div></button><div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions" id="actions-container"></slot>`}},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,p`:host{min-width:250px;padding:calc(var(--uui-size-2,6px) + 1px)}#open-part{align-self:stretch;display:flex;position:relative;align-items:center;cursor:pointer}#icon{font-size:1.2em;margin-left:var(--uui-size-2,6px);margin-right:var(--uui-size-1,3px)}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px)}#name{font-weight:700}#detail{font-size:var(--uui-type-small-size,12px)}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{font-weight:700;text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]) #icon{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #name{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #detail{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],wi([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),wi([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),wi([f()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=wi([b("uui-ref-node")],n.UUIRefNodeElement);var Kb=Object.defineProperty,Xb=Object.getOwnPropertyDescriptor,fs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Kb(e,t,o),o};n.UUIRefNodeDataTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDataTypeElement.styles=[...n.UUIRefNodeElement.styles],fs([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=fs([b("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var Yb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,ys=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Yb(e,t,o),o};n.UUIRefNodeDocumentTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDocumentTypeElement.styles=[...n.UUIRefNodeElement.styles],ys([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=ys([b("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,em=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jb(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Qb(e,t,o),o};n.UUIRefNodeFormElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}},n.UUIRefNodeFormElement.styles=[...n.UUIRefNodeElement.styles],n.UUIRefNodeFormElement=em([b("uui-ref-node-form")],n.UUIRefNodeFormElement);var tm=Object.defineProperty,im=Object.getOwnPropertyDescriptor,_s=(i,e,t,r)=>{for(var o=r>1?void 0:r?im(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&tm(e,t,o),o};n.UUIRefNodeMemberElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeMemberElement.styles=[...n.UUIRefNodeElement.styles],_s([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=_s([b("uui-ref-node-member")],n.UUIRefNodeMemberElement);var om=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,Do=(i,e,t,r)=>{for(var o=r>1?void 0:r?rm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&om(e,t,o),o};n.UUIRefNodePackageElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodePackageElement.styles=[...n.UUIRefNodeElement.styles],Do([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),Do([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=Do([b("uui-ref-node-package")],n.UUIRefNodePackageElement);var nm=Object.defineProperty,am=Object.getOwnPropertyDescriptor,ws=(i,e,t,r)=>{for(var o=r>1?void 0:r?am(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&nm(e,t,o),o};n.UUIRefNodeUserElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeUserElement.styles=[...n.UUIRefNodeElement.styles],ws([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=ws([b("uui-ref-node-user")],n.UUIRefNodeUserElement);var sm=Object.defineProperty,lm=Object.getOwnPropertyDescriptor,$s=(i,e,t,r)=>{for(var o=r>1?void 0:r?lm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&sm(e,t,o),o};n.UUIScrollContainerElement=class extends m{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return u`<slot></slot>`}},n.UUIScrollContainerElement.styles=[p`:host{display:block;scrollbar-width:thin;scrollbar-color:var(--uui-color-disabled-contrast,#c4c4c4) var(--uui-color-surface,#fff);overflow-y:auto}:host([enforce-scroll]){overflow-y:scroll}:host::-webkit-scrollbar{width:6px;height:6px}:host::-webkit-scrollbar-track{background:var(--uui-color-surface,#fff);border-radius:3px}:host::-webkit-scrollbar-thumb{background-color:var(--uui-color-disabled-contrast,#c4c4c4);border-radius:3px}`],$s([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=$s([b("uui-scroll-container")],n.UUIScrollContainerElement);var um=Object.defineProperty,Us=Object.getOwnPropertySymbols,cm=Object.prototype.hasOwnProperty,hm=Object.prototype.propertyIsEnumerable,Es=(i,e,t)=>e in i?um(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ks=(i,e)=>{for(var t in e||(e={}))cm.call(e,t)&&Es(i,t,e[t]);if(Us)for(var t of Us(e))hm.call(e,t)&&Es(i,t,e[t]);return i};let $i=class extends P{constructor(e,t={}){super(e,ks(ks({},{bubbles:!0}),t))}};$i.CHANGE="change";var dm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,ne=(i,e,t,r)=>{for(var o=r>1?void 0:r?pm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&dm(e,t,o),o};n.UUISelectElement=class extends J(m){constructor(){super(),this.placeholder="",this.disabled=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}focus(){this._input.focus()}click(){this._input.click()}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const t=this.options.find(r=>r.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new $i($i.CHANGE,{bubbles:!0,composed:!1}))}getFormElement(){return this._input}_renderOption(e,t,r,o){return u`<option value="${t}" ?selected="${r}" ?disabled="${o}">${e}</option>`}_renderGrouped(){return this._groups.length===0?U:u`${this._groups.map(e=>u`<optgroup label="${e}" ?disabled="${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}">${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}</optgroup>`)}`}render(){return u`<select id="native" aria-label="${this.label}" @change="${this.setValue}" ?disabled="${this.disabled}" .name="${this.name}" .value="${this.value}"><option disabled="disabled" selected="selected" value="" hidden>${this.placeholder}</option>${this._renderGrouped()} ${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}</select>`}},n.UUISelectElement.styles=[p`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,var(--uui-size-5,15px));height:var(--uui-select-height,var(--uui-size-11,33px));padding:var(--uui-select-padding-y,var(--uui-size-1,3px)) var(--uui-select-padding-x,var(--uui-size-2,6px));color:currentColor;box-sizing:border-box;border-radius:0;border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease}#native:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-select-outline-color,var(--uui-color-focus,#3879ff))}#native[disabled]{cursor:not-allowed;background-color:var(--uui-select-disabled-background-color,var(--uui-color-disabled,#f3f3f5))}#native:hover{border:1px solid var(--uui-select-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1))}option:checked{background:var(--uui-select-selected-option-background-color,var(--uui-color-selected,#3544b1));color:var(--uui-select-selected-option-color,var(--uui-color-selected-contrast,#fff))}#caret{position:absolute;right:12px;top:50%;transform:translateY(-50%)}:host([error]) #native{border:1px solid var(--uui-color-danger-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],ne([l({type:String})],n.UUISelectElement.prototype,"label",2),ne([l()],n.UUISelectElement.prototype,"placeholder",2),ne([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),ne([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),ne([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),ne([f()],n.UUISelectElement.prototype,"_groups",2),ne([l()],n.UUISelectElement.prototype,"disabledGroups",2),ne([f()],n.UUISelectElement.prototype,"_disabledGroups",2),ne([C("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=ne([b("uui-select")],n.UUISelectElement);const bm=p`
|
|
819
|
+
`],z([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),z([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),z([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),z([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),z([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),z([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),z([g()],n.UUIRangeSliderElement.prototype,"_movement",2),z([g()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),z([g()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),z([g()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),z([g()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),z([g()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),z([C("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),z([C("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),z([C("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),z([C(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),z([C("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=z([b("uui-range-slider")],n.UUIRangeSliderElement);var xm=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,Cm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Im(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&xm(e,t,o),o};n.UUIRefListElement=class extends m{render(){return u`<slot></slot>`}},n.UUIRefListElement.styles=[p`:host{display:block}::slotted(:not(:first-child)){margin-top:1px}::slotted(:not(:first-child))::before{content:'';position:absolute;top:-1px;left:0;right:0;border-top:1px solid var(--uui-color-border,#d8d7d9)}`],n.UUIRefListElement=Cm([b("uui-ref-list")],n.UUIRefListElement);class _t extends P{}_t.OPEN="open";var Sm=Object.defineProperty,Pm=Object.getOwnPropertyDescriptor,dr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Sm(e,t,o),o};n.UUIRefElement=class extends ti(tt(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new _t(_t.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new _t(_t.OPEN)))}},n.UUIRefElement.styles=[p`:host{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;box-sizing:border-box;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);--uui-card-before-opacity:0;transition:--uui-card-before-opacity 120ms}:host(:focus){outline-color:#6ab4f0}:host([error]){border:2px solid var(--uui-color-danger,#d42054);box-shadow:0 0 4px 0 var(--uui-color-danger,#d42054),inset 0 0 2px 0 var(--uui-color-danger,#d42054)}:host([border]){border:1px solid var(--uui-color-border,#d8d7d9)}:host([selectable]){cursor:pointer}:host([selectable]) #select-border{position:absolute;z-index:2;top:-2px;left:-2px;right:-2px;bottom:-2px;pointer-events:none;opacity:0;transition:opacity 120ms}:host([selectable]) #select-border::after{content:'';position:absolute;width:100%;height:100%;box-sizing:border-box;border:2px solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + 2px);box-shadow:0 0 4px 0 var(--uui-color-selected,#3544b1),inset 0 0 2px 0 var(--uui-color-selected,#3544b1)}:host([selected]) #select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border{opacity:.33}:host([selectable][selected]:hover) #select-border{opacity:.8}:host([selectable]:not([selected])) #open-part:hover+#select-border{opacity:0}:host([selectable][selected]) #open-part:hover+#select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border::after{animation:not-selected--hover 1.2s infinite}@keyframes not-selected--hover{0%,100%{opacity:.66}50%{opacity:1}}:host([selectable][selected]:hover) #select-border::after{animation:selected--hover 1.4s infinite}@keyframes selected--hover{0%,100%{opacity:1}50%{opacity:.66}}:host([selectable]) #open-part:hover+#select-border::after{animation:none}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}button{font-size:inherit;font-family:inherit;border:0;padding:0;background-color:transparent;text-align:left}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-2,6px) * 4);margin-right:var(--uui-size-2,6px)}#actions-container{opacity:0;transition:opacity 120ms}:host(:hover) #actions-container{opacity:1}:host([border]:not([disabled]):hover){border-color:var(--uui-color-border-emphasis,#a1a1a1)}:host([disabled]) #open-part{cursor:default}:host([border][disabled]){border-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=tag]{flex-grow:1;display:flex;justify-content:flex-end;align-items:center}`],dr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"disabled",2),dr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"error",2),n.UUIRefElement=dr([b("uui-ref")],n.UUIRefElement);var Om=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,Mi=(i,e,t,r)=>{for(var o=r>1?void 0:r?zm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Om(e,t,o),o};n.UUIRefNodeElement=class extends n.UUIRefElement{constructor(){super(...arguments),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}_renderFallbackIcon(){return u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return u`<button type="button" id="open-part" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}</span><div id="info"><div id="name">${this.name}</div>${this.renderDetail()}</div></button><div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions" id="actions-container"></slot>`}},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,p`:host{min-width:250px;padding:calc(var(--uui-size-2,6px) + 1px)}#open-part{align-self:stretch;display:flex;position:relative;align-items:center;cursor:pointer}#icon{font-size:1.2em;margin-left:var(--uui-size-2,6px);margin-right:var(--uui-size-1,3px)}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px)}#name{font-weight:700}#detail{font-size:var(--uui-type-small-size,12px)}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{font-weight:700;text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]) #icon{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #name{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #detail{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],Mi([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),Mi([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),Mi([g()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=Mi([b("uui-ref-node")],n.UUIRefNodeElement);var Am=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,Ks=(i,e,t,r)=>{for(var o=r>1?void 0:r?jm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Am(e,t,o),o};n.UUIRefNodeDataTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDataTypeElement.styles=[...n.UUIRefNodeElement.styles],Ks([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=Ks([b("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var Lm=Object.defineProperty,Tm=Object.getOwnPropertyDescriptor,Xs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Lm(e,t,o),o};n.UUIRefNodeDocumentTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDocumentTypeElement.styles=[...n.UUIRefNodeElement.styles],Xs([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=Xs([b("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var Nm=Object.defineProperty,Mm=Object.getOwnPropertyDescriptor,Dm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nm(e,t,o),o};n.UUIRefNodeFormElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}},n.UUIRefNodeFormElement.styles=[...n.UUIRefNodeElement.styles],n.UUIRefNodeFormElement=Dm([b("uui-ref-node-form")],n.UUIRefNodeFormElement);var Bm=Object.defineProperty,Vm=Object.getOwnPropertyDescriptor,Ys=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Bm(e,t,o),o};n.UUIRefNodeMemberElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeMemberElement.styles=[...n.UUIRefNodeElement.styles],Ys([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=Ys([b("uui-ref-node-member")],n.UUIRefNodeMemberElement);var Hm=Object.defineProperty,Rm=Object.getOwnPropertyDescriptor,pr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Hm(e,t,o),o};n.UUIRefNodePackageElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodePackageElement.styles=[...n.UUIRefNodeElement.styles],pr([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),pr([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=pr([b("uui-ref-node-package")],n.UUIRefNodePackageElement);var Fm=Object.defineProperty,Gm=Object.getOwnPropertyDescriptor,Zs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Fm(e,t,o),o};n.UUIRefNodeUserElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeUserElement.styles=[...n.UUIRefNodeElement.styles],Zs([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=Zs([b("uui-ref-node-user")],n.UUIRefNodeUserElement);var qm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,Qs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&qm(e,t,o),o};n.UUIScrollContainerElement=class extends m{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return u`<slot></slot>`}},n.UUIScrollContainerElement.styles=[p`:host{display:block;scrollbar-width:thin;scrollbar-color:var(--uui-color-disabled-contrast,#c4c4c4) var(--uui-color-surface,#fff);overflow-y:auto}:host([enforce-scroll]){overflow-y:scroll}:host::-webkit-scrollbar{width:6px;height:6px}:host::-webkit-scrollbar-track{background:var(--uui-color-surface,#fff);border-radius:3px}:host::-webkit-scrollbar-thumb{background-color:var(--uui-color-disabled-contrast,#c4c4c4);border-radius:3px}`],Qs([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=Qs([b("uui-scroll-container")],n.UUIScrollContainerElement);var Km=Object.defineProperty,Js=Object.getOwnPropertySymbols,Xm=Object.prototype.hasOwnProperty,Ym=Object.prototype.propertyIsEnumerable,el=(i,e,t)=>e in i?Km(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,tl=(i,e)=>{for(var t in e||(e={}))Xm.call(e,t)&&el(i,t,e[t]);if(Js)for(var t of Js(e))Ym.call(e,t)&&el(i,t,e[t]);return i};let Di=class extends P{constructor(e,t={}){super(e,tl(tl({},{bubbles:!0}),t))}};Di.CHANGE="change";var Zm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,ue=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Zm(e,t,o),o};n.UUISelectElement=class extends ie(m){constructor(){super(),this.placeholder="",this.disabled=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}focus(){this._input.focus()}click(){this._input.click()}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const t=this.options.find(r=>r.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new Di(Di.CHANGE,{bubbles:!0,composed:!1}))}getFormElement(){return this._input}_renderOption(e,t,r,o){return u`<option value="${t}" ?selected="${r}" ?disabled="${o}">${e}</option>`}_renderGrouped(){return this._groups.length===0?U:u`${this._groups.map(e=>u`<optgroup label="${e}" ?disabled="${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}">${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}</optgroup>`)}`}render(){return u`<select id="native" aria-label="${this.label}" @change="${this.setValue}" ?disabled="${this.disabled}" .name="${this.name}" .value="${this.value}"><option disabled="disabled" selected="selected" value="" hidden>${this.placeholder}</option>${this._renderGrouped()} ${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}</select>`}},n.UUISelectElement.styles=[p`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,var(--uui-size-5,15px));height:var(--uui-select-height,var(--uui-size-11,33px));padding:var(--uui-select-padding-y,var(--uui-size-1,3px)) var(--uui-select-padding-x,var(--uui-size-2,6px));color:currentColor;box-sizing:border-box;border-radius:0;border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease}#native:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-select-outline-color,var(--uui-color-focus,#3879ff))}#native[disabled]{cursor:not-allowed;background-color:var(--uui-select-disabled-background-color,var(--uui-color-disabled,#f3f3f5))}#native:hover{border:1px solid var(--uui-select-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1))}option:checked{background:var(--uui-select-selected-option-background-color,var(--uui-color-selected,#3544b1));color:var(--uui-select-selected-option-color,var(--uui-color-selected-contrast,#fff))}#caret{position:absolute;right:12px;top:50%;transform:translateY(-50%)}:host([error]) #native{border:1px solid var(--uui-color-danger-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],ue([l({type:String})],n.UUISelectElement.prototype,"label",2),ue([l()],n.UUISelectElement.prototype,"placeholder",2),ue([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),ue([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),ue([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),ue([g()],n.UUISelectElement.prototype,"_groups",2),ue([l()],n.UUISelectElement.prototype,"disabledGroups",2),ue([g()],n.UUISelectElement.prototype,"_disabledGroups",2),ue([C("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=ue([b("uui-select")],n.UUISelectElement);const Jm=p`
|
|
817
820
|
input[type='range'] {
|
|
818
821
|
left: 0;
|
|
819
822
|
position: absolute;
|
|
@@ -920,15 +923,15 @@
|
|
|
920
923
|
input[type='range']:focus::-ms-fill-upper {
|
|
921
924
|
background: transparent;
|
|
922
925
|
}
|
|
923
|
-
`;var
|
|
924
|
-
${i.map(t=>{if(e>=
|
|
925
|
-
`,
|
|
926
|
+
`;var ev=Object.defineProperty,il=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,iv=Object.prototype.propertyIsEnumerable,ol=(i,e,t)=>e in i?ev(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,rl=(i,e)=>{for(var t in e||(e={}))tv.call(e,t)&&ol(i,t,e[t]);if(il)for(var t of il(e))iv.call(e,t)&&ol(i,t,e[t]);return i};let qe=class extends P{constructor(e,t={}){super(e,rl(rl({},{bubbles:!0}),t))}};qe.INPUT="input",qe.CHANGE="change";var ov=Object.defineProperty,rv=Object.getOwnPropertyDescriptor,q=(i,e,t,r)=>{for(var o=r>1?void 0:r?rv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ov(e,t,o),o};const Ft=12,nl=24,nv=(i,e)=>w`
|
|
927
|
+
${i.map(t=>{if(e>=nl){const r=Math.round(Ft+e*i.indexOf(t));return w`<circle class="track-step" cx="${r}" cy="50%" r="4.5" />`}return w``})}
|
|
928
|
+
`,av=(i,e,t)=>t?U:u`<div id="step-values">
|
|
926
929
|
${i.map(r=>u` <span
|
|
927
930
|
><span>
|
|
928
|
-
${i.length<=20&&e>=
|
|
931
|
+
${i.length<=20&&e>=nl?r.toFixed(0):U}
|
|
929
932
|
</span></span
|
|
930
933
|
>`)}
|
|
931
|
-
</div
|
|
934
|
+
</div>`,sv=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t);n.UUISliderElement=class extends ie(m){constructor(){super(),this.hideStepValues=!1,this.min=0,this.max=100,this.step=1,this.disabled=!1,this._stepWidth=0,this.onWindowResize=()=>{this._stepWidth=this._calculateStepWidth()},this._steps=[],this._sliderPosition="0%",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){if(e instanceof File)return;const t=this._value;let r=e?parseFloat(e):0;r=Math.min(Math.max(r,this.min),this.max),this.step>0&&(r=Math.round(r/this.step)*this.step),this._value=r.toString(),this._calculateSliderPosition(),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",t)}focus(){this._input.focus()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.label||console.warn(this.tagName+" needs a `label`",this)}disconnectedCallback(){window.removeEventListener("resize",this.onWindowResize),super.disconnectedCallback()}firstUpdated(){this._calculateSliderPosition(),this._updateSteps()}updated(e){super.updated(e),(e.get("max")||e.get("min")||e.get("step"))&&(this.value=this.value,this._updateSteps())}_updateSteps(){this._steps=sv(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-Ft*2)/(this._steps.length-1)}_onKeypress(e){e.key=="Enter"&&this.submit()}_calculateSliderPosition(){const e=(parseFloat(this._value||"0")-this.min)/(this.max-this.min);this._sliderPosition=`${Math.floor(e*1e5)/1e3}%`}_onInput(e){e.stopPropagation(),this.value=this._input.value,this.dispatchEvent(new qe(qe.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new qe(qe.CHANGE))}render(){return u`
|
|
932
935
|
<input
|
|
933
936
|
id="input"
|
|
934
937
|
type="range"
|
|
@@ -943,17 +946,17 @@
|
|
|
943
946
|
<div id="track" aria-hidden="true">
|
|
944
947
|
<svg height="100%" width="100%">
|
|
945
948
|
<rect x="9" y="9" height="3" rx="2" />
|
|
946
|
-
${
|
|
949
|
+
${nv(this._steps,this._stepWidth)}
|
|
947
950
|
</svg>
|
|
948
951
|
|
|
949
952
|
<div id="track-inner" aria-hidden="true">
|
|
950
|
-
<div id="thumb" style=${
|
|
953
|
+
<div id="thumb" style=${re({left:this._sliderPosition})}>
|
|
951
954
|
<div id="thumb-label">${this.value}</div>
|
|
952
955
|
</div>
|
|
953
956
|
</div>
|
|
954
957
|
</div>
|
|
955
|
-
${
|
|
956
|
-
`}},n.UUISliderElement.formAssociated=!0,n.UUISliderElement.styles=[
|
|
958
|
+
${av(this._steps,this._stepWidth,this.hideStepValues)}
|
|
959
|
+
`}},n.UUISliderElement.formAssociated=!0,n.UUISliderElement.styles=[Qc,Jm,p`
|
|
957
960
|
:host {
|
|
958
961
|
display: inline-block;
|
|
959
962
|
width: 100%;
|
|
@@ -1001,8 +1004,8 @@
|
|
|
1001
1004
|
|
|
1002
1005
|
#track-inner {
|
|
1003
1006
|
position: absolute;
|
|
1004
|
-
left: ${
|
|
1005
|
-
right: ${
|
|
1007
|
+
left: ${Ft}px; /* Match TRACK_MARGIN */
|
|
1008
|
+
right: ${Ft}px; /* Match TRACK_MARGIN */
|
|
1006
1009
|
}
|
|
1007
1010
|
|
|
1008
1011
|
#thumb {
|
|
@@ -1061,7 +1064,7 @@
|
|
|
1061
1064
|
}
|
|
1062
1065
|
|
|
1063
1066
|
#step-values {
|
|
1064
|
-
margin: 0 ${
|
|
1067
|
+
margin: 0 ${Ft}px; /* Match TRACK_MARGIN */
|
|
1065
1068
|
margin-top: 6px;
|
|
1066
1069
|
display: flex;
|
|
1067
1070
|
align-items: flex-end;
|
|
@@ -1092,8 +1095,14 @@
|
|
|
1092
1095
|
:host(:not([pristine]):invalid) #thumb:after {
|
|
1093
1096
|
background-color: var(--uui-color-danger,#d42054);
|
|
1094
1097
|
}
|
|
1095
|
-
`],R([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",2),R([l({type:Number})],n.UUISliderElement.prototype,"min",2),R([l({type:Number})],n.UUISliderElement.prototype,"max",2),R([l({type:Number})],n.UUISliderElement.prototype,"step",2),R([l({type:String})],n.UUISliderElement.prototype,"value",1),R([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),R([l({type:String})],n.UUISliderElement.prototype,"label",2),R([C("#input")],n.UUISliderElement.prototype,"_input",2),R([C("#track")],n.UUISliderElement.prototype,"_track",2),R([f()],n.UUISliderElement.prototype,"_stepWidth",2),R([f()],n.UUISliderElement.prototype,"_steps",2),R([f()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=R([b("uui-slider")],n.UUISliderElement);var Um=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,Ss=(i,e,t,r)=>{for(var o=r>1?void 0:r?Em(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Um(e,t,o),o};n.UUISymbolExpandElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolExpandElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform:rotate(-90deg);transform-origin:50% 50%;transition:transform 120ms ease-in-out;width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],Ss([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=Ss([b("uui-symbol-expand")],n.UUISymbolExpandElement);var km=Object.defineProperty,xm=Object.getOwnPropertyDescriptor,Os=(i,e,t,r)=>{for(var o=r>1?void 0:r?xm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&km(e,t,o),o};n.UUISymbolFileDropzoneElement=class extends m{constructor(){super(...arguments),this.error=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="upload-icon"><path d="${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"}"/></svg>`}},n.UUISymbolFileDropzoneElement.styles=[p`:host{display:flex;flex-direction:column;align-items:center;justify-content:center}#upload-icon{fill:var(--uui-color-default,#1b264f);width:100px;transition:fill .3s ease;position:relative;z-index:2}:host([error]) #upload-icon{fill:var(--uui-color-danger,#d42054)}`],Os([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=Os([b("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);var Im=Object.defineProperty,Cm=Object.getOwnPropertyDescriptor,Bo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Im(e,t,o),o};n.UUISymbolFileThumbnailElement=class extends m{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),w(this,"uui-icon")}render(){return this.src?u`<img src="${this.src}" alt="${this.alt}">`:u`<uui-icon name="picture" .fallback="${Oc.strings[0]}"></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[p`:host{display:block;width:100%;height:100%}img{object-fit:contain;height:100%;width:100%}uui-icon{width:100%;height:100%;max-width:100%;display:flex;max-height:100%;justify-content:center;color:var(--uui-color-surface,#fff);background:var(--uui-color-surface-alt,#f3f3f5)}`],Bo([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),Bo([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=Bo([b("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var Pm=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,zs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Pm(e,t,o),o};n.UUISymbolLockElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return _`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?_`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:_`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}</svg>`}},n.UUISymbolLockElement.styles=[p`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],zs([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=zs([b("uui-symbol-lock")],n.UUISymbolLockElement);var Om=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,Am=(i,e,t,r)=>{for(var o=r>1?void 0:r?zm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Om(e,t,o),o};n.UUISymbolMoreElement=class extends m{render(){return u`•••`}},n.UUISymbolMoreElement.styles=[p`:host{display:inline-block;font-size:.8em;vertical-align:top;margin-top:.27em;line-height:1em;user-select:none}`],n.UUISymbolMoreElement=Am([b("uui-symbol-more")],n.UUISymbolMoreElement);var Lm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,As=(i,e,t,r)=>{for(var o=r>1?void 0:r?jm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Lm(e,t,o),o};n.UUISymbolSortElement=class extends xt(m){constructor(){super(...arguments),this.descending=!1}render(){return u`<svg id="up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolSortElement.styles=[p`:host{position:relative;display:inline-block;width:.8em;height:1em;vertical-align:middle;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.8em;fill:currentColor;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-.5em}#up{transform:rotate(180deg);margin-top:-.7em}#down{margin-top:-.3em}:host([active]) #up{margin-top:calc(-.5em - (.2em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.5em + (.2em * var(--uui-symbol-sort-hover,0)))}:host(:hover){--uui-symbol-sort-hover:1}:host(:not([active])) #down,:host(:not([active])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active]:not([descending])) #down{opacity:1}:host([active]:not([descending])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active][descending]) #up{opacity:1}:host([active][descending]) #down{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}`],As([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=As([b("uui-symbol-sort")],n.UUISymbolSortElement);var Tm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,Mm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Tm(e,t,o),o};n.UUITableElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return u`<slot></slot>`}},n.UUITableElement.styles=[p`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],n.UUITableElement=Mm([b("uui-table")],n.UUITableElement);var Dm=Object.defineProperty,Bm=Object.getOwnPropertyDescriptor,Ui=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Dm(e,t,o),o};n.UUITableCellElement=class extends m{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return u`<slot @slotchange="${this._detectOverflow}"></slot>`}},n.UUITableCellElement.styles=[p`:host{position:relative;display:table-cell;height:var(--uui-table-cell-height,var(--uui-size-12,36px));padding:var(--uui-table-cell-padding,var(--uui-size-4,12px) var(--uui-size-5,15px));border-top:1px solid var(--uui-color-border,#d8d7d9);vertical-align:middle}:host([clip-text]){max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}:host([disable-child-interaction]) ::slotted(*){pointer-events:none}:host([disable-child-interaction])::after{content:'';position:absolute;inset:0}:host([no-padding]){padding:0}`],Ui([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),Ui([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),Ui([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=Ui([b("uui-table-cell")],n.UUITableCellElement);var Vm=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,Rm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Vm(e,t,o),o};n.UUITableColumnElement=class extends m{},n.UUITableColumnElement.styles=[p`:host{display:table-column}`],n.UUITableColumnElement=Rm([b("uui-table-column")],n.UUITableColumnElement);var Fm=Object.defineProperty,Gm=Object.getOwnPropertyDescriptor,qm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Fm(e,t,o),o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,p`:host{border-top:none}`],n.UUITableHeadCellElement=qm([b("uui-table-head-cell")],n.UUITableHeadCellElement);var Wm=Object.defineProperty,Km=Object.getOwnPropertyDescriptor,Xm=(i,e,t,r)=>{for(var o=r>1?void 0:r?Km(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Wm(e,t,o),o};n.UUITableHeadElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return u`<slot></slot>`}},n.UUITableHeadElement.styles=[p`:host{display:table-header-group;font-weight:700}`],n.UUITableHeadElement=Xm([b("uui-table-head")],n.UUITableHeadElement);var Ym=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,Ls=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ym(e,t,o),o};n.UUITableRowElement=class extends Wt(Ze(m)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{this.elementIsTableCell(e)&&(e.disableChildInteraction=this.selectOnly)})}elementIsTableCell(e){return e instanceof n.UUITableCellElement}render(){return u`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}},n.UUITableRowElement.styles=[p`:host{display:table-row;position:relative;outline-offset:-3px}:host([selectable]){cursor:pointer}:host(:focus){outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host([selected]){outline:2px solid var(--uui-table-row-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:focus){outline-color:var(--uui-color-focus,#3879ff)}`],Ls([Ue({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=Ls([b("uui-table-row")],n.UUITableRowElement);var Qm=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,Mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jm(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Qm(e,t,o),o};n.UUITabElement=class extends xt(Q("",m)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?u`<a id="button" href="${x(this.disabled?void 0:this.href)}" target="${x(this.target||void 0)}" rel="${x(this.target==="_blank"?"noopener noreferrer":void 0)}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button type="button" id="button" ?disabled="${this.disabled}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUITabElement.styles=[p`:host{color:var(--uui-tab-text,var(--uui-color-interactive,#1b264f));font-family:inherit;width:fit-content}#button{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-height:var(--uui-size-12,36px);min-width:70px;padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px));border:none;font-size:inherit;background:0 0;color:inherit;cursor:pointer;font-family:inherit;text-decoration:none;line-height:normal}:host([orientation=vertical]) #button{min-height:var(--uui-size-14,42px);padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px))}:host(:not([active]):not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([active]):not([disabled])) #button:active{box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}:host([active]) #button{cursor:default}:host([disabled]) #button{color:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button::before{content:'';position:absolute;background-color:var(--uui-color-current,#f5c1bc);opacity:0;--transitionDuration:120ms;--barWidth:4px;--borderRadius:3px}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--borderRadius) var(--borderRadius) 0 0;height:0;width:calc(100% - 15px);bottom:0;transition:opacity ease-in-out var(--transitionDuration),height ease-in-out var(--transitionDuration)}:host([active][orientation=horizontal]) #button::before{height:var(--barWidth)}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--borderRadius) var(--borderRadius) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity ease-in-out var(--transitionDuration),width ease-in-out var(--transitionDuration)}:host([active][orientation=vertical]) #button::before{width:var(--barWidth)}#button:hover::before{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #button::before{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=icon]::slotted(*){font-size:20px;margin-bottom:var(--uui-size-2,6px)}slot.label{text-align:center;display:flex;width:100%;flex-direction:column}:host([orientation=vertical]) slot.label{text-align:left}`],Mt([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),Mt([l({type:String})],n.UUITabElement.prototype,"href",2),Mt([l({type:String})],n.UUITabElement.prototype,"target",2),Mt([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=Mt([b("uui-tab")],n.UUITabElement);var ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,Ei=(i,e,t,r)=>{for(var o=r>1?void 0:r?tv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ev(e,t,o),o},Vo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},I=(i,e,t)=>(Vo(i,e,"read from private field"),t?t.call(i):e.get(i)),F=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ho=(i,e,t,r)=>(Vo(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Ie=(i,e,t)=>(Vo(i,e,"access private method"),t),fe,ye,gt,ae,ki,xi,Ro,js,Fo,Ts,ft,Ii,Go,qo,Ns,Wo,Ms,Ci,Ko;n.UUITabGroupElement=class extends m{constructor(){super(...arguments),F(this,Ro),F(this,Fo),F(this,Ii),F(this,qo),F(this,Wo),F(this,Ci),this.dropdownContentDirection="vertical",F(this,fe,[]),F(this,ye,[]),F(this,gt,new Map),F(this,ae,[]),F(this,ki,0),F(this,xi,new ResizeObserver(Ie(this,Ro,js).bind(this))),F(this,ft,e=>{const t=e.currentTarget;if(Ie(this,Ci,Ko).call(this,t)){t.active=!0;const r=I(this,gt).get(t);r&&(r.active=!0),[...I(this,fe),...I(this,ye)].filter(o=>o!==t&&o!==r).forEach(o=>{Ie(this,Ci,Ko).call(this,o)&&(o.active=!1)}),I(this,ye).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),I(this,xi).observe(this),this.hasAttribute("role")||this.setAttribute("role","tablist")}disconnectedCallback(){super.disconnectedCallback(),I(this,xi).unobserve(this)}render(){return u`<slot @slotchange="${Ie(this,Fo,Ts)}"></slot><uui-button popovertarget="popover-container" style="display:none" id="more-button" label="More" compact="compact"><uui-symbol-more></uui-symbol-more></uui-button><uui-popover-container id="popover-container" popover margin="10" placement="bottom-end"><div id="hidden-tabs-container">${bo(I(this,ye),e=>u`${e}`)}</div></uui-popover-container>`}},fe=new WeakMap,ye=new WeakMap,gt=new WeakMap,ae=new WeakMap,ki=new WeakMap,xi=new WeakMap,Ro=new WeakSet,js=function(i){Ie(this,Ii,Go).call(this,i[0].contentBoxSize[0].inlineSize)},Fo=new WeakSet,Ts=function(){I(this,fe).forEach(i=>{i.removeEventListener("click",I(this,ft))}),Ie(this,Wo,Ms).call(this),I(this,fe).forEach(i=>{i.addEventListener("click",I(this,ft))})},ft=new WeakMap,Ii=new WeakSet,Go=function(i){const e=this._moreButtonElement.offsetWidth;if(I(this,ae).slice(-1)[0]<i&&I(this,ye).length===0)return;let t=Number.MAX_VALUE;for(let o=I(this,ae).length-1;o>-1;o--){const a=I(this,ae)[o],s=i-(o!==I(this,ae).length-1?e:0);if(a<s){t=o;break}}if(t===I(this,ki))return;Ho(this,ki,t),I(this,ye).forEach(o=>{o.removeEventListener("click",I(this,ft))}),Ho(this,ye,[]),I(this,gt).clear();let r=!1;for(let o=0;o<I(this,ae).length;o++){const a=I(this,ae)[o],s=I(this,fe)[o],h=i-(o!==I(this,ae).length-1?e:0);if(a<h)s.style.display="",this._moreButtonElement.style.display="none";else{const c=s.cloneNode(!0);c.addEventListener("click",I(this,ft)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,I(this,gt).set(c,s),I(this,gt).set(s,c),I(this,ye).push(c),s.style.display="none",this._moreButtonElement.style.display="",s.active&&(r=!0)}}r?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},qo=new WeakSet,Ns=function(){let i=0;for(let e=0;e<I(this,fe).length;e++)i+=I(this,fe)[e].offsetWidth,I(this,ae)[e]=i;Ie(this,Ii,Go).call(this,this.offsetWidth)},Wo=new WeakSet,Ms=function(){Ho(this,fe,this._slottedNodes?this._slottedNodes:[]),Ie(this,qo,Ns).call(this)},Ci=new WeakSet,Ko=function(i){return i instanceof n.UUITabElement||"active"in i},n.UUITabGroupElement.styles=[p`:host{display:flex;flex-wrap:wrap;color:var(--uui-tab-text);background:var(--uui-tab-background,none);height:100%;min-height:48px}::slotted(:not(:last-of-type)){border-right:1px solid var(--uui-tab-divider,none)}.hidden-tab{width:100%}#hidden-tabs-container{width:fit-content;display:flex;flex-direction:column;background:var(--uui-color-surface,#fff);border-radius:var(--uui-border-radius,3px);box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23));overflow:hidden}:host([dropdown-direction=horizontal]) #hidden-tabs-container{flex-direction:row}#more-button{margin-left:auto;position:relative}#more-button::before{content:'';position:absolute;bottom:0;width:100%;background-color:var(--uui-color-current,#f5c1bc);height:0;border-radius:3px 3px 0 0;opacity:0;transition:opacity ease-in 120ms,height ease-in 120ms}#more-button.active-inside::before{opacity:1;height:4px;transition:opacity 120ms,height ease-out 120ms}`],Ei([C("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),Ei([Ue({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),Ei([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=Ei([b("uui-tab-group")],n.UUITabGroupElement);class iv extends P{}class ov extends P{}var rv=Object.defineProperty,nv=Object.getOwnPropertyDescriptor,Xo=(i,e,t,r)=>{for(var o=r>1?void 0:r?nv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rv(e,t,o),o};n.UUITagElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return u`<slot></slot>`}},n.UUITagElement.styles=[p`:host{display:inline-block;font-size:var(--uui-tag-font-size,var(--uui-type-small-size,12px));font-weight:700;line-height:1;padding:var(--uui-size-space-1,3px) calc(var(--uui-size-space-1,3px) + .5em);border-radius:100px;user-select:none;border-radius:var(--uui-size-4,12px);border:1px solid transparent}slot{display:flex;align-items:center;justify-content:center;margin:2px}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:transparent;color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:transparent;color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}`],Xo([l({reflect:!0})],n.UUITagElement.prototype,"color",2),Xo([l({reflect:!0})],n.UUITagElement.prototype,"look",2),n.UUITagElement=Xo([b("uui-tag")],n.UUITagElement);var av=Object.defineProperty,Ds=Object.getOwnPropertySymbols,sv=Object.prototype.hasOwnProperty,lv=Object.prototype.propertyIsEnumerable,Bs=(i,e,t)=>e in i?av(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Vs=(i,e)=>{for(var t in e||(e={}))sv.call(e,t)&&Bs(i,t,e[t]);if(Ds)for(var t of Ds(e))lv.call(e,t)&&Bs(i,t,e[t]);return i};class Dt extends P{constructor(e,t={}){super(e,Vs(Vs({},{bubbles:!0}),t))}}Dt.CHANGE="change",Dt.INPUT="input";var uv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,N=(i,e,t,r)=>{for(var o=r>1?void 0:r?cv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&uv(e,t,o),o};n.UUITextareaElement=class extends J(m){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.autoHeight=!1,this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&this._value.length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&this._value.length>this.maxlength)}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this),this.autoHeight&&requestAnimationFrame(()=>{this.autoUpdateHeight()})}focus(){var e;(e=this._textarea)==null||e.focus()}getFormElement(){return this._textarea}onInput(e){this.value=e.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Dt(Dt.CHANGE))}autoUpdateHeight(){const e=this.shadowRoot.host,t=this._textarea,r=e.scrollTop,o=getComputedStyle(e).height;e.style.display="block",e.style.height=o,t.style.height="auto",t.scrollHeight+2>t.clientHeight?t.style.height=t.scrollHeight+2+"px":t.scrollHeight+2<t.clientHeight&&t.style.removeProperty("height"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=r}render(){return u`<textarea id="textarea" rows="${x(this.rows)}" cols="${x(this.cols)}" .value="${this.value}" .name="${this.name}" wrap="${x(this.wrap)}" placeholder="${this.placeholder}" aria-label="${this.label}" .disabled="${this.disabled}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">
|
|
1096
|
-
|
|
1098
|
+
`],q([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",2),q([l({type:Number})],n.UUISliderElement.prototype,"min",2),q([l({type:Number})],n.UUISliderElement.prototype,"max",2),q([l({type:Number})],n.UUISliderElement.prototype,"step",2),q([l({type:String})],n.UUISliderElement.prototype,"value",1),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),q([l({type:String})],n.UUISliderElement.prototype,"label",2),q([C("#input")],n.UUISliderElement.prototype,"_input",2),q([C("#track")],n.UUISliderElement.prototype,"_track",2),q([g()],n.UUISliderElement.prototype,"_stepWidth",2),q([g()],n.UUISliderElement.prototype,"_steps",2),q([g()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=q([b("uui-slider")],n.UUISliderElement);var lv=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,al=(i,e,t,r)=>{for(var o=r>1?void 0:r?uv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&lv(e,t,o),o};n.UUISymbolExpandElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolExpandElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform:rotate(-90deg);transform-origin:50% 50%;transition:transform 120ms ease-in-out;width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],al([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=al([b("uui-symbol-expand")],n.UUISymbolExpandElement);var cv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,sl=(i,e,t,r)=>{for(var o=r>1?void 0:r?hv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&cv(e,t,o),o};n.UUISymbolFileDropzoneElement=class extends m{constructor(){super(...arguments),this.error=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="upload-icon"><path d="${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"}"/></svg>`}},n.UUISymbolFileDropzoneElement.styles=[p`:host{display:flex;flex-direction:column;align-items:center;justify-content:center}#upload-icon{fill:var(--uui-color-default,#1b264f);width:100px;transition:fill .3s ease;position:relative;z-index:2}:host([error]) #upload-icon{fill:var(--uui-color-danger,#d42054)}`],sl([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=sl([b("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);var dv=Object.defineProperty,pv=Object.getOwnPropertyDescriptor,br=(i,e,t,r)=>{for(var o=r>1?void 0:r?pv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&dv(e,t,o),o};n.UUISymbolFileThumbnailElement=class extends m{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}render(){return this.src?u`<img src="${this.src}" alt="${this.alt}">`:u`<uui-icon name="picture" .fallback="${ch.strings[0]}"></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[p`:host{display:block;width:100%;height:100%}img{object-fit:contain;height:100%;width:100%}uui-icon{width:100%;height:100%;max-width:100%;display:flex;max-height:100%;justify-content:center;color:var(--uui-color-surface,#fff);background:var(--uui-color-surface-alt,#f3f3f5)}`],br([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),br([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=br([b("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var bv=Object.defineProperty,mv=Object.getOwnPropertyDescriptor,ll=(i,e,t,r)=>{for(var o=r>1?void 0:r?mv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&bv(e,t,o),o};n.UUISymbolLockElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?w`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:w`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}</svg>`}},n.UUISymbolLockElement.styles=[p`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],ll([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=ll([b("uui-symbol-lock")],n.UUISymbolLockElement);var vv=Object.defineProperty,gv=Object.getOwnPropertyDescriptor,fv=(i,e,t,r)=>{for(var o=r>1?void 0:r?gv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&vv(e,t,o),o};n.UUISymbolMoreElement=class extends m{render(){return u`•••`}},n.UUISymbolMoreElement.styles=[p`:host{display:inline-block;font-size:.8em;vertical-align:top;margin-top:.27em;line-height:1em;user-select:none}`],n.UUISymbolMoreElement=fv([b("uui-symbol-more")],n.UUISymbolMoreElement);var yv=Object.defineProperty,wv=Object.getOwnPropertyDescriptor,ul=(i,e,t,r)=>{for(var o=r>1?void 0:r?wv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&yv(e,t,o),o};n.UUISymbolSortElement=class extends Ot(m){constructor(){super(...arguments),this.descending=!1}render(){return u`<svg id="up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolSortElement.styles=[p`:host{position:relative;display:inline-block;width:.8em;height:1em;vertical-align:middle;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.8em;fill:currentColor;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-.5em}#up{transform:rotate(180deg);margin-top:-.7em}#down{margin-top:-.3em}:host([active]) #up{margin-top:calc(-.5em - (.2em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.5em + (.2em * var(--uui-symbol-sort-hover,0)))}:host(:hover){--uui-symbol-sort-hover:1}:host(:not([active])) #down,:host(:not([active])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active]:not([descending])) #down{opacity:1}:host([active]:not([descending])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active][descending]) #up{opacity:1}:host([active][descending]) #down{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}`],ul([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=ul([b("uui-symbol-sort")],n.UUISymbolSortElement);var _v=Object.defineProperty,$v=Object.getOwnPropertyDescriptor,Uv=(i,e,t,r)=>{for(var o=r>1?void 0:r?$v(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_v(e,t,o),o};n.UUITableElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return u`<slot></slot>`}},n.UUITableElement.styles=[p`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],n.UUITableElement=Uv([b("uui-table")],n.UUITableElement);var Ev=Object.defineProperty,kv=Object.getOwnPropertyDescriptor,Bi=(i,e,t,r)=>{for(var o=r>1?void 0:r?kv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ev(e,t,o),o};n.UUITableCellElement=class extends m{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return u`<slot @slotchange="${this._detectOverflow}"></slot>`}},n.UUITableCellElement.styles=[p`:host{position:relative;display:table-cell;height:var(--uui-table-cell-height,var(--uui-size-12,36px));padding:var(--uui-table-cell-padding,var(--uui-size-4,12px) var(--uui-size-5,15px));border-top:1px solid var(--uui-color-border,#d8d7d9);vertical-align:middle}:host([clip-text]){max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}:host([disable-child-interaction]) ::slotted(*){pointer-events:none}:host([disable-child-interaction])::after{content:'';position:absolute;inset:0}:host([no-padding]){padding:0}`],Bi([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),Bi([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),Bi([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=Bi([b("uui-table-cell")],n.UUITableCellElement);var xv=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,Cv=(i,e,t,r)=>{for(var o=r>1?void 0:r?Iv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&xv(e,t,o),o};n.UUITableColumnElement=class extends m{},n.UUITableColumnElement.styles=[p`:host{display:table-column}`],n.UUITableColumnElement=Cv([b("uui-table-column")],n.UUITableColumnElement);var Sv=Object.defineProperty,Pv=Object.getOwnPropertyDescriptor,Ov=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Sv(e,t,o),o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,p`:host{border-top:none}`],n.UUITableHeadCellElement=Ov([b("uui-table-head-cell")],n.UUITableHeadCellElement);var zv=Object.defineProperty,Av=Object.getOwnPropertyDescriptor,jv=(i,e,t,r)=>{for(var o=r>1?void 0:r?Av(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&zv(e,t,o),o};n.UUITableHeadElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return u`<slot></slot>`}},n.UUITableHeadElement.styles=[p`:host{display:table-header-group;font-weight:700}`],n.UUITableHeadElement=jv([b("uui-table-head")],n.UUITableHeadElement);var Lv=Object.defineProperty,Tv=Object.getOwnPropertyDescriptor,cl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Lv(e,t,o),o};n.UUITableRowElement=class extends ti(tt(m)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{this.elementIsTableCell(e)&&(e.disableChildInteraction=this.selectOnly)})}elementIsTableCell(e){return e instanceof n.UUITableCellElement}render(){return u`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}},n.UUITableRowElement.styles=[p`:host{display:table-row;position:relative;outline-offset:-3px}:host([selectable]){cursor:pointer}:host(:focus){outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host([selected]){outline:2px solid var(--uui-table-row-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:focus){outline-color:var(--uui-color-focus,#3879ff)}`],cl([ke({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=cl([b("uui-table-row")],n.UUITableRowElement);var Nv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,Gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nv(e,t,o),o};n.UUITabElement=class extends Ot(te("",m)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?u`<a id="button" href="${I(this.disabled?void 0:this.href)}" target="${I(this.target||void 0)}" rel="${I(this.target==="_blank"?"noopener noreferrer":void 0)}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button type="button" id="button" ?disabled="${this.disabled}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUITabElement.styles=[p`:host{color:var(--uui-tab-text,var(--uui-color-interactive,#1b264f));font-family:inherit;width:fit-content}#button{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-height:var(--uui-size-12,36px);min-width:70px;padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px));border:none;font-size:inherit;background:0 0;color:inherit;cursor:pointer;font-family:inherit;text-decoration:none;line-height:normal}:host([orientation=vertical]) #button{min-height:var(--uui-size-14,42px);padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px))}:host(:not([active]):not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([active]):not([disabled])) #button:active{box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}:host([active]){color:var(--uui-tab-text-active,unset)}:host([active]) #button{cursor:default}:host([disabled]) #button{color:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button::before{content:'';position:absolute;background-color:var(--uui-color-current,#f5c1bc);opacity:0;--transitionDuration:120ms;--barWidth:4px;--borderRadius:3px}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--borderRadius) var(--borderRadius) 0 0;height:0;width:calc(100% - 15px);bottom:0;transition:opacity ease-in-out var(--transitionDuration),height ease-in-out var(--transitionDuration)}:host([active][orientation=horizontal]) #button::before{height:var(--barWidth)}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--borderRadius) var(--borderRadius) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity ease-in-out var(--transitionDuration),width ease-in-out var(--transitionDuration)}:host([active][orientation=vertical]) #button::before{width:var(--barWidth)}#button:hover::before{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #button::before{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=icon]::slotted(*){font-size:20px;margin-bottom:var(--uui-size-2,6px)}slot.label{text-align:center;display:flex;width:100%;flex-direction:column}:host([orientation=vertical]) slot.label{text-align:left}`],Gt([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),Gt([l({type:String})],n.UUITabElement.prototype,"href",2),Gt([l({type:String})],n.UUITabElement.prototype,"target",2),Gt([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=Gt([b("uui-tab")],n.UUITabElement);var Dv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,qt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Dv(e,t,o),o},mr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},S=(i,e,t)=>(mr(i,e,"read from private field"),t?t.call(i):e.get(i)),Y=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},hl=(i,e,t,r)=>(mr(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Pe=(i,e,t)=>(mr(i,e,"access private method"),t),ce,he,$t,We,Vi,vr,dl,gr,pl,Ut,Hi,fr,yr,bl,wr,ml,Ri,_r;n.UUITabGroupElement=class extends m{constructor(){super(...arguments),Y(this,vr),Y(this,gr),Y(this,Hi),Y(this,yr),Y(this,wr),Y(this,Ri),this.dropdownContentDirection="vertical",Y(this,ce,[]),Y(this,he,[]),Y(this,$t,new Map),Y(this,We,[]),Y(this,Vi,new ResizeObserver(Pe(this,vr,dl).bind(this))),Y(this,Ut,e=>{const t=e.currentTarget;if(Pe(this,Ri,_r).call(this,t)){t.active=!0;const r=S(this,$t).get(t);r&&(r.active=!0),[...S(this,ce),...S(this,he)].filter(o=>o!==t&&o!==r).forEach(o=>{Pe(this,Ri,_r).call(this,o)&&(o.active=!1)}),S(this,he).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),S(this,Vi).observe(this),this.hasAttribute("role")||this.setAttribute("role","tablist")}disconnectedCallback(){super.disconnectedCallback(),S(this,Vi).unobserve(this)}render(){return u`<slot @slotchange="${Pe(this,gr,pl)}"></slot><uui-button popovertarget="popover-container" style="display:none" id="more-button" label="More" compact="compact"><uui-symbol-more></uui-symbol-more></uui-button><uui-popover-container id="popover-container" popover placement="bottom-end"><div id="hidden-tabs-container">${Ho(S(this,he),e=>u`${e}`)}</div></uui-popover-container>`}},ce=new WeakMap,he=new WeakMap,$t=new WeakMap,We=new WeakMap,Vi=new WeakMap,vr=new WeakSet,dl=function(i){Pe(this,Hi,fr).call(this,i[0].contentBoxSize[0].inlineSize)},gr=new WeakSet,pl=function(){S(this,ce).forEach(i=>{i.removeEventListener("click",S(this,Ut))}),Pe(this,wr,ml).call(this),S(this,ce).forEach(i=>{i.addEventListener("click",S(this,Ut))})},Ut=new WeakMap,Hi=new WeakSet,fr=function(i){const e=this._moreButtonElement.offsetWidth;if(S(this,We).slice(-1)[0]<i&&S(this,he).length===0)return;S(this,he).forEach(r=>{r.removeEventListener("click",S(this,Ut))}),hl(this,he,[]),S(this,$t).clear();let t=!1;for(let r=0;r<S(this,We).length;r++){const o=S(this,We)[r],a=S(this,ce)[r],s=i-(r!==S(this,We).length-1?e:0);if(o<s)a.style.display="",this._moreButtonElement.style.display="none";else{const c=a.cloneNode(!0);c.addEventListener("click",S(this,Ut)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,S(this,$t).set(c,a),S(this,$t).set(a,c),S(this,he).push(c),a.style.display="none",this._moreButtonElement.style.display="",a.active&&(t=!0)}}S(this,he).length===0&&this._popoverContainerElement.hidePopover(),t?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},yr=new WeakSet,bl=async function(){await this.updateComplete;let i=0;for(let t=0;t<S(this,ce).length;t++)S(this,ce)[t].style.display="",i+=S(this,ce)[t].offsetWidth,S(this,We)[t]=i;const e=2;this.style.width=i+e+"px",Pe(this,Hi,fr).call(this,this.offsetWidth)},wr=new WeakSet,ml=function(){hl(this,ce,this._slottedNodes?this._slottedNodes:[]),Pe(this,yr,bl).call(this)},Ri=new WeakSet,_r=function(i){return i instanceof n.UUITabElement||"active"in i},n.UUITabGroupElement.styles=[p`:host{display:flex;flex-wrap:nowrap;color:var(--uui-tab-text);height:100%;min-height:48px;overflow:hidden;text-wrap:nowrap}#popover-container{--uui-tab-text:var(--uui-tab-group-dropdown-tab-text, unset);--uui-tab-text-hover:var(
|
|
1099
|
+
--uui-tab-group-dropdown-tab-text-hover,
|
|
1100
|
+
unset
|
|
1101
|
+
);--uui-tab-text-active:var(
|
|
1102
|
+
--uui-tab-group-dropdown-tab-text-active,
|
|
1103
|
+
unset
|
|
1104
|
+
)}::slotted(:not(:last-of-type)){border-right:1px solid var(--uui-tab-divider,none)}.hidden-tab{width:100%}#hidden-tabs-container{width:fit-content;display:flex;flex-direction:column;background-color:var(--uui-tab-group-dropdown-background,var(--uui-color-surface,#fff));border-radius:var(--uui-border-radius,3px);box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23));overflow:hidden}:host([dropdown-direction=horizontal]) #hidden-tabs-container{flex-direction:row}#more-button{position:relative;--uui-button-contrast:var(--uui-tab-text);--uui-button-contrast-hover:var(--uui-tab-text-hover);--uui-button-background-color:transparent;--uui-button-background-color-hover:transparent}#more-button::before{content:'';position:absolute;bottom:0;width:100%;background-color:var(--uui-color-current,#f5c1bc);height:0;border-radius:3px 3px 0 0;opacity:0;transition:opacity ease-in 120ms,height ease-in 120ms}#more-button.active-inside::before{opacity:1;height:4px;transition:opacity 120ms,height ease-out 120ms}`],qt([C("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),qt([C("#popover-container")],n.UUITabGroupElement.prototype,"_popoverContainerElement",2),qt([ke({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),qt([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=qt([b("uui-tab-group")],n.UUITabGroupElement);class Vv extends P{}class Hv extends P{}var Rv=Object.defineProperty,Fv=Object.getOwnPropertyDescriptor,$r=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Rv(e,t,o),o};n.UUITagElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return u`<slot></slot>`}},n.UUITagElement.styles=[p`:host{display:inline-block;font-size:var(--uui-tag-font-size,var(--uui-type-small-size,12px));font-weight:700;line-height:1;padding:var(--uui-size-space-1,3px) calc(var(--uui-size-space-1,3px) + .5em);border-radius:100px;user-select:none;border-radius:var(--uui-size-4,12px);border:1px solid transparent}slot{display:flex;align-items:center;justify-content:center;margin:2px}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:transparent;color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:transparent;color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}`],$r([l({reflect:!0})],n.UUITagElement.prototype,"color",2),$r([l({reflect:!0})],n.UUITagElement.prototype,"look",2),n.UUITagElement=$r([b("uui-tag")],n.UUITagElement);var Gv=Object.defineProperty,vl=Object.getOwnPropertySymbols,qv=Object.prototype.hasOwnProperty,Wv=Object.prototype.propertyIsEnumerable,gl=(i,e,t)=>e in i?Gv(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fl=(i,e)=>{for(var t in e||(e={}))qv.call(e,t)&&gl(i,t,e[t]);if(vl)for(var t of vl(e))Wv.call(e,t)&&gl(i,t,e[t]);return i};class Wt extends P{constructor(e,t={}){super(e,fl(fl({},{bubbles:!0}),t))}}Wt.CHANGE="change",Wt.INPUT="input";var Kv=Object.defineProperty,Xv=Object.getOwnPropertyDescriptor,D=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Kv(e,t,o),o};n.UUITextareaElement=class extends ie(m){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.autoHeight=!1,this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&this._value.length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&this._value.length>this.maxlength)}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this),this.autoHeight&&requestAnimationFrame(()=>{this.autoUpdateHeight()})}focus(){var e;(e=this._textarea)==null||e.focus()}getFormElement(){return this._textarea}onInput(e){this.value=e.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Wt(Wt.CHANGE))}autoUpdateHeight(){const e=this.shadowRoot.host,t=this._textarea,r=e.scrollTop,o=getComputedStyle(e).height;e.style.display="block",e.style.height=o,t.style.height="auto",t.scrollHeight+2>t.clientHeight?t.style.height=t.scrollHeight+2+"px":t.scrollHeight+2<t.clientHeight&&t.style.removeProperty("height"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=r}render(){return u`<textarea id="textarea" rows="${I(this.rows)}" cols="${I(this.cols)}" .value="${this.value}" .name="${this.name}" wrap="${I(this.wrap)}" placeholder="${this.placeholder}" aria-label="${this.label}" .disabled="${this.disabled}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">
|
|
1105
|
+
</textarea>`}},n.UUITextareaElement.formAssociated=!0,n.UUITextareaElement.styles=[p`:host{position:relative}:host([error]) textarea{border:1px solid var(--uui-color-danger,#d42054)!important}:host([error]) textarea[disabled]{border:1px solid var(--uui-color-danger,#d42054)!important}:host([auto-height]) textarea{resize:none}.label{display:inline-block;margin-bottom:var(--uui-size-1,3px);font-weight:700}textarea[readonly]{border-color:var(--uui-textarea-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2));background-color:var(--uui-textarea-background-color-readonly,var(--uui-color-disabled,#f3f3f5))}textarea[disabled]{cursor:not-allowed;background-color:var(--uui-textarea-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-textarea-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}textarea{font-family:inherit;line-height:var(--uui-size-6,18px);box-sizing:border-box;min-width:100%;max-width:100%;font-size:inherit;padding:var(--uui-size-2,6px);border:1px solid var(--uui-textarea-border-color,var(--uui-color-border,#d8d7d9));border-radius:0;outline:0;min-height:var(--uui-textarea-min-height);max-height:var(--uui-textarea-max-height);background-color:var(--uui-textarea-background-color,var(--uui-color-surface,#fff))}:host(:focus) textarea,:host(:hover) textarea:not([readonly]):not([disabled]) :host(:focus-within) textarea{border-color:var(--uui-textarea-border-color,var(--uui-color-border-emphasis,#a1a1a1))}textarea::placeholder{transition:opacity 120ms}:host(:not([readonly])) textarea:focus::placeholder{opacity:0}textarea:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}`],D([l()],n.UUITextareaElement.prototype,"placeholder",2),D([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"disabled",2),D([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"readonly",2),D([l({type:String})],n.UUITextareaElement.prototype,"name",2),D([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"error",2),D([l({type:Number})],n.UUITextareaElement.prototype,"minlength",2),D([l({type:String,attribute:"minlength-message"})],n.UUITextareaElement.prototype,"minlengthMessage",2),D([l({type:Number})],n.UUITextareaElement.prototype,"maxlength",2),D([l({type:String,attribute:"maxlength-message"})],n.UUITextareaElement.prototype,"maxlengthMessage",2),D([C("#textarea")],n.UUITextareaElement.prototype,"_textarea",2),D([l({type:Boolean,attribute:"auto-height",reflect:!0})],n.UUITextareaElement.prototype,"autoHeight",2),D([l({type:String})],n.UUITextareaElement.prototype,"label",2),D([l({type:Number})],n.UUITextareaElement.prototype,"rows",2),D([l({type:Number})],n.UUITextareaElement.prototype,"cols",2),D([l({type:String})],n.UUITextareaElement.prototype,"wrap",2),n.UUITextareaElement=D([b("uui-textarea")],n.UUITextareaElement);var Yv=`.uui-text {
|
|
1097
1106
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
1098
1107
|
font-size: 15px;
|
|
1099
1108
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -1261,7 +1270,7 @@
|
|
|
1261
1270
|
margin-top: var(--uui-size-layout-1,24px);
|
|
1262
1271
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
1263
1272
|
}
|
|
1264
|
-
`;const
|
|
1273
|
+
`;const Zv=Z(Yv);class B extends P{}B.OPENING="opening",B.OPENED="opened",B.CLOSING="closing",B.CLOSED="closed";var Qv=Object.defineProperty,Jv=Object.getOwnPropertyDescriptor,Et=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jv(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Qv(e,t,o),o};n.UUIToastNotificationElement=class extends m{constructor(){super(),this.color="",this._autoClose=null,this._onOpenTimerComplete=()=>{this._open&&(this.open=!1)},this._timer=null,this._pauseTimer=!1,this.isOpen=!1,this._open=!1,this._animate=!1,this._requestAnimationUpdate=0,this.addEventListener("keyup",e=>{e.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(e){var t;this._autoClose=e,e!==null?(this._timer===null?this._timer=new nh(this._onOpenTimerComplete,e):this._timer.setDuration(e),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):((t=this._timer)==null||t.destroy(),this._timer=null)}pauseAutoClose(){this._pauseTimer=!0,this._timer!==null&&this._timer.pause()}resumeAutoClose(){this._pauseTimer=!1,this._timer!==null&&this.isOpen===!0&&this._animate===!1&&this._timer.restart()}get open(){return this._open}set open(e){e===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),_(this,"uui-button"),_(this,"uui-icon")}_getAnimationDuration(){return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"),10)||480}_makeOpen(){this._open!==!0&&(this._open=!0,this.updateComplete.then(()=>{this._open===!0&&(cancelAnimationFrame(this._requestAnimationUpdate),this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!0,this.setAttribute("is-open",""),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,this.dispatchEvent(new B(B.OPENING)),this._animationTimeout=window.setTimeout(()=>{var e;this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&((e=this._timer)==null||e.start()),this.dispatchEvent(new B(B.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){var e;if(this._open===!1)return;const t=new B(B.CLOSING,{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented!==!0&&(this._open=!1,(e=this._timer)==null||e.pause(),cancelAnimationFrame(this._requestAnimationUpdate),this.isOpen===!0&&(this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!1,this.removeAttribute("is-open"),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,requestAnimationFrame(()=>{this.style.height="0"}),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!1&&(this._animate=!1,this.dispatchEvent(new B(B.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return u`<div id="toast" class="${this._animate?"animate":""}"><div><div id="close"><uui-button .label="${"close"}" .color="${this.color}" .look="${this.color?"primary":"default"}" @click="${()=>this.open=!1}"><uui-icon name="remove" .fallback="${ho.strings[0]}"></uui-icon></uui-button></div><slot></slot></div></div>`}},n.UUIToastNotificationElement.styles=[Zv,p`:host{--uui-toast-notification-margin:var(--uui-size-space-2,6px);position:relative;display:block;width:100%;max-width:400px;margin:0 var(--uui-toast-notification-margin);box-sizing:border-box;height:0;pointer-events:none;transition:height var(--uui-toast-notification-animation-duration,480ms) ease-in-out}:host([is-open]){pointer-events:all;transition-timing-function:cubic-bezier(.19,1,.22,1)}#toast{position:relative;display:block;padding:calc(var(--uui-toast-notification-margin) * .5) 0;width:100%;max-width:400px}#toast.animate{position:absolute}#toast>div{position:relative;display:block;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));background-color:var(--uui-color-surface,#fff);padding:var(--uui-size-layout-1,24px);padding-right:var(--uui-size-layout-1,24px);padding-left:var(--uui-size-layout-3,42px);border-radius:calc(var(--uui-border-radius,3px) * 2);opacity:0;transition:opacity var(--uui-toast-notification-animation-duration,480ms)}:host([is-open]) #toast>div{opacity:1}#close{float:right;margin-top:-6px;margin-left:var(--uui-size-space-1,3px);margin-bottom:-4px}#close>uui-button{--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}:host #toast>div{background-color:var(--uui-color-surface,#fff);color:var(--uui-color-text,#060606);border-color:var(--uui-color-surface,#fff)}:host([color=default]) #toast>div{background-color:var(--uui-color-default,#1b264f);color:var(--uui-color-default-contrast,#fff);border-color:var(--uui-color-default-standalone,#1c233b)}:host([color=positive]) #toast>div{background-color:var(--uui-color-positive,#0b8152);color:var(--uui-color-positive-contrast,#fff);border-color:var(--uui-color-positive-standalone,#0a7349)}:host([color=warning]) #toast>div{background-color:var(--uui-color-warning,#fbd142);color:var(--uui-color-warning-contrast,#000);border-color:var(--uui-color-warning-standalone,#a17700)}:host([color=danger]) #toast>div{background-color:var(--uui-color-danger,#d42054);color:var(--uui-color-danger-contrast,#fff);border-color:var(--uui-color-danger-standalone,#bf214e)}`],Et([l({reflect:!0})],n.UUIToastNotificationElement.prototype,"color",2),Et([l({type:Number})],n.UUIToastNotificationElement.prototype,"autoClose",1),Et([C("#toast")],n.UUIToastNotificationElement.prototype,"_toastEl",2),Et([g()],n.UUIToastNotificationElement.prototype,"_animate",2),Et([l({type:Boolean,reflect:!0})],n.UUIToastNotificationElement.prototype,"open",1),n.UUIToastNotificationElement=Et([b("uui-toast-notification")],n.UUIToastNotificationElement);var eg=Object.defineProperty,tg=Object.getOwnPropertyDescriptor,yl=(i,e,t,r)=>{for(var o=r>1?void 0:r?tg(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&eg(e,t,o),o};n.UUIToastNotificationContainerElement=class extends m{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{var e;this._autoClosePause=!0,(e=this._toasts)==null||e.forEach(t=>t.pauseAutoClose())},this.resumeAutoClose=()=>{var e;this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,(e=this._toasts)==null||e.forEach(t=>t.resumeAutoClose()))},this.onToastClosed=e=>{this.removeToast(e.target)},this._toasts=[],this.onSlotChanged=e=>{const t=[...this._toasts];this._toasts=e.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),t.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(B.CLOSED,this.onToastClosed),r.removeEventListener("mouseenter",this.pauseAutoClose),r.removeEventListener("mouseleave",this.resumeAutoClose),r.removeEventListener("focus",this.pauseAutoClose),r.removeEventListener("blur",this.resumeAutoClose)}),this._toasts.filter(r=>t.indexOf(r)===-1).forEach(r=>{r.addEventListener(B.CLOSED,this.onToastClosed),r.addEventListener("mouseenter",this.pauseAutoClose),r.addEventListener("mouseleave",this.resumeAutoClose),r.addEventListener("focus",this.pauseAutoClose),r.addEventListener("blur",this.resumeAutoClose),this._autoClose&&(r.autoClose=this._autoClose),this._autoClosePause===!0&&r.pauseAutoClose(),r.open=!0})}}get autoClose(){return this._autoClose}set autoClose(e){var t;this._autoClose=e,(t=this._toasts)==null||t.forEach(r=>r.autoClose=e)}removeToast(e){if(!e)e=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(e)===-1){console.warn("Toast-notification",e,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(e)}closeToast(e){let t=e;t||(t=this._toasts[this._toasts.length-1]),t.open=!1}render(){return u`<slot @slotchange="${this.onSlotChanged}"></slot>`}},n.UUIToastNotificationContainerElement.styles=[p`:host{position:absolute;overflow:hidden;max-width:100%;height:100%;pointer-events:none;box-sizing:border-box}slot{display:flex;flex-direction:column;align-items:end;height:100%;box-sizing:border-box;padding-top:var(--uui-size-space-1,3px);padding-bottom:var(--uui-size-space-1,3px)}:host([bottom-up]) slot{justify-content:end}:host([left-align]) slot{align-items:start}`],yl([l({type:Number,reflect:!0,attribute:"auto-close"})],n.UUIToastNotificationContainerElement.prototype,"_autoClose",2),n.UUIToastNotificationContainerElement=yl([b("uui-toast-notification-container")],n.UUIToastNotificationContainerElement);var ig=`.uui-text {
|
|
1265
1274
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
1266
1275
|
font-size: 15px;
|
|
1267
1276
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -1429,5 +1438,5 @@
|
|
|
1429
1438
|
margin-top: var(--uui-size-layout-1,24px);
|
|
1430
1439
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
1431
1440
|
}
|
|
1432
|
-
`;const
|
|
1441
|
+
`;const og=Z(ig);var rg=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,Ur=(i,e,t,r)=>{for(var o=r>1?void 0:r?ng(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rg(e,t,o),o};n.UUIToastNotificationLayoutElement=class extends m{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return u`<div id="message" class="uui-text"><h5 style="${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h5><slot></slot><slot id="actions" name="actions"></slot></div>`}},n.UUIToastNotificationLayoutElement.styles=[og,p`#message{margin-bottom:calc(var(--uui-size-space-1,3px) * -1)}#message::after{content:'';display:block;clear:both}#actions{display:block;float:right;margin-top:var(--uui-size-space-4,12px);margin-bottom:calc(var(--uui-size-space-2,6px) * -1)}`],Ur([l({type:String})],n.UUIToastNotificationLayoutElement.prototype,"headline",2),Ur([g()],n.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIToastNotificationLayoutElement=Ur([b("uui-toast-notification-layout")],n.UUIToastNotificationLayoutElement);var ag=Object.defineProperty,sg=Object.getOwnPropertyDescriptor,lg=(i,e,t,r)=>{for(var o=r>1?void 0:r?sg(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ag(e,t,o),o};n.UUIToggleElement=class extends oe{constructor(){super("switch")}renderCheckbox(){return u`<div id="slider"><div id="icon-checked">${li}</div><div id="icon-unchecked">${ho}</div></div>`}},n.UUIToggleElement.formAssociated=!0,n.UUIToggleElement.styles=[...oe.styles,ri,p`:host{--uui-toggle-size:18px;--uui-toggle-switch-width:calc(2 * var(--uui-toggle-size))}#slider{position:relative;grid-area:'input';display:flex;align-items:center;width:var(--uui-toggle-switch-width);height:var(--uui-toggle-size);border-radius:100px;background-color:var(--uui-toggle-background-color,var(--uui-color-border,#d8d7d9));border:1px solid var(--uui-toggle-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-toggle-size) * .6)}label:hover input:not([disabled])~#slider{border-color:var(--uui-toggle-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-toggle-background-color-hover,var(--uui-color-border,#d8d7d9))}label:focus #slider{border-color:var(--uui-toggle-border-color-focus,var(--uui-color-focus,#3879ff));background-color:var(--uui-toggle-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked~#slider{background-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])~#slider{background-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked~#slider{background-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-checked,#icon-unchecked{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:color 120ms}#icon-checked{margin-left:-.5em;left:calc(var(--uui-toggle-size) * .5);color:var(--uui-color-interactive,#1b264f)}#icon-unchecked{margin-right:-.5em;right:calc(var(--uui-toggle-size) * .5);color:var(--uui-color-interactive,#1b264f)}input:checked~#slider #icon-checked{color:var(--uui-color-selected-contrast,#fff)}#slider::after{content:'';position:absolute;top:2px;left:2px;width:calc(var(--uui-toggle-size) - 4px);height:calc(var(--uui-toggle-size) - 4px);border-radius:100px;background-color:var(--uui-color-selected-contrast,#fff);transition:width 120ms ease,left 120ms ease,transform 120ms ease,background-color 120ms}input:checked~#slider::after{left:calc(100% - 2px);transform:translateX(-100%)}input:focus~#slider{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled])) label:active #slider::after{width:calc(1.06 * var(--uui-toggle-size))}:host([disabled]) #slider{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}:host([disabled]) input:checked~#slider{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #slider::after{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #slider #icon-unchecked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #slider{animation:${ni}}:host([disabled]) input:checked #slider #icon-checked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host(:not([pristine]):invalid) #slider,:host(:not([pristine]):invalid) label:hover #slider,:host(:not([pristine])[internals-invalid]) #slider,:host(:not([pristine])[internals-invalid]) label:hover #slider{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],n.UUIToggleElement=lg([b("uui-toggle")],n.UUIToggleElement);var ug=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,hg=(i,e,t,r)=>{for(var o=r>1?void 0:r?cg(e,t):e,a=i.length-1,s;a>=0;a--)(s=i[a])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ug(e,t,o),o};n.UUIVisuallyHiddenElement=class extends m{render(){return u`<slot></slot>`}},n.UUIVisuallyHiddenElement.styles=[p`:host(:not(:focus-within)){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`],n.UUIVisuallyHiddenElement=hg([b("uui-visually-hidden")],n.UUIVisuallyHiddenElement),n.ActiveMixin=eu,n.FormControlMixin=pu,n.InterfaceColorValues=Cu,n.InterfaceHeadingValues=Su,n.InterfaceLookValues=Iu,n.LabelMixin=ou,n.PopoverTargetMixin=ku,n.SelectOnlyMixin=cu,n.SelectableMixin=au,n.Timer=bu,n.UUIBlinkAnimationValue=Tl,n.UUIBlinkKeyframes=Ll,n.UUIBooleanInputElement=oe,n.UUIBooleanInputEvent=ii,n.UUIButtonInlineCreateEvent=ai,n.UUICardEvent=at,n.UUIColorAreaEvent=di,n.UUIColorPickerChangeEvent=mi,n.UUIColorSliderEvent=vi,n.UUIColorSwatchesEvent=st,n.UUIComboboxEvent=H,n.UUIComboboxListEvent=J,n.UUIEvent=so,n.UUIFileDropzoneEvent=ht,n.UUIFormControlEvent=Le,n.UUIHorizontalPulseAnimationValue=Ml,n.UUIHorizontalPulseKeyframes=Nl,n.UUIHorizontalShakeAnimationValue=Bl,n.UUIHorizontalShakeKeyframes=Dl,n.UUIIconHost=Go,n.UUIIconRegistry=qo,n.UUIIconRegistryEssential=fs,n.UUIIconRequestEvent=dt,n.UUIInputEvent=He,n.UUIMenuItemEvent=fe,n.UUIModalElement=F,n.UUIPaginationEvent=Ce,n.UUIRadioEvent=yt,n.UUIRadioGroupEvent=Ni,n.UUIRefEvent=_t,n.UUISelectEvent=Di,n.UUISelectableEvent=Te,n.UUISliderEvent=qe,n.UUITabEvent=Vv,n.UUITabGroupEvent=Hv,n.UUITextStyles=Pl,n.UUITextareaEvent=Wt,n.UUIToastNotificationEvent=B,n.clamp=gu,n.defineElement=xu,n.demandCustomElement=mu,n.drag=vu,n.findAncestorByAttributeValue=un,n.reverseNumberInRange=fu,n.slotHasContent=wu,n.toHex=yu});
|
|
1433
1442
|
//# sourceMappingURL=uui.min.js.map
|