@fluid-topics/ft-search-facet 1.1.113 → 1.1.114

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.
@@ -537,7 +537,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
537
537
  </div>
538
538
  </div>
539
539
  </div>
540
- `}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.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&&(this.tooltip.style.left="",this.tooltip.style.top="",Is(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}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",e=>{e.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(e,o){return Math.max(e,Math.min(0,-o))}};Q.elementDefinitions={"ft-typography":X};Q.styles=cs;ke([(0,ae.property)()],Q.prototype,"text",void 0);ke([(0,ae.property)({type:Boolean})],Q.prototype,"manual",void 0);ke([(0,ae.property)({type:Boolean})],Q.prototype,"inline",void 0);ke([(0,ae.property)({type:Number})],Q.prototype,"delay",void 0);ke([(0,ae.property)()],Q.prototype,"position",void 0);ke([(0,ae.queryAssignedNodes)()],Q.prototype,"slotNodes",void 0);ke([(0,ae.query)(".ft-tooltip--container")],Q.prototype,"container",void 0);ke([(0,ae.query)(".ft-tooltip")],Q.prototype,"tooltip",void 0);ke([(0,ae.query)(".ft-tooltip--content")],Q.prototype,"tooltipContent",void 0);ke([(0,ae.state)()],Q.prototype,"visible",void 0);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onTouch",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onHover",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onOut",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onClick",null);(0,_s.customElement)("ft-tooltip")(Q);var Ms=y(A());var eo=y(k()),er=y(j()),Fs=y(A()),Bs=y($s());var No;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",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="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(No||(No={}));var C;(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;"})(C||(C={}));var Ly=new Map([...["abw"].map(t=>[t,C.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,C.AUDIO]),...["avi"].map(t=>[t,C.AVI]),...["chm","xhs"].map(t=>[t,C.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,C.CODE]),...["csv"].map(t=>[t,C.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,C.DITA]),...["epub"].map(t=>[t,C.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,C.EXCEL]),...["flac"].map(t=>[t,C.FLAC]),...["gif"].map(t=>[t,C.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,C.GZIP]),...["html","htm","xhtml"].map(t=>[t,C.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,C.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,C.JPEG]),...["json"].map(t=>[t,C.JSON]),...["m4a","m4p"].map(t=>[t,C.M4A]),...["mov","qt"].map(t=>[t,C.MOV]),...["mp3"].map(t=>[t,C.MP3]),...["mp4","m4v"].map(t=>[t,C.MP4]),...["ogg","oga"].map(t=>[t,C.OGG]),...["pdf","ps"].map(t=>[t,C.PDF]),...["png"].map(t=>[t,C.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,C.POWERPOINT]),...["rar"].map(t=>[t,C.RAR]),...["stp"].map(t=>[t,C.STP]),...["txt","rtf","md","mdown"].map(t=>[t,C.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,C.VIDEO]),...["wav"].map(t=>[t,C.WAV]),...["wma"].map(t=>[t,C.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,C.WORD]),...["xml","xsl","rdf"].map(t=>[t,C.XML]),...["yaml","yml","x-yaml"].map(t=>[t,C.YAML]),...["zip"].map(t=>[t,C.ZIP])]);var Ty={[C.ABW]:"#91ABC6",[C.AUDIO]:"#1795E3",[C.AVI]:"#E63324",[C.CHM]:"#71C3EB",[C.CODE]:"#71C3EB",[C.CSV]:"#1F7345",[C.DITA]:"#71C3EB",[C.EPUB]:"#85B926",[C.EXCEL]:"#1F7345",[C.FLAC]:"#1795E3",[C.GIF]:"#59B031",[C.GZIP]:"#F8AB36",[C.HTML]:"#71C3EB",[C.IMAGE]:"#59B031",[C.JPEG]:"#59B031",[C.JSON]:"#71C3EB",[C.M4A]:"#1795E3",[C.MOV]:"#E63324",[C.MP3]:"#1795E3",[C.MP4]:"#E63324",[C.OGG]:"#1795E3",[C.PDF]:"#E44948",[C.PNG]:"#59B031",[C.POWERPOINT]:"#B54A2B",[C.RAR]:"#F8AB36",[C.STP]:"#3764B1",[C.TEXT]:"#3162AB",[C.UNKNOWN]:"#999999",[C.VIDEO]:"#E63324",[C.WAV]:"#1795E3",[C.WMA]:"#1795E3",[C.WORD]:"#3162AB",[C.XML]:"#71C3EB",[C.YAML]:"#71C3EB",[C.ZIP]:"#F8AB36"};var pt;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(pt||(pt={}));var Lo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},_e=class extends Fs.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=eo.nothing}render(){let e=this.variant&&Object.values(pt).includes(this.variant)?this.variant:pt.fluid_topics,o=e!==pt.material||!!this.value;return eo.html`
540
+ `}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.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&&(this.tooltip.style.left="",this.tooltip.style.top="",Is(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}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",e=>{e.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(e,o){return Math.max(e,Math.min(0,-o))}};Q.elementDefinitions={"ft-typography":X};Q.styles=cs;ke([(0,ae.property)()],Q.prototype,"text",void 0);ke([(0,ae.property)({type:Boolean})],Q.prototype,"manual",void 0);ke([(0,ae.property)({type:Boolean})],Q.prototype,"inline",void 0);ke([(0,ae.property)({type:Number})],Q.prototype,"delay",void 0);ke([(0,ae.property)()],Q.prototype,"position",void 0);ke([(0,ae.queryAssignedNodes)()],Q.prototype,"slotNodes",void 0);ke([(0,ae.query)(".ft-tooltip--container")],Q.prototype,"container",void 0);ke([(0,ae.query)(".ft-tooltip")],Q.prototype,"tooltip",void 0);ke([(0,ae.query)(".ft-tooltip--content")],Q.prototype,"tooltipContent",void 0);ke([(0,ae.state)()],Q.prototype,"visible",void 0);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onTouch",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onHover",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onOut",null);ke([(0,ae.eventOptions)({passive:!0})],Q.prototype,"onClick",null);(0,_s.customElement)("ft-tooltip")(Q);var Ms=y(A());var eo=y(k()),er=y(j()),Fs=y(A()),Bs=y($s());var No;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",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="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(No||(No={}));var C;(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;"})(C||(C={}));var Ly=new Map([...["abw"].map(t=>[t,C.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,C.AUDIO]),...["avi"].map(t=>[t,C.AVI]),...["chm","xhs"].map(t=>[t,C.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,C.CODE]),...["csv"].map(t=>[t,C.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,C.DITA]),...["epub"].map(t=>[t,C.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,C.EXCEL]),...["flac"].map(t=>[t,C.FLAC]),...["gif"].map(t=>[t,C.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,C.GZIP]),...["html","htm","xhtml"].map(t=>[t,C.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,C.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,C.JPEG]),...["json"].map(t=>[t,C.JSON]),...["m4a","m4p"].map(t=>[t,C.M4A]),...["mov","qt"].map(t=>[t,C.MOV]),...["mp3"].map(t=>[t,C.MP3]),...["mp4","m4v"].map(t=>[t,C.MP4]),...["ogg","oga"].map(t=>[t,C.OGG]),...["pdf","ps"].map(t=>[t,C.PDF]),...["png"].map(t=>[t,C.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,C.POWERPOINT]),...["rar"].map(t=>[t,C.RAR]),...["stp"].map(t=>[t,C.STP]),...["txt","rtf","md","mdown"].map(t=>[t,C.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,C.VIDEO]),...["wav"].map(t=>[t,C.WAV]),...["wma"].map(t=>[t,C.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,C.WORD]),...["xml","xsl","rdf"].map(t=>[t,C.XML]),...["yaml","yml","x-yaml"].map(t=>[t,C.YAML]),...["zip"].map(t=>[t,C.ZIP])]);var Ty={[C.ABW]:"#91ABC6",[C.AUDIO]:"#1795E3",[C.AVI]:"#E63324",[C.CHM]:"#71C3EB",[C.CODE]:"#71C3EB",[C.CSV]:"#1F7345",[C.DITA]:"#71C3EB",[C.EPUB]:"#85B926",[C.EXCEL]:"#1F7345",[C.FLAC]:"#1795E3",[C.GIF]:"#59B031",[C.GZIP]:"#F8AB36",[C.HTML]:"#71C3EB",[C.IMAGE]:"#59B031",[C.JPEG]:"#59B031",[C.JSON]:"#71C3EB",[C.M4A]:"#1795E3",[C.MOV]:"#E63324",[C.MP3]:"#1795E3",[C.MP4]:"#E63324",[C.OGG]:"#1795E3",[C.PDF]:"#E44948",[C.PNG]:"#59B031",[C.POWERPOINT]:"#B54A2B",[C.RAR]:"#F8AB36",[C.STP]:"#3764B1",[C.TEXT]:"#3162AB",[C.UNKNOWN]:"#999999",[C.VIDEO]:"#E63324",[C.WAV]:"#1795E3",[C.WMA]:"#1795E3",[C.WORD]:"#3162AB",[C.XML]:"#71C3EB",[C.YAML]:"#71C3EB",[C.ZIP]:"#F8AB36"};var pt;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(pt||(pt={}));var Lo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},_e=class extends Fs.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=eo.nothing}render(){let e=this.variant&&Object.values(pt).includes(this.variant)?this.variant:pt.fluid_topics,o=e!==pt.material||!!this.value;return eo.html`
541
541
  <i class="ft-icon ft-icon--${e}" part="icon icon-${e}">
