@fluid-topics/ft-search-type 1.0.61
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/README.md +19 -0
- package/build/FtSearchTypeMessages.d.ts +7 -0
- package/build/FtSearchTypeMessages.js +6 -0
- package/build/ft-search-type.css.d.ts +2 -0
- package/build/ft-search-type.css.js +5 -0
- package/build/ft-search-type.d.ts +14 -0
- package/build/ft-search-type.js +54 -0
- package/build/ft-search-type.light.js +1502 -0
- package/build/ft-search-type.min.js +1624 -0
- package/build/ft-search-type.properties.d.ts +2 -0
- package/build/ft-search-type.properties.js +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +7 -0
- package/package.json +26 -0
|
@@ -0,0 +1,1502 @@
|
|
|
1
|
+
!function(t,o,e,i,r,n,a){const s=e.css`
|
|
2
|
+
`
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2017 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/;var l;const c=window,h=c.trustedTypes,p=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,f="$lit$",d=`lit$${(Math.random()+"").slice(9)}$`,u="?"+d,y=`<${u}>`,g=document,b=()=>g.createComment(""),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,v=Array.isArray,x="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,S=/>/g,w=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,C=/"/g,k=/^(?:script|style|textarea|title)$/i,I=(t=>(o,...e)=>({_$litType$:t,strings:o,values:e}))(1),E=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),U=new WeakMap,L=g.createTreeWalker(g,129,null,!1),W=(t,o)=>{const e=t.length-1,i=[];let r,n=2===o?"<svg>":"",a=O;for(let o=0;o<e;o++){const e=t[o];let s,l,c=-1,h=0;for(;h<e.length&&(a.lastIndex=h,l=a.exec(e),null!==l);)h=a.lastIndex,a===O?"!--"===l[1]?a=N:void 0!==l[1]?a=S:void 0!==l[2]?(k.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=w):void 0!==l[3]&&(a=w):a===w?">"===l[0]?(a=null!=r?r:O,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?w:'"'===l[3]?C:$):a===C||a===$?a=w:a===N||a===S?a=O:(a=w,r=void 0);const p=a===w&&t[o+1].startsWith("/>")?" ":"";n+=a===O?e+y:c>=0?(i.push(s),e.slice(0,c)+f+e.slice(c)+d+p):e+d+(-2===c?(i.push(void 0),o):p)}const s=n+(t[e]||"<?>")+(2===o?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(s):s,i]};class z{constructor({strings:t,_$litType$:o},e){let i;this.parts=[];let r=0,n=0;const a=t.length-1,s=this.parts,[l,c]=W(t,o);if(this.el=z.createElement(l,e),L.currentNode=this.el.content,2===o){const t=this.el.content,o=t.firstChild;o.remove(),t.append(...o.childNodes)}for(;null!==(i=L.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const o of i.getAttributeNames())if(o.endsWith(f)||o.startsWith(d)){const e=c[n++];if(t.push(o),void 0!==e){const t=i.getAttribute(e.toLowerCase()+f).split(d),o=/([.?@])?(.*)/.exec(e);s.push({type:1,index:r,name:o[2],strings:t,ctor:"."===o[1]?Z:"?"===o[1]?T:"@"===o[1]?H:D})}else s.push({type:6,index:r})}for(const o of t)i.removeAttribute(o)}if(k.test(i.tagName)){const t=i.textContent.split(d),o=t.length-1;if(o>0){i.textContent=h?h.emptyScript:"";for(let e=0;e<o;e++)i.append(t[e],b()),L.nextNode(),s.push({type:2,index:++r});i.append(t[o],b())}}}else if(8===i.nodeType)if(i.data===u)s.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(d,t+1));)s.push({type:7,index:r}),t+=d.length-1}r++}}static createElement(t,o){const e=g.createElement("template");return e.innerHTML=t,e}}function K(t,o,e=t,i){var r,n,a,s;if(o===E)return o;let l=void 0!==i?null===(r=e._$Co)||void 0===r?void 0:r[i]:e._$Cl;const c=m(o)?void 0:o._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,e,i)),void 0!==i?(null!==(a=(s=e)._$Co)&&void 0!==a?a:s._$Co=[])[i]=l:e._$Cl=l),void 0!==l&&(o=K(t,l._$AS(t,o.values),l,i)),o}class B{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var o;const{el:{content:e},parts:i}=this._$AD,r=(null!==(o=null==t?void 0:t.creationScope)&&void 0!==o?o:g).importNode(e,!0);L.currentNode=r;let n=L.nextNode(),a=0,s=0,l=i[0];for(;void 0!==l;){if(a===l.index){let o;2===l.type?o=new A(n,n.nextSibling,this,t):1===l.type?o=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(o=new P(n,this,t)),this._$AV.push(o),l=i[++s]}a!==(null==l?void 0:l.index)&&(n=L.nextNode(),a++)}return r}v(t){let o=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,o),o+=e.strings.length-2):e._$AI(t[o])),o++}}class A{constructor(t,o,e,i){var r;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=e,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,o;return null!==(o=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==o?o:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const o=this._$AM;return void 0!==o&&11===(null==t?void 0:t.nodeType)&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=K(this,t,o),m(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>v(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!==R&&m(this._$AH)?this._$AA.nextSibling.data=t:this.$(g.createTextNode(t)),this._$AH=t}g(t){var o;const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=z.createElement(i.h,this.options)),i);if((null===(o=this._$AH)||void 0===o?void 0:o._$AD)===r)this._$AH.v(e);else{const t=new B(r,this),o=t.u(this.options);t.v(e),this.$(o),this._$AH=t}}_$AC(t){let o=U.get(t.strings);return void 0===o&&U.set(t.strings,o=new z(t)),o}T(t){v(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let e,i=0;for(const r of t)i===o.length?o.push(e=new A(this.k(b()),this.k(b()),this,this.options)):e=o[i],e._$AI(r),i++;i<o.length&&(this._$AR(e&&e._$AB.nextSibling,i),o.length=i)}_$AR(t=this._$AA.nextSibling,o){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,o);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var o;void 0===this._$AM&&(this._$Cp=t,null===(o=this._$AP)||void 0===o||o.call(this,t))}}class D{constructor(t,o,e,i,r){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=o,this._$AM=i,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,e,i){const r=this.strings;let n=!1;if(void 0===r)t=K(this,t,o,0),n=!m(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const i=t;let a,s;for(t=r[0],a=0;a<r.length-1;a++)s=K(this,i[e+a],o,a),s===E&&(s=this._$AH[a]),n||(n=!m(s)||s!==this._$AH[a]),s===R?t=R:t!==R&&(t+=(null!=s?s:"")+r[a+1]),this._$AH[a]=s}n&&!i&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const F=h?h.emptyScript:"";class T extends D{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class H extends D{constructor(t,o,e,i,r){super(t,o,e,i,r),this.type=5}_$AI(t,o=this){var e;if((t=null!==(e=K(this,t,o,0))&&void 0!==e?e:R)===E)return;const i=this._$AH,r=t===R&&i!==R||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==R&&(i===R||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var o,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(o=this.options)||void 0===o?void 0:o.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class P{constructor(t,o,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const j=c.litHtmlPolyfillSupport;null==j||j(z,A),(null!==(l=c.litHtmlVersions)&&void 0!==l?l:c.litHtmlVersions=[]).push("2.7.3");
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2020 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/
|
|
13
|
+
const M=Symbol.for(""),_=t=>{if((null==t?void 0:t.r)===M)return null==t?void 0:t._$litStatic$},G=t=>({_$litStatic$:t,r:M}),V=new Map,q=(t=>(o,...e)=>{const i=e.length;let r,n;const a=[],s=[];let l,c=0,h=!1;for(;c<i;){for(l=o[c];c<i&&void 0!==(n=e[c],r=_(n));)l+=r+o[++c],h=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(o[i]),h){const t=a.join("$$lit$$");void 0===(o=V.get(t))&&(a.raw=a,V.set(t,o=a)),e=s}return t(o,...e)})(I);var Y;!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",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Y||(Y={}));const X=t=>"string"==typeof t?e.unsafeCSS(t):t;class Q{static create(t,o,i,r){const n=t=>X(null!=t?t:r),a=e.css`var(${X(t)}, ${n(r)})`;return a.name=t,a.description=t,a.category=i,a.defaultValue=r,a.defaultCssValue=n,a.get=o=>e.css`var(${X(t)}, ${n(o)})`,a.breadcrumb=()=>[],a.lastResortDefaultValue=()=>r,a}static extend(t,o,i,r){const n=t=>i.get(null!=t?t:r),a=e.css`var(${X(t)}, ${n(r)})`;return a.name=t,a.description=o,a.category=i.category,a.fallbackVariable=i,a.defaultValue=r,a.defaultCssValue=n,a.get=o=>e.css`var(${X(t)}, ${n(o)})`,a.breadcrumb=()=>[i.name,...i.breadcrumb()],a.lastResortDefaultValue=()=>null!=r?r:i.lastResortDefaultValue(),a}static external(t,o){const i=o=>t.fallbackVariable?t.fallbackVariable.get(null!=o?o:t.defaultValue):X(null!=o?o:t.lastResortDefaultValue()),r=e.css`var(${X(t.name)}, ${i(t.defaultValue)})`;return r.name=t.name,r.category=t.category,r.fallbackVariable=t.fallbackVariable,r.defaultValue=t.defaultValue,r.context=o,r.defaultCssValue=i,r.get=o=>e.css`var(${X(t.name)}, ${i(o)})`,r.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],r.lastResortDefaultValue=()=>t.lastResortDefaultValue(),r}}const J={colorWhite:Q.create("--ft-color-white","","COLOR","#ffffff"),colorGray0:Q.create("--ft-color-gray-0","","COLOR","#71718e"),colorGray10:Q.create("--ft-color-gray-10","","COLOR","#fbfbfc"),colorGray20:Q.create("--ft-color-gray-20","","COLOR","#f2f2f5"),colorGray30:Q.create("--ft-color-gray-30","","COLOR","#e9e9ed"),colorGray40:Q.create("--ft-color-gray-40","","COLOR","#e0e0e6"),colorGray50:Q.create("--ft-color-gray-50","","COLOR","#cdcdd7"),colorGray60:Q.create("--ft-color-gray-60","","COLOR","#bbbbc9"),colorGray70:Q.create("--ft-color-gray-70","","COLOR","#a8a8ba"),colorGray80:Q.create("--ft-color-gray-80","","COLOR","#9696ab"),colorGray90:Q.create("--ft-color-gray-90","","COLOR","#83839d"),colorGray100:Q.create("--ft-color-gray-100","","COLOR","#62627c"),colorGray200:Q.create("--ft-color-gray-200","","COLOR","#545469"),colorGray300:Q.create("--ft-color-gray-300","","COLOR","#454557"),colorGray400:Q.create("--ft-color-gray-400","","COLOR","#363644"),colorGray500:Q.create("--ft-color-gray-500","","COLOR","#282832"),colorGray600:Q.create("--ft-color-gray-600","","COLOR","#19191f"),colorGray700:Q.create("--ft-color-gray-700","","COLOR","#0a0a0d"),colorBrand0:Q.create("--ft-color-brand-0","","COLOR","#9d207b"),colorBrand10:Q.create("--ft-color-brand-10","","COLOR","#f7edf4"),colorBrand20:Q.create("--ft-color-brand-20","","COLOR","#ebcfe4"),colorBrand30:Q.create("--ft-color-brand-30","","COLOR","#dfb2d3"),colorBrand40:Q.create("--ft-color-brand-40","","COLOR","#d395c2"),colorBrand50:Q.create("--ft-color-brand-50","","COLOR","#c778b1"),colorBrand60:Q.create("--ft-color-brand-60","","COLOR","#ba5ba1"),colorBrand70:Q.create("--ft-color-brand-70","","COLOR","#ae3e90"),colorBrand100:Q.create("--ft-color-brand-100","","COLOR","#8d1d6e"),colorBrand200:Q.create("--ft-color-brand-200","","COLOR","#78185e"),colorBrand300:Q.create("--ft-color-brand-300","","COLOR","#62144d"),colorBrand400:Q.create("--ft-color-brand-400","","COLOR","#4d103c"),colorBrand500:Q.create("--ft-color-brand-500","","COLOR","#380b2c"),colorBrand600:Q.create("--ft-color-brand-600","","COLOR","#23071b"),colorBrand700:Q.create("--ft-color-brand-700","","COLOR","#0d030b"),colorCyan0:Q.create("--ft-color-cyan-0","","COLOR","#0e98b4"),colorCyan10:Q.create("--ft-color-cyan-10","","COLOR","#ebf6f9"),colorCyan20:Q.create("--ft-color-cyan-20","","COLOR","#cbe9ef"),colorCyan30:Q.create("--ft-color-cyan-30","","COLOR","#acdbe5"),colorCyan40:Q.create("--ft-color-cyan-40","","COLOR","#8ccedb"),colorCyan50:Q.create("--ft-color-cyan-50","","COLOR","#6dc0d1"),colorCyan60:Q.create("--ft-color-cyan-60","","COLOR","#4db3c8"),colorCyan70:Q.create("--ft-color-cyan-70","","COLOR","#2ea5be"),colorCyan100:Q.create("--ft-color-cyan-100","","COLOR","#0c849c"),colorCyan200:Q.create("--ft-color-cyan-200","","COLOR","#0a7085"),colorCyan300:Q.create("--ft-color-cyan-300","","COLOR","#085c6d"),colorCyan400:Q.create("--ft-color-cyan-400","","COLOR","#074856"),colorCyan500:Q.create("--ft-color-cyan-500","","COLOR","#05343e"),colorCyan600:Q.create("--ft-color-cyan-600","","COLOR","#032127"),colorCyan700:Q.create("--ft-color-cyan-700","","COLOR","#010d0f"),colorGreen0:Q.create("--ft-color-green-0","","COLOR","#21a274"),colorGreen10:Q.create("--ft-color-green-10","","COLOR","#edf7f3"),colorGreen20:Q.create("--ft-color-green-20","","COLOR","#cfebe1"),colorGreen30:Q.create("--ft-color-green-30","","COLOR","#b2dfcf"),colorGreen40:Q.create("--ft-color-green-40","","COLOR","#95d3bd"),colorGreen50:Q.create("--ft-color-green-50","","COLOR","#78c7ab"),colorGreen60:Q.create("--ft-color-green-60","","COLOR","#5bba98"),colorGreen70:Q.create("--ft-color-green-70","","COLOR","#3eae86"),colorGreen100:Q.create("--ft-color-green-100","","COLOR","#1d8d65"),colorGreen200:Q.create("--ft-color-green-200","","COLOR","#187856"),colorGreen300:Q.create("--ft-color-green-300","","COLOR","#146246"),colorGreen400:Q.create("--ft-color-green-400","","COLOR","#104d37"),colorGreen500:Q.create("--ft-color-green-500","","COLOR","#0b3828"),colorGreen600:Q.create("--ft-color-green-600","","COLOR","#072319"),colorGreen700:Q.create("--ft-color-green-700","","COLOR","#030d0a"),colorOrange0:Q.create("--ft-color-orange-0","","COLOR","#ee8d17"),colorOrange10:Q.create("--ft-color-orange-10","","COLOR","#fef6ec"),colorOrange20:Q.create("--ft-color-orange-20","","COLOR","#fbe7cd"),colorOrange30:Q.create("--ft-color-orange-30","","COLOR","#f9d8af"),colorOrange40:Q.create("--ft-color-orange-40","","COLOR","#f7c991"),colorOrange50:Q.create("--ft-color-orange-50","","COLOR","#f5ba72"),colorOrange60:Q.create("--ft-color-orange-60","","COLOR","#f2ab54"),colorOrange70:Q.create("--ft-color-orange-70","","COLOR","#f09c35"),colorOrange100:Q.create("--ft-color-orange-100","","COLOR","#cf7b14"),colorOrange200:Q.create("--ft-color-orange-200","","COLOR","#b06811"),colorOrange300:Q.create("--ft-color-orange-300","","COLOR","#90560e"),colorOrange400:Q.create("--ft-color-orange-400","","COLOR","#71430b"),colorOrange500:Q.create("--ft-color-orange-500","","COLOR","#523108"),colorOrange600:Q.create("--ft-color-orange-600","","COLOR","#331e05"),colorOrange700:Q.create("--ft-color-orange-700","","COLOR","#140c02"),colorRed0:Q.create("--ft-color-red-0","","COLOR","#b40e2c"),colorRed10:Q.create("--ft-color-red-10","","COLOR","#f9ebed"),colorRed20:Q.create("--ft-color-red-20","","COLOR","#efcbd2"),colorRed30:Q.create("--ft-color-red-30","","COLOR","#e5acb6"),colorRed40:Q.create("--ft-color-red-40","","COLOR","#db8c9b"),colorRed50:Q.create("--ft-color-red-50","","COLOR","#d16d7f"),colorRed60:Q.create("--ft-color-red-60","","COLOR","#c84d63"),colorRed70:Q.create("--ft-color-red-70","","COLOR","#be2e48"),colorRed100:Q.create("--ft-color-red-100","","COLOR","#9c0c26"),colorRed200:Q.create("--ft-color-red-200","","COLOR","#850a20"),colorRed300:Q.create("--ft-color-red-300","","COLOR","#6d081b"),colorRed400:Q.create("--ft-color-red-400","","COLOR","#560715"),colorRed500:Q.create("--ft-color-red-500","","COLOR","#3e050f"),colorRed600:Q.create("--ft-color-red-600","","COLOR","#270309"),colorRed700:Q.create("--ft-color-red-700","","COLOR","#0f0104"),colorYellow0:Q.create("--ft-color-yellow-0","","COLOR","#E4C00C"),colorYellow10:Q.create("--ft-color-yellow-10","","COLOR","#fefae9"),colorYellow20:Q.create("--ft-color-yellow-20","","COLOR","#fcf4ca"),colorYellow30:Q.create("--ft-color-yellow-30","","COLOR","#faedaa"),colorYellow40:Q.create("--ft-color-yellow-40","","COLOR","#f9e78b"),colorYellow50:Q.create("--ft-color-yellow-50","","COLOR","#f7e06b"),colorYellow60:Q.create("--ft-color-yellow-60","","COLOR","#F4D63E"),colorYellow70:Q.create("--ft-color-yellow-70","","COLOR","#F3CE16"),colorYellow100:Q.create("--ft-color-yellow-100","","COLOR","#d3b10b"),colorYellow200:Q.create("--ft-color-yellow-200","","COLOR","#b3970a"),colorYellow300:Q.create("--ft-color-yellow-300","","COLOR","#947c08"),colorYellow400:Q.create("--ft-color-yellow-400","","COLOR","#746206"),colorYellow500:Q.create("--ft-color-yellow-500","","COLOR","#554705"),colorYellow600:Q.create("--ft-color-yellow-600","","COLOR","#352d03"),colorYellow700:Q.create("--ft-color-yellow-700","","COLOR","#161201"),colorUltramarine0:Q.create("--ft-color-ultramarine-0","","COLOR","#3C19E5"),colorUltramarine10:Q.create("--ft-color-ultramarine-10","","COLOR","#EDEAFD"),colorUltramarine20:Q.create("--ft-color-ultramarine-20","","COLOR","#D4CCF9"),colorUltramarine30:Q.create("--ft-color-ultramarine-30","","COLOR","#BBAFF6"),colorUltramarine40:Q.create("--ft-color-ultramarine-40","","COLOR","#A191F3"),colorUltramarine50:Q.create("--ft-color-ultramarine-50","","COLOR","#8873EF"),colorUltramarine60:Q.create("--ft-color-ultramarine-60","","COLOR","#6F55EC"),colorUltramarine70:Q.create("--ft-color-ultramarine-70","","COLOR","#5537E8"),colorUltramarine100:Q.create("--ft-color-ultramarine-100","","COLOR","#3416C7"),colorUltramarine200:Q.create("--ft-color-ultramarine-200","","COLOR","#2C13A9"),colorUltramarine300:Q.create("--ft-color-ultramarine-300","","COLOR","#250F8C"),colorUltramarine400:Q.create("--ft-color-ultramarine-400","","COLOR","#1D0C6E"),colorUltramarine500:Q.create("--ft-color-ultramarine-500","","COLOR","#150950"),colorUltramarine600:Q.create("--ft-color-ultramarine-600","","COLOR","#0D0532"),colorUltramarine700:Q.create("--ft-color-ultramarine-700","","COLOR","#050215"),colorAvocado0:Q.create("--ft-color-avocado-0","","COLOR","#98BD28"),colorAvocado10:Q.create("--ft-color-avocado-10","","COLOR","#F6F9EC"),colorAvocado20:Q.create("--ft-color-avocado-20","","COLOR","#E8F0D0"),colorAvocado30:Q.create("--ft-color-avocado-30","","COLOR","#DBE8B4"),colorAvocado40:Q.create("--ft-color-avocado-40","","COLOR","#CEDF98"),colorAvocado50:Q.create("--ft-color-avocado-50","","COLOR","#C0D77C"),colorAvocado60:Q.create("--ft-color-avocado-60","","COLOR","#B3CE60"),colorAvocado70:Q.create("--ft-color-avocado-70","","COLOR","#A5C644"),colorAvocado100:Q.create("--ft-color-avocado-100","","COLOR","#84A423"),colorAvocado200:Q.create("--ft-color-avocado-200","","COLOR","#708C1E"),colorAvocado300:Q.create("--ft-color-avocado-300","","COLOR","#5D7318"),colorAvocado400:Q.create("--ft-color-avocado-400","","COLOR","#495B13"),colorAvocado500:Q.create("--ft-color-avocado-500","","COLOR","#35420E"),colorAvocado600:Q.create("--ft-color-avocado-600","","COLOR","#212A09"),colorAvocado700:Q.create("--ft-color-avocado-700","","COLOR","#0E1104"),colorBrown0:Q.create("--ft-color-brown-0","","COLOR","#B26F4D"),colorBrown10:Q.create("--ft-color-brown-10","","COLOR","#F8F2EF"),colorBrown20:Q.create("--ft-color-brown-20","","COLOR","#EEDFD8"),colorBrown30:Q.create("--ft-color-brown-30","","COLOR","#E4CDC1"),colorBrown40:Q.create("--ft-color-brown-40","","COLOR","#DABAAA"),colorBrown50:Q.create("--ft-color-brown-50","","COLOR","#D0A792"),colorBrown60:Q.create("--ft-color-brown-60","","COLOR","#C6947B"),colorBrown70:Q.create("--ft-color-brown-70","","COLOR","#BC8264"),colorBrown100:Q.create("--ft-color-brown-100","","COLOR","#9B6143"),colorBrown200:Q.create("--ft-color-brown-200","","COLOR","#845239"),colorBrown300:Q.create("--ft-color-brown-300","","COLOR","#6D442F"),colorBrown400:Q.create("--ft-color-brown-400","","COLOR","#553525"),colorBrown500:Q.create("--ft-color-brown-500","","COLOR","#3E271B"),colorBrown600:Q.create("--ft-color-brown-600","","COLOR","#271811"),colorBrown700:Q.create("--ft-color-brown-700","","COLOR","#100A07"),spacing1:Q.create("--ft-spacing-1","","SIZE","0.25rem"),spacing2:Q.create("--ft-spacing-2","","SIZE","calc(var(--ft-spacing-2, 0.25rem)*2)"),spacing3:Q.create("--ft-spacing-3","","SIZE","calc(var(--ft-spacing-3, 0.25rem)*3)"),spacing4:Q.create("--ft-spacing-4","","SIZE","calc(var(--ft-spacing-4, 0.25rem)*4)"),spacing5:Q.create("--ft-spacing-5","","SIZE","calc(var(--ft-spacing-5, 0.25rem)*5)"),spacing6:Q.create("--ft-spacing-6","","SIZE","calc(var(--ft-spacing-6, 0.25rem)*6)"),spacing8:Q.create("--ft-spacing-8","","SIZE","calc(var(--ft-spacing-8, 0.25rem)*8)"),spacing10:Q.create("--ft-spacing-10","","SIZE","calc(var(--ft-spacing-10, 0.25rem)*10)"),spacing12:Q.create("--ft-spacing-12","","SIZE","calc(var(--ft-spacing-12, 0.25rem)*12)"),spacing16:Q.create("--ft-spacing-16","","SIZE","calc(var(--ft-spacing-16, 0.25rem)*16)"),spacing20:Q.create("--ft-spacing-20","","SIZE","calc(var(--ft-spacing-20, 0.25rem)*20)"),spacing24:Q.create("--ft-spacing-24","","SIZE","calc(var(--ft-spacing-24, 0.25rem)*24)"),spacing28:Q.create("--ft-spacing-28","","SIZE","calc(var(--ft-spacing-28, 0.25rem)*28)"),spacing32:Q.create("--ft-spacing-32","","SIZE","calc(var(--ft-spacing-32, 0.25rem)*32)"),spacing05:Q.create("--ft-spacing-0-5","","SIZE","calc(var(--ft-spacing-0-5, 0.25rem)*0.5)"),borderRadiusS:Q.create("--ft-border-radius-s","","SIZE","4px"),borderRadiusM:Q.create("--ft-border-radius-m","","SIZE","8px"),borderRadiusL:Q.create("--ft-border-radius-l","","SIZE","12px"),borderRadiusXl:Q.create("--ft-border-radius-xl","","SIZE","16px"),borderRadiusPill:Q.create("--ft-border-radius-pill","","SIZE","999px"),borderRadiusRound:Q.create("--ft-border-radius-round","","SIZE","50%"),iconSize1:Q.create("--ft-icon-size-1","","SIZE","12px"),iconSize2:Q.create("--ft-icon-size-2","","SIZE","16px"),iconSize3:Q.create("--ft-icon-size-3","","SIZE","20px"),iconSize4:Q.create("--ft-icon-size-4","","SIZE","24px"),iconSize5:Q.create("--ft-icon-size-5","","SIZE","32px"),iconSize6:Q.create("--ft-icon-size-6","","SIZE","48px"),opacity0:Q.create("--ft-opacity-0","","NUMBER","0"),opacity8:Q.create("--ft-opacity-8","","NUMBER","0.08"),opacity16:Q.create("--ft-opacity-16","","NUMBER","0.16"),opacity24:Q.create("--ft-opacity-24","","NUMBER","0.24"),opacity40:Q.create("--ft-opacity-40","","NUMBER","0.4"),opacity80:Q.create("--ft-opacity-80","","NUMBER","0.8")},tt={display:{fontFamily:Q.create("--ft-typography-display-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-display-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-display-lineHeight","","SIZE","120%"),fontSize:Q.create("--ft-typography-display-fontSize","","SIZE","2.5rem"),letterSpacing:Q.create("--ft-typography-display-letterSpacing","","SIZE","-0.02em"),paragraphSpacing:Q.create("--ft-typography-display-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-display-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-display-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-display-textCase","","UNKNOWN","none")},"title-1":{fontFamily:Q.create("--ft-typography-title-1-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-title-1-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-title-1-lineHeight","","SIZE","120%"),fontSize:Q.create("--ft-typography-title-1-fontSize","","SIZE","2rem"),letterSpacing:Q.create("--ft-typography-title-1-letterSpacing","","SIZE","-0.02em"),paragraphSpacing:Q.create("--ft-typography-title-1-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-title-1-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-title-1-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-title-1-textCase","","UNKNOWN","none")},"title-2":{fontFamily:Q.create("--ft-typography-title-2-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-title-2-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-title-2-lineHeight","","SIZE","120%"),fontSize:Q.create("--ft-typography-title-2-fontSize","","SIZE","1.5rem"),letterSpacing:Q.create("--ft-typography-title-2-letterSpacing","","SIZE","-0.02em"),paragraphSpacing:Q.create("--ft-typography-title-2-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-title-2-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-title-2-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-title-2-textCase","","UNKNOWN","none")},"title-3":{fontFamily:Q.create("--ft-typography-title-3-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-title-3-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-title-3-lineHeight","","SIZE","120%"),fontSize:Q.create("--ft-typography-title-3-fontSize","","SIZE","1.25rem"),letterSpacing:Q.create("--ft-typography-title-3-letterSpacing","","SIZE","-0.01em"),paragraphSpacing:Q.create("--ft-typography-title-3-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-title-3-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-title-3-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-title-3-textCase","","UNKNOWN","none")},"body-1-regular":{fontFamily:Q.create("--ft-typography-body-1-regular-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-1-regular-fontWeight","","UNKNOWN","400"),lineHeight:Q.create("--ft-typography-body-1-regular-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-1-regular-fontSize","","SIZE","1rem"),letterSpacing:Q.create("--ft-typography-body-1-regular-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-1-regular-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-1-regular-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-1-regular-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-1-regular-textCase","","UNKNOWN","none")},"body-1-medium":{fontFamily:Q.create("--ft-typography-body-1-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-1-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-body-1-medium-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-1-medium-fontSize","","SIZE","1rem"),letterSpacing:Q.create("--ft-typography-body-1-medium-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-1-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-1-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-1-medium-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-1-medium-textCase","","UNKNOWN","none")},"body-1-semibold":{fontFamily:Q.create("--ft-typography-body-1-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-1-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-body-1-semibold-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-1-semibold-fontSize","","SIZE","1rem"),letterSpacing:Q.create("--ft-typography-body-1-semibold-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-1-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-1-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-1-semibold-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-1-semibold-textCase","","UNKNOWN","none")},"body-2-regular":{fontFamily:Q.create("--ft-typography-body-2-regular-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-2-regular-fontWeight","","UNKNOWN","400"),lineHeight:Q.create("--ft-typography-body-2-regular-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-2-regular-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-body-2-regular-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-2-regular-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-2-regular-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-2-regular-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-2-regular-textCase","","UNKNOWN","none")},"body-2-medium":{fontFamily:Q.create("--ft-typography-body-2-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-2-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-body-2-medium-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-2-medium-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-body-2-medium-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-2-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-2-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-2-medium-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-2-medium-textCase","","UNKNOWN","none")},"body-2-semibold":{fontFamily:Q.create("--ft-typography-body-2-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-body-2-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-body-2-semibold-lineHeight","","SIZE","135%"),fontSize:Q.create("--ft-typography-body-2-semibold-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-body-2-semibold-letterSpacing","","SIZE","normal"),paragraphSpacing:Q.create("--ft-typography-body-2-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-body-2-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-body-2-semibold-textDecoration","","UNKNOWN","none"),textCase:Q.create("--ft-typography-body-2-semibold-textCase","","UNKNOWN","none")},"label-1-medium":{fontFamily:Q.create("--ft-typography-label-1-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-1-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-label-1-medium-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-1-medium-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-label-1-medium-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-1-medium-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-1-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-1-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-1-medium-textDecoration","","UNKNOWN","none")},"label-1-semibold":{fontFamily:Q.create("--ft-typography-label-1-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-1-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-label-1-semibold-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-1-semibold-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-label-1-semibold-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-1-semibold-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-1-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-1-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-1-semibold-textDecoration","","UNKNOWN","none")},"label-1-bold":{fontFamily:Q.create("--ft-typography-label-1-bold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-1-bold-fontWeight","","UNKNOWN","700"),lineHeight:Q.create("--ft-typography-label-1-bold-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-1-bold-fontSize","","SIZE","0.875rem"),letterSpacing:Q.create("--ft-typography-label-1-bold-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-1-bold-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-1-bold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-1-bold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-1-bold-textDecoration","","UNKNOWN","none")},"label-2-medium":{fontFamily:Q.create("--ft-typography-label-2-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-2-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-label-2-medium-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-2-medium-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-label-2-medium-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-2-medium-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-2-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-2-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-2-medium-textDecoration","","UNKNOWN","none")},"label-2-semibold":{fontFamily:Q.create("--ft-typography-label-2-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-2-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-label-2-semibold-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-2-semibold-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-label-2-semibold-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-2-semibold-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-2-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-2-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-2-semibold-textDecoration","","UNKNOWN","none")},"label-2-bold":{fontFamily:Q.create("--ft-typography-label-2-bold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-label-2-bold-fontWeight","","UNKNOWN","700"),lineHeight:Q.create("--ft-typography-label-2-bold-lineHeight","","SIZE","110%"),fontSize:Q.create("--ft-typography-label-2-bold-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-label-2-bold-letterSpacing","","SIZE","0.04em"),textCase:Q.create("--ft-typography-label-2-bold-textCase","","UNKNOWN","uppercase"),paragraphSpacing:Q.create("--ft-typography-label-2-bold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-label-2-bold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-label-2-bold-textDecoration","","UNKNOWN","none")},"caption-1-medium":{fontFamily:Q.create("--ft-typography-caption-1-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-1-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-caption-1-medium-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-1-medium-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-caption-1-medium-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-1-medium-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-1-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-1-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-1-medium-textDecoration","","UNKNOWN","none")},"caption-1-semibold":{fontFamily:Q.create("--ft-typography-caption-1-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-1-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-caption-1-semibold-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-1-semibold-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-caption-1-semibold-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-1-semibold-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-1-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-1-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-1-semibold-textDecoration","","UNKNOWN","none")},"caption-1-bold":{fontFamily:Q.create("--ft-typography-caption-1-bold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-1-bold-fontWeight","","UNKNOWN","700"),lineHeight:Q.create("--ft-typography-caption-1-bold-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-1-bold-fontSize","","SIZE","0.75rem"),letterSpacing:Q.create("--ft-typography-caption-1-bold-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-1-bold-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-1-bold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-1-bold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-1-bold-textDecoration","","UNKNOWN","none")},"caption-2-medium":{fontFamily:Q.create("--ft-typography-caption-2-medium-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-2-medium-fontWeight","","UNKNOWN","500"),lineHeight:Q.create("--ft-typography-caption-2-medium-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-2-medium-fontSize","","SIZE","0.6875rem"),letterSpacing:Q.create("--ft-typography-caption-2-medium-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-2-medium-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-2-medium-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-2-medium-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-2-medium-textDecoration","","UNKNOWN","none")},"caption-2-semibold":{fontFamily:Q.create("--ft-typography-caption-2-semibold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-2-semibold-fontWeight","","UNKNOWN","600"),lineHeight:Q.create("--ft-typography-caption-2-semibold-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-2-semibold-fontSize","","SIZE","0.6875rem"),letterSpacing:Q.create("--ft-typography-caption-2-semibold-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-2-semibold-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-2-semibold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-2-semibold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-2-semibold-textDecoration","","UNKNOWN","none")},"caption-2-bold":{fontFamily:Q.create("--ft-typography-caption-2-bold-fontFamily","","UNKNOWN","Inter"),fontWeight:Q.create("--ft-typography-caption-2-bold-fontWeight","","UNKNOWN","700"),lineHeight:Q.create("--ft-typography-caption-2-bold-lineHeight","","SIZE","130%"),fontSize:Q.create("--ft-typography-caption-2-bold-fontSize","","SIZE","0.6875rem"),letterSpacing:Q.create("--ft-typography-caption-2-bold-letterSpacing","","SIZE","normal"),textCase:Q.create("--ft-typography-caption-2-bold-textCase","","UNKNOWN","none"),paragraphSpacing:Q.create("--ft-typography-caption-2-bold-paragraphSpacing","","UNKNOWN","normal"),paragraphIndent:Q.create("--ft-typography-caption-2-bold-paragraphIndent","","UNKNOWN","0"),textDecoration:Q.create("--ft-typography-caption-2-bold-textDecoration","","UNKNOWN","none")}},ot={backgroundActionPrimary:Q.extend("--ft-background-action-primary","Used as backgorund of primary action components.",J.colorBrand0),backgroundErrorPrimary:Q.extend("--ft-background-error-primary","Used as background of error components.",J.colorRed0),backgroundErrorSubtle:Q.extend("--ft-background-error-subtle","Used as background of subtle error components.",J.colorRed10),backgroundInfoPrimary:Q.extend("--ft-background-info-primary","Used as background of information components.",J.colorCyan200),backgroundInfoSubtle:Q.extend("--ft-background-info-subtle","Used as background of subtle information components.",J.colorCyan10),backgroundWarningPrimary:Q.extend("--ft-background-warning-primary","Used as background of warning components.",J.colorOrange300),backgroundWarningSubtle:Q.extend("--ft-background-warning-subtle","Used as background of subtle information components.",J.colorOrange10),backgroundSuccessPrimary:Q.extend("--ft-background-success-primary","Used as background of success components.",J.colorGreen200),backgroundSuccessSubtle:Q.extend("--ft-background-success-subtle","Used as background of subtle success components.",J.colorGreen10),backgroundGlobalSurface:Q.extend("--ft-background-global-surface","Used as app background.",J.colorWhite),backgroundGlobalOnSurface:Q.extend("--ft-background-global-on-surface","Used as background on element on the base background, like cards.",J.colorGray10),backgroundGlobalOnSurfaceDark:Q.extend("--ft-background-global-on-surface-dark","Used as background on element that need background separation.",J.colorGray30),contentActionPrimary:Q.extend("--ft-content-action-primary","Used on label of primary action on light surface.",J.colorBrand0),contentWarningPrimary:Q.extend("--ft-content-warning-primary","Used on label of warning messages on light surface.",J.colorOrange300),contentWarningIconOnly:Q.extend("--ft-content-warning-icon-only","Used on warning status icons alone",J.colorOrange0),contentErrorPrimary:Q.extend("--ft-content-error-primary","Used on label of error messages on light surface.",J.colorRed0),contentErrorIconOnly:Q.extend("--ft-content-error-icon-only","Used on error status icons alone",J.colorRed0),contentInfoPrimary:Q.extend("--ft-content-info-primary","Used on label of information messages on light surface.",J.colorCyan200),contentInfoIconOnly:Q.extend("--ft-content-info-icon-only","Used on info status icons alone",J.colorCyan0),contentSuccessIconOnly:Q.extend("--ft-content-success-icon-only","Used on success status icons alone",J.colorGreen0),contentSuccessPrimary:Q.extend("--ft-content-success-primary","Used on label of success messages on light surface.",J.colorGreen200),contentGlobalPrimary:Q.extend("--ft-content-global-primary","Used for main content on the page.",J.colorGray500),contentGlobalSecondary:Q.extend("--ft-content-global-secondary","Used for secondary content, often paired with primary content.\nAlso for action icons.",J.colorGray200),contentGlobalSubtle:Q.extend("--ft-content-global-subtle","Used for placeholder, unselected items in a tab component or breadcrumb.",J.colorGray0),contentGlobalOnColor:Q.extend("--ft-content-global-on-color","Used for content on a dominant color.",J.colorWhite),borderActionPrimary:Q.extend("--ft-border-action-primary","Used as border for primary action components.",J.colorBrand0),borderActionFocusRing:Q.extend("--ft-border-action-focus-ring","Focus ring is an additional border to indicate focus-visible state.",J.colorCyan0),borderWarningPrimary:Q.extend("--ft-border-warning-primary","Used as border for warning components.",J.colorOrange30),borderSuccessPrimary:Q.extend("--ft-border-success-primary","Used as border for success components.",J.colorGreen30),borderErrorPrimary:Q.extend("--ft-border-error-primary","Used as border for error components.",J.colorRed30),borderInfoPrimary:Q.extend("--ft-border-info-primary","Used as border for information components.",J.colorCyan30),borderGlobalSubtle:Q.extend("--ft-border-global-subtle","Used as border to deliminate an area filled with background.on-surface and separators.",J.colorGray30),borderGlobalPrimary:Q.extend("--ft-border-global-primary","Used as border for element like input.",J.colorGray50),borderInputPrimary:Q.extend("--ft-border-input-primary","Used as border for checkboxes and radio buttons",J.colorGray80)},et={largeHeight:Q.create("--ft-button-large-height","","SIZE","40px"),largeHorizontalPadding:Q.extend("--ft-button-large-horizontal-padding","",J.spacing4),largeGap:Q.extend("--ft-button-large-gap","",J.spacing2),largeBorderRadius:Q.extend("--ft-button-large-border-radius","",J.borderRadiusS),largeIconSize:Q.extend("--ft-button-large-icon-size","",J.iconSize3),largeBorderWidth:Q.create("--ft-button-large-border-width","","SIZE","1px"),largeFocusOutlineOffset:Q.create("--ft-button-large-focus-outline-offset","","SIZE","2px"),largeFocusOutlineWidth:Q.create("--ft-button-large-focus-outline-width","","SIZE","2px"),largeIconOnlyWidth:Q.create("--ft-button-large-icon-only-width","","SIZE","40px"),smallHeight:Q.create("--ft-button-small-height","","SIZE","30px"),smallHorizontalPadding:Q.extend("--ft-button-small-horizontal-padding","",J.spacing3),smallGap:Q.extend("--ft-button-small-gap","",J.spacing2),smallBorderRadius:Q.extend("--ft-button-small-border-radius","",J.borderRadiusS),smallIconSize:Q.extend("--ft-button-small-icon-size","",J.iconSize2),smallBorderWidth:Q.create("--ft-button-small-border-width","","SIZE","1px"),smallFocusOutlineOffset:Q.create("--ft-button-small-focus-outline-offset","","SIZE","2px"),smallFocusOutlineWidth:Q.create("--ft-button-small-focus-outline-width","","SIZE","2px"),smallIconOnlyWidth:Q.create("--ft-button-small-icon-only-width","","SIZE","30px"),primaryBackgroundColor:Q.extend("--ft-button-primary-background-color","",ot.backgroundActionPrimary),primaryColor:Q.extend("--ft-button-primary-color","",ot.contentGlobalOnColor),primaryIconColor:Q.extend("--ft-button-primary-icon-color","",ot.contentGlobalOnColor),primaryStateLayerColor:Q.extend("--ft-button-primary-state-layer-color","",ot.contentGlobalOnColor),primaryStateLayerOpacityHover:Q.extend("--ft-button-primary-state-layer-opacity-hover","",J.opacity16),primaryStateLayerOpacityFocus:Q.extend("--ft-button-primary-state-layer-opacity-focus","",J.opacity16),primaryStateLayerOpacityActive:Q.extend("--ft-button-primary-state-layer-opacity-active","",J.opacity24),primaryComponentOpacityDisabled:Q.extend("--ft-button-primary-component-opacity-disabled","",J.opacity40),focusFocusRingColor:Q.extend("--ft-button-focus-focus-ring-color","",ot.borderActionFocusRing),tertiaryBackgroundColor:Q.create("--ft-button-tertiary-background-color","","COLOR","rgba(0,0,0,0)"),tertiaryColor:Q.extend("--ft-button-tertiary-color","",ot.contentActionPrimary),tertiaryIconColor:Q.extend("--ft-button-tertiary-icon-color","",ot.contentActionPrimary),tertiaryStateLayerColor:Q.extend("--ft-button-tertiary-state-layer-color","",ot.contentActionPrimary),tertiaryStateLayerOpacityHover:Q.extend("--ft-button-tertiary-state-layer-opacity-hover","",J.opacity8),tertiaryStateLayerOpacityFocus:Q.extend("--ft-button-tertiary-state-layer-opacity-focus","",J.opacity8),tertiaryStateLayerOpacityActive:Q.extend("--ft-button-tertiary-state-layer-opacity-active","",J.opacity16),tertiaryComponentOpacityDisabled:Q.extend("--ft-button-tertiary-component-opacity-disabled","",J.opacity40),secondaryBackgroundColor:Q.extend("--ft-button-secondary-background-color","",J.colorWhite),secondaryColor:Q.extend("--ft-button-secondary-color","",ot.contentActionPrimary),secondaryIconColor:Q.extend("--ft-button-secondary-icon-color","",ot.contentActionPrimary),secondaryStateLayerColor:Q.extend("--ft-button-secondary-state-layer-color","",ot.contentActionPrimary),secondaryStateLayerOpacityHover:Q.extend("--ft-button-secondary-state-layer-opacity-hover","",J.opacity8),secondaryStateLayerOpacityFocus:Q.extend("--ft-button-secondary-state-layer-opacity-focus","",J.opacity8),secondaryStateLayerOpacityActive:Q.extend("--ft-button-secondary-state-layer-opacity-active","",J.opacity16),secondaryComponentOpacityDisabled:Q.extend("--ft-button-secondary-component-opacity-disabled","",J.opacity40),secondaryBorderColor:Q.extend("--ft-button-secondary-border-color","",ot.borderActionPrimary),neutralBackgroundColor:Q.create("--ft-button-neutral-background-color","","COLOR","rgba(0,0,0,0)"),neutralIconColor:Q.extend("--ft-button-neutral-icon-color","",ot.contentGlobalSecondary),neutralColor:Q.extend("--ft-button-neutral-color","",ot.contentGlobalSecondary),neutralStateLayerColor:Q.extend("--ft-button-neutral-state-layer-color","",ot.contentGlobalSecondary),neutralStateLayerOpacityHover:Q.extend("--ft-button-neutral-state-layer-opacity-hover","",J.opacity8),neutralStateLayerOpacityFocus:Q.extend("--ft-button-neutral-state-layer-opacity-focus","",J.opacity8),neutralStateLayerOpacityActive:Q.extend("--ft-button-neutral-state-layer-opacity-active","",J.opacity16),neutralComponentOpacityDisabled:Q.extend("--ft-button-neutral-component-opacity-disabled","",J.opacity40)};Q.extend("--ft-tabs-top-left-border-radius","",J.borderRadiusS),Q.extend("--ft-tabs-top-right-border-radius","",J.borderRadiusS),Q.extend("--ft-tabs-label-horizontal-padding","",J.spacing4),Q.extend("--ft-tabs-label-vertical-padding","",J.spacing3),Q.extend("--ft-tabs-label-gap","",J.spacing1),Q.extend("--ft-switch-group-horizontal-padding","",J.spacing1),Q.extend("--ft-switch-group-vertical-padding","",J.spacing1),Q.extend("--ft-switch-group-gap","",J.spacing1),Q.extend("--ft-switch-group-background-color","",ot.backgroundGlobalSurface),Q.extend("--ft-switch-group-border-color","",ot.borderGlobalSubtle),Q.create("--ft-switch-group-border-radius","","SIZE","6px"),Q.extend("--ft-switch-label-horizontal-padding","",J.spacing2),Q.extend("--ft-switch-label-vertical-padding","",J.spacing1),Q.extend("--ft-switch-icon-horizontal-padding","",J.spacing1),Q.extend("--ft-switch-icon-vertical-padding","",J.spacing1),Q.create("--ft-switch-focus-outline-width","","SIZE","2px"),Q.extend("--ft-switch-focus-focus-ring-color","",ot.borderActionFocusRing),Q.extend("--ft-switch-option-border-radius","",J.borderRadiusS),Q.extend("--ft-switch-off-state-layer-opacity-hover","",J.opacity8),Q.extend("--ft-switch-off-state-layer-opacity-focus","",J.opacity8),Q.extend("--ft-switch-off-state-layer-opacity-active","",J.opacity16),Q.extend("--ft-switch-off-component-opacity-disabled","",J.opacity40),Q.extend("--ft-switch-off-color","",ot.contentGlobalSubtle),Q.extend("--ft-switch-off-state-layer-color","",ot.contentGlobalSubtle),Q.extend("--ft-chart-1-light","for area color charts",J.colorBrand40),Q.extend("--ft-chart-1-base","for line charts",J.colorBrand0),Q.extend("--ft-chart-2-light","for area color charts",J.colorYellow60),Q.extend("--ft-chart-2-base","for line charts",J.colorYellow100),Q.extend("--ft-chart-3-light","",J.colorUltramarine40),Q.extend("--ft-chart-3-base","",J.colorUltramarine70),Q.extend("--ft-chart-4-light","",J.colorCyan50),Q.extend("--ft-chart-4-base","",J.colorCyan100),Q.extend("--ft-chart-5-light","",J.colorRed40),Q.extend("--ft-chart-5-base","",J.colorRed60),Q.extend("--ft-chart-6-light","",J.colorGreen40),Q.extend("--ft-chart-6-base","",J.colorGreen70),Q.extend("--ft-chart-7-light","",J.colorOrange70),Q.extend("--ft-chart-7-base","",J.colorOrange100),Q.extend("--ft-chart-8-light","",J.colorAvocado70),Q.extend("--ft-chart-8-base","",J.colorAvocado200),Q.extend("--ft-chart-9-light","",J.colorBrown50),Q.extend("--ft-chart-9-base","",J.colorBrown200),Q.extend("--ft-chart-10-light","",J.colorGray50),Q.extend("--ft-chart-10-base","",J.colorGray80),Q.extend("--ft-chart-monochrome-10","",J.colorBrand10),Q.extend("--ft-chart-monochrome-20","",J.colorBrand20),Q.extend("--ft-chart-monochrome-30","",J.colorBrand40),Q.extend("--ft-chart-monochrome-40","",J.colorBrand60),Q.extend("--ft-chart-monochrome-50","",J.colorBrand0),Q.extend("--ft-chart-monochrome-60","",J.colorBrand200),Q.extend("--ft-chip-large-horizontal-padding","",J.spacing4),Q.extend("--ft-chip-large-vertical-padding","",J.spacing2),Q.extend("--ft-chip-large-gap","",J.spacing1),Q.create("--ft-chip-large-focus-outline-offset","","SIZE","2px"),Q.create("--ft-chip-large-focus-outline-width","","SIZE","2px"),Q.extend("--ft-chip-large-border-radius","",J.borderRadiusPill),Q.create("--ft-chip-large-border-width","","SIZE","1px"),Q.extend("--ft-chip-large-icon-size","",J.iconSize3),Q.extend("--ft-chip-medium-horizontal-padding","",J.spacing3),Q.extend("--ft-chip-medium-vertical-padding","",J.spacing1),Q.extend("--ft-chip-medium-gap","",J.spacing1),Q.create("--ft-chip-medium-focus-outline-offset","","SIZE","2px"),Q.create("--ft-chip-medium-focus-outline-width","","SIZE","2px"),Q.extend("--ft-chip-medium-border-radius","",J.borderRadiusPill),Q.create("--ft-chip-medium-border-width","","SIZE","1px"),Q.extend("--ft-chip-medium-icon-size","",J.iconSize2),Q.extend("--ft-chip-small-horizontal-padding","",J.spacing2),Q.extend("--ft-chip-small-vertical-padding","",J.spacing05),Q.extend("--ft-chip-small-gap","",J.spacing1),Q.create("--ft-chip-small-focus-outline-offset","","SIZE","2px"),Q.create("--ft-chip-small-focus-outline-width","","SIZE","2px"),Q.extend("--ft-chip-small-border-radius","",J.borderRadiusPill),Q.create("--ft-chip-small-border-width","","SIZE","1px"),Q.extend("--ft-chip-small-icon-size","",J.iconSize1),Q.extend("--ft-chip-neutral-background-color","",ot.backgroundGlobalOnSurface),Q.extend("--ft-chip-neutral-color","",ot.contentGlobalPrimary),Q.extend("--ft-chip-neutral-border-color","",ot.borderGlobalSubtle),Q.extend("--ft-chip-info-background-color","",ot.backgroundInfoSubtle),Q.extend("--ft-chip-info-color","",ot.contentInfoPrimary),Q.extend("--ft-chip-info-border-color","",ot.borderInfoPrimary),Q.extend("--ft-chip-success-background-color","",ot.backgroundSuccessSubtle),Q.extend("--ft-chip-success-color","",ot.contentSuccessPrimary),Q.extend("--ft-chip-success-border-color","",ot.borderSuccessPrimary),Q.extend("--ft-chip-warning-background-color","",ot.backgroundWarningSubtle),Q.extend("--ft-chip-warning-color","",ot.contentWarningPrimary),Q.extend("--ft-chip-warning-border-color","",ot.borderWarningPrimary),Q.extend("--ft-chip-error-background-color","",ot.backgroundErrorSubtle),Q.extend("--ft-chip-error-color","",ot.contentErrorPrimary),Q.extend("--ft-chip-error-border-color","",ot.borderErrorPrimary),Q.create("--ft-notice-border-width","","SIZE","1px"),Q.extend("--ft-notice-horizontal-padding","",J.spacing2),Q.extend("--ft-notice-vertical-padding","",J.spacing1),Q.extend("--ft-notice-border-radius","",J.borderRadiusS),Q.extend("--ft-notice-gap","",J.spacing2),Q.extend("--ft-notice-icon-size","",J.iconSize3),Q.extend("--ft-notice-info-background-color","",ot.backgroundInfoSubtle),Q.extend("--ft-notice-info-border-color","",ot.borderInfoPrimary),Q.extend("--ft-notice-info-color","",ot.contentInfoPrimary),Q.extend("--ft-notice-warning-background-color","",ot.backgroundWarningSubtle),Q.extend("--ft-notice-warning-border-color","",ot.borderWarningPrimary),Q.extend("--ft-notice-warning-color","",ot.contentWarningPrimary),Q.extend("--ft-checkbox-label-color","",ot.contentGlobalPrimary),Q.extend("--ft-checkbox-checked-background-color","",ot.contentActionPrimary),Q.extend("--ft-checkbox-checked-state-layer-color","",ot.contentActionPrimary),Q.extend("--ft-checkbox-checked-color","",ot.contentGlobalOnColor),Q.extend("--ft-checkbox-checked-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-checkbox-checked-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-checkbox-checked-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-checkbox-checked-component-opacity-disabled","",J.opacity40),Q.extend("--ft-checkbox-unchecked-border-color","",J.colorGray80),Q.extend("--ft-checkbox-unchecked-state-layer-color","",J.colorGray80),Q.extend("--ft-checkbox-unchecked-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-checkbox-unchecked-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-checkbox-unchecked-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-checkbox-unchecked-component-opacity-disabled","",J.opacity40),Q.extend("--ft-checkbox-focus-focus-ring-color","",ot.borderActionFocusRing),Q.create("--ft-checkbox-focus-outline-offset","","SIZE","3px"),Q.create("--ft-checkbox-focus-outline-width","","SIZE","2px"),Q.extend("--ft-checkbox-gap","",J.spacing3),Q.extend("--ft-toggle-off-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-toggle-off-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-toggle-off-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-toggle-off-component-opacity-disabled","",J.opacity40),Q.extend("--ft-toggle-off-background-color","",ot.contentGlobalSubtle),Q.extend("--ft-toggle-off-icon-color","",ot.contentGlobalSubtle),Q.extend("--ft-toggle-off-state-layer-color","",ot.contentGlobalSubtle),Q.extend("--ft-toggle-on-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-toggle-on-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-toggle-on-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-toggle-on-component-opacity-disabled","",J.opacity40),Q.extend("--ft-toggle-on-background-color","",ot.contentActionPrimary),Q.extend("--ft-toggle-on-icon-color","",ot.contentActionPrimary),Q.extend("--ft-toggle-on-state-layer-color","",ot.contentActionPrimary),Q.extend("--ft-toggle-label-color","",ot.contentGlobalPrimary),Q.extend("--ft-toggle-focus-focus-ring-color","",ot.borderActionFocusRing),Q.extend("--ft-toggle-gap","",J.spacing3),Q.extend("--ft-radio-label-color","",ot.contentGlobalPrimary),Q.extend("--ft-radio-selected-color","",ot.contentActionPrimary),Q.extend("--ft-radio-selected-state-layer-color","",ot.contentActionPrimary),Q.extend("--ft-radio-selected-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-radio-selected-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-radio-selected-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-radio-selected-component-opacity-disabled","",J.opacity40),Q.extend("--ft-radio-unselected-state-layer-color","",J.colorGray80),Q.extend("--ft-radio-unselected-state-layer-opacity-hover","",J.opacity16),Q.extend("--ft-radio-unselected-state-layer-opacity-focus","",J.opacity16),Q.extend("--ft-radio-unselected-state-layer-opacity-active","",J.opacity24),Q.extend("--ft-radio-unselected-component-opacity-disabled","",J.opacity40),Q.extend("--ft-radio-focus-focus-ring-color","",ot.borderActionFocusRing),Q.create("--ft-radio-focus-outline-offset","","SIZE","3px"),Q.create("--ft-radio-focus-outline-width","","SIZE","2px"),Q.extend("--ft-radio-gap","",J.spacing3),Q.extend("--ft-notification-icon-size","",J.iconSize4),Q.extend("--ft-notification-horizontal-padding","",J.spacing4),Q.extend("--ft-notification-vertical-padding","",J.spacing4),Q.extend("--ft-notification-info-background-color","",ot.backgroundInfoSubtle),Q.extend("--ft-notification-info-color","",ot.contentInfoPrimary),Q.extend("--ft-notification-info-border-color","",ot.borderInfoPrimary),Q.extend("--ft-notification-success-background-color","",ot.backgroundSuccessSubtle),Q.extend("--ft-notification-success-color","",ot.contentSuccessPrimary),Q.extend("--ft-notification-success-border-color","",ot.borderSuccessPrimary),Q.extend("--ft-notification-warning-background-color","",ot.backgroundWarningSubtle),Q.extend("--ft-notification-warning-color","",ot.contentWarningPrimary),Q.extend("--ft-notification-warning-border-color","",ot.borderWarningPrimary),Q.extend("--ft-notification-error-background-color","",ot.backgroundErrorSubtle),Q.extend("--ft-notification-error-color","",ot.contentErrorPrimary),Q.extend("--ft-notification-error-border-color","",ot.borderErrorPrimary),Q.extend("--ft-notification-border-radius","",J.borderRadiusPill),Q.create("--ft-notification-border-width","","SIZE","1px"),Q.extend("--ft-notification-gap-leading","",J.spacing2),Q.extend("--ft-notification-gap-trailing","",J.spacing8);const it=o.FtCssVariableFactory.extend("--ft-typography-font-family","",o.designSystemVariables.titleFont),rt=o.FtCssVariableFactory.extend("--ft-typography-font-family","",o.designSystemVariables.contentFont),nt={fontFamily:rt,fontSize:o.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:o.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:o.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:o.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:o.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},at=o.FtCssVariableFactory.extend("--ft-typography-title-font-family","",it),st=o.FtCssVariableFactory.extend("--ft-typography-title-font-size","",nt.fontSize,"20px"),lt=o.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",nt.fontWeight,"normal"),ct=o.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",nt.letterSpacing,"0.15px"),ht=o.FtCssVariableFactory.extend("--ft-typography-title-line-height","",nt.lineHeight,"1.2"),pt=o.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",nt.textTransform,"inherit"),ft=o.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",it),dt=o.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",nt.fontSize,"14px"),ut=o.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",nt.fontWeight,"normal"),yt=o.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",nt.letterSpacing,"0.105px"),gt=o.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",nt.lineHeight,"1.7"),bt=o.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",nt.textTransform,"inherit"),mt=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",rt),vt=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",nt.fontSize,"16px"),xt=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",nt.fontWeight,"600"),Ot=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",nt.letterSpacing,"0.144px"),Nt=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",nt.lineHeight,"1.5"),St=o.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",nt.textTransform,"inherit"),wt=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",rt),$t=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",nt.fontSize,"14px"),Ct=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",nt.fontWeight,"normal"),kt=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",nt.letterSpacing,"0.098px"),It=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",nt.lineHeight,"1.7"),Et=o.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",nt.textTransform,"inherit"),Rt=o.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",rt),Ut=o.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",nt.fontSize,"16px"),Lt=o.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",nt.fontWeight,"normal"),Wt=o.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",nt.letterSpacing,"0.496px"),zt=o.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",nt.lineHeight,"1.5"),Kt=o.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",nt.textTransform,"inherit"),Bt={fontFamily:o.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",rt),fontSize:o.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",nt.fontSize,"14px"),fontWeight:o.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",nt.fontWeight,"normal"),letterSpacing:o.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",nt.letterSpacing,"0.252px"),lineHeight:o.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",nt.lineHeight,"1.4"),textTransform:o.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",nt.textTransform,"inherit")},At=o.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",rt),Dt=o.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",nt.fontSize,"12px"),Zt=o.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",nt.fontWeight,"normal"),Ft=o.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",nt.letterSpacing,"0.396px"),Tt=o.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",nt.lineHeight,"1.33"),Ht=o.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",nt.textTransform,"inherit"),Pt=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",rt),jt=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",nt.fontSize,"10px"),Mt=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",nt.fontWeight,"normal"),_t=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",nt.letterSpacing,"0.33px"),Gt=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",nt.lineHeight,"1.6"),Vt=o.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",nt.textTransform,"inherit"),qt=o.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",rt),Yt=o.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",nt.fontSize,"10px"),Xt=o.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",nt.fontWeight,"normal"),Qt=o.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",nt.letterSpacing,"1.5px"),Jt=o.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",nt.lineHeight,"1.6"),to=o.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",nt.textTransform,"uppercase"),oo={fontFamily:o.FtCssVariableFactory.extend("--ft-typography-button-font-family","",rt),fontSize:o.FtCssVariableFactory.extend("--ft-typography-button-font-size","",nt.fontSize,"14px"),fontWeight:o.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",nt.fontWeight,"600"),letterSpacing:o.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",nt.letterSpacing,"1.246px"),lineHeight:o.FtCssVariableFactory.extend("--ft-typography-button-line-height","",nt.lineHeight,"1.15"),textTransform:o.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",nt.textTransform,"uppercase")},eo=e.css`
|
|
14
|
+
.ft-typography--title {
|
|
15
|
+
font-family: ${at};
|
|
16
|
+
font-size: ${st};
|
|
17
|
+
font-weight: ${lt};
|
|
18
|
+
letter-spacing: ${ct};
|
|
19
|
+
line-height: ${ht};
|
|
20
|
+
text-transform: ${pt};
|
|
21
|
+
}
|
|
22
|
+
`,io=e.css`
|
|
23
|
+
.ft-typography--title-dense {
|
|
24
|
+
font-family: ${ft};
|
|
25
|
+
font-size: ${dt};
|
|
26
|
+
font-weight: ${ut};
|
|
27
|
+
letter-spacing: ${yt};
|
|
28
|
+
line-height: ${gt};
|
|
29
|
+
text-transform: ${bt};
|
|
30
|
+
}
|
|
31
|
+
`,ro=e.css`
|
|
32
|
+
.ft-typography--subtitle1 {
|
|
33
|
+
font-family: ${mt};
|
|
34
|
+
font-size: ${vt};
|
|
35
|
+
font-weight: ${xt};
|
|
36
|
+
letter-spacing: ${Ot};
|
|
37
|
+
line-height: ${Nt};
|
|
38
|
+
text-transform: ${St};
|
|
39
|
+
}
|
|
40
|
+
`,no=e.css`
|
|
41
|
+
.ft-typography--subtitle2 {
|
|
42
|
+
font-family: ${wt};
|
|
43
|
+
font-size: ${$t};
|
|
44
|
+
font-weight: ${Ct};
|
|
45
|
+
letter-spacing: ${kt};
|
|
46
|
+
line-height: ${It};
|
|
47
|
+
text-transform: ${Et};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
`,ao=e.css`
|
|
51
|
+
.ft-typography--body1 {
|
|
52
|
+
font-family: ${Rt};
|
|
53
|
+
font-size: ${Ut};
|
|
54
|
+
font-weight: ${Lt};
|
|
55
|
+
letter-spacing: ${Wt};
|
|
56
|
+
line-height: ${zt};
|
|
57
|
+
text-transform: ${Kt};
|
|
58
|
+
}
|
|
59
|
+
`,so=e.css`
|
|
60
|
+
.ft-typography--body2 {
|
|
61
|
+
font-family: ${Bt.fontFamily};
|
|
62
|
+
font-size: ${Bt.fontSize};
|
|
63
|
+
font-weight: ${Bt.fontWeight};
|
|
64
|
+
letter-spacing: ${Bt.letterSpacing};
|
|
65
|
+
line-height: ${Bt.lineHeight};
|
|
66
|
+
text-transform: ${Bt.textTransform};
|
|
67
|
+
}
|
|
68
|
+
`,lo=e.css`
|
|
69
|
+
.ft-typography--caption {
|
|
70
|
+
font-family: ${At};
|
|
71
|
+
font-size: ${Dt};
|
|
72
|
+
font-weight: ${Zt};
|
|
73
|
+
letter-spacing: ${Ft};
|
|
74
|
+
line-height: ${Tt};
|
|
75
|
+
text-transform: ${Ht};
|
|
76
|
+
}
|
|
77
|
+
`,co=e.css`
|
|
78
|
+
.ft-typography--breadcrumb {
|
|
79
|
+
font-family: ${Pt};
|
|
80
|
+
font-size: ${jt};
|
|
81
|
+
font-weight: ${Mt};
|
|
82
|
+
letter-spacing: ${_t};
|
|
83
|
+
line-height: ${Gt};
|
|
84
|
+
text-transform: ${Vt};
|
|
85
|
+
}
|
|
86
|
+
`,ho=e.css`
|
|
87
|
+
.ft-typography--overline {
|
|
88
|
+
font-family: ${qt};
|
|
89
|
+
font-size: ${Yt};
|
|
90
|
+
font-weight: ${Xt};
|
|
91
|
+
letter-spacing: ${Qt};
|
|
92
|
+
line-height: ${Jt};
|
|
93
|
+
text-transform: ${to};
|
|
94
|
+
}
|
|
95
|
+
`,po=e.css`
|
|
96
|
+
.ft-typography--button {
|
|
97
|
+
font-family: ${oo.fontFamily};
|
|
98
|
+
font-size: ${oo.fontSize};
|
|
99
|
+
font-weight: ${oo.fontWeight};
|
|
100
|
+
letter-spacing: ${oo.letterSpacing};
|
|
101
|
+
line-height: ${oo.lineHeight};
|
|
102
|
+
text-transform: ${oo.textTransform};
|
|
103
|
+
}
|
|
104
|
+
`,fo=e.css`
|
|
105
|
+
.ft-typography {
|
|
106
|
+
vertical-align: inherit;
|
|
107
|
+
}
|
|
108
|
+
`,uo=[Object.keys(tt).map((t=>function(t){const o=tt[t];return e.css`
|
|
109
|
+
.ft-typography--${e.unsafeCSS(t)} {
|
|
110
|
+
font-family: ${o.fontFamily};
|
|
111
|
+
font-size: ${o.fontSize};
|
|
112
|
+
font-weight: ${o.fontWeight};
|
|
113
|
+
letter-spacing: ${o.letterSpacing};
|
|
114
|
+
line-height: ${o.lineHeight};
|
|
115
|
+
text-transform: ${o.textCase};
|
|
116
|
+
}
|
|
117
|
+
`}(t)))];var yo=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class go extends o.FtLitElement{constructor(){super(...arguments),this.variant=Y.body1}render(){return this.element?q`
|
|
118
|
+
<${G(this.element)}
|
|
119
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
120
|
+
<slot></slot>
|
|
121
|
+
</${G(this.element)}>
|
|
122
|
+
`:q`
|
|
123
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
124
|
+
`}}go.styles=[eo,io,ro,no,ao,so,lo,co,ho,po,fo,...uo],yo([i.property()],go.prototype,"element",void 0),yo([i.property()],go.prototype,"variant",void 0),o.customElement("ft-typography")(go);const bo=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorContent),mo={color:bo,backgroundColor:o.FtCssVariableFactory.extend("--ft-ripple-background-color","",bo),opacityContentOnSurfacePressed:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.FtCssVariableFactory.external(o.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},vo=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorPrimary),xo=vo,Oo=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",vo),No=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorSecondary),So=No,wo=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",No),$o=e.css`
|
|
125
|
+
:host {
|
|
126
|
+
display: contents;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ft-ripple {
|
|
130
|
+
position: absolute;
|
|
131
|
+
inset: 0;
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
border-radius: ${mo.borderRadius};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ft-ripple .ft-ripple--background,
|
|
141
|
+
.ft-ripple .ft-ripple--effect {
|
|
142
|
+
position: absolute;
|
|
143
|
+
opacity: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ft-ripple .ft-ripple--effect {
|
|
147
|
+
aspect-ratio: 1;
|
|
148
|
+
width: auto;
|
|
149
|
+
height: auto;
|
|
150
|
+
min-width: 170%;
|
|
151
|
+
min-height: 170%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ft-ripple .ft-ripple--background{
|
|
155
|
+
width: 100%;
|
|
156
|
+
height: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
160
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
161
|
+
aspect-ratio: 1;
|
|
162
|
+
width: auto;
|
|
163
|
+
height: auto;
|
|
164
|
+
max-width: unset;
|
|
165
|
+
max-height: unset;
|
|
166
|
+
min-width: 100%;
|
|
167
|
+
min-height: 100%;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ft-ripple .ft-ripple--background {
|
|
171
|
+
background-color: ${mo.backgroundColor};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ft-ripple .ft-ripple--effect {
|
|
175
|
+
background-color: ${mo.color};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
179
|
+
background-color: ${wo};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
183
|
+
background-color: ${So};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
187
|
+
background-color: ${Oo};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
191
|
+
background-color: ${xo};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ft-ripple .ft-ripple--background {
|
|
195
|
+
top: 0;
|
|
196
|
+
left: 0;
|
|
197
|
+
transition: opacity 75ms linear;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.ft-ripple .ft-ripple--effect,
|
|
201
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
202
|
+
border-radius: 50%;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ft-ripple .ft-ripple--effect {
|
|
206
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
207
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
211
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
212
|
+
left: 50%;
|
|
213
|
+
top: 50%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
217
|
+
transform: translate(-50%, -50%);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
221
|
+
opacity: ${mo.opacityContentOnSurfaceHover};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
225
|
+
opacity: ${mo.opacityContentOnSurfaceSelected};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
229
|
+
opacity: ${mo.opacityContentOnSurfaceFocused};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
233
|
+
opacity: ${mo.opacityContentOnSurfacePressed};
|
|
234
|
+
transform: translate(-50%, -50%) scale(1);
|
|
235
|
+
}
|
|
236
|
+
`,Co={color:o.FtCssVariableFactory.extend("--ft-loader-color","",o.designSystemVariables.colorPrimary),size:o.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},ko=e.css`
|
|
237
|
+
:host {
|
|
238
|
+
line-height: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.ft-loader {
|
|
242
|
+
display: inline-block;
|
|
243
|
+
position: relative;
|
|
244
|
+
|
|
245
|
+
width: ${Co.size};
|
|
246
|
+
height: ${Co.size};
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.ft-loader div {
|
|
250
|
+
position: absolute;
|
|
251
|
+
top: 37.5%;
|
|
252
|
+
width: 25%;
|
|
253
|
+
height: 25%;
|
|
254
|
+
border-radius: 50%;
|
|
255
|
+
background: ${Co.color};
|
|
256
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ft-loader div:nth-child(1) {
|
|
260
|
+
left: 2.5%;
|
|
261
|
+
animation: appear 0.6s infinite;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ft-loader div:nth-child(2) {
|
|
265
|
+
left: 2.5%;
|
|
266
|
+
animation: move 0.6s infinite;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ft-loader div:nth-child(3) {
|
|
270
|
+
left: 37.5%;
|
|
271
|
+
animation: move 0.6s infinite;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ft-loader div:nth-child(4) {
|
|
275
|
+
left: 72.5%;
|
|
276
|
+
animation: disappear 0.6s infinite;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@keyframes appear {
|
|
280
|
+
0% {
|
|
281
|
+
transform: scale(0);
|
|
282
|
+
}
|
|
283
|
+
100% {
|
|
284
|
+
transform: scale(1);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@keyframes disappear {
|
|
289
|
+
0% {
|
|
290
|
+
transform: scale(1);
|
|
291
|
+
}
|
|
292
|
+
100% {
|
|
293
|
+
transform: scale(0);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@keyframes move {
|
|
298
|
+
0% {
|
|
299
|
+
transform: translate(0, 0);
|
|
300
|
+
}
|
|
301
|
+
100% {
|
|
302
|
+
transform: translate(calc(0.35 * ${Co.size}), 0);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
`,Io={size:o.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:o.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",o.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:o.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",o.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:o.FtCssVariableFactory.extend("--ft-icon-material-font-family","",o.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:o.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Eo=e.css`
|
|
306
|
+
:host, i.ft-icon {
|
|
307
|
+
display: inline-flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
flex-shrink: 0;
|
|
310
|
+
flex-grow: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
:host {
|
|
314
|
+
width: ${Io.size};
|
|
315
|
+
height: ${Io.size};
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
i.ft-icon {
|
|
319
|
+
width: 100%;
|
|
320
|
+
height: 100%;
|
|
321
|
+
font-size: ${Io.size};
|
|
322
|
+
line-height: 1;
|
|
323
|
+
font-weight: normal;
|
|
324
|
+
text-transform: none;
|
|
325
|
+
font-style: normal;
|
|
326
|
+
font-variant: normal;
|
|
327
|
+
speak: none;
|
|
328
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
329
|
+
text-rendering: auto;
|
|
330
|
+
-webkit-font-smoothing: antialiased;
|
|
331
|
+
-moz-osx-font-smoothing: grayscale;
|
|
332
|
+
vertical-align: ${Io.verticalAlign};
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
i.ft-icon.ft-icon--fluid-topics {
|
|
336
|
+
font-family: ${Io.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
337
|
+
|
|
338
|
+
/* Ugly fix because font is broken */
|
|
339
|
+
font-size: calc(0.75 * ${Io.size});
|
|
340
|
+
line-height: ${Io.size};
|
|
341
|
+
position: relative;
|
|
342
|
+
top: -4%;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-icon--file-format {
|
|
347
|
+
font-family: ${Io.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.ft-icon--material {
|
|
351
|
+
font-family: ${Io.materialFontFamily}, "Material Icons", sans-serif;
|
|
352
|
+
}
|
|
353
|
+
`,Ro=o.FtCssVariableFactory.extend("--ft-button-color","",o.designSystemVariables.colorPrimary),Uo={backgroundColor:o.FtCssVariableFactory.extend("--ft-button-background-color","",o.designSystemVariables.colorSurface),borderRadius:o.FtCssVariableFactory.extend("--ft-button-border-radius","",o.designSystemVariables.borderRadiusL),color:Ro,fontSize:o.FtCssVariableFactory.extend("--ft-button-font-size","",oo.fontSize),iconSize:o.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:o.FtCssVariableFactory.extend("--ft-button-ripple-color","",Ro),verticalPadding:o.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:o.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:o.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:o.FtCssVariableFactory.external(o.designSystemVariables.colorOpacityDisabled,"Design system")},Lo=o.FtCssVariableFactory.extend("--ft-button-primary-color","",o.FtCssVariableFactory.extend("--ft-button-color","",o.designSystemVariables.colorOnPrimary)),Wo={backgroundColor:o.FtCssVariableFactory.extend("--ft-button-primary-background-color","",o.FtCssVariableFactory.extend("--ft-button-background-color","",o.designSystemVariables.colorPrimary)),color:Lo,rippleColor:o.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Lo)},zo=o.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",o.FtCssVariableFactory.extend("--ft-button-border-radius","",o.designSystemVariables.borderRadiusM)),Ko=o.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),Bo=o.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),Ao=o.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px"),Do=[e.css`
|
|
354
|
+
:host {
|
|
355
|
+
display: inline-block;
|
|
356
|
+
max-width: 100%;
|
|
357
|
+
pointer-events: none;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
button {
|
|
361
|
+
box-shadow: 0px 0px 0px transparent;
|
|
362
|
+
border: 0px solid transparent;
|
|
363
|
+
text-shadow: 0px 0px 0px transparent;
|
|
364
|
+
font-size: ${Uo.fontSize};
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
button:hover {
|
|
368
|
+
box-shadow: 0px 0px 0px transparent;
|
|
369
|
+
border: 0px solid transparent;
|
|
370
|
+
text-shadow: 0px 0px 0px transparent;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
button:active {
|
|
374
|
+
outline: none;
|
|
375
|
+
border: none;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
button:focus {
|
|
379
|
+
outline: 0;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ft-button {
|
|
383
|
+
position: relative;
|
|
384
|
+
display: flex;
|
|
385
|
+
justify-content: center;
|
|
386
|
+
align-items: center;
|
|
387
|
+
width: 100%;
|
|
388
|
+
overflow: hidden;
|
|
389
|
+
box-sizing: border-box;
|
|
390
|
+
border: none;
|
|
391
|
+
pointer-events: auto;
|
|
392
|
+
|
|
393
|
+
--ft-button-internal-line-height: max(calc(${Uo.fontSize} + 2px), ${Uo.iconSize});
|
|
394
|
+
--ft-button-internal-color: ${Uo.color};
|
|
395
|
+
${o.setVariable(Io.size,Uo.iconSize)};
|
|
396
|
+
${o.setVariable(mo.color,Uo.rippleColor)};
|
|
397
|
+
|
|
398
|
+
border-radius: ${Uo.borderRadius};
|
|
399
|
+
padding: ${Uo.verticalPadding} ${Uo.horizontalPadding};
|
|
400
|
+
background-color: ${Uo.backgroundColor};
|
|
401
|
+
color: var(--ft-button-internal-color);
|
|
402
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.ft-button.ft-button--outlined {
|
|
406
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
407
|
+
padding: calc(${Uo.verticalPadding} - 1px) calc(${Uo.horizontalPadding} - 1px);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.ft-button.ft-button--dense {
|
|
411
|
+
padding: ${Ko} ${Bo};
|
|
412
|
+
border-radius: ${zo};
|
|
413
|
+
gap: ${Ao};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.ft-button.ft-button--dense.ft-button--outlined {
|
|
417
|
+
padding: calc(${Ko} - 1px) calc(${Bo} - 1px);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.ft-button:not([disabled]):hover {
|
|
421
|
+
cursor: pointer;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.ft-button--round {
|
|
425
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Uo.verticalPadding});
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.ft-button--round.ft-button--dense {
|
|
429
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ko});
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.ft-button[disabled] {
|
|
433
|
+
filter: grayscale(1);
|
|
434
|
+
opacity: ${Uo.opacityDisabled};
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.ft-button.ft-button--primary {
|
|
438
|
+
background-color: ${Wo.backgroundColor};
|
|
439
|
+
--ft-button-internal-color: ${Wo.color};
|
|
440
|
+
${o.setVariable(mo.color,Wo.rippleColor)};
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.ft-button:focus {
|
|
444
|
+
outline: none;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.ft-button--label {
|
|
448
|
+
position: relative;
|
|
449
|
+
overflow: hidden;
|
|
450
|
+
white-space: nowrap;
|
|
451
|
+
text-overflow: ellipsis;
|
|
452
|
+
display: block;
|
|
453
|
+
margin: 0 ${Uo.iconPadding};
|
|
454
|
+
${o.setVariable(oo.fontSize,"1em")};
|
|
455
|
+
${o.setVariable(oo.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.ft-button--dense .ft-button--label {
|
|
459
|
+
margin: 0 ${Ao};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.ft-button--label[hidden] {
|
|
463
|
+
display: none;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
ft-icon {
|
|
467
|
+
flex-shrink: 0;
|
|
468
|
+
position: relative;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ft-button--label[hidden] + ft-icon {
|
|
472
|
+
margin: 0 calc(${Uo.horizontalPadding} * -1);
|
|
473
|
+
padding: 0 ${Uo.verticalPadding};
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
477
|
+
margin: 0 calc(${Bo} * -1);
|
|
478
|
+
padding: 0 ${Ko};
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
482
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
483
|
+
order: -1;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
ft-loader {
|
|
487
|
+
${o.setVariable(Co.size,Uo.iconSize)};
|
|
488
|
+
${o.setVariable(Co.color,"var(--ft-button-internal-color)")};
|
|
489
|
+
}
|
|
490
|
+
`,o.noTextSelect];var Zo=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Fo extends o.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new o.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 o.Debouncer(10),this.moveRipple=t=>{var o,e;let{x:i,y:r}=this.getCoordinates(t),n=null!==(e=null===(o=this.ripple)||void 0===o?void 0:o.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-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`
|
|
491
|
+
<style>
|
|
492
|
+
.ft-ripple .ft-ripple--effect {
|
|
493
|
+
left: ${this.originX}px;
|
|
494
|
+
top: ${this.originY}px;
|
|
495
|
+
}
|
|
496
|
+
</style>
|
|
497
|
+
<div class="${n.classMap(t)}">
|
|
498
|
+
<div class="ft-ripple--background"></div>
|
|
499
|
+
<div class="ft-ripple--effect"></div>
|
|
500
|
+
</div>
|
|
501
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(o=this.target)||void 0===o||o.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(o=this.target)&&void 0!==o?o:e)}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 o=(...t)=>o=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(o)},e=o("mouseup","contextmenu"),i=o("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&o("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),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",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),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 o=t,e=t;let i,r;return null!=o.x?({x:i,y:r}=o):null!=e.touches&&(i=e.touches[0].clientX,r=e.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Fo.elementDefinitions={},Fo.styles=$o,Zo([i.property({type:Boolean})],Fo.prototype,"primary",void 0),Zo([i.property({type:Boolean})],Fo.prototype,"secondary",void 0),Zo([i.property({type:Boolean})],Fo.prototype,"unbounded",void 0),Zo([i.property({type:Boolean})],Fo.prototype,"activated",void 0),Zo([i.property({type:Boolean})],Fo.prototype,"selected",void 0),Zo([i.property({type:Boolean})],Fo.prototype,"disabled",void 0),Zo([i.state()],Fo.prototype,"hovered",void 0),Zo([i.state()],Fo.prototype,"focused",void 0),Zo([i.state()],Fo.prototype,"pressed",void 0),Zo([i.state()],Fo.prototype,"rippling",void 0),Zo([i.state()],Fo.prototype,"originX",void 0),Zo([i.state()],Fo.prototype,"originY",void 0),Zo([i.query(".ft-ripple")],Fo.prototype,"ripple",void 0),Zo([i.query(".ft-ripple--effect")],Fo.prototype,"rippleEffect",void 0),o.customElement("ft-ripple")(Fo);const To=o.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),Ho=o.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),Po=o.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),jo=o.FtCssVariableFactory.create("--ft-tooltip-z-index","","NUMBER","100"),Mo=o.FtCssVariableFactory.external(o.designSystemVariables.borderRadiusS,"Design system"),_o=o.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px"),Go=e.css`
|
|
502
|
+
.ft-tooltip--container {
|
|
503
|
+
display: block;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.ft-tooltip--inline {
|
|
507
|
+
display: inline-block;
|
|
508
|
+
max-width: 100%;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.ft-tooltip {
|
|
512
|
+
position: absolute;
|
|
513
|
+
box-sizing: border-box;
|
|
514
|
+
overflow: hidden;
|
|
515
|
+
width: max-content;
|
|
516
|
+
max-width: ${_o};
|
|
517
|
+
text-align: center;
|
|
518
|
+
padding: ${To};
|
|
519
|
+
z-index: ${jo};
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.ft-tooltip--content {
|
|
523
|
+
padding: 4px 8px;
|
|
524
|
+
border-radius: ${Mo};
|
|
525
|
+
background-color: ${Po};
|
|
526
|
+
color: ${Ho};
|
|
527
|
+
position: relative;
|
|
528
|
+
word-break: break-word;
|
|
529
|
+
}
|
|
530
|
+
`;var Vo,qo,Yo,Xo=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Qo extends o.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new o.Debouncer,this.revealDebouncer=new o.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
531
|
+
<div part="container"
|
|
532
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
533
|
+
@mouseenter=${this.onHover}
|
|
534
|
+
@mouseleave=${this.onOut}
|
|
535
|
+
@focusin=${this.onHover}
|
|
536
|
+
@focusout=${this.onOut}
|
|
537
|
+
@touchstart=${this.onTouch}>
|
|
538
|
+
<slot></slot>
|
|
539
|
+
<div part="tooltip" role="tooltip" inert
|
|
540
|
+
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
541
|
+
?hidden=${!this.visible}>
|
|
542
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
543
|
+
<slot name="text"></slot>
|
|
544
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
</div>
|
|
548
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const o=this.tooltip.offsetWidth,e=this.tooltip.offsetHeight,i=(t.offsetHeight-e)/2,r=(t.offsetWidth-o)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-e-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-o-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,h=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let p=-l.y,f=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(p,f))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${_o})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Qo.elementDefinitions={"ft-typography":go},Qo.styles=Go,Xo([i.property()],Qo.prototype,"text",void 0),Xo([i.property({type:Boolean})],Qo.prototype,"manual",void 0),Xo([i.property({type:Boolean})],Qo.prototype,"inline",void 0),Xo([i.property({type:Number})],Qo.prototype,"delay",void 0),Xo([i.property()],Qo.prototype,"position",void 0),Xo([i.queryAssignedNodes("",!0)],Qo.prototype,"slotNodes",void 0),Xo([i.query(".ft-tooltip--container")],Qo.prototype,"container",void 0),Xo([i.query(".ft-tooltip")],Qo.prototype,"tooltip",void 0),Xo([i.query(".ft-tooltip--content")],Qo.prototype,"tooltipContent",void 0),Xo([i.state()],Qo.prototype,"visible",void 0),o.customElement("ft-tooltip")(Qo),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Vo||(Vo={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(qo||(qo={})),new Map([...["abw"].map((t=>[t,qo.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,qo.AUDIO])),...["avi"].map((t=>[t,qo.AVI])),...["chm","xhs"].map((t=>[t,qo.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,qo.CODE])),...["csv"].map((t=>[t,qo.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,qo.DITA])),...["epub"].map((t=>[t,qo.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,qo.EXCEL])),...["flac"].map((t=>[t,qo.FLAC])),...["gif"].map((t=>[t,qo.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,qo.GZIP])),...["html","htm","xhtml"].map((t=>[t,qo.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,qo.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,qo.JPEG])),...["json"].map((t=>[t,qo.JSON])),...["m4a","m4p"].map((t=>[t,qo.M4A])),...["mov","qt"].map((t=>[t,qo.MOV])),...["mp3"].map((t=>[t,qo.MP3])),...["mp4","m4v"].map((t=>[t,qo.MP4])),...["ogg","oga"].map((t=>[t,qo.OGG])),...["pdf","ps"].map((t=>[t,qo.PDF])),...["png"].map((t=>[t,qo.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,qo.POWERPOINT])),...["rar"].map((t=>[t,qo.RAR])),...["stp"].map((t=>[t,qo.STP])),...["txt","rtf","md","mdown"].map((t=>[t,qo.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,qo.VIDEO])),...["wav"].map((t=>[t,qo.WAV])),...["wma"].map((t=>[t,qo.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,qo.WORD])),...["xml","xsl","rdf"].map((t=>[t,qo.XML])),...["yaml","yml","x-yaml"].map((t=>[t,qo.YAML])),...["zip"].map((t=>[t,qo.ZIP]))]),function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Yo||(Yo={}));var Jo=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class te extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Yo).includes(this.variant)?this.variant:Yo.fluid_topics,o=t!==Yo.material||!!this.value;return e.html`
|
|
549
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
550
|
+
${a.unsafeHTML(this.resolvedIcon)}
|
|
551
|
+
<slot ?hidden=${o}></slot>
|
|
552
|
+
</i>
|
|
553
|
+
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var t,o;let i=this.value||this.textContent;switch(this.variant){case Yo.file_format:this.resolvedIcon=null!==(t=qo[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Yo.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(o=Vo[i.replace("-","_").toUpperCase()])&&void 0!==o?o:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}te.elementDefinitions={},te.styles=Eo,Jo([i.property()],te.prototype,"variant",void 0),Jo([i.property()],te.prototype,"value",void 0),Jo([i.state()],te.prototype,"resolvedIcon",void 0),Jo([i.query("slot")],te.prototype,"slottedContent",void 0),o.customElement("ft-icon")(te);class oe extends o.FtLitElement{render(){return e.html`
|
|
554
|
+
<div class="ft-loader">
|
|
555
|
+
<div></div>
|
|
556
|
+
<div></div>
|
|
557
|
+
<div></div>
|
|
558
|
+
<div></div>
|
|
559
|
+
</div>
|
|
560
|
+
`}}oe.styles=ko,o.customElement("ft-loader")(oe);var ee=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ie extends(o.toFtFormComponent(o.FtLitElement,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!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=>{var o;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(o=this.form)||void 0===o||o.requestSubmit())}}render(){return this.addTooltipIfNeeded(e.html`
|
|
561
|
+
<button part="button"
|
|
562
|
+
class="${n.classMap(this.buttonClasses)}"
|
|
563
|
+
aria-label="${this.getLabel()}"
|
|
564
|
+
?disabled=${this.isDisabled()}>
|
|
565
|
+
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
566
|
+
<ft-typography part="label"
|
|
567
|
+
variant=${this.typographyVariant}
|
|
568
|
+
element="span"
|
|
569
|
+
class="ft-button--label ${o.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
570
|
+
?hidden=${!this.hasTextContent()}>
|
|
571
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
572
|
+
</ft-typography>
|
|
573
|
+
${this.resolveIcon()}
|
|
574
|
+
</button>
|
|
575
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?e.html`
|
|
576
|
+
<ft-tooltip part="tooltip"
|
|
577
|
+
text="${this.getLabel()}"
|
|
578
|
+
position="${this.tooltipPosition}">
|
|
579
|
+
${t}
|
|
580
|
+
</ft-tooltip>
|
|
581
|
+
`:t}resolveIcon(){return this.loading?e.html`
|
|
582
|
+
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
583
|
+
<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}}ie.elementDefinitions={"ft-ripple":Fo,"ft-tooltip":Qo,"ft-typography":go,"ft-icon":te,"ft-loader":oe},ee([i.property({type:String,reflect:!0})],ie.prototype,"role",void 0),ee([i.property()],ie.prototype,"type",void 0),ee([i.property({type:Boolean})],ie.prototype,"disabled",void 0),ee([i.property()],ie.prototype,"label",void 0),ee([i.property()],ie.prototype,"icon",void 0),ee([i.property()],ie.prototype,"iconVariant",void 0),ee([i.property({type:Boolean})],ie.prototype,"trailingIcon",void 0),ee([i.property({type:Boolean})],ie.prototype,"loading",void 0),ee([i.property()],ie.prototype,"tooltipPosition",void 0),ee([i.property({type:Boolean})],ie.prototype,"hideTooltip",void 0),ee([i.property({type:Boolean})],ie.prototype,"forceTooltip",void 0),ee([i.query(".ft-button")],ie.prototype,"button",void 0),ee([i.query(".ft-button--label slot")],ie.prototype,"slottedContent",void 0);var re=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ne extends ie{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"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}}get typographyVariant(){return"button"}}ne.styles=[o.safariEllipsisFix,Do],re([i.property({type:Boolean})],ne.prototype,"primary",void 0),re([i.property({type:Boolean})],ne.prototype,"outlined",void 0),re([i.property({type:Boolean})],ne.prototype,"disabled",void 0),re([i.property({type:Boolean})],ne.prototype,"dense",void 0),re([i.property({type:Boolean})],ne.prototype,"round",void 0);const ae=[e.css`
|
|
584
|
+
:host {
|
|
585
|
+
display: inline-block;
|
|
586
|
+
max-width: 100%;
|
|
587
|
+
pointer-events: none;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Remove default button styles **/
|
|
591
|
+
|
|
592
|
+
button {
|
|
593
|
+
box-shadow: 0 0 0 transparent;
|
|
594
|
+
border: 0 solid transparent;
|
|
595
|
+
text-shadow: 0 0 0 transparent;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
button:hover {
|
|
599
|
+
box-shadow: 0 0 0 transparent;
|
|
600
|
+
text-shadow: 0 0 0 transparent;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
button:active {
|
|
604
|
+
outline: none;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
button:focus {
|
|
608
|
+
outline: 0;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/** Base styles **/
|
|
612
|
+
|
|
613
|
+
.ft-button {
|
|
614
|
+
position: relative;
|
|
615
|
+
display: flex;
|
|
616
|
+
justify-content: center;
|
|
617
|
+
align-items: center;
|
|
618
|
+
width: 100%;
|
|
619
|
+
overflow: hidden;
|
|
620
|
+
box-sizing: border-box;
|
|
621
|
+
pointer-events: auto;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.ft-button:not([disabled]):hover {
|
|
625
|
+
cursor: pointer;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.ft-button:focus {
|
|
629
|
+
outline: none;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.ft-button:focus-visible {
|
|
633
|
+
outline-color: ${et.focusFocusRingColor};
|
|
634
|
+
outline-style: solid;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
ft-icon {
|
|
638
|
+
flex-shrink: 0;
|
|
639
|
+
position: relative;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
643
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
644
|
+
order: -1;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.ft-button--label {
|
|
648
|
+
position: relative;
|
|
649
|
+
overflow: hidden;
|
|
650
|
+
white-space: nowrap;
|
|
651
|
+
text-overflow: ellipsis;
|
|
652
|
+
display: block;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.ft-button--label[hidden] {
|
|
656
|
+
display: none;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/** Primary styles **/
|
|
660
|
+
|
|
661
|
+
.ft-button--primary {
|
|
662
|
+
${o.setVariable(Co.color,et.primaryIconColor)};
|
|
663
|
+
|
|
664
|
+
${o.setVariable(mo.color,et.primaryStateLayerColor)};
|
|
665
|
+
${o.setVariable(mo.opacityContentOnSurfaceHover,et.primaryStateLayerOpacityHover)};
|
|
666
|
+
${o.setVariable(mo.opacityContentOnSurfaceFocused,et.primaryStateLayerOpacityFocus)};
|
|
667
|
+
${o.setVariable(mo.opacityContentOnSurfaceSelected,et.primaryStateLayerOpacityActive)};
|
|
668
|
+
${o.setVariable(mo.opacityContentOnSurfacePressed,et.primaryStateLayerOpacityActive)};
|
|
669
|
+
|
|
670
|
+
background-color: ${et.primaryBackgroundColor};
|
|
671
|
+
color: ${et.primaryColor};
|
|
672
|
+
border-style: none;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.ft-button--primary[disabled] {
|
|
676
|
+
opacity: ${et.primaryComponentOpacityDisabled};
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.ft-button--primary ft-icon {
|
|
680
|
+
color: ${et.primaryIconColor};
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/** Secondary styles **/
|
|
684
|
+
|
|
685
|
+
.ft-button--secondary {
|
|
686
|
+
${o.setVariable(Co.color,et.secondaryIconColor)};
|
|
687
|
+
|
|
688
|
+
${o.setVariable(mo.color,et.secondaryStateLayerColor)};
|
|
689
|
+
${o.setVariable(mo.opacityContentOnSurfaceHover,et.secondaryStateLayerOpacityHover)};
|
|
690
|
+
${o.setVariable(mo.opacityContentOnSurfaceFocused,et.secondaryStateLayerOpacityFocus)};
|
|
691
|
+
${o.setVariable(mo.opacityContentOnSurfaceSelected,et.secondaryStateLayerOpacityActive)};
|
|
692
|
+
${o.setVariable(mo.opacityContentOnSurfacePressed,et.secondaryStateLayerOpacityActive)};
|
|
693
|
+
|
|
694
|
+
background-color: ${et.secondaryBackgroundColor};
|
|
695
|
+
color: ${et.secondaryColor};
|
|
696
|
+
border-color: ${et.secondaryBorderColor};
|
|
697
|
+
border-style: solid;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.ft-button--secondary[disabled] {
|
|
701
|
+
opacity: ${et.secondaryComponentOpacityDisabled};
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.ft-button--secondary ft-icon {
|
|
705
|
+
color: ${et.secondaryIconColor};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/** Tertiary styles **/
|
|
709
|
+
|
|
710
|
+
.ft-button--tertiary {
|
|
711
|
+
${o.setVariable(Co.color,et.tertiaryIconColor)};
|
|
712
|
+
|
|
713
|
+
${o.setVariable(mo.color,et.tertiaryStateLayerColor)};
|
|
714
|
+
${o.setVariable(mo.opacityContentOnSurfaceHover,et.tertiaryStateLayerOpacityHover)};
|
|
715
|
+
${o.setVariable(mo.opacityContentOnSurfaceFocused,et.tertiaryStateLayerOpacityFocus)};
|
|
716
|
+
${o.setVariable(mo.opacityContentOnSurfaceSelected,et.tertiaryStateLayerOpacityActive)};
|
|
717
|
+
${o.setVariable(mo.opacityContentOnSurfacePressed,et.tertiaryStateLayerOpacityActive)};
|
|
718
|
+
|
|
719
|
+
background-color: ${et.tertiaryBackgroundColor};
|
|
720
|
+
color: ${et.tertiaryColor};
|
|
721
|
+
border-style: none;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.ft-button--tertiary[disabled] {
|
|
725
|
+
opacity: ${et.tertiaryComponentOpacityDisabled};
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.ft-button--tertiary ft-icon {
|
|
729
|
+
color: ${et.tertiaryIconColor};
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/** Neutral styles **/
|
|
733
|
+
|
|
734
|
+
.ft-button--neutral {
|
|
735
|
+
${o.setVariable(Co.color,et.neutralIconColor)};
|
|
736
|
+
|
|
737
|
+
${o.setVariable(mo.backgroundColor,et.neutralStateLayerColor)};
|
|
738
|
+
${o.setVariable(mo.opacityContentOnSurfaceHover,et.neutralStateLayerOpacityHover)};
|
|
739
|
+
${o.setVariable(mo.opacityContentOnSurfaceFocused,et.neutralStateLayerOpacityFocus)};
|
|
740
|
+
${o.setVariable(mo.opacityContentOnSurfaceSelected,et.neutralStateLayerOpacityActive)};
|
|
741
|
+
${o.setVariable(mo.opacityContentOnSurfacePressed,et.neutralStateLayerOpacityActive)};
|
|
742
|
+
|
|
743
|
+
background-color: ${et.neutralBackgroundColor};
|
|
744
|
+
color: ${et.neutralColor};
|
|
745
|
+
border-style: none;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.ft-button--neutral[disabled] {
|
|
749
|
+
opacity: ${et.neutralComponentOpacityDisabled};
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.ft-button--neutral ft-icon {
|
|
753
|
+
color: ${et.neutralIconColor};
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/** Large styles **/
|
|
757
|
+
|
|
758
|
+
.ft-button--large {
|
|
759
|
+
${o.setVariable(Io.size,et.largeIconSize)};
|
|
760
|
+
${o.setVariable(Co.size,et.largeIconSize)};
|
|
761
|
+
|
|
762
|
+
height: ${et.largeHeight};
|
|
763
|
+
padding: 0 ${et.largeHorizontalPadding};
|
|
764
|
+
gap: ${et.largeGap};
|
|
765
|
+
border-radius: ${et.largeBorderRadius};
|
|
766
|
+
border-width: ${et.largeBorderWidth};
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.ft-button--large:focus-visible {
|
|
770
|
+
outline-width: ${et.largeFocusOutlineWidth};
|
|
771
|
+
outline-offset: ${et.largeFocusOutlineOffset};
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.ft-button--large.ft-button--icon-only {
|
|
775
|
+
width: ${et.largeIconOnlyWidth};
|
|
776
|
+
padding: unset;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/** Small styles **/
|
|
780
|
+
|
|
781
|
+
.ft-button--small {
|
|
782
|
+
${o.setVariable(Io.size,et.smallIconSize)};
|
|
783
|
+
${o.setVariable(Co.size,et.smallIconSize)};
|
|
784
|
+
|
|
785
|
+
height: ${et.smallHeight};
|
|
786
|
+
padding: 0 ${et.smallHorizontalPadding};
|
|
787
|
+
gap: ${et.smallGap};
|
|
788
|
+
border-radius: ${et.smallBorderRadius};
|
|
789
|
+
border-width: ${et.smallBorderWidth};
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.ft-button--small:focus-visible {
|
|
793
|
+
outline-width: ${et.smallFocusOutlineWidth};
|
|
794
|
+
outline-offset: ${et.smallFocusOutlineOffset};
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.ft-button--small.ft-button--icon-only {
|
|
798
|
+
width: ${et.smallIconOnlyWidth};
|
|
799
|
+
padding: unset;
|
|
800
|
+
}
|
|
801
|
+
`,o.noTextSelect];var se=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class le extends ie{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Y.caption1medium:Y.body2medium}}le.styles=[o.safariEllipsisFix,ae],se([i.property({type:Boolean})],le.prototype,"primary",void 0),se([i.property({type:Boolean})],le.prototype,"secondary",void 0),se([i.property({type:Boolean})],le.prototype,"tertiary",void 0),se([i.property({type:Boolean})],le.prototype,"neutral",void 0),se([i.property({type:Boolean})],le.prototype,"small",void 0),o.customElement("ft-button")(ne),o.customElement("ftds-button")(le);const ce=o.FtCssVariableFactory.extend("--ft-checkbox-text-color","",o.designSystemVariables.colorOnSurfaceHigh),he=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),pe=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),fe=o.FtCssVariableFactory.extend("--ft-checkbox-border-color","",o.designSystemVariables.colorOnSurfaceMedium),de=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),ue=e.css`
|
|
802
|
+
* {
|
|
803
|
+
box-sizing: border-box;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.ft-checkbox {
|
|
807
|
+
box-sizing: border-box;
|
|
808
|
+
color: ${ce};
|
|
809
|
+
|
|
810
|
+
display: inline-flex;
|
|
811
|
+
align-items: center;
|
|
812
|
+
gap: 4px;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.ft-checkbox--disabled {
|
|
816
|
+
color: ${de};
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
input {
|
|
820
|
+
opacity: 0;
|
|
821
|
+
position: absolute;
|
|
822
|
+
width: 40px;
|
|
823
|
+
height: 40px;
|
|
824
|
+
margin: 0;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.ft-checkbox--box-container {
|
|
828
|
+
position: relative;
|
|
829
|
+
width: 40px;
|
|
830
|
+
height: 40px;
|
|
831
|
+
|
|
832
|
+
display: flex;
|
|
833
|
+
justify-content: center;
|
|
834
|
+
align-items: center;
|
|
835
|
+
flex-shrink: 0;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
.ft-checkbox--box {
|
|
839
|
+
display: flex;
|
|
840
|
+
border: 2px solid ${fe};
|
|
841
|
+
border-radius: 2px;
|
|
842
|
+
|
|
843
|
+
width: 18px;
|
|
844
|
+
height: 18px;
|
|
845
|
+
|
|
846
|
+
color: ${pe};
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
.ft-checkbox--checked .ft-checkbox--box,
|
|
851
|
+
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
852
|
+
border-color: ${he};
|
|
853
|
+
background-color: ${he};
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.ft-checkbox--disabled .ft-checkbox--box {
|
|
857
|
+
border-color: ${de};
|
|
858
|
+
background-color: transparent;
|
|
859
|
+
color: ${de};
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.ft-checkbox--checkmark {
|
|
863
|
+
transition: opacity 180ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 180ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
864
|
+
opacity: 0;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
.ft-checkbox--checkmark-path {
|
|
868
|
+
stroke-dashoffset: 0;
|
|
869
|
+
stroke: currentcolor;
|
|
870
|
+
stroke-width: 3px;
|
|
871
|
+
stroke-dasharray: 30;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.ft-checkbox--checked .ft-checkbox--checkmark,
|
|
875
|
+
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
876
|
+
opacity: 1;
|
|
877
|
+
}
|
|
878
|
+
`;var ye=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ge extends o.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
879
|
+
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
880
|
+
<div class="ft-checkbox--box-container">
|
|
881
|
+
<ft-ripple
|
|
882
|
+
?disabled=${this.disabled}
|
|
883
|
+
?primary=${this.checked||this.indeterminate}
|
|
884
|
+
unbounded>
|
|
885
|
+
</ft-ripple>
|
|
886
|
+
<div class="ft-checkbox--box">
|
|
887
|
+
<svg class="ft-checkbox--checkmark" viewBox="0 0 24 24">
|
|
888
|
+
<path class="ft-checkbox--checkmark-path" fill="none"
|
|
889
|
+
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
890
|
+
</svg>
|
|
891
|
+
</div>
|
|
892
|
+
<input type="checkbox"
|
|
893
|
+
id="checkbox-input"
|
|
894
|
+
name="${this.name}"
|
|
895
|
+
.checked=${this.checked}
|
|
896
|
+
.disabled=${this.disabled}
|
|
897
|
+
@change=${this.onChange}
|
|
898
|
+
>
|
|
899
|
+
</div>
|
|
900
|
+
<ft-typography variant="body2">
|
|
901
|
+
<slot></slot>
|
|
902
|
+
</ft-typography>
|
|
903
|
+
</label>
|
|
904
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),null===(o=this.ripple)||void 0===o||o.setupFor(this.container)}}ge.elementDefinitions={"ft-ripple":Fo,"ft-typography":go},ge.styles=ue,ye([i.property()],ge.prototype,"name",void 0),ye([i.property({type:Boolean,reflect:!0})],ge.prototype,"checked",void 0),ye([i.property({type:Boolean})],ge.prototype,"indeterminate",void 0),ye([i.property({type:Boolean})],ge.prototype,"disabled",void 0),ye([i.query(".ft-checkbox")],ge.prototype,"container",void 0),ye([i.query("ft-ripple")],ge.prototype,"ripple",void 0),o.customElement("ft-checkbox")(ge);const be=o.FtCssVariableFactory.extend("--ft-radio-text-color","",o.designSystemVariables.colorOnSurfaceHigh),me=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),ve=(o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),o.FtCssVariableFactory.extend("--ft-radio-border-color","",o.designSystemVariables.colorOnSurfaceMedium)),xe=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Oe=e.css`
|
|
905
|
+
* {
|
|
906
|
+
box-sizing: border-box;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.ft-radio {
|
|
910
|
+
box-sizing: border-box;
|
|
911
|
+
color: ${be};
|
|
912
|
+
|
|
913
|
+
display: inline-flex;
|
|
914
|
+
align-items: center;
|
|
915
|
+
gap: 4px;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.ft-radio--disabled {
|
|
919
|
+
color: ${xe};
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
input {
|
|
923
|
+
opacity: 0;
|
|
924
|
+
position: absolute;
|
|
925
|
+
width: 40px;
|
|
926
|
+
height: 40px;
|
|
927
|
+
margin: 0;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.ft-radio--box-container {
|
|
931
|
+
position: relative;
|
|
932
|
+
width: 40px;
|
|
933
|
+
height: 40px;
|
|
934
|
+
|
|
935
|
+
display: flex;
|
|
936
|
+
justify-content: center;
|
|
937
|
+
align-items: center;
|
|
938
|
+
flex-shrink: 0;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.ft-radio--box {
|
|
942
|
+
border: 2px solid ${ve};
|
|
943
|
+
border-radius: 50%;
|
|
944
|
+
|
|
945
|
+
display: flex;
|
|
946
|
+
justify-content: center;
|
|
947
|
+
align-items: center;
|
|
948
|
+
|
|
949
|
+
width: 20px;
|
|
950
|
+
height: 20px;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
.ft-radio--box:after {
|
|
954
|
+
content: " ";
|
|
955
|
+
background-color: ${me};
|
|
956
|
+
|
|
957
|
+
border-radius: 50%;
|
|
958
|
+
|
|
959
|
+
width: 12px;
|
|
960
|
+
height: 12px;
|
|
961
|
+
|
|
962
|
+
transform: scale(0);
|
|
963
|
+
transition: transform 100ms ease;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.ft-radio--checked .ft-radio--box {
|
|
967
|
+
border-color: ${me};
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
.ft-radio--checked .ft-radio--box:after {
|
|
972
|
+
transform: scale(1);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.ft-radio--disabled .ft-radio--box {
|
|
976
|
+
border-color: ${xe};
|
|
977
|
+
background-color: transparent;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.ft-radio--disabled .ft-radio--box:after {
|
|
981
|
+
background-color: ${xe};
|
|
982
|
+
}
|
|
983
|
+
`;var Ne=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Se extends CustomEvent{constructor(t,o){super("change",{detail:{value:t,checked:o},bubbles:!0,composed:!0})}}class we extends o.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
984
|
+
<div class="${n.classMap(t)}">
|
|
985
|
+
<div class="ft-radio--box-container">
|
|
986
|
+
<ft-ripple
|
|
987
|
+
?disabled=${this.disabled}
|
|
988
|
+
?primary=${this.checked}
|
|
989
|
+
unbounded>
|
|
990
|
+
</ft-ripple>
|
|
991
|
+
<div class="ft-radio--box">
|
|
992
|
+
</div>
|
|
993
|
+
<input id="radio-button"
|
|
994
|
+
type="radio"
|
|
995
|
+
name="${this.name}"
|
|
996
|
+
value="${this.value}"
|
|
997
|
+
.checked=${this.checked}
|
|
998
|
+
.disabled=${this.disabled}
|
|
999
|
+
@change=${this.onChange}
|
|
1000
|
+
>
|
|
1001
|
+
</div>
|
|
1002
|
+
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
1003
|
+
<ft-typography variant="body2">
|
|
1004
|
+
<slot></slot>
|
|
1005
|
+
</ft-typography>
|
|
1006
|
+
</label>
|
|
1007
|
+
</div>
|
|
1008
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Se(this.value,this.checked))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),null===(o=this.ripple)||void 0===o||o.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Se(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}we.elementDefinitions={"ft-ripple":Fo,"ft-typography":go},we.styles=Oe,Ne([i.property()],we.prototype,"value",void 0),Ne([i.property()],we.prototype,"name",void 0),Ne([i.property({type:Boolean,reflect:!0})],we.prototype,"checked",void 0),Ne([i.property({type:Boolean})],we.prototype,"disabled",void 0),Ne([i.query(".ft-radio")],we.prototype,"container",void 0),Ne([i.query("ft-ripple")],we.prototype,"ripple",void 0),Ne([i.query("input")],we.prototype,"input",void 0);const $e=e.css`
|
|
1009
|
+
:host {
|
|
1010
|
+
display: contents;
|
|
1011
|
+
}
|
|
1012
|
+
`;var Ce=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ke extends o.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
1013
|
+
<slot @slotchange=${this.onSlotChange}
|
|
1014
|
+
@change=${this.onChange}
|
|
1015
|
+
@keydown=${this.onKeyDown}
|
|
1016
|
+
></slot>
|
|
1017
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((o=>o.checked=t.detail.value===o.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let o=this.findFtRadio(t),e=this.radioButtons.indexOf(o)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let o=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[o>this.radioButtons.length-1?0:o].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}ke.elementDefinitions={},ke.styles=$e,Ce([i.property()],ke.prototype,"name",void 0),Ce([i.queryAssignedElements()],ke.prototype,"radioButtons",void 0),o.customElement("ft-radio")(we),o.customElement("ft-radio-group")(ke);const Ie={borderRadiusM:o.FtCssVariableFactory.external(o.designSystemVariables.borderRadiusM,"Design system"),colorOutline:o.FtCssVariableFactory.external(o.designSystemVariables.colorOutline,"Design system"),colorOnSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:o.FtCssVariableFactory.external(Bt.fontFamily,"Body2 typography"),fontSize:o.FtCssVariableFactory.external(Bt.fontSize,"Body2 typography"),fontWeight:o.FtCssVariableFactory.external(Bt.fontWeight,"Body2 typography"),letterSpacing:o.FtCssVariableFactory.external(Bt.letterSpacing,"Body2 typography"),lineHeight:o.FtCssVariableFactory.external(Bt.lineHeight,"Body2 typography"),textTransform:o.FtCssVariableFactory.external(Bt.textTransform,"Body2 typography")},Ee=e.css`
|
|
1018
|
+
.ft-filter-level--container {
|
|
1019
|
+
display: flex;
|
|
1020
|
+
flex-direction: column;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.ft-filter-level--container > * {
|
|
1024
|
+
padding: 0 10px;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.ft-filter-level--go-back {
|
|
1028
|
+
flex-shrink: 0;
|
|
1029
|
+
text-decoration: none;
|
|
1030
|
+
position: relative;
|
|
1031
|
+
border-radius: ${Ie.borderRadiusM};
|
|
1032
|
+
overflow: hidden;
|
|
1033
|
+
display: flex;
|
|
1034
|
+
align-items: center;
|
|
1035
|
+
padding: 4px 4px;
|
|
1036
|
+
gap: 4px;
|
|
1037
|
+
cursor: pointer;
|
|
1038
|
+
color: ${Ie.colorOnSurface};
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.ft-filter-level--go-back:focus {
|
|
1042
|
+
outline: none;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.ft-filter-level--go-back ft-icon {
|
|
1046
|
+
flex-shrink: 0;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.ft-filter-level--go-back ft-typography {
|
|
1050
|
+
display: block;
|
|
1051
|
+
flex-grow: 1;
|
|
1052
|
+
flex-shrink: 0;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.ft-filter-level--option {
|
|
1056
|
+
display: flex;
|
|
1057
|
+
align-items: center;
|
|
1058
|
+
max-width: 100%;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.ft-filter-level--option ft-button {
|
|
1062
|
+
margin-right: -10px;
|
|
1063
|
+
flex-shrink: 0;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
ft-button {
|
|
1067
|
+
${o.setVariable(Uo.color,Ie.colorOnSurface)};
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
ft-radio, ft-checkbox {
|
|
1071
|
+
flex-shrink: 1;
|
|
1072
|
+
flex-grow: 1;
|
|
1073
|
+
display: flex;
|
|
1074
|
+
max-width: calc(100% + 10px);
|
|
1075
|
+
margin-left: -10px;
|
|
1076
|
+
word-break: break-word;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.ft-filter-level--no-values {
|
|
1080
|
+
margin: 10px 0;
|
|
1081
|
+
color: ${Ie.colorOnSurfaceMedium};
|
|
1082
|
+
}
|
|
1083
|
+
`;var Re=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ue extends o.FtLitElement{constructor(){super(...arguments),this.filterId="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,o;return null!==(o=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==o?o:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const o=t.slice(0,this.limit);return e.html`
|
|
1084
|
+
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1085
|
+
${null==this.parent?null:e.html`
|
|
1086
|
+
<div tabindex="0"
|
|
1087
|
+
part="controls go-back"
|
|
1088
|
+
class="ft-filter-level--go-back"
|
|
1089
|
+
?disabled=${this.disabled}
|
|
1090
|
+
@keyup=${this.goBackOnKeyPress}
|
|
1091
|
+
@click=${this.goBackOnClick}>
|
|
1092
|
+
<ft-ripple></ft-ripple>
|
|
1093
|
+
<ft-icon>thin_arrow_left</ft-icon>
|
|
1094
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
1095
|
+
</div>
|
|
1096
|
+
`}
|
|
1097
|
+
${0===this.options.length&&this.noValuesLabel?e.html`
|
|
1098
|
+
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
1099
|
+
${this.noValuesLabel}
|
|
1100
|
+
</ft-typography>
|
|
1101
|
+
`:e.nothing}
|
|
1102
|
+
${r.repeat(o,(t=>t.value),(t=>{var o;return e.html`
|
|
1103
|
+
<div class="ft-filter-level--option" part="options">
|
|
1104
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
1105
|
+
${this.preventNavigation||t.selected||0===(null!==(o=t.subOptions)&&void 0!==o?o:[]).length?e.nothing:e.html`
|
|
1106
|
+
<ft-button icon="thin_arrow_right"
|
|
1107
|
+
part="controls navigate-hierarchy"
|
|
1108
|
+
label="${t.label}"
|
|
1109
|
+
?disabled=${this.disabled}
|
|
1110
|
+
tooltipPosition="left"
|
|
1111
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
1112
|
+
`}
|
|
1113
|
+
</div>
|
|
1114
|
+
`}))}
|
|
1115
|
+
${o.length<t.length?e.html`
|
|
1116
|
+
<ft-button
|
|
1117
|
+
class="ft-filter-level--display-more"
|
|
1118
|
+
icon="thin_arrow"
|
|
1119
|
+
dense trailingIcon
|
|
1120
|
+
part="controls display-more"
|
|
1121
|
+
@click=${this.displayMore}>
|
|
1122
|
+
${this.moreValuesButtonLabel}
|
|
1123
|
+
</ft-button>
|
|
1124
|
+
`:e.nothing}
|
|
1125
|
+
</div>
|
|
1126
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var i;return e.html`
|
|
1127
|
+
<ft-checkbox name="${this.filterId}"
|
|
1128
|
+
part="multivalued-option"
|
|
1129
|
+
data-value="${t.value}"
|
|
1130
|
+
.checked=${t.selected}
|
|
1131
|
+
.disabled=${this.disabled}
|
|
1132
|
+
.indeterminate=${o.flatDeep(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]})).some((t=>t.selected))}
|
|
1133
|
+
@change=${o=>this.optionsChanged(o,t)}>
|
|
1134
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1135
|
+
</ft-checkbox>
|
|
1136
|
+
`}buildMonoValuedOption(t){return e.html`
|
|
1137
|
+
<ft-radio name="${this.filterId+Math.round(1e6*Math.random())}"
|
|
1138
|
+
part="monovalued-option"
|
|
1139
|
+
data-value="${t.value}"
|
|
1140
|
+
.checked=${t.selected}
|
|
1141
|
+
.disabled=${this.disabled}
|
|
1142
|
+
@click=${o=>this.optionsChanged(o,t)}
|
|
1143
|
+
@keyup=${o=>this.onRadioKeyUp(o,t)}
|
|
1144
|
+
@change=${t=>t.stopPropagation()}>
|
|
1145
|
+
${t.renderOption?t.renderOption:t.label}
|
|
1146
|
+
</ft-radio>
|
|
1147
|
+
`}onRadioKeyUp(t,o){o.selected&&" "===t.key&&this.optionsChanged(t,o)}optionsChanged(t,o){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:o}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Ue.elementDefinitions={"ft-button":ne,"ft-ripple":Fo,"ft-typography":go,"ft-checkbox":ge,"ft-icon":te,"ft-radio":we},Ue.styles=Ee,Re([i.property({type:String})],Ue.prototype,"filterId",void 0),Re([i.property({type:Object})],Ue.prototype,"parent",void 0),Re([i.property({type:Array})],Ue.prototype,"options",void 0),Re([i.property({type:Boolean})],Ue.prototype,"multivalued",void 0),Re([i.property({type:Boolean})],Ue.prototype,"disabled",void 0),Re([i.property({type:Boolean})],Ue.prototype,"hideSelectedOptions",void 0),Re([i.property({type:Boolean})],Ue.prototype,"preventNavigation",void 0),Re([i.property({type:String})],Ue.prototype,"filter",void 0),Re([i.property({type:String})],Ue.prototype,"moreValuesButtonLabel",void 0),Re([i.property({type:String})],Ue.prototype,"noValuesLabel",void 0),Re([i.property({type:Number})],Ue.prototype,"displayedValuesLimit",void 0),Re([i.query(".ft-filter-level--container")],Ue.prototype,"container",void 0),Re([i.state()],Ue.prototype,"displayedPages",void 0);const Le={buttonsColor:o.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color","",o.designSystemVariables.colorPrimary),buttonsZIndex:o.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:o.FtCssVariableFactory.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system")},We=e.css`
|
|
1148
|
+
.ft-snap-scroll {
|
|
1149
|
+
box-sizing: border-box;
|
|
1150
|
+
position: relative;
|
|
1151
|
+
display: flex;
|
|
1152
|
+
|
|
1153
|
+
--ft-snap-scroll-transparent-color: transparent;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.ft-snap-scroll.ft-snap-scroll--safari-fix {
|
|
1157
|
+
/* Safari handles "transparent" as rgba(0,0,0,0) so it's ugly in linear-gradiant with default --ft-color-surface */
|
|
1158
|
+
/* this value should be overridden with --ft-color-surface with alpha set to 0 when needed */
|
|
1159
|
+
--ft-snap-scroll-transparent-color: rgba(255, 255, 255, 0);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
.ft-snap-scroll,
|
|
1163
|
+
.ft-snap-scroll--content {
|
|
1164
|
+
overflow: hidden;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
.ft-snap-scroll--limit-size,
|
|
1168
|
+
.ft-snap-scroll--limit-size .ft-snap-scroll--content {
|
|
1169
|
+
width: 100%;
|
|
1170
|
+
height: 100%;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.ft-snap-scroll--content {
|
|
1174
|
+
flex-grow: 1;
|
|
1175
|
+
flex-shrink: 1;
|
|
1176
|
+
box-sizing: border-box;
|
|
1177
|
+
scroll-snap-align: start;
|
|
1178
|
+
display: flex;
|
|
1179
|
+
flex-wrap: nowrap;
|
|
1180
|
+
align-items: flex-start;
|
|
1181
|
+
justify-content: flex-start;
|
|
1182
|
+
gap: ${Le.gap};
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
1186
|
+
display: none;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content {
|
|
1190
|
+
-ms-overflow-style: none;
|
|
1191
|
+
scrollbar-width: none;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.ft-snap-scroll--content::slotted(*) {
|
|
1195
|
+
flex-shrink: 0;
|
|
1196
|
+
flex-grow: 1;
|
|
1197
|
+
max-height: 100%;
|
|
1198
|
+
max-width: 100%;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.ft-snap-scroll--horizontal,
|
|
1202
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1203
|
+
width: 100%;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.ft-snap-scroll--vertical,
|
|
1207
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1208
|
+
height: 100%;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--content {
|
|
1212
|
+
flex-direction: row;
|
|
1213
|
+
overflow-x: auto;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--content {
|
|
1217
|
+
flex-direction: column;
|
|
1218
|
+
overflow-y: auto;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
.ft-snap-scroll--previous,
|
|
1222
|
+
.ft-snap-scroll--next {
|
|
1223
|
+
position: absolute;
|
|
1224
|
+
display: flex;
|
|
1225
|
+
z-index: ${Le.buttonsZIndex};
|
|
1226
|
+
opacity: 1;
|
|
1227
|
+
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1228
|
+
${o.setVariable(Uo.backgroundColor,"transparent")};
|
|
1229
|
+
${o.setVariable(Uo.color,Le.buttonsColor)};
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.ft-snap-scroll--previous[hidden],
|
|
1233
|
+
.ft-snap-scroll--next[hidden] {
|
|
1234
|
+
z-index: -1;
|
|
1235
|
+
opacity: 0;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous {
|
|
1239
|
+
top: 0;
|
|
1240
|
+
left: -1px;
|
|
1241
|
+
bottom: 0;
|
|
1242
|
+
background: linear-gradient(to right, ${Le.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1246
|
+
top: -1px;
|
|
1247
|
+
left: 0;
|
|
1248
|
+
right: 0;
|
|
1249
|
+
background: linear-gradient(to bottom, ${Le.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1253
|
+
top: 0;
|
|
1254
|
+
right: -1px;
|
|
1255
|
+
bottom: 0;
|
|
1256
|
+
background: linear-gradient(to left, ${Le.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1260
|
+
left: 0;
|
|
1261
|
+
right: 0;
|
|
1262
|
+
bottom: -1px;
|
|
1263
|
+
background: linear-gradient(to top, ${Le.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1267
|
+
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1268
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1269
|
+
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1270
|
+
background-color: ${Le.colorSurface};
|
|
1271
|
+
}
|
|
1272
|
+
`;var ze=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ke extends CustomEvent{constructor(t,o){super("current-element-change",{detail:{index:t,element:o}})}}class Be extends o.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new o.Debouncer(200),this.updateScrollDebouncer=new o.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let o=this.elements[t];if(o){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(o[this.offsetAttribute]<e||o[this.offsetAttribute]+o[this.sizeAttribute]>t)&&this.scrollToElement(o)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":o.isSafari}),i=this.controls&&this.withScroll;return e.html`
|
|
1273
|
+
<div part="container" class="${t}">
|
|
1274
|
+
<ft-button
|
|
1275
|
+
class="ft-snap-scroll--previous"
|
|
1276
|
+
part="controls"
|
|
1277
|
+
primary
|
|
1278
|
+
icon="${this.horizontal?"THIN_ARROW_LEFT":"THIN_ARROW_UP"}"
|
|
1279
|
+
?hidden=${!i||this.startReached}
|
|
1280
|
+
?disabled=${!i||this.startReached}
|
|
1281
|
+
@click=${this.previous}
|
|
1282
|
+
></ft-button>
|
|
1283
|
+
<slot class="ft-snap-scroll--content"
|
|
1284
|
+
part="content"
|
|
1285
|
+
@slotchange=${this.onSlotChange}></slot>
|
|
1286
|
+
<ft-button
|
|
1287
|
+
class="ft-snap-scroll--next"
|
|
1288
|
+
part="controls"
|
|
1289
|
+
primary
|
|
1290
|
+
icon="${this.horizontal?"THIN_ARROW_RIGHT":"THIN_ARROW"}"
|
|
1291
|
+
?hidden=${!i||this.endReached}
|
|
1292
|
+
?disabled=${!i||this.endReached}
|
|
1293
|
+
@click=${this.next}
|
|
1294
|
+
></ft-button>
|
|
1295
|
+
</div>
|
|
1296
|
+
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new Ke(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(o=this.listenedContainer)||void 0===o||o.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const o=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<o&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var o,e;t&&(this.horizontal?null===(o=this.contentSlot)||void 0===o||o.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,o;this.elements=null!==(o=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==o?o:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let o=0;o<this.elements.length;o++)(t<0||this.getDistanceFromStart(this.elements[o])<this.getDistanceFromStart(this.elements[t]))&&(t=o);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const o=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-o)}}Be.elementDefinitions={"ft-button":ne},Be.styles=We,ze([i.property({type:Boolean})],Be.prototype,"horizontal",void 0),ze([i.property({type:Boolean})],Be.prototype,"hideScrollbar",void 0),ze([i.property({type:Boolean})],Be.prototype,"controls",void 0),ze([i.property({type:Boolean})],Be.prototype,"limitSize",void 0),ze([i.state()],Be.prototype,"elements",void 0),ze([i.state()],Be.prototype,"currentElement",void 0),ze([i.state()],Be.prototype,"withScroll",void 0),ze([i.state()],Be.prototype,"startReached",void 0),ze([i.state()],Be.prototype,"endReached",void 0),ze([i.query(".ft-snap-scroll--content")],Be.prototype,"contentSlot",void 0),o.customElement("ft-snap-scroll")(Be);const Ae=o.FtCssVariableFactory.external(o.designSystemVariables.colorOutline,"Design system"),De=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurface,"Design system"),Ze=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceMedium,"Design system"),Fe=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),Te=o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system"),He=o.FtCssVariableFactory.external(o.designSystemVariables.transitionDuration,"Design system"),Pe=o.FtCssVariableFactory.external(o.designSystemVariables.transitionTimingFunction,"Design system"),je=[lo,e.css`
|
|
1297
|
+
:host {
|
|
1298
|
+
display: flex;
|
|
1299
|
+
max-height: 100%;
|
|
1300
|
+
max-width: 100%;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
.ft-filter--container {
|
|
1304
|
+
flex-grow: 1;
|
|
1305
|
+
display: flex;
|
|
1306
|
+
flex-direction: column;
|
|
1307
|
+
max-height: 100%;
|
|
1308
|
+
max-width: 100%;
|
|
1309
|
+
color: ${De};
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
.ft-filter--header {
|
|
1313
|
+
display: flex;
|
|
1314
|
+
flex-wrap: wrap;
|
|
1315
|
+
gap: 4px;
|
|
1316
|
+
flex-shrink: 0;
|
|
1317
|
+
padding: 0 10px;
|
|
1318
|
+
margin-bottom: 8px;
|
|
1319
|
+
${o.setVariable(nt.fontSize,"14px")};
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
.ft-filter--header ft-button {
|
|
1323
|
+
flex-shrink: 0;
|
|
1324
|
+
margin-left: auto;
|
|
1325
|
+
${o.setVariable(Uo.iconSize,"18px")};
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.ft-filter--label {
|
|
1329
|
+
display: block;
|
|
1330
|
+
flex-shrink: 1;
|
|
1331
|
+
flex-grow: 1;
|
|
1332
|
+
word-break: break-word;
|
|
1333
|
+
${o.setVariable(nt.lineHeight,"22px")};
|
|
1334
|
+
${o.setVariable(nt.fontWeight,"bold")};
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.ft-filter--filter {
|
|
1338
|
+
flex-shrink: 0;
|
|
1339
|
+
display: flex;
|
|
1340
|
+
margin: 0;
|
|
1341
|
+
margin-bottom: 8px;
|
|
1342
|
+
padding: 0 10px;
|
|
1343
|
+
overflow: hidden;
|
|
1344
|
+
height: 32px;
|
|
1345
|
+
transition: height ${He} ${Pe},
|
|
1346
|
+
margin ${He} ${Pe};
|
|
1347
|
+
transition-delay: 500ms;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
.ft-filter--filter[hidden] {
|
|
1351
|
+
height: 0;
|
|
1352
|
+
margin-bottom: 0;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
input {
|
|
1356
|
+
display: block;
|
|
1357
|
+
width: 100%;
|
|
1358
|
+
border-radius: 4px;
|
|
1359
|
+
border: 1px solid ${Ae};
|
|
1360
|
+
padding: 4px;
|
|
1361
|
+
background-color: ${Te};
|
|
1362
|
+
color: ${De};
|
|
1363
|
+
outline-color: ${Fe};
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
input::placeholder {
|
|
1367
|
+
color: ${Ze};
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
input:placeholder-shown {
|
|
1371
|
+
text-overflow: ellipsis;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
.ft-filter--values {
|
|
1375
|
+
flex-grow: 1;
|
|
1376
|
+
flex-shrink: 1;
|
|
1377
|
+
max-width: 100%;
|
|
1378
|
+
overflow-x: hidden;
|
|
1379
|
+
overflow-y: auto;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.ft-filter--separator {
|
|
1383
|
+
border-top: 1px solid ${Ae};
|
|
1384
|
+
margin: 4px 10px;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
.ft-filter--levels-container {
|
|
1388
|
+
position: relative;
|
|
1389
|
+
overflow: hidden;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.ft-filter--levels {
|
|
1393
|
+
position: relative;
|
|
1394
|
+
overflow: hidden;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
ft-filter-level {
|
|
1398
|
+
width: 100%;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.ft-filter--level-left {
|
|
1402
|
+
height: 0;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
slot:not([name]) {
|
|
1406
|
+
display: none;
|
|
1407
|
+
}
|
|
1408
|
+
`];var Me=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class _e extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ge extends o.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new o.Debouncer(300),this.changeDebouncer=new o.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return o.flatDeep(this.options,(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,i=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1409
|
+
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1410
|
+
part="container">
|
|
1411
|
+
${this.label||t?e.html`
|
|
1412
|
+
<div class="ft-filter--header" part="header">
|
|
1413
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">
|
|
1414
|
+
${this.label}
|
|
1415
|
+
</ft-typography>
|
|
1416
|
+
<slot name="label"></slot>
|
|
1417
|
+
${t&&!this.hideClearButton?e.html`
|
|
1418
|
+
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1419
|
+
${this.clearButtonLabel}
|
|
1420
|
+
</ft-button>
|
|
1421
|
+
`:null}
|
|
1422
|
+
</div>
|
|
1423
|
+
`:null}
|
|
1424
|
+
<div class="ft-filter--filter" ?hidden=${!o}>
|
|
1425
|
+
<input type="search"
|
|
1426
|
+
part="input"
|
|
1427
|
+
class="ft-typography--caption"
|
|
1428
|
+
?disabled=${!o}
|
|
1429
|
+
placeholder="${i}"
|
|
1430
|
+
size="${o?i.length:0}"
|
|
1431
|
+
@search=${this.onFilterChange}
|
|
1432
|
+
@keyup=${this.onFilterChange}>
|
|
1433
|
+
</div>
|
|
1434
|
+
<div class="ft-filter--values">
|
|
1435
|
+
${this.renderLevels()}
|
|
1436
|
+
</div>
|
|
1437
|
+
<slot class="ft-filter--slot"
|
|
1438
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1439
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1440
|
+
</div>
|
|
1441
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((o=>t.has(o))),this.lastDispatchedValues=this.selectedValues}}contentAvailableCallback(t){var o,e,i,r,n;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(o=this.levelsContainer)||void 0===o||o.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300)),this.lastLevelHasHiddenvalues=null!==(n=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".ft-filter--levels ft-filter-level:last-child"))||void 0===r?void 0:r.hasHiddenValues)&&void 0!==n&&n}renderLevels(){const t=this.flatOptions,o=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1442
|
+
${this.raiseSelectedOptions&&o.length>0?e.html`
|
|
1443
|
+
<ft-filter-level
|
|
1444
|
+
filterId="${this.id}"
|
|
1445
|
+
?multivalued=${this.multivalued}
|
|
1446
|
+
?disabled=${this.disabled}
|
|
1447
|
+
preventNavigation
|
|
1448
|
+
.options=${o}
|
|
1449
|
+
@change=${this.onChange}
|
|
1450
|
+
part="values selected-values"
|
|
1451
|
+
.exportpartsPrefixes=${["values","selected-values"]}
|
|
1452
|
+
></ft-filter-level>
|
|
1453
|
+
<div class="ft-filter--separator">
|
|
1454
|
+
`:null}
|
|
1455
|
+
<ft-snap-scroll horizontal hideScrollbar
|
|
1456
|
+
class="ft-filter--levels"
|
|
1457
|
+
@current-element-change=${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}>
|
|
1458
|
+
${this.renderLevel(r,this.options)}
|
|
1459
|
+
${this.displayedLevels.map((o=>t.find((t=>t.value===o)))).map(((t,o)=>{var e;const r=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":o===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(r,null!==(e=null==t?void 0:t.subOptions)&&void 0!==e?e:[],t)}))}
|
|
1460
|
+
</ft-snap-scroll>
|
|
1461
|
+
`}renderLevel(t,o,i){return e.html`
|
|
1462
|
+
<ft-filter-level
|
|
1463
|
+
class="${t}"
|
|
1464
|
+
filterId="${this.id}"
|
|
1465
|
+
.filter="${this.filter}"
|
|
1466
|
+
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1467
|
+
?multivalued=${this.multivalued}
|
|
1468
|
+
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1469
|
+
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1470
|
+
.parent=${i}
|
|
1471
|
+
.options=${o}
|
|
1472
|
+
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
1473
|
+
@change=${this.onChange}
|
|
1474
|
+
@go-back=${this.goBack}
|
|
1475
|
+
@display-level=${this.onDisplayLevel}
|
|
1476
|
+
part="values available-values"
|
|
1477
|
+
.exportpartsPrefixes=${["values","available-values"]}
|
|
1478
|
+
noValuesLabel="${this.noValuesLabel}"
|
|
1479
|
+
></ft-filter-level>
|
|
1480
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var o;t.stopPropagation();const e=this.flatOptions.find((o=>o.value===t.detail.value));e.selected=!e.selected;const i=t=>{var o;t!==e&&(t.selected=!1),null===(o=t.subOptions)||void 0===o||o.forEach(i)};this.multivalued?null===(o=e.subOptions)||void 0===o||o.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;o.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new _e(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,o;this.filter=null!==(o=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==o?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Ge.elementDefinitions={"ft-button":ne,"ft-filter-level":Ue,"ft-snap-scroll":Be,"ft-typography":go},Ge.styles=je,Me([i.property({type:String})],Ge.prototype,"id",void 0),Me([i.property({type:String})],Ge.prototype,"label",void 0),Me([i.property({type:String})],Ge.prototype,"filterPlaceHolder",void 0),Me([i.property({type:String})],Ge.prototype,"clearButtonLabel",void 0),Me([i.property({type:String})],Ge.prototype,"moreValuesButtonLabel",void 0),Me([i.property({type:String})],Ge.prototype,"noValuesLabel",void 0),Me([o.jsonProperty([])],Ge.prototype,"options",void 0),Me([i.property({type:Boolean})],Ge.prototype,"multivalued",void 0),Me([i.property({type:Boolean})],Ge.prototype,"disabled",void 0),Me([i.property({type:Boolean})],Ge.prototype,"raiseSelectedOptions",void 0),Me([i.property({type:Number})],Ge.prototype,"displayedValuesLimit",void 0),Me([i.property({type:Boolean})],Ge.prototype,"hideClearButton",void 0),Me([i.query(".ft-filter--slot")],Ge.prototype,"slotElement",void 0),Me([i.query(".ft-filter--container")],Ge.prototype,"container",void 0),Me([i.query(".ft-filter--values")],Ge.prototype,"valuesContainer",void 0),Me([i.query(".ft-filter--levels")],Ge.prototype,"levelsContainer",void 0),Me([i.state()],Ge.prototype,"lastLevelHasHiddenvalues",void 0),Me([i.query(".ft-filter--filter input")],Ge.prototype,"filterInput",void 0),Me([i.queryAll(".ft-filter--levels ft-filter-level")],Ge.prototype,"levels",void 0),Me([i.state()],Ge.prototype,"withScroll",void 0),Me([i.state()],Ge.prototype,"filter",void 0),Me([i.state()],Ge.prototype,"slideIn",void 0),Me([i.state()],Ge.prototype,"slideOut",void 0);var Ve=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class qe extends o.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1481
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1482
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}qe.elementDefinitions={},Ve([i.property({type:String})],qe.prototype,"label",void 0),Ve([i.property({type:Object,converter:t=>t})],qe.prototype,"value",void 0),Ve([i.property({type:Boolean,reflect:!0})],qe.prototype,"selected",void 0),Ve([i.property({type:Object})],qe.prototype,"subOptions",void 0),Ve([o.jsonProperty({})],qe.prototype,"renderOption",void 0),Ve([i.query(".ft-filter-option--slot")],qe.prototype,"slotElement",void 0),o.customElement("ft-filter")(Ge),o.customElement("ft-filter-option")(qe);const Ye=e.css`
|
|
1483
|
+
`,Xe=e.css`
|
|
1484
|
+
`,Qe=o.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,o)=>{t.baseUrl=o.payload},setApiIntegrationIdentifier:(t,o)=>{t.apiIntegrationIdentifier=o.payload},setUiLocale:(t,o)=>{t.uiLocale=o.payload},setAvailableUiLocales:(t,o)=>{t.availableUiLocales=o.payload},setEditorMode:(t,o)=>{t.editorMode=o.payload},setNoCustom:(t,o)=>{t.noCustom=o.payload},setNoCustomComponent:(t,o)=>{t.noCustomComponent=o.payload},setSession:(t,o)=>{t.session=o.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Je{static build(t){const{baseUrl:o,apiIntegrationIdentifier:e}=Qe.getState(),i=null!=t?t:e;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static get(t){var o;return null!=t?Je.build(t):null!==(o=Je.API)&&void 0!==o?o:Je.API=Je.build()}static await(t){return new Promise((o=>{let e=Je.get(t);if(e)o(e);else{const i=Qe.subscribe((()=>{e=Je.get(t),e&&(i(),o(e))}))}}))}}var ti;const oi=Symbol("clearAfterUnitTest");class ei{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={}},this.currentUiLocale=Qe.getState().uiLocale,Qe.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Qe.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};o.deepEqual(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var r,n,a;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(n=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==n?n:{};return new o.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>o.delay(0).then((()=>t())).catch((()=>null)))))}}ti=oi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ei((async(t,o)=>(await Je.await()).getFluidTopicsMessageContext(t,o)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new ei((async(t,o)=>(await Je.await()).getCustomMessageContext(t,o))));const ii=window.FluidTopicsI18nService,ri=window.FluidTopicsCustomI18nService;var ni=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ai extends o.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Je.get(),this.cache=new o.CacheRegistry,this.cleanSessionDebouncer=new o.Debouncer}render(){return e.html`
|
|
1485
|
+
<slot></slot>
|
|
1486
|
+
`}update(t){super.update(t),t.has("baseUrl")&&Qe.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Qe.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Qe.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Qe.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Qe.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Qe.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Qe.actions.setSession(this.session),t.has("availableUiLocales")&&Qe.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ii.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 o=await t.getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),o.idleTimeoutInMillis),o}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}ai.elementDefinitions={},ai.styles=Xe,ni([i.property()],ai.prototype,"baseUrl",void 0),ni([i.property()],ai.prototype,"apiIntegrationIdentifier",void 0),ni([i.property()],ai.prototype,"uiLocale",void 0),ni([o.jsonProperty([])],ai.prototype,"availableUiLocales",void 0),ni([i.property({type:Boolean})],ai.prototype,"editorMode",void 0),ni([i.property({type:Boolean})],ai.prototype,"noCustom",void 0),ni([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ai.prototype,"noCustomComponent",void 0),ni([i.property({type:Boolean})],ai.prototype,"withManualResources",void 0),ni([o.jsonProperty([])],ai.prototype,"messageContexts",void 0),ni([o.jsonProperty(void 0)],ai.prototype,"session",void 0),ni([i.property({type:Object})],ai.prototype,"apiProvider",void 0);class si{async listMySearches(){var t;return(null===(t=Qe.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Je.await()).listMySearches(Qe.getState().session.profile.userId):[]}}const li=new o.CacheRegistry;class ci{async listMyBookmarks(){return li.get("bookmarks",(async()=>(await Je.await()).listMyBookmarks(Qe.getState().session.profile.userId)))}clearCache(){li.clear("bookmarks")}}const hi=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const pi=new class{constructor(){this.currentSession=Qe.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ci,Qe.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Qe.getState();o.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){hi.actions.savedSearches(void 0)}clearMyBookmarks(){hi.actions.bookmarks(void 0)}async reloadMySearches(){const t=new si,o=await t.listMySearches();hi.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;hi.actions.bookmarks(o)}}};o.customElement("ft-app-context")(ai);var fi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const di=Symbol("i18nProperties"),ui=Symbol("i18nUnsubs");function yi(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?ri:ii}i18n(t,o,...e){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var o;null===(o=this[di])||void 0===o||o.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var o;super.update(t),null===(o=this[di])||void 0===o||o.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[di]&&new Set([...this[di].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[ui].has(t)||this[ui].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages(t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[ui].forEach((t=>t())),this[ui].clear()}}return o=ui,fi([i.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class gi extends(yi(o.FtLitElement)){}class bi extends(yi(o.FtLitElementRedux)){}var mi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class vi extends bi{constructor(){super(),this.editorMode=!1,this.addStore(Qe)}render(){return this.key&&this.context?e.html`
|
|
1487
|
+
<span class="ft-i18n">
|
|
1488
|
+
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1489
|
+
</span>
|
|
1490
|
+
`: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})}}vi.elementDefinitions={},vi.styles=Ye,mi([o.redux()],vi.prototype,"editorMode",void 0),mi([i.property()],vi.prototype,"context",void 0),mi([i.property()],vi.prototype,"key",void 0),mi([o.jsonProperty([])],vi.prototype,"args",void 0),mi([i.property()],vi.prototype,"defaultMessage",void 0);class xi{static build(t){return new xi(t)}static fromGwt(t){return new xi(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;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,o)=>(...t)=>ii.resolveMessage(this.name,o,...t)})}}o.customElement("ft-i18n")(vi);const Oi={setRequest:(t,o)=>{t.request=o.payload},setRequestQuery:(t,o)=>{t.request.query=o.payload},setRequestContentLocale:(t,o)=>{t.request.contentLocale=o.payload},setPageSize:(t,o)=>{t.request.paging.perPage=o.payload},setPageNumber:(t,o)=>{t.request.paging.page=o.payload},setRequestSort:(t,o)=>{t.request.sort=o.payload},setRequestFilters:(t,o)=>{t.request.filters=o.payload},setRequestFacets:(t,o)=>{t.request.facets=o.payload},setRequestVirtualField:(t,o)=>{t.request.virtualField=o.payload},setRequestScope:(t,o)=>{t.request.scope=o.payload},setResults:(t,o)=>{t.results=o.payload},setFacets:(t,o)=>{t.facets=o.payload},setSpellcheck:(t,o)=>{t.spellcheck=o.payload},setLocales:(t,o)=>{t.locales=o.payload},setPaging:(t,o)=>{t.paging=o.payload},setLiveQuery:(t,o)=>{t.liveQuery=o.payload},setSuggestResults:(t,o)=>{t.suggestResults=o.payload}};var Ni,Si,wi,$i,Ci,ki,Ii,Ei,Ri,Ui,Li,Wi,zi,Ki;!function(t){!function(o){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function l(t){this.map={},t instanceof l?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function p(t){var o=new FileReader,e=h(o);return o.readAsArrayBuffer(t),e}function f(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=f(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=f(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,o,e,i=c(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=h(o),o.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),i=0;i<o.length;i++)e[i]=String.fromCharCode(o[i]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,o){t=n(t),o=a(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,o){this.map[n(t)]=a(o)},l.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),s(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,o){var e,i,r=(o=o||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new l(o.headers)),this.method=(e=o.method||this.method||"GET",i=e.toUpperCase(),u.indexOf(i)>-1?i:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),i=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(i),decodeURIComponent(r))}})),o}function b(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new l(o.headers),this.url=o.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},d.call(y.prototype),d.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new b(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function v(t,i){return new Promise((function(r,n){var a=new y(t,i);if(a.signal&&a.signal.aborted)return n(new o.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,o,e={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",o=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),i=e.shift().trim();if(i){var r=e.join(":").trim();o.append(i,r)}})),o)};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new b(i,e))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new o.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&e.blob&&(s.responseType="blob"),a.headers.forEach((function(t,o){s.setRequestHeader(o,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=l,t.Request=y,t.Response=b),o.Headers=l,o.Request=y,o.Response=b,o.fetch=v,Object.defineProperty(o,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(Ni||(Ni={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Si||(Si={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(wi||(wi={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}($i||($i={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(Ci||(Ci={})),function(t){t.ASC="ASC",t.DESC="DESC"}(ki||(ki={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Ii||(Ii={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Ei||(Ei={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Ri||(Ri={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Ui||(Ui={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Li||(Li={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Wi||(Wi={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS"}(zi||(zi={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(Ki||(Ki={})),Ki.PERSONAL_BOOK_SHARE_USER,Ki.PERSONAL_BOOK_USER,Ki.HTML_EXPORT_USER,Ki.PERSONAL_BOOK_USER,Ki.PDF_EXPORT_USER,Ki.PERSONAL_BOOK_USER,Ki.KHUB_ADMIN,Ki.CONTENT_PUBLISHER,Ki.ADMIN,Ki.KHUB_ADMIN,Ki.USERS_ADMIN,Ki.PORTAL_ADMIN,Ki.DEVELOPER,Ki.BETA_USER,Ki.DEBUG_USER;class Bi{static async build(){return new Bi(await Je.await())}constructor(t){this.api=t,this.cache=new o.CacheRegistry,this.cache.registerFinal("available-locales",(()=>this.api.getAvailableSearchLocales()))}async launchSearch(t){return this.api.search(t)}async launchSuggest(t){return this.api.getSuggestions(t)}async getAvailableSearchLocales(){return this.cache.get("available-locales")}}const Ai=t=>t.request.virtualField===Ei.TITLE_ONLY&&t.request.scope===zi.DOCUMENTS;class Di extends Event{constructor(){super(Di.eventName)}}Di.eventName="search-context-clear-all-filters";class Zi{static build(t){return new Zi((t=>o.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Oi}))(t.trim()||"context"),Bi.build)}constructor(t,e){this.store=t,this.serviceProvider=e,this.searchDebouncer=new o.Debouncer(100),this.suggestDebouncer=new o.Debouncer(300)}async initService(){return this.service=await this.serviceProvider(),this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales),this.launchSearch()}async awaitService(){for(;null==this.service;)await o.delay(5);return this.service}setQuery(t){this.store.actions.setRequestQuery(t),this.store.actions.setLiveQuery(t),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(t){let o=this.store.getState().locales,e=this.store.getState().request.contentLocale;if(t!=e){if(o){const i=t=>o.some((o=>o.lang==t));i(t)||(t=i(e)?e:o[0].lang)}this.store.actions.setRequestContentLocale(t),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return t}setPageSize(t){this.store.actions.setPageSize(t),this.launchSearch()}setPageNumber(t){this.store.actions.setPageNumber(t),this.launchSearch()}setSort(t){this.store.actions.setRequestSort(t),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(t){const o=t.filter((t=>t.values.length>0));this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach((t=>{this.facetIds.includes(t.key)||(this.facetIds=[...this.facetIds,t.key])})),this.launchSearch()}setSearchInDocumentTitlesOnly(t){t?(this.store.actions.setRequestVirtualField(Ei.TITLE_ONLY),this.store.actions.setRequestScope(zi.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Ei.EVERYWHERE),this.store.actions.setRequestScope(zi.DEFAULT)),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ai(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Di)}addFacet(t){this.facetIds=[...this.facetIds,t],this.launchSearch()}replaceFacet(t,o){let e=this.facetIds.filter((o=>o!=t));o&&e.push(o),this.facetIds=e,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map((t=>t.id))}set facetIds(t){let o=[...new Set(t)].map((t=>({id:t})));this.store.actions.setRequestFacets(o)}setFilter(t,o){let e=this.store.getState().request.filters,i={key:t,values:o,negative:!1},r=[...e.filter((o=>o.key!==t)),i];this.setFilters(r)}setLiveQuery(t){this.store.actions.setLiveQuery(t),this.launchSuggest()}setRequest(t){this.store.actions.setRequest(t),this.store.actions.setLiveQuery(t.query),this.store.actions.setPageNumber(1),this.launchSearch()}async launchSearch(){return await this.awaitService(),this.searchDebouncer.run((()=>this.fetchSearchData()))}async launchSuggest(){await this.awaitService(),this.suggestDebouncer.run((()=>this.fetchSuggestData()))}async fetchSearchData(){var t,e;try{null===(t=this.cancelableSearch)||void 0===t||t.cancel(),this.cancelableSearch=o.cancelable(this.service.launchSearch(this.store.getState().request));const i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let t=(null!==(e=this.store.getState().results)&&void 0!==e?e:[]).concat(i.results);this.store.actions.setResults(t)}this.store.actions.setPaging(i.paging)}catch(t){t instanceof o.CanceledPromiseError||!this.errorHandler||this.errorHandler(t)}}async fetchSuggestData(){var t;try{let e={input:this.store.getState().liveQuery,filters:this.store.getState().request.filters,sort:this.store.getState().request.sort,contentLocale:this.store.getState().request.contentLocale};null===(t=this.cancelableSuggest)||void 0===t||t.cancel(),this.cancelableSuggest=o.cancelable(this.service.launchSuggest(e));let i=await this.cancelableSuggest;this.store.actions.setSuggestResults(i.suggestions)}catch(t){t instanceof o.CanceledPromiseError||!this.errorHandler||this.errorHandler(t)}}}var Fi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ti extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const Hi=Symbol("registerInterval");class Pi extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=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[Hi]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Hi]):this.dispatchEvent(new Ti)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Hi,Fi([i.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}const ji=xi.build("designedSearchType"),Mi={label:"Search scope",documentTitlesOnly:"Search in document titles only"},_i=e.css`
|
|
1491
|
+
`;var Gi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Vi extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class qi extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class Yi extends CustomEvent{constructor(t,o,e){super("ft-search-results-change",{detail:{request:t,paging:o,spellcheck:e}})}}class Xi extends o.FtLitElementRedux{get stateManager(){return null==this._stateManager&&(this._stateManager=Zi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")),this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.filters=[],this.sort=[],this.addStore(Qe)}render(){return e.html`
|
|
1492
|
+
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
1493
|
+
`}update(t){super.update(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("session")&&this.session&&this.stateManager.initService(),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize),t.has("searchInDocumentTitlesOnly")&&void 0!==this.searchInDocumentTitlesOnly&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new qi(this.request)),t.has("paging")&&void 0!==this.paging&&this.dispatchEvent(new Yi(this.request,this.paging,this.autocorrect))}registerComponent(t){t.stopPropagation();const o=t.composedPath()[0];this.register(o)}register(t){t.setSearchStateManager(this.stateManager)}handleLoadError(t){this.dispatchEvent(new Vi(t))}reloadSavedSearches(){pi.clearMySearches()}}Xi.elementDefinitions={},Xi.styles=_i,Gi([i.property()],Xi.prototype,"query",void 0),Gi([i.property()],Xi.prototype,"contentLocale",void 0),Gi([i.property({type:Number})],Xi.prototype,"pageSize",void 0),Gi([i.property({type:Boolean})],Xi.prototype,"searchInDocumentTitlesOnly",void 0),Gi([o.jsonProperty([])],Xi.prototype,"filters",void 0),Gi([o.jsonProperty([])],Xi.prototype,"sort",void 0),Gi([o.redux({store:"search"})],Xi.prototype,"request",void 0),Gi([o.redux({store:"search"})],Xi.prototype,"paging",void 0),Gi([o.redux({store:"search",selector:t=>t.spellcheck})],Xi.prototype,"autocorrect",void 0),Gi([o.redux({store:Qe.name})],Xi.prototype,"session",void 0),o.customElement("ft-search-context")(Xi);var Qi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ji extends(yi(Pi)){constructor(){super(),this.addI18nContext(ji,Mi)}render(){return e.html`
|
|
1494
|
+
<ft-filter
|
|
1495
|
+
label=${ji.messages.label()}
|
|
1496
|
+
.options=${[{label:ji.messages.documentTitlesOnly(),value:t=>{var o;return null===(o=this.stateManager)||void 0===o?void 0:o.setSearchInDocumentTitlesOnly(t)},selected:this.searchInDocumentTitlesOnly}]}
|
|
1497
|
+
part="filter"
|
|
1498
|
+
.exportpartsPrefixes=${["filter"]}
|
|
1499
|
+
multivalued
|
|
1500
|
+
@change=${this.onSelected}
|
|
1501
|
+
></ft-filter>
|
|
1502
|
+
`}onSelected(t){var o;null===(o=this.filter)||void 0===o||o.options.forEach((t=>t.value(t.selected)))}}Ji.elementDefinitions={"ft-filter":Ge},Ji.styles=s,Qi([o.redux({selector:Ai})],Ji.prototype,"searchInDocumentTitlesOnly",void 0),Qi([i.query("ft-filter")],Ji.prototype,"filter",void 0),o.customElement("ft-search-type")(Ji),t.FtSearchType=Ji,t.FtSearchTypeCssVariables={},t.searchTypeContext=ji,t.searchTypeDefaultMessages=Mi,t.styles=s}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|