@fluid-topics/ft-reader-content 0.3.20 → 0.3.21

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,16 +1,55 @@
1
- !function(t,e,i,o,s,n,r){var l,a,h=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class f extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class p extends e.FtLitElementRedux{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new f)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}h([o.state()],p.prototype,"stateManager",void 0),function(t){t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.STAR_PLAIN="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN_PLAIN="&#xe94d;",t.THUMBS_DOWN="&#xe94e;",t.THUMBS_UP_PLAIN="&#xe94f;",t.THUMBS_UP="&#xe950;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe900;",t.EYE="\f06e",t.DISC="&#xe901;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe902;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe90f;",t.ADMIN_USERS="&#xe910;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe912;"}(l||(l={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(a||(a={})),new Map([...["abw"].map((t=>[t,a.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,a.AUDIO])),...["avi"].map((t=>[t,a.AVI])),...["chm","xhs"].map((t=>[t,a.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,a.CODE])),...["csv"].map((t=>[t,a.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,a.DITA])),...["epub"].map((t=>[t,a.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,a.EXCEL])),...["flac"].map((t=>[t,a.FLAC])),...["gif"].map((t=>[t,a.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,a.GZIP])),...["html","htm","xhtml"].map((t=>[t,a.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,a.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,a.JPEG])),...["json"].map((t=>[t,a.JSON])),...["m4a","m4p"].map((t=>[t,a.M4A])),...["mov","qt"].map((t=>[t,a.MOV])),...["mp3"].map((t=>[t,a.MP3])),...["mp4","m4v"].map((t=>[t,a.MP4])),...["ogg","oga"].map((t=>[t,a.OGG])),...["pdf","ps"].map((t=>[t,a.PDF])),...["png"].map((t=>[t,a.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,a.POWERPOINT])),...["rar"].map((t=>[t,a.RAR])),...["stp"].map((t=>[t,a.STP])),...["txt","rtf","md","mdown"].map((t=>[t,a.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,a.VIDEO])),...["wav"].map((t=>[t,a.WAV])),...["wma"].map((t=>[t,a.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,a.WORD])),...["xml","xsl","rdf"].map((t=>[t,a.XML])),...["yaml","yml","x-yaml"].map((t=>[t,a.YAML])),...["zip"].map((t=>[t,a.ZIP]))]);const c={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},d=i.css`
1
+ !function(t,e,i,s,o,r){var n=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class a extends e.FtLitElementRedux{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new l)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}n([s.state()],a.prototype,"stateManager",void 0);const c=i.css` `,d=e.FtCssVariableFactory.create("--ft-reader-topic-context-text-color","COLOR","#000000"),h=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),x=i.css`
2
+ .ft-reader-topic-context {
3
+ box-sizing: border-box;
4
+ color: ${d};
5
+ background-color: ${h};
6
+ }
7
+ `;var v=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class p extends a{constructor(){super(...arguments),this.registeredComponents=[]}render(){return i.html`
8
+ <article id=${this.tocId}>
9
+ <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
10
+ </article>
11
+ `}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}p.styles=x,v([s.property()],p.prototype,"tocId",void 0),v([s.state()],p.prototype,"tocNode",void 0),e.customElement("ft-reader-topic-context")(p);const f=e.FtCssVariableFactory.external(e.designSystemVariables.titleFont,"Design system"),u=i.css`
12
+ .title {
13
+ font-family: ${f};
14
+ }
15
+ `;var m=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class b extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class g extends a{connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new b)),10)}disconnectedCallback(){super.disconnectedCallback()}}m([s.state()],g.prototype,"tocId",void 0),m([s.state()],g.prototype,"tocNode",void 0);var $=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class y extends g{render(){var t,e,s,r,n,l;if(!this.map||!this.tocNode)return i.nothing;const a=Math.min((null===(t=this.tocNode)||void 0===t?void 0:t.depth)||1,6),c=null!==(s=null===(e=this.map)||void 0===e?void 0:e.contentStyles.customCssClasses.join(" "))&&void 0!==s?s:"",d=null===(r=this.map)||void 0===r?void 0:r.lang;return i.html`
16
+ <style>
17
+ @import "${null===(n=this.map)||void 0===n?void 0:n.contentStyles.titleStylesheetUrl}";
18
+ </style>
19
+ <section class="title" lang="${d}">
20
+ <div class="depth-${null===(l=this.tocNode)||void 0===l?void 0:l.depth} content-locale-${d} ${c}">
21
+ ${o.unsafeHTML(`<h${a}>${this.tocNode.title}</h${a}>`)}
22
+ </div>
23
+ </section>
24
+ `}}y.styles=u,$([e.redux()],y.prototype,"baseUrl",void 0),$([e.redux()],y.prototype,"map",void 0),e.customElement("ft-reader-topic-title")(y);const w=e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),O=e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system"),j=i.css`
25
+ .topic {
26
+ font-family: ${O};
27
+ }
28
+
29
+ .topic-on-error {
30
+ display: flex;
31
+ }
32
+
33
+ .topic-on-error ft-icon {
34
+ color: ${w}
35
+ }
36
+
37
+ .topic-loading {
38
+ height: 100vh;
39
+ }
40
+ `;var I,T;!function(t){t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.STAR_PLAIN="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN_PLAIN="&#xe94d;",t.THUMBS_DOWN="&#xe94e;",t.THUMBS_UP_PLAIN="&#xe94f;",t.THUMBS_UP="&#xe950;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe900;",t.EYE="\f06e",t.DISC="&#xe901;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe902;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe90f;",t.ADMIN_USERS="&#xe910;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe912;"}(I||(I={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(T||(T={})),new Map([...["abw"].map((t=>[t,T.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,T.AUDIO])),...["avi"].map((t=>[t,T.AVI])),...["chm","xhs"].map((t=>[t,T.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,T.CODE])),...["csv"].map((t=>[t,T.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,T.DITA])),...["epub"].map((t=>[t,T.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,T.EXCEL])),...["flac"].map((t=>[t,T.FLAC])),...["gif"].map((t=>[t,T.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,T.GZIP])),...["html","htm","xhtml"].map((t=>[t,T.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,T.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,T.JPEG])),...["json"].map((t=>[t,T.JSON])),...["m4a","m4p"].map((t=>[t,T.M4A])),...["mov","qt"].map((t=>[t,T.MOV])),...["mp3"].map((t=>[t,T.MP3])),...["mp4","m4v"].map((t=>[t,T.MP4])),...["ogg","oga"].map((t=>[t,T.OGG])),...["pdf","ps"].map((t=>[t,T.PDF])),...["png"].map((t=>[t,T.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,T.POWERPOINT])),...["rar"].map((t=>[t,T.RAR])),...["stp"].map((t=>[t,T.STP])),...["txt","rtf","md","mdown"].map((t=>[t,T.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,T.VIDEO])),...["wav"].map((t=>[t,T.WAV])),...["wma"].map((t=>[t,T.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,T.WORD])),...["xml","xsl","rdf"].map((t=>[t,T.XML])),...["yaml","yml","x-yaml"].map((t=>[t,T.YAML])),...["zip"].map((t=>[t,T.ZIP]))]);const k=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),N=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),C=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),z=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),S=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),M=i.css`
2
41
  :host {
3
42
  display: inline-block;
4
43
  }
