@fluid-topics/ft-reader-topic-content 1.1.78 → 1.1.80
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,4 +1,4 @@
|
|
|
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
|
|
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 S=W((dt,ve)=>{ve.exports=ftGlobals.lit});var b=W((ft,Se)=>{Se.exports=ftGlobals.litDecorators});var le=W((At,Oe)=>{Oe.exports=ftGlobals.litUnsafeHTML});var Xe=p(m());var P=p(S());var Ce=p(S()),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
3
|
font-family: ${Ae.fontFamily};
|
|
4
4
|
overflow-x: auto;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
white-space: pre-wrap;
|
|
22
22
|
word-break: break-word;
|
|
23
23
|
}
|
|
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`
|
|
24
|
+
`;var se=p(b());var ge=p(m()),be=p(b());var _e;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(_e||(_e={}));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,be.state)()],i.prototype,"stateManager",void 0),i}var K=class extends tt(ge.FtLitElementRedux){};var Te=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,Te([(0,se.state)()],i.prototype,"tocNode",void 0),Te([(0,se.state)()],i.prototype,"disableContextInteractions",void 0),i}var I=class extends it(K){};var ze=p(le()),L=p(m()),N=p(b());var we=p(m());var B=p(S()),w=p(b()),Le=p(m()),Ne=p(le());var j;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.EYE="",e.SHARE="󨃱"})(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 ye=p(S()),g=p(m()),_={size:g.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:g.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",g.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:g.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",g.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:g.FtCssVariableFactory.extend("--ft-icon-material-font-family","",g.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:g.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Re=ye.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: ${_.size};
|
|
34
|
+
height: ${_.size};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
i.ft-icon {
|
|
38
38
|
width: 100%;
|
|
39
39
|
height: 100%;
|
|
40
|
-
font-size: ${
|
|
40
|
+
font-size: ${_.size};
|
|
41
41
|
line-height: 1;
|
|
42
42
|
font-weight: normal;
|
|
43
43
|
text-transform: none;
|
|
@@ -48,41 +48,41 @@
|
|
|
48
48
|
text-rendering: auto;
|
|
49
49
|
-webkit-font-smoothing: antialiased;
|
|
50
50
|
-moz-osx-font-smoothing: grayscale;
|
|
51
|
-
vertical-align: ${
|
|
51
|
+
vertical-align: ${_.verticalAlign};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
i.ft-icon.ft-icon--fluid-topics {
|
|
55
|
-
font-family: ${
|
|
55
|
+
font-family: ${_.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 * ${_.size});
|
|
59
|
+
line-height: ${_.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: ${_.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.ft-icon--material {
|
|
70
|
-
font-family: ${
|
|
70
|
+
font-family: ${_.materialFontFamily}, "Material Icons", sans-serif;
|
|
71
71
|
}
|
|
72
|
-
`;var
|
|
72
|
+
`;var T;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(T||(T={}));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(T).includes(this.variant)?this.variant:T.fluid_topics,i=t!==T.material||!!this.value;return B.html`
|
|
73
73
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
74
74
|
${(0,Ne.unsafeHTML)(this.resolvedIcon)}
|
|
75
75
|
<slot ?hidden=${i}></slot>
|
|
76
76
|
</i>
|
|
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
|
|
78
|
-
`;var Q=p(m());var
|
|
79
|
-
`;var Be=p(m()),ot="ft-app-info",at={},
|
|
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 T.file_format:this.resolvedIcon=(t=s[r.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:r;break;case T.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(S()),ee=p(b()),te=p(m());var Me=p(S());var Pe=Me.css`
|
|
78
|
+
`;var Q=p(m());var Ke=p(m());var He=p(S()),x=p(b()),A=p(m());var Ue=p(S());var De=Ue.css`
|
|
79
|
+
`;var Be=p(m()),ot="ft-app-info",at={},d=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 y=p(m());var pe=p(m());var M=class e{static get(t){let{baseUrl:i,apiIntegrationIdentifier:r}=d.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=d.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 y.CacheRegistry,this.listeners={}},this.currentUiLocale=d.getState().uiLocale,d.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=d.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,y.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 y.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,y.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")&&(d.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&d.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&d.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&d.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&d.actions.noCustom(this.noCustom),t.has("editorMode")&&d.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&d.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&d.actions.session(this.session),t.has("availableUiLocales")&&d.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>D.addContext(i)),t.has("openExternalDocumentInNewTab")&&d.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&d.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&d.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=d.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=d.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}}),de=class{constructor(){this.currentSession=d.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new X,this.savedSearchesService=new z,d.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:i}=d.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 de;var ce=class{addCommand(t,i=!1){d.commands.add(t,i)}consumeCommand(t){return d.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ce;var We=p(m()),fe=class{highlightHtml(t,i){(0,We.highlightHtml)(t,i)}};window.FluidTopicsHighlightHtmlService=new fe;(0,Ke.customElement)("ft-app-context")(f);var je=p(b()),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 c=(l=o.args)!==null&&l!==void 0?l:o.argsProvider?o.argsProvider(this):[];return this.i18nService.resolveMessage(o.context,o.key,...c)}onI18nUpdate(o){var a,n;(a=this[me])===null||a===void 0||a.forEach((l,c)=>{var v;let H=this.getI18nAttributeValue(c);((v=H?.context)===null||v===void 0?void 0:v.toLowerCase())===o.toLowerCase()&&this.updateI18nAttributeMessage(c,H,l)}),(n=this[q])===null||n===void 0||n.forEach((l,c)=>{l.context.toLowerCase()===o.toLowerCase()&&(this[c]=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,c)=>{let v=this.getI18nAttributeValue(c);v?.context&&v.key&&(o.has(c)||l.argsProvider!=null)&&(o.has(c)&&this.addI18nContext(v.context),this.updateI18nAttributeMessage(c,v,l))}),(n=this[q])===null||n===void 0||n.forEach((l,c)=>{l.argsProvider!=null&&(this[c]=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(c=>this.getI18nAttributeValue(c))].map(c=>c?.context)).forEach(c=>c&&this.addI18nMessages(c))}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 Ie=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(d)}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
|
-
`}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
|
|
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 I{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,i;return!this.map||!this.error&&!this.content?P.html`
|
|
86
86
|
<section class="topic-loading"></section>
|
|
87
87
|
`:P.html`
|
|
88
88
|
<style>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<section class="topic" lang="${(i=this.map)===null||i===void 0?void 0:i.lang}">
|
|
92
92
|
${this.renderTopicContent()}
|
|
93
93
|
</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&&(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,
|
|
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,c;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__"+((c=this.tocNode)===null||c===void 0?void 0:c.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>
|