Repository URL to install this package:
|
Version:
1.127.0-1782814776 ▾
|
"use strict";(()=>{var A=(function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}})();A.trustedTypes===void 0&&(A.trustedTypes={createPolicy:(r,t)=>t});var De={configurable:!1,enumerable:!1,writable:!1};A.FAST===void 0&&Reflect.defineProperty(A,"FAST",Object.assign({value:Object.create(null)},De));var j=A.FAST;if(j.getById===void 0){let r=Object.create(null);Reflect.defineProperty(j,"getById",Object.assign({value(t,e){let n=r[t];return n===void 0&&(n=e?r[t]=e():null),n}},De))}var B=Object.freeze([]);function bt(){let r=new WeakMap;return function(t){let e=r.get(t);if(e===void 0){let n=Reflect.getPrototypeOf(t);for(;e===void 0&&n!==null;)e=r.get(n),n=Reflect.getPrototypeOf(n);e=e===void 0?[]:e.slice(0),r.set(t,e)}return e}}var jt=A.FAST.getById(1,()=>{let r=[],t=[];function e(){if(t.length)throw t.shift()}function n(s){try{s.call()}catch(a){t.push(a),setTimeout(e,0)}}function o(){let a=0;for(;a<r.length;)if(n(r[a]),a++,a>1024){for(let l=0,c=r.length-a;l<c;l++)r[l]=r[l+a];r.length-=a,a=0}r.length=0}function i(s){r.length<1&&A.requestAnimationFrame(o),r.push(s)}return Object.freeze({enqueue:i,process:o})}),Ae=A.trustedTypes.createPolicy("fast-html",{createHTML:r=>r}),Vt=Ae,rt=`fast-${Math.random().toString(36).substring(2,8)}`,Ht=`${rt}{`,yt=`}${rt}`,h=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(r){if(Vt!==Ae)throw new Error("The HTML policy can only be set once.");Vt=r},createHTML(r){return Vt.createHTML(r)},isMarker(r){return r&&r.nodeType===8&&r.data.startsWith(rt)},extractDirectiveIndexFromMarker(r){return parseInt(r.data.replace(`${rt}:`,""))},createInterpolationPlaceholder(r){return`${Ht}${r}${yt}`},createCustomAttributePlaceholder(r,t){return`${r}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder(r){return`<!--${rt}:${r}-->`},queueUpdate:jt.enqueue,processUpdates:jt.process,nextUpdate(){return new Promise(jt.enqueue)},setAttribute(r,t,e){e==null?r.removeAttribute(t):r.setAttribute(t,e)},setBooleanAttribute(r,t,e){e?r.setAttribute(t,""):r.removeAttribute(t)},removeChildNodes(r){for(let t=r.firstChild;t!==null;t=r.firstChild)r.removeChild(t)},createTemplateWalker(r){return document.createTreeWalker(r,133,null,!1)}});var J=class{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){let e=this.spillover;if(e===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else e.indexOf(t)===-1&&e.push(t)}unsubscribe(t){let e=this.spillover;if(e===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}}notify(t){let e=this.spillover,n=this.source;if(e===void 0){let o=this.sub1,i=this.sub2;o!==void 0&&o.handleChange(n,t),i!==void 0&&i.handleChange(n,t)}else for(let o=0,i=e.length;o<i;++o)e[o].handleChange(n,t)}},X=class{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;let n=this.subscribers[t];n!==void 0&&n.notify(t),(e=this.sourceSubscribers)===null||e===void 0||e.notify(t)}subscribe(t,e){var n;if(e){let o=this.subscribers[e];o===void 0&&(this.subscribers[e]=o=new J(this.source)),o.subscribe(t)}else this.sourceSubscribers=(n=this.sourceSubscribers)!==null&&n!==void 0?n:new J(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var n;if(e){let o=this.subscribers[e];o!==void 0&&o.unsubscribe(t)}else(n=this.sourceSubscribers)===null||n===void 0||n.unsubscribe(t)}};var b=j.getById(2,()=>{let r=/(:|&&|\|\||if)/,t=new WeakMap,e=h.queueUpdate,n,o=c=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function i(c){let d=c.$fastController||t.get(c);return d===void 0&&(Array.isArray(c)?d=o(c):t.set(c,d=new X(c))),d}let s=bt();class a{constructor(d){this.name=d,this.field=`_${d}`,this.callback=`${d}Changed`}getValue(d){return n!==void 0&&n.watch(d,this.name),d[this.field]}setValue(d,m){let x=this.field,R=d[x];if(R!==m){d[x]=m;let w=d[this.callback];typeof w=="function"&&w.call(d,R,m),i(d).notify(this.name)}}}class l extends J{constructor(d,m,x=!1){super(d,m),this.binding=d,this.isVolatileBinding=x,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(d,m){this.needsRefresh&&this.last!==null&&this.disconnect();let x=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let R=this.binding(d,m);return n=x,R}disconnect(){if(this.last!==null){let d=this.first;for(;d!==void 0;)d.notifier.unsubscribe(this,d.propertyName),d=d.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(d,m){let x=this.last,R=i(d),w=x===null?this.first:{};if(w.propertySource=d,w.propertyName=m,w.notifier=R,R.subscribe(this,m),x!==null){if(!this.needsRefresh){let P;n=void 0,P=x.propertySource[x.propertyName],n=this,d===P&&(this.needsRefresh=!0)}x.next=w}this.last=w}handleChange(){this.needsQueue&&(this.needsQueue=!1,e(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let d=this.first;return{next:()=>{let m=d;return m===void 0?{value:void 0,done:!0}:(d=d.next,{value:m,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(c){o=c},getNotifier:i,track(c,d){n!==void 0&&n.watch(c,d)},trackVolatile(){n!==void 0&&(n.needsRefresh=!0)},notify(c,d){i(c).notify(d)},defineProperty(c,d){typeof d=="string"&&(d=new a(d)),s(c).push(d),Reflect.defineProperty(c,d.name,{enumerable:!0,get:function(){return d.getValue(this)},set:function(m){d.setValue(this,m)}})},getAccessors:s,binding(c,d,m=this.isVolatileBinding(c)){return new l(c,d,m)},isVolatileBinding(c){return r.test(c.toString())}})});function T(r,t){b.defineProperty(r,t)}var _e=j.getById(3,()=>{let r=null;return{get(){return r},set(t){r=t}}}),F=class{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return _e.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){_e.set(t)}};b.defineProperty(F.prototype,"index");b.defineProperty(F.prototype,"length");var M=Object.seal(new F);var Y=class{constructor(){this.targetIndex=0}},Z=class extends Y{constructor(){super(...arguments),this.createPlaceholder=h.createInterpolationPlaceholder}},K=class extends Y{constructor(t,e,n){super(),this.name=t,this.behavior=e,this.options=n}createPlaceholder(t){return h.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}};function qr(r,t){this.source=r,this.context=t,this.bindingObserver===null&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(r,t))}function Wr(r,t){this.source=r,this.context=t,this.target.addEventListener(this.targetName,this)}function Gr(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Qr(){this.bindingObserver.disconnect(),this.source=null,this.context=null;let r=this.target.$fastView;r!==void 0&&r.isComposed&&(r.unbind(),r.needsBindOnly=!0)}function Jr(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Xr(r){h.setAttribute(this.target,this.targetName,r)}function Yr(r){h.setBooleanAttribute(this.target,this.targetName,r)}function Zr(r){if(r==null&&(r=""),r.create){this.target.textContent="";let t=this.target.$fastView;t===void 0?t=r.create():this.target.$fastTemplate!==r&&(t.isComposed&&(t.remove(),t.unbind()),t=r.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=r)}else{let t=this.target.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=r}}function Kr(r){this.target[this.targetName]=r}function tn(r){let t=this.classVersions||Object.create(null),e=this.target,n=this.version||0;if(r!=null&&r.length){let o=r.split(/\s+/);for(let i=0,s=o.length;i<s;++i){let a=o[i];a!==""&&(t[a]=n,e.classList.add(a))}}if(this.classVersions=t,this.version=n+1,n!==0){n-=1;for(let o in t)t[o]===n&&e.classList.remove(o)}}var V=class extends Z{constructor(t){super(),this.binding=t,this.bind=qr,this.unbind=Gr,this.updateTarget=Xr,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,t!==void 0)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=Kr,this.cleanedTargetName==="innerHTML"){let e=this.binding;this.binding=(n,o)=>h.createHTML(e(n,o))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=Yr;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=Wr,this.unbind=Jr;break;default:this.cleanedTargetName=t,t==="class"&&(this.updateTarget=tn);break}}targetAtContent(){this.updateTarget=Zr,this.unbind=Qr}createBehavior(t){return new zt(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}},zt=class{constructor(t,e,n,o,i,s,a){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=n,this.bind=o,this.unbind=i,this.updateTarget=s,this.targetName=a}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){F.setEvent(t);let e=this.binding(this.source,this.context);F.setEvent(null),e!==!0&&t.preventDefault()}};var Ut=null,qt=class r{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Ut=this}static borrow(t){let e=Ut||new r;return e.directives=t,e.reset(),Ut=null,e}};function en(r){if(r.length===1)return r[0];let t,e=r.length,n=r.map(s=>typeof s=="string"?()=>s:(t=s.targetName||t,s.binding)),o=(s,a)=>{let l="";for(let c=0;c<e;++c)l+=n[c](s,a);return l},i=new V(o);return i.targetName=t,i}var rn=yt.length;function Fe(r,t){let e=t.split(Ht);if(e.length===1)return null;let n=[];for(let o=0,i=e.length;o<i;++o){let s=e[o],a=s.indexOf(yt),l;if(a===-1)l=s;else{let c=parseInt(s.substring(0,a));n.push(r.directives[c]),l=s.substring(a+rn)}l!==""&&n.push(l)}return n}function Be(r,t,e=!1){let n=t.attributes;for(let o=0,i=n.length;o<i;++o){let s=n[o],a=s.value,l=Fe(r,a),c=null;l===null?e&&(c=new V(()=>a),c.targetName=s.name):c=en(l),c!==null&&(t.removeAttributeNode(s),o--,i--,r.addFactory(c))}}function nn(r,t,e){let n=Fe(r,t.textContent);if(n!==null){let o=t;for(let i=0,s=n.length;i<s;++i){let a=n[i],l=i===0?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);typeof a=="string"?l.textContent=a:(l.textContent=" ",r.captureContentBinding(a)),o=l,r.targetIndex++,l!==t&&e.nextNode()}r.targetIndex--}}function Me(r,t){let e=r.content;document.adoptNode(e);let n=qt.borrow(t);Be(n,r,!0);let o=n.behaviorFactories;n.reset();let i=h.createTemplateWalker(e),s;for(;s=i.nextNode();)switch(n.targetIndex++,s.nodeType){case 1:Be(n,s);break;case 3:nn(n,s,i);break;case 8:h.isMarker(s)&&n.addFactory(t[h.extractDirectiveIndexFromMarker(s)])}let a=0;(h.isMarker(e.firstChild)||e.childNodes.length===1&&t.length)&&(e.insertBefore(document.createComment(""),e.firstChild),a=-1);let l=n.behaviorFactories;return n.release(),{fragment:e,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}var Wt=document.createRange(),vt=class{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{let e=this.lastChild;if(t.previousSibling===e)return;let n=t.parentNode,o=this.firstChild,i;for(;o!==e;)i=o.nextSibling,n.insertBefore(o,t),o=i;n.insertBefore(e,t)}}remove(){let t=this.fragment,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.appendChild(n),n=o;t.appendChild(e)}dispose(){let t=this.firstChild.parentNode,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.removeChild(n),n=o;t.removeChild(e);let i=this.behaviors,s=this.source;for(let a=0,l=i.length;a<l;++a)i[a].unbind(s)}bind(t,e){let n=this.behaviors;if(this.source!==t)if(this.source!==null){let o=this.source;this.source=t,this.context=e;for(let i=0,s=n.length;i<s;++i){let a=n[i];a.unbind(o),a.bind(t,e)}}else{this.source=t,this.context=e;for(let o=0,i=n.length;o<i;++o)n[o].bind(t,e)}}unbind(){if(this.source===null)return;let t=this.behaviors,e=this.source;for(let n=0,o=t.length;n<o;++n)t[n].unbind(e);this.source=null}static disposeContiguousBatch(t){if(t.length!==0){Wt.setStartBefore(t[0].firstChild),Wt.setEndAfter(t[t.length-1].lastChild),Wt.deleteContents();for(let e=0,n=t.length;e<n;++e){let o=t[e],i=o.behaviors,s=o.source;for(let a=0,l=i.length;a<l;++a)i[a].unbind(s)}}}};var xt=class{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(this.fragment===null){let c,d=this.html;if(typeof d=="string"){c=document.createElement("template"),c.innerHTML=h.createHTML(d);let x=c.content.firstElementChild;x!==null&&x.tagName==="TEMPLATE"&&(c=x)}else c=d;let m=Me(c,this.directives);this.fragment=m.fragment,this.viewBehaviorFactories=m.viewBehaviorFactories,this.hostBehaviorFactories=m.hostBehaviorFactories,this.targetOffset=m.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}let e=this.fragment.cloneNode(!0),n=this.viewBehaviorFactories,o=new Array(this.behaviorCount),i=h.createTemplateWalker(e),s=0,a=this.targetOffset,l=i.nextNode();for(let c=n.length;s<c;++s){let d=n[s],m=d.targetIndex;for(;l!==null;)if(a===m){o[s]=d.createBehavior(l);break}else l=i.nextNode(),a++}if(this.hasHostBehaviors){let c=this.hostBehaviorFactories;for(let d=0,m=c.length;d<m;++d,++s)o[s]=c[d].createBehavior(t)}return new vt(e,o)}render(t,e,n){typeof e=="string"&&(e=document.getElementById(e)),n===void 0&&(n=e);let o=this.create(n);return o.bind(t,M),o.appendTo(e),o}},on=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function H(r,...t){let e=[],n="";for(let o=0,i=r.length-1;o<i;++o){let s=r[o],a=t[o];if(n+=s,a instanceof xt){let l=a;a=()=>l}if(typeof a=="function"&&(a=new V(a)),a instanceof Z){let l=on.exec(s);l!==null&&(a.targetName=l[2])}a instanceof Y?(n+=a.createPlaceholder(e.length),e.push(a)):n+=a}return n+=r[r.length-1],new xt(n,e)}var v=class{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}};v.create=(()=>{if(h.supportsAdoptedStyleSheets){let r=new Map;return t=>new Gt(t,r)}return r=>new Qt(r)})();function Jt(r){return r.map(t=>t instanceof v?Jt(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function Ie(r){return r.map(t=>t instanceof v?t.behaviors:null).reduce((t,e)=>e===null?t:(t===null&&(t=[]),t.concat(e)),null)}var wt=Symbol("prependToAdoptedStyleSheets");function Le(r){let t=[],e=[];return r.forEach(n=>(n[wt]?t:e).push(n)),{prepend:t,append:e}}var Ne=(r,t)=>{let{prepend:e,append:n}=Le(t);r.adoptedStyleSheets=[...e,...r.adoptedStyleSheets,...n]},je=(r,t)=>{r.adoptedStyleSheets=r.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(h.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Ne=(r,t)=>{let{prepend:e,append:n}=Le(t);r.adoptedStyleSheets.splice(0,0,...e),r.adoptedStyleSheets.push(...n)},je=(r,t)=>{for(let e of t){let n=r.adoptedStyleSheets.indexOf(e);n!==-1&&r.adoptedStyleSheets.splice(n,1)}}}catch{}var Gt=class extends v{constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=Ie(t)}get styleSheets(){if(this._styleSheets===void 0){let t=this.styles,e=this.styleSheetCache;this._styleSheets=Jt(t).map(n=>{if(n instanceof CSSStyleSheet)return n;let o=e.get(n);return o===void 0&&(o=new CSSStyleSheet,o.replaceSync(n),e.set(n,o)),o})}return this._styleSheets}addStylesTo(t){Ne(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){je(t,this.styleSheets),super.removeStylesFrom(t)}},sn=0;function an(){return`fast-style-class-${++sn}`}var Qt=class extends v{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=Ie(t),this.styleSheets=Jt(t),this.styleClass=an()}addStylesTo(t){let e=this.styleSheets,n=this.styleClass;t=this.normalizeTarget(t);for(let o=0;o<e.length;o++){let i=document.createElement("style");i.innerHTML=e[o],i.className=n,t.append(i)}super.addStylesTo(t)}removeStylesFrom(t){t=this.normalizeTarget(t);let e=t.querySelectorAll(`.${this.styleClass}`);for(let n=0,o=e.length;n<o;++n)t.removeChild(e[n]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}};var nt=Object.freeze({locate:bt()}),Ve={toView(r){return r?"true":"false"},fromView(r){return!(r==null||r==="false"||r===!1||r===0)}};var St=class r{constructor(t,e,n=e.toLowerCase(),o="reflect",i){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=n,this.mode=o,this.converter=i,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,o==="boolean"&&i===void 0&&(this.converter=Ve)}setValue(t,e){let n=t[this.fieldName],o=this.converter;o!==void 0&&(e=o.fromView(e)),n!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](n,e),t.$fastController.notify(this.name))}getValue(t){return b.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){let e=this.mode,n=this.guards;n.has(t)||e==="fromView"||h.queueUpdate(()=>{n.add(t);let o=t[this.fieldName];switch(e){case"reflect":let i=this.converter;h.setAttribute(t,this.attribute,i!==void 0?i.toView(o):o);break;case"boolean":h.setBooleanAttribute(t,this.attribute,o);break}n.delete(t)})}static collect(t,...e){let n=[];e.push(nt.locate(t));for(let o=0,i=e.length;o<i;++o){let s=e[o];if(s!==void 0)for(let a=0,l=s.length;a<l;++a){let c=s[a];typeof c=="string"?n.push(new r(t,c)):n.push(new r(t,c.property,c.attribute,c.mode,c.converter))}}return n}};function f(r,t){let e;function n(o,i){arguments.length>1&&(e.property=i),nt.locate(o.constructor).push(e)}if(arguments.length>1){e={},n(r,t);return}return e=r===void 0?{}:r,n}var He={mode:"open"},ze={},Xt=j.getById(4,()=>{let r=new Map;return Object.freeze({register(t){return r.has(t.type)?!1:(r.set(t.type,t),!0)},getByType(t){return r.get(t)}})}),$=class{constructor(t,e=t.definition){typeof e=="string"&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;let n=St.collect(t,e.attributes),o=new Array(n.length),i={},s={};for(let a=0,l=n.length;a<l;++a){let c=n[a];o[a]=c.attribute,i[c.name]=c,s[c.attribute]=c}this.attributes=n,this.observedAttributes=o,this.propertyLookup=i,this.attributeLookup=s,this.shadowOptions=e.shadowOptions===void 0?He:e.shadowOptions===null?void 0:Object.assign(Object.assign({},He),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?ze:Object.assign(Object.assign({},ze),e.elementOptions),this.styles=e.styles===void 0?void 0:Array.isArray(e.styles)?v.create(e.styles):e.styles instanceof v?e.styles:v.create([e.styles])}get isDefined(){return!!Xt.getByType(this.type)}define(t=customElements){let e=this.type;if(Xt.register(this)){let n=this.attributes,o=e.prototype;for(let i=0,s=n.length;i<s;++i)b.defineProperty(o,n[i]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}};$.forType=Xt.getByType;var Ue=new WeakMap,cn={bubbles:!0,composed:!0,cancelable:!0};function Yt(r){return r.shadowRoot||Ue.get(r)||null}var Ct=class r extends X{constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;let n=e.shadowOptions;if(n!==void 0){let i=t.attachShadow(n);n.mode==="closed"&&Ue.set(t,i)}let o=b.getAccessors(t);if(o.length>0){let i=this.boundObservables=Object.create(null);for(let s=0,a=o.length;s<a;++s){let l=o[s].name,c=t[l];c!==void 0&&(delete t[l],i[l]=c)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,b.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=t,!this.needsInitialization&&t!==null&&this.addStyles(t))}addStyles(t){let e=Yt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){let n=t.behaviors;t.addStylesTo(e),n!==null&&this.addBehaviors(n)}}removeStyles(t){let e=Yt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){let n=t.behaviors;t.removeStylesFrom(e),n!==null&&this.removeBehaviors(n)}}addBehaviors(t){let e=this.behaviors||(this.behaviors=new Map),n=t.length,o=[];for(let i=0;i<n;++i){let s=t[i];e.has(s)?e.set(s,e.get(s)+1):(e.set(s,1),o.push(s))}if(this._isConnected){let i=this.element;for(let s=0;s<o.length;++s)o[s].bind(i,M)}}removeBehaviors(t,e=!1){let n=this.behaviors;if(n===null)return;let o=t.length,i=[];for(let s=0;s<o;++s){let a=t[s];if(n.has(a)){let l=n.get(a)-1;l===0||e?n.delete(a)&&i.push(a):n.set(a,l)}}if(this._isConnected){let s=this.element;for(let a=0;a<i.length;++a)i[a].unbind(s)}}onConnectedCallback(){if(this._isConnected)return;let t=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(t,M);let e=this.behaviors;if(e!==null)for(let[n]of e)n.bind(t,M);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);let t=this.view;t!==null&&t.unbind();let e=this.behaviors;if(e!==null){let n=this.element;for(let[o]of e)o.unbind(n)}}onAttributeChangedCallback(t,e,n){let o=this.definition.attributeLookup[t];o!==void 0&&o.onAttributeChangedCallback(this.element,n)}emit(t,e,n){return this._isConnected?this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},cn),n))):!1}finishInitialization(){let t=this.element,e=this.boundObservables;if(e!==null){let o=Object.keys(e);for(let i=0,s=o.length;i<s;++i){let a=o[i];t[a]=e[a]}this.boundObservables=null}let n=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():n.template&&(this._template=n.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():n.styles&&(this._styles=n.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){let e=this.element,n=Yt(e)||e;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||h.removeChildNodes(n),t&&(this.view=t.render(e,n,e))}static forCustomElement(t){let e=t.$fastController;if(e!==void 0)return e;let n=$.forType(t.constructor);if(n===void 0)throw new Error("Missing FASTElement definition.");return t.$fastController=new r(t,n)}};function qe(r){return class extends r{constructor(){super(),Ct.forCustomElement(this)}$emit(t,e,n){return this.$fastController.emit(t,e,n)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,n){this.$fastController.onAttributeChangedCallback(t,e,n)}}}var I=Object.assign(qe(HTMLElement),{from(r){return qe(r)},define(r,t){return new $(r,t).define().type}});var z=class{createCSS(){return""}createBehavior(){}};function ln(r,t){let e=[],n="",o=[];for(let i=0,s=r.length-1;i<s;++i){n+=r[i];let a=t[i];if(a instanceof z){let l=a.createBehavior();a=a.createCSS(),l&&o.push(l)}a instanceof v||a instanceof CSSStyleSheet?(n.trim()!==""&&(e.push(n),n=""),e.push(a)):n+=a}return n+=r[r.length-1],n.trim()!==""&&e.push(n),{styles:e,behaviors:o}}function U(r,...t){let{styles:e,behaviors:n}=ln(r,t),o=v.create(e);return n.length&&o.withBehaviors(...n),o}var Zt=class{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}};function E(r){return new K("fast-ref",Zt,r)}var kt=class{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){let e=this.options.property;this.shouldUpdate=b.getAccessors(t).some(n=>n.name===e),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(B),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return this.options.filter!==void 0&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}};var Kt=class extends kt{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}};function We(r){return typeof r=="string"&&(r={property:r}),new K("fast-slotted",Kt,r)}var Pt=class{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}},Ge=(r,t)=>H`
<span
part="end"
${E("endContainer")}
class=${e=>t.end?"end":void 0}
>
<slot name="end" ${E("end")} @slotchange="${e=>e.handleEndContentChange()}">
${t.end||""}
</slot>
</span>
`,Qe=(r,t)=>H`
<span
part="start"
${E("startContainer")}
class="${e=>t.start?"start":void 0}"
>
<slot
name="start"
${E("start")}
@slotchange="${e=>e.handleStartContentChange()}"
>
${t.start||""}
</slot>
</span>
`,yi=H`
<span part="end" ${E("endContainer")}>
<slot
name="end"
${E("end")}
@slotchange="${r=>r.handleEndContentChange()}"
></slot>
</span>
`,vi=H`
<span part="start" ${E("startContainer")}>
<slot
name="start"
${E("start")}
@slotchange="${r=>r.handleStartContentChange()}"
></slot>
</span>
`;function p(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var te=new Map;"metadata"in Reflect||(Reflect.metadata=function(r,t){return function(e){Reflect.defineMetadata(r,t,e)}},Reflect.defineMetadata=function(r,t,e){let n=te.get(e);n===void 0&&te.set(e,n=new Map),n.set(r,t)},Reflect.getOwnMetadata=function(r,t){let e=te.get(t);if(e!==void 0)return e.get(r)});var oe=class{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,ir(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){let{container:n,key:o}=this;return this.container=this.key=void 0,n.registerResolver(o,new S(o,t,e))}};function ot(r){let t=r.slice(),e=Object.keys(r),n=e.length,o;for(let i=0;i<n;++i)o=e[i],sr(o)||(t[o]=r[o]);return t}var un=Object.freeze({none(r){throw Error(`${r.toString()} not registered, did you forget to add @singleton()?`)},singleton(r){return new S(r,1,r)},transient(r){return new S(r,2,r)}}),ee=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:un.singleton})}),Je=new Map;function Xe(r){return t=>Reflect.getOwnMetadata(r,t)}var Ye=null,g=Object.freeze({createContainer(r){return new it(null,Object.assign({},ee.default,r))},findResponsibleContainer(r){let t=r.$$container$$;return t&&t.responsibleForOwnerRequests?t:g.findParentContainer(r)},findParentContainer(r){let t=new CustomEvent(or,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return r.dispatchEvent(t),t.detail.container||g.getOrCreateDOMContainer()},getOrCreateDOMContainer(r,t){return r?r.$$container$$||new it(r,Object.assign({},ee.default,t,{parentLocator:g.findParentContainer})):Ye||(Ye=new it(null,Object.assign({},ee.default,t,{parentLocator:()=>null})))},getDesignParamtypes:Xe("design:paramtypes"),getAnnotationParamtypes:Xe("di:paramtypes"),getOrCreateAnnotationParamTypes(r){let t=this.getAnnotationParamtypes(r);return t===void 0&&Reflect.defineMetadata("di:paramtypes",t=[],r),t},getDependencies(r){let t=Je.get(r);if(t===void 0){let e=r.inject;if(e===void 0){let n=g.getDesignParamtypes(r),o=g.getAnnotationParamtypes(r);if(n===void 0)if(o===void 0){let i=Object.getPrototypeOf(r);typeof i=="function"&&i!==Function.prototype?t=ot(g.getDependencies(i)):t=[]}else t=ot(o);else if(o===void 0)t=ot(n);else{t=ot(n);let i=o.length,s;for(let c=0;c<i;++c)s=o[c],s!==void 0&&(t[c]=s);let a=Object.keys(o);i=a.length;let l;for(let c=0;c<i;++c)l=a[c],sr(l)||(t[l]=o[l])}}else t=ot(e);Je.set(r,t)}return t},defineProperty(r,t,e,n=!1){let o=`$di_${t}`;Reflect.defineProperty(r,t,{get:function(){let i=this[o];if(i===void 0&&(i=(this instanceof HTMLElement?g.findResponsibleContainer(this):g.getOrCreateDOMContainer()).get(e),this[o]=i,n&&this instanceof I)){let a=this.$fastController,l=()=>{let d=g.findResponsibleContainer(this).get(e),m=this[o];d!==m&&(this[o]=i,a.notify(t))};a.subscribe({handleChange:l},"isConnected")}return i}})},createInterface(r,t){let e=typeof r=="function"?r:t,n=typeof r=="string"?r:r&&"friendlyName"in r&&r.friendlyName||er,o=typeof r=="string"?!1:r&&"respectConnection"in r&&r.respectConnection||!1,i=function(s,a,l){if(s==null||new.target!==void 0)throw new Error(`No registration for interface: '${i.friendlyName}'`);if(a)g.defineProperty(s,a,i,o);else{let c=g.getOrCreateAnnotationParamTypes(s);c[l]=i}};return i.$isInterface=!0,i.friendlyName=n??"(anonymous)",e!=null&&(i.register=function(s,a){return e(new oe(s,a??i))}),i.toString=function(){return`InterfaceSymbol<${i.friendlyName}>`},i},inject(...r){return function(t,e,n){if(typeof n=="number"){let o=g.getOrCreateAnnotationParamTypes(t),i=r[0];i!==void 0&&(o[n]=i)}else if(e)g.defineProperty(t,e,r[0]);else{let o=n?g.getOrCreateAnnotationParamTypes(n.value):g.getOrCreateAnnotationParamTypes(t),i;for(let s=0;s<r.length;++s)i=r[s],i!==void 0&&(o[s]=i)}}},transient(r){return r.register=function(e){return q.transient(r,r).register(e)},r.registerInRequestor=!1,r},singleton(r,t=hn){return r.register=function(n){return q.singleton(r,r).register(n)},r.registerInRequestor=t.scoped,r}}),dn=g.createInterface("Container");function Rt(r){return function(t){let e=function(n,o,i){g.inject(e)(n,o,i)};return e.$isResolver=!0,e.resolve=function(n,o){return r(t,n,o)},e}}var Ci=g.inject;var hn={scoped:!1};function fn(r){return function(t,e){e=!!e;let n=function(o,i,s){g.inject(n)(o,i,s)};return n.$isResolver=!0,n.resolve=function(o,i){return r(t,o,i,e)},n}}var ki=fn((r,t,e,n)=>e.getAll(r,n)),Pi=Rt((r,t,e)=>()=>e.get(r)),Ti=Rt((r,t,e)=>{if(e.has(r,!0))return e.get(r)});function se(r,t,e){g.inject(se)(r,t,e)}se.$isResolver=!0;se.resolve=()=>{};var Ei=Rt((r,t,e)=>{let n=nr(r,t),o=new S(r,0,n);return e.registerResolver(r,o),n}),Oi=Rt((r,t,e)=>nr(r,t));function nr(r,t){return t.getFactory(r).construct(t)}var S=class{constructor(t,e,n){this.key=t,this.strategy=e,this.state=n,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:{if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state}case 2:{let n=t.getFactory(this.state);if(n===null)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return n.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){var e,n,o;switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return(o=(n=(e=t.getResolver(this.state))===null||e===void 0?void 0:e.getFactory)===null||n===void 0?void 0:n.call(e,t))!==null&&o!==void 0?o:null;default:return null}}};function Ze(r){return this.get(r)}function pn(r,t){return t(r)}var ie=class{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let n;return e===void 0?n=new this.Type(...this.dependencies.map(Ze,t)):n=new this.Type(...this.dependencies.map(Ze,t),...e),this.transformers==null?n:this.transformers.reduce(pn,n)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}},mn={$isResolver:!0,resolve(r,t){return t}};function Ot(r){return typeof r.register=="function"}function gn(r){return Ot(r)&&typeof r.registerInRequestor=="boolean"}function Ke(r){return gn(r)&&r.registerInRequestor}function bn(r){return r.prototype!==void 0}var yn=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),or="__DI_LOCATE_PARENT__",re=new Map,it=class r{constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,t!==null&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(dn,mn),t instanceof Node&&t.addEventListener(or,n=>{n.composedPath()[0]!==this.owner&&(n.detail.container=this,n.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let e,n,o,i,s,a=this.context;for(let l=0,c=t.length;l<c;++l)if(e=t[l],!!rr(e))if(Ot(e))e.register(this,a);else if(bn(e))q.singleton(e,e).register(this);else for(n=Object.keys(e),i=0,s=n.length;i<s;++i)o=e[n[i]],rr(o)&&(Ot(o)?o.register(this,a):this.register(o));return--this.registerDepth,this}registerResolver(t,e){Tt(t);let n=this.resolvers,o=n.get(t);return o==null?n.set(t,e):o instanceof S&&o.strategy===4?o.state.push(e):n.set(t,new S(t,4,[o,e])),e}registerTransformer(t,e){let n=this.getResolver(t);if(n==null)return!1;if(n.getFactory){let o=n.getFactory(this);return o==null?!1:(o.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(Tt(t),t.resolve!==void 0)return t;let n=this,o;for(;n!=null;)if(o=n.resolvers.get(t),o==null){if(n.parent==null){let i=Ke(t)?this:n;return e?this.jitRegister(t,i):null}n=n.parent}else return o;return null}has(t,e=!1){return this.resolvers.has(t)?!0:e&&this.parent!=null?this.parent.has(t,!0):!1}get(t){if(Tt(t),t.$isResolver)return t.resolve(this,this);let e=this,n;for(;e!=null;)if(n=e.resolvers.get(t),n==null){if(e.parent==null){let o=Ke(t)?this:e;return n=this.jitRegister(t,o),n.resolve(e,this)}e=e.parent}else return n.resolve(e,this);throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){Tt(t);let n=this,o=n,i;if(e){let s=B;for(;o!=null;)i=o.resolvers.get(t),i!=null&&(s=s.concat(tr(i,o,n))),o=o.parent;return s}else for(;o!=null;)if(i=o.resolvers.get(t),i==null){if(o=o.parent,o==null)return B}else return tr(i,o,n);return B}getFactory(t){let e=re.get(t);if(e===void 0){if(vn(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);re.set(t,e=new ie(t,g.getDependencies(t)))}return e}registerFactory(t,e){re.set(t,e)}createChild(t){return new r(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if(typeof t!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(yn.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(Ot(t)){let n=t.register(e);if(!(n instanceof Object)||n.resolve==null){let o=e.resolvers.get(t);if(o!=null)return o;throw new Error("A valid resolver was not returned from the static register method")}return n}else{if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{let n=this.config.defaultResolver(t,e);return e.resolvers.set(t,n),n}}}},ne=new WeakMap;function ir(r){return function(t,e,n){if(ne.has(n))return ne.get(n);let o=r(t,e,n);return ne.set(n,o),o}}var q=Object.freeze({instance(r,t){return new S(r,0,t)},singleton(r,t){return new S(r,1,t)},transient(r,t){return new S(r,2,t)},callback(r,t){return new S(r,3,t)},cachedCallback(r,t){return new S(r,3,ir(t))},aliasTo(r,t){return new S(t,5,r)}});function Tt(r){if(r==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function tr(r,t,e){if(r instanceof S&&r.strategy===4){let n=r.state,o=n.length,i=new Array(o);for(;o--;)i[o]=n[o].resolve(t,e);return i}return[r.resolve(t,e)]}var er="(anonymous)";function rr(r){return typeof r=="object"&&r!==null||typeof r=="function"}var vn=(function(){let r=new WeakMap,t=!1,e="",n=0;return function(o){return t=r.get(o),t===void 0&&(e=o.toString(),n=e.length,t=n>=29&&n<=100&&e.charCodeAt(n-1)===125&&e.charCodeAt(n-2)<=32&&e.charCodeAt(n-3)===93&&e.charCodeAt(n-4)===101&&e.charCodeAt(n-5)===100&&e.charCodeAt(n-6)===111&&e.charCodeAt(n-7)===99&&e.charCodeAt(n-8)===32&&e.charCodeAt(n-9)===101&&e.charCodeAt(n-10)===118&&e.charCodeAt(n-11)===105&&e.charCodeAt(n-12)===116&&e.charCodeAt(n-13)===97&&e.charCodeAt(n-14)===110&&e.charCodeAt(n-15)===88,r.set(o,t)),t}})(),Et={};function sr(r){switch(typeof r){case"number":return r>=0&&(r|0)===r;case"string":{let t=Et[r];if(t!==void 0)return t;let e=r.length;if(e===0)return Et[r]=!1;let n=0;for(let o=0;o<e;++o)if(n=r.charCodeAt(o),o===0&&n===48&&e>1||n<48||n>57)return Et[r]=!1;return Et[r]=!0}default:return!1}}function ar(r){return`${r.toLowerCase()}:presentation`}var $t=new Map,At=Object.freeze({define(r,t,e){let n=ar(r);$t.get(n)===void 0?$t.set(n,t):$t.set(n,!1),e.register(q.instance(n,t))},forTag(r,t){let e=ar(r),n=$t.get(e);return n===!1?g.findResponsibleContainer(t).get(e):n||null}}),Dt=class{constructor(t,e){this.template=t||null,this.styles=e===void 0?null:Array.isArray(e)?v.create(e):e instanceof v?e:v.create([e])}applyTo(t){let e=t.$fastController;e.template===null&&(e.template=this.template),e.styles===null&&(e.styles=this.styles)}};var L=class r extends I{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=At.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new ae(this===r?class extends r{}:this,t,e)}};p([T],L.prototype,"template",void 0);p([T],L.prototype,"styles",void 0);function st(r,t,e){return typeof r=="function"?r(t,e):r}var ae=class{constructor(t,e,n){this.type=t,this.elementDefinition=e,this.overrideDefinition=n,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(t,e){let n=this.definition,o=this.overrideDefinition,s=`${n.prefix||e.elementPrefix}-${n.baseName}`;e.tryDefineElement({name:s,type:this.type,baseClass:this.elementDefinition.baseClass,callback:a=>{let l=new Dt(st(n.template,a,n),st(n.styles,a,n));a.definePresentation(l);let c=st(n.shadowOptions,a,n);a.shadowRootMode&&(c?o.shadowOptions||(c.mode=a.shadowRootMode):c!==null&&(c={mode:a.shadowRootMode})),a.defineElement({elementOptions:st(n.elementOptions,a,n),shadowOptions:c,attributes:st(n.attributes,a,n)})}})}};function ce(r,...t){let e=nt.locate(r);t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i))}),nt.locate(n).forEach(i=>e.push(i))})}function cr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xn(){let r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}var W;function lr(){if(typeof W=="boolean")return W;if(!cr())return W=!1,W;let r=document.createElement("style"),t=xn();t!==null&&r.setAttribute("nonce",t),document.head.appendChild(r);try{r.sheet.insertRule("foo:focus-visible {color:inherit}",0),W=!0}catch{W=!1}finally{document.head.removeChild(r)}return W}var ur;(function(r){r[r.alt=18]="alt",r[r.arrowDown=40]="arrowDown",r[r.arrowLeft=37]="arrowLeft",r[r.arrowRight=39]="arrowRight",r[r.arrowUp=38]="arrowUp",r[r.back=8]="back",r[r.backSlash=220]="backSlash",r[r.break=19]="break",r[r.capsLock=20]="capsLock",r[r.closeBracket=221]="closeBracket",r[r.colon=186]="colon",r[r.colon2=59]="colon2",r[r.comma=188]="comma",r[r.ctrl=17]="ctrl",r[r.delete=46]="delete",r[r.end=35]="end",r[r.enter=13]="enter",r[r.equals=187]="equals",r[r.equals2=61]="equals2",r[r.equals3=107]="equals3",r[r.escape=27]="escape",r[r.forwardSlash=191]="forwardSlash",r[r.function1=112]="function1",r[r.function10=121]="function10",r[r.function11=122]="function11",r[r.function12=123]="function12",r[r.function2=113]="function2",r[r.function3=114]="function3",r[r.function4=115]="function4",r[r.function5=116]="function5",r[r.function6=117]="function6",r[r.function7=118]="function7",r[r.function8=119]="function8",r[r.function9=120]="function9",r[r.home=36]="home",r[r.insert=45]="insert",r[r.menu=93]="menu",r[r.minus=189]="minus",r[r.minus2=109]="minus2",r[r.numLock=144]="numLock",r[r.numPad0=96]="numPad0",r[r.numPad1=97]="numPad1",r[r.numPad2=98]="numPad2",r[r.numPad3=99]="numPad3",r[r.numPad4=100]="numPad4",r[r.numPad5=101]="numPad5",r[r.numPad6=102]="numPad6",r[r.numPad7=103]="numPad7",r[r.numPad8=104]="numPad8",r[r.numPad9=105]="numPad9",r[r.numPadDivide=111]="numPadDivide",r[r.numPadDot=110]="numPadDot",r[r.numPadMinus=109]="numPadMinus",r[r.numPadMultiply=106]="numPadMultiply",r[r.numPadPlus=107]="numPadPlus",r[r.openBracket=219]="openBracket",r[r.pageDown=34]="pageDown",r[r.pageUp=33]="pageUp",r[r.period=190]="period",r[r.print=44]="print",r[r.quote=222]="quote",r[r.scrollLock=145]="scrollLock",r[r.shift=16]="shift",r[r.space=32]="space",r[r.tab=9]="tab",r[r.tilde=192]="tilde",r[r.windowsLeft=91]="windowsLeft",r[r.windowsOpera=219]="windowsOpera",r[r.windowsRight=92]="windowsRight"})(ur||(ur={}));var dr="Enter";var y=class{};p([f({attribute:"aria-atomic"})],y.prototype,"ariaAtomic",void 0);p([f({attribute:"aria-busy"})],y.prototype,"ariaBusy",void 0);p([f({attribute:"aria-controls"})],y.prototype,"ariaControls",void 0);p([f({attribute:"aria-current"})],y.prototype,"ariaCurrent",void 0);p([f({attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0);p([f({attribute:"aria-details"})],y.prototype,"ariaDetails",void 0);p([f({attribute:"aria-disabled"})],y.prototype,"ariaDisabled",void 0);p([f({attribute:"aria-errormessage"})],y.prototype,"ariaErrormessage",void 0);p([f({attribute:"aria-flowto"})],y.prototype,"ariaFlowto",void 0);p([f({attribute:"aria-haspopup"})],y.prototype,"ariaHaspopup",void 0);p([f({attribute:"aria-hidden"})],y.prototype,"ariaHidden",void 0);p([f({attribute:"aria-invalid"})],y.prototype,"ariaInvalid",void 0);p([f({attribute:"aria-keyshortcuts"})],y.prototype,"ariaKeyshortcuts",void 0);p([f({attribute:"aria-label"})],y.prototype,"ariaLabel",void 0);p([f({attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0);p([f({attribute:"aria-live"})],y.prototype,"ariaLive",void 0);p([f({attribute:"aria-owns"})],y.prototype,"ariaOwns",void 0);p([f({attribute:"aria-relevant"})],y.prototype,"ariaRelevant",void 0);p([f({attribute:"aria-roledescription"})],y.prototype,"ariaRoledescription",void 0);var hr=(r,t)=>H`
<button
class="control"
part="control"
?autofocus="${e=>e.autofocus}"
?disabled="${e=>e.disabled}"
form="${e=>e.formId}"
formaction="${e=>e.formaction}"
formenctype="${e=>e.formenctype}"
formmethod="${e=>e.formmethod}"
formnovalidate="${e=>e.formnovalidate}"
formtarget="${e=>e.formtarget}"
name="${e=>e.name}"
type="${e=>e.type}"
value="${e=>e.value}"
aria-atomic="${e=>e.ariaAtomic}"
aria-busy="${e=>e.ariaBusy}"
aria-controls="${e=>e.ariaControls}"
aria-current="${e=>e.ariaCurrent}"
aria-describedby="${e=>e.ariaDescribedby}"
aria-details="${e=>e.ariaDetails}"
aria-disabled="${e=>e.ariaDisabled}"
aria-errormessage="${e=>e.ariaErrormessage}"
aria-expanded="${e=>e.ariaExpanded}"
aria-flowto="${e=>e.ariaFlowto}"
aria-haspopup="${e=>e.ariaHaspopup}"
aria-hidden="${e=>e.ariaHidden}"
aria-invalid="${e=>e.ariaInvalid}"
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
aria-label="${e=>e.ariaLabel}"
aria-labelledby="${e=>e.ariaLabelledby}"
aria-live="${e=>e.ariaLive}"
aria-owns="${e=>e.ariaOwns}"
aria-pressed="${e=>e.ariaPressed}"
aria-relevant="${e=>e.ariaRelevant}"
aria-roledescription="${e=>e.ariaRoledescription}"
${E("control")}
>
${Qe(r,t)}
<span class="content" part="content">
<slot ${We("defaultSlottedContent")}></slot>
</span>
${Ge(r,t)}
</button>
`;var fr="form-associated-proxy",pr="ElementInternals",mr=pr in window&&"setFormValue"in window[pr].prototype,gr=new WeakMap;function br(r){let t=class extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return mr}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){let e=this.proxy.labels,n=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),o=e?n.concat(Array.from(e)):n;return Object.freeze(o)}else return B}valueChanged(e,n){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,n){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),h.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),h.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!mr)return null;let e=gr.get(this);return e||(e=this.attachInternals(),gr.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,n,o){this.elementInternals?this.elementInternals.setValidity(e,n,o):typeof n=="string"&&this.proxy.setCustomValidity(n)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(n=>this.proxy.addEventListener(n,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",fr),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",fr)),(e=this.shadowRoot)===null||e===void 0||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),(e=this.shadowRoot)===null||e===void 0||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,n){this.elementInternals&&this.elementInternals.setFormValue(e,n||e)}_keypressHandler(e){switch(e.key){case dr:if(this.form instanceof HTMLFormElement){let n=this.form.querySelector("[type=submit]");n?.click()}break}}stopPropagation(e){e.stopPropagation()}};return f({mode:"boolean"})(t.prototype,"disabled"),f({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),f({attribute:"current-value"})(t.prototype,"currentValue"),f(t.prototype,"name"),f({mode:"boolean"})(t.prototype,"required"),T(t.prototype,"value"),t}var le=class extends L{},_t=class extends br(le){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var k=class extends _t{constructor(){super(...arguments),this.handleClick=t=>{var e;this.disabled&&((e=this.defaultSlottedContent)===null||e===void 0?void 0:e.length)<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;let t=this.proxy.isConnected;t||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{var t;(t=this.form)===null||t===void 0||t.reset()},this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((t=this.$fastController.definition.shadowOptions)===null||t===void 0)&&t.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),e==="submit"&&this.addEventListener("click",this.handleSubmission),t==="submit"&&this.removeEventListener("click",this.handleSubmission),e==="reset"&&this.addEventListener("click",this.handleFormReset),t==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var t;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.addEventListener("click",this.handleClick)})}disconnectedCallback(){var t;super.disconnectedCallback();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.removeEventListener("click",this.handleClick)})}};p([f({mode:"boolean"})],k.prototype,"autofocus",void 0);p([f({attribute:"form"})],k.prototype,"formId",void 0);p([f],k.prototype,"formaction",void 0);p([f],k.prototype,"formenctype",void 0);p([f],k.prototype,"formmethod",void 0);p([f({mode:"boolean"})],k.prototype,"formnovalidate",void 0);p([f],k.prototype,"formtarget",void 0);p([f],k.prototype,"type",void 0);p([T],k.prototype,"defaultSlottedContent",void 0);var tt=class{};p([f({attribute:"aria-expanded"})],tt.prototype,"ariaExpanded",void 0);p([f({attribute:"aria-pressed"})],tt.prototype,"ariaPressed",void 0);ce(tt,y);ce(k,Pt,tt);function at(r){let t=r.parentElement;if(t)return t;{let e=r.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function yr(r,t){let e=t;for(;e!==null;){if(e===r)return!0;e=at(e)}return!1}var D=document.createElement("div");function wn(r){return r instanceof I}var ct=class{setProperty(t,e){h.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){h.queueUpdate(()=>this.target.removeProperty(t))}},de=class extends ct{constructor(t){super();let e=new CSSStyleSheet;e[wt]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(v.create([e]))}},he=class extends ct{constructor(){super();let t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}},fe=class extends ct{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);let{sheet:t}=this.style;if(t){let e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}},Bt=class{constructor(t){this.store=new Map,this.target=null;let e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),b.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}targetChanged(){if(this.target!==null)for(let[t,e]of this.store.entries())this.target.setProperty(t,e)}setProperty(t,e){this.store.set(t,e),h.queueUpdate(()=>{this.target!==null&&this.target.setProperty(t,e)})}removeProperty(t){this.store.delete(t),h.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(t)})}handleChange(t,e){let{sheet:n}=this.style;if(n){let o=n.insertRule(":host{}",n.cssRules.length);this.target=n.cssRules[o].style}else this.target=null}};p([T],Bt.prototype,"target",void 0);var pe=class{constructor(t){this.target=t.style}setProperty(t,e){h.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){h.queueUpdate(()=>this.target.removeProperty(t))}},N=class r{setProperty(t,e){r.properties[t]=e;for(let n of r.roots.values())G.getOrCreate(r.normalizeRoot(n)).setProperty(t,e)}removeProperty(t){delete r.properties[t];for(let e of r.roots.values())G.getOrCreate(r.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){let{roots:e}=r;if(!e.has(t)){e.add(t);let n=G.getOrCreate(this.normalizeRoot(t));for(let o in r.properties)n.setProperty(o,r.properties[o])}}static unregisterRoot(t){let{roots:e}=r;if(e.has(t)){e.delete(t);let n=G.getOrCreate(r.normalizeRoot(t));for(let o in r.properties)n.removeProperty(o)}}static normalizeRoot(t){return t===D?document:t}};N.roots=new Set;N.properties={};var ue=new WeakMap,Sn=h.supportsAdoptedStyleSheets?de:Bt,G=Object.freeze({getOrCreate(r){if(ue.has(r))return ue.get(r);let t;return r===D?t=new N:r instanceof Document?t=h.supportsAdoptedStyleSheets?new he:new fe:wn(r)?t=new Sn(r):t=new pe(r),ue.set(r,t),t}});var O=class r extends z{constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,t.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=r.uniqueId(),r.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(t){return new r({name:typeof t=="string"?t:t.name,cssCustomPropertyName:typeof t=="string"?t:t.cssCustomPropertyName===void 0?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return typeof t.cssCustomProperty=="string"}static isDerivedDesignTokenValue(t){return typeof t=="function"}static getTokenById(t){return r.tokensById.get(t)}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}createCSS(){return this.cssVar||""}getValueFor(t){let e=C.getOrCreate(t).get(this);if(e!==void 0)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof r&&(e=this.alias(e)),C.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),C.existsFor(t)&&C.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(D,t),this}subscribe(t,e){let n=this.getOrCreateSubscriberSet(e);e&&!C.existsFor(e)&&C.getOrCreate(e),n.has(t)||n.add(t)}unsubscribe(t,e){let n=this.subscribers.get(e||this);n&&n.has(t)&&n.delete(t)}notify(t){let e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach(n=>n.handleChange(e)),this.subscribers.has(t)&&this.subscribers.get(t).forEach(n=>n.handleChange(e))}alias(t){return(e=>t.getValueFor(e))}};O.uniqueId=(()=>{let r=0;return()=>(r++,r.toString(16))})();O.tokensById=new Map;var me=class{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){let{token:e,target:n}=t;this.add(e,n)}add(t,e){G.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(C.getOrCreate(e).get(t)))}remove(t,e){G.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&typeof t.createCSS=="function"?t.createCSS():t}},ge=class{constructor(t,e,n){this.source=t,this.token=e,this.node=n,this.dependencies=new Set,this.observer=b.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,M))}catch(t){console.error(t)}}},be=class{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),b.getNotifier(this).notify(t.id))}get(t){return b.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),b.getNotifier(this).notify(t.id)}all(){return this.values.entries()}},lt=new WeakMap,ut=new WeakMap,C=class r{constructor(t){this.target=t,this.store=new be,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,n)=>{let o=O.getTokenById(n);o&&(o.notify(this.target),this.updateCSSTokenReflection(e,o))}},lt.set(t,this),b.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof I?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}static getOrCreate(t){return lt.get(t)||new r(t)}static existsFor(t){return lt.has(t)}static findParent(t){if(D!==t.target){let e=at(t.target);for(;e!==null;){if(lt.has(e))return lt.get(e);e=at(e)}return r.getOrCreate(D)}return null}static findClosestAssignedNode(t,e){let n=e;do{if(n.has(t))return n;n=n.parent?n.parent:n.target!==D?r.getOrCreate(D):null}while(n!==null);return null}get parent(){return ut.get(this)||null}updateCSSTokenReflection(t,e){if(O.isCSSDesignToken(e)){let n=this.parent,o=this.isReflecting(e);if(n){let i=n.get(e),s=t.get(e);i!==s&&!o?this.reflectToCSS(e):i===s&&o&&this.stopReflectToCSS(e)}else o||this.reflectToCSS(e)}}has(t){return this.assignedValues.has(t)}get(t){let e=this.store.get(t);if(e!==void 0)return e;let n=this.getRaw(t);if(n!==void 0)return this.hydrate(t,n),this.get(t)}getRaw(t){var e;return this.assignedValues.has(t)?this.assignedValues.get(t):(e=r.findClosestAssignedNode(t,this))===null||e===void 0?void 0:e.getRaw(t)}set(t,e){O.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),O.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);let e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){let t=r.findParent(this);t&&t.appendChild(this);for(let e of this.assignedValues.keys())e.notify(this.target)}unbind(){this.parent&&ut.get(this).removeChild(this);for(let t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&ut.get(t).removeChild(t);let e=this.children.filter(n=>t.contains(n));ut.set(t,this),this.children.push(t),e.forEach(n=>t.appendChild(n)),b.getNotifier(this.store).subscribe(t);for(let[n,o]of this.store.all())t.hydrate(n,this.bindingObservers.has(n)?this.getRaw(n):o),t.updateCSSTokenReflection(t.store,n)}removeChild(t){let e=this.children.indexOf(t);if(e!==-1&&this.children.splice(e,1),b.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;let n=ut.delete(t);for(let[o]of this.store.all())t.hydrate(o,t.getRaw(o)),t.updateCSSTokenReflection(t.store,o);return n}contains(t){return yr(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),r.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),r.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){let n=O.getTokenById(e);n&&(this.hydrate(n,this.getRaw(n)),this.updateCSSTokenReflection(this.store,n))}hydrate(t,e){if(!this.has(t)){let n=this.bindingObservers.get(t);O.isDerivedDesignTokenValue(e)?n?n.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(n&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){let n=new ge(e,t,this);return this.bindingObservers.set(t,n),n}tearDownBindingObserver(t){return this.bindingObservers.has(t)?(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0):!1}};C.cssCustomPropertyReflector=new me;p([T],C.prototype,"children",void 0);function Cn(r){return O.from(r)}var dt=Object.freeze({create:Cn,notifyConnection(r){return!r.isConnected||!C.existsFor(r)?!1:(C.getOrCreate(r).bind(),!0)},notifyDisconnection(r){return r.isConnected||!C.existsFor(r)?!1:(C.getOrCreate(r).unbind(),!0)},registerRoot(r=D){N.registerRoot(r)},unregisterRoot(r=D){N.unregisterRoot(r)}});var ye=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),ve=new Map,Ft=new Map,et=null,ht=g.createInterface(r=>r.cachedCallback(t=>(et===null&&(et=new Mt(null,t)),et))),we=Object.freeze({tagFor(r){return Ft.get(r)},responsibleFor(r){let t=r.$$designSystem$$;return t||g.findResponsibleContainer(r).get(ht)},getOrCreate(r){if(!r)return et===null&&(et=g.getOrCreateDOMContainer().get(ht)),et;let t=r.$$designSystem$$;if(t)return t;let e=g.getOrCreateDOMContainer(r);if(e.has(ht,!1))return e.get(ht);{let n=new Mt(r,e);return e.register(q.instance(ht,n)),n}}});function kn(r,t,e){return typeof r=="string"?{name:r,type:t,callback:e}:r}var Mt=class{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>ye.definitionCallbackOnly,t!==null&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){let e=this.container,n=[],o=this.disambiguate,i=this.shadowRootMode,s={elementPrefix:this.prefix,tryDefineElement(a,l,c){let d=kn(a,l,c),{name:m,callback:x,baseClass:R}=d,{type:w}=d,P=m,gt=ve.get(P),Nt=!0;for(;gt;){let $e=o(P,w,gt);switch($e){case ye.ignoreDuplicate:return;case ye.definitionCallbackOnly:Nt=!1,gt=void 0;break;default:P=$e,gt=ve.get(P);break}}Nt&&((Ft.has(w)||w===L)&&(w=class extends w{}),ve.set(P,w),Ft.set(w,P),R&&Ft.set(R,P)),n.push(new xe(e,P,w,i,x,Nt))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&dt.registerRoot(this.designTokenRoot)),e.registerWithContext(s,...t);for(let a of n)a.callback(a),a.willDefine&&a.definition!==null&&a.definition.define();return this}},xe=class{constructor(t,e,n,o,i,s){this.container=t,this.name=e,this.type=n,this.shadowRootMode=o,this.callback=i,this.willDefine=s,this.definition=null}definePresentation(t){At.define(this.name,t,this.container)}defineElement(t){this.definition=new $(this.type,Object.assign(Object.assign({},t),{name:this.name}))}tagFor(t){return we.tagFor(t)}};var vr="not-allowed";var Pn=":host([hidden]){display:none}";function xr(r){return`${Pn}:host{display:${r}}`}var ft=lr()?"focus-visible":"focus";function wr(r){return we.getOrCreate(r).withPrefix("vscode")}function Cr(r){window.addEventListener("load",()=>{new MutationObserver(()=>{Sr(r)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),Sr(r)})}function Sr(r){let t=getComputedStyle(document.body),e=document.querySelector("body");if(e){let n=e.getAttribute("data-vscode-theme-kind");for(let[o,i]of r){let s=t.getPropertyValue(o).toString();if(n==="vscode-high-contrast")s.length===0&&i.name.includes("background")&&(s="transparent"),i.name==="button-icon-hover-background"&&(s="transparent");else if(n==="vscode-high-contrast-light"){if(s.length===0&&i.name.includes("background"))switch(i.name){case"button-primary-hover-background":s="#0F4A85";break;case"button-secondary-hover-background":s="transparent";break;case"button-icon-hover-background":s="transparent";break}}else i.name==="contrast-active-border"&&(s="transparent");i.setValueFor(e,s)}}}var kr=new Map,Pr=!1;function u(r,t){let e=dt.create(r);if(t){if(t.includes("--fake-vscode-token")){let n="id"+Math.random().toString(16).slice(2);t=`${t}-${n}`}kr.set(t,e)}return Pr||(Cr(kr),Pr=!0),e}var La=u("background","--vscode-editor-background").withDefault("#1e1e1e"),_=u("border-width").withDefault(1),Tr=u("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518"),Na=u("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df"),ja=u("corner-radius").withDefault(0),Er=u("corner-radius-round").withDefault(2),Se=u("design-unit").withDefault(4),Or=u("disabled-opacity").withDefault(.4),pt=u("focus-border","--vscode-focusBorder").withDefault("#007fd4"),Rr=u("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"),Va=u("font-weight","--vscode-font-weight").withDefault("400"),$r=u("foreground","--vscode-foreground").withDefault("#cccccc"),Ha=u("input-height").withDefault("26"),za=u("input-min-width").withDefault("100px"),Dr=u("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),Ar=u("type-ramp-base-line-height").withDefault("normal"),Ua=u("type-ramp-minus1-font-size").withDefault("11px"),qa=u("type-ramp-minus1-line-height").withDefault("16px"),Wa=u("type-ramp-minus2-font-size").withDefault("9px"),Ga=u("type-ramp-minus2-line-height").withDefault("16px"),Qa=u("type-ramp-plus1-font-size").withDefault("16px"),Ja=u("type-ramp-plus1-line-height").withDefault("24px"),Xa=u("scrollbarWidth").withDefault("10px"),Ya=u("scrollbarHeight").withDefault("10px"),Za=u("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),Ka=u("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),tc=u("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),ec=u("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),rc=u("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),_r=u("button-border","--vscode-button-border").withDefault("transparent"),Ce=u("button-icon-background").withDefault("transparent"),Br=u("button-icon-corner-radius").withDefault("5px"),Fr=u("button-icon-outline-offset").withDefault(0),ke=u("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),Mr=u("button-icon-padding").withDefault("3px"),Q=u("button-primary-background","--vscode-button-background").withDefault("#0e639c"),Pe=u("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),Te=u("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),It=u("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),Ir=u("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),Lr=u("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),Nr=u("button-padding-horizontal").withDefault("11px"),jr=u("button-padding-vertical").withDefault("4px"),nc=u("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),oc=u("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),ic=u("checkbox-corner-radius").withDefault(3),sc=u("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0"),ac=u("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),cc=u("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),lc=u("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),uc=u("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),dc=u("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),hc=u("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c"),fc=u("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0"),pc=u("dropdown-list-max-height").withDefault("200px"),mc=u("input-background","--vscode-input-background").withDefault("#3c3c3c"),gc=u("input-foreground","--vscode-input-foreground").withDefault("#cccccc"),bc=u("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc"),yc=u("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),vc=u("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),xc=u("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),wc=u("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),Sc=u("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),Cc=u("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799"),kc=u("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),Pc=u("panel-view-border","--vscode-panel-border").withDefault("#80808059"),Tc=u("tag-corner-radius").withDefault("2px");function Vr(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var Tn=U`
${xr("inline-flex")} :host {
outline: none;
font-family: ${Rr};
font-size: ${Dr};
line-height: ${Ar};
color: ${Pe};
background: ${Q};
border-radius: calc(${Er} * 1px);
fill: currentColor;
cursor: pointer;
}
.control {
background: transparent;
height: inherit;
flex-grow: 1;
box-sizing: border-box;
display: inline-flex;
justify-content: center;
align-items: center;
padding: ${jr} ${Nr};
white-space: wrap;
outline: none;
text-decoration: none;
border: calc(${_} * 1px) solid ${_r};
color: inherit;
border-radius: inherit;
fill: inherit;
cursor: inherit;
font-family: inherit;
}
:host(:hover) {
background: ${Te};
}
:host(:active) {
background: ${Q};
}
.control:${ft} {
outline: calc(${_} * 1px) solid ${pt};
outline-offset: calc(${_} * 2px);
}
.control::-moz-focus-inner {
border: 0;
}
:host([disabled]) {
opacity: ${Or};
background: ${Q};
cursor: ${vr};
}
.content {
display: flex;
}
.start {
display: flex;
}
::slotted(svg),
::slotted(span) {
width: calc(${Se} * 4px);
height: calc(${Se} * 4px);
}
.start {
margin-inline-end: 8px;
}
`,En=U`
:host([appearance='primary']) {
background: ${Q};
color: ${Pe};
}
:host([appearance='primary']:hover) {
background: ${Te};
}
:host([appearance='primary']:active) .control:active {
background: ${Q};
}
:host([appearance='primary']) .control:${ft} {
outline: calc(${_} * 1px) solid ${pt};
outline-offset: calc(${_} * 2px);
}
:host([appearance='primary'][disabled]) {
background: ${Q};
}
`,On=U`
:host([appearance='secondary']) {
background: ${It};
color: ${Ir};
}
:host([appearance='secondary']:hover) {
background: ${Lr};
}
:host([appearance='secondary']:active) .control:active {
background: ${It};
}
:host([appearance='secondary']) .control:${ft} {
outline: calc(${_} * 1px) solid ${pt};
outline-offset: calc(${_} * 2px);
}
:host([appearance='secondary'][disabled]) {
background: ${It};
}
`,Rn=U`
:host([appearance='icon']) {
background: ${Ce};
border-radius: ${Br};
color: ${$r};
}
:host([appearance='icon']:hover) {
background: ${ke};
outline: 1px dotted ${Tr};
outline-offset: -1px;
}
:host([appearance='icon']) .control {
padding: ${Mr};
border: none;
}
:host([appearance='icon']:active) .control:active {
background: ${ke};
}
:host([appearance='icon']) .control:${ft} {
outline: calc(${_} * 1px) solid ${pt};
outline-offset: ${Fr};
}
:host([appearance='icon'][disabled]) {
background: ${Ce};
}
`,Hr=(r,t)=>U`
${Tn}
${En}
${On}
${Rn}
`;var Lt=class extends k{connectedCallback(){if(super.connectedCallback(),!this.appearance){let t=this.getAttribute("appearance");this.appearance=t}}attributeChangedCallback(t,e,n){t==="appearance"&&n==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),t==="aria-label"&&(this.ariaLabel=n),t==="disabled"&&(this.disabled=n!==null)}};Vr([f],Lt.prototype,"appearance",void 0);var Ee=Lt.compose({baseName:"button",template:hr,styles:Hr,shadowOptions:{delegatesFocus:!0}});var mt=document.getElementById("solutionsContainer"),Oe=acquireVsCodeApi(),Re=0,zr=!1,$n=[{name:"pre",attributes:["class","style","tabindex"]},{name:"code"},{name:"span",attributes:["class","style"]}];wr().register(Ee());window.addEventListener("DOMContentLoaded",()=>{Oe.postMessage({command:"webviewReady"}),Vn()});window.addEventListener("message",r=>{let t=r.data;switch(t.command){case"solutionsUpdated":Dn(t);break;case"navigatePreviousSolution":Ln();break;case"navigateNextSolution":Nn();break}});function Dn(r){jn(r),mt&&mt.replaceChildren(...r.solutions.flatMap((t,e)=>An(t,e)))}function An(r,t){let e=t+1,n=document.createElement("h3");n.className="solutionHeading",n.id=`solution-${e}-heading`,n.textContent=`Suggestion ${e}`;let o=document.createElement("div");o.className="snippetContainer",o.setAttribute("aria-labelledby",n.id),o.setAttribute("role","group"),o.dataset.solutionIndex=String(t),_n(o,r.htmlSnippet);let i=document.createElement("vscode-button");i.setAttribute("role","button"),i.className="acceptButton",i.id=`acceptButton${t}`,i.setAttribute("appearance","secondary"),i.dataset.solutionIndex=String(t),i.textContent=`Accept suggestion ${e}`;let s=[n,o],a=r.citation?Mn(r.citation):void 0;return a&&s.push(a),s.push(i),s}function _n(r,t){r.setHTML(t,{sanitizer:Fn()})}var Bn;function Fn(){return Bn??=new Sanitizer({elements:$n})}function Mn(r){let t=document.createElement("p"),e=document.createElement("span");e.style.verticalAlign="text-bottom",e.setAttribute("aria-hidden","true"),e.textContent="Warning",t.append(e," ",r.message," ");let n=In(r.url);if(n){let o=document.createElement("a");o.href=n,o.target="_blank",o.rel="noreferrer noopener",o.textContent="Inspect source code",t.append(o)}return t}function In(r){try{let t=new URL(r);return t.protocol==="https:"?t.href:void 0}catch{return}}function Ln(){let r=document.querySelectorAll(".snippetContainer pre"),t=Re-1;r[t]?.focus()}function Nn(){let r=document.querySelectorAll(".snippetContainer pre"),t=(Re??-1)+1;r[t]?r[t].focus():r[0]&&r[0].focus()}function jn(r){let t=document.getElementById("progress-bar"),e=document.getElementById("loadingContainer");if(!(!t||!e))if(r.percentage>=100)e.innerHTML=`${r.solutions.length} Suggestions`;else{let n=e.querySelector("label");n.textContent!=="Loading suggestions:\xA0"&&(n.textContent="Loading suggestions:\xA0"),t.value=r.percentage}}function Vn(){zr||mt===null||(mt.addEventListener("focusin",r=>{let t=r.target,e=Ur(t);e!==void 0&&Hn(e)}),mt.addEventListener("click",r=>{let e=r.target?.closest("vscode-button[data-solution-index]");if(!(e instanceof HTMLElement))return;let n=Ur(e);n!==void 0&&zn(n)}),zr=!0)}function Ur(r){let t=r?.closest("[data-solution-index]");if(!(t instanceof HTMLElement))return;let e=t.getAttribute("data-solution-index");if(e===null)return;let n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}function Hn(r){Re=r,Oe.postMessage({command:"focusSolution",solutionIndex:r})}function zn(r){Oe.postMessage({command:"acceptSolution",solutionIndex:r})}})();
/*! Bundled license information:
tslib/tslib.es6.js:
(*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *)
*/