5
44
 
6
45
  :host, i.ft-icon {
7
- width: ${c.size};
8
- height: ${c.size};
46
+ width: ${k};
47
+ height: ${k};
9
48
  text-align: center;
10
49
  }
11
50
 
12
51
  i.ft-icon {
13
- font-size: ${c.size};
52
+ font-size: ${k};
14
53
  line-height: 1;
15
54
  font-weight: normal;
16
55
  text-transform: none;
@@ -21,285 +60,52 @@
21
60
  text-rendering: auto;
22
61
  -webkit-font-smoothing: antialiased;
23
62
  -moz-osx-font-smoothing: grayscale;
24
- vertical-align: ${c.verticalAlign};
63
+ vertical-align: ${S};
25
64
  }
26
65
 
27
66
  .ft-icon--fluid-topics {
28
- font-family: ${c.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
67
+ font-family: ${N}, ft-icons, fticons, sans-serif;
29
68
  }
30
69
 
31
70
  .ft-icon--file-format {
32
- font-family: ${c.fileFormatFontFamily}, ft-mime, sans-serif;
71
+ font-family: ${C}, ft-mime, sans-serif;
33
72
  }
34
73
 
35
74
  .ft-icon--material {
36
- font-family: ${c.materialFontFamily}, "Material Icons", sans-serif;
75
+ font-family: ${z}, "Material Icons", sans-serif;
37
76
  }
38
- `;var x;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(x||(x={}));var g,v=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class y extends e.FtLitElement{constructor(){super(...arguments),this.variant=x.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
77
+ `;var E;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(E||(E={}));var W=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class A extends e.FtLitElement{constructor(){super(...arguments),this.variant=E.fluid_topics,this.resolvedIcon=i.nothing}render(){const t="material"!==this.variant||this.value;return i.html`
39
78
  <i class="ft-icon ${"ft-icon--"+this.variant}">
40
- ${s.unsafeHTML(this.resolvedIcon)}
79
+ ${o.unsafeHTML(this.resolvedIcon)}
41
80
  <slot ?hidden=${t}></slot>
42
81
  </i>
43
- `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case x.file_format:this.resolvedIcon=null!==(t=a[o.toUpperCase()])&&void 0!==t?t:o;break;case x.fluid_topics:this.resolvedIcon=null!==(e=l[o.toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}y.elementDefinitions={},y.styles=d,v([o.property()],y.prototype,"variant",void 0),v([o.property()],y.prototype,"value",void 0),v([o.state()],y.prototype,"resolvedIcon",void 0),v([o.query("slot")],y.prototype,"slottedContent",void 0),e.customElement("ft-icon")(y);const u=window,m=u.trustedTypes,b=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,I=(t="")=>z.createComment(t),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S=/-->/g,T=/>/g,A=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),C=/'/g,E=/"/g,_=/^(?:script|style|textarea|title)$/i,M=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),U=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),W=new WeakMap,L=z.createTreeWalker(z,129,null,!1),Z=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=j;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,f=0;for(;f<i.length&&(r.lastIndex=f,a=r.exec(i),null!==a);)f=r.lastIndex,r===j?"!--"===a[1]?r=S:void 0!==a[1]?r=T:void 0!==a[2]?(_.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=A):void 0!==a[3]&&(r=A):r===A?">"===a[0]?(r=null!=s?s:j,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?A:'"'===a[3]?E:C):r===E||r===C?r=A:r===S||r===T?r=j:(r=A,s=void 0);const p=r===A&&t[e+1].startsWith("/>")?" ":"";n+=r===j?i+k:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+$+p):i+$+(-2===h?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(l):l,o]};class R{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=Z(t,e);if(this.el=R.createElement(a,i),L.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=L.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith($)){const i=h[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split($),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?H:"@"===e[1]?Y:P})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(_.test(o.tagName)){const t=o.textContent.split($),e=t.length-1;if(e>0){o.textContent=m?m.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],I()),L.nextNode(),l.push({type:2,index:++s});o.append(t[e],I())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:s}),t+=$.length-1}s++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function B(t,e,i=t,o){var s,n,r,l;if(e===U)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=N(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=B(t,a._$AS(t,e.values),a,o)),e}class K{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:z).importNode(i,!0);L.currentNode=s;let n=L.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new G(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new J(n,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=L.nextNode(),r++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class G{constructor(t,e,i,o){var s;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),N(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==U&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==F&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=R.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new K(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new R(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new G(this.O(I()),this.O(I()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class P{constructor(t,e,i,o,s){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=B(this,t,e,0),n=!N(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=B(this,o[i+r],e,r),l===U&&(l=this._$AH[r]),n||(n=!N(l)||l!==this._$AH[r]),l===F?t=F:t!==F&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}}const q=m?m.emptyScript:"";class H extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==F?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Y extends P{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=B(this,t,e,0))&&void 0!==i?i:F)===U)return;const o=this._$AH,s=t===F&&o!==F||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==F&&(o===F||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const Q=u.litHtmlPolyfillSupport;null==Q||Q(R,G),(null!==(g=u.litHtmlVersions)&&void 0!==g?g:u.litHtmlVersions=[]).push("2.4.0");
44
- /**
45
- * @license
46
- * Copyright 2020 Google LLC
47
- * SPDX-License-Identifier: BSD-3-Clause
48
- */
49
- const V=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t._$litStatic$},tt=t=>({_$litStatic$:t,r:V}),et=new Map,it=(t=>(e,...i)=>{const o=i.length;let s,n;const r=[],l=[];let a,h=0,f=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(n=i[h],s=X(n));)a+=s+e[++h],f=!0;l.push(n),r.push(a),h++}if(h===o&&r.push(e[o]),f){const t=r.join("$$lit$$");void 0===(e=et.get(t))&&(r.raw=r,et.set(t,e=r)),i=l}return t(e,...i)})(M);var ot;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ot||(ot={}));const st=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),nt=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),rt={fontFamily:nt,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},lt=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",st),at=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",rt.fontSize,"20px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",rt.fontWeight,"normal"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",rt.letterSpacing,"0.15px"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",rt.lineHeight,"1.2"),ct=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",rt.textTransform,"inherit"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",st),xt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",rt.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",rt.fontWeight,"normal"),vt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",rt.letterSpacing,"0.105px"),yt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",rt.lineHeight,"1.7"),ut=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",rt.textTransform,"inherit"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",nt),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",rt.fontSize,"16px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",rt.fontWeight,"600"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",rt.letterSpacing,"0.144px"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",rt.lineHeight,"1.5"),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",rt.textTransform,"inherit"),It=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",nt),Nt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",rt.fontSize,"14px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",rt.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",rt.letterSpacing,"0.098px"),St=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",rt.lineHeight,"1.7"),Tt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",rt.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",nt),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",rt.fontSize,"16px"),Et=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",rt.fontWeight,"normal"),_t=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",rt.letterSpacing,"0.496px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",rt.lineHeight,"1.5"),Ut=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",rt.textTransform,"inherit"),Ft=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",nt),Wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",rt.fontSize,"14px"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",rt.fontWeight,"normal"),Zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",rt.letterSpacing,"0.252px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",rt.lineHeight,"1.4"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",rt.textTransform,"inherit"),Kt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",nt),Gt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",rt.fontSize,"12px"),Pt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",rt.fontWeight,"normal"),Dt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",rt.letterSpacing,"0.396px"),qt=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",rt.lineHeight,"1.33"),Ht=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",rt.textTransform,"inherit"),Yt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",nt),Jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",rt.fontSize,"10px"),Qt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",rt.fontWeight,"normal"),Vt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",rt.letterSpacing,"0.33px"),Xt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",rt.lineHeight,"1.6"),te=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",rt.textTransform,"inherit"),ee=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",nt),ie=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",rt.fontSize,"10px"),oe=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",rt.fontWeight,"normal"),se=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",rt.letterSpacing,"1.5px"),ne=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",rt.lineHeight,"1.6"),re=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",rt.textTransform,"uppercase"),le=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",nt),ae=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",rt.fontSize,"14px"),he=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",rt.fontWeight,"600"),fe=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",rt.letterSpacing,"1.246px"),pe=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",rt.lineHeight,"1.15"),ce=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",rt.textTransform,"uppercase"),de=i.css`
50
- .ft-typography--title {
51
- font-family: ${lt};
52
- font-size: ${at};
53
- font-weight: ${ht};
54
- letter-spacing: ${ft};
55
- line-height: ${pt};
56
- text-transform: ${ct};
57
- }
58
- `,xe=i.css`
59
- .ft-typography--title-dense {
60
- font-family: ${dt};
61
- font-size: ${xt};
62
- font-weight: ${gt};
63
- letter-spacing: ${vt};
64
- line-height: ${yt};
65
- text-transform: ${ut};
66
- }
67
- `,ge=i.css`
68
- .ft-typography--subtitle1 {
69
- font-family: ${mt};
70
- font-size: ${bt};
71
- font-weight: ${$t};
72
- letter-spacing: ${wt};
73
- line-height: ${kt};
74
- text-transform: ${zt};
75
- }
76
- `,ve=i.css`
77
- .ft-typography--subtitle2 {
78
- font-family: ${It};
79
- font-size: ${Nt};
80
- font-weight: ${Ot};
81
- letter-spacing: ${jt};
82
- line-height: ${St};
83
- text-transform: ${Tt};
84
- }
85
-
86
- `,ye=i.css`
87
- .ft-typography--body1 {
88
- font-family: ${At};
89
- font-size: ${Ct};
90
- font-weight: ${Et};
91
- letter-spacing: ${_t};
92
- line-height: ${Mt};
93
- text-transform: ${Ut};
94
- }
95
- `,ue=i.css`
96
- .ft-typography--body2 {
97
- font-family: ${Ft};
98
- font-size: ${Wt};
99
- font-weight: ${Lt};
100
- letter-spacing: ${Zt};
101
- line-height: ${Rt};
102
- text-transform: ${Bt};
103
- }
104
- `,me=i.css`
105
- .ft-typography--caption {
106
- font-family: ${Kt};
107
- font-size: ${Gt};
108
- font-weight: ${Pt};
109
- letter-spacing: ${Dt};
110
- line-height: ${qt};
111
- text-transform: ${Ht};
112
- }
113
- `,be=i.css`
114
- .ft-typography--breadcrumb {
115
- font-family: ${Yt};
116
- font-size: ${Jt};
117
- font-weight: ${Qt};
118
- letter-spacing: ${Vt};
119
- line-height: ${Xt};
120
- text-transform: ${te};
121
- }
122
- `,$e=i.css`
123
- .ft-typography--overline {
124
- font-family: ${ee};
125
- font-size: ${ie};
126
- font-weight: ${oe};
127
- letter-spacing: ${se};
128
- line-height: ${ne};
129
- text-transform: ${re};
130
- }
131
- `,we=i.css`
132
- .ft-typography--button {
133
- font-family: ${le};
134
- font-size: ${ae};
135
- font-weight: ${he};
136
- letter-spacing: ${fe};
137
- line-height: ${pe};
138
- text-transform: ${ce};
139
- }
140
- `,ke=i.css`
141
- .ft-typography {
142
- vertical-align: inherit;
143
- }
144
- `;var ze=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ie extends e.FtLitElement{constructor(){super(...arguments),this.variant=ot.body1}render(){return this.element?it`
145
- <${tt(this.element)}
146
- class="ft-typography ft-typography--${this.variant}">
147
- <slot></slot>
148
- </${tt(this.element)}>
149
- `:it`
150
- <slot class="ft-typography ft-typography--${this.variant}"></slot>
151
- `}}Ie.styles=[de,xe,ge,ve,ye,ue,me,be,$e,we,ke],ze([o.property()],Ie.prototype,"element",void 0),ze([o.property()],Ie.prototype,"variant",void 0),e.customElement("ft-typography")(Ie);const Ne=e.FtCssVariableFactory.extend("--ft-notice-color",e.designSystemVariables.colorPrimary),Oe=e.FtCssVariableFactory.extend("--ft-notice-icon-color",e.designSystemVariables.colorOnPrimary),je=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design System"),Se=i.css`
152
- .ft-notice {
153
- display: inline-flex;
154
- align-items: stretch;
155
- box-sizing: border-box;
156
- }
157
-
158
- ft-icon {
159
- ${e.setVariable(c.size,"20px")};
160
- padding: 0 8px;
161
- display: flex;
162
- align-self: center;
163
- }
164
-
165
- .ft-icon {
166
- color: ${Oe};
167
- background-color: ${Ne};
168
- display: flex;
169
- align-items: center;
170
- border-top-left-radius: ${je};
171
- border-bottom-left-radius: ${je};
172
- }
173
-
174
- .ft-notice-label {
175
- padding: 8px;
176
- border-top-right-radius: ${je};
177
- border-bottom-right-radius: ${je};
178
- border: 1px solid ${Ne};
179
- }
180
- `;var Te=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ae extends e.FtLitElement{constructor(){super(...arguments),this.icon="info"}render(){return i.html`
181
- <div class="ft-notice">
182
- <div class="ft-icon">
183
- <ft-icon>${this.icon}</ft-icon>
82
+ `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let s=this.value||this.textContent;switch(this.variant){case E.file_format:this.resolvedIcon=null!==(t=T[s.toUpperCase()])&&void 0!==t?t:s;break;case E.fluid_topics:this.resolvedIcon=null!==(e=I[s.toUpperCase()])&&void 0!==e?e:s;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}A.elementDefinitions={},A.styles=M,W([s.property()],A.prototype,"variant",void 0),W([s.property()],A.prototype,"value",void 0),W([s.state()],A.prototype,"resolvedIcon",void 0),W([s.query("slot")],A.prototype,"slottedContent",void 0),e.customElement("ft-icon")(A);var U=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class G extends g{render(){var t;return this.map&&(this.error||this.content)?i.html`
83
+ <style>
84
+ @import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
85
+ </style>
86
+ <section class="topic" lang="${this.contentLocale}">
87
+ ${this.renderTopicContent()}
88
+ </section>
89
+ `:i.html`
90
+ <section class="topic-loading"></section>
91
+ `}updated(t){super.updated(t),t.has("tocNode")&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t)).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o;if(super.contentAvailableCallback(t),(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&this.tocId&&this.tocId===this.scrollTarget.tocId&&this.content){(null!==(s=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==s?s:this).scrollIntoView({block:"start"}),null===(o=this.stateManager)||void 0===o||o.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,r;if(this.error){let e=this.is404Error()?"topicMissingAdvice":"somethingWentWrong";return console.log("SERVICE : ",this.service),i.html`
92
+ <div class="topic-on-error">
93
+ <ft-icon>WARNING</ft-icon>
94
+ <div>${null===(t=this.service)||void 0===t?void 0:t.resolveLabel(e)}</div>
184
95
  </div>
