UNPKG

@fluid-topics/ft-loader

Version:

A fluid-topics loader component

3 lines 282 kB
"use strict";(()=>{var Ns=Object.defineProperty;var L=(t,e)=>{for(var o in e)Ns(t,o,{get:e[o],enumerable:!0})};if(!ShadowRoot.prototype.createElement){let t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,n=window.customElements,a=new WeakMap,i=new WeakMap,s=new WeakMap,l=new WeakMap;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(x,b){if(x=x.toLowerCase(),this._getDefinition(x)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${x}" has already been used with this registry`);if(this._definitionsByClass.get(b)!==void 0)throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");let S=b.prototype.attributeChangedCallback,A=new Set(b.observedAttributes||[]);m(b,A,S);let I={elementClass:b,connectedCallback:b.prototype.connectedCallback,disconnectedCallback:b.prototype.disconnectedCallback,adoptedCallback:b.prototype.adoptedCallback,attributeChangedCallback:S,formAssociated:b.formAssociated,formAssociatedCallback:b.prototype.formAssociatedCallback,formDisabledCallback:b.prototype.formDisabledCallback,formResetCallback:b.prototype.formResetCallback,formStateRestoreCallback:b.prototype.formStateRestoreCallback,observedAttributes:A};this._definitionsByTag.set(x,I),this._definitionsByClass.set(b,I);let F=o.call(n,x);F||(F=p(x),e.call(n,x,F)),this===window.customElements&&(s.set(b,I),I.standInClass=F);let P=this._awaitingUpgrade.get(x);if(P){this._awaitingUpgrade.delete(x);for(let R of P)i.delete(R),y(R,I,!0)}let w=this._whenDefinedPromises.get(x);return w!==void 0&&(w.resolve(b),this._whenDefinedPromises.delete(x)),b}upgrade(){E.push(this),n.upgrade.apply(n,arguments),E.pop()}get(x){return this._definitionsByTag.get(x)?.elementClass}_getDefinition(x){return this._definitionsByTag.get(x)}whenDefined(x){let b=this._getDefinition(x);if(b!==void 0)return Promise.resolve(b.elementClass);let S=this._whenDefinedPromises.get(x);return S===void 0&&(S={},S.promise=new Promise(A=>S.resolve=A),this._whenDefinedPromises.set(x,S)),S.promise}_upgradeWhenDefined(x,b,S){let A=this._awaitingUpgrade.get(b);A||this._awaitingUpgrade.set(b,A=new Set),S?A.add(x):A.delete(x)}};let d;window.HTMLElement=function(){let b=d;if(b)return d=void 0,b;let S=s.get(this.constructor);if(!S)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return b=Reflect.construct(t,[],S.standInClass),Object.setPrototypeOf(b,this.constructor.prototype),a.set(b,S),b},window.HTMLElement.prototype=t.prototype;let f=x=>x===document||x instanceof ShadowRoot,h=x=>{let b=x.getRootNode();if(!f(b)){let S=E[E.length-1];if(S instanceof CustomElementRegistry)return S;b=S.getRootNode(),f(b)||(b=l.get(b)?.getRootNode()||document)}return b.customElements},p=x=>class{static get formAssociated(){return!0}constructor(){let S=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(S,HTMLElement.prototype);let A=h(S)||window.customElements,I=A._getDefinition(x);return I?y(S,I):i.set(S,A),S}connectedCallback(){let S=a.get(this);S?S.connectedCallback&&S.connectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,x,!0)}disconnectedCallback(){let S=a.get(this);S?S.disconnectedCallback&&S.disconnectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,x,!1)}adoptedCallback(){a.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){let S=a.get(this);S&&S.formAssociated&&S?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){let S=a.get(this);S?.formAssociated&&S?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){let S=a.get(this);S?.formAssociated&&S?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){let S=a.get(this);S?.formAssociated&&S?.formStateRestoreCallback?.apply(this,arguments)}},m=(x,b,S)=>{if(b.size===0||S===void 0)return;let A=x.prototype.setAttribute;A&&(x.prototype.setAttribute=function(P,w){let R=P.toLowerCase();if(b.has(R)){let _=this.getAttribute(R);A.call(this,R,w),S.call(this,R,_,w)}else A.call(this,R,w)});let I=x.prototype.removeAttribute;I&&(x.prototype.removeAttribute=function(P){let w=P.toLowerCase();if(b.has(w)){let R=this.getAttribute(w);I.call(this,w),S.call(this,w,R,null)}else I.call(this,w)});let F=x.prototype.toggleAttribute;F&&(x.prototype.toggleAttribute=function(P,w){let R=P.toLowerCase();if(b.has(R)){let _=this.getAttribute(R);F.call(this,R,w);let U=this.getAttribute(R);S.call(this,R,_,U)}else F.call(this,R,w)})},g=x=>{let b=Object.getPrototypeOf(x);if(b!==window.HTMLElement)return b===t?Object.setPrototypeOf(x,window.HTMLElement):g(b)},y=(x,b,S=!1)=>{Object.setPrototypeOf(x,b.elementClass.prototype),a.set(x,b),d=x;try{new b.elementClass}catch{g(b.elementClass),new b.elementClass}b.attributeChangedCallback&&b.observedAttributes.forEach(A=>{x.hasAttribute(A)&&b.attributeChangedCallback.call(x,A,null,x.getAttribute(A))}),S&&b.connectedCallback&&x.isConnected&&b.connectedCallback.call(x)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(x){let b=v.apply(this,arguments);return x.customElements&&(b.customElements=x.customElements),b};let E=[document],O=(x,b,S=void 0)=>{let A=(S?Object.getPrototypeOf(S):x.prototype)[b];x.prototype[b]=function(){E.push(this);let I=A.apply(S||this,arguments);return I!==void 0&&l.set(I,this),E.pop(),I}};O(ShadowRoot,"createElement",document),O(ShadowRoot,"importNode",document),O(Element,"insertAdjacentHTML");let C=(x,b)=>{let S=Object.getOwnPropertyDescriptor(x.prototype,b);Object.defineProperty(x.prototype,b,{...S,set(A){E.push(this),S.set.call(this,A),E.pop()}})};if(C(Element,"innerHTML"),C(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){let x=new WeakMap,b=HTMLElement.prototype.attachInternals,S=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...P){let w=b.call(this,...P);return x.set(w,this),w},S.forEach(P=>{let w=window.ElementInternals.prototype,R=w[P];w[P]=function(..._){let U=x.get(this);if(a.get(U).formAssociated===!0)return R?.call(this,..._);throw new DOMException(`Failed to execute ${R} on 'ElementInternals': The target element is not a form-associated custom element.`)}});class A extends Array{constructor(w){super(...w),this._elements=w}get value(){return this._elements.find(w=>w.checked===!0)?.value||""}}class I{constructor(w){let R=new Map;w.forEach((_,U)=>{let gr=_.getAttribute("name"),wn=R.get(gr)||[];this[+U]=_,wn.push(_),R.set(gr,wn)}),this.length=w.length,R.forEach((_,U)=>{_&&(_.length===1?this[U]=_[0]:this[U]=new A(_))})}namedItem(w){return this[w]}}let F=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let P=F.get.call(this,[]),w=[];for(let R of P){let _=a.get(R);(!_||_.formAssociated===!0)&&w.push(R)}return new I(w)}})}}try{window.customElements.define("custom-element",null)}catch{let e=window.customElements.define;window.customElements.define=(o,n,a)=>{var i;if(n!==null)try{e.bind(window.customElements)(o,n,a)}catch(s){!((i=s.message)===null||i===void 0)&&i.includes("this constructor has already been used")?window.customElements.define(o,class extends n{},a):console.info(o,n,a,s)}}}var Ir={};L(Ir,{CSSResult:()=>ze,LitElement:()=>ne,ReactiveElement:()=>q,_$LE:()=>$n,_$LH:()=>Ar,adoptStyles:()=>ht,css:()=>M,defaultConverter:()=>We,getCompatibleStyle:()=>Wt,html:()=>pe,isServer:()=>tu,mathml:()=>Gs,noChange:()=>B,notEqual:()=>yt,nothing:()=>k,render:()=>wr,supportsAdoptingStyleSheets:()=>ft,svg:()=>Ws,unsafeCSS:()=>pt});var zt=globalThis,ft=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,br=Symbol(),Rn=new WeakMap,ze=class{constructor(e,o,n){if(this._$cssResult$=!0,n!==br)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o}get styleSheet(){let e=this.o,o=this.t;if(ft&&e===void 0){let n=o!==void 0&&o.length===1;n&&(e=Rn.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Rn.set(o,e))}return e}toString(){return this.cssText}},pt=t=>new ze(typeof t=="string"?t:t+"",void 0,br),M=(t,...e)=>{let o=t.length===1?t[0]:e.reduce(((n,a,i)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+t[i+1]),t[0]);return new ze(o,t,br)},ht=(t,e)=>{if(ft)t.adoptedStyleSheets=e.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of e){let n=document.createElement("style"),a=zt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}},Wt=ft?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(let n of e.cssRules)o+=n.cssText;return pt(o)})(t):t;var{is:ks,defineProperty:Ds,getOwnPropertyDescriptor:Fs,getOwnPropertyNames:Ms,getOwnPropertySymbols:Us,getPrototypeOf:Bs}=Object,Gt=globalThis,In=Gt.trustedTypes,$s=In?In.emptyScript:"",Hs=Gt.reactiveElementPolyfillSupport,mt=(t,e)=>t,We={toAttribute(t,e){switch(e){case Boolean:t=t?$s:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}}return o}},yt=(t,e)=>!ks(t,e),Tn={attribute:!0,type:String,converter:We,reflect:!1,useDefault:!1,hasChanged:yt};Symbol.metadata??=Symbol("metadata"),Gt.litPropertyMetadata??=new WeakMap;var q=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,o=Tn){if(o.state&&(o.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((o=Object.create(o)).wrapped=!0),this.elementProperties.set(e,o),!o.noAccessor){let n=Symbol(),a=this.getPropertyDescriptor(e,n,o);a!==void 0&&Ds(this.prototype,e,a)}}static getPropertyDescriptor(e,o,n){let{get:a,set:i}=Fs(this.prototype,e)??{get(){return this[o]},set(s){this[o]=s}};return{get:a,set(s){let l=a?.call(this);i?.call(this,s),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Tn}static _$Ei(){if(this.hasOwnProperty(mt("elementProperties")))return;let e=Bs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mt("properties"))){let o=this.properties,n=[...Ms(o),...Us(o)];for(let a of n)this.createProperty(a,o[a])}let e=this[Symbol.metadata];if(e!==null){let o=litPropertyMetadata.get(e);if(o!==void 0)for(let[n,a]of o)this.elementProperties.set(n,a)}this._$Eh=new Map;for(let[o,n]of this.elementProperties){let a=this._$Eu(o,n);a!==void 0&&this._$Eh.set(a,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let o=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let a of n)o.unshift(Wt(a))}else e!==void 0&&o.push(Wt(e));return o}static _$Eu(e,o){let n=o.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,o=this.constructor.elementProperties;for(let n of o.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ht(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,o,n){this._$AK(e,n)}_$ET(e,o){let n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(a!==void 0&&n.reflect===!0){let i=(n.converter?.toAttribute!==void 0?n.converter:We).toAttribute(o,n.type);this._$Em=e,i==null?this.removeAttribute(a):this.setAttribute(a,i),this._$Em=null}}_$AK(e,o){let n=this.constructor,a=n._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let i=n.getPropertyOptions(a),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:We;this._$Em=a,this[a]=s.fromAttribute(o,i.type)??this._$Ej?.get(a)??null,this._$Em=null}}requestUpdate(e,o,n){if(e!==void 0){let a=this.constructor,i=this[e];if(n??=a.getPropertyOptions(e),!((n.hasChanged??yt)(i,o)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,o,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,o,{useDefault:n,reflect:a,wrapped:i},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??o??this[e]),i!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(o=void 0),this._$AL.set(e,o)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(o){Promise.reject(o)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[a,i]of n){let{wrapped:s}=i,l=this[a];s!==!0||this._$AL.has(a)||l===void 0||this.C(a,void 0,i,l)}}let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(o)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(o)}willUpdate(e){}_$AE(e){this._$EO?.forEach((o=>o.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((o=>this._$ET(o,this[o]))),this._$EM()}updated(e){}firstUpdated(e){}};q.elementStyles=[],q.shadowRootOptions={mode:"open"},q[mt("elementProperties")]=new Map,q[mt("finalized")]=new Map,Hs?.({ReactiveElement:q}),(Gt.reactiveElementVersions??=[]).push("2.1.0");var vr=globalThis,Vt=vr.trustedTypes,Ln=Vt?Vt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Sr="$lit$",de=`lit$${Math.random().toFixed(9).slice(2)}$`,Er="?"+de,zs=`<${Er}>`,Ce=document,bt=()=>Ce.createComment(""),xt=t=>t===null||typeof t!="object"&&typeof t!="function",Or=Array.isArray,Fn=t=>Or(t)||typeof t?.[Symbol.iterator]=="function",xr=`[ \f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_n=/-->/g,Pn=/>/g,Ee=RegExp(`>|${xr}(?:([^\\s"'>=/]+)(${xr}*=${xr}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Nn=/'/g,kn=/"/g,Mn=/^(?:script|style|textarea|title)$/i,Cr=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),pe=Cr(1),Ws=Cr(2),Gs=Cr(3),B=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),Dn=new WeakMap,Oe=Ce.createTreeWalker(Ce,129);function Un(t,e){if(!Or(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ln!==void 0?Ln.createHTML(e):e}var Bn=(t,e)=>{let o=t.length-1,n=[],a,i=e===2?"<svg>":e===3?"<math>":"",s=gt;for(let l=0;l<o;l++){let d=t[l],f,h,p=-1,m=0;for(;m<d.length&&(s.lastIndex=m,h=s.exec(d),h!==null);)m=s.lastIndex,s===gt?h[1]==="!--"?s=_n:h[1]!==void 0?s=Pn:h[2]!==void 0?(Mn.test(h[2])&&(a=RegExp("</"+h[2],"g")),s=Ee):h[3]!==void 0&&(s=Ee):s===Ee?h[0]===">"?(s=a??gt,p=-1):h[1]===void 0?p=-2:(p=s.lastIndex-h[2].length,f=h[1],s=h[3]===void 0?Ee:h[3]==='"'?kn:Nn):s===kn||s===Nn?s=Ee:s===_n||s===Pn?s=gt:(s=Ee,a=void 0);let g=s===Ee&&t[l+1].startsWith("/>")?" ":"";i+=s===gt?d+zs:p>=0?(n.push(f),d.slice(0,p)+Sr+d.slice(p)+de+g):d+de+(p===-2?l:g)}return[Un(t,i+(t[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},vt=class t{constructor({strings:e,_$litType$:o},n){let a;this.parts=[];let i=0,s=0,l=e.length-1,d=this.parts,[f,h]=Bn(e,o);if(this.el=t.createElement(f,n),Oe.currentNode=this.el.content,o===2||o===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=Oe.nextNode())!==null&&d.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Sr)){let m=h[s++],g=a.getAttribute(p).split(de),y=/([.?@])?(.*)/.exec(m);d.push({type:1,index:i,name:y[2],strings:g,ctor:y[1]==="."?Kt:y[1]==="?"?Zt:y[1]==="@"?qt:we}),a.removeAttribute(p)}else p.startsWith(de)&&(d.push({type:6,index:i}),a.removeAttribute(p));if(Mn.test(a.tagName)){let p=a.textContent.split(de),m=p.length-1;if(m>0){a.textContent=Vt?Vt.emptyScript:"";for(let g=0;g<m;g++)a.append(p[g],bt()),Oe.nextNode(),d.push({type:2,index:++i});a.append(p[m],bt())}}}else if(a.nodeType===8)if(a.data===Er)d.push({type:2,index:i});else{let p=-1;for(;(p=a.data.indexOf(de,p+1))!==-1;)d.push({type:7,index:i}),p+=de.length-1}i++}}static createElement(e,o){let n=Ce.createElement("template");return n.innerHTML=e,n}};function Ae(t,e,o=t,n){if(e===B)return e;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=xt(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(t),a._$AT(t,o,n)),n!==void 0?(o._$Co??=[])[n]=a:o._$Cl=a),a!==void 0&&(e=Ae(t,a._$AS(t,e.values),a,n)),e}var jt=class{constructor(e,o){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:o},parts:n}=this._$AD,a=(e?.creationScope??Ce).importNode(o,!0);Oe.currentNode=a;let i=Oe.nextNode(),s=0,l=0,d=n[0];for(;d!==void 0;){if(s===d.index){let f;d.type===2?f=new Ge(i,i.nextSibling,this,e):d.type===1?f=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(f=new Yt(i,this,e)),this._$AV.push(f),d=n[++l]}s!==d?.index&&(i=Oe.nextNode(),s++)}return Oe.currentNode=Ce,a}p(e){let o=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,o),o+=n.strings.length-2):n._$AI(e[o])),o++}},Ge=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,o,n,a){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=o,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,o=this._$AM;return o!==void 0&&e?.nodeType===11&&(e=o.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,o=this){e=Ae(this,e,o),xt(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==B&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Fn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&xt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ce.createTextNode(e)),this._$AH=e}$(e){let{values:o,_$litType$:n}=e,a=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=vt.createElement(Un(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new jt(a,this),s=i.u(this.options);i.p(o),this.T(s),this._$AH=i}}_$AC(e){let o=Dn.get(e.strings);return o===void 0&&Dn.set(e.strings,o=new vt(e)),o}k(e){Or(this._$AH)||(this._$AH=[],this._$AR());let o=this._$AH,n,a=0;for(let i of e)a===o.length?o.push(n=new t(this.O(bt()),this.O(bt()),this,this.options)):n=o[a],n._$AI(i),a++;a<o.length&&(this._$AR(n&&n._$AB.nextSibling,a),o.length=a)}_$AR(e=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},we=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,n,a,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=o,this._$AM=a,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=k}_$AI(e,o=this,n,a){let i=this.strings,s=!1;if(i===void 0)e=Ae(this,e,o,0),s=!xt(e)||e!==this._$AH&&e!==B,s&&(this._$AH=e);else{let l=e,d,f;for(e=i[0],d=0;d<i.length-1;d++)f=Ae(this,l[n+d],o,d),f===B&&(f=this._$AH[d]),s||=!xt(f)||f!==this._$AH[d],f===k?e=k:e!==k&&(e+=(f??"")+i[d+1]),this._$AH[d]=f}s&&!a&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Kt=class extends we{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Zt=class extends we{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},qt=class extends we{constructor(e,o,n,a,i){super(e,o,n,a,i),this.type=5}_$AI(e,o=this){if((e=Ae(this,e,o,0)??k)===B)return;let n=this._$AH,a=e===k&&n!==k||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==k&&(n===k||a);a&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Yt=class{constructor(e,o,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=o,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ae(this,e)}},Ar={M:Sr,P:de,A:Er,C:1,L:Bn,R:jt,D:Fn,V:Ae,I:Ge,H:we,N:Zt,U:qt,B:Kt,F:Yt},Vs=vr.litHtmlPolyfillSupport;Vs?.(vt,Ge),(vr.litHtmlVersions??=[]).push("3.3.0");var wr=(t,e,o)=>{let n=o?.renderBefore??e,a=n._$litPart$;if(a===void 0){let i=o?.renderBefore??null;n._$litPart$=a=new Ge(e.insertBefore(bt(),i),i,void 0,o??{})}return a._$AI(t),a};var Rr=globalThis,ne=class extends q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=wr(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};ne._$litElement$=!0,ne.finalized=!0,Rr.litElementHydrateSupport?.({LitElement:ne});var js=Rr.litElementPolyfillSupport;js?.({LitElement:ne});var $n={_$AK:(t,e,o)=>{t._$AK(e,o)},_$AL:t=>t._$AL};(Rr.litElementVersions??=[]).push("4.2.0");var tu=!1;var Tr={};L(Tr,{customElement:()=>Ks,eventOptions:()=>qs,property:()=>N,query:()=>Ys,queryAll:()=>Xs,queryAssignedElements:()=>ec,queryAssignedNodes:()=>tc,queryAsync:()=>Qs,standardProperty:()=>Hn,state:()=>Y});var Ks=t=>(e,o)=>{o!==void 0?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};var Zs={attribute:!0,type:String,converter:We,reflect:!1,hasChanged:yt},Hn=(t=Zs,e,o)=>{let{kind:n,metadata:a}=o,i=globalThis.litPropertyMetadata.get(a);if(i===void 0&&globalThis.litPropertyMetadata.set(a,i=new Map),n==="setter"&&((t=Object.create(t)).wrapped=!0),i.set(o.name,t),n==="accessor"){let{name:s}=o;return{set(l){let d=e.get.call(this);e.set.call(this,l),this.requestUpdate(s,d,t)},init(l){return l!==void 0&&this.C(s,void 0,t,l),l}}}if(n==="setter"){let{name:s}=o;return function(l){let d=this[s];e.call(this,l),this.requestUpdate(s,d,t)}}throw Error("Unsupported decorator location: "+n)};function N(t){return(e,o)=>typeof o=="object"?Hn(t,e,o):((n,a,i)=>{let s=a.hasOwnProperty(i);return a.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(a,i):void 0})(t,e,o)}function Y(t){return N({...t,state:!0,attribute:!1})}function qs(t){return(e,o)=>{let n=typeof e=="function"?e:e[o];Object.assign(n,t)}}var te=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,o),o);function Ys(t,e){return(o,n,a)=>{let i=s=>s.renderRoot?.querySelector(t)??null;if(e){let{get:s,set:l}=typeof n=="object"?o:a??(()=>{let d=Symbol();return{get(){return this[d]},set(f){this[d]=f}}})();return te(o,n,{get(){let d=s.call(this);return d===void 0&&(d=i(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return te(o,n,{get(){return i(this)}})}}var Js;function Xs(t){return(e,o)=>te(e,o,{get(){return(this.renderRoot??(Js??=document.createDocumentFragment())).querySelectorAll(t)}})}function Qs(t){return(e,o)=>te(e,o,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}function ec(t){return(e,o)=>{let{slot:n,selector:a}=t??{},i="slot"+(n?`[name=${n}]`:":not([name])");return te(e,o,{get(){let s=this.renderRoot?.querySelector(i),l=s?.assignedElements(t)??[];return a===void 0?l:l.filter((d=>d.matches(a)))}})}}function tc(t){return(e,o)=>{let{slot:n}=t??{},a="slot"+(n?`[name=${n}]`:":not([name])");return te(e,o,{get(){return this.renderRoot?.querySelector(a)?.assignedNodes(t)??[]}})}}var Lr={};L(Lr,{repeat:()=>Xt});var ae={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},j=t=>(...e)=>({_$litDirective$:t,values:e}),J=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,o,n){this._$Ct=e,this._$AM=o,this._$Ci=n}_$AS(e,o){return this.update(e,o)}update(e,o){return this.render(...o)}};var{I:rc}=Ar;var Wn=t=>t.strings===void 0,zn=()=>document.createComment(""),Ve=(t,e,o)=>{let n=t._$AA.parentNode,a=e===void 0?t._$AB:e._$AA;if(o===void 0){let i=n.insertBefore(zn(),a),s=n.insertBefore(zn(),a);o=new rc(i,s,t,t.options)}else{let i=o._$AB.nextSibling,s=o._$AM,l=s!==t;if(l){let d;o._$AQ?.(t),o._$AM=t,o._$AP!==void 0&&(d=t._$AU)!==s._$AU&&o._$AP(d)}if(i!==a||l){let d=o._$AA;for(;d!==i;){let f=d.nextSibling;n.insertBefore(d,a),d=f}}}return o},he=(t,e,o=t)=>(t._$AI(e,o),t),oc={},Gn=(t,e=oc)=>t._$AH=e,Vn=t=>t._$AH,Jt=t=>{t._$AP?.(!1,!0);let e=t._$AA,o=t._$AB.nextSibling;for(;e!==o;){let n=e.nextSibling;e.remove(),e=n}};var jn=(t,e,o)=>{let n=new Map;for(let a=e;a<=o;a++)n.set(t[a],a);return n},Xt=j(class extends J{constructor(t){if(super(t),t.type!==ae.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,o){let n;o===void 0?o=e:e!==void 0&&(n=e);let a=[],i=[],s=0;for(let l of t)a[s]=n?n(l,s):s,i[s]=o(l,s),s++;return{values:i,keys:a}}render(t,e,o){return this.dt(t,e,o).values}update(t,[e,o,n]){let a=Vn(t),{values:i,keys:s}=this.dt(e,o,n);if(!Array.isArray(a))return this.ut=s,i;let l=this.ut??=[],d=[],f,h,p=0,m=a.length-1,g=0,y=i.length-1;for(;p<=m&&g<=y;)if(a[p]===null)p++;else if(a[m]===null)m--;else if(l[p]===s[g])d[g]=he(a[p],i[g]),p++,g++;else if(l[m]===s[y])d[y]=he(a[m],i[y]),m--,y--;else if(l[p]===s[y])d[y]=he(a[p],i[y]),Ve(t,d[y+1],a[p]),p++,y--;else if(l[m]===s[g])d[g]=he(a[m],i[g]),Ve(t,a[p],a[m]),m--,g++;else if(f===void 0&&(f=jn(s,g,y),h=jn(l,p,m)),f.has(l[p]))if(f.has(l[m])){let v=h.get(s[g]),E=v!==void 0?a[v]:null;if(E===null){let O=Ve(t,a[p]);he(O,i[g]),d[g]=O}else d[g]=he(E,i[g]),Ve(t,a[p],E),a[v]=null;g++}else Jt(a[m]),m--;else Jt(a[p]),p++;for(;g<=y;){let v=Ve(t,d[y+1]);he(v,i[g]),d[g++]=v}for(;p<=m;){let v=a[p++];v!==null&&Jt(v)}return this.ut=s,Gn(t,d),B}});var _r={};L(_r,{classMap:()=>nc});var nc=j(class extends J{constructor(t){if(super(t),t.type!==ae.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((n=>n!==""))));for(let n in e)e[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(e)}let o=t.element.classList;for(let n of this.st)n in e||(o.remove(n),this.st.delete(n));for(let n in e){let a=!!e[n];a===this.st.has(n)||this.nt?.has(n)||(a?(o.add(n),this.st.add(n)):(o.remove(n),this.st.delete(n)))}return B}});var Pr={};L(Pr,{styleMap:()=>ic});var Kn="important",ac=" !"+Kn,ic=j(class extends J{constructor(t){if(super(t),t.type!==ae.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{let n=t[o];return n==null?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){let{style:o}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?o.removeProperty(n):o[n]=null);for(let n in e){let a=e[n];if(a!=null){this.ft.add(n);let i=typeof a=="string"&&a.endsWith(ac);n.includes("-")||i?o.setProperty(n,i?a.slice(0,-11):a,i?Kn:""):o[n]=a}}return B}});var Nr={};L(Nr,{UnsafeHTMLDirective:()=>je,unsafeHTML:()=>sc});var je=class extends J{constructor(e){if(super(e),this.it=k,e.type!==ae.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===k||e==null)return this._t=void 0,this.it=e;if(e===B)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let o=[e];return o.raw=o,this._t={_$litType$:this.constructor.resultType,strings:o,values:[]}}};je.directiveName="unsafeHTML",je.resultType=1;var sc=j(je);var Gr={};L(Gr,{CacheRegistry:()=>Wr,ClearCacheEvent:()=>At});var Dr={};L(Dr,{CancelablePromise:()=>Qt,CanceledPromiseError:()=>St,cancelable:()=>kr});var St=class extends Error{constructor(e,o,n){super(e),this.canceledPromiseResult=o,this.canceledPromiseError=n}},Qt=class extends Promise{constructor(e){super((o,n)=>e(a=>{this.isCanceled?n(new St("Promise has been canceled",a)):o(a)},a=>{this.isCanceled?n(new St("Promise has been canceled",void 0,a)):n(a)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},kr=t=>new Qt((e,o)=>t.then(e).catch(o));var zr={};L(zr,{FtNotificationEvent:()=>Ct,PostResizeEvent:()=>Hr,PreResizeEvent:()=>$r,WithEventBus:()=>Te,withEventBus:()=>oa});var Br={};L(Br,{applyMixinOnce:()=>K,customElements:()=>Ur,dateReviver:()=>fc,deepCopy:()=>Ke,deepEqual:()=>Ot,delay:()=>Yn,eventPathContainsMatchingElement:()=>hc,everyDeep:()=>uc,flatDeep:()=>Xn,forEachDeep:()=>Qn,getComposedPathTo:()=>Mr,hasChanged:()=>Re,ignoreComposingEvents:()=>gc,last:()=>mc,minmax:()=>Ie,parseDate:()=>ta,randomId:()=>yc,someDeep:()=>ea,unslotText:()=>ra,waitFor:()=>Jn,waitUntil:()=>dc});var Fr={};L(Fr,{customElement:()=>Et,dateProperty:()=>lc,isNumber:()=>qn,jsonProperty:()=>er,numberProperty:()=>Zn,optionalNumberProperty:()=>cc});var Et=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function er(t,e){return N({type:Object,converter:{fromAttribute:o=>{if(o==null)return Ke(t);try{return JSON.parse(o)}catch{return Ke(t)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Re,...e??{}})}function cc(t){return Zn(t)}function Zn(t){return N({type:Object,converter:{fromAttribute:e=>{var o,n;if(e==null)return;let a=(o=t?.min)!==null&&o!==void 0?o:-1/0,i=(n=t?.max)!==null&&n!==void 0?n:1/0;return qn(e)?Ie(a,+e,i):void 0},toAttribute:e=>e==null?void 0:""+e},useDefault:!0,...t??{}})}function qn(t){return!isNaN(parseFloat(t))}function lc(t){return N({type:Object,converter:{fromAttribute:e=>{if(e==null)return;let o=new Date(Date.parse(e));if(!isNaN(o.valueOf()))return o},toAttribute:e=>e?.toISOString()},useDefault:!0,...t??{}})}var Yn=t=>new Promise(e=>setTimeout(e,t));async function dc(t,e=10,o=2e4){await Jn(async()=>await t()||void 0,e,o)}async function Jn(t,e=10,o=2e4){let n=await t(),a=performance.now(),i=a;for(;n==null&&(!o||i-a<o);)await Yn(e),n=await t(),i=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function Xn(t,e){return t.flatMap(o=>[o,...Xn(e(o),e)])}function Qn(t,e,o){let n=(a,i)=>{var s;for(let l=0;l<a.length;l++){let d=a[l];if(!(((s=o(d,l,a,i))!==null&&s!==void 0?s:!0)&&n(e(d),[...i,d])))return!1}return!0};n(t,[])}function ea(t,e,o){let n=!1;return Qn(t,e,(a,i,s,l)=>(n=!!o(a,i,s,l),!n)),n}function uc(t,e,o){return!ea(t,e,(n,a,i,s)=>!o(n,a,i,s))}function fc(...t){return(e,o)=>t.includes(e)?ta(o):o}function ta(t){return t.match(/^\d{4}-\d{2}-\d{2}$/)&&(t=t.replace(/-/g,"/")),t=t.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,(e,o,n,a)=>o+n+":"+a),new Date(t)}function pc(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Ot(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Ot(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(t);if(o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Ot(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ot(t,e){try{return pc(t,e)}catch{return!1}}function Re(t,e){return!Ot(t,e)}function hc(t,e,o=window.document.body){if(e.length>0){let n=t.composedPath();for(let a of n){if(a===o)return!1;if(a.matches&&e.some(i=>a.matches(i)))return!0}}return!1}function Ie(t,e,o){return Math.min(Math.max(t,e),o)}function mc(t){return t[t.length-1]}function ra(t){return t instanceof HTMLSlotElement?t.assignedNodes().map(e=>ra(e)).join(""):t?.textContent||""}function Mr(t){let e=[],o=n=>{n.stopPropagation(),e=n.composedPath()};return t.addEventListener("get-composed-path",o),t.dispatchEvent(new Event("get-composed-path",{composed:!0})),t.removeEventListener("get-composed-path",o),e}function Ke(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function yc(t,e){return(e??"")+(""+Math.floor(Math.random()*10**t)).padStart(t,"0")}function K(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=e(n);return a[t]=!0,a}}function gc(){return function(t,e,o){let n=o.value;o.value=function(a,...i){if(a.isComposing||a.keyCode===229){a.stopPropagation();return}return n.apply(this,[a].concat(i))}}}function Ur(t){for(let[e,o]of Object.entries(t))Et(e)(o)}var Ct=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},$r=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},Hr=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}},oa=K(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Te=class extends oa(Object){};var At=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},Wr=class extends Te{constructor(){super(...arguments),this.content={}}register(e,o,n=!1){var a;let i=this.content[e],s=(a=i?.status)!==null&&a!==void 0?a:"REGISTERED";this.content[e]={...i,loader:o,final:n,status:s}}registerFinal(e,o){this.register(e,o,!0)}clearAll(e=!0){return this.clearMatching(()=>!0,e)}clearMatching(e,o=!0){let n=Object.keys(this.content).filter(e).filter(a=>this.clear(a,!1)!=null);return o&&n.length>0&&this.dispatchEvent(new At(n)),n}clear(e,o=!0){if(this.content[e]&&!this.content[e].final)return this.forceClear(e),o&&this.dispatchEvent(new At([e])),e}forceClear(e){var o;let n=this.content[e];n&&(this.clearClearTimeout(e),(o=n.promise)===null||o===void 0||o.cancel(),this.content[e]={loader:n.loader,final:n.final,status:"REGISTERED"})}clearClearTimeout(e){var o,n,a;((o=this.content[e])===null||o===void 0?void 0:o.clearTimeout)!=null&&(window.clearTimeout((n=this.content[e])===null||n===void 0?void 0:n.clearTimeout),(a=this.content[e])===null||a===void 0||delete a.clearTimeout)}set(e,o,n=!1){this.forceClear(e);let a=async()=>o,i="RESOLVED";this.content[e]={loader:a,final:n,status:i,value:o}}setFinal(e,o){return this.set(e,o,!0)}async get(e,o,n){if(!this.isRegistered(e)){if(!o)throw new Error("Unknown cache key "+e);this.register(e,o)}let a=this.content[e];switch(a.status){case"ERROR":throw a.error;case"LOADING":return a.promise;case"RESOLVED":return a.value;case"REGISTERED":return o=o??a.loader,a.status="LOADING",a.promise=kr(o()),a.promise.then(i=>(a.status="RESOLVED",a.value=i,n!=null&&(this.clearClearTimeout(e),a.clearTimeout=window.setTimeout(()=>this.clear(e),n)),i)).catch(i=>{var s;throw!((s=a.promise)===null||s===void 0)&&s.isCanceled||(a.status="ERROR",a.error=i),i})}}isRegistered(e){return this.content[e]!=null}getNow(e){var o;return(o=this.content[e])===null||o===void 0?void 0:o.value}has(e){var o,n;return((o=this.content[e])===null||o===void 0?void 0:o.status)!==void 0&&((n=this.content[e])===null||n===void 0?void 0:n.status)!=="REGISTERED"}resolvedKeys(){return Object.keys(this.content).filter(e=>{var o;return((o=this.content[e])===null||o===void 0?void 0:o.status)==="RESOLVED"})}resolvedValues(){return this.resolvedKeys().map(e=>this.content[e].value)}keys(){return Object.keys(this.content)}};var qr={};L(qr,{ClusteringHelper:()=>Zr,formatHierarchicalValues:()=>Kr});var jr={};L(jr,{accessBreadcrumb:()=>vc,accessResult:()=>Vr,accessResultId:()=>bc,accessResultUrl:()=>xc});function Vr(t){var e,o,n,a;return(a=(n=(o=(e=t?.map)!==null&&e!==void 0?e:t?.topic)!==null&&o!==void 0?o:t?.document)!==null&&n!==void 0?n:t?.htmlPackage)!==null&&a!==void 0?a:t?.htmlPackagePage}function bc(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.mapId)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.tocId)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.documentId)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.packageId)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.contentId}function xc(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.readerUrl)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.readerUrl)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.viewerUrl)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.viewerUrl)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.viewerUrl}function vc(t){return t?.topic?[t.topic.mapTitle,...t.topic.breadcrumb]:t?.map?[t.map.title]:t?.document?[t.document.title]:t?.htmlPackage?[t.htmlPackage.title]:t?.htmlPackagePage?[t.htmlPackagePage.packageTitle,t.htmlPackagePage.title]:[]}function Kr(t,e){return e&&e>1&&t.length>=e?`... > ${t[t.length-1]}`:t.join(" > ")}var Zr=class t{constructor(e,o,n,a){this.allResults=e,this.selectedResult=o,this.clusteringMetadata=n,this.metadataDescriptors=a}static findResultWithMetadataValue(e,o,n){return e?.find(a=>{var i;return((i=this.extractResultMetadata({result:a}).find(s=>s.key==o))===null||i===void 0?void 0:i.value)==n})}static extractResultMetadata(e){var o,n;let a=(n=(o=Vr(e.result))===null||o===void 0?void 0:o.metadata)!==null&&n!==void 0?n:[];return e.key==null?t.flattenMetadata(a,e.hierarchicalValueTruncatingLevel,e.dateFormatter):t.flattenMetadata(a.find(i=>i.key===e.key),e.hierarchicalValueTruncatingLevel,e.dateFormatter)}static flattenMetadata(e,o,n){if(Array.isArray(e))return e.map(i=>t.flattenMetadata(i,o,n)).filter(i=>i!=null);let a=e?.hierarchicalValues!=null&&e.hierarchicalValues.length>0;if(!(e==null||e.values.length==0&&!a))if(a){let i=[],s=[];return e.hierarchicalValues.forEach(l=>{i.push(Kr(l)),s.push(Kr(l,o))}),{key:e.key,label:e.label,value:i.join(", "),displayValue:s.join(", "),displayTooltipValue:i.join(", ")}}else{let i=e.values.join(", "),s=e.values.map(l=>n?n(l):l).join(", ");return{key:e.key,label:e.label,value:i,displayValue:s,displayTooltipValue:s}}}computeClustersItemsForMetadata(e,o,n="No value",a,i){var s,l;let d=t.extractResultMetadata({result:this.selectedResult,key:e,dateFormatter:i}),f=(s=d?.label)!==null&&s!==void 0?s:(l=this.getMetadataDescriptor(e))===null||l===void 0?void 0:l.label;return this.allResults.map(p=>t.extractResultMetadata({result:p,key:e,hierarchicalValueTruncatingLevel:a,dateFormatter:i})).map(p=>p??{key:e,label:f,value:void 0,displayValue:n}).filter(p=>p.value!=d?.value).filter((p,m,g)=>g.findIndex(y=>y.value===p.value)===m).map(p=>({result:this.findBestResultForMetadataValue(e,p.value),metadata:p})).sort((p,m)=>this.compareMetadata(p.metadata.value,m.metadata.value,e,o))}compareMetadata(e,o,n,a){if(e==null)return-1;if(o==null)return 1;let i=this.getMetadataDescriptor(n),s=i?.sortRule||"NONE",l=i?.reverseSort||!1;if(s=="ALPHABET"||s=="VERSION"){let d=e.localeCompare(o,a,{numeric:!0});return l?d*-1:d}return 0}getMetadataDescriptor(e){return this.metadataDescriptors.find(o=>e==o.key)}findBestResultForMetadataValue(e,o){let n=this.allResults.filter(d=>{var f;return((f=t.extractResultMetadata({result:d,key:e}))===null||f===void 0?void 0:f.value)==o}),i=[...t.extractResultMetadata({result:this.selectedResult}).filter(d=>this.clusteringMetadata.has(d.key)).filter(d=>d.key!==e)],s,l=-1;for(let d of n){let f=this.countMatchingMetadata(d,i);if(f>l&&(l=f,s=d,f===i.length))break}return s}countMatchingMetadata(e,o){return t.extractResultMetadata({result:e}).filter(n=>o.some(a=>a.key===n.key&&a.value===n.value)).length}};var Yr={};L(Yr,{Debouncer:()=>wt});var wt=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var to={};L(to,{designSystemVariables:()=>eo});var Qr={};L(Qr,{DesignSystemFamily:()=>Rt,DesignSystemSize:()=>It,FtCssVariableFactory:()=>r,badge:()=>kc,banner:()=>Nc,button:()=>Oc,card:()=>Cc,chart:()=>qc,checkbox:()=>wc,chip:()=>Lc,chipChoice:()=>Tc,chipGroup:()=>_c,collapsible:()=>Kc,combobox:()=>Vc,dateRangePicker:()=>rl,drawer:()=>$c,floatingMenu:()=>Gc,foundation:()=>c,link:()=>Pc,modal:()=>Bc,notice:()=>Jc,notification:()=>Qc,pageDesigner:()=>Yc,pageFooter:()=>Mc,pageHeader:()=>Fc,pageLayout:()=>Uc,popover:()=>jc,radio:()=>Rc,reorderableList:()=>tl,resolveFamilyClass:()=>Jr,resolveSizeClass:()=>Xr,semantic:()=>u,setVariable:()=>Ze,switch_:()=>Zc,table:()=>Ic,tabs:()=>Hc,textArea:()=>Wc,textInput:()=>zc,titleBreadcrumb:()=>Dc,toggle:()=>Xc,tooltip:()=>el,treeList:()=>Ac,typographies:()=>Sc,typographyBody1Medium:()=>la,typographyBody1Regular:()=>ca,typographyBody1Semibold:()=>da,typographyBody2Medium:()=>fa,typographyBody2MediumUnderline:()=>pa,typographyBody2Regular:()=>ua,typographyBody2Semibold:()=>ha,typographyCaption1Medium:()=>ma,typographyCaption1Semibold:()=>ya,typographyCaption2Bold:()=>xa,typographyCaption2Medium:()=>ga,typographyCaption2Semibold:()=>ba,typographyDisplay:()=>na,typographyTitle1:()=>aa,typographyTitle2:()=>ia,typographyTitle3:()=>sa,typographyVariants:()=>Ec});var me=t=>typeof t=="string"?pt(t):t,r=class{static create(e,o,n,a){let i=l=>me(l??a),s=M`var(${me(e)}, ${i(a)})`;return s.name=e,s.description=o,s.category=n,s.defaultValue=a,s.defaultCssValue=i,s.set=l=>Ze(s,l??i(a)),s.get=l=>M`var(${me(e)}, ${i(l)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>a,s}static extend(e,o,n,a){let i=l=>n.get(l??a),s=M`var(${me(e)}, ${i(a)})`;return s.name=e,s.description=o,s.category=n.category,s.fallbackVariable=n,s.defaultValue=a,s.defaultCssValue=i,s.set=l=>Ze(s,l??i(a)),s.get=l=>M`var(${me(e)}, ${i(l)})`,s.breadcrumb=()=>[n.name,...n.breadcrumb()],s.lastResortDefaultValue=()=>a??n.lastResortDefaultValue(),s}static external(e,o){let n=i=>e.defaultCssValue(i),a=M`var(${me(e.name)}, ${n(e.defaultValue)})`;return a.name=e.name,a.category=e.category,a.fallbackVariable=e.fallbackVariable,a.defaultValue=e.defaultValue,a.context=o,a.defaultCssValue=n,a.set=i=>e.set(i),a.get=i=>M`var(${me(e.name)}, ${n(i)})`,a.breadcrumb=()=>e.breadcrumb(),a.lastResortDefaultValue=()=>e.lastResortDefaultValue(),a}};function Ze(t,e){return me(`${t.name}: ${e}`)}var c={colorWhite:r.create("--ftds-color-white","","COLOR","#ffffff"),colorGray0:r.create("--ftds-color-gray-0","","COLOR","#71718e"),colorGray10:r.create("--ftds-color-gray-10","","COLOR","#fbfbfc"),colorGray20:r.create("--ftds-color-gray-20","","COLOR","#f2f2f5"),colorGray30:r.create("--ftds-color-gray-30","","COLOR","#e9e9ed"),colorGray40:r.create("--ftds-color-gray-40","","COLOR","#e0e0e6"),colorGray50:r.create("--ftds-color-gray-50","","COLOR","#cdcdd7"),colorGray60:r.create("--ftds-color-gray-60","","COLOR","#bbbbc9"),colorGray70:r.create("--ftds-color-gray-70","","COLOR","#a8a8ba"),colorGray80:r.create("--ftds-color-gray-80","","COLOR","#9696ab"),colorGray90:r.create("--ftds-color-gray-90","","COLOR","#83839d"),colorGray100:r.create("--ftds-color-gray-100","","COLOR","#62627c"),colorGray200:r.create("--ftds-color-gray-200","","COLOR","#545469"),colorGray300:r.create("--ftds-color-gray-300","","COLOR","#454557"),colorGray400:r.create("--ftds-color-gray-400","","COLOR","#363644"),colorGray500:r.create("--ftds-color-gray-500","","COLOR","#282832"),colorGray600:r.create("--ftds-color-gray-600","","COLOR","#19191f"),colorGray700:r.create("--ftds-color-gray-700","","COLOR","#0a0a0d"),colorBrand0:r.create("--ftds-color-brand-0","","COLOR","#9d207b"),colorBrand10:r.create("--ftds-color-brand-10","","COLOR","#f7edf4"),colorBrand20:r.create("--ftds-color-brand-20","","COLOR","#ebcfe4"),colorBrand30:r.create("--ftds-color-brand-30","","COLOR","#dfb2d3"),colorBrand40:r.create("--ftds-color-brand-40","","COLOR","#d395c2"),colorBrand50:r.create("--ftds-color-brand-50","","COLOR","#c778b1"),colorBrand60:r.create("--ftds-color-brand-60","","COLOR","#ba5ba1"),colorBrand70:r.create("--ftds-color-brand-70","","COLOR","#ae3e90"),colorBrand100:r.create("--ftds-color-brand-100","","COLOR","#8d1d6e"),colorBrand200:r.create("--ftds-color-brand-200","","COLOR","#78185e"),colorBrand300:r.create("--ftds-color-brand-300","","COLOR","#62144d"),colorBrand400:r.create("--ftds-color-brand-400","","COLOR","#4d103c"),colorBrand500:r.create("--ftds-color-brand-500","","COLOR","#380b2c"),colorBrand600:r.create("--ftds-color-brand-600","","COLOR","#23071b"),colorBrand700:r.create("--ftds-color-brand-700","","COLOR","#0d030b"),colorCyan0:r.create("--ftds-color-cyan-0","","COLOR","#0e98b4"),colorCyan10:r.create("--ftds-color-cyan-10","","COLOR","#ebf6f9"),colorCyan20:r.create("--ftds-color-cyan-20","","COLOR","#cbe9ef"),colorCyan30:r.create("--ftds-color-cyan-30","","COLOR","#acdbe5"),colorCyan40:r.create("--ftds-color-cyan-40","","COLOR","#8ccedb"),colorCyan50:r.create("--ftds-color-cyan-50","","COLOR","#6dc0d1"),colorCyan60:r.create("--ftds-color-cyan-60","","COLOR","#4db3c8"),colorCyan70:r.create("--ftds-color-cyan-70","","COLOR","#2ea5be"),colorCyan100:r.create("--ftds-color-cyan-100","","COLOR","#0c849c"),colorCyan200:r.create("--ftds-color-cyan-200","","COLOR","#0a7085"),colorCyan300:r.create("--ftds-color-cyan-300","","COLOR","#085c6d"),colorCyan400:r.create("--ftds-color-cyan-400","","COLOR","#074856"),colorCyan500:r.create("--ftds-color-cyan-500","","COLOR","#05343e"),colorCyan600:r.create("--ftds-color-cyan-600","","COLOR","#032127"),colorCyan700:r.create("--ftds-color-cyan-700","","COLOR","#010d0f"),colorGreen0:r.create("--ftds-color-green-0","","COLOR","#21a274"),colorGreen10:r.create("--ftds-color-green-10","","COLOR","#edf7f3"),colorGreen20:r.create("--ftds-color-green-20","","COLOR","#cfebe1"),colorGreen30:r.create("--ftds-color-green-30","","COLOR","#b2dfcf"),colorGreen40:r.create("--ftds-color-green-40","","COLOR","#95d3bd"),colorGreen50:r.create("--ftds-color-green-50","","COLOR","#78c7ab"),colorGreen60:r.create("--ftds-color-green-60","","COLOR","#5bba98"),colorGreen70:r.create("--ftds-color-green-70","","COLOR","#3eae86"),colorGreen100:r.create("--ftds-color-green-100","","COLOR","#1d8d65"),colorGreen200:r.create("--ftds-color-green-200","","COLOR","#187856"),colorGreen300:r.create("--ftds-color-green-300","","COLOR","#146246"),colorGreen400:r.create("--ftds-color-green-400","","COLOR","#104d37"),colorGreen500:r.create("--ftds-color-green-500","","COLOR","#0b3828"),colorGreen600:r.create("--ftds-color-green-600","","COLOR","#072319"),colorGreen700:r.create("--ftds-color-green-700","","COLOR","#030d0a"),colorOrange0:r.create("--ft