@telia-ace/widget-core-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 +7 -7
  2. package/index.mjs +48 -48
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var gt=function(r,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},gt(r,t)};function G(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gt(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function mt(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vt(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var i=e.call(r),s,o=[],n;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(a){n={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(n)throw n.error}}return o}function yt(r,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return r.concat(o||Array.prototype.slice.call(t))}function _(r){return typeof r=="function"}function ce(r){var t=function(i){Error.call(i),i.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var at=ce(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
2
2
  `+e.map(function(i,s){return s+1+") "+i.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=e}});function bt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var ot=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,s,o;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var a=mt(n),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else n.remove(this);var l=this.initialTeardown;if(_(l))try{l()}catch(v){o=v instanceof at?v.errors:[v]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var u=mt(d),f=u.next();!f.done;f=u.next()){var g=f.value;try{jt(g)}catch(v){o=o??[],v instanceof at?o=yt(yt([],vt(o)),vt(v.errors)):o.push(v)}}}catch(v){i={error:v}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}}if(o)throw new at(o)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)jt(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&bt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&bt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}(),he=ot.EMPTY;function le(r){return r instanceof ot||r&&"closed"in r&&_(r.remove)&&_(r.add)&&_(r.unsubscribe)}function jt(r){_(r)?r():r.unsubscribe()}var Re={Promise:void 0},Me={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return setTimeout.apply(void 0,yt([r,t],vt(e)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function Ne(r){Me.setTimeout(function(){throw r})}function Ht(){}function J(r){r()}var de=function(r){G(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,le(e)&&e.add(i)):i.destination=je,i}return t.create=function(e,i,s){return new wt(e,i,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ot),Le=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){Z(i)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){Z(i)}else Z(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Z(e)}},r}(),wt=function(r){G(t,r);function t(e,i,s){var o=r.call(this)||this,n;return _(e)||!e?n={next:e??void 0,error:i??void 0,complete:s??void 0}:n=e,o.destination=new Le(n),o}return t}(de);function Z(r){Ne(r)}function Ue(r){throw r}var je={closed:!0,next:Ht,error:Ue,complete:Ht},He=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fe(r){return r}function Be(r){return r.length===0?Fe:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Ft=function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,i){var s=this,o=ze(t)?t:new wt(t,e,i);return J(function(){var n=s,a=n.operator,c=n.source;o.add(a?a.call(o,c):c?s._subscribe(o):s._trySubscribe(o))}),o},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var i=this;return e=Bt(e),new e(function(s,o){var n=new wt({next:function(a){try{t(a)}catch(c){o(c),n.unsubscribe()}},error:o,complete:s});i.subscribe(n)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[He]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Be(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Bt(t),new t(function(i,s){var o;e.subscribe(function(n){return o=n},function(n){return s(n)},function(){return i(o)})})},r.create=function(t){return new r(t)},r}();function Bt(r){var t;return(t=r??Re.Promise)!==null&&t!==void 0?t:Promise}function De(r){return r&&_(r.next)&&_(r.error)&&_(r.complete)}function ze(r){return r&&r instanceof de||De(r)&&le(r)}var We=ce(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),xt=function(r){G(t,r);function t(){var e=r.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var i=new Dt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new We},t.prototype.next=function(e){var i=this;J(function(){var s,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var n=mt(i.currentObservers),a=n.next();!a.done;a=n.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;J(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;J(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var i=this,s=this,o=s.hasError,n=s.isStopped,a=s.observers;return o||n?he:(this.currentObservers=null,a.push(e),new ot(function(){i.currentObservers=null,bt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,o=i.thrownError,n=i.isStopped;s?e.error(o):n&&e.complete()},t.prototype.asObservable=function(){var e=new Ft;return e.source=this,e},t.create=function(e,i){return new Dt(e,i)},t}(Ft),Dt=function(r){G(t,r);function t(e,i){var s=r.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:he},t}(xt),Ct=function(r){G(t,r);function t(e){var i=r.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=r.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,o=e._value;if(i)throw s;return this._throwIfClosed(),o},t.prototype.next=function(e){r.prototype.next.call(this,this._value=e)},t}(xt),ue=(r=>(r.Loading="loading",r.Ready="ready",r))(ue||{});class $t{constructor(t,e){this.state=new Ct("loading"),this.resolvers=new Map,this.name=t,this.environment=e,this.state.next("ready")}setState(t){this.state.next(t)}async register(t,e){this.resolvers.set(t,e)}async get(t){return this.resolvers.get(t)}}/**
3
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function bt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var ot=(function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,s,o;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var a=mt(n),c=a.next();!c.done;c=a.next()){var h=c.value;h.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else n.remove(this);var l=this.initialTeardown;if(_(l))try{l()}catch(v){o=v instanceof at?v.errors:[v]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var u=mt(d),f=u.next();!f.done;f=u.next()){var g=f.value;try{jt(g)}catch(v){o=o??[],v instanceof at?o=yt(yt([],vt(o)),vt(v.errors)):o.push(v)}}}catch(v){i={error:v}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}}if(o)throw new at(o)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)jt(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&bt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&bt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=(function(){var t=new r;return t.closed=!0,t})(),r})(),he=ot.EMPTY;function le(r){return r instanceof ot||r&&"closed"in r&&_(r.remove)&&_(r.add)&&_(r.unsubscribe)}function jt(r){_(r)?r():r.unsubscribe()}var Re={Promise:void 0},Me={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return setTimeout.apply(void 0,yt([r,t],vt(e)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function Ne(r){Me.setTimeout(function(){throw r})}function Ht(){}function J(r){r()}var de=(function(r){G(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,le(e)&&e.add(i)):i.destination=je,i}return t.create=function(e,i,s){return new wt(e,i,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(ot),Le=(function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){Z(i)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){Z(i)}else Z(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Z(e)}},r})(),wt=(function(r){G(t,r);function t(e,i,s){var o=r.call(this)||this,n;return _(e)||!e?n={next:e??void 0,error:i??void 0,complete:s??void 0}:n=e,o.destination=new Le(n),o}return t})(de);function Z(r){Ne(r)}function Ue(r){throw r}var je={closed:!0,next:Ht,error:Ue,complete:Ht},He=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Fe(r){return r}function Be(r){return r.length===0?Fe:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Ft=(function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,i){var s=this,o=ze(t)?t:new wt(t,e,i);return J(function(){var n=s,a=n.operator,c=n.source;o.add(a?a.call(o,c):c?s._subscribe(o):s._trySubscribe(o))}),o},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var i=this;return e=Bt(e),new e(function(s,o){var n=new wt({next:function(a){try{t(a)}catch(c){o(c),n.unsubscribe()}},error:o,complete:s});i.subscribe(n)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[He]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Be(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Bt(t),new t(function(i,s){var o;e.subscribe(function(n){return o=n},function(n){return s(n)},function(){return i(o)})})},r.create=function(t){return new r(t)},r})();function Bt(r){var t;return(t=r??Re.Promise)!==null&&t!==void 0?t:Promise}function De(r){return r&&_(r.next)&&_(r.error)&&_(r.complete)}function ze(r){return r&&r instanceof de||De(r)&&le(r)}var We=ce(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),xt=(function(r){G(t,r);function t(){var e=r.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var i=new Dt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new We},t.prototype.next=function(e){var i=this;J(function(){var s,o;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var n=mt(i.currentObservers),a=n.next();!a.done;a=n.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;J(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;J(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var i=this,s=this,o=s.hasError,n=s.isStopped,a=s.observers;return o||n?he:(this.currentObservers=null,a.push(e),new ot(function(){i.currentObservers=null,bt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,o=i.thrownError,n=i.isStopped;s?e.error(o):n&&e.complete()},t.prototype.asObservable=function(){var e=new Ft;return e.source=this,e},t.create=function(e,i){return new Dt(e,i)},t})(Ft),Dt=(function(r){G(t,r);function t(e,i){var s=r.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:he},t})(xt),Ct=(function(r){G(t,r);function t(e){var i=r.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=r.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,o=e._value;if(i)throw s;return this._throwIfClosed(),o},t.prototype.next=function(e){r.prototype.next.call(this,this._value=e)},t})(xt),ue=(r=>(r.Loading="loading",r.Ready="ready",r))(ue||{});class $t{constructor(t,e){this.state=new Ct("loading"),this.resolvers=new Map,this.name=t,this.environment=e,this.state.next("ready")}setState(t){this.state.next(t)}async register(t,e){this.resolvers.set(t,e)}async get(t){return this.resolvers.get(t)}}/**
4
4
  * @license
5
5
  * Copyright 2019 Google LLC
6
6
  * SPDX-License-Identifier: BSD-3-Clause
7
- */const X=globalThis,Et=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,St=Symbol(),zt=new WeakMap;let pe=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==St)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Et&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=zt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&zt.set(e,t))}return t}toString(){return this.cssText}};const Ve=r=>new pe(typeof r=="string"?r:r+"",void 0,St),j=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,s,o)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[o+1],r[0]);return new pe(e,r,St)},qe=(r,t)=>{if(Et)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},Wt=Et?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ve(e)})(r):r;/**
7
+ */const X=globalThis,Et=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,St=Symbol(),zt=new WeakMap;let pe=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==St)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Et&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=zt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&zt.set(e,t))}return t}toString(){return this.cssText}};const Ve=r=>new pe(typeof r=="string"?r:r+"",void 0,St),j=(r,...t)=>{const e=r.length===1?r[0]:t.reduce(((i,s,o)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[o+1]),r[0]);return new pe(e,r,St)},qe=(r,t)=>{if(Et)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},Wt=Et?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ve(e)})(r):r;/**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const{is:Ge,defineProperty:Ke,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:Ze,getOwnPropertySymbols:Je,getPrototypeOf:Xe}=Object,C=globalThis,Vt=C.trustedTypes,Qe=Vt?Vt.emptyScript:"",ct=C.reactiveElementPolyfillSupport,B=(r,t)=>r,Q={toAttribute(r,t){switch(t){case Boolean:r=r?Qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Pt=(r,t)=>!Ge(r,t),qt={attribute:!0,type:String,converter:Q,reflect:!1,useDefault:!1,hasChanged:Pt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),C.litPropertyMetadata??(C.litPropertyMetadata=new WeakMap);let R=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=qt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Ke(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=Ye(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){const a=s==null?void 0:s.call(this);o==null||o.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??qt}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;const t=Xe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){const e=this.properties,i=[...Ze(e),...Je(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(Wt(s))}else t!==void 0&&e.push(Wt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return qe(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){var o,n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((o=a.converter)==null?void 0:o.fromAttribute)!==void 0?a.converter:Q;this._$Em=s;const h=c.fromAttribute(e,a.type);this[s]=h??((n=this._$Ej)==null?void 0:n.get(s))??h,this._$Em=null}}requestUpdate(t,e,i){var s;if(t!==void 0){const o=this.constructor,n=this[t];if(i??(i=o.getPropertyOptions(t)),!((i.hasChanged??Pt)(n,e)||i.useDefault&&i.reflect&&n===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,n]of s){const{wrapped:a}=n,c=this[o];a!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,n,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};R.elementStyles=[],R.shadowRootOptions={mode:"open"},R[B("elementProperties")]=new Map,R[B("finalized")]=new Map,ct==null||ct({ReactiveElement:R}),(C.reactiveElementVersions??(C.reactiveElementVersions=[])).push("2.1.1");/**
11
+ */const{is:Ge,defineProperty:Ke,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:Ze,getOwnPropertySymbols:Je,getPrototypeOf:Xe}=Object,C=globalThis,Vt=C.trustedTypes,Qe=Vt?Vt.emptyScript:"",ct=C.reactiveElementPolyfillSupport,B=(r,t)=>r,Q={toAttribute(r,t){switch(t){case Boolean:r=r?Qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Pt=(r,t)=>!Ge(r,t),qt={attribute:!0,type:String,converter:Q,reflect:!1,useDefault:!1,hasChanged:Pt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),C.litPropertyMetadata??(C.litPropertyMetadata=new WeakMap);let R=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=qt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Ke(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=Ye(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){const a=s==null?void 0:s.call(this);o==null||o.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??qt}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;const t=Xe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){const e=this.properties,i=[...Ze(e),...Je(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(Wt(s))}else t!==void 0&&e.push(Wt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return qe(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){var o,n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((o=a.converter)==null?void 0:o.fromAttribute)!==void 0?a.converter:Q;this._$Em=s;const h=c.fromAttribute(e,a.type);this[s]=h??((n=this._$Ej)==null?void 0:n.get(s))??h,this._$Em=null}}requestUpdate(t,e,i){var s;if(t!==void 0){const o=this.constructor,n=this[t];if(i??(i=o.getPropertyOptions(t)),!((i.hasChanged??Pt)(n,e)||i.useDefault&&i.reflect&&n===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,n]of s){const{wrapped:a}=n,c=this[o];a!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,n,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)})),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};R.elementStyles=[],R.shadowRootOptions={mode:"open"},R[B("elementProperties")]=new Map,R[B("finalized")]=new Map,ct==null||ct({ReactiveElement:R}),(C.reactiveElementVersions??(C.reactiveElementVersions=[])).push("2.1.1");/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
@@ -54,11 +54,11 @@
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
56
56
  * SPDX-License-Identifier: BSD-3-Clause
57
- */const z=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),z(s,t);return!0},et=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},we=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),vi(t)}};function gi(r){this._$AN!==void 0?(et(this),this._$AM=r,we(this)):this._$AM=r}function mi(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let o=e;o<i.length;o++)z(i[o],!1),et(i[o]);else i!=null&&(z(i,!1),et(i));else z(this,r)}const vi=r=>{r.type==It.CHILD&&(r._$AP??(r._$AP=mi),r._$AQ??(r._$AQ=gi))};class $e extends be{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),we(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(z(this,t),et(this))}setValue(t){if(fi(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const yi=new WeakMap;let Qt=0;const ut=new Map,te=new WeakSet,ee=()=>new Promise(r=>requestAnimationFrame(r)),bi=[{transform:"translateX(100%) scale(0)",opacity:0}],ie=(r,t)=>{const e=r-t;return e===0?void 0:e},se=(r,t)=>{const e=r/t;return e===1?void 0:e},pt={left:(r,t)=>{const e=ie(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=ie(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=se(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=se(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},wi={duration:333,easing:"ease-in-out"},$i=["left","top","width","height","opacity","color","background"],re=new WeakMap;class _i extends $e{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===It.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.l=e})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return p}getController(){return yi.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.u===void 0;return i&&(this.u=(s=t.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then(o=>this.t=!0),this.element=t.element,re.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=$i),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const o=e[s]??(pt[s]?void 0:i[s]),n=Number(o);t[s]=isNaN(n)?o+"":n}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((o,n)=>o===s[n]))return!1}else if(s===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await ee;const e=this.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,s,e);this.log("measured",[this.A,s,o,n]),t=this.calculateKeyframes(o,n)}else{const o=ut.get(this.options.inId);if(o){ut.delete(this.options.inId);const{from:n,to:a}=this.N(o,s,e);t=this.calculateKeyframes(n,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Qt++,t.forEach(c=>c.zIndex=Qt)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&ut.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ee(),(e=this.i)==null?void 0:e.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const o=this.A.left-s.left,n=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||o===0&&n===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),n!==0&&(this.element.style.top=n+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=re.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=te.has(this.u);return t||this.u.updateComplete.then(()=>{te.add(this.u)}),t}j(t,e=this.O()){const i={...wi};return e.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let o=1,n=1;return s.length>0&&(s.forEach(a=>{a.width&&(o/=a.width),a.height&&(n/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=o*t.left,e.left=o*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=n*t.top,e.top=n*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},o={};let n=!1;const a={};for(const c in e){const h=t[c],l=e[c];if(c in pt){const d=pt[c];if(h===void 0||l===void 0)continue;const u=d(h,l);u.transform!==void 0&&(a[c]=u.value,n=!0,s.transform=`${s.transform??""} ${u.transform}`,u.overrideFrom!==void 0&&Object.assign(s,u.overrideFrom))}else h!==l&&h!==void 0&&l!==void 0&&(n=!0,s[c]=h,o[c]=l)}return s.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=a,n?[s,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const Ai=kt(_i),xi={name:"question",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>'};/**
57
+ */const z=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),z(s,t);return!0},et=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},we=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),vi(t)}};function gi(r){this._$AN!==void 0?(et(this),this._$AM=r,we(this)):this._$AM=r}function mi(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let o=e;o<i.length;o++)z(i[o],!1),et(i[o]);else i!=null&&(z(i,!1),et(i));else z(this,r)}const vi=r=>{r.type==It.CHILD&&(r._$AP??(r._$AP=mi),r._$AQ??(r._$AQ=gi))};class $e extends be{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),we(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(z(this,t),et(this))}setValue(t){if(fi(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const yi=new WeakMap;let Qt=0;const ut=new Map,te=new WeakSet,ee=()=>new Promise((r=>requestAnimationFrame(r))),bi=[{transform:"translateX(100%) scale(0)",opacity:0}],ie=(r,t)=>{const e=r-t;return e===0?void 0:e},se=(r,t)=>{const e=r/t;return e===1?void 0:e},pt={left:(r,t)=>{const e=ie(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=ie(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=se(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=se(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},wi={duration:333,easing:"ease-in-out"},$i=["left","top","width","height","opacity","color","background"],re=new WeakMap;class _i extends $e{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===It.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return p}getController(){return yi.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.u===void 0;return i&&(this.u=(s=t.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then((o=>this.t=!0)),this.element=t.element,re.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=$i),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((s=>{const o=e[s]??(pt[s]?void 0:i[s]),n=Number(o);t[s]=isNaN(n)?o+"":n})),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every(((o,n)=>o===s[n])))return!1}else if(s===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await ee;const e=this.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,s,e);this.log("measured",[this.A,s,o,n]),t=this.calculateKeyframes(o,n)}else{const o=ut.get(this.options.inId);if(o){ut.delete(this.options.inId);const{from:n,to:a}=this.N(o,s,e);t=this.calculateKeyframes(n,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Qt++,t.forEach((c=>c.zIndex=Qt))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&ut.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ee(),(e=this.i)==null?void 0:e.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const o=this.A.left-s.left,n=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||o===0&&n===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),n!==0&&(this.element.style.top=n+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=re.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=te.has(this.u);return t||this.u.updateComplete.then((()=>{te.add(this.u)})),t}j(t,e=this.O()){const i={...wi};return e.forEach((s=>Object.assign(i,s.options.keyframeOptions))),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map((a=>a.animatingProperties)).filter((a=>a!==void 0));let o=1,n=1;return s.length>0&&(s.forEach((a=>{a.width&&(o/=a.width),a.height&&(n/=a.height)})),t.left!==void 0&&e.left!==void 0&&(t.left=o*t.left,e.left=o*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=n*t.top,e.top=n*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const s={},o={};let n=!1;const a={};for(const c in e){const h=t[c],l=e[c];if(c in pt){const d=pt[c];if(h===void 0||l===void 0)continue;const u=d(h,l);u.transform!==void 0&&(a[c]=u.value,n=!0,s.transform=`${s.transform??""} ${u.transform}`,u.overrideFrom!==void 0&&Object.assign(s,u.overrideFrom))}else h!==l&&h!==void 0&&l!==void 0&&(n=!0,s[c]=h,o[c]=l)}return s.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=a,n?[s,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,e]),i=!0,this.webAnimation=this.element.animate(t,e);const s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const Ai=kt(_i),xi={name:"question",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>'};/**
58
58
  * @license
59
59
  * Copyright 2018 Google LLC
60
60
  * SPDX-License-Identifier: BSD-3-Clause
61
- */const oe=kt(class extends be{constructor(r){var t;if(super(r),r.type!==It.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(t)}const e=r.element.classList;for(const o of this.st)o in t||(e.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(s=this.nt)!=null&&s.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return k}}),w=(r,t,e)=>{r&&e.style.setProperty(t,r)},_e=(r,t)=>{var e,i,s,o,n,a,c,h,l;w((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),w((i=r.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),w((s=r.colors)==null?void 0:s.secondaryBackground,"--secondary-background",t),w((o=r.colors)==null?void 0:o.textOnSecondaryBackground,"--text-on-secondary-background",t),w((n=r.colors)==null?void 0:n.interactiveDestructiveBackground,"--destructive-color",t),w((a=r.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",t),w((c=r.colors)==null?void 0:c.interactivePrimaryBackground,"--interactive-primary-background",t),w((h=r.colors)==null?void 0:h.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",t),w((l=r.colors)==null?void 0:l.focusColor,"--focus-color",t)};/**
61
+ */const oe=kt(class extends be{constructor(r){var t;if(super(r),r.type!==It.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter((t=>r[t])).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((o=>o!==""))));for(const o in t)t[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(t)}const e=r.element.classList;for(const o of this.st)o in t||(e.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(s=this.nt)!=null&&s.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return k}}),w=(r,t,e)=>{r&&e.style.setProperty(t,r)},_e=(r,t)=>{var e,i,s,o,n,a,c,h,l;w((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),w((i=r.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),w((s=r.colors)==null?void 0:s.secondaryBackground,"--secondary-background",t),w((o=r.colors)==null?void 0:o.textOnSecondaryBackground,"--text-on-secondary-background",t),w((n=r.colors)==null?void 0:n.interactiveDestructiveBackground,"--destructive-color",t),w((a=r.colors)==null?void 0:a.interactiveTextOnDestructiveBackground,"--text-on-destructive-color",t),w((c=r.colors)==null?void 0:c.interactivePrimaryBackground,"--interactive-primary-background",t),w((h=r.colors)==null?void 0:h.interactiveTextOnPrimaryBackground,"--interactive-text-on-primary-background",t),w((l=r.colors)==null?void 0:l.focusColor,"--focus-color",t)};/**
62
62
  * @license
63
63
  * Copyright 2020 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
@@ -286,7 +286,7 @@
286
286
  * @license
287
287
  * Copyright 2017 Google LLC
288
288
  * SPDX-License-Identifier: BSD-3-Clause
289
- */function Ti({context:r}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(s){return i.get(this).setValue(s),t.set.call(this,s)},init(s){return i.set(this,new ne(this,{context:r,initialValue:s})),s}};{t.constructor.addInitializer(n=>{i.set(n,new ne(n,{context:r}))});const s=Object.getOwnPropertyDescriptor(t,e);let o;if(s===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=s.set;o={...s,set(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var Ri=Object.defineProperty,Se=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&Ri(t,e,s),s};const Pe="application",Lt=class Lt extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=Ae(),this.fullscreen=!1,this.isReady=new Ct(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&_e(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,s])=>{e.style.setProperty(`--${i}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,s;const t=this.application.settings.components.conversation;return((s=(i=t==null?void 0:t.properties)==null?void 0:i.chat)==null?void 0:s.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===$.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),M`<div class="widget-container" ${xe(this.wrapperRef)}>
289
+ */function Ti({context:r}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(s){return i.get(this).setValue(s),t.set.call(this,s)},init(s){return i.set(this,new ne(this,{context:r,initialValue:s})),s}};{t.constructor.addInitializer((n=>{i.set(n,new ne(n,{context:r}))}));const s=Object.getOwnPropertyDescriptor(t,e);let o;if(s===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(a){i.get(this).setValue(a),n.set(this,a)},configurable:!0,enumerable:!0}}else{const n=s.set;o={...s,set(a){i.get(this).setValue(a),n==null||n.call(this,a)}}}return void Object.defineProperty(t,e,o)}}}var Ri=Object.defineProperty,Se=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&Ri(t,e,s),s};const Pe="application",Lt=class Lt extends A{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=Ae(),this.fullscreen=!1,this.isReady=new Ct(!1)}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&_e(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([i,s])=>{e.style.setProperty(`--${i}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){var i,s;const t=this.application.settings.components.conversation;return((s=(i=t==null?void 0:t.properties)==null?void 0:i.chat)==null?void 0:s.isThirdPartyWidget)?this.renderRoot.host.classList.add("third-party"):this.application.renderStrategy===$.Trigger&&(this.renderRoot.host.classList.add("floating"),this.application.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.application.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right")),this.application.fullscreen&&this.renderRoot.host.classList.add("fullscreen"),window.self!==window.top&&this.renderRoot.host.classList.add("embedded"),M`<div class="widget-container" ${xe(this.wrapperRef)}>
290
290
  ${Pi(this.nodes,o=>o)}
291
291
  </div>`}};Lt.styles=j`
292
292
  :host {
@@ -453,7 +453,7 @@
453
453
  :host(.expanded.embedded) {
454
454
  animation: none;
455
455
  }
456
- `;let L=Lt;Se([m({attribute:!0})],L.prototype,"fullscreen");Se([m({attribute:!1}),Ti({context:Pe})],L.prototype,"application");class Mi{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},s=(a,c,h,l)=>{h.forEach(d=>{const u=i(d),f=l[u.definitionId];if(!f){console.error(`No definition found for component type '${u.definitionId}'.`);return}const g=a.createNode(f.type,f.type);g&&(g.name=u.definitionId,g.application=e,f.properties&&g.writeProperties(f.properties),f.context&&g.writeContext(f.context),f.layout&&g.writeLayout(f.layout),c.addChild(g),f.children&&s(a,g,f.children,l))})},{entry:o,components:n}=t;return s(this,this.root,[o],n),this.root}createRoot(){return typeof window<"u"&&(window.customElements.get("ace-wrapper")||window.customElements.define("ace-wrapper",L)),document.createElement("ace-wrapper")}createNode(t,e){if(!this.resolveComponent(e))return console.warn(`Unable to resolve component: ${e}`),new it;const s=document.createElement(`ace-${e}`);return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const st=class st{constructor(){this.components=new Map}getComponent(t){const e=this.components.get(t);return e||console.warn(`Unable to resolve component: ${t}. You most likely forgot to register the required plugin.`),e}registerComponent(t,e){this.components.set(t,e)}async loadComponents(){const t=[...this.components.entries()].map(([e,i])=>i.then(s=>{this.defineAsWebComponent(e,s.default)}));await Promise.all(t)}defineAsWebComponent(t,e){const i=st.ResolveWebComponentName(t);customElements.get(i)||customElements.define(i,e)}};st.ResolveWebComponentName=t=>`ace-${t}`;let At=st;var y=(r=>(r.Necessary="necessary",r.Functional="functional",r.Analytics="analytics",r))(y||{});class Oe{constructor(t,e,i,s){this.disallowedKeys=[],this.widgetId=t,this.storage=e==="localStorage"?window.localStorage:window.sessionStorage,this.policy=i,this.storageEntries=s}set(t,e){if(this.disallowedKeys.includes(t))return;const i=this.storageEntries[t];if(!i){console.warn(`Storage key '${t}' is not defined.`);return}const s=i.category;if(this.policy[s]){const o={value:e,category:s};this.storage.setItem(this._prefixKey(t),JSON.stringify(o))}else console.warn(`Storage policy does not allow storing items in category: ${s}`)}get(t){const e=this.storage.getItem(this._prefixKey(t));if(!e)return null;try{const i=JSON.parse(e);return this.policy[i.category]?i.value:(console.warn(`Storage policy does not allow retrieving items from category: ${i.category}`),null)}catch{return null}}removeItem(t){this.storage.removeItem(this._prefixKey(t))}enforcePolicy(){var t;for(const[e,i]of Object.entries(this.storage)){const s=(t=JSON.parse(i))==null?void 0:t.category;this.policy[s]||this.storage.removeItem(e)}}updatePolicy(t){this.policy=t,this.enforcePolicy()}disallowKey(t){this.disallowedKeys.includes(t)||this.disallowedKeys.push(t),this.removeItem(t)}stringify(){return JSON.stringify(this.storage)}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}}class Ni{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}const Li="1.1.121-rc.1";class Ui{constructor(t){this.widget=t,this.name=t.name}open(t={}){this.widget.appendToDOM(t)}close(){this.widget.hide()}setFullscreenMode(t){this.widget.setFullscreenMode(t)}setZIndex(t){this.widget.setZIndex(t)}version(){return{version:Li}}}class Ie{constructor(t,e,i,s,o){this.id=t,this.name=e,this.container=i,this.settings=s,this.options=o,this.platform=new Mi,this.texts=new Ni,this.renderStrategy=$.Inline,this.fullscreen=!1,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new At,this.components=[],this.trigger=null,this.api=new Ui(this),this.onMessageReceived=async a=>{var h;const c=a.data;switch(c.type){case"set-storage-policies":{const{policies:l}=c.data||[],d={[y.Analytics]:l.includes("analytics"),[y.Necessary]:l.includes("necessary"),[y.Functional]:l.includes("functional")};this.storage.updatePolicy(d);return}case"disallow-storage-key":{const{storageKey:l}=c.data||null;l&&this.storage.disallowKey(l);return}case"set-fullscreen-mode":{const{value:l}=c.data;typeof l=="boolean"&&this.setFullscreenMode(l);return}case"open":{this.appendToDOM();return}case"close":{this.hide();return}case"set-z-index":{const{zIndex:l}=c.data||null;l&&this.setZIndex(l);return}case"deactivate-widget":{const l=this.storage.get("open");this.hide(),(h=this.trigger)==null||h.hideTrigger(),l&&this.storage.set("open",!0);return}case"set-open":{typeof c.data.value=="boolean"&&(this.storage.set("open",c.data.value),this.root&&c.data.value===!0&&!this.root.isReady.getValue()&&this.root.isReady.next(!0));return}default:return}},this.renderStrategy=this.options.renderStrategy||$.Inline,this.triggerIcon=this.options.triggerIcon;const n={[y.Necessary]:!0,[y.Functional]:!0,[y.Analytics]:!0};this.storage=new Oe(this.id,"sessionStorage",n,this.settings.storage),typeof o.autoActivate=="boolean"&&(this.autoActivate=o.autoActivate),o.anchor&&(this.anchor=o.anchor),this.container.register("$settings",s),this.texts.loadTexts(s.texts||{}),window.addEventListener("message",this.onMessageReceived)}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ue.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().appendChild(t)}if(window!=null&&window.parent){const{version:t}=this.api.version();window.parent.postMessage({type:"widget-activated",data:{widgetId:this.id,version:t,storage:this.storage.stringify()}},"*")}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(t={}){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),this.root.removeAttribute("inert"),document.body.appendChild(this.root)),t.ignoreStorage||this.storage.set("open",!0)}hide(){this.root&&(this.root.contains(document.activeElement)&&(this.trigger&&typeof this.trigger.focus=="function"?this.trigger.focus():(document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.body.focus())),this.root.classList.add("hidden"),this.root.classList.remove("expanded"),this.root.setAttribute("inert","")),this.storage.set("open",!1)}setZIndex(t){this.root&&(this.root.style.zIndex=t.toString())}mute(){this.storage.set("muteAudioNotifications",!0)}unmute(){this.storage.set("muteAudioNotifications",!1)}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===$.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new q,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}_isEmbeddedInIFrame(){return window.self!==window.top&&window.__RENDER_WIDGET_FULLSCREEN__}setFullscreenMode(t){this.fullscreen=t,this.root&&(this.root.fullscreen=!0)}render(){if(this._isEmbeddedInIFrame())return this.root;if(!this._isEmbeddedInIFrame()&&this.root&&(this.root.isReady.getValue()||this.root.isReady.next(!0)),this.renderStrategy===$.Trigger){const t=new b;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const ji=r=>new U(r),rt=class rt{constructor(t=rt.endpoint){this._endpoint=t}async getSite(t){const i=await(await fetch(t)).json();return i?{id:i.id,triggers:i.triggers||[],apps:(i.widgets||[]).map(s=>{let o=$.Trigger;s.renderStrategy.toLowerCase()==="inline"&&(o=$.Inline);const n=s.widgetId?s.widgetId:s.id,a=typeof s.autoActivate=="boolean"?s.autoActivate:!1,c=typeof s.anchor=="string"?s.anchor:"BottomRight",h=typeof s.triggerIcon=="string"?s.triggerIcon:"question";return{id:n,widgetId:n,renderStrategy:o,autoActivate:a,anchor:c,triggerIcon:{type:"Telia",content:h}}})}:null}async getWidget(t){const i=await(await fetch(`${this._endpoint}/widget/${t}`)).json();return i?{name:i.name,config:JSON.parse(i.configuration)}:null}};rt.endpoint="https://widgets.ace.teliacompany.net/api";let U=rt;class Hi{constructor(t){this.site=t}storagePolicy(t){var i;(((i=this.site.environment)==null?void 0:i.applications)||[]).forEach(s=>{if(s.storage){const o={[y.Analytics]:t.includes("analytics"),[y.Necessary]:t.includes("necessary"),[y.Functional]:t.includes("functional")};s.storage.updatePolicy(o)}})}disallowStorageKey(t){var e;(((e=this.site.environment)==null?void 0:e.applications)||[]).forEach(i=>{i.storage&&i.storage.disallowKey(t)})}}class ke{constructor(){this.applications=[],this.container=new $t("environment",this),this.bootstrapped=!1,this.site=null,this.widgetAPIHandlers=new Map,this.siteConfigurationHandlers=[],setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate(),this.siteConfigurationHandlers.forEach(t=>{this.site&&t(this.site.api)});for(const[t,e]of this.widgetAPIHandlers)e.forEach(i=>{i()});this.bootstrapped=!0}async activate(){var e;const t=this.applications.filter(i=>i.autoActivate);(((e=this.site)==null?void 0:e.triggers)||[]).filter(i=>i.triggerType==="visit").forEach(i=>{const s=window.location.pathname,o=i.condition.outputs||[];i.condition.type==="url"&&o.forEach(n=>{const a=n.action.type==="render_widget";if((n.value===s||n.value==="*")&&a){let h={widgetId:""};try{h=JSON.parse(n.action.data)}catch{h={widgetId:""}}const l=t.findIndex(u=>u.id===h.widgetId)>-1,d=this.applications.find(u=>u.id===h.widgetId);d&&!l&&(d.autoActivate=!0,t.push(d))}})});for await(const i of t)await i.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const i=this.applications.find(s=>s.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}configure(t){if(!this.site||!this.bootstrapped){this.siteConfigurationHandlers.push(t);return}t(this.site.api)}widget(t,e){const i=this.applications.find(s=>s.name===t);if(!i){const s=this.widgetAPIHandlers.get(t)||[];s.push(()=>{const o=this.applications.find(n=>n.name===t);e(o==null?void 0:o.api)}),this.widgetAPIHandlers.set(t,s);return}e(i==null?void 0:i.api)}registerApp(t,e,i,s){const o=new $t(e,this),n=new Ie(t,e,o,i,s);this.applications.push(n)}registerSite(t){this.site=t}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class Te{constructor(t){this.configurations=[],this.httpClient=new U,this.api=new Hi(this),this.triggers=[],this.httpClient=new U,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps,this.triggers=e.triggers||[]}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}setHttpClient(t){this.httpClient=t}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new ke,this.addGlobal(this.environment);for await(const i of this.configurations){const s=await this.httpClient.getWidget(i.widgetId);s&&((e=this.environment)==null||e.registerApp(i.widgetId,s.name,s.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),this.environment.registerSite(this),await this.environment.bootstrap()}addGlobal(t){const e=globalThis.ace;((e==null?void 0:e._w)||[]).forEach(([i,s])=>{t.widget(i,s)}),((e==null?void 0:e._c)||[]).forEach(i=>{t.configure(i)}),globalThis.ace=t}}var Fi=Object.defineProperty,Tt=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&Fi(t,e,s),s};const Ut=class Ut extends A{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return p;if(this.widget.renderStrategy===$.Trigger){const t=new b;return t.application=this.widget,t}return this.widget.render()}};Ut.styles=[j`
456
+ `;let L=Lt;Se([m({attribute:!0})],L.prototype,"fullscreen");Se([m({attribute:!1}),Ti({context:Pe})],L.prototype,"application");class Mi{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},s=(a,c,h,l)=>{h.forEach(d=>{const u=i(d),f=l[u.definitionId];if(!f){console.error(`No definition found for component type '${u.definitionId}'.`);return}const g=a.createNode(f.type,f.type);g&&(g.name=u.definitionId,g.application=e,f.properties&&g.writeProperties(f.properties),f.context&&g.writeContext(f.context),f.layout&&g.writeLayout(f.layout),c.addChild(g),f.children&&s(a,g,f.children,l))})},{entry:o,components:n}=t;return s(this,this.root,[o],n),this.root}createRoot(){return typeof window<"u"&&(window.customElements.get("ace-wrapper")||window.customElements.define("ace-wrapper",L)),document.createElement("ace-wrapper")}createNode(t,e){if(!this.resolveComponent(e))return console.warn(`Unable to resolve component: ${e}`),new it;const s=document.createElement(`ace-${e}`);return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const st=class st{constructor(){this.components=new Map}getComponent(t){const e=this.components.get(t);return e||console.warn(`Unable to resolve component: ${t}. You most likely forgot to register the required plugin.`),e}registerComponent(t,e){this.components.set(t,e)}async loadComponents(){const t=[...this.components.entries()].map(([e,i])=>i.then(s=>{this.defineAsWebComponent(e,s.default)}));await Promise.all(t)}defineAsWebComponent(t,e){const i=st.ResolveWebComponentName(t);customElements.get(i)||customElements.define(i,e)}};st.ResolveWebComponentName=t=>`ace-${t}`;let At=st;var y=(r=>(r.Necessary="necessary",r.Functional="functional",r.Analytics="analytics",r))(y||{});class Oe{constructor(t,e,i,s){this.disallowedKeys=[],this.widgetId=t,this.storage=e==="localStorage"?window.localStorage:window.sessionStorage,this.policy=i,this.storageEntries=s}set(t,e){if(this.disallowedKeys.includes(t))return;const i=this.storageEntries[t];if(!i){console.warn(`Storage key '${t}' is not defined.`);return}const s=i.category;if(this.policy[s]){const o={value:e,category:s};this.storage.setItem(this._prefixKey(t),JSON.stringify(o))}else console.warn(`Storage policy does not allow storing items in category: ${s}`)}get(t){const e=this.storage.getItem(this._prefixKey(t));if(!e)return null;try{const i=JSON.parse(e);return this.policy[i.category]?i.value:(console.warn(`Storage policy does not allow retrieving items from category: ${i.category}`),null)}catch{return null}}removeItem(t){this.storage.removeItem(this._prefixKey(t))}enforcePolicy(){var t;for(const[e,i]of Object.entries(this.storage)){const s=(t=JSON.parse(i))==null?void 0:t.category;this.policy[s]||this.storage.removeItem(e)}}updatePolicy(t){this.policy=t,this.enforcePolicy()}disallowKey(t){this.disallowedKeys.includes(t)||this.disallowedKeys.push(t),this.removeItem(t)}stringify(){return JSON.stringify(this.storage)}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}}class Ni{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}const Li="##__WIDGETS_VERSION__##";class Ui{constructor(t){this.widget=t,this.name=t.name}open(t={}){this.widget.appendToDOM(t)}close(){this.widget.hide()}setFullscreenMode(t){this.widget.setFullscreenMode(t)}setZIndex(t){this.widget.setZIndex(t)}version(){return{version:Li}}}class Ie{constructor(t,e,i,s,o){this.id=t,this.name=e,this.container=i,this.settings=s,this.options=o,this.platform=new Mi,this.texts=new Ni,this.renderStrategy=$.Inline,this.fullscreen=!1,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new At,this.components=[],this.trigger=null,this.api=new Ui(this),this.onMessageReceived=async a=>{var h;const c=a.data;switch(c.type){case"set-storage-policies":{const{policies:l}=c.data||[],d={[y.Analytics]:l.includes("analytics"),[y.Necessary]:l.includes("necessary"),[y.Functional]:l.includes("functional")};this.storage.updatePolicy(d);return}case"disallow-storage-key":{const{storageKey:l}=c.data||null;l&&this.storage.disallowKey(l);return}case"set-fullscreen-mode":{const{value:l}=c.data;typeof l=="boolean"&&this.setFullscreenMode(l);return}case"open":{this.appendToDOM();return}case"close":{this.hide();return}case"set-z-index":{const{zIndex:l}=c.data||null;l&&this.setZIndex(l);return}case"deactivate-widget":{const l=this.storage.get("open");this.hide(),(h=this.trigger)==null||h.hideTrigger(),l&&this.storage.set("open",!0);return}case"set-open":{typeof c.data.value=="boolean"&&(this.storage.set("open",c.data.value),this.root&&c.data.value===!0&&!this.root.isReady.getValue()&&this.root.isReady.next(!0));return}default:return}},this.renderStrategy=this.options.renderStrategy||$.Inline,this.triggerIcon=this.options.triggerIcon;const n={[y.Necessary]:!0,[y.Functional]:!0,[y.Analytics]:!0};this.storage=new Oe(this.id,"sessionStorage",n,this.settings.storage),typeof o.autoActivate=="boolean"&&(this.autoActivate=o.autoActivate),o.anchor&&(this.anchor=o.anchor),this.container.register("$settings",s),this.texts.loadTexts(s.texts||{}),window.addEventListener("message",this.onMessageReceived)}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ue.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().appendChild(t)}if(window!=null&&window.parent){const{version:t}=this.api.version();window.parent.postMessage({type:"widget-activated",data:{widgetId:this.id,version:t,storage:this.storage.stringify()}},"*")}}async loadPlugins(){for await(const t of this.plugins)await t(this)}styles(){return this.settings.styles||{}}branding(){return this.settings.branding||{}}plugin(t){return this.plugins.push(t),this}appendToDOM(t={}){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),this.root.removeAttribute("inert"),document.body.appendChild(this.root)),t.ignoreStorage||this.storage.set("open",!0)}hide(){this.root&&(this.root.contains(document.activeElement)&&(this.trigger&&typeof this.trigger.focus=="function"?this.trigger.focus():(document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.body.focus())),this.root.classList.add("hidden"),this.root.classList.remove("expanded"),this.root.setAttribute("inert","")),this.storage.set("open",!1)}setZIndex(t){this.root&&(this.root.style.zIndex=t.toString())}mute(){this.storage.set("muteAudioNotifications",!0)}unmute(){this.storage.set("muteAudioNotifications",!1)}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===$.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new q,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}_isEmbeddedInIFrame(){return window.self!==window.top&&window.__RENDER_WIDGET_FULLSCREEN__}setFullscreenMode(t){this.fullscreen=t,this.root&&(this.root.fullscreen=!0)}render(){if(this._isEmbeddedInIFrame())return this.root;if(!this._isEmbeddedInIFrame()&&this.root&&(this.root.isReady.getValue()||this.root.isReady.next(!0)),this.renderStrategy===$.Trigger){const t=new b;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const ji=r=>new U(r),rt=class rt{constructor(t=rt.endpoint){this._endpoint=t}async getSite(t){const i=await(await fetch(t)).json();return i?{id:i.id,triggers:i.triggers||[],apps:(i.widgets||[]).map(s=>{let o=$.Trigger;s.renderStrategy.toLowerCase()==="inline"&&(o=$.Inline);const n=s.widgetId?s.widgetId:s.id,a=typeof s.autoActivate=="boolean"?s.autoActivate:!1,c=typeof s.anchor=="string"?s.anchor:"BottomRight",h=typeof s.triggerIcon=="string"?s.triggerIcon:"question";return{id:n,widgetId:n,renderStrategy:o,autoActivate:a,anchor:c,triggerIcon:{type:"Telia",content:h}}})}:null}async getWidget(t){const i=await(await fetch(`${this._endpoint}/widget/${t}`)).json();return i?{name:i.name,config:JSON.parse(i.configuration)}:null}};rt.endpoint="https://widgets.ace.teliacompany.net/api";let U=rt;class Hi{constructor(t){this.site=t}storagePolicy(t){var i;(((i=this.site.environment)==null?void 0:i.applications)||[]).forEach(s=>{if(s.storage){const o={[y.Analytics]:t.includes("analytics"),[y.Necessary]:t.includes("necessary"),[y.Functional]:t.includes("functional")};s.storage.updatePolicy(o)}})}disallowStorageKey(t){var e;(((e=this.site.environment)==null?void 0:e.applications)||[]).forEach(i=>{i.storage&&i.storage.disallowKey(t)})}}class ke{constructor(){this.applications=[],this.container=new $t("environment",this),this.bootstrapped=!1,this.site=null,this.widgetAPIHandlers=new Map,this.siteConfigurationHandlers=[],setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate(),this.siteConfigurationHandlers.forEach(t=>{this.site&&t(this.site.api)});for(const[t,e]of this.widgetAPIHandlers)e.forEach(i=>{i()});this.bootstrapped=!0}async activate(){var e;const t=this.applications.filter(i=>i.autoActivate);(((e=this.site)==null?void 0:e.triggers)||[]).filter(i=>i.triggerType==="visit").forEach(i=>{const s=window.location.pathname,o=i.condition.outputs||[];i.condition.type==="url"&&o.forEach(n=>{const a=n.action.type==="render_widget";if((n.value===s||n.value==="*")&&a){let h={widgetId:""};try{h=JSON.parse(n.action.data)}catch{h={widgetId:""}}const l=t.findIndex(u=>u.id===h.widgetId)>-1,d=this.applications.find(u=>u.id===h.widgetId);d&&!l&&(d.autoActivate=!0,t.push(d))}})});for await(const i of t)await i.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const i=this.applications.find(s=>s.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}configure(t){if(!this.site||!this.bootstrapped){this.siteConfigurationHandlers.push(t);return}t(this.site.api)}widget(t,e){const i=this.applications.find(s=>s.name===t);if(!i){const s=this.widgetAPIHandlers.get(t)||[];s.push(()=>{const o=this.applications.find(n=>n.name===t);e(o==null?void 0:o.api)}),this.widgetAPIHandlers.set(t,s);return}e(i==null?void 0:i.api)}registerApp(t,e,i,s){const o=new $t(e,this),n=new Ie(t,e,o,i,s);this.applications.push(n)}registerSite(t){this.site=t}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class Te{constructor(t){this.configurations=[],this.httpClient=new U,this.api=new Hi(this),this.triggers=[],this.httpClient=new U,typeof t=="string"?this.url=t:(t.httpClient&&(this.httpClient=t.httpClient),this.loadFromConfig(t))}async load(t){const e=await this.httpClient.getSite(t);if(!e){console.warn(`Unable to load site from the url provided: ${t}`);return}this.configurations=e.apps,this.triggers=e.triggers||[]}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}setHttpClient(t){this.httpClient=t}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new ke,this.addGlobal(this.environment);for await(const i of this.configurations){const s=await this.httpClient.getWidget(i.widgetId);s&&((e=this.environment)==null||e.registerApp(i.widgetId,s.name,s.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),this.environment.registerSite(this),await this.environment.bootstrap()}addGlobal(t){const e=globalThis.ace;((e==null?void 0:e._w)||[]).forEach(([i,s])=>{t.widget(i,s)}),((e==null?void 0:e._c)||[]).forEach(i=>{t.configure(i)}),globalThis.ace=t}}var Fi=Object.defineProperty,Tt=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&Fi(t,e,s),s};const Ut=class Ut extends A{constructor(){super(),this.status="deactivated",this.addEventListener("environment-created",this.onEnvironmentCreated)}async connectedCallback(){super.connectedCallback(),await this.getGlobalEnvironment()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("environment-created",this.onEnvironmentCreated)}async onEnvironmentCreated(t){this.widget=t.detail.widget,await this.activate(),this.requestUpdate()}async activate(){this.widget&&(await this.widget.activate(),this.status="activated")}async getGlobalEnvironment(){const t=globalThis.widgets;t&&(this.widget=t.applications.find(e=>e.name===this.name),await this.activate())}render(){if(!this.widget||this.status!=="activated")return p;if(this.widget.renderStrategy===$.Trigger){const t=new b;return t.application=this.widget,t}return this.widget.render()}};Ut.styles=[j`
457
457
  :host {
458
458
  display: block;
459
459
  }
package/index.mjs CHANGED
@@ -70,7 +70,7 @@ function bt(r, t) {
70
70
  0 <= e && r.splice(e, 1);
71
71
  }
72
72
  }
73
- var ot = function() {
73
+ var ot = (function() {
74
74
  function r(t) {
75
75
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
76
76
  }
@@ -154,11 +154,11 @@ var ot = function() {
154
154
  }, r.prototype.remove = function(t) {
155
155
  var e = this._finalizers;
156
156
  e && bt(e, t), t instanceof r && t._removeParent(this);
157
- }, r.EMPTY = function() {
157
+ }, r.EMPTY = (function() {
158
158
  var t = new r();
159
159
  return t.closed = !0, t;
160
- }(), r;
161
- }(), he = ot.EMPTY;
160
+ })(), r;
161
+ })(), he = ot.EMPTY;
162
162
  function le(r) {
163
163
  return r instanceof ot || r && "closed" in r && _(r.remove) && _(r.add) && _(r.unsubscribe);
164
164
  }
@@ -188,7 +188,7 @@ function jt() {
188
188
  function J(r) {
189
189
  r();
190
190
  }
191
- var de = function(r) {
191
+ var de = (function(r) {
192
192
  G(t, r);
193
193
  function t(e) {
194
194
  var i = r.call(this) || this;
@@ -219,7 +219,7 @@ var de = function(r) {
219
219
  this.unsubscribe();
220
220
  }
221
221
  }, t;
222
- }(ot), Oe = function() {
222
+ })(ot), Oe = (function() {
223
223
  function r(t) {
224
224
  this.partialObserver = t;
225
225
  }
@@ -250,7 +250,7 @@ var de = function(r) {
250
250
  Z(e);
251
251
  }
252
252
  }, r;
253
- }(), wt = function(r) {
253
+ })(), wt = (function(r) {
254
254
  G(t, r);
255
255
  function t(e, i, s) {
256
256
  var o = r.call(this) || this, n;
@@ -261,7 +261,7 @@ var de = function(r) {
261
261
  } : n = e, o.destination = new Oe(n), o;
262
262
  }
263
263
  return t;
264
- }(de);
264
+ })(de);
265
265
  function Z(r) {
266
266
  Pe(r);
267
267
  }
@@ -273,9 +273,9 @@ var ke = {
273
273
  next: jt,
274
274
  error: Ie,
275
275
  complete: jt
276
- }, Te = function() {
276
+ }, Te = (function() {
277
277
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
278
- }();
278
+ })();
279
279
  function Re(r) {
280
280
  return r;
281
281
  }
@@ -286,7 +286,7 @@ function Me(r) {
286
286
  }, e);
287
287
  };
288
288
  }
289
- var Ht = function() {
289
+ var Ht = (function() {
290
290
  function r(t) {
291
291
  t && (this._subscribe = t);
292
292
  }
@@ -345,7 +345,7 @@ var Ht = function() {
345
345
  }, r.create = function(t) {
346
346
  return new r(t);
347
347
  }, r;
348
- }();
348
+ })();
349
349
  function Ft(r) {
350
350
  var t;
351
351
  return (t = r ?? Ee.Promise) !== null && t !== void 0 ? t : Promise;
@@ -360,7 +360,7 @@ var Ue = ce(function(r) {
360
360
  return function() {
361
361
  r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
362
362
  };
363
- }), At = function(r) {
363
+ }), At = (function(r) {
364
364
  G(t, r);
365
365
  function t() {
366
366
  var e = r.call(this) || this;
@@ -439,7 +439,7 @@ var Ue = ce(function(r) {
439
439
  }, t.create = function(e, i) {
440
440
  return new Bt(e, i);
441
441
  }, t;
442
- }(Ht), Bt = function(r) {
442
+ })(Ht), Bt = (function(r) {
443
443
  G(t, r);
444
444
  function t(e, i) {
445
445
  var s = r.call(this) || this;
@@ -458,7 +458,7 @@ var Ue = ce(function(r) {
458
458
  var i, s;
459
459
  return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : he;
460
460
  }, t;
461
- }(At), xt = function(r) {
461
+ })(At), xt = (function(r) {
462
462
  G(t, r);
463
463
  function t(e) {
464
464
  var i = r.call(this) || this;
@@ -481,7 +481,7 @@ var Ue = ce(function(r) {
481
481
  }, t.prototype.next = function(e) {
482
482
  r.prototype.next.call(this, this._value = e);
483
483
  }, t;
484
- }(At), ue = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(ue || {});
484
+ })(At), ue = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(ue || {});
485
485
  class Dt {
486
486
  constructor(t, e) {
487
487
  this.state = new xt(
@@ -527,14 +527,14 @@ let pe = class {
527
527
  }
528
528
  };
529
529
  const je = (r) => new pe(typeof r == "string" ? r : r + "", void 0, Et), U = (r, ...t) => {
530
- const e = r.length === 1 ? r[0] : t.reduce((i, s, o) => i + ((n) => {
530
+ const e = r.length === 1 ? r[0] : t.reduce(((i, s, o) => i + ((n) => {
531
531
  if (n._$cssResult$ === !0) return n.cssText;
532
532
  if (typeof n == "number") return n;
533
533
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
534
- })(s) + r[o + 1], r[0]);
534
+ })(s) + r[o + 1]), r[0]);
535
535
  return new pe(e, r, Et);
536
536
  }, He = (r, t) => {
537
- if (Ct) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
537
+ if (Ct) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
538
538
  else for (const e of t) {
539
539
  const i = document.createElement("style"), s = X.litNonce;
540
540
  s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
@@ -646,7 +646,7 @@ let T = class extends HTMLElement {
646
646
  }
647
647
  _$Ev() {
648
648
  var t;
649
- this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
649
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach(((e) => e(this)));
650
650
  }
651
651
  addController(t) {
652
652
  var e;
@@ -667,19 +667,19 @@ let T = class extends HTMLElement {
667
667
  }
668
668
  connectedCallback() {
669
669
  var t;
670
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
670
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach(((e) => {
671
671
  var i;
672
672
  return (i = e.hostConnected) == null ? void 0 : i.call(e);
673
- });
673
+ }));
674
674
  }
675
675
  enableUpdating(t) {
676
676
  }
677
677
  disconnectedCallback() {
678
678
  var t;
679
- (t = this._$EO) == null || t.forEach((e) => {
679
+ (t = this._$EO) == null || t.forEach(((e) => {
680
680
  var i;
681
681
  return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
682
- });
682
+ }));
683
683
  }
684
684
  attributeChangedCallback(t, e, i) {
685
685
  this._$AK(t, i);
@@ -744,10 +744,10 @@ let T = class extends HTMLElement {
744
744
  let t = !1;
745
745
  const e = this._$AL;
746
746
  try {
747
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
747
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach(((s) => {
748
748
  var o;
749
749
  return (o = s.hostUpdate) == null ? void 0 : o.call(s);
750
- }), this.update(e)) : this._$EM();
750
+ })), this.update(e)) : this._$EM();
751
751
  } catch (s) {
752
752
  throw t = !1, this._$EM(), s;
753
753
  }
@@ -757,10 +757,10 @@ let T = class extends HTMLElement {
757
757
  }
758
758
  _$AE(t) {
759
759
  var e;
760
- (e = this._$EO) == null || e.forEach((i) => {
760
+ (e = this._$EO) == null || e.forEach(((i) => {
761
761
  var s;
762
762
  return (s = i.hostUpdated) == null ? void 0 : s.call(i);
763
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
763
+ })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
764
764
  }
765
765
  _$EM() {
766
766
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -775,7 +775,7 @@ let T = class extends HTMLElement {
775
775
  return !0;
776
776
  }
777
777
  update(t) {
778
- this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();
778
+ this._$Eq && (this._$Eq = this._$Eq.forEach(((e) => this._$ET(e, this[e])))), this._$EM();
779
779
  }
780
780
  updated(t) {
781
781
  }
@@ -1225,7 +1225,7 @@ class $e extends be {
1225
1225
  }
1226
1226
  const di = /* @__PURE__ */ new WeakMap();
1227
1227
  let Qt = 0;
1228
- const ut = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new WeakSet(), ee = () => new Promise((r) => requestAnimationFrame(r)), ui = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], ie = (r, t) => {
1228
+ const ut = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new WeakSet(), ee = () => new Promise(((r) => requestAnimationFrame(r))), ui = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], ie = (r, t) => {
1229
1229
  const e = r - t;
1230
1230
  return e === 0 ? void 0 : e;
1231
1231
  }, se = (r, t) => {
@@ -1255,9 +1255,9 @@ class gi extends $e {
1255
1255
  }
1256
1256
  createFinished() {
1257
1257
  var t;
1258
- (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
1258
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise(((e) => {
1259
1259
  this.l = e;
1260
- });
1260
+ }));
1261
1261
  }
1262
1262
  async resolveFinished() {
1263
1263
  var t;
@@ -1276,7 +1276,7 @@ class gi extends $e {
1276
1276
  update(t, [e]) {
1277
1277
  var s;
1278
1278
  const i = this.u === void 0;
1279
- return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((o) => this.t = !0), this.element = t.element, re.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
1279
+ return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then(((o) => this.t = !0)), this.element = t.element, re.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
1280
1280
  }
1281
1281
  p(t) {
1282
1282
  t = t ?? {};
@@ -1285,16 +1285,16 @@ class gi extends $e {
1285
1285
  }
1286
1286
  m() {
1287
1287
  const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
1288
- return this.options.properties.forEach((s) => {
1288
+ return this.options.properties.forEach(((s) => {
1289
1289
  const o = e[s] ?? (pt[s] ? void 0 : i[s]), n = Number(o);
1290
1290
  t[s] = isNaN(n) ? o + "" : n;
1291
- }), t;
1291
+ })), t;
1292
1292
  }
1293
1293
  v() {
1294
1294
  let t, e = !0;
1295
1295
  return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
1296
1296
  if (Array.isArray(i)) {
1297
- if (Array.isArray(s) && s.length === i.length && i.every((o, n) => o === s[n])) return !1;
1297
+ if (Array.isArray(s) && s.length === i.length && i.every(((o, n) => o === s[n]))) return !1;
1298
1298
  } else if (s === i) return !1;
1299
1299
  return !0;
1300
1300
  })(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
@@ -1315,7 +1315,7 @@ class gi extends $e {
1315
1315
  if (o) {
1316
1316
  ut.delete(this.options.inId);
1317
1317
  const { from: n, to: a } = this.N(o, s, e);
1318
- t = this.calculateKeyframes(n, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Qt++, t.forEach((c) => c.zIndex = Qt);
1318
+ t = this.calculateKeyframes(n, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Qt++, t.forEach(((c) => c.zIndex = Qt));
1319
1319
  } else this.options.in && (t = [...this.options.in, {}]);
1320
1320
  }
1321
1321
  this.animate(t, i);
@@ -1365,21 +1365,21 @@ class gi extends $e {
1365
1365
  }
1366
1366
  get isHostRendered() {
1367
1367
  const t = te.has(this.u);
1368
- return t || this.u.updateComplete.then(() => {
1368
+ return t || this.u.updateComplete.then((() => {
1369
1369
  te.add(this.u);
1370
- }), t;
1370
+ })), t;
1371
1371
  }
1372
1372
  j(t, e = this.O()) {
1373
1373
  const i = { ...pi };
1374
- return e.forEach((s) => Object.assign(i, s.options.keyframeOptions)), Object.assign(i, t), i;
1374
+ return e.forEach(((s) => Object.assign(i, s.options.keyframeOptions))), Object.assign(i, t), i;
1375
1375
  }
1376
1376
  N(t, e, i) {
1377
1377
  t = { ...t }, e = { ...e };
1378
- const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
1378
+ const s = i.map(((a) => a.animatingProperties)).filter(((a) => a !== void 0));
1379
1379
  let o = 1, n = 1;
1380
- return s.length > 0 && (s.forEach((a) => {
1380
+ return s.length > 0 && (s.forEach(((a) => {
1381
1381
  a.width && (o /= a.width), a.height && (n /= a.height);
1382
- }), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
1382
+ })), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
1383
1383
  }
1384
1384
  calculateKeyframes(t, e, i = !1) {
1385
1385
  const s = {}, o = {};
@@ -1431,12 +1431,12 @@ const oe = It(class extends be {
1431
1431
  if (super(r), r.type !== Ot.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1432
1432
  }
1433
1433
  render(r) {
1434
- return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
1434
+ return " " + Object.keys(r).filter(((t) => r[t])).join(" ") + " ";
1435
1435
  }
1436
1436
  update(r, [t]) {
1437
1437
  var i, s;
1438
1438
  if (this.st === void 0) {
1439
- this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((o) => o !== "")));
1439
+ this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter(((o) => o !== ""))));
1440
1440
  for (const o in t) t[o] && !((i = this.nt) != null && i.has(o)) && this.st.add(o);
1441
1441
  return this.render(t);
1442
1442
  }
@@ -1993,9 +1993,9 @@ function Si({ context: r }) {
1993
1993
  return i.set(this, new ne(this, { context: r, initialValue: s })), s;
1994
1994
  } };
1995
1995
  {
1996
- t.constructor.addInitializer((n) => {
1996
+ t.constructor.addInitializer(((n) => {
1997
1997
  i.set(n, new ne(n, { context: r }));
1998
- });
1998
+ }));
1999
1999
  const s = Object.getOwnPropertyDescriptor(t, e);
2000
2000
  let o;
2001
2001
  if (s === void 0) {
@@ -2382,7 +2382,7 @@ class Ti {
2382
2382
  return this.texts.get(t) || e;
2383
2383
  }
2384
2384
  }
2385
- const Ri = "1.1.121-rc.1";
2385
+ const Ri = "##__WIDGETS_VERSION__##";
2386
2386
  class Mi {
2387
2387
  constructor(t) {
2388
2388
  this.widget = t, this.name = t.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.121-rc.1",
3
+ "version": "1.1.121",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",