185
- <ft-typography class="ft-notice-label" variant="body2">
186
- <slot></slot>
187
- </ft-typography>
96
+ `}const n=null!==(s=null===(e=this.map)||void 0===e?void 0:e.contentStyles.customCssClasses.join(" "))&&void 0!==s?s:"";return i.html`
97
+ <div class="depth-${null===(r=this.tocNode)||void 0===r?void 0:r.depth} content-locale-${this.contentLocale} ${n}">
98
+ ${o.unsafeHTML(`${this.content}`)}
188
99
  </div>
189
- `}}Ae.elementDefinitions={"ft-icon":y,"ft-typography":Ie},Ae.styles=Se,Te([o.property({type:String})],Ae.prototype,"icon",void 0),e.customElement("ft-notice")(Ae);const Ce=e.FtCssVariableFactory.create("--ft-skeleton--display","DISPLAY","block"),Ee=e.FtCssVariableFactory.create("--ft-skeleton--width","SIZE","100%"),_e=e.FtCssVariableFactory.create("--ft-skeleton--height","SIZE","20px"),Me=e.FtCssVariableFactory.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),Ue=e.FtCssVariableFactory.create("--ft-skeleton--glare-width","SIZE","200px"),Fe=e.FtCssVariableFactory.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),We=e.FtCssVariableFactory.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),Le=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusM,"Design system"),Ze=i.css`
190
- :host {
191
- width: ${Ee};
192
- height: ${_e};
193
- display: ${Ce};
194
- overflow: hidden;
195
- border-radius: ${Le};
196
- background: linear-gradient(
197
- 90deg,
198
- transparent,
199
- ${Fe} calc(0.45 * ${Ue}),
200
- ${Fe} calc(0.55 * ${Ue}),
201
- transparent ${Ue}
202
- ), ${Me};
203
- background-repeat: repeat-y;
204
- background-size: 100vw 100vh;
205
- background-attachment: fixed;
206
- background-position: calc(${Ue} * -1) 0;
207
- animation: shine ${We} infinite;
208
- animation-timing-function: linear;
209
- }
210
-
211
- @keyframes shine {
212
- to {
213
- background-position: calc(100vw + ${Ue}) 0, calc(${Ue} * -1) 0;
214
- }
215
- }
216
- `;class Re extends e.FtLitElement{render(){return i.html`
217
- `}}Re.elementDefinitions={},Re.styles=Ze,e.customElement("ft-skeleton")(Re);const Be=e.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",e.designSystemVariables.colorPrimary),Ke=i.css`
218
- a:focus {
219
- outline-color: ${Be};
220
- }
221
-
222
- .ft-reader-link--remove-style {
223
- text-decoration: none;
224
- color: inherit;
225
- }
226
- `;var Ge=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Pe extends p{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return i.html`
227
- <a class=${e}
228
- href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
229
- @click=${t=>this.onClick(t)}>
230
- <slot></slot>
231
- </a>
232
- `}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}Pe.styles=Ke,Ge([o.property()],Pe.prototype,"tocId",void 0),Ge([o.property()],Pe.prototype,"section",void 0),Ge([o.property({type:Number})],Pe.prototype,"pageNumber",void 0),Ge([o.property({type:Boolean})],Pe.prototype,"removeStyle",void 0),e.customElement("ft-reader-internal-link")(Pe);const De=i.css`
233
- .ft-reader-topic {
234
- box-sizing: border-box;
235
- }
236
-
237
- .loading-topic {
238
- height: 100vh;
239
- }
240
-
241
- ft-skeleton {
242
- margin: 8px 0;
243
- }
244
-
245
- .ft-reader-topic--content {
246
- max-width: 100%;
247
- overflow-x: auto;
248
- }
249
-
250
- img {
251
- max-width: 100%;
252
- }
253
-
254
- .ft-expanding-block-content,
255
- .ft-expanding-block-inline-content {
256
- display: none;
257
- }
258
-
259
- .ft-expanding-block-content.ft-expanding-block-expanded {
260
- display: block;
261
- }
262
-
263
- .ft-expanding-block-inline-content.ft-expanding-block-expanded {
264
- display: inline;
265
- }
266
- `;var qe=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class He extends p{constructor(){super(...arguments),this.tocId="",this.error=!1,this.displayLoading=!1,this.loadingDebouncer=new e.Debouncer(300)}render(){var t,e;if(this.error)return i.html`
267
- <div class="loading-topic" part="error">
268
- ${this.renderTitle()}
269
- <ft-notice part="error-notice" icon="warning" part="error-notice">
270
- An error occured.
271
- </ft-notice>
272
- </div>
273
- `;if(null==this.tocNode||null==this.content)return i.html`
274
- <div class="loading-topic" part="loader">
275
- ${this.renderTitle()}
276
- ${this.displayLoading?i.html`
277
- <ft-skeleton style="--ft-skeleton--width: 80%"></ft-skeleton>
278
- <ft-skeleton style="--ft-skeleton--width: 40%;--ft-skeleton--height: 200px"></ft-skeleton>
279
- <ft-skeleton style="--ft-skeleton--width: 50%"></ft-skeleton>
280
- <ft-skeleton style="--ft-skeleton--width: 70%"></ft-skeleton>
281
- <ft-skeleton style="--ft-skeleton--width: 30%"></ft-skeleton>
282
- `:i.nothing}
283
- </div>
284
- `;const o=null!==(e=null===(t=this.tocNode)||void 0===t?void 0:t.depth)&&void 0!==e?e:1;return i.html`
285
- <section class="ft-reader-topic readercontent-topic-depth-${o} depth-${o}" id="${this.tocId}"
286
- part="container">
287
- ${this.renderTitle()}
288
- <div class="ft-reader-topic--content topic" part="content">
289
- ${s.unsafeHTML(this.content)}
290
- </div>
291
- </section>
292
- `}renderTitle(){var t;return this.tocNode?i.html`
293
- <ft-typography variant="title" element="h${Math.min(this.tocNode.depth+1,6)}" part="title">
294
- ${null===(t=this.tocNode)||void 0===t?void 0:t.title}
295
- </ft-typography>
296
- `:!this.displayLoading||this.error?i.nothing:i.html`
297
- <ft-skeleton style="--ft-skeleton--width: 50%;--ft-skeleton--height: 24px; margin-bottom: 24px">
298
- </ft-skeleton>
299
- `}updated(t){var e;super.updated(t),t.has("tocId")&&this.tocId&&this.getTocNode(),t.has("tocNode")&&this.tocNode&&(null===(e=this.service)||void 0===e||e.getTopicContent(this.tocNode.contentId).then((t=>this.content=t)))}contentAvailableCallback(t){var e,i,o,s;if(super.contentAvailableCallback(t),(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&this.tocId&&this.tocId===this.scrollTarget.tocId&&this.content){(null!==(o=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.getTocNode()}async getTocNode(){var t;this.content=void 0,this.tocNode=void 0,this.error=!1,this.displayLoading=!1,this.loadingDebouncer.run((()=>this.displayLoading=!0)),null===(t=this.service)||void 0===t||t.getTocNode(this.tocId).then((t=>this.tocNode=t)).catch((t=>this.error=!0))}}He.styles=De,qe([o.property()],He.prototype,"tocId",void 0),qe([o.state()],He.prototype,"tocNode",void 0),qe([o.state()],He.prototype,"content",void 0),qe([o.query(".ft-reader-topic")],He.prototype,"container",void 0),qe([e.redux()],He.prototype,"scrollTarget",void 0),qe([o.state()],He.prototype,"error",void 0),qe([o.state()],He.prototype,"displayLoading",void 0),e.customElement("ft-reader-topic")(He);const Ye=e.FtCssVariableFactory.create("--ft-infinite-scroll-padding","SIZE","0"),Je=i.css`
100
+ `}is404Error(){return 404===this.error.status}}G.styles=j,U([e.redux((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.lang}))],G.prototype,"contentLocale",void 0),U([e.redux()],G.prototype,"map",void 0),U([e.redux()],G.prototype,"scrollTarget",void 0),U([s.state()],G.prototype,"content",void 0),U([s.state()],G.prototype,"error",void 0),e.customElement("ft-reader-topic-content")(G);var L=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class B extends e.FtLitElement{constructor(){super(...arguments),this.tocId=""}render(){return i.html`
101
+ <ft-reader-topic-context tocId="${this.tocId}">
102
+ <ft-reader-topic-title></ft-reader-topic-title>
103
+ <ft-reader-topic-content></ft-reader-topic-content>
104
+ </ft-reader-topic-context>
105
+ `}}B.elementDefinitions={"ft-reader-topic-context":p,"ft-reader-topic-title":y,"ft-reader-topic-content":G},B.styles=c,L([s.property()],B.prototype,"tocId",void 0),e.customElement("ft-reader-topic")(B);const D=e.FtCssVariableFactory.create("--ft-infinite-scroll-padding","SIZE","0"),P=i.css`
300
106
  .items-container {
301
107
  position: relative;
302
- padding: ${Ye};
108
+ padding: ${D};
303
109
  outline: none;
304
110
  }
