@fluid-topics/ft-search-result-metadata 1.1.16 → 1.1.18

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.
@@ -26,6 +26,7 @@ export declare class FtSearchResultMetadata extends FtSearchResultMetadata_base
26
26
  setResultStateManager(resultStateManager: FtSearchResultStateManager): void;
27
27
  protected render(): import("lit").TemplateResult<1>;
28
28
  private renderClusterList;
29
+ private hideIfEmpty;
29
30
  private onClusterSelected;
30
31
  private computeClusters;
31
32
  private renderClusterItem;
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html } from "lit";
7
+ import { html, nothing } from "lit";
8
8
  import { property, state } from "lit/decorators.js";
9
9
  import { redux } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-search-result-metadata.css";
@@ -38,7 +38,10 @@ class FtSearchResultMetadata extends withI18n(FtSearchResultComponent) {
38
38
  }
39
39
  }
40
40
  render() {
41
- return this.displayCluster ? this.renderClusterList() : this.renderChip();
41
+ return html `
42
+ ${this.displayCluster ? this.renderClusterList() : this.renderChip()}
43
+ ${this.hideIfEmpty()}
44
+ `;
42
45
  }
43
46
  renderClusterList() {
44
47
  return html `
@@ -53,6 +56,18 @@ class FtSearchResultMetadata extends withI18n(FtSearchResultComponent) {
53
56
  </div>
54
57
  `;
55
58
  }
