@fluid-topics/ft-reader-content 0.3.11 → 0.3.13
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.
- package/build/ft-reader-content.css.d.ts +3 -0
- package/build/ft-reader-content.css.js +6 -0
- package/build/ft-reader-content.d.ts +1 -3
- package/build/ft-reader-content.js +3 -4
- package/build/ft-reader-content.light.js +176 -183
- package/build/ft-reader-content.min.js +186 -187
- package/build/ft-reader-content.properties.d.ts +5 -0
- package/build/ft-reader-content.properties.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +6 -6
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);p(n,l,a);const c={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(n,c);let h=i.call(o,t);h||(h=d(t),e.call(o,t,h)),this===window.customElements&&(r.set(n,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},p=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const g=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(g(Element,"innerHTML"),g(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);p(n,l,a);const c={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(n,c);let h=i.call(o,t);h||(h=d(t),e.call(o,t,h)),this===window.customElements&&(r.set(n,c),c.standInClass=h);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},p=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const g=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(g(Element,"innerHTML"),g(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(Lt){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -92,55 +92,55 @@ const St=1,kt=2,Nt=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructo
|
|
|
92
92
|
* @license
|
|
93
93
|
* Copyright 2017 Google LLC
|
|
94
94
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
95
|
-
*/class Et extends Ct{constructor(t){if(super(t),this.it=H,t.type!==kt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===H||null==t)return this._t=void 0,this.it=t;if(t===K)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Et.directiveName="unsafeHTML",Et.resultType=1;const Rt=Nt(Et);var Mt,Ut;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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_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.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",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=""}(Mt||(Mt={})),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=""}(Ut||(Ut={})),new Map([...["abw"].map((t=>[t,Ut.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,Ut.AUDIO])),...["avi"].map((t=>[t,Ut.AVI])),...["chm","xhs"].map((t=>[t,Ut.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,Ut.CODE])),...["csv"].map((t=>[t,Ut.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ut.DITA])),...["epub"].map((t=>[t,Ut.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ut.EXCEL])),...["flac"].map((t=>[t,Ut.FLAC])),...["gif"].map((t=>[t,Ut.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ut.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ut.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,Ut.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ut.JPEG])),...["json"].map((t=>[t,Ut.JSON])),...["m4a","m4p"].map((t=>[t,Ut.M4A])),...["mov","qt"].map((t=>[t,Ut.MOV])),...["mp3"].map((t=>[t,Ut.MP3])),...["mp4","m4v"].map((t=>[t,Ut.MP4])),...["ogg","oga"].map((t=>[t,Ut.OGG])),...["pdf","ps"].map((t=>[t,Ut.PDF])),...["png"].map((t=>[t,Ut.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ut.POWERPOINT])),...["rar"].map((t=>[t,Ut.RAR])),...["stp"].map((t=>[t,Ut.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ut.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,Ut.VIDEO])),...["wav"].map((t=>[t,Ut.WAV])),...["wma"].map((t=>[t,Ut.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ut.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ut.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ut.YAML])),...["zip"].map((t=>[t,Ut.ZIP]))]);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</i>
|
|
100
|
-
`}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 i=this.value||this.textContent;switch(this.variant){case jt.file_format:this.resolvedIcon=null!==(t=Ut[i.toUpperCase()])&&void 0!==t?t:i;break;case jt.fluid_topics:this.resolvedIcon=null!==(e=Mt[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=H}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}At.elementDefinitions={},At.styles=u`
|
|
101
|
-
:host {
|
|
102
|
-
display: inline-block;
|
|
103
|
-
}
|
|
95
|
+
*/class Et extends Ct{constructor(t){if(super(t),this.it=H,t.type!==kt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===H||null==t)return this._t=void 0,this.it=t;if(t===K)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Et.directiveName="unsafeHTML",Et.resultType=1;const Rt=Nt(Et);var Mt,Ut;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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_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.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",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=""}(Mt||(Mt={})),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=""}(Ut||(Ut={})),new Map([...["abw"].map((t=>[t,Ut.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,Ut.AUDIO])),...["avi"].map((t=>[t,Ut.AVI])),...["chm","xhs"].map((t=>[t,Ut.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,Ut.CODE])),...["csv"].map((t=>[t,Ut.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ut.DITA])),...["epub"].map((t=>[t,Ut.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ut.EXCEL])),...["flac"].map((t=>[t,Ut.FLAC])),...["gif"].map((t=>[t,Ut.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ut.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ut.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,Ut.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ut.JPEG])),...["json"].map((t=>[t,Ut.JSON])),...["m4a","m4p"].map((t=>[t,Ut.M4A])),...["mov","qt"].map((t=>[t,Ut.MOV])),...["mp3"].map((t=>[t,Ut.MP3])),...["mp4","m4v"].map((t=>[t,Ut.MP4])),...["ogg","oga"].map((t=>[t,Ut.OGG])),...["pdf","ps"].map((t=>[t,Ut.PDF])),...["png"].map((t=>[t,Ut.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ut.POWERPOINT])),...["rar"].map((t=>[t,Ut.RAR])),...["stp"].map((t=>[t,Ut.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ut.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,Ut.VIDEO])),...["wav"].map((t=>[t,Ut.WAV])),...["wma"].map((t=>[t,Ut.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ut.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ut.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ut.YAML])),...["zip"].map((t=>[t,Ut.ZIP]))]);const jt={size:dt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:dt.extend("--ft-icon-fluid-topics-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:dt.extend("--ft-icon-file-format-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:dt.extend("--ft-icon-material-font-family",dt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:dt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ft=u`
|
|
96
|
+
:host {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
}
|
|
104
99
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
:host, i.ft-icon {
|
|
101
|
+
width: ${jt.size};
|
|
102
|
+
height: ${jt.size};
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
106
|
+
i.ft-icon {
|
|
107
|
+
font-size: ${jt.size};
|
|
108
|
+
line-height: 1;
|
|
109
|
+
font-weight: normal;
|
|
110
|
+
text-transform: none;
|
|
111
|
+
font-style: normal;
|
|
112
|
+
font-variant: normal;
|
|
113
|
+
speak: none;
|
|
114
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
115
|
+
text-rendering: auto;
|
|
116
|
+
-webkit-font-smoothing: antialiased;
|
|
117
|
+
-moz-osx-font-smoothing: grayscale;
|
|
118
|
+
vertical-align: ${jt.verticalAlign};
|
|
119
|
+
}
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
.ft-icon--fluid-topics {
|
|
122
|
+
font-family: ${jt.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
123
|
+
}
|
|
129
124
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
.ft-icon--file-format {
|
|
126
|
+
font-family: ${jt.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
127
|
+
}
|
|
133
128
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
.ft-icon--material {
|
|
130
|
+
font-family: ${jt.materialFontFamily}, "Material Icons", sans-serif;
|
|
131
|
+
}
|
|
132
|
+
`;var Tt;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Tt||(Tt={}));var At=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class zt extends ut{constructor(){super(...arguments),this.variant=Tt.fluid_topics,this.resolvedIcon=H}render(){const t="material"!==this.variant||this.value;return D`
|
|
133
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
134
|
+
${Rt(this.resolvedIcon)}
|
|
135
|
+
<slot ?hidden=${t}></slot>
|
|
136
|
+
</i>
|
|
137
|
+
`}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 i=this.value||this.textContent;switch(this.variant){case Tt.file_format:this.resolvedIcon=null!==(t=Ut[i.toUpperCase()])&&void 0!==t?t:i;break;case Tt.fluid_topics:this.resolvedIcon=null!==(e=Mt[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||H}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}zt.elementDefinitions={},zt.styles=Ft,At([o()],zt.prototype,"variant",void 0),At([o()],zt.prototype,"value",void 0),At([n()],zt.prototype,"resolvedIcon",void 0),At([s("slot")],zt.prototype,"slottedContent",void 0),a("ft-icon")(zt);
|
|
138
138
|
/**
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2020 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
142
|
*/
|
|
143
|
-
const
|
|
143
|
+
const Lt=Symbol.for(""),It=t=>{if((null==t?void 0:t.r)===Lt)return null==t?void 0:t._$litStatic$},Pt=t=>({_$litStatic$:t,r:Lt}),Bt=new Map,_t=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],a=[];let l,c=0,h=!1;for(;c<o;){for(l=e[c];c<o&&void 0!==(s=i[c],n=It(s));)l+=n+e[++c],h=!0;a.push(s),r.push(l),c++}if(c===o&&r.push(e[o]),h){const t=r.join("$$lit$$");void 0===(e=Bt.get(t))&&(r.raw=r,Bt.set(t,e=r)),i=a}return t(e,...i)})(D);var Wt;!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"}(Wt||(Wt={}));const Dt=dt.extend("--ft-typography-font-family",pt.titleFont),Kt=dt.extend("--ft-typography-font-family",pt.contentFont),Ht={fontFamily:Kt,fontSize:dt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:dt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:dt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:dt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:dt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Zt=dt.extend("--ft-typography-title-font-family",Dt),Vt=dt.extend("--ft-typography-title-font-size",Ht.fontSize,"20px"),Jt=dt.extend("--ft-typography-title-font-weight",Ht.fontWeight,"normal"),qt=dt.extend("--ft-typography-title-letter-spacing",Ht.letterSpacing,"0.15px"),Xt=dt.extend("--ft-typography-title-line-height",Ht.lineHeight,"1.2"),Yt=dt.extend("--ft-typography-title-text-transform",Ht.textTransform,"inherit"),Gt=dt.extend("--ft-typography-title-dense-font-family",Dt),Qt=dt.extend("--ft-typography-title-dense-font-size",Ht.fontSize,"14px"),te=dt.extend("--ft-typography-title-dense-font-weight",Ht.fontWeight,"normal"),ee=dt.extend("--ft-typography-title-dense-letter-spacing",Ht.letterSpacing,"0.105px"),ie=dt.extend("--ft-typography-title-dense-line-height",Ht.lineHeight,"1.7"),oe=dt.extend("--ft-typography-title-dense-text-transform",Ht.textTransform,"inherit"),ne=dt.extend("--ft-typography-subtitle1-font-family",Kt),se=dt.extend("--ft-typography-subtitle1-font-size",Ht.fontSize,"16px"),re=dt.extend("--ft-typography-subtitle1-font-weight",Ht.fontWeight,"600"),ae=dt.extend("--ft-typography-subtitle1-letter-spacing",Ht.letterSpacing,"0.144px"),le=dt.extend("--ft-typography-subtitle1-line-height",Ht.lineHeight,"1.5"),ce=dt.extend("--ft-typography-subtitle1-text-transform",Ht.textTransform,"inherit"),he=dt.extend("--ft-typography-subtitle2-font-family",Kt),de=dt.extend("--ft-typography-subtitle2-font-size",Ht.fontSize,"14px"),pe=dt.extend("--ft-typography-subtitle2-font-weight",Ht.fontWeight,"normal"),fe=dt.extend("--ft-typography-subtitle2-letter-spacing",Ht.letterSpacing,"0.098px"),ue=dt.extend("--ft-typography-subtitle2-line-height",Ht.lineHeight,"1.7"),ve=dt.extend("--ft-typography-subtitle2-text-transform",Ht.textTransform,"inherit"),ye=dt.extend("--ft-typography-body1-font-family",Kt),xe=dt.extend("--ft-typography-body1-font-size",Ht.fontSize,"16px"),ge=dt.extend("--ft-typography-body1-font-weight",Ht.fontWeight,"normal"),me=dt.extend("--ft-typography-body1-letter-spacing",Ht.letterSpacing,"0.496px"),be=dt.extend("--ft-typography-body1-line-height",Ht.lineHeight,"1.5"),we=dt.extend("--ft-typography-body1-text-transform",Ht.textTransform,"inherit"),$e=dt.extend("--ft-typography-body2-font-family",Kt),Oe=dt.extend("--ft-typography-body2-font-size",Ht.fontSize,"14px"),Se=dt.extend("--ft-typography-body2-font-weight",Ht.fontWeight,"normal"),ke=dt.extend("--ft-typography-body2-letter-spacing",Ht.letterSpacing,"0.252px"),Ne=dt.extend("--ft-typography-body2-line-height",Ht.lineHeight,"1.4"),Ce=dt.extend("--ft-typography-body2-text-transform",Ht.textTransform,"inherit"),Ee=dt.extend("--ft-typography-caption-font-family",Kt),Re=dt.extend("--ft-typography-caption-font-size",Ht.fontSize,"12px"),Me=dt.extend("--ft-typography-caption-font-weight",Ht.fontWeight,"normal"),Ue=dt.extend("--ft-typography-caption-letter-spacing",Ht.letterSpacing,"0.396px"),je=dt.extend("--ft-typography-caption-line-height",Ht.lineHeight,"1.33"),Fe=dt.extend("--ft-typography-caption-text-transform",Ht.textTransform,"inherit"),Te=dt.extend("--ft-typography-breadcrumb-font-family",Kt),Ae=dt.extend("--ft-typography-breadcrumb-font-size",Ht.fontSize,"10px"),ze=dt.extend("--ft-typography-breadcrumb-font-weight",Ht.fontWeight,"normal"),Le=dt.extend("--ft-typography-breadcrumb-letter-spacing",Ht.letterSpacing,"0.33px"),Ie=dt.extend("--ft-typography-breadcrumb-line-height",Ht.lineHeight,"1.6"),Pe=dt.extend("--ft-typography-breadcrumb-text-transform",Ht.textTransform,"inherit"),Be=dt.extend("--ft-typography-overline-font-family",Kt),_e=dt.extend("--ft-typography-overline-font-size",Ht.fontSize,"10px"),We=dt.extend("--ft-typography-overline-font-weight",Ht.fontWeight,"normal"),De=dt.extend("--ft-typography-overline-letter-spacing",Ht.letterSpacing,"1.5px"),Ke=dt.extend("--ft-typography-overline-line-height",Ht.lineHeight,"1.6"),He=dt.extend("--ft-typography-overline-text-transform",Ht.textTransform,"uppercase"),Ze=dt.extend("--ft-typography-button-font-family",Kt),Ve=dt.extend("--ft-typography-button-font-size",Ht.fontSize,"14px"),Je=dt.extend("--ft-typography-button-font-weight",Ht.fontWeight,"600"),qe=dt.extend("--ft-typography-button-letter-spacing",Ht.letterSpacing,"1.246px"),Xe=dt.extend("--ft-typography-button-line-height",Ht.lineHeight,"1.15"),Ye=dt.extend("--ft-typography-button-text-transform",Ht.textTransform,"uppercase"),Ge=u`
|
|
144
144
|
.ft-typography--title {
|
|
145
145
|
font-family: ${Zt};
|
|
146
146
|
font-size: ${Vt};
|
|
@@ -231,47 +231,47 @@ const zt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===zt)return null==t?void
|
|
|
231
231
|
line-height: ${Xe};
|
|
232
232
|
text-transform: ${Ye};
|
|
233
233
|
}
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
`,li=u`
|
|
235
|
+
.ft-typography {
|
|
236
|
+
vertical-align: inherit;
|
|
237
|
+
}
|
|
238
|
+
`;var ci=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class hi extends ut{constructor(){super(...arguments),this.variant=Wt.body1}render(){return this.element?_t`
|
|
239
|
+
<${Pt(this.element)}
|
|
236
240
|
class="ft-typography ft-typography--${this.variant}">
|
|
237
241
|
<slot></slot>
|
|
238
|
-
</${
|
|
239
|
-
`:
|
|
242
|
+
</${Pt(this.element)}>
|
|
243
|
+
`:_t`
|
|
240
244
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
241
|
-
`}}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
display: inline-flex;
|
|
248
|
-
align-items: stretch;
|
|
249
|
-
box-sizing: border-box;
|
|
250
|
-
}
|
|
245
|
+
`}}hi.styles=[Ge,Qe,ti,ei,ii,oi,ni,si,ri,ai,li],ci([o()],hi.prototype,"element",void 0),ci([o()],hi.prototype,"variant",void 0),a("ft-typography")(hi);const di=dt.extend("--ft-notice-color",pt.colorPrimary),pi=dt.extend("--ft-notice-icon-color",pt.colorOnPrimary),fi=dt.external(pt.borderRadiusS,"Design System"),ui=u`
|
|
246
|
+
.ft-notice {
|
|
247
|
+
display: inline-flex;
|
|
248
|
+
align-items: stretch;
|
|
249
|
+
box-sizing: border-box;
|
|
250
|
+
}
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
ft-icon {
|
|
253
|
+
${vi=jt.size,yi="20px",f(`${vi.name}: ${yi}`)};
|
|
254
|
+
padding: 0 8px;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-self: center;
|
|
257
|
+
}
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
259
|
+
.ft-icon {
|
|
260
|
+
color: ${pi};
|
|
261
|
+
background-color: ${di};
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
border-top-left-radius: ${fi};
|
|
265
|
+
border-bottom-left-radius: ${fi};
|
|
266
|
+
}
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
268
|
+
.ft-notice-label {
|
|
269
|
+
padding: 8px;
|
|
270
|
+
border-top-right-radius: ${fi};
|
|
271
|
+
border-bottom-right-radius: ${fi};
|
|
272
|
+
border: 1px solid ${di};
|
|
273
|
+
}
|
|
274
|
+
`;var vi,yi,xi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class gi extends ut{constructor(){super(...arguments),this.icon="info"}render(){return D`
|
|
275
275
|
<div class="ft-notice">
|
|
276
276
|
<div class="ft-icon">
|
|
277
277
|
<ft-icon>${this.icon}</ft-icon>
|
|
@@ -280,56 +280,90 @@ const zt=Symbol.for(""),Lt=t=>{if((null==t?void 0:t.r)===zt)return null==t?void
|
|
|
280
280
|
<slot></slot>
|
|
281
281
|
</ft-typography>
|
|
282
282
|
</div>
|
|
283
|
-
`}}
|
|
284
|
-
|
|
285
|
-
:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
283
|
+
`}}gi.elementDefinitions={"ft-icon":zt,"ft-typography":hi},gi.styles=ui,xi([o({type:String})],gi.prototype,"icon",void 0),a("ft-notice")(gi);const mi=dt.create("--ft-skeleton--display","DISPLAY","block"),bi=dt.create("--ft-skeleton--width","SIZE","100%"),wi=dt.create("--ft-skeleton--height","SIZE","20px"),$i=dt.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),Oi=dt.create("--ft-skeleton--glare-width","SIZE","200px"),Si=dt.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),ki=dt.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),Ni=dt.external(pt.borderRadiusM,"Design system"),Ci=u`
|
|
284
|
+
:host {
|
|
285
|
+
width: ${bi};
|
|
286
|
+
height: ${wi};
|
|
287
|
+
display: ${mi};
|
|
288
|
+
overflow: hidden;
|
|
289
|
+
border-radius: ${Ni};
|
|
290
|
+
background: linear-gradient(
|
|
291
|
+
90deg,
|
|
292
|
+
transparent,
|
|
293
|
+
${Si} calc(0.45 * ${Oi}),
|
|
294
|
+
${Si} calc(0.55 * ${Oi}),
|
|
295
|
+
transparent ${Oi}
|
|
296
|
+
), ${$i};
|
|
297
|
+
background-repeat: repeat-y;
|
|
298
|
+
background-size: 100vw 100vh;
|
|
299
|
+
background-attachment: fixed;
|
|
300
|
+
background-position: calc(${Oi} * -1) 0;
|
|
301
|
+
animation: shine ${ki} infinite;
|
|
302
|
+
animation-timing-function: linear;
|
|
303
|
+
}
|
|
305
304
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
305
|
+
@keyframes shine {
|
|
306
|
+
to {
|
|
307
|
+
background-position: calc(100vw + ${Oi}) 0, calc(${Oi} * -1) 0;
|
|
310
308
|
}
|
|
311
|
-
|
|
309
|
+
}
|
|
310
|
+
`;class Ei extends ut{render(){return D`
|
|
311
|
+
`}}Ei.elementDefinitions={},Ei.styles=Ci,a("ft-skeleton")(Ei);
|
|
312
312
|
/**
|
|
313
313
|
* @license
|
|
314
314
|
* Copyright 2018 Google LLC
|
|
315
315
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
316
316
|
*/
|
|
317
|
-
const
|
|
317
|
+
const Ri=Nt(class extends Ct{constructor(t){var e;if(super(t),t.type!==St||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return K}}),Mi=dt.extend("--ft-reader-internal-link-outline-color",pt.colorPrimary),Ui=u`
|
|
318
|
+
a:focus {
|
|
319
|
+
outline-color: ${Mi};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ft-reader-link--remove-style {
|
|
323
|
+
text-decoration: none;
|
|
324
|
+
color: inherit;
|
|
325
|
+
}
|
|
326
|
+
`;var ji=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Fi extends Ot{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Ri({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return D`
|
|
318
327
|
<a class=${e}
|
|
319
328
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
320
329
|
@click=${t=>this.onClick(t)}>
|
|
321
330
|
<slot></slot>
|
|
322
331
|
</a>
|
|
323
|
-
`}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)))}}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
332
|
+
`}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)))}}Fi.styles=Ui,ji([o()],Fi.prototype,"tocId",void 0),ji([o()],Fi.prototype,"section",void 0),ji([o({type:Number})],Fi.prototype,"pageNumber",void 0),ji([o({type:Boolean})],Fi.prototype,"removeStyle",void 0),a("ft-reader-internal-link")(Fi);const Ti=u`
|
|
333
|
+
.ft-reader-topic {
|
|
334
|
+
box-sizing: border-box;
|
|
335
|
+
}
|
|
327
336
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
337
|
+
.loading-topic {
|
|
338
|
+
height: 100vh;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
ft-skeleton {
|
|
342
|
+
margin: 8px 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ft-reader-topic--content {
|
|
346
|
+
max-width: 100%;
|
|
347
|
+
overflow-x: auto;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
img {
|
|
351
|
+
max-width: 100%;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ft-expanding-block-content,
|
|
355
|
+
.ft-expanding-block-inline-content {
|
|
356
|
+
display: none;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.ft-expanding-block-content.ft-expanding-block-expanded {
|
|
360
|
+
display: block;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.ft-expanding-block-inline-content.ft-expanding-block-expanded {
|
|
364
|
+
display: inline;
|
|
365
|
+
}
|
|
366
|
+
`;var Ai=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class zi extends Ot{constructor(){super(...arguments),this.tocId="",this.error=!1,this.displayLoading=!1,this.loadingDebouncer=new e(300)}render(){var t,e;if(this.error)return D`
|
|
333
367
|
<div class="loading-topic" part="error">
|
|
334
368
|
${this.renderTitle()}
|
|
335
369
|
<ft-notice part="error-notice" icon="warning" part="error-notice">
|
|
@@ -362,57 +396,55 @@ const Oi=Nt(class extends Ct{constructor(t){var e;if(super(t),t.type!==St||"clas
|
|
|
362
396
|
`:!this.displayLoading||this.error?H:D`
|
|
363
397
|
<ft-skeleton style="--ft-skeleton--width: 50%;--ft-skeleton--height: 24px; margin-bottom: 24px">
|
|
364
398
|
</ft-skeleton>
|
|
365
|
-
`}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,n;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===(n=this.stateManager)||void 0===n||n.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))}}
|
|
366
|
-
.ft-reader-topic {
|
|
367
|
-
box-sizing: border-box;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.loading-topic {
|
|
371
|
-
height: 100vh;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
ft-skeleton {
|
|
375
|
-
margin: 8px 0;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.ft-reader-topic--content {
|
|
379
|
-
max-width: 100%;
|
|
380
|
-
overflow-x: auto;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
img {
|
|
384
|
-
max-width: 100%;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.ft-expanding-block-content,
|
|
388
|
-
.ft-expanding-block-inline-content {
|
|
389
|
-
display: none;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.ft-expanding-block-content.ft-expanding-block-expanded {
|
|
393
|
-
display: block;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.ft-expanding-block-inline-content.ft-expanding-block-expanded {
|
|
397
|
-
display: inline;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
`,Ci([o()],Ei.prototype,"tocId",void 0),Ci([n()],Ei.prototype,"tocNode",void 0),Ci([n()],Ei.prototype,"content",void 0),Ci([s(".ft-reader-topic")],Ei.prototype,"container",void 0),Ci([vt()],Ei.prototype,"scrollTarget",void 0),Ci([n()],Ei.prototype,"error",void 0),Ci([n()],Ei.prototype,"displayLoading",void 0),a("ft-reader-topic")(Ei);
|
|
399
|
+
`}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,n;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===(n=this.stateManager)||void 0===n||n.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))}}zi.styles=Ti,Ai([o()],zi.prototype,"tocId",void 0),Ai([n()],zi.prototype,"tocNode",void 0),Ai([n()],zi.prototype,"content",void 0),Ai([s(".ft-reader-topic")],zi.prototype,"container",void 0),Ai([vt()],zi.prototype,"scrollTarget",void 0),Ai([n()],zi.prototype,"error",void 0),Ai([n()],zi.prototype,"displayLoading",void 0),a("ft-reader-topic")(zi);
|
|
401
400
|
/**
|
|
402
401
|
* @license
|
|
403
402
|
* Copyright 2020 Google LLC
|
|
404
403
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
405
404
|
*/
|
|
406
|
-
const{H:
|
|
405
|
+
const{H:Li}=st,Ii=()=>document.createComment(""),Pi=(t,e,i)=>{var o;const n=t._$AA.parentNode,s=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Ii(),s),o=n.insertBefore(Ii(),s);i=new Li(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,a=r!==t;if(a){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==s||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,s),t=e}}}return i},Bi=(t,e,i=t)=>(t._$AI(e,i),t),_i={},Wi=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},Di=(t,e,i)=>{const o=new Map;for(let n=e;n<=i;n++)o.set(t[n],n);return o},Ki=Nt(class extends Ct{constructor(t){if(super(t),t.type!==kt)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const n=[],s=[];let r=0;for(const e of t)n[r]=o?o(e,r):r,s[r]=i(e,r),r++;return{values:s,keys:n}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var n;const s=(t=>t._$AH)(t),{values:r,keys:a}=this.ht(e,i,o);if(!Array.isArray(s))return this.ut=a,r;const l=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],c=[];let h,d,p=0,f=s.length-1,u=0,v=r.length-1;for(;p<=f&&u<=v;)if(null===s[p])p++;else if(null===s[f])f--;else if(l[p]===a[u])c[u]=Bi(s[p],r[u]),p++,u++;else if(l[f]===a[v])c[v]=Bi(s[f],r[v]),f--,v--;else if(l[p]===a[v])c[v]=Bi(s[p],r[v]),Pi(t,c[v+1],s[p]),p++,v--;else if(l[f]===a[u])c[u]=Bi(s[f],r[u]),Pi(t,s[p],s[f]),f--,u++;else if(void 0===h&&(h=Di(a,u,v),d=Di(l,p,f)),h.has(l[p]))if(h.has(l[f])){const e=d.get(a[u]),i=void 0!==e?s[e]:null;if(null===i){const e=Pi(t,s[p]);Bi(e,r[u]),c[u]=e}else c[u]=Bi(i,r[u]),Pi(t,s[p],i),s[e]=null;u++}else Wi(s[f]),f--;else Wi(s[p]),p++;for(;u<=v;){const e=Pi(t,c[v+1]);Bi(e,r[u]),c[u++]=e}for(;p<=f;){const t=s[p++];null!==t&&Wi(t)}return this.ut=a,((t,e=_i)=>{t._$AH=e})(t,c),K}}),Hi=dt.create("--ft-infinite-scroll-padding","SIZE","0"),Zi=u`
|
|
406
|
+
.items-container {
|
|
407
|
+
position: relative;
|
|
408
|
+
padding: ${Hi};
|
|
409
|
+
outline: none;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.scrollable {
|
|
413
|
+
height: 100%;
|
|
414
|
+
overflow-y: auto;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.item-container {
|
|
418
|
+
height: 100vh;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.item-container + .item-container {
|
|
422
|
+
/*
|
|
423
|
+
We add a gap between items to be sure to hide the content above the targeted item
|
|
424
|
+
When a div is visible (even by a fraction of a pixel) if its height changes
|
|
425
|
+
the browser will try to keep the scroll stable in relation to the first visible element
|
|
426
|
+
By adding this gap we ensure that the previous item will be fully hidden and event if its size changes, it will not impact the scroll offset
|
|
427
|
+
*/
|
|
428
|
+
margin-top: 4px;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.scrollable .item-container {
|
|
432
|
+
height: 100%;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.resizable:not(.rendered) {
|
|
436
|
+
width: 0;
|
|
437
|
+
}
|
|
438
|
+
`;
|
|
407
439
|
/**
|
|
408
440
|
* @license
|
|
409
441
|
* Copyright 2017 Google LLC
|
|
410
442
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
411
|
-
*/var
|
|
443
|
+
*/var Vi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ji extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class qi extends Event{constructor(){super("scrolled-to-target")}}class Xi extends ut{constructor(){super(...arguments),this.items=[],this.renderItem=()=>D``,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e(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 e=0;t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));for(const i of t){const t=+i.target.parentElement.getAttribute("data-item-index"),o=i.target.parentElement.clientHeight,n=i.contentRect.height;this.alreadyRenderedIndexes.has(t)&&(i.target.parentElement.style.height=n+"px",e+=this.scrollable&&this.getOffset(i.target.parentElement)<this.scrollable.scrollTop+e?n-o:0)}this.scrollable&&bt&&(this.scrollable.scrollTop+=e)},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 D`
|
|
412
444
|
<div class="items-container ${this.internalScroll?"scrollable":""}"
|
|
413
445
|
tabindex="-1"
|
|
414
446
|
@find-scrollable-parent=${this.findScrollableParent}>
|
|
415
|
-
${
|
|
447
|
+
${Ki(this.items,((t,e)=>this.renderItemContainer(t,e)))}
|
|
416
448
|
</div>
|
|
417
449
|
`}renderItemContainer(t,e){const i=this.scrolledToTarget&&this.visibleItems.includes(e),o=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;o&&this.alreadyRenderedIndexes.add(e);return D`
|
|
418
450
|
<div id="item-${e}"
|
|
@@ -422,40 +454,8 @@ const{H:Ri}=st,Mi=()=>document.createComment(""),Ui=(t,e,i)=>{var o;const n=t._$
|
|
|
422
454
|
${o?(()=>{const i=this.renderItem(t,e);return"string"==typeof i?D`${Rt(i)}`:i})():null}
|
|
423
455
|
</div>
|
|
424
456
|
</div>
|
|
425
|
-
`}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
|
|
426
|
-
|
|
427
|
-
position: relative;
|
|
428
|
-
padding: ${Ii};
|
|
429
|
-
outline: none;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.scrollable {
|
|
433
|
-
height: 100%;
|
|
434
|
-
overflow-y: auto;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.item-container {
|
|
438
|
-
height: 100vh;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.item-container + .item-container {
|
|
442
|
-
/*
|
|
443
|
-
We add a gap between items to be sure to hide the content above the targeted item
|
|
444
|
-
When a div is visible (even by a fraction of a pixel) if its height changes
|
|
445
|
-
the browser will try to keep the scroll stable in relation to the first visible element
|
|
446
|
-
By adding this gap we ensure that the previous item will be fully hidden and event if its size changes, it will not impact the scroll offset
|
|
447
|
-
*/
|
|
448
|
-
margin-top: 4px;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.scrollable .item-container {
|
|
452
|
-
height: 100%;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.resizable:not(.rendered) {
|
|
456
|
-
width: 0;
|
|
457
|
-
}
|
|
458
|
-
`,Li([o({type:Array})],_i.prototype,"items",void 0),Li([o({attribute:!1})],_i.prototype,"renderItem",void 0),Li([o({type:Object})],_i.prototype,"scrollToItem",void 0),Li([o({type:Number})],_i.prototype,"scrollToIndex",void 0),Li([o({type:Boolean})],_i.prototype,"internalScroll",void 0),Li([o({type:Number})],_i.prototype,"renderBeforeFirst",void 0),Li([o({type:Number})],_i.prototype,"renderAfterLast",void 0),Li([n({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],_i.prototype,"visibleItems",void 0),Li([s(".scrollable")],_i.prototype,"internalScrollable",void 0),Li([s(".items-container")],_i.prototype,"itemsContainer",void 0),Li([n()],_i.prototype,"scrolledToTarget",void 0),a("ft-infinite-scroll")(_i);var Wi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Di extends Ot{constructor(){super(...arguments),this.renderTopic=t=>D`
|
|
457
|
+
`}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 Ji(this.visibleItems,this.visibleItems.map((t=>this.items[t])))),t.has("scrolledToTarget")&&this.scrolledToTarget&&this.dispatchEvent(new qi)}}Xi.styles=Zi,Vi([o({type:Array})],Xi.prototype,"items",void 0),Vi([o({attribute:!1})],Xi.prototype,"renderItem",void 0),Vi([o({type:Object})],Xi.prototype,"scrollToItem",void 0),Vi([o({type:Number})],Xi.prototype,"scrollToIndex",void 0),Vi([o({type:Boolean})],Xi.prototype,"internalScroll",void 0),Vi([o({type:Number})],Xi.prototype,"renderBeforeFirst",void 0),Vi([o({type:Number})],Xi.prototype,"renderAfterLast",void 0),Vi([n({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],Xi.prototype,"visibleItems",void 0),Vi([s(".scrollable")],Xi.prototype,"internalScrollable",void 0),Vi([s(".items-container")],Xi.prototype,"itemsContainer",void 0),Vi([n()],Xi.prototype,"scrolledToTarget",void 0),a("ft-infinite-scroll")(Xi);const Yi=u`
|
|
458
|
+
`;var Gi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Qi extends Ot{constructor(){super(...arguments),this.renderTopic=t=>D`
|
|
459
459
|
<ft-reader-topic tocId="${t}" .exportpartsPrefix=${"topic"}></ft-reader-topic>
|
|
460
460
|
`,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;return D`
|
|
461
461
|
<ft-infinite-scroll class="ft-reader-content"
|
|
@@ -470,5 +470,4 @@ const{H:Ri}=st,Mi=()=>document.createComment(""),Ui=(t,e,i)=>{var o;const n=t._$
|
|
|
470
470
|
>
|
|
471
471
|
|
|
472
472
|
</ft-infinite-scroll>
|
|
473
|
-
`}getScrollTarget(){var t,e,i,o,n;const s=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===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||s&&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())}}
|
|
474
|
-
`,Wi([o()],Di.prototype,"renderTopic",void 0),Wi([vt()],Di.prototype,"currentPage",void 0),Wi([vt()],Di.prototype,"scrollTarget",void 0),Wi([vt()],Di.prototype,"visibleTopics",void 0),Wi([vt()],Di.prototype,"renderBeforeFirst",void 0),Wi([vt()],Di.prototype,"renderAfterLast",void 0),Wi([s(".ft-reader-content")],Di.prototype,"container",void 0),a("ft-reader-content")(Di),t.FtReaderContent=Di,t.FtReaderContentCssVariables={},Object.defineProperty(t,"i",{value:!0})}({});
|
|
473
|
+
`}getScrollTarget(){var t,e,i,o,n;const s=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===(n=this.scrollTarget)||void 0===n?void 0:n.tocId)||s&&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())}}Qi.elementDefinitions={"ft-infinite-scroll":Xi},Qi.styles=Yi,Gi([o()],Qi.prototype,"renderTopic",void 0),Gi([vt()],Qi.prototype,"currentPage",void 0),Gi([vt()],Qi.prototype,"scrollTarget",void 0),Gi([vt()],Qi.prototype,"visibleTopics",void 0),Gi([vt()],Qi.prototype,"renderBeforeFirst",void 0),Gi([vt()],Qi.prototype,"renderAfterLast",void 0),Gi([s(".ft-reader-content")],Qi.prototype,"container",void 0),a("ft-reader-content")(Qi),t.FtReaderContent=Qi,t.FtReaderContentCssVariables={},t.styles=Yi,Object.defineProperty(t,"i",{value:!0})}({});
|