305
111
 
@@ -329,22 +135,22 @@ const V=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
329
135
  .resizable:not(.rendered) {
330
136
  width: 0;
331
137
  }
332
- `;var Qe=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ve extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class Xe extends Event{constructor(){super("scrolled-to-target")}}class ti extends e.FtLitElement{constructor(){super(...arguments),this.items=[],this.renderItem=()=>i.html``,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e.Debouncer(5),this.onVisibilityChange=t=>{const e=t.filter((t=>t.intersectionRect.height>1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>!this.visibleItems.includes(t))),i=t.filter((t=>t.intersectionRect.height<=1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>this.visibleItems.includes(t))),o=[...this.visibleItems].filter((t=>!i.includes(t)));this.visibleItems=[...e,...o].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let i=0;t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index"),o=e.target.parentElement.clientHeight,s=e.contentRect.height;this.alreadyRenderedIndexes.has(t)&&(e.target.parentElement.style.height=s+"px",i+=this.scrollable&&this.getOffset(e.target.parentElement)<this.scrollable.scrollTop+i?s-o:0)}this.scrollable&&e.isSafari&&(this.scrollable.scrollTop+=i)},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.intersectionObserver.observe(t),this.resizeObserver.observe(t.children.item(0))}))},this.mutationObserver=new MutationObserver(this.onMutation)}get scrollable(){return this.internalScroll?this.internalScrollable:this.firstScrollableParent}render(){return i.html`
138
+ `;var R=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class F extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class K extends Event{constructor(){super("scrolled-to-target")}}class q extends e.FtLitElement{constructor(){super(...arguments),this.items=[],this.renderItem=()=>i.html``,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e.Debouncer(5),this.onVisibilityChange=t=>{const e=t.filter((t=>t.intersectionRect.height>1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>!this.visibleItems.includes(t))),i=t.filter((t=>t.intersectionRect.height<=1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>this.visibleItems.includes(t))),s=[...this.visibleItems].filter((t=>!i.includes(t)));this.visibleItems=[...e,...s].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let i=0;t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));for(const e of t){const t=+e.target.parentElement.getAttribute("data-item-index"),s=e.target.parentElement.clientHeight,o=e.contentRect.height;this.alreadyRenderedIndexes.has(t)&&(e.target.parentElement.style.height=o+"px",i+=this.scrollable&&this.getOffset(e.target.parentElement)<this.scrollable.scrollTop+i?o-s:0)}this.scrollable&&e.isSafari&&(this.scrollable.scrollTop+=i)},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.intersectionObserver.observe(t),this.resizeObserver.observe(t.children.item(0))}))},this.mutationObserver=new MutationObserver(this.onMutation)}get scrollable(){return this.internalScroll?this.internalScrollable:this.firstScrollableParent}render(){return i.html`
333
139
  <div class="items-container ${this.internalScroll?"scrollable":""}"
