@telia-ace/widget-components-widget-header-flamingo 1.1.116-rc.3 → 1.1.116
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-
|
|
1
|
+
"use strict";const r=async e=>{e.registerComponent("widget-header",Promise.resolve().then(()=>require("./widget-header-Bz85M3yj.js")))};module.exports=r;
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-widget-header-flamingo",
|
|
3
|
-
"version": "1.1.116
|
|
3
|
+
"version": "1.1.116",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "^3.0.2",
|
|
6
|
-
"@telia-ace/widget-core-flamingo": "1.1.116
|
|
6
|
+
"@telia-ace/widget-core-flamingo": "1.1.116",
|
|
7
7
|
"@teliads/components": "^22.1.1",
|
|
8
8
|
"@teliads/icons": "^8.4.0",
|
|
9
9
|
"@lit-labs/motion": "^1.0.8",
|
|
@@ -3351,7 +3351,7 @@ const Lt = typeof window < "u" ? window : {}, A = Lt.document || { head: {} }, F
|
|
|
3351
3351
|
}
|
|
3352
3352
|
return i;
|
|
3353
3353
|
}, dr = async (i, t, e, s, n) => {
|
|
3354
|
-
if (
|
|
3354
|
+
if ((t.$flags$ & 32) === 0 && (n = i.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
|
|
3355
3355
|
let o = n.style;
|
|
3356
3356
|
typeof o != "string" && (o = o[t.$modeName$ = Wn(i)]);
|
|
3357
3357
|
const a = Di(e, t.$modeName$);
|
|
@@ -3363,7 +3363,7 @@ const Lt = typeof window < "u" ? window : {}, A = Lt.document || { head: {} }, F
|
|
|
3363
3363
|
t.$ancestorComponent$, Qi(t, !0);
|
|
3364
3364
|
}, fr = (i) => {
|
|
3365
3365
|
}, pr = (i) => {
|
|
3366
|
-
if (
|
|
3366
|
+
if ((m.$flags$ & 1) === 0) {
|
|
3367
3367
|
const t = Rt(i), e = t.$cmpMeta$, s = j("connectedCallback", e.$tagName$);
|
|
3368
3368
|
t.$flags$ & 1 ? (zi(i, t, e.$listeners$), fr(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && gr(i), e.$members$ && Object.entries(e.$members$).map(([n, [r]]) => {
|
|
3369
3369
|
if (r & 31 && i.hasOwnProperty(n)) {
|
|
@@ -3376,7 +3376,7 @@ const Lt = typeof window < "u" ? window : {}, A = Lt.document || { head: {} }, F
|
|
|
3376
3376
|
const t = i["s-cr"] = A.createComment("");
|
|
3377
3377
|
t["s-cn"] = !0, i.insertBefore(t, i.firstChild);
|
|
3378
3378
|
}, vr = (i) => {
|
|
3379
|
-
if (
|
|
3379
|
+
if ((m.$flags$ & 1) === 0) {
|
|
3380
3380
|
const t = Rt(i);
|
|
3381
3381
|
t.$rmListeners$ && (t.$rmListeners$.map((e) => e()), t.$rmListeners$ = void 0);
|
|
3382
3382
|
}
|
|
@@ -455,7 +455,7 @@
|
|
|
455
455
|
:host {
|
|
456
456
|
display: block;
|
|
457
457
|
}
|
|
458
|
-
`];let K=me;ce([_({attribute:!0})],K.prototype,"name");ce([B()],K.prototype,"widget");ce([B()],K.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",bt);customElements.get("ace-trigger")||customElements.define("ace-trigger",C);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Qt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",ot);customElements.get("ace-widget")||customElements.define("ace-widget",K);const Pn=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),In=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Pn();class Ln{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 Pt,this.id=In(),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 Rn{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 Ln(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=js(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 F={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 z,Bi,Lt,Hi=!1,St=!1,ue=!1,y=!1,We=null,Jt=!1;const Rt=typeof window<"u"?window:{},A=Rt.document||{head:{}},Fi=Rt.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)},Un=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Mn=i=>Promise.resolve(i),jn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),zi=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Bn(i,n),l=Nn(t,o),c=Hn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Nn=(i,t)=>e=>{try{F.lazyLoad||i.$hostElement$[t](e)}catch(s){ht(s)}},Bn=(i,t)=>t&4?A:t&8?Rt:t&16?A.body:i,Hn=i=>Un?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,qe="http://www.w3.org/1999/xlink",j=(i,t="")=>()=>{},Ge=new WeakMap,Fn=(i,t,e)=>{let s=Ct.get(i);jn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Ct.set(i,s)},zn=(i,t,e,s)=>{let n=Di(t,e),r=Ct.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=Ge.get(i),a;o||Ge.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=j("attachStyles",t.$tagName$),r=zn(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()},Di=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Wn=i=>mr.map(t=>t(i)).find(t=>!!t),Ye={},qn="http://www.w3.org/2000/svg",Gn="http://www.w3.org/1999/xhtml",Yn=i=>i!=null,he=i=>(i=typeof i,i==="object"||i==="function"),q=(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"&&!he(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?At(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,Kn);const u=At(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},At=(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},de={},Zn=i=>i&&i.$tag$===de,Kn={forEach:(i,t)=>i.map(Ze).forEach(t),map:(i,t)=>i.map(Ze).map(t).map(Xn)},Ze=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Xn=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),q(i.vtag,e,...i.vchildren||[])}const t=At(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ke=(i,t,e,s,n,r)=>{if(e!==s){let o=Ve(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Xe(e),u=Xe(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):Ve(Rt,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=he(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(qe,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(qe,t,s):i.setAttribute(t,s))}}},Qn=/\s/,Xe=i=>i?i.split(Qn):[],Wi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ye,o=t.$attrs$||Ye;for(s in r)s in o||Ke(n,s,r[s],void 0,e,t.$flags$);for(s in o)Ke(n,s,r[s],o[s],e,t.$flags$)},kt=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Hi||(ue=!0,n.$tag$==="slot"&&(z&&s.classList.add(z+"-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?qn:Gn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Wi(null,n,y),Yn(z)&&o["s-si"]!==z&&o.classList.add(o["s-si"]=z),n.$children$)for(r=0;r<n.$children$.length;++r)a=kt(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Lt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Bi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&at(i.$elm$,!1)),o},at=(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"]!==Lt&&n["s-ol"]&&(Yi(n).insertBefore(n,fe(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ue=!0),t&&at(n,t)}m.$flags$&=-2},qi=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Lt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=kt(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,fe(t))))},Gi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Xi(s),St=!0,n["s-ol"]?n["s-ol"].remove():at(n,!0),n.remove())},Jn=(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],v,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(pt(c,d))D(c,d),c=t[++n],d=s[++r];else if(pt(u,f))D(u,f),u=t[--l],f=s[--h];else if(pt(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&at(c.$elm$.parentNode,!1),D(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if(pt(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&at(u.$elm$.parentNode,!1),D(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$?v=kt(t&&t[r],e,o,i):(D(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=kt(t&&t[r],e,r,i),d=s[++r]),v&&Yi(c.$elm$).insertBefore(v,fe(c.$elm$))}n>l?qi(i,s[h+1]==null?null:s[h+1].$elm$,e,s,r,h):r>h&&Gi(t,n,l)},pt=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,fe=i=>i&&i["s-ol"]||i,Yi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,D=(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"||Wi(i,t,y),s!==null&&n!==null?Jn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),qi(e,null,t,n,0,n.length-1)):s!==null&&Gi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Zi=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}}Zi(e)}},x=[],Ki=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"]&&(Qe(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),St=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Qe(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&&Ki(t)}},Qe=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Xi=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Xi)},Vn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||At(null,null),r=Zn(t)?t:q(null,null,t);Lt=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,z=e["s-sc"],Bi=e["s-cr"],Hi=(s.$flags$&1)!==0,St=!1,D(n,r);{if(m.$flags$|=1,ue){Ki(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)}St&&Zi(r.$elm$),m.$flags$&=-2,x.length=0}},tr=i=>i,er=(i,t,e)=>{const s=tr(i);return{emit:n=>ir(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},ir=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},sr=(i,t)=>{},Qi=(i,t)=>(i.$flags$|=16,sr(i,i.$ancestorComponent$),_r(()=>nr(i,t))),nr=(i,t)=>{const e=i.$hostElement$,s=j("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=G(n,"componentWillLoad"):r=G(n,"componentWillUpdate"),r=Je(r,()=>G(n,"componentWillRender")),s(),Je(r,()=>rr(i,n,t))},rr=async(i,t,e)=>{const s=i.$hostElement$,n=j("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Dn(i);const r=j("render",i.$cmpMeta$.$tagName$);or(i,t,s),r(),n(),ar(i)},or=(i,t,e)=>{try{We=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(F.hasRenderFn||F.reflect)&&(F.vdomRender||F.reflect)&&(F.hydrateServerSide||Vn(i,t))}catch(a){ht(a,i.$hostElement$)}return We=null,null},ar=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=j("postUpdate",t),n=e;i.$ancestorComponent$,G(n,"componentDidRender"),i.$flags$&64?(G(n,"componentDidUpdate"),s()):(i.$flags$|=64,G(n,"componentDidLoad"),s())},G=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){ht(s)}},Je=(i,t)=>i&&i.then?i.then(t):t(),lr=(i,t)=>i!=null&&!he(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,cr=(i,t)=>Ut(i).$instanceValues$.get(t),ur=(i,t,e,s)=>{const n=Ut(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=lr(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){ht(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Qi(n,!1)}}}},hr=(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 cr(this,r)},set(a){ur(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},dr=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$=Wn(i)]);const a=Di(e,t.$modeName$);if(!Ct.has(a)){const l=j("registerStyles",e.$tagName$);Fn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Qi(t,!0)},fr=i=>{},pr=i=>{if(!(m.$flags$&1)){const t=Ut(i),e=t.$cmpMeta$,s=j("connectedCallback",e.$tagName$);t.$flags$&1?(zi(i,t,e.$listeners$),fr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&gr(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}}),dr(i,t,e)),s()}},gr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},vr=i=>{if(!(m.$flags$&1)){const t=Ut(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Ji=(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(){$r(this,e)},connectedCallback(){pr(this),s&&s.call(this)},disconnectedCallback(){vr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,hr(i,e)},Vi=new WeakMap,Ut=i=>Vi.get(i),$r=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return zi(i,e,t.$listeners$),Vi.set(i,e)},Ve=(i,t)=>t in i,ht=(i,t)=>(0,console.error)(i,t),Ct=new Map,mr=[],ti=[],ts=[],yr=(i,t)=>e=>{i.push(e),Jt||(Jt=!0,t&&m.$flags$&4?br(Vt):m.raf(Vt))},ei=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){ht(e)}i.length=0},Vt=()=>{ei(ti),ei(ts),(Jt=ti.length>0)&&m.raf(Vt)},br=i=>Mn().then(i),_r=yr(ts,!0),wr=(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>`},xr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function Sr(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class Ar{constructor(t){this.voca_component=t,this.voca_added=Sr(new Date)}}const kr="telia-vst{display:none}",Cr=Ji(class extends Fi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=er(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new Ar(this.dataTrackingId))}render(){return q(de,null)}static get style(){return kr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function es(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Cr);break}})}es();function te(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Er(){if(typeof te().vocadsIcons!==void 0)return te().vocadsIcons}function Or(){return te().vocadsIconsRegistered}const Tr=".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))}",Pr=Ji(class extends Fi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Or()&&this.name){const i=Er();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=wr({content:xr(i),attributes:t,title:this.allyTitle});return q(de,{class:`telia-icon telia-icon--${this.size}`},q("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),q("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Tr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Ir(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Pr);break;case"telia-vst":customElements.get(t)||es();break}})}Ir();var Lr=Object.defineProperty,Rr=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Lr(t,e,n),n};const ii=ji(S),ye=class ye extends ii{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Rn(this),this.optionsRef=wt(),this.optionsTriggerRef=wt(),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}),this.application.storage.set("open",!1))}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">
|
|
458
|
+
`];let K=me;ce([_({attribute:!0})],K.prototype,"name");ce([B()],K.prototype,"widget");ce([B()],K.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",bt);customElements.get("ace-trigger")||customElements.define("ace-trigger",C);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Qt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",ot);customElements.get("ace-widget")||customElements.define("ace-widget",K);const Pn=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),In=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Pn();class Ln{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 Pt,this.id=In(),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 Rn{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 Ln(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=js(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 F={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 z,Bi,Lt,Hi=!1,St=!1,ue=!1,y=!1,We=null,Jt=!1;const Rt=typeof window<"u"?window:{},A=Rt.document||{head:{}},Fi=Rt.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)},Un=(()=>{let i=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Mn=i=>Promise.resolve(i),jn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),zi=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Bn(i,n),l=Nn(t,o),c=Hn(n);m.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>m.rel(a,r,l,c))})},Nn=(i,t)=>e=>{try{F.lazyLoad||i.$hostElement$[t](e)}catch(s){ht(s)}},Bn=(i,t)=>t&4?A:t&8?Rt:t&16?A.body:i,Hn=i=>Un?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,qe="http://www.w3.org/1999/xlink",j=(i,t="")=>()=>{},Ge=new WeakMap,Fn=(i,t,e)=>{let s=Ct.get(i);jn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Ct.set(i,s)},zn=(i,t,e,s)=>{let n=Di(t,e),r=Ct.get(n);if(i=i.nodeType===11?i:A,r)if(typeof r=="string"){i=i.head||i;let o=Ge.get(i),a;o||Ge.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=j("attachStyles",t.$tagName$),r=zn(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()},Di=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Wn=i=>mr.map(t=>t(i)).find(t=>!!t),Ye={},qn="http://www.w3.org/2000/svg",Gn="http://www.w3.org/1999/xhtml",Yn=i=>i!=null,he=i=>(i=typeof i,i==="object"||i==="function"),q=(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"&&!he(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?At(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,Kn);const u=At(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},At=(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},de={},Zn=i=>i&&i.$tag$===de,Kn={forEach:(i,t)=>i.map(Ze).forEach(t),map:(i,t)=>i.map(Ze).map(t).map(Xn)},Ze=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Xn=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),q(i.vtag,e,...i.vchildren||[])}const t=At(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Ke=(i,t,e,s,n,r)=>{if(e!==s){let o=Ve(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Xe(e),u=Xe(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):Ve(Rt,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=he(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(qe,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(qe,t,s):i.setAttribute(t,s))}}},Qn=/\s/,Xe=i=>i?i.split(Qn):[],Wi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ye,o=t.$attrs$||Ye;for(s in r)s in o||Ke(n,s,r[s],void 0,e,t.$flags$);for(s in o)Ke(n,s,r[s],o[s],e,t.$flags$)},kt=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Hi||(ue=!0,n.$tag$==="slot"&&(z&&s.classList.add(z+"-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?qn:Gn,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),Wi(null,n,y),Yn(z)&&o["s-si"]!==z&&o.classList.add(o["s-si"]=z),n.$children$)for(r=0;r<n.$children$.length;++r)a=kt(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?y=!1:o.tagName==="foreignObject"&&(y=!0)}return o["s-hn"]=Lt,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Bi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&at(i.$elm$,!1)),o},at=(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"]!==Lt&&n["s-ol"]&&(Yi(n).insertBefore(n,fe(n)),n["s-ol"].remove(),n["s-ol"]=void 0,ue=!0),t&&at(n,t)}m.$flags$&=-2},qi=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===Lt&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=kt(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,fe(t))))},Gi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Xi(s),St=!0,n["s-ol"]?n["s-ol"].remove():at(n,!0),n.remove())},Jn=(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],v,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(pt(c,d))D(c,d),c=t[++n],d=s[++r];else if(pt(u,f))D(u,f),u=t[--l],f=s[--h];else if(pt(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&at(c.$elm$.parentNode,!1),D(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if(pt(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&at(u.$elm$.parentNode,!1),D(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$?v=kt(t&&t[r],e,o,i):(D(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=kt(t&&t[r],e,r,i),d=s[++r]),v&&Yi(c.$elm$).insertBefore(v,fe(c.$elm$))}n>l?qi(i,s[h+1]==null?null:s[h+1].$elm$,e,s,r,h):r>h&&Gi(t,n,l)},pt=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,fe=i=>i&&i["s-ol"]||i,Yi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,D=(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"||Wi(i,t,y),s!==null&&n!==null?Jn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),qi(e,null,t,n,0,n.length-1)):s!==null&&Gi(s,0,s.length-1),y&&r==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Zi=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}}Zi(e)}},x=[],Ki=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"]&&(Qe(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),St=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Qe(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&&Ki(t)}},Qe=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Xi=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Xi)},Vn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||At(null,null),r=Zn(t)?t:q(null,null,t);Lt=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,z=e["s-sc"],Bi=e["s-cr"],Hi=(s.$flags$&1)!==0,St=!1,D(n,r);{if(m.$flags$|=1,ue){Ki(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)}St&&Zi(r.$elm$),m.$flags$&=-2,x.length=0}},tr=i=>i,er=(i,t,e)=>{const s=tr(i);return{emit:n=>ir(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},ir=(i,t,e)=>{const s=m.ce(t,e);return i.dispatchEvent(s),s},sr=(i,t)=>{},Qi=(i,t)=>(i.$flags$|=16,sr(i,i.$ancestorComponent$),_r(()=>nr(i,t))),nr=(i,t)=>{const e=i.$hostElement$,s=j("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=G(n,"componentWillLoad"):r=G(n,"componentWillUpdate"),r=Je(r,()=>G(n,"componentWillRender")),s(),Je(r,()=>rr(i,n,t))},rr=async(i,t,e)=>{const s=i.$hostElement$,n=j("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Dn(i);const r=j("render",i.$cmpMeta$.$tagName$);or(i,t,s),r(),n(),ar(i)},or=(i,t,e)=>{try{We=t,t=t.render&&t.render(),i.$flags$&=-17,i.$flags$|=2,(F.hasRenderFn||F.reflect)&&(F.vdomRender||F.reflect)&&(F.hydrateServerSide||Vn(i,t))}catch(a){ht(a,i.$hostElement$)}return We=null,null},ar=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=j("postUpdate",t),n=e;i.$ancestorComponent$,G(n,"componentDidRender"),i.$flags$&64?(G(n,"componentDidUpdate"),s()):(i.$flags$|=64,G(n,"componentDidLoad"),s())},G=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){ht(s)}},Je=(i,t)=>i&&i.then?i.then(t):t(),lr=(i,t)=>i!=null&&!he(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,cr=(i,t)=>Ut(i).$instanceValues$.get(t),ur=(i,t,e,s)=>{const n=Ut(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=lr(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){ht(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Qi(n,!1)}}}},hr=(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 cr(this,r)},set(a){ur(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},dr=async(i,t,e,s,n)=>{if((t.$flags$&32)===0&&(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$=Wn(i)]);const a=Di(e,t.$modeName$);if(!Ct.has(a)){const l=j("registerStyles",e.$tagName$);Fn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Qi(t,!0)},fr=i=>{},pr=i=>{if((m.$flags$&1)===0){const t=Ut(i),e=t.$cmpMeta$,s=j("connectedCallback",e.$tagName$);t.$flags$&1?(zi(i,t,e.$listeners$),fr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&gr(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}}),dr(i,t,e)),s()}},gr=i=>{const t=i["s-cr"]=A.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},vr=i=>{if((m.$flags$&1)===0){const t=Ut(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Ji=(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(){$r(this,e)},connectedCallback(){pr(this),s&&s.call(this)},disconnectedCallback(){vr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,hr(i,e)},Vi=new WeakMap,Ut=i=>Vi.get(i),$r=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return zi(i,e,t.$listeners$),Vi.set(i,e)},Ve=(i,t)=>t in i,ht=(i,t)=>(0,console.error)(i,t),Ct=new Map,mr=[],ti=[],ts=[],yr=(i,t)=>e=>{i.push(e),Jt||(Jt=!0,t&&m.$flags$&4?br(Vt):m.raf(Vt))},ei=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){ht(e)}i.length=0},Vt=()=>{ei(ti),ei(ts),(Jt=ti.length>0)&&m.raf(Vt)},br=i=>Mn().then(i),_r=yr(ts,!0),wr=(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>`},xr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function Sr(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class Ar{constructor(t){this.voca_component=t,this.voca_added=Sr(new Date)}}const kr="telia-vst{display:none}",Cr=Ji(class extends Fi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=er(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new Ar(this.dataTrackingId))}render(){return q(de,null)}static get style(){return kr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function es(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Cr);break}})}es();function te(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Er(){if(typeof te().vocadsIcons!==void 0)return te().vocadsIcons}function Or(){return te().vocadsIconsRegistered}const Tr=".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))}",Pr=Ji(class extends Fi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Or()&&this.name){const i=Er();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=wr({content:xr(i),attributes:t,title:this.allyTitle});return q(de,{class:`telia-icon telia-icon--${this.size}`},q("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),q("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Tr}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Ir(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Pr);break;case"telia-vst":customElements.get(t)||es();break}})}Ir();var Lr=Object.defineProperty,Rr=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Lr(t,e,n),n};const ii=ji(S),ye=class ye extends ii{constructor(){super(...arguments),this.optionsIsVisible=!1,this.options=new Rn(this),this.optionsRef=wt(),this.optionsTriggerRef=wt(),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}),this.application.storage.set("open",!1))}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">
|
|
459
459
|
${e?b` <img
|
|
460
460
|
src=${e}
|
|
461
461
|
class="logotype"
|