@telia-ace/widget-core-flamingo 1.1.28-rc.1 → 1.1.28-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +43 -36
  2. package/index.mjs +977 -760
  3. package/package.json +3 -2
package/index.js CHANGED
@@ -1,66 +1,70 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var pt=function(i,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])},pt(i,t)};function D(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pt(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ut(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],r=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var r=e.call(i),s,n=[],o;try{for(;(t===void 0||t-- >0)&&!(s=r.next()).done;)n.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return n}function K(i,t,e){if(e||arguments.length===2)for(var r=0,s=t.length,n;r<s;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return i.concat(n||Array.prototype.slice.call(t))}function b(i){return typeof i=="function"}function Nt(i){var t=function(r){Error.call(r),r.stack=new Error().stack},e=i(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var st=Nt(function(i){return function(e){i(this),this.message=e?e.length+` errors occurred during unsubscription:
2
- `+e.map(function(r,s){return s+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=e}});function dt(i,t){if(i){var e=i.indexOf(t);0<=e&&i.splice(e,1)}}var et=function(){function i(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i.prototype.unsubscribe=function(){var t,e,r,s,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ut(o),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 o.remove(this);var p=this.initialTeardown;if(b(p))try{p()}catch(v){n=v instanceof st?v.errors:[v]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=ut(l),u=f.next();!u.done;u=f.next()){var g=u.value;try{wt(g)}catch(v){n=n??[],v instanceof st?n=K(K([],J(n)),J(v.errors)):n.push(v)}}}catch(v){r={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}}if(n)throw new st(n)}},i.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)wt(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},i.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},i.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},i.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&dt(e,t)},i.prototype.remove=function(t){var e=this._finalizers;e&&dt(e,t),t instanceof i&&t._removeParent(this)},i.EMPTY=function(){var t=new i;return t.closed=!0,t}(),i}(),Lt=et.EMPTY;function Bt(i){return i instanceof et||i&&"closed"in i&&b(i.remove)&&b(i.add)&&b(i.unsubscribe)}function wt(i){b(i)?i():i.unsubscribe()}var Dt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ft={setTimeout:function(i,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var s=ft.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,K([i,t],J(e))):setTimeout.apply(void 0,K([i,t],J(e)))},clearTimeout:function(i){var t=ft.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(i)},delegate:void 0};function pe(i){ft.setTimeout(function(){throw i})}function At(){}function Y(i){i()}var zt=function(i){D(t,i);function t(e){var r=i.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Bt(e)&&e.add(r)):r.destination=ge,r}return t.create=function(e,r,s){return new gt(e,r,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,i.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(et),ue=Function.prototype.bind;function nt(i,t){return ue.call(i,t)}var de=function(){function i(t){this.partialObserver=t}return i.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){V(r)}},i.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){V(r)}else V(t)},i.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){V(e)}},i}(),gt=function(i){D(t,i);function t(e,r,s){var n=i.call(this)||this,o;if(b(e)||!e)o={next:e??void 0,error:r??void 0,complete:s??void 0};else{var a;n&&Dt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&nt(e.next,a),error:e.error&&nt(e.error,a),complete:e.complete&&nt(e.complete,a)}):o=e}return n.destination=new de(o),n}return t}(zt);function V(i){pe(i)}function fe(i){throw i}var ge={closed:!0,next:At,error:fe,complete:At},ve=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ye(i){return i}function me(i){return i.length===0?ye:i.length===1?i[0]:function(e){return i.reduce(function(r,s){return s(r)},e)}}var St=function(){function i(t){t&&(this._subscribe=t)}return i.prototype.lift=function(t){var e=new i;return e.source=this,e.operator=t,e},i.prototype.subscribe=function(t,e,r){var s=this,n=_e(t)?t:new gt(t,e,r);return Y(function(){var o=s,a=o.operator,c=o.source;n.add(a?a.call(n,c):c?s._subscribe(n):s._trySubscribe(n))}),n},i.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},i.prototype.forEach=function(t,e){var r=this;return e=xt(e),new e(function(s,n){var o=new gt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:s});r.subscribe(o)})},i.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},i.prototype[ve]=function(){return this},i.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return me(t)(this)},i.prototype.toPromise=function(t){var e=this;return t=xt(t),new t(function(r,s){var n;e.subscribe(function(o){return n=o},function(o){return s(o)},function(){return r(n)})})},i.create=function(t){return new i(t)},i}();function xt(i){var t;return(t=i??Dt.Promise)!==null&&t!==void 0?t:Promise}function be(i){return i&&b(i.next)&&b(i.error)&&b(i.complete)}function _e(i){return i&&i instanceof zt||be(i)&&Bt(i)}var $e=Nt(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Wt=function(i){D(t,i);function t(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new Et(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new $e},t.prototype.next=function(e){var r=this;Y(function(){var s,n;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=ut(r.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){s={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var r=this;Y(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var s=r.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Y(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,s=this,n=s.hasError,o=s.isStopped,a=s.observers;return n||o?Lt:(this.currentObservers=null,a.push(e),new et(function(){r.currentObservers=null,dt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,s=r.hasError,n=r.thrownError,o=r.isStopped;s?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new St;return e.source=this,e},t.create=function(e,r){return new Et(e,r)},t}(St),Et=function(i){D(t,i);function t(e,r){var s=i.call(this)||this;return s.destination=e,s.source=r,s}return t.prototype.next=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,e)},t.prototype.error=function(e){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&s!==void 0?s:Lt},t}(Wt),we=function(i){D(t,i);function t(e){var r=i.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=i.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,s=e.thrownError,n=e._value;if(r)throw s;return this._throwIfClosed(),n},t.prototype.next=function(e){i.prototype.next.call(this,this._value=e)},t}(Wt),Gt=(i=>(i.Loading="loading",i.Ready="ready",i))(Gt||{});class vt{constructor(t,e){this.state=new we("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)}}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ut=function(s,t){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},ut(s,t)};function B(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ut(s,t);function e(){this.constructor=s}s.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ft(s){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&s[t],i=0;if(e)return e.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&i>=s.length&&(s=void 0),{value:s&&s[i++],done:!s}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var i=e.call(s),r,n=[],o;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)n.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return n}function J(s,t,e){if(e||arguments.length===2)for(var i=0,r=t.length,n;i<r;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return s.concat(n||Array.prototype.slice.call(t))}function b(s){return typeof s=="function"}function Yt(s){var t=function(i){Error.call(i),i.stack=new Error().stack},e=s(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var rt=Yt(function(s){return function(e){s(this),this.message=e?e.length+` errors occurred during unsubscription:
2
+ `+e.map(function(i,r){return r+1+") "+i.toString()}).join(`
3
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function gt(s,t){if(s){var e=s.indexOf(t);0<=e&&s.splice(e,1)}}var et=function(){function s(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return s.prototype.unsubscribe=function(){var t,e,i,r,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ft(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var h=this.initialTeardown;if(b(h))try{h()}catch(m){n=m instanceof rt?m.errors:[m]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=ft(p),u=d.next();!u.done;u=d.next()){var g=u.value;try{Ct(g)}catch(m){n=n??[],m instanceof rt?n=J(J([],K(n)),K(m.errors)):n.push(m)}}}catch(m){i={error:m}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}}if(n)throw new rt(n)}},s.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Ct(t);else{if(t instanceof s){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},s.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},s.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},s.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&gt(e,t)},s.prototype.remove=function(t){var e=this._finalizers;e&&gt(e,t),t instanceof s&&t._removeParent(this)},s.EMPTY=function(){var t=new s;return t.closed=!0,t}(),s}(),Kt=et.EMPTY;function Jt(s){return s instanceof et||s&&"closed"in s&&b(s.remove)&&b(s.add)&&b(s.unsubscribe)}function Ct(s){b(s)?s():s.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},mt={setTimeout:function(s,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var r=mt.delegate;return r!=null&&r.setTimeout?r.setTimeout.apply(r,J([s,t],K(e))):setTimeout.apply(void 0,J([s,t],K(e)))},clearTimeout:function(s){var t=mt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(s)},delegate:void 0};function $e(s){mt.setTimeout(function(){throw s})}function Et(){}function q(s){s()}var Zt=function(s){B(t,s);function t(e){var i=s.call(this)||this;return i.isStopped=!1,e?(i.destination=e,Jt(e)&&e.add(i)):i.destination=Se,i}return t.create=function(e,i,r){return new vt(e,i,r)},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,s.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}(et),_e=Function.prototype.bind;function nt(s,t){return _e.call(s,t)}var we=function(){function s(t){this.partialObserver=t}return s.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){G(i)}},s.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){G(i)}else G(t)},s.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){G(e)}},s}(),vt=function(s){B(t,s);function t(e,i,r){var n=s.call(this)||this,o;if(b(e)||!e)o={next:e??void 0,error:i??void 0,complete:r??void 0};else{var a;n&&Xt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&nt(e.next,a),error:e.error&&nt(e.error,a),complete:e.complete&&nt(e.complete,a)}):o=e}return n.destination=new we(o),n}return t}(Zt);function G(s){$e(s)}function Ae(s){throw s}var Se={closed:!0,next:Et,error:Ae,complete:Et},xe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ce(s){return s}function Ee(s){return s.length===0?Ce:s.length===1?s[0]:function(e){return s.reduce(function(i,r){return r(i)},e)}}var Pt=function(){function s(t){t&&(this._subscribe=t)}return s.prototype.lift=function(t){var e=new s;return e.source=this,e.operator=t,e},s.prototype.subscribe=function(t,e,i){var r=this,n=Oe(t)?t:new vt(t,e,i);return q(function(){var o=r,a=o.operator,c=o.source;n.add(a?a.call(n,c):c?r._subscribe(n):r._trySubscribe(n))}),n},s.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},s.prototype.forEach=function(t,e){var i=this;return e=Ot(e),new e(function(r,n){var o=new vt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:r});i.subscribe(o)})},s.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},s.prototype[xe]=function(){return this},s.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ee(t)(this)},s.prototype.toPromise=function(t){var e=this;return t=Ot(t),new t(function(i,r){var n;e.subscribe(function(o){return n=o},function(o){return r(o)},function(){return i(n)})})},s.create=function(t){return new s(t)},s}();function Ot(s){var t;return(t=s??Xt.Promise)!==null&&t!==void 0?t:Promise}function Pe(s){return s&&b(s.next)&&b(s.error)&&b(s.complete)}function Oe(s){return s&&s instanceof Zt||Pe(s)&&Jt(s)}var Te=Yt(function(s){return function(){s(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Qt=function(s){B(t,s);function t(){var e=s.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 Tt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Te},t.prototype.next=function(e){var i=this;q(function(){var r,n;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=ft(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var i=this;q(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var r=i.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;q(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(),s.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,r=this,n=r.hasError,o=r.isStopped,a=r.observers;return n||o?Kt:(this.currentObservers=null,a.push(e),new et(function(){i.currentObservers=null,gt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,r=i.hasError,n=i.thrownError,o=i.isStopped;r?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new Pt;return e.source=this,e},t.create=function(e,i){return new Tt(e,i)},t}(Pt),Tt=function(s){B(t,s);function t(e,i){var r=s.call(this)||this;return r.destination=e,r.source=i,r}return t.prototype.next=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.next)===null||r===void 0||r.call(i,e)},t.prototype.error=function(e){var i,r;(r=(i=this.destination)===null||i===void 0?void 0:i.error)===null||r===void 0||r.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,r;return(r=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&r!==void 0?r:Kt},t}(Qt),Ue=function(s){B(t,s);function t(e){var i=s.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=s.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,r=e.thrownError,n=e._value;if(i)throw r;return this._throwIfClosed(),n},t.prototype.next=function(e){s.prototype.next.call(this,this._value=e)},t}(Qt),te=(s=>(s.Loading="loading",s.Ready="ready",s))(te||{});class yt{constructor(t,e){this.state=new Ue("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 F=globalThis,yt=F.ShadowRoot&&(F.ShadyCSS===void 0||F.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),Ct=new WeakMap;let Vt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==mt)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(yt&&t===void 0){const r=e!==void 0&&e.length===1;r&&(t=Ct.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Ct.set(e,t))}return t}toString(){return this.cssText}};const Ae=i=>new Vt(typeof i=="string"?i:i+"",void 0,mt),z=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((r,s,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[n+1],i[0]);return new Vt(e,i,mt)},Se=(i,t)=>{if(yt)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const r=document.createElement("style"),s=F.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,i.appendChild(r)}},Pt=yt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return Ae(e)})(i):i;/**
7
+ */const Y=globalThis,bt=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$t=Symbol(),Ut=new WeakMap;let ee=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==$t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(bt&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ut.set(e,t))}return t}toString(){return this.cssText}};const ke=s=>new ee(typeof s=="string"?s:s+"",void 0,$t),z=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,r,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[n+1],s[0]);return new ee(e,s,$t)},Re=(s,t)=>{if(bt)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=Y.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},kt=bt?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ke(e)})(s):s;/**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const{is:xe,defineProperty:Ee,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:Pe,getOwnPropertySymbols:Te,getPrototypeOf:Oe}=Object,$=globalThis,Tt=$.trustedTypes,Ue=Tt?Tt.emptyScript:"",ot=$.reactiveElementPolyfillSupport,k=(i,t)=>i,Z={toAttribute(i,t){switch(t){case Boolean:i=i?Ue:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},bt=(i,t)=>!xe(i,t),Ot={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:bt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class T 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=Ot){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Ee(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:n}=Ce(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return s==null?void 0:s.call(this)},set(o){const a=s==null?void 0:s.call(this);n.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ot}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const t=Oe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,r=[...Pe(e),...Te(e)];for(const s of r)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)e.unshift(Pt(s))}else t!==void 0&&e.push(Pt(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r: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._$Eg=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._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Se(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var r;return(r=e.hostConnected)==null?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e){var n;const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const o=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Z).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var n;const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=r.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:Z;this._$Em=s,this[s]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,r,s=!1,n){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??bt)(s?n:this[t],e))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,o]of s)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(r=this._$ES)==null||r.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[k("elementProperties")]=new Map,T[k("finalized")]=new Map,ot==null||ot({ReactiveElement:T}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.0.1");/**
11
+ */const{is:Ie,defineProperty:Ne,getOwnPropertyDescriptor:Me,getOwnPropertyNames:je,getOwnPropertySymbols:He,getPrototypeOf:Le}=Object,_=globalThis,Rt=_.trustedTypes,De=Rt?Rt.emptyScript:"",ot=_.reactiveElementPolyfillSupport,N=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},_t=(s,t)=>!Ie(s,t),It={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:_t};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);let O=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=It){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Ne(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=Me(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const a=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??It}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;const t=Le(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(N("properties"))){const e=this.properties,i=[...je(e),...He(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,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 r of i)e.unshift(kt(r))}else t!==void 0&&e.push(kt(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._$Eg=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._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$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 Re(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){var n;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:X).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:X;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i,r=!1,n){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??_t)(r?n:this[t],e))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}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._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$ES)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$ET()}catch(r){throw t=!1,this._$ET(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}};O.elementStyles=[],O.shadowRootOptions={mode:"open"},O[N("elementProperties")]=new Map,O[N("finalized")]=new Map,ot==null||ot({ReactiveElement:O}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.1");/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
15
- */const j=globalThis,Q=j.trustedTypes,Ut=Q?Q.createPolicy("lit-html",{createHTML:i=>i}):void 0,qt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,Yt="?"+_,Re=`<${Yt}>`,C=document,N=()=>C.createComment(""),L=i=>i===null||typeof i!="object"&&typeof i!="function",Ft=Array.isArray,Ie=i=>Ft(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",at=`[
16
- \f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,It=/>/g,S=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,kt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,Me=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),O=Me(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),jt=new WeakMap,E=C.createTreeWalker(C,129);function Kt(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ut!==void 0?Ut.createHTML(t):t}const ke=(i,t)=>{const e=i.length-1,r=[];let s,n=t===2?"<svg>":"",o=M;for(let a=0;a<e;a++){const c=i[a];let h,p,l=-1,f=0;for(;f<c.length&&(o.lastIndex=f,p=o.exec(c),p!==null);)f=o.lastIndex,o===M?p[1]==="!--"?o=Rt:p[1]!==void 0?o=It:p[2]!==void 0?(Jt.test(p[2])&&(s=RegExp("</"+p[2],"g")),o=S):p[3]!==void 0&&(o=S):o===S?p[0]===">"?(o=s??M,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,h=p[1],o=p[3]===void 0?S:p[3]==='"'?kt:Mt):o===kt||o===Mt?o=S:o===Rt||o===It?o=M:(o=S,s=void 0);const u=o===S&&i[a+1].startsWith("/>")?" ":"";n+=o===M?c+Re:l>=0?(r.push(h),c.slice(0,l)+qt+c.slice(l)+_+u):c+_+(l===-2?a:u)}return[Kt(i,n+(i[e]||"<?>")+(t===2?"</svg>":"")),r]};class B{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[h,p]=ke(t,e);if(this.el=B.createElement(h,r),E.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(s=E.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const l of s.getAttributeNames())if(l.endsWith(qt)){const f=p[o++],u=s.getAttribute(l).split(_),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?He:g[1]==="?"?Ne:g[1]==="@"?Le:rt}),s.removeAttribute(l)}else l.startsWith(_)&&(c.push({type:6,index:n}),s.removeAttribute(l));if(Jt.test(s.tagName)){const l=s.textContent.split(_),f=l.length-1;if(f>0){s.textContent=Q?Q.emptyScript:"";for(let u=0;u<f;u++)s.append(l[u],N()),E.nextNode(),c.push({type:2,index:++n});s.append(l[f],N())}}}else if(s.nodeType===8)if(s.data===Yt)c.push({type:2,index:n});else{let l=-1;for(;(l=s.data.indexOf(_,l+1))!==-1;)c.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const r=C.createElement("template");return r.innerHTML=t,r}}function U(i,t,e=i,r){var o,a;if(t===P)return t;let s=r!==void 0?(o=e._$Co)==null?void 0:o[r]:e._$Cl;const n=L(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),n===void 0?s=void 0:(s=new n(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??(e._$Co=[]))[r]=s:e._$Cl=s),s!==void 0&&(t=U(i,s._$AS(i,t.values),s,r)),t}class je{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,s=((t==null?void 0:t.creationScope)??C).importNode(e,!0);E.currentNode=s;let n=E.nextNode(),o=0,a=0,c=r[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new W(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new Be(n,this,t)),this._$AV.push(h),c=r[++a]}o!==(c==null?void 0:c.index)&&(n=E.nextNode(),o++)}return E.currentNode=C,s}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class W{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),L(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Ie(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==d&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(C.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=B.createElement(Kt(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(e);else{const o=new je(s,this),a=o.u(this.options);o.p(e),this.$(a),this._$AH=o}}_$AC(t){let e=jt.get(t.strings);return e===void 0&&jt.set(t.strings,e=new B(t)),e}T(t){Ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const n of t)s===e.length?e.push(r=new W(this.k(N()),this.k(N()),this,this.options)):r=e[s],r._$AI(n),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(t,e=this,r,s){const n=this.strings;let o=!1;if(n===void 0)t=U(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const a=t;let c,h;for(t=n[0],c=0;c<n.length-1;c++)h=U(this,a[r+c],e,c),h===P&&(h=this._$AH[c]),o||(o=!L(h)||h!==this._$AH[c]),h===d?t=d:t!==d&&(t+=(h??"")+n[c+1]),this._$AH[c]=h}o&&!s&&this.O(t)}O(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class He extends rt{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===d?void 0:t}}class Ne extends rt{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Le extends rt{constructor(t,e,r,s,n){super(t,e,r,s,n),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??d)===P)return;const r=this._$AH,s=t===d&&r!==d||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==d&&(r===d||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Be{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const ct=j.litHtmlPolyfillSupport;ct==null||ct(B,W),(j.litHtmlVersions??(j.litHtmlVersions=[])).push("3.0.2");const De=(i,t,e)=>{const r=(e==null?void 0:e.renderBefore)??t;let s=r._$litPart$;if(s===void 0){const n=(e==null?void 0:e.renderBefore)??null;r._$litPart$=s=new W(t.insertBefore(N(),n),n,void 0,e??{})}return s._$AI(i),s};/**
15
+ */const M=globalThis,Z=M.trustedTypes,Nt=Z?Z.createPolicy("lit-html",{createHTML:s=>s}):void 0,ie="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,se="?"+$,Be=`<${se}>`,E=document,H=()=>E.createComment(""),L=s=>s===null||typeof s!="object"&&typeof s!="function",re=Array.isArray,ze=s=>re(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",at=`[
16
+ \f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mt=/-->/g,jt=/>/g,S=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
17
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Lt=/"/g,ne=/^(?:script|style|textarea|title)$/i,We=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),T=We(1),P=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Dt=new WeakMap,C=E.createTreeWalker(E,129);function oe(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nt!==void 0?Nt.createHTML(t):t}const Fe=(s,t)=>{const e=s.length-1,i=[];let r,n=t===2?"<svg>":"",o=I;for(let a=0;a<e;a++){const c=s[a];let l,h,p=-1,d=0;for(;d<c.length&&(o.lastIndex=d,h=o.exec(c),h!==null);)d=o.lastIndex,o===I?h[1]==="!--"?o=Mt:h[1]!==void 0?o=jt:h[2]!==void 0?(ne.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=S):h[3]!==void 0&&(o=S):o===S?h[0]===">"?(o=r??I,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?S:h[3]==='"'?Lt:Ht):o===Lt||o===Ht?o=S:o===Mt||o===jt?o=I:(o=S,r=void 0);const u=o===S&&s[a+1].startsWith("/>")?" ":"";n+=o===I?c+Be:p>=0?(i.push(l),c.slice(0,p)+ie+c.slice(p)+$+u):c+$+(p===-2?a:u)}return[oe(s,n+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class D{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Fe(t,e);if(this.el=D.createElement(l,i),C.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=C.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(ie)){const d=h[o++],u=r.getAttribute(p).split($),g=/([.?@])?(.*)/.exec(d);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Ve:g[1]==="?"?qe:g[1]==="@"?Ye:it}),r.removeAttribute(p)}else p.startsWith($)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(ne.test(r.tagName)){const p=r.textContent.split($),d=p.length-1;if(d>0){r.textContent=Z?Z.emptyScript:"";for(let u=0;u<d;u++)r.append(p[u],H()),C.nextNode(),c.push({type:2,index:++n});r.append(p[d],H())}}}else if(r.nodeType===8)if(r.data===se)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf($,p+1))!==-1;)c.push({type:7,index:n}),p+=$.length-1}n++}}static createElement(t,e){const i=E.createElement("template");return i.innerHTML=t,i}}function U(s,t,e=s,i){var o,a;if(t===P)return t;let r=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=L(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=U(s,r._$AS(s,t.values),r,i)),t}class Ge{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??E).importNode(e,!0);C.currentNode=r;let n=C.nextNode(),o=0,a=0,c=i[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new W(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new Ke(n,this,t)),this._$AV.push(l),c=i[++a]}o!==(c==null?void 0:c.index)&&(n=C.nextNode(),o++)}return C.currentNode=E,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class W{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),L(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ze(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==f&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=D.createElement(oe(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Ge(r,this),a=o.u(this.options);o.p(e),this.$(a),this._$AH=o}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new D(t)),e}T(t){re(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new W(this.k(H()),this.k(H()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class it{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=f}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(n===void 0)t=U(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const a=t;let c,l;for(t=n[0],c=0;c<n.length-1;c++)l=U(this,a[i+c],e,c),l===P&&(l=this._$AH[c]),o||(o=!L(l)||l!==this._$AH[c]),l===f?t=f:t!==f&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}o&&!r&&this.O(t)}O(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ve extends it{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===f?void 0:t}}class qe extends it{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}}class Ye extends it{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??f)===P)return;const i=this._$AH,r=t===f&&i!==f||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==f&&(i===f||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ke{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const ct=M.litHtmlPolyfillSupport;ct==null||ct(D,W),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.0.2");const Je=(s,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new W(t.insertBefore(H(),n),n,void 0,e??{})}return r._$AI(s),r};/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */let w=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=De(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return P}};var Ht;w._$litElement$=!0,w.finalized=!0,(Ht=globalThis.litElementHydrateSupport)==null||Ht.call(globalThis,{LitElement:w});const lt=globalThis.litElementPolyfillSupport;lt==null||lt({LitElement:w});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
21
+ */let w=class extends O{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Je(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return P}};var qt;w._$litElement$=!0,w.finalized=!0,(qt=globalThis.litElementHydrateSupport)==null||qt.call(globalThis,{LitElement:w});const lt=globalThis.litElementPolyfillSupport;lt==null||lt({LitElement:w});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const ze={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:bt},We=(i=ze,t,e)=>{const{kind:r,metadata:s}=e;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),n.set(e.name,i),r==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,i)},init(a){return a!==void 0&&this.C(o,void 0,i),a}}}if(r==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,i)}}throw Error("Unsupported decorator location: "+r)};function y(i){return(t,e)=>typeof e=="object"?We(i,t,e):((r,s,n)=>{const o=s.hasOwnProperty(n);return s.constructor.createProperty(n,o?{...r,wrapped:!0}:r),o?Object.getOwnPropertyDescriptor(s,n):void 0})(i,t,e)}/**
25
+ */const wt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},At=s=>(...t)=>({_$litDirective$:s,values:t});let ae=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
26
26
  * @license
27
- * Copyright 2017 Google LLC
27
+ * Copyright 2020 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function R(i){return y({...i,state:!0,attribute:!1})}/**
29
+ */const Xe=s=>s.strings===void 0;/**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */const Zt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Qt=i=>(...t)=>({_$litDirective$:i,values:t});class Xt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
33
+ */const j=(s,t)=>{var i;const e=s._$AN;if(e===void 0)return!1;for(const r of e)(i=r._$AO)==null||i.call(r,t,!1),j(r,t);return!0},Q=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while((e==null?void 0:e.size)===0)},ce=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),ti(t)}};function Ze(s){this._$AN!==void 0?(Q(this),this._$AM=s,ce(this)):this._$AM=s}function Qe(s,t=!1,e=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)j(i[n],!1),Q(i[n]);else i!=null&&(j(i,!1),Q(i));else j(this,s)}const ti=s=>{s.type==wt.CHILD&&(s._$AP??(s._$AP=Qe),s._$AQ??(s._$AQ=Ze))};class le extends ae{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ce(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),e&&(j(this,t),Q(this))}setValue(t){if(Xe(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 ei=new WeakMap;let Bt=0;const ht=new Map,zt=new WeakSet,Wt=()=>new Promise(s=>requestAnimationFrame(s)),ii=[{transform:"translateX(100%) scale(0)",opacity:0}],Ft=(s,t)=>{const e=s-t;return e===0?void 0:e},Gt=(s,t)=>{const e=s/t;return e===1?void 0:e},pt={left:(s,t)=>{const e=Ft(s,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(s,t)=>{const e=Ft(s,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(s,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=Gt(s,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(s,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=Gt(s,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},si={duration:333,easing:"ease-in-out"},ri=["left","top","width","height","opacity","color","background"],Vt=new WeakMap;class ni extends le{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===wt.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.h=e})}async resolveFinished(){var t;(t=this.h)==null||t.call(this),this.h=void 0}render(t){return f}getController(){return ei.get(this.l)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var r;const i=this.l===void 0;return i&&(this.l=(r=t.options)==null?void 0:r.host,this.l.addController(this),this.element=t.element,Vt.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.u(e),this.render(e)}u(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=ri),this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(r=>{const n=e[r]??(pt[r]?void 0:i[r]),o=Number(n);t[r]=isNaN(o)?n+"":o}),t}m(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,r)=>{if(Array.isArray(i)){if(Array.isArray(r)&&r.length===i.length&&i.every((n,o)=>n===r[o]))return!1}else if(r===i)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Wt;const e=this._(),i=this.A(this.options.keyframeOptions,e),r=this.p();if(this.g!==void 0){const{from:n,to:o}=this.O(this.g,r,e);this.log("measured",[this.g,r,n,o]),t=this.calculateKeyframes(n,o)}else{const n=ht.get(this.options.inId);if(n){ht.delete(this.options.inId);const{from:o,to:a}=this.O(n,r,e);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Bt++,t.forEach(c=>c.zIndex=Bt)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.j!==void 0&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,e;this.j=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.o||(this.options.id!==void 0&&ht.set(this.options.id,this.g),this.options.out===void 0))return;if(this.prepare(),await Wt(),(e=this.t)==null?void 0:e.isConnected){const i=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,i),this.options.stabilizeOut){const r=this.p();this.log("stabilizing out");const n=this.g.left-r.left,o=this.g.top-r.top;getComputedStyle(this.element).position!=="static"||n===0&&o===0||(this.element.style.position="relative"),n!==0&&(this.element.style.left=n+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.A(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Vt.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=zt.has(this.l);return t||this.l.updateComplete.then(()=>{zt.add(this.l)}),t}A(t,e=this._()){const i={...si};return e.forEach(r=>Object.assign(i,r.options.keyframeOptions)),Object.assign(i,t),i}O(t,e,i){t={...t},e={...e};const r=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let n=1,o=1;return r!==void 0&&(r.forEach(a=>{a.width&&(n/=a.width),a.height&&(o/=a.height)}),t.left!==void 0&&e.left!==void 0&&(t.left=n*t.left,e.left=n*e.left),t.top!==void 0&&e.top!==void 0&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,i=!1){const r={},n={};let o=!1;const a={};for(const c in e){const l=t[c],h=e[c];if(c in pt){const p=pt[c];if(l===void 0||h===void 0)continue;const d=p(l,h);d.transform!==void 0&&(a[c]=d.value,o=!0,r.transform=`${r.transform??""} ${d.transform}`,d.overrideFrom!==void 0&&Object.assign(r,d.overrideFrom))}else l!==h&&l!==void 0&&h!==void 0&&(o=!0,r[c]=l,n[c]=h)}return r.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[r,n]: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 r=this.getController();r==null||r.add(this);try{await this.webAnimation.finished}catch{}r==null||r.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 oi=At(ni);/**
34
34
  * @license
35
- * Copyright 2018 Google LLC
35
+ * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */const Ge=Qt(class extends Xt{constructor(i){var t;if(super(i),i.type!==Zt.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){var r,s;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((r=this.st)!=null&&r.has(n))&&this.it.add(n);return this.render(t)}const e=i.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(s=this.st)!=null&&s.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return P}}),q=(i,t,e)=>{i&&e.style.setProperty(t,i)},te=(i,t)=>{var e,r,s,n;q((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),q((r=i.colors)==null?void 0:r.textOnPrimaryBackground,"--text-on-primary-background",t),q((s=i.colors)==null?void 0:s.secondaryBackground,"--secondary-background",t),q((n=i.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
37
+ */const ai={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:_t},ci=(s=ai,t,e)=>{const{kind:i,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(e.name,s),i==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,s)},init(a){return a!==void 0&&this.C(o,void 0,s),a}}}if(i==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,s)}}throw Error("Unsupported decorator location: "+i)};function v(s){return(t,e)=>typeof e=="object"?ci(s,t,e):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,o?{...i,wrapped:!0}:i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(s,t,e)}/**
38
38
  * @license
39
- * Copyright 2020 Google LLC
39
+ * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const Ve=i=>i.strings===void 0;/**
41
+ */function k(s){return v({...s,state:!0,attribute:!1})}/**
42
42
  * @license
43
- * Copyright 2017 Google LLC
43
+ * Copyright 2018 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
- */const H=(i,t)=>{var r;const e=i._$AN;if(e===void 0)return!1;for(const s of e)(r=s._$AO)==null||r.call(s,t,!1),H(s,t);return!0},X=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while((e==null?void 0:e.size)===0)},ee=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),Fe(t)}};function qe(i){this._$AN!==void 0?(X(this),this._$AM=i,ee(this)):this._$AM=i}function Ye(i,t=!1,e=0){const r=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)H(r[n],!1),X(r[n]);else r!=null&&(H(r,!1),X(r));else H(this,i)}const Fe=i=>{i.type==Zt.CHILD&&(i._$AP??(i._$AP=Ye),i._$AQ??(i._$AQ=qe))};class Je extends Xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),ee(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,s;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(s=this.disconnected)==null||s.call(this)),e&&(H(this,t),X(this))}setValue(t){if(Ve(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(){}}/**
45
+ */const li=At(class extends ae{constructor(s){var t;if(super(s),s.type!==wt.ATTRIBUTE||s.name!=="class"||((t=s.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var i,r;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((i=this.st)!=null&&i.has(n))&&this.it.add(n);return this.render(t)}const e=s.element.classList;for(const n of this.it)n in t||(e.remove(n),this.it.delete(n));for(const n in t){const o=!!t[n];o===this.it.has(n)||(r=this.st)!=null&&r.has(n)||(o?(e.add(n),this.it.add(n)):(e.remove(n),this.it.delete(n)))}return P}}),V=(s,t,e)=>{s&&e.style.setProperty(t,s)},he=(s,t)=>{var e,i,r,n;V((e=s.colors)==null?void 0:e.primaryBackground,"--primary-background",t),V((i=s.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),V((r=s.colors)==null?void 0:r.secondaryBackground,"--secondary-background",t),V((n=s.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
46
46
  * @license
47
47
  * Copyright 2020 Google LLC
48
48
  * SPDX-License-Identifier: BSD-3-Clause
49
- */const re=()=>new Ke;class Ke{}const ht=new WeakMap,ie=Qt(class extends Je{render(i){return d}update(i,[t]){var r;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(r=i.options)==null?void 0:r.host,this.ot(this.lt=i.element)),d}ot(i){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=ht.get(t);e===void 0&&(e=new WeakMap,ht.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,i),i!==void 0&&this.G.call(this.ct,i)}else this.G.value=i}get rt(){var i,t;return typeof this.G=="function"?(i=ht.get(this.ct??globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,G=(i,t,e,r)=>{for(var s=r>1?void 0:r?Qe(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&Ze(t,e,s),s};class m extends w{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=re()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&te(this.application.settings.branding,this)}async _renderSymbol(){var a,c,h;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return O` <img src=${e} class="trigger-icon" alt="" /> `;const r=(h=this.application)==null?void 0:h.triggerIcon;if(!r)return d;const s=async p=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(f=>f[p]),{type:n,content:o}=r;switch(n){case"Telia":{const p=await s(o);return p?O`<telia-icon
49
+ */const pe=()=>new hi;class hi{}const dt=new WeakMap,de=At(class extends le{render(s){return f}update(s,[t]){var i;const e=t!==this.G;return e&&this.G!==void 0&&this.ot(void 0),(e||this.rt!==this.lt)&&(this.G=t,this.ct=(i=s.options)==null?void 0:i.host,this.ot(this.lt=s.element)),f}ot(s){if(typeof this.G=="function"){const t=this.ct??globalThis;let e=dt.get(t);e===void 0&&(e=new WeakMap,dt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ct,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ct,s)}else this.G.value=s}get rt(){var s,t;return typeof this.G=="function"?(s=dt.get(this.ct??globalThis))==null?void 0:s.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var pi=Object.defineProperty,di=Object.getOwnPropertyDescriptor,F=(s,t,e,i)=>{for(var r=i>1?void 0:i?di(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&pi(t,e,r),r};class y extends w{constructor(){super(...arguments),this.active=!1,this.loaded=!1,this.offset=0,this.buttonRef=pe()}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding(),this.offset>0&&this.buttonRef.value&&(this.buttonRef.value.style.right=`calc(${this.offset}px + 20px)`)}_toggleActive(){var t;if(!((t=this.application)!=null&&t.root)){console.warn("Could not activate widget. No root element assigned to widget.");return}this.active=!this.active,this.active?this.application.appendToDOM():this.application.hide()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&he(this.application.settings.branding,this)}async _renderSymbol(){var a,c,l;const t=(a=this.application)==null?void 0:a.branding(),e=(c=t==null?void 0:t.graphics)==null?void 0:c.trigger;if(e)return T` <img src=${e} class="trigger-icon" alt="" /> `;const i=(l=this.application)==null?void 0:l.triggerIcon;if(!i)return f;const r=async h=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(d=>d[h]),{type:n,content:o}=i;switch(n){case"Telia":{const h=await r(o);return h?T`<telia-icon
50
50
  class="trigger-icon"
51
- svg=${p.svg}
51
+ svg=${h.svg}
52
52
  size="lg"
53
- ></telia-icon>`:d}default:return d}}setOffset(t){this.offset=t}render(){var t,e,r,s;return O`<div class="trigger-container">
54
- ${(s=(r=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:r.other)!=null&&s.showButtonLabel?O`
55
- <button class="trigger-label" @click=${this._toggleActive}>
53
+ ></telia-icon>`:f}default:return f}}setOffset(t){this.offset=t}render(){var t,e,i,r;return T`<div class="trigger-container">
54
+ ${!this.active&&((r=(i=(e=(t=this.application)==null?void 0:t.settings)==null?void 0:e.branding)==null?void 0:i.other)!=null&&r.showButtonLabel)?T`
55
+ <button
56
+ class="trigger-label"
57
+ @click=${this._toggleActive}
58
+ ${oi({keyframeOptions:{},in:ii,stabilizeOut:!0,skipInitial:!1})}
59
+ >
56
60
  ${this.application.settings.branding.other.buttonLabelText}
57
61
  </button>
58
- `:d}
62
+ `:f}
59
63
 
60
64
  <button
61
- class=${Ge({trigger:!0,active:this.active,rendered:this.loaded})}
65
+ class=${li({trigger:!0,active:this.active,rendered:this.loaded})}
62
66
  @click=${this._toggleActive}
63
- ${ie(this.buttonRef)}
67
+ ${de(this.buttonRef)}
64
68
  >
65
69
  ${this.icon}
66
70
  <span class="trigger-close">
@@ -91,7 +95,7 @@
91
95
  </svg>
92
96
  </span>
93
97
  </button>
94
- </div>`}}m.styles=[z`
98
+ </div>`}}y.styles=[z`
95
99
  :host {
96
100
  --voca-rem-multiplier: 0.625;
97
101
  --trigger-label-bg: #f5e0ff;
@@ -131,7 +135,10 @@
131
135
  box-sizing: border-box;
132
136
  transition: transform 200ms ease-out;
133
137
  }
134
- .trigger:hover {
138
+ .trigger:active {
139
+ transform: scale(0.8) !important;
140
+ }
141
+ .trigger:hover:not(:active) {
135
142
  transform: scale(1.1) !important;
136
143
  }
137
144
  .trigger.rendered {
@@ -195,7 +202,7 @@
195
202
  .trigger-label:hover {
196
203
  opacity: 0.8;
197
204
  }
198
- `];G([y({attribute:!1})],m.prototype,"application",2);G([R()],m.prototype,"active",2);G([R()],m.prototype,"loaded",2);G([R()],m.prototype,"icon",2);G([R()],m.prototype,"offset",2);var Xe=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,x=(i,t,e,r)=>{for(var s=r>1?void 0:r?tr(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&Xe(t,e,s),s};const se=i=>{class t extends i{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(r){this.properties=r}writeLayout(r){this.layout=r}writeContext(r){this.context=r}addChild(r){r.parent=this,this.nodes.push(r)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[z`
205
+ `];F([v({attribute:!1})],y.prototype,"application",2);F([k()],y.prototype,"active",2);F([k()],y.prototype,"loaded",2);F([k()],y.prototype,"icon",2);F([k()],y.prototype,"offset",2);var ui=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,x=(s,t,e,i)=>{for(var r=i>1?void 0:i?fi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&ui(t,e,r),r};const ue=s=>{class t extends s{constructor(){super(...arguments),this.properties={},this.context={},this.layout={},this.nodes=[]}writeProperties(i){this.properties=i}writeLayout(i){this.layout=i}writeContext(i){this.context=i}addChild(i){i.parent=this,this.nodes.push(i)}connectedCallback(){super.connectedCallback(),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`)}}return t.styles=[z`
199
206
  :host {
200
207
  font-family: var(--font-family);
201
208
  grid-column: span var(--width);
@@ -207,7 +214,7 @@
207
214
  * {
208
215
  box-sizing: border-box;
209
216
  }
210
- `],x([y()],t.prototype,"properties",2),x([y()],t.prototype,"context",2),x([y()],t.prototype,"layout",2),x([y()],t.prototype,"name",2),x([y()],t.prototype,"type",2),x([y({attribute:!1})],t.prototype,"application",2),x([y({attribute:!1})],t.prototype,"parent",2),t};class _t extends se(w){render(){return O`Non resolved component`}}_t.styles=[z`
217
+ `],x([v()],t.prototype,"properties",2),x([v()],t.prototype,"context",2),x([v()],t.prototype,"layout",2),x([v()],t.prototype,"name",2),x([v()],t.prototype,"type",2),x([v({attribute:!1})],t.prototype,"application",2),x([v({attribute:!1})],t.prototype,"parent",2),t};class St extends ue(w){render(){return T`Non resolved component`}}St.styles=[z`
211
218
  :host {
212
219
  display: block;
213
220
  }
@@ -215,9 +222,9 @@
215
222
  * @license
216
223
  * Copyright 2021 Google LLC
217
224
  * SPDX-License-Identifier: BSD-3-Clause
218
- */function*er(i,t){if(i!==void 0){let e=0;for(const r of i)yield t(r,e++)}}var A=(i=>(i.Inline="inline",i.Trigger="trigger",i))(A||{}),rr=Object.defineProperty,ir=Object.getOwnPropertyDescriptor,sr=(i,t,e,r)=>{for(var s=r>1?void 0:r?ir(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&rr(t,e,s),s};class it extends w{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=re()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&te(t.branding,this.wrapperRef.value)}applyStyles(){if(!this.wrapperRef.value)return;const t=this.application.styles(),e=this.wrapperRef.value;Object.entries(t).forEach(([r,s])=>{e.style.setProperty(`--${r}`,s)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===A.Trigger&&this.renderRoot.host.classList.add("floating"),O`<div class="widget-container" ${ie(this.wrapperRef)}>
219
- ${er(this.nodes,t=>t)}
220
- </div>`}}it.styles=z`
225
+ */function*gi(s,t){if(s!==void 0){let e=0;for(const i of s)yield t(i,e++)}}var A=(s=>(s.Inline="inline",s.Trigger="trigger",s))(A||{}),mi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,yi=(s,t,e,i)=>{for(var r=i>1?void 0:i?vi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&mi(t,e,r),r};class st extends w{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=pe()}addChild(t){t.parent=this,this.nodes.push(t)}applyBranding(){if(!this.wrapperRef.value)return;const t=this.application.settings;t!=null&&t.branding&&he(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,r])=>{e.style.setProperty(`--${i}`,r)})}firstUpdated(t){this.applyBranding(),this.applyStyles()}render(){return this.application.renderStrategy===A.Trigger&&this.renderRoot.host.classList.add("floating"),T`<div class="widget-container" ${de(this.wrapperRef)}>
226
+ ${gi(this.nodes,t=>t)}
227
+ </div>`}}st.styles=z`
221
228
  :host {
222
229
  --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
223
230
  --spacing-xs: 0.2rem;
@@ -308,8 +315,8 @@
308
315
  opacity: 0;
309
316
  animation: slideDown 0.3s linear;
310
317
  }
311
- `;sr([y({attribute:!1})],it.prototype,"application",2);class nr{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const r=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},s=(a,c,h,p)=>{h.forEach(l=>{const f=r(l),u=p[f.definitionId];if(!u){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=f.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&s(a,g,u.children,p))})},{entry:n,components:o}=t;return s(this,this.root,[n],o),this.root}createRoot(){return new it}createNode(t,e){const r=this.resolveComponent(e);if(!r)return console.warn(`Unable to resolve component: ${e}`),new _t;const s=new r;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ne=class{constructor(){this.components=new Map}getComponent(i){const t=this.components.get(i);return t||console.warn(`Unable to resolve component: ${i}. You most likely forgot to register the required plugin.`),t}registerComponent(i,t){this.components.set(i,t)}async loadComponents(){const i=[...this.components.entries()].map(([t,e])=>e.then(r=>{this.defineAsWebComponent(t,r.default)}));await Promise.all(i)}defineAsWebComponent(i,t){const e=ne.ResolveWebComponentName(i);customElements.get(e)||customElements.define(e,t)}};let oe=ne;oe.ResolveWebComponentName=i=>`ace-${i}`;class or{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const r=this.texts.get(t);return r||e||null}}class ae{constructor(t,e,r,s){this.name=t,this.container=e,this.settings=r,this.options=s,this.platform=new nr,this.texts=new or,this.renderStrategy=A.Inline,this.autoActivate=!1,this.plugins=[],this.componentResolver=new oe,this.renderStrategy=this.options.renderStrategy||A.Inline,this.triggerIcon=this.options.triggerIcon,typeof s.autoActivate=="boolean"&&(this.autoActivate=s.autoActivate),this.container.register("$settings",r),this.texts.loadTexts(r.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(Gt.Ready),this.autoActivate){const t=this.render();t&&document.body.appendChild(t)}}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(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}render(){if(this.renderStrategy===A.Trigger){const t=[...Array.from(document.querySelectorAll("ace-trigger"))].length,e=new m;return e.application=this,e.setOffset(t*80),e}return this.root}}const ce=class{async getSite(i){const e=await(await fetch(i)).json();return e?{id:e.id,apps:e.widgets.map(r=>{let s=A.Inline;return r.renderStrategy==="Trigger"&&(s=A.Trigger),{id:r.id,widgetId:r.widgetId,renderStrategy:s,autoActivate:r.autoActivate,triggerIcon:{type:"Telia",content:r.triggerIcon}}})}:null}async getWidget(i){const e=await(await fetch(`${ce.endpoint}/widget/${i}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let tt=ce;tt.endpoint="https://widgets.ace.teliacompany.net/api";class le{constructor(){this.applications=[],this.container=new vt("environment",this),setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate()}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const r=this.applications.find(s=>s.name===e.name);r&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:r}}))})}registerApp(t,e,r){const s=new vt(t,this),n=new ae(t,s,e,r);this.applications.push(n)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class he{constructor(t){this.configurations=[],this.httpClient=new tt,this.httpClient=new tt,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}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new le,this.addGlobal(this.environment);for await(const r of this.configurations){const s=await this.httpClient.getWidget(r.widgetId);s&&((e=this.environment)==null||e.registerApp(s.name,s.config,{renderStrategy:r.renderStrategy,triggerIcon:r.triggerIcon,autoActivate:r.autoActivate}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var ar=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,$t=(i,t,e,r)=>{for(var s=r>1?void 0:r?cr(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&ar(t,e,s),s};class I extends w{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 d;if(this.widget.renderStrategy===A.Trigger){const t=new m;return t.application=this.widget,t}return this.widget.render()}}I.styles=[z`
318
+ `;yi([v({attribute:!1})],st.prototype,"application",2);class bi{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...l]=a;return{definitionId:c,overrides:l}}return{definitionId:a,overrides:[]}},r=(a,c,l,h)=>{l.forEach(p=>{const d=i(p),u=h[d.definitionId];if(!u){console.error(`No definition found for component type '${d.definitionId}'.`);return}const g=a.createNode(u.type,u.type);g&&(g.name=d.definitionId,g.application=e,u.properties&&g.writeProperties(u.properties),u.context&&g.writeContext(u.context),u.layout&&g.writeLayout(u.layout),c.addChild(g),u.children&&r(a,g,u.children,h))})},{entry:n,components:o}=t;return r(this,this.root,[n],o),this.root}createRoot(){return new st}createNode(t,e){const i=this.resolveComponent(e);if(!i)return console.warn(`Unable to resolve component: ${e}`),new St;const r=new i;return r.type=e,r.name=t,r}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const fe=class{constructor(){this.components=new Map}getComponent(s){const t=this.components.get(s);return t||console.warn(`Unable to resolve component: ${s}. You most likely forgot to register the required plugin.`),t}registerComponent(s,t){this.components.set(s,t)}async loadComponents(){const s=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(s)}defineAsWebComponent(s,t){const e=fe.ResolveWebComponentName(s);customElements.get(e)||customElements.define(e,t)}};let ge=fe;ge.ResolveWebComponentName=s=>`ace-${s}`;class $i{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}}class me{constructor(t,e,i,r){this.name=t,this.container=e,this.settings=i,this.options=r,this.platform=new bi,this.texts=new $i,this.renderStrategy=A.Inline,this.autoActivate=!1,this.plugins=[],this.componentResolver=new ge,this.renderStrategy=this.options.renderStrategy||A.Inline,this.triggerIcon=this.options.triggerIcon,typeof r.autoActivate=="boolean"&&(this.autoActivate=r.autoActivate),this.container.register("$settings",i),this.texts.loadTexts(i.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(te.Ready),this.autoActivate){const t=this.render();t&&document.body.appendChild(t)}}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(){this.root&&(this.root.classList.add("expanded"),this.root.classList.remove("hidden"),document.body.appendChild(this.root))}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded"))}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}render(){if(this.renderStrategy===A.Trigger){const t=[...Array.from(document.querySelectorAll("ace-trigger"))].length,e=new y;return e.application=this,e.setOffset(t*80),e}return this.root}}const ve=class{async getSite(s){const e=await(await fetch(s)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let r=A.Inline;return i.renderStrategy==="Trigger"&&(r=A.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:r,autoActivate:i.autoActivate,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(s){const e=await(await fetch(`${ve.endpoint}/widget/${s}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let tt=ve;tt.endpoint="https://widgets.ace.teliacompany.net/api";class ye{constructor(){this.applications=[],this.container=new yt("environment",this),setTimeout(()=>{this.notifyWidgetsOfCreation()},1e3)}async bootstrap(){await this.activate()}async activate(){const t=this.applications.filter(e=>e.autoActivate);for await(const e of t)await e.activate()}notifyWidgetsOfCreation(){document.querySelectorAll("ace-widget").forEach(e=>{const i=this.applications.find(r=>r.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}registerApp(t,e,i){const r=new yt(t,this),n=new me(t,r,e,i);this.applications.push(n)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class be{constructor(t){this.configurations=[],this.httpClient=new tt,this.httpClient=new tt,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}loadFromConfig(t){this.configurations=t.apps.map(e=>({id:"",renderStrategy:e.renderStrategy,widgetId:e.widgetId,autoActivate:e.autoActivate,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new ye,this.addGlobal(this.environment);for await(const i of this.configurations){const r=await this.httpClient.getWidget(i.widgetId);r&&((e=this.environment)==null||e.registerApp(r.name,r.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var _i=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,xt=(s,t,e,i)=>{for(var r=i>1?void 0:i?wi(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&_i(t,e,r),r};class R extends w{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 f;if(this.widget.renderStrategy===A.Trigger){const t=new y;return t.application=this.widget,t}return this.widget.render()}}R.styles=[z`
312
319
  :host {
313
320
  display: block;
314
321
  }
315
- `];$t([y({attribute:!0})],I.prototype,"name",2);$t([R()],I.prototype,"widget",2);$t([R()],I.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",m);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",_t);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",it);customElements.get("ace-widget")||customElements.define("ace-widget",I);const lr=async(i,t)=>{await new he(i).bootstrap(t)};exports.AceWidget=I;exports.Application=ae;exports.Container=vt;exports.Environment=le;exports.HttpClient=tt;exports.Site=he;exports.Trigger=m;exports.WidgetComponent=se;exports.bootstrap=lr;
322
+ `];xt([v({attribute:!0})],R.prototype,"name",2);xt([k()],R.prototype,"widget",2);xt([k()],R.prototype,"status",2);customElements.get("ace-trigger")||customElements.define("ace-trigger",y);customElements.get("ace-unresolved-component")||customElements.define("ace-unresolved-component",St);customElements.get("ace-wrapper")||customElements.define("ace-wrapper",st);customElements.get("ace-widget")||customElements.define("ace-widget",R);const Ai=async(s,t)=>{await new be(s).bootstrap(t)};exports.AceWidget=R;exports.Application=me;exports.Container=yt;exports.Environment=ye;exports.HttpClient=tt;exports.Site=be;exports.Trigger=y;exports.WidgetComponent=ue;exports.bootstrap=Ai;