334
140
  tabindex="-1"
335
141
  @find-scrollable-parent=${this.findScrollableParent}>
336
142
  ${r.repeat(this.items,((t,e)=>this.renderItemContainer(t,e)))}
337
143
  </div>
338
- `}renderItemContainer(t,e){const o=this.scrolledToTarget&&this.visibleItems.includes(e),n=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(r=this.visibleItems)?r:[])[(null!=r?r:[]).length-1]+this.renderAfterLast;var r;n&&this.alreadyRenderedIndexes.add(e);return i.html`
144
+ `}renderItemContainer(t,e){const s=this.scrolledToTarget&&this.visibleItems.includes(e),r=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(n=this.visibleItems)?n:[])[(null!=n?n:[]).length-1]+this.renderAfterLast;var n;r&&this.alreadyRenderedIndexes.add(e);return i.html`
339
145
  <div id="item-${e}"
340
146
  class="item-container"
341
147
  data-item-index="${e}">
342
- <div class="resizable ${o?"visible":""} ${n?"rendered":""}">
343
- ${n?(()=>{const o=this.renderItem(t,e);return"string"==typeof o?i.html`${s.unsafeHTML(o)}`:o})():null}
148
+ <div class="resizable ${s?"visible":""} ${r?"rendered":""}">
149
+ ${r?(()=>{const s=this.renderItem(t,e);return"string"==typeof s?i.html`${o.unsafeHTML(s)}`:s})():null}
344
150
  </div>
