@telia-ace/widget-components-widget-header-flamingo 1.1.76 → 1.1.77

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/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-6592c318.js")))};module.exports=r;
1
+ "use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-194badea.js")))};module.exports=r;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const t = async (e) => {
2
- e.registerComponent("widget-header", import("./widget-header-65a402f1.mjs"));
2
+ e.registerComponent("widget-header", import("./widget-header-75f72f69.mjs"));
3
3
  };
4
4
  export {
5
5
  t as default
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-widget-header-flamingo",
3
- "version": "1.1.76",
3
+ "version": "1.1.77",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
- "@telia-ace/widget-core-flamingo": "1.1.76",
6
+ "@telia-ace/widget-core-flamingo": "1.1.77",
7
7
  "@teliads/components": "^22.1.1",
8
8
  "@teliads/icons": "^8.4.0",
9
9
  "@lit-labs/motion": "^1.0.6",
package/utils/uuid.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const uuid: () => `${string}-${string}-${string}-${string}-${string}`;
1
+ export declare const uuid: () => string;
@@ -62,7 +62,7 @@
62
62
  * @license
63
63
  * Copyright 2020 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
- */const bt=()=>new dn;let dn=class{};const zt=new WeakMap,_t=se(class extends Si{render(i){return p}update(i,[t]){var s;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=zt.get(t);e===void 0&&(e=new WeakMap,zt.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i)}else this.Y.value=i}get lt(){var i,t;return typeof this.Y=="function"?(i=zt.get(this.ht??globalThis))==null?void 0:i.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var fn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,ot=(i,t,e,s)=>{for(var n=s>1?void 0:s?pn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&fn(t,e,n),n};class T extends S{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=bt(),this.widgetActive$=new os(!1),this.componentIsDestroyed$=new kt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}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.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.widgetActive$.next(!1),this.showTrigger())}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Ci(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const t=(a=this.application)==null?void 0:a.branding(),e=(l=t==null?void 0:t.graphics)==null?void 0:l.trigger;if(e)return b` <img src=${e} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return p;const n=async u=>hn,{type:r,content:o}=s;switch(r){case"Telia":{const u=await n();return u?b`<telia-icon
65
+ */const bt=()=>new dn;let dn=class{};const zt=new WeakMap,_t=se(class extends Si{render(i){return p}update(i,[t]){var s;const e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){if(typeof this.Y=="function"){const t=this.ht??globalThis;let e=zt.get(t);e===void 0&&(e=new WeakMap,zt.set(t,e)),e.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),e.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i)}else this.Y.value=i}get lt(){var i,t;return typeof this.Y=="function"?(i=zt.get(this.ht??globalThis))==null?void 0:i.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var fn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,ot=(i,t,e,s)=>{for(var n=s>1?void 0:s?pn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&fn(t,e,n),n};class T extends S{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=bt(),this.widgetActive$=new os(!1),this.componentIsDestroyed$=new kt}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}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.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&Ci(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const t=(a=this.application)==null?void 0:a.branding(),e=(l=t==null?void 0:t.graphics)==null?void 0:l.trigger;if(e)return b` <img src=${e} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return p;const n=async u=>hn,{type:r,content:o}=s;switch(r){case"Telia":{const u=await n();return u?b`<telia-icon
66
66
  class="trigger-icon"
67
67
  svg=${u.svg}
68
68
  size="lg"
@@ -284,7 +284,7 @@
284
284
  * @license
285
285
  * Copyright 2017 Google LLC
286
286
  * SPDX-License-Identifier: BSD-3-Clause
287
- */function _n({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){s.set(this,new Re(this,{context:i}))}),{get(){return t.get.call(this)},set(n){var r;return(r=s.get(this))==null||r.setValue(n),t.set.call(this,n)},init(n){var r;return(r=s.get(this))==null||r.setValue(n),n}};{t.constructor.addInitializer(o=>{s.set(o,new Re(o,{context:i}))});const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set:function(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Sn=(i,t,e,s)=>{for(var n=s>1?void 0:s?xn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&wn(t,e,n),n};const An="application";class re extends S{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=bt()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ci(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,n])=>{e.style.setProperty(`--${s}`,n)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var s,n;const t=this.application.settings.components.conversation;return((n=(s=t==null?void 0:t.properties)==null?void 0:s.chat)==null?void 0:n.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ne.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),b`<div class="widget-container" ${_t(this.wrapperRef)}>
287
+ */function _n({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return e.addInitializer(function(){s.set(this,new Re(this,{context:i}))}),{get(){return t.get.call(this)},set(n){var r;return(r=s.get(this))==null||r.setValue(n),t.set.call(this,n)},init(n){var r;return(r=s.get(this))==null||r.setValue(n),n}};{t.constructor.addInitializer(o=>{s.set(o,new Re(o,{context:i}))});const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get:function(){return o.get(this)},set:function(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set:function(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Sn=(i,t,e,s)=>{for(var n=s>1?void 0:s?xn(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&wn(t,e,n),n};const An="application";class re extends S{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=bt()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ci(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,n])=>{e.style.setProperty(`--${s}`,n)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var s,n;const t=this.application.settings.components.conversation;return((n=(s=t==null?void 0:t.properties)==null?void 0:s.chat)==null?void 0:n.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===ne.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),b`<div class="widget-container" ${_t(this.wrapperRef)}>
288
288
  ${vn(this.nodes,r=>r)}
289
289
  </div>`}}re.styles=j`
290
290
  :host {
@@ -425,7 +425,7 @@
425
425
  :host {
426
426
  display: block;
427
427
  }
428
- `];oe([_({attribute:!0})],at.prototype,"name",2);oe([H()],at.prototype,"widget",2);oe([H()],at.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",T);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ki);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",at);const kn=()=>crypto.randomUUID();class On{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new kt,this.id=kn(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Tn{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new On(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(t){this._options=this._options.filter(e=>e.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=ks(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}const D={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let B,Oi,Tt,Ti=!1,wt=!1,ae=!1,y=!1,Ue=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Pi=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},Pn=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ln=i=>Promise.resolve(i),In=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Li=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Un(i,n),l=Rn(t,o),c=Mn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Rn=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){lt(s)}},Un=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,Mn=i=>Pn?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Me="http://www.w3.org/1999/xlink",M=(i,t="")=>()=>{},je=new WeakMap,jn=(i,t,e)=>{let s=At.get(i);In&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,At.set(i,s)},Hn=(i,t,e,s)=>{let n=Ii(t,e),r=At.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=je.get(i),a;o||je.set(i,o=new Set),o.has(n)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Nn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=M("attachStyles",t.$tagName$),r=Hn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Ii=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Dn=i=>pr.map(t=>t(i)).find(t=>!!t),He={},Bn="http://www.w3.org/2000/svg",zn="http://www.w3.org/1999/xhtml",Wn=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),F=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)s=h[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!le(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?xt(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(d=>h[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,Yn);const u=xt(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},xt=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},ce={},Fn=i=>i&&i.$tag$===ce,Yn={forEach:(i,t)=>i.map(Ne).forEach(t),map:(i,t)=>i.map(Ne).map(t).map(qn)},Ne=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),qn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),F(i.vtag,e,...i.vchildren||[])}const t=xt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},De=(i,t,e,s,n,r)=>{if(e!==s){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Be(e),u=Be(s);l.remove(...c.filter(h=>h&&!u.includes(h))),l.add(...u.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),s&&m.ael(i,t,s,!1);else{const l=le(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let u=s??"";t==="list"?o=!1:(e==null||i[t]!=u)&&(i[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Me,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Me,t,s):i.setAttribute(t,s))}}},Gn=/\s/,Be=i=>i?i.split(Gn):[],Ri=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||He,o=t.$attrs$||He;for(s in r)s in o||De(n,s,r[s],void 0,e,t.$flags$);for(s in o)De(n,s,r[s],o[s],e,t.$flags$)},St=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Ti||(ae=!0,n.$tag$==="slot"&&(B&&s.classList.add(B+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=A.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=A.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=A.createElementNS(y?Bn:zn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Ri(null,n,y),Wn(B)&&o["s-si"]!==B&&o.classList.add(o["s-si"]=B),n.$children$)for(r=0;r<n.$children$.length;++r)a=St(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Oi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Tt&&n["s-ol"]&&(ji(n).insertBefore(n,ue(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ae=!0),t&&nt(n,t)}m.$flags$&=-2},Ui=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=St(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,ue(t))))},Mi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Di(s),wt=!0,n["s-ol"]?n["s-ol"].remove():nt(n,!0),n.remove())},Zn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=s.length-1,d=s[0],f=s[h],$,g;for(;n<=l&&r<=h;)if(c==null)c=t[++n];else if(u==null)u=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--h];else if(ht(c,d))z(c,d),c=t[++n],d=s[++r];else if(ht(u,f))z(u,f),u=t[--l],f=s[--h];else if(ht(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),z(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if(ht(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(u.$elm$.parentNode,!1),z(u,d),i.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?$=St(t&&t[r],e,o,i):(z(g,d),t[o]=void 0,$=g.$elm$),d=s[++r]):($=St(t&&t[r],e,r,i),d=s[++r]),$&&ji(c.$elm$).insertBefore($,ue(c.$elm$))}n>l?Ui(i,s[h+1]==null?null:s[h+1].$elm$,e,s,r,h):r>h&&Mi(t,n,l)},ht=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ue=i=>i&&i["s-ol"]||i,ji=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ri(i,t,y),s!==null&&n!==null?Zn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Ui(e,null,t,n,0,n.length-1)):s!==null&&Mi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Hi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Hi(e)}},x=[],Ni=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ze(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),wt=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{ze(u.$nodeToRelocate$,e["s-sn"])&&(r=x.find(h=>h.$nodeToRelocate$===e),r&&!u.$slotRefNode$&&(u.$slotRefNode$=r.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Ni(t)}},ze=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Di=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Di)},Kn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||xt(null,null),r=Fn(t)?t:F(null,null,t);Tt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,B=e["s-sc"],Oi=e["s-cr"],Ti=(s.$flags$&1)!==0,wt=!1,z(n,r);{if(m.$flags$|=1,ae){Ni(r.$elm$);let o,a,l,c,u,h,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,u=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(h=l["s-nr"],h&&h["s-sn"]===a["s-sn"]&&c===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&c!==a.parentNode||a.nextSibling!==u)&&a!==u&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,u))}else a.nodeType===1&&(a.hidden=!0)}wt&&Hi(r.$elm$),m.$flags$&=-2,x.length=0}},Xn=i=>i,Qn=(i,t,e)=>{const s=Xn(i);return{emit:n=>Jn(s,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},Jn=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},Vn=(i,t)=>{},Bi=(i,t)=>(i.$flags$|=16,Vn(i,i.$ancestorComponent$),vr(()=>tr(i,t))),tr=(i,t)=>{const e=i.$hostElement$,s=M("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=Y(n,"componentWillLoad"):r=Y(n,"componentWillUpdate"),r=We(r,()=>Y(n,"componentWillRender")),s(),We(r,()=>er(i,n,t))},er=async(i,t,e)=>{const s=i.$hostElement$,n=M("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Nn(i);const r=M("render",i.$cmpMeta$.$tagName$);ir(i,t,s),r(),n(),sr(i)},ir=(i,t,e)=>{try{Ue=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(D.hasRenderFn||D.reflect)&&(D.vdomRender||D.reflect)&&(D.hydrateServerSide||Kn(i,t))}catch(a){lt(a,i.$hostElement$)}return Ue=null,null},sr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=M("postUpdate",t),n=e;i.$ancestorComponent$,Y(n,"componentDidRender"),i.$flags$&64?(Y(n,"componentDidUpdate"),s()):(i.$flags$|=64,Y(n,"componentDidLoad"),s())},Y=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){lt(s)}},We=(i,t)=>i&&i.then?i.then(t):t(),nr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,rr=(i,t)=>Lt(i).$instanceValues$.get(t),or=(i,t,e,s)=>{const n=Lt(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=nr(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const h=s.$watchers$[t];h&&h.map(d=>{try{l[d](e,o,t)}catch(f){lt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Bi(n,!1)}}}},ar=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return rr(this,r)},set(a){or(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},lr=async(i,t,e,s,n)=>{if(!(t.$flags$&32)&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Dn(i)]);const a=Ii(e,t.$modeName$);if(!At.has(a)){const l=M("registerStyles",e.$tagName$);jn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Bi(t,!0))()},cr=i=>{},ur=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,s=M("connectedCallback",e.$tagName$);t.$flags$&1?(Li(i,t,e.$listeners$),cr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&hr(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),lr(i,t,e)),s()}},hr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},dr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},zi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){fr(this,e)},connectedCallback(){ur(this),s&&s.call(this)},disconnectedCallback(){dr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,ar(i,e)},Wi=new WeakMap,Lt=i=>Wi.get(i),fr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Li(i,e,t.$listeners$),Wi.set(i,e)},Fe=(i,t)=>t in i,lt=(i,t)=>(0,console.error)(i,t),At=new Map,pr=[],Ye=[],Fi=[],gr=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?$r(Zt):m.raf(Zt))},qe=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){lt(e)}i.length=0},Zt=()=>{qe(Ye),qe(Fi),(Gt=Ye.length>0)&&m.raf(Zt)},$r=i=>Ln().then(i),vr=gr(Fi,!0),mr=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},yr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function br(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=br(new Date)}}const wr="telia-vst{display:none}",xr=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Qn(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return F(ce,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,xr);break}})}Yi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Sr(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Ar(){return Kt().vocadsIconsRegistered}const Cr=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",Er=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ar()&&this.name){const i=Sr();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=mr({content:yr(i),attributes:t,title:this.allyTitle});return F(ce,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Cr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function kr(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Er);break;case"telia-vst":customElements.get(t)||Yi();break}})}kr();var Or=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Pr=(i,t,e,s)=>{for(var n=s>1?void 0:s?Tr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&Or(t,e,n),n};const qi=Ei(S);class It extends qi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Tn(this),this.optionsRef=bt(),this.optionsTriggerRef=bt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}_onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}_onMinimizeClick(){this.application.trigger&&this.application.trigger.toggleActive()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var a,l,c;const t=this.application.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=this.application.settings.components.conversation,o=(c=(l=r==null?void 0:r.properties)==null?void 0:l.chat)==null?void 0:c.isThirdPartyWidget;return b` <div class="widget-header">
428
+ `];oe([_({attribute:!0})],at.prototype,"name",2);oe([H()],at.prototype,"widget",2);oe([H()],at.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",ee);customElements.get("ace-trigger")||customElements.define("ace-trigger",T);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",ki);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",re);customElements.get("ace-widget")||customElements.define("ace-widget",at);const kn=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),On=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():kn();class Tn{constructor(t,e,s,n,r,o,a=!0){this.label=t,this.icon=e,this.onClick=s,this.closeOnClick=n,this.key=r,this.update=new kt,this.id=On(),this._controller=o,this.enabled=a}updateLabel(t){this.label=t,this.update.next()}updateIcon(t){this.icon=t,this.update.next()}remove(){this._controller.removeOption(this)}subscribe(){return this.update.asObservable()}}class Pn{constructor(t){this._options=[],this._subscription=null,this._host=t,t.addController(this)}hostConnected(){}hostDisconnected(){this._subscription&&this._subscription.unsubscribe(),this._options=[]}addOption(t){const e=new Tn(t.label,t.icon,t.onClick,t.closeOnClick,t.key,this);return this._options.push(e),this.handleUpdate(),e}removeOption(t){this._options=this._options.filter(e=>e.id!==t.id)}handleUpdate(){this._subscription&&this._subscription.unsubscribe();const t=this._options.map(e=>e.subscribe());this._subscription=ks(t).subscribe(()=>{this._host.requestUpdate()})}set options(t){this._options=t,this._host.requestUpdate()}get options(){return this._options}hasOptions(){return this._options.length>0}}const D={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let B,Oi,Tt,Ti=!1,wt=!1,ae=!1,y=!1,Ue=null,Gt=!1;const Pt=typeof window<"u"?window:{},A=Pt.document||{head:{}},Pi=Pt.HTMLElement||class{},m={$flags$:0,$resourcesUrl$:"",jmp:i=>i(),raf:i=>requestAnimationFrame(i),ael:(i,t,e,s)=>i.addEventListener(t,e,s),rel:(i,t,e,s)=>i.removeEventListener(t,e,s),ce:(i,t)=>new CustomEvent(i,t)},Ln=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),In=i=>Promise.resolve(i),Rn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Li=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Mn(i,n),l=Un(t,o),c=jn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Un=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){lt(s)}},Mn=(i,t)=>t&4?A:t&8?Pt:t&16?A.body:i,jn=i=>Ln?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Me="http://www.w3.org/1999/xlink",M=(i,t="")=>()=>{},je=new WeakMap,Hn=(i,t,e)=>{let s=At.get(i);Rn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,At.set(i,s)},Nn=(i,t,e,s)=>{let n=Ii(t,e),r=At.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=je.get(i),a;o||je.set(i,o=new Set),o.has(n)||(a=A.createElement("style"),a.innerHTML=r,i.insertBefore(a,i.querySelector("link")),o&&o.add(n))}else i.adoptedStyleSheets.includes(r)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,r]);return n},Dn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=M("attachStyles",t.$tagName$),r=Nn(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,i.$modeName$);s&10&&(e["s-sc"]=r,e.classList.add(r+"-h"),s&2&&e.classList.add(r+"-s")),n()},Ii=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Bn=i=>gr.map(t=>t(i)).find(t=>!!t),He={},zn="http://www.w3.org/2000/svg",Wn="http://www.w3.org/1999/xhtml",Fn=i=>i!=null,le=i=>(i=typeof i,i==="object"||i==="function"),F=(i,t,...e)=>{let s=null,n=null,r=null,o=!1,a=!1,l=[];const c=h=>{for(let d=0;d<h.length;d++)s=h[d],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=typeof i!="function"&&!le(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?xt(null,s):s),a=o)};if(c(e),t){t.key&&(n=t.key),t.name&&(r=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(d=>h[d]).join(" "))}}if(typeof i=="function")return i(t===null?{}:t,l,qn);const u=xt(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},xt=(i,t)=>{const e={$flags$:0,$tag$:i,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},ce={},Yn=i=>i&&i.$tag$===ce,qn={forEach:(i,t)=>i.map(Ne).forEach(t),map:(i,t)=>i.map(Ne).map(t).map(Gn)},Ne=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Gn=i=>{if(typeof i.vtag=="function"){const e=Object.assign({},i.vattrs);return i.vkey&&(e.key=i.vkey),i.vname&&(e.name=i.vname),F(i.vtag,e,...i.vchildren||[])}const t=xt(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},De=(i,t,e,s,n,r)=>{if(e!==s){let o=Fe(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Be(e),u=Be(s);l.remove(...c.filter(h=>h&&!u.includes(h))),l.add(...u.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!s||s[l]==null)&&(l.includes("-")?i.style.removeProperty(l):i.style[l]="");for(const l in s)(!e||s[l]!==e[l])&&(l.includes("-")?i.style.setProperty(l,s[l]):i.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(i);else if(!i.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Fe(Pt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&m.rel(i,t,e,!1),s&&m.ael(i,t,s,!1);else{const l=le(s);if((o||l&&s!==null)&&!n)try{if(i.tagName.includes("-"))i[t]=s;else{let u=s??"";t==="list"?o=!1:(e==null||i[t]!=u)&&(i[t]=u)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),s==null||s===!1?(s!==!1||i.getAttribute(t)==="")&&(c?i.removeAttributeNS(Me,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Me,t,s):i.setAttribute(t,s))}}},Zn=/\s/,Be=i=>i?i.split(Zn):[],Ri=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||He,o=t.$attrs$||He;for(s in r)s in o||De(n,s,r[s],void 0,e,t.$flags$);for(s in o)De(n,s,r[s],o[s],e,t.$flags$)},St=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Ti||(ae=!0,n.$tag$==="slot"&&(B&&s.classList.add(B+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=A.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=A.createTextNode("");else{if(y||(y=n.$tag$==="svg"),o=n.$elm$=A.createElementNS(y?zn:Wn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Ri(null,n,y),Fn(B)&&o["s-si"]!==B&&o.classList.add(o["s-si"]=B),n.$children$)for(r=0;r<n.$children$.length;++r)a=St(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Tt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Oi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&nt(i.$elm$,!1)),o},nt=(i,t)=>{m.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Tt&&n["s-ol"]&&(ji(n).insertBefore(n,ue(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ae=!0),t&&nt(n,t)}m.$flags$&=-2},Ui=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Tt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=St(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,ue(t))))},Mi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Di(s),wt=!0,n["s-ol"]?n["s-ol"].remove():nt(n,!0),n.remove())},Kn=(i,t,e,s)=>{let n=0,r=0,o=0,a=0,l=t.length-1,c=t[0],u=t[l],h=s.length-1,d=s[0],f=s[h],$,g;for(;n<=l&&r<=h;)if(c==null)c=t[++n];else if(u==null)u=t[--l];else if(d==null)d=s[++r];else if(f==null)f=s[--h];else if(ht(c,d))z(c,d),c=t[++n],d=s[++r];else if(ht(u,f))z(u,f),u=t[--l],f=s[--h];else if(ht(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(c.$elm$.parentNode,!1),z(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if(ht(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&nt(u.$elm$.parentNode,!1),z(u,d),i.insertBefore(u.$elm$,c.$elm$),u=t[--l],d=s[++r];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===d.$key$){o=a;break}o>=0?(g=t[o],g.$tag$!==d.$tag$?$=St(t&&t[r],e,o,i):(z(g,d),t[o]=void 0,$=g.$elm$),d=s[++r]):($=St(t&&t[r],e,r,i),d=s[++r]),$&&ji(c.$elm$).insertBefore($,ue(c.$elm$))}n>l?Ui(i,s[h+1]==null?null:s[h+1].$elm$,e,s,r,h):r>h&&Mi(t,n,l)},ht=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ue=i=>i&&i["s-ol"]||i,ji=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,z=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(y=r==="svg"?!0:r==="foreignObject"?!1:y,r==="slot"||Ri(i,t,y),s!==null&&n!==null?Kn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Ui(e,null,t,n,0,n.length-1)):s!==null&&Mi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Hi=i=>{let t=i.childNodes,e,s,n,r,o,a;for(s=0,n=t.length;s<n;s++)if(e=t[s],e.nodeType===1){if(e["s-sr"]){for(o=e["s-sn"],e.hidden=!1,r=0;r<n;r++)if(a=t[r].nodeType,t[r]["s-hn"]!==e["s-hn"]||o!==""){if(a===1&&o===t[r].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[r].textContent.trim()!==""){e.hidden=!0;break}}Hi(e)}},x=[],Ni=i=>{let t,e,s,n,r,o,a=0,l=i.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(s=e.parentNode.childNodes,n=t["s-sn"],o=s.length-1;o>=0;o--)e=s[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ze(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),wt=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{ze(u.$nodeToRelocate$,e["s-sn"])&&(r=x.find(h=>h.$nodeToRelocate$===e),r&&!u.$slotRefNode$&&(u.$slotRefNode$=r.$slotRefNode$))})):x.some(u=>u.$nodeToRelocate$===e)||x.push({$nodeToRelocate$:e}));t.nodeType===1&&Ni(t)}},ze=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Di=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Di)},Xn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||xt(null,null),r=Yn(t)?t:F(null,null,t);Tt=e.tagName,s.$attrsToReflect$&&(r.$attrs$=r.$attrs$||{},s.$attrsToReflect$.map(([o,a])=>r.$attrs$[a]=e[o])),r.$tag$=null,r.$flags$|=4,i.$vnode$=r,r.$elm$=n.$elm$=e.shadowRoot||e,B=e["s-sc"],Oi=e["s-cr"],Ti=(s.$flags$&1)!==0,wt=!1,z(n,r);{if(m.$flags$|=1,ae){Ni(r.$elm$);let o,a,l,c,u,h,d=0;for(;d<x.length;d++)o=x[d],a=o.$nodeToRelocate$,a["s-ol"]||(l=A.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(d=0;d<x.length;d++)if(o=x[d],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,u=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(h=l["s-nr"],h&&h["s-sn"]===a["s-sn"]&&c===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&c!==a.parentNode||a.nextSibling!==u)&&a!==u&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,u))}else a.nodeType===1&&(a.hidden=!0)}wt&&Hi(r.$elm$),m.$flags$&=-2,x.length=0}},Qn=i=>i,Jn=(i,t,e)=>{const s=Qn(i);return{emit:n=>Vn(s,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},Vn=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},tr=(i,t)=>{},Bi=(i,t)=>(i.$flags$|=16,tr(i,i.$ancestorComponent$),mr(()=>er(i,t))),er=(i,t)=>{const e=i.$hostElement$,s=M("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=Y(n,"componentWillLoad"):r=Y(n,"componentWillUpdate"),r=We(r,()=>Y(n,"componentWillRender")),s(),We(r,()=>ir(i,n,t))},ir=async(i,t,e)=>{const s=i.$hostElement$,n=M("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Dn(i);const r=M("render",i.$cmpMeta$.$tagName$);sr(i,t,s),r(),n(),nr(i)},sr=(i,t,e)=>{try{Ue=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(D.hasRenderFn||D.reflect)&&(D.vdomRender||D.reflect)&&(D.hydrateServerSide||Xn(i,t))}catch(a){lt(a,i.$hostElement$)}return Ue=null,null},nr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=M("postUpdate",t),n=e;i.$ancestorComponent$,Y(n,"componentDidRender"),i.$flags$&64?(Y(n,"componentDidUpdate"),s()):(i.$flags$|=64,Y(n,"componentDidLoad"),s())},Y=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){lt(s)}},We=(i,t)=>i&&i.then?i.then(t):t(),rr=(i,t)=>i!=null&&!le(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,or=(i,t)=>Lt(i).$instanceValues$.get(t),ar=(i,t,e,s)=>{const n=Lt(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=rr(e,s.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(e);if(e!==o&&!c){n.$instanceValues$.set(t,e);{if(s.$watchers$&&a&128){const h=s.$watchers$[t];h&&h.map(d=>{try{l[d](e,o,t)}catch(f){lt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Bi(n,!1)}}}},lr=(i,t,e)=>{if(t.$members$){i.watchers&&(t.$watchers$=i.watchers);const s=Object.entries(t.$members$),n=i.prototype;s.map(([r,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,r,{get(){return or(this,r)},set(a){ar(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){m.jmp(()=>{const c=r.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},i.observedAttributes=s.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return r.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return i},cr=async(i,t,e,s,n)=>{if(!(t.$flags$&32)&&(n=i.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=Bn(i)]);const a=Ii(e,t.$modeName$);if(!At.has(a)){const l=M("registerStyles",e.$tagName$);Hn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Bi(t,!0))()},ur=i=>{},hr=i=>{if(!(m.$flags$&1)){const t=Lt(i),e=t.$cmpMeta$,s=M("connectedCallback",e.$tagName$);t.$flags$&1?(Li(i,t,e.$listeners$),ur(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&dr(i),e.$members$&&Object.entries(e.$members$).map(([n,[r]])=>{if(r&31&&i.hasOwnProperty(n)){const o=i[n];delete i[n],i[n]=o}}),cr(i,t,e)),s()}},dr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},fr=i=>{if(!(m.$flags$&1)){const t=Lt(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},zi=(i,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=i.$watchers$,e.$attrsToReflect$=[];const s=i.prototype.connectedCallback,n=i.prototype.disconnectedCallback;return Object.assign(i.prototype,{__registerHost(){pr(this,e)},connectedCallback(){hr(this),s&&s.call(this)},disconnectedCallback(){fr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,lr(i,e)},Wi=new WeakMap,Lt=i=>Wi.get(i),pr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Li(i,e,t.$listeners$),Wi.set(i,e)},Fe=(i,t)=>t in i,lt=(i,t)=>(0,console.error)(i,t),At=new Map,gr=[],Ye=[],Fi=[],$r=(i,t)=>e=>{i.push(e),Gt||(Gt=!0,t&&m.$flags$&4?vr(Zt):m.raf(Zt))},qe=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){lt(e)}i.length=0},Zt=()=>{qe(Ye),qe(Fi),(Gt=Ye.length>0)&&m.raf(Zt)},vr=i=>In().then(i),mr=$r(Fi,!0),yr=(i={})=>{const{content:t="",title:e,attributes:s=[]}=i;let n="",r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...s];return e&&(n=`<title>${e}</title>`),`<svg ${r.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},br=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function _r(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class wr{constructor(t){this.voca_component=t,this.voca_added=_r(new Date)}}const xr="telia-vst{display:none}",Sr=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Jn(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new wr(this.dataTrackingId))}render(){return F(ce,null)}static get style(){return xr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Yi(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Sr);break}})}Yi();function Kt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Ar(){if(typeof Kt().vocadsIcons!==void 0)return Kt().vocadsIcons}function Cr(){return Kt().vocadsIconsRegistered}const Er=".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}",kr=zi(class extends Pi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Cr()&&this.name){const i=Ar();return i[this.name]?i[this.name].svg:""}return this.name&&console.warn(this.name,"Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"),""}render(){let i=this.getSvgString(),t=[{name:"viewBox",value:"0 0 64 64"}];this.allyTitle?t=[...t,{name:"role",value:"img"}]:t=[...t,{name:"aria-hidden",value:"true"}];const e=yr({content:br(i),attributes:t,title:this.allyTitle});return F(ce,{class:`telia-icon telia-icon--${this.size}`},F("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),F("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Er}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Or(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,kr);break;case"telia-vst":customElements.get(t)||Yi();break}})}Or();var Tr=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Lr=(i,t,e,s)=>{for(var n=s>1?void 0:s?Pr(t,e):t,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=(s?o(t,e,n):o(n))||n);return s&&n&&Tr(t,e,n),n};const qi=Ei(S);class It extends qi{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Pn(this),this.optionsRef=bt(),this.optionsTriggerRef=bt(),this._onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)}}addOption(t){return this.options.addOption(t)}removeOption(t){return this.options.removeOption(t)}_onToggleOptionsMenuClick(){this.optionsIsVisible=!this.optionsIsVisible}_onMinimizeClick(){this.application.trigger?this.application.trigger.toggleActive():this.notify("widget-minimize",{widgetId:this.application.id})}notify(t,e={}){window!=null&&window.parent&&window.parent.postMessage({type:t,data:e},"*")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onClickOutside)}render(){var a,l,c;const t=this.application.branding(),e=(a=t==null?void 0:t.graphics)==null?void 0:a.logotype,s=this.application.texts,n=s.get("widget-header.header","ACE Widget"),r=this.application.settings.components.conversation,o=(c=(l=r==null?void 0:r.properties)==null?void 0:l.chat)==null?void 0:c.isThirdPartyWidget;return b` <div class="widget-header">
429
429
  ${e?b` <img
430
430
  src=${e}
431
431
  class="logotype"
@@ -579,4 +579,4 @@
579
579
  cursor: default;
580
580
  pointer-events: none;
581
581
  }
582
- `];Pr([H()],It.prototype,"optionsIsVisible",2);exports.WidgetHeader=It;exports.default=It;
582
+ `];Lr([H()],It.prototype,"optionsIsVisible",2);exports.WidgetHeader=It;exports.default=It;
@@ -2155,7 +2155,22 @@ class T extends S {
2155
2155
  );
