@telia-ace/widget-conversation-flamingo 1.1.121-rc.1 → 1.1.121

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.
Files changed (3) hide show
  1. package/index.js +6 -6
  2. package/index.mjs +51 -51
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";var da=Object.defineProperty;var fa=(n,e,t)=>e in n?da(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var S=(n,e,t)=>fa(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ga=async n=>{n.registerComponent("conversation",Promise.resolve().then(()=>Lh))};class ws{constructor(){this.registeredProviders=new Map}static async getInstance(e){let t=await e.get("conversation");return t||(t=new ws,await e.register("conversation",t),t)}registerProvider(e,t){this.registeredProviders.set(e,t)}}var ts=function(n,e){return ts=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])},ts(n,e)};function ot(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ts(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ma(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{c(s.next(u))}catch(d){o(d)}}function l(u){try{c(s.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,l)}c((s=s.apply(n,e||[])).next())})}function Pi(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,r,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(t=0)),t;)try{if(s=1,r&&(i=c[0]&2?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1],i=c;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(c);break}i[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(n,t)}catch(u){c=[6,u],r=0}finally{s=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function tt(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],s=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Me(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var s=t.call(n),r,i=[],o;try{for(;(e===void 0||e-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return i}function nt(n,e,t){if(t||arguments.length===2)for(var s=0,r=e.length,i;s<r;s++)(i||!(s in e))&&(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return n.concat(i||Array.prototype.slice.call(e))}function Ve(n){return this instanceof Ve?(this.v=n,this):new Ve(n)}function va(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),r,i=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),r[Symbol.asyncIterator]=function(){return this},r;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){s[g]&&(r[g]=function(y){return new Promise(function(ce,Q){i.push([g,y,ce,Q])>1||l(g,y)})},m&&(r[g]=m(r[g])))}function l(g,m){try{c(s[g](m))}catch(y){p(i[0][3],y)}}function c(g){g.value instanceof Ve?Promise.resolve(g.value.v).then(u,d):p(i[0][2],g)}function u(g){l("next",g)}function d(g){l("throw",g)}function p(g,m){g(m),i.shift(),i.length&&l(i[0][0],i[0][1])}}function ba(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof tt=="function"?tt(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(i){t[i]=n[i]&&function(o){return new Promise(function(a,l){o=n[i](o),r(a,l,o.done,o.value)})}}function r(i,o,a,l){Promise.resolve(l).then(function(c){i({value:c,done:a})},o)}}function A(n){return typeof n=="function"}function Ii(n){var e=function(s){Error.call(s),s.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Bn=Ii(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
2
2
  `+t.map(function(s,r){return r+1+") "+s.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=t}});function ns(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var vn=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,s,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=tt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(y){e={error:y}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(A(u))try{u()}catch(y){i=y instanceof Bn?y.errors:[y]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=tt(d),g=p.next();!g.done;g=p.next()){var m=g.value;try{Pr(m)}catch(y){i=i??[],y instanceof Bn?i=nt(nt([],Me(i)),Me(y.errors)):i.push(y)}}}catch(y){s={error:y}}finally{try{g&&!g.done&&(r=p.return)&&r.call(p)}finally{if(s)throw s.error}}}if(i)throw new Bn(i)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Pr(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ns(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&ns(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}(),Mi=vn.EMPTY;function Ni(n){return n instanceof vn||n&&"closed"in n&&A(n.remove)&&A(n.add)&&A(n.unsubscribe)}function Pr(n){A(n)?n():n.unsubscribe()}var ya={Promise:void 0},$a={setTimeout:function(n,e){for(var t=[],s=2;s<arguments.length;s++)t[s-2]=arguments[s];return setTimeout.apply(void 0,nt([n,e],Me(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Di(n){$a.setTimeout(function(){throw n})}function Jt(){}function Xt(n){n()}var ks=function(n){ot(e,n);function e(t){var s=n.call(this)||this;return s.isStopped=!1,t?(s.destination=t,Ni(t)&&t.add(s)):s.destination=ka,s}return e.create=function(t,s,r){return new ss(t,s,r)},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,n.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}(vn),xa=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(s){Gt(s)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(s){Gt(s)}else Gt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Gt(t)}},n}(),ss=function(n){ot(e,n);function e(t,s,r){var i=n.call(this)||this,o;return A(t)||!t?o={next:t??void 0,error:s??void 0,complete:r??void 0}:o=t,i.destination=new xa(o),i}return e}(ks);function Gt(n){Di(n)}function wa(n){throw n}var ka={closed:!0,next:Jt,error:wa,complete:Jt},_s=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Lt(n){return n}function _a(n){return n.length===0?Lt:n.length===1?n[0]:function(t){return n.reduce(function(s,r){return r(s)},t)}}var Z=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,s){var r=this,i=Aa(e)?e:new ss(e,t,s);return Xt(function(){var o=r,a=o.operator,l=o.source;i.add(a?a.call(i,l):l?r._subscribe(i):r._trySubscribe(i))}),i},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var s=this;return t=Ir(t),new t(function(r,i){var o=new ss({next:function(a){try{e(a)}catch(l){i(l),o.unsubscribe()}},error:i,complete:r});s.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[_s]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _a(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Ir(e),new e(function(s,r){var i;t.subscribe(function(o){return i=o},function(o){return r(o)},function(){return s(i)})})},n.create=function(e){return new n(e)},n}();function Ir(n){var e;return(e=n??ya.Promise)!==null&&e!==void 0?e:Promise}function Sa(n){return n&&A(n.next)&&A(n.error)&&A(n.complete)}function Aa(n){return n&&n instanceof ks||Sa(n)&&Ni(n)}function Ea(n){return A(n==null?void 0:n.lift)}function Se(n){return function(e){if(Ea(e))return e.lift(function(t){try{return n(t,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function ne(n,e,t,s,r){return new Ta(n,e,t,s,r)}var Ta=function(n){ot(e,n);function e(t,s,r,i,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=i?function(c){try{i(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=r?function(){try{r()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(ks),Ca=Ii(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),U=function(n){ot(e,n);function e(){var t=n.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 s=new Mr(this,this);return s.operator=t,s},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ca},e.prototype.next=function(t){var s=this;Xt(function(){var r,i;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=tt(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},e.prototype.error=function(t){var s=this;Xt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=t;for(var r=s.observers;r.length;)r.shift().error(t)}})},e.prototype.complete=function(){var t=this;Xt(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var s=t.observers;s.length;)s.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(),n.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 s=this,r=this,i=r.hasError,o=r.isStopped,a=r.observers;return i||o?Mi:(this.currentObservers=null,a.push(t),new vn(function(){s.currentObservers=null,ns(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var s=this,r=s.hasError,i=s.thrownError,o=s.isStopped;r?t.error(i):o&&t.complete()},e.prototype.asObservable=function(){var t=new Z;return t.source=this,t},e.create=function(t,s){return new Mr(t,s)},e}(Z),Mr=function(n){ot(e,n);function e(t,s){var r=n.call(this)||this;return r.destination=t,r.source=s,r}return e.prototype.next=function(t){var s,r;(r=(s=this.destination)===null||s===void 0?void 0:s.next)===null||r===void 0||r.call(s,t)},e.prototype.error=function(t){var s,r;(r=(s=this.destination)===null||s===void 0?void 0:s.error)===null||r===void 0||r.call(s,t)},e.prototype.complete=function(){var t,s;(s=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||s===void 0||s.call(t)},e.prototype._subscribe=function(t){var s,r;return(r=(s=this.source)===null||s===void 0?void 0:s.subscribe(t))!==null&&r!==void 0?r:Mi},e}(U),te=function(n){ot(e,n);function e(t){var s=n.call(this)||this;return s._value=t,s}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var s=n.prototype._subscribe.call(this,t);return!s.closed&&t.next(this._value),s},e.prototype.getValue=function(){var t=this,s=t.hasError,r=t.thrownError,i=t._value;if(s)throw r;return this._throwIfClosed(),i},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e}(U),Rt=new Z(function(n){return n.complete()});function La(n){return n&&A(n.schedule)}function Ss(n){return n[n.length-1]}function Ui(n){return A(Ss(n))?n.pop():void 0}function As(n){return La(Ss(n))?n.pop():void 0}function Ra(n,e){return typeof Ss(n)=="number"?n.pop():e}var Es=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function zi(n){return A(n==null?void 0:n.then)}function Hi(n){return A(n[_s])}function Bi(n){return Symbol.asyncIterator&&A(n==null?void 0:n[Symbol.asyncIterator])}function Fi(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Oa(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ji=Oa();function Gi(n){return A(n==null?void 0:n[ji])}function Wi(n){return va(this,arguments,function(){var t,s,r,i;return Pi(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Ve(t.read())];case 3:return s=o.sent(),r=s.value,i=s.done,i?[4,Ve(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ve(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function qi(n){return A(n==null?void 0:n.getReader)}function le(n){if(n instanceof Z)return n;if(n!=null){if(Hi(n))return Pa(n);if(Es(n))return Ia(n);if(zi(n))return Ma(n);if(Bi(n))return Zi(n);if(Gi(n))return Na(n);if(qi(n))return Da(n)}throw Fi(n)}function Pa(n){return new Z(function(e){var t=n[_s]();if(A(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ia(n){return new Z(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Ma(n){return new Z(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Di)})}function Na(n){return new Z(function(e){var t,s;try{for(var r=tt(n),i=r.next();!i.done;i=r.next()){var o=i.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(t)throw t.error}}e.complete()})}function Zi(n){return new Z(function(e){Ua(n,e).catch(function(t){return e.error(t)})})}function Da(n){return Zi(Wi(n))}function Ua(n,e){var t,s,r,i;return ma(this,void 0,void 0,function(){var o,a;return Pi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=ba(n),l.label=1;case 1:return[4,t.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),r={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(i=t.return)?[4,i.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function we(n,e,t,s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var i=e.schedule(function(){t(),r?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(i),!r)return i}function Yi(n,e){return e===void 0&&(e=0),Se(function(t,s){t.subscribe(ne(s,function(r){return we(s,n,function(){return s.next(r)},e)},function(){return we(s,n,function(){return s.complete()},e)},function(r){return we(s,n,function(){return s.error(r)},e)}))})}function Xi(n,e){return e===void 0&&(e=0),Se(function(t,s){s.add(n.schedule(function(){return t.subscribe(s)},e))})}function za(n,e){return le(n).pipe(Xi(e),Yi(e))}function Ha(n,e){return le(n).pipe(Xi(e),Yi(e))}function Ba(n,e){return new Z(function(t){var s=0;return e.schedule(function(){s===n.length?t.complete():(t.next(n[s++]),t.closed||this.schedule())})})}function Fa(n,e){return new Z(function(t){var s;return we(t,e,function(){s=n[ji](),we(t,e,function(){var r,i,o;try{r=s.next(),i=r.value,o=r.done}catch(a){t.error(a);return}o?t.complete():t.next(i)},0,!0)}),function(){return A(s==null?void 0:s.return)&&s.return()}})}function Ki(n,e){if(!n)throw new Error("Iterable cannot be null");return new Z(function(t){we(t,e,function(){var s=n[Symbol.asyncIterator]();we(t,e,function(){s.next().then(function(r){r.done?t.complete():t.next(r.value)})},0,!0)})})}function ja(n,e){return Ki(Wi(n),e)}function Ga(n,e){if(n!=null){if(Hi(n))return za(n,e);if(Es(n))return Ba(n,e);if(zi(n))return Ha(n,e);if(Bi(n))return Ki(n,e);if(Gi(n))return Fa(n,e);if(qi(n))return ja(n,e)}throw Fi(n)}function bn(n,e){return e?Ga(n,e):le(n)}function rs(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n);return bn(n,t)}function en(n,e){return Se(function(t,s){var r=0;t.subscribe(ne(s,function(i){s.next(n.call(e,i,r++))}))})}var Wa=Array.isArray;function qa(n,e){return Wa(e)?n.apply(void 0,nt([],Me(e))):n(e)}function Vi(n){return en(function(e){return qa(n,e)})}var Za=Array.isArray,Ya=Object.getPrototypeOf,Xa=Object.prototype,Ka=Object.keys;function Va(n){if(n.length===1){var e=n[0];if(Za(e))return{args:e,keys:null};if(Qa(e)){var t=Ka(e);return{args:t.map(function(s){return e[s]}),keys:t}}}return{args:n,keys:null}}function Qa(n){return n&&typeof n=="object"&&Ya(n)===Xa}function Ja(n,e){return n.reduce(function(t,s,r){return t[s]=e[r],t},{})}function el(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n),s=Ui(n),r=Va(n),i=r.args,o=r.keys;if(i.length===0)return bn([],t);var a=new Z(tl(i,t,o?function(l){return Ja(o,l)}:Lt));return s?a.pipe(Vi(s)):a}function tl(n,e,t){return t===void 0&&(t=Lt),function(s){Nr(e,function(){for(var r=n.length,i=new Array(r),o=r,a=r,l=function(u){Nr(e,function(){var d=bn(n[u],e),p=!1;d.subscribe(ne(s,function(g){i[u]=g,p||(p=!0,a--),a||s.next(t(i.slice()))},function(){--o||s.complete()}))},s)},c=0;c<r;c++)l(c)},s)}}function Nr(n,e,t){n?we(t,n,e):e()}function nl(n,e,t,s,r,i,o,a){var l=[],c=0,u=0,d=!1,p=function(){d&&!l.length&&!c&&e.complete()},g=function(y){return c<s?m(y):l.push(y)},m=function(y){c++;var ce=!1;le(t(y,u++)).subscribe(ne(e,function(Q){e.next(Q)},function(){ce=!0},void 0,function(){if(ce)try{c--;for(var Q=function(){var $e=l.shift();o||m($e)};l.length&&c<s;)Q();p()}catch($e){e.error($e)}}))};return n.subscribe(ne(e,g,function(){d=!0,p()})),function(){}}function Ts(n,e,t){return t===void 0&&(t=1/0),A(e)?Ts(function(s,r){return en(function(i,o){return e(s,i,r,o)})(le(n(s,r)))},t):(typeof e=="number"&&(t=e),Se(function(s,r){return nl(s,r,n,t)}))}function sl(n){return n===void 0&&(n=1/0),Ts(Lt,n)}var rl=["addListener","removeListener"],il=["addEventListener","removeEventListener"],ol=["on","off"];function tn(n,e,t,s){if(A(t)&&(s=t,t=void 0),s)return tn(n,e,t).pipe(Vi(s));var r=Me(cl(n)?il.map(function(a){return function(l){return n[a](e,l,t)}}):al(n)?rl.map(Dr(n,e)):ll(n)?ol.map(Dr(n,e)):[],2),i=r[0],o=r[1];if(!i&&Es(n))return Ts(function(a){return tn(a,e,t)})(le(n));if(!i)throw new TypeError("Invalid event target");return new Z(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return i(l),function(){return o(l)}})}function Dr(n,e){return function(t){return function(s){return n[t](e,s)}}}function al(n){return A(n.addListener)&&A(n.removeListener)}function ll(n){return A(n.on)&&A(n.off)}function cl(n){return A(n.addEventListener)&&A(n.removeEventListener)}function ul(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n),s=Ra(n,1/0),r=n;return r.length?r.length===1?le(r[0]):sl(s)(bn(r,t)):Rt}function is(n){return n<=0?function(){return Rt}:Se(function(e,t){var s=0;e.subscribe(ne(t,function(r){++s<=n&&(t.next(r),n<=s&&t.complete())}))})}function Qe(n,e){return Se(function(t,s){var r=null,i=0,o=!1,a=function(){return o&&!r&&s.complete()};t.subscribe(ne(s,function(l){r==null||r.unsubscribe();var c=0,u=i++;le(n(l,u)).subscribe(r=ne(s,function(d){return s.next(e?e(l,d,u,c++):d)},function(){r=null,a()}))},function(){o=!0,a()}))})}function os(n){return Se(function(e,t){le(n).subscribe(ne(t,function(){return t.complete()},Jt)),!t.closed&&e.subscribe(t)})}function as(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Ui(n);return Se(function(s,r){for(var i=n.length,o=new Array(i),a=n.map(function(){return!1}),l=!1,c=function(d){le(n[d]).subscribe(ne(r,function(p){o[d]=p,!l&&!a[d]&&(a[d]=!0,(l=a.every(Lt))&&(a=null))},Jt))},u=0;u<i;u++)c(u);s.subscribe(ne(r,function(d){if(l){var p=nt([d],Me(o));r.next(t?t.apply(void 0,nt([],Me(p))):p)}}))})}var ve=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(ve||{});const hl=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),Qi=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():hl();function pl(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,s=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,r=n.match(t)||[],i=[];let o;for(;(o=s.exec(n))!==null;)i.push(o[1]);return r.filter(l=>!i.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function Ji(n){if(n.includes("aceChatGuideTitle"))return dl(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const s=eo(t);if(!s)return t;const r=50;if(s.length>r){const i=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=s.match(i);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),d=r-a.length;let p=c;u&&u.length<d&&c.length>d?p=c.substring(0,d-u.length-4)+".../"+u:p=c.substring(0,d-3)+"...";const g=`${a}${p}`;return ls(t,g)}return ls(t,s)})}function eo(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function ls(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function dl(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const s=eo(t);if(!s)return t;const r=s.split("?").pop(),o=new URLSearchParams(r).get("aceChatGuideTitle");return o?ls(t,o):t})}class Ot{constructor(e,t,s){this.type=e,this.sender=t,this.messages=s,this.status="delivered",this.didUpdate=new U,this.actions$=new U,this.remove$=new U,this.timestamp=Date.now(),this.id=Qi()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class to{constructor(e){this.name=e,this.print$=new U}print(e,t="html",s=this.name){const r=new Ot(ve.Agent,{name:s},[{items:[[t,{content:e}]]}]);return this.print$.next(r),r}subscribe(){return this.print$.asObservable()}}class no{constructor(e){this.name=e,this.print$=new U}print(e){const t=new Ot(ve.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class fl{constructor(){this.print$=new U,this.name="system"}print(e){const t=new Ot(ve.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class gl{constructor(e,t){this.name=e,this.component=t,this.print$=new U,this.typingState$=new te(!1),this.complete$=new U,this.system=this.createSystem(),this.rehydrate$=new U,this.saveToCurrentSession$=new U,this.showChatOverlay$=new te(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(is(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(ve.User,e.text)}print(e,t){const s=new Ot(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(s)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new to(e);return t.subscribe().subscribe(s=>{this.playNotification(),this.printEntry(s)}),t}createUser(e){const t=new no(e);return t.subscribe().subscribe(s=>{this.printEntry(s)}),t}createSystem(){const e=new fl;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(r=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
3
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function ns(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var vn=(function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,s,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=tt(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(y){e={error:y}}finally{try{l&&!l.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(A(u))try{u()}catch(y){i=y instanceof Bn?y.errors:[y]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=tt(d),g=p.next();!g.done;g=p.next()){var m=g.value;try{Pr(m)}catch(y){i=i??[],y instanceof Bn?i=nt(nt([],Me(i)),Me(y.errors)):i.push(y)}}}catch(y){s={error:y}}finally{try{g&&!g.done&&(r=p.return)&&r.call(p)}finally{if(s)throw s.error}}}if(i)throw new Bn(i)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Pr(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ns(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&ns(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=(function(){var e=new n;return e.closed=!0,e})(),n})(),Mi=vn.EMPTY;function Ni(n){return n instanceof vn||n&&"closed"in n&&A(n.remove)&&A(n.add)&&A(n.unsubscribe)}function Pr(n){A(n)?n():n.unsubscribe()}var ya={Promise:void 0},$a={setTimeout:function(n,e){for(var t=[],s=2;s<arguments.length;s++)t[s-2]=arguments[s];return setTimeout.apply(void 0,nt([n,e],Me(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Di(n){$a.setTimeout(function(){throw n})}function Jt(){}function Xt(n){n()}var ks=(function(n){ot(e,n);function e(t){var s=n.call(this)||this;return s.isStopped=!1,t?(s.destination=t,Ni(t)&&t.add(s)):s.destination=ka,s}return e.create=function(t,s,r){return new ss(t,s,r)},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,n.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})(vn),xa=(function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(s){Gt(s)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(s){Gt(s)}else Gt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){Gt(t)}},n})(),ss=(function(n){ot(e,n);function e(t,s,r){var i=n.call(this)||this,o;return A(t)||!t?o={next:t??void 0,error:s??void 0,complete:r??void 0}:o=t,i.destination=new xa(o),i}return e})(ks);function Gt(n){Di(n)}function wa(n){throw n}var ka={closed:!0,next:Jt,error:wa,complete:Jt},_s=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Lt(n){return n}function _a(n){return n.length===0?Lt:n.length===1?n[0]:function(t){return n.reduce(function(s,r){return r(s)},t)}}var Z=(function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,s){var r=this,i=Aa(e)?e:new ss(e,t,s);return Xt(function(){var o=r,a=o.operator,l=o.source;i.add(a?a.call(i,l):l?r._subscribe(i):r._trySubscribe(i))}),i},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var s=this;return t=Ir(t),new t(function(r,i){var o=new ss({next:function(a){try{e(a)}catch(l){i(l),o.unsubscribe()}},error:i,complete:r});s.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[_s]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _a(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=Ir(e),new e(function(s,r){var i;t.subscribe(function(o){return i=o},function(o){return r(o)},function(){return s(i)})})},n.create=function(e){return new n(e)},n})();function Ir(n){var e;return(e=n??ya.Promise)!==null&&e!==void 0?e:Promise}function Sa(n){return n&&A(n.next)&&A(n.error)&&A(n.complete)}function Aa(n){return n&&n instanceof ks||Sa(n)&&Ni(n)}function Ea(n){return A(n==null?void 0:n.lift)}function Se(n){return function(e){if(Ea(e))return e.lift(function(t){try{return n(t,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function ne(n,e,t,s,r){return new Ta(n,e,t,s,r)}var Ta=(function(n){ot(e,n);function e(t,s,r,i,o,a){var l=n.call(this,t)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=s?function(c){try{s(c)}catch(u){t.error(u)}}:n.prototype._next,l._error=i?function(c){try{i(c)}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._error,l._complete=r?function(){try{r()}catch(c){t.error(c)}finally{this.unsubscribe()}}:n.prototype._complete,l}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;n.prototype.unsubscribe.call(this),!s&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e})(ks),Ca=Ii(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),U=(function(n){ot(e,n);function e(){var t=n.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 s=new Mr(this,this);return s.operator=t,s},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ca},e.prototype.next=function(t){var s=this;Xt(function(){var r,i;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var o=tt(s.currentObservers),a=o.next();!a.done;a=o.next()){var l=a.value;l.next(t)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},e.prototype.error=function(t){var s=this;Xt(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=t;for(var r=s.observers;r.length;)r.shift().error(t)}})},e.prototype.complete=function(){var t=this;Xt(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var s=t.observers;s.length;)s.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(),n.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 s=this,r=this,i=r.hasError,o=r.isStopped,a=r.observers;return i||o?Mi:(this.currentObservers=null,a.push(t),new vn(function(){s.currentObservers=null,ns(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var s=this,r=s.hasError,i=s.thrownError,o=s.isStopped;r?t.error(i):o&&t.complete()},e.prototype.asObservable=function(){var t=new Z;return t.source=this,t},e.create=function(t,s){return new Mr(t,s)},e})(Z),Mr=(function(n){ot(e,n);function e(t,s){var r=n.call(this)||this;return r.destination=t,r.source=s,r}return e.prototype.next=function(t){var s,r;(r=(s=this.destination)===null||s===void 0?void 0:s.next)===null||r===void 0||r.call(s,t)},e.prototype.error=function(t){var s,r;(r=(s=this.destination)===null||s===void 0?void 0:s.error)===null||r===void 0||r.call(s,t)},e.prototype.complete=function(){var t,s;(s=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||s===void 0||s.call(t)},e.prototype._subscribe=function(t){var s,r;return(r=(s=this.source)===null||s===void 0?void 0:s.subscribe(t))!==null&&r!==void 0?r:Mi},e})(U),te=(function(n){ot(e,n);function e(t){var s=n.call(this)||this;return s._value=t,s}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var s=n.prototype._subscribe.call(this,t);return!s.closed&&t.next(this._value),s},e.prototype.getValue=function(){var t=this,s=t.hasError,r=t.thrownError,i=t._value;if(s)throw r;return this._throwIfClosed(),i},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e})(U),Rt=new Z(function(n){return n.complete()});function La(n){return n&&A(n.schedule)}function Ss(n){return n[n.length-1]}function Ui(n){return A(Ss(n))?n.pop():void 0}function As(n){return La(Ss(n))?n.pop():void 0}function Ra(n,e){return typeof Ss(n)=="number"?n.pop():e}var Es=(function(n){return n&&typeof n.length=="number"&&typeof n!="function"});function zi(n){return A(n==null?void 0:n.then)}function Hi(n){return A(n[_s])}function Bi(n){return Symbol.asyncIterator&&A(n==null?void 0:n[Symbol.asyncIterator])}function Fi(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Oa(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ji=Oa();function Gi(n){return A(n==null?void 0:n[ji])}function Wi(n){return va(this,arguments,function(){var t,s,r,i;return Pi(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Ve(t.read())];case 3:return s=o.sent(),r=s.value,i=s.done,i?[4,Ve(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Ve(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function qi(n){return A(n==null?void 0:n.getReader)}function le(n){if(n instanceof Z)return n;if(n!=null){if(Hi(n))return Pa(n);if(Es(n))return Ia(n);if(zi(n))return Ma(n);if(Bi(n))return Zi(n);if(Gi(n))return Na(n);if(qi(n))return Da(n)}throw Fi(n)}function Pa(n){return new Z(function(e){var t=n[_s]();if(A(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ia(n){return new Z(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function Ma(n){return new Z(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Di)})}function Na(n){return new Z(function(e){var t,s;try{for(var r=tt(n),i=r.next();!i.done;i=r.next()){var o=i.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(t)throw t.error}}e.complete()})}function Zi(n){return new Z(function(e){Ua(n,e).catch(function(t){return e.error(t)})})}function Da(n){return Zi(Wi(n))}function Ua(n,e){var t,s,r,i;return ma(this,void 0,void 0,function(){var o,a;return Pi(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),t=ba(n),l.label=1;case 1:return[4,t.next()];case 2:if(s=l.sent(),!!s.done)return[3,4];if(o=s.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),r={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),s&&!s.done&&(i=t.return)?[4,i.call(t)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function we(n,e,t,s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var i=e.schedule(function(){t(),r?n.add(this.schedule(null,s)):this.unsubscribe()},s);if(n.add(i),!r)return i}function Yi(n,e){return e===void 0&&(e=0),Se(function(t,s){t.subscribe(ne(s,function(r){return we(s,n,function(){return s.next(r)},e)},function(){return we(s,n,function(){return s.complete()},e)},function(r){return we(s,n,function(){return s.error(r)},e)}))})}function Xi(n,e){return e===void 0&&(e=0),Se(function(t,s){s.add(n.schedule(function(){return t.subscribe(s)},e))})}function za(n,e){return le(n).pipe(Xi(e),Yi(e))}function Ha(n,e){return le(n).pipe(Xi(e),Yi(e))}function Ba(n,e){return new Z(function(t){var s=0;return e.schedule(function(){s===n.length?t.complete():(t.next(n[s++]),t.closed||this.schedule())})})}function Fa(n,e){return new Z(function(t){var s;return we(t,e,function(){s=n[ji](),we(t,e,function(){var r,i,o;try{r=s.next(),i=r.value,o=r.done}catch(a){t.error(a);return}o?t.complete():t.next(i)},0,!0)}),function(){return A(s==null?void 0:s.return)&&s.return()}})}function Ki(n,e){if(!n)throw new Error("Iterable cannot be null");return new Z(function(t){we(t,e,function(){var s=n[Symbol.asyncIterator]();we(t,e,function(){s.next().then(function(r){r.done?t.complete():t.next(r.value)})},0,!0)})})}function ja(n,e){return Ki(Wi(n),e)}function Ga(n,e){if(n!=null){if(Hi(n))return za(n,e);if(Es(n))return Ba(n,e);if(zi(n))return Ha(n,e);if(Bi(n))return Ki(n,e);if(Gi(n))return Fa(n,e);if(qi(n))return ja(n,e)}throw Fi(n)}function bn(n,e){return e?Ga(n,e):le(n)}function rs(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n);return bn(n,t)}function en(n,e){return Se(function(t,s){var r=0;t.subscribe(ne(s,function(i){s.next(n.call(e,i,r++))}))})}var Wa=Array.isArray;function qa(n,e){return Wa(e)?n.apply(void 0,nt([],Me(e))):n(e)}function Vi(n){return en(function(e){return qa(n,e)})}var Za=Array.isArray,Ya=Object.getPrototypeOf,Xa=Object.prototype,Ka=Object.keys;function Va(n){if(n.length===1){var e=n[0];if(Za(e))return{args:e,keys:null};if(Qa(e)){var t=Ka(e);return{args:t.map(function(s){return e[s]}),keys:t}}}return{args:n,keys:null}}function Qa(n){return n&&typeof n=="object"&&Ya(n)===Xa}function Ja(n,e){return n.reduce(function(t,s,r){return t[s]=e[r],t},{})}function el(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n),s=Ui(n),r=Va(n),i=r.args,o=r.keys;if(i.length===0)return bn([],t);var a=new Z(tl(i,t,o?function(l){return Ja(o,l)}:Lt));return s?a.pipe(Vi(s)):a}function tl(n,e,t){return t===void 0&&(t=Lt),function(s){Nr(e,function(){for(var r=n.length,i=new Array(r),o=r,a=r,l=function(u){Nr(e,function(){var d=bn(n[u],e),p=!1;d.subscribe(ne(s,function(g){i[u]=g,p||(p=!0,a--),a||s.next(t(i.slice()))},function(){--o||s.complete()}))},s)},c=0;c<r;c++)l(c)},s)}}function Nr(n,e,t){n?we(t,n,e):e()}function nl(n,e,t,s,r,i,o,a){var l=[],c=0,u=0,d=!1,p=function(){d&&!l.length&&!c&&e.complete()},g=function(y){return c<s?m(y):l.push(y)},m=function(y){c++;var ce=!1;le(t(y,u++)).subscribe(ne(e,function(Q){e.next(Q)},function(){ce=!0},void 0,function(){if(ce)try{c--;for(var Q=function(){var $e=l.shift();o||m($e)};l.length&&c<s;)Q();p()}catch($e){e.error($e)}}))};return n.subscribe(ne(e,g,function(){d=!0,p()})),function(){}}function Ts(n,e,t){return t===void 0&&(t=1/0),A(e)?Ts(function(s,r){return en(function(i,o){return e(s,i,r,o)})(le(n(s,r)))},t):(typeof e=="number"&&(t=e),Se(function(s,r){return nl(s,r,n,t)}))}function sl(n){return n===void 0&&(n=1/0),Ts(Lt,n)}var rl=["addListener","removeListener"],il=["addEventListener","removeEventListener"],ol=["on","off"];function tn(n,e,t,s){if(A(t)&&(s=t,t=void 0),s)return tn(n,e,t).pipe(Vi(s));var r=Me(cl(n)?il.map(function(a){return function(l){return n[a](e,l,t)}}):al(n)?rl.map(Dr(n,e)):ll(n)?ol.map(Dr(n,e)):[],2),i=r[0],o=r[1];if(!i&&Es(n))return Ts(function(a){return tn(a,e,t)})(le(n));if(!i)throw new TypeError("Invalid event target");return new Z(function(a){var l=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return a.next(1<c.length?c:c[0])};return i(l),function(){return o(l)}})}function Dr(n,e){return function(t){return function(s){return n[t](e,s)}}}function al(n){return A(n.addListener)&&A(n.removeListener)}function ll(n){return A(n.on)&&A(n.off)}function cl(n){return A(n.addEventListener)&&A(n.removeEventListener)}function ul(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=As(n),s=Ra(n,1/0),r=n;return r.length?r.length===1?le(r[0]):sl(s)(bn(r,t)):Rt}function is(n){return n<=0?function(){return Rt}:Se(function(e,t){var s=0;e.subscribe(ne(t,function(r){++s<=n&&(t.next(r),n<=s&&t.complete())}))})}function Qe(n,e){return Se(function(t,s){var r=null,i=0,o=!1,a=function(){return o&&!r&&s.complete()};t.subscribe(ne(s,function(l){r==null||r.unsubscribe();var c=0,u=i++;le(n(l,u)).subscribe(r=ne(s,function(d){return s.next(e?e(l,d,u,c++):d)},function(){r=null,a()}))},function(){o=!0,a()}))})}function os(n){return Se(function(e,t){le(n).subscribe(ne(t,function(){return t.complete()},Jt)),!t.closed&&e.subscribe(t)})}function as(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Ui(n);return Se(function(s,r){for(var i=n.length,o=new Array(i),a=n.map(function(){return!1}),l=!1,c=function(d){le(n[d]).subscribe(ne(r,function(p){o[d]=p,!l&&!a[d]&&(a[d]=!0,(l=a.every(Lt))&&(a=null))},Jt))},u=0;u<i;u++)c(u);s.subscribe(ne(r,function(d){if(l){var p=nt([d],Me(o));r.next(t?t.apply(void 0,nt([],Me(p))):p)}}))})}var ve=(n=>(n.User="user",n.Agent="agent",n.System="system",n))(ve||{});const hl=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+n/4).toString(16)),Qi=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():hl();function pl(n){let e=n;const t=/https?:\/\/[^\s<]+/gi,s=/<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g,r=n.match(t)||[],i=[];let o;for(;(o=s.exec(n))!==null;)i.push(o[1]);return r.filter(l=>!i.includes(l)).forEach(l=>{const c=l.endsWith(".")?l.slice(0,-1):l,u=new RegExp(`(?<!<a[^>]*>)${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![^<]*</a>)`,"gi");e=e.replace(u,`<a title='${c}' target='_blank' href='${c}'>${c}</a>`)}),e}function Ji(n){if(n.includes("aceChatGuideTitle"))return dl(n);const e=/<a [^>]*>https?:\/\/[^<]*<\/a>/gim;return n.replace(e,t=>{const s=eo(t);if(!s)return t;const r=50;if(s.length>r){const i=/^(https?:\/\/[^/]+)(\/.*)?$/i,o=s.match(i);if(!o)return t;const a=o[1],c=(o[2]||"/").split("?")[0],u=c.split("/").pop(),d=r-a.length;let p=c;u&&u.length<d&&c.length>d?p=c.substring(0,d-u.length-4)+".../"+u:p=c.substring(0,d-3)+"...";const g=`${a}${p}`;return ls(t,g)}return ls(t,s)})}function eo(n){const e=n.match(/href=["']([^'"]*)["']/);if(e&&e.length>1){let t=e[1];return t.endsWith(".")&&(t=t.slice(0,-1)),t}return null}function ls(n,e){return n.replace(/>[^<]*<\/a>/,`>${e}</a>`)}function dl(n){const e=/<a [^>]*aceChatGuideTitle[^>]*>[^<]*<\/a>/gm;return n.replace(e,t=>{const s=eo(t);if(!s)return t;const r=s.split("?").pop(),o=new URLSearchParams(r).get("aceChatGuideTitle");return o?ls(t,o):t})}class Ot{constructor(e,t,s){this.type=e,this.sender=t,this.messages=s,this.status="delivered",this.didUpdate=new U,this.actions$=new U,this.remove$=new U,this.timestamp=Date.now(),this.id=Qi()}update(e){this.messages=[{items:e}],this.didUpdate.next(this)}setStatus(e){this.status=e,this.didUpdate.next(this)}remove(){this.remove$.next()}}class to{constructor(e){this.name=e,this.print$=new U}print(e,t="html",s=this.name){const r=new Ot(ve.Agent,{name:s},[{items:[[t,{content:e}]]}]);return this.print$.next(r),r}subscribe(){return this.print$.asObservable()}}class no{constructor(e){this.name=e,this.print$=new U}print(e){const t=new Ot(ve.User,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class fl{constructor(){this.print$=new U,this.name="system"}print(e){const t=new Ot(ve.System,{name:this.name},[{items:[["html",{content:e}]]}]);return this.print$.next(t),t}subscribe(){return this.print$.asObservable()}}class gl{constructor(e,t){this.name=e,this.component=t,this.print$=new U,this.typingState$=new te(!1),this.complete$=new U,this.system=this.createSystem(),this.rehydrate$=new U,this.saveToCurrentSession$=new U,this.showChatOverlay$=new te(!1),this.onComplete=()=>this.complete$.asObservable()}connect(e={}){this.complete$.pipe(is(1)).subscribe(()=>{this.disconnected()})}disconnected(){}onUserSubmit(e){this.print(ve.User,e.text)}print(e,t){const s=new Ot(e,{name:""},[{items:[["html",{content:t}]]}]);return this.printEntry(s)}printEntry(e){return this.print$.next(e),e}createAgent(e){const t=new to(e);return t.subscribe().subscribe(s=>{this.playNotification(),this.printEntry(s)}),t}createUser(e){const t=new no(e);return t.subscribe().subscribe(s=>{this.printEntry(s)}),t}createSystem(){const e=new fl;return e.subscribe().subscribe(t=>{this.printEntry(t)}),e}setTypingState(e){this.typingState$.next(e)}setToastMessage(e){this.component.setToastMessage(e)}isTyping(){return this.typingState$.asObservable()}actions(){return this.print$.asObservable()}playNotification(){const e=!document.hidden&&this.component.application.storage.get("open"),t="https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";!this.component.application.storage.get("muteAudioNotifications")&&!e&&new Audio(t).play().catch(r=>{})}complete(){this.complete$.next()}save(e){this.saveToCurrentSession$.next(e)}async rehydrate(e){}}/**
4
4
  * @license
5
5
  * Copyright 2019 Google LLC
6
6
  * SPDX-License-Identifier: BSD-3-Clause
7
- */const Kt=globalThis,Cs=Kt.ShadowRoot&&(Kt.ShadyCSS===void 0||Kt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ls=Symbol(),Ur=new WeakMap;let so=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Cs&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ur.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ur.set(t,e))}return e}toString(){return this.cssText}};const ml=n=>new so(typeof n=="string"?n:n+"",void 0,Ls),X=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,r,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[i+1],n[0]);return new so(t,n,Ls)},vl=(n,e)=>{if(Cs)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),r=Kt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,n.appendChild(s)}},zr=Cs?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ml(t)})(n):n;/**
7
+ */const Kt=globalThis,Cs=Kt.ShadowRoot&&(Kt.ShadyCSS===void 0||Kt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ls=Symbol(),Ur=new WeakMap;let so=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Ls)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Cs&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ur.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ur.set(t,e))}return e}toString(){return this.cssText}};const ml=n=>new so(typeof n=="string"?n:n+"",void 0,Ls),X=(n,...e)=>{const t=n.length===1?n[0]:e.reduce(((s,r,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[i+1]),n[0]);return new so(t,n,Ls)},vl=(n,e)=>{if(Cs)n.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),r=Kt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,n.appendChild(s)}},zr=Cs?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ml(t)})(n):n;/**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const{is:bl,defineProperty:yl,getOwnPropertyDescriptor:$l,getOwnPropertyNames:xl,getOwnPropertySymbols:wl,getPrototypeOf:kl}=Object,ke=globalThis,Hr=ke.trustedTypes,_l=Hr?Hr.emptyScript:"",Fn=ke.reactiveElementPolyfillSupport,yt=(n,e)=>n,nn={toAttribute(n,e){switch(e){case Boolean:n=n?_l:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Rs=(n,e)=>!bl(n,e),Br={attribute:!0,type:String,converter:nn,reflect:!1,useDefault:!1,hasChanged:Rs};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ke.litPropertyMetadata??(ke.litPropertyMetadata=new WeakMap);let Ze=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Br){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&yl(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:i}=$l(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:r,set(o){const a=r==null?void 0:r.call(this);i==null||i.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Br}static _$Ei(){if(this.hasOwnProperty(yt("elementProperties")))return;const e=kl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(yt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(yt("properties"))){const t=this.properties,s=[...xl(t),...wl(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(zr(r))}else e!==void 0&&t.push(zr(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vl(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var i;const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)==null?void 0:i.toAttribute)!==void 0?s.converter:nn).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){var i,o;const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=s.getPropertyOptions(r),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)==null?void 0:i.fromAttribute)!==void 0?a.converter:nn;this._$Em=r;const c=l.fromAttribute(t,a.type);this[r]=c??((o=this._$Ej)==null?void 0:o.get(r))??c,this._$Em=null}}requestUpdate(e,t,s){var r;if(e!==void 0){const i=this.constructor,o=this[e];if(s??(s=i.getPropertyOptions(e)),!((s.hasChanged??Rs)(o,t)||s.useDefault&&s.reflect&&o===((r=this._$Ej)==null?void 0:r.get(e))&&!this.hasAttribute(i._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,o]of r){const{wrapped:a}=o,l=this[i];a!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach(r=>{var i;return(i=r.hostUpdate)==null?void 0:i.call(r)}),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ze.elementStyles=[],Ze.shadowRootOptions={mode:"open"},Ze[yt("elementProperties")]=new Map,Ze[yt("finalized")]=new Map,Fn==null||Fn({ReactiveElement:Ze}),(ke.reactiveElementVersions??(ke.reactiveElementVersions=[])).push("2.1.1");/**
11
+ */const{is:bl,defineProperty:yl,getOwnPropertyDescriptor:$l,getOwnPropertyNames:xl,getOwnPropertySymbols:wl,getPrototypeOf:kl}=Object,ke=globalThis,Hr=ke.trustedTypes,_l=Hr?Hr.emptyScript:"",Fn=ke.reactiveElementPolyfillSupport,yt=(n,e)=>n,nn={toAttribute(n,e){switch(e){case Boolean:n=n?_l:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Rs=(n,e)=>!bl(n,e),Br={attribute:!0,type:String,converter:nn,reflect:!1,useDefault:!1,hasChanged:Rs};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ke.litPropertyMetadata??(ke.litPropertyMetadata=new WeakMap);let Ze=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Br){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&yl(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:i}=$l(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:r,set(o){const a=r==null?void 0:r.call(this);i==null||i.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Br}static _$Ei(){if(this.hasOwnProperty(yt("elementProperties")))return;const e=kl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(yt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(yt("properties"))){const t=this.properties,s=[...xl(t),...wl(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(zr(r))}else e!==void 0&&t.push(zr(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vl(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)}))}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var i;const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)==null?void 0:i.toAttribute)!==void 0?s.converter:nn).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){var i,o;const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=s.getPropertyOptions(r),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)==null?void 0:i.fromAttribute)!==void 0?a.converter:nn;this._$Em=r;const c=l.fromAttribute(t,a.type);this[r]=c??((o=this._$Ej)==null?void 0:o.get(r))??c,this._$Em=null}}requestUpdate(e,t,s){var r;if(e!==void 0){const i=this.constructor,o=this[e];if(s??(s=i.getPropertyOptions(e)),!((s.hasChanged??Rs)(o,t)||s.useDefault&&s.reflect&&o===((r=this._$Ej)==null?void 0:r.get(e))&&!this.hasAttribute(i._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,o]of r){const{wrapped:a}=o,l=this[i];a!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,o,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach((r=>{var i;return(i=r.hostUpdate)==null?void 0:i.call(r)})),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}};Ze.elementStyles=[],Ze.shadowRootOptions={mode:"open"},Ze[yt("elementProperties")]=new Map,Ze[yt("finalized")]=new Map,Fn==null||Fn({ReactiveElement:Ze}),(ke.reactiveElementVersions??(ke.reactiveElementVersions=[])).push("2.1.1");/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
@@ -46,7 +46,7 @@
46
46
  * @license
47
47
  * Copyright 2018 Google LLC
48
48
  * SPDX-License-Identifier: BSD-3-Clause
49
- */const rt=_n(class extends Ds{constructor(n){var e;if(super(n),n.type!==kn.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){var s,r;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in e)e[i]&&!((s=this.nt)!=null&&s.has(i))&&this.st.add(i);return this.render(e)}const t=n.element.classList;for(const i of this.st)i in e||(t.remove(i),this.st.delete(i));for(const i in e){const o=!!e[i];o===this.st.has(i)||(r=this.nt)!=null&&r.has(i)||(o?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return _e}});var Zc=Object.defineProperty,Yc=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&Zc(e,t,r),r};const Xs=class Xs extends M{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),x}};Xs.styles=[X`
49
+ */const rt=_n(class extends Ds{constructor(n){var e;if(super(n),n.type!==kn.ATTRIBUTE||n.name!=="class"||((e=n.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter((e=>n[e])).join(" ")+" "}update(n,[e]){var s,r;if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in e)e[i]&&!((s=this.nt)!=null&&s.has(i))&&this.st.add(i);return this.render(e)}const t=n.element.classList;for(const i of this.st)i in e||(t.remove(i),this.st.delete(i));for(const i in e){const o=!!e[i];o===this.st.has(i)||(r=this.nt)!=null&&r.has(i)||(o?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return _e}});var Zc=Object.defineProperty,Yc=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&Zc(e,t,r),r};const Xs=class Xs extends M{constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(e){var t;return(t=this.shadowRoot)==null||t.appendChild(e),e}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),x}};Xs.styles=[X`
50
50
  :host {
51
51
  position: fixed;
52
52
  display: flex;
@@ -62,7 +62,7 @@
62
62
  bottom: 20px;
63
63
  left: 20px;
64
64
  }
65
- `];let un=Xs;Yc([C({attribute:!0})],un.prototype,"anchor");const Xc=new WeakMap;let li=0;const Zn=new Map,ci=new WeakSet,ui=()=>new Promise(n=>requestAnimationFrame(n)),Kc=[{transform:"translateX(100%) scale(0)",opacity:0}],Vc=[{opacity:0}],hi=[{opacity:0},{opacity:1}],pi=(n,e)=>{const t=n-e;return t===0?void 0:t},di=(n,e)=>{const t=n/e;return t===1?void 0:t},Yn={left:(n,e)=>{const t=pi(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=pi(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const s=di(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const s=di(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},Qc={duration:333,easing:"ease-in-out"},Jc=["left","top","width","height","opacity","color","background"],fi=new WeakMap;class eu extends To{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===kn.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise(t=>{this.l=t})}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return x}getController(){return Xc.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var r;const s=this.u===void 0;return s&&(this.u=(r=e.options)==null?void 0:r.host,this.u.addController(this),this.u.updateComplete.then(i=>this.t=!0),this.element=e.element,fi.set(this.element,this)),this.optionsOrCallback=t,(s||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=Jc),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach(r=>{const i=t[r]??(Yn[r]?void 0:s[r]),o=Number(i);e[r]=isNaN(o)?i+"":o}),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((s,r)=>{if(Array.isArray(s)){if(Array.isArray(r)&&r.length===s.length&&s.every((i,o)=>i===r[o]))return!1}else if(r===s)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ui;const t=this.O(),s=this.j(this.options.keyframeOptions,t),r=this.m();if(this.A!==void 0){const{from:i,to:o}=this.N(this.A,r,t);this.log("measured",[this.A,r,i,o]),e=this.calculateKeyframes(i,o)}else{const i=Zn.get(this.options.inId);if(i){Zn.delete(this.options.inId);const{from:o,to:a}=this.N(i,r,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,li++,e.forEach(l=>l.zIndex=li)}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Zn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ui(),(t=this.i)==null?void 0:t.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,o=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&o===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,s;e&&((s=(t=this.options).onComplete)==null||s.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const s=fi.get(t);s&&!s.isDisabled()&&s&&e.push(s)}return e}get isHostRendered(){const e=ci.has(this.u);return e||this.u.updateComplete.then(()=>{ci.add(this.u)}),e}j(e,t=this.O()){const s={...Qc};return t.forEach(r=>Object.assign(s,r.options.keyframeOptions)),Object.assign(s,e),s}N(e,t,s){e={...e},t={...t};const r=s.map(a=>a.animatingProperties).filter(a=>a!==void 0);let i=1,o=1;return r.length>0&&(r.forEach(a=>{a.width&&(i/=a.width),a.height&&(o/=a.height)}),e.left!==void 0&&t.left!==void 0&&(e.left=i*e.left,t.left=i*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,s=!1){const r={},i={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Yn){const d=Yn[l];if(c===void 0||u===void 0)continue;const p=d(c,u);p.transform!==void 0&&(a[l]=p.value,o=!0,r.transform=`${r.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(r,p.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,r[l]=c,i[l]=u)}return r.transformOrigin=i.transformOrigin=s?"center center":"top left",this.animatingProperties=a,o?[r,i]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),s=!0,this.webAnimation=this.element.animate(e,t);const r=this.getController();r==null||r.add(this);try{await this.webAnimation.finished}catch{}r==null||r.remove(this)}return this.didFinish(s),s}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const ds=_n(eu),de=(n,e,t)=>{n&&t.style.setProperty(e,n)},Co=(n,e)=>{var t,s,r,i,o,a,l,c,u;de((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),de((s=n.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",e),de((r=n.colors)==null?void 0:r.secondaryBackground,"--secondary-background",e),de((i=n.colors)==null?void 0:i.textOnSecondaryBackground,"--text-on-secondary-background",e),de((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),de((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),de((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),de((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),de((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var tu=Object.defineProperty,Mt=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&tu(e,t,r),r};const Ks=class Ks extends M{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ie(),this.widgetActive$=new te(!1),this.componentIsDestroyed$=new U}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Co(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return w` <img src=${t} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return x;const r=async u=>Hl,{type:i,content:o}=s;switch(i){case"Telia":{const u=await r();return u?w`<telia-icon
65
+ `];let un=Xs;Yc([C({attribute:!0})],un.prototype,"anchor");const Xc=new WeakMap;let li=0;const Zn=new Map,ci=new WeakSet,ui=()=>new Promise((n=>requestAnimationFrame(n))),Kc=[{transform:"translateX(100%) scale(0)",opacity:0}],Vc=[{opacity:0}],hi=[{opacity:0},{opacity:1}],pi=(n,e)=>{const t=n-e;return t===0?void 0:t},di=(n,e)=>{const t=n/e;return t===1?void 0:t},Yn={left:(n,e)=>{const t=pi(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(n,e)=>{const t=pi(n,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(n,e)=>{let t;e===0&&(e=1,t={width:"1px"});const s=di(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(n,e)=>{let t;e===0&&(e=1,t={height:"1px"});const s=di(n,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},Qc={duration:333,easing:"ease-in-out"},Jc=["left","top","width","height","opacity","color","background"],fi=new WeakMap;class eu extends To{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===kn.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var e;(e=this.resolveFinished)==null||e.call(this),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){var e;(e=this.l)==null||e.call(this),this.l=void 0}render(e){return x}getController(){return Xc.get(this.u)}isDisabled(){var e;return this.options.disabled||((e=this.getController())==null?void 0:e.disabled)}update(e,[t]){var r;const s=this.u===void 0;return s&&(this.u=(r=e.options)==null?void 0:r.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,fi.set(this.element,this)),this.optionsOrCallback=t,(s||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??(e.properties=Jc),this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((r=>{const i=t[r]??(Yn[r]?void 0:s[r]),o=Number(i);e[r]=isNaN(o)?i+"":o})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((s,r)=>{if(Array.isArray(s)){if(Array.isArray(r)&&r.length===s.length&&s.every(((i,o)=>i===r[o])))return!1}else if(r===s)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ui;const t=this.O(),s=this.j(this.options.keyframeOptions,t),r=this.m();if(this.A!==void 0){const{from:i,to:o}=this.N(this.A,r,t);this.log("measured",[this.A,r,i,o]),e=this.calculateKeyframes(i,o)}else{const i=Zn.get(this.options.inId);if(i){Zn.delete(this.options.inId);const{from:o,to:a}=this.N(i,r,t);e=this.calculateKeyframes(o,a),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,li++,e.forEach((l=>l.zIndex=li))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var e,t;this.P=this.element.getAttribute("style"),(e=this.webAnimation)==null||e.commitStyles(),(t=this.webAnimation)==null||t.cancel()}reconnected(){}async disconnected(){var t;if(!this.h||(this.options.id!==void 0&&Zn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ui(),(t=this.i)==null?void 0:t.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,o=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&o===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),o!==0&&(this.element.style.top=o+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var e,t;(t=(e=this.options).onStart)==null||t.call(e,this)}didFinish(e){var t,s;e&&((s=(t=this.options).onComplete)==null||s.call(t,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let t=this.element.parentNode;t;t=t==null?void 0:t.parentNode){const s=fi.get(t);s&&!s.isDisabled()&&s&&e.push(s)}return e}get isHostRendered(){const e=ci.has(this.u);return e||this.u.updateComplete.then((()=>{ci.add(this.u)})),e}j(e,t=this.O()){const s={...Qc};return t.forEach((r=>Object.assign(s,r.options.keyframeOptions))),Object.assign(s,e),s}N(e,t,s){e={...e},t={...t};const r=s.map((a=>a.animatingProperties)).filter((a=>a!==void 0));let i=1,o=1;return r.length>0&&(r.forEach((a=>{a.width&&(i/=a.width),a.height&&(o/=a.height)})),e.left!==void 0&&t.left!==void 0&&(e.left=i*e.left,t.left=i*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,s=!1){const r={},i={};let o=!1;const a={};for(const l in t){const c=e[l],u=t[l];if(l in Yn){const d=Yn[l];if(c===void 0||u===void 0)continue;const p=d(c,u);p.transform!==void 0&&(a[l]=p.value,o=!0,r.transform=`${r.transform??""} ${p.transform}`,p.overrideFrom!==void 0&&Object.assign(r,p.overrideFrom))}else c!==u&&c!==void 0&&u!==void 0&&(o=!0,r[l]=c,i[l]=u)}return r.transformOrigin=i.transformOrigin=s?"center center":"top left",this.animatingProperties=a,o?[r,i]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,t]),s=!0,this.webAnimation=this.element.animate(e,t);const r=this.getController();r==null||r.add(this);try{await this.webAnimation.finished}catch{}r==null||r.remove(this)}return this.didFinish(s),s}isAnimating(){var e,t;return((e=this.webAnimation)==null?void 0:e.playState)==="running"||((t=this.webAnimation)==null?void 0:t.pending)}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const ds=_n(eu),de=(n,e,t)=>{n&&t.style.setProperty(e,n)},Co=(n,e)=>{var t,s,r,i,o,a,l,c,u;de((t=n.colors)==null?void 0:t.primaryBackground,"--primary-background",e),de((s=n.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",e),de((r=n.colors)==null?void 0:r.secondaryBackground,"--secondary-background",e),de((i=n.colors)==null?void 0:i.textOnSecondaryBackground,"--text-on-secondary-background",e),de((o=n.colors)==null?void 0:o.interactiveDestructiveBackground,"--destructive-color",e),de((a=n.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",e),de((l=n.colors)==null?void 0:l.interactivePrimaryBackground,"--interactive-primary-background",e),de((c=n.colors)==null?void 0:c.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",e),de((u=n.colors)==null?void 0:u.focusColor,"--focus-color",e)};var tu=Object.defineProperty,Mt=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&tu(e,t,r),r};const Ks=class Ks extends M{constructor(){super(...arguments),this.active=!1,this.triggerVisible=!0,this.loaded=!1,this.containerRef=ie(),this.widgetActive$=new te(!1),this.componentIsDestroyed$=new U}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}disconnectedCallback(){super.disconnectedCallback(),this.componentIsDestroyed$.next(),this.componentIsDestroyed$.complete()}toggleActive(){var e;if(!((e=this.application)!=null&&e.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?(this.application.appendToDOM(),this.notify("widget-set-active",{widgetId:this.application.id,active:!0}),this.widgetActive$.next(!0),this.hideTrigger()):(this.application.hide(),this.notify("widget-set-active",{widgetId:this.application.id,active:!1}),this.widgetActive$.next(!1),this.showTrigger())}notify(e,t={}){window!=null&&window.parent&&window.parent.postMessage({type:e,data:t},"*")}_applyBranding(){var e;(e=this.application)!=null&&e.settings&&Co(this.application.settings.branding,this)}async _renderSymbol(){var a,l,c;const e=(a=this.application)==null?void 0:a.branding(),t=(l=e==null?void 0:e.graphics)==null?void 0:l.trigger;if(t)return w` <img src=${t} class="trigger-icon" alt="" /> `;const s=(c=this.application)==null?void 0:c.triggerIcon;if(!s)return x;const r=async u=>Hl,{type:i,content:o}=s;switch(i){case"Telia":{const u=await r();return u?w`<telia-icon
66
66
  class="trigger-icon"
67
67
  svg=${u.svg}
68
68
  size="lg"
@@ -286,7 +286,7 @@
286
286
  * @license
287
287
  * Copyright 2017 Google LLC
288
288
  * SPDX-License-Identifier: BSD-3-Clause
289
- */function au({context:n}){return(e,t)=>{const s=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(r){return s.get(this).setValue(r),e.set.call(this,r)},init(r){return s.set(this,new gi(this,{context:n,initialValue:r})),r}};{e.constructor.addInitializer(o=>{s.set(o,new gi(o,{context:n}))});const r=Object.getOwnPropertyDescriptor(e,t);let i;if(r===void 0){const o=new WeakMap;i={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;i={...r,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,i)}}}var lu=Object.defineProperty,Ro=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&lu(e,t,r),r};const cu="application",Qs=class Qs extends M{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ie(),this.fullscreen=!1,this.isReady=new te(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Co(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([s,r])=>{t.style.setProperty(`--${s}`,r)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var s,r;const e=this.application.settings.components.conversation;return((r=(s=e==null?void 0:e.properties)==null?void 0:s.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Us.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),w`<div class="widget-container" ${oe(this.wrapperRef)}>
289
+ */function au({context:n}){return(e,t)=>{const s=new WeakMap;if(typeof t=="object")return{get(){return e.get.call(this)},set(r){return s.get(this).setValue(r),e.set.call(this,r)},init(r){return s.set(this,new gi(this,{context:n,initialValue:r})),r}};{e.constructor.addInitializer((o=>{s.set(o,new gi(o,{context:n}))}));const r=Object.getOwnPropertyDescriptor(e,t);let i;if(r===void 0){const o=new WeakMap;i={get(){return o.get(this)},set(a){s.get(this).setValue(a),o.set(this,a)},configurable:!0,enumerable:!0}}else{const o=r.set;i={...r,set(a){s.get(this).setValue(a),o==null||o.call(this,a)}}}return void Object.defineProperty(e,t,i)}}}var lu=Object.defineProperty,Ro=(n,e,t,s)=>{for(var r=void 0,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=o(e,t,r)||r);return r&&lu(e,t,r),r};const cu="application",Qs=class Qs extends M{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=ie(),this.fullscreen=!1,this.isReady=new te(!1)}addChild(e){e.parent=this,this.nodes.push(e)}applyBranding(){if(!this.wrapperRef.value)return;const e=this.application.settings;e!=null&&e.branding&&Co(e.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const e=this.application.styles(),t=this.wrapperRef.value;Object.entries(e).forEach(([s,r])=>{t.style.setProperty(`--${s}`,r)})}firstUpdated(e){this.applyBranding(),this.applyStyles()}render(){var s,r;const e=this.application.settings.components.conversation;return((r=(s=e==null?void 0:e.properties)==null?void 0:s.chat)==null?void 0:r.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===Us.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),w`<div class="widget-container" ${oe(this.wrapperRef)}>
290
290
  ${su(this.nodes,i=>i)}
291
291
  </div>`}};Qs.styles=X`
292
292
  :host {
package/index.mjs CHANGED
@@ -247,7 +247,7 @@ function ns(n, e) {
247
247
  0 <= t && n.splice(t, 1);
248
248
  }
249
249
  }
250
- var mn = function() {
250
+ var mn = (function() {
251
251
  function n(e) {
252
252
  this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
253
253
  }
@@ -331,11 +331,11 @@ var mn = function() {
331
331
  }, n.prototype.remove = function(e) {
332
332
  var t = this._finalizers;
333
333
  t && ns(t, e), e instanceof n && e._removeParent(this);
334
- }, n.EMPTY = function() {
334
+ }, n.EMPTY = (function() {
335
335
  var e = new n();
336
336
  return e.closed = !0, e;
337
- }(), n;
338
- }(), Mi = mn.EMPTY;
337
+ })(), n;
338
+ })(), Mi = mn.EMPTY;
339
339
  function Ni(n) {
340
340
  return n instanceof mn || n && "closed" in n && A(n.remove) && A(n.add) && A(n.unsubscribe);
341
341
  }
@@ -365,7 +365,7 @@ function Qt() {
365
365
  function Yt(n) {
366
366
  n();
367
367
  }
368
- var ws = function(n) {
368
+ var ws = (function(n) {
369
369
  ot(e, n);
370
370
  function e(t) {
371
371
  var s = n.call(this) || this;
@@ -396,7 +396,7 @@ var ws = function(n) {
396
396
  this.unsubscribe();
397
397
  }
398
398
  }, e;
399
- }(mn), va = function() {
399
+ })(mn), va = (function() {
400
400
  function n(e) {
401
401
  this.partialObserver = e;
402
402
  }
@@ -427,7 +427,7 @@ var ws = function(n) {
427
427
  jt(t);
428
428
  }
429
429
  }, n;
430
- }(), ss = function(n) {
430
+ })(), ss = (function(n) {
431
431
  ot(e, n);
432
432
  function e(t, s, r) {
433
433
  var i = n.call(this) || this, o;
@@ -438,7 +438,7 @@ var ws = function(n) {
438
438
  } : o = t, i.destination = new va(o), i;
439
439
  }
440
440
  return e;
441
- }(ws);
441
+ })(ws);
442
442
  function jt(n) {
443
443
  Di(n);
444
444
  }
@@ -450,9 +450,9 @@ var ya = {
450
450
  next: Qt,
451
451
  error: ba,
452
452
  complete: Qt
453
- }, ks = function() {
453
+ }, ks = (function() {
454
454
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
455
- }();
455
+ })();
456
456
  function Lt(n) {
457
457
  return n;
458
458
  }
@@ -463,7 +463,7 @@ function $a(n) {
463
463
  }, t);
464
464
  };
465
465
  }
466
- var Z = function() {
466
+ var Z = (function() {
467
467
  function n(e) {
468
468
  e && (this._subscribe = e);
469
469
  }
@@ -522,7 +522,7 @@ var Z = function() {
522
522
  }, n.create = function(e) {
523
523
  return new n(e);
524
524
  }, n;
525
- }();
525
+ })();
526
526
  function Pr(n) {
527
527
  var e;
528
528
  return (e = n ?? ga.Promise) !== null && e !== void 0 ? e : Promise;
@@ -552,7 +552,7 @@ function Se(n) {
552
552
  function ne(n, e, t, s, r) {
553
553
  return new _a(n, e, t, s, r);
554
554
  }
555
- var _a = function(n) {
555
+ var _a = (function(n) {
556
556
  ot(e, n);
557
557
  function e(t, s, r, i, o, a) {
558
558
  var l = n.call(this, t) || this;
@@ -587,11 +587,11 @@ var _a = function(n) {
587
587
  n.prototype.unsubscribe.call(this), !s && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
588
588
  }
589
589
  }, e;
590
- }(ws), Sa = Ii(function(n) {
590
+ })(ws), Sa = Ii(function(n) {
591
591
  return function() {
592
592
  n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
593
593
  };
594
- }), U = function(n) {
594
+ }), U = (function(n) {
595
595
  ot(e, n);
596
596
  function e() {
597
597
  var t = n.call(this) || this;
@@ -670,7 +670,7 @@ var _a = function(n) {
670
670
  }, e.create = function(t, s) {
671
671
  return new Ir(t, s);
672
672
  }, e;
673
- }(Z), Ir = function(n) {
673
+ })(Z), Ir = (function(n) {
674
674
  ot(e, n);
675
675
  function e(t, s) {
676
676
  var r = n.call(this) || this;
@@ -689,7 +689,7 @@ var _a = function(n) {
689
689
  var s, r;
690
690
  return (r = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(t)) !== null && r !== void 0 ? r : Mi;
691
691
  }, e;
692
- }(U), te = function(n) {
692
+ })(U), te = (function(n) {
693
693
  ot(e, n);
694
694
  function e(t) {
695
695
  var s = n.call(this) || this;
@@ -712,7 +712,7 @@ var _a = function(n) {
712
712
  }, e.prototype.next = function(t) {
713
713
  n.prototype.next.call(this, this._value = t);
714
714
  }, e;
715
- }(U), Rt = new Z(function(n) {
715
+ })(U), Rt = new Z(function(n) {
716
716
  return n.complete();
717
717
  });
718
718
  function Aa(n) {
@@ -730,9 +730,9 @@ function Ss(n) {
730
730
  function Ea(n, e) {
731
731
  return typeof _s(n) == "number" ? n.pop() : e;
732
732
  }
733
- var As = function(n) {
733
+ var As = (function(n) {
734
734
  return n && typeof n.length == "number" && typeof n != "function";
735
- };
735
+ });
736
736
  function zi(n) {
737
737
  return A(n == null ? void 0 : n.then);
738
738
  }
@@ -1479,14 +1479,14 @@ let eo = class {
1479
1479
  }
1480
1480
  };
1481
1481
  const dl = (n) => new eo(typeof n == "string" ? n : n + "", void 0, Cs), Y = (n, ...e) => {
1482
- const t = n.length === 1 ? n[0] : e.reduce((s, r, i) => s + ((o) => {
1482
+ const t = n.length === 1 ? n[0] : e.reduce(((s, r, i) => s + ((o) => {
1483
1483
  if (o._$cssResult$ === !0) return o.cssText;
1484
1484
  if (typeof o == "number") return o;
1485
1485
  throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1486
- })(r) + n[i + 1], n[0]);
1486
+ })(r) + n[i + 1]), n[0]);
1487
1487
  return new eo(t, n, Cs);
1488
1488
  }, fl = (n, e) => {
1489
- if (Ts) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
1489
+ if (Ts) n.adoptedStyleSheets = e.map(((t) => t instanceof CSSStyleSheet ? t : t.styleSheet));
1490
1490
  else for (const t of e) {
1491
1491
  const s = document.createElement("style"), r = Xt.litNonce;
1492
1492
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, n.appendChild(s);
@@ -1598,7 +1598,7 @@ let Ze = class extends HTMLElement {
1598
1598
  }
1599
1599
  _$Ev() {
1600
1600
  var e;
1601
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
1601
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach(((t) => t(this)));
1602
1602
  }
1603
1603
  addController(e) {
1604
1604
  var t;
@@ -1619,19 +1619,19 @@ let Ze = class extends HTMLElement {
1619
1619
  }
1620
1620
  connectedCallback() {
1621
1621
  var e;
1622
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
1622
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach(((t) => {
1623
1623
  var s;
1624
1624
  return (s = t.hostConnected) == null ? void 0 : s.call(t);
1625
- });
1625
+ }));
1626
1626
  }
1627
1627
  enableUpdating(e) {
1628
1628
  }
1629
1629
  disconnectedCallback() {
1630
1630
  var e;
1631
- (e = this._$EO) == null || e.forEach((t) => {
1631
+ (e = this._$EO) == null || e.forEach(((t) => {
1632
1632
  var s;
1633
1633
  return (s = t.hostDisconnected) == null ? void 0 : s.call(t);
1634
- });
1634
+ }));
1635
1635
  }
1636
1636
  attributeChangedCallback(e, t, s) {
1637
1637
  this._$AK(e, s);
@@ -1696,10 +1696,10 @@ let Ze = class extends HTMLElement {
1696
1696
  let e = !1;
1697
1697
  const t = this._$AL;
1698
1698
  try {
1699
- e = this.shouldUpdate(t), e ? (this.willUpdate(t), (s = this._$EO) == null || s.forEach((r) => {
1699
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), (s = this._$EO) == null || s.forEach(((r) => {
1700
1700
  var i;
1701
1701
  return (i = r.hostUpdate) == null ? void 0 : i.call(r);
1702
- }), this.update(t)) : this._$EM();
1702
+ })), this.update(t)) : this._$EM();
1703
1703
  } catch (r) {
1704
1704
  throw e = !1, this._$EM(), r;
1705
1705
  }
@@ -1709,10 +1709,10 @@ let Ze = class extends HTMLElement {
1709
1709
  }
1710
1710
  _$AE(e) {
1711
1711
  var t;
1712
- (t = this._$EO) == null || t.forEach((s) => {
1712
+ (t = this._$EO) == null || t.forEach(((s) => {
1713
1713
  var r;
1714
1714
  return (r = s.hostUpdated) == null ? void 0 : r.call(s);
1715
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
1715
+ })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
1716
1716
  }
1717
1717
  _$EM() {
1718
1718
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -1727,7 +1727,7 @@ let Ze = class extends HTMLElement {
1727
1727
  return !0;
1728
1728
  }
1729
1729
  update(e) {
1730
- this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
1730
+ this._$Eq && (this._$Eq = this._$Eq.forEach(((t) => this._$ET(t, this[t])))), this._$EM();
1731
1731
  }
1732
1732
  updated(e) {
1733
1733
  }
@@ -2812,12 +2812,12 @@ const rt = _n(class extends Ns {
2812
2812
  if (super(n), n.type !== kn.ATTRIBUTE || n.name !== "class" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2813
2813
  }
2814
2814
  render(n) {
2815
- return " " + Object.keys(n).filter((e) => n[e]).join(" ") + " ";
2815
+ return " " + Object.keys(n).filter(((e) => n[e])).join(" ") + " ";
2816
2816
  }
2817
2817
  update(n, [e]) {
2818
2818
  var s, r;
2819
2819
  if (this.st === void 0) {
2820
- this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter((i) => i !== "")));
2820
+ this.st = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter(((i) => i !== ""))));
2821
2821
  for (const i in e) e[i] && !((s = this.nt) != null && s.has(i)) && this.st.add(i);
2822
2822
  return this.render(e);
2823
2823
  }
@@ -2872,7 +2872,7 @@ Wc([
2872
2872
  ], cn.prototype, "anchor");
2873
2873
  const qc = /* @__PURE__ */ new WeakMap();
2874
2874
  let ai = 0;
2875
- const Zn = /* @__PURE__ */ new Map(), li = /* @__PURE__ */ new WeakSet(), ci = () => new Promise((n) => requestAnimationFrame(n)), Zc = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Yc = [{ opacity: 0 }], ui = [{ opacity: 0 }, { opacity: 1 }], hi = (n, e) => {
2875
+ const Zn = /* @__PURE__ */ new Map(), li = /* @__PURE__ */ new WeakSet(), ci = () => new Promise(((n) => requestAnimationFrame(n))), Zc = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Yc = [{ opacity: 0 }], ui = [{ opacity: 0 }, { opacity: 1 }], hi = (n, e) => {
2876
2876
  const t = n - e;
2877
2877
  return t === 0 ? void 0 : t;
2878
2878
  }, pi = (n, e) => {
@@ -2902,9 +2902,9 @@ class Vc extends So {
2902
2902
  }
2903
2903
  createFinished() {
2904
2904
  var e;
2905
- (e = this.resolveFinished) == null || e.call(this), this.finished = new Promise((t) => {
2905
+ (e = this.resolveFinished) == null || e.call(this), this.finished = new Promise(((t) => {
2906
2906
  this.l = t;
2907
- });
2907
+ }));
2908
2908
  }
2909
2909
  async resolveFinished() {
2910
2910
  var e;
@@ -2923,7 +2923,7 @@ class Vc extends So {
2923
2923
  update(e, [t]) {
2924
2924
  var r;
2925
2925
  const s = this.u === void 0;
2926
- return s && (this.u = (r = e.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then((i) => this.t = !0), this.element = e.element, di.set(this.element, this)), this.optionsOrCallback = t, (s || typeof t != "function") && this.p(t), this.render(t);
2926
+ return s && (this.u = (r = e.options) == null ? void 0 : r.host, this.u.addController(this), this.u.updateComplete.then(((i) => this.t = !0)), this.element = e.element, di.set(this.element, this)), this.optionsOrCallback = t, (s || typeof t != "function") && this.p(t), this.render(t);
2927
2927
  }
2928
2928
  p(e) {
2929
2929
  e = e ?? {};
@@ -2932,16 +2932,16 @@ class Vc extends So {
2932
2932
  }
2933
2933
  m() {
2934
2934
  const e = {}, t = this.element.getBoundingClientRect(), s = getComputedStyle(this.element);
2935
- return this.options.properties.forEach((r) => {
2935
+ return this.options.properties.forEach(((r) => {
2936
2936
  const i = t[r] ?? (Yn[r] ? void 0 : s[r]), o = Number(i);
2937
2937
  e[r] = isNaN(o) ? i + "" : o;
2938
- }), e;
2938
+ })), e;
2939
2939
  }
2940
2940
  v() {
2941
2941
  let e, t = !0;
2942
2942
  return this.options.guard && (e = this.options.guard(), t = ((s, r) => {
2943
2943
  if (Array.isArray(s)) {
2944
- if (Array.isArray(r) && r.length === s.length && s.every((i, o) => i === r[o])) return !1;
2944
+ if (Array.isArray(r) && r.length === s.length && s.every(((i, o) => i === r[o]))) return !1;
2945
2945
  } else if (r === s) return !1;
2946
2946
  return !0;
2947
2947
  })(e, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && t && this.element.isConnected, this.h && (this._ = Array.isArray(e) ? Array.from(e) : e), this.h;
@@ -2962,7 +2962,7 @@ class Vc extends So {
2962
2962
  if (i) {
2963
2963
  Zn.delete(this.options.inId);
2964
2964
  const { from: o, to: a } = this.N(i, r, t);
2965
- e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, ai++, e.forEach((l) => l.zIndex = ai);
2965
+ e = this.calculateKeyframes(o, a), e = this.options.in ? [{ ...this.options.in[0], ...e[0] }, ...this.options.in.slice(1), e[1]] : e, ai++, e.forEach(((l) => l.zIndex = ai));
2966
2966
  } else this.options.in && (e = [...this.options.in, {}]);
2967
2967
  }
2968
2968
  this.animate(e, s);
@@ -3012,21 +3012,21 @@ class Vc extends So {
3012
3012
  }
3013
3013
  get isHostRendered() {
3014
3014
  const e = li.has(this.u);
3015
- return e || this.u.updateComplete.then(() => {
3015
+ return e || this.u.updateComplete.then((() => {
3016
3016
  li.add(this.u);
3017
- }), e;
3017
+ })), e;
3018
3018
  }
3019
3019
  j(e, t = this.O()) {
3020
3020
  const s = { ...Xc };
3021
- return t.forEach((r) => Object.assign(s, r.options.keyframeOptions)), Object.assign(s, e), s;
3021
+ return t.forEach(((r) => Object.assign(s, r.options.keyframeOptions))), Object.assign(s, e), s;
3022
3022
  }
3023
3023
  N(e, t, s) {
3024
3024
  e = { ...e }, t = { ...t };
3025
- const r = s.map((a) => a.animatingProperties).filter((a) => a !== void 0);
3025
+ const r = s.map(((a) => a.animatingProperties)).filter(((a) => a !== void 0));
3026
3026
  let i = 1, o = 1;
3027
- return r.length > 0 && (r.forEach((a) => {
3027
+ return r.length > 0 && (r.forEach(((a) => {
3028
3028
  a.width && (i /= a.width), a.height && (o /= a.height);
3029
- }), e.left !== void 0 && t.left !== void 0 && (e.left = i * e.left, t.left = i * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
3029
+ })), e.left !== void 0 && t.left !== void 0 && (e.left = i * e.left, t.left = i * t.left), e.top !== void 0 && t.top !== void 0 && (e.top = o * e.top, t.top = o * t.top)), { from: e, to: t };
3030
3030
  }
3031
3031
  calculateKeyframes(e, t, s = !1) {
3032
3032
  const r = {}, i = {};
@@ -3576,9 +3576,9 @@ function ru({ context: n }) {
3576
3576
  return s.set(this, new fi(this, { context: n, initialValue: r })), r;
3577
3577
  } };
3578
3578
  {
3579
- e.constructor.addInitializer((o) => {
3579
+ e.constructor.addInitializer(((o) => {
3580
3580
  s.set(o, new fi(o, { context: n }));
3581
- });
3581
+ }));
3582
3582
  const r = Object.getOwnPropertyDescriptor(e, t);
3583
3583
  let i;
3584
3584
  if (r === void 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation-flamingo",
3
- "version": "1.1.121-rc.1",
3
+ "version": "1.1.121",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "@lit-labs/motion": "^1.0.8",
10
10
  "@teliads/icons": "^8.4.0",
11
11
  "@teliads/components": "^22.1.1",
12
- "@telia-ace/widget-core-flamingo": "1.1.121-rc.1",
12
+ "@telia-ace/widget-core-flamingo": "1.1.121",
13
13
  "lit-html": "^3.0.2",
14
14
  "rxjs": "^7.8.2",
15
15
  "marked": "^15.0.12",