345
151
  </div>
346
- `}resetScroll(){this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t,e;let i=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;i>=this.items.length&&(i=-1);let o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${i}`);this.scrollToTarget(o),this.onMutation(),setTimeout((()=>{this.scrolledToTarget=!0}),10)}))}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable?this.scrollable.scrollTop=i>0?this.getOffset(t)+1:0:t.scrollIntoView({block:"start"})}}getOffset(t){var e;let i=0,o=t;for(;o&&o.offsetParent!==this.scrollable.offsetParent;)i+=o.offsetTop,o=o.offsetParent;return i+(null!==(e=null==o?void 0:o.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{rootMargin:"-2px",threshold:[0,.01,.1]}),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}triggerFindScrollableParent(){this.itemsContainer.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){t.stopPropagation();for(let e of t.composedPath()){const t=e;if(t.clientHeight&&t.clientHeight<t.scrollHeight&&["auto","scroll"].includes(getComputedStyle(t).overflowY)){this.firstScrollableParent=t;break}}}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),(t.has("scrollToItem")||t.has("scrollToIndex"))&&this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.dispatchEvent(new Ve(this.visibleItems,this.visibleItems.map((t=>this.items[t])))),t.has("scrolledToTarget")&&this.scrolledToTarget&&this.dispatchEvent(new Xe)}}ti.styles=Je,Qe([o.property({type:Array})],ti.prototype,"items",void 0),Qe([o.property({attribute:!1})],ti.prototype,"renderItem",void 0),Qe([o.property({type:Object})],ti.prototype,"scrollToItem",void 0),Qe([o.property({type:Number})],ti.prototype,"scrollToIndex",void 0),Qe([o.property({type:Boolean})],ti.prototype,"internalScroll",void 0),Qe([o.property({type:Number})],ti.prototype,"renderBeforeFirst",void 0),Qe([o.property({type:Number})],ti.prototype,"renderAfterLast",void 0),Qe([o.state({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],ti.prototype,"visibleItems",void 0),Qe([o.query(".scrollable")],ti.prototype,"internalScrollable",void 0),Qe([o.query(".items-container")],ti.prototype,"itemsContainer",void 0),Qe([o.state()],ti.prototype,"scrolledToTarget",void 0),e.customElement("ft-infinite-scroll")(ti);const ei=i.css`
347
- `;var ii=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class oi extends p{constructor(){super(...arguments),this.renderTopic=t=>i.html`
152
+ `}resetScroll(){this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t,e;let i=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;i>=this.items.length&&(i=-1);let s=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${i}`);this.scrollToTarget(s),this.onMutation(),setTimeout((()=>{this.scrolledToTarget=!0}),10)}))}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable?this.scrollable.scrollTop=i>0?this.getOffset(t)+1:0:t.scrollIntoView({block:"start"})}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{rootMargin:"-2px",threshold:[0,.01,.1]}),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}triggerFindScrollableParent(){this.itemsContainer.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){t.stopPropagation();for(let e of t.composedPath()){const t=e;if(t.clientHeight&&t.clientHeight<t.scrollHeight&&["auto","scroll"].includes(getComputedStyle(t).overflowY)){this.firstScrollableParent=t;break}}}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),(t.has("scrollToItem")||t.has("scrollToIndex"))&&this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.dispatchEvent(new F(this.visibleItems,this.visibleItems.map((t=>this.items[t])))),t.has("scrolledToTarget")&&this.scrolledToTarget&&this.dispatchEvent(new K)}}q.styles=P,R([s.property({type:Array})],q.prototype,"items",void 0),R([s.property({attribute:!1})],q.prototype,"renderItem",void 0),R([s.property({type:Object})],q.prototype,"scrollToItem",void 0),R([s.property({type:Number})],q.prototype,"scrollToIndex",void 0),R([s.property({type:Boolean})],q.prototype,"internalScroll",void 0),R([s.property({type:Number})],q.prototype,"renderBeforeFirst",void 0),R([s.property({type:Number})],q.prototype,"renderAfterLast",void 0),R([s.state({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],q.prototype,"visibleItems",void 0),R([s.query(".scrollable")],q.prototype,"internalScrollable",void 0),R([s.query(".items-container")],q.prototype,"itemsContainer",void 0),R([s.state()],q.prototype,"scrolledToTarget",void 0),e.customElement("ft-infinite-scroll")(q);const Z=i.css`
153
+ `;var _=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class V extends a{constructor(){super(...arguments),this.renderTopic=t=>i.html`
348
154
  <ft-reader-topic tocId="${t}" .exportpartsPrefix=${"topic"}></ft-reader-topic>
349
155
  `,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e.Debouncer(100)}render(){var t;return i.html`
350
156
  <ft-infinite-scroll class="ft-reader-content"
@@ -359,4 +165,4 @@ const V=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
359
165
  >
360
166
 
361
167
  </ft-infinite-scroll>
362
- `}getScrollTarget(){var t,e,i,o,s;const n=null!==(o=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==o&&o;return!(null===(s=this.scrollTarget)||void 0===s?void 0:s.tocId)||n&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;null==(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)&&(null===(e=this.stateManager)||void 0===e||e.scrollDone())}}oi.elementDefinitions={"ft-infinite-scroll":ti},oi.styles=ei,ii([o.property()],oi.prototype,"renderTopic",void 0),ii([e.redux()],oi.prototype,"currentPage",void 0),ii([e.redux()],oi.prototype,"scrollTarget",void 0),ii([e.redux()],oi.prototype,"visibleTopics",void 0),ii([e.redux()],oi.prototype,"renderBeforeFirst",void 0),ii([e.redux()],oi.prototype,"renderAfterLast",void 0),ii([o.query(".ft-reader-content")],oi.prototype,"container",void 0),e.customElement("ft-reader-content")(oi),t.FtReaderContent=oi,t.FtReaderContentCssVariables={},t.styles=ei,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);
168
+ `}getScrollTarget(){var t,e,i,s,o;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(o=this.scrollTarget)||void 0===o?void 0:o.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;null==(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)&&(null===(e=this.stateManager)||void 0===e||e.scrollDone())}}V.elementDefinitions={"ft-infinite-scroll":q},V.styles=Z,_([s.property()],V.prototype,"renderTopic",void 0),_([e.redux()],V.prototype,"currentPage",void 0),_([e.redux()],V.prototype,"scrollTarget",void 0),_([e.redux()],V.prototype,"visibleTopics",void 0),_([e.redux()],V.prototype,"renderBeforeFirst",void 0),_([e.redux()],V.prototype,"renderAfterLast",void 0),_([s.query(".ft-reader-content")],V.prototype,"container",void 0),e.customElement("ft-reader-content")(V),t.FtReaderContent=V,t.FtReaderContentCssVariables={},t.styles=Z,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litRepeat);