@fluid-topics/ft-reader-topic-content 2.2.34 → 2.2.36

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.
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var oi=Object.create;var Nr=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var li=Object.getPrototypeOf,ui=Object.prototype.hasOwnProperty;var qe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var di=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ci(t))!ui.call(e,s)&&s!==r&&Nr(e,s,{get:()=>t[s],enumerable:!(n=ai(t,s))||n.enumerable});return e};var h=(e,t,r)=>(r=e!=null?oi(li(e)):{},di(t||!e||!e.__esModule?Nr(r,"default",{value:e,enumerable:!0}):r,e));var S=qe((To,Lr)=>{Lr.exports=ftGlobals.wcUtils});var Y=qe((Ro,Dr)=>{Dr.exports=ftGlobals.lit});var F=qe((No,kr)=>{kr.exports=ftGlobals.litDecorators});var Wt=qe((ko,jr)=>{jr.exports=ftGlobals.litUnsafeHTML});var ni=h(S());var ce=h(Y());var Ir=h(Y()),ge=h(S()),Mr={colorError:ge.FtCssVariableFactory.external(ge.designSystemVariables.colorError,"Design system"),fontFamily:ge.FtCssVariableFactory.external(ge.designSystemVariables.contentFont,"Design system")},Pr=Ir.css`
1
+ "use strict";(()=>{var oi=Object.create;var Nr=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var li=Object.getPrototypeOf,ui=Object.prototype.hasOwnProperty;var We=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var di=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ci(t))!ui.call(e,s)&&s!==r&&Nr(e,s,{get:()=>t[s],enumerable:!(n=ai(t,s))||n.enumerable});return e};var h=(e,t,r)=>(r=e!=null?oi(li(e)):{},di(t||!e||!e.__esModule?Nr(r,"default",{value:e,enumerable:!0}):r,e));var S=We((To,Lr)=>{Lr.exports=ftGlobals.wcUtils});var Y=We((Ro,Mr)=>{Mr.exports=ftGlobals.lit});var F=We((No,kr)=>{kr.exports=ftGlobals.litDecorators});var Wt=We((ko,jr)=>{jr.exports=ftGlobals.litUnsafeHTML});var ni=h(S());var ce=h(Y());var Ir=h(Y()),ge=h(S()),Dr={colorError:ge.FtCssVariableFactory.external(ge.designSystemVariables.colorError,"Design system"),fontFamily:ge.FtCssVariableFactory.external(ge.designSystemVariables.contentFont,"Design system")},Pr=Ir.css`
2
2
  .topic {
3
- font-family: ${Mr.fontFamily};
3
+ font-family: ${Dr.fontFamily};
4
4
  overflow-x: auto;
5
5
  }
6
6
 
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .topic-on-error ft-icon {
13
- color: ${Mr.colorError}
13
+ color: ${Dr.colorError}
14
14
  }
15
15
 
