@fluid-topics/ft-reader-toc 0.3.51 → 0.3.53
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/README.md +1 -1
- package/build/ft-reader-toc.js +4 -4
- package/build/ft-reader-toc.light.js +12 -10
- package/build/ft-reader-toc.min.js +169 -167
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ yarn add @fluid-topics/ft-reader-toc
|
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
|
-
See [@fluid-topics/ft-reader-context](https://www.npmjs.com/package/@fluid-topics/ft-reader-context) for more information integrated readers for Fluid Topics.
|
|
12
|
+
See [@fluid-topics/ft-reader-context](https://www.npmjs.com/package/@fluid-topics/ft-reader-context) for more information about integrated readers for Fluid Topics.
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import { html } from "lit"
|
package/build/ft-reader-toc.js
CHANGED
|
@@ -263,19 +263,19 @@ __decorate([
|
|
|
263
263
|
redux((s, self) => {
|
|
264
264
|
var _a, _b, _c;
|
|
265
265
|
if (self.isCurrentPageToc) {
|
|
266
|
-
return ((_a = s.
|
|
266
|
+
return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) ? (_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.toc : undefined;
|
|
267
267
|
}
|
|
268
|
-
return ((_c = s.
|
|
268
|
+
return ((_c = s.paginationConfiguration) === null || _c === void 0 ? void 0 : _c.splitCurrentPageToc) ? s.pagesToc : s.toc;
|
|
269
269
|
})
|
|
270
270
|
], FtReaderToc.prototype, "toc", void 0);
|
|
271
271
|
__decorate([
|
|
272
|
-
redux((s) => { var _a; return (_a = s.
|
|
272
|
+
redux((s) => { var _a; return (_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc; })
|
|
273
273
|
], FtReaderToc.prototype, "splitToc", void 0);
|
|
274
274
|
__decorate([
|
|
275
275
|
redux()
|
|
276
276
|
], FtReaderToc.prototype, "currentPage", void 0);
|
|
277
277
|
__decorate([
|
|
278
|
-
redux((s, self) => { var _a, _b; return ((_a = s.
|
|
278
|
+
redux((s, self) => { var _a, _b; return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) && !self.isCurrentPageToc ? [(_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId] : s.visibleTopics; })
|
|
279
279
|
], FtReaderToc.prototype, "highlightedTocIds", void 0);
|
|
280
280
|
__decorate([
|
|
281
281
|
state({ hasChanged: (value, oldValue) => !deepEqual(value, oldValue) })
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
!function(t,e,i,o,n,s,r,l){var a,h=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(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 p extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class d extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.stateManager=t,this.
|
|
1
|
+
!function(t,e,i,o,n,s,r,l){var a,h=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(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 p extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class d extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return h([r.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const f=window,c=f.trustedTypes,u=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,v="?"+g,x=`<${v}>`,y=document,b=(t="")=>y.createComment(t),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,z=/>/g,C=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),S=/'/g,N=/"/g,O=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,T=y.createTreeWalker(y,129,null,!1),B=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=w;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,p=0;for(;p<i.length&&(r.lastIndex=p,a=r.exec(i),null!==a);)p=r.lastIndex,r===w?"!--"===a[1]?r=k:void 0!==a[1]?r=z:void 0!==a[2]?(O.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=C):void 0!==a[3]&&(r=C):r===C?">"===a[0]?(r=null!=n?n:w,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?C:'"'===a[3]?N:S):r===N||r===S?r=C:r===k||r===z?r=w:(r=C,n=void 0);const d=r===C&&t[e+1].startsWith("/>")?" ":"";s+=r===w?i+x:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+g+d):i+g+(-2===h?(o.push(void 0),e):d)}const l=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==u?u.createHTML(l):l,o]};class _{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,h]=B(t,e);if(this.el=_.createElement(a,i),T.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=T.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(g)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(g),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?Z:"@"===e[1]?W:U})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(g),e=t.length-1;if(e>0){o.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],b()),T.nextNode(),l.push({type:2,index:++n});o.append(t[e],b())}}}else if(8===o.nodeType)if(o.data===v)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function L(t,e,i=t,o){var n,s,r,l;if(e===I)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=m(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=L(t,a._$AS(t,e.values),a,o)),e}class
|
|
6
|
+
*/const f=window,c=f.trustedTypes,u=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,v="?"+g,x=`<${v}>`,y=document,b=(t="")=>y.createComment(t),m=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,z=/>/g,C=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),S=/'/g,N=/"/g,O=/^(?:script|style|textarea|title)$/i,A=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),I=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),E=new WeakMap,T=y.createTreeWalker(y,129,null,!1),B=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=w;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,p=0;for(;p<i.length&&(r.lastIndex=p,a=r.exec(i),null!==a);)p=r.lastIndex,r===w?"!--"===a[1]?r=k:void 0!==a[1]?r=z:void 0!==a[2]?(O.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=C):void 0!==a[3]&&(r=C):r===C?">"===a[0]?(r=null!=n?n:w,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?C:'"'===a[3]?N:S):r===N||r===S?r=C:r===k||r===z?r=w:(r=C,n=void 0);const d=r===C&&t[e+1].startsWith("/>")?" ":"";s+=r===w?i+x:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+g+d):i+g+(-2===h?(o.push(void 0),e):d)}const l=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==u?u.createHTML(l):l,o]};class _{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,h]=B(t,e);if(this.el=_.createElement(a,i),T.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=T.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(g)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(g),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?Z:"@"===e[1]?W:U})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(g),e=t.length-1;if(e>0){o.textContent=c?c.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],b()),T.nextNode(),l.push({type:2,index:++n});o.append(t[e],b())}}}else if(8===o.nodeType)if(o.data===v)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function L(t,e,i=t,o){var n,s,r,l;if(e===I)return e;let a=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=m(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=L(t,a._$AS(t,e.values),a,o)),e}class M{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:y).importNode(i,!0);T.currentNode=n;let s=T.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new F(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new D(s,this,t)),this.u.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=T.nextNode(),r++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class F{constructor(t,e,i,o){var n;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),m(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==I&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==j&&m(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=_.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new M(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new _(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new F(this.O(b()),this.O(b()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class U{constructor(t,e,i,o,n){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=L(this,t,e,0),s=!m(t)||t!==this._$AH&&t!==I,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=L(this,o[i+r],e,r),l===I&&(l=this._$AH[r]),s||(s=!m(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}}const P=c?c.emptyScript:"";class Z extends U{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class W extends U{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=L(this,t,e,0))&&void 0!==i?i:j)===I)return;const o=this._$AH,n=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==j&&(o===j||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const H=f.litHtmlPolyfillSupport;null==H||H(_,F),(null!==(a=f.litHtmlVersions)&&void 0!==a?a:f.litHtmlVersions=[]).push("2.4.0");
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2020 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:G}),X=new Map,q=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(s=i[h],n=K(s));)a+=n+e[++h],p=!0;l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=X.get(t))&&(r.raw=r,X.set(t,e=r)),i=l}return t(e,...i)})(A);var Y;!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"}(Y||(Y={}));const J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),St=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),At=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),It=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),_t=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit"),
|
|
12
|
+
const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},V=t=>({_$litStatic$:t,r:G}),X=new Map,q=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(s=i[h],n=K(s));)a+=n+e[++h],p=!0;l.push(s),r.push(a),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=X.get(t))&&(r.raw=r,X.set(t,e=r)),i=l}return t(e,...i)})(A);var Y;!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"}(Y||(Y={}));const J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),it=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),dt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),zt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),St=e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),At=e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),It=e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),Bt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),_t=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),Lt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit"),Mt=e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Q),Ft=e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),Ut=e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),Rt=e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),Pt=e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",tt.lineHeight,"1.33"),Zt=e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit"),Wt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Q),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),Ht=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Gt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Kt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"1.6"),Vt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),Xt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Q),qt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Yt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),Jt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Qt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",tt.lineHeight,"1.6"),te=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),ee={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",tt.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},ie=i.css`
|
|
13
13
|
.ft-typography--title {
|
|
14
14
|
font-family: ${et};
|
|
15
15
|
font-size: ${it};
|
|
@@ -66,8 +66,8 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
66
66
|
}
|
|
67
67
|
`,ae=i.css`
|
|
68
68
|
.ft-typography--caption {
|
|
69
|
-
font-family: ${
|
|
70
|
-
font-size: ${
|
|
69
|
+
font-family: ${Mt};
|
|
70
|
+
font-size: ${Ft};
|
|
71
71
|
font-weight: ${Ut};
|
|
72
72
|
letter-spacing: ${Rt};
|
|
73
73
|
line-height: ${Pt};
|
|
@@ -134,7 +134,8 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
134
134
|
:host, i.ft-icon {
|
|
135
135
|
display: inline-flex;
|
|
136
136
|
align-items: center;
|
|
137
|
-
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
flex-grow: 0;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
:host {
|
|
@@ -166,6 +167,7 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
166
167
|
font-size: calc(0.9 * ${$e.size});
|
|
167
168
|
position: relative;
|
|
168
169
|
top: -5%;
|
|
170
|
+
justify-content: center;
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
.ft-icon--file-format {
|
|
@@ -286,7 +288,7 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
286
288
|
<div class="ft-ripple--background"></div>
|
|
287
289
|
<div class="ft-ripple--effect"></div>
|
|
288
290
|
</div>
|
|
289
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Le.elementDefinitions={},Le.styles=Be,_e([r.property({type:Boolean})],Le.prototype,"primary",void 0),_e([r.property({type:Boolean})],Le.prototype,"secondary",void 0),_e([r.property({type:Boolean})],Le.prototype,"unbounded",void 0),_e([r.property({type:Boolean})],Le.prototype,"activated",void 0),_e([r.property({type:Boolean})],Le.prototype,"selected",void 0),_e([r.property({type:Boolean})],Le.prototype,"disabled",void 0),_e([r.state()],Le.prototype,"hovered",void 0),_e([r.state()],Le.prototype,"focused",void 0),_e([r.state()],Le.prototype,"pressed",void 0),_e([r.state()],Le.prototype,"rippling",void 0),_e([r.state()],Le.prototype,"rippleSize",void 0),_e([r.state()],Le.prototype,"originX",void 0),_e([r.state()],Le.prototype,"originY",void 0),_e([r.query(".ft-ripple")],Le.prototype,"ripple",void 0),_e([r.query(".ft-ripple--effect")],Le.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(Le);const
|
|
291
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Le.elementDefinitions={},Le.styles=Be,_e([r.property({type:Boolean})],Le.prototype,"primary",void 0),_e([r.property({type:Boolean})],Le.prototype,"secondary",void 0),_e([r.property({type:Boolean})],Le.prototype,"unbounded",void 0),_e([r.property({type:Boolean})],Le.prototype,"activated",void 0),_e([r.property({type:Boolean})],Le.prototype,"selected",void 0),_e([r.property({type:Boolean})],Le.prototype,"disabled",void 0),_e([r.state()],Le.prototype,"hovered",void 0),_e([r.state()],Le.prototype,"focused",void 0),_e([r.state()],Le.prototype,"pressed",void 0),_e([r.state()],Le.prototype,"rippling",void 0),_e([r.state()],Le.prototype,"rippleSize",void 0),_e([r.state()],Le.prototype,"originX",void 0),_e([r.state()],Le.prototype,"originY",void 0),_e([r.query(".ft-ripple")],Le.prototype,"ripple",void 0),_e([r.query(".ft-ripple--effect")],Le.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(Le);const Me=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Fe=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Re=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Pe=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Ze=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),We=i.css`
|
|
290
292
|
.ft-tooltip--container {
|
|
291
293
|
display: block;
|
|
292
294
|
position: relative;
|
|
@@ -304,7 +306,7 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
304
306
|
width: max-content;
|
|
305
307
|
max-width: ${Ze};
|
|
306
308
|
text-align: center;
|
|
307
|
-
padding: ${
|
|
309
|
+
padding: ${Me};
|
|
308
310
|
z-index: ${Re};
|
|
309
311
|
}
|
|
310
312
|
|
|
@@ -312,7 +314,7 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
312
314
|
padding: 4px 8px;
|
|
313
315
|
border-radius: ${Pe};
|
|
314
316
|
background-color: ${Ue};
|
|
315
|
-
color: ${
|
|
317
|
+
color: ${Fe};
|
|
316
318
|
top: -500px;
|
|
317
319
|
left: -500px;
|
|
318
320
|
position: relative;
|
|
@@ -713,4 +715,4 @@ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
713
715
|
</div>
|
|
714
716
|
`:i.nothing}
|
|
715
717
|
</div>
|
|
716
|
-
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}fi.elementDefinitions={"ft-button":oi,"ft-reader-internal-link":me,"ft-size-watcher":li,"ft-typography":ue},fi.styles=pi,di([r.property({type:Boolean})],fi.prototype,"expanded",void 0),di([r.property()],fi.prototype,"iconVariant",void 0),di([r.property()],fi.prototype,"collapseIcon",void 0),di([r.property()],fi.prototype,"expandIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAll",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideLabel",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllTrailingIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllAlignment",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllIconVariant",void 0),di([r.property()],fi.prototype,"collapseAllIcon",void 0),di([r.property()],fi.prototype,"expandAllIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"autoCollapse",void 0),di([r.property()],fi.prototype,"scope",void 0),di([r.property({type:Boolean})],fi.prototype,"hideIfEmpty",void 0),di([r.property({type:Boolean,reflect:!0})],fi.prototype,"empty",void 0),di([e.jsonProperty({})],fi.prototype,"labels",void 0),di([e.redux(((t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.
|
|
718
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}fi.elementDefinitions={"ft-button":oi,"ft-reader-internal-link":me,"ft-size-watcher":li,"ft-typography":ue},fi.styles=pi,di([r.property({type:Boolean})],fi.prototype,"expanded",void 0),di([r.property()],fi.prototype,"iconVariant",void 0),di([r.property()],fi.prototype,"collapseIcon",void 0),di([r.property()],fi.prototype,"expandIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAll",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideLabel",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllTrailingIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllAlignment",void 0),di([r.property({type:Boolean})],fi.prototype,"expandCollapseAllHideIcon",void 0),di([r.property()],fi.prototype,"expandCollapseAllIconVariant",void 0),di([r.property()],fi.prototype,"collapseAllIcon",void 0),di([r.property()],fi.prototype,"expandAllIcon",void 0),di([r.property({type:Boolean})],fi.prototype,"autoCollapse",void 0),di([r.property()],fi.prototype,"scope",void 0),di([r.property({type:Boolean})],fi.prototype,"hideIfEmpty",void 0),di([r.property({type:Boolean,reflect:!0})],fi.prototype,"empty",void 0),di([e.jsonProperty({})],fi.prototype,"labels",void 0),di([e.redux(((t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)?null===(o=t.currentPage)||void 0===o?void 0:o.toc:void 0:(null===(n=t.paginationConfiguration)||void 0===n?void 0:n.splitCurrentPageToc)?t.pagesToc:t.toc}))],fi.prototype,"toc",void 0),di([e.redux((t=>{var e;return null===(e=t.paginationConfiguration)||void 0===e?void 0:e.splitCurrentPageToc}))],fi.prototype,"splitToc",void 0),di([e.redux()],fi.prototype,"currentPage",void 0),di([e.redux(((t,e)=>{var i,o;return(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)&&!e.isCurrentPageToc?[null===(o=t.currentPage)||void 0===o?void 0:o.rootTocId]:t.visibleTopics}))],fi.prototype,"highlightedTocIds",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"automaticallyExpandedNodes",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"manuallyExpandedNodes",void 0),di([r.state({hasChanged:(t,i)=>!e.deepEqual(t,i)})],fi.prototype,"manuallyCollapsedNodes",void 0),di([r.state()],fi.prototype,"expandAll",void 0),di([r.state()],fi.prototype,"viewportSize",void 0),e.customElement("ft-reader-toc")(fi),t.DEFAULT_LABELS=ai,t.FtReaderToc=fi,t.FtReaderTocCssVariables=hi,t.styles=pi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|