@telia-ace/widget-core-flamingo 1.1.56-rc.2 → 1.1.56-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +1 -1
- package/index.js +13 -13
- package/index.mjs +85 -81
- package/package.json +1 -1
- package/services/http-client.service.d.ts +3 -0
package/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export { bootstrap } from './bootstrap';
|
|
6
6
|
export { Trigger } from './components/trigger.component';
|
7
7
|
export { WidgetComponent } from './components/widget.component';
|
8
8
|
export { AceWidget } from './components/ace-widget.component';
|
9
|
-
export { HttpClient } from './services/http-client.service';
|
9
|
+
export { HttpClient, createHttpClient } from './services/http-client.service';
|
10
10
|
export { StorageService } from './services/storage.service';
|
11
11
|
export type { IHttpClient } from './services/http-client.service';
|
12
12
|
export type { WidgetComponentType } from './components/widget.component';
|
package/index.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ft=function(r,t){return ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},ft(r,t)};function
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ft=function(r,t){return ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])},ft(r,t)};function z(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ft(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function gt(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function G(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var i=e.call(r),s,n=[],o;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)n.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return n}function Z(r,t,e){if(e||arguments.length===2)for(var i=0,s=t.length,n;i<s;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return r.concat(n||Array.prototype.slice.call(t))}function b(r){return typeof r=="function"}function Gt(r){var t=function(i){Error.call(i),i.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var nt=Gt(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
|
2
2
|
`+e.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function mt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var tt=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,s,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=gt(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.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 h=this.initialTeardown;if(b(h))try{h()}catch(v){n=v instanceof nt?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=gt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function mt(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var tt=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,i,s,n;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=gt(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.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 h=this.initialTeardown;if(b(h))try{h()}catch(v){n=v instanceof nt?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=gt(p),u=f.next();!u.done;u=f.next()){var g=u.value;try{Et(g)}catch(v){n=n??[],v instanceof nt?n=Z(Z([],G(n)),G(v.errors)):n.push(v)}}}catch(v){i={error:v}}finally{try{u&&!u.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}}if(n)throw new nt(n)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Et(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&mt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&mt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}(),Zt=tt.EMPTY;function Jt(r){return r instanceof tt||r&&"closed"in r&&b(r.remove)&&b(r.add)&&b(r.unsubscribe)}function Et(r){b(r)?r():r.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},vt={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var s=vt.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,Z([r,t],G(e))):setTimeout.apply(void 0,Z([r,t],G(e)))},clearTimeout:function(r){var t=vt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function we(r){vt.setTimeout(function(){throw r})}function Pt(){}function V(r){r()}var Qt=function(r){z(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,Jt(e)&&e.add(i)):i.destination=xe,i}return t.create=function(e,i,s){return new yt(e,i,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(tt),Ae=Function.prototype.bind;function ot(r,t){return Ae.call(r,t)}var Ce=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){Y(i)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){Y(i)}else Y(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Y(e)}},r}(),yt=function(r){z(t,r);function t(e,i,s){var n=r.call(this)||this,o;if(b(e)||!e)o={next:e??void 0,error:i??void 0,complete:s??void 0};else{var a;n&&Xt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return n.unsubscribe()},o={next:e.next&&ot(e.next,a),error:e.error&&ot(e.error,a),complete:e.complete&&ot(e.complete,a)}):o=e}return n.destination=new Ce(o),n}return t}(Qt);function Y(r){we(r)}function Se(r){throw r}var xe={closed:!0,next:Pt,error:Se,complete:Pt},Ee=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Pe(r){return r}function Oe(r){return r.length===0?Pe:r.length===1?r[0]:function(e){return r.reduce(function(i,s){return s(i)},e)}}var Ot=function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,i){var s=this,n=Re(t)?t:new yt(t,e,i);return V(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},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var i=this;return e=Tt(e),new e(function(s,n){var o=new yt({next:function(a){try{t(a)}catch(c){n(c),o.unsubscribe()}},error:n,complete:s});i.subscribe(o)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[Ee]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Oe(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Tt(t),new t(function(i,s){var n;e.subscribe(function(o){return n=o},function(o){return s(o)},function(){return i(n)})})},r.create=function(t){return new r(t)},r}();function Tt(r){var t;return(t=r??Xt.Promise)!==null&&t!==void 0?t:Promise}function Te(r){return r&&b(r.next)&&b(r.error)&&b(r.complete)}function Re(r){return r&&r instanceof Qt||Te(r)&&Jt(r)}var Ue=Gt(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(r){z(t,r);function t(){var e=r.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var i=new Rt(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ue},t.prototype.next=function(e){var i=this;V(function(){var s,n;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=gt(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(l){s={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var i=this;V(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=e;for(var s=i.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;V(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var i=e.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var i=this,s=this,n=s.hasError,o=s.isStopped,a=s.observers;return n||o?Zt:(this.currentObservers=null,a.push(e),new tt(function(){i.currentObservers=null,mt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,s=i.hasError,n=i.thrownError,o=i.isStopped;s?e.error(n):o&&e.complete()},t.prototype.asObservable=function(){var e=new Ot;return e.source=this,e},t.create=function(e,i){return new Rt(e,i)},t}(Ot),Rt=function(r){z(t,r);function t(e,i){var s=r.call(this)||this;return s.destination=e,s.source=i,s}return t.prototype.next=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,e)},t.prototype.error=function(e){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,e)},t.prototype.complete=function(){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||i===void 0||i.call(e)},t.prototype._subscribe=function(e){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&s!==void 0?s:Zt},t}(te),Ie=function(r){z(t,r);function t(e){var i=r.call(this)||this;return i._value=e,i}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var i=r.prototype._subscribe.call(this,e);return!i.closed&&e.next(this._value),i},t.prototype.getValue=function(){var e=this,i=e.hasError,s=e.thrownError,n=e._value;if(i)throw s;return this._throwIfClosed(),n},t.prototype.next=function(e){r.prototype.next.call(this,this._value=e)},t}(te),ee=(r=>(r.Loading="loading",r.Ready="ready",r))(ee||{});class bt{constructor(t,e){this.state=new Ie("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
|
7
|
+
*/const K=globalThis,$t=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),Ut=new WeakMap;let ie=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($t&&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 Ne=r=>new ie(typeof r=="string"?r:r+"",void 0,_t),U=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,s,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.")})(s)+r[n+1],r[0]);return new ie(e,r,_t)},je=(r,t)=>{if($t)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=K.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},It=$t?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ne(e)})(r):r;/**
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/const{is:Me,defineProperty:ke,getOwnPropertyDescriptor:Le,getOwnPropertyNames:He,getOwnPropertySymbols:Be,getPrototypeOf:De}=Object,A=globalThis,Nt=A.trustedTypes,ze=Nt?Nt.emptyScript:"",at=A.reactiveElementPolyfillSupport,j=(r,t)=>r,
|
11
|
+
*/const{is:Me,defineProperty:ke,getOwnPropertyDescriptor:Le,getOwnPropertyNames:He,getOwnPropertySymbols:Be,getPrototypeOf:De}=Object,A=globalThis,Nt=A.trustedTypes,ze=Nt?Nt.emptyScript:"",at=A.reactiveElementPolyfillSupport,j=(r,t)=>r,J={toAttribute(r,t){switch(t){case Boolean:r=r?ze:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},wt=(r,t)=>!Me(r,t),jt={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.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=jt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&ke(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=Le(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,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;const t=De(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){const e=this.properties,i=[...He(e),...Be(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(It(s))}else t!==void 0&&e.push(It(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return je(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var n;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:J).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const o=i.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:J;this._$Em=s,this[s]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??wt)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(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 _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[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.P(n,this[n],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}};O.elementStyles=[],O.shadowRootOptions={mode:"open"},O[j("elementProperties")]=new Map,O[j("finalized")]=new Map,at==null||at({ReactiveElement:O}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
|
12
12
|
* @license
|
13
13
|
* Copyright 2017 Google LLC
|
14
14
|
* SPDX-License-Identifier: BSD-3-Clause
|
15
|
-
*/const M=globalThis,
|
15
|
+
*/const M=globalThis,X=M.trustedTypes,Mt=X?X.createPolicy("lit-html",{createHTML:r=>r}):void 0,re="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,se="?"+w,We=`<${se}>`,E=document,L=()=>E.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",ne=Array.isArray,Fe=r=>ne(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ct=`[
|
16
16
|
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kt=/-->/g,Lt=/>/g,C=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Bt=/"/g,oe=/^(?:script|style|textarea|title)$/i,Ye=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=Ye(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Dt=new WeakMap,x=E.createTreeWalker(E,129);function ae(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(t):t}const qe=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",o=N;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,f=0;for(;f<c.length&&(o.lastIndex=f,h=o.exec(c),h!==null);)f=o.lastIndex,o===N?h[1]==="!--"?o=kt:h[1]!==void 0?o=Lt:h[2]!==void 0?(oe.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=C):h[3]!==void 0&&(o=C):o===C?h[0]===">"?(o=s??N,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?C:h[3]==='"'?Bt:Ht):o===Bt||o===Ht?o=C:o===kt||o===Lt?o=N:(o=C,s=void 0);const u=o===C&&r[a+1].startsWith("/>")?" ":"";n+=o===N?c+We:p>=0?(i.push(l),c.slice(0,p)+re+c.slice(p)+w+u):c+w+(p===-2?a:u)}return[ae(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};class B{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=qe(t,e);if(this.el=B.createElement(l,i),x.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=x.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(re)){const f=h[o++],u=s.getAttribute(p).split(w),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Ke:g[1]==="?"?Ge:g[1]==="@"?Ze:et}),s.removeAttribute(p)}else p.startsWith(w)&&(c.push({type:6,index:n}),s.removeAttribute(p));if(oe.test(s.tagName)){const p=s.textContent.split(w),f=p.length-1;if(f>0){s.textContent=
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Bt=/"/g,oe=/^(?:script|style|textarea|title)$/i,Ye=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=Ye(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Dt=new WeakMap,x=E.createTreeWalker(E,129);function ae(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(t):t}const qe=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",o=N;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,f=0;for(;f<c.length&&(o.lastIndex=f,h=o.exec(c),h!==null);)f=o.lastIndex,o===N?h[1]==="!--"?o=kt:h[1]!==void 0?o=Lt:h[2]!==void 0?(oe.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=C):h[3]!==void 0&&(o=C):o===C?h[0]===">"?(o=s??N,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?C:h[3]==='"'?Bt:Ht):o===Bt||o===Ht?o=C:o===kt||o===Lt?o=N:(o=C,s=void 0);const u=o===C&&r[a+1].startsWith("/>")?" ":"";n+=o===N?c+We:p>=0?(i.push(l),c.slice(0,p)+re+c.slice(p)+w+u):c+w+(p===-2?a:u)}return[ae(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};class B{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=qe(t,e);if(this.el=B.createElement(l,i),x.currentNode=this.el.content,e===2){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=x.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(re)){const f=h[o++],u=s.getAttribute(p).split(w),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Ke:g[1]==="?"?Ge:g[1]==="@"?Ze:et}),s.removeAttribute(p)}else p.startsWith(w)&&(c.push({type:6,index:n}),s.removeAttribute(p));if(oe.test(s.tagName)){const p=s.textContent.split(w),f=p.length-1;if(f>0){s.textContent=X?X.emptyScript:"";for(let u=0;u<f;u++)s.append(p[u],L()),x.nextNode(),c.push({type:2,index:++n});s.append(p[f],L())}}}else if(s.nodeType===8)if(s.data===se)c.push({type:2,index:n});else{let p=-1;for(;(p=s.data.indexOf(w,p+1))!==-1;)c.push({type:7,index:n}),p+=w.length-1}n++}}static createElement(t,e){const i=E.createElement("template");return i.innerHTML=t,i}}function R(r,t,e=r,i){var o,a;if(t===P)return t;let s=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const n=H(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(r),s._$AT(r,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=R(r,s._$AS(r,t.values),s,i)),t}class Ve{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,s=((t==null?void 0:t.creationScope)??E).importNode(e,!0);x.currentNode=s;let n=x.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 Je(n,this,t)),this._$AV.push(l),c=i[++a]}o!==(c==null?void 0:c.index)&&(n=x.nextNode(),o++)}return x.currentNode=E,s}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,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,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=R(this,t,e),H(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.$(t):t.nodeType!==void 0?this.T(t):Fe(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==d&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(E.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=B.createElement(ae(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(e);else{const o=new Ve(s,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new B(t)),e}k(t){ne(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new W(this.S(L()),this.S(L()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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 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 et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,s){const n=this.strings;let o=!1;if(n===void 0)t=R(this,t,e,0),o=!H(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=R(this,a[i+c],e,c),l===P&&(l=this._$AH[c]),o||(o=!H(l)||l!==this._$AH[c]),l===d?t=d:t!==d&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ke extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Ge extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Ze extends et{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??d)===P)return;const i=this._$AH,s=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||s);s&&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 Je{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){R(this,t)}}const lt=M.litHtmlPolyfillSupport;lt==null||lt(B,W),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.1.2");const Xe=(r,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new W(t.insertBefore(L(),n),n,void 0,e??{})}return s._$AI(r),s};/**
|
18
18
|
* @license
|
19
19
|
* Copyright 2017 Google LLC
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -22,11 +22,11 @@
|
|
22
22
|
* @license
|
23
23
|
* Copyright 2017 Google LLC
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
25
|
-
*/const Qe={attribute:!0,type:String,converter:
|
25
|
+
*/const Qe={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:wt},ti=(r=Qe,t,e)=>{const{kind:i,metadata:s}=e;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),n.set(e.name,r),i==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(i==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+i)};function m(r){return(t,e)=>typeof e=="object"?ti(r,t,e):((i,s,n)=>{const o=s.hasOwnProperty(n);return s.constructor.createProperty(n,o?{...i,wrapped:!0}:i),o?Object.getOwnPropertyDescriptor(s,n):void 0})(r,t,e)}/**
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/function
|
29
|
+
*/function F(r){return m({...r,state:!0,attribute:!1})}var ei=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,t,e,i)=>{for(var s=i>1?void 0:i?ii(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&ei(t,e,s),s};class it extends ${constructor(){super(...arguments),this.anchor="BottomRight"}appendChild(t){var e;return(e=this.shadowRoot)==null||e.appendChild(t),t}render(){return this.anchor==="BottomLeft"?this.renderRoot.host.classList.add("bottom-left"):this.anchor==="BottomRight"&&this.renderRoot.host.classList.add("bottom-right"),d}}it.styles=[U`
|
30
30
|
:host {
|
31
31
|
position: fixed;
|
32
32
|
display: flex;
|
@@ -54,11 +54,11 @@
|
|
54
54
|
* @license
|
55
55
|
* Copyright 2017 Google LLC
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
57
|
-
*/const k=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),k(s,t);return!0},
|
57
|
+
*/const k=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const s of e)(i=s._$AO)==null||i.call(s,t,!1),k(s,t);return!0},Q=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},le=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ai(t)}};function ni(r){this._$AN!==void 0?(Q(this),this._$AM=r,le(this)):this._$AM=r}function oi(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)k(i[n],!1),Q(i[n]);else i!=null&&(k(i,!1),Q(i));else k(this,r)}const ai=r=>{r.type==At.CHILD&&(r._$AP??(r._$AP=oi),r._$AQ??(r._$AQ=ni))};class he extends ce{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),le(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(s=this.disconnected)==null||s.call(this)),e&&(k(this,t),Q(this))}setValue(t){if(si(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 ci=new WeakMap;let zt=0;const pt=new Map,Wt=new WeakSet,Ft=()=>new Promise(r=>requestAnimationFrame(r)),li=[{transform:"translateX(100%) scale(0)",opacity:0}],Yt=(r,t)=>{const e=r-t;return e===0?void 0:e},qt=(r,t)=>{const e=r/t;return e===1?void 0:e},dt={left:(r,t)=>{const e=Yt(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateX(${e}px)`}},top:(r,t)=>{const e=Yt(r,t);return{value:e,transform:e==null||isNaN(e)?void 0:`translateY(${e}px)`}},width:(r,t)=>{let e;t===0&&(t=1,e={width:"1px"});const i=qt(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let e;t===0&&(t=1,e={height:"1px"});const i=qt(r,t);return{value:i,overrideFrom:e,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},hi={duration:333,easing:"ease-in-out"},pi=["left","top","width","height","opacity","color","background"],Vt=new WeakMap;class di extends he{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===At.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(e=>{this.l=e})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return d}getController(){return ci.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[e]){var s;const i=this.u===void 0;return i&&(this.u=(s=t.options)==null?void 0:s.host,this.u.addController(this),this.u.updateComplete.then(n=>this.t=!0),this.element=t.element,Vt.set(this.element,this)),this.optionsOrCallback=e,(i||typeof e!="function")&&this.p(e),this.render(e)}p(t){t=t??{};const e=this.getController();e!==void 0&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=pi),this.options=t}m(){const t={},e=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(s=>{const n=e[s]??(dt[s]?void 0:i[s]),o=Number(n);t[s]=isNaN(o)?n+"":o}),t}v(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((i,s)=>{if(Array.isArray(i)){if(Array.isArray(s)&&s.length===i.length&&i.every((n,o)=>n===s[o]))return!1}else if(s===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Ft;const e=this.O(),i=this.j(this.options.keyframeOptions,e),s=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,s,e);this.log("measured",[this.A,s,n,o]),t=this.calculateKeyframes(n,o)}else{const n=pt.get(this.options.inId);if(n){pt.delete(this.options.inId);const{from:o,to:a}=this.N(n,s,e);t=this.calculateKeyframes(o,a),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,zt++,t.forEach(c=>c.zIndex=zt)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(e=this.webAnimation)==null||e.cancel()}reconnected(){}async disconnected(){var e;if(!this.h||(this.options.id!==void 0&&pt.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Ft(),(e=this.i)==null?void 0:e.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const n=this.A.left-s.left,o=this.A.top-s.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.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;(e=(t=this.options).onStart)==null||e.call(t,this)}didFinish(t){var e,i;t&&((i=(e=this.options).onComplete)==null||i.call(e,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let e=this.element.parentNode;e;e=e==null?void 0:e.parentNode){const i=Vt.get(e);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=Wt.has(this.u);return t||this.u.updateComplete.then(()=>{Wt.add(this.u)}),t}j(t,e=this.O()){const i={...hi};return e.forEach(s=>Object.assign(i,s.options.keyframeOptions)),Object.assign(i,t),i}N(t,e,i){t={...t},e={...e};const s=i.map(a=>a.animatingProperties).filter(a=>a!==void 0);let n=1,o=1;return s.length>0&&(s.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 s={},n={};let o=!1;const a={};for(const c in e){const l=t[c],h=e[c];if(c in dt){const p=dt[c];if(l===void 0||h===void 0)continue;const f=p(l,h);f.transform!==void 0&&(a[c]=f.value,o=!0,s.transform=`${s.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(s,f.overrideFrom))}else l!==h&&l!==void 0&&h!==void 0&&(o=!0,s[c]=l,n[c]=h)}return s.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=a,o?[s,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 s=this.getController();s==null||s.add(this);try{await this.webAnimation.finished}catch{}s==null||s.remove(this)}return this.didFinish(i),i}isAnimating(){var t,e;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((e=this.webAnimation)==null?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}const ui=Ct(di),fi={name:"question",svg:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>'};/**
|
58
58
|
* @license
|
59
59
|
* Copyright 2018 Google LLC
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
61
|
-
*/const gi=Ct(class extends ce{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((i=this.nt)!=null&&i.has(n))&&this.st.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.st)n in t||(e.remove(n),this.st.delete(n));for(const n in t){const o=!!t[n];o===this.st.has(n)||(s=this.nt)!=null&&s.has(n)||(o?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return P}}),
|
61
|
+
*/const gi=Ct(class extends ce{constructor(r){var t;if(super(r),r.type!==At.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,s;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!((i=this.nt)!=null&&i.has(n))&&this.st.add(n);return this.render(t)}const e=r.element.classList;for(const n of this.st)n in t||(e.remove(n),this.st.delete(n));for(const n in t){const o=!!t[n];o===this.st.has(n)||(s=this.nt)!=null&&s.has(n)||(o?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return P}}),q=(r,t,e)=>{r&&e.style.setProperty(t,r)},pe=(r,t)=>{var e,i,s,n;q((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),q((i=r.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),q((s=r.colors)==null?void 0:s.secondaryBackground,"--secondary-background",t),q((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};/**
|
62
62
|
* @license
|
63
63
|
* Copyright 2020 Google LLC
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -216,7 +216,7 @@
|
|
216
216
|
.trigger-label:hover {
|
217
217
|
opacity: 0.8;
|
218
218
|
}
|
219
|
-
`];rt([m({attribute:!1})],_.prototype,"application",2);rt([
|
219
|
+
`];rt([m({attribute:!1})],_.prototype,"application",2);rt([F()],_.prototype,"active",2);rt([F()],_.prototype,"loaded",2);rt([F()],_.prototype,"icon",2);var bi=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,S=(r,t,e,i)=>{for(var s=i>1?void 0:i?$i(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&bi(t,e,s),s};const fe=r=>{class t extends r{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))`),this.application.mountComponent(this)}}return t.styles=[U`
|
220
220
|
:host {
|
221
221
|
font-family: var(--font-family);
|
222
222
|
grid-column: span var(--width);
|
@@ -335,8 +335,8 @@
|
|
335
335
|
opacity: 0;
|
336
336
|
animation: slideDown 0.3s linear;
|
337
337
|
}
|
338
|
-
`;Ci([m({attribute:!1})],st.prototype,"application",2);class Si{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:[]}},s=(a,c,l,h)=>{l.forEach(p=>{const f=i(p),u=h[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,h))})},{entry:n,components:o}=t;return s(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 s=new i;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ge=class{constructor(){this.components=new Map}getComponent(r){const t=this.components.get(r);return t||console.warn(`Unable to resolve component: ${r}. You most likely forgot to register the required plugin.`),t}registerComponent(r,t){this.components.set(r,t)}async loadComponents(){const r=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(r)}defineAsWebComponent(r,t){const e=ge.ResolveWebComponentName(r);customElements.get(e)||customElements.define(e,t)}};let me=ge;me.ResolveWebComponentName=r=>`ace-${r}`;class ve{constructor(t){this.widgetId=t}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}set(t,e){sessionStorage.setItem(this._prefixKey(t),e)}get(t){const e=sessionStorage.getItem(this._prefixKey(t));if(!e)return null;try{return JSON.parse(e)}catch{return e}}}class xi{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}class ye{constructor(t,e,i,s,n){this.id=t,this.name=e,this.container=i,this.settings=s,this.options=n,this.platform=new Si,this.texts=new xi,this.renderStrategy=y.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new me,this.components=[],this.trigger=null,this.renderStrategy=this.options.renderStrategy||y.Inline,this.triggerIcon=this.options.triggerIcon,this.storage=new ve(this.id),typeof n.autoActivate=="boolean"&&(this.autoActivate=n.autoActivate),n.anchor&&(this.anchor=n.anchor),this.container.register("$settings",s),this.texts.loadTexts(s.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ee.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().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)),this.storage.set("open","true")}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded")),this.storage.set("open","false")}mute(){this.settings.branding.other.disableSound=!0}unmute(){this.settings.branding.other.disableSound=!1}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===y.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new it,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}render(){if(this.renderStrategy===y.Trigger){const t=new _;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const be=class{async getSite(r){const e=await(await fetch(r)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let s=y.Inline;return i.renderStrategy==="Trigger"&&(s=y.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:s,autoActivate:i.autoActivate,anchor:i.anchor,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(r){const e=await(await fetch(`${
|
338
|
+
`;Ci([m({attribute:!1})],st.prototype,"application",2);class Si{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:[]}},s=(a,c,l,h)=>{l.forEach(p=>{const f=i(p),u=h[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,h))})},{entry:n,components:o}=t;return s(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 s=new i;return s.type=e,s.name=t,s}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ge=class{constructor(){this.components=new Map}getComponent(r){const t=this.components.get(r);return t||console.warn(`Unable to resolve component: ${r}. You most likely forgot to register the required plugin.`),t}registerComponent(r,t){this.components.set(r,t)}async loadComponents(){const r=[...this.components.entries()].map(([t,e])=>e.then(i=>{this.defineAsWebComponent(t,i.default)}));await Promise.all(r)}defineAsWebComponent(r,t){const e=ge.ResolveWebComponentName(r);customElements.get(e)||customElements.define(e,t)}};let me=ge;me.ResolveWebComponentName=r=>`ace-${r}`;class ve{constructor(t){this.widgetId=t}_prefixKey(t){return`ace_${this.widgetId.substring(0,7)}-${t}`}set(t,e){sessionStorage.setItem(this._prefixKey(t),e)}get(t){const e=sessionStorage.getItem(this._prefixKey(t));if(!e)return null;try{return JSON.parse(e)}catch{return e}}}class xi{constructor(){this.texts=new Map}loadTexts(t){this.texts=new Map(Object.entries(t))}get(t,e){const i=this.texts.get(t);return i||e||null}getOrFallback(t,e){return this.texts.get(t)||e}}class ye{constructor(t,e,i,s,n){this.id=t,this.name=e,this.container=i,this.settings=s,this.options=n,this.platform=new Si,this.texts=new xi,this.renderStrategy=y.Inline,this.anchor="BottomRight",this.autoActivate=!1,this.plugins=[],this.componentResolver=new me,this.components=[],this.trigger=null,this.renderStrategy=this.options.renderStrategy||y.Inline,this.triggerIcon=this.options.triggerIcon,this.storage=new ve(this.id),typeof n.autoActivate=="boolean"&&(this.autoActivate=n.autoActivate),n.anchor&&(this.anchor=n.anchor),this.container.register("$settings",s),this.texts.loadTexts(s.texts||{})}async activate(){if(await this.loadPlugins(),await this.componentResolver.loadComponents(),this.root=this.platform.createComponentModel(this.settings,this),this.container.setState(ee.Ready),this.autoActivate){const t=this.render();t&&this._getTargetElement().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)),this.storage.set("open","true")}hide(){this.root&&(this.root.classList.add("hidden"),this.root.classList.remove("expanded")),this.storage.set("open","false")}mute(){this.settings.branding.other.disableSound=!0}unmute(){this.settings.branding.other.disableSound=!1}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}mountComponent(t){this.components.push(t)}getComponent(t){const e=this.components.find(i=>i.type===t);return e||null}_getTargetElement(){let t="bottom-right";if(this.anchor==="BottomRight"?t="bottom-right":this.anchor==="BottomLeft"&&(t="bottom-left"),this.renderStrategy===y.Trigger){let e=document.querySelector(`ace-trigger-slot.${t}`);return e||(e=new it,e.anchor=this.anchor,document.body.appendChild(e)),e}return document.body}render(){if(this.renderStrategy===y.Trigger){const t=new _;return t.application=this,this.trigger=t,this.storage.get("open")&&this.trigger.toggleActive(),t}return this.root}}const Ei=r=>new D(r),be=class{constructor(r=be.endpoint){this._endpoint=r}async getSite(r){const e=await(await fetch(r)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let s=y.Inline;return i.renderStrategy==="Trigger"&&(s=y.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:s,autoActivate:i.autoActivate,anchor:i.anchor,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}async getWidget(r){const e=await(await fetch(`${this._endpoint}/widget/${r}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let D=be;D.endpoint="https://widgets.ace.teliacompany.net/api";class $e{constructor(){this.applications=[],this.container=new bt("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(s=>s.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}registerApp(t,e,i,s){const n=new bt(e,this),o=new ye(t,e,n,i,s);this.applications.push(o)}plugin(t){return this.applications.forEach(e=>{e.plugin(t)}),this}}class _e{constructor(t){this.configurations=[],this.httpClient=new D,this.httpClient=new D,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,anchor:e.anchor,triggerIcon:{type:"Telia",content:e.triggerIcon||"question"}}))}async bootstrap(t){var e;this.url&&await this.load(this.url),this.environment=new $e,this.addGlobal(this.environment);for await(const i of this.configurations){const s=await this.httpClient.getWidget(i.widgetId);s&&((e=this.environment)==null||e.registerApp(i.widgetId,s.name,s.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate,anchor:i.anchor}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var Pi=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,xt=(r,t,e,i)=>{for(var s=i>1?void 0:i?Oi(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&Pi(t,e,s),s};class I extends ${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===y.Trigger){const t=new _;return t.application=this.widget,t}return this.widget.render()}}I.styles=[U`
|
339
339
|
:host {
|
340
340
|
display: block;
|
341
341
|
}
|
342
|
-
`];xt([m({attribute:!0})],I.prototype,"name",2);xt([
|
342
|
+
`];xt([m({attribute:!0})],I.prototype,"name",2);xt([F()],I.prototype,"widget",2);xt([F()],I.prototype,"status",2);customElements.get("ace-trigger-slot")||customElements.define("ace-trigger-slot",it);customElements.get("ace-trigger")||customElements.define("ace-trigger",_);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",I);const Ti=async(r,t)=>{await new _e(r).bootstrap(t)};exports.AceWidget=I;exports.Application=ye;exports.Container=bt;exports.Environment=$e;exports.HttpClient=D;exports.Site=_e;exports.StorageService=ve;exports.Trigger=_;exports.WidgetComponent=fe;exports.bootstrap=Ti;exports.createHttpClient=Ei;
|
package/index.mjs
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
var
|
2
|
-
return
|
1
|
+
var ft = function(r, t) {
|
2
|
+
return ft = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
|
3
3
|
e.__proto__ = i;
|
4
4
|
} || function(e, i) {
|
5
5
|
for (var s in i)
|
6
6
|
Object.prototype.hasOwnProperty.call(i, s) && (e[s] = i[s]);
|
7
|
-
},
|
7
|
+
}, ft(r, t);
|
8
8
|
};
|
9
9
|
function B(r, t) {
|
10
10
|
if (typeof t != "function" && t !== null)
|
11
11
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
12
|
-
|
12
|
+
ft(r, t);
|
13
13
|
function e() {
|
14
14
|
this.constructor = r;
|
15
15
|
}
|
16
16
|
r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
17
17
|
}
|
18
|
-
function
|
18
|
+
function gt(r) {
|
19
19
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], i = 0;
|
20
20
|
if (e)
|
21
21
|
return e.call(r);
|
@@ -62,7 +62,7 @@ function Gt(r) {
|
|
62
62
|
}, e = r(t);
|
63
63
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
64
64
|
}
|
65
|
-
var
|
65
|
+
var nt = Gt(function(r) {
|
66
66
|
return function(e) {
|
67
67
|
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
68
68
|
` + e.map(function(i, s) {
|
@@ -71,13 +71,13 @@ var st = Gt(function(r) {
|
|
71
71
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
72
72
|
};
|
73
73
|
});
|
74
|
-
function
|
74
|
+
function mt(r, t) {
|
75
75
|
if (r) {
|
76
76
|
var e = r.indexOf(t);
|
77
77
|
0 <= e && r.splice(e, 1);
|
78
78
|
}
|
79
79
|
}
|
80
|
-
var
|
80
|
+
var tt = function() {
|
81
81
|
function r(t) {
|
82
82
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
83
83
|
}
|
@@ -89,7 +89,7 @@ var Q = function() {
|
|
89
89
|
if (o)
|
90
90
|
if (this._parentage = null, Array.isArray(o))
|
91
91
|
try {
|
92
|
-
for (var a =
|
92
|
+
for (var a = gt(o), c = a.next(); !c.done; c = a.next()) {
|
93
93
|
var h = c.value;
|
94
94
|
h.remove(this);
|
95
95
|
}
|
@@ -110,18 +110,18 @@ var Q = function() {
|
|
110
110
|
try {
|
111
111
|
l();
|
112
112
|
} catch (v) {
|
113
|
-
n = v instanceof
|
113
|
+
n = v instanceof nt ? v.errors : [v];
|
114
114
|
}
|
115
115
|
var p = this._finalizers;
|
116
116
|
if (p) {
|
117
117
|
this._finalizers = null;
|
118
118
|
try {
|
119
|
-
for (var f =
|
119
|
+
for (var f = gt(p), u = f.next(); !u.done; u = f.next()) {
|
120
120
|
var g = u.value;
|
121
121
|
try {
|
122
122
|
xt(g);
|
123
123
|
} catch (v) {
|
124
|
-
n = n ?? [], v instanceof
|
124
|
+
n = n ?? [], v instanceof nt ? n = G(G([], K(n)), K(v.errors)) : n.push(v);
|
125
125
|
}
|
126
126
|
}
|
127
127
|
} catch (v) {
|
@@ -136,7 +136,7 @@ var Q = function() {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
if (n)
|
139
|
-
throw new
|
139
|
+
throw new nt(n);
|
140
140
|
}
|
141
141
|
}, r.prototype.add = function(t) {
|
142
142
|
var e;
|
@@ -159,17 +159,17 @@ var Q = function() {
|
|
159
159
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
160
160
|
}, r.prototype._removeParent = function(t) {
|
161
161
|
var e = this._parentage;
|
162
|
-
e === t ? this._parentage = null : Array.isArray(e) &&
|
162
|
+
e === t ? this._parentage = null : Array.isArray(e) && mt(e, t);
|
163
163
|
}, r.prototype.remove = function(t) {
|
164
164
|
var e = this._finalizers;
|
165
|
-
e &&
|
165
|
+
e && mt(e, t), t instanceof r && t._removeParent(this);
|
166
166
|
}, r.EMPTY = function() {
|
167
167
|
var t = new r();
|
168
168
|
return t.closed = !0, t;
|
169
169
|
}(), r;
|
170
|
-
}(), Zt =
|
170
|
+
}(), Zt = tt.EMPTY;
|
171
171
|
function Jt(r) {
|
172
|
-
return r instanceof
|
172
|
+
return r instanceof tt || r && "closed" in r && b(r.remove) && b(r.add) && b(r.unsubscribe);
|
173
173
|
}
|
174
174
|
function xt(r) {
|
175
175
|
b(r) ? r() : r.unsubscribe();
|
@@ -180,21 +180,21 @@ var Xt = {
|
|
180
180
|
Promise: void 0,
|
181
181
|
useDeprecatedSynchronousErrorHandling: !1,
|
182
182
|
useDeprecatedNextContext: !1
|
183
|
-
},
|
183
|
+
}, vt = {
|
184
184
|
setTimeout: function(r, t) {
|
185
185
|
for (var e = [], i = 2; i < arguments.length; i++)
|
186
186
|
e[i - 2] = arguments[i];
|
187
|
-
var s =
|
187
|
+
var s = vt.delegate;
|
188
188
|
return s != null && s.setTimeout ? s.setTimeout.apply(s, G([r, t], K(e))) : setTimeout.apply(void 0, G([r, t], K(e)));
|
189
189
|
},
|
190
190
|
clearTimeout: function(r) {
|
191
|
-
var t =
|
191
|
+
var t = vt.delegate;
|
192
192
|
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
|
193
193
|
},
|
194
194
|
delegate: void 0
|
195
195
|
};
|
196
196
|
function ve(r) {
|
197
|
-
|
197
|
+
vt.setTimeout(function() {
|
198
198
|
throw r;
|
199
199
|
});
|
200
200
|
}
|
@@ -210,7 +210,7 @@ var Qt = function(r) {
|
|
210
210
|
return i.isStopped = !1, e ? (i.destination = e, Jt(e) && e.add(i)) : i.destination = _e, i;
|
211
211
|
}
|
212
212
|
return t.create = function(e, i, s) {
|
213
|
-
return new
|
213
|
+
return new yt(e, i, s);
|
214
214
|
}, t.prototype.next = function(e) {
|
215
215
|
this.isStopped || this._next(e);
|
216
216
|
}, t.prototype.error = function(e) {
|
@@ -234,8 +234,8 @@ var Qt = function(r) {
|
|
234
234
|
this.unsubscribe();
|
235
235
|
}
|
236
236
|
}, t;
|
237
|
-
}(
|
238
|
-
function
|
237
|
+
}(tt), ye = Function.prototype.bind;
|
238
|
+
function ot(r, t) {
|
239
239
|
return ye.call(r, t);
|
240
240
|
}
|
241
241
|
var be = function() {
|
@@ -269,7 +269,7 @@ var be = function() {
|
|
269
269
|
F(e);
|
270
270
|
}
|
271
271
|
}, r;
|
272
|
-
}(),
|
272
|
+
}(), yt = function(r) {
|
273
273
|
B(t, r);
|
274
274
|
function t(e, i, s) {
|
275
275
|
var n = r.call(this) || this, o;
|
@@ -284,9 +284,9 @@ var be = function() {
|
|
284
284
|
n && Xt.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
285
|
return n.unsubscribe();
|
286
286
|
}, o = {
|
287
|
-
next: e.next &&
|
288
|
-
error: e.error &&
|
289
|
-
complete: e.complete &&
|
287
|
+
next: e.next && ot(e.next, a),
|
288
|
+
error: e.error && ot(e.error, a),
|
289
|
+
complete: e.complete && ot(e.complete, a)
|
290
290
|
}) : o = e;
|
291
291
|
}
|
292
292
|
return n.destination = new be(o), n;
|
@@ -325,7 +325,7 @@ var Pt = function() {
|
|
325
325
|
var e = new r();
|
326
326
|
return e.source = this, e.operator = t, e;
|
327
327
|
}, r.prototype.subscribe = function(t, e, i) {
|
328
|
-
var s = this, n = xe(t) ? t : new
|
328
|
+
var s = this, n = xe(t) ? t : new yt(t, e, i);
|
329
329
|
return q(function() {
|
330
330
|
var o = s, a = o.operator, c = o.source;
|
331
331
|
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
@@ -339,7 +339,7 @@ var Pt = function() {
|
|
339
339
|
}, r.prototype.forEach = function(t, e) {
|
340
340
|
var i = this;
|
341
341
|
return e = Ot(e), new e(function(s, n) {
|
342
|
-
var o = new
|
342
|
+
var o = new yt({
|
343
343
|
next: function(a) {
|
344
344
|
try {
|
345
345
|
t(a);
|
@@ -410,7 +410,7 @@ var Ee = Gt(function(r) {
|
|
410
410
|
if (i._throwIfClosed(), !i.isStopped) {
|
411
411
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
412
412
|
try {
|
413
|
-
for (var o =
|
413
|
+
for (var o = gt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
414
414
|
var c = a.value;
|
415
415
|
c.next(e);
|
416
416
|
}
|
@@ -459,8 +459,8 @@ var Ee = Gt(function(r) {
|
|
459
459
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
460
460
|
}, t.prototype._innerSubscribe = function(e) {
|
461
461
|
var i = this, s = this, n = s.hasError, o = s.isStopped, a = s.observers;
|
462
|
-
return n || o ? Zt : (this.currentObservers = null, a.push(e), new
|
463
|
-
i.currentObservers = null,
|
462
|
+
return n || o ? Zt : (this.currentObservers = null, a.push(e), new tt(function() {
|
463
|
+
i.currentObservers = null, mt(a, e);
|
464
464
|
}));
|
465
465
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
466
466
|
var i = this, s = i.hasError, n = i.thrownError, o = i.isStopped;
|
@@ -587,7 +587,7 @@ const Oe = (r) => new ie(typeof r == "string" ? r : r + "", void 0, $t), U = (r,
|
|
587
587
|
* Copyright 2017 Google LLC
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
589
589
|
*/
|
590
|
-
const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor: Ie, getOwnPropertyNames: Ne, getOwnPropertySymbols: je, getPrototypeOf: ke } = Object, w = globalThis, Nt = w.trustedTypes, Me = Nt ? Nt.emptyScript : "",
|
590
|
+
const { is: Re, defineProperty: Ue, getOwnPropertyDescriptor: Ie, getOwnPropertyNames: Ne, getOwnPropertySymbols: je, getPrototypeOf: ke } = Object, w = globalThis, Nt = w.trustedTypes, Me = Nt ? Nt.emptyScript : "", at = w.reactiveElementPolyfillSupport, N = (r, t) => r, Z = { toAttribute(r, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
593
|
r = r ? Me : null;
|
@@ -828,14 +828,14 @@ let O = class extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
};
|
831
|
-
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[N("elementProperties")] = /* @__PURE__ */ new Map(), O[N("finalized")] = /* @__PURE__ */ new Map(),
|
831
|
+
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[N("elementProperties")] = /* @__PURE__ */ new Map(), O[N("finalized")] = /* @__PURE__ */ new Map(), at == null || at({ ReactiveElement: O }), (w.reactiveElementVersions ?? (w.reactiveElementVersions = [])).push("2.0.4");
|
832
832
|
/**
|
833
833
|
* @license
|
834
834
|
* Copyright 2017 Google LLC
|
835
835
|
* SPDX-License-Identifier: BSD-3-Clause
|
836
836
|
*/
|
837
|
-
const j = globalThis, J = j.trustedTypes, kt = J ? J.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, re = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + _, Le = `<${se}>`, E = document, M = () => E.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", ne = Array.isArray, He = (r) => ne(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function",
|
838
|
-
\f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Mt = /-->/g, Lt = />/g, C = RegExp(`>|${
|
837
|
+
const j = globalThis, J = j.trustedTypes, kt = J ? J.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, re = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + _, Le = `<${se}>`, E = document, M = () => E.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", ne = Array.isArray, He = (r) => ne(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ct = `[
|
838
|
+
\f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Mt = /-->/g, Lt = />/g, C = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
839
839
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Bt = /"/g, oe = /^(?:script|style|textarea|title)$/i, Be = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = Be(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), x = E.createTreeWalker(E, 129);
|
840
840
|
function ae(r, t) {
|
841
841
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
@@ -871,7 +871,7 @@ class H {
|
|
871
871
|
for (const p of s.getAttributeNames())
|
872
872
|
if (p.endsWith(re)) {
|
873
873
|
const f = l[o++], u = s.getAttribute(p).split(_), g = /([.?@])?(.*)/.exec(f);
|
874
|
-
c.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? We : g[1] === "?" ? Fe : g[1] === "@" ? Ye :
|
874
|
+
c.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? We : g[1] === "?" ? Fe : g[1] === "@" ? Ye : et }), s.removeAttribute(p);
|
875
875
|
} else
|
876
876
|
p.startsWith(_) && (c.push({ type: 6, index: n }), s.removeAttribute(p));
|
877
877
|
if (oe.test(s.tagName)) {
|
@@ -1001,7 +1001,7 @@ class D {
|
|
1001
1001
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
1002
1002
|
}
|
1003
1003
|
}
|
1004
|
-
class
|
1004
|
+
class et {
|
1005
1005
|
get tagName() {
|
1006
1006
|
return this.element.tagName;
|
1007
1007
|
}
|
@@ -1028,7 +1028,7 @@ class tt {
|
|
1028
1028
|
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
|
-
class We extends
|
1031
|
+
class We extends et {
|
1032
1032
|
constructor() {
|
1033
1033
|
super(...arguments), this.type = 3;
|
1034
1034
|
}
|
@@ -1036,7 +1036,7 @@ class We extends tt {
|
|
1036
1036
|
this.element[this.name] = t === d ? void 0 : t;
|
1037
1037
|
}
|
1038
1038
|
}
|
1039
|
-
class Fe extends
|
1039
|
+
class Fe extends et {
|
1040
1040
|
constructor() {
|
1041
1041
|
super(...arguments), this.type = 4;
|
1042
1042
|
}
|
@@ -1044,7 +1044,7 @@ class Fe extends tt {
|
|
1044
1044
|
this.element.toggleAttribute(this.name, !!t && t !== d);
|
1045
1045
|
}
|
1046
1046
|
}
|
1047
|
-
class Ye extends
|
1047
|
+
class Ye extends et {
|
1048
1048
|
constructor(t, e, i, s, n) {
|
1049
1049
|
super(t, e, i, s, n), this.type = 5;
|
1050
1050
|
}
|
@@ -1070,8 +1070,8 @@ class qe {
|
|
1070
1070
|
R(this, t);
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
|
-
const
|
1074
|
-
|
1073
|
+
const ht = j.litHtmlPolyfillSupport;
|
1074
|
+
ht == null || ht(H, D), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.1.2");
|
1075
1075
|
const Ve = (r, t, e) => {
|
1076
1076
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
1077
|
let s = i._$litPart$;
|
@@ -1113,8 +1113,8 @@ let $ = class extends O {
|
|
1113
1113
|
};
|
1114
1114
|
var Kt;
|
1115
1115
|
$._$litElement$ = !0, $.finalized = !0, (Kt = globalThis.litElementHydrateSupport) == null || Kt.call(globalThis, { LitElement: $ });
|
1116
|
-
const
|
1117
|
-
|
1116
|
+
const lt = globalThis.litElementPolyfillSupport;
|
1117
|
+
lt == null || lt({ LitElement: $ });
|
1118
1118
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
1119
1119
|
/**
|
1120
1120
|
* @license
|
@@ -1161,7 +1161,7 @@ var Ze = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, Xe = (r, t
|
|
1161
1161
|
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
1162
1162
|
return i && s && Ze(t, e, s), s;
|
1163
1163
|
};
|
1164
|
-
class
|
1164
|
+
class it extends $ {
|
1165
1165
|
constructor() {
|
1166
1166
|
super(...arguments), this.anchor = "BottomRight";
|
1167
1167
|
}
|
@@ -1173,7 +1173,7 @@ class et extends $ {
|
|
1173
1173
|
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), d;
|
1174
1174
|
}
|
1175
1175
|
}
|
1176
|
-
|
1176
|
+
it.styles = [
|
1177
1177
|
U`
|
1178
1178
|
:host {
|
1179
1179
|
position: fixed;
|
@@ -1194,7 +1194,7 @@ et.styles = [
|
|
1194
1194
|
];
|
1195
1195
|
Xe([
|
1196
1196
|
m({ attribute: !0 })
|
1197
|
-
],
|
1197
|
+
], it.prototype, "anchor", 2);
|
1198
1198
|
/**
|
1199
1199
|
* @license
|
1200
1200
|
* Copyright 2017 Google LLC
|
@@ -1297,13 +1297,13 @@ class le extends ce {
|
|
1297
1297
|
}
|
1298
1298
|
const ri = /* @__PURE__ */ new WeakMap();
|
1299
1299
|
let zt = 0;
|
1300
|
-
const
|
1300
|
+
const pt = /* @__PURE__ */ new Map(), Wt = /* @__PURE__ */ new WeakSet(), Ft = () => new Promise((r) => requestAnimationFrame(r)), si = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], Yt = (r, t) => {
|
1301
1301
|
const e = r - t;
|
1302
1302
|
return e === 0 ? void 0 : e;
|
1303
1303
|
}, qt = (r, t) => {
|
1304
1304
|
const e = r / t;
|
1305
1305
|
return e === 1 ? void 0 : e;
|
1306
|
-
},
|
1306
|
+
}, dt = { left: (r, t) => {
|
1307
1307
|
const e = Yt(r, t);
|
1308
1308
|
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
|
1309
1309
|
}, top: (r, t) => {
|
@@ -1359,7 +1359,7 @@ class ai extends le {
|
|
1359
1359
|
m() {
|
1360
1360
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1361
1361
|
return this.options.properties.forEach((s) => {
|
1362
|
-
const n = e[s] ?? (
|
1362
|
+
const n = e[s] ?? (dt[s] ? void 0 : i[s]), o = Number(n);
|
1363
1363
|
t[s] = isNaN(o) ? n + "" : o;
|
1364
1364
|
}), t;
|
1365
1365
|
}
|
@@ -1387,9 +1387,9 @@ class ai extends le {
|
|
1387
1387
|
const { from: n, to: o } = this.N(this.A, s, e);
|
1388
1388
|
this.log("measured", [this.A, s, n, o]), t = this.calculateKeyframes(n, o);
|
1389
1389
|
} else {
|
1390
|
-
const n =
|
1390
|
+
const n = pt.get(this.options.inId);
|
1391
1391
|
if (n) {
|
1392
|
-
|
1392
|
+
pt.delete(this.options.inId);
|
1393
1393
|
const { from: o, to: a } = this.N(n, s, e);
|
1394
1394
|
t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, zt++, t.forEach((c) => c.zIndex = zt);
|
1395
1395
|
} else
|
@@ -1408,7 +1408,7 @@ class ai extends le {
|
|
1408
1408
|
}
|
1409
1409
|
async disconnected() {
|
1410
1410
|
var e;
|
1411
|
-
if (!this.h || (this.options.id !== void 0 &&
|
1411
|
+
if (!this.h || (this.options.id !== void 0 && pt.set(this.options.id, this.A), this.options.out === void 0))
|
1412
1412
|
return;
|
1413
1413
|
if (this.prepare(), await Ft(), (e = this.i) == null ? void 0 : e.isConnected) {
|
1414
1414
|
const i = this.o && this.o.parentNode === this.i ? this.o : null;
|
@@ -1465,8 +1465,8 @@ class ai extends le {
|
|
1465
1465
|
const a = {};
|
1466
1466
|
for (const c in e) {
|
1467
1467
|
const h = t[c], l = e[c];
|
1468
|
-
if (c in
|
1469
|
-
const p =
|
1468
|
+
if (c in dt) {
|
1469
|
+
const p = dt[c];
|
1470
1470
|
if (h === void 0 || l === void 0)
|
1471
1471
|
continue;
|
1472
1472
|
const f = p(h, l);
|
@@ -1557,7 +1557,7 @@ const li = At(class extends ce {
|
|
1557
1557
|
const de = () => new pi();
|
1558
1558
|
class pi {
|
1559
1559
|
}
|
1560
|
-
const
|
1560
|
+
const ut = /* @__PURE__ */ new WeakMap(), ue = At(class extends le {
|
1561
1561
|
render(r) {
|
1562
1562
|
return d;
|
1563
1563
|
}
|
@@ -1569,14 +1569,14 @@ const dt = /* @__PURE__ */ new WeakMap(), ue = At(class extends le {
|
|
1569
1569
|
rt(r) {
|
1570
1570
|
if (typeof this.Y == "function") {
|
1571
1571
|
const t = this.ht ?? globalThis;
|
1572
|
-
let e =
|
1573
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
1572
|
+
let e = ut.get(t);
|
1573
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), ut.set(t, e)), e.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), e.set(this.Y, r), r !== void 0 && this.Y.call(this.ht, r);
|
1574
1574
|
} else
|
1575
1575
|
this.Y.value = r;
|
1576
1576
|
}
|
1577
1577
|
get lt() {
|
1578
1578
|
var r, t;
|
1579
|
-
return typeof this.Y == "function" ? (r =
|
1579
|
+
return typeof this.Y == "function" ? (r = ut.get(this.ht ?? globalThis)) == null ? void 0 : r.get(this.Y) : (t = this.Y) == null ? void 0 : t.value;
|
1580
1580
|
}
|
1581
1581
|
disconnected() {
|
1582
1582
|
this.lt === this.ct && this.rt(void 0);
|
@@ -1585,7 +1585,7 @@ const dt = /* @__PURE__ */ new WeakMap(), ue = At(class extends le {
|
|
1585
1585
|
this.rt(this.ct);
|
1586
1586
|
}
|
1587
1587
|
});
|
1588
|
-
var di = Object.defineProperty, ui = Object.getOwnPropertyDescriptor,
|
1588
|
+
var di = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, rt = (r, t, e, i) => {
|
1589
1589
|
for (var s = i > 1 ? void 0 : i ? ui(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
1590
1590
|
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
1591
1591
|
return i && s && di(t, e, s), s;
|
@@ -1800,16 +1800,16 @@ A.styles = [
|
|
1800
1800
|
}
|
1801
1801
|
`
|
1802
1802
|
];
|
1803
|
-
|
1803
|
+
rt([
|
1804
1804
|
m({ attribute: !1 })
|
1805
1805
|
], A.prototype, "application", 2);
|
1806
|
-
|
1806
|
+
rt([
|
1807
1807
|
z()
|
1808
1808
|
], A.prototype, "active", 2);
|
1809
|
-
|
1809
|
+
rt([
|
1810
1810
|
z()
|
1811
1811
|
], A.prototype, "loaded", 2);
|
1812
|
-
|
1812
|
+
rt([
|
1813
1813
|
z()
|
1814
1814
|
], A.prototype, "icon", 2);
|
1815
1815
|
var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, S = (r, t, e, i) => {
|
@@ -1901,7 +1901,7 @@ var y = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))
|
|
1901
1901
|
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
1902
1902
|
return i && s && yi(t, e, s), s;
|
1903
1903
|
};
|
1904
|
-
class
|
1904
|
+
class st extends $ {
|
1905
1905
|
constructor() {
|
1906
1906
|
super(...arguments), this.nodes = [], this.wrapperRef = de();
|
1907
1907
|
}
|
@@ -1931,7 +1931,7 @@ class rt extends $ {
|
|
1931
1931
|
</div>`;
|
1932
1932
|
}
|
1933
1933
|
}
|
1934
|
-
|
1934
|
+
st.styles = U`
|
1935
1935
|
:host {
|
1936
1936
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1937
1937
|
--spacing-xs: 0.2rem;
|
@@ -2031,7 +2031,7 @@ rt.styles = U`
|
|
2031
2031
|
`;
|
2032
2032
|
$i([
|
2033
2033
|
m({ attribute: !1 })
|
2034
|
-
],
|
2034
|
+
], st.prototype, "application", 2);
|
2035
2035
|
class _i {
|
2036
2036
|
constructor() {
|
2037
2037
|
this.root = this.createRoot();
|
@@ -2072,7 +2072,7 @@ class _i {
|
|
2072
2072
|
return s(this, this.root, [n], o), this.root;
|
2073
2073
|
}
|
2074
2074
|
createRoot() {
|
2075
|
-
return new
|
2075
|
+
return new st();
|
2076
2076
|
}
|
2077
2077
|
createNode(t, e) {
|
2078
2078
|
const i = this.resolveComponent(e);
|
@@ -2204,7 +2204,7 @@ class Ci {
|
|
2204
2204
|
let e = document.querySelector(
|
2205
2205
|
`ace-trigger-slot.${t}`
|
2206
2206
|
);
|
2207
|
-
return e || (e = new
|
2207
|
+
return e || (e = new it(), e.anchor = this.anchor, document.body.appendChild(e)), e;
|
2208
2208
|
}
|
2209
2209
|
return document.body;
|
2210
2210
|
}
|
@@ -2216,9 +2216,12 @@ class Ci {
|
|
2216
2216
|
return this.root;
|
2217
2217
|
}
|
2218
2218
|
}
|
2219
|
-
const me = class {
|
2219
|
+
const Ii = (r) => new Q(r), me = class {
|
2220
2220
|
// TODO:
|
2221
2221
|
// private static endpoint = 'http://localhost:5299/api'; // TODO:
|
2222
|
+
constructor(r = me.endpoint) {
|
2223
|
+
this._endpoint = r;
|
2224
|
+
}
|
2222
2225
|
async getSite(r) {
|
2223
2226
|
const e = await (await fetch(r)).json();
|
2224
2227
|
return e ? {
|
@@ -2240,15 +2243,15 @@ const me = class {
|
|
2240
2243
|
} : null;
|
2241
2244
|
}
|
2242
2245
|
async getWidget(r) {
|
2243
|
-
const e = await (await fetch(`${
|
2246
|
+
const e = await (await fetch(`${this._endpoint}/widget/${r}`)).json();
|
2244
2247
|
return e ? {
|
2245
2248
|
name: e.name,
|
2246
2249
|
config: JSON.parse(e.configuration)
|
2247
2250
|
} : null;
|
2248
2251
|
}
|
2249
2252
|
};
|
2250
|
-
let
|
2251
|
-
|
2253
|
+
let Q = me;
|
2254
|
+
Q.endpoint = "https://widgets.ace.teliacompany.net/api";
|
2252
2255
|
class Si {
|
2253
2256
|
constructor() {
|
2254
2257
|
this.applications = [], this.container = new Rt("environment", this), setTimeout(() => {
|
@@ -2287,7 +2290,7 @@ class Si {
|
|
2287
2290
|
}
|
2288
2291
|
class xi {
|
2289
2292
|
constructor(t) {
|
2290
|
-
this.configurations = [], this.httpClient = new
|
2293
|
+
this.configurations = [], this.httpClient = new Q(), this.httpClient = new Q(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
|
2291
2294
|
}
|
2292
2295
|
async load(t) {
|
2293
2296
|
const e = await this.httpClient.getSite(t);
|
@@ -2386,12 +2389,12 @@ St([
|
|
2386
2389
|
St([
|
2387
2390
|
z()
|
2388
2391
|
], W.prototype, "status", 2);
|
2389
|
-
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot",
|
2392
|
+
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", it);
|
2390
2393
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
2391
2394
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Ct);
|
2392
|
-
customElements.get("ace-wrapper") || customElements.define("ace-wrapper",
|
2395
|
+
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", st);
|
2393
2396
|
customElements.get("ace-widget") || customElements.define("ace-widget", W);
|
2394
|
-
const
|
2397
|
+
const Ni = async (r, t) => {
|
2395
2398
|
await new xi(r).bootstrap(t);
|
2396
2399
|
};
|
2397
2400
|
export {
|
@@ -2399,10 +2402,11 @@ export {
|
|
2399
2402
|
Ci as Application,
|
2400
2403
|
Rt as Container,
|
2401
2404
|
Si as Environment,
|
2402
|
-
|
2405
|
+
Q as HttpClient,
|
2403
2406
|
xi as Site,
|
2404
2407
|
wi as StorageService,
|
2405
2408
|
A as Trigger,
|
2406
2409
|
mi as WidgetComponent,
|
2407
|
-
|
2410
|
+
Ni as bootstrap,
|
2411
|
+
Ii as createHttpClient
|
2408
2412
|
};
|
package/package.json
CHANGED
@@ -7,8 +7,11 @@ export interface IHttpClient {
|
|
7
7
|
getSite(url: string): Promise<SiteConfig | null>;
|
8
8
|
getWidget(widgetId: string): Promise<GetWidgetResponse | null>;
|
9
9
|
}
|
10
|
+
export declare const createHttpClient: (endpoint?: string) => IHttpClient;
|
10
11
|
export declare class HttpClient implements IHttpClient {
|
12
|
+
private _endpoint;
|
11
13
|
private static endpoint;
|
14
|
+
constructor(_endpoint?: string);
|
12
15
|
getSite(url: string): Promise<SiteConfig | null>;
|
13
16
|
getWidget(widgetId: string): Promise<GetWidgetResponse | null>;
|
14
17
|
}
|