@telia-ace/widget-components-list-flamingo 1.1.123-rc.8 → 1.1.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,154 @@
1
+ "use strict";const pt=(i,t,e,...s)=>{const n=`[${i.get("$environment").name||"webprovisions"}] ${e}`;switch(t){case"info":console.info(n,...s);break;case"warning":console.warn(n,...s);break;case"error":console.error(n,...s);break}},de=i=>{const t=i.container||i;return{info:(e,...s)=>pt(t,"info",e,...s),warn:(e,...s)=>pt(t,"warning",e,...s),error:(e,...s)=>pt(t,"error",e,...s)}};var X=(i=>(i.Implementation="implementation",i.Widget="widget",i))(X||{}),S=(i=>(i.Pre="pre",i.Post="post",i))(S||{});const ue=(i,t,e,s)=>{try{const n=new t(e,s);return{name:i,invoke:(r,o)=>{let a;return n[r]&&(a=n[r].call(n,o)),Promise.resolve(a)},getInstance:()=>n}}catch(n){if(n.message&&n.message.indexOf("is not a constructor")>=0)return{name:i,invoke:r=>{let o;return r==="initialize"&&(o=t(e,s)),Promise.resolve(o)},getInstance:()=>t};throw n}};function Ht(i,t){return typeof i>"u"?t:i}class me{constructor(t={}){this.part=t}createCommand(t,e,s){let n;typeof e=="function"?n={scope:X.Widget,stage:S.Post,defaultArgs:void 0,handlerResolver:e}:n={scope:Ht(e.scope,X.Widget),stage:Ht(e.stage,S.Post),defaultArgs:e.defaultArgs,handlerResolver:s};let r=this.part;const o=t.split(".");return o.forEach((a,c)=>{c===o.length-1?r[a]||(r[a]=()=>n):r=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const At=i=>{const t=new me({});return i(t),t.get()};At(i=>{i.createCommand("types.register",{scope:X.Implementation,stage:S.Pre},t=>(e,s)=>{t.container.get("$types")[e]=s}).createCommand("type",{stage:S.Pre},t=>e=>{t.container.register("$type",e)}).createCommand("settings",{stage:S.Pre,defaultArgs:[null]},t=>e=>{t.events.dispatch("settings:change",e,{bubbles:!0}),t.container.register("$settings",e)}).createCommand("plugin",{stage:S.Pre},t=>(e,s,n)=>{const{container:r}=t;let o=null,a=e,c=s;typeof e=="string"&&(o=e,a=s,c=n);const l=h=>{const{transformPluginSettings:p}=t.container.get("$environmentOptions"),d=p?p(c||{},o,t.container,a):s;try{const u=ue(o,a,r,d);r.get("$plugins").push(u),h&&u.invoke("initialize",null)}catch(u){de(t).warn("Error when initializing plugin",u)}};t.container.get("$instance")?l(!0):t.events.subscribeOnce("widget:instance-created",()=>l(!1))}).createCommand("container.register",t=>(e,s)=>{t.container.register(e,s)}).createCommand("container.registerAsync",t=>(e,s)=>{t.container.registerAsync(e,s)}).createCommand("container.registerFactory",t=>(e,s)=>{t.container.registerFactory(e,s)}).createCommand("container.touch",t=>(e,s)=>{t.container.touch(e,s)}).createCommand("csp",{},t=>e=>{t.container.register("csp",e)})});const et=(i,t,...e)=>typeof t=="string"?i(`[humany] ${t}`,...e):i(t,...e),J=class H{constructor(){this.keys=[],this.log=(t,...e)=>this.lookup(t,()=>H.log(...e)),this.warn=(t,...e)=>this.lookup(t,()=>H.warn(...e)),this.error=(t,...e)=>this.lookup(t,()=>H.error(...e)),this.info=(t,...e)=>this.lookup(t,()=>H.info(...e))}lookup(t,e){this.keys.indexOf(t)===-1&&(this.keys.push(t),e())}};J.log=(...i)=>et(console.log,...i);J.warn=(...i)=>et(console.warn,...i);J.error=(...i)=>et(console.error,...i);J.info=(...i)=>et(console.info,...i);let A=J;const Qt=i=>{let t={},e,s;if(typeof i!="object"||i===null)return i;t=Array.isArray(i)?[]:{};for(s in i)e=i[s],t[s]=typeof e=="object"&&e!==null?Qt(e):e;return t};function Rt(i){let t=0;if(i.length===0)return t.toString();for(let e=0;e<i.length;e++){const s=i.charCodeAt(e);t=(t<<5)-t+s,t=t&t}return t.toString()}let ge=class{constructor(t,e){this.lockWarningTime=t,this.lockErrorTime=e,this.tasks=[],this.current=Promise.resolve(),this.next=this.next.bind(this)}add(t,e,s,n){this.tasks.push({task:t,resolve:e,reject:s,done:n}),this.next()}next(){this.current=this.current.then(()=>{const t=this.tasks.shift();if(t){let e;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&A.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,t),e=setTimeout(()=>{t.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),n=Promise.resolve(t.task()).then(r=>(clearTimeout(s),clearTimeout(e),r));return Promise.resolve(n).then(this.next).then(()=>n.then(r=>{t.done(),t.resolve(r)})).catch(r=>(t.done(),t.reject(r),this.next()))}return Promise.resolve()})}};const F=new WeakMap;function st(i,t=5e3,e=1e3){return F.has(i)||F.set(i,new ge(t,e)),s=>new Promise((n,r)=>{const o=F.get(i);o.add(s,n,r,()=>{o.tasks.length||F.delete(i)})})}const w=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function it(){return w()+w()+"-"+w()+"-"+w()+"-"+w()+"-"+w()+w()+w()}const fe=i=>{const t=[];return[(e,s)=>{t.push(i.subscribe(e,s))},()=>{t.forEach(e=>{e()})}]};let nt=class{constructor(t,e=[]){this.platform=t,this.rules=e}match(t){return this.rules.every(e=>!(e.id&&e.id!==t.id||e.type&&e.type!==t.type))}ofType(t){return this.rules.push({type:t}),this}withId(t){return this.rules.push({id:t}),this}select(){return new ye(this.platform,this)}},te=class{constructor(t,e,s){this.platform=t,this.node=e,this.actions=new xt(t,new nt(t).withId(e.id),s);const[n,r]=fe(this.platform.events);this.subscribe=n,this.unsubscribe=r}properties(t){return t&&this.node.touchProperties(e=>t(e)),this.node.attributes.properties}context(t){return t&&this.subscribe("components:context-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.context)}),this.node.attributes.context}layout(t){return t&&this.subscribe("components:layout-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(t,e){this.node.writeProperties(t,e)}writeContext(t,e){this.node.writeProperties(t,e)}writeLayout(t,e){this.node.writeLayout(t,e)}dispose(){this.unsubscribe(),this.actions.dispose()}},ye=class{constructor(t,e,s=!0){this.platform=t,this.target=e,this.clearOnDispose=s,this.removes=[],this.actions=new xt(this.platform,this.target)}writeProperties(t,e){this.removes.push(this.platform.write({options:e,attributes:{properties:t},target:this.target,removable:this.clearOnDispose}))}writeContext(t,e){this.removes.push(this.platform.write({options:e,attributes:{context:t},target:this.target,removable:this.clearOnDispose}))}writeLayout(t,e){this.removes.push(this.platform.write({options:e,attributes:{layout:t},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(t=>{t()}),this.actions.dispose()}};const $e=(i,t,e)=>{const s=i.concat(),n=(r,o,a)=>{let c=!0;if(s.length){const l=s.shift(),h=(p,d)=>(c=!1,n(p,Object.assign({},o,d),a));return Promise.resolve(l(r,h,a)).then(p=>({...p,cancelled:c}))}return Promise.resolve({data:r,cancelled:!1,options:o})};return n(t,{},e)};let xt=class{constructor(t,e,s){this.platform=t,this.target=e,this.ns=s,this.subscriptions=[],this.create=this.create.bind(this)}create(t,e=()=>{}){const s={key:t,fn:e,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const n=()=>{const r=this.platform.actionsState.handlers.indexOf(s);r>-1&&this.platform.actionsState.handlers.splice(r,1)};return this.subscriptions.push(n),n}dispatch(t,e){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),n={},r=this.platform.actionsState.handlers.filter(o=>o.key===t&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(r.map(o=>{const a=s.filter(l=>o.target.match(l)&&this.target.match(l)),c=this.platform.actionsState.watchers.filter(l=>l.key===t&&(!l.ns||!this.ns||l.ns===this.ns)&&a.some(h=>l.target.match(h))).map(l=>l.fn);return Promise.all(a.map(l=>{const h=new te(this.platform,l,this.ns);return $e(c,e,h).then(p=>{const{data:d={},options:u,cancelled:g}=p;return Promise.resolve(g?{}:o.fn(d,u,h)).then(D=>{n[l.id]=D})})}))})).then(()=>n)}watch(t,e){let s=t,n=this.ns;const r=t.split(".");r.length>1&&(n=r[0],s=r.splice(1).join("."));const o={fn:e,target:this.target,key:s,ns:n};this.platform.actionsState.watchers.push(o);const a=()=>{const c=this.platform.actionsState.watchers.indexOf(o);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(a),a}dispose(){this.subscriptions.forEach(t=>t())}};At(i=>{i.createCommand("components",t=>e=>{t.events.subscribeOnce("components:platform-created",(s,{platform:n})=>{e.handlers&&e.handlers.forEach(([r,o])=>{n.addComponentHandler(r,o)})})})});let Lt=class{constructor(t,e){this.events=t,this.tags=[],this.children={},this.changesets=[],this.mountCount=0,this.id=it(),this.type=e,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(t,e){let s=t.get("mounted-nodes");return s||(s=new Map,t.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&A.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{s.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].push(t),this.events.dispatch("components:node-appended",{node:t})}prependChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].unshift(t),this.events.dispatch("components:node-appended",{node:t})}touchProperties(t,e={},s){const n=[{properties:t},e];return this.changesets.push(n),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const r=this.changesets.indexOf(n);r>-1&&(this.changesets.splice(r,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(t,e={},s){const n=[{properties:t},e];return this.changesets.push(n),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const r=this.changesets.indexOf(n);r>-1&&(this.changesets.splice(r,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(t,e={},s){const n=[{layout:t},e];return this.changesets.push(n),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const r=this.changesets.indexOf(n);r>-1&&(this.changesets.splice(r,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(t,e={},s){const n=[{context:t},e];return this.changesets.push(n),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const r=this.changesets.indexOf(n);r>-1&&(this.changesets.splice(r,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(t="default"){const e=this.children[t]||[];return e.reduce((s,n,r)=>{const{order:o=r}=n.attributes.layout;return s[o]?s.splice(o,0,n):s[o]=n,s},Array(e.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(t){Object.keys(this.children).forEach(e=>{const s=this.children[e],n=s.indexOf(t);n>-1&&(s.splice(n,1),this.events.dispatch("components:node-removed",{node:t,parentNode:this}))}),delete t.parent}};const ee=(i,t,e)=>{for(let s=0,n=i.length;s<n&&e(i[s])!==!0;s++){const r=t[i[s].id]||"default",o=i[s].getChildren(r);ee(o,t,e)}},Et=(i,t,e)=>{if(e(i)!==!0){const s=t[i.id]||"default",n=i.children[s];ee(n,t,e)}},dt=(i,t)=>{const e=[];return Et(i,t,s=>{e.push(s)}),e},ve=(i,t,e)=>{let s;return Et(i,t,n=>{if(e(n))return s=n,!0}),s};class be{constructor(t,e,s){this.root=t,this.switches=e,this.all=[],this.visible=[],this.detached=[],s.subscribe("components:node-appended",(n,r)=>{this.all.push(r.node),this.visible=dt(t,e)}),s.subscribe("components:node-removed",(n,r)=>{let o=this.all.indexOf(r.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(r.node),o>-1&&this.visible.splice(o,1),this.visible=dt(t,e)}),s.subscribe("components:node-switched",(n,r)=>{this.visible=dt(t,e)})}query(t={}){const e=[];return Et(this.root,this.switches,s=>{Object.keys(t).every(n=>t[n]===s[n])&&e.push(s)}),e}get(t){return ve(this.root,this.switches,e=>e.id===t)||this.detached.find(e=>e.id===t)}}let we=class{constructor(){this.handlers=new Map}add(t,e){this.handlers.set(t,e)}get(t){return this.handlers.get(t)}};const _e=i=>{let t=i,e=0;for(;t.parent;)e=e+1,t=t.parent;return e},Ae=i=>i.map(([t,e])=>[_e(t),t,e]).sort(([t],[e])=>t-e).map(([,t,e])=>[t,e]),ut=i=>i instanceof Date?!1:i&&typeof i=="object"&&!Array.isArray(i),v=(i,...t)=>{if(!t.length)return i;const e=t.shift();if(ut(i)&&ut(e))for(const s in e)ut(e[s])?(i[s]||Object.assign(i,{[s]:{}}),v(i[s],e[s])):Object.assign(i,{[s]:e[s]});return v(i,...t)},xe=(i,t)=>!i||i==="all"?!0:i.some(e=>t.indexOf(e)>-1),Ee=(i,t)=>{let e=[],s=[],n;const r=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const a=new Map,c=Ae(e.map((h,p)=>[h,s[p]])),l=(h,p)=>{var d;const u=a.get(h)||{},g=p.context&&!u.context,D=p.properties&&!u.properties,ht=p.layout&&!u.layout;a.set(h,{context:u.context||g,properties:u.properties||D,layout:u.layout||ht}),D&&(h.attributes.properties={}),ht&&(h.attributes.layout={}),g&&(h.attributes.context=v({},(d=h.parent)==null?void 0:d.attributes.context));const It=[],Dt=[],jt=[];if(h.changesets.forEach($=>{const[y,lt]=$;xe(lt.breakpoints,i.breakpoints)&&(D&&(typeof y.properties=="function"?It.push(y.properties):v(h.attributes.properties,y.properties)),ht&&(typeof y.layout=="function"?Dt.push(y.layout):v(h.attributes.layout,y.layout)),g&&(typeof y.context=="function"?jt.push(y.context):v(h.attributes.context,y.context)))}),It.forEach($=>{v(h.attributes.properties,$(h.attributes.properties))}),Dt.forEach($=>{v(h.attributes.layout,$(h.attributes.layout))}),jt.forEach($=>{v(h.attributes.context,$(h.attributes.context))}),g||p.recursive){const $=i.getBranch(h),y=p.recursive?p:{context:!!g};h.getChildren($).forEach(lt=>{l(lt,y)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([h,p])=>{l(h,p)}),e=[],s=[],t(a)},o=()=>{clearTimeout(n),n=setTimeout(r,0)};return(a,c)=>{const l=e.indexOf(a);if(l>-1){const h=s[l];return c.context&&(h.context=!0),c.properties&&(h.properties=!0),c.layout&&(h.layout=!0),c.recursive&&(h.recursive=!0),o()}return e.push(a),s.push(c),o()}};class se{constructor(t,e={}){this.providers=e,this.breakpoints=[],this.actionsState={handlers:[],watchers:[]},this.switches={},this.changesets=[],this.subscriptions=[],this.customComponentHandler=new we,this.events=t.events.createChild(this);const s=new Lt(this.events,"root");s.name=`root-${t.name}`,this.nodes=new be(s,this.switches,this.events);const n=this.processNode=Ee(this,r=>{const o=Array.from(r.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
2
+ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
3
+ `)}`),o.forEach(a=>{const c=r.get(a);a.parent&&a.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:a}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:a}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:a}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:a})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(e).map(r=>e[r].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(r,o)=>{const{node:a}=o;this.changesets.forEach(c=>{const{changeset:l,target:h,removes:p}=c,[d,u]=l;h.match(o.node)&&(d.properties&&p.push(a.writeProperties(d.properties,u)),d.context&&p.push(a.writeContext(d.context,u)),d.layout&&p.push(a.writeLayout(d.layout,u)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(r,o)=>{n(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(r,o)=>{n(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(r,o)=>{n(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(r,o)=>{n(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(r,o)=>{n(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(r,{node:o,branch:a})=>{n(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(r,{parentNode:o})=>{n(o,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(t){return t.getAsync("components")}addBreakpoint(t){this.breakpoints.indexOf(t)===-1&&(this.breakpoints.push(t),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(t){const e=this.breakpoints.indexOf(t);e>-1&&(this.breakpoints.splice(e,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(t,e){this.switches[t.id]=e,this.events.dispatch("components:node-switched",{node:t,branch:e})}getBranch(t){return this.switches[t.id]}createNode(t,e={}){const s=new Lt(this.events,t);return e.detached&&this.nodes.detached.push(s),s}components(){return new nt(this)}actions(t,e){return new xt(this,t,e)}write(t){const{provider:e,target:s,attributes:n,options:r={},removable:o}=t,a=t.key||it(),c={changeset:[n,r],target:s,removes:[]};if(e){const l=this.providers[e];l.write(a,s,n,r),c.removes.push(()=>{l.remove(a)})}return this.changesets.push(c),this.nodes.all.forEach(l=>{if(s.match(l)){let h=()=>{};n.properties&&(h=l.writeProperties(n.properties,r,o)),n.context&&(h=l.writeContext(n.context,r,o)),n.layout&&(h=l.writeContext(n.layout,r,o)),c.removes.push(h)}}),()=>{if(o){c.removes.forEach(h=>h());const l=this.changesets.indexOf(c);l>-1&&this.changesets.splice(l,1)}}}addComponentHandler(t,e){this.customComponentHandler.add(t,e)}getComponentHandler(t){return this.customComponentHandler.get(t)}dispose(){this.subscriptions.forEach(t=>t())}}const Se=(i,t)=>({id:i.id,type:i.type,name:i.name,branch:t||"default"}),Ce=(i,t,e,s=it(),n={})=>i.getAsync("components").then(r=>{let o;{const l=new nt(r);l.ofType(t),o=l}const a={},c=l=>{const h=a[l.id];return h?Promise.resolve(h.controller):se.getInstance(i).then(p=>new te(p,l,s))};r.events.subscribe("components:node-enter",(l,{node:h})=>{o.match(h)&&c(h).then(p=>{Promise.resolve(e(p)).then(d=>{a[h.id]={dispose:d,controller:p}})})}),r.events.subscribe("components:node-exit",(l,{node:h})=>{const p=a[h.id];p&&(p.dispose&&p.dispose(),n.reuseController||(p.controller.dispose(),delete a[h.id]))})});var b=(i=>(i.Cookie="cookie",i.Local="local",i.Session="session",i))(b||{}),St=(i=>(i.Tenant="tenant",i.Implementation="implementation",i.Widget="widget",i))(St||{}),f=(i=>(i.Necessary="necessary",i.Functional="functional",i.Analytical="analytical",i.Marketing="marketing",i))(f||{});const Oe=(i,t,e,s={})=>Bt(i,e).then(n=>(process.env.NODE_ENV!=="production"&&n&&A.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
4
+ Key: ${t}
5
+ Category: ${JSON.stringify(e)}
6
+ Options: ${JSON.stringify(s)}`),r=>(Ot(i),Bt(i,e).then(o=>{if(o){process.env.NODE_ENV!=="production"&&A.warn(`storageWriter: Attempted to write to storage using unallowed category.
7
+ Key: ${t}
8
+ Category: ${JSON.stringify(e)}
9
+ Value: ${JSON.stringify(r)}
10
+ Options: ${JSON.stringify(s)}`);return}const{scope:a=St.Widget,medium:c=b.Session,duration:l}=s,h=Ne();return h[a][t]=re(r,e,l),c===b.Cookie?De(i,h):He(i,c,h)})))),Pe=(i,t,e=b.Session)=>(Ot(i),typeof t>"u"?(process.env.NODE_ENV!=="production"&&A.warn("readStorage: Undefined key passed when reading storage. ",t,e),Promise.resolve(void 0)):e===b.Cookie?Ie(i).then(s=>_t(s,t)):je(i,e).then(s=>_t(s,t))),U=i=>!!Object.entries(i).filter(([t,e])=>typeof e<"u").length,mt=i=>Object.entries(i).filter(([t,e])=>typeof e<"u").forEach(([t,{value:e}])=>{typeof e>"u"&&delete i[t]}),ie=(i,t)=>{const e={tenant:{...i.tenant,...t.tenant},implementation:{...i.implementation,...t.implementation},widget:{...i.widget,...t.widget}};return mt(e.tenant),mt(e.implementation),mt(e.widget),e},ke=i=>Object.entries(i).reduce((t,e)=>{const[s,n]=e;return Object.entries(n).forEach(r=>{const[o,{expiration:a}]=r;a&&t.push(a)}),t},[]).slice().sort((t,e)=>new Date(e).valueOf()-new Date(t).valueOf()).shift()||Pt(),rt=i=>{const{name:t,implementation:{name:e,tenant:s}}=i.get("$widget");return[`humany_${s}`,`humany_${Rt(s+e)}`,`humany_${Rt(s+e+t)}`]},gt=i=>{const t=new RegExp(`(?:^|;)\\s?${i}=(.*?)(?:;|$)`,"i"),e=document.cookie.match(t);return e&&e[1]&&JSON.parse(e[1])||void 0},ft=(i,t,e)=>{const s=`${i}=${JSON.stringify(t).trim()}`,n=`expires=${new Date(e).toUTCString()}`,r="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${n}; ${r}; ${o}`},Ct=i=>{const[t,e,s]=rt(i),n=gt(t)||{},r=gt(e)||{},o=gt(s)||{};return{tenant:n,implementation:r,widget:o}},ne=(i,t)=>{const e=Ct(i),s=ie(e,t),[n,r,o]=rt(i),{tenant:a,implementation:c,widget:l}=s,h=ke(t),p=Pt({days:-1});ft(n,a,U(a)?h:p),ft(r,c,U(c)?h:p),ft(o,l,U(l)?h:p)},Y=(i,t)=>{const[e,s,n]=rt(i),r=t.getItem(e)||"{}",o=t.getItem(s)||"{}",a=t.getItem(n)||"{}";return{tenant:JSON.parse(r),implementation:JSON.parse(o),widget:JSON.parse(a)}},wt=(i,t,e)=>{const s=Y(i,t),n=ie(s,e),[r,o,a]=rt(i),{tenant:c,implementation:l,widget:h}=n;U(c)?t.setItem(r,JSON.stringify(c)):t.removeItem(r),U(l)?t.setItem(o,JSON.stringify(l)):t.removeItem(o),U(h)?t.setItem(a,JSON.stringify(h)):t.removeItem(a);const{events:p}=i.get("$widget");p.dispatch("storage:changed",{})},Ne=()=>({tenant:{},implementation:{},widget:{}}),Te=i=>i?!!i&&new Date>new Date(i):!1,_t=(i,t)=>{const e=i.widget[t]||i.implementation[t]||i.tenant[t];return e==null?void 0:e.value},re=(i,t,e)=>e?{value:i,category:t,expiration:typeof e=="object"?Pt(e):e}:{value:i,category:t},Ue=(i,t)=>{const e=Qt(i);return Object.entries(e).forEach(([s,n])=>{Object.entries(n).forEach(([r,o])=>{const{expiration:a,category:c}=o;(Te(a)||Me(t,c))&&(n[r]=re(void 0,c,a))})}),e},Bt=(i,t)=>Pe(i,"storagePolicy",b.Cookie).then((e=[f.Necessary])=>!!t&&e.indexOf(t)===-1),Me=(i=[f.Necessary],t)=>!!t&&i.indexOf(t)===-1,Ot=i=>{const t=Ct(i),e=Y(i,window.localStorage),s=Y(i,sessionStorage),n=_t(t,"storagePolicy"),[r,o,a]=[t,e,s].map(c=>Ue(c,n));ne(i,r),wt(i,window.localStorage,o),wt(i,window.sessionStorage,a)},Pt=(i={days:30})=>{const{days:t=0,hours:e=0,minutes:s=0,seconds:n=0}=i,r=new Date;return r.setTime(r.getTime()+e*60*60*1e3),r.setTime(r.getTime()+t*24*60*60*1e3),r.setTime(r.getTime()+s*60*1e3),r.setTime(r.getTime()+n*1e3),r.toISOString()},Ie=i=>st(document)(()=>Ct(i)),De=(i,t)=>st(document)(()=>ne(i,t)),je=(i,t)=>{const e=t===b.Local?window.localStorage:window.sessionStorage;return st(e)(()=>Y(i,e))},He=(i,t,e)=>{const s=t===b.Local?window.localStorage:window.sessionStorage;return st(s)(()=>wt(i,s,e))};At(i=>{i.createCommand("storage",t=>(e={})=>{const{consent:s}=e;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"&&A.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
11
+ Passed consent: ${JSON.stringify(s)}`);return}if(Array.isArray(s)&&!s.every(r=>typeof r=="number"||typeof r=="string")){process.env.NODE_ENV!=="production"&&A.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
12
+ Passed consent: ${JSON.stringify(s)}`);return}const n=[f.Necessary,f.Functional,f.Analytical,f.Marketing].filter((r,o,a)=>typeof s=="number"?s>o:typeof s=="string"?a.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(c=>c===o+1||c===r)>-1:!0);return n.indexOf(f.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&A.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
13
+ Passed consent: ${JSON.stringify(s)}`),n.unshift(f.Necessary)),Oe(t.container,"storagePolicy",f.Necessary,{medium:b.Cookie,scope:St.Tenant,duration:{days:365}}).then(r=>r(n)).then(()=>{Ot(t.container),t.events.dispatch("storage:policy-changed",n)})}})});/**
14
+ * @license
15
+ * Copyright 2019 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */const G=globalThis,kt=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nt=Symbol(),zt=new WeakMap;let oe=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Nt)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(kt&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=zt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&zt.set(e,t))}return t}toString(){return this.cssText}};const Re=i=>new oe(typeof i=="string"?i:i+"",void 0,Nt),ae=(i,...t)=>{const e=i.length===1?i[0]:t.reduce(((s,n,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[r+1]),i[0]);return new oe(e,i,Nt)},Le=(i,t)=>{if(kt)i.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),n=G.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)}},Wt=kt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Re(e)})(i):i;/**
18
+ * @license
19
+ * Copyright 2017 Google LLC
20
+ * SPDX-License-Identifier: BSD-3-Clause
21
+ */const{is:Be,defineProperty:ze,getOwnPropertyDescriptor:We,getOwnPropertyNames:Ve,getOwnPropertySymbols:Je,getPrototypeOf:qe}=Object,x=globalThis,Vt=x.trustedTypes,Ke=Vt?Vt.emptyScript:"",yt=x.reactiveElementPolyfillSupport,L=(i,t)=>i,Q={toAttribute(i,t){switch(t){case Boolean:i=i?Ke:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Tt=(i,t)=>!Be(i,t),Jt={attribute:!0,type:String,converter:Q,reflect:!1,useDefault:!1,hasChanged:Tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=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.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(t,s,e);n!==void 0&&ze(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=We(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:n,set(o){const a=n==null?void 0:n.call(this);r==null||r.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Jt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const t=qe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,s=[...Ve(e),...Je(e)];for(const n of s)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,n]of e)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const n=this._$Eu(e,s);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(Wt(n))}else t!==void 0&&e.push(Wt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Le(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 s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;const s=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,s);if(n!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:Q).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r,o;const s=this.constructor,n=s._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const a=s.getPropertyOptions(n),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:Q;this._$Em=n;const l=c.fromAttribute(e,a.type);this[n]=l??((o=this._$Ej)==null?void 0:o.get(n))??l,this._$Em=null}}requestUpdate(t,e,s){var n;if(t!==void 0){const r=this.constructor,o=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??Tt)(o,e)||s.useDefault&&s.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:n,wrapped:r},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),r!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,o]of n){const{wrapped:a}=o,c=this[r];a!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,o,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)})),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var n;return(n=s.hostUpdated)==null?void 0:n.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[L("elementProperties")]=new Map,T[L("finalized")]=new Map,yt==null||yt({ReactiveElement:T}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.1.1");/**
22
+ * @license
23
+ * Copyright 2017 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */const B=globalThis,tt=B.trustedTypes,qt=tt?tt.createPolicy("lit-html",{createHTML:i=>i}):void 0,ce="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,he="?"+_,Fe=`<${he}>`,P=document,z=()=>P.createComment(""),W=i=>i===null||typeof i!="object"&&typeof i!="function",Ut=Array.isArray,Ze=i=>Ut(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",$t=`[
26
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kt=/-->/g,Ft=/>/g,E=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
27
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Zt=/'/g,Gt=/"/g,le=/^(?:script|style|textarea|title)$/i,Ge=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),R=Ge(1),k=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Xt=new WeakMap,C=P.createTreeWalker(P,129);function pe(i,t){if(!Ut(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return qt!==void 0?qt.createHTML(t):t}const Xe=(i,t)=>{const e=i.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",o=j;for(let a=0;a<e;a++){const c=i[a];let l,h,p=-1,d=0;for(;d<c.length&&(o.lastIndex=d,h=o.exec(c),h!==null);)d=o.lastIndex,o===j?h[1]==="!--"?o=Kt:h[1]!==void 0?o=Ft:h[2]!==void 0?(le.test(h[2])&&(n=RegExp("</"+h[2],"g")),o=E):h[3]!==void 0&&(o=E):o===E?h[0]===">"?(o=n??j,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?E:h[3]==='"'?Gt:Zt):o===Gt||o===Zt?o=E:o===Kt||o===Ft?o=j:(o=E,n=void 0);const u=o===E&&i[a+1].startsWith("/>")?" ":"";r+=o===j?c+Fe:p>=0?(s.push(l),c.slice(0,p)+ce+c.slice(p)+_+u):c+_+(p===-2?a:u)}return[pe(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class V{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Xe(t,e);if(this.el=V.createElement(l,s),C.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=C.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(const p of n.getAttributeNames())if(p.endsWith(ce)){const d=h[o++],u=n.getAttribute(p).split(_),g=/([.?@])?(.*)/.exec(d);c.push({type:1,index:r,name:g[2],strings:u,ctor:g[1]==="."?Qe:g[1]==="?"?ts:g[1]==="@"?es:ot}),n.removeAttribute(p)}else p.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(p));if(le.test(n.tagName)){const p=n.textContent.split(_),d=p.length-1;if(d>0){n.textContent=tt?tt.emptyScript:"";for(let u=0;u<d;u++)n.append(p[u],z()),C.nextNode(),c.push({type:2,index:++r});n.append(p[d],z())}}}else if(n.nodeType===8)if(n.data===he)c.push({type:2,index:r});else{let p=-1;for(;(p=n.data.indexOf(_,p+1))!==-1;)c.push({type:7,index:r}),p+=_.length-1}r++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function I(i,t,e=i,s){var o,a;if(t===k)return t;let n=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const r=W(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((a=n==null?void 0:n._$AO)==null||a.call(n,!1),r===void 0?n=void 0:(n=new r(i),n._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=n:e._$Cl=n),n!==void 0&&(t=I(i,n._$AS(i,t.values),n,s)),t}class Ye{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:s}=this._$AD,n=((t==null?void 0:t.creationScope)??P).importNode(e,!0);C.currentNode=n;let r=C.nextNode(),o=0,a=0,c=s[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new q(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new ss(r,this,t)),this._$AV.push(l),c=s[++a]}o!==(c==null?void 0:c.index)&&(r=C.nextNode(),o++)}return C.currentNode=P,n}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class q{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,n){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,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=I(this,t,e),W(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==k&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ze(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(pe(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const o=new Ye(n,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Xt.get(t.strings);return e===void 0&&Xt.set(t.strings,e=new V(t)),e}k(t){Ut(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const r of t)n===e.length?e.push(s=new q(this.O(z()),this.O(z()),this,this.options)):s=e[n],s._$AI(r),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);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 ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(t,e=this,s,n){const r=this.strings;let o=!1;if(r===void 0)t=I(this,t,e,0),o=!W(t)||t!==this._$AH&&t!==k,o&&(this._$AH=t);else{const a=t;let c,l;for(t=r[0],c=0;c<r.length-1;c++)l=I(this,a[s+c],e,c),l===k&&(l=this._$AH[c]),o||(o=!W(l)||l!==this._$AH[c]),l===m?t=m:t!==m&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}o&&!n&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Qe extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}}class ts extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}}class es extends ot{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??m)===k)return;const s=this._$AH,n=t===m&&s!==m||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==m&&(s===m||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 ss{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const vt=B.litHtmlPolyfillSupport;vt==null||vt(V,q),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.1");const is=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let n=s._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=n=new q(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(i),n};/**
28
+ * @license
29
+ * Copyright 2017 Google LLC
30
+ * SPDX-License-Identifier: BSD-3-Clause
31
+ */const O=globalThis;let M=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=is(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 k}};var Yt;M._$litElement$=!0,M.finalized=!0,(Yt=O.litElementHydrateSupport)==null||Yt.call(O,{LitElement:M});const bt=O.litElementPolyfillSupport;bt==null||bt({LitElement:M});(O.litElementVersions??(O.litElementVersions=[])).push("4.2.1");/**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */const ns={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:Tt},rs=(i=ns,t,e)=>{const{kind:s,metadata:n}=e;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),r.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(a){const c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,i)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(s==="setter"){const{name:o}=e;return function(a){const c=this[o];t.call(this,a),this.requestUpdate(o,c,i)}}throw Error("Unsupported decorator location: "+s)};function at(i){return(t,e)=>typeof e=="object"?rs(i,t,e):((s,n,r)=>{const o=n.hasOwnProperty(r);return n.constructor.createProperty(r,s),o?Object.getOwnPropertyDescriptor(n,r):void 0})(i,t,e)}/**
36
+ * @license
37
+ * Copyright 2017 Google LLC
38
+ * SPDX-License-Identifier: BSD-3-Clause
39
+ */function ct(i){return at({...i,state:!0,attribute:!1})}/**
40
+ * @license
41
+ * Copyright 2017 Google LLC
42
+ * SPDX-License-Identifier: BSD-3-Clause
43
+ */const os={ATTRIBUTE:1},as=i=>(...t)=>({_$litDirective$:i,values:t});class cs{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
44
+ * @license
45
+ * Copyright 2018 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */const hs=as(class extends cs{constructor(i){var t;if(super(i),i.type!==os.ATTRIBUTE||i.name!=="class"||((t=i.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((t=>i[t])).join(" ")+" "}update(i,[t]){var s,n;if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in t)t[r]&&!((s=this.nt)!=null&&s.has(r))&&this.st.add(r);return this.render(t)}const e=i.element.classList;for(const r of this.st)r in t||(e.remove(r),this.st.delete(r));for(const r in t){const o=!!t[r];o===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(o?(e.add(r),this.st.add(r)):(e.remove(r),this.st.delete(r)))}return k}}),Z=(i,t,e)=>{i&&e.style.setProperty(t,i)},ls=(i,t)=>{var e,s,n,r;Z((e=i.colors)==null?void 0:e.primaryBackground,"--primary-background",t),Z((s=i.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),Z((n=i.colors)==null?void 0:n.secondaryBackground,"--secondary-background",t),Z((r=i.colors)==null?void 0:r.textOnSecondaryBackground,"--text-on-secondary-background",t)};var ps=Object.defineProperty,K=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&ps(t,e,n),n};const Mt=class Mt extends M{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(this.symbol),this.loaded=!0,this._applyBranding()}_toggleActive(){this.active=!this.active}_applyBranding(){var e;const t=((e=this.container)==null?void 0:e.get("$settings"))??{};t!=null&&t.branding&&ls(t.branding,this)}async _renderSymbol(t){const e=async s=>await Promise.resolve().then(()=>require("./index-BG1RS3tz.js")).then(r=>r[s]);if(t){const{type:s,content:n}=t;switch(s){case"Telia":{const r=await e(n);return r?R`<telia-icon
48
+ class="trigger-icon"
49
+ svg=${r.svg}
50
+ size="lg"
51
+ ></telia-icon>`:m}case"FontAwesome":return R`<i class="trigger-fa-icon fa fa-${n}"></i>`;case"Uri":return R`<i
52
+ class="trigger-custom-icon"
53
+ style="background: url(${n}) no-repeat center center;background-size: contain;"
54
+ ></i>`;default:return m}}}render(){return R`<button
55
+ class=${hs({trigger:!0,active:this.active,rendered:this.loaded})}
56
+ @click=${this._toggleActive}
57
+ >
58
+ ${this.icon}
59
+ <span class="trigger-close">
60
+ <svg
61
+ width="18"
62
+ height="9"
63
+ viewBox="0 0 18 9"
64
+ fill="none"
65
+ xmlns="http://www.w3.org/2000/svg"
66
+ >
67
+ <path
68
+ d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
69
+ fill="white"
70
+ />
71
+ </svg>
72
+ </span>
73
+ <span class="trigger-loader">
74
+ <svg viewBox="25 25 50 50">
75
+ <circle
76
+ cx="50"
77
+ cy="50"
78
+ r="20"
79
+ fill="none"
80
+ stroke="#000"
81
+ stroke-width="2"
82
+ stroke-miterlimit="10"
83
+ />
84
+ </svg>
85
+ </span>
86
+ </button>`}};Mt.styles=[ae`
87
+ :host {
88
+ --voca-rem-multiplier: 0.625;
89
+ display: block;
90
+ box-sizing: border-box;
91
+ }
92
+
93
+ .trigger {
94
+ position: fixed;
95
+ transform: scale(0);
96
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
97
+ bottom: 20px;
98
+ right: 20px;
99
+ z-index: 5;
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ border: none;
104
+ line-height: 55px;
105
+ height: 55px;
106
+ width: 55px;
107
+ border-radius: 55px;
108
+ cursor: pointer;
109
+ background-color: var(--trigger-bg, var(--primary-background));
110
+ font-family: Lato;
111
+ text-decoration: none;
112
+ border: 3px dashed transparent;
113
+ box-sizing: border-box;
114
+ transition: transform 200ms ease-out;
115
+ }
116
+ .trigger:hover {
117
+ transform: scale(1.1) !important;
118
+ }
119
+ .trigger.rendered {
120
+ transform: scale(1);
121
+ }
122
+ .trigger.active .trigger-icon {
123
+ opacity: 0;
124
+ transform: rotate(-180deg) scale(0);
125
+ }
126
+ .trigger.active .trigger-close {
127
+ opacity: 1;
128
+ transform: rotate(0deg) scale(1);
129
+ }
130
+
131
+ .trigger-icon {
132
+ display: inline-block;
133
+ line-height: inherit;
134
+ text-align: center;
135
+ opacity: 1;
136
+ transform: rotate(0deg) scale(1);
137
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
138
+ color: var(--trigger-text-color, var(--text-on-primary-background));
139
+ }
140
+ .trigger-close {
141
+ opacity: 0;
142
+ transition: transform 200ms ease-out;
143
+ transform: rotate(180deg) scale(0);
144
+ position: absolute;
145
+ top: 0;
146
+ bottom: 0;
147
+ left: 0;
148
+ right: 0;
149
+ display: flex;
150
+ justify-content: center;
151
+ align-items: center;
152
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
153
+ }
154
+ `];let N=Mt;K([at({attribute:!1})],N.prototype,"symbol");K([at({attribute:!1})],N.prototype,"container");K([ct()],N.prototype,"active");K([ct()],N.prototype,"loaded");K([ct()],N.prototype,"icon");const ds=async(i,t)=>{const e=i.properties().provider;let s={},n="";Array.isArray(e)?(n=e[0],s=e[1]):n=e||"";const r=await t.getAsync(n);if(!r)throw new Error("No provider defined in ListComponent");return r.applyComponentNodeSettings(i.node.id,s),{provider:r,settings:s}},us=async(i,t)=>{const{provider:e,settings:s={}}=await ds(i,t);return{addResource:(n,r)=>e.addResource(n,r),getData:(n,r)=>e.getData(n,r,s)}},ms=(i,t,e,s,n)=>i.getAsync("componentResolver").then(r=>(r.registerComponent(t,e),Ce(i,t,s||(()=>{}),t,n))),gs=i=>ms(i,"list",Promise.resolve().then(()=>require("./list-L0OHXWcj.js")),t=>{(async()=>{t.writeProperties({loading:!0,items:[],totalItems:0});const n=await(await us(t,i)).getData("items",{});t.writeProperties({loading:!1,items:(n==null?void 0:n.items)||[],totalItems:(n==null?void 0:n.totalItems)||0})})()});exports.E=m;exports.ListComponent=gs;exports.N=nt;exports.dt=Se;exports.i=ae;exports.i$1=M;exports.n=at;exports.ot=it;exports.r=ct;exports.st=se;exports.x=R;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index-DB9rgOBa.js");module.exports=e.ListComponent;
1
+ "use strict";const e=require("./index-pDVi9hIM.js");module.exports=e.ListComponent;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { L as f } from "./index-mVEjgFep.mjs";
1
+ import { L as f } from "./index-BmrvrLi9.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { e as g, N as k, a as E, i as C, d as y, n as _, r as u, x, E as $, b as q } from "./index-mVEjgFep.mjs";
1
+ import { s as g, N as k, o as E, i as C, d as y, n as _, r as u, x, E as $, a as q } from "./index-BmrvrLi9.mjs";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-DB9rgOBa.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-pDVi9hIM.js");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -26,7 +26,7 @@
26
26
  * @license
27
27
  * Copyright 2022 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function P({context:o,subscribe:t}){return(s,n)=>{typeof n=="object"?n.addInitializer((function(){new v(this,{context:o,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((e=>{new v(e,{context:o,callback:i=>{e[n]=i},subscribe:t})}))}}const w="children",L="descriptor",k="container",E="context",q="layout",O="properties";class R{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,s){if(!this._container||!this._descriptor)return;const n=await c.et.getInstance(this._container),e=new c.N(n).withId(this._descriptor.id);await n.actions(e,this._descriptor.type||c.et$1()).dispatch(t,s)}}const $=o=>{const t={};return Object.keys(o).forEach(s=>{s.indexOf("css-")>-1&&(t[s]=o[s])}),t},D=(o,t)=>{const s=$(t);Object.entries(s).forEach(([n,e])=>{o.style.setProperty(n.replace("css-",""),e)})};var V=Object.defineProperty,d=(o,t,s,n)=>{for(var e=void 0,i=o.length-1,r;i>=0;i--)(r=o[i])&&(e=r(t,s,e)||e);return e&&V(t,s,e),e};const j=o=>{const s=class s extends o{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new p(this,L,void 0),this._childrenProvider=new p(this,w,[]),this._propertiesProvider=new p(this,O,{}),this._contextProvider=new p(this,E,{}),this._layoutProvider=new p(this,q,{}),this.actions=new R(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),c.et.getInstance(this.container).then(async e=>{var r,h;const i=e.nodes.get(this.entry);if(i){this._propertyChangeListener=e.events.subscribe("components:properties-changed",(l,a)=>{i.id===a.node.id&&this._setProperties(a.node.attributes.properties)}),this._contextChangeListener=e.events.subscribe("components:context-changed",(l,a)=>{i.id===a.node.id&&this._setContext(a.node.attributes.context)}),this._layoutChangeListener=e.events.subscribe("components:layout-changed",(l,a)=>{i.id===a.node.id&&this._setLayout(a.node.attributes.layout)});const u="default";this._unmountNode=i.mount(this.container),this._setDescriptor(c.dt(i,u)),this._setProperties(i.attributes.properties),this._setContext(i.attributes.context),this._setLayout(this.layout);const b=i.getChildren(u).map(l=>c.dt(l));this._childrenProvider.setValue(b);const _=await this.container.getAsync("componentResolver");if(((r=this.descriptor)==null?void 0:r.type)==="area")return;const x=_.getComponent(((h=this.descriptor)==null?void 0:h.type)||"");x.then&&x.then(l=>{this.component=l.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),D(this.renderRoot.host,this.properties)}_setProperties(e){this._propertiesProvider.setValue(e),this.properties=e}_setContext(e){this._contextProvider.setValue(e),this.context=e}_setLayout(e){this._layoutProvider.setValue(e),this.layout=e}_setDescriptor(e){this.descriptor=e,this._descriptorProvider.setValue(e),this.actions.setDescriptor(e)}};s.styles=[o.styles??[],c.i`
29
+ */function P({context:o,subscribe:t}){return(s,n)=>{typeof n=="object"?n.addInitializer((function(){new v(this,{context:o,callback:e=>{s.set.call(this,e)},subscribe:t})})):s.constructor.addInitializer((e=>{new v(e,{context:o,callback:i=>{e[n]=i},subscribe:t})}))}}const w="children",L="descriptor",k="container",E="context",q="layout",O="properties";class R{constructor(t){(this.host=t).addController(this)}hostConnected(){}hostDisconnected(){}setDescriptor(t){this._descriptor=t}setContainer(t){this._container=t}async dispatch(t,s){if(!this._container||!this._descriptor)return;const n=await c.st.getInstance(this._container),e=new c.N(n).withId(this._descriptor.id);await n.actions(e,this._descriptor.type||c.ot()).dispatch(t,s)}}const $=o=>{const t={};return Object.keys(o).forEach(s=>{s.indexOf("css-")>-1&&(t[s]=o[s])}),t},D=(o,t)=>{const s=$(t);Object.entries(s).forEach(([n,e])=>{o.style.setProperty(n.replace("css-",""),e)})};var V=Object.defineProperty,d=(o,t,s,n)=>{for(var e=void 0,i=o.length-1,r;i>=0;i--)(r=o[i])&&(e=r(t,s,e)||e);return e&&V(t,s,e),e};const j=o=>{const s=class s extends o{constructor(){super(...arguments),this.entry="",this._descriptorProvider=new p(this,L,void 0),this._childrenProvider=new p(this,w,[]),this._propertiesProvider=new p(this,O,{}),this._contextProvider=new p(this,E,{}),this._layoutProvider=new p(this,q,{}),this.actions=new R(this),this.context={},this.layout={},this.properties={}}connectedCallback(){super.connectedCallback(),this.container&&(this.actions.setContainer(this.container),c.st.getInstance(this.container).then(async e=>{var r,h;const i=e.nodes.get(this.entry);if(i){this._propertyChangeListener=e.events.subscribe("components:properties-changed",(l,a)=>{i.id===a.node.id&&this._setProperties(a.node.attributes.properties)}),this._contextChangeListener=e.events.subscribe("components:context-changed",(l,a)=>{i.id===a.node.id&&this._setContext(a.node.attributes.context)}),this._layoutChangeListener=e.events.subscribe("components:layout-changed",(l,a)=>{i.id===a.node.id&&this._setLayout(a.node.attributes.layout)});const u="default";this._unmountNode=i.mount(this.container),this._setDescriptor(c.dt(i,u)),this._setProperties(i.attributes.properties),this._setContext(i.attributes.context),this._setLayout(this.layout);const b=i.getChildren(u).map(l=>c.dt(l));this._childrenProvider.setValue(b);const _=await this.container.getAsync("componentResolver");if(((r=this.descriptor)==null?void 0:r.type)==="area")return;const x=_.getComponent(((h=this.descriptor)==null?void 0:h.type)||"");x.then&&x.then(l=>{this.component=l.default})}}))}disconnectedCallback(){super.disconnectedCallback(),this._propertyChangeListener&&this._propertyChangeListener(),this._contextChangeListener&&this._contextChangeListener(),this._layoutChangeListener&&this._layoutChangeListener(),this._unmountNode&&this._unmountNode()}updated(){this.container&&this.actions.setContainer(this.container),this.renderRoot.host.style.setProperty("--width",this.layout.size==="full"?"var(--columns, 1)":`min(${this.layout.size||"var(--columns)"}, var(--columns))`),D(this.renderRoot.host,this.properties)}_setProperties(e){this._propertiesProvider.setValue(e),this.properties=e}_setContext(e){this._contextProvider.setValue(e),this.context=e}_setLayout(e){this._layoutProvider.setValue(e),this.layout=e}_setDescriptor(e){this.descriptor=e,this._descriptorProvider.setValue(e),this.actions.setDescriptor(e)}};s.styles=[o.styles??[],c.i`
30
30
  :host {
31
31
  font-family: var(--font-family);
32
32
  grid-column: span var(--width);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-list-flamingo",
3
- "version": "1.1.123-rc.8",
3
+ "version": "1.1.123",
4
4
  "dependencies": {
5
- "@telia-ace/widget-runtime-flamingo": "1.1.123-rc.8",
5
+ "@telia-ace/widget-runtime-flamingo": "1.1.123",
6
6
  "@webprovisions/platform": "^1.1.3",
7
7
  "lit": "^3.0.2"
8
8
  },
package/index-DB9rgOBa.js DELETED
@@ -1,154 +0,0 @@
1
- "use strict";const lt=(r,t,e,...s)=>{const i=`[${r.get("$environment").name||"webprovisions"}] ${e}`;switch(t){case"info":console.info(i,...s);break;case"warning":console.warn(i,...s);break;case"error":console.error(i,...s);break}},pe=r=>{const t=r.container||r;return{info:(e,...s)=>lt(t,"info",e,...s),warn:(e,...s)=>lt(t,"warning",e,...s),error:(e,...s)=>lt(t,"error",e,...s)}};var G=(r=>(r.Implementation="implementation",r.Widget="widget",r))(G||{}),S=(r=>(r.Pre="pre",r.Post="post",r))(S||{});const de=(r,t,e,s)=>{try{const i=new t(e,s);return{name:r,invoke:(n,o)=>{let a;return i[n]&&(a=i[n].call(i,o)),Promise.resolve(a)},getInstance:()=>i}}catch(i){if(i.message&&i.message.indexOf("is not a constructor")>=0)return{name:r,invoke:n=>{let o;return n==="initialize"&&(o=t(e,s)),Promise.resolve(o)},getInstance:()=>t};throw i}};function It(r,t){return typeof r>"u"?t:r}class ue{constructor(t={}){this.part=t}createCommand(t,e,s){let i;typeof e=="function"?i={scope:G.Widget,stage:S.Post,defaultArgs:void 0,handlerResolver:e}:i={scope:It(e.scope,G.Widget),stage:It(e.stage,S.Post),defaultArgs:e.defaultArgs,handlerResolver:s};let n=this.part;const o=t.split(".");return o.forEach((a,c)=>{c===o.length-1?n[a]||(n[a]=()=>i):n=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const _t=r=>{const t=new ue({});return r(t),t.get()};_t(r=>{r.createCommand("types.register",{scope:G.Implementation,stage:S.Pre},t=>(e,s)=>{t.container.get("$types")[e]=s}).createCommand("type",{stage:S.Pre},t=>e=>{t.container.register("$type",e)}).createCommand("settings",{stage:S.Pre,defaultArgs:[null]},t=>e=>{t.events.dispatch("settings:change",e,{bubbles:!0}),t.container.register("$settings",e)}).createCommand("plugin",{stage:S.Pre},t=>(e,s,i)=>{const{container:n}=t;let o=null,a=e,c=s;typeof e=="string"&&(o=e,a=s,c=i);const l=h=>{const{transformPluginSettings:p}=t.container.get("$environmentOptions"),d=p?p(c||{},o,t.container,a):s;try{const u=de(o,a,n,d);n.get("$plugins").push(u),h&&u.invoke("initialize",null)}catch(u){pe(t).warn("Error when initializing plugin",u)}};t.container.get("$instance")?l(!0):t.events.subscribeOnce("widget:instance-created",()=>l(!1))}).createCommand("container.register",t=>(e,s)=>{t.container.register(e,s)}).createCommand("container.registerAsync",t=>(e,s)=>{t.container.registerAsync(e,s)}).createCommand("container.registerFactory",t=>(e,s)=>{t.container.registerFactory(e,s)}).createCommand("container.touch",t=>(e,s)=>{t.container.touch(e,s)}).createCommand("csp",{},t=>e=>{t.container.register("csp",e)})});const tt=(r,t,...e)=>typeof t=="string"?r(`[humany] ${t}`,...e):r(t,...e),H=class{constructor(){this.keys=[],this.log=(t,...e)=>this.lookup(t,()=>H.log(...e)),this.warn=(t,...e)=>this.lookup(t,()=>H.warn(...e)),this.error=(t,...e)=>this.lookup(t,()=>H.error(...e)),this.info=(t,...e)=>this.lookup(t,()=>H.info(...e))}lookup(t,e){this.keys.indexOf(t)===-1&&(this.keys.push(t),e())}};let y=H;y.log=(...r)=>tt(console.log,...r);y.warn=(...r)=>tt(console.warn,...r);y.error=(...r)=>tt(console.error,...r);y.info=(...r)=>tt(console.info,...r);const Xt=r=>{let t={},e,s;if(typeof r!="object"||r===null)return r;t=Array.isArray(r)?[]:{};for(s in r)e=r[s],t[s]=typeof e=="object"&&e!==null?Xt(e):e;return t};function Ht(r){let t=0;if(r.length===0)return t.toString();for(let e=0;e<r.length;e++){const s=r.charCodeAt(e);t=(t<<5)-t+s,t=t&t}return t.toString()}let me=class{constructor(t,e){this.lockWarningTime=t,this.lockErrorTime=e,this.tasks=[],this.current=Promise.resolve(),this.next=this.next.bind(this)}add(t,e,s,i){this.tasks.push({task:t,resolve:e,reject:s,done:i}),this.next()}next(){this.current=this.current.then(()=>{const t=this.tasks.shift();if(t){let e;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&y.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,t),e=setTimeout(()=>{t.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),i=Promise.resolve(t.task()).then(n=>(clearTimeout(s),clearTimeout(e),n));return Promise.resolve(i).then(this.next).then(()=>i.then(n=>{t.done(),t.resolve(n)})).catch(n=>(t.done(),t.reject(n),this.next()))}return Promise.resolve()})}};const F=new WeakMap;function et(r,t=5e3,e=1e3){return F.has(r)||F.set(r,new me(t,e)),s=>new Promise((i,n)=>{const o=F.get(r);o.add(s,i,n,()=>{o.tasks.length||F.delete(r)})})}const _=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function st(){return _()+_()+"-"+_()+"-"+_()+"-"+_()+"-"+_()+_()+_()}const ge=r=>{const t=[];return[(e,s)=>{t.push(r.subscribe(e,s))},()=>{t.forEach(e=>{e()})}]};let rt=class{constructor(t,e=[]){this.platform=t,this.rules=e}match(t){return this.rules.every(e=>!(e.id&&e.id!==t.id||e.type&&e.type!==t.type))}ofType(t){return this.rules.push({type:t}),this}withId(t){return this.rules.push({id:t}),this}select(){return new fe(this.platform,this)}},Yt=class{constructor(t,e,s){this.platform=t,this.node=e,this.actions=new At(t,new rt(t).withId(e.id),s);const[i,n]=ge(this.platform.events);this.subscribe=i,this.unsubscribe=n}properties(t){return t&&this.node.touchProperties(e=>t(e)),this.node.attributes.properties}context(t){return t&&this.subscribe("components:context-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.context)}),this.node.attributes.context}layout(t){return t&&this.subscribe("components:layout-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(t,e){this.node.writeProperties(t,e)}writeContext(t,e){this.node.writeProperties(t,e)}writeLayout(t,e){this.node.writeLayout(t,e)}dispose(){this.unsubscribe(),this.actions.dispose()}};class fe{constructor(t,e,s=!0){this.platform=t,this.target=e,this.clearOnDispose=s,this.removes=[],this.actions=new At(this.platform,this.target)}writeProperties(t,e){this.removes.push(this.platform.write({options:e,attributes:{properties:t},target:this.target,removable:this.clearOnDispose}))}writeContext(t,e){this.removes.push(this.platform.write({options:e,attributes:{context:t},target:this.target,removable:this.clearOnDispose}))}writeLayout(t,e){this.removes.push(this.platform.write({options:e,attributes:{layout:t},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(t=>{t()}),this.actions.dispose()}}const ye=(r,t,e)=>{const s=r.concat(),i=(n,o,a)=>{let c=!0;if(s.length){const l=s.shift(),h=(p,d)=>(c=!1,i(p,Object.assign({},o,d),a));return Promise.resolve(l(n,h,a)).then(p=>({...p,cancelled:c}))}return Promise.resolve({data:n,cancelled:!1,options:o})};return i(t,{},e)};let At=class{constructor(t,e,s){this.platform=t,this.target=e,this.ns=s,this.subscriptions=[],this.create=this.create.bind(this)}create(t,e=()=>{}){const s={key:t,fn:e,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const i=()=>{const n=this.platform.actionsState.handlers.indexOf(s);n>-1&&this.platform.actionsState.handlers.splice(n,1)};return this.subscriptions.push(i),i}dispatch(t,e){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),i={},n=this.platform.actionsState.handlers.filter(o=>o.key===t&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(n.map(o=>{const a=s.filter(l=>o.target.match(l)&&this.target.match(l)),c=this.platform.actionsState.watchers.filter(l=>l.key===t&&(!l.ns||!this.ns||l.ns===this.ns)&&a.some(h=>l.target.match(h))).map(l=>l.fn);return Promise.all(a.map(l=>{const h=new Yt(this.platform,l,this.ns);return ye(c,e,h).then(p=>{const{data:d={},options:u,cancelled:g}=p;return Promise.resolve(g?{}:o.fn(d,u,h)).then(j=>{i[l.id]=j})})}))})).then(()=>i)}watch(t,e){let s=t,i=this.ns;const n=t.split(".");n.length>1&&(i=n[0],s=n.splice(1).join("."));const o={fn:e,target:this.target,key:s,ns:i};this.platform.actionsState.watchers.push(o);const a=()=>{const c=this.platform.actionsState.watchers.indexOf(o);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(a),a}dispose(){this.subscriptions.forEach(t=>t())}};_t(r=>{r.createCommand("components",t=>e=>{t.events.subscribeOnce("components:platform-created",(s,{platform:i})=>{e.handlers&&e.handlers.forEach(([n,o])=>{i.addComponentHandler(n,o)})})})});let Rt=class{constructor(t,e){this.events=t,this.tags=[],this.children={},this.changesets=[],this.mountCount=0,this.id=st(),this.type=e,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(t,e){let s=t.get("mounted-nodes");return s||(s=new Map,t.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&y.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{s.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].push(t),this.events.dispatch("components:node-appended",{node:t})}prependChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].unshift(t),this.events.dispatch("components:node-appended",{node:t})}touchProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(t,e={},s){const i=[{layout:t},e];return this.changesets.push(i),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(t,e={},s){const i=[{context:t},e];return this.changesets.push(i),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(t="default"){const e=this.children[t]||[];return e.reduce((s,i,n)=>{const{order:o=n}=i.attributes.layout;return s[o]?s.splice(o,0,i):s[o]=i,s},Array(e.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(t){Object.keys(this.children).forEach(e=>{const s=this.children[e],i=s.indexOf(t);i>-1&&(s.splice(i,1),this.events.dispatch("components:node-removed",{node:t,parentNode:this}))}),delete t.parent}};const te=(r,t,e)=>{for(let s=0,i=r.length;s<i&&e(r[s])!==!0;s++){const n=t[r[s].id]||"default",o=r[s].getChildren(n);te(o,t,e)}},xt=(r,t,e)=>{if(e(r)!==!0){const s=t[r.id]||"default",i=r.children[s];te(i,t,e)}},pt=(r,t)=>{const e=[];return xt(r,t,s=>{e.push(s)}),e},$e=(r,t,e)=>{let s;return xt(r,t,i=>{if(e(i))return s=i,!0}),s};let ve=class{constructor(t,e,s){this.root=t,this.switches=e,this.all=[],this.visible=[],this.detached=[],s.subscribe("components:node-appended",(i,n)=>{this.all.push(n.node),this.visible=pt(t,e)}),s.subscribe("components:node-removed",(i,n)=>{let o=this.all.indexOf(n.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(n.node),o>-1&&this.visible.splice(o,1),this.visible=pt(t,e)}),s.subscribe("components:node-switched",(i,n)=>{this.visible=pt(t,e)})}query(t={}){const e=[];return xt(this.root,this.switches,s=>{Object.keys(t).every(i=>t[i]===s[i])&&e.push(s)}),e}get(t){return $e(this.root,this.switches,e=>e.id===t)||this.detached.find(e=>e.id===t)}};class be{constructor(){this.handlers=new Map}add(t,e){this.handlers.set(t,e)}get(t){return this.handlers.get(t)}}const we=r=>{let t=r,e=0;for(;t.parent;)e=e+1,t=t.parent;return e},_e=r=>r.map(([t,e])=>[we(t),t,e]).sort(([t],[e])=>t-e).map(([,t,e])=>[t,e]),dt=r=>r instanceof Date?!1:r&&typeof r=="object"&&!Array.isArray(r),b=(r,...t)=>{if(!t.length)return r;const e=t.shift();if(dt(r)&&dt(e))for(const s in e)dt(e[s])?(r[s]||Object.assign(r,{[s]:{}}),b(r[s],e[s])):Object.assign(r,{[s]:e[s]});return b(r,...t)},Ae=(r,t)=>!r||r==="all"?!0:r.some(e=>t.indexOf(e)>-1),xe=(r,t)=>{let e=[],s=[],i;const n=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const a=new Map,c=_e(e.map((h,p)=>[h,s[p]])),l=(h,p)=>{var d;const u=a.get(h)||{},g=p.context&&!u.context,j=p.properties&&!u.properties,ct=p.layout&&!u.layout;a.set(h,{context:u.context||g,properties:u.properties||j,layout:u.layout||ct}),j&&(h.attributes.properties={}),ct&&(h.attributes.layout={}),g&&(h.attributes.context=b({},(d=h.parent)==null?void 0:d.attributes.context));const Mt=[],Dt=[],jt=[];if(h.changesets.forEach(v=>{const[$,ht]=v;Ae(ht.breakpoints,r.breakpoints)&&(j&&(typeof $.properties=="function"?Mt.push($.properties):b(h.attributes.properties,$.properties)),ct&&(typeof $.layout=="function"?Dt.push($.layout):b(h.attributes.layout,$.layout)),g&&(typeof $.context=="function"?jt.push($.context):b(h.attributes.context,$.context)))}),Mt.forEach(v=>{b(h.attributes.properties,v(h.attributes.properties))}),Dt.forEach(v=>{b(h.attributes.layout,v(h.attributes.layout))}),jt.forEach(v=>{b(h.attributes.context,v(h.attributes.context))}),g||p.recursive){const v=r.getBranch(h),$=p.recursive?p:{context:!!g};h.getChildren(v).forEach(ht=>{l(ht,$)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([h,p])=>{l(h,p)}),e=[],s=[],t(a)},o=()=>{clearTimeout(i),i=setTimeout(n,0)};return(a,c)=>{const l=e.indexOf(a);if(l>-1){const h=s[l];return c.context&&(h.context=!0),c.properties&&(h.properties=!0),c.layout&&(h.layout=!0),c.recursive&&(h.recursive=!0),o()}return e.push(a),s.push(c),o()}};class ee{constructor(t,e={}){this.providers=e,this.breakpoints=[],this.actionsState={handlers:[],watchers:[]},this.switches={},this.changesets=[],this.subscriptions=[],this.customComponentHandler=new be,this.events=t.events.createChild(this);const s=new Rt(this.events,"root");s.name=`root-${t.name}`,this.nodes=new ve(s,this.switches,this.events);const i=this.processNode=xe(this,n=>{const o=Array.from(n.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
2
- ${o.map(a=>`${a.name||"<no name>"} (${a.id})
3
- `)}`),o.forEach(a=>{const c=n.get(a);a.parent&&a.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:a}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:a}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:a}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:a})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(e).map(n=>e[n].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{const{node:a}=o;this.changesets.forEach(c=>{const{changeset:l,target:h,removes:p}=c,[d,u]=l;h.match(o.node)&&(d.properties&&p.push(a.writeProperties(d.properties,u)),d.context&&p.push(a.writeContext(d.context,u)),d.layout&&p.push(a.writeLayout(d.layout,u)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(n,o)=>{i(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(n,{node:o,branch:a})=>{i(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(n,{parentNode:o})=>{i(o,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(t){return t.getAsync("components")}addBreakpoint(t){this.breakpoints.indexOf(t)===-1&&(this.breakpoints.push(t),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(t){const e=this.breakpoints.indexOf(t);e>-1&&(this.breakpoints.splice(e,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(t,e){this.switches[t.id]=e,this.events.dispatch("components:node-switched",{node:t,branch:e})}getBranch(t){return this.switches[t.id]}createNode(t,e={}){const s=new Rt(this.events,t);return e.detached&&this.nodes.detached.push(s),s}components(){return new rt(this)}actions(t,e){return new At(this,t,e)}write(t){const{provider:e,target:s,attributes:i,options:n={},removable:o}=t,a=t.key||st(),c={changeset:[i,n],target:s,removes:[]};if(e){const l=this.providers[e];l.write(a,s,i,n),c.removes.push(()=>{l.remove(a)})}return this.changesets.push(c),this.nodes.all.forEach(l=>{if(s.match(l)){let h=()=>{};i.properties&&(h=l.writeProperties(i.properties,n,o)),i.context&&(h=l.writeContext(i.context,n,o)),i.layout&&(h=l.writeContext(i.layout,n,o)),c.removes.push(h)}}),()=>{if(o){c.removes.forEach(h=>h());const l=this.changesets.indexOf(c);l>-1&&this.changesets.splice(l,1)}}}addComponentHandler(t,e){this.customComponentHandler.add(t,e)}getComponentHandler(t){return this.customComponentHandler.get(t)}dispose(){this.subscriptions.forEach(t=>t())}}const Ee=(r,t)=>({id:r.id,type:r.type,name:r.name,branch:t||"default"}),Se=(r,t,e,s=st(),i={})=>r.getAsync("components").then(n=>{let o;{const l=new rt(n);l.ofType(t),o=l}const a={},c=l=>{const h=a[l.id];return h?Promise.resolve(h.controller):ee.getInstance(r).then(p=>new Yt(p,l,s))};n.events.subscribe("components:node-enter",(l,{node:h})=>{o.match(h)&&c(h).then(p=>{Promise.resolve(e(p)).then(d=>{a[h.id]={dispose:d,controller:p}})})}),n.events.subscribe("components:node-exit",(l,{node:h})=>{const p=a[h.id];p&&(p.dispose&&p.dispose(),i.reuseController||(p.controller.dispose(),delete a[h.id]))})});var w=(r=>(r.Cookie="cookie",r.Local="local",r.Session="session",r))(w||{}),Et=(r=>(r.Tenant="tenant",r.Implementation="implementation",r.Widget="widget",r))(Et||{}),f=(r=>(r.Necessary="necessary",r.Functional="functional",r.Analytical="analytical",r.Marketing="marketing",r))(f||{});const Ce=(r,t,e,s={})=>Lt(r,e).then(i=>(process.env.NODE_ENV!=="production"&&i&&y.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
4
- Key: ${t}
5
- Category: ${JSON.stringify(e)}
6
- Options: ${JSON.stringify(s)}`),n=>(Ct(r),Lt(r,e).then(o=>{if(o){process.env.NODE_ENV!=="production"&&y.warn(`storageWriter: Attempted to write to storage using unallowed category.
7
- Key: ${t}
8
- Category: ${JSON.stringify(e)}
9
- Value: ${JSON.stringify(n)}
10
- Options: ${JSON.stringify(s)}`);return}const{scope:a=Et.Widget,medium:c=w.Session,duration:l}=s,h=ke();return h[a][t]=ie(n,e,l),c===w.Cookie?De(r,h):Ie(r,c,h)})))),Oe=(r,t,e=w.Session)=>(Ct(r),typeof t>"u"?(process.env.NODE_ENV!=="production"&&y.warn("readStorage: Undefined key passed when reading storage. ",t,e),Promise.resolve(void 0)):e===w.Cookie?Me(r).then(s=>wt(s,t)):je(r,e).then(s=>wt(s,t))),U=r=>!!Object.entries(r).filter(([t,e])=>typeof e<"u").length,ut=r=>Object.entries(r).filter(([t,e])=>typeof e<"u").forEach(([t,{value:e}])=>{typeof e>"u"&&delete r[t]}),se=(r,t)=>{const e={tenant:{...r.tenant,...t.tenant},implementation:{...r.implementation,...t.implementation},widget:{...r.widget,...t.widget}};return ut(e.tenant),ut(e.implementation),ut(e.widget),e},Pe=r=>Object.entries(r).reduce((t,e)=>{const[s,i]=e;return Object.entries(i).forEach(n=>{const[o,{expiration:a}]=n;a&&t.push(a)}),t},[]).slice().sort((t,e)=>new Date(e).valueOf()-new Date(t).valueOf()).shift()||Ot(),it=r=>{const{name:t,implementation:{name:e,tenant:s}}=r.get("$widget");return[`humany_${s}`,`humany_${Ht(s+e)}`,`humany_${Ht(s+e+t)}`]},mt=r=>{const t=new RegExp(`(?:^|;)\\s?${r}=(.*?)(?:;|$)`,"i"),e=document.cookie.match(t);return e&&e[1]&&JSON.parse(e[1])||void 0},gt=(r,t,e)=>{const s=`${r}=${JSON.stringify(t).trim()}`,i=`expires=${new Date(e).toUTCString()}`,n="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${i}; ${n}; ${o}`},St=r=>{const[t,e,s]=it(r),i=mt(t)||{},n=mt(e)||{},o=mt(s)||{};return{tenant:i,implementation:n,widget:o}},re=(r,t)=>{const e=St(r),s=se(e,t),[i,n,o]=it(r),{tenant:a,implementation:c,widget:l}=s,h=Pe(t),p=Ot({days:-1});gt(i,a,U(a)?h:p),gt(n,c,U(c)?h:p),gt(o,l,U(l)?h:p)},Q=(r,t)=>{const[e,s,i]=it(r),n=t.getItem(e)||"{}",o=t.getItem(s)||"{}",a=t.getItem(i)||"{}";return{tenant:JSON.parse(n),implementation:JSON.parse(o),widget:JSON.parse(a)}},bt=(r,t,e)=>{const s=Q(r,t),i=se(s,e),[n,o,a]=it(r),{tenant:c,implementation:l,widget:h}=i;U(c)?t.setItem(n,JSON.stringify(c)):t.removeItem(n),U(l)?t.setItem(o,JSON.stringify(l)):t.removeItem(o),U(h)?t.setItem(a,JSON.stringify(h)):t.removeItem(a);const{events:p}=r.get("$widget");p.dispatch("storage:changed",{})},ke=()=>({tenant:{},implementation:{},widget:{}}),Ne=r=>r?!!r&&new Date>new Date(r):!1,wt=(r,t)=>{const e=r.widget[t]||r.implementation[t]||r.tenant[t];return e==null?void 0:e.value},ie=(r,t,e)=>e?{value:r,category:t,expiration:typeof e=="object"?Ot(e):e}:{value:r,category:t},Te=(r,t)=>{const e=Xt(r);return Object.entries(e).forEach(([s,i])=>{Object.entries(i).forEach(([n,o])=>{const{expiration:a,category:c}=o;(Ne(a)||Ue(t,c))&&(i[n]=ie(void 0,c,a))})}),e},Lt=(r,t)=>Oe(r,"storagePolicy",w.Cookie).then((e=[f.Necessary])=>!!t&&e.indexOf(t)===-1),Ue=(r=[f.Necessary],t)=>!!t&&r.indexOf(t)===-1,Ct=r=>{const t=St(r),e=Q(r,window.localStorage),s=Q(r,sessionStorage),i=wt(t,"storagePolicy"),[n,o,a]=[t,e,s].map(c=>Te(c,i));re(r,n),bt(r,window.localStorage,o),bt(r,window.sessionStorage,a)},Ot=(r={days:30})=>{const{days:t=0,hours:e=0,minutes:s=0,seconds:i=0}=r,n=new Date;return n.setTime(n.getTime()+e*60*60*1e3),n.setTime(n.getTime()+t*24*60*60*1e3),n.setTime(n.getTime()+s*60*1e3),n.setTime(n.getTime()+i*1e3),n.toISOString()},Me=r=>et(document)(()=>St(r)),De=(r,t)=>et(document)(()=>re(r,t)),je=(r,t)=>{const e=t===w.Local?window.localStorage:window.sessionStorage;return et(e)(()=>Q(r,e))},Ie=(r,t,e)=>{const s=t===w.Local?window.localStorage:window.sessionStorage;return et(s)(()=>bt(r,s,e))};_t(r=>{r.createCommand("storage",t=>(e={})=>{const{consent:s}=e;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
11
- Passed consent: ${JSON.stringify(s)}`);return}if(Array.isArray(s)&&!s.every(n=>typeof n=="number"||typeof n=="string")){process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
12
- Passed consent: ${JSON.stringify(s)}`);return}const i=[f.Necessary,f.Functional,f.Analytical,f.Marketing].filter((n,o,a)=>typeof s=="number"?s>o:typeof s=="string"?a.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(c=>c===o+1||c===n)>-1:!0);return i.indexOf(f.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
13
- Passed consent: ${JSON.stringify(s)}`),i.unshift(f.Necessary)),Ce(t.container,"storagePolicy",f.Necessary,{medium:w.Cookie,scope:Et.Tenant,duration:{days:365}}).then(n=>n(i)).then(()=>{Ct(t.container),t.events.dispatch("storage:policy-changed",i)})}})});/**
14
- * @license
15
- * Copyright 2019 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */const Z=globalThis,Pt=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kt=Symbol(),Bt=new WeakMap;let ne=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==kt)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(Pt&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Bt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Bt.set(e,t))}return t}toString(){return this.cssText}};const He=r=>new ne(typeof r=="string"?r:r+"",void 0,kt),oe=(r,...t)=>{const e=r.length===1?r[0]:t.reduce(((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1]),r[0]);return new ne(e,r,kt)},Re=(r,t)=>{if(Pt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),i=Z.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},zt=Pt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return He(e)})(r):r;/**
18
- * @license
19
- * Copyright 2017 Google LLC
20
- * SPDX-License-Identifier: BSD-3-Clause
21
- */const{is:Le,defineProperty:Be,getOwnPropertyDescriptor:ze,getOwnPropertyNames:We,getOwnPropertySymbols:Ve,getPrototypeOf:Je}=Object,x=globalThis,Wt=x.trustedTypes,qe=Wt?Wt.emptyScript:"",ft=x.reactiveElementPolyfillSupport,L=(r,t)=>r,X={toAttribute(r,t){switch(t){case Boolean:r=r?qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Nt=(r,t)=>!Le(r,t),Vt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:Nt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=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=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Be(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ze(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const t=Je(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,s=[...We(e),...Ve(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(zt(i))}else t!==void 0&&e.push(zt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Re(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:X;this._$Em=i;const l=c.fromAttribute(e,a.type);this[i]=l??((o=this._$Ej)==null?void 0:o.get(i))??l,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,o=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??Nt)(o,e)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;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 i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i){const{wrapped:a}=o,c=this[n];a!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,o,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[L("elementProperties")]=new Map,T[L("finalized")]=new Map,ft==null||ft({ReactiveElement:T}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.1.1");/**
22
- * @license
23
- * Copyright 2017 Google LLC
24
- * SPDX-License-Identifier: BSD-3-Clause
25
- */const B=globalThis,Y=B.trustedTypes,Jt=Y?Y.createPolicy("lit-html",{createHTML:r=>r}):void 0,ae="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,ce="?"+A,Fe=`<${ce}>`,P=document,z=()=>P.createComment(""),W=r=>r===null||typeof r!="object"&&typeof r!="function",Tt=Array.isArray,Ke=r=>Tt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",yt=`[
26
- \f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qt=/-->/g,Ft=/>/g,E=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
27
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Zt=/"/g,he=/^(?:script|style|textarea|title)$/i,Ze=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),R=Ze(1),k=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gt=new WeakMap,C=P.createTreeWalker(P,129);function le(r,t){if(!Tt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}const Ge=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=I;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,d=0;for(;d<c.length&&(o.lastIndex=d,h=o.exec(c),h!==null);)d=o.lastIndex,o===I?h[1]==="!--"?o=qt:h[1]!==void 0?o=Ft:h[2]!==void 0?(he.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=E):h[3]!==void 0&&(o=E):o===E?h[0]===">"?(o=i??I,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?E:h[3]==='"'?Zt:Kt):o===Zt||o===Kt?o=E:o===qt||o===Ft?o=I:(o=E,i=void 0);const u=o===E&&r[a+1].startsWith("/>")?" ":"";n+=o===I?c+Fe:p>=0?(s.push(l),c.slice(0,p)+ae+c.slice(p)+A+u):c+A+(p===-2?a:u)}return[le(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class V{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Ge(t,e);if(this.el=V.createElement(l,s),C.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=C.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ae)){const d=h[o++],u=i.getAttribute(p).split(A),g=/([.?@])?(.*)/.exec(d);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Xe:g[1]==="?"?Ye:g[1]==="@"?ts:nt}),i.removeAttribute(p)}else p.startsWith(A)&&(c.push({type:6,index:n}),i.removeAttribute(p));if(he.test(i.tagName)){const p=i.textContent.split(A),d=p.length-1;if(d>0){i.textContent=Y?Y.emptyScript:"";for(let u=0;u<d;u++)i.append(p[u],z()),C.nextNode(),c.push({type:2,index:++n});i.append(p[d],z())}}}else if(i.nodeType===8)if(i.data===ce)c.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(A,p+1))!==-1;)c.push({type:7,index:n}),p+=A.length-1}n++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function D(r,t,e=r,s){var o,a;if(t===k)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=W(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=D(r,i._$AS(r,t.values),i,s)),t}class Qe{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:s}=this._$AD,i=((t==null?void 0:t.creationScope)??P).importNode(e,!0);C.currentNode=i;let n=C.nextNode(),o=0,a=0,c=s[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new J(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new es(n,this,t)),this._$AV.push(l),c=s[++a]}o!==(c==null?void 0:c.index)&&(n=C.nextNode(),o++)}return C.currentNode=P,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class J{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.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=D(this,t,e),W(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==k&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ke(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(le(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Qe(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new V(t)),e}k(t){Tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new J(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=D(this,t,e,0),o=!W(t)||t!==this._$AH&&t!==k,o&&(this._$AH=t);else{const a=t;let c,l;for(t=n[0],c=0;c<n.length-1;c++)l=D(this,a[s+c],e,c),l===k&&(l=this._$AH[c]),o||(o=!W(l)||l!==this._$AH[c]),l===m?t=m:t!==m&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}o&&!i&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Xe extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}}class Ye extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}}class ts extends nt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=D(this,t,e,0)??m)===k)return;const s=this._$AH,i=t===m&&s!==m||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==m&&(s===m||i);i&&this.element.removeEventListener(this.name,this,s),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 es{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const $t=B.litHtmlPolyfillSupport;$t==null||$t(V,J),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.1");const ss=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new J(t.insertBefore(z(),n),n,void 0,e??{})}return i._$AI(r),i};/**
28
- * @license
29
- * Copyright 2017 Google LLC
30
- * SPDX-License-Identifier: BSD-3-Clause
31
- */const O=globalThis;let M=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ss(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 k}};var Qt;M._$litElement$=!0,M.finalized=!0,(Qt=O.litElementHydrateSupport)==null||Qt.call(O,{LitElement:M});const vt=O.litElementPolyfillSupport;vt==null||vt({LitElement:M});(O.litElementVersions??(O.litElementVersions=[])).push("4.2.1");/**
32
- * @license
33
- * Copyright 2017 Google LLC
34
- * SPDX-License-Identifier: BSD-3-Clause
35
- */const rs={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:Nt},is=(r=rs,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="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),a}}}if(s==="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: "+s)};function ot(r){return(t,e)=>typeof e=="object"?is(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
36
- * @license
37
- * Copyright 2017 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */function at(r){return ot({...r,state:!0,attribute:!1})}/**
40
- * @license
41
- * Copyright 2017 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */const ns={ATTRIBUTE:1},os=r=>(...t)=>({_$litDirective$:r,values:t});class as{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
44
- * @license
45
- * Copyright 2018 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */const cs=os(class extends as{constructor(r){var t;if(super(r),r.type!==ns.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 s,i;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]&&!((s=this.nt)!=null&&s.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)||(i=this.nt)!=null&&i.has(n)||(o?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return k}}),K=(r,t,e)=>{r&&e.style.setProperty(t,r)},hs=(r,t)=>{var e,s,i,n;K((e=r.colors)==null?void 0:e.primaryBackground,"--primary-background",t),K((s=r.colors)==null?void 0:s.textOnPrimaryBackground,"--text-on-primary-background",t),K((i=r.colors)==null?void 0:i.secondaryBackground,"--secondary-background",t),K((n=r.colors)==null?void 0:n.textOnSecondaryBackground,"--text-on-secondary-background",t)};var ls=Object.defineProperty,q=(r,t,e,s)=>{for(var i=void 0,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=o(t,e,i)||i);return i&&ls(t,e,i),i};const Ut=class Ut extends M{constructor(){super(...arguments),this.active=!1,this.loaded=!1}async connectedCallback(){super.connectedCallback(),this.icon=await this._renderSymbol(this.symbol),this.loaded=!0,this._applyBranding()}_toggleActive(){this.active=!this.active}_applyBranding(){var e;const t=((e=this.container)==null?void 0:e.get("$settings"))??{};t!=null&&t.branding&&hs(t.branding,this)}async _renderSymbol(t){const e=async s=>await Promise.resolve().then(()=>require("./index-BG1RS3tz.js")).then(n=>n[s]);if(t){const{type:s,content:i}=t;switch(s){case"Telia":{const n=await e(i);return n?R`<telia-icon
48
- class="trigger-icon"
49
- svg=${n.svg}
50
- size="lg"
51
- ></telia-icon>`:m}case"FontAwesome":return R`<i class="trigger-fa-icon fa fa-${i}"></i>`;case"Uri":return R`<i
52
- class="trigger-custom-icon"
53
- style="background: url(${i}) no-repeat center center;background-size: contain;"
54
- ></i>`;default:return m}}}render(){return R`<button
55
- class=${cs({trigger:!0,active:this.active,rendered:this.loaded})}
56
- @click=${this._toggleActive}
57
- >
58
- ${this.icon}
59
- <span class="trigger-close">
60
- <svg
61
- width="18"
62
- height="9"
63
- viewBox="0 0 18 9"
64
- fill="none"
65
- xmlns="http://www.w3.org/2000/svg"
66
- >
67
- <path
68
- d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
69
- fill="white"
70
- />
71
- </svg>
72
- </span>
73
- <span class="trigger-loader">
74
- <svg viewBox="25 25 50 50">
75
- <circle
76
- cx="50"
77
- cy="50"
78
- r="20"
79
- fill="none"
80
- stroke="#000"
81
- stroke-width="2"
82
- stroke-miterlimit="10"
83
- />
84
- </svg>
85
- </span>
86
- </button>`}};Ut.styles=[oe`
87
- :host {
88
- --voca-rem-multiplier: 0.625;
89
- display: block;
90
- box-sizing: border-box;
91
- }
92
-
93
- .trigger {
94
- position: fixed;
95
- transform: scale(0);
96
- box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
97
- bottom: 20px;
98
- right: 20px;
99
- z-index: 5;
100
- display: flex;
101
- align-items: center;
102
- justify-content: center;
103
- border: none;
104
- line-height: 55px;
105
- height: 55px;
106
- width: 55px;
107
- border-radius: 55px;
108
- cursor: pointer;
109
- background-color: var(--trigger-bg, var(--primary-background));
110
- font-family: Lato;
111
- text-decoration: none;
112
- border: 3px dashed transparent;
113
- box-sizing: border-box;
114
- transition: transform 200ms ease-out;
115
- }
116
- .trigger:hover {
117
- transform: scale(1.1) !important;
118
- }
119
- .trigger.rendered {
120
- transform: scale(1);
121
- }
122
- .trigger.active .trigger-icon {
123
- opacity: 0;
124
- transform: rotate(-180deg) scale(0);
125
- }
126
- .trigger.active .trigger-close {
127
- opacity: 1;
128
- transform: rotate(0deg) scale(1);
129
- }
130
-
131
- .trigger-icon {
132
- display: inline-block;
133
- line-height: inherit;
134
- text-align: center;
135
- opacity: 1;
136
- transform: rotate(0deg) scale(1);
137
- transition: opacity 200ms ease-out, transform 200ms ease-out;
138
- color: var(--trigger-text-color, var(--text-on-primary-background));
139
- }
140
- .trigger-close {
141
- opacity: 0;
142
- transition: transform 200ms ease-out;
143
- transform: rotate(180deg) scale(0);
144
- position: absolute;
145
- top: 0;
146
- bottom: 0;
147
- left: 0;
148
- right: 0;
149
- display: flex;
150
- justify-content: center;
151
- align-items: center;
152
- fill: var(--trigger-text-color, var(--text-on-primary-background));
153
- }
154
- `];let N=Ut;q([ot({attribute:!1})],N.prototype,"symbol");q([ot({attribute:!1})],N.prototype,"container");q([at()],N.prototype,"active");q([at()],N.prototype,"loaded");q([at()],N.prototype,"icon");const ps=async(r,t)=>{const e=r.properties().provider;let s={},i="";Array.isArray(e)?(i=e[0],s=e[1]):i=e||"";const n=await t.getAsync(i);if(!n)throw new Error("No provider defined in ListComponent");return n.applyComponentNodeSettings(r.node.id,s),{provider:n,settings:s}},ds=async(r,t)=>{const{provider:e,settings:s={}}=await ps(r,t);return{addResource:(i,n)=>e.addResource(i,n),getData:(i,n)=>e.getData(i,n,s)}},us=(r,t,e,s,i)=>r.getAsync("componentResolver").then(n=>(n.registerComponent(t,e),Se(r,t,s||(()=>{}),t,i))),ms=r=>us(r,"list",Promise.resolve().then(()=>require("./list-PwyO66Gx.js")),t=>{(async()=>{t.writeProperties({loading:!0,items:[],totalItems:0});const i=await(await ds(t,r)).getData("items",{});t.writeProperties({loading:!1,items:(i==null?void 0:i.items)||[],totalItems:(i==null?void 0:i.totalItems)||0})})()});exports.E=m;exports.ListComponent=ms;exports.N=rt;exports.dt=Ee;exports.et=ee;exports.et$1=st;exports.i=oe;exports.i$1=M;exports.n=ot;exports.r=at;exports.x=R;