542
542
  ${(0,Bs.unsafeHTML)(this.resolvedIcon)}
543
543
  <slot ?hidden=${o}></slot>
@@ -1721,7 +1721,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1721
1721
  `;var Wc=y(A()),Hc=y(j());var yt=y(A());var El=y(A()),Id={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload}},wl=t=>El.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Id});var kd=y(Rl(),1);var Nl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Nl||(Nl={}));var Ll;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ll||(Ll={}));var Tl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Tl||(Tl={}));var Pl;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Pl||(Pl={}));var Il;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Il||(Il={}));var kl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(kl||(kl={}));var _l;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(_l||(_l={}));var Dl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Dl||(Dl={}));var $l;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})($l||($l={}));var Fl;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fl||(Fl={}));var Bl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Bl||(Bl={}));var _r;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(_r||(_r={}));var Ml;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ml||(Ml={}));var Ul;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ul||(Ul={}));var zl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(zl||(zl={}));var Wl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Wl||(Wl={}));var Hl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Hl||(Hl={}));var Dr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(Dr||(Dr={}));var pe;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(pe||(pe={}));var Vl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Vl||(Vl={}));var cx={[pe.PERSONAL_BOOK_SHARE_USER]:[pe.PERSONAL_BOOK_USER],[pe.HTML_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.PDF_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.KHUB_ADMIN]:[pe.CONTENT_PUBLISHER],[pe.ADMIN]:[pe.KHUB_ADMIN,pe.USERS_ADMIN,pe.PORTAL_ADMIN],[pe.DEVELOPER]:[pe.BETA_USER,pe.DEBUG_USER]};var zc=y(A());var ql=y(k()),Ye=y(j()),rt=y(A());var jl=y(k());var Gl=jl.css`
1722
1722
  `;var Uo=y(A()),_d="ft-app-info",qn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Dd={session:(t,e)=>{(0,Uo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.eventBus.dispatchEvent(new qn(e.payload)),0))}},P=Uo.FtReduxStore.get({name:_d,reducers:Dd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Mt=y(A());var Yn=y(A());var lr=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=P.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var ht=class{constructor(e=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Yn.CacheRegistry,this.cache=e?i.commonCache:new Yn.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:lr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):lr.await()}clearCache(){this.cache.clearAll()}};var Kl,$d=Symbol("clearAfterUnitTest"),zo=class extends ht{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Kl]=()=>{this.defaultMessages={},this.cache=new Mt.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Mt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Mt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,Mt.delay)(0).then(()=>o()).catch(()=>null)))}};Kl=$d;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var cr=window.FluidTopicsI18nService,Zl=window.FluidTopicsCustomI18nService;var Ne=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},oe=class extends rt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>lr.get(),this.messageContexts=[],this.cache=new rt.CacheRegistry,this.cleanSessionDebouncer=new rt.Debouncer}render(){return ql.html`
1723
1723
  <slot></slot>
