@telia-ace/widget-components-widget-header-flamingo 1.1.120-rc.30 → 1.1.120-rc.31
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.
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const $t=globalThis,ee=$t.ShadowRoot&&($t.ShadyCSS===void 0||$t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ie=Symbol(),we=new WeakMap;let si=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ie)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(ee&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=we.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&we.set(e,t))}return t}toString(){return this.cssText}};const ts=i=>new si(typeof i=="string"?i:i+"",void 0,ie),H=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[r+1],i[0]);return new si(e,i,ie)},es=(i,t)=>{if(ee)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),n=$t.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)}},_e=ee?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ts(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is
|
|
9
|
+
*/const{is,defineProperty:ss,getOwnPropertyDescriptor:ns,getOwnPropertyNames:rs,getOwnPropertySymbols:os,getPrototypeOf:as}=Object,P=globalThis,xe=P.trustedTypes,ls=xe?xe.emptyScript:"",jt=P.reactiveElementPolyfillSupport,it=(i,t)=>i,yt={toAttribute(i,t){switch(t){case Boolean:i=i?ls:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},se=(i,t)=>!is(i,t),Se={attribute:!0,type:String,converter:yt,reflect:!1,useDefault:!1,hasChanged:se};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),P.litPropertyMetadata??(P.litPropertyMetadata=new WeakMap);let B=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Se){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(t,s,e);n!==void 0&&ss(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=ns(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:n,set(o){const a=n==null?void 0:n.call(this);r==null||r.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Se}static _$Ei(){if(this.hasOwnProperty(it("elementProperties")))return;const t=as(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(it("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(it("properties"))){const e=this.properties,s=[...rs(e),...os(e)];for(const n of s)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,n]of e)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const n=this._$Eu(e,s);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(_e(n))}else t!==void 0&&e.push(_e(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return es(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;const s=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,s);if(n!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:yt).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r,o;const s=this.constructor,n=s._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const a=s.getPropertyOptions(n),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:yt;this._$Em=n;const c=l.fromAttribute(e,a.type);this[n]=c??((o=this._$Ej)==null?void 0:o.get(n))??c,this._$Em=null}}requestUpdate(t,e,s){var n;if(t!==void 0){const r=this.constructor,o=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??se)(o,e)||s.useDefault&&s.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:n,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),r!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,o]of n){const{wrapped:a}=o,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,o,l)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var n;return(n=s.hostUpdated)==null?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};B.elementStyles=[],B.shadowRootOptions={mode:"open"},B[it("elementProperties")]=new Map,B[it("finalized")]=new Map,jt==null||jt({ReactiveElement:B}),(P.reactiveElementVersions??(P.reactiveElementVersions=[])).push("2.1.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const st=globalThis,
|
|
14
|
-
\f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const st=globalThis,bt=st.trustedTypes,Ae=bt?bt.createPolicy("lit-html",{createHTML:i=>i}):void 0,ni="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,ri="?"+T,cs=`<${ri}>`,j=document,rt=()=>j.createComment(""),ot=i=>i===null||typeof i!="object"&&typeof i!="function",ne=Array.isArray,us=i=>ne(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Nt=`[
|
|
14
|
+
\f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ke=/-->/g,Ce=/>/g,L=RegExp(`>|${Nt}(?:([^\\s"'>=/]+)(${Nt}*=${Nt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ee=/'/g,Oe=/"/g,oi=/^(?:script|style|textarea|title)$/i,hs=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),m=hs(1),N=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),Te=new WeakMap,R=j.createTreeWalker(j,129);function ai(i,t){if(!ne(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ae!==void 0?Ae.createHTML(t):t}const ds=(i,t)=>{const e=i.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",o=et;for(let a=0;a<e;a++){const l=i[a];let c,u,h=-1,d=0;for(;d<l.length&&(o.lastIndex=d,u=o.exec(l),u!==null);)d=o.lastIndex,o===et?u[1]==="!--"?o=ke:u[1]!==void 0?o=Ce:u[2]!==void 0?(oi.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=L):u[3]!==void 0&&(o=L):o===L?u[0]===">"?(o=n??et,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?L:u[3]==='"'?Oe:Ee):o===Oe||o===Ee?o=L:o===ke||o===Ce?o=et:(o=L,n=void 0);const f=o===L&&i[a+1].startsWith("/>")?" ":"";r+=o===et?l+cs:h>=0?(s.push(c),l.slice(0,h)+ni+l.slice(h)+T+f):l+T+(h===-2?a:f)}return[ai(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};let qt=class li{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,o=0;const a=t.length-1,l=this.parts,[c,u]=ds(t,e);if(this.el=li.createElement(c,s),R.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=R.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const h of n.getAttributeNames())if(h.endsWith(ni)){const d=u[o++],f=n.getAttribute(h).split(T),v=/([.?@])?(.*)/.exec(d);l.push({type:1,index:r,name:v[2],strings:f,ctor:v[1]==="."?ps:v[1]==="?"?gs:v[1]==="@"?vs:Tt}),n.removeAttribute(h)}else h.startsWith(T)&&(l.push({type:6,index:r}),n.removeAttribute(h));if(oi.test(n.tagName)){const h=n.textContent.split(T),d=h.length-1;if(d>0){n.textContent=bt?bt.emptyScript:"";for(let f=0;f<d;f++)n.append(h[f],rt()),R.nextNode(),l.push({type:2,index:++r});n.append(h[d],rt())}}}else if(n.nodeType===8)if(n.data===ri)l.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(T,h+1))!==-1;)l.push({type:7,index:r}),h+=T.length-1}r++}}static createElement(t,e){const s=j.createElement("template");return s.innerHTML=t,s}};function Z(i,t,e=i,s){var o,a;if(t===N)return t;let n=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const r=ot(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),r===void 0?n=void 0:(n=new r(i),n._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=n:e._$Cl=n),n!==void 0&&(t=Z(i,n._$AS(i,t.values),n,s)),t}class fs{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,n=((t==null?void 0:t.creationScope)??j).importNode(e,!0);R.currentNode=n;let r=R.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new ct(r,r.nextSibling,this,t):l.type===1?c=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(c=new $s(r,this,t)),this._$AV.push(c),l=s[++a]}o!==(l==null?void 0:l.index)&&(r=R.nextNode(),o++)}return R.currentNode=j,n}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class ct{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,n){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),ot(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):us(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=qt.createElement(ai(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const o=new fs(n,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Te.get(t.strings);return e===void 0&&Te.set(t.strings,e=new qt(t)),e}k(t){ne(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const r of t)n===e.length?e.push(s=new ct(this.O(rt()),this.O(rt()),this,this.options)):s=e[n],s._$AI(r),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class Tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,n){const r=this.strings;let o=!1;if(r===void 0)t=Z(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==N,o&&(this._$AH=t);else{const a=t;let l,c;for(t=r[0],l=0;l<r.length-1;l++)c=Z(this,a[s+l],e,l),c===N&&(c=this._$AH[l]),o||(o=!ot(c)||c!==this._$AH[l]),c===p?t=p:t!==p&&(t+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!n&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}let ps=class extends Tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}};class gs extends Tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class vs extends Tt{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??p)===N)return;const s=this._$AH,n=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class $s{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const Ft=st.litHtmlPolyfillSupport;Ft==null||Ft(qt,ct),(st.litHtmlVersions??(st.litHtmlVersions=[])).push("3.3.1");const ms=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let n=s._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=n=new ct(t.insertBefore(rt(),r),r,void 0,e??{})}return n._$AI(i),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const U=globalThis;let A=class extends
|
|
19
|
+
*/const U=globalThis;let A=class extends B{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ms(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return N}};var ii;A._$litElement$=!0,A.finalized=!0,(ii=U.litElementHydrateSupport)==null||ii.call(U,{LitElement:A});const Ht=U.litElementPolyfillSupport;Ht==null||Ht({LitElement:A});(U.litElementVersions??(U.litElementVersions=[])).push("4.2.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const ys={attribute:!0,type:String,converter:yt,reflect:!1,hasChanged:se},bs=(i=ys,t,e)=>{const{kind:s,metadata:n}=e;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),r.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,i)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(s==="setter"){const{name:o}=e;return function(a){const l=this[o];t.call(this,a),this.requestUpdate(o,l,i)}}throw Error("Unsupported decorator location: "+s)};function w(i){return(t,e)=>typeof e=="object"?bs(i,t,e):((s,n,r)=>{const o=n.hasOwnProperty(r);return n.constructor.createProperty(r,s),o?Object.getOwnPropertyDescriptor(n,r):void 0})(i,t,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const
|
|
31
|
+
*/const ws=i=>i.strings===void 0;/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const re={ATTRIBUTE:1,CHILD:2},oe=i=>(...t)=>({_$litDirective$:i,values:t});let ci=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/const nt=(i,t)=>{var s;const e=i._$AN;if(e===void 0)return!1;for(const n of e)(s=n._$AO)==null||s.call(n,t,!1),nt(n,t);return!0},
|
|
39
|
+
*/const nt=(i,t)=>{var s;const e=i._$AN;if(e===void 0)return!1;for(const n of e)(s=n._$AO)==null||s.call(n,t,!1),nt(n,t);return!0},wt=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while((e==null?void 0:e.size)===0)},ui=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),Ss(t)}};function _s(i){this._$AN!==void 0?(wt(this),this._$AM=i,ui(this)):this._$AM=i}function xs(i,t=!1,e=0){const s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(s))for(let r=e;r<s.length;r++)nt(s[r],!1),wt(s[r]);else s!=null&&(nt(s,!1),wt(s));else nt(this,i)}const Ss=i=>{i.type==re.CHILD&&(i._$AP??(i._$AP=xs),i._$AQ??(i._$AQ=_s))};class hi extends ci{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),ui(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,n;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(n=this.disconnected)==null||n.call(this)),e&&(nt(this,t),wt(this))}setValue(t){if(ws(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2020 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/const
|
|
43
|
+
*/const _t=()=>new As;let As=class{};const Bt=new WeakMap,xt=oe(class extends hi{render(i){return p}update(i,[t]){var s;const e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){if(this.isConnected||(i=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let e=Bt.get(t);e===void 0&&(e=new WeakMap,Bt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,t;return typeof this.G=="function"?(i=Bt.get(this.ht??globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Gt=function(i,t){return Gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,s){e.__proto__=s}||function(e,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])},Gt(i,t)};function V(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Gt(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ks(i,t,e,s){function n(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function a(u){try{c(s.next(u))}catch(h){o(h)}}function l(u){try{c(s.throw(u))}catch(h){o(h)}}function c(u){u.done?r(u.value):n(u.value).then(a,l)}c((s=s.apply(i,t||[])).next())})}function di(i,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(e=0)),e;)try{if(s=1,n&&(r=c[0]&2?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,n=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){e.label=c[1];break}if(c[0]===6&&e.label<r[1]){e.label=r[1],r=c;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(c);break}r[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(i,e)}catch(u){c=[6,u],n=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function X(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],s=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yt(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var s=e.call(i),n,r=[],o;try{for(;(t===void 0||t-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(e=s.return)&&e.call(s)}finally{if(o)throw o.error}}return r}function Kt(i,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++)(r||!(s in t))&&(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return i.concat(r||Array.prototype.slice.call(t))}function G(i){return this instanceof G?(this.v=i,this):new G(i)}function Cs(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=e.apply(i,t||[]),n,r=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(f){return function(v){return Promise.resolve(v).then(f,h)}}function a(f,v){s[f]&&(n[f]=function(g){return new Promise(function(pt,tt){r.push([f,g,pt,tt])>1||l(f,g)})},v&&(n[f]=v(n[f])))}function l(f,v){try{c(s[f](v))}catch(g){d(r[0][3],g)}}function c(f){f.value instanceof G?Promise.resolve(f.value.v).then(u,h):d(r[0][2],f)}function u(f){l("next",f)}function h(f){l("throw",f)}function d(f,v){f(v),r.shift(),r.length&&l(r[0][0],r[0][1])}}function Es(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=i[Symbol.asyncIterator],e;return t?t.call(i):(i=typeof X=="function"?X(i):i[Symbol.iterator](),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(r){e[r]=i[r]&&function(o){return new Promise(function(a,l){o=i[r](o),n(a,l,o.done,o.value)})}}function n(r,o,a,l){Promise.resolve(l).then(function(c){r({value:c,done:a})},o)}}function $(i){return typeof i=="function"}function fi(i){var t=function(s){Error.call(s),s.stack=new Error().stack},e=i(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var zt=fi(function(i){return function(e){i(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
44
44
|
`+e.map(function(s,n){return n+1+") "+s.toString()}).join(`
|
|
45
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function Qt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var Lt=function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,s,n,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=X(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if($(u))try{u()}catch(g){r=g instanceof Wt?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var d=X(h),f=d.next();!f.done;f=d.next()){var v=f.value;try{Ie(v)}catch(g){r=r??[],g instanceof Wt?r=Xt(Xt([],Zt(r)),Zt(g.errors)):r.push(g)}}}catch(g){s={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(s)throw s.error}}}if(r)throw new Wt(r)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ie(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Qt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&Qt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=function(){var t=new i;return t.closed=!0,t}(),i}(),vi=Lt.EMPTY;function $i(i){return i instanceof Lt||i&&"closed"in i&&$(i.remove)&&$(i.add)&&$(i.unsubscribe)}function Ie(i){$(i)?i():i.unsubscribe()}var Ps={Promise:void 0},Is={setTimeout:function(i,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];return setTimeout.apply(void 0,Xt([i,t],Zt(e)))},clearTimeout:function(i){return clearTimeout(i)},delegate:void 0};function mi(i){Is.setTimeout(function(){throw i})}function Le(){}function yt(i){i()}var ce=function(i){J(t,i);function t(e){var s=i.call(this)||this;return s.isStopped=!1,e?(s.destination=e,$i(e)&&e.add(s)):s.destination=Us,s}return t.create=function(e,s,n){return new Jt(e,s,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Lt),Ls=function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){vt(s)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){vt(s)}else vt(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){vt(e)}},i}(),Jt=function(i){J(t,i);function t(e,s,n){var r=i.call(this)||this,o;return $(e)||!e?o={next:e??void 0,error:s??void 0,complete:n??void 0}:o=e,r.destination=new Ls(o),r}return t}(ce);function vt(i){mi(i)}function Rs(i){throw i}var Us={closed:!0,next:Le,error:Rs,complete:Le},ue=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function yi(i){return i}function Ms(i){return i.length===0?yi:i.length===1?i[0]:function(e){return i.reduce(function(s,n){return n(s)},e)}}var _=function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,s){var n=this,r=Ns(t)?t:new Jt(t,e,s);return yt(function(){var o=n,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?n._subscribe(r):n._trySubscribe(r))}),r},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var s=this;return e=Re(e),new e(function(n,r){var o=new Jt({next:function(a){try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:n});s.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[ue]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ms(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=Re(t),new t(function(s,n){var r;e.subscribe(function(o){return r=o},function(o){return n(o)},function(){return s(r)})})},i.create=function(t){return new i(t)},i}();function Re(i){var t;return(t=i??Ps.Promise)!==null&&t!==void 0?t:Promise}function js(i){return i&&$(i.next)&&$(i.error)&&$(i.complete)}function Ns(i){return i&&i instanceof ce||js(i)&&$i(i)}function Fs(i){return $(i==null?void 0:i.lift)}function Rt(i){return function(t){if(Fs(t))return t.lift(function(e){try{return i(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function At(i,t,e,s,n){return new Bs(i,t,e,s,n)}var Bs=function(i){J(t,i);function t(e,s,n,r,o,a){var l=i.call(this,e)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){e.error(u)}}:i.prototype._next,l._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:i.prototype._error,l._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:i.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;i.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(ce),Hs=gi(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ht=function(i){J(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new Ue(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Hs},t.prototype.next=function(e){var s=this;yt(function(){var n,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=X(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var s=this;yt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var n=s.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;yt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,n=this,r=n.hasError,o=n.isStopped,a=n.observers;return r||o?vi:(this.currentObservers=null,a.push(e),new Lt(function(){s.currentObservers=null,Qt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,n=s.hasError,r=s.thrownError,o=s.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new _;return e.source=this,e},t.create=function(e,s){return new Ue(e,s)},t}(_),Ue=function(i){J(t,i);function t(e,s){var n=i.call(this)||this;return n.destination=e,n.source=s,n}return t.prototype.next=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.next)===null||n===void 0||n.call(s,e)},t.prototype.error=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.error)===null||n===void 0||n.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,n;return(n=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&n!==void 0?n:vi},t}(ht),bi=function(i){J(t,i);function t(e){var s=i.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=i.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,n=e.thrownError,r=e._value;if(s)throw n;return this._throwIfClosed(),r},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t}(ht),zs=new _(function(i){return i.complete()});function Ds(i){return i&&$(i.schedule)}function wi(i){return i[i.length-1]}function Ws(i){return Ds(wi(i))?i.pop():void 0}function qs(i,t){return typeof wi(i)=="number"?i.pop():t}var _i=function(i){return i&&typeof i.length=="number"&&typeof i!="function"};function xi(i){return $(i==null?void 0:i.then)}function Si(i){return $(i[ue])}function Ai(i){return Symbol.asyncIterator&&$(i==null?void 0:i[Symbol.asyncIterator])}function ki(i){return new TypeError("You provided "+(i!==null&&typeof i=="object"?"an invalid object":"'"+i+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Gs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ci=Gs();function Ei(i){return $(i==null?void 0:i[Ci])}function Oi(i){return Os(this,arguments,function(){var e,s,n,r;return pi(this,function(o){switch(o.label){case 0:e=i.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,G(e.read())];case 3:return s=o.sent(),n=s.value,r=s.done,r?[4,G(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,G(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ti(i){return $(i==null?void 0:i.getReader)}function V(i){if(i instanceof _)return i;if(i!=null){if(Si(i))return Ys(i);if(_i(i))return Ks(i);if(xi(i))return Zs(i);if(Ai(i))return Pi(i);if(Ei(i))return Xs(i);if(Ti(i))return Qs(i)}throw ki(i)}function Ys(i){return new _(function(t){var e=i[ue]();if($(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ks(i){return new _(function(t){for(var e=0;e<i.length&&!t.closed;e++)t.next(i[e]);t.complete()})}function Zs(i){return new _(function(t){i.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,mi)})}function Xs(i){return new _(function(t){var e,s;try{for(var n=X(i),r=n.next();!r.done;r=n.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}t.complete()})}function Pi(i){return new _(function(t){Js(i,t).catch(function(e){return t.error(e)})})}function Qs(i){return Pi(Oi(i))}function Js(i,t){var e,s,n,r;return Es(this,void 0,void 0,function(){var o,a;return pi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=Ts(i),l.label=1;case 1:return[4,e.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),n={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function M(i,t,e,s,n){s===void 0&&(s=0),n===void 0&&(n=!1);var r=t.schedule(function(){e(),n?i.add(this.schedule(null,s)):this.unsubscribe()},s);if(i.add(r),!n)return r}function Ii(i,t){return t===void 0&&(t=0),Rt(function(e,s){e.subscribe(At(s,function(n){return M(s,i,function(){return s.next(n)},t)},function(){return M(s,i,function(){return s.complete()},t)},function(n){return M(s,i,function(){return s.error(n)},t)}))})}function Li(i,t){return t===void 0&&(t=0),Rt(function(e,s){s.add(i.schedule(function(){return e.subscribe(s)},t))})}function Vs(i,t){return V(i).pipe(Li(t),Ii(t))}function tn(i,t){return V(i).pipe(Li(t),Ii(t))}function en(i,t){return new _(function(e){var s=0;return t.schedule(function(){s===i.length?e.complete():(e.next(i[s++]),e.closed||this.schedule())})})}function sn(i,t){return new _(function(e){var s;return M(e,t,function(){s=i[Ci](),M(e,t,function(){var n,r,o;try{n=s.next(),r=n.value,o=n.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return $(s==null?void 0:s.return)&&s.return()}})}function Ri(i,t){if(!i)throw new Error("Iterable cannot be null");return new _(function(e){M(e,t,function(){var s=i[Symbol.asyncIterator]();M(e,t,function(){s.next().then(function(n){n.done?e.complete():e.next(n.value)})},0,!0)})})}function nn(i,t){return Ri(Oi(i),t)}function rn(i,t){if(i!=null){if(Si(i))return Vs(i,t);if(_i(i))return en(i,t);if(xi(i))return tn(i,t);if(Ai(i))return Ri(i,t);if(Ei(i))return sn(i,t);if(Ti(i))return nn(i,t)}throw ki(i)}function on(i,t){return t?rn(i,t):V(i)}function an(i,t){return Rt(function(e,s){var n=0;e.subscribe(At(s,function(r){s.next(i.call(t,r,n++))}))})}function ln(i,t,e,s,n,r,o,a){var l=[],c=0,u=0,h=!1,d=function(){h&&!l.length&&!c&&t.complete()},f=function(g){return c<s?v(g):l.push(g)},v=function(g){c++;var gt=!1;V(e(g,u++)).subscribe(At(t,function(tt){t.next(tt)},function(){gt=!0},void 0,function(){if(gt)try{c--;for(var tt=function(){var Nt=l.shift();o||v(Nt)};l.length&&c<s;)tt();d()}catch(Nt){t.error(Nt)}}))};return i.subscribe(At(t,f,function(){h=!0,d()})),function(){}}function Ui(i,t,e){return e===void 0&&(e=1/0),$(t)?Ui(function(s,n){return an(function(r,o){return t(s,r,n,o)})(V(i(s,n)))},e):(typeof t=="number"&&(e=t),Rt(function(s,n){return ln(s,n,i,e)}))}function cn(i){return i===void 0&&(i=1/0),Ui(yi,i)}function un(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var e=Ws(i),s=qs(i,1/0),n=i;return n.length?n.length===1?V(n[0]):cn(s)(on(n,e)):zs}var hn=Object.defineProperty,dn=(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&&hn(t,e,n),n};const ve=class ve extends A{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),p}};ve.styles=[B`
|
|
45
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function Zt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var Pt=function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,s,n,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=X(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if($(u))try{u()}catch(g){r=g instanceof zt?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var d=X(h),f=d.next();!f.done;f=d.next()){var v=f.value;try{Pe(v)}catch(g){r=r??[],g instanceof zt?r=Kt(Kt([],Yt(r)),Yt(g.errors)):r.push(g)}}}catch(g){s={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(s)throw s.error}}}if(r)throw new zt(r)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Pe(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Zt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&Zt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=function(){var t=new i;return t.closed=!0,t}(),i}(),pi=Pt.EMPTY;function gi(i){return i instanceof Pt||i&&"closed"in i&&$(i.remove)&&$(i.add)&&$(i.unsubscribe)}function Pe(i){$(i)?i():i.unsubscribe()}var Os={Promise:void 0},Ts={setTimeout:function(i,t){for(var e=[],s=2;s<arguments.length;s++)e[s-2]=arguments[s];return setTimeout.apply(void 0,Kt([i,t],Yt(e)))},clearTimeout:function(i){return clearTimeout(i)},delegate:void 0};function vi(i){Ts.setTimeout(function(){throw i})}function Le(){}function mt(i){i()}var ae=function(i){V(t,i);function t(e){var s=i.call(this)||this;return s.isStopped=!1,e?(s.destination=e,gi(e)&&e.add(s)):s.destination=Is,s}return t.create=function(e,s,n){return new Xt(e,s,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Pt),Ps=function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(s){gt(s)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(s){gt(s)}else gt(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){gt(e)}},i}(),Xt=function(i){V(t,i);function t(e,s,n){var r=i.call(this)||this,o;return $(e)||!e?o={next:e??void 0,error:s??void 0,complete:n??void 0}:o=e,r.destination=new Ps(o),r}return t}(ae);function gt(i){vi(i)}function Ls(i){throw i}var Is={closed:!0,next:Le,error:Ls,complete:Le},le=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $i(i){return i}function Rs(i){return i.length===0?$i:i.length===1?i[0]:function(e){return i.reduce(function(s,n){return n(s)},e)}}var _=function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,s){var n=this,r=Ms(t)?t:new Xt(t,e,s);return mt(function(){var o=n,a=o.operator,l=o.source;r.add(a?a.call(r,l):l?n._subscribe(r):n._trySubscribe(r))}),r},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var s=this;return e=Ie(e),new e(function(n,r){var o=new Xt({next:function(a){try{t(a)}catch(l){r(l),o.unsubscribe()}},error:r,complete:n});s.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[le]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Rs(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=Ie(t),new t(function(s,n){var r;e.subscribe(function(o){return r=o},function(o){return n(o)},function(){return s(r)})})},i.create=function(t){return new i(t)},i}();function Ie(i){var t;return(t=i??Os.Promise)!==null&&t!==void 0?t:Promise}function Us(i){return i&&$(i.next)&&$(i.error)&&$(i.complete)}function Ms(i){return i&&i instanceof ae||Us(i)&&gi(i)}function js(i){return $(i==null?void 0:i.lift)}function Lt(i){return function(t){if(js(t))return t.lift(function(e){try{return i(e,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function St(i,t,e,s,n){return new Ns(i,t,e,s,n)}var Ns=function(i){V(t,i);function t(e,s,n,r,o,a){var l=i.call(this,e)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){e.error(u)}}:i.prototype._next,l._error=r?function(c){try{r(c)}catch(u){e.error(u)}finally{this.unsubscribe()}}:i.prototype._error,l._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:i.prototype._complete,l}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;i.prototype.unsubscribe.call(this),!s&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}(ae),Fs=fi(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ut=function(i){V(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var s=new Re(this,this);return s.operator=e,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Fs},t.prototype.next=function(e){var s=this;mt(function(){var n,r;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=X(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var s=this;mt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=e;for(var n=s.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;mt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var s=e.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var s=this,n=this,r=n.hasError,o=n.isStopped,a=n.observers;return r||o?pi:(this.currentObservers=null,a.push(e),new Pt(function(){s.currentObservers=null,Zt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var s=this,n=s.hasError,r=s.thrownError,o=s.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new _;return e.source=this,e},t.create=function(e,s){return new Re(e,s)},t}(_),Re=function(i){V(t,i);function t(e,s){var n=i.call(this)||this;return n.destination=e,n.source=s,n}return t.prototype.next=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.next)===null||n===void 0||n.call(s,e)},t.prototype.error=function(e){var s,n;(n=(s=this.destination)===null||s===void 0?void 0:s.error)===null||n===void 0||n.call(s,e)},t.prototype.complete=function(){var e,s;(s=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||s===void 0||s.call(e)},t.prototype._subscribe=function(e){var s,n;return(n=(s=this.source)===null||s===void 0?void 0:s.subscribe(e))!==null&&n!==void 0?n:pi},t}(ut),mi=function(i){V(t,i);function t(e){var s=i.call(this)||this;return s._value=e,s}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var s=i.prototype._subscribe.call(this,e);return!s.closed&&e.next(this._value),s},t.prototype.getValue=function(){var e=this,s=e.hasError,n=e.thrownError,r=e._value;if(s)throw n;return this._throwIfClosed(),r},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t}(ut),Hs=new _(function(i){return i.complete()});function Bs(i){return i&&$(i.schedule)}function yi(i){return i[i.length-1]}function zs(i){return Bs(yi(i))?i.pop():void 0}function Ds(i,t){return typeof yi(i)=="number"?i.pop():t}var bi=function(i){return i&&typeof i.length=="number"&&typeof i!="function"};function wi(i){return $(i==null?void 0:i.then)}function _i(i){return $(i[le])}function xi(i){return Symbol.asyncIterator&&$(i==null?void 0:i[Symbol.asyncIterator])}function Si(i){return new TypeError("You provided "+(i!==null&&typeof i=="object"?"an invalid object":"'"+i+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ws(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ai=Ws();function ki(i){return $(i==null?void 0:i[Ai])}function Ci(i){return Cs(this,arguments,function(){var e,s,n,r;return di(this,function(o){switch(o.label){case 0:e=i.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,G(e.read())];case 3:return s=o.sent(),n=s.value,r=s.done,r?[4,G(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,G(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ei(i){return $(i==null?void 0:i.getReader)}function J(i){if(i instanceof _)return i;if(i!=null){if(_i(i))return qs(i);if(bi(i))return Gs(i);if(wi(i))return Ys(i);if(xi(i))return Oi(i);if(ki(i))return Ks(i);if(Ei(i))return Zs(i)}throw Si(i)}function qs(i){return new _(function(t){var e=i[le]();if($(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Gs(i){return new _(function(t){for(var e=0;e<i.length&&!t.closed;e++)t.next(i[e]);t.complete()})}function Ys(i){return new _(function(t){i.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,vi)})}function Ks(i){return new _(function(t){var e,s;try{for(var n=X(i),r=n.next();!r.done;r=n.next()){var o=r.value;if(t.next(o),t.closed)return}}catch(a){e={error:a}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}t.complete()})}function Oi(i){return new _(function(t){Xs(i,t).catch(function(e){return t.error(e)})})}function Zs(i){return Oi(Ci(i))}function Xs(i,t){var e,s,n,r;return ks(this,void 0,void 0,function(){var o,a;return di(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),e=Es(i),l.label=1;case 1:return[4,e.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),n={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function M(i,t,e,s,n){s===void 0&&(s=0),n===void 0&&(n=!1);var r=t.schedule(function(){e(),n?i.add(this.schedule(null,s)):this.unsubscribe()},s);if(i.add(r),!n)return r}function Ti(i,t){return t===void 0&&(t=0),Lt(function(e,s){e.subscribe(St(s,function(n){return M(s,i,function(){return s.next(n)},t)},function(){return M(s,i,function(){return s.complete()},t)},function(n){return M(s,i,function(){return s.error(n)},t)}))})}function Pi(i,t){return t===void 0&&(t=0),Lt(function(e,s){s.add(i.schedule(function(){return e.subscribe(s)},t))})}function Qs(i,t){return J(i).pipe(Pi(t),Ti(t))}function Vs(i,t){return J(i).pipe(Pi(t),Ti(t))}function Js(i,t){return new _(function(e){var s=0;return t.schedule(function(){s===i.length?e.complete():(e.next(i[s++]),e.closed||this.schedule())})})}function tn(i,t){return new _(function(e){var s;return M(e,t,function(){s=i[Ai](),M(e,t,function(){var n,r,o;try{n=s.next(),r=n.value,o=n.done}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),function(){return $(s==null?void 0:s.return)&&s.return()}})}function Li(i,t){if(!i)throw new Error("Iterable cannot be null");return new _(function(e){M(e,t,function(){var s=i[Symbol.asyncIterator]();M(e,t,function(){s.next().then(function(n){n.done?e.complete():e.next(n.value)})},0,!0)})})}function en(i,t){return Li(Ci(i),t)}function sn(i,t){if(i!=null){if(_i(i))return Qs(i,t);if(bi(i))return Js(i,t);if(wi(i))return Vs(i,t);if(xi(i))return Li(i,t);if(ki(i))return tn(i,t);if(Ei(i))return en(i,t)}throw Si(i)}function nn(i,t){return t?sn(i,t):J(i)}function rn(i,t){return Lt(function(e,s){var n=0;e.subscribe(St(s,function(r){s.next(i.call(t,r,n++))}))})}function on(i,t,e,s,n,r,o,a){var l=[],c=0,u=0,h=!1,d=function(){h&&!l.length&&!c&&t.complete()},f=function(g){return c<s?v(g):l.push(g)},v=function(g){c++;var pt=!1;J(e(g,u++)).subscribe(St(t,function(tt){t.next(tt)},function(){pt=!0},void 0,function(){if(pt)try{c--;for(var tt=function(){var Mt=l.shift();o||v(Mt)};l.length&&c<s;)tt();d()}catch(Mt){t.error(Mt)}}))};return i.subscribe(St(t,f,function(){h=!0,d()})),function(){}}function Ii(i,t,e){return e===void 0&&(e=1/0),$(t)?Ii(function(s,n){return rn(function(r,o){return t(s,r,n,o)})(J(i(s,n)))},e):(typeof t=="number"&&(e=t),Lt(function(s,n){return on(s,n,i,e)}))}function an(i){return i===void 0&&(i=1/0),Ii($i,i)}function ln(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var e=zs(i),s=Ds(i,1/0),n=i;return n.length?n.length===1?J(n[0]):an(s)(nn(n,e)):Hs}var cn=Object.defineProperty,un=(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&&cn(t,e,n),n};const ge=class ge extends A{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),p}};ge.styles=[H`
|
|
46
46
|
:host {
|
|
47
47
|
position: fixed;
|
|
48
48
|
display: flex;
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
bottom: 20px;
|
|
59
59
|
left: 20px;
|
|
60
60
|
}
|
|
61
|
-
`];let
|
|
61
|
+
`];let At=ge;un([w({attribute:!0})],At.prototype,"anchor");const hn=new WeakMap;let Ue=0;const Dt=new Map,Me=new WeakSet,je=()=>new Promise(i=>requestAnimationFrame(i)),dn=[{transform:"translateX(100%) scale(0)",opacity:0}],Ne=(i,t)=>{const e=i-t;return e===0?void 0:e},Fe=(i,t)=>{const e=i/t;return e===1?void 0:e},Wt={left:(i,t)=>{const e=Ne(i,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(i,t)=>{const e=Ne(i,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(i,t)=>{let e;t===0&&(t=1,e={width:"1px"});const s=Fe(i,t);return{value:s,overrideFrom:e,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(i,t)=>{let e;t===0&&(t=1,e={height:"1px"});const s=Fe(i,t);return{value:s,overrideFrom:e,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},fn={duration:333,easing:"ease-in-out"},pn=["left","top","width","height","opacity","color","background"],He=new WeakMap;class gn extends hi{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===re.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.l=e})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return p}getController(){return hn.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var n;const s=this.u===void 0;return s&&(this.u=(n=t.options)==null?void 0:n.host,this.u.addController(this),this.u.updateComplete.then(r=>this.t=!0),this.element=t.element,He.set(this.element,this)),this.optionsOrCallback=e,(s||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=pn),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach(n=>{const r=e[n]??(Wt[n]?void 0:s[n]),o=Number(r);t[n]=isNaN(o)?r+"":o}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((s,n)=>{if(Array.isArray(s)){if(Array.isArray(n)&&n.length===s.length&&s.every((r,o)=>r===n[o]))return!1}else if(n===s)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await je;const e=this.O(),s=this.j(this.options.keyframeOptions,e),n=this.m();if(this.A!==void 0){const{from:r,to:o}=this.N(this.A,n,e);this.log("measured",[this.A,n,r,o]),t=this.calculateKeyframes(r,o)}else{const r=Dt.get(this.options.inId);if(r){Dt.delete(this.options.inId);const{from:o,to:a}=this.N(r,n,e);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Ue++,t.forEach(l=>l.zIndex=Ue)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&Dt.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await je(),(e=this.i)==null?void 0:e.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const n=this.m();this.log("stabilizing out");const r=this.A.left-n.left,o=this.A.top-n.top;getComputedStyle(this.element).position!=="static"||r===0&&o===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,s;t&&((s=(e=this.options).onComplete)==null||s.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const s=He.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=Me.has(this.u);return t||this.u.updateComplete.then(()=>{Me.add(this.u)}),t}j(t,e=this.O()){const s={...fn};return e.forEach(n=>Object.assign(s,n.options.keyframeOptions)),Object.assign(s,t),s}N(t,e,s){t={...t},e={...e};const n=s.map(a=>a.animatingProperties).filter(a=>a!==void 0);let r=1,o=1;return n.length>0&&(n.forEach(a=>{a.width&&(r/=a.width),a.height&&(o/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=r*t.left,e.left=r*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){const n={},r={};let o=!1;const a={};for(const l in e){const c=t[l],u=e[l];if(l in Wt){const h=Wt[l];if(c===void 0||u===void 0)continue;const d=h(c,u);d.transform!==void 0&&(a[l]=d.value,o=!0,n.transform=`${n.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(n,d.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,n[l]=c,r[l]=u)}return n.transformOrigin=r.transformOrigin=s?"center center":"top left",this.animatingProperties=a,o?[n,r]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const n=this.getController();n==null||n.add(this);try{await this.webAnimation.finished}catch{}n==null||n.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const vn=oe(gn),$n={svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M53.0318 24.8653L33.5318 44.3653C33.1256 44.7717 32.5745 45.0001 31.9999 45.0001C31.4253 45.0001 30.8742 44.7717 30.468 44.3653L10.968 24.8653C10.122 24.0193 10.122 22.6476 10.968 21.8015C11.8141 20.9555 13.1858 20.9555 14.0318 21.8015L31.9999 39.7696L49.968 21.8015C50.8141 20.9555 52.1858 20.9555 53.0318 21.8015C53.8779 22.6476 53.8779 24.0193 53.0318 24.8653Z"/></svg>'},mn={svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 36C15.7909 36 14 34.2091 14 32C14 29.7909 15.7909 28 18 28C20.2091 28 22 29.7909 22 32C22 34.2091 20.2091 36 18 36ZM28 32C28 34.2091 29.7909 36 32 36C34.2091 36 36 34.2091 36 32C36 29.7909 34.2091 28 32 28C29.7909 28 28 29.7909 28 32ZM46 36C43.7909 36 42 34.2091 42 32C42 29.7909 43.7909 28 46 28C48.2091 28 50 29.7909 50 32C50 34.2091 48.2091 36 46 36Z"/></svg>'},yn={name:"question",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>'};/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright 2018 Google LLC
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/const
|
|
65
|
+
*/const Be=oe(class extends ci{constructor(i){var t;if(super(i),i.type!==re.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var s,n;if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(t)}const e=i.element.classList;for(const r of this.st)r in t||(e.remove(r),this.st.delete(r));for(const r in t){const o=!!t[r];o===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(o?(e.add(r),this.st.add(r)):(e.remove(r),this.st.delete(r)))}return N}}),C=(i,t,e)=>{i&&e.style.setProperty(t,i)},Ri=(i,t)=>{var e,s,n,r,o,a,l,c,u;C((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),C((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),C((n=i.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),C((r=i.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t),C((o=i.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",t),C((a=i.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",t),C((l=i.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",t),C((c=i.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",t),C((u=i.colors)==null?void 0:u.focusColor,"--focus-color",t)};var bn=Object.defineProperty,ht=(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&&bn(t,e,n),n};const ve=class ve extends A{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=_t(),this.widgetActive$=new mi(!1),this.componentIsDestroyed$=new ut}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&&Ri(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 m` <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=>yn,{type:r,content:o}=s;switch(r){case"Telia":{const u=await n();return u?m`<telia-icon
|
|
66
66
|
class="trigger-icon"
|
|
67
67
|
svg=${u.svg}
|
|
68
68
|
size="lg"
|
|
69
69
|
></telia-icon>`:p}default:return p}}hideTrigger(){this.triggerVisible=!1}showTrigger(){this.triggerVisible=!0}render(){var t,e,s,n,r,o,a;return m`<div
|
|
70
|
-
class=${
|
|
71
|
-
${
|
|
70
|
+
class=${Be({"trigger-container":!0,hidden:!this.triggerVisible})}
|
|
71
|
+
${xt(this.containerRef)}
|
|
72
72
|
>
|
|
73
73
|
${!this.active&&((n=(s=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:s.other)!=null&&n.showButtonLabel)?m`
|
|
74
74
|
<button
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
aria-label="${this.application.settings.branding.other.buttonLabelText??"Widget trigger"}"
|
|
77
77
|
class="trigger-label"
|
|
78
78
|
@click=${this.toggleActive}
|
|
79
|
-
${
|
|
79
|
+
${vn({keyframeOptions:{},in:dn,stabilizeOut:!0,skipInitial:!1})}
|
|
80
80
|
>
|
|
81
81
|
${this.application.settings.branding.other.buttonLabelText??"Widget trigger"}
|
|
82
82
|
</button>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<button
|
|
86
86
|
type="button"
|
|
87
87
|
aria-label="${((a=(o=(r=this.application)==null?void 0:r.settings)==null?void 0:o.branding.other)==null?void 0:a.buttonLabelText)??"Widget trigger"}"
|
|
88
|
-
class=${
|
|
88
|
+
class=${Be({trigger:!0,active:this.active,rendered:this.loaded})}
|
|
89
89
|
@click=${this.toggleActive}
|
|
90
90
|
>
|
|
91
91
|
${this.icon}
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</svg>
|
|
118
118
|
</span>
|
|
119
119
|
</button>
|
|
120
|
-
</div>`}}
|
|
120
|
+
</div>`}};ve.styles=[H`
|
|
121
121
|
:host {
|
|
122
122
|
--voca-rem-multiplier: 0.625;
|
|
123
123
|
--trigger-label-bg: #f5e0ff;
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
.trigger-label:hover {
|
|
247
247
|
opacity: 0.8;
|
|
248
248
|
}
|
|
249
|
-
`];let E
|
|
249
|
+
`];let E=ve;ht([w({attribute:!1})],E.prototype,"application");ht([S()],E.prototype,"active");ht([S()],E.prototype,"triggerVisible");ht([S()],E.prototype,"loaded");ht([S()],E.prototype,"icon");var wn=Object.defineProperty,I=(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&&wn(t,e,n),n};const Ui=i=>{const e=class e extends i{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(n){this.properties=n}writeLayout(n){this.layout=n}writeContext(n){this.context=n}addChild(n){n.parent=this,this.nodes.push(n)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),this.application.mountComponent(this)}};e.styles=[H`
|
|
250
250
|
:host {
|
|
251
251
|
font-family: var(--font-family);
|
|
252
252
|
grid-column: span var(--width);
|
|
@@ -258,19 +258,19 @@
|
|
|
258
258
|
* {
|
|
259
259
|
box-sizing: border-box;
|
|
260
260
|
}
|
|
261
|
-
`];let t=e;return
|
|
261
|
+
`];let t=e;return I([w()],t.prototype,"properties"),I([w()],t.prototype,"context"),I([w()],t.prototype,"layout"),I([w()],t.prototype,"name"),I([w()],t.prototype,"type"),I([w({attribute:!1})],t.prototype,"application"),I([w({attribute:!1})],t.prototype,"parent"),t},$e=class $e extends Ui(A){render(){return m`Non resolved component`}};$e.styles=[H`
|
|
262
262
|
:host {
|
|
263
263
|
display: block;
|
|
264
264
|
}
|
|
265
|
-
`];let
|
|
265
|
+
`];let Qt=$e;/**
|
|
266
266
|
* @license
|
|
267
267
|
* Copyright 2021 Google LLC
|
|
268
268
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
269
|
-
*/function*
|
|
269
|
+
*/function*_n(i,t){if(i!==void 0){let e=0;for(const s of i)yield t(s,e++)}}var ce=(i=>(i.Inline="inline",i.Trigger="trigger",i))(ce||{}),z=(i=>(i.NonAuthenticated="non-authenticated",i.Authenticating="authenticating",i.Authenticated="authenticated",i.ChatEnded="chat-ended",i))(z||{});/**
|
|
270
270
|
* @license
|
|
271
271
|
* Copyright 2021 Google LLC
|
|
272
272
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
273
|
-
*/let
|
|
273
|
+
*/let xn=class extends Event{constructor(t,e,s,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=s,this.subscribe=n??!1}};/**
|
|
274
274
|
* @license
|
|
275
275
|
* Copyright 2021 Google LLC
|
|
276
276
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -278,17 +278,17 @@
|
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2021 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
|
-
*/class
|
|
281
|
+
*/class Sn{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:s}]of this.subscriptions)e(this.o,s)},t!==void 0&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}}/**
|
|
282
282
|
* @license
|
|
283
283
|
* Copyright 2021 Google LLC
|
|
284
284
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
285
|
-
*/let
|
|
285
|
+
*/let An=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}};class ze extends Sn{constructor(t,e,s){var n,r;super(e.context!==void 0?e.initialValue:s),this.onContextRequest=o=>{if(o.context!==this.context)return;const a=o.contextTarget??o.composedPath()[0];a!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,a,o.subscribe))},this.onProviderRequest=o=>{if(o.context!==this.context||(o.contextTarget??o.composedPath()[0])===this.host)return;const a=new Set;for(const[l,{consumerHost:c}]of this.subscriptions)a.has(l)||(a.add(l),c.dispatchEvent(new xn(this.context,c,l,!0)));o.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(r=(n=this.host).addController)==null||r.call(n,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new An(this.context,this.host))}}/**
|
|
286
286
|
* @license
|
|
287
287
|
* Copyright 2017 Google LLC
|
|
288
288
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
289
|
-
*/function
|
|
290
|
-
${
|
|
291
|
-
</div>`}};
|
|
289
|
+
*/function kn({context:i}){return(t,e)=>{const s=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(n){return s.get(this).setValue(n),t.set.call(this,n)},init(n){return s.set(this,new ze(this,{context:i,initialValue:n})),n}};{t.constructor.addInitializer(o=>{s.set(o,new ze(o,{context:i}))});const n=Object.getOwnPropertyDescriptor(t,e);let r;if(n===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=n.set;r={...n,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(t,e,r)}}}var Cn=Object.defineProperty,Mi=(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&&Cn(t,e,n),n};const En="application",me=class me extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=_t(),this.fullscreen=!1,this.isReady=new mi(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&Ri(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===ce.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")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),m`<div class="widget-container" ${xt(this.wrapperRef)}>
|
|
290
|
+
${_n(this.nodes,r=>r)}
|
|
291
|
+
</div>`}};me.styles=H`
|
|
292
292
|
:host {
|
|
293
293
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
294
294
|
--spacing-xs: 0.2rem;
|
|
@@ -453,11 +453,11 @@
|
|
|
453
453
|
:host(.expanded.embedded) {
|
|
454
454
|
animation: none;
|
|
455
455
|
}
|
|
456
|
-
`;let
|
|
456
|
+
`;let at=me;Mi([w({attribute:!0})],at.prototype,"fullscreen");Mi([w({attribute:!1}),kn({context:En})],at.prototype,"application");var On=Object.defineProperty,ue=(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&&On(t,e,n),n};const ye=class ye extends A{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return p;if(this.widget.renderStrategy===ce.Trigger){const t=new E;return t.application=this.widget,t}return this.widget.render()}};ye.styles=[H`
|
|
457
457
|
:host {
|
|
458
458
|
display: block;
|
|
459
459
|
}
|
|
460
|
-
`];let Q=be;he([w({attribute:!0})],Q.prototype,"name");he([S()],Q.prototype,"widget");he([S()],Q.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",kt);customElements.get("ace-trigger")||customElements.define("ace-trigger",E);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Vt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",lt);customElements.get("ace-widget")||customElements.define("ace-widget",Q);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 W,Fi,Ut,Bi=!1,Ct=!1,de=!1,b=!1,qe=null,te=!1;const Mt=typeof window<"u"?window:{},k=Mt.document||{head:{}},Hi=Mt.HTMLElement||class{},y={$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)},In=(()=>{let i=!1;try{k.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Ln=i=>Promise.resolve(i),Rn=(()=>{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=Mn(i,n),l=Un(t,o),c=jn(n);y.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,r,l,c))})},Un=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){ft(s)}},Mn=(i,t)=>t&4?k:t&8?Mt:t&16?k.body:i,jn=i=>In?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,Ge="http://www.w3.org/1999/xlink",F=(i,t="")=>()=>{},Ye=new WeakMap,Nn=(i,t,e)=>{let s=Tt.get(i);Rn&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Tt.set(i,s)},Fn=(i,t,e,s)=>{let n=Di(t,e),r=Tt.get(n);if(i=i.nodeType===11?i:k,r)if(typeof r=="string"){i=i.head||i;let o=Ye.get(i),a;o||Ye.set(i,o=new Set),o.has(n)||(a=k.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},Bn=i=>{const t=i.$cmpMeta$,e=i.$hostElement$,s=t.$flags$,n=F("attachStyles",t.$tagName$),r=Fn(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$),Hn=i=>gr.map(t=>t(i)).find(t=>!!t),Ke={},zn="http://www.w3.org/2000/svg",Dn="http://www.w3.org/1999/xhtml",Wn=i=>i!=null,fe=i=>(i=typeof i,i==="object"||i==="function"),Y=(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"&&!fe(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?Et(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,Gn);const u=Et(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},Et=(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},pe={},qn=i=>i&&i.$tag$===pe,Gn={forEach:(i,t)=>i.map(Ze).forEach(t),map:(i,t)=>i.map(Ze).map(t).map(Yn)},Ze=i=>({vattrs:i.$attrs$,vchildren:i.$children$,vkey:i.$key$,vname:i.$name$,vtag:i.$tag$,vtext:i.$text$}),Yn=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),Y(i.vtag,e,...i.vchildren||[])}const t=Et(i.vtag,i.vtext);return t.$attrs$=i.vattrs,t.$children$=i.vchildren,t.$key$=i.vkey,t.$name$=i.vname,t},Xe=(i,t,e,s,n,r)=>{if(e!==s){let o=ti(i,t),a=t.toLowerCase();if(t==="class"){const l=i.classList,c=Qe(e),u=Qe(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):ti(Mt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&y.rel(i,t,e,!1),s&&y.ael(i,t,s,!1);else{const l=fe(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(Ge,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(Ge,t,s):i.setAttribute(t,s))}}},Kn=/\s/,Qe=i=>i?i.split(Kn):[],Wi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ke,o=t.$attrs$||Ke;for(s in r)s in o||Xe(n,s,r[s],void 0,e,t.$flags$);for(s in o)Xe(n,s,r[s],o[s],e,t.$flags$)},Ot=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Bi||(de=!0,n.$tag$==="slot"&&(W&&s.classList.add(W+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=k.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=k.createTextNode("");else{if(b||(b=n.$tag$==="svg"),o=n.$elm$=k.createElementNS(b?zn:Dn,n.$flags$&2?"slot-fb":n.$tag$),b&&n.$tag$==="foreignObject"&&(b=!1),Wi(null,n,b),Wn(W)&&o["s-si"]!==W&&o.classList.add(o["s-si"]=W),n.$children$)for(r=0;r<n.$children$.length;++r)a=Ot(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?b=!1:o.tagName==="foreignObject"&&(b=!0)}return o["s-hn"]=Ut,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=Fi,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&&ct(i.$elm$,!1)),o},ct=(i,t)=>{y.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==Ut&&n["s-ol"]&&(Yi(n).insertBefore(n,ge(n)),n["s-ol"].remove(),n["s-ol"]=void 0,de=!0),t&&ct(n,t)}y.$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===Ut&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=Ot(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,ge(t))))},Gi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Xi(s),Ct=!0,n["s-ol"]?n["s-ol"].remove():ct(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],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($t(c,d))q(c,d),c=t[++n],d=s[++r];else if($t(u,f))q(u,f),u=t[--l],f=s[--h];else if($t(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&&ct(c.$elm$.parentNode,!1),q(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if($t(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&&ct(u.$elm$.parentNode,!1),q(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=Ot(t&&t[r],e,o,i):(q(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=Ot(t&&t[r],e,r,i),d=s[++r]),v&&Yi(c.$elm$).insertBefore(v,ge(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)},$t=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,ge=i=>i&&i["s-ol"]||i,Yi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,q=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(b=r==="svg"?!0:r==="foreignObject"?!1:b,r==="slot"||Wi(i,t,b),s!==null&&n!==null?Zn(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),b&&r==="svg"&&(b=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Ki=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}}Ki(e)}},x=[],Zi=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"]&&(Je(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),Ct=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Je(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&&Zi(t)}},Je=(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)},Xn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||Et(null,null),r=qn(t)?t:Y(null,null,t);Ut=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,W=e["s-sc"],Fi=e["s-cr"],Bi=(s.$flags$&1)!==0,Ct=!1,q(n,r);{if(y.$flags$|=1,de){Zi(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=k.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)}Ct&&Ki(r.$elm$),y.$flags$&=-2,x.length=0}},Qn=i=>i,Jn=(i,t,e)=>{const s=Qn(i);return{emit:n=>Vn(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},Vn=(i,t,e)=>{const s=y.ce(t,e);return i.dispatchEvent(s),s},tr=(i,t)=>{},Qi=(i,t)=>(i.$flags$|=16,tr(i,i.$ancestorComponent$),mr(()=>er(i,t))),er=(i,t)=>{const e=i.$hostElement$,s=F("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=K(n,"componentWillLoad"):r=K(n,"componentWillUpdate"),r=Ve(r,()=>K(n,"componentWillRender")),s(),Ve(r,()=>ir(i,n,t))},ir=async(i,t,e)=>{const s=i.$hostElement$,n=F("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Bn(i);const r=F("render",i.$cmpMeta$.$tagName$);sr(i,t,s),r(),n(),nr(i)},sr=(i,t,e)=>{try{qe=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){ft(a,i.$hostElement$)}return qe=null,null},nr=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=F("postUpdate",t),n=e;i.$ancestorComponent$,K(n,"componentDidRender"),i.$flags$&64?(K(n,"componentDidUpdate"),s()):(i.$flags$|=64,K(n,"componentDidLoad"),s())},K=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){ft(s)}},Ve=(i,t)=>i&&i.then?i.then(t):t(),rr=(i,t)=>i!=null&&!fe(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,or=(i,t)=>jt(i).$instanceValues$.get(t),ar=(i,t,e,s)=>{const n=jt(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){ft(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Qi(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){y.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)===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$=Hn(i)]);const a=Di(e,t.$modeName$);if(!Tt.has(a)){const l=F("registerStyles",e.$tagName$);Nn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Qi(t,!0)},ur=i=>{},hr=i=>{if((y.$flags$&1)===0){const t=jt(i),e=t.$cmpMeta$,s=F("connectedCallback",e.$tagName$);t.$flags$&1?(zi(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"]=k.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},fr=i=>{if((y.$flags$&1)===0){const t=jt(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(){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)},Vi=new WeakMap,jt=i=>Vi.get(i),pr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return zi(i,e,t.$listeners$),Vi.set(i,e)},ti=(i,t)=>t in i,ft=(i,t)=>(0,console.error)(i,t),Tt=new Map,gr=[],ei=[],ts=[],vr=(i,t)=>e=>{i.push(e),te||(te=!0,t&&y.$flags$&4?$r(ee):y.raf(ee))},ii=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){ft(e)}i.length=0},ee=()=>{ii(ei),ii(ts),(te=ei.length>0)&&y.raf(ee)},$r=i=>Ln().then(i),mr=vr(ts,!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 wr(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class _r{constructor(t){this.voca_component=t,this.voca_added=wr(new Date)}}const xr="telia-vst{display:none}",Sr=Ji(class extends Hi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Jn(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new _r(this.dataTrackingId))}render(){return Y(pe,null)}static get style(){return xr}},[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,Sr);break}})}es();function ie(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Ar(){if(typeof ie().vocadsIcons!==void 0)return ie().vocadsIcons}function kr(){return ie().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=Ji(class extends Hi{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(kr()&&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 Y(pe,{class:`telia-icon telia-icon--${this.size}`},Y("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),Y("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 Or(){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)||es();break}})}Or();const Tr=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),Pr=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Tr();class Ir{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 ht,this.id=Pr(),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 Lr{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 Ir(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=un(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}}var Rr=Object.defineProperty,pt=(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&&Rr(t,e,n),n};const si=ji(A),we=class we extends si{constructor(){super(...arguments),this.optionsIsVisible=!1,this.authState=z.NonAuthenticated,this.userName="",this.authUrl="",this.showAuthOptions=!0,this.shouldUseAuth=!1,this.options=new Lr(this),this.optionsRef=xt(),this.optionsTriggerRef=xt(),this.actions$=new ht,this.onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)},this.onGlobalKeyDown=t=>{var e,s;if(t.key==="Escape"){if(this.optionsIsVisible&&this.optionsRef.value){this.optionsIsVisible=!1,(e=this.optionsTriggerRef.value)==null||e.focus();return}if((s=this.application.trigger)!=null&&s.active){this.onMinimizeClick();return}return}t.key==="Tab"&&this.optionsIsVisible&&this.optionsRef.value&&this.handleFocusTrap(t)}}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={}){if(window!=null&&window.parent){const s=window.location.origin;window.parent.postMessage({type:t,data:e},s)}}onStartAuth(){this.actions$.next({key:"start-auth"}),this.optionsIsVisible=!1}onLogoutAuth(){this.actions$.next({key:"logout-auth"}),this.optionsIsVisible=!1}handleFocusTrap(t){var o,a;const e=(o=this.optionsRef.value)==null?void 0:o.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])');if(!e||e.length===0)return;const s=e[0],n=e[e.length-1],r=(a=this.shadowRoot)==null?void 0:a.activeElement;t.shiftKey?r===s&&(t.preventDefault(),n.focus()):r===n&&(t.preventDefault(),s.focus())}renderAuthSection(t){return!this.showAuthOptions||!(this.shouldUseAuth&&this.authState!==z.ChatEnded)?p:m`<div class="options-menu__auth-container">
|
|
460
|
+
`];let Q=ye;ue([w({attribute:!0})],Q.prototype,"name");ue([S()],Q.prototype,"widget");ue([S()],Q.prototype,"status");customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",At);customElements.get("ace-trigger")||customElements.define("ace-trigger",E);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",Qt);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",at);customElements.get("ace-widget")||customElements.define("ace-widget",Q);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 W,ji,It,Ni=!1,kt=!1,he=!1,b=!1,De=null,Vt=!1;const Rt=typeof window<"u"?window:{},k=Rt.document||{head:{}},Fi=Rt.HTMLElement||class{},y={$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)},Tn=(()=>{let i=!1;try{k.addEventListener("e",null,Object.defineProperty({},"passive",{get(){i=!0}}))}catch{}return i})(),Pn=i=>Promise.resolve(i),Ln=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Hi=(i,t,e,s)=>{e&&e.map(([n,r,o])=>{const a=Rn(i,n),l=In(t,o),c=Un(n);y.ael(a,r,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>y.rel(a,r,l,c))})},In=(i,t)=>e=>{try{D.lazyLoad||i.$hostElement$[t](e)}catch(s){dt(s)}},Rn=(i,t)=>t&4?k:t&8?Rt:t&16?k.body:i,Un=i=>Tn?{passive:(i&1)!==0,capture:(i&2)!==0}:(i&2)!==0,We="http://www.w3.org/1999/xlink",F=(i,t="")=>()=>{},qe=new WeakMap,Mn=(i,t,e)=>{let s=Ot.get(i);Ln&&e?(s=s||new CSSStyleSheet,s.replace(t)):s=t,Ot.set(i,s)},jn=(i,t,e,s)=>{let n=Bi(t,e),r=Ot.get(n);if(i=i.nodeType===11?i:k,r)if(typeof r=="string"){i=i.head||i;let o=qe.get(i),a;o||qe.set(i,o=new Set),o.has(n)||(a=k.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=F("attachStyles",t.$tagName$),r=jn(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()},Bi=(i,t)=>"sc-"+(t&&i.$flags$&32?i.$tagName$+"-"+t:i.$tagName$),Fn=i=>fr.map(t=>t(i)).find(t=>!!t),Ge={},Hn="http://www.w3.org/2000/svg",Bn="http://www.w3.org/1999/xhtml",zn=i=>i!=null,de=i=>(i=typeof i,i==="object"||i==="function"),Y=(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"&&!de(s))&&(s=String(s)),o&&a?l[l.length-1].$text$+=s:l.push(o?Ct(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,Wn);const u=Ct(i,null);return u.$attrs$=t,l.length>0&&(u.$children$=l),u.$key$=n,u.$name$=r,u},Ct=(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},fe={},Dn=i=>i&&i.$tag$===fe,Wn={forEach:(i,t)=>i.map(Ye).forEach(t),map:(i,t)=>i.map(Ye).map(t).map(qn)},Ye=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),Y(i.vtag,e,...i.vchildren||[])}const t=Ct(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=Ze(e),u=Ze(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&&y.rel(i,t,e,!1),s&&y.ael(i,t,s,!1);else{const l=de(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(We,t):i.removeAttribute(t)):(!o||r&4||n)&&!l&&(s=s===!0?"":s,c?i.setAttributeNS(We,t,s):i.setAttribute(t,s))}}},Gn=/\s/,Ze=i=>i?i.split(Gn):[],zi=(i,t,e,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,r=i&&i.$attrs$||Ge,o=t.$attrs$||Ge;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$)},Et=(i,t,e,s)=>{let n=t.$children$[e],r=0,o,a,l;if(Ni||(he=!0,n.$tag$==="slot"&&(W&&s.classList.add(W+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=k.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=k.createTextNode("");else{if(b||(b=n.$tag$==="svg"),o=n.$elm$=k.createElementNS(b?Hn:Bn,n.$flags$&2?"slot-fb":n.$tag$),b&&n.$tag$==="foreignObject"&&(b=!1),zi(null,n,b),zn(W)&&o["s-si"]!==W&&o.classList.add(o["s-si"]=W),n.$children$)for(r=0;r<n.$children$.length;++r)a=Et(i,n,r,o),a&&o.appendChild(a);n.$tag$==="svg"?b=!1:o.tagName==="foreignObject"&&(b=!0)}return o["s-hn"]=It,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=ji,o["s-sn"]=n.$name$||"",l=i&&i.$children$&&i.$children$[e],l&&l.$tag$===n.$tag$&&i.$elm$&<(i.$elm$,!1)),o},lt=(i,t)=>{y.$flags$|=1;const e=i.childNodes;for(let s=e.length-1;s>=0;s--){const n=e[s];n["s-hn"]!==It&&n["s-ol"]&&(qi(n).insertBefore(n,pe(n)),n["s-ol"].remove(),n["s-ol"]=void 0,he=!0),t&<(n,t)}y.$flags$&=-2},Di=(i,t,e,s,n,r)=>{let o=i["s-cr"]&&i["s-cr"].parentNode||i,a;for(o.shadowRoot&&o.tagName===It&&(o=o.shadowRoot);n<=r;++n)s[n]&&(a=Et(null,e,n,i),a&&(s[n].$elm$=a,o.insertBefore(a,pe(t))))},Wi=(i,t,e,s,n)=>{for(;t<=e;++t)(s=i[t])&&(n=s.$elm$,Ki(s),kt=!0,n["s-ol"]?n["s-ol"].remove():lt(n,!0),n.remove())},Yn=(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(vt(c,d))q(c,d),c=t[++n],d=s[++r];else if(vt(u,f))q(u,f),u=t[--l],f=s[--h];else if(vt(c,f))(c.$tag$==="slot"||f.$tag$==="slot")&<(c.$elm$.parentNode,!1),q(c,f),i.insertBefore(c.$elm$,u.$elm$.nextSibling),c=t[++n],f=s[--h];else if(vt(u,d))(c.$tag$==="slot"||f.$tag$==="slot")&<(u.$elm$.parentNode,!1),q(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=Et(t&&t[r],e,o,i):(q(g,d),t[o]=void 0,v=g.$elm$),d=s[++r]):(v=Et(t&&t[r],e,r,i),d=s[++r]),v&&qi(c.$elm$).insertBefore(v,pe(c.$elm$))}n>l?Di(i,s[h+1]==null?null:s[h+1].$elm$,e,s,r,h):r>h&&Wi(t,n,l)},vt=(i,t)=>i.$tag$===t.$tag$?i.$tag$==="slot"?i.$name$===t.$name$:i.$key$===t.$key$:!1,pe=i=>i&&i["s-ol"]||i,qi=i=>(i["s-ol"]?i["s-ol"]:i).parentNode,q=(i,t)=>{const e=t.$elm$=i.$elm$,s=i.$children$,n=t.$children$,r=t.$tag$,o=t.$text$;let a;o===null?(b=r==="svg"?!0:r==="foreignObject"?!1:b,r==="slot"||zi(i,t,b),s!==null&&n!==null?Yn(e,s,t,n):n!==null?(i.$text$!==null&&(e.textContent=""),Di(e,null,t,n,0,n.length-1)):s!==null&&Wi(s,0,s.length-1),b&&r==="svg"&&(b=!1)):(a=e["s-cr"])?a.parentNode.textContent=o:i.$text$!==o&&(e.data=o)},Gi=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}}Gi(e)}},x=[],Yi=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"]&&(Xe(e,n)?(r=x.find(u=>u.$nodeToRelocate$===e),kt=!0,e["s-sn"]=e["s-sn"]||n,r?r.$slotRefNode$=t:x.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&x.map(u=>{Xe(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&&Yi(t)}},Xe=(i,t)=>i.nodeType===1?i.getAttribute("slot")===null&&t===""||i.getAttribute("slot")===t:i["s-sn"]===t?!0:t==="",Ki=i=>{i.$attrs$&&i.$attrs$.ref&&i.$attrs$.ref(null),i.$children$&&i.$children$.map(Ki)},Kn=(i,t)=>{const e=i.$hostElement$,s=i.$cmpMeta$,n=i.$vnode$||Ct(null,null),r=Dn(t)?t:Y(null,null,t);It=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,W=e["s-sc"],ji=e["s-cr"],Ni=(s.$flags$&1)!==0,kt=!1,q(n,r);{if(y.$flags$|=1,he){Yi(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=k.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)}kt&&Gi(r.$elm$),y.$flags$&=-2,x.length=0}},Zn=i=>i,Xn=(i,t,e)=>{const s=Zn(i);return{emit:n=>Qn(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},Qn=(i,t,e)=>{const s=y.ce(t,e);return i.dispatchEvent(s),s},Vn=(i,t)=>{},Zi=(i,t)=>(i.$flags$|=16,Vn(i,i.$ancestorComponent$),vr(()=>Jn(i,t))),Jn=(i,t)=>{const e=i.$hostElement$,s=F("scheduleUpdate",i.$cmpMeta$.$tagName$),n=e;let r;return t?r=K(n,"componentWillLoad"):r=K(n,"componentWillUpdate"),r=Qe(r,()=>K(n,"componentWillRender")),s(),Qe(r,()=>tr(i,n,t))},tr=async(i,t,e)=>{const s=i.$hostElement$,n=F("update",i.$cmpMeta$.$tagName$);s["s-rc"],e&&Nn(i);const r=F("render",i.$cmpMeta$.$tagName$);er(i,t,s),r(),n(),ir(i)},er=(i,t,e)=>{try{De=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){dt(a,i.$hostElement$)}return De=null,null},ir=i=>{const t=i.$cmpMeta$.$tagName$,e=i.$hostElement$,s=F("postUpdate",t),n=e;i.$ancestorComponent$,K(n,"componentDidRender"),i.$flags$&64?(K(n,"componentDidUpdate"),s()):(i.$flags$|=64,K(n,"componentDidLoad"),s())},K=(i,t,e)=>{if(i&&i[t])try{return i[t](e)}catch(s){dt(s)}},Qe=(i,t)=>i&&i.then?i.then(t):t(),sr=(i,t)=>i!=null&&!de(i)?t&4?i==="false"?!1:i===""||!!i:t&2?parseFloat(i):t&1?String(i):i:i,nr=(i,t)=>Ut(i).$instanceValues$.get(t),rr=(i,t,e,s)=>{const n=Ut(i),r=i,o=n.$instanceValues$.get(t),a=n.$flags$,l=r;e=sr(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){dt(f,r)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,o,t)===!1)return;Zi(n,!1)}}}},or=(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 nr(this,r)},set(a){rr(this,r,a,t)},configurable:!0,enumerable:!0})});{const r=new Map;n.attributeChangedCallback=function(o,a,l){y.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},ar=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$=Fn(i)]);const a=Bi(e,t.$modeName$);if(!Ot.has(a)){const l=F("registerStyles",e.$tagName$);Mn(a,o,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,Zi(t,!0)},lr=i=>{},cr=i=>{if((y.$flags$&1)===0){const t=Ut(i),e=t.$cmpMeta$,s=F("connectedCallback",e.$tagName$);t.$flags$&1?(Hi(i,t,e.$listeners$),lr(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&ur(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}}),ar(i,t,e)),s()}},ur=i=>{const t=i["s-cr"]=k.createComment("");t["s-cn"]=!0,i.insertBefore(t,i.firstChild)},hr=i=>{if((y.$flags$&1)===0){const t=Ut(i);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Xi=(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(){dr(this,e)},connectedCallback(){cr(this),s&&s.call(this)},disconnectedCallback(){hr(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),i.is=e.$tagName$,or(i,e)},Qi=new WeakMap,Ut=i=>Qi.get(i),dr=(i,t)=>{const e={$flags$:0,$hostElement$:i,$cmpMeta$:t,$instanceValues$:new Map};return Hi(i,e,t.$listeners$),Qi.set(i,e)},Ve=(i,t)=>t in i,dt=(i,t)=>(0,console.error)(i,t),Ot=new Map,fr=[],Je=[],Vi=[],pr=(i,t)=>e=>{i.push(e),Vt||(Vt=!0,t&&y.$flags$&4?gr(Jt):y.raf(Jt))},ti=i=>{for(let t=0;t<i.length;t++)try{i[t](performance.now())}catch(e){dt(e)}i.length=0},Jt=()=>{ti(Je),ti(Vi),(Vt=Je.length>0)&&y.raf(Jt)},gr=i=>Pn().then(i),vr=pr(Vi,!0),$r=(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>`},mr=i=>i.replace(/<(\/?)svg([^>]*)>/g,"").trim();function yr(i){return`${i.getFullYear()}.${i.getMonth()+1}`}class br{constructor(t){this.voca_component=t,this.voca_added=yr(new Date)}}const wr="telia-vst{display:none}",_r=Xi(class extends Fi{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Xn(this,"vocaInternalUStats")}connectedCallback(){this.vocaInternalUStats.emit(new br(this.dataTrackingId))}render(){return Y(fe,null)}static get style(){return wr}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Ji(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,_r);break}})}Ji();function te(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function xr(){if(typeof te().vocadsIcons!==void 0)return te().vocadsIcons}function Sr(){return te().vocadsIconsRegistered}const Ar=".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=Xi(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(Sr()&&this.name){const i=xr();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=$r({content:mr(i),attributes:t,title:this.allyTitle});return Y(fe,{class:`telia-icon telia-icon--${this.size}`},Y("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),Y("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return Ar}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Cr(){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)||Ji();break}})}Cr();const Er=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16)),Or=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():Er();class Tr{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 ut,this.id=Or(),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 Pr{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 Tr(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=ln(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}}var Lr=Object.defineProperty,ft=(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 ei=Ui(A),be=class be extends ei{constructor(){super(...arguments),this.optionsIsVisible=!1,this.authState=z.NonAuthenticated,this.userName="",this.authUrl="",this.showAuthOptions=!0,this.shouldUseAuth=!1,this.options=new Pr(this),this.optionsRef=_t(),this.optionsTriggerRef=_t(),this.actions$=new ut,this.onClickOutside=t=>{!this.optionsTriggerRef.value||!this.optionsRef.value||t.composedPath().includes(this.optionsTriggerRef.value)||t.composedPath().includes(this.optionsRef.value)||(this.optionsIsVisible=!1)},this.onGlobalKeyDown=t=>{var e,s;if(t.key==="Escape"){if(this.optionsIsVisible&&this.optionsRef.value){this.optionsIsVisible=!1,(e=this.optionsTriggerRef.value)==null||e.focus();return}if((s=this.application.trigger)!=null&&s.active){this.onMinimizeClick();return}return}t.key==="Tab"&&this.optionsIsVisible&&this.optionsRef.value&&this.handleFocusTrap(t)}}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={}){if(window!=null&&window.parent){const s=window.location.origin;window.parent.postMessage({type:t,data:e},s)}}onStartAuth(){this.actions$.next({key:"start-auth"}),this.optionsIsVisible=!1}onLogoutAuth(){this.actions$.next({key:"logout-auth"}),this.optionsIsVisible=!1}handleFocusTrap(t){var o,a;const e=(o=this.optionsRef.value)==null?void 0:o.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])');if(!e||e.length===0)return;const s=e[0],n=e[e.length-1],r=(a=this.shadowRoot)==null?void 0:a.activeElement;t.shiftKey?r===s&&(t.preventDefault(),n.focus()):r===n&&(t.preventDefault(),s.focus())}renderAuthSection(t){return!this.showAuthOptions||!(this.shouldUseAuth&&this.authState!==z.ChatEnded)?p:m`<div class="options-menu__auth-container">
|
|
461
461
|
<p class="options-menu__auth-helper-text" data-testid="auth-helper-text">
|
|
462
462
|
${t.getOrFallback("widget-header.authentication-text","AUTHENTICATED AS")}
|
|
463
463
|
</p>
|
|
@@ -504,21 +504,21 @@
|
|
|
504
504
|
type="button"
|
|
505
505
|
@click=${this.onToggleOptionsMenuClick}
|
|
506
506
|
class="widget-header__action-button"
|
|
507
|
-
${
|
|
507
|
+
${xt(this.optionsTriggerRef)}
|
|
508
508
|
title=${s.getOrFallback("widget-header.ellipses","Options")}
|
|
509
509
|
aria-haspopup="dialog"
|
|
510
510
|
aria-expanded="${this.optionsIsVisible?"true":"false"}"
|
|
511
511
|
aria-label=${s.getOrFallback("widget-header.ellipses","Options")}
|
|
512
512
|
data-testid="options-button"
|
|
513
513
|
>
|
|
514
|
-
<telia-icon svg=${
|
|
514
|
+
<telia-icon svg=${mn.svg}></telia-icon>
|
|
515
515
|
</button>
|
|
516
516
|
${this.optionsIsVisible?m`
|
|
517
517
|
<div
|
|
518
518
|
role="dialog"
|
|
519
519
|
aria-modal="true"
|
|
520
520
|
class="options-menu"
|
|
521
|
-
${
|
|
521
|
+
${xt(this.optionsRef)}
|
|
522
522
|
aria-labelledby="options-menu-title"
|
|
523
523
|
>
|
|
524
524
|
<h3 id="options-menu-title" tabindex="-1">
|
|
@@ -549,10 +549,10 @@
|
|
|
549
549
|
aria-label=${s.getOrFallback("widget-header.minimize","Minimize")}
|
|
550
550
|
data-testid="minimize-button"
|
|
551
551
|
>
|
|
552
|
-
<telia-icon svg=${
|
|
552
|
+
<telia-icon svg=${$n.svg}></telia-icon>
|
|
553
553
|
</button>`}
|
|
554
554
|
</div>
|
|
555
|
-
</div>`}};
|
|
555
|
+
</div>`}};be.styles=[ei.styles||[],H`
|
|
556
556
|
:host {
|
|
557
557
|
--header-text-color: var(--text-on-primary-background);
|
|
558
558
|
}
|
|
@@ -696,4 +696,4 @@
|
|
|
696
696
|
cursor: default;
|
|
697
697
|
pointer-events: none;
|
|
698
698
|
}
|
|
699
|
-
`];let O=
|
|
699
|
+
`];let O=be;ft([S()],O.prototype,"optionsIsVisible");ft([S()],O.prototype,"authState");ft([S()],O.prototype,"userName");ft([S()],O.prototype,"authUrl");ft([S()],O.prototype,"showAuthOptions");exports.WidgetHeader=O;exports.default=O;
|