@fluid-topics/ft-reader-topic-content 1.1.70 → 1.1.71
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
|
-
|
|
1
|
+
"use strict";(()=>{var Ye=Object.create;var ue=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fe=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qe(t))!Qe.call(e,o)&&o!==i&&ue(e,o,{get:()=>t[o],enumerable:!(r=Ze(t,o))||r.enumerable});return e};var p=(e,t,i)=>(i=e!=null?Ye(Je(e)):{},Fe(t||!e||!e.__esModule?ue(i,"default",{value:e,enumerable:!0}):i,e));var m=W((pt,xe)=>{xe.exports=ftGlobals.wcUtils});var g=W((ct,ve)=>{ve.exports=ftGlobals.lit});var _=W((ft,ge)=>{ge.exports=ftGlobals.litDecorators});var le=W((At,Oe)=>{Oe.exports=ftGlobals.litUnsafeHTML});var Xe=p(m());var P=p(g());var Ce=p(g()),U=p(m()),Ae={colorError:U.FtCssVariableFactory.external(U.designSystemVariables.colorError,"Design system"),fontFamily:U.FtCssVariableFactory.external(U.designSystemVariables.contentFont,"Design system")},Ee=Ce.css`
|
|
2
2
|
.topic {
|
|
3
|
-
font-family: ${
|
|
3
|
+
font-family: ${Ae.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: ${
|
|
13
|
+
color: ${Ae.colorError}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.topic-loading {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
white-space: pre-wrap;
|
|
22
22
|
word-break: break-word;
|
|
23
23
|
}
|
|
24
|
-
`;var r;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(r||(r={}));var l=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class c extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class d extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new c)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=h,l([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}var x=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class u extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const v=Symbol("registerInterval");class p extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[v]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[v]):this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=v,x([s.state()],i.prototype,"tocNode",void 0),x([s.state()],i.prototype,"disableContextInteractions",void 0),i}(d)){}var f,m;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE="",t.OCTAGON_XMARK="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CONSUMER="",t.HOURGLASS_HALF="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE=""}(f||(f={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(m||(m={})),new Map([...["abw"].map((t=>[t,m.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,m.AUDIO])),...["avi"].map((t=>[t,m.AVI])),...["chm","xhs"].map((t=>[t,m.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,m.CODE])),...["csv"].map((t=>[t,m.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,m.DITA])),...["epub"].map((t=>[t,m.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,m.EXCEL])),...["flac"].map((t=>[t,m.FLAC])),...["gif"].map((t=>[t,m.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,m.GZIP])),...["html","htm","xhtml"].map((t=>[t,m.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,m.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,m.JPEG])),...["json"].map((t=>[t,m.JSON])),...["m4a","m4p"].map((t=>[t,m.M4A])),...["mov","qt"].map((t=>[t,m.MOV])),...["mp3"].map((t=>[t,m.MP3])),...["mp4","m4v"].map((t=>[t,m.MP4])),...["ogg","oga"].map((t=>[t,m.OGG])),...["pdf","ps"].map((t=>[t,m.PDF])),...["png"].map((t=>[t,m.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,m.POWERPOINT])),...["rar"].map((t=>[t,m.RAR])),...["stp"].map((t=>[t,m.STP])),...["txt","rtf","md","mdown"].map((t=>[t,m.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,m.VIDEO])),...["wav"].map((t=>[t,m.WAV])),...["wma"].map((t=>[t,m.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,m.WORD])),...["xml","xsl","rdf"].map((t=>[t,m.XML])),...["yaml","yml","x-yaml"].map((t=>[t,m.YAML])),...["zip"].map((t=>[t,m.ZIP]))]),m.ABW,m.AUDIO,m.AVI,m.CHM,m.CODE,m.CSV,m.DITA,m.EPUB,m.EXCEL,m.FLAC,m.GIF,m.GZIP,m.HTML,m.IMAGE,m.JPEG,m.JSON,m.M4A,m.MOV,m.MP3,m.MP4,m.OGG,m.PDF,m.PNG,m.POWERPOINT,m.RAR,m.STP,m.TEXT,m.UNKNOWN,m.VIDEO,m.WAV,m.WMA,m.WORD,m.XML,m.YAML,m.ZIP;const b=e.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),w=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),g=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),y=e.FtCssVariableFactory.extend("--ft-icon-material-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),C=e.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset"),k=i.css`
|
|
24
|
+
`;var se=p(_());var be=p(m()),_e=p(_());var Se;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Se||(Se={}));var et=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},ae=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},oe=Symbol("registerInterval");function tt(e){var t;class i extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(o){this.clearStateManager(),this.stateManager=o,this.addStore(o.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var o;return(o=this.stateManager)===null||o===void 0?void 0:o.service}connectedCallback(){super.connectedCallback(),this[oe]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[oe]):this.dispatchEvent(new ae)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=oe,et([(0,_e.state)()],i.prototype,"stateManager",void 0),i}var I=class extends tt(be.FtLitElementRedux){};var ye=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},ne=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},re=Symbol("registerInterval");function it(e){var t;class i extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this[t]=0}connectedCallback(){super.connectedCallback(),this[re]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[re]):this.dispatchEvent(new ne)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=re,ye([(0,se.state)()],i.prototype,"tocNode",void 0),ye([(0,se.state)()],i.prototype,"disableContextInteractions",void 0),i}var K=class extends it(I){};var ze=p(le()),L=p(m()),N=p(_());var we=p(m());var B=p(g()),w=p(_()),Le=p(m()),Ne=p(le());var j;(function(e){e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.STAR="",e.STAR_PLAIN="",e.DESKTOP="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.ARROW_RIGHT_TO_LINE="",e.THIN_ARROW_UP="",e.CONTEXTUAL="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_NORMALIZED="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.UNSTRUCTURED_DOC="",e.RESET="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.MY_COLLECTIONS="",e.OFFLINE_SETTINGS="",e.MY_LIBRARY="",e.RATE_PLAIN="",e.RATE="",e.FEEDBACK_PLAIN="",e.PAUSE="",e.PLAY="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.SHORTCUT_MENU="",e.PRINT="",e.DEFAULT_ROLES="",e.ACCOUNT_SETTINGS="",e.ONLINE="",e.OFFLINE="",e.UPLOAD="",e.BOOK_PLAIN="",e.SYNC="",e.SHARED_PBK="",e.COLLECTIONS="",e.SEARCH_IN_PUBLICATION="",e.BOOKS="",e.LOCKER="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SAVE="",e.MAILS_AND_NOTIFICATIONS="",e.DOT="",e.MINUS="",e.PLUS="",e.FILTERS="",e.STRIPE_ARROW_RIGHT="",e.STRIPE_ARROW_LEFT="",e.ATTACHMENTS="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.EXPORT="",e.MENU="",e.TAG="",e.TAG_PLAIN="",e.COPY_TO_CLIPBOARD="",e.COLUMNS="",e.ARTICLE="",e.CLOSE="",e.OCTAGON_XMARK="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.LOGOUT="",e.SIGN_IN="",e.THIN_ARROW="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.FACET_HAS_DESCENDANT="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.INFO="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.SHARE="󨃱",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.EXTLINK="",e.EXTLINK_LIGHT="",e.CALENDAR="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.TOPICS="",e.EYE="",e.EYE_SLASH="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN_THEME="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.HOME="",e.TRANSLATE="",e.USER="",e.ADMIN="",e.ANALYTICS="",e.ADMIN_KHUB="",e.ADMIN_USERS="",e.ADMIN_INTEGRATION="",e.ADMIN_PORTAL="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.PIP="",e.PIP_WIDE="",e.EXPAND_WIDE="",e.X_MARK="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CONSUMER="",e.HOURGLASS_HALF="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE=""})(j||(j={}));var s;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(s||(s={}));var Ct=new Map([...["abw"].map(e=>[e,s.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,s.AUDIO]),...["avi"].map(e=>[e,s.AVI]),...["chm","xhs"].map(e=>[e,s.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,s.CODE]),...["csv"].map(e=>[e,s.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,s.DITA]),...["epub"].map(e=>[e,s.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,s.EXCEL]),...["flac"].map(e=>[e,s.FLAC]),...["gif"].map(e=>[e,s.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,s.GZIP]),...["html","htm","xhtml"].map(e=>[e,s.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,s.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,s.JPEG]),...["json"].map(e=>[e,s.JSON]),...["m4a","m4p"].map(e=>[e,s.M4A]),...["mov","qt"].map(e=>[e,s.MOV]),...["mp3"].map(e=>[e,s.MP3]),...["mp4","m4v"].map(e=>[e,s.MP4]),...["ogg","oga"].map(e=>[e,s.OGG]),...["pdf","ps"].map(e=>[e,s.PDF]),...["png"].map(e=>[e,s.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,s.POWERPOINT]),...["rar"].map(e=>[e,s.RAR]),...["stp"].map(e=>[e,s.STP]),...["txt","rtf","md","mdown"].map(e=>[e,s.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,s.VIDEO]),...["wav"].map(e=>[e,s.WAV]),...["wma"].map(e=>[e,s.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,s.WORD]),...["xml","xsl","rdf"].map(e=>[e,s.XML]),...["yaml","yml","x-yaml"].map(e=>[e,s.YAML]),...["zip"].map(e=>[e,s.ZIP])]);var Et={[s.ABW]:"#91ABC6",[s.AUDIO]:"#1795E3",[s.AVI]:"#E63324",[s.CHM]:"#71C3EB",[s.CODE]:"#71C3EB",[s.CSV]:"#1F7345",[s.DITA]:"#71C3EB",[s.EPUB]:"#85B926",[s.EXCEL]:"#1F7345",[s.FLAC]:"#1795E3",[s.GIF]:"#59B031",[s.GZIP]:"#F8AB36",[s.HTML]:"#71C3EB",[s.IMAGE]:"#59B031",[s.JPEG]:"#59B031",[s.JSON]:"#71C3EB",[s.M4A]:"#1795E3",[s.MOV]:"#E63324",[s.MP3]:"#1795E3",[s.MP4]:"#E63324",[s.OGG]:"#1795E3",[s.PDF]:"#E44948",[s.PNG]:"#59B031",[s.POWERPOINT]:"#B54A2B",[s.RAR]:"#F8AB36",[s.STP]:"#3764B1",[s.TEXT]:"#3162AB",[s.UNKNOWN]:"#999999",[s.VIDEO]:"#E63324",[s.WAV]:"#1795E3",[s.WMA]:"#1795E3",[s.WORD]:"#3162AB",[s.XML]:"#71C3EB",[s.YAML]:"#71C3EB",[s.ZIP]:"#F8AB36"};var Te=p(g()),b=p(m()),S={size:b.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:b.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",b.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:b.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",b.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:b.FtCssVariableFactory.extend("--ft-icon-material-font-family","",b.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:b.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Re=Te.css`
|
|
25
25
|
:host, i.ft-icon {
|
|
26
26
|
display: inline-flex;
|
|
27
27
|
align-items: center;
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:host {
|
|
33
|
-
width: ${
|
|
34
|
-
height: ${
|
|
33
|
+
width: ${S.size};
|
|
34
|
+
height: ${S.size};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
i.ft-icon {
|
|
38
38
|
width: 100%;
|
|
39
39
|
height: 100%;
|
|
40
|
-
font-size: ${
|
|
40
|
+
font-size: ${S.size};
|
|
41
41
|
line-height: 1;
|
|
42
42
|
font-weight: normal;
|
|
43
43
|
text-transform: none;
|
|
@@ -48,58 +48,58 @@
|
|
|
48
48
|
text-rendering: auto;
|
|
49
49
|
-webkit-font-smoothing: antialiased;
|
|
50
50
|
-moz-osx-font-smoothing: grayscale;
|
|
51
|
-
vertical-align: ${
|
|
51
|
+
vertical-align: ${S.verticalAlign};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
i.ft-icon.ft-icon--fluid-topics {
|
|
55
|
-
font-family: ${
|
|
55
|
+
font-family: ${S.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
56
56
|
|
|
57
57
|
/* Ugly fix because font is broken */
|
|
58
|
-
font-size: calc(0.75 * ${
|
|
59
|
-
line-height: ${
|
|
58
|
+
font-size: calc(0.75 * ${S.size});
|
|
59
|
+
line-height: ${S.size};
|
|
60
60
|
position: relative;
|
|
61
61
|
top: -4%;
|
|
62
62
|
justify-content: center;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ft-icon--file-format {
|
|
66
|
-
font-family: ${
|
|
66
|
+
font-family: ${S.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.ft-icon--material {
|
|
70
|
-
font-family: ${
|
|
70
|
+
font-family: ${S.materialFontFamily}, "Material Icons", sans-serif;
|
|
71
71
|
}
|
|
72
|
-
`;var
|
|
72
|
+
`;var y;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(y||(y={}));var V=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},E=class extends Le.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=B.nothing}render(){let t=this.variant&&Object.values(y).includes(this.variant)?this.variant:y.fluid_topics,i=t!==y.material||!!this.value;return B.html`
|
|
73
73
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
74
|
-
${
|
|
75
|
-
<slot ?hidden=${
|
|
74
|
+
${(0,Ne.unsafeHTML)(this.resolvedIcon)}
|
|
75
|
+
<slot ?hidden=${i}></slot>
|
|
76
76
|
</i>
|
|
77
|
-
`}get textContent(){var t,
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
`}get textContent(){var t,i;return(i=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&i!==void 0?i:""}update(t){super.update(t),["value","variant"].some(i=>t.has(i))&&this.resolveIcon()}resolveIcon(){var t,i;let r=this.value||this.textContent;switch(this.variant){case y.file_format:this.resolvedIcon=(t=s[r.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:r;break;case y.material:this.resolvedIcon=this.value||B.nothing;break;default:this.resolvedIcon=(i=j[r.replace("-","_").toUpperCase()])!==null&&i!==void 0?i:r;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};E.elementDefinitions={};E.styles=Re;V([(0,w.property)()],E.prototype,"variant",void 0);V([(0,w.property)()],E.prototype,"value",void 0);V([(0,w.state)()],E.prototype,"resolvedIcon",void 0);V([(0,w.query)("slot")],E.prototype,"slottedContent",void 0);(0,we.customElement)("ft-icon")(E);var $e=p(m());var F=p(g()),ee=p(_()),te=p(m());var Me=p(g());var Pe=Me.css`
|
|
78
|
+
`;var Q=p(m());var Ie=p(m());var He=p(g()),x=p(_()),A=p(m());var Ue=p(g());var De=Ue.css`
|
|
79
|
+
`;var Be=p(m()),ot="ft-app-info",at={},c=Be.FtReduxStore.get({name:ot,reducers:at,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var T=p(m());var pe=p(m());var M=class e{static get(t){let{baseUrl:i,apiIntegrationIdentifier:r}=c.getState(),o=t??r;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static await(t){return new Promise(i=>{let r=e.get(t);if(r)i(r);else{let o=c.subscribe(()=>{r=e.get(t),r&&(o(),i(r))})}})}};var O=class{constructor(t=!0,i){var r;this.overrideApi=i;let o=this.constructor;o.commonCache=(r=o.commonCache)!==null&&r!==void 0?r:new pe.CacheRegistry,this.cache=t?o.commonCache:new pe.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:M.get()}get awaitApi(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:M.await()}clearCache(){this.cache.clearAll()}};var Ge,rt=Symbol("clearAfterUnitTest"),$=class extends O{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ge]=()=>{this.defaultMessages={},this.cache=new T.CacheRegistry,this.listeners={}},this.currentUiLocale=c.getState().uiLocale,c.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=c.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var r;if(t=t.toLowerCase(),Object.keys(i).length>0){let o={...(r=this.defaultMessages[t])!==null&&r!==void 0?r:{},...i};(0,T.deepEqual)(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...r){var o,a,n;t=t.toLowerCase(),this.fetchContext(t);let l=(a=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&a!==void 0?a:{};return new T.ParametrizedLabelResolver((n=this.defaultMessages[t])!==null&&n!==void 0?n:{},l).resolve(i,...r)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(i){console.error(i)}}subscribe(t,i){var r;return t=t.toLowerCase(),this.listeners[t]=(r=this.listeners[t])!==null&&r!==void 0?r:new Set,this.listeners[t].add(i),()=>{var o;return(o=this.listeners[t])===null||o===void 0?void 0:o.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,T.delay)(0).then(()=>i()).catch(()=>null)))}};Ge=rt;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ${constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ${constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var D=window.FluidTopicsI18nService,ke=window.FluidTopicsCustomI18nService;var h=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},f=class extends A.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>M.get(),this.messageContexts=[],this.cache=new A.CacheRegistry,this.cleanSessionDebouncer=new A.Debouncer}render(){return He.html`
|
|
80
80
|
<slot></slot>
|
|
81
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(
|
|
81
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(c.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&c.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&c.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&c.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&c.actions.noCustom(this.noCustom),t.has("editorMode")&&c.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&c.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&c.actions.session(this.session),t.has("availableUiLocales")&&c.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>D.addContext(i)),t.has("openExternalDocumentInNewTab")&&c.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&c.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&c.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};f.elementDefinitions={};f.styles=De;h([(0,x.property)()],f.prototype,"baseUrl",void 0);h([(0,x.property)()],f.prototype,"apiIntegrationIdentifier",void 0);h([(0,x.property)()],f.prototype,"uiLocale",void 0);h([(0,A.jsonProperty)(null)],f.prototype,"availableUiLocales",void 0);h([(0,A.jsonProperty)(null)],f.prototype,"metadataConfiguration",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"editorMode",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"noCustom",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"openExternalDocumentInNewTab",void 0);h([(0,x.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],f.prototype,"noCustomComponent",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"withManualResources",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"navigatorOnline",void 0);h([(0,x.property)({type:Boolean})],f.prototype,"forcedOffline",void 0);h([(0,x.property)({type:Object})],f.prototype,"apiProvider",void 0);h([(0,A.jsonProperty)([])],f.prototype,"messageContexts",void 0);h([(0,A.jsonProperty)(void 0)],f.prototype,"session",void 0);var Z=p(m());var z=class extends O{async listMySearches(){let t=c.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var X=class extends O{async listMyBookmarks(){let t=c.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var st="ft-user-assets",Y=Z.FtReduxStore.get({name:st,initialState:{savedSearches:void 0,bookmarks:void 0}}),ce=class{constructor(){this.currentSession=c.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new X,this.savedSearchesService=new z,c.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:i}=c.getState();(0,Z.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,i?.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Y.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Y.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Y.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let i=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Y.actions.bookmarks(i)}}},si=new ce;var de=class{addCommand(t,i=!1){c.commands.add(t,i)}consumeCommand(t){return c.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new de;var We=p(m()),fe=class{highlightHtml(t,i){(0,We.highlightHtml)(t,i)}};window.FluidTopicsHighlightHtmlService=new fe;(0,Ie.customElement)("ft-app-context")(f);var je=p(_()),nt=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},me=Symbol("i18nAttributes"),q=Symbol("i18nProperties"),G=Symbol("i18nUnsubs");function Ve(e){var t;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?ke:D}i18n(o,a,...n){var l;if(typeof o=="string")return this.i18nService.resolveMessage(o,a,...n);let d=(l=o.args)!==null&&l!==void 0?l:o.argsProvider?o.argsProvider(this):[];return this.i18nService.resolveMessage(o.context,o.key,...d)}onI18nUpdate(o){var a,n;(a=this[me])===null||a===void 0||a.forEach((l,d)=>{var v;let H=this.getI18nAttributeValue(d);((v=H?.context)===null||v===void 0?void 0:v.toLowerCase())===o.toLowerCase()&&this.updateI18nAttributeMessage(d,H,l)}),(n=this[q])===null||n===void 0||n.forEach((l,d)=>{l.context.toLowerCase()===o.toLowerCase()&&(this[d]=this.i18n(l))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(o,a,n){this[o]={...a,message:this.i18n({context:a.context,key:a.key,...n})}}update(o){var a,n;super.update(o),(a=this[me])===null||a===void 0||a.forEach((l,d)=>{let v=this.getI18nAttributeValue(d);v?.context&&v.key&&(o.has(d)||l.argsProvider!=null)&&(o.has(d)&&this.addI18nContext(v.context),this.updateI18nAttributeMessage(d,v,l))}),(n=this[q])===null||n===void 0||n.forEach((l,d)=>{l.argsProvider!=null&&(this[d]=this.i18n(l))})}getI18nAttributeValue(o){return this[o]}connectedCallback(){var o,a,n,l;super.connectedCallback(),new Set([...(a=(o=this[q])===null||o===void 0?void 0:o.values())!==null&&a!==void 0?a:[],...[...(l=(n=this[me])===null||n===void 0?void 0:n.keys())!==null&&l!==void 0?l:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(o,a){o=o.toLowerCase(),this[G].has(o)||this[G].set(o,this.i18nService.subscribe(o,()=>this.onI18nUpdate(o))),this.i18nService.prepareContext(o,a??{})}addI18nContext(o,a){this.addI18nMessages(typeof o=="string"?o:o.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[G].forEach(o=>o()),this[G].clear()}}return t=G,nt([(0,je.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var Ke=class extends Ve(Q.FtLitElement){},J=class extends Ve(Q.FtLitElementRedux){};var k=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},C=class extends J{constructor(){super(),this.editorMode=!1,this.addStore(c)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":F.nothing:F.html`
|
|
82
82
|
<span class="ft-i18n">
|
|
83
83
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
84
84
|
</span>
|
|
85
|
-
|
|
85
|
+
`}update(t){var i;super.update(t),["context","key","defaultMessage"].some(r=>t.has(r))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:(i=this.defaultMessage)!==null&&i!==void 0?i:""})}};C.elementDefinitions={};C.styles=Pe;k([(0,te.redux)()],C.prototype,"editorMode",void 0);k([(0,ee.property)()],C.prototype,"context",void 0);k([(0,ee.property)()],C.prototype,"key",void 0);k([(0,te.jsonProperty)([])],C.prototype,"args",void 0);k([(0,ee.property)()],C.prototype,"defaultMessage",void 0);var ie=class e{static build(t){return new e(t)}static fromGwt(t){return new e(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(i,r)=>{let o=r;return a=>({context:this.name,key:o,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(i,r)=>(...o)=>D.resolveMessage(this.name,r,...o)})}};(0,$e.customElement)("ft-i18n")(C);var he=ie.build("designedReaderTopicContent");var R=function(e,t,i,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a},u=class extends K{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,i;return!this.map||!this.error&&!this.content?P.html`
|
|
86
|
+
<section class="topic-loading"></section>
|
|
87
|
+
`:P.html`
|
|
86
88
|
<style>
|
|
87
|
-
@import "${
|
|
89
|
+
@import "${(t=this.map)===null||t===void 0?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
88
90
|
</style>
|
|
89
|
-
<section class="topic" lang="${
|
|
91
|
+
<section class="topic" lang="${(i=this.map)===null||i===void 0?void 0:i.lang}">
|
|
90
92
|
${this.renderTopicContent()}
|
|
91
93
|
</section>
|
|
92
|
-
|
|
93
|
-
<section class="topic-loading"></section>
|
|
94
|
-
`}update(t){super.update(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updated(t){super.updated(t),this.updateComplete.then((()=>{this.topicContainer&&e.highlightHtml(this.topicContainer,this.searchInDocumentQuery)}))}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode).then((t=>this.contentPreprocessor(t||'<div class="empty-topic"></div>'))).then((t=>this.content=t)).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a,r;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}this.topicContainer&&(this.onContentAvailable(this.topicContainer,this.shadowRoot),this.moveSvgInShadowRoot()),(t.has("content")&&this.content||t.has("error")&&this.error)&&performance.mark("fluid_topics__reader_topic_displayed__"+(null===(r=this.tocNode)||void 0===r?void 0:r.tocId))}moveSvgInShadowRoot(){this.shadowRoot.querySelectorAll(".ft-svg-container").forEach((t=>{if(!t.shadowRoot){var e=t.innerHTML;t.innerHTML="";var i=t.attachShadow({mode:"open"}),s=document.createRange().createContextualFragment(e),o=document.importNode(s,!0);i.append(o)}}))}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
|
|
94
|
+
`}update(t){super.update(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updated(t){super.updated(t),this.updateComplete.then(()=>{this.topicContainer&&(0,L.highlightHtml)(this.topicContainer,this.searchInDocumentQuery)})}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&((t=this.service)===null||t===void 0||t.getTopicContent(this.tocNode).then(i=>this.contentPreprocessor(i||'<div class="empty-topic"></div>')).then(i=>this.content=i).catch(i=>this.error=i))}contentAvailableCallback(t){var i,r,o,a,n,l,d;super.contentAvailableCallback(t),!this.disableContextInteractions&&(!((i=this.scrollTarget)===null||i===void 0)&&i.section)&&(!((r=this.tocNode)===null||r===void 0)&&r.tocId)&&((o=this.tocNode)===null||o===void 0?void 0:o.tocId)===this.scrollTarget.tocId&&this.content&&(((n=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))!==null&&n!==void 0?n:this).scrollIntoView({block:"start"}),(l=this.stateManager)===null||l===void 0||l.scrollDone()),this.topicContainer&&(this.onContentAvailable(this.topicContainer,this.shadowRoot),this.moveSvgInShadowRoot()),(t.has("content")&&this.content||t.has("error")&&this.error)&&performance.mark("fluid_topics__reader_topic_displayed__"+((d=this.tocNode)===null||d===void 0?void 0:d.tocId))}moveSvgInShadowRoot(){this.shadowRoot.querySelectorAll(".ft-svg-container").forEach(t=>{if(!t.shadowRoot){var i=t.innerHTML;t.innerHTML="";var r=t.attachShadow({mode:"open"}),o=document.createRange().createContextualFragment(i),a=document.importNode(o,!0);r.append(a)}})}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,i,r,o;if(this.error)return P.html`
|
|
95
95
|
<div class="topic-on-error">
|
|
96
96
|
<ft-icon>WARNING</ft-icon>
|
|
97
97
|
<div>
|
|
98
|
-
${this.is404Error()?
|
|
98
|
+
${this.is404Error()?he.messages.topicMissingAdvice():he.messages.somethingWentWrong()}
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
|
-
`;
|
|
102
|
-
<div class="depth-${
|
|
103
|
-
${
|
|
101
|
+
`;let a=(i=(t=this.map)===null||t===void 0?void 0:t.contentStyles.customCssClasses.join(" "))!==null&&i!==void 0?i:"";return P.html`
|
|
102
|
+
<div class="depth-${(r=this.tocNode)===null||r===void 0?void 0:r.depth} content-locale-${(o=this.map)===null||o===void 0?void 0:o.lang} ${a}">
|
|
103
|
+
${this.content!=null?(0,ze.unsafeHTML)(`${this.content}`):P.nothing}
|
|
104
104
|
</div>
|
|
105
|
-
`}is404Error(){return
|
|
105
|
+
`}is404Error(){return this.error.status===404}};u.styles=[Ee,L.highlightHtmlStyles];R([(0,L.redux)()],u.prototype,"map",void 0);R([(0,L.redux)()],u.prototype,"scrollTarget",void 0);R([(0,N.state)()],u.prototype,"content",void 0);R([(0,N.state)()],u.prototype,"error",void 0);R([(0,L.redux)({selector:(e,t)=>t.disableContextInteractions?"":e.searchInDocumentQuery})],u.prototype,"searchInDocumentQuery",void 0);R([(0,N.property)({attribute:!1})],u.prototype,"contentPreprocessor",void 0);R([(0,N.property)({attribute:!1})],u.prototype,"onContentAvailable",void 0);R([(0,N.query)("section.topic")],u.prototype,"topicContainer",void 0);(0,Xe.customElement)("ft-reader-topic-content")(u);})();
|