@fluid-topics/ft-search-input 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-input.light.js +42 -40
- package/build/ft-search-input.min.js +83 -81
- package/package.json +9 -9
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
opacity: ${l.opacityContentOnSurfacePressed};
|
|
89
89
|
transform: translate(-50%, -50%) scale(1);
|
|
90
90
|
}
|
|
91
|
-
`;var x,v=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class b extends i.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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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
|
|
91
|
+
`;var x,v=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class b extends i.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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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(null==t?void 0: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 e.html`
|
|
92
92
|
<style>
|
|
93
93
|
.ft-ripple .ft-ripple--effect,
|
|
94
94
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
<div class="ft-ripple--background"></div>
|
|
106
106
|
<div class="ft-ripple--effect"></div>
|
|
107
107
|
</div>
|
|
108
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}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");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}b.elementDefinitions={},b.styles=g,v([o.property({type:Boolean})],b.prototype,"primary",void 0),v([o.property({type:Boolean})],b.prototype,"secondary",void 0),v([o.property({type:Boolean})],b.prototype,"unbounded",void 0),v([o.property({type:Boolean})],b.prototype,"activated",void 0),v([o.property({type:Boolean})],b.prototype,"selected",void 0),v([o.property({type:Boolean})],b.prototype,"disabled",void 0),v([o.state()],b.prototype,"hovered",void 0),v([o.state()],b.prototype,"focused",void 0),v([o.state()],b.prototype,"pressed",void 0),v([o.state()],b.prototype,"rippling",void 0),v([o.state()],b.prototype,"rippleSize",void 0),v([o.state()],b.prototype,"originX",void 0),v([o.state()],b.prototype,"originY",void 0),v([o.query(".ft-ripple")],b.prototype,"ripple",void 0),v([o.query(".ft-ripple--effect")],b.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(b);const y=window,m=y.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,S="?"+k,C=`<${S}>`,z=document,O=()=>z.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,A=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,T=/"/g,F=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),P=new WeakMap,L=z.createTreeWalker(z,129,null,!1),_=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=U;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===U?"!--"===l[1]?r=N:void 0!==l[1]?r=M:void 0!==l[2]?(F.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=A):void 0!==l[3]&&(r=A):r===A?">"===l[0]?(r=null!=s?s:U,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?A:'"'===l[3]?T:B):r===T||r===B?r=A:r===N||r===M?r=U:(r=A,s=void 0);const c=r===A&&t[i+1].startsWith("/>")?" ":"";n+=r===U?e+C:p>=0?(o.push(a),e.slice(0,p)+w+e.slice(p)+k+c):e+k+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=_(t,i);if(this.el=K.createElement(l,e),L.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=L.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(w)||i.startsWith(k)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+w).split(k),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?Q:"?"===i[1]?X:"@"===i[1]?Y:q})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(k),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),L.nextNode(),a.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)a.push({type:7,index:s}),t+=k.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var s,n,r,a;if(i===R)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=E(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class G{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);L.currentNode=s;let n=L.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new H(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new J(n,this,t)),this._$AV.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=L.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,o){var s;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=W(this,t,i),E(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new G(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=P.get(t.strings);return void 0===i&&P.set(t.strings,i=new K(t)),i}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new H(this.k(O()),this.k(O()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,s){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=W(this,t,i,0),n=!E(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=W(this,o[e+r],i,r),a===R&&(a=this._$AH[r]),n||(n=!E(a)||a!==this._$AH[r]),a===Z?t=Z:t!==Z&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const V=m?m.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class Y extends q{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:Z)===R)return;const o=this._$AH,s=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Z&&(o===Z||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const tt=y.litHtmlPolyfillSupport;null==tt||tt(K,H),(null!==(x=y.litHtmlVersions)&&void 0!==x?x:y.litHtmlVersions=[]).push("2.7.3");
|
|
108
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}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");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}b.elementDefinitions={},b.styles=g,v([o.property({type:Boolean})],b.prototype,"primary",void 0),v([o.property({type:Boolean})],b.prototype,"secondary",void 0),v([o.property({type:Boolean})],b.prototype,"unbounded",void 0),v([o.property({type:Boolean})],b.prototype,"activated",void 0),v([o.property({type:Boolean})],b.prototype,"selected",void 0),v([o.property({type:Boolean})],b.prototype,"disabled",void 0),v([o.state()],b.prototype,"hovered",void 0),v([o.state()],b.prototype,"focused",void 0),v([o.state()],b.prototype,"pressed",void 0),v([o.state()],b.prototype,"rippling",void 0),v([o.state()],b.prototype,"rippleSize",void 0),v([o.state()],b.prototype,"originX",void 0),v([o.state()],b.prototype,"originY",void 0),v([o.query(".ft-ripple")],b.prototype,"ripple",void 0),v([o.query(".ft-ripple--effect")],b.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(b);const y=window,m=y.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,S="?"+k,C=`<${S}>`,z=document,O=()=>z.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,A=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,T=/"/g,F=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),L=new WeakMap,P=z.createTreeWalker(z,129,null,!1),_=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=U;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===U?"!--"===l[1]?r=N:void 0!==l[1]?r=M:void 0!==l[2]?(F.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=A):void 0!==l[3]&&(r=A):r===A?">"===l[0]?(r=null!=s?s:U,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?A:'"'===l[3]?T:B):r===T||r===B?r=A:r===N||r===M?r=U:(r=A,s=void 0);const c=r===A&&t[i+1].startsWith("/>")?" ":"";n+=r===U?e+C:p>=0?(o.push(a),e.slice(0,p)+w+e.slice(p)+k+c):e+k+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=_(t,i);if(this.el=K.createElement(l,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(w)||i.startsWith(k)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+w).split(k),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:q})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(k),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),P.nextNode(),a.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)a.push({type:7,index:s}),t+=k.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var s,n,r,a;if(i===R)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=E(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);P.currentNode=s;let n=P.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new G(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new J(n,this,t)),this._$AV.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=P.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=W(this,t,i),E(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new H(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=L.get(t.strings);return void 0===i&&L.set(t.strings,i=new K(t)),i}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new G(this.k(O()),this.k(O()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,s){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=W(this,t,i,0),n=!E(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=W(this,o[e+r],i,r),a===R&&(a=this._$AH[r]),n||(n=!E(a)||a!==this._$AH[r]),a===Z?t=Z:t!==Z&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const Q=m?m.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class Y extends q{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:Z)===R)return;const o=this._$AH,s=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Z&&(o===Z||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const tt=y.litHtmlPolyfillSupport;null==tt||tt(K,G),(null!==(x=y.litHtmlVersions)&&void 0!==x?x:y.litHtmlVersions=[]).push("2.7.3");
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2020 Google LLC
|
|
112
112
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
113
113
|
*/
|
|
114
|
-
const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void 0:t._$litStatic$},ot=t=>({_$litStatic$:t,r:it}),st=new Map,nt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=et(n));)l+=s+i[++p],h=!0;p!==o&&a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=st.get(t))&&(r.raw=r,st.set(t,i=r)),e=a}return t(i,...e)})(D);var rt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(rt||(rt={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),pt={fontFamily:lt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",pt.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",pt.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",pt.letterSpacing,"0.15px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",pt.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",pt.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",pt.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",pt.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",pt.letterSpacing,"0.105px"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",pt.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",pt.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",pt.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",pt.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",pt.letterSpacing,"0.144px"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",pt.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",pt.textTransform,"inherit"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",pt.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",pt.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",pt.letterSpacing,"0.098px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",pt.lineHeight,"1.7"),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",pt.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",pt.fontSize,"16px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",pt.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",pt.letterSpacing,"0.496px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",pt.lineHeight,"1.5"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",pt.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),
|
|
114
|
+
const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void 0:t._$litStatic$},ot=t=>({_$litStatic$:t,r:it}),st=new Map,nt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=et(n));)l+=s+i[++p],h=!0;p!==o&&a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=st.get(t))&&(r.raw=r,st.set(t,i=r)),e=a}return t(i,...e)})(D);var rt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(rt||(rt={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),pt={fontFamily:lt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",pt.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",pt.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",pt.letterSpacing,"0.15px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",pt.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",pt.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",pt.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",pt.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",pt.letterSpacing,"0.105px"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",pt.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",pt.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",pt.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",pt.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",pt.letterSpacing,"0.144px"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",pt.lineHeight,"1.5"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",pt.textTransform,"inherit"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",pt.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",pt.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",pt.letterSpacing,"0.098px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",pt.lineHeight,"1.7"),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",pt.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",pt.fontSize,"16px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",pt.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",pt.letterSpacing,"0.496px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",pt.lineHeight,"1.5"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",pt.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",pt.fontSize,"14px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",pt.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",pt.letterSpacing,"0.252px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",pt.lineHeight,"1.4"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",pt.textTransform,"inherit"),Ht=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",lt),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",pt.fontSize,"12px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",pt.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",pt.letterSpacing,"0.396px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",pt.lineHeight,"1.33"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",pt.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",lt),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",pt.fontSize,"10px"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",pt.fontWeight,"normal"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",pt.letterSpacing,"0.33px"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",pt.lineHeight,"1.6"),oi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",pt.textTransform,"inherit"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",lt),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",pt.fontSize,"10px"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",pt.fontWeight,"normal"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",pt.letterSpacing,"1.5px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",pt.lineHeight,"1.6"),pi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",pt.textTransform,"uppercase"),hi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",lt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",pt.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",pt.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",pt.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",pt.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",pt.textTransform,"uppercase")},ci=e.css`
|
|
115
115
|
.ft-typography--title {
|
|
116
116
|
font-family: ${ht};
|
|
117
117
|
font-size: ${ct};
|
|
@@ -160,19 +160,19 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
160
160
|
`,xi=e.css`
|
|
161
161
|
.ft-typography--body2 {
|
|
162
162
|
font-family: ${Zt};
|
|
163
|
-
font-size: ${
|
|
164
|
-
font-weight: ${
|
|
163
|
+
font-size: ${Lt};
|
|
164
|
+
font-weight: ${Pt};
|
|
165
165
|
letter-spacing: ${_t};
|
|
166
166
|
line-height: ${Kt};
|
|
167
167
|
text-transform: ${Wt};
|
|
168
168
|
}
|
|
169
169
|
`,vi=e.css`
|
|
170
170
|
.ft-typography--caption {
|
|
171
|
-
font-family: ${
|
|
172
|
-
font-size: ${
|
|
171
|
+
font-family: ${Ht};
|
|
172
|
+
font-size: ${Gt};
|
|
173
173
|
font-weight: ${qt};
|
|
174
|
-
letter-spacing: ${
|
|
175
|
-
line-height: ${
|
|
174
|
+
letter-spacing: ${Vt};
|
|
175
|
+
line-height: ${Qt};
|
|
176
176
|
text-transform: ${Xt};
|
|
177
177
|
}
|
|
178
178
|
`,bi=e.css`
|
|
@@ -255,7 +255,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
255
255
|
@touchstart=${this.onTouch}>
|
|
256
256
|
<slot></slot>
|
|
257
257
|
<div part="tooltip" role="tooltip" inert
|
|
258
|
-
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
258
|
+
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
259
259
|
?hidden=${!this.visible}>
|
|
260
260
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
261
261
|
<slot name="text"></slot>
|
|
@@ -371,7 +371,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
371
371
|
|
|
372
372
|
i.ft-icon.ft-icon--fluid-topics {
|
|
373
373
|
font-family: ${Bi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
374
|
-
|
|
374
|
+
|
|
375
375
|
/* Ugly fix because font is broken */
|
|
376
376
|
font-size: calc(0.75 * ${Bi.size});
|
|
377
377
|
line-height: ${Bi.size};
|
|
@@ -392,7 +392,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
392
392
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
393
393
|
<slot ?hidden=${i}></slot>
|
|
394
394
|
</i>
|
|
395
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Fi.file_format:this.resolvedIcon=null!==(t=Ni[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Fi.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ui[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ri.elementDefinitions={},Ri.styles=Ti,Di([o.property()],Ri.prototype,"variant",void 0),Di([o.property()],Ri.prototype,"value",void 0),Di([o.state()],Ri.prototype,"resolvedIcon",void 0),Di([o.query("slot")],Ri.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ri);const Zi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),
|
|
395
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Fi.file_format:this.resolvedIcon=null!==(t=Ni[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Fi.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ui[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ri.elementDefinitions={},Ri.styles=Ti,Di([o.property()],Ri.prototype,"variant",void 0),Di([o.property()],Ri.prototype,"value",void 0),Di([o.state()],Ri.prototype,"resolvedIcon",void 0),Di([o.query("slot")],Ri.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Ri);const Zi=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Li={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Zi,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",hi.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Zi),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Pi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),_i={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Pi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Pi)},Ki=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Wi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Hi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Gi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),qi=[e.css`
|
|
396
396
|
:host {
|
|
397
397
|
display: inline-block;
|
|
398
398
|
max-width: 100%;
|
|
@@ -403,7 +403,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
403
403
|
box-shadow: 0px 0px 0px transparent;
|
|
404
404
|
border: 0px solid transparent;
|
|
405
405
|
text-shadow: 0px 0px 0px transparent;
|
|
406
|
-
font-size: ${
|
|
406
|
+
font-size: ${Li.fontSize};
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
button:hover {
|
|
@@ -432,39 +432,39 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
432
432
|
border: none;
|
|
433
433
|
pointer-events: auto;
|
|
434
434
|
|
|
435
|
-
--ft-button-internal-line-height: max(calc(${
|
|
436
|
-
--ft-button-internal-color: ${
|
|
437
|
-
${i.setVariable(Bi.size,
|
|
438
|
-
${i.setVariable(l.color,
|
|
435
|
+
--ft-button-internal-line-height: max(calc(${Li.fontSize} + 2px), ${Li.iconSize});
|
|
436
|
+
--ft-button-internal-color: ${Li.color};
|
|
437
|
+
${i.setVariable(Bi.size,Li.iconSize)};
|
|
438
|
+
${i.setVariable(l.color,Li.rippleColor)};
|
|
439
439
|
|
|
440
|
-
border-radius: ${
|
|
441
|
-
padding: ${
|
|
442
|
-
background-color: ${
|
|
440
|
+
border-radius: ${Li.borderRadius};
|
|
441
|
+
padding: ${Li.verticalPadding} ${Li.horizontalPadding};
|
|
442
|
+
background-color: ${Li.backgroundColor};
|
|
443
443
|
color: var(--ft-button-internal-color);
|
|
444
444
|
-webkit-mask-image: radial-gradient(white, black);
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
.ft-button.ft-button--outlined {
|
|
448
448
|
border: 1px solid var(--ft-button-internal-color);
|
|
449
|
-
padding: calc(${
|
|
449
|
+
padding: calc(${Li.verticalPadding} - 1px) calc(${Li.horizontalPadding} - 1px);
|
|
450
450
|
}
|
|
451
|
-
|
|
451
|
+
|
|
452
452
|
.ft-button.ft-button--dense {
|
|
453
|
-
padding: ${Wi} ${
|
|
453
|
+
padding: ${Wi} ${Hi};
|
|
454
454
|
border-radius: ${Ki};
|
|
455
|
-
gap: ${
|
|
455
|
+
gap: ${Gi};
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
459
|
-
padding: calc(${Wi} - 1px) calc(${
|
|
459
|
+
padding: calc(${Wi} - 1px) calc(${Hi} - 1px);
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
|
|
462
462
|
.ft-button:not([disabled]):hover {
|
|
463
463
|
cursor: pointer;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
.ft-button--round {
|
|
467
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
467
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Li.verticalPadding});
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
.ft-button--round.ft-button--dense {
|
|
@@ -473,7 +473,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
473
473
|
|
|
474
474
|
.ft-button[disabled] {
|
|
475
475
|
filter: grayscale(1);
|
|
476
|
-
opacity: ${
|
|
476
|
+
opacity: ${Li.opacityDisabled};
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
.ft-button.ft-button--primary {
|
|
@@ -492,13 +492,13 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
492
492
|
white-space: nowrap;
|
|
493
493
|
text-overflow: ellipsis;
|
|
494
494
|
display: block;
|
|
495
|
-
margin: 0 ${
|
|
495
|
+
margin: 0 ${Li.iconPadding};
|
|
496
496
|
${i.setVariable(hi.fontSize,"1em")};
|
|
497
497
|
${i.setVariable(hi.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
.ft-button--dense .ft-button--label {
|
|
501
|
-
margin: 0 ${
|
|
501
|
+
margin: 0 ${Gi};
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
.ft-button--label[hidden] {
|
|
@@ -511,12 +511,12 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
.ft-button--label[hidden] + ft-icon {
|
|
514
|
-
margin: 0 calc(${
|
|
515
|
-
padding: 0 ${
|
|
514
|
+
margin: 0 calc(${Li.horizontalPadding} * -1);
|
|
515
|
+
padding: 0 ${Li.verticalPadding};
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
519
|
-
margin: 0 calc(${
|
|
519
|
+
margin: 0 calc(${Hi} * -1);
|
|
520
520
|
padding: 0 ${Wi};
|
|
521
521
|
}
|
|
522
522
|
|
|
@@ -526,10 +526,10 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
ft-loader {
|
|
529
|
-
${i.setVariable(Ei.size,
|
|
529
|
+
${i.setVariable(Ei.size,Li.iconSize)};
|
|
530
530
|
${i.setVariable(Ei.color,"var(--ft-button-internal-color)")};
|
|
531
531
|
}
|
|
532
|
-
`,i.noTextSelect];var
|
|
532
|
+
`,i.noTextSelect];var Vi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Qi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
533
533
|
<button part="button"
|
|
534
534
|
class="${s.classMap(t)}"
|
|
535
535
|
aria-label="${this.getLabel()}"
|
|
@@ -550,9 +550,9 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
550
550
|
position="${this.tooltipPosition}">
|
|
551
551
|
${t}
|
|
552
552
|
</ft-tooltip>
|
|
553
|
-
|
|
553
|
+
`:t}resolveIcon(){return this.loading?e.html`
|
|
554
554
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
555
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
555
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Qi.elementDefinitions={"ft-ripple":b,"ft-tooltip":Oi,"ft-typography":ki,"ft-icon":Ri,"ft-loader":ji},Qi.styles=[i.safariEllipsisFix,qi],Vi([o.property({type:String,reflect:!0})],Qi.prototype,"role",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"primary",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"outlined",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"disabled",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"dense",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"round",void 0),Vi([o.property()],Qi.prototype,"label",void 0),Vi([o.property()],Qi.prototype,"icon",void 0),Vi([o.property()],Qi.prototype,"iconVariant",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"trailingIcon",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"loading",void 0),Vi([o.property()],Qi.prototype,"tooltipPosition",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"hideTooltip",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"forceTooltip",void 0),Vi([o.query(".ft-button")],Qi.prototype,"button",void 0),Vi([o.query(".ft-button--label slot")],Qi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Qi);const Xi={height:i.FtCssVariableFactory.create("--ft-search-input-height","SIZE","38px"),borderRadius:i.FtCssVariableFactory.extend("--ft-search-input-border-radius",i.designSystemVariables.borderRadiusS),desktopFiltersHeight:i.FtCssVariableFactory.create("--ft-search-input-desktop-filters-height","SIZE","350px"),floatingZIndex:i.FtCssVariableFactory.create("--ft-search-input-floating-components-z-index","NUMBER","3"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),elevation02:i.FtCssVariableFactory.external(i.designSystemVariables.elevation02,"Design system"),buttonColor:i.FtCssVariableFactory.external(Li.color,"Button"),buttonRippleColor:i.FtCssVariableFactory.external(Li.rippleColor,"Button")},Yi=e.css`
|
|
556
556
|
* {
|
|
557
557
|
box-sizing: border-box;
|
|
558
558
|
}
|
|
@@ -613,7 +613,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
613
613
|
.ft-search-input > ft-button,
|
|
614
614
|
.ft-search-input--actions ft-button {
|
|
615
615
|
flex-shrink: 0;
|
|
616
|
-
${i.setVariable(
|
|
616
|
+
${i.setVariable(Li.backgroundColor,"transparent")};
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
.ft-search-input .ft-search-input--launch-search {
|
|
@@ -632,7 +632,9 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
632
632
|
<slot></slot>
|
|
633
633
|
`}updated(t){super.updated(t),t.has("baseUrl")&&te.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&te.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&te.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&te.actions.setNoCustom(this.noCustom),t.has("editorMode")&&te.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&te.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&te.actions.setSession(this.session),t.has("availableUiLocales")&&te.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ne.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}le.elementDefinitions={},le.styles=Ji,ae([o.property()],le.prototype,"baseUrl",void 0),ae([o.property()],le.prototype,"apiIntegrationIdentifier",void 0),ae([o.property()],le.prototype,"uiLocale",void 0),ae([i.jsonProperty([])],le.prototype,"availableUiLocales",void 0),ae([o.property({type:Boolean})],le.prototype,"editorMode",void 0),ae([o.property({type:Boolean})],le.prototype,"noCustom",void 0),ae([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],le.prototype,"noCustomComponent",void 0),ae([o.property({type:Boolean})],le.prototype,"withManualResources",void 0),ae([i.jsonProperty([])],le.prototype,"messageContexts",void 0),ae([i.jsonProperty(void 0)],le.prototype,"session",void 0),ae([o.property({type:Object})],le.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(le);var pe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class he extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const ce=Symbol("registerInterval");class fe extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ce]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[ce]):this.dispatchEvent(new he)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=ce,pe([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}const de=e.css`
|
|
634
634
|
`;var ue=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const ge=Symbol("i18nProperties"),xe=Symbol("i18nUnsubs");function ve(t){var i;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[i]=new Map}get i18nService(){return this.useCustomMessageContexts?re:ne}i18n(t,i,...e){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[ge])||void 0===i||i.forEach(((i,e)=>{i.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(i))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var i;super.updated(t),null===(i=this[ge])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ge]&&new Set([...this[ge].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[xe].has(t)||this[xe].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[xe].forEach((t=>t())),this[xe].clear()}}return i=xe,ue([o.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class be extends(ve(i.FtLitElement)){}class ye extends(ve(i.FtLitElementRedux)){}var me=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class $e extends ye{constructor(){super(),this.editorMode=!1,this.addStore(te)}render(){return this.key&&this.context?e.html`
|
|
635
|
-
<span class="ft-i18n"
|
|
635
|
+
<span class="ft-i18n">
|
|
636
|
+
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
637
|
+
</span>
|
|
636
638
|
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}$e.elementDefinitions={},$e.styles=de,me([i.redux()],$e.prototype,"editorMode",void 0),me([o.property()],$e.prototype,"context",void 0),me([o.property()],$e.prototype,"key",void 0),me([i.jsonProperty([])],$e.prototype,"args",void 0),me([o.property()],$e.prototype,"defaultMessage",void 0);class we{static build(t){return new we(t)}static fromGwt(t){return new we(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)=>ne.resolveMessage(this.name,i,...t)})}}i.customElement("ft-i18n")($e);const ke=we.build("designedSearchInput"),Se=e.css`
|
|
637
639
|
* {
|
|
638
640
|
box-sizing: border-box;
|
|
@@ -719,4 +721,4 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
719
721
|
></ft-button>
|
|
720
722
|
</div>
|
|
721
723
|
</div>
|
|
722
|
-
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}Ie.elementDefinitions={"ft-search-input-suggestion":Oe,"ft-button":
|
|
724
|
+
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}Ie.elementDefinitions={"ft-search-input-suggestion":Oe,"ft-button":Qi},Ie.styles=[xi,Yi],Ee([i.redux()],Ie.prototype,"request",void 0),Ee([i.redux()],Ie.prototype,"liveQuery",void 0),Ee([i.redux()],Ie.prototype,"suggestResults",void 0),Ee([o.state()],Ie.prototype,"forceCloseSuggestion",void 0),Ee([o.query(".ft-search-input--input")],Ie.prototype,"input",void 0),Ee([o.query("ft-search-input-suggestion")],Ie.prototype,"suggestion",void 0),i.customElement("ft-search-input")(Ie),t.FtSearchInput=Ie,t.FtSearchInputCssVariables=Xi,t.styles=Yi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML,ftGlobals.litRepeat);
|