@fluid-topics/ft-button
Version:
A generic Fluid Topics tag
260 lines (235 loc) • 161 kB
JavaScript
"use strict";(()=>{var cl=Object.create;var di=Object.defineProperty;var ul=Object.getOwnPropertyDescriptor;var dl=Object.getOwnPropertyNames;var fl=Object.getPrototypeOf,pl=Object.prototype.hasOwnProperty;var kt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var hl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dl(t))!pl.call(e,i)&&i!==r&&di(e,i,{get:()=>t[i],enumerable:!(n=ul(t,i))||n.enumerable});return e};var v=(e,t,r)=>(r=e!=null?cl(fl(e)):{},hl(t||!e||!e.__esModule?di(r,"default",{value:e,enumerable:!0}):r,e));var w=kt(($c,fi)=>{fi.exports=ftGlobals.wcUtils});var j=kt((Hc,pi)=>{pi.exports=ftGlobals.lit});var X=kt((Bc,hi)=>{hi.exports=ftGlobals.litDecorators});var Qr=kt((jc,mi)=>{mi.exports=ftGlobals.litClassMap});var za=kt((Zm,Ka)=>{Ka.exports=ftGlobals.litUnsafeHTML});var ll=v(w());var de=v(w());var Si=v(j()),F=v(X()),Ci=v(Qr()),Ut=v(w());var Ai=v(j()),I=v(w()),yi=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorContent),re={color:yi,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",yi),opacityContentOnSurfacePressed:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:I.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},gi=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorPrimary),vi={color:gi,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",gi)},bi=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorSecondary),xi={color:bi,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",bi)},Ei=Ai.css`
:host {
display: contents;
}
.ft-ripple {
position: absolute;
inset: 0;
pointer-events: none;
}
.ft-ripple:not(.ft-ripple--unbounded) {
overflow: hidden;
border-radius: ${re.borderRadius};
}
.ft-ripple .ft-ripple--background,
.ft-ripple .ft-ripple--effect {
position: absolute;
opacity: 0;
}
.ft-ripple .ft-ripple--effect {
aspect-ratio: 1;
width: auto;
height: auto;
min-width: 170%;
min-height: 170%;
}
.ft-ripple .ft-ripple--background{
width: 100%;
height: 100%;
}
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
aspect-ratio: 1;
width: auto;
height: auto;
max-width: unset;
max-height: unset;
min-width: 100%;
min-height: 100%;
}
.ft-ripple .ft-ripple--background {
background-color: ${re.backgroundColor};
}
.ft-ripple .ft-ripple--effect {
background-color: ${re.color};
}
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
background-color: ${xi.backgroundColor};
}
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
background-color: ${xi.color};
}
.ft-ripple.ft-ripple--primary .ft-ripple--background {
background-color: ${vi.backgroundColor};
}
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
background-color: ${vi.color};
}
.ft-ripple .ft-ripple--background {
top: 0;
left: 0;
transition: opacity 75ms linear;
}
.ft-ripple .ft-ripple--effect,
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
border-radius: 50%;
}
.ft-ripple .ft-ripple--effect {
transform: translate(-50%, -50%) scale(0.15);
transition: transform 300ms ease, opacity 75ms linear;
}
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
left: 50%;
top: 50%;
}
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
transform: translate(-50%, -50%);
}
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
opacity: ${re.opacityContentOnSurfaceHover};
}
.ft-ripple.ft-ripple--selected .ft-ripple--background {
opacity: ${re.opacityContentOnSurfaceSelected};
}
.ft-ripple.ft-ripple--focused .ft-ripple--background {
opacity: ${re.opacityContentOnSurfaceFocused};
}
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
opacity: ${re.opacityContentOnSurfacePressed};
transform: translate(-50%, -50%) scale(1);
}
`;var z=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},N=class extends Ut.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Ut.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Ut.Debouncer(10),this.moveRipple=t=>{var r,n;let{x:i,y:o}=this.getCoordinates(t),s=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return Si.html`
<style>
.ft-ripple .ft-ripple--effect {
left: ${this.originX}px;
top: ${this.originY}px;
}
</style>
<div class="${(0,Ci.classMap)(t)}">
<div class="ft-ripple--background"></div>
<div class="ft-ripple--effect"></div>
</div>
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",n,s),t.addEventListener("touchstart",i,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",n,s),t.removeEventListener("touchstart",i,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,i,o;return r.x!=null?{x:i,y:o}=r:n.touches!=null&&(i=n.touches[0].clientX,o=n.touches[0].clientY),{x:i,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};N.elementDefinitions={};N.styles=Ei;z([(0,F.property)({type:Boolean})],N.prototype,"primary",void 0);z([(0,F.property)({type:Boolean})],N.prototype,"secondary",void 0);z([(0,F.property)({type:Boolean})],N.prototype,"unbounded",void 0);z([(0,F.property)({type:Boolean})],N.prototype,"activated",void 0);z([(0,F.property)({type:Boolean})],N.prototype,"selected",void 0);z([(0,F.property)({type:Boolean})],N.prototype,"disabled",void 0);z([(0,F.state)()],N.prototype,"hovered",void 0);z([(0,F.state)()],N.prototype,"focused",void 0);z([(0,F.state)()],N.prototype,"pressed",void 0);z([(0,F.state)()],N.prototype,"rippling",void 0);z([(0,F.state)()],N.prototype,"originX",void 0);z([(0,F.state)()],N.prototype,"originY",void 0);z([(0,F.query)(".ft-ripple")],N.prototype,"ripple",void 0);z([(0,F.query)(".ft-ripple--effect")],N.prototype,"rippleEffect",void 0);var Ti=v(w());var Oi={"ft-ripple":N};(0,Ti.customElements)(Oi);var Ba=v(j()),ue=v(X()),ce=v(w());var an=globalThis,ur=an.trustedTypes,wi=ur?ur.createPolicy("lit-html",{createHTML:e=>e}):void 0,Di="$lit$",Pe=`lit$${Math.random().toFixed(9).slice(2)}$`,Mi="?"+Pe,ml=`<${Mi}>`,Ge=document,dr=()=>Ge.createComment(""),Ht=e=>e===null||typeof e!="object"&&typeof e!="function",ln=Array.isArray,yl=e=>ln(e)||typeof e?.[Symbol.iterator]=="function",en=`[
\f\r]`,$t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_i=/-->/g,Ri=/>/g,Ke=RegExp(`>|${en}(?:([^\\s"'>=/]+)(${en}*=${en}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Pi=/"/g,Ii=/^(?:script|style|textarea|title)$/i,cn=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),ki=cn(1),Ui=cn(2),$i=cn(3),Bt=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),Ni=new WeakMap,ze=Ge.createTreeWalker(Ge,129);function Hi(e,t){if(!ln(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return wi!==void 0?wi.createHTML(t):t}var gl=(e,t)=>{let r=e.length-1,n=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=$t;for(let a=0;a<r;a++){let l=e[a],c,u,d=-1,f=0;for(;f<l.length&&(s.lastIndex=f,u=s.exec(l),u!==null);)f=s.lastIndex,s===$t?u[1]==="!--"?s=_i:u[1]!==void 0?s=Ri:u[2]!==void 0?(Ii.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=Ke):u[3]!==void 0&&(s=Ke):s===Ke?u[0]===">"?(s=i??$t,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?Ke:u[3]==='"'?Pi:Li):s===Pi||s===Li?s=Ke:s===_i||s===Ri?s=$t:(s=Ke,i=void 0);let p=s===Ke&&e[a+1].startsWith("/>")?" ":"";o+=s===$t?l+ml:d>=0?(n.push(c),l.slice(0,d)+Di+l.slice(d)+Pe+p):l+Pe+(d===-2?a:p)}return[Hi(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},jt=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,u]=gl(t,r);if(this.el=e.createElement(c,n),ze.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=ze.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Di)){let f=u[s++],p=i.getAttribute(d).split(Pe),h=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:h[2],strings:p,ctor:h[1]==="."?rn:h[1]==="?"?nn:h[1]==="@"?on:ut}),i.removeAttribute(d)}else d.startsWith(Pe)&&(l.push({type:6,index:o}),i.removeAttribute(d));if(Ii.test(i.tagName)){let d=i.textContent.split(Pe),f=d.length-1;if(f>0){i.textContent=ur?ur.emptyScript:"";for(let p=0;p<f;p++)i.append(d[p],dr()),ze.nextNode(),l.push({type:2,index:++o});i.append(d[f],dr())}}}else if(i.nodeType===8)if(i.data===Mi)l.push({type:2,index:o});else{let d=-1;for(;(d=i.data.indexOf(Pe,d+1))!==-1;)l.push({type:7,index:o}),d+=Pe.length-1}o++}}static createElement(t,r){let n=Ge.createElement("template");return n.innerHTML=t,n}};function ct(e,t,r=e,n){if(t===Bt)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,o=Ht(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(t=ct(e,i._$AS(e,t.values),i,n)),t}var tn=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??Ge).importNode(r,!0);ze.currentNode=i;let o=ze.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new fr(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new sn(o,this,t)),this._$AV.push(c),l=n[++a]}s!==l?.index&&(o=ze.nextNode(),s++)}return ze.currentNode=Ge,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},fr=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=ct(this,t,r),Ht(t)?t===k||t==null||t===""?(this._$AH!==k&&this._$AR(),this._$AH=k):t!==this._$AH&&t!==Bt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):yl(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!==k&&Ht(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ge.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=jt.createElement(Hi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let o=new tn(i,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=Ni.get(t.strings);return r===void 0&&Ni.set(t.strings,r=new jt(t)),r}k(t){ln(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let o of t)i===r.length?r.push(n=new e(this.O(dr()),this.O(dr()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t&&t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},ut=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,o){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=k}_$AI(t,r=this,n,i){let o=this.strings,s=!1;if(o===void 0)t=ct(this,t,r,0),s=!Ht(t)||t!==this._$AH&&t!==Bt,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=ct(this,a[n+l],r,l),c===Bt&&(c=this._$AH[l]),s||=!Ht(c)||c!==this._$AH[l],c===k?t=k:t!==k&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!i&&this.j(t)}j(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},rn=class extends ut{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===k?void 0:t}},nn=class extends ut{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==k)}},on=class extends ut{constructor(t,r,n,i,o){super(t,r,n,i,o),this.type=5}_$AI(t,r=this){if((t=ct(this,t,r,0)??k)===Bt)return;let n=this._$AH,i=t===k&&n!==k||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==k&&(n===k||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},sn=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){ct(this,t)}};var vl=an.litHtmlPolyfillSupport;vl?.(jt,fr),(an.litHtmlVersions??=[]).push("3.3.0");var ji=Symbol.for(""),bl=e=>{if(e?.r===ji)return e?._$litStatic$},un=e=>({_$litStatic$:e,r:ji});var Bi=new Map,dn=e=>(t,...r)=>{let n=r.length,i,o,s=[],a=[],l,c=0,u=!1;for(;c<n;){for(l=t[c];c<n&&(o=r[c],(i=bl(o))!==void 0);)l+=i+t[++c],u=!0;c!==n&&a.push(o),s.push(l),c++}if(c===n&&s.push(t[n]),u){let d=s.join("$$lit$$");(t=Bi.get(d))===void 0&&(s.raw=s,Bi.set(d,t=s)),r=a}return e(t,...r)},fn=dn(ki),tu=dn(Ui),ru=dn($i);var pn=v(X()),to=v(w());var Ne;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(Ne||(Ne={}));var ne=v(j()),g=v(w()),Fi=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),Oe=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),E={fontFamily:Oe,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Fi),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",E.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",E.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",E.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",E.textTransform,"inherit")},ft={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Fi),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",E.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",E.textTransform,"inherit")},pt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",E.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",E.textTransform,"inherit")},ht={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",E.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",E.textTransform,"inherit")},mt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",E.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",E.textTransform,"inherit")},yt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",E.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",E.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",E.textTransform,"inherit")},gt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",E.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",E.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",E.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",E.textTransform,"inherit")},vt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",E.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",E.textTransform,"inherit")},bt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",E.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",E.textTransform,"uppercase")},xe={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Oe),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",E.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",E.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",E.textTransform,"uppercase")},Vi=ne.css`
.ft-typography--title {
font-family: ${dt.fontFamily};
font-size: ${dt.fontSize};
font-weight: ${dt.fontWeight};
letter-spacing: ${dt.letterSpacing};
line-height: ${dt.lineHeight};
text-transform: ${dt.textTransform};
}
`,Wi=ne.css`
.ft-typography--title-dense {
font-family: ${ft.fontFamily};
font-size: ${ft.fontSize};
font-weight: ${ft.fontWeight};
letter-spacing: ${ft.letterSpacing};
line-height: ${ft.lineHeight};
text-transform: ${ft.textTransform};
}
`,Ki=ne.css`
.ft-typography--subtitle1 {
font-family: ${pt.fontFamily};
font-size: ${pt.fontSize};
font-weight: ${pt.fontWeight};
letter-spacing: ${pt.letterSpacing};
line-height: ${pt.lineHeight};
text-transform: ${pt.textTransform};
}
`,zi=ne.css`
.ft-typography--subtitle2 {
font-family: ${ht.fontFamily};
font-size: ${ht.fontSize};
font-weight: ${ht.fontWeight};
letter-spacing: ${ht.letterSpacing};
line-height: ${ht.lineHeight};
text-transform: ${ht.textTransform};
}
`,Gi=ne.css`
.ft-typography--body1 {
font-family: ${mt.fontFamily};
font-size: ${mt.fontSize};
font-weight: ${mt.fontWeight};
letter-spacing: ${mt.letterSpacing};
line-height: ${mt.lineHeight};
text-transform: ${mt.textTransform};
}
`,qi=ne.css`
.ft-typography--body2 {
font-family: ${yt.fontFamily};
font-size: ${yt.fontSize};
font-weight: ${yt.fontWeight};
letter-spacing: ${yt.letterSpacing};
line-height: ${yt.lineHeight};
text-transform: ${yt.textTransform};
}
`,Yi=ne.css`
.ft-typography--caption {
font-family: ${gt.fontFamily};
font-size: ${gt.fontSize};
font-weight: ${gt.fontWeight};
letter-spacing: ${gt.letterSpacing};
line-height: ${gt.lineHeight};
text-transform: ${gt.textTransform};
}
`,Xi=ne.css`
.ft-typography--breadcrumb {
font-family: ${vt.fontFamily};
font-size: ${vt.fontSize};
font-weight: ${vt.fontWeight};
letter-spacing: ${vt.letterSpacing};
line-height: ${vt.lineHeight};
text-transform: ${vt.textTransform};
}
`,Ji=ne.css`
.ft-typography--overline {
font-family: ${bt.fontFamily};
font-size: ${bt.fontSize};
font-weight: ${bt.fontWeight};
letter-spacing: ${bt.letterSpacing};
line-height: ${bt.lineHeight};
text-transform: ${bt.textTransform};
}
`,Zi=ne.css`
.ft-typography--button {
font-family: ${xe.fontFamily};
font-size: ${xe.fontSize};
font-weight: ${xe.fontWeight};
letter-spacing: ${xe.letterSpacing};
line-height: ${xe.lineHeight};
text-transform: ${xe.textTransform};
}
`,Qi=ne.css`
.ft-typography {
vertical-align: inherit;
}
`;var eo=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},fe=class extends to.FtLitElement{constructor(){super(...arguments),this.variant=Ne.body1}render(){return this.element?fn`
<${un(this.element)}
part="text"
class="ft-typography ft-typography--${this.variant}">
<slot></slot>
</${un(this.element)}>
`:fn`
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
`}};fe.styles=[Vi,Wi,Ki,zi,Gi,qi,Yi,Xi,Ji,Zi,Qi];eo([(0,pn.property)()],fe.prototype,"element",void 0);eo([(0,pn.property)()],fe.prototype,"variant",void 0);var no=v(w());var ro={"ft-typography":fe};(0,no.customElements)(ro);var io=v(j()),De=v(w()),Ft={distance:De.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:De.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:De.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:De.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",De.designSystemVariables.borderRadiusS),maxWidth:De.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},oo=io.css`
.ft-tooltip--container {
display: block;
}
.ft-tooltip--inline {
display: inline-block;
max-width: 100%;
}
.ft-tooltip {
inset: 0;
margin: 0;
border: none;
background: transparent;
box-sizing: border-box;
overflow: hidden;
width: max-content;
max-width: ${Ft.maxWidth};
text-align: center;
padding: ${Ft.distance};
}
.ft-tooltip--content {
padding: 4px 8px;
border-radius: ${Ft.borderRadiusS};
background-color: ${Ft.backgroundColor};
color: ${Ft.color};
position: relative;
word-break: break-word;
}
`;var ao=["top","right","bottom","left"],so=["start","end"],mn=ao.reduce((e,t)=>e.concat(t,t+"-"+so[0],t+"-"+so[1]),[]),Vt=Math.min,Me=Math.max,Wt=Math.round;var pe=e=>({x:e,y:e}),xl={left:"right",right:"left",bottom:"top",top:"bottom"};function yn(e,t,r){return Me(e,Vt(t,r))}function pr(e,t){return typeof e=="function"?e(t):e}function xt(e){return e.split("-")[0]}function Ie(e){return e.split("-")[1]}function gn(e){return e==="x"?"y":"x"}function vn(e){return e==="y"?"height":"width"}function hr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function bn(e){return gn(hr(e))}function lo(e,t,r){r===void 0&&(r=!1);let n=Ie(e),i=bn(e),o=vn(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=hn(s)),[s,hn(s)]}function co(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function hn(e){let t=xt(e);return xl[t]+e.slice(t.length)}function Al(e){return{top:0,right:0,bottom:0,left:0,...e}}function uo(e){return typeof e!="number"?Al(e):{top:e,right:e,bottom:e,left:e}}function qe(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function fo(e,t,r){let{reference:n,floating:i}=e,o=hr(t),s=bn(t),a=vn(s),l=xt(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,f=n[a]/2-i[a]/2,p;switch(l){case"top":p={x:u,y:n.y-i.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Ie(t)){case"start":p[s]-=f*(r&&c?-1:1);break;case"end":p[s]+=f*(r&&c?-1:1);break}return p}async function po(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=pr(t,e),h=uo(p),b=a[f?d==="floating"?"reference":"floating":d],x=qe(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},$=qe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:S,strategy:l}):A);return{top:(x.top-$.top+h.top)/C.y,bottom:($.bottom-x.bottom+h.bottom)/C.y,left:(x.left-$.left+h.left)/C.x,right:($.right-x.right+h.right)/C.x}}var El=50,ho=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:po},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=fo(c,n,l),f=n,p=0,h={};for(let m=0;m<o.length;m++){let b=o[m];if(!b)continue;let{name:x,fn:A}=b,{x:S,y:C,data:$,reset:M}=await A({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,d=C??d,h[x]={...h[x],...$},M&&p<El&&(p++,typeof M=="object"&&(M.placement&&(f=M.placement),M.rects&&(c=M.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:u,y:d}=fo(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};function Sl(e,t,r){return(e?[...r.filter(i=>Ie(i)===e),...r.filter(i=>Ie(i)!==e)]:r.filter(i=>xt(i)===i)).filter(i=>e?Ie(i)===e||(t?co(i)!==i:!1):!0)}var mo=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=mn,autoAlignment:p=!0,...h}=pr(e,t),m=d!==void 0||f===mn?Sl(d||null,p,f):f,b=await l.detectOverflow(t,h),x=((r=s.autoPlacement)==null?void 0:r.index)||0,A=m[x];if(A==null)return{};let S=lo(A,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==A)return{reset:{placement:m[0]}};let C=[b[xt(A)],b[S[0]],b[S[1]]],$=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:C}],M=m[x+1];if(M)return{data:{index:x+1,overflows:$},reset:{placement:M}};let Re=$.map(q=>{let te=Ie(q.placement);return[q.placement,te&&u?q.overflows.slice(0,2).reduce((Y,We)=>Y+We,0):q.overflows[0],q.overflows]}).sort((q,te)=>q[1]-te[1]),Le=((i=Re.filter(q=>q[2].slice(0,Ie(q[0])?2:3).every(te=>te<=0))[0])==null?void 0:i[0])||Re[0][0];return Le!==a?{data:{index:x+1,overflows:$},reset:{placement:Le}}:{}}}};var yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:A,y:S}=x;return{x:A,y:S}}},...c}=pr(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),f=hr(xt(i)),p=gn(f),h=u[p],m=u[f];if(s){let x=p==="y"?"top":"left",A=p==="y"?"bottom":"right",S=h+d[x],C=h-d[A];h=yn(S,h,C)}if(a){let x=f==="y"?"top":"left",A=f==="y"?"bottom":"right",S=m+d[x],C=m-d[A];m=yn(S,m,C)}let b=l.fn({...t,[p]:h,[f]:m});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[p]:s,[f]:a}}}}}};function yr(){return typeof window<"u"}function Xe(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ae(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return yr()?e instanceof Node||e instanceof G(e).Node:!1}function ie(e){return yr()?e instanceof Element||e instanceof G(e).Element:!1}function Ee(e){return yr()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function go(e){return!yr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}function At(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function bo(e){return/^(table|td|th)$/.test(Xe(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Cl=/transform|translate|scale|rotate|perspective|filter/,Ol=/paint|layout|strict|content/,Ye=e=>!!e&&e!=="none",xn;function Et(e){let t=ie(e)?oe(e):e;return Ye(t.transform)||Ye(t.translate)||Ye(t.scale)||Ye(t.rotate)||Ye(t.perspective)||!gr()&&(Ye(t.backdropFilter)||Ye(t.filter))||Cl.test(t.willChange||"")||Ol.test(t.contain||"")}function xo(e){let t=Te(e);for(;Ee(t)&&!Je(t);){if(Et(t))return t;if(Kt(t))return null;t=Te(t)}return null}function gr(){return xn==null&&(xn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xn}function Je(e){return/^(html|body|#document)$/.test(Xe(e))}function oe(e){return G(e).getComputedStyle(e)}function zt(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(Xe(e)==="html")return e;let t=e.assignedSlot||e.parentNode||go(e)&&e.host||Ae(e);return go(t)?t.host:t}function Ao(e){let t=Te(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&At(t)?t:Ao(t)}function mr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ao(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=G(i);if(o){let a=vr(s);return t.concat(s,s.visualViewport||[],At(i)?i:[],a&&r?mr(a):[])}else return t.concat(i,mr(i,[],r))}function vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oo(e){let t=oe(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ee(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=Wt(r)!==o||Wt(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function To(e){return ie(e)?e:e.contextElement}function St(e){let t=To(e);if(!Ee(t))return pe(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Oo(t),s=(o?Wt(r.width):r.width)/n,a=(o?Wt(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Tl=pe(0);function wo(e){let t=G(e);return!gr()||!t.visualViewport?Tl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wl(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==G(e)?!1:t}function Gt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=To(e),s=pe(1);t&&(n?ie(n)&&(s=St(n)):s=St(e));let a=wl(o,r,n)?wo(o):pe(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let f=G(o),p=n&&ie(n)?G(n):n,h=f,m=vr(h);for(;m&&n&&p!==h;){let b=St(m),x=m.getBoundingClientRect(),A=oe(m),S=x.left+(m.clientLeft+parseFloat(A.paddingLeft))*b.x,C=x.top+(m.clientTop+parseFloat(A.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=S,c+=C,h=G(m),m=vr(h)}}return qe({width:u,height:d,x:l,y:c})}function br(e,t){let r=zt(e).scrollLeft;return t?t.left+r:Gt(Ae(e)).left+r}function _o(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-br(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function _l(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=Ae(n),a=t?Kt(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=pe(1),u=pe(0),d=Ee(n);if((d||!d&&!o)&&((Xe(n)!=="body"||At(s))&&(l=zt(n)),d)){let p=Gt(n);c=St(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=s&&!d&&!o?_o(s,l):pe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Rl(e){return Array.from(e.getClientRects())}function Ll(e){let t=Ae(e),r=zt(e),n=e.ownerDocument.body,i=Me(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Me(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+br(e),a=-r.scrollTop;return oe(n).direction==="rtl"&&(s+=Me(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}var Eo=25;function Pl(e,t){let r=G(e),n=Ae(e),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let u=gr();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}let c=br(n);if(c<=0){let u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(n.clientWidth-d.clientWidth-p);h<=Eo&&(o-=h)}else c<=Eo&&(o+=c);return{width:o,height:s,x:a,y:l}}function Nl(e,t){let r=Gt(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Ee(e)?St(e):pe(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function So(e,t,r){let n;if(t==="viewport")n=Pl(e,r);else if(t==="document")n=Ll(Ae(e));else if(ie(t))n=Nl(t,r);else{let i=wo(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return qe(n)}function Ro(e,t){let r=Te(e);return r===t||!ie(r)||Je(r)?!1:oe(r).position==="fixed"||Ro(r,t)}function Dl(e,t){let r=t.get(e);if(r)return r;let n=mr(e,[],!1).filter(a=>ie(a)&&Xe(a)!=="body"),i=null,o=oe(e).position==="fixed",s=o?Te(e):e;for(;ie(s)&&!Je(s);){let a=oe(s),l=Et(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||At(s)&&!l&&Ro(e,s))?n=n.filter(u=>u!==s):i=a,s=Te(s)}return t.set(e,n),n}function Ml(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?Kt(t)?[]:Dl(t,this._c):[].concat(r),n],a=So(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let f=1;f<s.length;f++){let p=So(t,s[f],i);l=Me(p.top,l),c=Vt(p.right,c),u=Vt(p.bottom,u),d=Me(p.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Il(e){let{width:t,height:r}=Oo(e);return{width:t,height:r}}function kl(e,t,r){let n=Ee(t),i=Ae(t),o=r==="fixed",s=Gt(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=pe(0);function c(){l.x=br(i)}if(n||!n&&!o)if((Xe(t)!=="body"||At(i))&&(a=zt(t)),n){let p=Gt(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&c();o&&!n&&i&&c();let u=i&&!n&&!o?_o(i,a):pe(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function An(e){return oe(e).position==="static"}function Co(e,t){if(!Ee(e)||oe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ae(e)===r&&(r=r.ownerDocument.body),r}function Lo(e,t){let r=G(e);if(Kt(e))return r;if(!Ee(e)){let i=Te(e);for(;i&&!Je(i);){if(ie(i)&&!An(i))return i;i=Te(i)}return r}let n=Co(e,t);for(;n&&bo(n)&&An(n);)n=Co(n,t);return n&&Je(n)&&An(n)&&!Et(n)?r:n||xo(e)||r}var Ul=async function(e){let t=this.getOffsetParent||Lo,r=this.getDimensions,n=await r(e.floating);return{reference:kl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $l(e){return oe(e).direction==="rtl"}var xr={convertOffsetParentRelativeRectToViewportRelativeRect:_l,getDocumentElement:Ae,getClippingRect:Ml,getOffsetParent:Lo,getElementRects:Ul,getClientRects:Rl,getDimensions:Il,getScale:St,isElement:ie,isRTL:$l};var Po=mo,No=yo;var Do=(e,t,r)=>{let n=new Map,i={platform:xr,...r},o={...i.platform,_c:n};return ho(e,t,{...i,platform:o})};function Mo(e){return Hl(e)}function En(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Hl(e){for(let t=e;t;t=En(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=En(e);t;t=En(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Et(r)||t.tagName==="BODY"))return t}return null}async function Io(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Do(e,t,{strategy:n.strategy,platform:{...xr,getOffsetParent:i=>xr.getOffsetParent(i,Mo)},middleware:[No({crossAxis:!0}),Po({allowedPlacements:[n.placement]})]})}var It=v(w());var qn=v(X());var ko=v(X(),1);var Sn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Uo(e,t){return(0,ko.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return qt(e);try{return JSON.parse(r)}catch{return qt(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Yt,...t??{}})}function Bl(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ar(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ar(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(e);if(r=o.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Ar(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ar(e,t){try{return Bl(e,t)}catch{return!1}}function Yt(e,t){return!Ar(e,t)}function qt(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Er(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var $o=v(X(),1);var Cn=e=>{let t=e??{};return(r,n)=>{var i;let o={hasChanged:Yt,attribute:!1,...t};(0,$o.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var Sr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Ze=v(X(),1);var Cr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Bo=v(j(),1);var Or=globalThis,jl=Or.ShadowRoot&&(Or.ShadyCSS===void 0||Or.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Ho=(e,t)=>{if(jl)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=Or.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var Tr=class extends Bo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ho(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Sn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function jo(e,t,...r){var n;let i=e.querySelector(t);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var Ot=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ko,Fo=Symbol("constructorPrototype"),Vo=Symbol("constructorName"),zo=Symbol("exportpartsDebouncer"),Wo=Symbol("dynamicDependenciesLoaded"),Ct=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ct.eventName="exportparts-updated";var Se=class extends Tr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ko]=new Cr(5),this.scheduleExpo