59
+ hideIfEmpty() {
60
+ if (this.valueText.length == 0 && this.clusters.length == 0 && !this.editorMode) {
61
+ return html `
62
+ <style>
63
+ :host {
64
+ display: none !important;
65
+ }
66
+ </style>
67
+ `;
68
+ }
69
+ return nothing;
70
+ }
56
71
  onClusterSelected(e) {
57
72
  var _a;
58
73
  (_a = this.resultStateManager) === null || _a === void 0 ? void 0 : _a.selectResult(this.clustersByValue[e.detail].result);
@@ -187,7 +187,7 @@ const Pt=Symbol.for(""),Ht=t=>{if(t?.r===Pt)return t?._$litStatic$},Mt=t=>({_$li
187
187
  </div>
188
188
  </div>
189
189
  </div>
190
- `}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(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",xi(this.slottedElement,this.tooltip,{platform:{...vi,getOffsetParent:t=>vi.getOffsetParent(t,Oi)},middleware:[He({crossAxis:!0}),Pe({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Si.elementDefinitions={"ft-typography":de},Si.styles=xe,wi([i.property()],Si.prototype,"text",void 0),wi([i.property({type:Boolean})],Si.prototype,"manual",void 0),wi([i.property({type:Boolean})],Si.prototype,"inline",void 0),wi([i.property({type:Number})],Si.prototype,"delay",void 0),wi([i.property()],Si.prototype,"position",void 0),wi([i.queryAssignedNodes()],Si.prototype,"slotNodes",void 0),wi([i.query(".ft-tooltip--container")],Si.prototype,"container",void 0),wi([i.query(".ft-tooltip")],Si.prototype,"tooltip",void 0),wi([i.query(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),wi([i.state()],Si.prototype,"visible",void 0),wi([i.eventOptions({passive:!0})],Si.prototype,"onTouch",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onHover",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onOut",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onClick",null),o.customElement("ft-tooltip")(Si);const Ci=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorContent),$i={color:Ci,backgroundColor:o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ci),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")},Ii=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorPrimary),Ei=Ii,Ri=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ii),ki=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorSecondary),Ui=ki,Li=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",ki),Wi=e.css`
190
+ `}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()}async show(t){this.visible=!0,null!=t&&await 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(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",xi(this.slottedElement,this.tooltip,{platform:{...vi,getOffsetParent:t=>vi.getOffsetParent(t,Oi)},middleware:[He({crossAxis:!0}),Pe({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Si.elementDefinitions={"ft-typography":de},Si.styles=xe,wi([i.property()],Si.prototype,"text",void 0),wi([i.property({type:Boolean})],Si.prototype,"manual",void 0),wi([i.property({type:Boolean})],Si.prototype,"inline",void 0),wi([i.property({type:Number})],Si.prototype,"delay",void 0),wi([i.property()],Si.prototype,"position",void 0),wi([i.queryAssignedNodes()],Si.prototype,"slotNodes",void 0),wi([i.query(".ft-tooltip--container")],Si.prototype,"container",void 0),wi([i.query(".ft-tooltip")],Si.prototype,"tooltip",void 0),wi([i.query(".ft-tooltip--content")],Si.prototype,"tooltipContent",void 0),wi([i.state()],Si.prototype,"visible",void 0),wi([i.eventOptions({passive:!0})],Si.prototype,"onTouch",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onHover",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onOut",null),wi([i.eventOptions({passive:!0})],Si.prototype,"onClick",null),o.customElement("ft-tooltip")(Si);const Ci=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorContent),$i={color:Ci,backgroundColor:o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ci),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")},Ii=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorPrimary),Ei=Ii,Ri=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ii),ki=o.FtCssVariableFactory.extend("--ft-ripple-color","",o.designSystemVariables.colorSecondary),Ui=ki,Li=o.FtCssVariableFactory.extend("--ft-ripple-background-color","",ki),Wi=e.css`
191
191
  :host {
192
192
  display: contents;
193
193
  }
@@ -310,7 +310,7 @@ const Pt=Symbol.for(""),Ht=t=>{if(t?.r===Pt)return t?._$litStatic$},Mt=t=>({_$li
310
310
  <div class="ft-ripple--background"></div>
311
311
  <div class="ft-ripple--effect"></div>
312
312
  </div>
313
- `}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)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",e,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",e,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),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()}}Bi.elementDefinitions={},Bi.styles=Wi,Ki([i.property({type:Boolean})],Bi.prototype,"primary",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"secondary",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"unbounded",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"activated",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"selected",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ki([i.state()],Bi.prototype,"hovered",void 0),Ki([i.state()],Bi.prototype,"focused",void 0),Ki([i.state()],Bi.prototype,"pressed",void 0),Ki([i.state()],Bi.prototype,"rippling",void 0),Ki([i.state()],Bi.prototype,"originX",void 0),Ki([i.state()],Bi.prototype,"originY",void 0),Ki([i.query(".ft-ripple")],Bi.prototype,"ripple",void 0),Ki([i.query(".ft-ripple--effect")],Bi.prototype,"rippleEffect",void 0),o.customElement("ft-ripple")(Bi),function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;"}(Ai||(Ai={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(zi||(zi={})),new Map([...["abw"].map((t=>[t,zi.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,zi.AUDIO])),...["avi"].map((t=>[t,zi.AVI])),...["chm","xhs"].map((t=>[t,zi.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,zi.CODE])),...["csv"].map((t=>[t,zi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,zi.DITA])),...["epub"].map((t=>[t,zi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,zi.EXCEL])),...["flac"].map((t=>[t,zi.FLAC])),...["gif"].map((t=>[t,zi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,zi.GZIP])),...["html","htm","xhtml"].map((t=>[t,zi.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,zi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,zi.JPEG])),...["json"].map((t=>[t,zi.JSON])),...["m4a","m4p"].map((t=>[t,zi.M4A])),...["mov","qt"].map((t=>[t,zi.MOV])),...["mp3"].map((t=>[t,zi.MP3])),...["mp4","m4v"].map((t=>[t,zi.MP4])),...["ogg","oga"].map((t=>[t,zi.OGG])),...["pdf","ps"].map((t=>[t,zi.PDF])),...["png"].map((t=>[t,zi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,zi.POWERPOINT])),...["rar"].map((t=>[t,zi.RAR])),...["stp"].map((t=>[t,zi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,zi.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,zi.VIDEO])),...["wav"].map((t=>[t,zi.WAV])),...["wma"].map((t=>[t,zi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,zi.WORD])),...["xml","xsl","rdf"].map((t=>[t,zi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,zi.YAML])),...["zip"].map((t=>[t,zi.ZIP]))]),zi.ABW,zi.AUDIO,zi.AVI,zi.CHM,zi.CODE,zi.CSV,zi.DITA,zi.EPUB,zi.EXCEL,zi.FLAC,zi.GIF,zi.GZIP,zi.HTML,zi.IMAGE,zi.JPEG,zi.JSON,zi.M4A,zi.MOV,zi.MP3,zi.MP4,zi.OGG,zi.PDF,zi.PNG,zi.POWERPOINT,zi.RAR,zi.STP,zi.TEXT,zi.UNKNOWN,zi.VIDEO,zi.WAV,zi.WMA,zi.WORD,zi.XML,zi.YAML,zi.ZIP;const Zi={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")},Di=e.css`
313
+ `}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)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",e,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",e,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),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()}}Bi.elementDefinitions={},Bi.styles=Wi,Ki([i.property({type:Boolean})],Bi.prototype,"primary",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"secondary",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"unbounded",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"activated",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"selected",void 0),Ki([i.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ki([i.state()],Bi.prototype,"hovered",void 0),Ki([i.state()],Bi.prototype,"focused",void 0),Ki([i.state()],Bi.prototype,"pressed",void 0),Ki([i.state()],Bi.prototype,"rippling",void 0),Ki([i.state()],Bi.prototype,"originX",void 0),Ki([i.state()],Bi.prototype,"originY",void 0),Ki([i.query(".ft-ripple")],Bi.prototype,"ripple",void 0),Ki([i.query(".ft-ripple--effect")],Bi.prototype,"rippleEffect",void 0),o.customElement("ft-ripple")(Bi),function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;",t.CLONE="&#xe979;"}(Ai||(Ai={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(zi||(zi={})),new Map([...["abw"].map((t=>[t,zi.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,zi.AUDIO])),...["avi"].map((t=>[t,zi.AVI])),...["chm","xhs"].map((t=>[t,zi.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,zi.CODE])),...["csv"].map((t=>[t,zi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,zi.DITA])),...["epub"].map((t=>[t,zi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,zi.EXCEL])),...["flac"].map((t=>[t,zi.FLAC])),...["gif"].map((t=>[t,zi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,zi.GZIP])),...["html","htm","xhtml"].map((t=>[t,zi.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,zi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,zi.JPEG])),...["json"].map((t=>[t,zi.JSON])),...["m4a","m4p"].map((t=>[t,zi.M4A])),...["mov","qt"].map((t=>[t,zi.MOV])),...["mp3"].map((t=>[t,zi.MP3])),...["mp4","m4v"].map((t=>[t,zi.MP4])),...["ogg","oga"].map((t=>[t,zi.OGG])),...["pdf","ps"].map((t=>[t,zi.PDF])),...["png"].map((t=>[t,zi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,zi.POWERPOINT])),...["rar"].map((t=>[t,zi.RAR])),...["stp"].map((t=>[t,zi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,zi.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,zi.VIDEO])),...["wav"].map((t=>[t,zi.WAV])),...["wma"].map((t=>[t,zi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,zi.WORD])),...["xml","xsl","rdf"].map((t=>[t,zi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,zi.YAML])),...["zip"].map((t=>[t,zi.ZIP]))]),zi.ABW,zi.AUDIO,zi.AVI,zi.CHM,zi.CODE,zi.CSV,zi.DITA,zi.EPUB,zi.EXCEL,zi.FLAC,zi.GIF,zi.GZIP,zi.HTML,zi.IMAGE,zi.JPEG,zi.JSON,zi.M4A,zi.MOV,zi.MP3,zi.MP4,zi.OGG,zi.PDF,zi.PNG,zi.POWERPOINT,zi.RAR,zi.STP,zi.TEXT,zi.UNKNOWN,zi.VIDEO,zi.WAV,zi.WMA,zi.WORD,zi.XML,zi.YAML,zi.ZIP;const Zi={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")},Di=e.css`
314
314
  :host, i.ft-icon {
315
315
  display: inline-flex;
316
316
  align-items: center;
@@ -1104,7 +1104,10 @@ const Pt=Symbol.for(""),Ht=t=>{if(t?.r===Pt)return t?._$litStatic$},Mt=t=>({_$li
1104
1104
  <slot></slot>
1105
1105
  </ft-typography>
1106
1106
  </div>
1107
- `}}function Zr(t){var o,e;return(null!==(e=null!==(o=null==t?void 0:t.map)&&void 0!==o?o:null==t?void 0:t.document)&&void 0!==e?e:null==t?void 0:t.topic).metadata.map((t=>function(t){if(t.hierarchicalValues){const o=[],e=[];return t.hierarchicalValues.forEach((t=>{o.push(t.join(" / ")),t.length>2?e.push(`... / ${t[t.length-1]}`):e.push(t.join(" / "))})),{key:t.key,value:o.join(", "),displayValue:e.join(", ")}}{const o=t.values.join(", ");return{key:t.key,value:o,displayValue:o}}}(t)))}Br.elementDefinitions={"ft-typography":de},Br.styles=Kr,o.customElement("ft-floating-menu")(Wr),o.customElement("ftds-floating-menu")(Ar),o.customElement("ft-floating-menu-item")(kr),o.customElement("ft-floating-menu-label")(Br);class Dr extends CustomEvent{constructor(t,o){super("ft-search-result-click",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}}class Fr{constructor(t,o,e,i){this.cluster=t,this.selectedResult=o,this.clusteringMetadata=e,this.metadataDescriptors=i}computeClustersItemsForMetadata(t,o){var e;const i=null===(e=this.cluster)||void 0===e?void 0:e.entries.flatMap((o=>Zr(o).filter((o=>o.key===t)))).filter(((t,o,e)=>e.findIndex((o=>o.value===t.value))===o));return i.map((o=>({result:this.findMatchingResult(t,o.value),metadata:o}))).sort(((e,i)=>this.compareMetadata(e.metadata.value,i.metadata.value,t,o)))}compareMetadata(t,o,e,i){let r=this.metadataDescriptors.find((t=>e==t.key)),n=(null==r?void 0:r.sortRule)||"NONE",a=(null==r?void 0:r.reverseSort)||!1;if("ALPHABET"==n||"VERSION"==n){let e=t.localeCompare(o,i,{numeric:!0});return a?-1*e:e}return 0}findMatchingResult(t,o){var e,i;let r=Zr(this.selectedResult).filter((t=>this.clusteringMetadata.has(t.key))),n=[...r.filter((o=>o.key!==t)),{key:t,value:o,displayValue:o}];return null!==(i=null!==(e=this.findResultMatchingMetadata(n))&&void 0!==e?e:this.findResultMatchingMetadata([{key:t,value:o,displayValue:o}]))&&void 0!==i?i:this.cluster.entries[0]}findResultMatchingMetadata(t){return this.cluster.entries.find((o=>this.resultMatchesMetadata(o,t)))}resultMatchesMetadata(t,o){let e=Zr(t);return o.every((t=>e.some((o=>o.key==t.key&&o.value==t.value))))}}var Tr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(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 Pr extends(Q(V)){constructor(){super(),this.useChip=!1,this.useAsClusterSwitch=!1,this.goToDocumentOnSwitch=!1,this.editorMode=!1,this.metadataDescriptors=[],this.clustersByValue={},this.clusters=[],this.addStore(I),this.addI18nContext(nt)}setResultStateManager(t){super.setResultStateManager(t),this.key&&this.useAsClusterSwitch&&t.registerMetadata(this.key)}render(){return this.displayCluster?this.renderClusterList():this.renderChip()}renderClusterList(){return e.html`
1107
+ `}}function Zr(t){var o,e;return(null!==(e=null!==(o=null==t?void 0:t.map)&&void 0!==o?o:null==t?void 0:t.document)&&void 0!==e?e:null==t?void 0:t.topic).metadata.map((t=>function(t){if(t.hierarchicalValues){const o=[],e=[];return t.hierarchicalValues.forEach((t=>{o.push(t.join(" / ")),t.length>2?e.push(`... / ${t[t.length-1]}`):e.push(t.join(" / "))})),{key:t.key,value:o.join(", "),displayValue:e.join(", ")}}{const o=t.values.join(", ");return{key:t.key,value:o,displayValue:o}}}(t)))}Br.elementDefinitions={"ft-typography":de},Br.styles=Kr,o.customElement("ft-floating-menu")(Wr),o.customElement("ftds-floating-menu")(Ar),o.customElement("ft-floating-menu-item")(kr),o.customElement("ft-floating-menu-label")(Br);class Dr extends CustomEvent{constructor(t,o){super("ft-search-result-click",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}}class Fr{constructor(t,o,e,i){this.cluster=t,this.selectedResult=o,this.clusteringMetadata=e,this.metadataDescriptors=i}computeClustersItemsForMetadata(t,o){var e;const i=null===(e=this.cluster)||void 0===e?void 0:e.entries.flatMap((o=>Zr(o).filter((o=>o.key===t)))).filter(((t,o,e)=>e.findIndex((o=>o.value===t.value))===o));return i.map((o=>({result:this.findMatchingResult(t,o.value),metadata:o}))).sort(((e,i)=>this.compareMetadata(e.metadata.value,i.metadata.value,t,o)))}compareMetadata(t,o,e,i){let r=this.metadataDescriptors.find((t=>e==t.key)),n=(null==r?void 0:r.sortRule)||"NONE",a=(null==r?void 0:r.reverseSort)||!1;if("ALPHABET"==n||"VERSION"==n){let e=t.localeCompare(o,i,{numeric:!0});return a?-1*e:e}return 0}findMatchingResult(t,o){var e,i;let r=Zr(this.selectedResult).filter((t=>this.clusteringMetadata.has(t.key))),n=[...r.filter((o=>o.key!==t)),{key:t,value:o,displayValue:o}];return null!==(i=null!==(e=this.findResultMatchingMetadata(n))&&void 0!==e?e:this.findResultMatchingMetadata([{key:t,value:o,displayValue:o}]))&&void 0!==i?i:this.cluster.entries[0]}findResultMatchingMetadata(t){return this.cluster.entries.find((o=>this.resultMatchesMetadata(o,t)))}resultMatchesMetadata(t,o){let e=Zr(t);return o.every((t=>e.some((o=>o.key==t.key&&o.value==t.value))))}}var Tr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(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 Pr extends(Q(V)){constructor(){super(),this.useChip=!1,this.useAsClusterSwitch=!1,this.goToDocumentOnSwitch=!1,this.editorMode=!1,this.metadataDescriptors=[],this.clustersByValue={},this.clusters=[],this.addStore(I),this.addI18nContext(nt)}setResultStateManager(t){super.setResultStateManager(t),this.key&&this.useAsClusterSwitch&&t.registerMetadata(this.key)}render(){return e.html`
1108
+ ${this.displayCluster?this.renderClusterList():this.renderChip()}
1109
+ ${this.hideIfEmpty()}
1110
+ `}renderClusterList(){return e.html`
1108
1111
  <div class="ft-search-result-metadata--container">
1109
1112
  <ft-floating-menu icon="THIN_ARROW"
1110
1113
  @select=${this.onClusterSelected}
@@ -1114,7 +1117,13 @@ const Pt=Symbol.for(""),Ht=t=>{if(t?.r===Pt)return t?._$litStatic$},Mt=t=>({_$li
1114
1117
  ${a.repeat(this.clusters,(t=>t.metadata.value),(t=>this.renderClusterItem(t.result,t.metadata)))}
1115
1118
  </ft-floating-menu>
1116
1119
  </div>
1117
- `}onClusterSelected(t){var o;null===(o=this.resultStateManager)||void 0===o||o.selectResult(this.clustersByValue[t.detail].result)}computeClusters(){var t;const o={},e=new Fr(this.cluster,this.result,this.resultStateManager.registeredMetadata,this.metadataDescriptors);this.clusters=e.computeClustersItemsForMetadata(this.key,(null===(t=this.request)||void 0===t?void 0:t.contentLocale)||"en"),this.clusters.forEach((t=>{o[t.metadata.value]=t})),this.clustersByValue=o}renderClusterItem(t,o){return this.goToDocumentOnSwitch?e.html`
1120
+ `}hideIfEmpty(){return 0!=this.valueText.length||0!=this.clusters.length||this.editorMode?e.nothing:e.html`
1121
+ <style>
1122
+ :host {
1123
+ display: none !important;
1124
+ }
1125
+ </style>
1126
+ `}onClusterSelected(t){var o;null===(o=this.resultStateManager)||void 0===o||o.selectResult(this.clustersByValue[t.detail].result)}computeClusters(){var t;const o={},e=new Fr(this.cluster,this.result,this.resultStateManager.registeredMetadata,this.metadataDescriptors);this.clusters=e.computeClustersItemsForMetadata(this.key,(null===(t=this.request)||void 0===t?void 0:t.contentLocale)||"en"),this.clusters.forEach((t=>{o[t.metadata.value]=t})),this.clustersByValue=o}renderClusterItem(t,o){return this.goToDocumentOnSwitch?e.html`
1118
1127
  <a href="${function(t){switch(t.type){case N.MAP:return t.map.readerUrl;case N.DOCUMENT:return t.document.viewerUrl;case N.TOPIC:return t.topic.readerUrl}return""}(t)}" @click=${()=>this.onResultClick(t)}>
1119
1128
  <ft-floating-menu-item value="${o.value}">${this.renderClusterItemValue(o.value,o.displayValue)}
1120
1129
  </ft-floating-menu-item>
@@ -305,7 +305,7 @@ let Se=class extends zt{constructor(){super(...arguments),this.renderOptions={ho
305
305
  </div>
306
306
  </div>
307
307
  </div>
308
- `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Os(this.slottedElement,this.tooltip,{platform:{...xs,getOffsetParent:t=>xs.getOffsetParent(t,ws)},middleware:[Za({crossAxis:!0}),Ta({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Cs.elementDefinitions={"ft-typography":da},Cs.styles=Oa,Ns([R()],Cs.prototype,"text",void 0),Ns([R({type:Boolean})],Cs.prototype,"manual",void 0),Ns([R({type:Boolean})],Cs.prototype,"inline",void 0),Ns([R({type:Number})],Cs.prototype,"delay",void 0),Ns([R()],Cs.prototype,"position",void 0),Ns([
308
+ `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,null!=t&&await 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(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Os(this.slottedElement,this.tooltip,{platform:{...xs,getOffsetParent:t=>xs.getOffsetParent(t,ws)},middleware:[Za({crossAxis:!0}),Ta({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Cs.elementDefinitions={"ft-typography":da},Cs.styles=Oa,Ns([R()],Cs.prototype,"text",void 0),Ns([R({type:Boolean})],Cs.prototype,"manual",void 0),Ns([R({type:Boolean})],Cs.prototype,"inline",void 0),Ns([R({type:Number})],Cs.prototype,"delay",void 0),Ns([R()],Cs.prototype,"position",void 0),Ns([
309
309
  /**
310
310
  * @license
311
311
  * Copyright 2017 Google LLC
@@ -451,7 +451,7 @@ const Es=1,$s=2,Rs=t=>(...e)=>({_$litDirective$:t,values:e});class ks{constructo
451
451
  * Copyright 2017 Google LLC
452
452
  * SPDX-License-Identifier: BSD-3-Clause
453
453
  */
454
- class zs extends ks{constructor(t){if(super(t),this.et=rt,t.type!==$s)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===rt||null==t)return this.vt=void 0,this.et=t;if(t===it)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zs.directiveName="unsafeHTML",zs.resultType=1;const Ts=Rs(zs);var Zs,_s;!function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;"}(Zs||(Zs={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(_s||(_s={})),new Map([...["abw"].map((t=>[t,_s.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,_s.AUDIO])),...["avi"].map((t=>[t,_s.AVI])),...["chm","xhs"].map((t=>[t,_s.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,_s.CODE])),...["csv"].map((t=>[t,_s.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,_s.DITA])),...["epub"].map((t=>[t,_s.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,_s.EXCEL])),...["flac"].map((t=>[t,_s.FLAC])),...["gif"].map((t=>[t,_s.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,_s.GZIP])),...["html","htm","xhtml"].map((t=>[t,_s.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,_s.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,_s.JPEG])),...["json"].map((t=>[t,_s.JSON])),...["m4a","m4p"].map((t=>[t,_s.M4A])),...["mov","qt"].map((t=>[t,_s.MOV])),...["mp3"].map((t=>[t,_s.MP3])),...["mp4","m4v"].map((t=>[t,_s.MP4])),...["ogg","oga"].map((t=>[t,_s.OGG])),...["pdf","ps"].map((t=>[t,_s.PDF])),...["png"].map((t=>[t,_s.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,_s.POWERPOINT])),...["rar"].map((t=>[t,_s.RAR])),...["stp"].map((t=>[t,_s.STP])),...["txt","rtf","md","mdown"].map((t=>[t,_s.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,_s.VIDEO])),...["wav"].map((t=>[t,_s.WAV])),...["wma"].map((t=>[t,_s.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,_s.WORD])),...["xml","xsl","rdf"].map((t=>[t,_s.XML])),...["yaml","yml","x-yaml"].map((t=>[t,_s.YAML])),...["zip"].map((t=>[t,_s.ZIP]))]),_s.ABW,_s.AUDIO,_s.AVI,_s.CHM,_s.CODE,_s.CSV,_s.DITA,_s.EPUB,_s.EXCEL,_s.FLAC,_s.GIF,_s.GZIP,_s.HTML,_s.IMAGE,_s.JPEG,_s.JSON,_s.M4A,_s.MOV,_s.MP3,_s.MP4,_s.OGG,_s.PDF,_s.PNG,_s.POWERPOINT,_s.RAR,_s.STP,_s.TEXT,_s.UNKNOWN,_s.VIDEO,_s.WAV,_s.WMA,_s.WORD,_s.XML,_s.YAML,_s.ZIP;const Hs={size:Ee.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Ee.extend("--ft-icon-fluid-topics-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Ee.extend("--ft-icon-file-format-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Ee.extend("--ft-icon-material-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Ee.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Gs=Et`
454
+ class zs extends ks{constructor(t){if(super(t),this.et=rt,t.type!==$s)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===rt||null==t)return this.vt=void 0,this.et=t;if(t===it)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zs.directiveName="unsafeHTML",zs.resultType=1;const Ts=Rs(zs);var Zs,_s;!function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;",t.CLONE="&#xe979;"}(Zs||(Zs={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(_s||(_s={})),new Map([...["abw"].map((t=>[t,_s.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,_s.AUDIO])),...["avi"].map((t=>[t,_s.AVI])),...["chm","xhs"].map((t=>[t,_s.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,_s.CODE])),...["csv"].map((t=>[t,_s.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,_s.DITA])),...["epub"].map((t=>[t,_s.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,_s.EXCEL])),...["flac"].map((t=>[t,_s.FLAC])),...["gif"].map((t=>[t,_s.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,_s.GZIP])),...["html","htm","xhtml"].map((t=>[t,_s.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,_s.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,_s.JPEG])),...["json"].map((t=>[t,_s.JSON])),...["m4a","m4p"].map((t=>[t,_s.M4A])),...["mov","qt"].map((t=>[t,_s.MOV])),...["mp3"].map((t=>[t,_s.MP3])),...["mp4","m4v"].map((t=>[t,_s.MP4])),...["ogg","oga"].map((t=>[t,_s.OGG])),...["pdf","ps"].map((t=>[t,_s.PDF])),...["png"].map((t=>[t,_s.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,_s.POWERPOINT])),...["rar"].map((t=>[t,_s.RAR])),...["stp"].map((t=>[t,_s.STP])),...["txt","rtf","md","mdown"].map((t=>[t,_s.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,_s.VIDEO])),...["wav"].map((t=>[t,_s.WAV])),...["wma"].map((t=>[t,_s.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,_s.WORD])),...["xml","xsl","rdf"].map((t=>[t,_s.XML])),...["yaml","yml","x-yaml"].map((t=>[t,_s.YAML])),...["zip"].map((t=>[t,_s.ZIP]))]),_s.ABW,_s.AUDIO,_s.AVI,_s.CHM,_s.CODE,_s.CSV,_s.DITA,_s.EPUB,_s.EXCEL,_s.FLAC,_s.GIF,_s.GZIP,_s.HTML,_s.IMAGE,_s.JPEG,_s.JSON,_s.M4A,_s.MOV,_s.MP3,_s.MP4,_s.OGG,_s.PDF,_s.PNG,_s.POWERPOINT,_s.RAR,_s.STP,_s.TEXT,_s.UNKNOWN,_s.VIDEO,_s.WAV,_s.WMA,_s.WORD,_s.XML,_s.YAML,_s.ZIP;const Hs={size:Ee.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Ee.extend("--ft-icon-fluid-topics-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Ee.extend("--ft-icon-file-format-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Ee.extend("--ft-icon-material-font-family","",Ee.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Ee.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Gs=Et`
455
455
  :host, i.ft-icon {
456
456
  display: inline-flex;
457
457
  align-items: center;
@@ -1255,7 +1255,10 @@ class zs extends ks{constructor(t){if(super(t),this.et=rt,t.type!==$s)throw Erro
1255
1255
  * @license
1256
1256
  * Copyright 2017 Google LLC
1257
1257
  * SPDX-License-Identifier: BSD-3-Clause
1258
- */var ic=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class rc extends(zr(Mr)){constructor(){super(),this.useChip=!1,this.useAsClusterSwitch=!1,this.goToDocumentOnSwitch=!1,this.editorMode=!1,this.metadataDescriptors=[],this.clustersByValue={},this.clusters=[],this.addStore(gr),this.addI18nContext(Vr)}setResultStateManager(t){super.setResultStateManager(t),this.key&&this.useAsClusterSwitch&&t.registerMetadata(this.key)}render(){return this.displayCluster?this.renderClusterList():this.renderChip()}renderClusterList(){return le`
1258
+ */var ic=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class rc extends(zr(Mr)){constructor(){super(),this.useChip=!1,this.useAsClusterSwitch=!1,this.goToDocumentOnSwitch=!1,this.editorMode=!1,this.metadataDescriptors=[],this.clustersByValue={},this.clusters=[],this.addStore(gr),this.addI18nContext(Vr)}setResultStateManager(t){super.setResultStateManager(t),this.key&&this.useAsClusterSwitch&&t.registerMetadata(this.key)}render(){return le`
1259
+ ${this.displayCluster?this.renderClusterList():this.renderChip()}
1260
+ ${this.hideIfEmpty()}
1261
+ `}renderClusterList(){return le`
1259
1262
  <div class="ft-search-result-metadata--container">
1260
1263
  <ft-floating-menu icon="THIN_ARROW"
1261
1264
  @select=${this.onClusterSelected}
@@ -1265,7 +1268,13 @@ class zs extends ks{constructor(t){if(super(t),this.et=rt,t.type!==$s)throw Erro
1265
1268
  ${oc(this.clusters,(t=>t.metadata.value),(t=>this.renderClusterItem(t.result,t.metadata)))}
1266
1269
  </ft-floating-menu>
1267
1270
  </div>
1268
- `}onClusterSelected(t){var e;null===(e=this.resultStateManager)||void 0===e||e.selectResult(this.clustersByValue[t.detail].result)}computeClusters(){var t;const e={},o=new Vl(this.cluster,this.result,this.resultStateManager.registeredMetadata,this.metadataDescriptors);this.clusters=o.computeClustersItemsForMetadata(this.key,(null===(t=this.request)||void 0===t?void 0:t.contentLocale)||"en"),this.clusters.forEach((t=>{e[t.metadata.value]=t})),this.clustersByValue=e}renderClusterItem(t,e){return this.goToDocumentOnSwitch?le`
1271
+ `}hideIfEmpty(){return 0!=this.valueText.length||0!=this.clusters.length||this.editorMode?fe:le`
1272
+ <style>
1273
+ :host {
1274
+ display: none !important;
1275
+ }
1276
+ </style>
1277
+ `}onClusterSelected(t){var e;null===(e=this.resultStateManager)||void 0===e||e.selectResult(this.clustersByValue[t.detail].result)}computeClusters(){var t;const e={},o=new Vl(this.cluster,this.result,this.resultStateManager.registeredMetadata,this.metadataDescriptors);this.clusters=o.computeClustersItemsForMetadata(this.key,(null===(t=this.request)||void 0===t?void 0:t.contentLocale)||"en"),this.clusters.forEach((t=>{e[t.metadata.value]=t})),this.clustersByValue=e}renderClusterItem(t,e){return this.goToDocumentOnSwitch?le`
1269
1278
  <a href="${function(t){switch(t.type){case hr.MAP:return t.map.readerUrl;case hr.DOCUMENT:return t.document.viewerUrl;case hr.TOPIC:return t.topic.readerUrl}return""}(t)}" @click=${()=>this.onResultClick(t)}>
1270
1279
  <ft-floating-menu-item value="${e.value}">${this.renderClusterItemValue(e.value,e.displayValue)}
1271
1280
  </ft-floating-menu-item>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-result-metadata",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Search result metadata for integrated search component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,15 +19,15 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-chip": "1.1.16",
23
- "@fluid-topics/ft-floating-menu": "1.1.16",
24
- "@fluid-topics/ft-search-result-context": "1.1.16",
25
- "@fluid-topics/ft-tooltip": "1.1.16",
26
- "@fluid-topics/ft-wc-utils": "1.1.16",
22
+ "@fluid-topics/ft-chip": "1.1.18",
23
+ "@fluid-topics/ft-floating-menu": "1.1.18",
24
+ "@fluid-topics/ft-search-result-context": "1.1.18",
25
+ "@fluid-topics/ft-tooltip": "1.1.18",
26
+ "@fluid-topics/ft-wc-utils": "1.1.18",
27
27
  "lit": "3.1.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@fluid-topics/public-api": "1.0.54"
31
31
  },
32
- "gitHead": "28b18ce8d88cc14097865aad4a8b31406b351434"
32
+ "gitHead": "30d914e4439747c7af8baebd0b9ebbc344de2ecf"
33
33
  }