@telia-ace/widget-conversation-flamingo 1.0.14 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/agent.d.ts → agent.d.ts} +0 -1
- package/components/conversation/conversation.d.ts +20 -0
- package/{dist/components → components}/conversation/plugin.d.ts +0 -1
- package/{dist/components → components}/conversation/ui/message-list.d.ts +1 -2
- package/{dist/components → components}/conversation/ui/message-types/message-type-html.d.ts +1 -2
- package/{dist/components → components}/conversation/ui/message-types/message-type-link-list.d.ts +1 -2
- package/{dist/components → components}/conversation/ui/message-types/message-type-separator.d.ts +1 -2
- package/{dist/components → components}/conversation/ui/message.d.ts +2 -3
- package/{dist/components → components}/conversation/utils.d.ts +0 -1
- package/conversation-18045ffc.mjs +1884 -0
- package/conversation-2a8210a9.js +446 -0
- package/{dist/conversation-controller.d.ts → conversation-controller.d.ts} +0 -1
- package/{dist/conversation-history.d.ts → conversation-history.d.ts} +0 -1
- package/{dist/conversation-platform.d.ts → conversation-platform.d.ts} +1 -2
- package/{dist/conversation-provider.d.ts → conversation-provider.d.ts} +0 -1
- package/{dist/index-9688347a-02584d39.js → index-17239ac6.mjs} +245 -245
- package/index-17fa2121.js +1 -0
- package/index-8a04bebb.mjs +3887 -0
- package/index-a12a1d3f.js +160 -0
- package/{dist/index.d.ts → index.d.ts} +0 -1
- package/index.js +1 -0
- package/{dist/index.js → index.mjs} +3 -4
- package/package.json +6 -47
- package/send-1e9780e5.mjs +5 -0
- package/send-df47dcea.js +1 -0
- package/{dist/store.d.ts → store.d.ts} +0 -1
- package/{dist/types.d.ts → types.d.ts} +0 -1
- package/{dist/user.d.ts → user.d.ts} +0 -1
- package/{dist/utils → utils}/custom-message.d.ts +0 -1
- package/{dist/utils → utils}/index.d.ts +0 -1
- package/{dist/utils → utils}/open-chat-widget.d.ts +0 -1
- package/{dist/utils → utils}/swap-provider.d.ts +0 -1
- package/LICENSE.txt +0 -6
- package/README.md +0 -490
- package/dist/agent.d.ts.map +0 -1
- package/dist/components/conversation/conversation.d.ts +0 -26
- package/dist/components/conversation/conversation.d.ts.map +0 -1
- package/dist/components/conversation/plugin.d.ts.map +0 -1
- package/dist/components/conversation/ui/message-list.d.ts.map +0 -1
- package/dist/components/conversation/ui/message-types/message-type-html.d.ts.map +0 -1
- package/dist/components/conversation/ui/message-types/message-type-link-list.d.ts.map +0 -1
- package/dist/components/conversation/ui/message-types/message-type-separator.d.ts.map +0 -1
- package/dist/components/conversation/ui/message.d.ts.map +0 -1
- package/dist/components/conversation/utils.d.ts.map +0 -1
- package/dist/conversation-309361e4.js +0 -2287
- package/dist/conversation-309361e4.js.map +0 -1
- package/dist/conversation-controller.d.ts.map +0 -1
- package/dist/conversation-form-adapter.d.ts +0 -7
- package/dist/conversation-form-adapter.d.ts.map +0 -1
- package/dist/conversation-history.d.ts.map +0 -1
- package/dist/conversation-platform.d.ts.map +0 -1
- package/dist/conversation-provider.d.ts.map +0 -1
- package/dist/index-9688347a-02584d39.js.map +0 -1
- package/dist/index-c61b2340.js +0 -5175
- package/dist/index-c61b2340.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/resolve-entity-value.d.ts +0 -11
- package/dist/resolve-entity-value.d.ts.map +0 -1
- package/dist/store.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/user.d.ts.map +0 -1
- package/dist/utils/custom-message.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/map-actions.d.ts +0 -2
- package/dist/utils/map-actions.d.ts.map +0 -1
- package/dist/utils/open-chat-widget.d.ts.map +0 -1
- package/dist/utils/swap-provider.d.ts.map +0 -1
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-a12a1d3f.js"),nt=require("./send-df47dcea.js");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const S=e=>t=>typeof t=="function"?((s,i)=>(customElements.define(s,i),i))(e,t):((s,i)=>{const{kind:n,elements:o}=i;return{kind:n,elements:o,finisher(r){customElements.define(s,r)}}})(e,t);/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const Vt=({finisher:e,descriptor:t})=>(s,i)=>{var n;if(i===void 0){const o=(n=s.originalKey)!==null&&n!==void 0?n:s.key,r=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(s.key)}:{...s,key:o};return e!=null&&(r.finisher=function(a){e(a,o)}),r}{const o=s.constructor;t!==void 0&&Object.defineProperty(s,i,t(i)),e==null||e(o,i)}};/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2021 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/let St=class extends Event{constructor(t,s,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=s,this.subscribe=i!=null&&i}};/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2021 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*//**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2021 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/let te=class{constructor(t,s,i,n){var o;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(r,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=r,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(r,a)),this.unsubscribe=a},this.host=t,s.context!==void 0){const r=s;this.context=r.context,this.callback=r.callback,this.subscribe=(o=r.subscribe)!==null&&o!==void 0&&o}else this.context=s,this.callback=i,this.subscribe=n!=null&&n;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new St(this.context,this.t,this.subscribe))}};/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2021 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/let ee=class{constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:i}]of this.subscriptions)s(this.o,i)},t!==void 0&&(this.value=t)}get value(){return this.o}set value(t){this.setValue(t)}setValue(t,s=!1){const i=s||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}addCallback(t,s,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:s});const{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};/**
|
|
26
|
+
* @license
|
|
27
|
+
* Copyright 2021 Google LLC
|
|
28
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
+
*/let se=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},T=class extends ee{constructor(t,s,i){super(s.context!==void 0?s.initialValue:i),this.onContextRequest=n=>{const o=n.composedPath()[0];n.context===this.context&&o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{const o=n.composedPath()[0];if(n.context!==this.context||o===this.host)return;const r=new Set;for(const[a,{consumerHost:c}]of this.subscriptions)r.has(a)||(r.add(a),c.dispatchEvent(new St(this.context,a,!0)));n.stopPropagation()},this.host=t,s.context!==void 0?this.context=s.context:this.context=s,this.attachListeners(),this.host.addController(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new se(this.context))}};/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2022 Google LLC
|
|
32
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
+
*/function ie({context:e,subscribe:t}){return Vt({finisher:(s,i)=>{s.addInitializer(n=>{new te(n,{context:e,callback:o=>{n[i]=o},subscribe:t})})}})}const ne="children",oe="descriptor",re="container",ae="context",le="layout",ce="properties";class de{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,s){if(!this._container||!this._descriptor)return;const i=await l.pt.getInstance(this._container),n=new l.P(i).withId(this._descriptor.id);await i.actions(n,this._descriptor.type||l.ht()).dispatch(t,s)}}const he=e=>{const t={};return Object.keys(e).forEach(s=>{s.indexOf("css-")>-1&&(t[s]=e[s])}),t},ue=(e,t)=>{const s=he(t);Object.entries(s).forEach(([i,n])=>{e.style.setProperty(i.replace("css-",""),n)})};var fe=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,b=(e,t,s,i)=>{for(var n=i>1?void 0:i?pe(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&fe(t,s,n),n};const $e=e=>{class t extends e{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new T(this,oe,void 0),this._childrenProvider=new T(this,ne,[]),this._propertiesProvider=new T(this,ce,{}),this._contextProvider=new T(this,ae,{}),this._layoutProvider=new T(this,le,{}),this.actions=new de(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),l.pt.getInstance(this.container).then(async i=>{var o;const n=i.nodes.get(this.entry);if(n){this._propertyChangeListener=i.events.subscribe("components:properties-changed",(u,h)=>{n.id===h.node.id&&this._setProperties(h.node.attributes.properties)}),this._contextChangeListener=i.events.subscribe("components:context-changed",(u,h)=>{n.id===h.node.id&&this._setContext(h.node.attributes.context)}),this._layoutChangeListener=i.events.subscribe("components:layout-changed",(u,h)=>{n.id===h.node.id&&this._setLayout(h.node.attributes.layout)});const r="default";this._unmountNode=n.mount(this.container),this._setDescriptor(l.Et(n,r)),this._setProperties(n.attributes.properties),this._setContext(n.attributes.context),this._setLayout(this.layout);const a=n.getChildren(r).map(u=>l.Et(u));this._childrenProvider.setValue(a);const d=(await this.container.getAsync("componentResolver")).getComponent(((o=this.descriptor)==null?void 0:o.type)||"");d.then&&d.then(u=>{this.component=u.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),l.mapBranding(this.context,this.renderRoot.host),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),ue(this.renderRoot.host,this.properties)}_setProperties(i){this._propertiesProvider.setValue(i),this.properties=i}_setContext(i){this._contextProvider.setValue(i),this.context=i}_setLayout(i){this._layoutProvider.setValue(i),this.layout=i}_setDescriptor(i){this.descriptor=i,this._descriptorProvider.setValue(i),this.actions.setDescriptor(i)}}return t.styles=[e.styles??[],l.i`
|
|
34
|
+
:host {
|
|
35
|
+
font-family: var(--font-family);
|
|
36
|
+
grid-column: span var(--width);
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
* {
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
`],b([ie({context:re}),l.n({attribute:!1})],t.prototype,"container",2),b([l.n()],t.prototype,"entry",2),b([l.t()],t.prototype,"descriptor",2),b([l.t()],t.prototype,"component",2),b([l.t()],t.prototype,"context",2),b([l.t()],t.prototype,"layout",2),b([l.t()],t.prototype,"properties",2),t};/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright 2020 Google LLC
|
|
48
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
+
*/const ge=e=>e.strings===void 0;/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright 2017 Google LLC
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*/const O=(e,t)=>{var s,i;const n=e._$AN;if(n===void 0)return!1;for(const o of n)(i=(s=o)._$AO)===null||i===void 0||i.call(s,t,!1),O(o,t);return!0},R=e=>{let t,s;do{if((t=e._$AM)===void 0)break;s=t._$AN,s.delete(e),e=t}while((s==null?void 0:s.size)===0)},At=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),be(t)}};function ve(e){this._$AN!==void 0?(R(this),this._$AM=e,At(this)):this._$AM=e}function me(e,t=!1,s=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(i))for(let o=s;o<i.length;o++)O(i[o],!1),R(i[o]);else i!=null&&(O(i,!1),R(i));else O(this,e)}const be=e=>{var t,s,i,n;e.type==l.t$1.CHILD&&((t=(i=e)._$AP)!==null&&t!==void 0||(i._$AP=me),(s=(n=e)._$AQ)!==null&&s!==void 0||(n._$AQ=ve))};class Tt extends l.i$1{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),At(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)===null||i===void 0||i.call(this):(n=this.disconnected)===null||n===void 0||n.call(this)),s&&(O(this,t),R(this))}setValue(t){if(ge(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
|
|
54
|
+
* @license
|
|
55
|
+
* Copyright 2020 Google LLC
|
|
56
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
|
+
*/const ye=()=>new xe;let xe=class{};const K=new WeakMap,_e=l.e(class extends Tt{render(e){return l.A}update(e,[t]){var s;const i=t!==this.G;return i&&this.G!==void 0&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=t,this.dt=(s=e.options)===null||s===void 0?void 0:s.host,this.ot(this.lt=e.element)),l.A}ot(e){var t;if(typeof this.G=="function"){const s=(t=this.dt)!==null&&t!==void 0?t:globalThis;let i=K.get(s);i===void 0&&(i=new WeakMap,K.set(s,i)),i.get(this.G)!==void 0&&this.G.call(this.dt,void 0),i.set(this.G,e),e!==void 0&&this.G.call(this.dt,e)}else this.G.value=e}get rt(){var e,t,s;return typeof this.G=="function"?(t=K.get((e=this.dt)!==null&&e!==void 0?e:globalThis))===null||t===void 0?void 0:t.get(this.G):(s=this.G)===null||s===void 0?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),Ce=new WeakMap;let ot=0;const Q=new Map,rt=new WeakSet,at=()=>new Promise(e=>requestAnimationFrame(e)),lt=[{opacity:0}],ct=[{opacity:0},{opacity:1}],dt=(e,t)=>{const s=e-t;return s===0?void 0:s},ht=(e,t)=>{const s=e/t;return s===1?void 0:s},X={left:(e,t)=>{const s=dt(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(e,t)=>{const s=dt(e,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(e,t)=>{let s;t===0&&(t=1,s={width:"1px"});const i=ht(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(e,t)=>{let s;t===0&&(t=1,s={height:"1px"});const i=ht(e,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},we={duration:333,easing:"ease-in-out"},ke=["left","top","width","height","opacity","color","background"],ut=new WeakMap;class Se extends Tt{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===l.t$1.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)===null||t===void 0||t.call(this),this.finished=new Promise(s=>{this.h=s})}async resolveFinished(){var t;(t=this.h)===null||t===void 0||t.call(this),this.h=void 0}render(t){return l.A}getController(){return Ce.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())===null||t===void 0?void 0:t.disabled)}update(t,[s]){var i;const n=this.l===void 0;return n&&(this.l=(i=t.options)===null||i===void 0?void 0:i.host,this.l.addController(this),this.element=t.element,ut.set(this.element,this)),this.optionsOrCallback=s,(n||typeof s!="function")&&this.u(s),this.render(s)}u(t){var s,i;t=t??{};const n=this.getController();n!==void 0&&((t={...n.defaultOptions,...t}).keyframeOptions={...n.defaultOptions.keyframeOptions,...t.keyframeOptions}),(s=(i=t).properties)!==null&&s!==void 0||(i.properties=ke),this.options=t}v(){const t={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(n=>{var o;const r=(o=s[n])!==null&&o!==void 0?o:X[n]?void 0:i[n],a=Number(r);t[n]=isNaN(a)?r+"":a}),t}p(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((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.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=(t=this.t)!==null&&t!==void 0?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 at;const s=this._(),i=this.A(this.options.keyframeOptions,s),n=this.v();if(this.g!==void 0){const{from:o,to:r}=this.O(this.g,n,s);this.log("measured",[this.g,n,o,r]),t=this.calculateKeyframes(o,r)}else{const o=Q.get(this.options.inId);if(o){Q.delete(this.options.inId);const{from:r,to:a}=this.O(o,n,s);t=this.calculateKeyframes(r,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,ot++,t.forEach(c=>c.zIndex=ot)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){var t;this.j!==void 0&&(this.element.setAttribute("style",(t=this.j)!==null&&t!==void 0?t:""),this.j=void 0)}commitStyles(){var t,s;this.j=this.element.getAttribute("style"),(t=this.webAnimation)===null||t===void 0||t.commitStyles(),(s=this.webAnimation)===null||s===void 0||s.cancel()}reconnected(){}async disconnected(){var t;if(!this.o||(this.options.id!==void 0&&Q.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await at(),(t=this.t)===null||t===void 0?void 0:t.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.v();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 s=this.A(this.options.keyframeOptions);await this.animate(this.options.out,s),this.element.remove()}prepare(){this.createFinished()}start(){var t,s;(s=(t=this.options).onStart)===null||s===void 0||s.call(t,this)}didFinish(t){var s,i;t&&((i=(s=this.options).onComplete)===null||i===void 0||i.call(s,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const i=ut.get(s);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=rt.has(this.l);return t||this.l.updateComplete.then(()=>{rt.add(this.l)}),t}A(t,s=this._()){const i={...we};return s.forEach(n=>Object.assign(i,n.options.keyframeOptions)),Object.assign(i,t),i}O(t,s,i){t={...t},s={...s};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&&s.left!==void 0&&(t.left=o*t.left,s.left=o*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=r*t.top,s.top=r*s.top)),{from:t,to:s}}calculateKeyframes(t,s,i=!1){var n;const o={},r={};let a=!1;const c={};for(const d in s){const u=t[d],h=s[d];if(d in X){const f=X[d];if(u===void 0||h===void 0)continue;const p=f(u,h);p.transform!==void 0&&(c[d]=p.value,a=!0,o.transform=`${(n=o.transform)!==null&&n!==void 0?n:""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(o,p.overrideFrom))}else u!==h&&u!==void 0&&h!==void 0&&(a=!0,o[d]=u,r[d]=h)}return o.transformOrigin=r.transformOrigin=i?"center center":"top left",this.animatingProperties=c,a?[o,r]:void 0}async animate(t,s=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,s]),i=!0,this.webAnimation=this.element.animate(t,s);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,s;return((t=this.webAnimation)===null||t===void 0?void 0:t.playState)==="running"||((s=this.webAnimation)===null||s===void 0?void 0:s.pending)}log(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const ft=l.e(Se),x={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 _,Ot,W,Pt=!1,D=!1,tt=!1,g=!1,pt=null,Y=!1;const q=typeof window<"u"?window:{},m=q.document||{head:{}},Lt=q.HTMLElement||class{},$={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,i)=>e.addEventListener(t,s,i),rel:(e,t,s,i)=>e.removeEventListener(t,s,i),ce:(e,t)=>new CustomEvent(e,t)},Ae=(()=>{let e=!1;try{m.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Te=e=>Promise.resolve(e),Oe=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replace=="function"}catch{}return!1})(),Et=(e,t,s,i)=>{s&&s.map(([n,o,r])=>{const a=Le(e,n),c=Pe(t,r),d=Ee(n);$.ael(a,o,c,d),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>$.rel(a,o,c,d))})},Pe=(e,t)=>s=>{try{x.lazyLoad||e.$hostElement$[t](s)}catch(i){L(i)}},Le=(e,t)=>t&4?m:t&8?q:t&16?m.body:e,Ee=e=>Ae?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,$t="http://www.w3.org/1999/xlink",y=(e,t="")=>()=>{},gt=new WeakMap,je=(e,t,s)=>{let i=M.get(e);Oe&&s?(i=i||new CSSStyleSheet,i.replace(t)):i=t,M.set(e,i)},Re=(e,t,s,i)=>{let n=jt(t,s),o=M.get(n);if(e=e.nodeType===11?e:m,o)if(typeof o=="string"){e=e.head||e;let r=gt.get(e),a;r||gt.set(e,r=new Set),r.has(n)||(a=m.createElement("style"),a.innerHTML=o,e.insertBefore(a,e.querySelector("link")),r&&r.add(n))}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return n},De=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,i=t.$flags$,n=y("attachStyles",t.$tagName$),o=Re(s.shadowRoot?s.shadowRoot:s.getRootNode(),t,e.$modeName$);i&10&&(s["s-sc"]=o,s.classList.add(o+"-h"),i&2&&s.classList.add(o+"-s")),n()},jt=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),Ie=e=>ds.map(t=>t(e)).find(t=>!!t),vt={},Ne="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml",He=e=>e!=null,et=e=>(e=typeof e,e==="object"||e==="function"),w=(e,t,...s)=>{let i=null,n=null,o=null,r=!1,a=!1,c=[];const d=h=>{for(let f=0;f<h.length;f++)i=h[f],Array.isArray(i)?d(i):i!=null&&typeof i!="boolean"&&((r=typeof e!="function"&&!et(i))&&(i=String(i)),r&&a?c[c.length-1].$text$+=i:c.push(r?I(null,i):i),a=r)};if(d(s),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(f=>h[f]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,c,Fe);const u=I(e,null);return u.$attrs$=t,c.length>0&&(u.$children$=c),u.$key$=n,u.$name$=o,u},I=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},st={},ze=e=>e&&e.$tag$===st,Fe={forEach:(e,t)=>e.map(mt).forEach(t),map:(e,t)=>e.map(mt).map(t).map(Ue)},mt=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Ue=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),w(e.vtag,s,...e.vchildren||[])}const t=I(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},bt=(e,t,s,i,n,o)=>{if(s!==i){let r=Ct(e,t),a=t.toLowerCase();if(t==="class"){const c=e.classList,d=yt(s),u=yt(i);c.remove(...d.filter(h=>h&&!u.includes(h))),c.add(...u.filter(h=>h&&!d.includes(h)))}else if(t==="style"){for(const c in s)(!i||i[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in i)(!s||i[c]!==s[c])&&(c.includes("-")?e.style.setProperty(c,i[c]):e.style[c]=i[c])}else if(t!=="key")if(t==="ref")i&&i(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Ct(q,a)?t=a.slice(2):t=a[2]+t.slice(3),s&&$.rel(e,t,s,!1),i&&$.ael(e,t,i,!1);else{const c=et(i);if((r||c&&i!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=i;else{let u=i??"";t==="list"?r=!1:(s==null||e[t]!=u)&&(e[t]=u)}}catch{}let d=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,d=!0),i==null||i===!1?(i!==!1||e.getAttribute(t)==="")&&(d?e.removeAttributeNS($t,t):e.removeAttribute(t)):(!r||o&4||n)&&!c&&(i=i===!0?"":i,d?e.setAttributeNS($t,t,i):e.setAttribute(t,i))}}},Be=/\s/,yt=e=>e?e.split(Be):[],Rt=(e,t,s,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,o=e&&e.$attrs$||vt,r=t.$attrs$||vt;for(i in o)i in r||bt(n,i,o[i],void 0,s,t.$flags$);for(i in r)bt(n,i,o[i],r[i],s,t.$flags$)},N=(e,t,s,i)=>{let n=t.$children$[s],o=0,r,a,c;if(Pt||(tt=!0,n.$tag$==="slot"&&(_&&i.classList.add(_+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)r=n.$elm$=m.createTextNode(n.$text$);else if(n.$flags$&1)r=n.$elm$=m.createTextNode("");else{if(g||(g=n.$tag$==="svg"),r=n.$elm$=m.createElementNS(g?Ne:Me,n.$flags$&2?"slot-fb":n.$tag$),g&&n.$tag$==="foreignObject"&&(g=!1),Rt(null,n,g),He(_)&&r["s-si"]!==_&&r.classList.add(r["s-si"]=_),n.$children$)for(o=0;o<n.$children$.length;++o)a=N(e,n,o,r),a&&r.appendChild(a);n.$tag$==="svg"?g=!1:r.tagName==="foreignObject"&&(g=!0)}return r["s-hn"]=W,n.$flags$&3&&(r["s-sr"]=!0,r["s-cr"]=Ot,r["s-sn"]=n.$name$||"",c=e&&e.$children$&&e.$children$[s],c&&c.$tag$===n.$tag$&&e.$elm$&&P(e.$elm$,!1)),r},P=(e,t)=>{$.$flags$|=1;const s=e.childNodes;for(let i=s.length-1;i>=0;i--){const n=s[i];n["s-hn"]!==W&&n["s-ol"]&&(Nt(n).insertBefore(n,it(n)),n["s-ol"].remove(),n["s-ol"]=void 0,tt=!0),t&&P(n,t)}$.$flags$&=-2},Dt=(e,t,s,i,n,o)=>{let r=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(r.shadowRoot&&r.tagName===W&&(r=r.shadowRoot);n<=o;++n)i[n]&&(a=N(null,s,n,e),a&&(i[n].$elm$=a,r.insertBefore(a,it(t))))},It=(e,t,s,i,n)=>{for(;t<=s;++t)(i=e[t])&&(n=i.$elm$,zt(i),D=!0,n["s-ol"]?n["s-ol"].remove():P(n,!0),n.remove())},We=(e,t,s,i)=>{let n=0,o=0,r=0,a=0,c=t.length-1,d=t[0],u=t[c],h=i.length-1,f=i[0],p=i[h],A,E;for(;n<=c&&o<=h;)if(d==null)d=t[++n];else if(u==null)u=t[--c];else if(f==null)f=i[++o];else if(p==null)p=i[--h];else if(j(d,f))C(d,f),d=t[++n],f=i[++o];else if(j(u,p))C(u,p),u=t[--c],p=i[--h];else if(j(d,p))(d.$tag$==="slot"||p.$tag$==="slot")&&P(d.$elm$.parentNode,!1),C(d,p),e.insertBefore(d.$elm$,u.$elm$.nextSibling),d=t[++n],p=i[--h];else if(j(u,f))(d.$tag$==="slot"||p.$tag$==="slot")&&P(u.$elm$.parentNode,!1),C(u,f),e.insertBefore(u.$elm$,d.$elm$),u=t[--c],f=i[++o];else{for(r=-1,a=n;a<=c;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===f.$key$){r=a;break}r>=0?(E=t[r],E.$tag$!==f.$tag$?A=N(t&&t[o],s,r,e):(C(E,f),t[r]=void 0,A=E.$elm$),f=i[++o]):(A=N(t&&t[o],s,o,e),f=i[++o]),A&&Nt(d.$elm$).insertBefore(A,it(d.$elm$))}n>c?Dt(e,i[h+1]==null?null:i[h+1].$elm$,s,i,o,h):o>h&&It(t,n,c)},j=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,it=e=>e&&e["s-ol"]||e,Nt=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,C=(e,t)=>{const s=t.$elm$=e.$elm$,i=e.$children$,n=t.$children$,o=t.$tag$,r=t.$text$;let a;r===null?(g=o==="svg"?!0:o==="foreignObject"?!1:g,o==="slot"||Rt(e,t,g),i!==null&&n!==null?We(s,i,t,n):n!==null?(e.$text$!==null&&(s.textContent=""),Dt(s,null,t,n,0,n.length-1)):i!==null&&It(i,0,i.length-1),g&&o==="svg"&&(g=!1)):(a=s["s-cr"])?a.parentNode.textContent=r:e.$text$!==r&&(s.data=r)},Mt=e=>{let t=e.childNodes,s,i,n,o,r,a;for(i=0,n=t.length;i<n;i++)if(s=t[i],s.nodeType===1){if(s["s-sr"]){for(r=s["s-sn"],s.hidden=!1,o=0;o<n;o++)if(a=t[o].nodeType,t[o]["s-hn"]!==s["s-hn"]||r!==""){if(a===1&&r===t[o].getAttribute("slot")){s.hidden=!0;break}}else if(a===1||a===3&&t[o].textContent.trim()!==""){s.hidden=!0;break}}Mt(s)}},v=[],Ht=e=>{let t,s,i,n,o,r,a=0,c=e.childNodes,d=c.length;for(;a<d;a++){if(t=c[a],t["s-sr"]&&(s=t["s-cr"])&&s.parentNode)for(i=s.parentNode.childNodes,n=t["s-sn"],r=i.length-1;r>=0;r--)s=i[r],!s["s-cn"]&&!s["s-nr"]&&s["s-hn"]!==t["s-hn"]&&(xt(s,n)?(o=v.find(u=>u.$nodeToRelocate$===s),D=!0,s["s-sn"]=s["s-sn"]||n,o?o.$slotRefNode$=t:v.push({$slotRefNode$:t,$nodeToRelocate$:s}),s["s-sr"]&&v.map(u=>{xt(u.$nodeToRelocate$,s["s-sn"])&&(o=v.find(h=>h.$nodeToRelocate$===s),o&&!u.$slotRefNode$&&(u.$slotRefNode$=o.$slotRefNode$))})):v.some(u=>u.$nodeToRelocate$===s)||v.push({$nodeToRelocate$:s}));t.nodeType===1&&Ht(t)}},xt=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",zt=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(zt)},qe=(e,t)=>{const s=e.$hostElement$,i=e.$cmpMeta$,n=e.$vnode$||I(null,null),o=ze(t)?t:w(null,null,t);W=s.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.map(([r,a])=>o.$attrs$[a]=s[r])),o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=n.$elm$=s.shadowRoot||s,_=s["s-sc"],Ot=s["s-cr"],Pt=(i.$flags$&1)!==0,D=!1,C(n,o);{if($.$flags$|=1,tt){Ht(o.$elm$);let r,a,c,d,u,h,f=0;for(;f<v.length;f++)r=v[f],a=r.$nodeToRelocate$,a["s-ol"]||(c=m.createTextNode(""),c["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=c,a));for(f=0;f<v.length;f++)if(r=v[f],a=r.$nodeToRelocate$,r.$slotRefNode$){for(d=r.$slotRefNode$.parentNode,u=r.$slotRefNode$.nextSibling,c=a["s-ol"];c=c.previousSibling;)if(h=c["s-nr"],h&&h["s-sn"]===a["s-sn"]&&d===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&d!==a.parentNode||a.nextSibling!==u)&&a!==u&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),d.insertBefore(a,u))}else a.nodeType===1&&(a.hidden=!0)}D&&Mt(o.$elm$),$.$flags$&=-2,v.length=0}},Ge=e=>e,Ke=(e,t,s)=>{const i=Ge(e);return{emit:n=>Qe(i,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:n})}},Qe=(e,t,s)=>{const i=$.ce(t,s);return e.dispatchEvent(i),i},Xe=(e,t)=>{},Ft=(e,t)=>(e.$flags$|=16,Xe(e,e.$ancestorComponent$),fs(()=>Ye(e,t))),Ye=(e,t)=>{const s=e.$hostElement$,i=y("scheduleUpdate",e.$cmpMeta$.$tagName$),n=s;let o;return t?o=k(n,"componentWillLoad"):o=k(n,"componentWillUpdate"),o=_t(o,()=>k(n,"componentWillRender")),i(),_t(o,()=>Je(e,n,t))},Je=async(e,t,s)=>{const i=e.$hostElement$,n=y("update",e.$cmpMeta$.$tagName$);i["s-rc"],s&&De(e);const o=y("render",e.$cmpMeta$.$tagName$);Ze(e,t,i),o(),n(),Ve(e)},Ze=(e,t,s)=>{try{pt=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(x.hasRenderFn||x.reflect)&&(x.vdomRender||x.reflect)&&(x.hydrateServerSide||qe(e,t))}catch(a){L(a,e.$hostElement$)}return pt=null,null},Ve=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,i=y("postUpdate",t),n=s;e.$ancestorComponent$,k(n,"componentDidRender"),e.$flags$&64?(k(n,"componentDidUpdate"),i()):(e.$flags$|=64,k(n,"componentDidLoad"),i())},k=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(i){L(i)}},_t=(e,t)=>e&&e.then?e.then(t):t(),ts=(e,t)=>e!=null&&!et(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,es=(e,t)=>G(e).$instanceValues$.get(t),ss=(e,t,s,i)=>{const n=G(e),o=e,r=n.$instanceValues$.get(t),a=n.$flags$,c=o;s=ts(s,i.$members$[t][0]);const d=Number.isNaN(r)&&Number.isNaN(s);if(s!==r&&!d){n.$instanceValues$.set(t,s);{if(i.$watchers$&&a&128){const h=i.$watchers$[t];h&&h.map(f=>{try{c[f](s,r,t)}catch(p){L(p,o)}})}if((a&18)===2){if(c.componentShouldUpdate&&c.componentShouldUpdate(s,r,t)===!1)return;Ft(n,!1)}}}},is=(e,t,s)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),n=e.prototype;i.map(([o,[r]])=>{(r&31||r&32)&&Object.defineProperty(n,o,{get(){return es(this,o)},set(a){ss(this,o,a,t)},configurable:!0,enumerable:!0})});{const o=new Map;n.attributeChangedCallback=function(r,a,c){$.jmp(()=>{const d=o.get(r);if(this.hasOwnProperty(d))c=this[d],delete this[d];else if(n.hasOwnProperty(d)&&typeof this[d]=="number"&&this[d]==c)return;this[d]=c===null&&typeof this[d]=="boolean"?!1:c})},e.observedAttributes=i.filter(([r,a])=>a[0]&15).map(([r,a])=>{const c=a[1]||r;return o.set(c,r),a[0]&512&&t.$attrsToReflect$.push([r,c]),c})}}return e},ns=async(e,t,s,i,n)=>{if(!(t.$flags$&32)&&(n=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128),n.style)){let r=n.style;typeof r!="string"&&(r=r[t.$modeName$=Ie(e)]);const a=jt(s,t.$modeName$);if(!M.has(a)){const c=y("registerStyles",s.$tagName$);je(a,r,!!(s.$flags$&1)),c()}}t.$ancestorComponent$,(()=>Ft(t,!0))()},os=e=>{},rs=e=>{if(!($.$flags$&1)){const t=G(e),s=t.$cmpMeta$,i=y("connectedCallback",s.$tagName$);t.$flags$&1?(Et(e,t,s.$listeners$),os(t.$lazyInstance$)):(t.$flags$|=1,s.$flags$&12&&as(e),s.$members$&&Object.entries(s.$members$).map(([n,[o]])=>{if(o&31&&e.hasOwnProperty(n)){const r=e[n];delete e[n],e[n]=r}}),ns(e,t,s)),i()}},as=e=>{const t=e["s-cr"]=m.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ls=e=>{if(!($.$flags$&1)){const t=G(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0)}},Ut=(e,t)=>{const s={$flags$:t[0],$tagName$:t[1]};s.$members$=t[2],s.$listeners$=t[3],s.$watchers$=e.$watchers$,s.$attrsToReflect$=[];const i=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){cs(this,s)},connectedCallback(){rs(this),i&&i.call(this)},disconnectedCallback(){ls(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(s.$flags$&16)})}}),e.is=s.$tagName$,is(e,s)},Bt=new WeakMap,G=e=>Bt.get(e),cs=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return Et(e,s,t.$listeners$),Bt.set(e,s)},Ct=(e,t)=>t in e,L=(e,t)=>(0,console.error)(e,t),M=new Map,ds=[],wt=[],Wt=[],hs=(e,t)=>s=>{e.push(s),Y||(Y=!0,t&&$.$flags$&4?us(J):$.raf(J))},kt=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){L(s)}e.length=0},J=()=>{kt(wt),kt(Wt),(Y=wt.length>0)&&$.raf(J)},us=e=>Te().then(e),fs=hs(Wt,!0),ps=(e={})=>{const{content:t="",title:s,attributes:i=[]}=e;let n="",o=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},...i];return s&&(n=`<title>${s}</title>`),`<svg ${o.map(a=>`${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`},$s=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim();function gs(e){return`${e.getFullYear()}.${e.getMonth()+1}`}class vs{constructor(t){this.voca_component=t,this.voca_added=gs(new Date)}}const ms="telia-vst{display:none}",bs=Ut(class extends Lt{constructor(){super(),this.__registerHost(),this.vocaInternalUStats=Ke(this,"vocaInternalUStats",7)}connectedCallback(){this.vocaInternalUStats.emit(new vs(this.dataTrackingId))}render(){return w(st,null)}static get style(){return ms}},[0,"telia-vst",{dataTrackingId:[1,"data-tracking-id"]}]);function qt(){if(typeof customElements>"u")return;["telia-vst"].forEach(t=>{switch(t){case"telia-vst":customElements.get(t)||customElements.define(t,bs);break}})}qt();function Z(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{vocadsIcons:void 0,vocadsIconsRegistered:!1}}function ys(){if(typeof Z().vocadsIcons!==void 0)return Z().vocadsIcons}function xs(){return Z().vocadsIconsRegistered}const _s=".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))}",Cs=Ut(class extends Lt{constructor(){super(),this.__registerHost(),this.size="md",this.allyTitle=null,this.dataTrackingId="telia-icon"}getSvgString(){if(this.svg)return this.svg;if(xs()&&this.name){const e=ys();return e[this.name]?e[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 e=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 s=ps({content:$s(e),attributes:t,title:this.allyTitle});return w(st,{class:`telia-icon telia-icon--${this.size}`},w("span",{"aria-label":this.allyTitle,class:"telia-icon__container",innerHTML:s}),w("telia-vst",{dataTrackingId:this.dataTrackingId}))}static get style(){return _s}},[0,"telia-icon",{name:[1],svg:[1],size:[1],allyTitle:[1,"ally-title"],dataTestid:[1,"data-testid"]}]);function ws(){if(typeof customElements>"u")return;["telia-icon","telia-vst"].forEach(t=>{switch(t){case"telia-icon":customElements.get(t)||customElements.define(t,Cs);break;case"telia-vst":customElements.get(t)||qt();break}})}ws();var ks=Object.defineProperty,Ss=Object.getOwnPropertyDescriptor,Gt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ss(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&ks(t,s,n),n};let H=class extends l.s{_renderTimestamp(e,t){if(!e&&!t)return l.A;const s=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});let i="";return e?t?i=`${e}: ${s(t)}`:i=e:t&&(i=s(t)),l.x`<p class="conversation-timestamp">${i}</p>`}render(){var e,t;switch(this.message.type){case l.ConversationMessageType.System:return"";case l.ConversationMessageType.Agent:return l.x`<div
|
|
58
|
+
class=${l.o({"conversation-agent-message":!0,"has-avatar":!!((e=this.message.sender)!=null&&e.avatar)})}
|
|
59
|
+
>
|
|
60
|
+
${(t=this.message.sender)!=null&&t.avatar?l.x`<div class="avatar">
|
|
61
|
+
<img src=${this.message.sender.avatar} />
|
|
62
|
+
</div>`:l.A}
|
|
63
|
+
|
|
64
|
+
<div class="content-bundle">
|
|
65
|
+
${this.message.content.map(s=>l.x`
|
|
66
|
+
<div class="message-container">
|
|
67
|
+
<div class="message-content">
|
|
68
|
+
<conversation-component-message-list
|
|
69
|
+
.items=${s.items||[]}
|
|
70
|
+
></conversation-component-message-list>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
`)}
|
|
74
|
+
</div>
|
|
75
|
+
${this._renderTimestamp(this.message.sender.name||"",this.message.timestamp)}
|
|
76
|
+
</div>`;case l.ConversationMessageType.User:return l.x`<div class="conversation-user-message">
|
|
77
|
+
<div class="content-bundle">
|
|
78
|
+
${this.message.content.map(s=>l.x`
|
|
79
|
+
<div class="message-container">
|
|
80
|
+
<div class="message-content">
|
|
81
|
+
<conversation-component-message-list
|
|
82
|
+
.items=${s.items||[]}
|
|
83
|
+
></conversation-component-message-list>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
`)}
|
|
87
|
+
</div>
|
|
88
|
+
${this._renderTimestamp("",this.message.timestamp)}
|
|
89
|
+
</div>`;default:return l.A}}};H.styles=l.i`
|
|
90
|
+
:host {
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
display: block;
|
|
93
|
+
}
|
|
94
|
+
* {
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
.message-content {
|
|
98
|
+
padding: var(--spacing-md);
|
|
99
|
+
display: inline-block;
|
|
100
|
+
margin-top: var(--spacing-md);
|
|
101
|
+
max-width: 100%;
|
|
102
|
+
border: 1px solid var(--gray-color);
|
|
103
|
+
border-radius: var(--border-radius);
|
|
104
|
+
background-color: var(--bubble-bg-color);
|
|
105
|
+
color: var(--bubble-text-color);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.conversation-user-message {
|
|
109
|
+
--bubble-bg-color: var(--conversation-user-bg-color);
|
|
110
|
+
--bubble-text-color: var(--conversation-user-text-color);
|
|
111
|
+
margin-left: 10%;
|
|
112
|
+
width: 90%;
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
align-items: flex-end;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.conversation-agent-message {
|
|
119
|
+
--bubble-bg-color: var(--conversation-agent-bg-color);
|
|
120
|
+
--bubble-text-color: var(--conversation-agent-text-color);
|
|
121
|
+
display: grid;
|
|
122
|
+
margin-right: 10%;
|
|
123
|
+
width: 90%;
|
|
124
|
+
|
|
125
|
+
grid-template-columns: 1fr;
|
|
126
|
+
grid-template-rows: 1fr auto;
|
|
127
|
+
grid-template-areas:
|
|
128
|
+
'content'
|
|
129
|
+
'info';
|
|
130
|
+
}
|
|
131
|
+
.conversation-agent-message.has-avatar {
|
|
132
|
+
grid-template-columns: auto 1fr;
|
|
133
|
+
grid-template-rows: 1fr auto;
|
|
134
|
+
grid-template-areas:
|
|
135
|
+
'avatar content'
|
|
136
|
+
'. info';
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.avatar {
|
|
140
|
+
grid-area: avatar;
|
|
141
|
+
place-self: flex-end;
|
|
142
|
+
width: 32px;
|
|
143
|
+
height: 32px;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
background-color: var(--accent-color);
|
|
146
|
+
align-self: flex-end;
|
|
147
|
+
justify-self: center;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
margin-right: var(--spacing-md);
|
|
150
|
+
justify-content: center;
|
|
151
|
+
align-items: center;
|
|
152
|
+
}
|
|
153
|
+
.avatar img {
|
|
154
|
+
height: 100%;
|
|
155
|
+
width: 100%;
|
|
156
|
+
object-fit: cover;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.conversation-timestamp {
|
|
160
|
+
grid-area: info;
|
|
161
|
+
margin: 0;
|
|
162
|
+
line-height: 1.5em;
|
|
163
|
+
grid-area: info;
|
|
164
|
+
color: var(--text-color);
|
|
165
|
+
font-size: 0.8rem;
|
|
166
|
+
font-weight: 300;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.content-bundle {
|
|
170
|
+
grid-area: content;
|
|
171
|
+
}
|
|
172
|
+
`;Gt([l.n()],H.prototype,"message",2);H=Gt([S("conversation-component-message")],H);var As=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Kt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ts(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&As(t,s,n),n};let z=class extends l.s{constructor(){super(...arguments),this.items=[]}_isCustomComponent(e){return!["html","link-list"].includes(e)}_createCustomComponent(e,t){const s=customElements.get(e);if(s){const i=new s;return i.message=t,i}return l.A}render(){return l.x` <div class="message-list">
|
|
173
|
+
${this.items.map(([e,t])=>l.x`
|
|
174
|
+
${e==="html"?l.x`
|
|
175
|
+
<message-type-html .message=${t}> </message-type-html>
|
|
176
|
+
`:l.A}
|
|
177
|
+
${e==="link-list"?l.x`
|
|
178
|
+
<message-type-link-list .message=${t}>
|
|
179
|
+
</message-type-link-list>
|
|
180
|
+
`:l.A}
|
|
181
|
+
${e==="separator"?l.x`
|
|
182
|
+
<message-type-separator .message=${t}>
|
|
183
|
+
</message-type-separator>
|
|
184
|
+
`:l.A}
|
|
185
|
+
${this._isCustomComponent(e)?this._createCustomComponent(e,t):l.A}
|
|
186
|
+
`)}
|
|
187
|
+
</div>`}};z.styles=l.i`
|
|
188
|
+
:host {
|
|
189
|
+
box-sizing: border-box;
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
* {
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
}
|
|
195
|
+
.message-list {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
gap: var(--spacing-md);
|
|
199
|
+
}
|
|
200
|
+
`;Kt([l.n()],z.prototype,"items",2);z=Kt([S("conversation-component-message-list")],z);/**
|
|
201
|
+
* @license
|
|
202
|
+
* Copyright 2017 Google LLC
|
|
203
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
204
|
+
*/class V extends l.i$1{constructor(t){if(super(t),this.et=l.A,t.type!==l.t$1.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l.A||t==null)return this.ft=void 0,this.et=t;if(t===l.T)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const s=[t];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}V.directiveName="unsafeHTML",V.resultType=1;const Os=l.e(V);var Ps=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,Qt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ls(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&Ps(t,s,n),n};let F=class extends l.s{render(){return l.x`<div class="message-type-html">
|
|
205
|
+
${Os(this.message.body)}
|
|
206
|
+
</div>`}};F.styles=[l.i`
|
|
207
|
+
:host {
|
|
208
|
+
box-sizing: border-box;
|
|
209
|
+
}
|
|
210
|
+
* {
|
|
211
|
+
box-sizing: border-box;
|
|
212
|
+
}
|
|
213
|
+
p {
|
|
214
|
+
margin: 0;
|
|
215
|
+
padding: 0;
|
|
216
|
+
word-break: break-word;
|
|
217
|
+
}
|
|
218
|
+
`];Qt([l.n()],F.prototype,"message",2);F=Qt([S("message-type-html")],F);var Es=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Xt=(e,t,s,i)=>{for(var n=i>1?void 0:i?js(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&Es(t,s,n),n};let U=class extends l.s{_onItemClick(e){const t=new CustomEvent("action",{bubbles:!0,composed:!0,detail:{actionKey:"action",payload:e}});this.dispatchEvent(t)}render(){return l.x`
|
|
219
|
+
<div class="message-type-link-list">
|
|
220
|
+
${this.message.header?l.x`<h1>${this.message.header}</h1>`:l.A}
|
|
221
|
+
<ul>
|
|
222
|
+
${this.message.actions.map(e=>l.x`
|
|
223
|
+
<li>
|
|
224
|
+
<button @click=${()=>this._onItemClick(e)}>
|
|
225
|
+
${e.label}
|
|
226
|
+
</button>
|
|
227
|
+
</li>
|
|
228
|
+
`)}
|
|
229
|
+
</ul>
|
|
230
|
+
</div>
|
|
231
|
+
`}};U.styles=[l.i`
|
|
232
|
+
:host {
|
|
233
|
+
box-sizing: border-box;
|
|
234
|
+
}
|
|
235
|
+
* {
|
|
236
|
+
box-sizing: border-box;
|
|
237
|
+
}
|
|
238
|
+
h1 {
|
|
239
|
+
font-size: 1.1rem;
|
|
240
|
+
margin: 0 0 var(--spacing-sm);
|
|
241
|
+
font-weight: normal;
|
|
242
|
+
line-height: 1.8rem;
|
|
243
|
+
color: var(--text-color);
|
|
244
|
+
white-space: normal;
|
|
245
|
+
}
|
|
246
|
+
ul {
|
|
247
|
+
list-style: none;
|
|
248
|
+
margin: 0;
|
|
249
|
+
padding: 0;
|
|
250
|
+
}
|
|
251
|
+
.message-type-link-list button {
|
|
252
|
+
color: var(--primary-color);
|
|
253
|
+
background-color: transparent;
|
|
254
|
+
max-width: 100%;
|
|
255
|
+
border: none;
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
text-transform: none;
|
|
258
|
+
font-weight: 300;
|
|
259
|
+
font-size: inherit;
|
|
260
|
+
text-align: left;
|
|
261
|
+
display: block;
|
|
262
|
+
margin: 0;
|
|
263
|
+
padding: 0;
|
|
264
|
+
}
|
|
265
|
+
.message-type-link-list ul {
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
gap: var(--spacing-sm);
|
|
269
|
+
}
|
|
270
|
+
`];Xt([l.n()],U.prototype,"message",2);U=Xt([S("message-type-link-list")],U);var Rs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Yt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ds(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&Rs(t,s,n),n};let B=class extends l.s{render(){return l.x`<div class="message-type-separator"></div>`}};B.styles=[l.i`
|
|
271
|
+
:host {
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
}
|
|
274
|
+
* {
|
|
275
|
+
box-sizing: border-box;
|
|
276
|
+
}
|
|
277
|
+
.message-type-separator {
|
|
278
|
+
border-bottom: 1px solid var(--gray-color);
|
|
279
|
+
width: 100%;
|
|
280
|
+
}
|
|
281
|
+
`];Yt([l.n({attribute:!1})],B.prototype,"message",2);B=Yt([S("message-type-separator")],B);const Is=e=>{e.scrollTo?e.scrollTo({top:e.scrollHeight,behavior:"smooth"}):e.scrollTop=e.scrollHeight};var Ns=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,Jt=(e,t,s,i)=>{for(var n=i>1?void 0:i?Ms(t,s):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(n=(i?r(t,s,n):r(n))||n);return i&&n&&Ns(t,s,n),n};const Zt=$e(l.s);exports.ConversationComponent=class extends Zt{constructor(){super(...arguments),this.message="",this.conversationContentRef=ye(),this.chatScrollHeight=0}async _onClick(t){t.preventDefault(),console.log("Todo",this.message)}async _onSendMessage(t){t.preventDefault(),await this.actions.dispatch("user-submit",{text:this.message}),this.message=""}_inputHandler(t){this.message=t.target.value}_actionHandler(t){this.actions.dispatch(t.detail.actionKey,t.detail.payload)}updated(t){const s=this.conversationContentRef.value;s&&setTimeout(()=>{const i=s.scrollHeight;i>this.chatScrollHeight&&(Is(s),this.chatScrollHeight=i)},1e3)}render(){return l.x` <div
|
|
282
|
+
@action=${this._actionHandler}
|
|
283
|
+
class=${l.o({conversation:!0,"input-has-text":this.message.length>0})}
|
|
284
|
+
>
|
|
285
|
+
<div class="conversation-content" ${_e(this.conversationContentRef)}>
|
|
286
|
+
<div class="conversation-content-inner">
|
|
287
|
+
${(this.properties.messages||[]).map(t=>l.x`<div class="conversation-entry" tabindex="-1">
|
|
288
|
+
<conversation-component-message
|
|
289
|
+
.message=${t}
|
|
290
|
+
${ft({keyframeOptions:{},in:ct,out:lt,stabilizeOut:!0,skipInitial:!1})}
|
|
291
|
+
>
|
|
292
|
+
</conversation-component-message>
|
|
293
|
+
</div>`)}
|
|
294
|
+
${this.properties.loading?l.x`<div
|
|
295
|
+
class="loader"
|
|
296
|
+
${ft({in:ct,out:lt,skipInitial:!1})}
|
|
297
|
+
>
|
|
298
|
+
<div></div>
|
|
299
|
+
<div></div>
|
|
300
|
+
<div></div>
|
|
301
|
+
</div>`:l.A}
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
<form class="conversation-bottom" @submit=${this._onSendMessage}>
|
|
305
|
+
<div class="conversation-bottom-left">
|
|
306
|
+
<button class="circle" @click=${this._onClick} type="button">
|
|
307
|
+
<telia-icon svg=${nt.gridView.svg} size="sm"></telia-icon>
|
|
308
|
+
</button>
|
|
309
|
+
</div>
|
|
310
|
+
<input
|
|
311
|
+
placeholder="Type your message here..."
|
|
312
|
+
.value=${this.message}
|
|
313
|
+
@input=${this._inputHandler}
|
|
314
|
+
/>
|
|
315
|
+
<div class="conversation-actions">
|
|
316
|
+
<button class="conversation-send-button" type="submit">
|
|
317
|
+
<telia-icon svg=${nt.send.svg}></telia-icon>
|
|
318
|
+
</button>
|
|
319
|
+
</div>
|
|
320
|
+
</form>
|
|
321
|
+
</div>`}};exports.ConversationComponent.styles=[Zt.styles||[],l.i`
|
|
322
|
+
:host {
|
|
323
|
+
font-family: var(--font-family);
|
|
324
|
+
--send-icon-color: var(--gray-dark-color, #a6a6a6);
|
|
325
|
+
--conversation-bg: #fafafa;
|
|
326
|
+
--conversation-agent-bg-color: var(--conversation-bg);
|
|
327
|
+
--conversation-agent-text-color: var(-text-color);
|
|
328
|
+
--conversation-user-bg-color: var(--primary-color);
|
|
329
|
+
--conversation-user-text-color: white;
|
|
330
|
+
|
|
331
|
+
scrollbar-width: thin; /* Firefox */
|
|
332
|
+
scrollbar-color: #7f7f7f transparent; /* Firefox */
|
|
333
|
+
}
|
|
334
|
+
::-webkit-scrollbar {
|
|
335
|
+
width: 3px !important;
|
|
336
|
+
background-color: transparent;
|
|
337
|
+
border-left: none;
|
|
338
|
+
}
|
|
339
|
+
::-webkit-scrollbar-thumb {
|
|
340
|
+
background-color: #7f7f7f;
|
|
341
|
+
}
|
|
342
|
+
::-webkit-scrollbar-track {
|
|
343
|
+
-webkit-box-shadow: none !important;
|
|
344
|
+
background-color: transparent;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.conversation {
|
|
348
|
+
display: grid;
|
|
349
|
+
grid-template-rows: 1fr auto;
|
|
350
|
+
height: 100%;
|
|
351
|
+
background-color: var(--conversation-bg);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.conversation.input-has-text {
|
|
355
|
+
--send-icon-color: var(--primary-color);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.conversation-content {
|
|
359
|
+
flex: 1;
|
|
360
|
+
|
|
361
|
+
padding: var(--spacing-md);
|
|
362
|
+
overflow-y: auto;
|
|
363
|
+
overflow-x: hidden;
|
|
364
|
+
}
|
|
365
|
+
.conversation-content-inner {
|
|
366
|
+
display: flex;
|
|
367
|
+
flex-direction: column;
|
|
368
|
+
justify-content: end;
|
|
369
|
+
min-height: 100%;
|
|
370
|
+
}
|
|
371
|
+
.conversation-bottom {
|
|
372
|
+
border-top: 1px solid var(--gray-color);
|
|
373
|
+
background-color: #fff;
|
|
374
|
+
min-height: 50px;
|
|
375
|
+
max-height: 150px;
|
|
376
|
+
display: flex;
|
|
377
|
+
align-items: center;
|
|
378
|
+
padding: 0 var(--spacing-md);
|
|
379
|
+
margin: 0;
|
|
380
|
+
}
|
|
381
|
+
.conversation-bottom-left {
|
|
382
|
+
border-right: 1px solid var(--gray-color);
|
|
383
|
+
padding-right: var(--spacing-md);
|
|
384
|
+
}
|
|
385
|
+
.circle {
|
|
386
|
+
background-color: var(--gray-dark-color, #a6a6a6);
|
|
387
|
+
border-radius: 50%;
|
|
388
|
+
color: #fff;
|
|
389
|
+
padding: var(--spacing-sm, 5px);
|
|
390
|
+
border: none;
|
|
391
|
+
display: flex;
|
|
392
|
+
justify-content: center;
|
|
393
|
+
align-items: center;
|
|
394
|
+
}
|
|
395
|
+
.conversation-send-button {
|
|
396
|
+
border: none;
|
|
397
|
+
background: transparent;
|
|
398
|
+
cursor: pointer;
|
|
399
|
+
color: var(--send-icon-color);
|
|
400
|
+
}
|
|
401
|
+
input {
|
|
402
|
+
border: none;
|
|
403
|
+
font-family: inherit;
|
|
404
|
+
font-size: inherit;
|
|
405
|
+
flex: 1;
|
|
406
|
+
padding: 0 var(--spacing-md);
|
|
407
|
+
height: 2.5rem;
|
|
408
|
+
outline: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@keyframes loaderanim {
|
|
412
|
+
0% {
|
|
413
|
+
opacity: 0;
|
|
414
|
+
}
|
|
415
|
+
75% {
|
|
416
|
+
opacity: 1;
|
|
417
|
+
}
|
|
418
|
+
100% {
|
|
419
|
+
opacity: 0;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.loader {
|
|
424
|
+
display: flex;
|
|
425
|
+
justify-content: center;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.loader > div {
|
|
429
|
+
height: 10px;
|
|
430
|
+
width: 10px;
|
|
431
|
+
border-radius: 50%;
|
|
432
|
+
margin: 5px;
|
|
433
|
+
background-color: var(--text-color);
|
|
434
|
+
animation-name: loaderanim;
|
|
435
|
+
animation-duration: 1s;
|
|
436
|
+
animation-iteration-count: infinite;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.loader > div:nth-of-type(2) {
|
|
440
|
+
animation-delay: 100ms;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.loader > div:nth-of-type(3) {
|
|
444
|
+
animation-delay: 200ms;
|
|
445
|
+
}
|
|
446
|
+
`];Jt([l.t()],exports.ConversationComponent.prototype,"message",2);exports.ConversationComponent=Jt([S("ace-conversation")],exports.ConversationComponent);const Hs=exports.ConversationComponent;exports.default=Hs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentNodeController, ComponentPlatform } from '@telia-ace/widget-core
|
|
1
|
+
import { ComponentNodeController, ComponentPlatform } from '@telia-ace/widget-core';
|
|
2
2
|
import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
3
3
|
import { ConversationController } from './conversation-controller';
|
|
4
4
|
import { ConversationProvider } from './conversation-provider';
|
|
@@ -49,4 +49,3 @@ export declare class ConversationPlatform {
|
|
|
49
49
|
static handleContactMethodClick(event: any, container: Container, contactMethod: any, _callback?: Function): Promise<void>;
|
|
50
50
|
static handleContactMethodSubmit(container: Container, contactMethod: any): Promise<any>;
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=conversation-platform.d.ts.map
|