@fluid-topics/ft-reader-search-in-document 2.0.7 → 2.0.9
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.
|
@@ -634,7 +634,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
634
634
|
</div>
|
|
635
635
|
</div>
|
|
636
636
|
</div>
|
|
637
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ad(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${R.transitionDuration}, left ${R.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||kc(e,this.ignoreMatchingElements,this.eventsTarget)}};qe.elementDefinitions={"ft-typography":se};qe.styles=Xm;Rr([Rn()],qe.prototype,"text",void 0);Rr([h({type:Boolean})],qe.prototype,"manual",void 0);Rr([h({type:Boolean})],qe.prototype,"inline",void 0);Rr([or()],qe.prototype,"delay",void 0);Rr([h()],qe.prototype,"position",void 0);Rr([Ae([])],qe.prototype,"ignoreMatchingElements",void 0);Rr([Cc()],qe.prototype,"slotNodes",void 0);Rr([U(".ft-tooltip--container")],qe.prototype,"container",void 0);Rr([U(".ft-tooltip")],qe.prototype,"tooltip",void 0);Rr([U(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0);Rr([H()],qe.prototype,"visible",void 0)});var M3=u(()=>{"use strict"});var N3=u(()=>{"use strict";w();Op();G("ft-tooltip")(qe)});var Ep=u(()=>{"use strict";Op();rp();M3();N3()});var et,Lp=u(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(et||(et={}))});function fl(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=E7.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=Ap.get(l))!==null&&o!==void 0?o:Ap.get(e))!==null&&n!==void 0?n:Ap.get(s))!==null&&a!==void 0?a:V.UNKNOWN}var we,V,Ap,E7,wD,Rp=u(()=>{"use strict";(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",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="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CLOUD_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(we||(we={}));(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=""})(V||(V={}));Ap=new Map([...["abw"].map(t=>[t,V.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,V.AUDIO]),...["avi"].map(t=>[t,V.AVI]),...["chm","xhs"].map(t=>[t,V.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,V.CODE]),...["csv"].map(t=>[t,V.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,V.DITA]),...["epub"].map(t=>[t,V.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,V.EXCEL]),...["flac"].map(t=>[t,V.FLAC]),...["gif"].map(t=>[t,V.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,V.GZIP]),...["html","htm","xhtml"].map(t=>[t,V.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,V.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,V.JPEG]),...["json"].map(t=>[t,V.JSON]),...["m4a","m4p"].map(t=>[t,V.M4A]),...["mov","qt"].map(t=>[t,V.MOV]),...["mp3"].map(t=>[t,V.MP3]),...["mp4","m4v"].map(t=>[t,V.MP4]),...["ogg","oga"].map(t=>[t,V.OGG]),...["pdf","ps"].map(t=>[t,V.PDF]),...["png"].map(t=>[t,V.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,V.POWERPOINT]),...["rar"].map(t=>[t,V.RAR]),...["stp"].map(t=>[t,V.STP]),...["txt","rtf","md","mdown"].map(t=>[t,V.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,V.VIDEO]),...["wav"].map(t=>[t,V.WAV]),...["wma"].map(t=>[t,V.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,V.WORD]),...["xml","xsl","rdf"].map(t=>[t,V.XML]),...["yaml","yml","x-yaml"].map(t=>[t,V.YAML]),...["zip"].map(t=>[t,V.ZIP])]),E7=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);wD={[V.ABW]:"#91ABC6",[V.AUDIO]:"#1795E3",[V.AVI]:"#E63324",[V.CHM]:"#71C3EB",[V.CODE]:"#71C3EB",[V.CSV]:"#1F7345",[V.DITA]:"#71C3EB",[V.EPUB]:"#85B926",[V.EXCEL]:"#1F7345",[V.FLAC]:"#1795E3",[V.GIF]:"#59B031",[V.GZIP]:"#F8AB36",[V.HTML]:"#71C3EB",[V.IMAGE]:"#59B031",[V.JPEG]:"#59B031",[V.JSON]:"#71C3EB",[V.M4A]:"#1795E3",[V.MOV]:"#E63324",[V.MP3]:"#1795E3",[V.MP4]:"#E63324",[V.OGG]:"#1795E3",[V.PDF]:"#E44948",[V.PNG]:"#59B031",[V.POWERPOINT]:"#B54A2B",[V.RAR]:"#F8AB36",[V.STP]:"#3764B1",[V.TEXT]:"#3162AB",[V.UNKNOWN]:"#999999",[V.VIDEO]:"#E63324",[V.WAV]:"#1795E3",[V.WMA]:"#1795E3",[V.WORD]:"#3162AB",[V.XML]:"#71C3EB",[V.YAML]:"#71C3EB",[V.ZIP]:"#F8AB36"}});var Ra,Le,wp=u(()=>{"use strict";I();J();w();qi();Rp();Ri();Lp();Ra=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Le=class extends W{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$}render(){let e=this.variant&&Object.values(et).includes(this.variant)?this.variant:et.fluid_topics,r=e!==et.material||!!this.value;return S`
|
|
637
|
+
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ad(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${R.transitionDuration}, left ${R.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||kc(e,this.ignoreMatchingElements,this.eventsTarget)}};qe.elementDefinitions={"ft-typography":se};qe.styles=Xm;Rr([Rn()],qe.prototype,"text",void 0);Rr([h({type:Boolean})],qe.prototype,"manual",void 0);Rr([h({type:Boolean})],qe.prototype,"inline",void 0);Rr([or()],qe.prototype,"delay",void 0);Rr([h()],qe.prototype,"position",void 0);Rr([Ae([])],qe.prototype,"ignoreMatchingElements",void 0);Rr([Cc()],qe.prototype,"slotNodes",void 0);Rr([U(".ft-tooltip--container")],qe.prototype,"container",void 0);Rr([U(".ft-tooltip")],qe.prototype,"tooltip",void 0);Rr([U(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0);Rr([H()],qe.prototype,"visible",void 0)});var M3=u(()=>{"use strict"});var N3=u(()=>{"use strict";w();Op();G("ft-tooltip")(qe)});var Ep=u(()=>{"use strict";Op();rp();M3();N3()});var et,Lp=u(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(et||(et={}))});function fl(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=E7.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=Ap.get(l))!==null&&o!==void 0?o:Ap.get(e))!==null&&n!==void 0?n:Ap.get(s))!==null&&a!==void 0?a:V.UNKNOWN}var we,V,Ap,E7,wD,Rp=u(()=>{"use strict";(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.CLOUD_SLASH="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",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="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.CLOUD="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.EYE="",t.SHARE="󨃱",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.CIRCLE_ARROW_DOWN_SLASH="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM_REGULAR="",t.HYPHEN_SOLID="",t.CROSSHAIRS_REGULAR="",t.PERSON_CHALKBOARD_REGULAR=""})(we||(we={}));(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=""})(V||(V={}));Ap=new Map([...["abw"].map(t=>[t,V.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,V.AUDIO]),...["avi"].map(t=>[t,V.AVI]),...["chm","xhs"].map(t=>[t,V.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,V.CODE]),...["csv"].map(t=>[t,V.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,V.DITA]),...["epub"].map(t=>[t,V.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,V.EXCEL]),...["flac"].map(t=>[t,V.FLAC]),...["gif"].map(t=>[t,V.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,V.GZIP]),...["html","htm","xhtml"].map(t=>[t,V.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,V.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,V.JPEG]),...["json"].map(t=>[t,V.JSON]),...["m4a","m4p"].map(t=>[t,V.M4A]),...["mov","qt"].map(t=>[t,V.MOV]),...["mp3"].map(t=>[t,V.MP3]),...["mp4","m4v"].map(t=>[t,V.MP4]),...["ogg","oga"].map(t=>[t,V.OGG]),...["pdf","ps"].map(t=>[t,V.PDF]),...["png"].map(t=>[t,V.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,V.POWERPOINT]),...["rar"].map(t=>[t,V.RAR]),...["stp"].map(t=>[t,V.STP]),...["txt","rtf","md","mdown"].map(t=>[t,V.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,V.VIDEO]),...["wav"].map(t=>[t,V.WAV]),...["wma"].map(t=>[t,V.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,V.WORD]),...["xml","xsl","rdf"].map(t=>[t,V.XML]),...["yaml","yml","x-yaml"].map(t=>[t,V.YAML]),...["zip"].map(t=>[t,V.ZIP])]),E7=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);wD={[V.ABW]:"#91ABC6",[V.AUDIO]:"#1795E3",[V.AVI]:"#E63324",[V.CHM]:"#71C3EB",[V.CODE]:"#71C3EB",[V.CSV]:"#1F7345",[V.DITA]:"#71C3EB",[V.EPUB]:"#85B926",[V.EXCEL]:"#1F7345",[V.FLAC]:"#1795E3",[V.GIF]:"#59B031",[V.GZIP]:"#F8AB36",[V.HTML]:"#71C3EB",[V.IMAGE]:"#59B031",[V.JPEG]:"#59B031",[V.JSON]:"#71C3EB",[V.M4A]:"#1795E3",[V.MOV]:"#E63324",[V.MP3]:"#1795E3",[V.MP4]:"#E63324",[V.OGG]:"#1795E3",[V.PDF]:"#E44948",[V.PNG]:"#59B031",[V.POWERPOINT]:"#B54A2B",[V.RAR]:"#F8AB36",[V.STP]:"#3764B1",[V.TEXT]:"#3162AB",[V.UNKNOWN]:"#999999",[V.VIDEO]:"#E63324",[V.WAV]:"#1795E3",[V.WMA]:"#1795E3",[V.WORD]:"#3162AB",[V.XML]:"#71C3EB",[V.YAML]:"#71C3EB",[V.ZIP]:"#F8AB36"}});var Ra,Le,wp=u(()=>{"use strict";I();J();w();qi();Rp();Ri();Lp();Ra=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Le=class extends W{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$}render(){let e=this.variant&&Object.values(et).includes(this.variant)?this.variant:et.fluid_topics,r=e!==et.material||!!this.value;return S`
|
|
638
638
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
639
639
|
${no(this.resolvedIcon)}
|
|
640
640
|
<slot ?hidden=${r}></slot>
|
|
@@ -4908,7 +4908,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
4908
4908
|
</div>
|
|
4909
4909
|
`}onSearchBarKeyDown(e){var r;switch(["Escape","Tab","Shift"].includes(e.key)||(this.searchBar.displaySuggestListbox=!0),e.key){case"Tab":this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0;break;case"Escape":this.suggestManager.shouldDisplaySuggestions&&(e.stopPropagation(),e.preventDefault(),this.searchBar.displaySuggestListbox=!1,this.searchBar.selectedSuggestOptionId=void 0),this.searchBar.mobileMenuOpen=!1;break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusNextSuggestion();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.suggestManager.focusPreviousSuggestion();break;case"ArrowLeft":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowLeft());break;case"ArrowRight":this.searchBar.selectedSuggestOptionId&&(e.stopPropagation(),e.preventDefault(),this.suggestManager.focusArrowRight());break;case"Enter":if(this.searchBar.selectedSuggestRemoveRecent)(r=this.suggestManager.selectedSuggestRemoveRecentButton)===null||r===void 0||r.click();else{let o=this.suggestManager.selectedSuggestOptionLink||this.searchBar.launchSearchButton;o?.click()}break}}onInput(e){let r=e.composedPath()[0];this.searchBar.query=r.value}onClick(){this.onFocus()}onFocus(){this.searchBar.reactToFocus&&(this.searchBar.displaySuggestListbox=!0)}};Qa.styles=_`
|
|
4910
4910
|
|
|
4911
|
-
`});var pe,e8,Y1,_L,ie,X1=u(()=>{"use strict";I();J();Sr();w();Ny();Ee();Jf();gb();ct();Ob();Ft();H1();Wb();jl();Ep();mt();Ql();Xb();Jl();ec();Qb();Jb();A1();Wr();pe=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");e8={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Y1=class extends CustomEvent{constructor(e){super("change",{detail:e})}},_L=()=>{},ie=class extends W{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new ko(e8,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new Fo(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=pr.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new eo(this),this.selectedFacetsManager=new to(this),this.desktopSearchBarManager=new Qa(this),this.mobileSearchBarManager=new Xa(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new ge(10),this.updateLocalesDebouncer=new ge(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.
|
|
4911
|
+
`});var pe,e8,Y1,_L,ie,X1=u(()=>{"use strict";I();J();Sr();w();Ny();Ee();Jf();gb();ct();Ob();Ft();H1();Wb();jl();Ep();mt();Ql();Xb();Jl();ec();Qb();Jb();A1();Wr();pe=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");e8={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Y1=class extends CustomEvent{constructor(e){super("change",{detail:e})}},_L=()=>{},ie=class extends W{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new ko(e8,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new Fo(this.baseUrl).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=pr.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new eo(this),this.selectedFacetsManager=new to(this),this.desktopSearchBarManager=new Qa(this),this.mobileSearchBarManager=new Xa(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new ge(10),this.updateLocalesDebouncer=new ge(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(r=>r.contentLocales).catch(()=>[]).then(r=>{this.availableContentLocales=r,this.availableContentLocalesInitialized=!0})}),this.updateFacets()},this.facetsLoaded=!1,this.updateFacetsDebouncer=new ge(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(r=>r===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(n=>n===this||n===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,r)=>e.valueFilter&&r.valueFilter?this.compareValueFilters(e.valueFilter,r.valueFilter):e.dateFilter&&r.dateFilter?this.compareDateFilters(e.dateFilter,r.dateFilter):e.rangeFilter&&r.rangeFilter?this.compareRangeFilters(e.rangeFilter,r.rangeFilter):!1,this.compareValueFilters=(e,r)=>e.negative==r.negative&&e.values.length===r.values.length&&e.values.every(o=>r.values.includes(o)),this.compareDateFilters=(e,r)=>e.type===r.type,this.compareRangeFilters=(e,r)=>e.from===r.from&&e.to===r.to,this.compareFilters=(e,r)=>e.key===r.key&&this.compareUnknownFilters(e,r),this.compareRequests=(e,r)=>(e.contentLocale==null||r.contentLocale==null||e.contentLocale===r.contentLocale)&&e.metadataFilters.length===r.metadataFilters.length&&e.metadataFilters.every(o=>r.metadataFilters.some(n=>this.compareFilters(o,n)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(r=>{var o,n;return((n=(o=r.valueFilter)===null||o===void 0?void 0:o.values.length)!==null&&n!==void 0?n:0)>0&&!this.displayedFilters.includes(r.key)}).map(r=>({id:r.key}));return[...this.displayedFilters.map(r=>({id:r})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===pr.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await Ao(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return S`
|
|
4912
4912
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
4913
4913
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
4914
4914
|
${this.renderLiveText()}
|
|
@@ -5048,7 +5048,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
5048
5048
|
></ft-filter>
|
|
5049
5049
|
`})}
|
|
5050
5050
|
</ft-snap-scroll>
|
|
5051
|
-
`:$}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,n,a,s;if(e.has("labels")&&(this.labelResolver=new ko(e8,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=d=>this.availableContentLocales.some(p=>p.lang==d);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(d=>{d.valueFilter&&(d.valueFilter.values=d.valueFilter.values.map(p=>Fl(p)))})),e.has("presets")||e.has("selectedPreset")){let l=((n=this.presets)!==null&&n!==void 0?n:[]).find(d=>d.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((a=this.presets)!==null&&a!==void 0?a:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Y1(this.request)))}updateFacets(){this.
|
|
5051
|
+
`:$}async firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,o,n,a,s;if(e.has("labels")&&(this.labelResolver=new ko(e8,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let l=d=>this.availableContentLocales.some(p=>p.lang==d);l(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&l(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(l=>l.metadataFilters.forEach(d=>{d.valueFilter&&(d.valueFilter.values=d.valueFilter.values.map(p=>Fl(p)))})),e.has("presets")||e.has("selectedPreset")){let l=((n=this.presets)!==null&&n!==void 0?n:[]).find(d=>d.name===this.selectedPreset);l&&!this.compareRequests(this.request,l)&&this.setFiltersFromPreset(l)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(l=>e.has(l))&&(this.selectedPreset=(s=((a=this.presets)!==null&&a!==void 0?a:[]).find(l=>this.compareRequests(l,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(l=>e.has(l))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(l=>e.has(l))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(l=>e.has(l))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(l=>e.has(l))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new Y1(this.request)))}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run(async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0},this.facetsInitialized?500:10)):(this.facets=[],this.facetsLoaded=!0,this.facetsInitialized=!0)}contentAvailableCallback(e){var r,o,n;if(super.contentAvailableCallback(e),e.has("displayFacets")&&this.displayFacets&&((r=this.floatingContainer)===null||r===void 0||r.focus()),this.scrollToFacet!=null&&this.facetsLoaded){(o=this.scrollingFiltersContainer)===null||o===void 0||o.scrollIndexIntoView(this.facets.findIndex(s=>s.key===this.scrollToFacet));let a=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);a&&(a.active=!0),this.scrollToFacet=void 0}}initApi(){this.api==null&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout(()=>this.initApi(),10))}async retrieveFacetsFromSearch(){var e;if(this.facetsRequest.length==0){this.facets=[];return}let r=new Map;await((e=this.api)===null||e===void 0?void 0:e.search({...this.request,query:""}).then(o=>o.facets.forEach(n=>{this.knownFacetLabels.set(n.key,n.label),r.set(n.key,n)})).catch(_L)),this.facets=[];for(let o of this.facetsRequest)r.has(o.id)?this.facets.push(r.get(o.id)):this.knownFacetLabels.has(o.id)&&this.facets.push({key:o.id,label:this.knownFacetLabels.get(o.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(e){var r;e.key==="Escape"&&(this.displayFacets=!1,(r=this.filtersOpener)===null||r===void 0||r.focus())}setQuery(e){this.input&&(this.input.value=e),this.query=e}onLaunchSearch(){if(this.query){let e=this.recentSearches.filter(r=>r.toLowerCase()!==this.query.toLowerCase()).filter((r,o)=>o<20);this.recentSearches=[this.query,...e],this.saveRecentSearches()}this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var e;this.recentSearches=JSON.parse((e=window.localStorage.getItem(this.recentSearchesStorageKey))!==null&&e!==void 0?e:"[]")}saveRecentSearches(){let e=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:e,storageArea:window.localStorage,url:window.location.href}))}async connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.closeSuggestListbox),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer),this.focusOnDisplay&&!xa&&this.focusInput(),j.addEventListener("authentication-change",this.initSearchData),this.initSearchData()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeSuggestListbox),document.removeEventListener("focusin",this.closeFloatingContainer),document.removeEventListener("click",this.closeFloatingContainer),j.removeEventListener("authentication-change",this.initSearchData)}updateSize(e){this.sizeCategory=e.detail.category}setFilter(e,r){let o=this.metadataFilters.filter(n=>!n.valueFilter||n.key!==e);this.facets.forEach(n=>{n.key===e&&Gt(n.rootNodes,a=>a.childNodes).forEach(a=>a.selected=r.includes(a.value))}),r.length&&o.push({key:e,valueFilter:{negative:!1,values:r}}),this.metadataFilters=o,this.scrollToFacet=e}setFiltersFromPreset(e){e!=null&&(e.contentLocale!=null&&(this.contentLocale=e.contentLocale),this.metadataFilters=e.metadataFilters)}clearFilters(){this.facets.forEach(r=>Gt(r.rootNodes,o=>o.childNodes).forEach(o=>o.selected=!1)),this.metadataFilters=[];let e=this.facets[0];this.scrollToFacet=e?.key}querySelector(e){return this.shadowRoot.querySelector(e)}querySelectorAll(e){return this.shadowRoot.querySelectorAll(e)}renderDesktopFloatingMenu(){return this.forceMenuOpen?$:S`
|
|
5052
5052
|
<div class="ft-search-bar--floating-panel"
|
|
5053
5053
|
id="ft-search-bar-floating-panel"
|
|
5054
5054
|
@keyup=${this.onFloatingContainerKeyUp}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-search-in-document",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "A search component to retrieve occurrences in documents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "2.0.
|
|
23
|
-
"@fluid-topics/ft-card": "2.0.
|
|
24
|
-
"@fluid-topics/ft-i18n": "2.0.
|
|
25
|
-
"@fluid-topics/ft-search-context": "2.0.
|
|
26
|
-
"@fluid-topics/ft-search-input": "2.0.
|
|
27
|
-
"@fluid-topics/ft-search-load-more-button": "2.0.
|
|
28
|
-
"@fluid-topics/ft-search-result-abstract": "2.0.
|
|
29
|
-
"@fluid-topics/ft-search-result-title": "2.0.
|
|
30
|
-
"@fluid-topics/ft-search-results": "2.0.
|
|
31
|
-
"@fluid-topics/ft-search-results-number": "2.0.
|
|
32
|
-
"@fluid-topics/ft-typography": "2.0.
|
|
33
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-button": "2.0.9",
|
|
23
|
+
"@fluid-topics/ft-card": "2.0.9",
|
|
24
|
+
"@fluid-topics/ft-i18n": "2.0.9",
|
|
25
|
+
"@fluid-topics/ft-search-context": "2.0.9",
|
|
26
|
+
"@fluid-topics/ft-search-input": "2.0.9",
|
|
27
|
+
"@fluid-topics/ft-search-load-more-button": "2.0.9",
|
|
28
|
+
"@fluid-topics/ft-search-result-abstract": "2.0.9",
|
|
29
|
+
"@fluid-topics/ft-search-result-title": "2.0.9",
|
|
30
|
+
"@fluid-topics/ft-search-results": "2.0.9",
|
|
31
|
+
"@fluid-topics/ft-search-results-number": "2.0.9",
|
|
32
|
+
"@fluid-topics/ft-typography": "2.0.9",
|
|
33
|
+
"@fluid-topics/ft-wc-utils": "2.0.9",
|
|
34
34
|
"@fluid-topics/public-api": "1.0.116",
|
|
35
35
|
"lit": "3.1.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "0c31a55662f9e366ecd36cbb4d10d93ee5433b5c"
|
|
38
38
|
}
|