16
16
  .topic-loading {
@@ -25,7 +25,7 @@
25
25
  ft-skeleton {
26
26
  height: 100px;
27
27
  }
28
- `;var Le=h(F()),Je=h(S());var Ae=h(S()),Hr=h(F());var Ur;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found",e.requestedTopicFiltered="requested-topic-filtered"})(Ur||(Ur={}));var Br;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Br||(Br={}));var pi=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},$t=class extends Ae.FtContextRegistrationEvent{constructor(t){super("register-ft-reader-component",t)}},Gt=Symbol("registerInterval"),fi=(0,Ae.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(s){this.clearStateManager(),this.stateManager=s,this.addStore(s.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var s;return(s=this.stateManager)===null||s===void 0?void 0:s.service}connectedCallback(){super.connectedCallback(),this[Gt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Gt]):this.dispatchEvent(new $t({target:this}))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Gt,pi([(0,Hr.state)()],r.prototype,"stateManager",void 0),r}),We=class extends fi(Ae.FtLitElementRedux){};var Ye=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},qt=class extends Je.FtContextRegistrationEvent{constructor(t){super("register-ft-reader-topic-component",t)}},zt=Symbol("registerInterval"),hi=(0,Je.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[zt]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[zt]):this.dispatchEvent(new qt({target:this}))}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=zt,Ye([(0,Le.state)()],r.prototype,"tocNode",void 0),Ye([(0,Le.state)()],r.prototype,"disableContextInteractions",void 0),Ye([(0,Le.state)()],r.prototype,"headingLevelsShift",void 0),Ye([(0,Le.state)()],r.prototype,"headingStartLevel",void 0),r}),Xe=class extends hi(We){};var ti=h(Wt()),O=h(S()),ee=h(F());var zr=h(S());var De=h(Y()),ie=h(F()),Kr=h(S()),Gr=h(Wt());var Qe;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Qe||(Qe={}));var d;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(d||(d={}));var Uo=new Map([...["abw"].map(e=>[e,d.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(e=>[e,d.AUDIO]),...["avi"].map(e=>[e,d.AVI]),...["chm","xhs"].map(e=>[e,d.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(e=>[e,d.CODE]),...["csv"].map(e=>[e,d.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,d.DITA]),...["epub"].map(e=>[e,d.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,d.EXCEL]),...["flac"].map(e=>[e,d.FLAC]),...["gif"].map(e=>[e,d.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,d.GZIP]),...["html","htm","xhtml"].map(e=>[e,d.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(e=>[e,d.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,d.JPEG]),...["json"].map(e=>[e,d.JSON]),...["m4a","m4p"].map(e=>[e,d.M4A]),...["mov","qt"].map(e=>[e,d.MOV]),...["mp3"].map(e=>[e,d.MP3]),...["mp4","m4v"].map(e=>[e,d.MP4]),...["ogg","oga"].map(e=>[e,d.OGG]),...["pdf","ps"].map(e=>[e,d.PDF]),...["png"].map(e=>[e,d.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,d.POWERPOINT]),...["rar"].map(e=>[e,d.RAR]),...["stp"].map(e=>[e,d.STP]),...["txt","rtf","md","mdown"].map(e=>[e,d.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(e=>[e,d.VIDEO]),...["wav"].map(e=>[e,d.WAV]),...["wma"].map(e=>[e,d.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,d.WORD]),...["xml","xsl","rdf"].map(e=>[e,d.XML]),...["yaml","yml","x-yaml"].map(e=>[e,d.YAML]),...["zip"].map(e=>[e,d.ZIP])]);var Bo={[d.ABW]:"#91ABC6",[d.AUDIO]:"#1795E3",[d.AVI]:"#E63324",[d.CHM]:"#71C3EB",[d.CODE]:"#71C3EB",[d.CSV]:"#1F7345",[d.DITA]:"#71C3EB",[d.EPUB]:"#85B926",[d.EXCEL]:"#1F7345",[d.FLAC]:"#1795E3",[d.GIF]:"#59B031",[d.GZIP]:"#F8AB36",[d.HTML]:"#71C3EB",[d.IMAGE]:"#59B031",[d.JPEG]:"#59B031",[d.JSON]:"#71C3EB",[d.M4A]:"#1795E3",[d.MOV]:"#E63324",[d.MP3]:"#1795E3",[d.MP4]:"#E63324",[d.OGG]:"#1795E3",[d.PDF]:"#E44948",[d.PNG]:"#59B031",[d.POWERPOINT]:"#B54A2B",[d.RAR]:"#F8AB36",[d.STP]:"#3764B1",[d.TEXT]:"#3162AB",[d.UNKNOWN]:"#999999",[d.VIDEO]:"#E63324",[d.WAV]:"#1795E3",[d.WMA]:"#1795E3",[d.WORD]:"#3162AB",[d.XML]:"#71C3EB",[d.YAML]:"#71C3EB",[d.ZIP]:"#F8AB36"};var Vr=h(Y()),z=h(S()),te={size:z.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:z.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:z.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:z.FtCssVariableFactory.extend("--ft-icon-material-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:z.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Fr=[Vr.css`
28
+ `;var Le=h(F()),Qe=h(S());var Ae=h(S()),Hr=h(F());var Ur;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found",e.requestedTopicFiltered="requested-topic-filtered"})(Ur||(Ur={}));var Br;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Br||(Br={}));var pi=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},$t=class extends Ae.FtContextRegistrationEvent{constructor(t){super("register-ft-reader-component",t)}},Gt=Symbol("registerInterval"),fi=(0,Ae.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(s){this.clearStateManager(),this.stateManager=s,this.addStore(s.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var s;return(s=this.stateManager)===null||s===void 0?void 0:s.service}connectedCallback(){super.connectedCallback(),this[Gt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Gt]):this.dispatchEvent(new $t({target:this}))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Gt,pi([(0,Hr.state)()],r.prototype,"stateManager",void 0),r}),Ye=class extends fi(Ae.FtLitElementRedux){};var Xe=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},qt=class extends Qe.FtContextRegistrationEvent{constructor(t){super("register-ft-reader-topic-component",t)}},zt=Symbol("registerInterval"),hi=(0,Qe.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[zt]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[zt]):this.dispatchEvent(new qt({target:this}))}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=zt,Xe([(0,Le.state)()],r.prototype,"tocNode",void 0),Xe([(0,Le.state)()],r.prototype,"disableContextInteractions",void 0),Xe([(0,Le.state)()],r.prototype,"headingLevelsShift",void 0),Xe([(0,Le.state)()],r.prototype,"headingStartLevel",void 0),r}),Je=class extends hi(Ye){};var ti=h(Wt()),O=h(S()),ee=h(F());var zr=h(S());var Me=h(Y()),ie=h(F()),Kr=h(S()),Gr=h(Wt());var Ze;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Ze||(Ze={}));var d;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(d||(d={}));var Uo=new Map([...["abw"].map(e=>[e,d.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(e=>[e,d.AUDIO]),...["avi"].map(e=>[e,d.AVI]),...["chm","xhs"].map(e=>[e,d.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(e=>[e,d.CODE]),...["csv"].map(e=>[e,d.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,d.DITA]),...["epub"].map(e=>[e,d.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,d.EXCEL]),...["flac"].map(e=>[e,d.FLAC]),...["gif"].map(e=>[e,d.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,d.GZIP]),...["html","htm","xhtml"].map(e=>[e,d.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(e=>[e,d.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,d.JPEG]),...["json"].map(e=>[e,d.JSON]),...["m4a","m4p"].map(e=>[e,d.M4A]),...["mov","qt"].map(e=>[e,d.MOV]),...["mp3"].map(e=>[e,d.MP3]),...["mp4","m4v"].map(e=>[e,d.MP4]),...["ogg","oga"].map(e=>[e,d.OGG]),...["pdf","ps"].map(e=>[e,d.PDF]),...["png"].map(e=>[e,d.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,d.POWERPOINT]),...["rar"].map(e=>[e,d.RAR]),...["stp"].map(e=>[e,d.STP]),...["txt","rtf","md","mdown"].map(e=>[e,d.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(e=>[e,d.VIDEO]),...["wav"].map(e=>[e,d.WAV]),...["wma"].map(e=>[e,d.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,d.WORD]),...["xml","xsl","rdf"].map(e=>[e,d.XML]),...["yaml","yml","x-yaml"].map(e=>[e,d.YAML]),...["zip"].map(e=>[e,d.ZIP])]);var Bo={[d.ABW]:"#91ABC6",[d.AUDIO]:"#1795E3",[d.AVI]:"#E63324",[d.CHM]:"#71C3EB",[d.CODE]:"#71C3EB",[d.CSV]:"#1F7345",[d.DITA]:"#71C3EB",[d.EPUB]:"#85B926",[d.EXCEL]:"#1F7345",[d.FLAC]:"#1795E3",[d.GIF]:"#59B031",[d.GZIP]:"#F8AB36",[d.HTML]:"#71C3EB",[d.IMAGE]:"#59B031",[d.JPEG]:"#59B031",[d.JSON]:"#71C3EB",[d.M4A]:"#1795E3",[d.MOV]:"#E63324",[d.MP3]:"#1795E3",[d.MP4]:"#E63324",[d.OGG]:"#1795E3",[d.PDF]:"#E44948",[d.PNG]:"#59B031",[d.POWERPOINT]:"#B54A2B",[d.RAR]:"#F8AB36",[d.STP]:"#3764B1",[d.TEXT]:"#3162AB",[d.UNKNOWN]:"#999999",[d.VIDEO]:"#E63324",[d.WAV]:"#1795E3",[d.WMA]:"#1795E3",[d.WORD]:"#3162AB",[d.XML]:"#71C3EB",[d.YAML]:"#71C3EB",[d.ZIP]:"#F8AB36"};var Vr=h(Y()),z=h(S()),te={size:z.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:z.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:z.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:z.FtCssVariableFactory.extend("--ft-icon-material-font-family","",z.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:z.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Fr=[Vr.css`
29
29
  :host, i.ft-icon {
30
30
  display: inline-flex;
31
31
  align-items: center;
@@ -73,20 +73,20 @@
73
73
  .ft-icon--material {
74
74
  font-family: ${te.materialFontFamily}, "Material Icons", sans-serif;
75
75
  }
76
- `,z.noTextSelect];var se;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(se||(se={}));var Me=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},q=class extends Kr.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=De.nothing}render(){let t=this.variant&&Object.values(se).includes(this.variant)?this.variant:se.fluid_topics,r=t!==se.material||!!this.value;return De.html`
76
+ `,z.noTextSelect];var se;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(se||(se={}));var De=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},q=class extends Kr.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Me.nothing}render(){let t=this.variant&&Object.values(se).includes(this.variant)?this.variant:se.fluid_topics,r=t!==se.material||!!this.value;return Me.html`
77
77
  <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
78
78
  ${(0,Gr.unsafeHTML)(this.resolvedIcon)}
79
79
  <slot ?hidden=${r}></slot>
80
80
  </i>
81
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case se.file_format:this.resolvedIcon=(t=d[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case se.material:this.resolvedIcon=this.value||De.nothing;break;default:this.resolvedIcon=(r=Qe[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};q.elementDefinitions={};q.styles=Fr;Me([(0,ie.property)()],q.prototype,"variant",void 0);Me([(0,ie.property)()],q.prototype,"value",void 0);Me([(0,ie.property)({reflect:!0,attribute:"aria-hidden"})],q.prototype,"ariaHidden",void 0);Me([(0,ie.state)()],q.prototype,"resolvedIcon",void 0);Me([(0,ie.query)("slot")],q.prototype,"slottedContent",void 0);var $r={"ft-icon":q};(0,zr.customElements)($r);var yr=h(F());var qr=h(F(),1);var Yt=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},mi=e=>({fromAttribute:t=>{if(t==null)return Ie(e);try{return JSON.parse(t)}catch{return Ie(e)}},toAttribute:t=>JSON.stringify(t)});function Wr(e,t){return(0,qr.property)({type:Object,converter:mi(e),hasChanged:Pe,...t??{}})}function yi(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Se(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Se(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Se(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Se(e,t){try{return yi(e,t)}catch{return!1}}function Pe(e,t){return!Se(e,t)}function Ie(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ze(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Yr=h(F(),1);var Xt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Pe,attribute:!1,...t};(0,Yr.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var et=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var le=h(F(),1);var tt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var nt=h(Y(),1);var rt=class extends nt.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,nt.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Yt(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xr(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var xe=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},en,Jr=Symbol("constructorPrototype"),Qr=Symbol("constructorName"),tn=Symbol("exportpartsDebouncer"),Zr=Symbol("dynamicDependenciesLoaded"),ve=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ve.eventName="exportparts-updated";var X=class extends rt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[en]=new tt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[tn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qr]=this.constructor.name,this[Jr]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qr]&&Object.setPrototypeOf(this,this[Jr])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Zr]||(r[Zr]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ve.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ve.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ve)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Xr(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let A=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],_=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(g=>g.split(":")[1]))!==null&&a!==void 0?a:[],R=[...A,..._].filter(c).map(g=>g.trim());for(let g of R)u.add(g)}if(u.size===0){this.exportparts=void 0;return}let f=[...u.values()].flatMap(p=>l.map(A=>`${p}:${A}--${p}`));this.exportparts=[...this.part,...f].join(", ")}};en=tn;xe([(0,le.property)()],X.prototype,"exportpartsPrefix",void 0);xe([Wr([])],X.prototype,"exportpartsPrefixes",void 0);xe([(0,le.property)({reflect:!0})],X.prototype,"exportparts",void 0);xe([(0,le.property)()],X.prototype,"customStylesheet",void 0);xe([(0,le.property)()],X.prototype,"elementToFocus",void 0);xe([(0,le.state)()],X.prototype,"useAdoptedStyleSheets",void 0);function st(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ke=Symbol("internalReduxEventsUnsubscribers"),oe=Symbol("internalStoresUnsubscribers"),ue=Symbol("internalStores"),Ei=Ze(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ue].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ue].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ue].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ue].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ue].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[oe].has(o.store):this[oe].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[oe].set(o,a.subscribe(()=>this.updateFromStores())),this[ke].set(o,[]),st(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,f)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(f)&&console.warn("Element",this,"is subscribed to deprecated key",f,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,f)=>{if(typeof this[f]=="function"&&(!u.store||a.name===u.store)){let p=A=>this[f](A);a.addEventListener(u.eventName,p),this[ke].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[oe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[oe].has(o)&&this[oe].get(o)(),this[oe].delete(o),(a=this[ke].get(o))===null||a===void 0||a.forEach(c=>c()),this[ke].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=oe,r=ue,n=ke,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),rn=class extends Ei(X){};function L(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var gi=typeof Symbol=="function"&&Symbol.observable||"@@observable",nn=gi,Jt=()=>Math.random().toString(36).substring(7).split("").join("."),Ai={INIT:`@@redux/INIT${Jt()}`,REPLACE:`@@redux/REPLACE${Jt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jt()}`},it=Ai;function ot(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Qt(e,t,r){if(typeof e!="function")throw new Error(L(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(L(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(L(1));return r(Qt)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((g,w)=>{o.set(w,g)}))}function u(){if(c)throw new Error(L(3));return s}function f(g){if(typeof g!="function")throw new Error(L(4));if(c)throw new Error(L(5));let w=!0;l();let B=a++;return o.set(B,g),function(){if(w){if(c)throw new Error(L(6));w=!1,l(),o.delete(B),i=null}}}function p(g){if(!ot(g))throw new Error(L(7));if(typeof g.type>"u")throw new Error(L(8));if(typeof g.type!="string")throw new Error(L(17));if(c)throw new Error(L(9));try{c=!0,s=n(s,g)}finally{c=!1}return(i=o).forEach(B=>{B()}),g}function A(g){if(typeof g!="function")throw new Error(L(10));n=g,p({type:it.REPLACE})}function _(){let g=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(L(11));function B(){let E=w;E.next&&E.next(u())}return B(),{unsubscribe:g(B)}},[nn](){return this}}}return p({type:it.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:A,[nn]:_}}function Si(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:it.INIT})>"u")throw new Error(L(12));if(typeof r(void 0,{type:it.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(L(13))})}function Zt(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{Si(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let f=0;f<n.length;f++){let p=n[f],A=r[p],_=a[p],R=A(_,c);if(typeof R>"u"){let g=c&&c.type;throw new Error(L(14))}u[p]=R,l=l||R!==_}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ue(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(L(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ue(...a)(s.dispatch),{...s,dispatch:i}}}function on(e){return ot(e)&&"type"in e&&typeof e.type=="string"}var mn=Symbol.for("immer-nothing"),an=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function W(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var H=Object,be=H.getPrototypeOf,ut="constructor",yt="prototype",nr="configurable",dt="enumerable",ct="writable",Be="value",J=e=>!!e&&!!e[I];function j(e){return e?yn(e)||gt(e)||!!e[an]||!!e[ut]?.[an]||At(e)||St(e):!1}var vi=H[yt][ut].toString(),cn=new WeakMap;function yn(e){if(!e||!dr(e))return!1;let t=be(e);if(t===null||t===H[yt])return!0;let r=H.hasOwnProperty.call(t,ut)&&t[ut];if(r===Object)return!0;if(!_e(r))return!1;let n=cn.get(r);return n===void 0&&(n=Function.toString.call(r),cn.set(r,n)),n===vi}function Et(e,t,r=!0){Ve(e)===0?(r?Reflect.ownKeys(e):H.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ve(e){let t=e[I];return t?t.type_:gt(e)?1:At(e)?2:St(e)?3:0}var er=(e,t,r=Ve(e))=>r===2?e.has(t):H[yt].hasOwnProperty.call(e,t),sr=(e,t,r=Ve(e))=>r===2?e.get(t):e[t],pt=(e,t,r,n=Ve(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function xi(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var gt=Array.isArray,At=e=>e instanceof Map,St=e=>e instanceof Set,dr=e=>typeof e=="object",_e=e=>typeof e=="function",tr=e=>typeof e=="boolean";function _i(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var re=e=>e.copy_||e.base_;var pr=e=>e.modified_?e.copy_:e.base_;function ir(e,t){if(At(e))return new Map(e);if(St(e))return new Set(e);if(gt(e))return Array[yt].slice.call(e);let r=yn(e);if(t===!0||t==="class_only"&&!r){let n=H.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[ct]===!1&&(a[ct]=!0,a[nr]=!0),(a.get||a.set)&&(n[o]={[nr]:!0,[ct]:!0,[dt]:a[dt],[Be]:e[o]})}return H.create(be(e),n)}else{let n=be(e);if(n!==null&&r)return{...e};let s=H.create(n);return H.assign(s,e)}}function vt(e,t=!1){return xt(e)||J(e)||!j(e)||(Ve(e)>1&&H.defineProperties(e,{set:at,add:at,clear:at,delete:at}),H.freeze(e),t&&Et(e,(r,n)=>{vt(n,!0)},!1)),e}function bi(){W(2)}var at={[Be]:bi};function xt(e){return e===null||!dr(e)?!0:H.isFrozen(e)}var ft="MapSet",or="Patches",ln="ArrayMethods",En={};function de(e){let t=En[e];return t||W(0,e),t}var un=e=>!!En[e];var He,gn=()=>He,Ci=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:un(ft)?de(ft):void 0,arrayMethodsPlugin_:un(ln)?de(ln):void 0});function dn(e,t){t&&(e.patchPlugin_=de(or),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ar(e){cr(e),e.drafts_.forEach(Oi),e.drafts_=null}function cr(e){e===He&&(He=e.parent_)}var pn=e=>He=Ci(He,e);function Oi(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(ar(t),W(4)),j(e)&&(e=hn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=hn(t,r);return Ti(t,e,!0),ar(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mn?e:void 0}function hn(e,t){if(xt(t))return t;let r=t[I];if(!r)return ht(t,e.handledSet_,e);if(!_t(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vn(r,e)}return r.copy_}function Ti(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vt(t,r)}function An(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _t=(e,t)=>e.scope_===t,Ri=[];function Sn(e,t,r,n){let s=re(e),i=e.type_;if(n!==void 0&&sr(s,n,i)===t){pt(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Et(s,(c,l)=>{if(J(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Ri;for(let a of o)pt(s,a,r,i)}function wi(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!_t(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=pr(i);Sn(e,i.draft_??i,o,r),vn(i,s)})}function vn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}An(e)}}function Ni(e,t,r){let{scope_:n}=e;if(J(r)){let s=r[I];_t(s,n)&&s.callbacks_.push(function(){lt(e);let o=pr(s);Sn(e,r,o,t)})}else j(r)&&e.callbacks_.push(function(){let i=re(e);e.type_===3?i.has(r)&&ht(r,n.handledSet_,n):sr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ht(sr(e.copy_,t,e.type_),n.handledSet_,n)})}function ht(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||J(e)||t.has(e)||!j(e)||xt(e)||(t.add(e),Et(e,(n,s)=>{if(J(s)){let i=s[I];if(_t(i,r)){let o=pr(i);pt(e,n,o,e.type_),An(i)}}else j(s)&&ht(s,t,r)})),e}function Li(e,t){let r=gt(e),n={type_:r?1:0,scope_:t?t.scope_:gn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=mt;r&&(s=[n],i=je);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var mt={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=re(e);if(!er(s,t,e.type_))return Mi(e,s,t);let i=s[t];if(e.finalized_||!j(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&_i(t))return i;if(i===rr(e.base_,t)||Di(e,t,i)){lt(e);let o=e.type_===1?+t:t,a=ur(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in re(e)},ownKeys(e){return Reflect.ownKeys(re(e))},set(e,t,r){let n=xn(re(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=rr(re(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(xi(r,s)&&(r!==void 0||er(e.base_,t,e.type_)))return!0;lt(e),lr(e)}return e.copy_[t]===r&&(r!==void 0||er(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ni(e,t,r)),!0},deleteProperty(e,t){return lt(e),rr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),lr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=re(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ct]:!0,[nr]:e.type_!==1||t!=="length",[dt]:n[dt],[Be]:r[t]}},defineProperty(){W(11)},getPrototypeOf(e){return be(e.base_)},setPrototypeOf(){W(12)}},je={};for(let e in mt){let t=mt[e];je[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}je.deleteProperty=function(e,t){return je.set.call(this,e,t,void 0)};je.set=function(e,t,r){return mt.set.call(this,e[0],t,r,e[0])};function rr(e,t){let r=e[I];return(r?re(r):e)[t]}function Di(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!j(r)||r[I]?!1:e.baseRefs_.has(r)}function Mi(e,t,r){let n=xn(t,r);return n?Be in n?n[Be]:n.get?.call(e.draft_):void 0}function xn(e,t){if(!(t in e))return;let r=be(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=be(r)}}function lr(e){e.modified_||(e.modified_=!0,e.parent_&&lr(e.parent_))}function lt(e){e.copy_||(e.assigned_=new Map,e.copy_=ir(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ii=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(_e(t)&&!_e(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}_e(r)||W(6),n!==void 0&&!_e(n)&&W(7);let s;if(j(t)){let i=pn(this),o=ur(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?ar(i):cr(i)}return dn(i,n),fn(s,i)}else if(!t||!dr(t)){if(s=r(t),s===void 0&&(s=t),s===mn&&(s=void 0),this.autoFreeze_&&vt(s,!0),n){let i=[],o=[];de(or).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else W(1,t)},this.produceWithPatches=(t,r)=>{if(_e(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},tr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),tr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),tr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){j(e)||W(8),J(e)&&(e=_n(e));let t=pn(this),r=ur(t,e,void 0);return r[I].isManual_=!0,cr(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&W(9);let{scope_:n}=r;return dn(n,t),fn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=de(or).applyPatches_;return J(e)?n(e,t):this.produce(e,s=>n(s,t))}};function ur(e,t,r,n){let[s,i]=At(t)?de(ft).proxyMap_(t,r):St(t)?de(ft).proxySet_(t,r):Li(t,r);return(r?.scope_??gn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?wi(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function _n(e){return J(e)||W(10,e),bn(e)}function bn(e){if(!j(e)||xt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ir(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ir(e,!0);return Et(r,(s,i)=>{pt(r,s,bn(i))},n),t&&(t.finalized_=!1),r}var Pi=globalThis.Iterator,ga=typeof Pi?.from=="function";var ki=new Ii,fr=ki.produce;function Cn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var On=Cn(),Tn=Cn;var Ui=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ue:Ue.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Bi=e=>e&&typeof e.match=="function";function ae(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(Q(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>on(n)&&n.type===e,r}var Dn=class Fe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Fe.prototype)}static get[Symbol.species](){return Fe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Fe(...t[0].concat(this)):new Fe(...t.concat(this))}};function Rn(e){return j(e)?fr(e,()=>{}):e}function bt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Hi(e){return typeof e=="boolean"}var ji=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Dn;return r&&(Hi(r)?o.push(On):o.push(Tn(r.extraArgument))),o},Vi="RTK_autoBatch";var wn=e=>t=>{setTimeout(t,e)},Fi=(e,t)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=e(o),i=setTimeout(o,t)},Ki=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Fi(window.requestAnimationFrame,100):wn(10):e.type==="callback"?e.queueNotification:wn(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let f=()=>s&&u(),p=n.subscribe(f);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vi],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Gi=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Dn(e);return n&&s.push(Ki(typeof n=="object"?n:void 0)),s};function Mn(e){let t=ji(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(ot(r))c=Zt(r);else throw new Error(Q(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ue;s&&(u=Ui({trace:!1,...typeof s=="object"&&s}));let f=sn(...l),p=Gi(f),A=typeof a=="function"?a(p):p(),_=u(...A);return Qt(c,o,_)}function In(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Q(28));if(a in t)throw new Error(Q(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function $i(e){return typeof e=="function"}function zi(e,t){let[r,n,s]=In(t),i;if($i(e))i=()=>Rn(e());else{let a=Rn(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,f)=>{if(f)if(J(u)){let p=f(u,c);return p===void 0?u:p}else{if(j(u))return fr(u,p=>f(p,c));{let p=f(u,c);if(p===void 0){if(u===null)return u;throw new Error(Q(9))}return p}}return u},a)}return o.getInitialState=i,o}var qi=(e,t)=>Bi(e)?e.match(t):e(t);function Wi(...e){return t=>e.some(r=>qi(r,t))}var Yi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=(e=21)=>{let t="",r=e;for(;r--;)t+=Yi[Math.random()*64|0];return t},Ji=["name","message","stack","code"],hr=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Nn=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Qi=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ji)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Ln="External signal was aborted",Zi=(()=>{function e(t,r,n){let s=ae(t+"/fulfilled",(c,l,u,f)=>({payload:c,meta:{...f||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ae(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ae(t+"/rejected",(c,l,u,f,p)=>({payload:f,error:(n&&n.serializeError||Qi)(c||"Rejected"),meta:{...p||{},arg:u,requestId:l,rejectedWithValue:f!==void 0,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,f,p)=>{let A=n?.idGenerator?n.idGenerator(c):Xi(),_=new AbortController,R,g;function w(y){g=y,_.abort()}l&&(l.aborted?w(Ln):l.addEventListener("abort",()=>w(Ln),{once:!0}));let B=(async function(){let y;try{let E=n?.condition?.(c,{getState:f,extra:p});if(to(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(_.signal.aborted)throw{name:"AbortError",message:g||"Aborted"};let N=new Promise((b,M)=>{R=()=>{M({name:"AbortError",message:g||"Aborted"})},_.signal.addEventListener("abort",R,{once:!0})});u(i(A,c,n?.getPendingMeta?.({requestId:A,arg:c},{getState:f,extra:p}))),y=await Promise.race([N,Promise.resolve(r(c,{dispatch:u,getState:f,extra:p,requestId:A,signal:_.signal,abort:w,rejectWithValue:((b,M)=>new hr(b,M)),fulfillWithValue:((b,M)=>new Nn(b,M))})).then(b=>{if(b instanceof hr)throw b;return b instanceof Nn?s(b.payload,A,c,b.meta):s(b,A,c)})])}catch(E){y=E instanceof hr?o(null,A,c,E.payload,E.meta):o(E,A,c)}finally{R&&_.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&o.match(y)&&y.meta.condition||u(y),y})();return Object.assign(B,{abort:w,requestId:A,arg:c,unwrap(){return B.then(eo)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Wi(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function eo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function to(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pn=Symbol.for("rtk-slice-createasyncthunk"),Oa={[Pn]:Zi};function ro(e,t){return`${e}/${t}`}function no({creators:e}={}){let t=e?.asyncThunk?.[Pn];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(Q(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(io()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(y,E){let N=typeof y=="string"?y:y.type;if(!N)throw new Error(Q(12));if(N in c.sliceCaseReducersByType)throw new Error(Q(13));return c.sliceCaseReducersByType[N]=E,l},addMatcher(y,E){return c.sliceMatchers.push({matcher:y,reducer:E}),l},exposeAction(y,E){return c.actionCreators[y]=E,l},exposeCaseReducer(y,E){return c.sliceCaseReducersByName[y]=E,l}};a.forEach(y=>{let E=o[y],N={reducerName:y,type:ro(s,y),createNotation:typeof n.reducers=="function"};ao(E)?lo(N,E,l,t):oo(N,E,l)});function u(){let[y={},E=[],N=void 0]=typeof n.extraReducers=="function"?In(n.extraReducers):[n.extraReducers],b={...y,...c.sliceCaseReducersByType};return zi(n.initialState,M=>{for(let P in b)M.addCase(P,b[P]);for(let P of c.sliceMatchers)M.addMatcher(P.matcher,P.reducer);for(let P of E)M.addMatcher(P.matcher,P.reducer);N&&M.addDefaultCase(N)})}let f=y=>y,p=new Map,A=new WeakMap,_;function R(y,E){return _||(_=u()),_(y,E)}function g(){return _||(_=u()),_.getInitialState()}function w(y,E=!1){function N(M){let P=M[y];return typeof P>"u"&&E&&(P=bt(A,N,g)),P}function b(M=f){return bt(bt(p,E,()=>new WeakMap),M,()=>{let P={};for(let[si,ii]of Object.entries(n.selectors??{}))P[si]=so(ii,M,()=>bt(A,M,g),E);return P})}return{reducerPath:y,getSelectors:b,get selectors(){return b(N)},selectSlice:N}}let B={name:s,reducer:R,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:g,...w(i),injectInto(y,{reducerPath:E,...N}={}){let b=E??i;return y.inject({reducerPath:b,reducer:R},N),{...B,...w(b,!0)}}};return B}}function so(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var kn=no();function io(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function oo({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!co(n))throw new Error(Q(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?ae(e,o):ae(e))}function ao(e){return e._reducerDefinitionType==="asyncThunk"}function co(e){return e._reducerDefinitionType==="reducerWithPrepare"}function lo({type:e,reducerName:t},r,n,s){if(!s)throw new Error(Q(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,f=s(e,i,u);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),a&&n.addCase(f.pending,a),c&&n.addCase(f.rejected,c),l&&n.addMatcher(f.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Ct,pending:a||Ct,rejected:c||Ct,settled:l||Ct})}function Ct(){}var Un="listener",Bn="completed",Hn="cancelled",Ta=`task-${Hn}`,Ra=`task-${Bn}`,wa=`${Un}-${Hn}`,Na=`${Un}-${Bn}`;var{assign:jn}=Object;var mr="listenerMiddleware";var uo=jn(ae(`${mr}/add`),{withTypes:()=>uo}),La=ae(`${mr}/removeAll`),po=jn(ae(`${mr}/remove`),{withTypes:()=>po});function Q(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fo=Ze(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Ot=class extends fo(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vn=class e extends Ot{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(st(i))return i;if(s==null)return;let o=kn({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Mn({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ie(o.getInitialState());for(let f of l.keeping)u[f]=(c??u)[f];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus,s.deprecatedKeys)}constructor(t,r,n,s){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new et,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...f)=>{let p=u(...f.map(i));return this.reduxStore.dispatch(p),p}:f=>{let p=l,A=this.getState()[p];Se(A,f)||this.setState({[p]:i(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Tt=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Rt=h(S()),ho="ft-app-info",pe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};pe.eventName="authentication-change";var Ke=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ke.eventName="ui-locale-changed";var mo={session:(e,t)=>{(0,Rt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new pe(t.payload)),0))}},m=Rt.FtReduxStore.get({name:ho,reducers:mo,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Fn=h(S()),wt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ac=(0,Fn.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Tt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wt([(0,yr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wt([(0,yr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wt([Xt({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),wt([Xt({store:m.name})],t.prototype,"uiLocale",void 0),t});var Kn;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Kn||(Kn={}));var Gn;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Gn||(Gn={}));var $n;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})($n||($n={}));var zn;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(zn||(zn={}));var qn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(qn||(qn={}));var Wn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Wn||(Wn={}));var Yn;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Yn||(Yn={}));var Xn;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Xn||(Xn={}));var Jn;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Jn||(Jn={}));var Qn;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Qn||(Qn={}));var Zn;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(Zn||(Zn={}));var es;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(es||(es={}));var ts;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ts||(ts={}));var rs;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rs||(rs={}));var ns;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ns||(ns={}));var ss;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ss||(ss={}));var is;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(is||(is={}));var os;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(os||(os={}));var as;(function(e){e.ASC="ASC",e.DESC="DESC"})(as||(as={}));var cs;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(cs||(cs={}));var ls;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ls||(ls={}));var us;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(us||(us={}));var ds;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ds||(ds={}));var ps;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ps||(ps={}));var fs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(hs||(hs={}));var ms;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ms||(ms={}));var ys;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ys||(ys={}));var C;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(C||(C={}));var K;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(K||(K={}));var Es;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Es||(Es={}));var gs;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(gs||(gs={}));var As;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(As||(As={}));var Ss;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ss||(Ss={}));var vs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(vs||(vs={}));var xs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(xs||(xs={}));var _s;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_s||(_s={}));var bs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(bs||(bs={}));var Cs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Cs||(Cs={}));var Os;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Os||(Os={}));var Ts;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Ts||(Ts={}));var Rs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Rs||(Rs={}));var yo={[C.PERSONAL_BOOK_SHARE_USER]:[C.PERSONAL_BOOK_USER],[C.HTML_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.PDF_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.KHUB_ADMIN]:[C.CONTENT_PUBLISHER],[C.ADMIN]:[C.KHUB_ADMIN,C.USERS_ADMIN,C.PORTAL_ADMIN,C.BEHAVIOR_DATA_USER],[C.GENERATIVE_AI_EXPORT_USER]:[C.GENERATIVE_AI_USER]};function ws(e,t){return e===t||(yo[e]??[]).some(r=>ws(r,t))}function Er(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ws(n,t))}function Ns(e,...t){return e==null?!1:t.some(r=>Er(e,r))}var It=h(S());var gr=h(S());var fe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Ce=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:fe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):fe.await()}};var V=class extends Ce{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new gr.CacheRegistry,this.cache=t?s.commonCache:new gr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Nt=class extends V{async listMySearches(){let{session:t}=m.getState();return Er(t,C.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lt=class extends V{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Dt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Mt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Eo="ft-user-assets",go={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(K).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Sr(e,r,[...Ar(e,r),s]),Ls(e,r,1,n),Ds(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Sr(e,r,Ar(e,r).map(s=>s.id===n.id?n:s)),Ds(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Sr(e,r,Ar(e,r).filter(i=>i.id!==s)),Ls(e,r,-1,n)}},Ms={[K.SEARCHES]:"savedSearches",[K.BOOKMARKS]:"bookmarks",[K.BOOKS]:void 0,[K.COLLECTIONS]:void 0},Ar=(e,t)=>{var r;let n=Ms[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Sr=(e,t,r)=>{let n=Ms[t];n&&(e[n]=r)},Ls=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===K.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Ds=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=It.FtReduxStore.get({name:Eo,reducers:go,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(K).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vr=class{constructor(t=new Dt,r=new Mt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lt,this.savedSearchesService=new Nt,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,It.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===K.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},Ao=new vr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ao);var xr=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new xr;var G=h(S());var Is,Oe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},So=Symbol("clearAfterUnitTest"),Pt=class extends(0,G.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Is]=()=>{this.defaultMessages={},this.cache=new G.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,G.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new G.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof G.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Oe({loadedContexts:t})),this.dispatchEvent(new Oe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Oe({loadedContexts:[t]})),this.dispatchEvent(new Oe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,G.delay)(0).then(()=>n()).catch(()=>null)))}};Is=So;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Te=window.FluidTopicsI18nService,kt=window.FluidTopicsCustomI18nService;var Ps=h(S()),_r=class{highlightHtml(t,r,n){(0,Ps.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new _r;var ks=h(S());var br=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return ks.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new br;var Us=h(S());var Ge=class{static get(t,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new Us.SearchPlaceConverter(n,t??20,s?.allLanguagesAllowed,r,i)}};var Cr=class{urlToSearchRequest(t){return Ge.get().parse(t)}searchRequestToUrl(t){return Ge.get().serialize(t)}};window.FluidTopicsUrlService=new Cr;var ne=h(S());var he=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};he.eventName="before-location-change";var me=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};me.eventName="change";var Or=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Bs=new Or;var Ut=class e extends ne.WithEventBus{static build(){return new e(window.history,Bs,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ne.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new me(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new he(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(he.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(he.eventName,t)}addHistoryChangeListener(t){this.addEventListener(me.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(me.eventName,t)}currentItem(){return(0,ne.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ne.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ne.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ne.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ut.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Hs=h(Y());var js=Hs.css`
82
- `;var Ks=h(Y()),U=h(F()),Ee=h(S());var Z=h(S());function Vs(e,t){let{authenticationRequired:r,session:n}=m.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Bt=class extends Ce{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Tr=class e extends Z.FtStateManager{static build(t){return new e(m,t)}constructor(t,r){super(),this.store=t,this.cache=new Z.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bt,this.knownContexts=new Z.AbstractRegistry,this.knownCustomComponents=new Z.AbstractRegistry,this.cleanSessionDebouncer=new Z.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Z.Debouncer(500),this.apiProvider=r??(()=>fe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(pe.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(pe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Vs(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ke(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Ns(m.getState().session,...t)}},Fs=Tr.build();var ye=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var $e=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new ye(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var T=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},v=class extends Ee.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Fs,this.contextRoot=new $e}render(){return Ks.html`
81
+ `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case se.file_format:this.resolvedIcon=(t=d[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case se.material:this.resolvedIcon=this.value||Me.nothing;break;default:this.resolvedIcon=(r=Ze[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};q.elementDefinitions={};q.styles=Fr;De([(0,ie.property)()],q.prototype,"variant",void 0);De([(0,ie.property)()],q.prototype,"value",void 0);De([(0,ie.property)({reflect:!0,attribute:"aria-hidden"})],q.prototype,"ariaHidden",void 0);De([(0,ie.state)()],q.prototype,"resolvedIcon",void 0);De([(0,ie.query)("slot")],q.prototype,"slottedContent",void 0);var $r={"ft-icon":q};(0,zr.customElements)($r);var yr=h(F());var qr=h(F(),1);var Yt=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},mi=e=>({fromAttribute:t=>{if(t==null)return Ie(e);try{return JSON.parse(t)}catch{return Ie(e)}},toAttribute:t=>JSON.stringify(t)});function Wr(e,t){return(0,qr.property)({type:Object,converter:mi(e),hasChanged:Pe,...t??{}})}function yi(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Se(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Se(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Se(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Se(e,t){try{return yi(e,t)}catch{return!1}}function Pe(e,t){return!Se(e,t)}function Ie(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function et(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Yr=h(F(),1);var Xt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Pe,attribute:!1,...t};(0,Yr.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var tt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var le=h(F(),1);var rt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var st=h(Y(),1);var nt=class extends st.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,st.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Yt(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xr(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var xe=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},en,Jr=Symbol("constructorPrototype"),Qr=Symbol("constructorName"),tn=Symbol("exportpartsDebouncer"),Zr=Symbol("dynamicDependenciesLoaded"),ve=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ve.eventName="exportparts-updated";var X=class extends nt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[en]=new rt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[tn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qr]=this.constructor.name,this[Jr]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qr]&&Object.setPrototypeOf(this,this[Jr])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Zr]||(r[Zr]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ve.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ve.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ve)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Xr(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let A=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],_=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(g=>g.split(":")[1]))!==null&&a!==void 0?a:[],R=[...A,..._].filter(c).map(g=>g.trim());for(let g of R)u.add(g)}if(u.size===0){this.exportparts=void 0;return}let f=[...u.values()].flatMap(p=>l.map(A=>`${p}:${A}--${p}`));this.exportparts=[...this.part,...f].join(", ")}};en=tn;xe([(0,le.property)()],X.prototype,"exportpartsPrefix",void 0);xe([Wr([])],X.prototype,"exportpartsPrefixes",void 0);xe([(0,le.property)({reflect:!0})],X.prototype,"exportparts",void 0);xe([(0,le.property)()],X.prototype,"customStylesheet",void 0);xe([(0,le.property)()],X.prototype,"elementToFocus",void 0);xe([(0,le.state)()],X.prototype,"useAdoptedStyleSheets",void 0);function it(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ke=Symbol("internalReduxEventsUnsubscribers"),oe=Symbol("internalStoresUnsubscribers"),ue=Symbol("internalStores"),Ei=et(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ue].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ue].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ue].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ue].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ue].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[oe].has(o.store):this[oe].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[oe].set(o,a.subscribe(()=>this.updateFromStores())),this[ke].set(o,[]),it(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,f)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(f)&&console.warn("Element",this,"is subscribed to deprecated key",f,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,f)=>{if(typeof this[f]=="function"&&(!u.store||a.name===u.store)){let p=A=>this[f](A);a.addEventListener(u.eventName,p),this[ke].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[oe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[oe].has(o)&&this[oe].get(o)(),this[oe].delete(o),(a=this[ke].get(o))===null||a===void 0||a.forEach(c=>c()),this[ke].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=oe,r=ue,n=ke,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),rn=class extends Ei(X){};function L(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var gi=typeof Symbol=="function"&&Symbol.observable||"@@observable",nn=gi,Jt=()=>Math.random().toString(36).substring(7).split("").join("."),Ai={INIT:`@@redux/INIT${Jt()}`,REPLACE:`@@redux/REPLACE${Jt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Jt()}`},ot=Ai;function at(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Qt(e,t,r){if(typeof e!="function")throw new Error(L(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(L(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(L(1));return r(Qt)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((g,w)=>{o.set(w,g)}))}function u(){if(c)throw new Error(L(3));return s}function f(g){if(typeof g!="function")throw new Error(L(4));if(c)throw new Error(L(5));let w=!0;l();let B=a++;return o.set(B,g),function(){if(w){if(c)throw new Error(L(6));w=!1,l(),o.delete(B),i=null}}}function p(g){if(!at(g))throw new Error(L(7));if(typeof g.type>"u")throw new Error(L(8));if(typeof g.type!="string")throw new Error(L(17));if(c)throw new Error(L(9));try{c=!0,s=n(s,g)}finally{c=!1}return(i=o).forEach(B=>{B()}),g}function A(g){if(typeof g!="function")throw new Error(L(10));n=g,p({type:ot.REPLACE})}function _(){let g=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(L(11));function B(){let E=w;E.next&&E.next(u())}return B(),{unsubscribe:g(B)}},[nn](){return this}}}return p({type:ot.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:A,[nn]:_}}function Si(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:ot.INIT})>"u")throw new Error(L(12));if(typeof r(void 0,{type:ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(L(13))})}function Zt(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{Si(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let f=0;f<n.length;f++){let p=n[f],A=r[p],_=a[p],R=A(_,c);if(typeof R>"u"){let g=c&&c.type;throw new Error(L(14))}u[p]=R,l=l||R!==_}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ue(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function sn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(L(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ue(...a)(s.dispatch),{...s,dispatch:i}}}function on(e){return at(e)&&"type"in e&&typeof e.type=="string"}var mn=Symbol.for("immer-nothing"),an=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function W(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var H=Object,be=H.getPrototypeOf,dt="constructor",Et="prototype",nr="configurable",pt="enumerable",lt="writable",Be="value",J=e=>!!e&&!!e[I];function j(e){return e?yn(e)||At(e)||!!e[an]||!!e[dt]?.[an]||St(e)||Fe(e):!1}var vi=H[Et][dt].toString(),cn=new WeakMap;function yn(e){if(!e||!dr(e))return!1;let t=be(e);if(t===null||t===H[Et])return!0;let r=H.hasOwnProperty.call(t,dt)&&t[dt];if(r===Object)return!0;if(!_e(r))return!1;let n=cn.get(r);return n===void 0&&(n=Function.toString.call(r),cn.set(r,n)),n===vi}function gt(e,t,r=!0){Ve(e)===0?(r?Reflect.ownKeys(e):H.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ve(e){let t=e[I];return t?t.type_:At(e)?1:St(e)?2:Fe(e)?3:0}var er=(e,t,r=Ve(e))=>r===2?e.has(t):H[Et].hasOwnProperty.call(e,t),sr=(e,t,r=Ve(e))=>r===2?e.get(t):e[t],ft=(e,t,r,n=Ve(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function xi(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var At=Array.isArray,St=e=>e instanceof Map,Fe=e=>e instanceof Set,dr=e=>typeof e=="object",_e=e=>typeof e=="function",tr=e=>typeof e=="boolean";function _i(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var re=e=>e.copy_||e.base_;var pr=e=>e.modified_?e.copy_:e.base_;function ir(e,t){if(St(e))return new Map(e);if(Fe(e))return new Set(e);if(At(e))return Array[Et].slice.call(e);let r=yn(e);if(t===!0||t==="class_only"&&!r){let n=H.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[lt]===!1&&(a[lt]=!0,a[nr]=!0),(a.get||a.set)&&(n[o]={[nr]:!0,[lt]:!0,[pt]:a[pt],[Be]:e[o]})}return H.create(be(e),n)}else{let n=be(e);if(n!==null&&r)return{...e};let s=H.create(n);return H.assign(s,e)}}function vt(e,t=!1){return xt(e)||J(e)||!j(e)||(Ve(e)>1&&H.defineProperties(e,{set:ct,add:ct,clear:ct,delete:ct}),H.freeze(e),t&&gt(e,(r,n)=>{vt(n,!0)},!1)),e}function bi(){W(2)}var ct={[Be]:bi};function xt(e){return e===null||!dr(e)?!0:H.isFrozen(e)}var ht="MapSet",or="Patches",ln="ArrayMethods",En={};function de(e){let t=En[e];return t||W(0,e),t}var un=e=>!!En[e];var He,gn=()=>He,Ci=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:un(ht)?de(ht):void 0,arrayMethodsPlugin_:un(ln)?de(ln):void 0});function dn(e,t){t&&(e.patchPlugin_=de(or),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ar(e){cr(e),e.drafts_.forEach(Oi),e.drafts_=null}function cr(e){e===He&&(He=e.parent_)}var pn=e=>He=Ci(He,e);function Oi(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(ar(t),W(4)),j(e)&&(e=hn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=hn(t,r);return Ti(t,e,!0),ar(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mn?e:void 0}function hn(e,t){if(xt(t))return t;let r=t[I];if(!r)return mt(t,e.handledSet_,e);if(!_t(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vn(r,e)}return r.copy_}function Ti(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vt(t,r)}function An(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _t=(e,t)=>e.scope_===t,Ri=[];function Sn(e,t,r,n){let s=re(e),i=e.type_;if(n!==void 0&&sr(s,n,i)===t){ft(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;gt(s,(c,l)=>{if(J(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Ri;for(let a of o)ft(s,a,r,i)}function wi(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!_t(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=pr(i);Sn(e,i.draft_??i,o,r),vn(i,s)})}function vn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}An(e)}}function Ni(e,t,r){let{scope_:n}=e;if(J(r)){let s=r[I];_t(s,n)&&s.callbacks_.push(function(){ut(e);let o=pr(s);Sn(e,r,o,t)})}else j(r)&&e.callbacks_.push(function(){let i=re(e);e.type_===3?i.has(r)&&mt(r,n.handledSet_,n):sr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mt(sr(e.copy_,t,e.type_),n.handledSet_,n)})}function mt(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||J(e)||t.has(e)||!j(e)||xt(e)||(t.add(e),gt(e,(n,s)=>{if(J(s)){let i=s[I];if(_t(i,r)){let o=pr(i);ft(e,n,o,e.type_),An(i)}}else j(s)&&mt(s,t,r)})),e}function Li(e,t){let r=At(e),n={type_:r?1:0,scope_:t?t.scope_:gn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=yt;r&&(s=[n],i=je);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var yt={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=re(e);if(!er(s,t,e.type_))return Di(e,s,t);let i=s[t];if(e.finalized_||!j(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&_i(t))return i;if(i===rr(e.base_,t)||Mi(e,t,i)){ut(e);let o=e.type_===1?+t:t,a=ur(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in re(e)},ownKeys(e){return Reflect.ownKeys(re(e))},set(e,t,r){let n=xn(re(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=rr(re(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(xi(r,s)&&(r!==void 0||er(e.base_,t,e.type_)))return!0;ut(e),lr(e)}return e.copy_[t]===r&&(r!==void 0||er(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ni(e,t,r)),!0},deleteProperty(e,t){return ut(e),rr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),lr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=re(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[lt]:!0,[nr]:e.type_!==1||t!=="length",[pt]:n[pt],[Be]:r[t]}},defineProperty(){W(11)},getPrototypeOf(e){return be(e.base_)},setPrototypeOf(){W(12)}},je={};for(let e in yt){let t=yt[e];je[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}je.deleteProperty=function(e,t){return je.set.call(this,e,t,void 0)};je.set=function(e,t,r){return yt.set.call(this,e[0],t,r,e[0])};function rr(e,t){let r=e[I];return(r?re(r):e)[t]}function Mi(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!j(r)||r[I]?!1:e.baseRefs_.has(r)}function Di(e,t,r){let n=xn(t,r);return n?Be in n?n[Be]:n.get?.call(e.draft_):void 0}function xn(e,t){if(!(t in e))return;let r=be(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=be(r)}}function lr(e){e.modified_||(e.modified_=!0,e.parent_&&lr(e.parent_))}function ut(e){e.copy_||(e.assigned_=new Map,e.copy_=ir(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ii=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(_e(t)&&!_e(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}_e(r)||W(6),n!==void 0&&!_e(n)&&W(7);let s;if(j(t)){let i=pn(this),o=ur(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?ar(i):cr(i)}return dn(i,n),fn(s,i)}else if(!t||!dr(t)){if(s=r(t),s===void 0&&(s=t),s===mn&&(s=void 0),this.autoFreeze_&&vt(s,!0),n){let i=[],o=[];de(or).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else W(1,t)},this.produceWithPatches=(t,r)=>{if(_e(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},tr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),tr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),tr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){j(e)||W(8),J(e)&&(e=_n(e));let t=pn(this),r=ur(t,e,void 0);return r[I].isManual_=!0,cr(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&W(9);let{scope_:n}=r;return dn(n,t),fn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=de(or).applyPatches_;return J(e)?n(e,t):this.produce(e,s=>n(s,t))}};function ur(e,t,r,n){let[s,i]=St(t)?de(ht).proxyMap_(t,r):Fe(t)?de(ht).proxySet_(t,r):Li(t,r);return(r?.scope_??gn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?wi(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function _n(e){return J(e)||W(10,e),bn(e)}function bn(e){if(!j(e)||xt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ir(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ir(e,!0);let s=r;return Fe(r)&&(r=new Set),gt(s,(i,o)=>{ft(r,i,bn(o))},n),t&&(t.finalized_=!1),r}var Pi=globalThis.Iterator,ga=typeof Pi?.from=="function";var ki=new Ii,fr=ki.produce;function Cn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var On=Cn(),Tn=Cn;var Ui=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ue:Ue.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Bi=e=>e&&typeof e.match=="function";function ae(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(Q(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>on(n)&&n.type===e,r}var Mn=class Ke extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ke.prototype)}static get[Symbol.species](){return Ke}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ke(...t[0].concat(this)):new Ke(...t.concat(this))}};function Rn(e){return j(e)?fr(e,()=>{}):e}function bt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Hi(e){return typeof e=="boolean"}var ji=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Mn;return r&&(Hi(r)?o.push(On):o.push(Tn(r.extraArgument))),o},Vi="RTK_autoBatch";var wn=e=>t=>{setTimeout(t,e)},Fi=(e,t)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=e(o),i=setTimeout(o,t)},Ki=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Fi(window.requestAnimationFrame,100):wn(10):e.type==="callback"?e.queueNotification:wn(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let f=()=>s&&u(),p=n.subscribe(f);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vi],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Gi=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Mn(e);return n&&s.push(Ki(typeof n=="object"?n:void 0)),s};function Dn(e){let t=ji(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(at(r))c=Zt(r);else throw new Error(Q(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ue;s&&(u=Ui({trace:!1,...typeof s=="object"&&s}));let f=sn(...l),p=Gi(f),A=typeof a=="function"?a(p):p(),_=u(...A);return Qt(c,o,_)}function In(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Q(28));if(a in t)throw new Error(Q(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function $i(e){return typeof e=="function"}function zi(e,t){let[r,n,s]=In(t),i;if($i(e))i=()=>Rn(e());else{let a=Rn(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,f)=>{if(f)if(J(u)){let p=f(u,c);return p===void 0?u:p}else{if(j(u))return fr(u,p=>f(p,c));{let p=f(u,c);if(p===void 0){if(u===null)return u;throw new Error(Q(9))}return p}}return u},a)}return o.getInitialState=i,o}var qi=(e,t)=>Bi(e)?e.match(t):e(t);function Wi(...e){return t=>e.some(r=>qi(r,t))}var Yi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xi=(e=21)=>{let t="",r=e;for(;r--;)t+=Yi[Math.random()*64|0];return t},Ji=["name","message","stack","code"],hr=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Nn=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Qi=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ji)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Ln="External signal was aborted",Zi=(()=>{function e(t,r,n){let s=ae(t+"/fulfilled",(c,l,u,f)=>({payload:c,meta:{...f||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ae(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ae(t+"/rejected",(c,l,u,f,p)=>({payload:f,error:(n&&n.serializeError||Qi)(c||"Rejected"),meta:{...p||{},arg:u,requestId:l,rejectedWithValue:f!==void 0,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,f,p)=>{let A=n?.idGenerator?n.idGenerator(c):Xi(),_=new AbortController,R,g;function w(y){g=y,_.abort()}l&&(l.aborted?w(Ln):l.addEventListener("abort",()=>w(Ln),{once:!0}));let B=(async function(){let y;try{let E=n?.condition?.(c,{getState:f,extra:p});if(to(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(_.signal.aborted)throw{name:"AbortError",message:g||"Aborted"};let N=new Promise((b,D)=>{R=()=>{D({name:"AbortError",message:g||"Aborted"})},_.signal.addEventListener("abort",R,{once:!0})});u(i(A,c,n?.getPendingMeta?.({requestId:A,arg:c},{getState:f,extra:p}))),y=await Promise.race([N,Promise.resolve(r(c,{dispatch:u,getState:f,extra:p,requestId:A,signal:_.signal,abort:w,rejectWithValue:((b,D)=>new hr(b,D)),fulfillWithValue:((b,D)=>new Nn(b,D))})).then(b=>{if(b instanceof hr)throw b;return b instanceof Nn?s(b.payload,A,c,b.meta):s(b,A,c)})])}catch(E){y=E instanceof hr?o(null,A,c,E.payload,E.meta):o(E,A,c)}finally{R&&_.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&o.match(y)&&y.meta.condition||u(y),y})();return Object.assign(B,{abort:w,requestId:A,arg:c,unwrap(){return B.then(eo)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Wi(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function eo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function to(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pn=Symbol.for("rtk-slice-createasyncthunk"),Oa={[Pn]:Zi};function ro(e,t){return`${e}/${t}`}function no({creators:e}={}){let t=e?.asyncThunk?.[Pn];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(Q(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(io()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(y,E){let N=typeof y=="string"?y:y.type;if(!N)throw new Error(Q(12));if(N in c.sliceCaseReducersByType)throw new Error(Q(13));return c.sliceCaseReducersByType[N]=E,l},addMatcher(y,E){return c.sliceMatchers.push({matcher:y,reducer:E}),l},exposeAction(y,E){return c.actionCreators[y]=E,l},exposeCaseReducer(y,E){return c.sliceCaseReducersByName[y]=E,l}};a.forEach(y=>{let E=o[y],N={reducerName:y,type:ro(s,y),createNotation:typeof n.reducers=="function"};ao(E)?lo(N,E,l,t):oo(N,E,l)});function u(){let[y={},E=[],N=void 0]=typeof n.extraReducers=="function"?In(n.extraReducers):[n.extraReducers],b={...y,...c.sliceCaseReducersByType};return zi(n.initialState,D=>{for(let P in b)D.addCase(P,b[P]);for(let P of c.sliceMatchers)D.addMatcher(P.matcher,P.reducer);for(let P of E)D.addMatcher(P.matcher,P.reducer);N&&D.addDefaultCase(N)})}let f=y=>y,p=new Map,A=new WeakMap,_;function R(y,E){return _||(_=u()),_(y,E)}function g(){return _||(_=u()),_.getInitialState()}function w(y,E=!1){function N(D){let P=D[y];return typeof P>"u"&&E&&(P=bt(A,N,g)),P}function b(D=f){return bt(bt(p,E,()=>new WeakMap),D,()=>{let P={};for(let[si,ii]of Object.entries(n.selectors??{}))P[si]=so(ii,D,()=>bt(A,D,g),E);return P})}return{reducerPath:y,getSelectors:b,get selectors(){return b(N)},selectSlice:N}}let B={name:s,reducer:R,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:g,...w(i),injectInto(y,{reducerPath:E,...N}={}){let b=E??i;return y.inject({reducerPath:b,reducer:R},N),{...B,...w(b,!0)}}};return B}}function so(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var kn=no();function io(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function oo({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!co(n))throw new Error(Q(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?ae(e,o):ae(e))}function ao(e){return e._reducerDefinitionType==="asyncThunk"}function co(e){return e._reducerDefinitionType==="reducerWithPrepare"}function lo({type:e,reducerName:t},r,n,s){if(!s)throw new Error(Q(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,f=s(e,i,u);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),a&&n.addCase(f.pending,a),c&&n.addCase(f.rejected,c),l&&n.addMatcher(f.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Ct,pending:a||Ct,rejected:c||Ct,settled:l||Ct})}function Ct(){}var Un="listener",Bn="completed",Hn="cancelled",Ta=`task-${Hn}`,Ra=`task-${Bn}`,wa=`${Un}-${Hn}`,Na=`${Un}-${Bn}`;var{assign:jn}=Object;var mr="listenerMiddleware";var uo=jn(ae(`${mr}/add`),{withTypes:()=>uo}),La=ae(`${mr}/removeAll`),po=jn(ae(`${mr}/remove`),{withTypes:()=>po});function Q(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fo=et(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Ot=class extends fo(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vn=class e extends Ot{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(it(i))return i;if(s==null)return;let o=kn({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Dn({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ie(o.getInitialState());for(let f of l.keeping)u[f]=(c??u)[f];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus,s.deprecatedKeys)}constructor(t,r,n,s){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new tt,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...f)=>{let p=u(...f.map(i));return this.reduxStore.dispatch(p),p}:f=>{let p=l,A=this.getState()[p];Se(A,f)||this.setState({[p]:i(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Tt=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Rt=h(S()),ho="ft-app-info",pe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};pe.eventName="authentication-change";var Ge=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ge.eventName="ui-locale-changed";var mo={session:(e,t)=>{(0,Rt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new pe(t.payload)),0))}},m=Rt.FtReduxStore.get({name:ho,reducers:mo,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Fn=h(S()),wt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ac=(0,Fn.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Tt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wt([(0,yr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wt([(0,yr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wt([Xt({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),wt([Xt({store:m.name})],t.prototype,"uiLocale",void 0),t});var Kn;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Kn||(Kn={}));var Gn;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Gn||(Gn={}));var $n;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})($n||($n={}));var zn;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(zn||(zn={}));var qn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(qn||(qn={}));var Wn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Wn||(Wn={}));var Yn;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Yn||(Yn={}));var Xn;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Xn||(Xn={}));var Jn;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Jn||(Jn={}));var Qn;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Qn||(Qn={}));var Zn;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(Zn||(Zn={}));var es;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(es||(es={}));var ts;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ts||(ts={}));var rs;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rs||(rs={}));var ns;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ns||(ns={}));var ss;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ss||(ss={}));var is;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(is||(is={}));var os;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(os||(os={}));var as;(function(e){e.ASC="ASC",e.DESC="DESC"})(as||(as={}));var cs;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(cs||(cs={}));var ls;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ls||(ls={}));var us;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(us||(us={}));var ds;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ds||(ds={}));var ps;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ps||(ps={}));var fs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(hs||(hs={}));var ms;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ms||(ms={}));var ys;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ys||(ys={}));var C;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(C||(C={}));var K;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(K||(K={}));var Es;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Es||(Es={}));var gs;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(gs||(gs={}));var As;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(As||(As={}));var Ss;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ss||(Ss={}));var vs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(vs||(vs={}));var xs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(xs||(xs={}));var _s;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_s||(_s={}));var bs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(bs||(bs={}));var Cs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Cs||(Cs={}));var Os;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Os||(Os={}));var Ts;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Ts||(Ts={}));var Rs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Rs||(Rs={}));var yo={[C.PERSONAL_BOOK_SHARE_USER]:[C.PERSONAL_BOOK_USER],[C.HTML_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.PDF_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.KHUB_ADMIN]:[C.CONTENT_PUBLISHER],[C.ADMIN]:[C.KHUB_ADMIN,C.USERS_ADMIN,C.PORTAL_ADMIN,C.BEHAVIOR_DATA_USER],[C.GENERATIVE_AI_EXPORT_USER]:[C.GENERATIVE_AI_USER]};function ws(e,t){return e===t||(yo[e]??[]).some(r=>ws(r,t))}function Er(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ws(n,t))}function Ns(e,...t){return e==null?!1:t.some(r=>Er(e,r))}var It=h(S());var gr=h(S());var fe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Ce=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:fe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):fe.await()}};var V=class extends Ce{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new gr.CacheRegistry,this.cache=t?s.commonCache:new gr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Nt=class extends V{async listMySearches(){let{session:t}=m.getState();return Er(t,C.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lt=class extends V{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Mt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Dt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=m.getState().session;return!!t?.sessionAuthenticated}};var Eo="ft-user-assets",go={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(K).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Sr(e,r,[...Ar(e,r),s]),Ls(e,r,1,n),Ms(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Sr(e,r,Ar(e,r).map(s=>s.id===n.id?n:s)),Ms(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Sr(e,r,Ar(e,r).filter(i=>i.id!==s)),Ls(e,r,-1,n)}},Ds={[K.SEARCHES]:"savedSearches",[K.BOOKMARKS]:"bookmarks",[K.BOOKS]:void 0,[K.COLLECTIONS]:void 0},Ar=(e,t)=>{var r;let n=Ds[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Sr=(e,t,r)=>{let n=Ds[t];n&&(e[n]=r)},Ls=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===K.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Ms=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=It.FtReduxStore.get({name:Eo,reducers:go,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(K).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vr=class{constructor(t=new Mt,r=new Dt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lt,this.savedSearchesService=new Nt,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,It.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===K.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},Ao=new vr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ao);var xr=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new xr;var G=h(S());var Is,Oe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},So=Symbol("clearAfterUnitTest"),Pt=class extends(0,G.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Is]=()=>{this.defaultMessages={},this.cache=new G.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,G.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new G.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof G.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Oe({loadedContexts:t})),this.dispatchEvent(new Oe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Oe({loadedContexts:[t]})),this.dispatchEvent(new Oe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,G.delay)(0).then(()=>n()).catch(()=>null)))}};Is=So;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Te=window.FluidTopicsI18nService,kt=window.FluidTopicsCustomI18nService;var Ps=h(S()),_r=class{highlightHtml(t,r,n){(0,Ps.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new _r;var ks=h(S());var br=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return ks.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new br;var Us=h(S());var $e=class{static get(t,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new Us.SearchPlaceConverter(n,t??20,s?.allLanguagesAllowed,r,i)}};var Cr=class{urlToSearchRequest(t){return $e.get().parse(t)}searchRequestToUrl(t){return $e.get().serialize(t)}};window.FluidTopicsUrlService=new Cr;var ne=h(S());var he=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};he.eventName="before-location-change";var me=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};me.eventName="change";var Or=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Bs=new Or;var Ut=class e extends ne.WithEventBus{static build(){return new e(window.history,Bs,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ne.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new me(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new he(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(he.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(he.eventName,t)}addHistoryChangeListener(t){this.addEventListener(me.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(me.eventName,t)}currentItem(){return(0,ne.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ne.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ne.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ne.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ut.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Hs=h(Y());var js=Hs.css`
82
+ `;var Ks=h(Y()),U=h(F()),Ee=h(S());var Z=h(S());function Vs(e,t){let{authenticationRequired:r,session:n}=m.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Bt=class extends Ce{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Tr=class e extends Z.FtStateManager{static build(t){return new e(m,t)}constructor(t,r){super(),this.store=t,this.cache=new Z.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bt,this.knownContexts=new Z.AbstractRegistry,this.knownCustomComponents=new Z.AbstractRegistry,this.cleanSessionDebouncer=new Z.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Z.Debouncer(500),this.apiProvider=r??(()=>fe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(pe.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(pe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Vs(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ge(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Ns(m.getState().session,...t)}},Fs=Tr.build();var ye=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var ze=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new ye(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var T=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},v=class extends Ee.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Fs,this.contextRoot=new ze}render(){return Ks.html`
83
83
  <slot></slot>
84
- `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Te.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};v.elementDefinitions={};v.styles=js;T([(0,U.property)()],v.prototype,"baseUrl",void 0);T([(0,U.property)()],v.prototype,"tenantId",void 0);T([(0,U.property)()],v.prototype,"apiIntegrationIdentifier",void 0);T([(0,U.property)()],v.prototype,"apiIntegrationAppVersion",void 0);T([(0,U.property)()],v.prototype,"uiLocale",void 0);T([(0,Ee.jsonProperty)(null)],v.prototype,"availableUiLocales",void 0);T([(0,Ee.jsonProperty)(null)],v.prototype,"metadataConfiguration",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"editorMode",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"noCustom",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"openExternalDocumentInNewTab",void 0);T([(0,U.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomComponent",void 0);T([(0,U.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomCode",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"withManualResources",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"navigatorOnline",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"forcedOffline",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"authenticationRequired",void 0);T([(0,Ee.jsonProperty)([])],v.prototype,"messageContexts",void 0);T([(0,Ee.jsonProperty)(void 0)],v.prototype,"session",void 0);var $s=h(S());var Gs={"ft-app-context":v};(0,$s.customElements)(Gs);var Ht=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?kt:Te}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var Re=h(S());var Ws=h(F());var Rr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},zs=new Rr;var _o=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},bo=Symbol("i18nAttributes"),Co=Symbol("i18nListAttributes"),Ys=Symbol("i18nProperties"),jt=Symbol("i18nContexts"),ze=Symbol("i18nUnsubs"),Xs=(0,Re.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?kt:Te}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:f}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let p=u??(f?f(this):[]);return this.getI18nService(l).resolveMessage(o,a,...p)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(zs.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,f,p)=>p?.context&&p.key&&i(u,f,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[bo])===null||o===void 0||o.forEach((u,f)=>c[f]=l(u,f,c[f])),(a=this[Co])===null||a===void 0||a.forEach((u,f)=>{var p;return c[f]=(p=c[f])===null||p===void 0?void 0:p.map(A=>l(u,f,A))})}updateI18nProperties(i){var o;(o=this[Ys])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[jt].set(c,{isCustomContext:a}),this[ze].has(c)||this[ze].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[jt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[jt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ze].forEach(i=>i()),this[ze].clear()}}return t=jt,r=ze,_o([(0,Ws.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),qs=class extends Xs(Re.FtLitElement){},Vt=class extends Xs(Re.FtLitElementRedux){};var Js=h(Y());var Qs=Js.css`
84
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Te.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};v.elementDefinitions={};v.styles=js;T([(0,U.property)()],v.prototype,"baseUrl",void 0);T([(0,U.property)()],v.prototype,"tenantId",void 0);T([(0,U.property)()],v.prototype,"apiIntegrationIdentifier",void 0);T([(0,U.property)()],v.prototype,"apiIntegrationAppVersion",void 0);T([(0,U.property)()],v.prototype,"uiLocale",void 0);T([(0,Ee.jsonProperty)(null)],v.prototype,"availableUiLocales",void 0);T([(0,Ee.jsonProperty)(null)],v.prototype,"metadataConfiguration",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"editorMode",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"noCustom",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"openExternalDocumentInNewTab",void 0);T([(0,U.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomComponent",void 0);T([(0,U.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomCode",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"withManualResources",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"navigatorOnline",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"forcedOffline",void 0);T([(0,U.property)({type:Boolean})],v.prototype,"authenticationRequired",void 0);T([(0,Ee.jsonProperty)([])],v.prototype,"messageContexts",void 0);T([(0,Ee.jsonProperty)(void 0)],v.prototype,"session",void 0);var $s=h(S());var Gs={"ft-app-context":v};(0,$s.customElements)(Gs);var Ht=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?kt:Te}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var Re=h(S());var Ws=h(F());var Rr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},zs=new Rr;var _o=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},bo=Symbol("i18nAttributes"),Co=Symbol("i18nListAttributes"),Ys=Symbol("i18nProperties"),jt=Symbol("i18nContexts"),qe=Symbol("i18nUnsubs"),Xs=(0,Re.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?kt:Te}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:f}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let p=u??(f?f(this):[]);return this.getI18nService(l).resolveMessage(o,a,...p)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(zs.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,f,p)=>p?.context&&p.key&&i(u,f,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[bo])===null||o===void 0||o.forEach((u,f)=>c[f]=l(u,f,c[f])),(a=this[Co])===null||a===void 0||a.forEach((u,f)=>{var p;return c[f]=(p=c[f])===null||p===void 0?void 0:p.map(A=>l(u,f,A))})}updateI18nProperties(i){var o;(o=this[Ys])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[jt].set(c,{isCustomContext:a}),this[qe].has(c)||this[qe].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[jt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[jt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[qe].forEach(i=>i()),this[qe].clear()}}return t=jt,r=qe,_o([(0,Ws.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),qs=class extends Xs(Re.FtLitElement){},Vt=class extends Xs(Re.FtLitElementRedux){};var Js=h(Y());var Qs=Js.css`
85
85
  `;var Ft=h(Y()),Ne=h(F()),Kt=h(S());var we=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},$=class extends Vt{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(m)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:Ft.nothing:Ft.html`
86
86
  <span class="ft-i18n">
87
87
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
88
88
  </span>
89
- `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};$.elementDefinitions={};$.styles=Qs;we([(0,Kt.redux)()],$.prototype,"editorMode",void 0);we([(0,Ne.property)()],$.prototype,"context",void 0);we([(0,Ne.property)()],$.prototype,"key",void 0);we([(0,Kt.jsonProperty)([])],$.prototype,"args",void 0);we([(0,Ne.property)()],$.prototype,"defaultMessage",void 0);we([(0,Ne.state)()],$.prototype,"editorMessage",void 0);var ei=h(S());var Zs={"ft-i18n":$};(0,ei.customElements)(Zs);var wr=Ht.build("designedReaderTopicContent");var D=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},x=class extends Xe{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,r,n;return!this.map||!this.error&&!this.content&&!this.isFiltered&&((t=this.translationSourceLanguage)===null||t===void 0?void 0:t.code)==((r=this.translationDestinationLanguage)===null||r===void 0?void 0:r.code)?ce.html`
89
+ `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};$.elementDefinitions={};$.styles=Qs;we([(0,Kt.redux)()],$.prototype,"editorMode",void 0);we([(0,Ne.property)()],$.prototype,"context",void 0);we([(0,Ne.property)()],$.prototype,"key",void 0);we([(0,Kt.jsonProperty)([])],$.prototype,"args",void 0);we([(0,Ne.property)()],$.prototype,"defaultMessage",void 0);we([(0,Ne.state)()],$.prototype,"editorMessage",void 0);var ei=h(S());var Zs={"ft-i18n":$};(0,ei.customElements)(Zs);var wr=Ht.build("designedReaderTopicContent");var M=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},x=class extends Je{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,r,n;return!this.map||!this.error&&!this.content&&!this.isFiltered&&((t=this.translationSourceLanguage)===null||t===void 0?void 0:t.code)==((r=this.translationDestinationLanguage)===null||r===void 0?void 0:r.code)?ce.html`
90
90
  <section class="topic-loading"></section>
91
91
  `:ce.html`
92
92
  <style>
@@ -107,7 +107,7 @@
107
107
  <div class="depth-${c} content-locale-${this.getTopicLanguage()} ${a}">
108
108
  ${this.content!=null?(0,ti.unsafeHTML)(`${this.content}`):ce.nothing}
109
109
  </div>
110
- `}is404Error(){return this.error.status===404}getTopicLanguage(){var t;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(t=this.map)===null||t===void 0?void 0:t.lang}handleLinkPreviews(){var t;this.linkPreviewDialogId&&((t=this.crossMapLinks)===null||t===void 0||t.forEach(r=>{r.setAttribute("role","button"),r.setAttribute("aria-haspopup","dialog"),r.setAttribute("aria-controls",this.linkPreviewDialogId)}))}};x.styles=[Pr,O.highlightHtmlStyles];D([(0,O.redux)({store:"reader"})],x.prototype,"map",void 0);D([(0,O.redux)({store:"reader",selector:e=>e.translation.profileId})],x.prototype,"translationProfileId",void 0);D([(0,O.redux)({store:"reader",selector:e=>e.translation.destinationLanguage})],x.prototype,"translationDestinationLanguage",void 0);D([(0,O.redux)({store:"reader",selector:e=>e.translation.sourceLanguage})],x.prototype,"translationSourceLanguage",void 0);D([(0,O.redux)({store:"reader",selector:e=>e.translation.isLoading})],x.prototype,"translationLoading",void 0);D([(0,O.redux)({store:"reader",selector:e=>e.translation.isError})],x.prototype,"translationError",void 0);D([(0,O.redux)({store:"reader"})],x.prototype,"linkPreviewDialogId",void 0);D([(0,O.redux)({store:"reader"})],x.prototype,"scrollTarget",void 0);D([(0,O.redux)({store:"reader"})],x.prototype,"currentPage",void 0);D([(0,O.redux)({store:"reader"})],x.prototype,"filteredTocNodes",void 0);D([(0,ee.state)()],x.prototype,"content",void 0);D([(0,ee.state)()],x.prototype,"error",void 0);D([(0,O.redux)({store:"reader",selector:(e,t)=>t.disableContextInteractions?"":e.searchInDocumentQuery})],x.prototype,"searchInDocumentQuery",void 0);D([(0,ee.property)({attribute:!1})],x.prototype,"contentPreprocessor",void 0);D([(0,ee.property)({attribute:!1})],x.prototype,"onContentAvailable",void 0);D([(0,ee.query)("section.topic")],x.prototype,"topicContainer",void 0);D([(0,ee.queryAll)("a.ft-internal-xlink")],x.prototype,"crossMapLinks",void 0);var ri={"ft-reader-topic-content":x};(0,ni.customElements)(ri);})();
110
+ `}is404Error(){return this.error.status===404}getTopicLanguage(){var t;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(t=this.map)===null||t===void 0?void 0:t.lang}handleLinkPreviews(){var t;this.linkPreviewDialogId&&((t=this.crossMapLinks)===null||t===void 0||t.forEach(r=>{r.setAttribute("role","button"),r.setAttribute("aria-haspopup","dialog"),r.setAttribute("aria-controls",this.linkPreviewDialogId)}))}};x.styles=[Pr,O.highlightHtmlStyles];M([(0,O.redux)({store:"reader"})],x.prototype,"map",void 0);M([(0,O.redux)({store:"reader",selector:e=>e.translation.profileId})],x.prototype,"translationProfileId",void 0);M([(0,O.redux)({store:"reader",selector:e=>e.translation.destinationLanguage})],x.prototype,"translationDestinationLanguage",void 0);M([(0,O.redux)({store:"reader",selector:e=>e.translation.sourceLanguage})],x.prototype,"translationSourceLanguage",void 0);M([(0,O.redux)({store:"reader",selector:e=>e.translation.isLoading})],x.prototype,"translationLoading",void 0);M([(0,O.redux)({store:"reader",selector:e=>e.translation.isError})],x.prototype,"translationError",void 0);M([(0,O.redux)({store:"reader"})],x.prototype,"linkPreviewDialogId",void 0);M([(0,O.redux)({store:"reader"})],x.prototype,"scrollTarget",void 0);M([(0,O.redux)({store:"reader"})],x.prototype,"currentPage",void 0);M([(0,O.redux)({store:"reader"})],x.prototype,"filteredTocNodes",void 0);M([(0,ee.state)()],x.prototype,"content",void 0);M([(0,ee.state)()],x.prototype,"error",void 0);M([(0,O.redux)({store:"reader",selector:(e,t)=>t.disableContextInteractions?"":e.searchInDocumentQuery})],x.prototype,"searchInDocumentQuery",void 0);M([(0,ee.property)({attribute:!1})],x.prototype,"contentPreprocessor",void 0);M([(0,ee.property)({attribute:!1})],x.prototype,"onContentAvailable",void 0);M([(0,ee.query)("section.topic")],x.prototype,"topicContainer",void 0);M([(0,ee.queryAll)("a.ft-internal-xlink")],x.prototype,"crossMapLinks",void 0);var ri={"ft-reader-topic-content":x};(0,ni.customElements)(ri);})();
111
111
  /*! Bundled license information:
112
112
 
113
113
  .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/context-request-event.js: