@telia-ace/widget-conversation-flamingo 1.1.45-rc.1 → 1.1.45-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/{conversation-a8cae024.js → conversation-ebf57871.js} +7 -7
- package/{conversation-9815b16c.mjs → conversation-ed602fb6.mjs} +39 -35
- package/conversation.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +27 -25
- package/models/conversation-provider.d.ts +1 -1
- package/models/conversation-session-state.d.ts +2 -2
- package/package.json +2 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
-
*/const nt=globalThis,
|
5
|
+
*/const nt=globalThis,Bt=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zt=Symbol(),Vt=new WeakMap;let Le=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==zt)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(Bt&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Vt.set(e,t))}return t}toString(){return this.cssText}};const cs=s=>new Le(typeof s=="string"?s:s+"",void 0,zt),b=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,n,o)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[o+1],s[0]);return new Le(e,s,zt)},ds=(s,t)=>{if(Bt)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),n=nt.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=e.cssText,s.appendChild(i)}},te=Bt?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return cs(e)})(s):s;/**
|
6
6
|
* @license
|
7
7
|
* Copyright 2017 Google LLC
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -12,11 +12,11 @@
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
13
13
|
*/const Z=globalThis,rt=Z.trustedTypes,ie=rt?rt.createPolicy("lit-html",{createHTML:s=>s}):void 0,Pe="$lit$",A=`lit$${(Math.random()+"").slice(9)}$`,Me="?"+A,vs=`<${Me}>`,L=document,q=()=>L.createComment(""),X=s=>s===null||typeof s!="object"&&typeof s!="function",Re=Array.isArray,ys=s=>Re(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Tt=`[
|
14
14
|
\f\r]`,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ne=/-->/g,oe=/>/g,k=RegExp(`>|${Tt}(?:([^\\s"'>=/]+)(${Tt}*=${Tt}*(?:[^
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),re=/'/g,ae=/"/g,He=/^(?:script|style|textarea|title)$/i,bs=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),f=bs(1),E=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),le=new WeakMap,O=L.createTreeWalker(L,129);function Ue(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ie!==void 0?ie.createHTML(t):t}const _s=(s,t)=>{const e=s.length-1,i=[];let n,o=t===2?"<svg>":"",r=F;for(let a=0;a<e;a++){const l=s[a];let c,d,h=-1,p=0;for(;p<l.length&&(r.lastIndex=p,d=r.exec(l),d!==null);)p=r.lastIndex,r===F?d[1]==="!--"?r=ne:d[1]!==void 0?r=oe:d[2]!==void 0?(He.test(d[2])&&(n=RegExp("</"+d[2],"g")),r=k):d[3]!==void 0&&(r=k):r===k?d[0]===">"?(r=n??F,h=-1):d[1]===void 0?h=-2:(h=r.lastIndex-d[2].length,c=d[1],r=d[3]===void 0?k:d[3]==='"'?ae:re):r===ae||r===re?r=k:r===ne||r===oe?r=F:(r=k,n=void 0);const g=r===k&&s[a+1].startsWith("/>")?" ":"";o+=r===F?l+vs:h>=0?(i.push(c),l.slice(0,h)+Pe+l.slice(h)+A+g):l+A+(h===-2?a:g)}return[Ue(s,o+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class Y{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[c,d]=_s(t,e);if(this.el=Y.createElement(c,i),O.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const h of n.getAttributeNames())if(h.endsWith(Pe)){const p=d[r++],g=n.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:C[2],strings:g,ctor:C[1]==="."?xs:C[1]==="?"?ws:C[1]==="@"?As:vt}),n.removeAttribute(h)}else h.startsWith(A)&&(l.push({type:6,index:o}),n.removeAttribute(h));if(He.test(n.tagName)){const h=n.textContent.split(A),p=h.length-1;if(p>0){n.textContent=rt?rt.emptyScript:"";for(let g=0;g<p;g++)n.append(h[g],q()),O.nextNode(),l.push({type:2,index:++o});n.append(h[p],q())}}}else if(n.nodeType===8)if(n.data===Me)l.push({type:2,index:o});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)l.push({type:7,index:o}),h+=A.length-1}o++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),re=/'/g,ae=/"/g,He=/^(?:script|style|textarea|title)$/i,bs=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),f=bs(1),E=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),le=new WeakMap,O=L.createTreeWalker(L,129);function Ue(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ie!==void 0?ie.createHTML(t):t}const _s=(s,t)=>{const e=s.length-1,i=[];let n,o=t===2?"<svg>":"",r=F;for(let a=0;a<e;a++){const l=s[a];let c,d,h=-1,p=0;for(;p<l.length&&(r.lastIndex=p,d=r.exec(l),d!==null);)p=r.lastIndex,r===F?d[1]==="!--"?r=ne:d[1]!==void 0?r=oe:d[2]!==void 0?(He.test(d[2])&&(n=RegExp("</"+d[2],"g")),r=k):d[3]!==void 0&&(r=k):r===k?d[0]===">"?(r=n??F,h=-1):d[1]===void 0?h=-2:(h=r.lastIndex-d[2].length,c=d[1],r=d[3]===void 0?k:d[3]==='"'?ae:re):r===ae||r===re?r=k:r===ne||r===oe?r=F:(r=k,n=void 0);const g=r===k&&s[a+1].startsWith("/>")?" ":"";o+=r===F?l+vs:h>=0?(i.push(c),l.slice(0,h)+Pe+l.slice(h)+A+g):l+A+(h===-2?a:g)}return[Ue(s,o+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class Y{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[c,d]=_s(t,e);if(this.el=Y.createElement(c,i),O.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const h of n.getAttributeNames())if(h.endsWith(Pe)){const p=d[r++],g=n.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:C[2],strings:g,ctor:C[1]==="."?xs:C[1]==="?"?ws:C[1]==="@"?As:vt}),n.removeAttribute(h)}else h.startsWith(A)&&(l.push({type:6,index:o}),n.removeAttribute(h));if(He.test(n.tagName)){const h=n.textContent.split(A),p=h.length-1;if(p>0){n.textContent=rt?rt.emptyScript:"";for(let g=0;g<p;g++)n.append(h[g],q()),O.nextNode(),l.push({type:2,index:++o});n.append(h[p],q())}}}else if(n.nodeType===8)if(n.data===Me)l.push({type:2,index:o});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)l.push({type:7,index:o}),h+=A.length-1}o++}}static createElement(t,e){const i=L.createElement("template");return i.innerHTML=t,i}}function B(s,t,e=s,i){var r,a;if(t===E)return t;let n=i!==void 0?(r=e._$Co)==null?void 0:r[i]:e._$Cl;const o=X(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==o&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),o===void 0?n=void 0:(n=new o(s),n._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=n:e._$Cl=n),n!==void 0&&(t=B(s,n._$AS(s,t.values),n,i)),t}class Cs{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:i}=this._$AD,n=((t==null?void 0:t.creationScope)??L).importNode(e,!0);O.currentNode=n;let o=O.nextNode(),r=0,a=0,l=i[0];for(;l!==void 0;){if(r===l.index){let c;l.type===2?c=new Q(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new Ss(o,this,t)),this._$AV.push(c),l=i[++a]}r!==(l==null?void 0:l.index)&&(o=O.nextNode(),r++)}return O.currentNode=L,n}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Q{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,n){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,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=B(this,t,e),X(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ys(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==u&&X(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var o;const{values:e,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Y.createElement(Ue(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===n)this._$AH.p(e);else{const r=new Cs(n,this),a=r.u(this.options);r.p(e),this.$(a),this._$AH=r}}_$AC(t){let e=le.get(t.strings);return e===void 0&&le.set(t.strings,e=new Y(t)),e}T(t){Re(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new Q(this.k(q()),this.k(q()),this,this.options)):i=e[n],i._$AI(o),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&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 vt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,n,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}_$AI(t,e=this,i,n){const o=this.strings;let r=!1;if(o===void 0)t=B(this,t,e,0),r=!X(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{const a=t;let l,c;for(t=o[0],l=0;l<o.length-1;l++)c=B(this,a[i+l],e,l),c===E&&(c=this._$AH[l]),r||(r=!X(c)||c!==this._$AH[l]),c===u?t=u:t!==u&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}r&&!n&&this.O(t)}O(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xs extends vt{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===u?void 0:t}}let ws=class extends vt{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}};class As extends vt{constructor(t,e,i,n,o){super(t,e,i,n,o),this.type=5}_$AI(t,e=this){if((t=B(this,t,e,0)??u)===E)return;const i=this._$AH,n=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==u&&(i===u||n);n&&this.element.removeEventListener(this.name,this,i),o&&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 Ss{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const Ot=Z.litHtmlPolyfillSupport;Ot==null||Ot(Y,Q),(Z.litHtmlVersions??(Z.litHtmlVersions=[])).push("3.0.2");const Es=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=n=new Q(t.insertBefore(q(),o),o,void 0,e??{})}return n._$AI(s),n};/**
|
16
16
|
* @license
|
17
17
|
* Copyright 2017 Google LLC
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
19
|
-
*/let m=class extends H{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=Es(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}};var Oe;m._$litElement$=!0,m.finalized=!0,(Oe=globalThis.litElementHydrateSupport)==null||Oe.call(globalThis,{LitElement:m});const Lt=globalThis.litElementPolyfillSupport;Lt==null||Lt({LitElement:m});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");const ks={name:"alert",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 60C47.464 60 60 47.464 60 32C60 16.536 47.464 4 32 4C16.536 4 4 16.536 4 32C4.01731 47.4568 16.5432 59.9827 32 60ZM32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6923 45.0849 45.0849 55.6923 32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.32247 18.9212 18.9212 8.32247 32 8.30769Z"/><path d="M29.3491 38.6031V20.6807C29.348 19.8662 29.4903 19.0598 29.7675 18.3096C29.9945 17.6371 30.3484 17.0302 30.804 16.5322C31.1251 16.1524 31.5593 15.9246 32.0204 15.894C32.6852 15.894 33.3496 16.471 34.0134 17.625C34.3738 18.1337 34.5955 18.7525 34.6509 19.4042V37.3267C34.6509 37.9947 34.2454 38.6329 33.4345 39.2414C32.6632 39.835 31.7547 40.1521 30.825 40.1523C29.8423 40.1524 29.3503 39.636 29.3491 38.6031Z"/><path d="M33.66 44.6959C33.9649 45.0866 34.161 45.551 34.2284 46.0419C34.2284 46.5397 33.8893 47.0083 33.2109 47.4476C32.5638 47.8771 31.8043 48.1062 31.0275 48.1061C30.1902 48.1061 29.7716 47.7271 29.7716 46.9693C29.7703 46.3788 29.8874 45.7941 30.116 45.2496C30.3064 44.7579 30.6022 44.3138 30.9826 43.9487C31.2626 43.6591 31.6427 43.4875 32.045 43.4692C32.5635 43.4692 33.1019 43.8781 33.66 44.6959Z"/></svg>'},Ts={name:"check-circle-filled",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.9829 16.5431 47.4569 4.01712 32 4ZM44.5613 24.5793L31.6382 43.9639C31.2806 44.5011 30.7008 44.8493 30.0586 44.9126C29.988 44.9197 29.9171 44.9232 29.8462 44.9231C29.275 44.9229 28.7272 44.696 28.3233 44.2921L19.7079 35.6767C19.1639 35.1326 18.9514 34.3396 19.1505 33.5964C19.3497 32.8533 19.9302 32.2728 20.6734 32.0736C21.4166 31.8745 22.2095 32.087 22.7536 32.631L29.5117 39.3881L40.9772 22.1899C41.4016 21.5439 42.1396 21.1749 42.9111 21.2229C43.6825 21.2709 44.3691 21.7286 44.7101 22.4223C45.0511 23.1159 44.9944 23.9391 44.5613 24.5793Z"/></svg>'},Os={name:"check-circle",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9998 4C16.5358 4 3.99976 16.536 3.99976 32C3.99976 47.464 16.5358 60 31.9998 60C47.4637 60 59.9998 47.464 59.9998 32C59.9826 16.5431 47.4566 4.01712 31.9998 4ZM31.9998 55.6923C18.9149 55.6923 8.30745 45.0849 8.30745 32C8.30745 18.9151 18.9149 8.30769 31.9998 8.30769C45.0847 8.30769 55.6921 18.9151 55.6921 32C55.6773 45.0788 45.0785 55.6775 31.9998 55.6923ZM44.5611 24.5793L31.638 43.9639C31.2804 44.5011 30.7005 44.8493 30.0584 44.9126C29.9878 44.9197 29.9169 44.9232 29.8459 44.9231C29.2747 44.9229 28.727 44.696 28.3231 44.2921L19.7077 35.6767C19.1636 35.1326 18.9512 34.3396 19.1503 33.5964C19.3494 32.8533 19.9299 32.2728 20.6731 32.0736C21.4163 31.8745 22.2093 32.087 22.7534 32.631L29.5115 39.3881L40.9769 22.1899C41.4013 21.5439 42.1394 21.1749 42.9108 21.2229C43.6823 21.2709 44.3688 21.7286 44.7099 22.4223C45.0509 23.1159 44.9941 23.9391 44.5611 24.5793Z"/></svg>'},ce={name:"mute",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M51.4283 11.6761L53.1768 9.53891C53.9347 8.61282 53.7982 7.24774 52.8722 6.48993C51.9461 5.73211 50.581 5.86852 49.8232 6.79461L36.3333 23.2822V13.3972C36.3332 11.6447 35.2774 10.0648 33.6583 9.39418C32.0391 8.72356 30.1755 9.09425 28.9362 10.3334L18.1029 21.1668H14.6667C9.88247 21.1722 6.00547 25.0492 6 29.8334V34.1668C6.00547 38.951 9.88247 42.828 14.6667 42.8334H18.1029L19.3315 44.0621L10.8232 54.4613C10.0653 55.3874 10.2018 56.7525 11.1279 57.5103C12.0539 58.2681 13.419 58.1317 14.1768 57.2056L22.411 47.1416L28.9362 53.6668C30.1755 54.9059 32.0391 55.2766 33.6583 54.606C35.2774 53.9354 36.3332 52.3555 36.3333 50.603V30.1254L42.6092 22.4549C44.2201 25.3756 45.044 28.6649 45 32.0001C45.1184 36.1899 43.7698 40.2896 41.1872 43.5909C40.409 44.5001 40.5152 45.8679 41.4243 46.6461C42.3334 47.4243 43.7012 47.3183 44.4795 46.4093C47.7313 42.3208 49.4486 37.2227 49.3333 32.0001C49.403 27.3538 48.067 22.7949 45.5005 18.9211L48.6119 15.1182C52.019 20.0793 53.7867 25.9829 53.6667 32.0001C53.6667 39.0587 51.4873 45.6518 47.6872 50.0909C46.909 51.0001 47.0152 52.3679 47.9243 53.1461C48.8334 53.9243 50.2012 53.8183 50.9795 52.9093C55.4408 47.6968 58 40.0764 58 32.0001C58 24.21 55.6006 16.8662 51.4283 11.6761ZM19.8971 38.5H14.6667C12.2744 38.4977 10.3357 36.559 10.3333 34.1667V29.8334C10.3357 27.4411 12.2744 25.5024 14.6667 25.5H19.8971L32 13.3972V28.5784L22.089 40.6919L19.8971 38.5ZM31.9997 50.603L25.1682 43.7715L31.9997 35.4218V50.603Z"/></svg>'},Ls={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>'},Ps={name:"send",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>'},de={name:"volume",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M33.6578 9.3322C32.0391 8.65799 30.1735 9.02919 28.9362 10.2717L18.1029 21.105H14.6667C9.88247 21.1105 6.00547 24.9875 6 29.7717V34.105C6.00547 38.8892 9.88247 42.7662 14.6667 42.7717H18.1029L28.9362 53.605C30.1755 54.8442 32.0391 55.2149 33.6583 54.5442C35.2774 53.8736 36.3332 52.2937 36.3333 50.5412V13.3355C36.3365 11.5817 35.2794 10.0001 33.6578 9.3322ZM32 50.5411L19.8971 38.4382H14.6667C12.2744 38.4358 10.3357 36.4971 10.3333 34.1049V29.7716C10.3357 27.3793 12.2744 25.4406 14.6667 25.4382H19.8971L32 13.3353V50.5411ZM49.3334 31.9383C49.4487 37.161 47.7314 42.2591 44.4796 46.3475C43.7013 47.2565 42.3335 47.3625 41.4244 46.5843C40.5153 45.8061 40.4092 44.4383 41.1873 43.5291C43.7699 40.2278 45.1185 36.1282 45.0001 31.9383C45.1185 27.7485 43.7699 23.6488 41.1873 20.3475C40.4092 19.4383 40.5153 18.0705 41.4244 17.2923C42.3335 16.5141 43.7013 16.6201 44.4796 17.5291C47.7314 21.6176 49.4487 26.7157 49.3334 31.9383ZM58.0001 31.9383C58.0001 40.0147 55.441 47.635 50.9796 52.8475C50.2013 53.7565 48.8335 53.8625 47.9244 53.0843C47.0153 52.3061 46.9092 50.9383 47.6873 50.0291C51.4874 45.59 53.6668 38.9969 53.6668 31.9383C53.6668 24.8797 51.4874 18.2866 47.6873 13.8475C46.9092 12.9383 47.0153 11.5705 47.9244 10.7923C48.8335 10.0141 50.2013 10.1201 50.9796 11.0291C55.441 16.2416 58.0001 23.862 58.0001 31.9383Z"/></svg>'},U={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 N,Ne,yt,je=!1,at=!1,Wt=!1,y=!1,he=null,Ht=!1;const bt=typeof window<"u"?window:{},x=bt.document||{head:{}},De=bt.HTMLElement||class{},v={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,t,e,i)=>s.addEventListener(t,e,i),rel:(s,t,e,i)=>s.removeEventListener(t,e,i),ce:(s,t)=>new CustomEvent(s,t)},Ms=(()=>{let s=!1;try{x.addEventListener("e",null,Object.defineProperty({},"passive",{get(){s=!0}}))}catch{}return s})(),Rs=s=>Promise.resolve(s),Hs=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Be=(s,t,e,i)=>{e&&e.map(([n,o,r])=>{const a=Ns(s,n),l=Us(t,r),c=js(n);v.ael(a,o,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>v.rel(a,o,l,c))})},Us=(s,t)=>e=>{try{U.lazyLoad||s.$hostElement$[t](e)}catch(i){J(i)}},Ns=(s,t)=>t&4?x:t&8?bt:t&16?x.body:s,js=s=>Ms?{passive:(s&1)!==0,capture:(s&2)!==0}:(s&2)!==0,pe="http://www.w3.org/1999/xlink",P=(s,t="")=>()=>{},ue=new WeakMap,Ds=(s,t,e)=>{let i=dt.get(s);Hs&&e?(i=i||new CSSStyleSheet,i.replace(t)):i=t,dt.set(s,i)},Bs=(s,t,e,i)=>{let n=Ie(t,e),o=dt.get(n);if(s=s.nodeType===11?s:x,o)if(typeof o=="string"){s=s.head||s;let r=ue.get(s),a;r||ue.set(s,r=new Set),r.has(n)||(a=x.createElement("style"),a.innerHTML=o,s.insertBefore(a,s.querySelector("link")),r&&r.add(n))}else s.adoptedStyleSheets.includes(o)||(s.adoptedStyleSheets=[...s.adoptedStyleSheets,o]);return n},Is=s=>{const t=s.$cmpMeta$,e=s.$hostElement$,i=t.$flags$,n=P("attachStyles",t.$tagName$),o=Bs(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,s.$modeName$);i&10&&(e["s-sc"]=o,e.classList.add(o+"-h"),i&2&&e.classList.add(o+"-s")),n()},Ie=(s,t)=>"sc-"+(t&&s.$flags$&32?s.$tagName$+"-"+t:s.$tagName$),zs=s=>$i.map(t=>t(s)).find(t=>!!t),fe={},Fs="http://www.w3.org/2000/svg",Ws="http://www.w3.org/1999/xhtml",Zs=s=>s!=null,Zt=s=>(s=typeof s,s==="object"||s==="function"),D=(s,t,...e)=>{let i=null,n=null,o=null,r=!1,a=!1,l=[];const c=h=>{for(let p=0;p<h.length;p++)i=h[p],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((r=typeof s!="function"&&!Zt(i))&&(i=String(i)),r&&a?l[l.length-1].$text$+=i:l.push(r?lt(null,i):i),a=r)};if(c(e),t){t.key&&(n=t.key),t.name&&(o=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(p=>h[p]).join(" "))}}if(typeof s=="function")return s(t===null?{}:t,l,qs);const d=lt(s,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),d.$key$=n,d.$name$=o,d},lt=(s,t)=>{const e={$flags$:0,$tag$:s,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},Gt={},Gs=s=>s&&s.$tag$===Gt,qs={forEach:(s,t)=>s.map(ge).forEach(t),map:(s,t)=>s.map(ge).map(t).map(Xs)},ge=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),Xs=s=>{if(typeof s.vtag=="function"){const e=Object.assign({},s.vattrs);return s.vkey&&(e.key=s.vkey),s.vname&&(e.name=s.vname),D(s.vtag,e,...s.vchildren||[])}const t=lt(s.vtag,s.vtext);return t.$attrs$=s.vattrs,t.$children$=s.vchildren,t.$key$=s.vkey,t.$name$=s.vname,t},$e=(s,t,e,i,n,o)=>{if(e!==i){let r=be(s,t),a=t.toLowerCase();if(t==="class"){const l=s.classList,c=me(e),d=me(i);l.remove(...c.filter(h=>h&&!d.includes(h))),l.add(...d.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!i||i[l]==null)&&(l.includes("-")?s.style.removeProperty(l):s.style[l]="");for(const l in i)(!e||i[l]!==e[l])&&(l.includes("-")?s.style.setProperty(l,i[l]):s.style[l]=i[l])}else if(t!=="key")if(t==="ref")i&&i(s);else if(!s.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):be(bt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&v.rel(s,t,e,!1),i&&v.ael(s,t,i,!1);else{const l=Zt(i);if((r||l&&i!==null)&&!n)try{if(s.tagName.includes("-"))s[t]=i;else{let d=i??"";t==="list"?r=!1:(e==null||s[t]!=d)&&(s[t]=d)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),i==null||i===!1?(i!==!1||s.getAttribute(t)==="")&&(c?s.removeAttributeNS(pe,t):s.removeAttribute(t)):(!r||o&4||n)&&!l&&(i=i===!0?"":i,c?s.setAttributeNS(pe,t,i):s.setAttribute(t,i))}}},Ys=/\s/,me=s=>s?s.split(Ys):[],ze=(s,t,e,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,o=s&&s.$attrs$||fe,r=t.$attrs$||fe;for(i in o)i in r||$e(n,i,o[i],void 0,e,t.$flags$);for(i in r)$e(n,i,o[i],r[i],e,t.$flags$)},ct=(s,t,e,i)=>{let n=t.$children$[e],o=0,r,a,l;if(je||(Wt=!0,n.$tag$==="slot"&&(N&&i.classList.add(N+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)r=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)r=n.$elm$=x.createTextNode("");else{if(y||(y=n.$tag$==="svg"),r=n.$elm$=x.createElementNS(y?Fs:Ws,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),ze(null,n,y),Zs(N)&&r["s-si"]!==N&&r.classList.add(r["s-si"]=N),n.$children$)for(o=0;o<n.$children$.length;++o)a=ct(s,n,o,r),a&&r.appendChild(a);n.$tag$==="svg"?y=!1:r.tagName==="foreignObject"&&(y=!0)}return r["s-hn"]=yt,n.$flags$&3&&(r["s-sr"]=!0,r["s-cr"]=Ne,r["s-sn"]=n.$name$||"",l=s&&s.$children$&&s.$children$[e],l&&l.$tag$===n.$tag$&&s.$elm$&&K(s.$elm$,!1)),r},K=(s,t)=>{v.$flags$|=1;const e=s.childNodes;for(let i=e.length-1;i>=0;i--){const n=e[i];n["s-hn"]!==yt&&n["s-ol"]&&(Ze(n).insertBefore(n,qt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,Wt=!0),t&&K(n,t)}v.$flags$&=-2},Fe=(s,t,e,i,n,o)=>{let r=s["s-cr"]&&s["s-cr"].parentNode||s,a;for(r.shadowRoot&&r.tagName===yt&&(r=r.shadowRoot);n<=o;++n)i[n]&&(a=ct(null,e,n,s),a&&(i[n].$elm$=a,r.insertBefore(a,qt(t))))},We=(s,t,e,i,n)=>{for(;t<=e;++t)(i=s[t])&&(n=i.$elm$,Xe(i),at=!0,n["s-ol"]?n["s-ol"].remove():K(n,!0),n.remove())},Ks=(s,t,e,i)=>{let n=0,o=0,r=0,a=0,l=t.length-1,c=t[0],d=t[l],h=i.length-1,p=i[0],g=i[h],C,et;for(;n<=l&&o<=h;)if(c==null)c=t[++n];else if(d==null)d=t[--l];else if(p==null)p=i[++o];else if(g==null)g=i[--h];else if(st(c,p))j(c,p),c=t[++n],p=i[++o];else if(st(d,g))j(d,g),d=t[--l],g=i[--h];else if(st(c,g))(c.$tag$==="slot"||g.$tag$==="slot")&&K(c.$elm$.parentNode,!1),j(c,g),s.insertBefore(c.$elm$,d.$elm$.nextSibling),c=t[++n],g=i[--h];else if(st(d,p))(c.$tag$==="slot"||g.$tag$==="slot")&&K(d.$elm$.parentNode,!1),j(d,p),s.insertBefore(d.$elm$,c.$elm$),d=t[--l],p=i[++o];else{for(r=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===p.$key$){r=a;break}r>=0?(et=t[r],et.$tag$!==p.$tag$?C=ct(t&&t[o],e,r,s):(j(et,p),t[r]=void 0,C=et.$elm$),p=i[++o]):(C=ct(t&&t[o],e,o,s),p=i[++o]),C&&Ze(c.$elm$).insertBefore(C,qt(c.$elm$))}n>l?Fe(s,i[h+1]==null?null:i[h+1].$elm$,e,i,o,h):o>h&&We(t,n,l)},st=(s,t)=>s.$tag$===t.$tag$?s.$tag$==="slot"?s.$name$===t.$name$:s.$key$===t.$key$:!1,qt=s=>s&&s["s-ol"]||s,Ze=s=>(s["s-ol"]?s["s-ol"]:s).parentNode,j=(s,t)=>{const e=t.$elm$=s.$elm$,i=s.$children$,n=t.$children$,o=t.$tag$,r=t.$text$;let a;r===null?(y=o==="svg"?!0:o==="foreignObject"?!1:y,o==="slot"||ze(s,t,y),i!==null&&n!==null?Ks(e,i,t,n):n!==null?(s.$text$!==null&&(e.textContent=""),Fe(e,null,t,n,0,n.length-1)):i!==null&&We(i,0,i.length-1),y&&o==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=r:s.$text$!==r&&(e.data=r)},Ge=s=>{let t=s.childNodes,e,i,n,o,r,a;for(i=0,n=t.length;i<n;i++)if(e=t[i],e.nodeType===1){if(e["s-sr"]){for(r=e["s-sn"],e.hidden=!1,o=0;o<n;o++)if(a=t[o].nodeType,t[o]["s-hn"]!==e["s-hn"]||r!==""){if(a===1&&r===t[o].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[o].textContent.trim()!==""){e.hidden=!0;break}}Ge(e)}},_=[],qe=s=>{let t,e,i,n,o,r,a=0,l=s.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(i=e.parentNode.childNodes,n=t["s-sn"],r=i.length-1;r>=0;r--)e=i[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ve(e,n)?(o=_.find(d=>d.$nodeToRelocate$===e),at=!0,e["s-sn"]=e["s-sn"]||n,o?o.$slotRefNode$=t:_.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&_.map(d=>{ve(d.$nodeToRelocate$,e["s-sn"])&&(o=_.find(h=>h.$nodeToRelocate$===e),o&&!d.$slotRefNode$&&(d.$slotRefNode$=o.$slotRefNode$))})):_.some(d=>d.$nodeToRelocate$===e)||_.push({$nodeToRelocate$:e}));t.nodeType===1&&qe(t)}},ve=(s,t)=>s.nodeType===1?s.getAttribute("slot")===null&&t===""||s.getAttribute("slot")===t:s["s-sn"]===t?!0:t==="",Xe=s=>{s.$attrs$&&s.$attrs$.ref&&s.$attrs$.ref(null),s.$children$&&s.$children$.map(Xe)},Qs=(s,t)=>{const e=s.$hostElement$,i=s.$cmpMeta$,n=s.$vnode$||lt(null,null),o=Gs(t)?t:D(null,null,t);yt=e.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.map(([r,a])=>o.$attrs$[a]=e[r])),o.$tag$=null,o.$flags$|=4,s.$vnode$=o,o.$elm$=n.$elm$=e.shadowRoot||e,N=e["s-sc"],Ne=e["s-cr"],je=(i.$flags$&1)!==0,at=!1,j(n,o);{if(v.$flags$|=1,Wt){qe(o.$elm$);let r,a,l,c,d,h,p=0;for(;p<_.length;p++)r=_[p],a=r.$nodeToRelocate$,a["s-ol"]||(l=x.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(p=0;p<_.length;p++)if(r=_[p],a=r.$nodeToRelocate$,r.$slotRefNode$){for(c=r.$slotRefNode$.parentNode,d=r.$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"])){d=h;break}(!d&&c!==a.parentNode||a.nextSibling!==d)&&a!==d&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,d))}else a.nodeType===1&&(a.hidden=!0)}at&&Ge(o.$elm$),v.$flags$&=-2,_.length=0}},Js=s=>s,Vs=(s,t,e)=>{const i=Js(s);return{emit:n=>ti(i,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},ti=(s,t,e)=>{const i=v.ce(t,e);return s.dispatchEvent(i),i},ei=(s,t)=>{},Ye=(s,t)=>(s.$flags$|=16,ei(s,s.$ancestorComponent$),yi(()=>si(s,t))),si=(s,t)=>{const e=s.$hostElement$,i=P("scheduleUpdate",s.$cmpMeta$.$tagName$),n=e;let o;return t?o=B(n,"componentWillLoad"):o=B(n,"componentWillUpdate"),o=ye(o,()=>B(n,"componentWillRender")),i(),ye(o,()=>ii(s,n,t))},ii=async(s,t,e)=>{const i=s.$hostElement$,n=P("update",s.$cmpMeta$.$tagName$);i["s-rc"],e&&Is(s);const o=P("render",s.$cmpMeta$.$tagName$);ni(s,t,i),o(),n(),oi(s)},ni=(s,t,e)=>{try{he=t,t=t.render&&t.render(),s.$flags$&=-17,s.$flags$|=2,(U.hasRenderFn||U.reflect)&&(U.vdomRender||U.reflect)&&(U.hydrateServerSide||Qs(s,t))}catch(a){J(a,s.$hostElement$)}return he=null,null},oi=s=>{const t=s.$cmpMeta$.$tagName$,e=s.$hostElement$,i=P("postUpdate",t),n=e;s.$ancestorComponent$,B(n,"componentDidRender"),s.$flags$&64?(B(n,"componentDidUpdate"),i()):(s.$flags$|=64,B(n,"componentDidLoad"),i())},B=(s,t,e)=>{if(s&&s[t])try{return s[t](e)}catch(i){J(i)}},ye=(s,t)=>s&&s.then?s.then(t):t(),ri=(s,t)=>s!=null&&!Zt(s)?t&4?s==="false"?!1:s===""||!!s:t&2?parseFloat(s):t&1?String(s):s:s,ai=(s,t)=>_t(s).$instanceValues$.get(t),li=(s,t,e,i)=>{const n=_t(s),o=s,r=n.$instanceValues$.get(t),a=n.$flags$,l=o;e=ri(e,i.$members$[t][0]);const c=Number.isNaN(r)&&Number.isNaN(e);if(e!==r&&!c){n.$instanceValues$.set(t,e);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(p=>{try{l[p](e,r,t)}catch(g){J(g,o)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,r,t)===!1)return;Ye(n,!1)}}}},ci=(s,t,e)=>{if(t.$members$){s.watchers&&(t.$watchers$=s.watchers);const i=Object.entries(t.$members$),n=s.prototype;i.map(([o,[r]])=>{(r&31||r&32)&&Object.defineProperty(n,o,{get(){return ai(this,o)},set(a){li(this,o,a,t)},configurable:!0,enumerable:!0})});{const o=new Map;n.attributeChangedCallback=function(r,a,l){v.jmp(()=>{const c=o.get(r);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})},s.observedAttributes=i.filter(([r,a])=>a[0]&15).map(([r,a])=>{const l=a[1]||r;return o.set(l,r),a[0]&512&&t.$attrsToReflect$.push([r,l]),l})}}return s},di=async(s,t,e,i,n)=>{if(!(t.$flags$&32)&&(n=s.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let r=n.style;typeof r!="string"&&(r=r[t.$modeName$=zs(s)]);const a=Ie(e,t.$modeName$);if(!dt.has(a)){const l=P("registerStyles",e.$tagName$);Ds(a,r,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Ye(t,!0))()},hi=s=>{},pi=s=>{if(!(v.$flags$&1)){const t=_t(s),e=t.$cmpMeta$,i=P("connectedCallback",e.$tagName$);t.$flags$&1?(Be(s,t,e.$listeners$),hi(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&ui(s),e.$members$&&Object.entries(e.$members$).map(([n,[o]])=>{if(o&31&&s.hasOwnProperty(n)){const r=s[n];delete s[n],s[n]=r}}),di(s,t,e)),i()}},ui=s=>{const t=s["s-cr"]=x.createComment("");t["s-cn"]=!0,s.insertBefore(t,s.firstChild)},fi=s=>{if(!(v.$flags$&1)){const t=_t(s);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Ke=(s,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=s.$watchers$,e.$attrsToReflect$=[];const i=s.prototype.connectedCallback,n=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__registerHost(){gi(this,e)},connectedCallback(){pi(this),i&&i.call(this)},disconnectedCallback(){fi(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),s.is=e.$tagName$,ci(s,e)},Qe=new WeakMap,_t=s=>Qe.get(s),gi=(s,t)=>{const e={$flags$:0,$hostElement$:s,$cmpMeta$:t,$instanceValues$:new Map};return Be(s,e,t.$listeners$),Qe.set(s,e)},be=(s,t)=>t in s,J=(s,t)=>(0,console.error)(s,t),dt=new Map,$i=[],_e=[],Je=[],mi=(s,t)=>e=>{s.push(e),Ht||(Ht=!0,t&&v.$flags$&4?vi(Ut):v.raf(Ut))},Ce=s=>{for(let t=0;t<s.length;t++)try{s[t](performance.now())}catch(e){J(e)}s.length=0},Ut=()=>{Ce(_e),Ce(Je),(Ht=_e.length>0)&&v.raf(Ut)},vi=s=>Rs().then(s),yi=mi(Je,!0),bi=(s={})=>{const{content:t="",title:e,attributes:i=[]}=s;let n="",o=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return e&&(n=`<title>${e}</title>`),`<svg ${o.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},_i=s=>s.replace(/<(\/?)svg([^>]*)>/g,"").trim();function Ci(s){return`${s.getFullYear()}.${s.getMonth()+1}`}class xi{constructor(t){this.voca_component=t,this.voca_added=Ci(new Date)}}const wi="telia-vst{display:none}",Ai=Ke(class extends De{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Vs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new xi(this.dataTrackingId))}render(){return D(Gt,null)}static get style(){return wi}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Ve(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ai);break}})}Ve();function Nt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Si(){if(typeof Nt().vocadsIcons!==void 0)return Nt().vocadsIcons}function Ei(){return Nt().vocadsIconsRegistered}const ki=".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))}",Ti=Ke(class extends De{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ei()&&this.name){const s=Si();return s[this.name]?s[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 s=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=bi({content:_i(s),attributes:t,title:this.allyTitle});return D(Gt,{class:`telia-icon telia-icon--${this.size}`},D("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),D("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return ki}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Oi(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Ti);break;case"telia-vst":customElements.get(t)||Ve();break}})}Oi();/**
|
19
|
+
*/let m=class extends H{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=Es(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}};var Oe;m._$litElement$=!0,m.finalized=!0,(Oe=globalThis.litElementHydrateSupport)==null||Oe.call(globalThis,{LitElement:m});const Lt=globalThis.litElementPolyfillSupport;Lt==null||Lt({LitElement:m});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");const ks={name:"alert",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 60C47.464 60 60 47.464 60 32C60 16.536 47.464 4 32 4C16.536 4 4 16.536 4 32C4.01731 47.4568 16.5432 59.9827 32 60ZM32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6923 45.0849 45.0849 55.6923 32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.32247 18.9212 18.9212 8.32247 32 8.30769Z"/><path d="M29.3491 38.6031V20.6807C29.348 19.8662 29.4903 19.0598 29.7675 18.3096C29.9945 17.6371 30.3484 17.0302 30.804 16.5322C31.1251 16.1524 31.5593 15.9246 32.0204 15.894C32.6852 15.894 33.3496 16.471 34.0134 17.625C34.3738 18.1337 34.5955 18.7525 34.6509 19.4042V37.3267C34.6509 37.9947 34.2454 38.6329 33.4345 39.2414C32.6632 39.835 31.7547 40.1521 30.825 40.1523C29.8423 40.1524 29.3503 39.636 29.3491 38.6031Z"/><path d="M33.66 44.6959C33.9649 45.0866 34.161 45.551 34.2284 46.0419C34.2284 46.5397 33.8893 47.0083 33.2109 47.4476C32.5638 47.8771 31.8043 48.1062 31.0275 48.1061C30.1902 48.1061 29.7716 47.7271 29.7716 46.9693C29.7703 46.3788 29.8874 45.7941 30.116 45.2496C30.3064 44.7579 30.6022 44.3138 30.9826 43.9487C31.2626 43.6591 31.6427 43.4875 32.045 43.4692C32.5635 43.4692 33.1019 43.8781 33.66 44.6959Z"/></svg>'},Ts={name:"check-circle-filled",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.9829 16.5431 47.4569 4.01712 32 4ZM44.5613 24.5793L31.6382 43.9639C31.2806 44.5011 30.7008 44.8493 30.0586 44.9126C29.988 44.9197 29.9171 44.9232 29.8462 44.9231C29.275 44.9229 28.7272 44.696 28.3233 44.2921L19.7079 35.6767C19.1639 35.1326 18.9514 34.3396 19.1505 33.5964C19.3497 32.8533 19.9302 32.2728 20.6734 32.0736C21.4166 31.8745 22.2095 32.087 22.7536 32.631L29.5117 39.3881L40.9772 22.1899C41.4016 21.5439 42.1396 21.1749 42.9111 21.2229C43.6825 21.2709 44.3691 21.7286 44.7101 22.4223C45.0511 23.1159 44.9944 23.9391 44.5613 24.5793Z"/></svg>'},Os={name:"check-circle",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9998 4C16.5358 4 3.99976 16.536 3.99976 32C3.99976 47.464 16.5358 60 31.9998 60C47.4637 60 59.9998 47.464 59.9998 32C59.9826 16.5431 47.4566 4.01712 31.9998 4ZM31.9998 55.6923C18.9149 55.6923 8.30745 45.0849 8.30745 32C8.30745 18.9151 18.9149 8.30769 31.9998 8.30769C45.0847 8.30769 55.6921 18.9151 55.6921 32C55.6773 45.0788 45.0785 55.6775 31.9998 55.6923ZM44.5611 24.5793L31.638 43.9639C31.2804 44.5011 30.7005 44.8493 30.0584 44.9126C29.9878 44.9197 29.9169 44.9232 29.8459 44.9231C29.2747 44.9229 28.727 44.696 28.3231 44.2921L19.7077 35.6767C19.1636 35.1326 18.9512 34.3396 19.1503 33.5964C19.3494 32.8533 19.9299 32.2728 20.6731 32.0736C21.4163 31.8745 22.2093 32.087 22.7534 32.631L29.5115 39.3881L40.9769 22.1899C41.4013 21.5439 42.1394 21.1749 42.9108 21.2229C43.6823 21.2709 44.3688 21.7286 44.7099 22.4223C45.0509 23.1159 44.9941 23.9391 44.5611 24.5793Z"/></svg>'},ce={name:"mute",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M51.4283 11.6761L53.1768 9.53891C53.9347 8.61282 53.7982 7.24774 52.8722 6.48993C51.9461 5.73211 50.581 5.86852 49.8232 6.79461L36.3333 23.2822V13.3972C36.3332 11.6447 35.2774 10.0648 33.6583 9.39418C32.0391 8.72356 30.1755 9.09425 28.9362 10.3334L18.1029 21.1668H14.6667C9.88247 21.1722 6.00547 25.0492 6 29.8334V34.1668C6.00547 38.951 9.88247 42.828 14.6667 42.8334H18.1029L19.3315 44.0621L10.8232 54.4613C10.0653 55.3874 10.2018 56.7525 11.1279 57.5103C12.0539 58.2681 13.419 58.1317 14.1768 57.2056L22.411 47.1416L28.9362 53.6668C30.1755 54.9059 32.0391 55.2766 33.6583 54.606C35.2774 53.9354 36.3332 52.3555 36.3333 50.603V30.1254L42.6092 22.4549C44.2201 25.3756 45.044 28.6649 45 32.0001C45.1184 36.1899 43.7698 40.2896 41.1872 43.5909C40.409 44.5001 40.5152 45.8679 41.4243 46.6461C42.3334 47.4243 43.7012 47.3183 44.4795 46.4093C47.7313 42.3208 49.4486 37.2227 49.3333 32.0001C49.403 27.3538 48.067 22.7949 45.5005 18.9211L48.6119 15.1182C52.019 20.0793 53.7867 25.9829 53.6667 32.0001C53.6667 39.0587 51.4873 45.6518 47.6872 50.0909C46.909 51.0001 47.0152 52.3679 47.9243 53.1461C48.8334 53.9243 50.2012 53.8183 50.9795 52.9093C55.4408 47.6968 58 40.0764 58 32.0001C58 24.21 55.6006 16.8662 51.4283 11.6761ZM19.8971 38.5H14.6667C12.2744 38.4977 10.3357 36.559 10.3333 34.1667V29.8334C10.3357 27.4411 12.2744 25.5024 14.6667 25.5H19.8971L32 13.3972V28.5784L22.089 40.6919L19.8971 38.5ZM31.9997 50.603L25.1682 43.7715L31.9997 35.4218V50.603Z"/></svg>'},Ls={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>'},Ps={name:"send",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>'},de={name:"volume",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M33.6578 9.3322C32.0391 8.65799 30.1735 9.02919 28.9362 10.2717L18.1029 21.105H14.6667C9.88247 21.1105 6.00547 24.9875 6 29.7717V34.105C6.00547 38.8892 9.88247 42.7662 14.6667 42.7717H18.1029L28.9362 53.605C30.1755 54.8442 32.0391 55.2149 33.6583 54.5442C35.2774 53.8736 36.3332 52.2937 36.3333 50.5412V13.3355C36.3365 11.5817 35.2794 10.0001 33.6578 9.3322ZM32 50.5411L19.8971 38.4382H14.6667C12.2744 38.4358 10.3357 36.4971 10.3333 34.1049V29.7716C10.3357 27.3793 12.2744 25.4406 14.6667 25.4382H19.8971L32 13.3353V50.5411ZM49.3334 31.9383C49.4487 37.161 47.7314 42.2591 44.4796 46.3475C43.7013 47.2565 42.3335 47.3625 41.4244 46.5843C40.5153 45.8061 40.4092 44.4383 41.1873 43.5291C43.7699 40.2278 45.1185 36.1282 45.0001 31.9383C45.1185 27.7485 43.7699 23.6488 41.1873 20.3475C40.4092 19.4383 40.5153 18.0705 41.4244 17.2923C42.3335 16.5141 43.7013 16.6201 44.4796 17.5291C47.7314 21.6176 49.4487 26.7157 49.3334 31.9383ZM58.0001 31.9383C58.0001 40.0147 55.441 47.635 50.9796 52.8475C50.2013 53.7565 48.8335 53.8625 47.9244 53.0843C47.0153 52.3061 46.9092 50.9383 47.6873 50.0291C51.4874 45.59 53.6668 38.9969 53.6668 31.9383C53.6668 24.8797 51.4874 18.2866 47.6873 13.8475C46.9092 12.9383 47.0153 11.5705 47.9244 10.7923C48.8335 10.0141 50.2013 10.1201 50.9796 11.0291C55.441 16.2416 58.0001 23.862 58.0001 31.9383Z"/></svg>'},U={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 N,Ne,yt,je=!1,at=!1,Wt=!1,y=!1,he=null,Ht=!1;const bt=typeof window<"u"?window:{},x=bt.document||{head:{}},De=bt.HTMLElement||class{},v={$flags$:0,$resourcesUrl$:"",jmp:s=>s(),raf:s=>requestAnimationFrame(s),ael:(s,t,e,i)=>s.addEventListener(t,e,i),rel:(s,t,e,i)=>s.removeEventListener(t,e,i),ce:(s,t)=>new CustomEvent(s,t)},Ms=(()=>{let s=!1;try{x.addEventListener("e",null,Object.defineProperty({},"passive",{get(){s=!0}}))}catch{}return s})(),Rs=s=>Promise.resolve(s),Hs=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Ie=(s,t,e,i)=>{e&&e.map(([n,o,r])=>{const a=Ns(s,n),l=Us(t,r),c=js(n);v.ael(a,o,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>v.rel(a,o,l,c))})},Us=(s,t)=>e=>{try{U.lazyLoad||s.$hostElement$[t](e)}catch(i){J(i)}},Ns=(s,t)=>t&4?x:t&8?bt:t&16?x.body:s,js=s=>Ms?{passive:(s&1)!==0,capture:(s&2)!==0}:(s&2)!==0,pe="http://www.w3.org/1999/xlink",P=(s,t="")=>()=>{},ue=new WeakMap,Ds=(s,t,e)=>{let i=dt.get(s);Hs&&e?(i=i||new CSSStyleSheet,i.replace(t)):i=t,dt.set(s,i)},Is=(s,t,e,i)=>{let n=Be(t,e),o=dt.get(n);if(s=s.nodeType===11?s:x,o)if(typeof o=="string"){s=s.head||s;let r=ue.get(s),a;r||ue.set(s,r=new Set),r.has(n)||(a=x.createElement("style"),a.innerHTML=o,s.insertBefore(a,s.querySelector("link")),r&&r.add(n))}else s.adoptedStyleSheets.includes(o)||(s.adoptedStyleSheets=[...s.adoptedStyleSheets,o]);return n},Bs=s=>{const t=s.$cmpMeta$,e=s.$hostElement$,i=t.$flags$,n=P("attachStyles",t.$tagName$),o=Is(e.shadowRoot?e.shadowRoot:e.getRootNode(),t,s.$modeName$);i&10&&(e["s-sc"]=o,e.classList.add(o+"-h"),i&2&&e.classList.add(o+"-s")),n()},Be=(s,t)=>"sc-"+(t&&s.$flags$&32?s.$tagName$+"-"+t:s.$tagName$),zs=s=>$i.map(t=>t(s)).find(t=>!!t),fe={},Fs="http://www.w3.org/2000/svg",Ws="http://www.w3.org/1999/xhtml",Zs=s=>s!=null,Zt=s=>(s=typeof s,s==="object"||s==="function"),D=(s,t,...e)=>{let i=null,n=null,o=null,r=!1,a=!1,l=[];const c=h=>{for(let p=0;p<h.length;p++)i=h[p],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((r=typeof s!="function"&&!Zt(i))&&(i=String(i)),r&&a?l[l.length-1].$text$+=i:l.push(r?lt(null,i):i),a=r)};if(c(e),t){t.key&&(n=t.key),t.name&&(o=t.name);{const h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(p=>h[p]).join(" "))}}if(typeof s=="function")return s(t===null?{}:t,l,qs);const d=lt(s,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),d.$key$=n,d.$name$=o,d},lt=(s,t)=>{const e={$flags$:0,$tag$:s,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},Gt={},Gs=s=>s&&s.$tag$===Gt,qs={forEach:(s,t)=>s.map(ge).forEach(t),map:(s,t)=>s.map(ge).map(t).map(Xs)},ge=s=>({vattrs:s.$attrs$,vchildren:s.$children$,vkey:s.$key$,vname:s.$name$,vtag:s.$tag$,vtext:s.$text$}),Xs=s=>{if(typeof s.vtag=="function"){const e=Object.assign({},s.vattrs);return s.vkey&&(e.key=s.vkey),s.vname&&(e.name=s.vname),D(s.vtag,e,...s.vchildren||[])}const t=lt(s.vtag,s.vtext);return t.$attrs$=s.vattrs,t.$children$=s.vchildren,t.$key$=s.vkey,t.$name$=s.vname,t},$e=(s,t,e,i,n,o)=>{if(e!==i){let r=be(s,t),a=t.toLowerCase();if(t==="class"){const l=s.classList,c=me(e),d=me(i);l.remove(...c.filter(h=>h&&!d.includes(h))),l.add(...d.filter(h=>h&&!c.includes(h)))}else if(t==="style"){for(const l in e)(!i||i[l]==null)&&(l.includes("-")?s.style.removeProperty(l):s.style[l]="");for(const l in i)(!e||i[l]!==e[l])&&(l.includes("-")?s.style.setProperty(l,i[l]):s.style[l]=i[l])}else if(t!=="key")if(t==="ref")i&&i(s);else if(!s.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):be(bt,a)?t=a.slice(2):t=a[2]+t.slice(3),e&&v.rel(s,t,e,!1),i&&v.ael(s,t,i,!1);else{const l=Zt(i);if((r||l&&i!==null)&&!n)try{if(s.tagName.includes("-"))s[t]=i;else{let d=i??"";t==="list"?r=!1:(e==null||s[t]!=d)&&(s[t]=d)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),i==null||i===!1?(i!==!1||s.getAttribute(t)==="")&&(c?s.removeAttributeNS(pe,t):s.removeAttribute(t)):(!r||o&4||n)&&!l&&(i=i===!0?"":i,c?s.setAttributeNS(pe,t,i):s.setAttribute(t,i))}}},Ys=/\s/,me=s=>s?s.split(Ys):[],ze=(s,t,e,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,o=s&&s.$attrs$||fe,r=t.$attrs$||fe;for(i in o)i in r||$e(n,i,o[i],void 0,e,t.$flags$);for(i in r)$e(n,i,o[i],r[i],e,t.$flags$)},ct=(s,t,e,i)=>{let n=t.$children$[e],o=0,r,a,l;if(je||(Wt=!0,n.$tag$==="slot"&&(N&&i.classList.add(N+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)r=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)r=n.$elm$=x.createTextNode("");else{if(y||(y=n.$tag$==="svg"),r=n.$elm$=x.createElementNS(y?Fs:Ws,n.$flags$&2?"slot-fb":n.$tag$),y&&n.$tag$==="foreignObject"&&(y=!1),ze(null,n,y),Zs(N)&&r["s-si"]!==N&&r.classList.add(r["s-si"]=N),n.$children$)for(o=0;o<n.$children$.length;++o)a=ct(s,n,o,r),a&&r.appendChild(a);n.$tag$==="svg"?y=!1:r.tagName==="foreignObject"&&(y=!0)}return r["s-hn"]=yt,n.$flags$&3&&(r["s-sr"]=!0,r["s-cr"]=Ne,r["s-sn"]=n.$name$||"",l=s&&s.$children$&&s.$children$[e],l&&l.$tag$===n.$tag$&&s.$elm$&&K(s.$elm$,!1)),r},K=(s,t)=>{v.$flags$|=1;const e=s.childNodes;for(let i=e.length-1;i>=0;i--){const n=e[i];n["s-hn"]!==yt&&n["s-ol"]&&(Ze(n).insertBefore(n,qt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,Wt=!0),t&&K(n,t)}v.$flags$&=-2},Fe=(s,t,e,i,n,o)=>{let r=s["s-cr"]&&s["s-cr"].parentNode||s,a;for(r.shadowRoot&&r.tagName===yt&&(r=r.shadowRoot);n<=o;++n)i[n]&&(a=ct(null,e,n,s),a&&(i[n].$elm$=a,r.insertBefore(a,qt(t))))},We=(s,t,e,i,n)=>{for(;t<=e;++t)(i=s[t])&&(n=i.$elm$,Xe(i),at=!0,n["s-ol"]?n["s-ol"].remove():K(n,!0),n.remove())},Ks=(s,t,e,i)=>{let n=0,o=0,r=0,a=0,l=t.length-1,c=t[0],d=t[l],h=i.length-1,p=i[0],g=i[h],C,et;for(;n<=l&&o<=h;)if(c==null)c=t[++n];else if(d==null)d=t[--l];else if(p==null)p=i[++o];else if(g==null)g=i[--h];else if(st(c,p))j(c,p),c=t[++n],p=i[++o];else if(st(d,g))j(d,g),d=t[--l],g=i[--h];else if(st(c,g))(c.$tag$==="slot"||g.$tag$==="slot")&&K(c.$elm$.parentNode,!1),j(c,g),s.insertBefore(c.$elm$,d.$elm$.nextSibling),c=t[++n],g=i[--h];else if(st(d,p))(c.$tag$==="slot"||g.$tag$==="slot")&&K(d.$elm$.parentNode,!1),j(d,p),s.insertBefore(d.$elm$,c.$elm$),d=t[--l],p=i[++o];else{for(r=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===p.$key$){r=a;break}r>=0?(et=t[r],et.$tag$!==p.$tag$?C=ct(t&&t[o],e,r,s):(j(et,p),t[r]=void 0,C=et.$elm$),p=i[++o]):(C=ct(t&&t[o],e,o,s),p=i[++o]),C&&Ze(c.$elm$).insertBefore(C,qt(c.$elm$))}n>l?Fe(s,i[h+1]==null?null:i[h+1].$elm$,e,i,o,h):o>h&&We(t,n,l)},st=(s,t)=>s.$tag$===t.$tag$?s.$tag$==="slot"?s.$name$===t.$name$:s.$key$===t.$key$:!1,qt=s=>s&&s["s-ol"]||s,Ze=s=>(s["s-ol"]?s["s-ol"]:s).parentNode,j=(s,t)=>{const e=t.$elm$=s.$elm$,i=s.$children$,n=t.$children$,o=t.$tag$,r=t.$text$;let a;r===null?(y=o==="svg"?!0:o==="foreignObject"?!1:y,o==="slot"||ze(s,t,y),i!==null&&n!==null?Ks(e,i,t,n):n!==null?(s.$text$!==null&&(e.textContent=""),Fe(e,null,t,n,0,n.length-1)):i!==null&&We(i,0,i.length-1),y&&o==="svg"&&(y=!1)):(a=e["s-cr"])?a.parentNode.textContent=r:s.$text$!==r&&(e.data=r)},Ge=s=>{let t=s.childNodes,e,i,n,o,r,a;for(i=0,n=t.length;i<n;i++)if(e=t[i],e.nodeType===1){if(e["s-sr"]){for(r=e["s-sn"],e.hidden=!1,o=0;o<n;o++)if(a=t[o].nodeType,t[o]["s-hn"]!==e["s-hn"]||r!==""){if(a===1&&r===t[o].getAttribute("slot")){e.hidden=!0;break}}else if(a===1||a===3&&t[o].textContent.trim()!==""){e.hidden=!0;break}}Ge(e)}},_=[],qe=s=>{let t,e,i,n,o,r,a=0,l=s.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(e=t["s-cr"])&&e.parentNode)for(i=e.parentNode.childNodes,n=t["s-sn"],r=i.length-1;r>=0;r--)e=i[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(ve(e,n)?(o=_.find(d=>d.$nodeToRelocate$===e),at=!0,e["s-sn"]=e["s-sn"]||n,o?o.$slotRefNode$=t:_.push({$slotRefNode$:t,$nodeToRelocate$:e}),e["s-sr"]&&_.map(d=>{ve(d.$nodeToRelocate$,e["s-sn"])&&(o=_.find(h=>h.$nodeToRelocate$===e),o&&!d.$slotRefNode$&&(d.$slotRefNode$=o.$slotRefNode$))})):_.some(d=>d.$nodeToRelocate$===e)||_.push({$nodeToRelocate$:e}));t.nodeType===1&&qe(t)}},ve=(s,t)=>s.nodeType===1?s.getAttribute("slot")===null&&t===""||s.getAttribute("slot")===t:s["s-sn"]===t?!0:t==="",Xe=s=>{s.$attrs$&&s.$attrs$.ref&&s.$attrs$.ref(null),s.$children$&&s.$children$.map(Xe)},Qs=(s,t)=>{const e=s.$hostElement$,i=s.$cmpMeta$,n=s.$vnode$||lt(null,null),o=Gs(t)?t:D(null,null,t);yt=e.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.map(([r,a])=>o.$attrs$[a]=e[r])),o.$tag$=null,o.$flags$|=4,s.$vnode$=o,o.$elm$=n.$elm$=e.shadowRoot||e,N=e["s-sc"],Ne=e["s-cr"],je=(i.$flags$&1)!==0,at=!1,j(n,o);{if(v.$flags$|=1,Wt){qe(o.$elm$);let r,a,l,c,d,h,p=0;for(;p<_.length;p++)r=_[p],a=r.$nodeToRelocate$,a["s-ol"]||(l=x.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(p=0;p<_.length;p++)if(r=_[p],a=r.$nodeToRelocate$,r.$slotRefNode$){for(c=r.$slotRefNode$.parentNode,d=r.$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"])){d=h;break}(!d&&c!==a.parentNode||a.nextSibling!==d)&&a!==d&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,d))}else a.nodeType===1&&(a.hidden=!0)}at&&Ge(o.$elm$),v.$flags$&=-2,_.length=0}},Js=s=>s,Vs=(s,t,e)=>{const i=Js(s);return{emit:n=>ti(i,t,{bubbles:!!(e&4),composed:!!(e&2),cancelable:!!(e&1),detail:n})}},ti=(s,t,e)=>{const i=v.ce(t,e);return s.dispatchEvent(i),i},ei=(s,t)=>{},Ye=(s,t)=>(s.$flags$|=16,ei(s,s.$ancestorComponent$),yi(()=>si(s,t))),si=(s,t)=>{const e=s.$hostElement$,i=P("scheduleUpdate",s.$cmpMeta$.$tagName$),n=e;let o;return t?o=I(n,"componentWillLoad"):o=I(n,"componentWillUpdate"),o=ye(o,()=>I(n,"componentWillRender")),i(),ye(o,()=>ii(s,n,t))},ii=async(s,t,e)=>{const i=s.$hostElement$,n=P("update",s.$cmpMeta$.$tagName$);i["s-rc"],e&&Bs(s);const o=P("render",s.$cmpMeta$.$tagName$);ni(s,t,i),o(),n(),oi(s)},ni=(s,t,e)=>{try{he=t,t=t.render&&t.render(),s.$flags$&=-17,s.$flags$|=2,(U.hasRenderFn||U.reflect)&&(U.vdomRender||U.reflect)&&(U.hydrateServerSide||Qs(s,t))}catch(a){J(a,s.$hostElement$)}return he=null,null},oi=s=>{const t=s.$cmpMeta$.$tagName$,e=s.$hostElement$,i=P("postUpdate",t),n=e;s.$ancestorComponent$,I(n,"componentDidRender"),s.$flags$&64?(I(n,"componentDidUpdate"),i()):(s.$flags$|=64,I(n,"componentDidLoad"),i())},I=(s,t,e)=>{if(s&&s[t])try{return s[t](e)}catch(i){J(i)}},ye=(s,t)=>s&&s.then?s.then(t):t(),ri=(s,t)=>s!=null&&!Zt(s)?t&4?s==="false"?!1:s===""||!!s:t&2?parseFloat(s):t&1?String(s):s:s,ai=(s,t)=>_t(s).$instanceValues$.get(t),li=(s,t,e,i)=>{const n=_t(s),o=s,r=n.$instanceValues$.get(t),a=n.$flags$,l=o;e=ri(e,i.$members$[t][0]);const c=Number.isNaN(r)&&Number.isNaN(e);if(e!==r&&!c){n.$instanceValues$.set(t,e);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(p=>{try{l[p](e,r,t)}catch(g){J(g,o)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(e,r,t)===!1)return;Ye(n,!1)}}}},ci=(s,t,e)=>{if(t.$members$){s.watchers&&(t.$watchers$=s.watchers);const i=Object.entries(t.$members$),n=s.prototype;i.map(([o,[r]])=>{(r&31||r&32)&&Object.defineProperty(n,o,{get(){return ai(this,o)},set(a){li(this,o,a,t)},configurable:!0,enumerable:!0})});{const o=new Map;n.attributeChangedCallback=function(r,a,l){v.jmp(()=>{const c=o.get(r);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})},s.observedAttributes=i.filter(([r,a])=>a[0]&15).map(([r,a])=>{const l=a[1]||r;return o.set(l,r),a[0]&512&&t.$attrsToReflect$.push([r,l]),l})}}return s},di=async(s,t,e,i,n)=>{if(!(t.$flags$&32)&&(n=s.constructor,t.$flags$|=32,customElements.whenDefined(e.$tagName$).then(()=>t.$flags$|=128),n.style)){let r=n.style;typeof r!="string"&&(r=r[t.$modeName$=zs(s)]);const a=Be(e,t.$modeName$);if(!dt.has(a)){const l=P("registerStyles",e.$tagName$);Ds(a,r,!!(e.$flags$&1)),l()}}t.$ancestorComponent$,(()=>Ye(t,!0))()},hi=s=>{},pi=s=>{if(!(v.$flags$&1)){const t=_t(s),e=t.$cmpMeta$,i=P("connectedCallback",e.$tagName$);t.$flags$&1?(Ie(s,t,e.$listeners$),hi(t.$lazyInstance$)):(t.$flags$|=1,e.$flags$&12&&ui(s),e.$members$&&Object.entries(e.$members$).map(([n,[o]])=>{if(o&31&&s.hasOwnProperty(n)){const r=s[n];delete s[n],s[n]=r}}),di(s,t,e)),i()}},ui=s=>{const t=s["s-cr"]=x.createComment("");t["s-cn"]=!0,s.insertBefore(t,s.firstChild)},fi=s=>{if(!(v.$flags$&1)){const t=_t(s);t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0)}},Ke=(s,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$listeners$=t[3],e.$watchers$=s.$watchers$,e.$attrsToReflect$=[];const i=s.prototype.connectedCallback,n=s.prototype.disconnectedCallback;return Object.assign(s.prototype,{__registerHost(){gi(this,e)},connectedCallback(){pi(this),i&&i.call(this)},disconnectedCallback(){fi(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(e.$flags$&16)})}}),s.is=e.$tagName$,ci(s,e)},Qe=new WeakMap,_t=s=>Qe.get(s),gi=(s,t)=>{const e={$flags$:0,$hostElement$:s,$cmpMeta$:t,$instanceValues$:new Map};return Ie(s,e,t.$listeners$),Qe.set(s,e)},be=(s,t)=>t in s,J=(s,t)=>(0,console.error)(s,t),dt=new Map,$i=[],_e=[],Je=[],mi=(s,t)=>e=>{s.push(e),Ht||(Ht=!0,t&&v.$flags$&4?vi(Ut):v.raf(Ut))},Ce=s=>{for(let t=0;t<s.length;t++)try{s[t](performance.now())}catch(e){J(e)}s.length=0},Ut=()=>{Ce(_e),Ce(Je),(Ht=_e.length>0)&&v.raf(Ut)},vi=s=>Rs().then(s),yi=mi(Je,!0),bi=(s={})=>{const{content:t="",title:e,attributes:i=[]}=s;let n="",o=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return e&&(n=`<title>${e}</title>`),`<svg ${o.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},_i=s=>s.replace(/<(\/?)svg([^>]*)>/g,"").trim();function Ci(s){return`${s.getFullYear()}.${s.getMonth()+1}`}class xi{constructor(t){this.voca_component=t,this.voca_added=Ci(new Date)}}const wi="telia-vst{display:none}",Ai=Ke(class extends De{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Vs(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new xi(this.dataTrackingId))}render(){return D(Gt,null)}static get style(){return wi}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function Ve(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,Ai);break}})}Ve();function Nt(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function Si(){if(typeof Nt().vocadsIcons!==void 0)return Nt().vocadsIcons}function Ei(){return Nt().vocadsIconsRegistered}const ki=".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))}",Ti=Ke(class extends De{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(Ei()&&this.name){const s=Si();return s[this.name]?s[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 s=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=bi({content:_i(s),attributes:t,title:this.allyTitle});return D(Gt,{class:`telia-icon telia-icon--${this.size}`},D("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:e}),D("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return ki}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function Oi(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Ti);break;case"telia-vst":customElements.get(t)||Ve();break}})}Oi();/**
|
20
20
|
* @license
|
21
21
|
* Copyright 2017 Google LLC
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -48,7 +48,7 @@
|
|
48
48
|
* @license
|
49
49
|
* Copyright 2018 Google LLC
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
51
|
-
*/const ft=xt(class extends Xt{constructor(s){var t;if(super(s),s.type!==Ct.ATTRIBUTE||s.name!=="class"||((t=s.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(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var i,n;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.st)!=null&&i.has(o))&&this.it.add(o);return this.render(t)}const e=s.element.classList;for(const o of this.it)o in t||(e.remove(o),this.it.delete(o));for(const o in t){const r=!!t[o];r===this.it.has(o)||(n=this.st)!=null&&n.has(o)||(r?(e.add(o),this.it.add(o)):(e.remove(o),this.it.delete(o)))}return E}});var ji=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,
|
51
|
+
*/const ft=xt(class extends Xt{constructor(s){var t;if(super(s),s.type!==Ct.ATTRIBUTE||s.name!=="class"||((t=s.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(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var i,n;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.st)!=null&&i.has(o))&&this.it.add(o);return this.render(t)}const e=s.element.classList;for(const o of this.it)o in t||(e.remove(o),this.it.delete(o));for(const o in t){const r=!!t[o];r===this.it.has(o)||(n=this.st)!=null&&n.has(o)||(r?(e.add(o),this.it.add(o)):(e.remove(o),this.it.delete(o)))}return E}});var ji=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Ii=(s,t,e,i)=>{for(var n=i>1?void 0:i?Di(t,e):t,o=s.length-1,r;o>=0;o--)(r=s[o])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&ji(t,e,n),n};class Yt extends m{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"),u}}Yt.styles=[b`
|
52
52
|
:host {
|
53
53
|
position: fixed;
|
54
54
|
display: flex;
|
@@ -64,7 +64,7 @@
|
|
64
64
|
bottom: 20px;
|
65
65
|
left: 20px;
|
66
66
|
}
|
67
|
-
`];
|
67
|
+
`];Ii([$({attribute:!0})],Yt.prototype,"anchor",2);const Bi=new WeakMap;let xe=0;const Mt=new Map,we=new WeakSet,Ae=()=>new Promise(s=>requestAnimationFrame(s)),zi=[{transform:"translateX(100%) scale(0)",opacity:0}],Fi=[{opacity:0}],Se=[{opacity:0},{opacity:1}],Ee=(s,t)=>{const e=s-t;return e===0?void 0:e},ke=(s,t)=>{const e=s/t;return e===1?void 0:e},Rt={left:(s,t)=>{const e=Ee(s,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(s,t)=>{const e=Ee(s,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(s,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=ke(s,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(s,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=ke(s,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},Wi={duration:333,easing:"ease-in-out"},Zi=["left","top","width","height","opacity","color","background"],Te=new WeakMap;class Gi extends es{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Ct.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.h=e})}async resolveFinished(){var t;(t=this.h)==null||t.call(this),this.h=void 0}render(t){return u}getController(){return Bi.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var n;const i=this.l===void 0;return i&&(this.l=(n=t.options)==null?void 0:n.host,this.l.addController(this),this.element=t.element,Te.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.u(e),this.render(e)}u(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=Zi),this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(n=>{const o=e[n]??(Rt[n]?void 0:i[n]),r=Number(o);t[n]=isNaN(r)?o+"":r}),t}m(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,n)=>{if(Array.isArray(i)){if(Array.isArray(n)&&n.length===i.length&&i.every((o,r)=>o===n[r]))return!1}else if(n===i)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Ae;const e=this._(),i=this.A(this.options.keyframeOptions,e),n=this.p();if(this.g!==void 0){const{from:o,to:r}=this.O(this.g,n,e);this.log("measured",[this.g,n,o,r]),t=this.calculateKeyframes(o,r)}else{const o=Mt.get(this.options.inId);if(o){Mt.delete(this.options.inId);const{from:r,to:a}=this.O(o,n,e);t=this.calculateKeyframes(r,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,xe++,t.forEach(l=>l.zIndex=xe)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.j!==void 0&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,e;this.j=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.o||(this.options.id!==void 0&&Mt.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await Ae(),(e=this.t)==null?void 0:e.isConnected){const i=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,i),this.options.stabilizeOut){const n=this.p();this.log("stabilizing out");const o=this.g.left-n.left,r=this.g.top-n.top;getComputedStyle(this.element).position!=="static"||o===0&&r===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),r!==0&&(this.element.style.top=r+"px")}}const t=this.A(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,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Te.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=we.has(this.l);return t||this.l.updateComplete.then(()=>{we.add(this.l)}),t}A(t,e=this._()){const i={...Wi};return e.forEach(n=>Object.assign(i,n.options.keyframeOptions)),Object.assign(i,t),i}O(t,e,i){t={...t},e={...e};const n=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let o=1,r=1;return n!==void 0&&(n.forEach(a=>{a.width&&(o/=a.width),a.height&&(r/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=o*t.left,e.left=o*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=r*t.top,e.top=r*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const n={},o={};let r=!1;const a={};for(const l in e){const c=t[l],d=e[l];if(l in Rt){const h=Rt[l];if(c===void 0||d===void 0)continue;const p=h(c,d);p.transform!==void 0&&(a[l]=p.value,r=!0,n.transform=`${n.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(n,p.overrideFrom))}else c!==d&&c!==void 0&&d!==void 0&&(r=!0,n[l]=c,o[l]=d)}return n.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=a,r?[n,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!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]),i=!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(i),i}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 jt=xt(Gi),it=(s,t,e)=>{s&&e.style.setProperty(t,s)},ss=(s,t)=>{var e,i,n,o;it((e=s.colors)==null?void 0:e.primaryBackground,"--primary-background",t),it((i=s.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),it((n=s.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),it((o=s.colors)==null?void 0:o.textOnSecondaryBackground,"--text-on-secondary-background",t)};var qi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,wt=(s,t,e,i)=>{for(var n=i>1?void 0:i?Xi(t,e):t,o=s.length-1,r;o>=0;o--)(r=s[o])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&qi(t,e,n),n};class M extends m{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.containerRef=pt()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&ss(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 f` <img src=${e} class="trigger-icon" alt="" /> `;const i=(c=this.application)==null?void 0:c.triggerIcon;if(!i)return u;const n=async d=>Ls,{type:o,content:r}=i;switch(o){case"Telia":{const d=await n();return d?f`<telia-icon
|
68
68
|
class="trigger-icon"
|
69
69
|
svg=${d.svg}
|
70
70
|
size="lg"
|
@@ -596,7 +596,7 @@
|
|
596
596
|
* @license
|
597
597
|
* Copyright 2017 Google LLC
|
598
598
|
* SPDX-License-Identifier: BSD-3-Clause
|
599
|
-
*/class
|
599
|
+
*/class It extends Xt{constructor(t){if(super(t),this.et=u,t.type!==Ct.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===u||t==null)return this.vt=void 0,this.et=t;if(t===E)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}It.directiveName="unsafeHTML",It.resultType=1;const fn=xt(It);var gn=Object.defineProperty,$n=Object.getOwnPropertyDescriptor,as=(s,t,e,i)=>{for(var n=i>1?void 0:i?$n(t,e):t,o=s.length-1,r;o>=0;o--)(r=s[o])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&gn(t,e,n),n};let mt=class extends m{render(){return f`<div class="message-type-html">
|
600
600
|
${fn(this.message.content)}
|
601
601
|
</div>`}};mt.styles=[b`
|
602
602
|
:host {
|
@@ -613,7 +613,7 @@
|
|
613
613
|
a {
|
614
614
|
word-break: break-all;
|
615
615
|
}
|
616
|
-
`];as([$({attribute:!1})],mt.prototype,"message",2);mt=as([V("message-type-html")],mt);class mn{constructor(t){this._message=null,this._host=t,t.addController(this)}hostConnected(){}set message(t){this._message=t,this._host.requestUpdate()}get message(){return this._message}hasMessage(){return!!this.message}}var vn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,St=(s,t,e,i)=>{for(var n=i>1?void 0:i?yn(t,e):t,o=s.length-1,r;o>=0;o--)(r=s[o])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&vn(t,e,n),n};const bn=s=>{s.scrollTo?s.scrollTo({top:s.scrollHeight,behavior:"smooth"}):s.scrollTop=s.scrollHeight},ls=is(m);class R extends ls{constructor(){super(...arguments),this.toast=new mn(this),this.message="",this.platform=null,this.session=null,this.disabled=!1,this.conversationContentRef=pt(),this.formRef=pt(),this.chatScrollHeight=0}async connectedCallback(){super.connectedCallback();const t=await this.application.container.get("conversation");this.platform=t||null,this.platform&&(this.platform.activeSessionId?this.session=this.platform.sessions.get(this.platform.activeSessionId)||null:this.session=this.platform.createSession(this)||null),this._addHeaderOptions()}async _onSendMessage(t){var i;if(t.preventDefault(),this.message.length<=0){(i=this.formRef.value)==null||i.classList.add("shake"),setTimeout(()=>{var n;(n=this.formRef.value)==null||n.classList.remove("shake")},500);return}const e=new CustomEvent("user-submit",{detail:{text:this.message}});this.dispatchEvent(e),this.message=""}_addHeaderOptions(){const t=this.application.getComponent("widget-header");if(!t)return;const e=this.application.texts,i=e.getOrFallback("conversation.mute","Mute"),n=e.getOrFallback("conversation.unmute","Unmute"),r=!!this.application.branding().other.disableSound,a=t.addOption({label:r?n:i,icon:r?de.svg:ce.svg,closeOnClick:!1,onClick:()=>{!!this.application.branding().other.disableSound?(this.application.unmute(),a.updateLabel(i),a.updateIcon(de.svg)):(this.application.mute(),a.updateLabel(n),a.updateIcon(ce.svg))}})}_inputHandler(t){this.message=t.target.value}_actionHandler(t){}onSessionUpdated(){const t=this.conversationContentRef.value;t&&setTimeout(()=>{const e=t.scrollHeight;e>this.chatScrollHeight&&(bn(t),this.chatScrollHeight=e)},1e3)}disableInput(){this.disabled=!0}enableInput(){this.disabled=!1}setToastMessage(t){this.toast.message=t}render(){const t=this.application.texts;return f` <div
|
616
|
+
`];as([$({attribute:!1})],mt.prototype,"message",2);mt=as([V("message-type-html")],mt);class mn{constructor(t){this._message=null,this._host=t,t.addController(this)}hostConnected(){}set message(t){this._message=t,this._host.requestUpdate()}get message(){return this._message}hasMessage(){return!!this.message}}var vn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,St=(s,t,e,i)=>{for(var n=i>1?void 0:i?yn(t,e):t,o=s.length-1,r;o>=0;o--)(r=s[o])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&vn(t,e,n),n};const bn=s=>{s.scrollTo?s.scrollTo({top:s.scrollHeight,behavior:"smooth"}):s.scrollTop=s.scrollHeight},ls=is(m);class R extends ls{constructor(){super(...arguments),this.toast=new mn(this),this.message="",this.platform=null,this.session=null,this.disabled=!1,this.conversationContentRef=pt(),this.formRef=pt(),this.chatScrollHeight=0}async connectedCallback(){super.connectedCallback();const t=await this.application.container.get("conversation");this.platform=t||null,this.platform&&(this.platform.activeSessionId?this.session=this.platform.sessions.get(this.platform.activeSessionId)||null:this.session=this.platform.createSession(this)||null),this._addHeaderOptions()}async _onSendMessage(t){var i;if(t.preventDefault(),this.message.length<=0){(i=this.formRef.value)==null||i.classList.add("shake"),setTimeout(()=>{var n;(n=this.formRef.value)==null||n.classList.remove("shake")},500);return}const e=new CustomEvent("user-submit",{detail:{text:this.message}});this.dispatchEvent(e),this.message=""}_addHeaderOptions(){const t=this.application.getComponent("widget-header");if(!t)return;const e=this.application.texts,i=e.getOrFallback("conversation.mute","Mute"),n=e.getOrFallback("conversation.unmute","Unmute"),r=!!this.application.branding().other.disableSound,a=t.addOption({label:r?n:i,icon:r?de.svg:ce.svg,closeOnClick:!1,onClick:()=>{!!this.application.branding().other.disableSound?(this.application.unmute(),a.updateLabel(i),a.updateIcon(de.svg)):(this.application.mute(),a.updateLabel(n),a.updateIcon(ce.svg))}})}_inputHandler(t){this.message=t.target.value}_actionHandler(t){}onSessionUpdated(){const t=this.conversationContentRef.value;t&&setTimeout(()=>{const e=t.scrollHeight;e>this.chatScrollHeight&&(bn(t),this.chatScrollHeight=e)},1e3)}disableInput(){this.disabled=!0}enableInput(){this.disabled=!1}setToastMessage(t){this.toast.message=t}handover(t,e={}){var i;this.enableInput(),this.setToastMessage(null),(i=this.session)==null||i.handover(t,e)}render(){const t=this.application.texts;return f` <div
|
617
617
|
@action=${this._actionHandler}
|
618
618
|
class=${ft({conversation:!0,disabled:this.disabled,"conversation--has-toast":this.toast.hasMessage(),"conversation--input-has-text":this.message.length>0})}
|
619
619
|
>
|
@@ -4,7 +4,7 @@ import { ConversationMessageType as Et } from "./index.mjs";
|
|
4
4
|
* Copyright 2019 Google LLC
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
6
6
|
*/
|
7
|
-
const nt = globalThis,
|
7
|
+
const nt = globalThis, Bt = nt.ShadowRoot && (nt.ShadyCSS === void 0 || nt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, zt = Symbol(), Vt = /* @__PURE__ */ new WeakMap();
|
8
8
|
let Le = class {
|
9
9
|
constructor(t, e, i) {
|
10
10
|
if (this._$cssResult$ = !0, i !== zt)
|
@@ -14,7 +14,7 @@ let Le = class {
|
|
14
14
|
get styleSheet() {
|
15
15
|
let t = this.o;
|
16
16
|
const e = this.t;
|
17
|
-
if (
|
17
|
+
if (Bt && t === void 0) {
|
18
18
|
const i = e !== void 0 && e.length === 1;
|
19
19
|
i && (t = Vt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Vt.set(e, t));
|
20
20
|
}
|
@@ -34,14 +34,14 @@ const cs = (s) => new Le(typeof s == "string" ? s : s + "", void 0, zt), b = (s,
|
|
34
34
|
})(n) + s[o + 1], s[0]);
|
35
35
|
return new Le(e, s, zt);
|
36
36
|
}, ds = (s, t) => {
|
37
|
-
if (
|
37
|
+
if (Bt)
|
38
38
|
s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
39
39
|
else
|
40
40
|
for (const e of t) {
|
41
41
|
const i = document.createElement("style"), n = nt.litNonce;
|
42
42
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
43
43
|
}
|
44
|
-
}, te =
|
44
|
+
}, te = Bt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
45
45
|
let e = "";
|
46
46
|
for (const i of t.cssRules)
|
47
47
|
e += i.cssText;
|
@@ -364,13 +364,13 @@ class X {
|
|
364
364
|
return i.innerHTML = t, i;
|
365
365
|
}
|
366
366
|
}
|
367
|
-
function
|
367
|
+
function I(s, t, e = s, i) {
|
368
368
|
var r, a;
|
369
369
|
if (t === E)
|
370
370
|
return t;
|
371
371
|
let n = i !== void 0 ? (r = e._$Co) == null ? void 0 : r[i] : e._$Cl;
|
372
372
|
const o = q(t) ? void 0 : t._$litDirective$;
|
373
|
-
return (n == null ? void 0 : n.constructor) !== o && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), o === void 0 ? n = void 0 : (n = new o(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t =
|
373
|
+
return (n == null ? void 0 : n.constructor) !== o && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), o === void 0 ? n = void 0 : (n = new o(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = I(s, n._$AS(s, t.values), n, i)), t;
|
374
374
|
}
|
375
375
|
class Cs {
|
376
376
|
constructor(t, e) {
|
@@ -421,7 +421,7 @@ class K {
|
|
421
421
|
return this._$AB;
|
422
422
|
}
|
423
423
|
_$AI(t, e = this) {
|
424
|
-
t =
|
424
|
+
t = I(this, t, e), q(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ys(t) ? this.T(t) : this._(t);
|
425
425
|
}
|
426
426
|
k(t) {
|
427
427
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -480,12 +480,12 @@ class vt {
|
|
480
480
|
const o = this.strings;
|
481
481
|
let r = !1;
|
482
482
|
if (o === void 0)
|
483
|
-
t =
|
483
|
+
t = I(this, t, e, 0), r = !q(t) || t !== this._$AH && t !== E, r && (this._$AH = t);
|
484
484
|
else {
|
485
485
|
const a = t;
|
486
486
|
let l, c;
|
487
487
|
for (t = o[0], l = 0; l < o.length - 1; l++)
|
488
|
-
c =
|
488
|
+
c = I(this, a[i + l], e, l), c === E && (c = this._$AH[l]), r || (r = !q(c) || c !== this._$AH[l]), c === u ? t = u : t !== u && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c;
|
489
489
|
}
|
490
490
|
r && !n && this.O(t);
|
491
491
|
}
|
@@ -514,7 +514,7 @@ class As extends vt {
|
|
514
514
|
super(t, e, i, n, o), this.type = 5;
|
515
515
|
}
|
516
516
|
_$AI(t, e = this) {
|
517
|
-
if ((t =
|
517
|
+
if ((t = I(this, t, e, 0) ?? u) === E)
|
518
518
|
return;
|
519
519
|
const i = this._$AH, n = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== u && (i === u || n);
|
520
520
|
n && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
@@ -532,7 +532,7 @@ class Ss {
|
|
532
532
|
return this._$AM._$AU;
|
533
533
|
}
|
534
534
|
_$AI(t) {
|
535
|
-
|
535
|
+
I(this, t);
|
536
536
|
}
|
537
537
|
}
|
538
538
|
const Ot = W.litHtmlPolyfillSupport;
|
@@ -692,7 +692,7 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
692
692
|
} catch {
|
693
693
|
}
|
694
694
|
return !1;
|
695
|
-
})(),
|
695
|
+
})(), Ie = (s, t, e, i) => {
|
696
696
|
e && e.map(([n, o, r]) => {
|
697
697
|
const a = Ns(s, n), l = Us(t, r), c = js(n);
|
698
698
|
v.ael(a, o, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => v.rel(a, o, l, c));
|
@@ -710,8 +710,8 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
710
710
|
}, ue = /* @__PURE__ */ new WeakMap(), Ds = (s, t, e) => {
|
711
711
|
let i = dt.get(s);
|
712
712
|
Hs && e ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, dt.set(s, i);
|
713
|
-
},
|
714
|
-
let n =
|
713
|
+
}, Is = (s, t, e, i) => {
|
714
|
+
let n = Be(t, e), o = dt.get(n);
|
715
715
|
if (s = s.nodeType === 11 ? s : x, o)
|
716
716
|
if (typeof o == "string") {
|
717
717
|
s = s.head || s;
|
@@ -720,10 +720,10 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
720
720
|
} else
|
721
721
|
s.adoptedStyleSheets.includes(o) || (s.adoptedStyleSheets = [...s.adoptedStyleSheets, o]);
|
722
722
|
return n;
|
723
|
-
},
|
724
|
-
const t = s.$cmpMeta$, e = s.$hostElement$, i = t.$flags$, n = P("attachStyles", t.$tagName$), o =
|
723
|
+
}, Bs = (s) => {
|
724
|
+
const t = s.$cmpMeta$, e = s.$hostElement$, i = t.$flags$, n = P("attachStyles", t.$tagName$), o = Is(e.shadowRoot ? e.shadowRoot : e.getRootNode(), t, s.$modeName$);
|
725
725
|
i & 10 && (e["s-sc"] = o, e.classList.add(o + "-h"), i & 2 && e.classList.add(o + "-s")), n();
|
726
|
-
},
|
726
|
+
}, Be = (s, t) => "sc-" + (t && s.$flags$ & 32 ? s.$tagName$ + "-" + t : s.$tagName$), zs = (s) => $i.map((t) => t(s)).find((t) => !!t), fe = {}, Fs = "http://www.w3.org/2000/svg", Ws = "http://www.w3.org/1999/xhtml", Zs = (s) => s != null, Zt = (s) => (s = typeof s, s === "object" || s === "function"), j = (s, t, ...e) => {
|
727
727
|
let i = null, n = null, o = null, r = !1, a = !1, l = [];
|
728
728
|
const c = (h) => {
|
729
729
|
for (let p = 0; p < h.length; p++)
|
@@ -947,7 +947,7 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
947
947
|
return t ? o = D(n, "componentWillLoad") : o = D(n, "componentWillUpdate"), o = ye(o, () => D(n, "componentWillRender")), i(), ye(o, () => ii(s, n, t));
|
948
948
|
}, ii = async (s, t, e) => {
|
949
949
|
const i = s.$hostElement$, n = P("update", s.$cmpMeta$.$tagName$);
|
950
|
-
i["s-rc"], e &&
|
950
|
+
i["s-rc"], e && Bs(s);
|
951
951
|
const o = P("render", s.$cmpMeta$.$tagName$);
|
952
952
|
ni(s, t, i), o(), n(), oi(s);
|
953
953
|
}, ni = (s, t, e) => {
|
@@ -1032,7 +1032,7 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
1032
1032
|
if (!(t.$flags$ & 32) && (n = s.constructor, t.$flags$ |= 32, customElements.whenDefined(e.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
|
1033
1033
|
let r = n.style;
|
1034
1034
|
typeof r != "string" && (r = r[t.$modeName$ = zs(s)]);
|
1035
|
-
const a =
|
1035
|
+
const a = Be(e, t.$modeName$);
|
1036
1036
|
if (!dt.has(a)) {
|
1037
1037
|
const l = P("registerStyles", e.$tagName$);
|
1038
1038
|
Ds(a, r, !!(e.$flags$ & 1)), l();
|
@@ -1043,7 +1043,7 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
1043
1043
|
}, pi = (s) => {
|
1044
1044
|
if (!(v.$flags$ & 1)) {
|
1045
1045
|
const t = _t(s), e = t.$cmpMeta$, i = P("connectedCallback", e.$tagName$);
|
1046
|
-
t.$flags$ & 1 ? (
|
1046
|
+
t.$flags$ & 1 ? (Ie(s, t, e.$listeners$), hi(t.$lazyInstance$)) : (t.$flags$ |= 1, e.$flags$ & 12 && ui(s), e.$members$ && Object.entries(e.$members$).map(([n, [o]]) => {
|
1047
1047
|
if (o & 31 && s.hasOwnProperty(n)) {
|
1048
1048
|
const r = s[n];
|
1049
1049
|
delete s[n], s[n] = r;
|
@@ -1089,7 +1089,7 @@ const bt = typeof window < "u" ? window : {}, x = bt.document || { head: {} }, D
|
|
1089
1089
|
$cmpMeta$: t,
|
1090
1090
|
$instanceValues$: /* @__PURE__ */ new Map()
|
1091
1091
|
};
|
1092
|
-
return
|
1092
|
+
return Ie(s, e, t.$listeners$), Qe.set(s, e);
|
1093
1093
|
}, be = (s, t) => t in s, Q = (s, t) => (0, console.error)(s, t), dt = /* @__PURE__ */ new Map(), $i = [], _e = [], Je = [], mi = (s, t) => (e) => {
|
1094
1094
|
s.push(e), Ht || (Ht = !0, t && v.$flags$ & 4 ? vi(Ut) : v.raf(Ut));
|
1095
1095
|
}, Ce = (s) => {
|
@@ -1431,7 +1431,7 @@ const ft = xt(class extends Xt {
|
|
1431
1431
|
return E;
|
1432
1432
|
}
|
1433
1433
|
});
|
1434
|
-
var ji = Object.defineProperty, Di = Object.getOwnPropertyDescriptor,
|
1434
|
+
var ji = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, Ii = (s, t, e, i) => {
|
1435
1435
|
for (var n = i > 1 ? void 0 : i ? Di(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
1436
1436
|
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
1437
1437
|
return i && n && ji(t, e, n), n;
|
@@ -1467,10 +1467,10 @@ Yt.styles = [
|
|
1467
1467
|
}
|
1468
1468
|
`
|
1469
1469
|
];
|
1470
|
-
|
1470
|
+
Ii([
|
1471
1471
|
$({ attribute: !0 })
|
1472
1472
|
], Yt.prototype, "anchor", 2);
|
1473
|
-
const
|
1473
|
+
const Bi = /* @__PURE__ */ new WeakMap();
|
1474
1474
|
let xe = 0;
|
1475
1475
|
const Mt = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new WeakSet(), Ae = () => new Promise((s) => requestAnimationFrame(s)), zi = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Fi = [{ opacity: 0 }], Se = [{ opacity: 0 }, { opacity: 1 }], Ee = (s, t) => {
|
1476
1476
|
const e = s - t;
|
@@ -1515,7 +1515,7 @@ class Gi extends es {
|
|
1515
1515
|
return u;
|
1516
1516
|
}
|
1517
1517
|
getController() {
|
1518
|
-
return
|
1518
|
+
return Bi.get(this.l);
|
1519
1519
|
}
|
1520
1520
|
isDisabled() {
|
1521
1521
|
var t;
|
@@ -2200,7 +2200,7 @@ var nn = Object.defineProperty, on = Object.getOwnPropertyDescriptor, At = (s, t
|
|
2200
2200
|
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
2201
2201
|
return i && n && nn(t, e, n), n;
|
2202
2202
|
};
|
2203
|
-
let
|
2203
|
+
let B = class extends m {
|
2204
2204
|
constructor() {
|
2205
2205
|
super(...arguments), this.loading = !0, this.entries = [];
|
2206
2206
|
}
|
@@ -2243,7 +2243,7 @@ let I = class extends m {
|
|
2243
2243
|
</div> `;
|
2244
2244
|
}
|
2245
2245
|
};
|
2246
|
-
|
2246
|
+
B.styles = [
|
2247
2247
|
b`
|
2248
2248
|
:host {
|
2249
2249
|
display: block;
|
@@ -2259,16 +2259,16 @@ I.styles = [
|
|
2259
2259
|
];
|
2260
2260
|
At([
|
2261
2261
|
$({ type: Boolean })
|
2262
|
-
],
|
2262
|
+
], B.prototype, "loading", 2);
|
2263
2263
|
At([
|
2264
2264
|
$({ attribute: !1 })
|
2265
|
-
],
|
2265
|
+
], B.prototype, "session", 2);
|
2266
2266
|
At([
|
2267
2267
|
w()
|
2268
|
-
],
|
2269
|
-
|
2268
|
+
], B.prototype, "entries", 2);
|
2269
|
+
B = At([
|
2270
2270
|
J("ace-conversation-session")
|
2271
|
-
],
|
2271
|
+
], B);
|
2272
2272
|
var rn = Object.defineProperty, an = Object.getOwnPropertyDescriptor, os = (s, t, e, i) => {
|
2273
2273
|
for (var n = i > 1 ? void 0 : i ? an(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2274
2274
|
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
@@ -2631,7 +2631,7 @@ Dt = un([
|
|
2631
2631
|
* Copyright 2017 Google LLC
|
2632
2632
|
* SPDX-License-Identifier: BSD-3-Clause
|
2633
2633
|
*/
|
2634
|
-
class
|
2634
|
+
class It extends Xt {
|
2635
2635
|
constructor(t) {
|
2636
2636
|
if (super(t), this.et = u, t.type !== Ct.CHILD)
|
2637
2637
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
@@ -2650,8 +2650,8 @@ class Bt extends Xt {
|
|
2650
2650
|
return e.raw = e, this.vt = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
2651
2651
|
}
|
2652
2652
|
}
|
2653
|
-
|
2654
|
-
const fn = xt(
|
2653
|
+
It.directiveName = "unsafeHTML", It.resultType = 1;
|
2654
|
+
const fn = xt(It);
|
2655
2655
|
var gn = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, as = (s, t, e, i) => {
|
2656
2656
|
for (var n = i > 1 ? void 0 : i ? $n(t, e) : t, o = s.length - 1, r; o >= 0; o--)
|
2657
2657
|
(r = s[o]) && (n = (i ? r(t, e, n) : r(n)) || n);
|
@@ -2771,6 +2771,10 @@ class tt extends ls {
|
|
2771
2771
|
setToastMessage(t) {
|
2772
2772
|
this.toast.message = t;
|
2773
2773
|
}
|
2774
|
+
handover(t, e = {}) {
|
2775
|
+
var i;
|
2776
|
+
this.enableInput(), this.setToastMessage(null), (i = this.session) == null || i.handover(t, e);
|
2777
|
+
}
|
2774
2778
|
render() {
|
2775
2779
|
const t = this.application.texts;
|
2776
2780
|
return f` <div
|
package/conversation.d.ts
CHANGED
@@ -25,6 +25,7 @@ export declare class Conversation extends WidgetElement {
|
|
25
25
|
disableInput(): void;
|
26
26
|
enableInput(): void;
|
27
27
|
setToastMessage(message: string | null): void;
|
28
|
+
handover(providerKey: string, handoverOptions?: Record<string, any>): void;
|
28
29
|
render(): import("lit-html").TemplateResult<1>;
|
29
30
|
}
|
30
31
|
export default Conversation;
|
package/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let T;const wt=new Uint8Array(16);function St(){if(!T&&(T=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!T))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(wt)}const d=[];for(let r=0;r<256;++r)d.push((r+256).toString(16).slice(1));function gt(r,e=0){return d[r[e+0]]+d[r[e+1]]+d[r[e+2]]+d[r[e+3]]+"-"+d[r[e+4]]+d[r[e+5]]+"-"+d[r[e+6]]+d[r[e+7]]+"-"+d[r[e+8]]+d[r[e+9]]+"-"+d[r[e+10]]+d[r[e+11]]+d[r[e+12]]+d[r[e+13]]+d[r[e+14]]+d[r[e+15]]}const xt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),G={randomUUID:xt};function Et(r,e,t){if(G.randomUUID&&!e&&!r)return G.randomUUID();r=r||{};const n=r.random||(r.rng||St)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=n[i];return e}return gt(n)}var M=function(r,e){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},M(r,e)};function x(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");M(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function _t(r,e,t,n){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function u(l){try{c(n.next(l))}catch(v){s(v)}}function a(l){try{c(n.throw(l))}catch(v){s(v)}}function c(l){l.done?o(l.value):i(l.value).then(u,a)}c((n=n.apply(r,e||[])).next())})}function W(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(c){return function(l){return a([c,l])}}function a(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(t=0)),t;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(l){c=[6,l],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function g(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}function k(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}function S(r){return this instanceof S?(this.v=r,this):new S(r)}function Pt(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(f){n[f]&&(i[f]=function(y){return new Promise(function(_,p){o.push([f,y,_,p])>1||u(f,y)})})}function u(f,y){try{a(n[f](y))}catch(_){v(o[0][3],_)}}function a(f){f.value instanceof S?Promise.resolve(f.value.v).then(c,l):v(o[0][2],f)}function c(f){u("next",f)}function l(f){u("throw",f)}function v(f,y){f(y),o.shift(),o.length&&u(o[0][0],o[0][1])}}function It(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof g=="function"?g(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=r[o]&&function(s){return new Promise(function(u,a){s=r[o](s),i(u,a,s.done,s.value)})}}function i(o,s,u,a){Promise.resolve(a).then(function(c){o({value:c,done:u})},s)}}function h(r){return typeof r=="function"}function X(r){var e=function(n){Error.call(n),n.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var F=X(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
|
2
2
|
`+t.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function D(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var j=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=g(s),a=u.next();!a.done;a=u.next()){var c=a.value;c.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else s.remove(this);var l=this.initialTeardown;if(h(l))try{l()}catch(p){o=p instanceof F?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var f=g(v),y=f.next();!y.done;y=f.next()){var _=y.value;try{z(_)}catch(p){o=o??[],p instanceof F?o=k(k([],C(o)),C(p.errors)):o.push(p)}}}catch(p){n={error:p}}finally{try{y&&!y.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new F(o)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)z(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&D(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&D(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),Z=j.EMPTY;function N(r){return r instanceof j||r&&"closed"in r&&h(r.remove)&&h(r.add)&&h(r.unsubscribe)}function z(r){h(r)?r():r.unsubscribe()}var tt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Y={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=Y.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,k([r,e],C(t))):setTimeout.apply(void 0,k([r,e],C(t)))},clearTimeout:function(r){var e=Y.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(r)},delegate:void 0};function et(r){Y.setTimeout(function(){throw r})}function V(){}function $(r){r()}var B=function(r){x(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,N(t)&&t.add(n)):n.destination=At,n}return e.create=function(t,n,i){return new q(t,n,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(j),Ot=Function.prototype.bind;function L(r,e){return Ot.call(r,e)}var Ut=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){A(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){A(n)}else A(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){A(t)}},r}(),q=function(r){x(e,r);function e(t,n,i){var o=r.call(this)||this,s;if(h(t)||!t)s={next:t??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&tt.useDeprecatedNextContext?(u=Object.create(t),u.unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&L(t.next,u),error:t.error&&L(t.error,u),complete:t.complete&&L(t.complete,u)}):s=t}return o.destination=new Ut(s),o}return e}(B);function A(r){et(r)}function Tt(r){throw r}var At={closed:!0,next:V,error:Tt,complete:V},H=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $t(r){return r}function Ct(r){return r.length===0?$t:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var b=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,o=jt(e)?e:new q(e,t,n);return $(function(){var s=i,u=s.operator,a=s.source;o.add(u?u.call(o,a):a?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=K(t),new t(function(i,o){var s=new q({next:function(u){try{e(u)}catch(a){o(a),s.unsubscribe()}},error:o,complete:i});n.subscribe(s)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[H]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ct(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=K(e),new e(function(n,i){var o;t.subscribe(function(s){return o=s},function(s){return i(s)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function K(r){var e;return(e=r??tt.Promise)!==null&&e!==void 0?e:Promise}function kt(r){return r&&h(r.next)&&h(r.error)&&h(r.complete)}function jt(r){return r&&r instanceof B||kt(r)&&N(r)}function Rt(r){return h(r==null?void 0:r.lift)}function I(r){return function(e){if(Rt(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function P(r,e,t,n,i){return new Ft(r,e,t,n,i)}var Ft=function(r){x(e,r);function e(t,n,i,o,s,u){var a=r.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=u,a._next=n?function(c){try{n(c)}catch(l){t.error(l)}}:r.prototype._next,a._error=o?function(c){try{o(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._error,a._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,a}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(B),Lt=X(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),m=function(r){x(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new J(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Lt},e.prototype.next=function(t){var n=this;$(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=g(n.currentObservers),u=s.next();!u.done;u=s.next()){var a=u.value;a.next(t)}}catch(c){i={error:c}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;$(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;$(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,o=i.hasError,s=i.isStopped,u=i.observers;return o||s?Z:(this.currentObservers=null,u.push(t),new j(function(){n.currentObservers=null,D(u,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,o=n.thrownError,s=n.isStopped;i?t.error(o):s&&t.complete()},e.prototype.asObservable=function(){var t=new b;return t.source=this,t},e.create=function(t,n){return new J(t,n)},e}(b),J=function(r){x(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:Z},e}(m),rt=function(r){x(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,o=t._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(m),Mt=new b(function(r){return r.complete()});function Dt(r){return r&&h(r.schedule)}function Yt(r){return r[r.length-1]}function Vt(r){return Dt(Yt(r))?r.pop():void 0}var nt=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function it(r){return h(r==null?void 0:r.then)}function ot(r){return h(r[H])}function st(r){return Symbol.asyncIterator&&h(r==null?void 0:r[Symbol.asyncIterator])}function ut(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qt(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ct=qt();function at(r){return h(r==null?void 0:r[ct])}function lt(r){return Pt(this,arguments,function(){var t,n,i,o;return W(this,function(s){switch(s.label){case 0:t=r.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S(t.read())];case 3:return n=s.sent(),i=n.value,o=n.done,o?[4,S(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ft(r){return h(r==null?void 0:r.getReader)}function O(r){if(r instanceof b)return r;if(r!=null){if(ot(r))return Bt(r);if(nt(r))return Ht(r);if(it(r))return Gt(r);if(st(r))return ht(r);if(at(r))return zt(r);if(ft(r))return Kt(r)}throw ut(r)}function Bt(r){return new b(function(e){var t=r[H]();if(h(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ht(r){return new b(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Gt(r){return new b(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,et)})}function zt(r){return new b(function(e){var t,n;try{for(var i=g(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function ht(r){return new b(function(e){Jt(r,e).catch(function(t){return e.error(t)})})}function Kt(r){return ht(lt(r))}function Jt(r,e){var t,n,i,o;return _t(this,void 0,void 0,function(){var s,u;return W(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),t=It(r),a.label=1;case 1:return[4,t.next()];case 2:if(n=a.sent(),!!n.done)return[3,4];if(s=n.value,e.next(s),e.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=a.sent(),i={error:u},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function w(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(o),!i)return o}function dt(r,e){return e===void 0&&(e=0),I(function(t,n){t.subscribe(P(n,function(i){return w(n,r,function(){return n.next(i)},e)},function(){return w(n,r,function(){return n.complete()},e)},function(i){return w(n,r,function(){return n.error(i)},e)}))})}function pt(r,e){return e===void 0&&(e=0),I(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function Qt(r,e){return O(r).pipe(pt(e),dt(e))}function Wt(r,e){return O(r).pipe(pt(e),dt(e))}function Xt(r,e){return new b(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}function Zt(r,e){return new b(function(t){var n;return w(t,e,function(){n=r[ct](),w(t,e,function(){var i,o,s;try{i=n.next(),o=i.value,s=i.done}catch(u){t.error(u);return}s?t.complete():t.next(o)},0,!0)}),function(){return h(n==null?void 0:n.return)&&n.return()}})}function vt(r,e){if(!r)throw new Error("Iterable cannot be null");return new b(function(t){w(t,e,function(){var n=r[Symbol.asyncIterator]();w(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function Nt(r,e){return vt(lt(r),e)}function te(r,e){if(r!=null){if(ot(r))return Qt(r,e);if(nt(r))return Xt(r,e);if(it(r))return Wt(r,e);if(st(r))return vt(r,e);if(at(r))return Zt(r,e);if(ft(r))return Nt(r,e)}throw ut(r)}function ee(r,e){return e?te(r,e):O(r)}function re(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Vt(r);return ee(r,t)}function Q(r){return r<=0?function(){return Mt}:I(function(e,t){var n=0;e.subscribe(P(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}function ne(r,e){return I(function(t,n){var i=null,o=0,s=!1,u=function(){return s&&!i&&n.complete()};t.subscribe(P(n,function(a){i==null||i.unsubscribe();var c=0,l=o++;O(r(a,l)).subscribe(i=P(n,function(v){return n.next(e?e(a,v,l,c++):v)},function(){i=null,u()}))},function(){s=!0,u()}))})}function ie(r){return I(function(e,t){O(r).subscribe(P(t,function(){return t.complete()},V)),!t.closed&&e.subscribe(t)})}class yt{constructor(e,t,n){this.id=e,this.component=t,this.platform=n,this.entries$=new rt([]),this.kill$=new m,this.queue=[],t.addEventListener("user-submit",i=>{if(!this.provider){console.warn("No provider activated, unable to print message to conversation.");return}this.provider.onUserSubmit(i.detail)})}write(e){this.addEntryRemoveHandler(e),this.entries$.pipe(Q(1)).subscribe(t=>{this.entries$.next([...t,e])})}entries(){return this.entries$.asObservable()}setProvider(e){this.provider=e,this.provider.actions().pipe(ie(this.kill$)).subscribe(t=>{this.write(t)}),this.provider.connect()}handover(e){const t=this.platform.registeredProviders.get(e);if(t){this.provider&&this.queue.unshift(this.provider),this.kill$.next();const n=t(this);this.setProvider(n)}}addEntryRemoveHandler(e){e.remove$.pipe(ne(()=>this.entries$),Q(1)).subscribe(t=>{this.entries$.next(t.filter(n=>n!==e))})}completeProvider(){const[e]=this.queue;e&&this.setProvider(e)}isTyping(){return this.provider?this.provider.isTyping():re(!1)}}class R{constructor(){this.sessions=new Map,this.registeredProviders=new Map,this.activeSessionId=null}static async getInstance(e){let t=await e.get("conversation");return t||(t=new R,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}createSession(e){const t=new yt(Et(),e,this),n=this.getProviderByConfiguration(e);if(n){const i=n(t);t.setProvider(i)}return this.sessions.set(t.id,t),this.activeSessionId=t.id,t}getProviderByConfiguration(e){const[t]=e.properties.providers||[];if(!t){console.warn("No providers registered. You most likely forgot to add a provider to the conversation component properties.");return}return this.registeredProviders.get(t)}}const oe=async r=>{r.registerComponent("conversation",Promise.resolve().then(()=>require("./conversation-a8cae024.js"))),await R.getInstance(r.container)};var E=(r=>(r.User="user",r.Agent="agent",r.System="system",r))(E||{});class U{constructor(e,t,n){this.type=e,this.sender=t,this.messages=n,this.status="delivered",this.didUpdate=new m,this.actions$=new m,this.remove$=new m,this.timestamp=Date.now()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class bt{constructor(e){this.name=e,this.print$=new m}print(e){const t=new U(E.Agent,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class mt{constructor(e){this.name=e,this.print$=new m}print(e){const t=new U(E.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class se{constructor(){this.print$=new m,this.name="system"}print(e){const t=new U(E.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class ue{constructor(e,t){this.name=e,this.session=t,this.print$=new m,this.typingState$=new rt(!1),this.system=this.createSystem()}connect(){}onUserSubmit(e){this.print(E.User,e.text)}print(e,t){const n=new U(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(n)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new bt(e);return t.subscribe().subscribe(n=>{this.playNotification(),this.printEntry(n)}),t}createUser(e){const t=new mt(e);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}createSystem(){const e=new se;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.session.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}complete(){this.session.completeProvider()}playNotification(){const e="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";this.session.component.application.branding().other.disableSound||new Audio(e).play()}}exports.Agent=bt;exports.ConversationComponent=oe;exports.ConversationEntry=U;exports.ConversationMessageType=E;exports.ConversationPlatform=R;exports.ConversationProvider=ue;exports.ConversationSessionState=yt;exports.User=mt;
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function D(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var j=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=g(s),a=u.next();!a.done;a=u.next()){var c=a.value;c.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else s.remove(this);var l=this.initialTeardown;if(h(l))try{l()}catch(p){o=p instanceof F?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var f=g(v),y=f.next();!y.done;y=f.next()){var _=y.value;try{z(_)}catch(p){o=o??[],p instanceof F?o=k(k([],C(o)),C(p.errors)):o.push(p)}}}catch(p){n={error:p}}finally{try{y&&!y.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(o)throw new F(o)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)z(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&D(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&D(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),Z=j.EMPTY;function N(r){return r instanceof j||r&&"closed"in r&&h(r.remove)&&h(r.add)&&h(r.unsubscribe)}function z(r){h(r)?r():r.unsubscribe()}var tt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Y={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=Y.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,k([r,e],C(t))):setTimeout.apply(void 0,k([r,e],C(t)))},clearTimeout:function(r){var e=Y.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(r)},delegate:void 0};function et(r){Y.setTimeout(function(){throw r})}function V(){}function $(r){r()}var B=function(r){x(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,N(t)&&t.add(n)):n.destination=At,n}return e.create=function(t,n,i){return new q(t,n,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(j),Ot=Function.prototype.bind;function L(r,e){return Ot.call(r,e)}var Ut=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){A(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){A(n)}else A(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){A(t)}},r}(),q=function(r){x(e,r);function e(t,n,i){var o=r.call(this)||this,s;if(h(t)||!t)s={next:t??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&tt.useDeprecatedNextContext?(u=Object.create(t),u.unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&L(t.next,u),error:t.error&&L(t.error,u),complete:t.complete&&L(t.complete,u)}):s=t}return o.destination=new Ut(s),o}return e}(B);function A(r){et(r)}function Tt(r){throw r}var At={closed:!0,next:V,error:Tt,complete:V},H=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $t(r){return r}function Ct(r){return r.length===0?$t:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var b=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,o=jt(e)?e:new q(e,t,n);return $(function(){var s=i,u=s.operator,a=s.source;o.add(u?u.call(o,a):a?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=K(t),new t(function(i,o){var s=new q({next:function(u){try{e(u)}catch(a){o(a),s.unsubscribe()}},error:o,complete:i});n.subscribe(s)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[H]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ct(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=K(e),new e(function(n,i){var o;t.subscribe(function(s){return o=s},function(s){return i(s)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function K(r){var e;return(e=r??tt.Promise)!==null&&e!==void 0?e:Promise}function kt(r){return r&&h(r.next)&&h(r.error)&&h(r.complete)}function jt(r){return r&&r instanceof B||kt(r)&&N(r)}function Rt(r){return h(r==null?void 0:r.lift)}function I(r){return function(e){if(Rt(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function P(r,e,t,n,i){return new Ft(r,e,t,n,i)}var Ft=function(r){x(e,r);function e(t,n,i,o,s,u){var a=r.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=u,a._next=n?function(c){try{n(c)}catch(l){t.error(l)}}:r.prototype._next,a._error=o?function(c){try{o(c)}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._error,a._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,a}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(B),Lt=X(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),m=function(r){x(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new J(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Lt},e.prototype.next=function(t){var n=this;$(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=g(n.currentObservers),u=s.next();!u.done;u=s.next()){var a=u.value;a.next(t)}}catch(c){i={error:c}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;$(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;$(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,o=i.hasError,s=i.isStopped,u=i.observers;return o||s?Z:(this.currentObservers=null,u.push(t),new j(function(){n.currentObservers=null,D(u,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,o=n.thrownError,s=n.isStopped;i?t.error(o):s&&t.complete()},e.prototype.asObservable=function(){var t=new b;return t.source=this,t},e.create=function(t,n){return new J(t,n)},e}(b),J=function(r){x(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:Z},e}(m),rt=function(r){x(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,o=t._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(m),Mt=new b(function(r){return r.complete()});function Dt(r){return r&&h(r.schedule)}function Yt(r){return r[r.length-1]}function Vt(r){return Dt(Yt(r))?r.pop():void 0}var nt=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function it(r){return h(r==null?void 0:r.then)}function ot(r){return h(r[H])}function st(r){return Symbol.asyncIterator&&h(r==null?void 0:r[Symbol.asyncIterator])}function ut(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qt(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ct=qt();function at(r){return h(r==null?void 0:r[ct])}function lt(r){return Pt(this,arguments,function(){var t,n,i,o;return W(this,function(s){switch(s.label){case 0:t=r.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S(t.read())];case 3:return n=s.sent(),i=n.value,o=n.done,o?[4,S(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ft(r){return h(r==null?void 0:r.getReader)}function O(r){if(r instanceof b)return r;if(r!=null){if(ot(r))return Bt(r);if(nt(r))return Ht(r);if(it(r))return Gt(r);if(st(r))return ht(r);if(at(r))return zt(r);if(ft(r))return Kt(r)}throw ut(r)}function Bt(r){return new b(function(e){var t=r[H]();if(h(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ht(r){return new b(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Gt(r){return new b(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,et)})}function zt(r){return new b(function(e){var t,n;try{for(var i=g(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function ht(r){return new b(function(e){Jt(r,e).catch(function(t){return e.error(t)})})}function Kt(r){return ht(lt(r))}function Jt(r,e){var t,n,i,o;return _t(this,void 0,void 0,function(){var s,u;return W(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),t=It(r),a.label=1;case 1:return[4,t.next()];case 2:if(n=a.sent(),!!n.done)return[3,4];if(s=n.value,e.next(s),e.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=a.sent(),i={error:u},[3,11];case 6:return a.trys.push([6,,9,10]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function w(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(o),!i)return o}function dt(r,e){return e===void 0&&(e=0),I(function(t,n){t.subscribe(P(n,function(i){return w(n,r,function(){return n.next(i)},e)},function(){return w(n,r,function(){return n.complete()},e)},function(i){return w(n,r,function(){return n.error(i)},e)}))})}function pt(r,e){return e===void 0&&(e=0),I(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function Qt(r,e){return O(r).pipe(pt(e),dt(e))}function Wt(r,e){return O(r).pipe(pt(e),dt(e))}function Xt(r,e){return new b(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}function Zt(r,e){return new b(function(t){var n;return w(t,e,function(){n=r[ct](),w(t,e,function(){var i,o,s;try{i=n.next(),o=i.value,s=i.done}catch(u){t.error(u);return}s?t.complete():t.next(o)},0,!0)}),function(){return h(n==null?void 0:n.return)&&n.return()}})}function vt(r,e){if(!r)throw new Error("Iterable cannot be null");return new b(function(t){w(t,e,function(){var n=r[Symbol.asyncIterator]();w(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function Nt(r,e){return vt(lt(r),e)}function te(r,e){if(r!=null){if(ot(r))return Qt(r,e);if(nt(r))return Xt(r,e);if(it(r))return Wt(r,e);if(st(r))return vt(r,e);if(at(r))return Zt(r,e);if(ft(r))return Nt(r,e)}throw ut(r)}function ee(r,e){return e?te(r,e):O(r)}function re(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Vt(r);return ee(r,t)}function Q(r){return r<=0?function(){return Mt}:I(function(e,t){var n=0;e.subscribe(P(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}function ne(r,e){return I(function(t,n){var i=null,o=0,s=!1,u=function(){return s&&!i&&n.complete()};t.subscribe(P(n,function(a){i==null||i.unsubscribe();var c=0,l=o++;O(r(a,l)).subscribe(i=P(n,function(v){return n.next(e?e(a,v,l,c++):v)},function(){i=null,u()}))},function(){s=!0,u()}))})}function ie(r){return I(function(e,t){O(r).subscribe(P(t,function(){return t.complete()},V)),!t.closed&&e.subscribe(t)})}class yt{constructor(e,t,n){this.id=e,this.component=t,this.platform=n,this.entries$=new rt([]),this.kill$=new m,this.queue=[],t.addEventListener("user-submit",i=>{if(!this.provider){console.warn("No provider activated, unable to print message to conversation.");return}this.provider.onUserSubmit(i.detail)})}write(e){this.addEntryRemoveHandler(e),this.entries$.pipe(Q(1)).subscribe(t=>{this.entries$.next([...t,e])})}entries(){return this.entries$.asObservable()}setProvider(e,t={}){this.provider=e,this.provider.actions().pipe(ie(this.kill$)).subscribe(n=>{this.write(n)}),this.provider.connect(t)}handover(e,t={}){var i;(i=this.provider)==null||i.setTypingState(!1);const n=this.platform.registeredProviders.get(e);if(n){this.provider&&this.queue.unshift(this.provider),this.kill$.next();const o=n(this);this.setProvider(o,t)}}addEntryRemoveHandler(e){e.remove$.pipe(ne(()=>this.entries$),Q(1)).subscribe(t=>{this.entries$.next(t.filter(n=>n!==e))})}completeProvider(){const[e]=this.queue;e&&this.setProvider(e)}isTyping(){return this.provider?this.provider.isTyping():re(!1)}}class R{constructor(){this.sessions=new Map,this.registeredProviders=new Map,this.activeSessionId=null}static async getInstance(e){let t=await e.get("conversation");return t||(t=new R,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}createSession(e){const t=new yt(Et(),e,this),n=this.getProviderByConfiguration(e);if(n){const i=n(t);t.setProvider(i)}return this.sessions.set(t.id,t),this.activeSessionId=t.id,t}getProviderByConfiguration(e){const[t]=e.properties.providers||[];if(!t){console.warn("No providers registered. You most likely forgot to add a provider to the conversation component properties.");return}return this.registeredProviders.get(t)}}const oe=async r=>{r.registerComponent("conversation",Promise.resolve().then(()=>require("./conversation-ebf57871.js"))),await R.getInstance(r.container)};var E=(r=>(r.User="user",r.Agent="agent",r.System="system",r))(E||{});class U{constructor(e,t,n){this.type=e,this.sender=t,this.messages=n,this.status="delivered",this.didUpdate=new m,this.actions$=new m,this.remove$=new m,this.timestamp=Date.now()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class bt{constructor(e){this.name=e,this.print$=new m}print(e){const t=new U(E.Agent,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class mt{constructor(e){this.name=e,this.print$=new m}print(e){const t=new U(E.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class se{constructor(){this.print$=new m,this.name="system"}print(e){const t=new U(E.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class ue{constructor(e,t){this.name=e,this.session=t,this.print$=new m,this.typingState$=new rt(!1),this.system=this.createSystem()}connect(e={}){}onUserSubmit(e){this.print(E.User,e.text)}print(e,t){const n=new U(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(n)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new bt(e);return t.subscribe().subscribe(n=>{this.playNotification(),this.printEntry(n)}),t}createUser(e){const t=new mt(e);return t.subscribe().subscribe(n=>{this.printEntry(n)}),t}createSystem(){const e=new se;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.session.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}complete(){this.session.completeProvider()}playNotification(){const e="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";this.session.component.application.branding().other.disableSound||new Audio(e).play()}}exports.Agent=bt;exports.ConversationComponent=oe;exports.ConversationEntry=U;exports.ConversationMessageType=E;exports.ConversationPlatform=R;exports.ConversationProvider=ue;exports.ConversationSessionState=yt;exports.User=mt;
|
package/index.mjs
CHANGED
@@ -378,7 +378,7 @@ function et(r) {
|
|
378
378
|
}
|
379
379
|
function Y() {
|
380
380
|
}
|
381
|
-
function
|
381
|
+
function A(r) {
|
382
382
|
r();
|
383
383
|
}
|
384
384
|
var B = function(r) {
|
@@ -426,7 +426,7 @@ var It = function() {
|
|
426
426
|
try {
|
427
427
|
t.next(e);
|
428
428
|
} catch (n) {
|
429
|
-
|
429
|
+
T(n);
|
430
430
|
}
|
431
431
|
}, r.prototype.error = function(e) {
|
432
432
|
var t = this.partialObserver;
|
@@ -434,17 +434,17 @@ var It = function() {
|
|
434
434
|
try {
|
435
435
|
t.error(e);
|
436
436
|
} catch (n) {
|
437
|
-
|
437
|
+
T(n);
|
438
438
|
}
|
439
439
|
else
|
440
|
-
|
440
|
+
T(e);
|
441
441
|
}, r.prototype.complete = function() {
|
442
442
|
var e = this.partialObserver;
|
443
443
|
if (e.complete)
|
444
444
|
try {
|
445
445
|
e.complete();
|
446
446
|
} catch (t) {
|
447
|
-
|
447
|
+
T(t);
|
448
448
|
}
|
449
449
|
}, r;
|
450
450
|
}(), V = function(r) {
|
@@ -471,7 +471,7 @@ var It = function() {
|
|
471
471
|
}
|
472
472
|
return e;
|
473
473
|
}(B);
|
474
|
-
function
|
474
|
+
function T(r) {
|
475
475
|
et(r);
|
476
476
|
}
|
477
477
|
function Pt(r) {
|
@@ -488,7 +488,7 @@ var Ot = {
|
|
488
488
|
function Ut(r) {
|
489
489
|
return r;
|
490
490
|
}
|
491
|
-
function
|
491
|
+
function Tt(r) {
|
492
492
|
return r.length === 0 ? Ut : r.length === 1 ? r[0] : function(t) {
|
493
493
|
return r.reduce(function(n, i) {
|
494
494
|
return i(n);
|
@@ -504,7 +504,7 @@ var b = function() {
|
|
504
504
|
return t.source = this, t.operator = e, t;
|
505
505
|
}, r.prototype.subscribe = function(e, t, n) {
|
506
506
|
var i = this, o = $t(e) ? e : new V(e, t, n);
|
507
|
-
return
|
507
|
+
return A(function() {
|
508
508
|
var s = i, u = s.operator, a = s.source;
|
509
509
|
o.add(u ? u.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
510
510
|
}), o;
|
@@ -538,7 +538,7 @@ var b = function() {
|
|
538
538
|
}, r.prototype.pipe = function() {
|
539
539
|
for (var e = [], t = 0; t < arguments.length; t++)
|
540
540
|
e[t] = arguments[t];
|
541
|
-
return
|
541
|
+
return Tt(e)(this);
|
542
542
|
}, r.prototype.toPromise = function(e) {
|
543
543
|
var t = this;
|
544
544
|
return e = K(e), new e(function(n, i) {
|
@@ -559,11 +559,11 @@ function K(r) {
|
|
559
559
|
var e;
|
560
560
|
return (e = r ?? tt.Promise) !== null && e !== void 0 ? e : Promise;
|
561
561
|
}
|
562
|
-
function
|
562
|
+
function At(r) {
|
563
563
|
return r && h(r.next) && h(r.error) && h(r.complete);
|
564
564
|
}
|
565
565
|
function $t(r) {
|
566
|
-
return r && r instanceof B ||
|
566
|
+
return r && r instanceof B || At(r) && N(r);
|
567
567
|
}
|
568
568
|
function kt(r) {
|
569
569
|
return h(r == null ? void 0 : r.lift);
|
@@ -637,7 +637,7 @@ var jt = function(r) {
|
|
637
637
|
throw new Ct();
|
638
638
|
}, e.prototype.next = function(t) {
|
639
639
|
var n = this;
|
640
|
-
|
640
|
+
A(function() {
|
641
641
|
var i, o;
|
642
642
|
if (n._throwIfClosed(), !n.isStopped) {
|
643
643
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
@@ -660,7 +660,7 @@ var jt = function(r) {
|
|
660
660
|
});
|
661
661
|
}, e.prototype.error = function(t) {
|
662
662
|
var n = this;
|
663
|
-
|
663
|
+
A(function() {
|
664
664
|
if (n._throwIfClosed(), !n.isStopped) {
|
665
665
|
n.hasError = n.isStopped = !0, n.thrownError = t;
|
666
666
|
for (var i = n.observers; i.length; )
|
@@ -669,7 +669,7 @@ var jt = function(r) {
|
|
669
669
|
});
|
670
670
|
}, e.prototype.complete = function() {
|
671
671
|
var t = this;
|
672
|
-
|
672
|
+
A(function() {
|
673
673
|
if (t._throwIfClosed(), !t.isStopped) {
|
674
674
|
t.isStopped = !0;
|
675
675
|
for (var n = t.observers; n.length; )
|
@@ -1091,17 +1091,19 @@ class re {
|
|
1091
1091
|
entries() {
|
1092
1092
|
return this.entries$.asObservable();
|
1093
1093
|
}
|
1094
|
-
setProvider(e) {
|
1095
|
-
this.provider = e, this.provider.actions().pipe(ee(this.kill$)).subscribe((
|
1096
|
-
this.write(
|
1097
|
-
}), this.provider.connect();
|
1094
|
+
setProvider(e, t = {}) {
|
1095
|
+
this.provider = e, this.provider.actions().pipe(ee(this.kill$)).subscribe((n) => {
|
1096
|
+
this.write(n);
|
1097
|
+
}), this.provider.connect(t);
|
1098
1098
|
}
|
1099
|
-
handover(e) {
|
1100
|
-
|
1101
|
-
|
1099
|
+
handover(e, t = {}) {
|
1100
|
+
var i;
|
1101
|
+
(i = this.provider) == null || i.setTypingState(!1);
|
1102
|
+
const n = this.platform.registeredProviders.get(e);
|
1103
|
+
if (n) {
|
1102
1104
|
this.provider && this.queue.unshift(this.provider), this.kill$.next();
|
1103
|
-
const
|
1104
|
-
this.setProvider(
|
1105
|
+
const o = n(this);
|
1106
|
+
this.setProvider(o, t);
|
1105
1107
|
}
|
1106
1108
|
}
|
1107
1109
|
addEntryRemoveHandler(e) {
|
@@ -1151,7 +1153,7 @@ class H {
|
|
1151
1153
|
}
|
1152
1154
|
}
|
1153
1155
|
const se = async (r) => {
|
1154
|
-
r.registerComponent("conversation", import("./conversation-
|
1156
|
+
r.registerComponent("conversation", import("./conversation-ed602fb6.mjs")), await H.getInstance(r.container);
|
1155
1157
|
};
|
1156
1158
|
var O = /* @__PURE__ */ ((r) => (r.User = "user", r.Agent = "agent", r.System = "system", r))(O || {});
|
1157
1159
|
class C {
|
@@ -1236,7 +1238,7 @@ class ue {
|
|
1236
1238
|
constructor(e, t) {
|
1237
1239
|
this.name = e, this.session = t, this.print$ = new m(), this.typingState$ = new rt(!1), this.system = this.createSystem();
|
1238
1240
|
}
|
1239
|
-
connect() {
|
1241
|
+
connect(e = {}) {
|
1240
1242
|
}
|
1241
1243
|
onUserSubmit(e) {
|
1242
1244
|
this.print(O.User, e.text);
|
@@ -14,7 +14,7 @@ export declare class ConversationProvider {
|
|
14
14
|
private typingState$;
|
15
15
|
protected system: System;
|
16
16
|
constructor(name: string, session: ConversationSessionState);
|
17
|
-
connect(): void;
|
17
|
+
connect(_conversationOptions?: Record<string, any>): void;
|
18
18
|
onUserSubmit(action: UserSubmitEvent): void;
|
19
19
|
print(type: ConversationMessageType, text: string): ConversationEntry;
|
20
20
|
printEntry(entry: ConversationEntry): ConversationEntry;
|
@@ -14,8 +14,8 @@ export declare class ConversationSessionState {
|
|
14
14
|
constructor(id: string, component: Conversation, platform: ConversationPlatform);
|
15
15
|
private write;
|
16
16
|
entries(): Observable<ConversationEntry[]>;
|
17
|
-
setProvider(provider: ConversationProvider): void;
|
18
|
-
handover(providerKey: string): void;
|
17
|
+
setProvider(provider: ConversationProvider, options?: Record<string, any>): void;
|
18
|
+
handover(providerKey: string, handoverOptions?: Record<string, any>): void;
|
19
19
|
addEntryRemoveHandler(entry: ConversationEntry): void;
|
20
20
|
completeProvider(): void;
|
21
21
|
isTyping(): Observable<boolean>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-conversation-flamingo",
|
3
|
-
"version": "1.1.45-rc.
|
3
|
+
"version": "1.1.45-rc.3",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org"
|
6
6
|
},
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"@lit-labs/motion": "^1.0.4",
|
10
10
|
"@teliads/icons": "^8.4.0",
|
11
11
|
"@teliads/components": "^22.1.1",
|
12
|
-
"@telia-ace/widget-core-flamingo": "1.1.45-rc.
|
12
|
+
"@telia-ace/widget-core-flamingo": "1.1.45-rc.3",
|
13
13
|
"uuid": "^9.0.1",
|
14
14
|
"lit-html": "^3.0.2",
|
15
15
|
"rxjs": "^7.8.1"
|