@telia-ace/widget-components-widget-header-flamingo 1.1.28 → 1.1.29

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.
@@ -1,353 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const I=globalThis,F=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),nt=new WeakMap;let $t=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(F&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&nt.set(e,t))}return t}toString(){return this.cssText}};const kt=r=>new $t(typeof r=="string"?r:r+"",void 0,X),P=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new $t(e,r,X)},Nt=(r,t)=>{if(F)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=I.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},ot=F?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return kt(e)})(r):r;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Rt,defineProperty:Ht,getOwnPropertyDescriptor:Mt,getOwnPropertyNames:Lt,getOwnPropertySymbols:zt,getPrototypeOf:Bt}=Object,v=globalThis,at=v.trustedTypes,Dt=at?at.emptyScript:"",Y=v.reactiveElementPolyfillSupport,U=(r,t)=>r,W={toAttribute(r,t){switch(t){case Boolean:r=r?Dt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},tt=(r,t)=>!Rt(r,t),ct={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),v.litPropertyMetadata??(v.litPropertyMetadata=new WeakMap);class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ht(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=Mt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const c=i==null?void 0:i.call(this);n.call(this,o),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ct}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=Bt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const e=this.properties,s=[...Lt(e),...zt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(ot(i))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:W).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:W;this._$Em=i,this[i]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,n){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??tt)(i?n:this[t],e))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$ES)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$ET()}catch(i){throw t=!1,this._$ET(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[U("elementProperties")]=new Map,C[U("finalized")]=new Map,Y==null||Y({ReactiveElement:C}),(v.reactiveElementVersions??(v.reactiveElementVersions=[])).push("2.0.1");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const k=globalThis,G=k.trustedTypes,lt=G?G.createPolicy("lit-html",{createHTML:r=>r}):void 0,mt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,yt="?"+y,jt=`<${yt}>`,x=document,R=()=>x.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",vt=Array.isArray,It=r=>vt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",J=`[
14
- \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ht=/-->/g,dt=/>/g,b=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,ut=/"/g,_t=/^(?:script|style|textarea|title)$/i,Wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),f=Wt(1),E=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),gt=new WeakMap,w=x.createTreeWalker(x,129);function bt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}const Gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=O;for(let c=0;c<e;c++){const a=r[c];let d,p,h=-1,u=0;for(;u<a.length&&(o.lastIndex=u,p=o.exec(a),p!==null);)u=o.lastIndex,o===O?p[1]==="!--"?o=ht:p[1]!==void 0?o=dt:p[2]!==void 0?(_t.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=b):p[3]!==void 0&&(o=b):o===b?p[0]===">"?(o=i??O,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?b:p[3]==='"'?ut:pt):o===ut||o===pt?o=b:o===ht||o===dt?o=O:(o=b,i=void 0);const m=o===b&&r[c+1].startsWith("/>")?" ":"";n+=o===O?a+jt:h>=0?(s.push(d),a.slice(0,h)+mt+a.slice(h)+y+m):a+y+(h===-2?c:m)}return[bt(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),s]};class M{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const c=t.length-1,a=this.parts,[d,p]=Gt(t,e);if(this.el=M.createElement(d,s),w.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=w.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(mt)){const u=p[o++],m=i.getAttribute(h).split(y),D=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:D[2],strings:m,ctor:D[1]==="."?qt:D[1]==="?"?Yt:D[1]==="@"?Jt:q}),i.removeAttribute(h)}else h.startsWith(y)&&(a.push({type:6,index:n}),i.removeAttribute(h));if(_t.test(i.tagName)){const h=i.textContent.split(y),u=h.length-1;if(u>0){i.textContent=G?G.emptyScript:"";for(let m=0;m<u;m++)i.append(h[m],R()),w.nextNode(),a.push({type:2,index:++n});i.append(h[u],R())}}}else if(i.nodeType===8)if(i.data===yt)a.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(y,h+1))!==-1;)a.push({type:7,index:n}),h+=y.length-1}n++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){var o,c;if(t===E)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class Vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??x).importNode(e,!0);w.currentNode=i;let n=w.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new L(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Kt(n,this,t)),this._$AV.push(d),a=s[++c]}o!==(a==null?void 0:a.index)&&(n=w.nextNode(),o++)}return w.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class L{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),H(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):It(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==l&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(bt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Vt(i,this),c=o.u(this.options);o.p(e),this.$(c),this._$AH=o}}_$AC(t){let e=gt.get(t.strings);return e===void 0&&gt.set(t.strings,e=new M(t)),e}T(t){vt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new L(this.k(R()),this.k(R()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=l}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=S(this,c[s+a],e,a),d===E&&(d=this._$AH[a]),o||(o=!H(d)||d!==this._$AH[a]),d===l?t=l:t!==l&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!i&&this.O(t)}O(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class qt extends q{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===l?void 0:t}}class Yt extends q{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}}class Jt extends q{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??l)===E)return;const s=this._$AH,i=t===l&&s!==l||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==l&&(s===l||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Kt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const K=k.litHtmlPolyfillSupport;K==null||K(M,L),(k.litHtmlVersions??(k.litHtmlVersions=[])).push("3.0.2");const Zt=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new L(t.insertBefore(R(),n),n,void 0,e??{})}return i._$AI(r),i};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */let $=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}};var ft;$._$litElement$=!0,$.finalized=!0,(ft=globalThis.litElementHydrateSupport)==null||ft.call(globalThis,{LitElement:$});const Z=globalThis.litElementPolyfillSupport;Z==null||Z({LitElement:$});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */const Qt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:tt},Ft=(r=Qt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,r)},init(c){return c!==void 0&&this.C(o,void 0,r),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,r)}}throw Error("Unsupported decorator location: "+s)};function g(r){return(t,e)=>typeof e=="object"?Ft(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */function T(r){return g({...r,state:!0,attribute:!1})}/**
28
- * @license
29
- * Copyright 2017 Google LLC
30
- * SPDX-License-Identifier: BSD-3-Clause
31
- */const At={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},wt=r=>(...t)=>({_$litDirective$:r,values:t});class xt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
32
- * @license
33
- * Copyright 2018 Google LLC
34
- * SPDX-License-Identifier: BSD-3-Clause
35
- */const Xt=wt(class extends xt{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var s,i;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((s=this.st)!=null&&s.has(n))&&this.it.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(i=this.st)!=null&&i.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return E}}),j=(r,t,e)=>{r&&e.style.setProperty(t,r)},Et=(r,t)=>{var e,s,i,n;j((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),j((s=r.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),j((i=r.colors)==null?void 0:i.secondaryBackground,"--secondary-background",t),j((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
36
- * @license
37
- * Copyright 2020 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */const te=r=>r.strings===void 0;/**
40
- * @license
41
- * Copyright 2017 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */const N=(r,t)=>{var s;const e=r._$AN;if(e===void 0)return!1;for(const i of e)(s=i._$AO)==null||s.call(i,t,!1),N(i,t);return!0},V=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Ct=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ie(t)}};function ee(r){this._$AN!==void 0?(V(this),this._$AM=r,Ct(this)):this._$AM=r}function se(r,t=!1,e=0){const s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)N(s[n],!1),V(s[n]);else s!=null&&(N(s,!1),V(s));else N(this,r)}const ie=r=>{r.type==At.CHILD&&(r._$AP??(r._$AP=se),r._$AQ??(r._$AQ=ee))};class re extends xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ct(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(i=this.disconnected)==null||i.call(this)),e&&(N(this,t),V(this))}setValue(t){if(te(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
44
- * @license
45
- * Copyright 2020 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */const St=()=>new ne;class ne{}const Q=new WeakMap,Pt=wt(class extends re{render(r){return l}update(r,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(s=r.options)==null?void 0:s.host,this.ot(this.lt=r.element)),l}ot(r){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=Q.get(t);e===void 0&&(e=new WeakMap,Q.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=Q.get(this.ct??globalThis))==null?void 0:r.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var oe=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,z=(r,t,e,s)=>{for(var i=s>1?void 0:s?ae(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&oe(t,e,i),i};class _ extends ${constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=St()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Et(this.application.settings.branding,this)}async _renderSymbol(){var c,a,d;const t=(c=this.application)==null?void 0:c.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.trigger;if(e)return f` <img src=${e} class="trigger-icon" alt="" /> `;const s=(d=this.application)==null?void 0:d.triggerIcon;if(!s)return l;const i=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(u=>u[p]),{type:n,content:o}=s;switch(n){case"Telia":{const p=await i(o);return p?f`<telia-icon
48
- class="trigger-icon"
49
- svg=${p.svg}
50
- size="lg"
51
- ></telia-icon>`:l}default:return l}}setOffset(t){this.offset=t}render(){var t,e,s,i;return f`<div class="trigger-container">
52
- ${(i=(s=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:s.other)!=null&&i.showButtonLabel?f`
53
- <button class="trigger-label" @click=${this._toggleActive}>
54
- ${this.application.settings.branding.other.buttonLabelText}
55
- </button>
56
- `:l}
57
-
58
- <button
59
- class=${Xt({trigger:!0,active:this.active,rendered:this.loaded})}
60
- @click=${this._toggleActive}
61
- ${Pt(this.buttonRef)}
62
- >
63
- ${this.icon}
64
- <span class="trigger-close">
65
- <svg
66
- width="18"
67
- height="9"
68
- viewBox="0 0 18 9"
69
- fill="none"
70
- xmlns="http://www.w3.org/2000/svg"
71
- >
72
- <path
73
- d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
74
- fill="white"
75
- />
76
- </svg>
77
- </span>
78
- <span class="trigger-loader">
79
- <svg viewBox="25 25 50 50">
80
- <circle
81
- cx="50"
82
- cy="50"
83
- r="20"
84
- fill="none"
85
- stroke="#000"
86
- stroke-width="2"
87
- stroke-miterlimit="10"
88
- />
89
- </svg>
90
- </span>
91
- </button>
92
- </div>`}}_.styles=[P`
93
- :host {
94
- --voca-rem-multiplier: 0.625;
95
- --trigger-label-bg: #f5e0ff;
96
- --trigger-label-text-color: rgba(0, 0, 0, 0.8);
97
- display: block;
98
- box-sizing: border-box;
99
- /* font-family: var(--font-family); */
100
- font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
101
- }
102
-
103
- .trigger-container {
104
- position: fixed;
105
- bottom: 20px;
106
- right: 20px;
107
- display: flex;
108
- align-items: center;
109
- gap: 1rem;
110
- }
111
-
112
- .trigger {
113
- transform: scale(0);
114
- box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
115
- z-index: 5;
116
- display: flex;
117
- align-items: center;
118
- justify-content: center;
119
- border: none;
120
- line-height: 55px;
121
- height: 55px;
122
- width: 55px;
123
- border-radius: 55px;
124
- cursor: pointer;
125
- background-color: var(--trigger-bg, var(--primary-background));
126
- font-family: Lato;
127
- text-decoration: none;
128
- border: 3px dashed transparent;
129
- box-sizing: border-box;
130
- transition: transform 200ms ease-out;
131
- }
132
- .trigger:hover {
133
- transform: scale(1.1) !important;
134
- }
135
- .trigger.rendered {
136
- transform: scale(1);
137
- }
138
- .trigger.active .trigger-icon {
139
- opacity: 0;
140
- transform: rotate(-180deg) scale(0);
141
- }
142
- .trigger.active .trigger-close {
143
- opacity: 1;
144
- transform: rotate(0deg) scale(1);
145
- }
146
-
147
- .trigger-icon {
148
- display: inline-block;
149
- line-height: inherit;
150
- text-align: center;
151
- opacity: 1;
152
- transform: rotate(0deg) scale(1);
153
- transition: opacity 200ms ease-out, transform 200ms ease-out;
154
- color: var(--trigger-text-color, var(--text-on-primary-background));
155
- }
156
- .trigger-close {
157
- opacity: 0;
158
- transition: transform 200ms ease-out;
159
- transform: rotate(180deg) scale(0);
160
- position: absolute;
161
- top: 0;
162
- bottom: 0;
163
- left: 0;
164
- right: 0;
165
- display: flex;
166
- justify-content: center;
167
- align-items: center;
168
- fill: var(--trigger-text-color, var(--text-on-primary-background));
169
- }
170
-
171
- img {
172
- max-width: 100%;
173
- }
174
-
175
- .trigger-label {
176
- box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
177
- background-color: var(--trigger-label-bg);
178
- color: var(--trigger-label-text-color);
179
- white-space: nowrap;
180
- padding: 0.7rem 1rem;
181
- border-radius: 0.3rem;
182
- font-weight: 500;
183
- display: flex;
184
- justify-content: center;
185
- align-items: center;
186
- cursor: pointer;
187
- border: none;
188
- font-size: 1rem;
189
- font-family: inherit;
190
- transition: all 300ms ease-in-out;
191
- }
192
-
193
- .trigger-label:hover {
194
- opacity: 0.8;
195
- }
196
- `];z([g({attribute:!1})],_.prototype,"application",2);z([T()],_.prototype,"active",2);z([T()],_.prototype,"loaded",2);z([T()],_.prototype,"icon",2);z([T()],_.prototype,"offset",2);var ce=Object.defineProperty,le=Object.getOwnPropertyDescriptor,A=(r,t,e,s)=>{for(var i=s>1?void 0:s?le(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ce(t,e,i),i};const Tt=r=>{class t extends r{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(s){this.properties=s}writeLayout(s){this.layout=s}writeContext(s){this.context=s}addChild(s){s.parent=this,this.nodes.push(s)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[P`
197
- :host {
198
- font-family: var(--font-family);
199
- grid-column: span var(--width);
200
- max-width: 100%;
201
- overflow: hidden;
202
- box-sizing: border-box;
203
- display: block;
204
- }
205
- * {
206
- box-sizing: border-box;
207
- }
208
- `],A([g()],t.prototype,"properties",2),A([g()],t.prototype,"context",2),A([g()],t.prototype,"layout",2),A([g()],t.prototype,"name",2),A([g()],t.prototype,"type",2),A([g({attribute:!1})],t.prototype,"application",2),A([g({attribute:!1})],t.prototype,"parent",2),t};class Ot extends Tt($){render(){return f`Non resolved component`}}Ot.styles=[P`
209
- :host {
210
- display: block;
211
- }
212
- `];/**
213
- * @license
214
- * Copyright 2021 Google LLC
215
- * SPDX-License-Identifier: BSD-3-Clause
216
- */function*he(r,t){if(r!==void 0){let e=0;for(const s of r)yield t(s,e++)}}var et=(r=>(r.Inline="inline",r.Trigger="trigger",r))(et||{}),de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(r,t,e,s)=>{for(var i=s>1?void 0:s?pe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&de(t,e,i),i};class st extends ${constructor(){super(...arguments),this.nodes=[],this.wrapperRef=St()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Et(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([s,i])=>{e.style.setProperty(`--${s}`,i)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===et.Trigger&&this.renderRoot.host.classList.add("floating"),f`<div class="widget-container" ${Pt(this.wrapperRef)}>
217
- ${he(this.nodes,t=>t)}
218
- </div>`}}st.styles=P`
219
- :host {
220
- --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
221
- --spacing-xs: 0.2rem;
222
- --spacing-sm: 0.5rem;
223
- --spacing-md: 1rem;
224
- --spacing-lg: 1.2rem;
225
- --spacing-xl: 1.8rem;
226
-
227
- --text-color: #222222;
228
- --link-color: #990ae3;
229
- --gray-color: #f3f3f8;
230
- --gray-dark-color: #a6a6a6;
231
-
232
- --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
233
- --border-radius: var(--spacing-sm);
234
- --border-radius-sm: var(--spacing-sm);
235
- --gap: var(--spacing-sm);
236
- }
237
- :host {
238
- --voca-rem-multiplier: 0.625;
239
- box-sizing: border-box;
240
- display: block;
241
- }
242
-
243
- :host(.inline) {
244
- height: 100%;
245
- position: fixed;
246
- inset: 0 0 0 0;
247
- }
248
-
249
- :host(.floating) {
250
- z-index: 6;
251
- position: fixed;
252
- }
253
- @media screen and (max-width: 800px) {
254
- :host(.floating) {
255
- inset: 0 0 95px 0;
256
- }
257
- }
258
- @media screen and (min-width: 801px) {
259
- :host(.floating) {
260
- inset: auto 20px 95px auto;
261
- max-height: calc(100vh - 120px);
262
- width: 400px;
263
- height: 700px;
264
- }
265
- }
266
-
267
- :host(.floating) .widget-container {
268
- box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
269
- border-radius: 0.7rem;
270
- }
271
-
272
- * {
273
- box-sizing: border-box;
274
- }
275
- .widget-container {
276
- height: 100%;
277
- background-color: var(--primary-background);
278
- padding: var(--spacing-sm);
279
- border: var(--widget-border, none);
280
- }
281
- @keyframes slideDown {
282
- from {
283
- transform: translateY(0);
284
- opacity: 1;
285
- }
286
- to {
287
- transform: translateY(100%);
288
- opacity: 0;
289
- }
290
- }
291
- @keyframes slideUp {
292
- from {
293
- transform: translateY(100%);
294
- opacity: 0;
295
- }
296
- to {
297
- transform: translateY(0);
298
- opacity: 1;
299
- }
300
- }
301
- :host(.expanded) {
302
- opacity: 1;
303
- animation: slideUp 0.3s linear;
304
- }
305
- :host(.hidden) {
306
- opacity: 0;
307
- animation: slideDown 0.3s linear;
308
- }
309
- `;ue([g({attribute:!1})],st.prototype,"application",2);var ge=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,it=(r,t,e,s)=>{for(var i=s>1?void 0:s?fe(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&ge(t,e,i),i};class B extends ${constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return l;if(this.widget.renderStrategy===et.Trigger){const t=new _;return t.application=this.widget,t}return this.widget.render()}}B.styles=[P`
310
- :host {
311
- display: block;
312
- }
313
- `];it([g({attribute:!0})],B.prototype,"name",2);it([T()],B.prototype,"widget",2);it([T()],B.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",_);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Ot);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",B);const Ut=Tt($);class rt extends Ut{render(){var n;const t=this.application.branding(),e=(n=t==null?void 0:t.graphics)==null?void 0:n.logotype,i=this.application.texts.get("widget-header.header","ACE Widget");return f` <div class="widget-header">
314
- <!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
315
- ${e?f` <img src=${e} class="logotype" alt="" />`:l}
316
-
317
- <div>
318
- <h1>${i}</h1>
319
-
320
- ${this.properties.tagline?f`<p>${this.properties.tagline}</p>`:l}
321
- </div>
322
- </div>`}}rt.styles=[Ut.styles||[],P`
323
- :host {
324
- --header-text-color: var(--text-on-primary-background);
325
- }
326
-
327
- img {
328
- max-width: 140px;
329
- max-height: 80%;
330
- }
331
-
332
- .widget-header {
333
- background-color: transparent;
334
- color: var(--header-text-color);
335
- height: 69px;
336
- display: flex;
337
- gap: var(--spacing-md);
338
- flex-direction: row;
339
- align-items: center;
340
- border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
341
- padding: 0 var(--spacing-md);
342
- }
343
-
344
- h1 {
345
- font-size: 1.2rem;
346
- }
347
-
348
- h1,
349
- p {
350
- margin: 0;
351
- padding: 0;
352
- }
353
- `];exports.WidgetHeader=rt;exports.default=rt;