@telia-ace/widget-core-flamingo 1.1.12-rc.5 → 1.1.12-rc.6
Sign up to get free protection for your applications and to get access to all the features.
- package/components/ace-widget.component.d.ts +1 -1
- package/index.js +26 -26
- package/index.mjs +155 -157
- package/package.json +1 -1
@@ -16,6 +16,6 @@ export declare class AceWidget extends LitElement {
|
|
16
16
|
onEnvironmentCreated(event: any): Promise<void>;
|
17
17
|
activate(): Promise<void>;
|
18
18
|
getGlobalEnvironment(): Promise<void>;
|
19
|
-
render(): typeof nothing |
|
19
|
+
render(): Trigger | typeof nothing | import("./wrapper.component").Wrapper | undefined;
|
20
20
|
}
|
21
21
|
export {};
|
package/index.js
CHANGED
@@ -1,49 +1,49 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var pt=function(r,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},pt(r,t)};function
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var pt=function(r,t){return pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},pt(r,t)};function D(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pt(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ut(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 F(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var i=e.call(r),n,s=[],o;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return s}function Y(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return r.concat(s||Array.prototype.slice.call(t))}function m(r){return typeof r=="function"}function Nt(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=Nt(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
|
2
2
|
`+e.map(function(i,n){return n+1+") "+i.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function dt(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,n,s;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 d=this.initialTeardown;if(m(d))try{d()}catch(v){s=v instanceof nt?v.errors:[v]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=ut(l),p=f.next();!p.done;p=f.next()){var g=p.value;try{
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function dt(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,n,s;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 d=this.initialTeardown;if(m(d))try{d()}catch(v){s=v instanceof nt?v.errors:[v]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=ut(l),p=f.next();!p.done;p=f.next()){var g=p.value;try{wt(g)}catch(v){s=s??[],v instanceof nt?s=Y(Y([],F(s)),F(v.errors)):s.push(v)}}}catch(v){i={error:v}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}if(s)throw new nt(s)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)wt(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)&&dt(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&dt(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}(),Dt=tt.EMPTY;function Lt(r){return r instanceof tt||r&&"closed"in r&&m(r.remove)&&m(r.add)&&m(r.unsubscribe)}function wt(r){m(r)?r():r.unsubscribe()}var Bt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ft={setTimeout:function(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];var n=ft.delegate;return n!=null&&n.setTimeout?n.setTimeout.apply(n,Y([r,t],F(e))):setTimeout.apply(void 0,Y([r,t],F(e)))},clearTimeout:function(r){var t=ft.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(r)},delegate:void 0};function he(r){ft.setTimeout(function(){throw r})}function At(){}function V(r){r()}var Wt=function(r){D(t,r);function t(e){var i=r.call(this)||this;return i.isStopped=!1,e?(i.destination=e,Lt(e)&&e.add(i)):i.destination=fe,i}return t.create=function(e,i,n){return new gt(e,i,n)},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),pe=Function.prototype.bind;function st(r,t){return pe.call(r,t)}var ue=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(i){z(i)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(i){z(i)}else z(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){z(e)}},r}(),gt=function(r){D(t,r);function t(e,i,n){var s=r.call(this)||this,o;if(m(e)||!e)o={next:e??void 0,error:i??void 0,complete:n??void 0};else{var a;s&&Bt.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return s.unsubscribe()},o={next:e.next&&st(e.next,a),error:e.error&&st(e.error,a),complete:e.complete&&st(e.complete,a)}):o=e}return s.destination=new ue(o),s}return t}(Wt);function z(r){he(r)}function de(r){throw r}var fe={closed:!0,next:At,error:de,complete:At},ge=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ve(r){return r}function ye(r){return r.length===0?ve:r.length===1?r[0]:function(e){return r.reduce(function(i,n){return n(i)},e)}}var St=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 n=this,s=be(t)?t:new gt(t,e,i);return V(function(){var o=n,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?n._subscribe(s):n._trySubscribe(s))}),s},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=Et(e),new e(function(n,s){var o=new gt({next:function(a){try{t(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:n});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[ge]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ye(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Et(t),new t(function(i,n){var s;e.subscribe(function(o){return s=o},function(o){return n(o)},function(){return i(s)})})},r.create=function(t){return new r(t)},r}();function Et(r){var t;return(t=r??Bt.Promise)!==null&&t!==void 0?t:Promise}function me(r){return r&&m(r.next)&&m(r.error)&&m(r.complete)}function be(r){return r&&r instanceof Wt||me(r)&&Lt(r)}var _e=Nt(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),zt=function(r){D(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 Ct(this,this);return i.operator=e,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new _e},t.prototype.next=function(e){var i=this;V(function(){var n,s;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var o=ut(i.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(e)}}catch(h){n={error:h}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(n)throw n.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 n=i.observers;n.length;)n.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,n=this,s=n.hasError,o=n.isStopped,a=n.observers;return s||o?Dt:(this.currentObservers=null,a.push(e),new tt(function(){i.currentObservers=null,dt(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var i=this,n=i.hasError,s=i.thrownError,o=i.isStopped;n?e.error(s):o&&e.complete()},t.prototype.asObservable=function(){var e=new St;return e.source=this,e},t.create=function(e,i){return new Ct(e,i)},t}(St),Ct=function(r){D(t,r);function t(e,i){var n=r.call(this)||this;return n.destination=e,n.source=i,n}return t.prototype.next=function(e){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.next)===null||n===void 0||n.call(i,e)},t.prototype.error=function(e){var i,n;(n=(i=this.destination)===null||i===void 0?void 0:i.error)===null||n===void 0||n.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,n;return(n=(i=this.source)===null||i===void 0?void 0:i.subscribe(e))!==null&&n!==void 0?n:Dt},t}(zt),$e=function(r){D(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,n=e.thrownError,s=e._value;if(i)throw n;return this._throwIfClosed(),s},t.prototype.next=function(e){r.prototype.next.call(this,this._value=e)},t}(zt),Gt=(r=>(r.Loading="loading",r.Ready="ready",r))(Gt||{});class vt{constructor(t,e){this.state=new $e("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 q=globalThis,mt=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),
|
7
|
+
*/const q=globalThis,mt=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),xt=new WeakMap;let Vt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==bt)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(mt&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=xt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&xt.set(e,t))}return t}toString(){return this.cssText}};const we=r=>new Vt(typeof r=="string"?r:r+"",void 0,bt),L=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,n,s)=>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.")})(n)+r[s+1],r[0]);return new Vt(e,r,bt)},Ae=(r,t)=>{if(mt)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),n=q.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=e.cssText,r.appendChild(i)}},Pt=mt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return we(e)})(r):r;/**
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/const{is:
|
11
|
+
*/const{is:Se,defineProperty:Ee,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:xe,getOwnPropertySymbols:Pe,getPrototypeOf:Oe}=Object,$=globalThis,Ot=$.trustedTypes,Te=Ot?Ot.emptyScript:"",ot=$.reactiveElementPolyfillSupport,R=(r,t)=>r,J={toAttribute(r,t){switch(t){case Boolean:r=r?Te: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}},_t=(r,t)=>!Se(r,t),Tt={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:_t};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class O 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=Tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,e);n!==void 0&&Ee(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){const{get:n,set:s}=Ce(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return n==null?void 0:n.call(this)},set(o){const a=n==null?void 0:n.call(this);s.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Tt}static _$Ei(){if(this.hasOwnProperty(R("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(R("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R("properties"))){const e=this.properties,i=[...xe(e),...Pe(e)];for(const n of i)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,n]of e)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const n=this._$Eu(e,i);n!==void 0&&this._$Eh.set(n,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 n of i)e.unshift(Pt(n))}else t!==void 0&&e.push(Pt(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 Ae(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 s;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const o=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:J).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const o=i.getPropertyOptions(n),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:J;this._$Em=n,this[n]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i,n=!1,s){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??_t)(n?s: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[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[s,o]of n)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.C(s,this[s],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$ES)==null||i.forEach(n=>{var s;return(s=n.hostUpdate)==null?void 0:s.call(n)}),this.update(e)):this._$ET()}catch(n){throw t=!1,this._$ET(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.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[R("elementProperties")]=new Map,O[R("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
|
16
|
-
\f\r]`,
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
15
|
+
*/const I=globalThis,K=I.trustedTypes,Ut=K?K.createPolicy("lit-html",{createHTML:r=>r}):void 0,qt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,Ft="?"+_,Ue=`<${Ft}>`,x=document,j=()=>x.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",Yt=Array.isArray,Re=r=>Yt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",at=`[
|
16
|
+
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,It=/>/g,S=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,jt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,Ie=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Z=Ie(1),P=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Ht=new WeakMap,C=x.createTreeWalker(x,129);function Kt(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ut!==void 0?Ut.createHTML(t):t}const Me=(r,t)=>{const e=r.length-1,i=[];let n,s=t===2?"<svg>":"",o=U;for(let a=0;a<e;a++){const c=r[a];let h,d,l=-1,f=0;for(;f<c.length&&(o.lastIndex=f,d=o.exec(c),d!==null);)f=o.lastIndex,o===U?d[1]==="!--"?o=Rt:d[1]!==void 0?o=It:d[2]!==void 0?(Jt.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=S):d[3]!==void 0&&(o=S):o===S?d[0]===">"?(o=n??U,l=-1):d[1]===void 0?l=-2:(l=o.lastIndex-d[2].length,h=d[1],o=d[3]===void 0?S:d[3]==='"'?jt:Mt):o===jt||o===Mt?o=S:o===Rt||o===It?o=U:(o=S,n=void 0);const p=o===S&&r[a+1].startsWith("/>")?" ":"";s+=o===U?c+Ue:l>=0?(i.push(h),c.slice(0,l)+qt+c.slice(l)+_+p):c+_+(l===-2?a:p)}return[Kt(r,s+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};class k{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,o=0;const a=t.length-1,c=this.parts,[h,d]=Me(t,e);if(this.el=k.createElement(h,i),C.currentNode=this.el.content,e===2){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(n=C.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const l of n.getAttributeNames())if(l.endsWith(qt)){const f=d[o++],p=n.getAttribute(l).split(_),g=/([.?@])?(.*)/.exec(f);c.push({type:1,index:s,name:g[2],strings:p,ctor:g[1]==="."?He:g[1]==="?"?ke:g[1]==="@"?Ne:et}),n.removeAttribute(l)}else l.startsWith(_)&&(c.push({type:6,index:s}),n.removeAttribute(l));if(Jt.test(n.tagName)){const l=n.textContent.split(_),f=l.length-1;if(f>0){n.textContent=K?K.emptyScript:"";for(let p=0;p<f;p++)n.append(l[p],j()),C.nextNode(),c.push({type:2,index:++s});n.append(l[f],j())}}}else if(n.nodeType===8)if(n.data===Ft)c.push({type:2,index:s});else{let l=-1;for(;(l=n.data.indexOf(_,l+1))!==-1;)c.push({type:7,index:s}),l+=_.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function T(r,t,e=r,i){var o,a;if(t===P)return t;let n=i!==void 0?(o=e._$Co)==null?void 0:o[i]:e._$Cl;const s=H(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==s&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),s===void 0?n=void 0:(n=new s(r),n._$AT(r,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=n:e._$Cl=n),n!==void 0&&(t=T(r,n._$AS(r,t.values),n,i)),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:i}=this._$AD,n=((t==null?void 0:t.creationScope)??x).importNode(e,!0);C.currentNode=n;let s=C.nextNode(),o=0,a=0,c=i[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new B(s,s.nextSibling,this,t):c.type===1?h=new c.ctor(s,c.name,c.strings,this,t):c.type===6&&(h=new De(s,this,t)),this._$AV.push(h),c=i[++a]}o!==(c==null?void 0:c.index)&&(s=C.nextNode(),o++)}return C.currentNode=x,n}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 B{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,n){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.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=T(this,t,e),H(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Re(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!==u&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var s;const{values:e,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=k.createElement(Kt(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===n)this._$AH.p(e);else{const o=new je(n,this),a=o.u(this.options);o.p(e),this.$(a),this._$AH=o}}_$AC(t){let e=Ht.get(t.strings);return e===void 0&&Ht.set(t.strings,e=new k(t)),e}T(t){Yt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new B(this.k(j()),this.k(j()),this,this.options)):i=e[n],i._$AI(s),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$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 n=t.nextSibling;t.remove(),t=n}}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,n,s){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}_$AI(t,e=this,i,n){const s=this.strings;let o=!1;if(s===void 0)t=T(this,t,e,0),o=!H(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const a=t;let c,h;for(t=s[0],c=0;c<s.length-1;c++)h=T(this,a[i+c],e,c),h===P&&(h=this._$AH[c]),o||(o=!H(h)||h!==this._$AH[c]),h===u?t=u:t!==u&&(t+=(h??"")+s[c+1]),this._$AH[c]=h}o&&!n&&this.O(t)}O(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class He extends et{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===u?void 0:t}}class ke extends et{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class Ne extends et{constructor(t,e,i,n,s){super(t,e,i,n,s),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??u)===P)return;const i=this._$AH,n=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==u&&(i===u||n);n&&this.element.removeEventListener(this.name,this,i),s&&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 De{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){T(this,t)}}const ct=I.litHtmlPolyfillSupport;ct==null||ct(k,B),(I.litHtmlVersions??(I.litHtmlVersions=[])).push("3.0.2");const Le=(r,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const s=(e==null?void 0:e.renderBefore)??null;i._$litPart$=n=new B(t.insertBefore(j(),s),s,void 0,e??{})}return n._$AI(r),n};/**
|
18
18
|
* @license
|
19
19
|
* Copyright 2017 Google LLC
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
-
*/let
|
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=Le(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 kt;w._$litElement$=!0,w.finalized=!0,(kt=globalThis.litElementHydrateSupport)==null||kt.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
|
25
|
+
*/const $t=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/const
|
29
|
+
*/const Be={attribute:!0,type:String,converter:J,reflect:!1,hasChanged:_t},We=(r=Be,t,e)=>{const{kind:i,metadata:n}=e;let s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),s.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.C(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 y(r){return(t,e)=>typeof e=="object"?We(r,t,e):((i,n,s)=>{const o=n.hasOwnProperty(s);return n.constructor.createProperty(s,o?{...i,wrapped:!0}:i),o?Object.getOwnPropertyDescriptor(n,s):void 0})(r,t,e)}/**
|
30
30
|
* @license
|
31
31
|
* Copyright 2017 Google LLC
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
33
|
-
*/function
|
33
|
+
*/function W(r){return y({...r,state:!0,attribute:!1})}/**
|
34
34
|
* @license
|
35
35
|
* Copyright 2017 Google LLC
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
37
|
-
*/const
|
37
|
+
*/const Zt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Qt=r=>(...t)=>({_$litDirective$:r,values:t});class Xt{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)}}/**
|
38
38
|
* @license
|
39
39
|
* Copyright 2018 Google LLC
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
41
|
-
*/const
|
41
|
+
*/const ze=Qt(class extends Xt{constructor(r){var t;if(super(r),r.type!==Zt.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,n;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.st=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in t)t[s]&&!((i=this.st)!=null&&i.has(s))&&this.it.add(s);return this.render(t)}const e=r.element.classList;for(const s of this.it)s in t||(e.remove(s),this.it.delete(s));for(const s in t){const o=!!t[s];o===this.it.has(s)||(n=this.st)!=null&&n.has(s)||(o?(e.add(s),this.it.add(s)):(e.remove(s),this.it.delete(s)))}return P}}),G=(r,t,e)=>{r&&e.style.setProperty(t,r)},te=(r,t)=>{var e,i,n,s;G((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),G((i=r.colors)==null?void 0:i.textOnPrimaryBackground,"--text-on-primary-background",t),G((n=r.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),G((s=r.colors)==null?void 0:s.textOnSecondaryBackground,"--text-on-secondary-background",t)};var Ge=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,rt=(r,t,e,i)=>{for(var n=i>1?void 0:i?Ve(t,e):t,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&Ge(t,e,n),n};class b extends w{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(),this.loaded=!0,this._applyBranding()}_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.removeFromDOM()}_applyBranding(){var t;(t=this.application)!=null&&t.settings&&te(this.application.settings.branding,this)}async _renderSymbol(){var s;const t=(s=this.application)==null?void 0:s.triggerIcon;if(!t)return u;const e=async o=>await Promise.resolve().then(()=>require("./index-6dd00f59.js")).then(c=>c[o]),{type:i,content:n}=t;switch(i){case"Telia":{const o=await e(n);return o?Z`<telia-icon
|
42
42
|
class="trigger-icon"
|
43
43
|
svg=${o.svg}
|
44
44
|
size="lg"
|
45
45
|
></telia-icon>`:u}default:return u}}render(){return Z`<button
|
46
|
-
class=${
|
46
|
+
class=${ze({trigger:!0,active:this.active,rendered:this.loaded})}
|
47
47
|
@click=${this._toggleActive}
|
48
48
|
>
|
49
49
|
${this.icon}
|
@@ -74,7 +74,7 @@
|
|
74
74
|
/>
|
75
75
|
</svg>
|
76
76
|
</span>
|
77
|
-
</button>`}}
|
77
|
+
</button>`}}b.styles=[L`
|
78
78
|
:host {
|
79
79
|
--voca-rem-multiplier: 0.625;
|
80
80
|
display: block;
|
@@ -142,7 +142,7 @@
|
|
142
142
|
align-items: center;
|
143
143
|
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
144
144
|
}
|
145
|
-
`];
|
145
|
+
`];rt([y({attribute:!1})],b.prototype,"application",2);rt([W()],b.prototype,"active",2);rt([W()],b.prototype,"loaded",2);rt([W()],b.prototype,"icon",2);var qe=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,E=(r,t,e,i)=>{for(var n=i>1?void 0:i?Fe(t,e):t,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&qe(t,e,n),n};const ee=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))`)}}return t.styles=[L`
|
146
146
|
:host {
|
147
147
|
font-family: var(--font-family);
|
148
148
|
grid-column: span var(--width);
|
@@ -154,29 +154,29 @@
|
|
154
154
|
* {
|
155
155
|
box-sizing: border-box;
|
156
156
|
}
|
157
|
-
`],
|
157
|
+
`],E([y()],t.prototype,"properties",2),E([y()],t.prototype,"context",2),E([y()],t.prototype,"layout",2),E([y()],t.prototype,"name",2),E([y()],t.prototype,"type",2),E([y({attribute:!1})],t.prototype,"application",2),E([y({attribute:!1})],t.prototype,"parent",2),t};var Ye=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ke=(r,t,e,i)=>{for(var n=i>1?void 0:i?Je(t,e):t,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&Ye(t,e,n),n};let Q=class extends ee(w){render(){return Z`Non resolved component`}};Q.styles=[L`
|
158
158
|
:host {
|
159
159
|
display: block;
|
160
160
|
}
|
161
|
-
`];Q=
|
161
|
+
`];Q=Ke([$t("ace-unresolved-component")],Q);/**
|
162
162
|
* @license
|
163
163
|
* Copyright 2020 Google LLC
|
164
164
|
* SPDX-License-Identifier: BSD-3-Clause
|
165
|
-
*/const
|
165
|
+
*/const Ze=r=>r.strings===void 0;/**
|
166
166
|
* @license
|
167
167
|
* Copyright 2017 Google LLC
|
168
168
|
* SPDX-License-Identifier: BSD-3-Clause
|
169
|
-
*/const
|
169
|
+
*/const M=(r,t)=>{var i;const e=r._$AN;if(e===void 0)return!1;for(const n of e)(i=n._$AO)==null||i.call(n,t,!1),M(n,t);return!0},X=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)},re=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),tr(t)}};function Qe(r){this._$AN!==void 0?(X(this),this._$AM=r,re(this)):this._$AM=r}function Xe(r,t=!1,e=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(i))for(let s=e;s<i.length;s++)M(i[s],!1),X(i[s]);else i!=null&&(M(i,!1),X(i));else M(this,r)}const tr=r=>{r.type==Zt.CHILD&&(r._$AP??(r._$AP=Xe),r._$AQ??(r._$AQ=Qe))};class er extends Xt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),re(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),e&&(M(this,t),X(this))}setValue(t){if(Ze(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(){}}/**
|
170
170
|
* @license
|
171
171
|
* Copyright 2020 Google LLC
|
172
172
|
* SPDX-License-Identifier: BSD-3-Clause
|
173
|
-
*/const
|
173
|
+
*/const rr=()=>new ir;class ir{}const ht=new WeakMap,nr=Qt(class extends er{render(r){return u}update(r,[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=r.options)==null?void 0:i.host,this.ot(this.lt=r.element)),u}ot(r){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,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t;return typeof this.G=="function"?(r=ht.get(this.ct??globalThis))==null?void 0:r.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)}});/**
|
174
174
|
* @license
|
175
175
|
* Copyright 2021 Google LLC
|
176
176
|
* SPDX-License-Identifier: BSD-3-Clause
|
177
|
-
*/function*
|
178
|
-
${
|
179
|
-
</div>`}};
|
177
|
+
*/function*sr(r,t){if(r!==void 0){let e=0;for(const i of r)yield t(i,e++)}}var A=(r=>(r.Inline="inline",r.Trigger="trigger",r))(A||{}),or=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ie=(r,t,e,i)=>{for(var n=i>1?void 0:i?ar(t,e):t,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&or(t,e,n),n};let N=class extends w{constructor(){super(...arguments),this.nodes=[],this.wrapperRef=rr()}addChild(r){r.parent=this,this.nodes.push(r)}applyBranding(){if(this.wrapperRef.value){const r=this.application.settings;r!=null&&r.branding&&te(r.branding,this.wrapperRef.value)}}firstUpdated(r){this.applyBranding()}render(){return this.application.renderStrategy===A.Trigger&&this.renderRoot.host.classList.add("floating"),Z`<div class="widget-container" ${nr(this.wrapperRef)}>
|
178
|
+
${sr(this.nodes,r=>r)}
|
179
|
+
</div>`}};N.styles=L`
|
180
180
|
:host {
|
181
181
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
182
182
|
--spacing-xs: 0.2rem;
|
@@ -254,8 +254,8 @@
|
|
254
254
|
opacity: 1;
|
255
255
|
}
|
256
256
|
}
|
257
|
-
`;
|
257
|
+
`;ie([y({attribute:!1})],N.prototype,"application",2);N=ie([$t("ace-wrapper")],N);class cr{constructor(){this.root=this.createRoot()}createComponentModel(t,e){this.root.application=e;const i=a=>{if(Array.isArray(a)){const[c,...h]=a;return{definitionId:c,overrides:h}}return{definitionId:a,overrides:[]}},n=(a,c,h,d)=>{h.forEach(l=>{const f=i(l),p=d[f.definitionId];if(!p){console.error(`No definition found for component type '${f.definitionId}'.`);return}const g=a.createNode(p.type,p.type);g&&(g.name=f.definitionId,g.application=e,p.properties&&g.writeProperties(p.properties),p.context&&g.writeContext(p.context),p.layout&&g.writeLayout(p.layout),c.addChild(g),p.children&&n(a,g,p.children,d))})},{entry:s,components:o}=t;return n(this,this.root,[s],o),this.root}createRoot(){return new N}createNode(t,e){const i=this.resolveComponent(e);if(!i)return console.warn(`Unable to resolve component: ${e}`),new Q;const n=new i;return n.type=e,n.name=t,n}resolveComponent(t){return customElements.get(`ace-${t}`)}getRoot(){return this.root}}const ne=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=ne.ResolveWebComponentName(r);customElements.get(e)||customElements.define(e,t)}};let se=ne;se.ResolveWebComponentName=r=>`ace-${r}`;class oe{constructor(t,e,i,n){this.name=t,this.container=e,this.settings=i,this.options=n,this.platform=new cr,this.renderStrategy=A.Inline,this.autoActivate=!1,this.plugins=[],this.componentResolver=new se,this.renderStrategy=this.options.renderStrategy||A.Inline,this.triggerIcon=this.options.triggerIcon,typeof n.autoActivate=="boolean"&&(this.autoActivate=n.autoActivate),this.container.register("$settings",i)}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)}plugin(t){return this.plugins.push(t),this}appendToDOM(){this.root&&document.body.appendChild(this.root)}removeFromDOM(){this.root&&document.body.removeChild(this.root)}registerComponent(t,e){this.componentResolver.registerComponent(t,e)}resolveComponent(t){return this.componentResolver.getComponent(t)}render(){if(this.renderStrategy===A.Trigger){const t=new b;return t.application=this,t}return this.root}}const ae=class{static async getSite(r){const e=await(await fetch(r)).json();return e?{id:e.id,apps:e.widgets.map(i=>{let n=A.Inline;return i.renderStrategy==="Trigger"&&(n=A.Trigger),{id:i.id,widgetId:i.widgetId,renderStrategy:n,triggerIcon:{type:"Telia",content:i.triggerIcon}}})}:null}static async getWidget(r){const e=await(await fetch(`${ae.endpoint}/widget/${r}`)).json();return e?{name:e.name,config:JSON.parse(e.configuration)}:null}};let yt=ae;yt.endpoint="https://widgets.ace.teliacompany.net/api";class ce{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 i=this.applications.find(n=>n.name===e.name);i&&e.dispatchEvent(new CustomEvent("environment-created",{detail:{widget:i}}))})}registerApp(t,e,i){const n=new vt(t,this),s=new oe(t,n,e,i);this.applications.push(s)}}class le{constructor(t){this.configurations=[],typeof t=="string"?this.url=t:this.loadFromConfig(t)}async load(t){const e=await yt.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 ce,this.addGlobal(this.environment);for await(const i of this.configurations){const n=await yt.getWidget(i.widgetId);n&&((e=this.environment)==null||e.registerApp(n.name,n.config,{renderStrategy:i.renderStrategy,triggerIcon:i.triggerIcon,autoActivate:i.autoActivate}))}t(this.environment),await this.environment.bootstrap()}addGlobal(t){globalThis.widgets=t}}var lr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,it=(r,t,e,i)=>{for(var n=i>1?void 0:i?hr(t,e):t,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&lr(t,e,n),n};exports.AceWidget=class 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 u;if(this.widget.renderStrategy===A.Trigger){const t=new b;return t.application=this.widget,t}return this.widget.render()}};exports.AceWidget.styles=[L`
|
258
258
|
:host {
|
259
259
|
display: block;
|
260
260
|
}
|
261
|
-
`];it([y({attribute:!0})],exports.AceWidget.prototype,"name",2);it([
|
261
|
+
`];it([y({attribute:!0})],exports.AceWidget.prototype,"name",2);it([W()],exports.AceWidget.prototype,"widget",2);it([W()],exports.AceWidget.prototype,"status",2);exports.AceWidget=it([$t("ace-widget")],exports.AceWidget);customElements.get("ace-trigger")||customElements.define("ace-trigger",b);const pr=async(r,t)=>{await new le(r).bootstrap(t)};exports.Application=oe;exports.Container=vt;exports.Environment=ce;exports.Site=le;exports.Trigger=b;exports.WidgetComponent=ee;exports.bootstrap=pr;
|
package/index.mjs
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
var
|
2
|
-
return
|
1
|
+
var ut = function(r, t) {
|
2
|
+
return ut = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
|
3
3
|
e.__proto__ = i;
|
4
4
|
} || function(e, i) {
|
5
5
|
for (var n in i)
|
6
6
|
Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]);
|
7
|
-
},
|
7
|
+
}, ut(r, t);
|
8
8
|
};
|
9
9
|
function L(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
|
+
ut(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 dt(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);
|
@@ -27,7 +27,7 @@ function ft(r) {
|
|
27
27
|
};
|
28
28
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
29
29
|
}
|
30
|
-
function
|
30
|
+
function q(r, t) {
|
31
31
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
32
32
|
if (!e)
|
33
33
|
return r;
|
@@ -47,7 +47,7 @@ function J(r, t) {
|
|
47
47
|
}
|
48
48
|
return s;
|
49
49
|
}
|
50
|
-
function
|
50
|
+
function J(r, t, e) {
|
51
51
|
if (e || arguments.length === 2)
|
52
52
|
for (var i = 0, n = t.length, s; i < n; i++)
|
53
53
|
(s || !(i in t)) && (s || (s = Array.prototype.slice.call(t, 0, i)), s[i] = t[i]);
|
@@ -62,7 +62,7 @@ function Dt(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 st = Dt(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, n) {
|
@@ -71,13 +71,13 @@ var ot = Dt(function(r) {
|
|
71
71
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
72
72
|
};
|
73
73
|
});
|
74
|
-
function
|
74
|
+
function ft(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 et = 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 rt = 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 = dt(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 rt = function() {
|
|
110
110
|
try {
|
111
111
|
d();
|
112
112
|
} catch (v) {
|
113
|
-
s = v instanceof
|
113
|
+
s = v instanceof st ? v.errors : [v];
|
114
114
|
}
|
115
115
|
var l = this._finalizers;
|
116
116
|
if (l) {
|
117
117
|
this._finalizers = null;
|
118
118
|
try {
|
119
|
-
for (var f =
|
119
|
+
for (var f = dt(l), p = f.next(); !p.done; p = f.next()) {
|
120
120
|
var g = p.value;
|
121
121
|
try {
|
122
122
|
wt(g);
|
123
123
|
} catch (v) {
|
124
|
-
s = s ?? [], v instanceof
|
124
|
+
s = s ?? [], v instanceof st ? s = J(J([], q(s)), q(v.errors)) : s.push(v);
|
125
125
|
}
|
126
126
|
}
|
127
127
|
} catch (v) {
|
@@ -136,7 +136,7 @@ var rt = function() {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
if (s)
|
139
|
-
throw new
|
139
|
+
throw new st(s);
|
140
140
|
}
|
141
141
|
}, r.prototype.add = function(t) {
|
142
142
|
var e;
|
@@ -159,17 +159,17 @@ var rt = 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) && ft(e, t);
|
163
163
|
}, r.prototype.remove = function(t) {
|
164
164
|
var e = this._finalizers;
|
165
|
-
e &&
|
165
|
+
e && ft(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
|
-
}(), Lt =
|
170
|
+
}(), Lt = et.EMPTY;
|
171
171
|
function Bt(r) {
|
172
|
-
return r instanceof
|
172
|
+
return r instanceof et || r && "closed" in r && m(r.remove) && m(r.add) && m(r.unsubscribe);
|
173
173
|
}
|
174
174
|
function wt(r) {
|
175
175
|
m(r) ? r() : r.unsubscribe();
|
@@ -180,27 +180,27 @@ var zt = {
|
|
180
180
|
Promise: void 0,
|
181
181
|
useDeprecatedSynchronousErrorHandling: !1,
|
182
182
|
useDeprecatedNextContext: !1
|
183
|
-
},
|
183
|
+
}, gt = {
|
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 n =
|
188
|
-
return n != null && n.setTimeout ? n.setTimeout.apply(n,
|
187
|
+
var n = gt.delegate;
|
188
|
+
return n != null && n.setTimeout ? n.setTimeout.apply(n, J([r, t], q(e))) : setTimeout.apply(void 0, J([r, t], q(e)));
|
189
189
|
},
|
190
190
|
clearTimeout: function(r) {
|
191
|
-
var t =
|
191
|
+
var t = gt.delegate;
|
192
192
|
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
|
193
193
|
},
|
194
194
|
delegate: void 0
|
195
195
|
};
|
196
196
|
function ae(r) {
|
197
|
-
|
197
|
+
gt.setTimeout(function() {
|
198
198
|
throw r;
|
199
199
|
});
|
200
200
|
}
|
201
201
|
function At() {
|
202
202
|
}
|
203
|
-
function
|
203
|
+
function F(r) {
|
204
204
|
r();
|
205
205
|
}
|
206
206
|
var Wt = function(r) {
|
@@ -210,7 +210,7 @@ var Wt = function(r) {
|
|
210
210
|
return i.isStopped = !1, e ? (i.destination = e, Bt(e) && e.add(i)) : i.destination = pe, i;
|
211
211
|
}
|
212
212
|
return t.create = function(e, i, n) {
|
213
|
-
return new
|
213
|
+
return new vt(e, i, n);
|
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 Wt = function(r) {
|
|
234
234
|
this.unsubscribe();
|
235
235
|
}
|
236
236
|
}, t;
|
237
|
-
}(
|
238
|
-
function
|
237
|
+
}(et), ce = Function.prototype.bind;
|
238
|
+
function ot(r, t) {
|
239
239
|
return ce.call(r, t);
|
240
240
|
}
|
241
241
|
var le = function() {
|
@@ -248,7 +248,7 @@ var le = function() {
|
|
248
248
|
try {
|
249
249
|
e.next(t);
|
250
250
|
} catch (i) {
|
251
|
-
|
251
|
+
G(i);
|
252
252
|
}
|
253
253
|
}, r.prototype.error = function(t) {
|
254
254
|
var e = this.partialObserver;
|
@@ -256,20 +256,20 @@ var le = function() {
|
|
256
256
|
try {
|
257
257
|
e.error(t);
|
258
258
|
} catch (i) {
|
259
|
-
|
259
|
+
G(i);
|
260
260
|
}
|
261
261
|
else
|
262
|
-
|
262
|
+
G(t);
|
263
263
|
}, r.prototype.complete = function() {
|
264
264
|
var t = this.partialObserver;
|
265
265
|
if (t.complete)
|
266
266
|
try {
|
267
267
|
t.complete();
|
268
268
|
} catch (e) {
|
269
|
-
|
269
|
+
G(e);
|
270
270
|
}
|
271
271
|
}, r;
|
272
|
-
}(),
|
272
|
+
}(), vt = function(r) {
|
273
273
|
L(t, r);
|
274
274
|
function t(e, i, n) {
|
275
275
|
var s = r.call(this) || this, o;
|
@@ -284,16 +284,16 @@ var le = function() {
|
|
284
284
|
s && zt.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
285
|
return s.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 s.destination = new le(o), s;
|
293
293
|
}
|
294
294
|
return t;
|
295
295
|
}(Wt);
|
296
|
-
function
|
296
|
+
function G(r) {
|
297
297
|
ae(r);
|
298
298
|
}
|
299
299
|
function he(r) {
|
@@ -325,8 +325,8 @@ var St = 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 n = this, s = ve(t) ? t : new
|
329
|
-
return
|
328
|
+
var n = this, s = ve(t) ? t : new vt(t, e, i);
|
329
|
+
return F(function() {
|
330
330
|
var o = n, a = o.operator, c = o.source;
|
331
331
|
s.add(a ? a.call(s, c) : c ? n._subscribe(s) : n._trySubscribe(s));
|
332
332
|
}), s;
|
@@ -339,7 +339,7 @@ var St = function() {
|
|
339
339
|
}, r.prototype.forEach = function(t, e) {
|
340
340
|
var i = this;
|
341
341
|
return e = Et(e), new e(function(n, s) {
|
342
|
-
var o = new
|
342
|
+
var o = new vt({
|
343
343
|
next: function(a) {
|
344
344
|
try {
|
345
345
|
t(a);
|
@@ -405,12 +405,12 @@ var ye = Dt(function(r) {
|
|
405
405
|
throw new ye();
|
406
406
|
}, t.prototype.next = function(e) {
|
407
407
|
var i = this;
|
408
|
-
|
408
|
+
F(function() {
|
409
409
|
var n, s;
|
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 = dt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
414
414
|
var c = a.value;
|
415
415
|
c.next(e);
|
416
416
|
}
|
@@ -428,7 +428,7 @@ var ye = Dt(function(r) {
|
|
428
428
|
});
|
429
429
|
}, t.prototype.error = function(e) {
|
430
430
|
var i = this;
|
431
|
-
|
431
|
+
F(function() {
|
432
432
|
if (i._throwIfClosed(), !i.isStopped) {
|
433
433
|
i.hasError = i.isStopped = !0, i.thrownError = e;
|
434
434
|
for (var n = i.observers; n.length; )
|
@@ -437,7 +437,7 @@ var ye = Dt(function(r) {
|
|
437
437
|
});
|
438
438
|
}, t.prototype.complete = function() {
|
439
439
|
var e = this;
|
440
|
-
|
440
|
+
F(function() {
|
441
441
|
if (e._throwIfClosed(), !e.isStopped) {
|
442
442
|
e.isStopped = !0;
|
443
443
|
for (var i = e.observers; i.length; )
|
@@ -459,8 +459,8 @@ var ye = Dt(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, n = this, s = n.hasError, o = n.isStopped, a = n.observers;
|
462
|
-
return s || o ? Lt : (this.currentObservers = null, a.push(e), new
|
463
|
-
i.currentObservers = null,
|
462
|
+
return s || o ? Lt : (this.currentObservers = null, a.push(e), new et(function() {
|
463
|
+
i.currentObservers = null, ft(a, e);
|
464
464
|
}));
|
465
465
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
466
466
|
var i = this, n = i.hasError, s = i.thrownError, o = i.isStopped;
|
@@ -539,17 +539,17 @@ class xt {
|
|
539
539
|
* Copyright 2019 Google LLC
|
540
540
|
* SPDX-License-Identifier: BSD-3-Clause
|
541
541
|
*/
|
542
|
-
const
|
542
|
+
const Y = globalThis, mt = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bt = Symbol(), Pt = /* @__PURE__ */ new WeakMap();
|
543
543
|
let Ft = class {
|
544
544
|
constructor(t, e, i) {
|
545
|
-
if (this._$cssResult$ = !0, i !==
|
545
|
+
if (this._$cssResult$ = !0, i !== bt)
|
546
546
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
547
547
|
this.cssText = t, this.t = e;
|
548
548
|
}
|
549
549
|
get styleSheet() {
|
550
550
|
let t = this.o;
|
551
551
|
const e = this.t;
|
552
|
-
if (
|
552
|
+
if (mt && t === void 0) {
|
553
553
|
const i = e !== void 0 && e.length === 1;
|
554
554
|
i && (t = Pt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Pt.set(e, t));
|
555
555
|
}
|
@@ -559,7 +559,7 @@ let Ft = class {
|
|
559
559
|
return this.cssText;
|
560
560
|
}
|
561
561
|
};
|
562
|
-
const be = (r) => new Ft(typeof r == "string" ? r : r + "", void 0,
|
562
|
+
const be = (r) => new Ft(typeof r == "string" ? r : r + "", void 0, bt), B = (r, ...t) => {
|
563
563
|
const e = r.length === 1 ? r[0] : t.reduce((i, n, s) => i + ((o) => {
|
564
564
|
if (o._$cssResult$ === !0)
|
565
565
|
return o.cssText;
|
@@ -567,16 +567,16 @@ const be = (r) => new Ft(typeof r == "string" ? r : r + "", void 0, _t), B = (r,
|
|
567
567
|
return o;
|
568
568
|
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.");
|
569
569
|
})(n) + r[s + 1], r[0]);
|
570
|
-
return new Ft(e, r,
|
570
|
+
return new Ft(e, r, bt);
|
571
571
|
}, _e = (r, t) => {
|
572
|
-
if (
|
572
|
+
if (mt)
|
573
573
|
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
574
574
|
else
|
575
575
|
for (const e of t) {
|
576
|
-
const i = document.createElement("style"), n =
|
576
|
+
const i = document.createElement("style"), n = Y.litNonce;
|
577
577
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, r.appendChild(i);
|
578
578
|
}
|
579
|
-
}, Ot =
|
579
|
+
}, Ot = mt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
580
580
|
let e = "";
|
581
581
|
for (const i of t.cssRules)
|
582
582
|
e += i.cssText;
|
@@ -587,7 +587,7 @@ const be = (r) => new Ft(typeof r == "string" ? r : r + "", void 0, _t), B = (r,
|
|
587
587
|
* Copyright 2017 Google LLC
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
589
589
|
*/
|
590
|
-
const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: Se, getOwnPropertySymbols: Ee, getPrototypeOf: Ce } = Object,
|
590
|
+
const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: Se, getOwnPropertySymbols: Ee, getPrototypeOf: Ce } = Object, _ = globalThis, Tt = _.trustedTypes, xe = Tt ? Tt.emptyScript : "", at = _.reactiveElementPolyfillSupport, I = (r, t) => r, K = { toAttribute(r, t) {
|
591
591
|
switch (t) {
|
592
592
|
case Boolean:
|
593
593
|
r = r ? xe : null;
|
@@ -615,8 +615,8 @@ const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnProperty
|
|
615
615
|
}
|
616
616
|
}
|
617
617
|
return e;
|
618
|
-
} },
|
619
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
618
|
+
} }, _t = (r, t) => !$e(r, t), Ut = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: _t };
|
619
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
620
|
class O extends HTMLElement {
|
621
621
|
static addInitializer(t) {
|
622
622
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
@@ -736,7 +736,7 @@ class O extends HTMLElement {
|
|
736
736
|
var s;
|
737
737
|
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
738
738
|
if (n !== void 0 && i.reflect === !0) {
|
739
|
-
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter :
|
739
|
+
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : K).toAttribute(e, i.type);
|
740
740
|
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
741
741
|
}
|
742
742
|
}
|
@@ -744,13 +744,13 @@ class O extends HTMLElement {
|
|
744
744
|
var s;
|
745
745
|
const i = this.constructor, n = i._$Eh.get(t);
|
746
746
|
if (n !== void 0 && this._$Em !== n) {
|
747
|
-
const o = i.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter :
|
747
|
+
const o = i.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter : K;
|
748
748
|
this._$Em = n, this[n] = a.fromAttribute(e, o.type), this._$Em = null;
|
749
749
|
}
|
750
750
|
}
|
751
751
|
requestUpdate(t, e, i, n = !1, s) {
|
752
752
|
if (t !== void 0) {
|
753
|
-
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ??
|
753
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? _t)(n ? s : this[t], e))
|
754
754
|
return;
|
755
755
|
this.C(t, e, i);
|
756
756
|
}
|
@@ -828,15 +828,15 @@ class O extends HTMLElement {
|
|
828
828
|
firstUpdated(t) {
|
829
829
|
}
|
830
830
|
}
|
831
|
-
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[I("elementProperties")] = /* @__PURE__ */ new Map(), O[I("finalized")] = /* @__PURE__ */ new Map(),
|
831
|
+
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[I("elementProperties")] = /* @__PURE__ */ new Map(), O[I("finalized")] = /* @__PURE__ */ new Map(), at == null || at({ ReactiveElement: O }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.0.1");
|
832
832
|
/**
|
833
833
|
* @license
|
834
834
|
* Copyright 2017 Google LLC
|
835
835
|
* SPDX-License-Identifier: BSD-3-Clause
|
836
836
|
*/
|
837
|
-
const M = globalThis,
|
838
|
-
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Mt = />/g, S = RegExp(`>|${
|
839
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), jt = /'/g, Ht = /"/g, Kt = /^(?:script|style|textarea|title)$/i, Te = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }),
|
837
|
+
const M = globalThis, Z = M.trustedTypes, Rt = Z ? Z.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Yt = "$lit$", b = `lit$${(Math.random() + "").slice(9)}$`, qt = "?" + b, Pe = `<${qt}>`, x = document, H = () => x.createComment(""), k = (r) => r === null || typeof r != "object" && typeof r != "function", Jt = Array.isArray, Oe = (r) => Jt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ct = `[
|
838
|
+
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Mt = />/g, S = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), jt = /'/g, Ht = /"/g, Kt = /^(?:script|style|textarea|title)$/i, Te = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Q = Te(1), P = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), kt = /* @__PURE__ */ new WeakMap(), C = x.createTreeWalker(x, 129);
|
840
840
|
function Zt(r, t) {
|
841
841
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
842
842
|
throw Error("invalid template strings array");
|
@@ -851,7 +851,7 @@ const Ue = (r, t) => {
|
|
851
851
|
for (; f < c.length && (o.lastIndex = f, d = o.exec(c), d !== null); )
|
852
852
|
f = o.lastIndex, o === R ? d[1] === "!--" ? o = It : d[1] !== void 0 ? o = Mt : d[2] !== void 0 ? (Kt.test(d[2]) && (n = RegExp("</" + d[2], "g")), o = S) : d[3] !== void 0 && (o = S) : o === S ? d[0] === ">" ? (o = n ?? R, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, h = d[1], o = d[3] === void 0 ? S : d[3] === '"' ? Ht : jt) : o === Ht || o === jt ? o = S : o === It || o === Mt ? o = R : (o = S, n = void 0);
|
853
853
|
const p = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
854
|
-
s += o === R ? c + Pe : l >= 0 ? (i.push(h), c.slice(0, l) + Yt + c.slice(l) +
|
854
|
+
s += o === R ? c + Pe : l >= 0 ? (i.push(h), c.slice(0, l) + Yt + c.slice(l) + b + p) : c + b + (l === -2 ? a : p);
|
855
855
|
}
|
856
856
|
return [Zt(r, s + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
857
857
|
};
|
@@ -870,14 +870,14 @@ class N {
|
|
870
870
|
if (n.hasAttributes())
|
871
871
|
for (const l of n.getAttributeNames())
|
872
872
|
if (l.endsWith(Yt)) {
|
873
|
-
const f = d[o++], p = n.getAttribute(l).split(
|
874
|
-
c.push({ type: 1, index: s, name: g[2], strings: p, ctor: g[1] === "." ? Ie : g[1] === "?" ? Me : g[1] === "@" ? je :
|
873
|
+
const f = d[o++], p = n.getAttribute(l).split(b), g = /([.?@])?(.*)/.exec(f);
|
874
|
+
c.push({ type: 1, index: s, name: g[2], strings: p, ctor: g[1] === "." ? Ie : g[1] === "?" ? Me : g[1] === "@" ? je : rt }), n.removeAttribute(l);
|
875
875
|
} else
|
876
|
-
l.startsWith(
|
876
|
+
l.startsWith(b) && (c.push({ type: 6, index: s }), n.removeAttribute(l));
|
877
877
|
if (Kt.test(n.tagName)) {
|
878
|
-
const l = n.textContent.split(
|
878
|
+
const l = n.textContent.split(b), f = l.length - 1;
|
879
879
|
if (f > 0) {
|
880
|
-
n.textContent =
|
880
|
+
n.textContent = Z ? Z.emptyScript : "";
|
881
881
|
for (let p = 0; p < f; p++)
|
882
882
|
n.append(l[p], H()), C.nextNode(), c.push({ type: 2, index: ++s });
|
883
883
|
n.append(l[f], H());
|
@@ -888,8 +888,8 @@ class N {
|
|
888
888
|
c.push({ type: 2, index: s });
|
889
889
|
else {
|
890
890
|
let l = -1;
|
891
|
-
for (; (l = n.data.indexOf(
|
892
|
-
c.push({ type: 7, index: s }), l +=
|
891
|
+
for (; (l = n.data.indexOf(b, l + 1)) !== -1; )
|
892
|
+
c.push({ type: 7, index: s }), l += b.length - 1;
|
893
893
|
}
|
894
894
|
s++;
|
895
895
|
}
|
@@ -1001,7 +1001,7 @@ class z {
|
|
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 rt {
|
1005
1005
|
get tagName() {
|
1006
1006
|
return this.element.tagName;
|
1007
1007
|
}
|
@@ -1028,7 +1028,7 @@ class it {
|
|
1028
1028
|
t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
|
-
class Ie extends
|
1031
|
+
class Ie extends rt {
|
1032
1032
|
constructor() {
|
1033
1033
|
super(...arguments), this.type = 3;
|
1034
1034
|
}
|
@@ -1036,7 +1036,7 @@ class Ie extends it {
|
|
1036
1036
|
this.element[this.name] = t === u ? void 0 : t;
|
1037
1037
|
}
|
1038
1038
|
}
|
1039
|
-
class Me extends
|
1039
|
+
class Me extends rt {
|
1040
1040
|
constructor() {
|
1041
1041
|
super(...arguments), this.type = 4;
|
1042
1042
|
}
|
@@ -1044,7 +1044,7 @@ class Me extends it {
|
|
1044
1044
|
this.element.toggleAttribute(this.name, !!t && t !== u);
|
1045
1045
|
}
|
1046
1046
|
}
|
1047
|
-
class je extends
|
1047
|
+
class je extends rt {
|
1048
1048
|
constructor(t, e, i, n, s) {
|
1049
1049
|
super(t, e, i, n, s), this.type = 5;
|
1050
1050
|
}
|
@@ -1070,8 +1070,8 @@ class He {
|
|
1070
1070
|
T(this, t);
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
|
-
const
|
1074
|
-
|
1073
|
+
const lt = M.litHtmlPolyfillSupport;
|
1074
|
+
lt == null || lt(N, z), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.0.2");
|
1075
1075
|
const ke = (r, t, e) => {
|
1076
1076
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
1077
|
let n = i._$litPart$;
|
@@ -1086,7 +1086,7 @@ const ke = (r, t, e) => {
|
|
1086
1086
|
* Copyright 2017 Google LLC
|
1087
1087
|
* SPDX-License-Identifier: BSD-3-Clause
|
1088
1088
|
*/
|
1089
|
-
let
|
1089
|
+
let $ = class extends O {
|
1090
1090
|
constructor() {
|
1091
1091
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1092
1092
|
}
|
@@ -1112,16 +1112,16 @@ let w = class extends O {
|
|
1112
1112
|
}
|
1113
1113
|
};
|
1114
1114
|
var Nt;
|
1115
|
-
|
1116
|
-
const
|
1117
|
-
|
1115
|
+
$._$litElement$ = !0, $.finalized = !0, (Nt = globalThis.litElementHydrateSupport) == null || Nt.call(globalThis, { LitElement: $ });
|
1116
|
+
const ht = globalThis.litElementPolyfillSupport;
|
1117
|
+
ht == null || ht({ LitElement: $ });
|
1118
1118
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
1119
1119
|
/**
|
1120
1120
|
* @license
|
1121
1121
|
* Copyright 2017 Google LLC
|
1122
1122
|
* SPDX-License-Identifier: BSD-3-Clause
|
1123
1123
|
*/
|
1124
|
-
const
|
1124
|
+
const $t = (r) => (t, e) => {
|
1125
1125
|
e !== void 0 ? e.addInitializer(() => {
|
1126
1126
|
customElements.define(r, t);
|
1127
1127
|
}) : customElements.define(r, t);
|
@@ -1131,7 +1131,7 @@ const nt = (r) => (t, e) => {
|
|
1131
1131
|
* Copyright 2017 Google LLC
|
1132
1132
|
* SPDX-License-Identifier: BSD-3-Clause
|
1133
1133
|
*/
|
1134
|
-
const Ne = { attribute: !0, type: String, converter:
|
1134
|
+
const Ne = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: _t }, De = (r = Ne, t, e) => {
|
1135
1135
|
const { kind: i, metadata: n } = e;
|
1136
1136
|
let s = globalThis.litPropertyMetadata.get(n);
|
1137
1137
|
if (s === void 0 && globalThis.litPropertyMetadata.set(n, s = /* @__PURE__ */ new Map()), s.set(e.name, r), i === "accessor") {
|
@@ -1219,30 +1219,30 @@ const Le = Xt(class extends te {
|
|
1219
1219
|
}
|
1220
1220
|
return P;
|
1221
1221
|
}
|
1222
|
-
}),
|
1222
|
+
}), V = (r, t, e) => {
|
1223
1223
|
r && e.style.setProperty(t, r);
|
1224
1224
|
}, ee = (r, t) => {
|
1225
1225
|
var e, i, n, s;
|
1226
|
-
|
1226
|
+
V((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), V(
|
1227
1227
|
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1228
1228
|
"--text-on-primary-background",
|
1229
1229
|
t
|
1230
|
-
),
|
1230
|
+
), V(
|
1231
1231
|
(n = r.colors) == null ? void 0 : n.secondaryBackground,
|
1232
1232
|
"--secondary-background",
|
1233
1233
|
t
|
1234
|
-
),
|
1234
|
+
), V(
|
1235
1235
|
(s = r.colors) == null ? void 0 : s.textOnSecondaryBackground,
|
1236
1236
|
"--text-on-secondary-background",
|
1237
1237
|
t
|
1238
1238
|
);
|
1239
1239
|
};
|
1240
|
-
var Be = Object.defineProperty, ze = Object.getOwnPropertyDescriptor,
|
1240
|
+
var Be = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, it = (r, t, e, i) => {
|
1241
1241
|
for (var n = i > 1 ? void 0 : i ? ze(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1242
1242
|
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1243
1243
|
return i && n && Be(t, e, n), n;
|
1244
1244
|
};
|
1245
|
-
|
1245
|
+
class A extends $ {
|
1246
1246
|
constructor() {
|
1247
1247
|
super(...arguments), this.active = !1, this.loaded = !1;
|
1248
1248
|
}
|
@@ -1250,8 +1250,8 @@ let b = class extends w {
|
|
1250
1250
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
1251
1251
|
}
|
1252
1252
|
_toggleActive() {
|
1253
|
-
var
|
1254
|
-
if (!((
|
1253
|
+
var t;
|
1254
|
+
if (!((t = this.application) != null && t.root)) {
|
1255
1255
|
console.warn(
|
1256
1256
|
"Could not activate widget. No root element assigned to widget."
|
1257
1257
|
);
|
@@ -1260,23 +1260,23 @@ let b = class extends w {
|
|
1260
1260
|
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
|
1261
1261
|
}
|
1262
1262
|
_applyBranding() {
|
1263
|
-
var
|
1264
|
-
(
|
1263
|
+
var t;
|
1264
|
+
(t = this.application) != null && t.settings && ee(this.application.settings.branding, this);
|
1265
1265
|
}
|
1266
1266
|
async _renderSymbol() {
|
1267
|
-
var
|
1268
|
-
const
|
1269
|
-
if (!
|
1267
|
+
var s;
|
1268
|
+
const t = (s = this.application) == null ? void 0 : s.triggerIcon;
|
1269
|
+
if (!t)
|
1270
1270
|
return u;
|
1271
|
-
const
|
1272
|
-
(
|
1273
|
-
), { type:
|
1274
|
-
switch (
|
1271
|
+
const e = async (o) => await import("./index-5087564d.mjs").then(
|
1272
|
+
(c) => c[o]
|
1273
|
+
), { type: i, content: n } = t;
|
1274
|
+
switch (i) {
|
1275
1275
|
case "Telia": {
|
1276
|
-
const
|
1277
|
-
return
|
1276
|
+
const o = await e(n);
|
1277
|
+
return o ? Q`<telia-icon
|
1278
1278
|
class="trigger-icon"
|
1279
|
-
svg=${
|
1279
|
+
svg=${o.svg}
|
1280
1280
|
size="lg"
|
1281
1281
|
></telia-icon>` : u;
|
1282
1282
|
}
|
@@ -1285,7 +1285,7 @@ let b = class extends w {
|
|
1285
1285
|
}
|
1286
1286
|
}
|
1287
1287
|
render() {
|
1288
|
-
return
|
1288
|
+
return Q`<button
|
1289
1289
|
class=${Le({
|
1290
1290
|
trigger: !0,
|
1291
1291
|
active: this.active,
|
@@ -1323,8 +1323,8 @@ let b = class extends w {
|
|
1323
1323
|
</span>
|
1324
1324
|
</button>`;
|
1325
1325
|
}
|
1326
|
-
}
|
1327
|
-
|
1326
|
+
}
|
1327
|
+
A.styles = [
|
1328
1328
|
B`
|
1329
1329
|
:host {
|
1330
1330
|
--voca-rem-multiplier: 0.625;
|
@@ -1395,21 +1395,18 @@ b.styles = [
|
|
1395
1395
|
}
|
1396
1396
|
`
|
1397
1397
|
];
|
1398
|
-
|
1398
|
+
it([
|
1399
1399
|
y({ attribute: !1 })
|
1400
|
-
],
|
1401
|
-
|
1400
|
+
], A.prototype, "application", 2);
|
1401
|
+
it([
|
1402
1402
|
W()
|
1403
|
-
],
|
1404
|
-
|
1403
|
+
], A.prototype, "active", 2);
|
1404
|
+
it([
|
1405
1405
|
W()
|
1406
|
-
],
|
1407
|
-
|
1406
|
+
], A.prototype, "loaded", 2);
|
1407
|
+
it([
|
1408
1408
|
W()
|
1409
|
-
],
|
1410
|
-
b = G([
|
1411
|
-
nt("ace-trigger")
|
1412
|
-
], b);
|
1409
|
+
], A.prototype, "icon", 2);
|
1413
1410
|
var We = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, E = (r, t, e, i) => {
|
1414
1411
|
for (var n = i > 1 ? void 0 : i ? Ge(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1415
1412
|
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
@@ -1475,21 +1472,21 @@ var Fe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, qe = (r, t
|
|
1475
1472
|
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1476
1473
|
return i && n && Fe(t, e, n), n;
|
1477
1474
|
};
|
1478
|
-
let
|
1475
|
+
let X = class extends Ve($) {
|
1479
1476
|
render() {
|
1480
|
-
return
|
1477
|
+
return Q`Non resolved component`;
|
1481
1478
|
}
|
1482
1479
|
};
|
1483
|
-
|
1480
|
+
X.styles = [
|
1484
1481
|
B`
|
1485
1482
|
:host {
|
1486
1483
|
display: block;
|
1487
1484
|
}
|
1488
1485
|
`
|
1489
1486
|
];
|
1490
|
-
|
1491
|
-
|
1492
|
-
],
|
1487
|
+
X = qe([
|
1488
|
+
$t("ace-unresolved-component")
|
1489
|
+
], X);
|
1493
1490
|
/**
|
1494
1491
|
* @license
|
1495
1492
|
* Copyright 2020 Google LLC
|
@@ -1509,7 +1506,7 @@ const j = (r, t) => {
|
|
1509
1506
|
for (const n of e)
|
1510
1507
|
(i = n._$AO) == null || i.call(n, t, !1), j(n, t);
|
1511
1508
|
return !0;
|
1512
|
-
},
|
1509
|
+
}, tt = (r) => {
|
1513
1510
|
let t, e;
|
1514
1511
|
do {
|
1515
1512
|
if ((t = r._$AM) === void 0)
|
@@ -1527,7 +1524,7 @@ const j = (r, t) => {
|
|
1527
1524
|
}
|
1528
1525
|
};
|
1529
1526
|
function Ke(r) {
|
1530
|
-
this._$AN !== void 0 ? (
|
1527
|
+
this._$AN !== void 0 ? (tt(this), this._$AM = r, re(this)) : this._$AM = r;
|
1531
1528
|
}
|
1532
1529
|
function Ze(r, t = !1, e = 0) {
|
1533
1530
|
const i = this._$AH, n = this._$AN;
|
@@ -1535,9 +1532,9 @@ function Ze(r, t = !1, e = 0) {
|
|
1535
1532
|
if (t)
|
1536
1533
|
if (Array.isArray(i))
|
1537
1534
|
for (let s = e; s < i.length; s++)
|
1538
|
-
j(i[s], !1),
|
1535
|
+
j(i[s], !1), tt(i[s]);
|
1539
1536
|
else
|
1540
|
-
i != null && (j(i, !1),
|
1537
|
+
i != null && (j(i, !1), tt(i));
|
1541
1538
|
else
|
1542
1539
|
j(this, r);
|
1543
1540
|
}
|
@@ -1553,7 +1550,7 @@ class Xe extends te {
|
|
1553
1550
|
}
|
1554
1551
|
_$AO(t, e = !0) {
|
1555
1552
|
var i, n;
|
1556
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (j(this, t),
|
1553
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (j(this, t), tt(this));
|
1557
1554
|
}
|
1558
1555
|
setValue(t) {
|
1559
1556
|
if (Je(this._$Ct))
|
@@ -1576,7 +1573,7 @@ class Xe extends te {
|
|
1576
1573
|
const tr = () => new er();
|
1577
1574
|
class er {
|
1578
1575
|
}
|
1579
|
-
const
|
1576
|
+
const pt = /* @__PURE__ */ new WeakMap(), rr = Xt(class extends Xe {
|
1580
1577
|
render(r) {
|
1581
1578
|
return u;
|
1582
1579
|
}
|
@@ -1588,14 +1585,14 @@ const ut = /* @__PURE__ */ new WeakMap(), rr = Xt(class extends Xe {
|
|
1588
1585
|
ot(r) {
|
1589
1586
|
if (typeof this.G == "function") {
|
1590
1587
|
const t = this.ct ?? globalThis;
|
1591
|
-
let e =
|
1592
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
1588
|
+
let e = pt.get(t);
|
1589
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), pt.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, r), r !== void 0 && this.G.call(this.ct, r);
|
1593
1590
|
} else
|
1594
1591
|
this.G.value = r;
|
1595
1592
|
}
|
1596
1593
|
get rt() {
|
1597
1594
|
var r, t;
|
1598
|
-
return typeof this.G == "function" ? (r =
|
1595
|
+
return typeof this.G == "function" ? (r = pt.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
1599
1596
|
}
|
1600
1597
|
disconnected() {
|
1601
1598
|
this.rt === this.lt && this.ot(void 0);
|
@@ -1616,12 +1613,12 @@ function* ir(r, t) {
|
|
1616
1613
|
yield t(i, e++);
|
1617
1614
|
}
|
1618
1615
|
}
|
1619
|
-
var
|
1616
|
+
var w = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(w || {}), nr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, ie = (r, t, e, i) => {
|
1620
1617
|
for (var n = i > 1 ? void 0 : i ? sr(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1621
1618
|
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1622
1619
|
return i && n && nr(t, e, n), n;
|
1623
1620
|
};
|
1624
|
-
let D = class extends
|
1621
|
+
let D = class extends $ {
|
1625
1622
|
constructor() {
|
1626
1623
|
super(...arguments), this.nodes = [], this.wrapperRef = tr();
|
1627
1624
|
}
|
@@ -1638,7 +1635,7 @@ let D = class extends w {
|
|
1638
1635
|
this.applyBranding();
|
1639
1636
|
}
|
1640
1637
|
render() {
|
1641
|
-
return this.application.renderStrategy ===
|
1638
|
+
return this.application.renderStrategy === w.Trigger && this.renderRoot.host.classList.add("floating"), Q`<div class="widget-container" ${rr(this.wrapperRef)}>
|
1642
1639
|
${ir(this.nodes, (r) => r)}
|
1643
1640
|
</div>`;
|
1644
1641
|
}
|
@@ -1726,7 +1723,7 @@ ie([
|
|
1726
1723
|
y({ attribute: !1 })
|
1727
1724
|
], D.prototype, "application", 2);
|
1728
1725
|
D = ie([
|
1729
|
-
|
1726
|
+
$t("ace-wrapper")
|
1730
1727
|
], D);
|
1731
1728
|
class or {
|
1732
1729
|
constructor() {
|
@@ -1773,7 +1770,7 @@ class or {
|
|
1773
1770
|
createNode(t, e) {
|
1774
1771
|
const i = this.resolveComponent(e);
|
1775
1772
|
if (!i)
|
1776
|
-
return console.warn(`Unable to resolve component: ${e}`), new
|
1773
|
+
return console.warn(`Unable to resolve component: ${e}`), new X();
|
1777
1774
|
const n = new i();
|
1778
1775
|
return n.type = e, n.name = t, n;
|
1779
1776
|
}
|
@@ -1812,7 +1809,7 @@ let se = ne;
|
|
1812
1809
|
se.ResolveWebComponentName = (r) => `ace-${r}`;
|
1813
1810
|
class ar {
|
1814
1811
|
constructor(t, e, i, n) {
|
1815
|
-
this.name = t, this.container = e, this.settings = i, this.options = n, this.platform = new or(), this.renderStrategy =
|
1812
|
+
this.name = t, this.container = e, this.settings = i, this.options = n, this.platform = new or(), this.renderStrategy = w.Inline, this.autoActivate = !1, this.plugins = [], this.componentResolver = new se(), this.renderStrategy = this.options.renderStrategy || w.Inline, this.triggerIcon = this.options.triggerIcon, typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), this.container.register("$settings", i);
|
1816
1813
|
}
|
1817
1814
|
async activate() {
|
1818
1815
|
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(Vt.Ready), this.autoActivate) {
|
@@ -1840,8 +1837,8 @@ class ar {
|
|
1840
1837
|
return this.componentResolver.getComponent(t);
|
1841
1838
|
}
|
1842
1839
|
render() {
|
1843
|
-
if (this.renderStrategy ===
|
1844
|
-
const t = new
|
1840
|
+
if (this.renderStrategy === w.Trigger) {
|
1841
|
+
const t = new A();
|
1845
1842
|
return t.application = this, t;
|
1846
1843
|
}
|
1847
1844
|
return this.root;
|
@@ -1855,8 +1852,8 @@ const oe = class {
|
|
1855
1852
|
return e ? {
|
1856
1853
|
id: e.id,
|
1857
1854
|
apps: e.widgets.map((i) => {
|
1858
|
-
let n =
|
1859
|
-
return i.renderStrategy === "Trigger" && (n =
|
1855
|
+
let n = w.Inline;
|
1856
|
+
return i.renderStrategy === "Trigger" && (n = w.Trigger), {
|
1860
1857
|
id: i.id,
|
1861
1858
|
widgetId: i.widgetId,
|
1862
1859
|
renderStrategy: n,
|
@@ -1876,8 +1873,8 @@ const oe = class {
|
|
1876
1873
|
} : null;
|
1877
1874
|
}
|
1878
1875
|
};
|
1879
|
-
let
|
1880
|
-
|
1876
|
+
let yt = oe;
|
1877
|
+
yt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
1881
1878
|
class cr {
|
1882
1879
|
constructor() {
|
1883
1880
|
this.applications = [], this.container = new xt("environment", this), setTimeout(() => {
|
@@ -1914,7 +1911,7 @@ class lr {
|
|
1914
1911
|
this.configurations = [], typeof t == "string" ? this.url = t : this.loadFromConfig(t);
|
1915
1912
|
}
|
1916
1913
|
async load(t) {
|
1917
|
-
const e = await
|
1914
|
+
const e = await yt.getSite(t);
|
1918
1915
|
if (!e) {
|
1919
1916
|
console.warn(`Unable to load site from the url provided: ${t}`);
|
1920
1917
|
return;
|
@@ -1937,7 +1934,7 @@ class lr {
|
|
1937
1934
|
var e;
|
1938
1935
|
this.url && await this.load(this.url), this.environment = new cr(), this.addGlobal(this.environment);
|
1939
1936
|
for await (const i of this.configurations) {
|
1940
|
-
const n = await
|
1937
|
+
const n = await yt.getWidget(i.widgetId);
|
1941
1938
|
n && ((e = this.environment) == null || e.registerApp(n.name, n.config, {
|
1942
1939
|
renderStrategy: i.renderStrategy,
|
1943
1940
|
triggerIcon: i.triggerIcon,
|
@@ -1950,12 +1947,12 @@ class lr {
|
|
1950
1947
|
globalThis.widgets = t;
|
1951
1948
|
}
|
1952
1949
|
}
|
1953
|
-
var hr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor,
|
1950
|
+
var hr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, nt = (r, t, e, i) => {
|
1954
1951
|
for (var n = i > 1 ? void 0 : i ? pr(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1955
1952
|
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1956
1953
|
return i && n && hr(t, e, n), n;
|
1957
1954
|
};
|
1958
|
-
let U = class extends
|
1955
|
+
let U = class extends $ {
|
1959
1956
|
constructor() {
|
1960
1957
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
1961
1958
|
}
|
@@ -1980,8 +1977,8 @@ let U = class extends w {
|
|
1980
1977
|
render() {
|
1981
1978
|
if (!this.widget || this.status !== "activated")
|
1982
1979
|
return u;
|
1983
|
-
if (this.widget.renderStrategy ===
|
1984
|
-
const r = new
|
1980
|
+
if (this.widget.renderStrategy === w.Trigger) {
|
1981
|
+
const r = new A();
|
1985
1982
|
return r.application = this.widget, r;
|
1986
1983
|
}
|
1987
1984
|
return this.widget.render();
|
@@ -1994,18 +1991,19 @@ U.styles = [
|
|
1994
1991
|
}
|
1995
1992
|
`
|
1996
1993
|
];
|
1997
|
-
|
1994
|
+
nt([
|
1998
1995
|
y({ attribute: !0 })
|
1999
1996
|
], U.prototype, "name", 2);
|
2000
|
-
|
1997
|
+
nt([
|
2001
1998
|
W()
|
2002
1999
|
], U.prototype, "widget", 2);
|
2003
|
-
|
2000
|
+
nt([
|
2004
2001
|
W()
|
2005
2002
|
], U.prototype, "status", 2);
|
2006
|
-
U =
|
2007
|
-
|
2003
|
+
U = nt([
|
2004
|
+
$t("ace-widget")
|
2008
2005
|
], U);
|
2006
|
+
customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
2009
2007
|
const fr = async (r, t) => {
|
2010
2008
|
await new lr(r).bootstrap(t);
|
2011
2009
|
};
|
@@ -2015,7 +2013,7 @@ export {
|
|
2015
2013
|
xt as Container,
|
2016
2014
|
cr as Environment,
|
2017
2015
|
lr as Site,
|
2018
|
-
|
2016
|
+
A as Trigger,
|
2019
2017
|
Ve as WidgetComponent,
|
2020
2018
|
fr as bootstrap
|
2021
2019
|
};
|