1724
- `}update(e){super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>cr.addContext(o)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};oe.elementDefinitions={};oe.styles=Gl;Ne([(0,Ye.property)()],oe.prototype,"baseUrl",void 0);Ne([(0,Ye.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ne([(0,Ye.property)()],oe.prototype,"uiLocale",void 0);Ne([(0,rt.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ne([(0,rt.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ne([(0,Ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ne([(0,Ye.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ne([(0,rt.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ne([(0,rt.jsonProperty)(void 0)],oe.prototype,"session",void 0);var Op=y(j());function Fd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Wo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Wo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Wo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Wo(t,e){try{return Fd(t,e)}catch{return!1}}function Xn(t,e){return!Wo(t,e)}var Bd=y(j(),1);var Ho=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var oo=y(j(),1);var Yl=y(j(),1);function Xl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Yl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Xn,...e??{}})}var Vo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Jl=y(k(),1);var jo=window,Md=jo.ShadowRoot&&(jo.ShadyCSS===void 0||jo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wx=Symbol();var Ql=(t,e)=>{Md?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=jo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Go=class extends Jl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ql(n,e.elementStyles),n}};var Ko=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},oc,ec=Symbol("constructorPrototype"),tc=Symbol("constructorName"),nc=Symbol("exportpartsDebouncer"),rc=Symbol("dynamicDependenciesLoaded"),Ut=class extends Go{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oc]=new Vo(5),this[tc]=this.constructor.name,this[ec]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[tc]&&Object.setPrototypeOf(this,this[ec])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[rc]||(e[rc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[nc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=g=>g!=null&&g.trim().length>0,u=e.filter(p).map(g=>g.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],x=(c=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...v,...x).filter(p).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let m=[...h.values()].flatMap(g=>u.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};oc=nc;Ko([(0,oo.property)()],Ut.prototype,"exportpartsPrefix",void 0);Ko([Xl([])],Ut.prototype,"exportpartsPrefixes",void 0);Ko([(0,oo.property)()],Ut.prototype,"customStylesheet",void 0);Ko([(0,oo.state)()],Ut.prototype,"useAdoptedStyleSheets",void 0);function no(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ic,ac,sc,Zo=Symbol("internalReduxEventsUnsubscribers"),zt=Symbol("internalStoresUnsubscribers"),dr=Symbol("internalStores"),io=class extends Ut{constructor(){super(...arguments),this[ic]=new Map,this[ac]=new Map,this[sc]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[dr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[dr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[dr].get(e)}addStore(e,o){var n;o=(n=o??(no(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[dr].delete(o)}setupStore(e,o){this[dr].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[dr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[zt].has(e.store):this[zt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[zt].set(e,o.subscribe(()=>this.updateFromStores())),no(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Zo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[zt].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Zo].forEach(e=>e()),this[Zo]=[]}unsubscribeFromStore(e){this[zt].has(e)&&this[zt].get(e)(),this[zt].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};ic=zt,ac=dr,sc=Zo;io.reduxProperties=new Map;io.reduxReactiveProperties=new Set;io.reduxEventListeners=new Map;function Xe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(t){return!!t&&!!t[q]}function ot(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Kd}(t)||Array.isArray(t)||!!t[hc]||!!(!((e=t.constructor)===null||e===void 0)&&e[hc])||ai(t)||si(t))}function pr(t,e,o){o===void 0&&(o=!1),Br(t)===0?(o?Object.keys:Fr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Br(t){var e=t[q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ai(t)?2:si(t)?3:0}function $r(t,e){return Br(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ud(t,e){return Br(t)===2?t.get(e):t[e]}function mc(t,e,o){var n=Br(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function yc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ai(t){return jd&&t instanceof Map}function si(t){return Gd&&t instanceof Set}function Wt(t){return t.o||t.t}function li(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=xc(t);delete e[q];for(var o=Fr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ci(t,e){return e===void 0&&(e=!1),di(t)||Tt(t)||!ot(t)||(Br(t)>1&&(t.set=t.add=t.clear=t.delete=zd),Object.freeze(t),e&&pr(t,function(o,n){return ci(n,!0)},!0)),t}function zd(){Xe(2)}function di(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function mt(t){var e=ii[t];return e||Xe(18,t),e}function Wd(t,e){ii[t]||(ii[t]=e)}function ri(){return so}function Qn(t,e){e&&(mt("Patches"),t.u=[],t.s=[],t.v=e)}function qo(t){oi(t),t.p.forEach(Hd),t.p=null}function oi(t){t===so&&(so=t.l)}function lc(t){return so={p:[],l:so,h:t,m:!0,_:0}}function Hd(t){var e=t[q];e.i===0||e.i===1?e.j():e.g=!0}function Jn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||mt("ES5").S(e,t,n),n?(o[q].P&&(qo(e),Xe(4)),ot(t)&&(t=Yo(e,t),e.l||Xo(e,t)),e.u&&mt("Patches").M(o[q].t,t,e.u,e.s)):t=Yo(e,o,[]),qo(e),e.u&&e.v(e.u,e.s),t!==bc?t:void 0}function Yo(t,e,o){if(di(e))return e;var n=e[q];if(!n)return pr(e,function(c,p){return cc(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Xo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=li(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),pr(a,function(c,p){return cc(t,n,i,c,p,o,s)}),Xo(t,i,!1),o&&t.u&&mt("Patches").N(n,o,t.u,t.s)}return n.o}function cc(t,e,o,n,i,a,s){if(Tt(i)){var c=Yo(t,i,a&&e&&e.i!==3&&!$r(e.R,n)?a.concat(n):void 0);if(mc(o,n,c),!Tt(c))return;t.m=!1}else s&&o.add(i);if(ot(i)&&!di(i)){if(!t.h.D&&t._<1)return;Yo(t,i),e&&e.A.l||Xo(t,i)}}function Xo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ci(e,o)}function ei(t,e){var o=t[q];return(o?Wt(o):t)[e]}function dc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Ht(t){t.P||(t.P=!0,t.l&&Ht(t.l))}function ti(t){t.o||(t.o=li(t.t))}function ni(t,e,o){var n=ai(e)?mt("MapSet").F(e,o):si(e)?mt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:ri(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=lo;s&&(p=[c],u=ao);var h=Proxy.revocable(p,u),m=h.revoke,g=h.proxy;return c.k=g,c.j=m,g}(e,o):mt("ES5").J(e,o);return(o?o.A:ri()).p.push(n),n}function Vd(t){return Tt(t)||Xe(22,t),function e(o){if(!ot(o))return o;var n,i=o[q],a=Br(o);if(i){if(!i.P&&(i.i<4||!mt("ES5").K(i)))return i.t;i.I=!0,n=pc(o,a),i.I=!1}else n=pc(o,a);return pr(n,function(s,c){i&&Ud(i.t,s)===c||mc(n,s,e(c))}),a===3?new Set(n):n}(t)}function pc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return li(t)}function gc(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[q];return lo.get(u,s)},set:function(u){var h=this[q];lo.set(h,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][q];if(!p.P)switch(p.i){case 5:n(p)&&Ht(p);break;case 4:o(p)&&Ht(p)}}}function o(s){for(var c=s.t,p=s.k,u=Fr(p),h=u.length-1;h>=0;h--){var m=u[h];if(m!==q){var g=c[m];if(g===void 0&&!$r(c,m))return!0;var v=p[m],x=v&&v[q];if(x?x.t!==g:!yc(v,g))return!0}}var S=!!c[q];return u.length!==Fr(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&Xe(3,JSON.stringify(Wt(s)))}var a={};Wd("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(m,g){if(m){for(var v=Array(g.length),x=0;x<g.length;x++)Object.defineProperty(v,""+x,t(x,!0));return v}var S=xc(g);delete S[q];for(var L=Fr(S),R=0;R<L.length;R++){var N=L[R];S[N]=t(N,m||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),h={i:p?5:4,A:c?c.A:ri(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,q,{value:h,writable:!0}),u},S:function(s,c,p){p?Tt(c)&&c[q].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var m=h[q];if(m){var g=m.t,v=m.k,x=m.R,S=m.i;if(S===4)pr(v,function(D){D!==q&&(g[D]!==void 0||$r(g,D)?x[D]||u(v[D]):(x[D]=!0,Ht(m)))}),pr(g,function(D){v[D]!==void 0||$r(v,D)||(x[D]=!1,Ht(m))});else if(S===5){if(n(m)&&(Ht(m),x.length=!0),v.length<g.length)for(var L=v.length;L<g.length;L++)x[L]=!1;else for(var R=g.length;R<v.length;R++)x[R]=!0;for(var N=Math.min(v.length,g.length),I=0;I<N;I++)v.hasOwnProperty(I)||(x[I]=!0),x[I]===void 0&&u(v[I])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var uc,so,pi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jd=typeof Map<"u",Gd=typeof Set<"u",fc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bc=pi?Symbol.for("immer-nothing"):((uc={})["immer-nothing"]=!0,uc),hc=pi?Symbol.for("immer-draftable"):"__$immer_draftable",q=pi?Symbol.for("immer-state"):"__$immer_state";var Kd=""+Object.prototype.constructor,Fr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,xc=Object.getOwnPropertyDescriptors||function(t){var e={};return Fr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ii={},lo={get:function(t,e){if(e===q)return t;var o=Wt(t);if(!$r(o,e))return function(i,a,s){var c,p=dc(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!ot(n)?n:n===ei(t.t,e)?(ti(t),t.o[e]=ni(t.A.h,n,t)):n},has:function(t,e){return e in Wt(t)},ownKeys:function(t){return Reflect.ownKeys(Wt(t))},set:function(t,e,o){var n=dc(Wt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=ei(Wt(t),e),a=i?.[q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(yc(o,i)&&(o!==void 0||$r(t.t,e)))return!0;ti(t),Ht(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ei(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ti(t),Ht(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Wt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Xe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Xe(12)}},ao={};pr(lo,function(t,e){ao[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ao.deleteProperty=function(t,e){return ao.set.call(this,t,e,void 0)},ao.set=function(t,e,o){return lo.set.call(this,t[0],e,o,t[0])};var Zd=function(){function t(o){var n=this;this.O=fc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var L=this;S===void 0&&(S=c);for(var R=arguments.length,N=Array(R>1?R-1:0),I=1;I<R;I++)N[I-1]=arguments[I];return p.produce(S,function(D){var $;return($=a).call.apply($,[L,D].concat(N))})}}var u;if(typeof a!="function"&&Xe(6),s!==void 0&&typeof s!="function"&&Xe(7),ot(i)){var h=lc(n),m=ni(n,i,void 0),g=!0;try{u=a(m),g=!1}finally{g?qo(h):oi(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qn(h,s),Jn(S,h)},function(S){throw qo(h),S}):(Qn(h,s),Jn(u,h))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===bc&&(u=void 0),n.D&&ci(u,!0),s){var v=[],x=[];mt("Patches").M(i,u,v,x),s(v,x)}return u}Xe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var h=arguments.length,m=Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(m))})};var s,c,p=n.produce(i,a,function(u,h){s=u,c=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){ot(o)||Xe(8),Tt(o)&&(o=Vd(o));var n=lc(this),i=ni(this,o,void 0);return i[q].C=!0,oi(n),i},e.finishDraft=function(o,n){var i=o&&o[q],a=i.A;return Qn(a,n),Jn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!fc&&Xe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=mt("Patches").$;return Tt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),je=new Zd,qd=je.produce,ev=je.produceWithPatches.bind(je),tv=je.setAutoFreeze.bind(je),rv=je.setUseProxies.bind(je),ov=je.applyPatches.bind(je),nv=je.createDraft.bind(je),iv=je.finishDraft.bind(je),Qo=qd;function Vt(t){"@babel/helpers - typeof";return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(t)}function ui(t,e){if(Vt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Vt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fi(t){var e=ui(t,"string");return Vt(e)==="symbol"?e:String(e)}function hi(t,e,o){return e=fi(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function vc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Jo(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?vc(Object(o),!0).forEach(function(n){hi(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):vc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function ve(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Sc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mi=function(){return Math.random().toString(36).substring(7).split("").join(".")},en={INIT:"@@redux/INIT"+mi(),REPLACE:"@@redux/REPLACE"+mi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mi()}};function Yd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function yi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ve(1));return o(yi)(t,e)}if(typeof t!="function")throw new Error(ve(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function h(){if(p)throw new Error(ve(3));return a}function m(S){if(typeof S!="function")throw new Error(ve(4));if(p)throw new Error(ve(5));var L=!0;return u(),c.push(S),function(){if(L){if(p)throw new Error(ve(6));L=!1,u();var N=c.indexOf(S);c.splice(N,1),s=null}}}function g(S){if(!Yd(S))throw new Error(ve(7));if(typeof S.type>"u")throw new Error(ve(8));if(p)throw new Error(ve(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var L=s=c,R=0;R<L.length;R++){var N=L[R];N()}return S}function v(S){if(typeof S!="function")throw new Error(ve(10));i=S,g({type:en.REPLACE})}function x(){var S,L=m;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ve(11));function I(){N.next&&N.next(h())}I();var D=L(I);return{unsubscribe:D}}},S[Sc]=function(){return this},S}return g({type:en.INIT}),n={dispatch:g,subscribe:m,getState:h,replaceReducer:v},n[Sc]=x,n}function Xd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:en.INIT});if(typeof n>"u")throw new Error(ve(12));if(typeof o(void 0,{type:en.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Oc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{Xd(o)}catch(p){c=p}return function(u,h){if(u===void 0&&(u={}),c)throw c;if(0)var m;for(var g=!1,v={},x=0;x<a.length;x++){var S=a[x],L=o[S],R=u[S],N=L(R,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(ve(14))}v[S]=N,g=g||N!==R}return g=g||a.length!==Object.keys(u).length,g?v:u}}function Mr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Cc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(ve(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=Mr.apply(void 0,c)(i.dispatch),Jo(Jo({},i),{},{dispatch:a})}}}function Ec(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var wc=Ec();wc.withExtraArgument=Ec;var gi=wc;var Tc=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Qd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(h){return p([u,h])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(h){u=[6,h],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ur=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},Jd=Object.defineProperty,ep=Object.defineProperties,tp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,rp=Object.prototype.hasOwnProperty,op=Object.prototype.propertyIsEnumerable,Rc=function(t,e,o){return e in t?Jd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},jt=function(t,e){for(var o in e||(e={}))rp.call(e,o)&&Rc(t,o,e[o]);if(Ac)for(var n=0,i=Ac(e);n<i.length;n++){var o=i[n];op.call(e,o)&&Rc(t,o,e[o])}return t},bi=function(t,e){return ep(t,tp(e))},np=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var ip=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mr:Mr.apply(null,arguments)},Cv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ap(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var sp=function(t){Tc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array),lp=function(t){Tc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array);function Si(t){return ot(t)?Qo(t,function(){}):t}function cp(t){return typeof t=="boolean"}function dp(){return function(e){return pp(e)}}function pp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new sp;if(o&&(cp(o)?c.push(gi):c.push(gi.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var xi=!0;function Pc(t){var e=dp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,h=u===void 0?void 0:u,m=o.enhancers,g=m===void 0?void 0:m,v;if(typeof i=="function")v=i;else if(ap(i))v=Oc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!xi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xi&&x.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Cc.apply(void 0,x),L=Mr;p&&(L=ip(jt({trace:!xi},typeof p=="object"&&p)));var R=new lp(S),N=R;Array.isArray(g)?N=Ur([S],g):typeof g=="function"&&(N=g(R));var I=L.apply(void 0,N);return yi(v,h,I)}function Gt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return jt(jt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Ic(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function up(t){return typeof t=="function"}function fp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Ic(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(up(t))p=function(){return Si(t())};else{var u=Si(t);p=function(){return u}}function h(m,g){m===void 0&&(m=p());var v=Ur([a[g.type]],s.filter(function(x){var S=x.matcher;return S(g)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[c]),v.reduce(function(x,S){if(S)if(Tt(x)){var L=x,R=S(L,g);return R===void 0?x:R}else{if(ot(x))return Qo(x,function(N){return S(N,g)});var R=S(x,g);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},m)}return h.getInitialState=p,h}function hp(t,e){return t+"/"+e}function kc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Si(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(h){var m=n[h],g=hp(e,h),v,x;"reducer"in m?(v=m.reducer,x=m.prepare):v=m,a[h]=v,s[g]=v,c[h]=x?Gt(g,x):Gt(g)});function p(){var h=typeof t.extraReducers=="function"?Ic(t.extraReducers):[t.extraReducers],m=h[0],g=m===void 0?{}:m,v=h[1],x=v===void 0?[]:v,S=h[2],L=S===void 0?void 0:S,R=jt(jt({},g),s);return fp(o,function(N){for(var I in R)N.addCase(I,R[I]);for(var D=0,$=x;D<$.length;D++){var Te=$[D];N.addMatcher(Te.matcher,Te.reducer)}L&&N.addDefaultCase(L)})}var u;return{name:e,reducer:function(h,m){return u||(u=p()),u(h,m)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var mp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=mp[Math.random()*64|0];return e},gp=["name","message","stack","code"],vi=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Nc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),bp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=gp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Rv=function(){function t(e,o,n){var i=Gt(e+"/fulfilled",function(h,m,g,v){return{payload:h,meta:bi(jt({},v||{}),{arg:g,requestId:m,requestStatus:"fulfilled"})}}),a=Gt(e+"/pending",function(h,m,g){return{payload:void 0,meta:bi(jt({},g||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),s=Gt(e+"/rejected",function(h,m,g,v,x){return{payload:v,error:(n&&n.serializeError||bp)(h||"Rejected"),meta:bi(jt({},x||{}),{arg:g,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(m,g,v){var x=n?.idGenerator?n.idGenerator(h):yp(),S=new p,L,R=!1;function N(D){L=D,S.abort()}var I=function(){return np(this,null,function(){var D,$,Te,at,Oe,st,ue;return Qd(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),at=(D=n?.condition)==null?void 0:D.call(n,h,{getState:g,extra:v}),vp(at)?[4,at]:[3,2];case 1:at=f.sent(),f.label=2;case 2:if(at===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Oe=new Promise(function(b,T){return S.signal.addEventListener("abort",function(){return T({name:"AbortError",message:L||"Aborted"})})}),m(a(x,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:x,arg:h},{getState:g,extra:v}))),[4,Promise.race([Oe,Promise.resolve(o(h,{dispatch:m,getState:g,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(b,T){return new vi(b,T)},fulfillWithValue:function(b,T){return new Nc(b,T)}})).then(function(b){if(b instanceof vi)throw b;return b instanceof Nc?i(b.payload,x,h,b.meta):i(b,x,h)})])];case 3:return Te=f.sent(),[3,5];case 4:return st=f.sent(),Te=st instanceof vi?s(null,x,h,st.payload,st.meta):s(st,x,h),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&s.match(Te)&&Te.meta.condition,ue||m(Te),[2,Te]}})})}();return Object.assign(I,{abort:N,requestId:x,arg:h,unwrap:function(){return I.then(xp)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function xp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function vp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var _c="listener",Dc="completed",$c="cancelled",Nv="task-"+$c,Lv="task-"+Dc,Tv=_c+"-"+$c,Pv=_c+"-"+Dc;var Oi="listenerMiddleware";var Iv=Gt(Oi+"/add"),kv=Gt(Oi+"/removeAll"),_v=Gt(Oi+"/remove");var Lc,Dv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Lc||(Lc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Sp=function(t){return function(e){setTimeout(e,t)}},$v=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Sp(10);gc();window.ftReduxStores||(window.ftReduxStores={});var Fc=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(no(a))return a;if(i==null)return;let s=kc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Pc({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ho,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let u=c(...p);return this.reduxStore.dispatch(u),u}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var nn=y(A());var tn=class extends ht{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var rn=class extends ht{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Cp="ft-user-assets",on=nn.FtReduxStore.get({name:Cp,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ci=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new rn,this.savedSearchesService=new tn,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,nn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),on.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),on.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();on.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;on.actions.bookmarks(o)}}},Bc=new Ci;var Ei=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ei;var Mc=y(A()),wi=class{highlightHtml(e,o,n){(0,Mc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new wi;var Uc=y(A());var Ai=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Uc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Ai;(0,zc.customElement)("ft-app-context")(oe);var an=class extends ht{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var Ep=t=>t.request.virtualField===_r.TITLE_ONLY&&t.request.scope===Dr.DOCUMENTS,zr=class t extends Event{constructor(){super(t.eventName)}};zr.eventName="search-context-clear-all-filters";var co=class t{static build(e,o){return new t(wl(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new yt.Debouncer(10),this.searchDebouncer=new yt.Debouncer(100),this.suggestDebouncer=new yt.Debouncer(300),this.service=o??new an}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(_r.TITLE_ONLY),this.store.actions.setRequestScope(Dr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(_r.EVERYWHERE),this.store.actions.setRequestScope(Dr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ep(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new zr)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,yt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,yt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}};var wp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ni=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ri=Symbol("registerInterval");function Ap(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ri]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ri]):this.dispatchEvent(new Ni)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ri,wp([(0,Hc.state)()],o.prototype,"stateManager",void 0),o}var sn=class extends Ap(Wc.FtLitElementRedux){};function Vc(t){return t.rootNodes.map(e=>jc(e))}function jc(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>jc(o,t.selected)),count:t.totalResultsCount}}var Yc=y(A());var un=y(k()),fn=y(j()),hn=y(A());var Gc=y(k());var Kc=Gc.css`
1724
+ `}update(e){super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>cr.addContext(o)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};oe.elementDefinitions={};oe.styles=Gl;Ne([(0,Ye.property)()],oe.prototype,"baseUrl",void 0);Ne([(0,Ye.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ne([(0,Ye.property)()],oe.prototype,"uiLocale",void 0);Ne([(0,rt.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ne([(0,rt.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ne([(0,Ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ne([(0,Ye.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ne([(0,Ye.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ne([(0,rt.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ne([(0,rt.jsonProperty)(void 0)],oe.prototype,"session",void 0);var Op=y(j());function Fd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Wo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Wo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Wo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Wo(t,e){try{return Fd(t,e)}catch{return!1}}function Xn(t,e){return!Wo(t,e)}var Bd=y(j(),1);var Ho=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var oo=y(j(),1);var Yl=y(j(),1);function Xl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Yl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Xn,...e??{}})}var Vo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Jl=y(k(),1);var jo=window,Md=jo.ShadowRoot&&(jo.ShadyCSS===void 0||jo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wx=Symbol();var Ql=(t,e)=>{Md?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=jo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Go=class extends Jl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ql(n,e.elementStyles),n}};var Ko=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},oc,ec=Symbol("constructorPrototype"),tc=Symbol("constructorName"),nc=Symbol("exportpartsDebouncer"),rc=Symbol("dynamicDependenciesLoaded"),Ut=class extends Go{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oc]=new Vo(5),this[tc]=this.constructor.name,this[ec]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[tc]&&Object.setPrototypeOf(this,this[ec])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[rc]||(e[rc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[nc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=g=>g!=null&&g.trim().length>0,u=e.filter(p).map(g=>g.trim());if(u.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],x=(c=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...v,...x).filter(p).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let m=[...h.values()].flatMap(g=>u.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};oc=nc;Ko([(0,oo.property)()],Ut.prototype,"exportpartsPrefix",void 0);Ko([Xl([])],Ut.prototype,"exportpartsPrefixes",void 0);Ko([(0,oo.property)()],Ut.prototype,"customStylesheet",void 0);Ko([(0,oo.state)()],Ut.prototype,"useAdoptedStyleSheets",void 0);function no(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ic,ac,sc,Zo=Symbol("internalReduxEventsUnsubscribers"),zt=Symbol("internalStoresUnsubscribers"),dr=Symbol("internalStores"),io=class extends Ut{constructor(){super(...arguments),this[ic]=new Map,this[ac]=new Map,this[sc]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[dr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[dr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[dr].get(e)}addStore(e,o){var n;o=(n=o??(no(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[dr].delete(o)}setupStore(e,o){this[dr].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[dr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[zt].has(e.store):this[zt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[zt].set(e,o.subscribe(()=>this.updateFromStores())),no(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Zo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[zt].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Zo].forEach(e=>e()),this[Zo]=[]}unsubscribeFromStore(e){this[zt].has(e)&&this[zt].get(e)(),this[zt].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};ic=zt,ac=dr,sc=Zo;io.reduxProperties=new Map;io.reduxReactiveProperties=new Set;io.reduxEventListeners=new Map;function Xe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(t){return!!t&&!!t[q]}function ot(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Kd}(t)||Array.isArray(t)||!!t[hc]||!!(!((e=t.constructor)===null||e===void 0)&&e[hc])||ai(t)||si(t))}function pr(t,e,o){o===void 0&&(o=!1),Br(t)===0?(o?Object.keys:Fr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Br(t){var e=t[q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ai(t)?2:si(t)?3:0}function $r(t,e){return Br(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ud(t,e){return Br(t)===2?t.get(e):t[e]}function mc(t,e,o){var n=Br(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function yc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ai(t){return jd&&t instanceof Map}function si(t){return Gd&&t instanceof Set}function Wt(t){return t.o||t.t}function li(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=xc(t);delete e[q];for(var o=Fr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ci(t,e){return e===void 0&&(e=!1),di(t)||Tt(t)||!ot(t)||(Br(t)>1&&(t.set=t.add=t.clear=t.delete=zd),Object.freeze(t),e&&pr(t,function(o,n){return ci(n,!0)},!0)),t}function zd(){Xe(2)}function di(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function mt(t){var e=ii[t];return e||Xe(18,t),e}function Wd(t,e){ii[t]||(ii[t]=e)}function ri(){return so}function Qn(t,e){e&&(mt("Patches"),t.u=[],t.s=[],t.v=e)}function qo(t){oi(t),t.p.forEach(Hd),t.p=null}function oi(t){t===so&&(so=t.l)}function lc(t){return so={p:[],l:so,h:t,m:!0,_:0}}function Hd(t){var e=t[q];e.i===0||e.i===1?e.j():e.g=!0}function Jn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||mt("ES5").S(e,t,n),n?(o[q].P&&(qo(e),Xe(4)),ot(t)&&(t=Yo(e,t),e.l||Xo(e,t)),e.u&&mt("Patches").M(o[q].t,t,e.u,e.s)):t=Yo(e,o,[]),qo(e),e.u&&e.v(e.u,e.s),t!==bc?t:void 0}function Yo(t,e,o){if(di(e))return e;var n=e[q];if(!n)return pr(e,function(c,p){return cc(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Xo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=li(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),pr(a,function(c,p){return cc(t,n,i,c,p,o,s)}),Xo(t,i,!1),o&&t.u&&mt("Patches").N(n,o,t.u,t.s)}return n.o}function cc(t,e,o,n,i,a,s){if(Tt(i)){var c=Yo(t,i,a&&e&&e.i!==3&&!$r(e.R,n)?a.concat(n):void 0);if(mc(o,n,c),!Tt(c))return;t.m=!1}else s&&o.add(i);if(ot(i)&&!di(i)){if(!t.h.D&&t._<1)return;Yo(t,i),e&&e.A.l||Xo(t,i)}}function Xo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ci(e,o)}function ei(t,e){var o=t[q];return(o?Wt(o):t)[e]}function dc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Ht(t){t.P||(t.P=!0,t.l&&Ht(t.l))}function ti(t){t.o||(t.o=li(t.t))}function ni(t,e,o){var n=ai(e)?mt("MapSet").F(e,o):si(e)?mt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:ri(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=lo;s&&(p=[c],u=ao);var h=Proxy.revocable(p,u),m=h.revoke,g=h.proxy;return c.k=g,c.j=m,g}(e,o):mt("ES5").J(e,o);return(o?o.A:ri()).p.push(n),n}function Vd(t){return Tt(t)||Xe(22,t),function e(o){if(!ot(o))return o;var n,i=o[q],a=Br(o);if(i){if(!i.P&&(i.i<4||!mt("ES5").K(i)))return i.t;i.I=!0,n=pc(o,a),i.I=!1}else n=pc(o,a);return pr(n,function(s,c){i&&Ud(i.t,s)===c||mc(n,s,e(c))}),a===3?new Set(n):n}(t)}function pc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return li(t)}function gc(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[q];return lo.get(u,s)},set:function(u){var h=this[q];lo.set(h,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][q];if(!p.P)switch(p.i){case 5:n(p)&&Ht(p);break;case 4:o(p)&&Ht(p)}}}function o(s){for(var c=s.t,p=s.k,u=Fr(p),h=u.length-1;h>=0;h--){var m=u[h];if(m!==q){var g=c[m];if(g===void 0&&!$r(c,m))return!0;var v=p[m],x=v&&v[q];if(x?x.t!==g:!yc(v,g))return!0}}var S=!!c[q];return u.length!==Fr(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&Xe(3,JSON.stringify(Wt(s)))}var a={};Wd("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(m,g){if(m){for(var v=Array(g.length),x=0;x<g.length;x++)Object.defineProperty(v,""+x,t(x,!0));return v}var S=xc(g);delete S[q];for(var L=Fr(S),R=0;R<L.length;R++){var N=L[R];S[N]=t(N,m||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),h={i:p?5:4,A:c?c.A:ri(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,q,{value:h,writable:!0}),u},S:function(s,c,p){p?Tt(c)&&c[q].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var m=h[q];if(m){var g=m.t,v=m.k,x=m.R,S=m.i;if(S===4)pr(v,function(D){D!==q&&(g[D]!==void 0||$r(g,D)?x[D]||u(v[D]):(x[D]=!0,Ht(m)))}),pr(g,function(D){v[D]!==void 0||$r(v,D)||(x[D]=!1,Ht(m))});else if(S===5){if(n(m)&&(Ht(m),x.length=!0),v.length<g.length)for(var L=v.length;L<g.length;L++)x[L]=!1;else for(var R=g.length;R<v.length;R++)x[R]=!0;for(var N=Math.min(v.length,g.length),I=0;I<N;I++)v.hasOwnProperty(I)||(x[I]=!0),x[I]===void 0&&u(v[I])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var uc,so,pi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jd=typeof Map<"u",Gd=typeof Set<"u",fc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bc=pi?Symbol.for("immer-nothing"):((uc={})["immer-nothing"]=!0,uc),hc=pi?Symbol.for("immer-draftable"):"__$immer_draftable",q=pi?Symbol.for("immer-state"):"__$immer_state";var Kd=""+Object.prototype.constructor,Fr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,xc=Object.getOwnPropertyDescriptors||function(t){var e={};return Fr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ii={},lo={get:function(t,e){if(e===q)return t;var o=Wt(t);if(!$r(o,e))return function(i,a,s){var c,p=dc(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!ot(n)?n:n===ei(t.t,e)?(ti(t),t.o[e]=ni(t.A.h,n,t)):n},has:function(t,e){return e in Wt(t)},ownKeys:function(t){return Reflect.ownKeys(Wt(t))},set:function(t,e,o){var n=dc(Wt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=ei(Wt(t),e),a=i?.[q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(yc(o,i)&&(o!==void 0||$r(t.t,e)))return!0;ti(t),Ht(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ei(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ti(t),Ht(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Wt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Xe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Xe(12)}},ao={};pr(lo,function(t,e){ao[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ao.deleteProperty=function(t,e){return ao.set.call(this,t,e,void 0)},ao.set=function(t,e,o){return lo.set.call(this,t[0],e,o,t[0])};var Zd=function(){function t(o){var n=this;this.O=fc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var L=this;S===void 0&&(S=c);for(var R=arguments.length,N=Array(R>1?R-1:0),I=1;I<R;I++)N[I-1]=arguments[I];return p.produce(S,function(D){var $;return($=a).call.apply($,[L,D].concat(N))})}}var u;if(typeof a!="function"&&Xe(6),s!==void 0&&typeof s!="function"&&Xe(7),ot(i)){var h=lc(n),m=ni(n,i,void 0),g=!0;try{u=a(m),g=!1}finally{g?qo(h):oi(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qn(h,s),Jn(S,h)},function(S){throw qo(h),S}):(Qn(h,s),Jn(u,h))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===bc&&(u=void 0),n.D&&ci(u,!0),s){var v=[],x=[];mt("Patches").M(i,u,v,x),s(v,x)}return u}Xe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var h=arguments.length,m=Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(m))})};var s,c,p=n.produce(i,a,function(u,h){s=u,c=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){ot(o)||Xe(8),Tt(o)&&(o=Vd(o));var n=lc(this),i=ni(this,o,void 0);return i[q].C=!0,oi(n),i},e.finishDraft=function(o,n){var i=o&&o[q],a=i.A;return Qn(a,n),Jn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!fc&&Xe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=mt("Patches").$;return Tt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),je=new Zd,qd=je.produce,ev=je.produceWithPatches.bind(je),tv=je.setAutoFreeze.bind(je),rv=je.setUseProxies.bind(je),ov=je.applyPatches.bind(je),nv=je.createDraft.bind(je),iv=je.finishDraft.bind(je),Qo=qd;function Vt(t){"@babel/helpers - typeof";return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(t)}function ui(t,e){if(Vt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Vt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fi(t){var e=ui(t,"string");return Vt(e)==="symbol"?e:String(e)}function hi(t,e,o){return e=fi(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function vc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Jo(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?vc(Object(o),!0).forEach(function(n){hi(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):vc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function ve(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Sc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mi=function(){return Math.random().toString(36).substring(7).split("").join(".")},en={INIT:"@@redux/INIT"+mi(),REPLACE:"@@redux/REPLACE"+mi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mi()}};function Yd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function yi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ve(1));return o(yi)(t,e)}if(typeof t!="function")throw new Error(ve(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function h(){if(p)throw new Error(ve(3));return a}function m(S){if(typeof S!="function")throw new Error(ve(4));if(p)throw new Error(ve(5));var L=!0;return u(),c.push(S),function(){if(L){if(p)throw new Error(ve(6));L=!1,u();var N=c.indexOf(S);c.splice(N,1),s=null}}}function g(S){if(!Yd(S))throw new Error(ve(7));if(typeof S.type>"u")throw new Error(ve(8));if(p)throw new Error(ve(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var L=s=c,R=0;R<L.length;R++){var N=L[R];N()}return S}function v(S){if(typeof S!="function")throw new Error(ve(10));i=S,g({type:en.REPLACE})}function x(){var S,L=m;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ve(11));function I(){N.next&&N.next(h())}I();var D=L(I);return{unsubscribe:D}}},S[Sc]=function(){return this},S}return g({type:en.INIT}),n={dispatch:g,subscribe:m,getState:h,replaceReducer:v},n[Sc]=x,n}function Xd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:en.INIT});if(typeof n>"u")throw new Error(ve(12));if(typeof o(void 0,{type:en.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Oc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{Xd(o)}catch(p){c=p}return function(u,h){if(u===void 0&&(u={}),c)throw c;if(0)var m;for(var g=!1,v={},x=0;x<a.length;x++){var S=a[x],L=o[S],R=u[S],N=L(R,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(ve(14))}v[S]=N,g=g||N!==R}return g=g||a.length!==Object.keys(u).length,g?v:u}}function Mr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Cc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(ve(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=Mr.apply(void 0,c)(i.dispatch),Jo(Jo({},i),{},{dispatch:a})}}}function Ec(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var wc=Ec();wc.withExtraArgument=Ec;var gi=wc;var Tc=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Qd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(h){return p([u,h])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(h){u=[6,h],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ur=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},Jd=Object.defineProperty,ep=Object.defineProperties,tp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,rp=Object.prototype.hasOwnProperty,op=Object.prototype.propertyIsEnumerable,Rc=function(t,e,o){return e in t?Jd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},jt=function(t,e){for(var o in e||(e={}))rp.call(e,o)&&Rc(t,o,e[o]);if(Ac)for(var n=0,i=Ac(e);n<i.length;n++){var o=i[n];op.call(e,o)&&Rc(t,o,e[o])}return t},bi=function(t,e){return ep(t,tp(e))},np=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var ip=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mr:Mr.apply(null,arguments)},Cv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ap(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var sp=function(t){Tc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array),lp=function(t){Tc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array);function Si(t){return ot(t)?Qo(t,function(){}):t}function cp(t){return typeof t=="boolean"}function dp(){return function(e){return pp(e)}}function pp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new sp;if(o&&(cp(o)?c.push(gi):c.push(gi.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var xi=!0;function Pc(t){var e=dp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,h=u===void 0?void 0:u,m=o.enhancers,g=m===void 0?void 0:m,v;if(typeof i=="function")v=i;else if(ap(i))v=Oc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!xi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xi&&x.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Cc.apply(void 0,x),L=Mr;p&&(L=ip(jt({trace:!xi},typeof p=="object"&&p)));var R=new lp(S),N=R;Array.isArray(g)?N=Ur([S],g):typeof g=="function"&&(N=g(R));var I=L.apply(void 0,N);return yi(v,h,I)}function Gt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return jt(jt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Ic(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function up(t){return typeof t=="function"}function fp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Ic(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(up(t))p=function(){return Si(t())};else{var u=Si(t);p=function(){return u}}function h(m,g){m===void 0&&(m=p());var v=Ur([a[g.type]],s.filter(function(x){var S=x.matcher;return S(g)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[c]),v.reduce(function(x,S){if(S)if(Tt(x)){var L=x,R=S(L,g);return R===void 0?x:R}else{if(ot(x))return Qo(x,function(N){return S(N,g)});var R=S(x,g);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},m)}return h.getInitialState=p,h}function hp(t,e){return t+"/"+e}function kc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Si(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(h){var m=n[h],g=hp(e,h),v,x;"reducer"in m?(v=m.reducer,x=m.prepare):v=m,a[h]=v,s[g]=v,c[h]=x?Gt(g,x):Gt(g)});function p(){var h=typeof t.extraReducers=="function"?Ic(t.extraReducers):[t.extraReducers],m=h[0],g=m===void 0?{}:m,v=h[1],x=v===void 0?[]:v,S=h[2],L=S===void 0?void 0:S,R=jt(jt({},g),s);return fp(o,function(N){for(var I in R)N.addCase(I,R[I]);for(var D=0,$=x;D<$.length;D++){var Te=$[D];N.addMatcher(Te.matcher,Te.reducer)}L&&N.addDefaultCase(L)})}var u;return{name:e,reducer:function(h,m){return u||(u=p()),u(h,m)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var mp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=mp[Math.random()*64|0];return e},gp=["name","message","stack","code"],vi=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Nc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),bp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=gp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Rv=function(){function t(e,o,n){var i=Gt(e+"/fulfilled",function(h,m,g,v){return{payload:h,meta:bi(jt({},v||{}),{arg:g,requestId:m,requestStatus:"fulfilled"})}}),a=Gt(e+"/pending",function(h,m,g){return{payload:void 0,meta:bi(jt({},g||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),s=Gt(e+"/rejected",function(h,m,g,v,x){return{payload:v,error:(n&&n.serializeError||bp)(h||"Rejected"),meta:bi(jt({},x||{}),{arg:g,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(m,g,v){var x=n?.idGenerator?n.idGenerator(h):yp(),S=new p,L,R=!1;function N(D){L=D,S.abort()}var I=function(){return np(this,null,function(){var D,$,Te,at,Oe,st,ue;return Qd(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),at=(D=n?.condition)==null?void 0:D.call(n,h,{getState:g,extra:v}),vp(at)?[4,at]:[3,2];case 1:at=f.sent(),f.label=2;case 2:if(at===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Oe=new Promise(function(b,T){return S.signal.addEventListener("abort",function(){return T({name:"AbortError",message:L||"Aborted"})})}),m(a(x,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:x,arg:h},{getState:g,extra:v}))),[4,Promise.race([Oe,Promise.resolve(o(h,{dispatch:m,getState:g,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(b,T){return new vi(b,T)},fulfillWithValue:function(b,T){return new Nc(b,T)}})).then(function(b){if(b instanceof vi)throw b;return b instanceof Nc?i(b.payload,x,h,b.meta):i(b,x,h)})])];case 3:return Te=f.sent(),[3,5];case 4:return st=f.sent(),Te=st instanceof vi?s(null,x,h,st.payload,st.meta):s(st,x,h),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&s.match(Te)&&Te.meta.condition,ue||m(Te),[2,Te]}})})}();return Object.assign(I,{abort:N,requestId:x,arg:h,unwrap:function(){return I.then(xp)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function xp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function vp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var _c="listener",Dc="completed",$c="cancelled",Nv="task-"+$c,Lv="task-"+Dc,Tv=_c+"-"+$c,Pv=_c+"-"+Dc;var Oi="listenerMiddleware";var Iv=Gt(Oi+"/add"),kv=Gt(Oi+"/removeAll"),_v=Gt(Oi+"/remove");var Lc,Dv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Lc||(Lc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Sp=function(t){return function(e){setTimeout(e,t)}},$v=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Sp(10);gc();window.ftReduxStores||(window.ftReduxStores={});var Fc=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(no(a))return a;if(i==null)return;let s=kc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Pc({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ho,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let u=c(...p);return this.reduxStore.dispatch(u),u}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var nn=y(A());var tn=class extends ht{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var rn=class extends ht{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Cp="ft-user-assets",on=nn.FtReduxStore.get({name:Cp,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ci=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new rn,this.savedSearchesService=new tn,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,nn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),on.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),on.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();on.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;on.actions.bookmarks(o)}}},Bc=new Ci;var Ei=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ei;var Mc=y(A()),wi=class{highlightHtml(e,o,n){(0,Mc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new wi;var Uc=y(A());var Ai=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Uc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Ai;(0,zc.customElement)("ft-app-context")(oe);var an=class extends ht{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var Ep=t=>t.request.virtualField===_r.TITLE_ONLY&&t.request.scope===Dr.DOCUMENTS,zr=class t extends Event{constructor(){super(t.eventName)}};zr.eventName="search-context-clear-all-filters";var co=class t{static build(e,o){return new t(wl(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new yt.Debouncer(10),this.searchDebouncer=new yt.Debouncer(100),this.suggestDebouncer=new yt.Debouncer(300),this.service=o??new an}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(_r.TITLE_ONLY),this.store.actions.setRequestScope(Dr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(_r.EVERYWHERE),this.store.actions.setRequestScope(Dr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ep(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new zr)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,yt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,yt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}};var wp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ni=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ri=Symbol("registerInterval");function Ap(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ri]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ri]):this.dispatchEvent(new Ni)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ri,wp([(0,Hc.state)()],o.prototype,"stateManager",void 0),o}var sn=class extends Ap(Wc.FtLitElementRedux){};function Vc(t){return t.rootNodes.map(e=>jc(e))}function jc(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>jc(o,t.selected)),count:t.totalResultsCount}}var Yc=y(A());var un=y(k()),fn=y(j()),hn=y(A());var Gc=y(k());var Kc=Gc.css`
1725
1725
  `;var dn=y(A());var qc=y(j()),Rp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Li=Symbol("i18nAttributes"),ln=Symbol("i18nProperties"),po=Symbol("i18nUnsubs");function pn(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Zl:cr}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[Li])===null||a===void 0||a.forEach((c,p)=>{var u;let h=this.getI18nAttributeValue(p);((u=h?.context)===null||u===void 0?void 0:u.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,h,c)}),(s=this[ln])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Li])===null||a===void 0||a.forEach((c,p)=>{let u=this.getI18nAttributeValue(p);u?.context&&u.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(u.context),this.updateI18nAttributeMessage(p,u,c))}),(s=this[ln])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[ln])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Li])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[po].has(i)||this[po].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[po].forEach(i=>i()),this[po].clear()}}return e=po,Rp([(0,qc.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Zc=class extends pn(dn.FtLitElement){},cn=class extends pn(dn.FtLitElementRedux){};var uo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},nt=class extends cn{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":un.nothing:un.html`
1726
1726
  <span class="ft-i18n">
1727
1727
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}