2156
2156
  return;
2157
2157
  }
2158
- this.active = !this.active, this.active ? (this.application.appendToDOM(), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.widgetActive$.next(!1), this.showTrigger());
2158
+ this.active = !this.active, this.active ? (this.application.appendToDOM(), this.notify("widget-set-active", {
2159
+ widgetId: this.application.id,
2160
+ active: !0
2161
+ }), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.notify("widget-set-active", {
2162
+ widgetId: this.application.id,
2163
+ active: !1
2164
+ }), this.widgetActive$.next(!1), this.showTrigger());
2165
+ }
2166
+ notify(t, e = {}) {
2167
+ window != null && window.parent && window.parent.postMessage(
2168
+ {
2169
+ type: t,
2170
+ data: e
2171
+ },
2172
+ "*"
2173
+ );
2159
2174
  }
2160
2175
  _applyBranding() {
2161
2176
  var t;
@@ -2646,7 +2661,7 @@ class ne extends S {
2646
2661
  render() {
2647
2662
  var s, n;
2648
2663
  const t = this.application.settings.components.conversation;
2649
- return ((n = (s = t == null ? void 0 : t.properties) == null ? void 0 : s.chat) == null ? void 0 : n.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === se.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), b`<div class="widget-container" ${_t(this.wrapperRef)}>
2664
+ return ((n = (s = t == null ? void 0 : t.properties) == null ? void 0 : s.chat) == null ? void 0 : n.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === se.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), b`<div class="widget-container" ${_t(this.wrapperRef)}>
2650
2665
  ${vn(this.nodes, (r) => r)}
2651
2666
  </div>`;
2652
2667
  }
@@ -2849,10 +2864,13 @@ customElements.get("ace-trigger") || customElements.define("ace-trigger", T);
2849
2864
  customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Ei);
2850
2865
  customElements.get("ace-wrapper") || customElements.define("ace-wrapper", ne);
2851
2866
  customElements.get("ace-widget") || customElements.define("ace-widget", at);
2852
- const kn = () => crypto.randomUUID();
2853
- class On {
2867
+ const kn = () => "10000000-1000-4000-8000-100000000000".replace(
2868
+ /[018]/g,
2869
+ (i) => (+i ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +i / 4).toString(16)
2870
+ ), On = () => typeof crypto.randomUUID == "function" ? crypto.randomUUID() : kn();
2871
+ class Tn {
2854
2872
  constructor(t, e, s, n, r, o, a = !0) {
2855
- this.label = t, this.icon = e, this.onClick = s, this.closeOnClick = n, this.key = r, this.update = new kt(), this.id = kn(), this._controller = o, this.enabled = a;
2873
+ this.label = t, this.icon = e, this.onClick = s, this.closeOnClick = n, this.key = r, this.update = new kt(), this.id = On(), this._controller = o, this.enabled = a;
2856
2874
  }
2857
2875
  updateLabel(t) {
2858
2876
  this.label = t, this.update.next();
@@ -2867,7 +2885,7 @@ class On {
2867
2885
  return this.update.asObservable();
2868
2886
  }
2869
2887
  }
2870
- class Tn {
2888
+ class Pn {
2871
2889
  constructor(t) {
2872
2890
  this._options = [], this._subscription = null, this._host = t, t.addController(this);
2873
2891
  }
@@ -2877,7 +2895,7 @@ class Tn {
2877
2895
  this._subscription && this._subscription.unsubscribe(), this._options = [];
2878
2896
  }
2879
2897
  addOption(t) {
2880
- const e = new On(
2898
+ const e = new Tn(
2881
2899
  t.label,
2882
2900
  t.icon,
2883
2901
  t.onClick,
@@ -3001,7 +3019,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3001
3019
  ael: (i, t, e, s) => i.addEventListener(t, e, s),
3002
3020
  rel: (i, t, e, s) => i.removeEventListener(t, e, s),
3003
3021
  ce: (i, t) => new CustomEvent(i, t)
3004
- }, Pn = /* @__PURE__ */ (() => {
3022
+ }, Ln = /* @__PURE__ */ (() => {
3005
3023
  let i = !1;
3006
3024
  try {
3007
3025
  A.addEventListener("e", null, Object.defineProperty({}, "passive", {
@@ -3012,7 +3030,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3012
3030
  } catch {
3013
3031
  }
3014
3032
  return i;
3015
- })(), Ln = (i) => Promise.resolve(i), In = /* @__PURE__ */ (() => {
3033
+ })(), In = (i) => Promise.resolve(i), Rn = /* @__PURE__ */ (() => {
3016
3034
  try {
3017
3035
  return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
3018
3036
  } catch {
@@ -3020,23 +3038,23 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3020
3038
  return !1;
3021
3039
  })(), Pi = (i, t, e, s) => {
3022
3040
  e && e.map(([n, r, o]) => {
3023
- const a = Un(i, n), l = Rn(t, o), c = Mn(n);
3041
+ const a = Mn(i, n), l = Un(t, o), c = jn(n);
3024
3042
  m.ael(a, r, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => m.rel(a, r, l, c));
3025
3043
  });
3026
- }, Rn = (i, t) => (e) => {
3044
+ }, Un = (i, t) => (e) => {
3027
3045
  try {
3028
3046
  D.lazyLoad || i.$hostElement$[t](e);
3029
3047
  } catch (s) {
3030
3048
  lt(s);
3031
3049
  }
3032
- }, Un = (i, t) => t & 4 ? A : t & 8 ? Pt : t & 16 ? A.body : i, Mn = (i) => Pn ? {
3050
+ }, Mn = (i, t) => t & 4 ? A : t & 8 ? Pt : t & 16 ? A.body : i, jn = (i) => Ln ? {
3033
3051
  passive: (i & 1) !== 0,
3034
3052
  capture: (i & 2) !== 0
3035
3053
  } : (i & 2) !== 0, Ue = "http://www.w3.org/1999/xlink", M = (i, t = "") => () => {
3036
- }, Me = /* @__PURE__ */ new WeakMap(), jn = (i, t, e) => {
3054
+ }, Me = /* @__PURE__ */ new WeakMap(), Hn = (i, t, e) => {
3037
3055
  let s = At.get(i);
3038
- In && e ? (s = s || new CSSStyleSheet(), s.replace(t)) : s = t, At.set(i, s);
3039
- }, Hn = (i, t, e, s) => {
3056
+ Rn && e ? (s = s || new CSSStyleSheet(), s.replace(t)) : s = t, At.set(i, s);
3057
+ }, Nn = (i, t, e, s) => {
3040
3058
  let n = Li(t, e), r = At.get(n);
3041
3059
  if (i = i.nodeType === 11 ? i : A, r)
3042
3060
  if (typeof r == "string") {
@@ -3046,10 +3064,10 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3046
3064
  } else
3047
3065
  i.adoptedStyleSheets.includes(r) || (i.adoptedStyleSheets = [...i.adoptedStyleSheets, r]);
3048
3066
  return n;
3049
- }, Nn = (i) => {
3050
- const t = i.$cmpMeta$, e = i.$hostElement$, s = t.$flags$, n = M("attachStyles", t.$tagName$), r = Hn(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, i.$modeName$);
3067
+ }, Dn = (i) => {
3068
+ const t = i.$cmpMeta$, e = i.$hostElement$, s = t.$flags$, n = M("attachStyles", t.$tagName$), r = Nn(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, i.$modeName$);
3051
3069
  s & 10 && (e["s-sc"] = r, e.classList.add(r + "-h"), s & 2 && e.classList.add(r + "-s")), n();
3052
- }, Li = (i, t) => "sc-" + (t && i.$flags$ & 32 ? i.$tagName$ + "-" + t : i.$tagName$), Dn = (i) => pr.map((t) => t(i)).find((t) => !!t), je = {}, Bn = "http://www.w3.org/2000/svg", zn = "http://www.w3.org/1999/xhtml", Fn = (i) => i != null, ae = (i) => (i = typeof i, i === "object" || i === "function"), W = (i, t, ...e) => {
3070
+ }, Li = (i, t) => "sc-" + (t && i.$flags$ & 32 ? i.$tagName$ + "-" + t : i.$tagName$), Bn = (i) => gr.map((t) => t(i)).find((t) => !!t), je = {}, zn = "http://www.w3.org/2000/svg", Fn = "http://www.w3.org/1999/xhtml", Wn = (i) => i != null, ae = (i) => (i = typeof i, i === "object" || i === "function"), W = (i, t, ...e) => {
3053
3071
  let s = null, n = null, r = null, o = !1, a = !1, l = [];
3054
3072
  const c = (u) => {
3055
3073
  for (let d = 0; d < u.length; d++)
@@ -3063,7 +3081,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3063
3081
  }
3064
3082
  }
3065
3083
  if (typeof i == "function")
3066
- return i(t === null ? {} : t, l, Yn);
3084
+ return i(t === null ? {} : t, l, qn);
3067
3085
  const h = xt(i, null);
3068
3086
  return h.$attrs$ = t, l.length > 0 && (h.$children$ = l), h.$key$ = n, h.$name$ = r, h;
3069
3087
  }, xt = (i, t) => {
@@ -3075,9 +3093,9 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3075
3093
  $children$: null
3076
3094
  };
3077
3095
  return e.$attrs$ = null, e.$key$ = null, e.$name$ = null, e;
3078
- }, le = {}, Wn = (i) => i && i.$tag$ === le, Yn = {
3096
+ }, le = {}, Yn = (i) => i && i.$tag$ === le, qn = {
3079
3097
  forEach: (i, t) => i.map(He).forEach(t),
3080
- map: (i, t) => i.map(He).map(t).map(qn)
3098
+ map: (i, t) => i.map(He).map(t).map(Gn)
3081
3099
  }, He = (i) => ({
3082
3100
  vattrs: i.$attrs$,
3083
3101
  vchildren: i.$children$,
@@ -3085,7 +3103,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3085
3103
  vname: i.$name$,
3086
3104
  vtag: i.$tag$,
3087
3105
  vtext: i.$text$
3088
- }), qn = (i) => {
3106
+ }), Gn = (i) => {
3089
3107
  if (typeof i.vtag == "function") {
3090
3108
  const e = Object.assign({}, i.vattrs);
3091
3109
  return i.vkey && (e.key = i.vkey), i.vname && (e.name = i.vname), W(i.vtag, e, ...i.vchildren || []);
@@ -3124,7 +3142,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3124
3142
  a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, c = !0), s == null || s === !1 ? (s !== !1 || i.getAttribute(t) === "") && (c ? i.removeAttributeNS(Ue, t) : i.removeAttribute(t)) : (!o || r & 4 || n) && !l && (s = s === !0 ? "" : s, c ? i.setAttributeNS(Ue, t, s) : i.setAttribute(t, s));
3125
3143
  }
3126
3144
  }
3127
- }, Gn = /\s/, De = (i) => i ? i.split(Gn) : [], Ii = (i, t, e, s) => {
3145
+ }, Zn = /\s/, De = (i) => i ? i.split(Zn) : [], Ii = (i, t, e, s) => {
3128
3146
  const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, r = i && i.$attrs$ || je, o = t.$attrs$ || je;
3129
3147
  for (s in r)
3130
3148
  s in o || Ne(n, s, r[s], void 0, e, t.$flags$);
@@ -3143,7 +3161,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3143
3161
  else if (n.$flags$ & 1)
3144
3162
  o = n.$elm$ = A.createTextNode("");
3145
3163
  else {
3146
- if (y || (y = n.$tag$ === "svg"), o = n.$elm$ = A.createElementNS(y ? Bn : zn, n.$flags$ & 2 ? "slot-fb" : n.$tag$), y && n.$tag$ === "foreignObject" && (y = !1), Ii(null, n, y), Fn(B) && o["s-si"] !== B && o.classList.add(o["s-si"] = B), n.$children$)
3164
+ if (y || (y = n.$tag$ === "svg"), o = n.$elm$ = A.createElementNS(y ? zn : Fn, n.$flags$ & 2 ? "slot-fb" : n.$tag$), y && n.$tag$ === "foreignObject" && (y = !1), Ii(null, n, y), Wn(B) && o["s-si"] !== B && o.classList.add(o["s-si"] = B), n.$children$)
3147
3165
  for (r = 0; r < n.$children$.length; ++r)
3148
3166
  a = St(i, n, r, o), a && o.appendChild(a);
3149
3167
  n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
@@ -3164,7 +3182,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3164
3182
  }, Ui = (i, t, e, s, n) => {
3165
3183
  for (; t <= e; ++t)
3166
3184
  (s = i[t]) && (n = s.$elm$, Ni(s), wt = !0, n["s-ol"] ? n["s-ol"].remove() : nt(n, !0), n.remove());
3167
- }, Zn = (i, t, e, s) => {
3185
+ }, Kn = (i, t, e, s) => {
3168
3186
  let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], h = t[l], u = s.length - 1, d = s[0], f = s[u], $, g;
3169
3187
  for (; n <= l && r <= u; )
3170
3188
  if (c == null)
@@ -3195,7 +3213,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3195
3213
  }, ut = (i, t) => i.$tag$ === t.$tag$ ? i.$tag$ === "slot" ? i.$name$ === t.$name$ : i.$key$ === t.$key$ : !1, ce = (i) => i && i["s-ol"] || i, Mi = (i) => (i["s-ol"] ? i["s-ol"] : i).parentNode, z = (i, t) => {
3196
3214
  const e = t.$elm$ = i.$elm$, s = i.$children$, n = t.$children$, r = t.$tag$, o = t.$text$;
3197
3215
  let a;
3198
- o === null ? (y = r === "svg" ? !0 : r === "foreignObject" ? !1 : y, r === "slot" || Ii(i, t, y), s !== null && n !== null ? Zn(e, s, t, n) : n !== null ? (i.$text$ !== null && (e.textContent = ""), Ri(e, null, t, n, 0, n.length - 1)) : s !== null && Ui(s, 0, s.length - 1), y && r === "svg" && (y = !1)) : (a = e["s-cr"]) ? a.parentNode.textContent = o : i.$text$ !== o && (e.data = o);
3216
+ o === null ? (y = r === "svg" ? !0 : r === "foreignObject" ? !1 : y, r === "slot" || Ii(i, t, y), s !== null && n !== null ? Kn(e, s, t, n) : n !== null ? (i.$text$ !== null && (e.textContent = ""), Ri(e, null, t, n, 0, n.length - 1)) : s !== null && Ui(s, 0, s.length - 1), y && r === "svg" && (y = !1)) : (a = e["s-cr"]) ? a.parentNode.textContent = o : i.$text$ !== o && (e.data = o);
3199
3217
  }, ji = (i) => {
3200
3218
  let t = i.childNodes, e, s, n, r, o, a;
3201
3219
  for (s = 0, n = t.length; s < n; s++)
@@ -3231,8 +3249,8 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3231
3249
  }
3232
3250
  }, Be = (i, t) => i.nodeType === 1 ? i.getAttribute("slot") === null && t === "" || i.getAttribute("slot") === t : i["s-sn"] === t ? !0 : t === "", Ni = (i) => {
3233
3251
  i.$attrs$ && i.$attrs$.ref && i.$attrs$.ref(null), i.$children$ && i.$children$.map(Ni);
3234
- }, Kn = (i, t) => {
3235
- const e = i.$hostElement$, s = i.$cmpMeta$, n = i.$vnode$ || xt(null, null), r = Wn(t) ? t : W(null, null, t);
3252
+ }, Xn = (i, t) => {
3253
+ const e = i.$hostElement$, s = i.$cmpMeta$, n = i.$vnode$ || xt(null, null), r = Yn(t) ? t : W(null, null, t);
3236
3254
  Tt = e.tagName, s.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, s.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = e[o])), r.$tag$ = null, r.$flags$ |= 4, i.$vnode$ = r, r.$elm$ = n.$elm$ = e.shadowRoot || e, B = e["s-sc"], ki = e["s-cr"], Oi = (s.$flags$ & 1) !== 0, wt = !1, z(n, r);
3237
3255
  {
3238
3256
  if (m.$flags$ |= 1, oe) {
@@ -3253,37 +3271,37 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3253
3271
  }
3254
3272
  wt && ji(r.$elm$), m.$flags$ &= -2, x.length = 0;
3255
3273
  }
3256
- }, Xn = (i) => i, Qn = (i, t, e) => {
3257
- const s = Xn(i);
3274
+ }, Qn = (i) => i, Jn = (i, t, e) => {
3275
+ const s = Qn(i);
3258
3276
  return {
3259
- emit: (n) => Jn(s, t, {
3277
+ emit: (n) => Vn(s, t, {
3260
3278
  bubbles: !!(e & 4),
3261
3279
  composed: !!(e & 2),
3262
3280
  cancelable: !!(e & 1),
3263
3281
  detail: n
3264
3282
  })
3265
3283
  };
3266
- }, Jn = (i, t, e) => {
3284
+ }, Vn = (i, t, e) => {
3267
3285
  const s = m.ce(t, e);
3268
3286
  return i.dispatchEvent(s), s;
3269
- }, Vn = (i, t) => {
3270
- }, Di = (i, t) => (i.$flags$ |= 16, Vn(i, i.$ancestorComponent$), vr(() => tr(i, t))), tr = (i, t) => {
3287
+ }, tr = (i, t) => {
3288
+ }, Di = (i, t) => (i.$flags$ |= 16, tr(i, i.$ancestorComponent$), mr(() => er(i, t))), er = (i, t) => {
3271
3289
  const e = i.$hostElement$, s = M("scheduleUpdate", i.$cmpMeta$.$tagName$), n = e;
3272
3290
  let r;
3273
- return t ? r = Y(n, "componentWillLoad") : r = Y(n, "componentWillUpdate"), r = ze(r, () => Y(n, "componentWillRender")), s(), ze(r, () => er(i, n, t));
3274
- }, er = async (i, t, e) => {
3291
+ return t ? r = Y(n, "componentWillLoad") : r = Y(n, "componentWillUpdate"), r = ze(r, () => Y(n, "componentWillRender")), s(), ze(r, () => ir(i, n, t));
3292
+ }, ir = async (i, t, e) => {
3275
3293
  const s = i.$hostElement$, n = M("update", i.$cmpMeta$.$tagName$);
3276
- s["s-rc"], e && Nn(i);
3294
+ s["s-rc"], e && Dn(i);
3277
3295
  const r = M("render", i.$cmpMeta$.$tagName$);
3278
- ir(i, t, s), r(), n(), sr(i);
3279
- }, ir = (i, t, e) => {
3296
+ sr(i, t, s), r(), n(), nr(i);
3297
+ }, sr = (i, t, e) => {
3280
3298
  try {
3281
- Re = t, t = t.render && t.render(), i.$flags$ &= -17, i.$flags$ |= 2, (D.hasRenderFn || D.reflect) && (D.vdomRender || D.reflect) && (D.hydrateServerSide || Kn(i, t));
3299
+ Re = t, t = t.render && t.render(), i.$flags$ &= -17, i.$flags$ |= 2, (D.hasRenderFn || D.reflect) && (D.vdomRender || D.reflect) && (D.hydrateServerSide || Xn(i, t));
3282
3300
  } catch (a) {
3283
3301
  lt(a, i.$hostElement$);
3284
3302
  }
3285
3303
  return Re = null, null;
3286
- }, sr = (i) => {
3304
+ }, nr = (i) => {
3287
3305
  const t = i.$cmpMeta$.$tagName$, e = i.$hostElement$, s = M("postUpdate", t), n = e;
3288
3306
  i.$ancestorComponent$, Y(n, "componentDidRender"), i.$flags$ & 64 ? (Y(n, "componentDidUpdate"), s()) : (i.$flags$ |= 64, Y(n, "componentDidLoad"), s());
3289
3307
  }, Y = (i, t, e) => {
@@ -3293,9 +3311,9 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3293
3311
  } catch (s) {
3294
3312
  lt(s);
3295
3313
  }
3296
- }, ze = (i, t) => i && i.then ? i.then(t) : t(), nr = (i, t) => i != null && !ae(i) ? t & 4 ? i === "false" ? !1 : i === "" || !!i : t & 2 ? parseFloat(i) : t & 1 ? String(i) : i : i, rr = (i, t) => Lt(i).$instanceValues$.get(t), or = (i, t, e, s) => {
3314
+ }, ze = (i, t) => i && i.then ? i.then(t) : t(), rr = (i, t) => i != null && !ae(i) ? t & 4 ? i === "false" ? !1 : i === "" || !!i : t & 2 ? parseFloat(i) : t & 1 ? String(i) : i : i, or = (i, t) => Lt(i).$instanceValues$.get(t), ar = (i, t, e, s) => {
3297
3315
  const n = Lt(i), r = i, o = n.$instanceValues$.get(t), a = n.$flags$, l = r;
3298
- e = nr(e, s.$members$[t][0]);
3316
+ e = rr(e, s.$members$[t][0]);
3299
3317
  const c = Number.isNaN(o) && Number.isNaN(e);
3300
3318
  if (e !== o && !c) {
3301
3319
  n.$instanceValues$.set(t, e);
@@ -3317,17 +3335,17 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3317
3335
  }
3318
3336
  }
3319
3337
  }
3320
- }, ar = (i, t, e) => {
3338
+ }, lr = (i, t, e) => {
3321
3339
  if (t.$members$) {
3322
3340
  i.watchers && (t.$watchers$ = i.watchers);
3323
3341
  const s = Object.entries(t.$members$), n = i.prototype;
3324
3342
  s.map(([r, [o]]) => {
3325
3343
  (o & 31 || o & 32) && Object.defineProperty(n, r, {
3326
3344
  get() {
3327
- return rr(this, r);
3345
+ return or(this, r);
3328
3346
  },
3329
3347
  set(a) {
3330
- or(this, r, a, t);
3348
+ ar(this, r, a, t);
3331
3349
  },
3332
3350
  configurable: !0,
3333
3351
  enumerable: !0
@@ -3354,32 +3372,32 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3354
3372
  }
3355
3373
  }
3356
3374
  return i;
3357
- }, lr = async (i, t, e, s, n) => {
3375
+ }, cr = async (i, t, e, s, n) => {
3358
3376
  if (!(t.$flags$ & 32) && (n = i.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
3359
3377
  let o = n.style;
3360
- typeof o != "string" && (o = o[t.$modeName$ = Dn(i)]);
3378
+ typeof o != "string" && (o = o[t.$modeName$ = Bn(i)]);
3361
3379
  const a = Li(e, t.$modeName$);
3362
3380
  if (!At.has(a)) {
3363
3381
  const l = M("registerStyles", e.$tagName$);
3364
- jn(a, o, !!(e.$flags$ & 1)), l();
3382
+ Hn(a, o, !!(e.$flags$ & 1)), l();
3365
3383
  }
3366
3384
  }
3367
3385
  t.$ancestorComponent$, (() => Di(t, !0))();
3368
- }, cr = (i) => {
3369
3386
  }, hr = (i) => {
3387
+ }, ur = (i) => {
3370
3388
  if (!(m.$flags$ & 1)) {
3371
3389
  const t = Lt(i), e = t.$cmpMeta$, s = M("connectedCallback", e.$tagName$);
3372
- t.$flags$ & 1 ? (Pi(i, t, e.$listeners$), cr(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && ur(i), e.$members$ && Object.entries(e.$members$).map(([n, [r]]) => {
3390
+ t.$flags$ & 1 ? (Pi(i, t, e.$listeners$), hr(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && dr(i), e.$members$ && Object.entries(e.$members$).map(([n, [r]]) => {
3373
3391
  if (r & 31 && i.hasOwnProperty(n)) {
3374
3392
  const o = i[n];
3375
3393
  delete i[n], i[n] = o;
3376
3394
  }
3377
- }), lr(i, t, e)), s();
3395
+ }), cr(i, t, e)), s();
3378
3396
  }
3379
- }, ur = (i) => {
3397
+ }, dr = (i) => {
3380
3398
  const t = i["s-cr"] = A.createComment("");
3381
3399
  t["s-cn"] = !0, i.insertBefore(t, i.firstChild);
3382
- }, dr = (i) => {
3400
+ }, fr = (i) => {
3383
3401
  if (!(m.$flags$ & 1)) {
3384
3402
  const t = Lt(i);
3385
3403
  t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
@@ -3393,13 +3411,13 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3393
3411
  const s = i.prototype.connectedCallback, n = i.prototype.disconnectedCallback;
3394
3412
  return Object.assign(i.prototype, {
3395
3413
  __registerHost() {
3396
- fr(this, e);
3414
+ pr(this, e);
3397
3415
  },
3398
3416
  connectedCallback() {
3399
- hr(this), s && s.call(this);
3417
+ ur(this), s && s.call(this);
3400
3418
  },
3401
3419
  disconnectedCallback() {
3402
- dr(this), n && n.call(this);
3420
+ fr(this), n && n.call(this);
3403
3421
  },
3404
3422
  __attachShadow() {
3405
3423
  this.attachShadow({
@@ -3407,8 +3425,8 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3407
3425
  delegatesFocus: !!(e.$flags$ & 16)
3408
3426
  });
3409
3427
  }
3410
- }), i.is = e.$tagName$, ar(i, e);
3411
- }, zi = /* @__PURE__ */ new WeakMap(), Lt = (i) => zi.get(i), fr = (i, t) => {
3428
+ }), i.is = e.$tagName$, lr(i, e);
3429
+ }, zi = /* @__PURE__ */ new WeakMap(), Lt = (i) => zi.get(i), pr = (i, t) => {
3412
3430
  const e = {
3413
3431
  $flags$: 0,
3414
3432
  $hostElement$: i,
@@ -3416,8 +3434,8 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3416
3434
  $instanceValues$: /* @__PURE__ */ new Map()
3417
3435
  };
3418
3436
  return Pi(i, e, t.$listeners$), zi.set(i, e);
3419
- }, Fe = (i, t) => t in i, lt = (i, t) => (0, console.error)(i, t), At = /* @__PURE__ */ new Map(), pr = [], We = [], Fi = [], gr = (i, t) => (e) => {
3420
- i.push(e), qt || (qt = !0, t && m.$flags$ & 4 ? $r(Gt) : m.raf(Gt));
3437
+ }, Fe = (i, t) => t in i, lt = (i, t) => (0, console.error)(i, t), At = /* @__PURE__ */ new Map(), gr = [], We = [], Fi = [], $r = (i, t) => (e) => {
3438
+ i.push(e), qt || (qt = !0, t && m.$flags$ & 4 ? vr(Gt) : m.raf(Gt));
3421
3439
  }, Ye = (i) => {
3422
3440
  for (let t = 0; t < i.length; t++)
3423
3441
  try {
@@ -3428,7 +3446,7 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3428
3446
  i.length = 0;
3429
3447
  }, Gt = () => {
3430
3448
  Ye(We), Ye(Fi), (qt = We.length > 0) && m.raf(Gt);
3431
- }, $r = (i) => Ln().then(i), vr = /* @__PURE__ */ gr(Fi, !0), mr = (i = {}) => {
3449
+ }, vr = (i) => In().then(i), mr = /* @__PURE__ */ $r(Fi, !0), yr = (i = {}) => {
3432
3450
  const { content: t = "", title: e, attributes: s = [] } = i;
3433
3451
  let n = "", r = [
3434
3452
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
@@ -3436,27 +3454,27 @@ const Pt = typeof window < "u" ? window : {}, A = Pt.document || { head: {} }, T
3436
3454
  ...s
3437
3455
  ];
3438
3456
  return e && (n = `<title>${e}</title>`), `<svg ${r.map((a) => `${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`;
3439
- }, yr = (i) => i.replace(/<(\/?)svg([^>]*)>/g, "").trim();
3440
- function br(i) {
3457
+ }, br = (i) => i.replace(/<(\/?)svg([^>]*)>/g, "").trim();
3458
+ function _r(i) {
3441
3459
  return `${i.getFullYear()}.${i.getMonth() + 1}`;
3442
3460
  }
3443
- class _r {
3461
+ class wr {
3444
3462
  constructor(t) {
3445
- this.voca_component = t, this.voca_added = br(/* @__PURE__ */ new Date());
3463
+ this.voca_component = t, this.voca_added = _r(/* @__PURE__ */ new Date());
3446
3464
  }
3447
3465
  }
3448
- const wr = "telia-vst{display:none}", xr = /* @__PURE__ */ Bi(class extends Ti {
3466
+ const xr = "telia-vst{display:none}", Sr = /* @__PURE__ */ Bi(class extends Ti {
3449
3467
  constructor() {
3450
- super(), this.__registerHost(), this.vocaInternalUStats = Qn(this, "vocaInternalUStats", 7);
3468
+ super(), this.__registerHost(), this.vocaInternalUStats = Jn(this, "vocaInternalUStats", 7);
3451
3469
  }
3452
3470
  connectedCallback() {
3453
- this.vocaInternalUStats.emit(new _r(this.dataTrackingId));
3471
+ this.vocaInternalUStats.emit(new wr(this.dataTrackingId));
3454
3472
  }
3455
3473
  render() {
3456
3474
  return W(le, null);
3457
3475
  }
3458
3476
  static get style() {
3459
- return wr;
3477
+ return xr;
3460
3478
  }
3461
3479
  }, [0, "telia-vst", {
3462
3480
  dataTrackingId: [1, "data-tracking-id"]
@@ -3467,7 +3485,7 @@ function Wi() {
3467
3485
  ["telia-vst"].forEach((t) => {
3468
3486
  switch (t) {
3469
3487
  case "telia-vst":
3470
- customElements.get(t) || customElements.define(t, xr);
3488
+ customElements.get(t) || customElements.define(t, Sr);
3471
3489
  break;
3472
3490
  }
3473
3491
  });
@@ -3476,14 +3494,14 @@ Wi();
3476
3494
  function Zt() {
3477
3495
  return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
3478
3496
  }
3479
- function Sr() {
3497
+ function Ar() {
3480
3498
  if (typeof Zt().vocadsIcons !== void 0)
3481
3499
  return Zt().vocadsIcons;
3482
3500
  }
3483
- function Ar() {
3501
+ function Cr() {
3484
3502
  return Zt().vocadsIconsRegistered;
3485
3503
  }
3486
- const Cr = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", Er = /* @__PURE__ */ Bi(class extends Ti {
3504
+ const Er = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", kr = /* @__PURE__ */ Bi(class extends Ti {
3487
3505
  constructor() {
3488
3506
  super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
3489
3507
  }
@@ -3495,8 +3513,8 @@ const Cr = ".telia-icon{display:inline-block}.telia-icon__container{display:bloc
3495
3513
  getSvgString() {
3496
3514
  if (this.svg)
3497
3515
  return this.svg;
3498
- if (Ar() && this.name) {
3499
- const i = Sr();
3516
+ if (Cr() && this.name) {
3517
+ const i = Ar();
3500
3518
  return i[this.name] ? i[this.name].svg : "";
3501
3519
  }
3502
3520
  return this.name && console.warn(this.name, "Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"), "";
@@ -3507,15 +3525,15 @@ const Cr = ".telia-icon{display:inline-block}.telia-icon__container{display:bloc
3507
3525
  ...t,
3508
3526
  { name: "aria-hidden", value: "true" }
3509
3527
  ];
3510
- const e = mr({
3511
- content: yr(i),
3528
+ const e = yr({
3529
+ content: br(i),
3512
3530
  attributes: t,
3513
3531
  title: this.allyTitle
3514
3532
  });
3515
3533
  return W(le, { class: `telia-icon telia-icon--${this.size}` }, W("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: e }), W("telia-vst", { dataTrackingId: this.dataTrackingId }));
3516
3534
  }
3517
3535
  static get style() {
3518
- return Cr;
3536
+ return Er;
3519
3537
  }
3520
3538
  }, [0, "telia-icon", {
3521
3539
  name: [1],
@@ -3524,13 +3542,13 @@ const Cr = ".telia-icon{display:inline-block}.telia-icon__container{display:bloc
3524
3542
  allyTitle: [1, "ally-title"],
3525
3543
  dataTestid: [1, "data-testid"]
3526
3544
  }]);
3527
- function kr() {
3545
+ function Or() {
3528
3546
  if (typeof customElements > "u")
3529
3547
  return;
3530
3548
  ["telia-icon", "telia-vst"].forEach((t) => {
3531
3549
  switch (t) {
3532
3550
  case "telia-icon":
3533
- customElements.get(t) || customElements.define(t, Er);
3551
+ customElements.get(t) || customElements.define(t, kr);
3534
3552
  break;
3535
3553
  case "telia-vst":
3536
3554
  customElements.get(t) || Wi();
@@ -3538,16 +3556,16 @@ function kr() {
3538
3556
  }
3539
3557
  });
3540
3558
  }
3541
- kr();
3542
- var Or = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Pr = (i, t, e, s) => {
3543
- for (var n = s > 1 ? void 0 : s ? Tr(t, e) : t, r = i.length - 1, o; r >= 0; r--)
3559
+ Or();
3560
+ var Tr = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, Lr = (i, t, e, s) => {
3561
+ for (var n = s > 1 ? void 0 : s ? Pr(t, e) : t, r = i.length - 1, o; r >= 0; r--)
3544
3562
  (o = i[r]) && (n = (s ? o(t, e, n) : o(n)) || n);
3545
- return s && n && Or(t, e, n), n;
3563
+ return s && n && Tr(t, e, n), n;
3546
3564
  };
3547
3565
  const Yi = Ci(S);
3548
3566
  class qi extends Yi {
3549
3567
  constructor() {
3550
- super(...arguments), this.optionsIsVisible = !1, this.options = new Tn(this), this.optionsRef = bt(), this.optionsTriggerRef = bt(), this._onClickOutside = (t) => {
3568
+ super(...arguments), this.optionsIsVisible = !1, this.options = new Pn(this), this.optionsRef = bt(), this.optionsTriggerRef = bt(), this._onClickOutside = (t) => {
3551
3569
  !this.optionsTriggerRef.value || !this.optionsRef.value || t.composedPath().includes(this.optionsTriggerRef.value) || t.composedPath().includes(this.optionsRef.value) || (this.optionsIsVisible = !1);
3552
3570
  };
3553
3571
  }
@@ -3561,7 +3579,18 @@ class qi extends Yi {
3561
3579
  this.optionsIsVisible = !this.optionsIsVisible;
3562
3580
  }
3563
3581
  _onMinimizeClick() {
3564
- this.application.trigger && this.application.trigger.toggleActive();
3582
+ this.application.trigger ? this.application.trigger.toggleActive() : this.notify("widget-minimize", {
3583
+ widgetId: this.application.id
3584
+ });
3585
+ }
3586
+ notify(t, e = {}) {
3587
+ window != null && window.parent && window.parent.postMessage(
3588
+ {
3589
+ type: t,
3590
+ data: e
3591
+ },
3592
+ "*"
3593
+ );
3565
3594
  }
3566
3595
  connectedCallback() {
3567
3596
  super.connectedCallback(), document.addEventListener("click", this._onClickOutside);
@@ -3741,7 +3770,7 @@ qi.styles = [
3741
3770
  }
3742
3771
  `
3743
3772
  ];
3744
- Pr([
3773
+ Lr([
3745
3774
  H()
3746
3775
  ], qi.prototype, "optionsIsVisible", 2);
3747
3776
  export {
@@ -7,7 +7,7 @@ export declare class WidgetHeaderOption {
7
7
  key: string;
8
8
  private update;
9
9
  private _controller;
10
- id: `${string}-${string}-${string}-${string}-${string}`;
10
+ id: string;
11
11
  enabled: boolean;
12
12
  constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, key: string, controller: OptionsController, enabled?: boolean);
13
13
  updateLabel(value: string): void;
@@ -12,6 +12,7 @@ export declare class WidgetHeader extends WidgetElement {
12
12
  removeOption(option: WidgetHeaderOption): void;
13
13
  private _onToggleOptionsMenuClick;
14
14
  private _onMinimizeClick;
15
+ notify(type: string, data?: Record<string, any>): void;
15
16
  connectedCallback(): void;
16
17
  disconnectedCallback(): void;
17
18
  private _onClickOutside;
@@ -0,0 +1,14 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "export": "default",
5
+ "storage": {
6
+ "muteAudioNotifications": {
7
+ "category": "necessary",
8
+ "lifespan": "Browser session",
9
+ "purpose": "This storage value is used to store whether audio notifications are muted or enabled."
10
+ }
11
+ }
12
+ }
13
+ ]
14
+ }