@xiee/utils 1.14.127 → 1.14.129

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/css/article.css CHANGED
@@ -7,14 +7,15 @@ body {
7
7
  --side-margin: calc(0px - var(--side-width) - var(--side-gap));
8
8
  }
9
9
  body, blockquote, .side { background: #fafafa; }
10
- body:not(.pagesjs) .body, .body ~ .appendix, .frontmatter, .fullwidth, .embed-left, .embed-right {
10
+ /* a card: an article (or appendix) that is not inside another article */
11
+ :where(article, .appendix):not(article *, .pagesjs *), .frontmatter, .fullwidth, .embed-left, .embed-right {
11
12
  margin-top: 2em;
12
13
  padding: 1em;
13
14
  box-shadow: 0 0 8px #ccc;
14
15
  background: #fff;
15
16
  }
16
- .appendix, .footnotes, .body .side { font-size: .9em; }
17
- .body ~ .appendix, .frontmatter { background: none; }
17
+ .appendix, .footnotes, article .side { font-size: .9em; }
18
+ .appendix, .frontmatter { background: none; }
18
19
  .appendix h2 { border-bottom: 1px dashed #666; }
19
20
  #TOC { top: 0; }
20
21
  .bg-number {
@@ -23,7 +24,7 @@ body:not(.pagesjs) .body, .body ~ .appendix, .frontmatter, .fullwidth, .embed-le
23
24
  background: lightslategray;
24
25
  color: #fff;
25
26
  }
26
- div:not(.body):has(> table) { overflow-x: auto; }
27
+ div:has(> table) { overflow-x: auto; }
27
28
 
28
29
  /* left/right elements*/
29
30
  .side {
@@ -37,7 +38,7 @@ div:not(.body):has(> table) { overflow-x: auto; }
37
38
  clear: left;
38
39
  margin-left: var(--side-margin);
39
40
  position: sticky;
40
- &:not(.body > *) {
41
+ &:not(article > *) {
41
42
  margin-left: calc(var(--side-margin) + 1em);
42
43
  }
43
44
  }
@@ -130,7 +131,7 @@ div:not(.body):has(> table) { overflow-x: auto; }
130
131
  float: none;
131
132
  }
132
133
  .side { width: 100%; max-height: none; }
133
- :is(main, .body) .side {
134
+ main .side {
134
135
  padding: 0 2em;
135
136
  color: darkslategray;
136
137
  }
@@ -152,7 +153,7 @@ div:not(.body):has(> table) { overflow-x: auto; }
152
153
  @media (max-width: 50em) {
153
154
  body:not(.pagesjs) {
154
155
  padding: initial;
155
- main, .body:not(main > *) { padding: 0 .5em 0; }
156
+ :where(article, .appendix):not(article *) { padding: 0 .5em; }
156
157
  :not(pre) > code { word-break: break-word; }
157
158
  .quote-left, .quote-right {
158
159
  width: inherit;
@@ -1,2 +1,2 @@
1
- :root,.pagesjs{--side-width:12.5rem;--side-gap:2em}@media (width>=93.75em){:root{--side-width:18.75rem}}body{--side-margin:calc(0px - var(--side-width) - var(--side-gap))}body,blockquote,.side{background:#fafafa}body:not(.pagesjs) .body,.body~.appendix,.frontmatter,.fullwidth,.embed-left,.embed-right{background:#fff;margin-top:2em;padding:1em;box-shadow:0 0 8px #ccc}.appendix,.footnotes,.body .side{font-size:.9em}.body~.appendix,.frontmatter{background:0 0}.appendix h2{border-bottom:1px dashed #666}#TOC{top:0}.bg-number{color:#fff;background:#789;border-radius:5px;padding:1px 5px}div:not(.body):has(>table){overflow-x:auto}.side{width:var(--side-width);max-height:100vh;margin:0 auto;overflow:auto}.side-left{float:left;clear:left;margin-left:var(--side-margin);position:sticky;&:not(.body>*){margin-left:calc(var(--side-margin) + 1em)}}.side-right{float:right;clear:right;margin-right:var(--side-margin)}.quote-left,.quote-right{width:45%}.embed-left,.embed-right{margin-top:auto;padding:0}.quote-left,.embed-left{float:left;margin-right:1em}.quote-right,.embed-right{float:right;margin-left:1em}.embed-left{margin-left:var(--side-margin)}.embed-right{margin-right:var(--side-margin)}:is(.side,.embed-left,.embed-right)>:first-child{margin-top:0}:is(.embed-left,.embed-right)>:last-child{margin-bottom:0}:is(.quote-left,.quote-right){&>:first-child{padding-top:.1px}&>:last-child{padding-bottom:.1px}}.fullwidth{float:left;background:#fff;min-width:100%;max-width:calc(100vw - 2em);margin:1em 0 1em 50%;transform:translate(-50%);& *{max-width:calc(100vw - 4em);margin:auto 0}& :is(figcaption,.caption){width:50rem;margin-left:calc(50% - 25rem);padding:1em 1em 0}}.fullscroll{& *{max-width:initial}&,& figure,& .figure{overflow-x:auto}}@media (width>=79.002em){#TOC.side{& .active{color:#32cd32}&>ul>li:has(.active){background:#fff;padding:4px 2px 4px 0}& li li .active{border-left:3px solid;margin-left:calc(-1em - 3px);padding-left:1em}&:has(.active) li:not(:has(.active)) ul{display:none}}.note-ref{cursor:pointer}.note-ref:hover+.side{z-index:1;box-sizing:content-box;background:#f8f8f8;margin-left:1em;padding:.5em;display:inline-block;position:absolute}}@media (width<=79em){body:not(.pagesjs){& #TOC{position:initial;float:none;border:1px solid #eee;border-radius:5px;padding:1em}& .side{width:100%;max-height:none}& :is(main,.body) .side{color:#2f4f4f;padding:0 2em}& .side-left,& .side-right{clear:both;background:0 0;margin:1em auto}& :not(.note-ref)+.side{float:none}& .footnote-ref+.footnotes{float:left}& .side>:last-child{margin-bottom:0}& .embed-left,& .embed-right{float:inherit;margin:auto;padding:1em}}}@media (width<=50em){body:not(.pagesjs){padding:initial;& main,& .body:not(main>*){padding:0 .5em}& :not(pre)>code{word-break:break-word}& .quote-left,& .quote-right{width:inherit;float:inherit;margin:auto}& .fullwidth{margin:initial;transform:initial;float:none;min-width:initial;background:0 0;border:none;& :is(figcaption,.caption){margin:initial;padding:initial}&:not(.fullscroll) *{max-width:100%}}}}@media print{body{background:0 0}}
1
+ :root,.pagesjs{--side-width:12.5rem;--side-gap:2em}@media (width>=93.75em){:root{--side-width:18.75rem}}body{--side-margin:calc(0px - var(--side-width) - var(--side-gap))}body,blockquote,.side{background:#fafafa}:where(article,.appendix):not(article *,.pagesjs *),.frontmatter,.fullwidth,.embed-left,.embed-right{background:#fff;margin-top:2em;padding:1em;box-shadow:0 0 8px #ccc}.appendix,.footnotes,article .side{font-size:.9em}.appendix,.frontmatter{background:0 0}.appendix h2{border-bottom:1px dashed #666}#TOC{top:0}.bg-number{color:#fff;background:#789;border-radius:5px;padding:1px 5px}div:has(>table){overflow-x:auto}.side{width:var(--side-width);max-height:100vh;margin:0 auto;overflow:auto}.side-left{float:left;clear:left;margin-left:var(--side-margin);position:sticky;&:not(article>*){margin-left:calc(var(--side-margin) + 1em)}}.side-right{float:right;clear:right;margin-right:var(--side-margin)}.quote-left,.quote-right{width:45%}.embed-left,.embed-right{margin-top:auto;padding:0}.quote-left,.embed-left{float:left;margin-right:1em}.quote-right,.embed-right{float:right;margin-left:1em}.embed-left{margin-left:var(--side-margin)}.embed-right{margin-right:var(--side-margin)}:is(.side,.embed-left,.embed-right)>:first-child{margin-top:0}:is(.embed-left,.embed-right)>:last-child{margin-bottom:0}:is(.quote-left,.quote-right){&>:first-child{padding-top:.1px}&>:last-child{padding-bottom:.1px}}.fullwidth{float:left;background:#fff;min-width:100%;max-width:calc(100vw - 2em);margin:1em 0 1em 50%;transform:translate(-50%);& *{max-width:calc(100vw - 4em);margin:auto 0}& :is(figcaption,.caption){width:50rem;margin-left:calc(50% - 25rem);padding:1em 1em 0}}.fullscroll{& *{max-width:initial}&,& figure,& .figure{overflow-x:auto}}@media (width>=79.002em){#TOC.side{& .active{color:#32cd32}&>ul>li:has(.active){background:#fff;padding:4px 2px 4px 0}& li li .active{border-left:3px solid;margin-left:calc(-1em - 3px);padding-left:1em}&:has(.active) li:not(:has(.active)) ul{display:none}}.note-ref{cursor:pointer}.note-ref:hover+.side{z-index:1;box-sizing:content-box;background:#f8f8f8;margin-left:1em;padding:.5em;display:inline-block;position:absolute}}@media (width<=79em){body:not(.pagesjs){& #TOC{position:initial;float:none;border:1px solid #eee;border-radius:5px;padding:1em}& .side{width:100%;max-height:none}& main .side{color:#2f4f4f;padding:0 2em}& .side-left,& .side-right{clear:both;background:0 0;margin:1em auto}& :not(.note-ref)+.side{float:none}& .footnote-ref+.footnotes{float:left}& .side>:last-child{margin-bottom:0}& .embed-left,& .embed-right{float:inherit;margin:auto;padding:1em}}}@media (width<=50em){body:not(.pagesjs){padding:initial;& :where(article,.appendix):not(article *){padding:0 .5em}& :not(pre)>code{word-break:break-word}& .quote-left,& .quote-right{width:inherit;float:inherit;margin:auto}& .fullwidth{margin:initial;transform:initial;float:none;min-width:initial;background:0 0;border:none;& :is(figcaption,.caption){margin:initial;padding:initial}&:not(.fullscroll) *{max-width:100%}}}}@media print{body{background:0 0}}
2
2
  /*# sourceMappingURL=article.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,mDAIA,wBAA8B,6BAC9B,mEAGA,yCACA,6JAMA,gDACA,4CACA,2CACA,WACA,wEAMA,2CAGA,2EAMA,gFAKE,2DAIF,oEAKA,mCACA,mDAIA,oDAIA,sDAIA,2CACA,6CACA,8DACA,0DACA,8BACE,gCACA,mCAIF,gIAOE,8CAIA,wFAMF,YACE,sBACA,sCAGF,yBACE,UACE,wBAGA,2DAIA,oFAKA,sDAIF,yBACA,+IAUF,qBACE,mBACE,uFAOA,mCACA,oDAIA,qEAKA,mCACA,sCACA,oCACA,qEAOJ,qBACE,mCAEE,0CACA,uCACA,qEAKA,sGAOE,0DAIA,uCAKN,aACE","sources":["article.css"],"sourcesContent":[":root, .pagesjs {\n --side-width: 12.5rem;\n --side-gap: 2em;\n}\n@media (min-width: 93.75em) { :root { --side-width: 18.75rem; } }\nbody {\n --side-margin: calc(0px - var(--side-width) - var(--side-gap));\n}\nbody, blockquote, .side { background: #fafafa; }\nbody:not(.pagesjs) .body, .body ~ .appendix, .frontmatter, .fullwidth, .embed-left, .embed-right {\n margin-top: 2em;\n padding: 1em;\n box-shadow: 0 0 8px #ccc;\n background: #fff;\n}\n.appendix, .footnotes, .body .side { font-size: .9em; }\n.body ~ .appendix, .frontmatter { background: none; }\n.appendix h2 { border-bottom: 1px dashed #666; }\n#TOC { top: 0; }\n.bg-number {\n padding: 1px 5px;\n border-radius: 5px;\n background: lightslategray;\n color: #fff;\n}\ndiv:not(.body):has(> table) { overflow-x: auto; }\n\n/* left/right elements*/\n.side {\n width: var(--side-width);\n margin: 0 auto;\n max-height: 100vh;\n overflow: auto;\n}\n.side-left {\n float: left;\n clear: left;\n margin-left: var(--side-margin);\n position: sticky;\n &:not(.body > *) {\n margin-left: calc(var(--side-margin) + 1em);\n }\n}\n.side-right {\n float: right;\n clear: right;\n margin-right: var(--side-margin);\n}\n.quote-left, .quote-right { width: 45%; }\n.embed-left, .embed-right {\n margin-top: auto;\n padding: 0;\n}\n.quote-left, .embed-left {\n float: left;\n margin-right: 1em;\n}\n.quote-right, .embed-right {\n float: right;\n margin-left: 1em;\n}\n.embed-left { margin-left: var(--side-margin); }\n.embed-right { margin-right: var(--side-margin); }\n:is(.side, .embed-left, .embed-right) > :first-child { margin-top: 0; }\n:is(.embed-left, .embed-right) > :last-child { margin-bottom: 0; }\n:is(.quote-left, .quote-right) {\n & > :first-child { padding-top: .1px; }\n & > :last-child { padding-bottom: .1px; }\n}\n\n/* wide elements */\n.fullwidth {\n max-width: calc(100vw - 2em);\n margin: 1em 0 1em 50%;\n transform: translateX(-50%);\n float: left;\n min-width: 100%;\n background: #fff;\n & * {\n max-width: calc(100vw - 4em);\n margin: auto 0;\n }\n & :is(figcaption, .caption) {\n margin-left: calc(50% - 25rem);\n width: 50rem;\n padding: 1em 1em 0;\n }\n}\n.fullscroll {\n & * { max-width: initial; }\n &, & figure, & .figure { overflow-x: auto; }\n}\n\n@media (min-width: 79.002em) {\n #TOC.side {\n .active {\n color: limegreen;\n }\n & > ul > li:has(.active) {\n background: #fff;\n padding: 4px 2px 4px 0;\n }\n li li .active {\n border-left: 3px solid;\n margin-left: calc(-1em - 3px);\n padding-left: 1em;\n }\n &:has(.active) li:not(:has(.active)) ul {\n display: none;\n }\n }\n .note-ref { cursor: pointer; }\n .note-ref:hover + .side {\n display: inline-block;\n background: #f8f8f8;\n position: absolute;\n z-index: 1;\n margin-left: 1em;\n padding: .5em;\n box-sizing: content-box;\n }\n}\n@media (max-width: 79em) {\n body:not(.pagesjs) {\n #TOC {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n position: initial;\n float: none;\n }\n .side { width: 100%; max-height: none; }\n :is(main, .body) .side {\n padding: 0 2em;\n color: darkslategray;\n }\n .side-left, .side-right {\n clear: both;\n margin: 1em auto;\n background: none;\n }\n :not(.note-ref) + .side { float: none; }\n .footnote-ref + .footnotes { float: left; }\n .side > :last-child { margin-bottom: 0; }\n .embed-left, .embed-right {\n float: inherit;\n margin: auto;\n padding: 1em;\n }\n }\n}\n@media (max-width: 50em) {\n body:not(.pagesjs) {\n padding: initial;\n main, .body:not(main > *) { padding: 0 .5em 0; }\n :not(pre) > code { word-break: break-word; }\n .quote-left, .quote-right {\n width: inherit;\n float: inherit;\n margin: auto;\n }\n .fullwidth {\n margin: initial;\n transform: initial;\n float: none;\n min-width: initial;\n background: none;\n border: none;\n & :is(figcaption, .caption) {\n margin: initial;\n padding: initial;\n }\n &:not(.fullscroll) * { max-width: 100%; }\n }\n }\n}\n\n@media print {\n body {\n background: none;\n }\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,mDAIA,wBAA8B,6BAC9B,mEAGA,yCAEA,wKAMA,kDACA,sCACA,2CACA,WACA,wEAMA,gCAGA,2EAMA,gFAKE,6DAIF,oEAKA,mCACA,mDAIA,oDAIA,sDAIA,2CACA,6CACA,8DACA,0DACA,8BACE,gCACA,mCAIF,gIAOE,8CAIA,wFAMF,YACE,sBACA,sCAGF,yBACE,UACE,wBAGA,2DAIA,oFAKA,sDAIF,yBACA,+IAUF,qBACE,mBACE,uFAOA,mCACA,yCAIA,qEAKA,mCACA,sCACA,oCACA,qEAOJ,qBACE,mCAEE,0DACA,uCACA,qEAKA,sGAOE,0DAIA,uCAKN,aACE","sources":["article.css"],"sourcesContent":[":root, .pagesjs {\n --side-width: 12.5rem;\n --side-gap: 2em;\n}\n@media (min-width: 93.75em) { :root { --side-width: 18.75rem; } }\nbody {\n --side-margin: calc(0px - var(--side-width) - var(--side-gap));\n}\nbody, blockquote, .side { background: #fafafa; }\n/* a card: an article (or appendix) that is not inside another article */\n:where(article, .appendix):not(article *, .pagesjs *), .frontmatter, .fullwidth, .embed-left, .embed-right {\n margin-top: 2em;\n padding: 1em;\n box-shadow: 0 0 8px #ccc;\n background: #fff;\n}\n.appendix, .footnotes, article .side { font-size: .9em; }\n.appendix, .frontmatter { background: none; }\n.appendix h2 { border-bottom: 1px dashed #666; }\n#TOC { top: 0; }\n.bg-number {\n padding: 1px 5px;\n border-radius: 5px;\n background: lightslategray;\n color: #fff;\n}\ndiv:has(> table) { overflow-x: auto; }\n\n/* left/right elements*/\n.side {\n width: var(--side-width);\n margin: 0 auto;\n max-height: 100vh;\n overflow: auto;\n}\n.side-left {\n float: left;\n clear: left;\n margin-left: var(--side-margin);\n position: sticky;\n &:not(article > *) {\n margin-left: calc(var(--side-margin) + 1em);\n }\n}\n.side-right {\n float: right;\n clear: right;\n margin-right: var(--side-margin);\n}\n.quote-left, .quote-right { width: 45%; }\n.embed-left, .embed-right {\n margin-top: auto;\n padding: 0;\n}\n.quote-left, .embed-left {\n float: left;\n margin-right: 1em;\n}\n.quote-right, .embed-right {\n float: right;\n margin-left: 1em;\n}\n.embed-left { margin-left: var(--side-margin); }\n.embed-right { margin-right: var(--side-margin); }\n:is(.side, .embed-left, .embed-right) > :first-child { margin-top: 0; }\n:is(.embed-left, .embed-right) > :last-child { margin-bottom: 0; }\n:is(.quote-left, .quote-right) {\n & > :first-child { padding-top: .1px; }\n & > :last-child { padding-bottom: .1px; }\n}\n\n/* wide elements */\n.fullwidth {\n max-width: calc(100vw - 2em);\n margin: 1em 0 1em 50%;\n transform: translateX(-50%);\n float: left;\n min-width: 100%;\n background: #fff;\n & * {\n max-width: calc(100vw - 4em);\n margin: auto 0;\n }\n & :is(figcaption, .caption) {\n margin-left: calc(50% - 25rem);\n width: 50rem;\n padding: 1em 1em 0;\n }\n}\n.fullscroll {\n & * { max-width: initial; }\n &, & figure, & .figure { overflow-x: auto; }\n}\n\n@media (min-width: 79.002em) {\n #TOC.side {\n .active {\n color: limegreen;\n }\n & > ul > li:has(.active) {\n background: #fff;\n padding: 4px 2px 4px 0;\n }\n li li .active {\n border-left: 3px solid;\n margin-left: calc(-1em - 3px);\n padding-left: 1em;\n }\n &:has(.active) li:not(:has(.active)) ul {\n display: none;\n }\n }\n .note-ref { cursor: pointer; }\n .note-ref:hover + .side {\n display: inline-block;\n background: #f8f8f8;\n position: absolute;\n z-index: 1;\n margin-left: 1em;\n padding: .5em;\n box-sizing: content-box;\n }\n}\n@media (max-width: 79em) {\n body:not(.pagesjs) {\n #TOC {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n position: initial;\n float: none;\n }\n .side { width: 100%; max-height: none; }\n main .side {\n padding: 0 2em;\n color: darkslategray;\n }\n .side-left, .side-right {\n clear: both;\n margin: 1em auto;\n background: none;\n }\n :not(.note-ref) + .side { float: none; }\n .footnote-ref + .footnotes { float: left; }\n .side > :last-child { margin-bottom: 0; }\n .embed-left, .embed-right {\n float: inherit;\n margin: auto;\n padding: 1em;\n }\n }\n}\n@media (max-width: 50em) {\n body:not(.pagesjs) {\n padding: initial;\n :where(article, .appendix):not(article *) { padding: 0 .5em; }\n :not(pre) > code { word-break: break-word; }\n .quote-left, .quote-right {\n width: inherit;\n float: inherit;\n margin: auto;\n }\n .fullwidth {\n margin: initial;\n transform: initial;\n float: none;\n min-width: initial;\n background: none;\n border: none;\n & :is(figcaption, .caption) {\n margin: initial;\n padding: initial;\n }\n &:not(.fullscroll) * { max-width: 100%; }\n }\n }\n}\n\n@media print {\n body {\n background: none;\n }\n}\n"],"names":[]}
package/css/book.css CHANGED
@@ -1,7 +1,7 @@
1
1
  body {
2
2
  font-family: Palatino, Georgia, serif;
3
3
  }
4
- .footnotes, .side, .body .side, .chapter-toc {
4
+ .footnotes, .side, article .side, .chapter-toc {
5
5
  font-size: .85em;
6
6
  }
7
7
  .frontmatter, .chapter {
@@ -49,7 +49,7 @@ h1 .section-number {
49
49
  border-bottom: 4px solid;
50
50
  margin-bottom: -4px;
51
51
  }
52
- .body h2 { border-bottom-style: dashed; }
52
+ article h2 { border-bottom-style: dashed; }
53
53
  /* TODO: style for h1.part and printing */
54
54
 
55
55
  .pagesjs .pagesjs-page:first-child:has(.pagesjs-front) {
package/css/book.min.css CHANGED
@@ -1,2 +1,2 @@
1
- body{font-family:Palatino,Georgia,serif}.footnotes,.side,.body .side,.chapter-toc{font-size:.85em}.frontmatter,.chapter{min-height:calc(100vh - 1em)}.frontmatter{background:#fff;padding-bottom:0;&>div{background:#ebf6f9;margin:0 -1em;padding:1em}& .title{margin-top:-1em;padding:20vh 1em 1em}}@media (width>=79.002em){body:not(.pagesjs) .chapter-toc{display:none}}.chapter-toc{border:1px solid #eee;border-radius:5px;margin-bottom:2em;padding:1em}.chapter{&:not(.appendix) .main-number{&:before{content:"Chapter "}&:after{content:none}}& h1{border-bottom:1px solid;margin:1em auto 3em;&:has(+.epigraph){margin-bottom:2em}}}h1 .section-number{border-bottom:4px solid;margin-bottom:-4px;display:inline-block}.body h2{border-bottom-style:dashed}.pagesjs .pagesjs-page:first-child:has(.pagesjs-front){padding:0;& .pagesjs-header,& .pagesjs-footer{display:none}& .pagesjs-front{padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);height:100%;margin:0;& .title{margin-top:calc(0px - var(--paper-margin-top))}&>div{margin:0 calc(0px - var(--paper-margin-right)) 0 calc(0px - var(--paper-margin-left))}}}
1
+ body{font-family:Palatino,Georgia,serif}.footnotes,.side,article .side,.chapter-toc{font-size:.85em}.frontmatter,.chapter{min-height:calc(100vh - 1em)}.frontmatter{background:#fff;padding-bottom:0;&>div{background:#ebf6f9;margin:0 -1em;padding:1em}& .title{margin-top:-1em;padding:20vh 1em 1em}}@media (width>=79.002em){body:not(.pagesjs) .chapter-toc{display:none}}.chapter-toc{border:1px solid #eee;border-radius:5px;margin-bottom:2em;padding:1em}.chapter{&:not(.appendix) .main-number{&:before{content:"Chapter "}&:after{content:none}}& h1{border-bottom:1px solid;margin:1em auto 3em;&:has(+.epigraph){margin-bottom:2em}}}h1 .section-number{border-bottom:4px solid;margin-bottom:-4px;display:inline-block}article h2{border-bottom-style:dashed}.pagesjs .pagesjs-page:first-child:has(.pagesjs-front){padding:0;& .pagesjs-header,& .pagesjs-footer{display:none}& .pagesjs-front{padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);height:100%;margin:0;& .title{margin-top:calc(0px - var(--paper-margin-top))}&>div{margin:0 calc(0px - var(--paper-margin-right)) 0 calc(0px - var(--paper-margin-left))}}}
2
2
  /*# sourceMappingURL=book.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,wCAGA,0DAGA,mDAGA,8CAKE,mDAKA,+CAKF,yBACE,8CAIF,mFAMA,SACE,8BACE,4BACA,sBAEF,iDAGE,sCAGJ,mFAKA,oCAGA,iEAEE,iDAGA,oJAIE,wDAGA","sources":["book.css"],"sourcesContent":["body {\n font-family: Palatino, Georgia, serif;\n}\n.footnotes, .side, .body .side, .chapter-toc {\n font-size: .85em;\n}\n.frontmatter, .chapter {\n min-height: calc(100vh - 1em);\n}\n.frontmatter {\n background-image: radial-gradient(#b6cee2 1px, #fff 1px);\n background-size: 2em 2em;\n background: #fff;\n padding-bottom: 0;\n & > div {\n margin: 0 -1em;\n background: #ebf6f9;\n padding: 1em;\n }\n & .title {\n padding: 20vh 1em 1em;\n margin-top: -1em;\n }\n}\n@media (min-width: 79.002em) {\n body:not(.pagesjs) .chapter-toc {\n display: none;\n }\n}\n.chapter-toc {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n margin-bottom: 2em;\n}\n.chapter {\n &:not(.appendix) .main-number {\n &::before { content: \"Chapter \"; }\n &::after { content: none; }\n }\n h1 {\n margin: 1em auto 3em;\n border-bottom: 1px solid;\n &:has(+ .epigraph) { margin-bottom: 2em; }\n }\n}\nh1 .section-number {\n display: inline-block;\n border-bottom: 4px solid;\n margin-bottom: -4px;\n}\n.body h2 { border-bottom-style: dashed; }\n/* TODO: style for h1.part and printing */\n\n.pagesjs .pagesjs-page:first-child:has(.pagesjs-front) {\n padding: 0;\n .pagesjs-header, .pagesjs-footer {\n display: none;\n }\n .pagesjs-front {\n margin: 0;\n padding: var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);\n height: 100%;\n .title {\n margin-top: calc(0px - var(--paper-margin-top));\n }\n & > div {\n margin: 0 calc(0px - var(--paper-margin-right)) 0 calc(0px - var(--paper-margin-left));\n }\n }\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,wCAGA,4DAGA,mDAGA,8CAKE,mDAKA,+CAKF,yBACE,8CAIF,mFAMA,SACE,8BACE,4BACA,sBAEF,iDAGE,sCAGJ,mFAKA,sCAGA,iEAEE,iDAGA,oJAIE,wDAGA","sources":["book.css"],"sourcesContent":["body {\n font-family: Palatino, Georgia, serif;\n}\n.footnotes, .side, article .side, .chapter-toc {\n font-size: .85em;\n}\n.frontmatter, .chapter {\n min-height: calc(100vh - 1em);\n}\n.frontmatter {\n background-image: radial-gradient(#b6cee2 1px, #fff 1px);\n background-size: 2em 2em;\n background: #fff;\n padding-bottom: 0;\n & > div {\n margin: 0 -1em;\n background: #ebf6f9;\n padding: 1em;\n }\n & .title {\n padding: 20vh 1em 1em;\n margin-top: -1em;\n }\n}\n@media (min-width: 79.002em) {\n body:not(.pagesjs) .chapter-toc {\n display: none;\n }\n}\n.chapter-toc {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n margin-bottom: 2em;\n}\n.chapter {\n &:not(.appendix) .main-number {\n &::before { content: \"Chapter \"; }\n &::after { content: none; }\n }\n h1 {\n margin: 1em auto 3em;\n border-bottom: 1px solid;\n &:has(+ .epigraph) { margin-bottom: 2em; }\n }\n}\nh1 .section-number {\n display: inline-block;\n border-bottom: 4px solid;\n margin-bottom: -4px;\n}\narticle h2 { border-bottom-style: dashed; }\n/* TODO: style for h1.part and printing */\n\n.pagesjs .pagesjs-page:first-child:has(.pagesjs-front) {\n padding: 0;\n .pagesjs-header, .pagesjs-footer {\n display: none;\n }\n .pagesjs-front {\n margin: 0;\n padding: var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);\n height: 100%;\n .title {\n margin-top: calc(0px - var(--paper-margin-top));\n }\n & > div {\n margin: 0 calc(0px - var(--paper-margin-right)) 0 calc(0px - var(--paper-margin-left));\n }\n }\n}\n"],"names":[]}
package/css/default.css CHANGED
@@ -59,8 +59,8 @@ hr, .footnotes::before { border: 1px dashed #ddd; }
59
59
  & > ul { padding: 0; columns: 18em; }
60
60
  ul ul { border-left: 1px solid lightsteelblue; }
61
61
  }
62
- .body h2 { border-bottom: 1px solid #666; }
63
- .body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }
62
+ article h2 { border-bottom: 1px solid #666; }
63
+ article .appendix, .appendix ~ h2 { border-bottom-style: dashed; }
64
64
  .main-number::after { content: "."; }
65
65
  span[class^="ref-number-"] { font-weight: bold; }
66
66
  .ref-number-fig::after, .ref-number-tab::after { content: ":"; }
@@ -1,2 +1,2 @@
1
- body{-webkit-print-color-adjust:exact;print-color-adjust:exact;max-width:50em;margin:auto;padding:1em;font-family:sans-serif;line-height:1.5}.abstract,.footnotes,footer,#refs,div:has(>.caption){font-size:.9em}li li{font-size:.95em}ul:has(li>input[type=checkbox]){padding-left:1em;list-style:none}*,:before,:after{box-sizing:border-box}a{color:#4682b4}pre,img{max-width:100%}pre{white-space:pre-wrap;word-break:break-word;& code{padding:1em;display:block;overflow-x:auto}}:not(pre,th)>code,code[class],div>.caption{background:#f8f8f8}pre>code:is(:not([class]),.language-plain,.language-none,.plain),.box,.figure,.table{background:inherit;border:1px solid #eee}pre>code{&.message{border-color:#9eeaf9}&.warning{background:#fff3cd;border-color:#fff3cd}&.error{background:#f8d7da;border-color:#f8d7da}}.fenced-chunk{border-left:1px solid #666}.code-fence{opacity:.4;border:1px dashed #666;border-left:2px solid;&:hover{opacity:inherit}}.box,.figure,.table,table{margin:1em auto}div>.caption{padding:1px 1em}.figure{& p:has(img,svg),& pre:has(svg){text-align:center}}.flex-col{justify-content:space-between;display:flex}table{&:only-child:not(.table>*){margin:auto}& th,& td{font-variant-numeric:tabular-nums;padding:5px}&:not([class]){& thead,& tfoot,& tr:nth-child(2n){background:#f5f5f5}& thead th{border-bottom:1px solid #ddd}border-top:1px solid #666;border-bottom:1px solid #666}}blockquote{color:#666;border-left:.5em solid #eee;margin:0;padding:1px 1em}hr,.footnotes:before{border:1px dashed #ddd}.frontmatter{text-align:center}#TOC{& a{text-decoration:none}& ul{padding-left:1em;list-style:none}&>ul{columns:18em;padding:0}& ul ul{border-left:1px solid #b0c4de}}.body h2{border-bottom:1px solid #666}.body .appendix,.appendix~h2{border-bottom-style:dashed}.main-number:after{content:"."}span[class^=ref-number-]{font-weight:700}.ref-number-fig:after,.ref-number-tab:after{content:":"}.cross-ref-chp:before{content:"Chapter "}.cross-ref-sec:before{content:"Section "}.cross-ref-apd:before{content:"Appendix "}.cross-ref-fig:before,.ref-number-fig:before{content:"Figure "}.cross-ref-tab:before,.ref-number-tab:before{content:"Table "}.cross-ref-eqn:before,.MathJax_ref:has(mjx-mtext>mjx-c+mjx-c):before{content:"Equation "}.abstract,#refs{&:before{margin:1em auto;font-weight:700;display:block}}.abstract:before{content:"Abstract";text-align:center}#refs:before{content:"Bibliography";font-size:1.5em}.ref-paren-open:before{content:"("}.ref-paren-close:after{content:")"}.ref-semicolon:after{content:"; "}.ref-and:after{content:" and "}.ref-et-al:after{content:" et al.";font-style:italic}.footnote-ref a{&:before{content:"["}&:after{content:"]"}}section.footnotes{margin-top:2em;&:before{content:"";max-width:20em;display:block}}.fade{opacity:.6;background:repeating-linear-gradient(135deg,#fff,#fff 30px,#ddd 32px 32px)}@media (prefers-color-scheme:dark){:is(html,img,video,iframe){&:not(.no-invert,.no-invert *),.no-invert:not(&){filter:invert()}}body{background:#ededed}}@media print{body{max-width:100%}tr,img{break-inside:avoid}}@media only screen and (width>=62em){body:not(.pagesjs) pre:has(.line-numbers):not(:hover){white-space:pre}}
1
+ body{-webkit-print-color-adjust:exact;print-color-adjust:exact;max-width:50em;margin:auto;padding:1em;font-family:sans-serif;line-height:1.5}.abstract,.footnotes,footer,#refs,div:has(>.caption){font-size:.9em}li li{font-size:.95em}ul:has(li>input[type=checkbox]){padding-left:1em;list-style:none}*,:before,:after{box-sizing:border-box}a{color:#4682b4}pre,img{max-width:100%}pre{white-space:pre-wrap;word-break:break-word;& code{padding:1em;display:block;overflow-x:auto}}:not(pre,th)>code,code[class],div>.caption{background:#f8f8f8}pre>code:is(:not([class]),.language-plain,.language-none,.plain),.box,.figure,.table{background:inherit;border:1px solid #eee}pre>code{&.message{border-color:#9eeaf9}&.warning{background:#fff3cd;border-color:#fff3cd}&.error{background:#f8d7da;border-color:#f8d7da}}.fenced-chunk{border-left:1px solid #666}.code-fence{opacity:.4;border:1px dashed #666;border-left:2px solid;&:hover{opacity:inherit}}.box,.figure,.table,table{margin:1em auto}div>.caption{padding:1px 1em}.figure{& p:has(img,svg),& pre:has(svg){text-align:center}}.flex-col{justify-content:space-between;display:flex}table{&:only-child:not(.table>*){margin:auto}& th,& td{font-variant-numeric:tabular-nums;padding:5px}&:not([class]){& thead,& tfoot,& tr:nth-child(2n){background:#f5f5f5}& thead th{border-bottom:1px solid #ddd}border-top:1px solid #666;border-bottom:1px solid #666}}blockquote{color:#666;border-left:.5em solid #eee;margin:0;padding:1px 1em}hr,.footnotes:before{border:1px dashed #ddd}.frontmatter{text-align:center}#TOC{& a{text-decoration:none}& ul{padding-left:1em;list-style:none}&>ul{columns:18em;padding:0}& ul ul{border-left:1px solid #b0c4de}}article h2{border-bottom:1px solid #666}article .appendix,.appendix~h2{border-bottom-style:dashed}.main-number:after{content:"."}span[class^=ref-number-]{font-weight:700}.ref-number-fig:after,.ref-number-tab:after{content:":"}.cross-ref-chp:before{content:"Chapter "}.cross-ref-sec:before{content:"Section "}.cross-ref-apd:before{content:"Appendix "}.cross-ref-fig:before,.ref-number-fig:before{content:"Figure "}.cross-ref-tab:before,.ref-number-tab:before{content:"Table "}.cross-ref-eqn:before,.MathJax_ref:has(mjx-mtext>mjx-c+mjx-c):before{content:"Equation "}.abstract,#refs{&:before{margin:1em auto;font-weight:700;display:block}}.abstract:before{content:"Abstract";text-align:center}#refs:before{content:"Bibliography";font-size:1.5em}.ref-paren-open:before{content:"("}.ref-paren-close:after{content:")"}.ref-semicolon:after{content:"; "}.ref-and:after{content:" and "}.ref-et-al:after{content:" et al.";font-style:italic}.footnote-ref a{&:before{content:"["}&:after{content:"]"}}section.footnotes{margin-top:2em;&:before{content:"";max-width:20em;display:block}}.fade{opacity:.6;background:repeating-linear-gradient(135deg,#fff,#fff 30px,#ddd 32px 32px)}@media (prefers-color-scheme:dark){:is(html,img,video,iframe){&:not(.no-invert,.no-invert *),.no-invert:not(&){filter:invert()}}body{background:#ededed}}@media print{body{max-width:100%}tr,img{break-inside:avoid}}@media only screen and (width>=62em){body:not(.pagesjs) pre:has(.line-numbers):not(:hover){white-space:pre}}
2
2
  /*# sourceMappingURL=default.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,6IASA,oEACA,sBACA,iEACA,uCACA,gBACA,uBACA,+CAEE,kDAEF,8DACA,8HACA,SACE,+BACA,kDACA,iDAEF,yCACA,oEAIE,yBAEF,0CACA,6BACA,QAAU,mDACV,qDACA,MACE,uCACA,wDACA,eACE,sDACA,wCACW,wDAIf,2EAMA,4CACA,+BACA,KACE,yBACA,sCACA,4BACA,uCAEF,sCACA,wDACA,+BACA,yCACA,wDACA,yCACA,yCACA,0CACA,+DACA,8DACA,yFACA,gBACE,wDAEF,sDACA,oDACA,mCACA,mCACA,kCACA,+BACA,qDACA,gBACE,qBACA,qBAEF,iCAEE,kDAEF,4FAIA,mCACE,2BACE,kEAEF,yBAEF,aACE,oBACA,2BAEF,qCACE","sources":["default.css"],"sourcesContent":["body {\n font-family: sans-serif;\n max-width: 50em;\n margin: auto;\n padding: 1em;\n line-height: 1.5;\n print-color-adjust: exact;\n -webkit-print-color-adjust: exact;\n}\n.abstract, .footnotes, footer, #refs, div:has(> .caption) { font-size: .9em; }\nli li { font-size: .95em; }\nul:has(li > input[type=\"checkbox\"]) { list-style: none; padding-left: 1em; }\n*, :before, :after { box-sizing: border-box; }\na { color: steelblue; }\npre, img { max-width: 100%; }\npre {\n white-space: pre-wrap; word-break: break-word;\n code { display: block; padding: 1em; overflow-x: auto; }\n}\n:not(pre, th) > code, code[class], div > .caption { background: #f8f8f8; }\npre > code:is(:not([class]), .language-plain, .language-none, .plain), .box, .figure, .table { background: inherit; border: 1px solid #eee; }\npre > code {\n &.message { border-color: #9eeaf9; }\n &.warning { background: #fff3cd; border-color: #fff3cd; }\n &.error { background: #f8d7da; border-color: #f8d7da; }\n}\n.fenced-chunk { border-left: 1px solid #666; }\n.code-fence {\n opacity: .4;\n border: 1px dashed #666;\n border-left: 2px solid;\n &:hover { opacity: inherit; }\n}\n.box, .figure, .table, table { margin: 1em auto; }\ndiv > .caption { padding: 1px 1em; }\n.figure { p:has(img, svg), pre:has(svg) { text-align: center; } }\n.flex-col { display: flex; justify-content: space-between; }\ntable {\n &:only-child:not(.table > *) { margin: auto; }\n th, td { padding: 5px; font-variant-numeric: tabular-nums; }\n &:not([class]) {\n thead, tfoot, tr:nth-child(even) { background: whitesmoke; }\n thead th { border-bottom: 1px solid #ddd; }\n border-top: 1px solid #666;\n border-bottom: 1px solid #666;\n }\n}\nblockquote {\n color: #666;\n margin: 0;\n padding: 1px 1em;\n border-left: .5em solid #eee;\n}\nhr, .footnotes::before { border: 1px dashed #ddd; }\n.frontmatter { text-align: center; }\n#TOC {\n a { text-decoration: none; }\n ul { list-style: none; padding-left: 1em; }\n & > ul { padding: 0; columns: 18em; }\n ul ul { border-left: 1px solid lightsteelblue; }\n}\n.body h2 { border-bottom: 1px solid #666; }\n.body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }\n.main-number::after { content: \".\"; }\nspan[class^=\"ref-number-\"] { font-weight: bold; }\n.ref-number-fig::after, .ref-number-tab::after { content: \":\"; }\n.cross-ref-chp::before { content: \"Chapter \"; }\n.cross-ref-sec::before { content: \"Section \"; }\n.cross-ref-apd::before { content: \"Appendix \"; }\n.cross-ref-fig::before, .ref-number-fig::before { content: \"Figure \"; }\n.cross-ref-tab::before, .ref-number-tab::before { content: \"Table \"; }\n.cross-ref-eqn::before, .MathJax_ref:has(mjx-mtext > mjx-c + mjx-c)::before { content: \"Equation \"; }\n.abstract, #refs {\n &::before { display: block; margin: 1em auto; font-weight: bold; }\n}\n.abstract::before { content: \"Abstract\"; text-align: center; }\n#refs::before { content: \"Bibliography\"; font-size: 1.5em; }\n.ref-paren-open::before { content: \"(\"; }\n.ref-paren-close::after { content: \")\"; }\n.ref-semicolon::after { content: \"; \"; }\n.ref-and::after { content: \" and \"; }\n.ref-et-al::after { content: \" et al.\"; font-style: italic; }\n.footnote-ref a {\n &::before { content: \"[\"; }\n &::after { content: \"]\"; }\n}\nsection.footnotes {\n margin-top: 2em;\n &::before { content: \"\"; display: block; max-width: 20em; }\n}\n.fade {\n background: repeating-linear-gradient(135deg, white, white 30px, #ddd 32px, #ddd 32px);\n opacity: 0.6;\n}\n@media (prefers-color-scheme: dark) {\n :is(html, img, video, iframe) {\n &:not(.no-invert, .no-invert *), .no-invert:not(&) { filter: invert(1); }\n }\n body { background: #ededed; }\n}\n@media print {\n body { max-width: 100%; }\n tr, img { break-inside: avoid; }\n}\n@media only screen and (min-width: 62em) {\n body:not(.pagesjs) pre:has(.line-numbers):not(:hover) { white-space: pre; }\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,6IASA,oEACA,sBACA,iEACA,uCACA,gBACA,uBACA,+CAEE,kDAEF,8DACA,8HACA,SACE,+BACA,kDACA,iDAEF,yCACA,oEAIE,yBAEF,0CACA,6BACA,QAAU,mDACV,qDACA,MACE,uCACA,wDACA,eACE,sDACA,wCACW,wDAIf,2EAMA,4CACA,+BACA,KACE,yBACA,sCACA,4BACA,uCAEF,wCACA,0DACA,+BACA,yCACA,wDACA,yCACA,yCACA,0CACA,+DACA,8DACA,yFACA,gBACE,wDAEF,sDACA,oDACA,mCACA,mCACA,kCACA,+BACA,qDACA,gBACE,qBACA,qBAEF,iCAEE,kDAEF,4FAIA,mCACE,2BACE,kEAEF,yBAEF,aACE,oBACA,2BAEF,qCACE","sources":["default.css"],"sourcesContent":["body {\n font-family: sans-serif;\n max-width: 50em;\n margin: auto;\n padding: 1em;\n line-height: 1.5;\n print-color-adjust: exact;\n -webkit-print-color-adjust: exact;\n}\n.abstract, .footnotes, footer, #refs, div:has(> .caption) { font-size: .9em; }\nli li { font-size: .95em; }\nul:has(li > input[type=\"checkbox\"]) { list-style: none; padding-left: 1em; }\n*, :before, :after { box-sizing: border-box; }\na { color: steelblue; }\npre, img { max-width: 100%; }\npre {\n white-space: pre-wrap; word-break: break-word;\n code { display: block; padding: 1em; overflow-x: auto; }\n}\n:not(pre, th) > code, code[class], div > .caption { background: #f8f8f8; }\npre > code:is(:not([class]), .language-plain, .language-none, .plain), .box, .figure, .table { background: inherit; border: 1px solid #eee; }\npre > code {\n &.message { border-color: #9eeaf9; }\n &.warning { background: #fff3cd; border-color: #fff3cd; }\n &.error { background: #f8d7da; border-color: #f8d7da; }\n}\n.fenced-chunk { border-left: 1px solid #666; }\n.code-fence {\n opacity: .4;\n border: 1px dashed #666;\n border-left: 2px solid;\n &:hover { opacity: inherit; }\n}\n.box, .figure, .table, table { margin: 1em auto; }\ndiv > .caption { padding: 1px 1em; }\n.figure { p:has(img, svg), pre:has(svg) { text-align: center; } }\n.flex-col { display: flex; justify-content: space-between; }\ntable {\n &:only-child:not(.table > *) { margin: auto; }\n th, td { padding: 5px; font-variant-numeric: tabular-nums; }\n &:not([class]) {\n thead, tfoot, tr:nth-child(even) { background: whitesmoke; }\n thead th { border-bottom: 1px solid #ddd; }\n border-top: 1px solid #666;\n border-bottom: 1px solid #666;\n }\n}\nblockquote {\n color: #666;\n margin: 0;\n padding: 1px 1em;\n border-left: .5em solid #eee;\n}\nhr, .footnotes::before { border: 1px dashed #ddd; }\n.frontmatter { text-align: center; }\n#TOC {\n a { text-decoration: none; }\n ul { list-style: none; padding-left: 1em; }\n & > ul { padding: 0; columns: 18em; }\n ul ul { border-left: 1px solid lightsteelblue; }\n}\narticle h2 { border-bottom: 1px solid #666; }\narticle .appendix, .appendix ~ h2 { border-bottom-style: dashed; }\n.main-number::after { content: \".\"; }\nspan[class^=\"ref-number-\"] { font-weight: bold; }\n.ref-number-fig::after, .ref-number-tab::after { content: \":\"; }\n.cross-ref-chp::before { content: \"Chapter \"; }\n.cross-ref-sec::before { content: \"Section \"; }\n.cross-ref-apd::before { content: \"Appendix \"; }\n.cross-ref-fig::before, .ref-number-fig::before { content: \"Figure \"; }\n.cross-ref-tab::before, .ref-number-tab::before { content: \"Table \"; }\n.cross-ref-eqn::before, .MathJax_ref:has(mjx-mtext > mjx-c + mjx-c)::before { content: \"Equation \"; }\n.abstract, #refs {\n &::before { display: block; margin: 1em auto; font-weight: bold; }\n}\n.abstract::before { content: \"Abstract\"; text-align: center; }\n#refs::before { content: \"Bibliography\"; font-size: 1.5em; }\n.ref-paren-open::before { content: \"(\"; }\n.ref-paren-close::after { content: \")\"; }\n.ref-semicolon::after { content: \"; \"; }\n.ref-and::after { content: \" and \"; }\n.ref-et-al::after { content: \" et al.\"; font-style: italic; }\n.footnote-ref a {\n &::before { content: \"[\"; }\n &::after { content: \"]\"; }\n}\nsection.footnotes {\n margin-top: 2em;\n &::before { content: \"\"; display: block; max-width: 20em; }\n}\n.fade {\n background: repeating-linear-gradient(135deg, white, white 30px, #ddd 32px, #ddd 32px);\n opacity: 0.6;\n}\n@media (prefers-color-scheme: dark) {\n :is(html, img, video, iframe) {\n &:not(.no-invert, .no-invert *), .no-invert:not(&) { filter: invert(1); }\n }\n body { background: #ededed; }\n}\n@media print {\n body { max-width: 100%; }\n tr, img { break-inside: avoid; }\n}\n@media only screen and (min-width: 62em) {\n body:not(.pagesjs) pre:has(.line-numbers):not(:hover) { white-space: pre; }\n}\n"],"names":[]}
package/css/pages.css CHANGED
@@ -154,6 +154,19 @@
154
154
  }
155
155
  }
156
156
  }
157
+ .pagesjs > .pagesjs-progress {
158
+ display: block;
159
+ position: fixed;
160
+ top: 50%;
161
+ left: 50%;
162
+ transform: translate(-50%, -50%);
163
+ z-index: 9999;
164
+ padding: .3em .8em;
165
+ border-radius: 1em;
166
+ background: rgba(0, 0, 0, .75);
167
+ color: white;
168
+ font: 14px sans-serif;
169
+ }
157
170
  .pagesjs-settle .pagesjs-body {
158
171
  /* the probe page that holds all content has sides, but normal pages don't */
159
172
  padding: 0 !important;
@@ -205,6 +218,7 @@
205
218
  .pagesjs-filling {
206
219
  display: block;
207
220
  .pagesjs-page {
221
+ opacity: 0; /* don't show the page that is being filled (only the progress) */
208
222
  height: auto;
209
223
  .pagesjs-body:has(.footnotes) {
210
224
  margin-bottom: 1em;
package/css/pages.min.css CHANGED
@@ -1,2 +1,2 @@
1
- :root{--paper-width:210mm;--paper-height:297mm;--paper-margin-top:40px;--paper-margin-right:80px;--paper-margin-bottom:40px;--paper-margin-left:80px;--page-header-height:40px;--page-header-bottom:40px;--page-footer-height:40px;--page-footer-top:40px}@page{size:var(--paper-width) var(--paper-height);margin:0}@page multiple{margin-top:var(--paper-margin-top);margin-bottom:var(--paper-margin-bottom)}.page-multiple{page:multiple}.pagesjs{flex-wrap:wrap;justify-content:center;gap:5mm;max-width:100%;margin:5mm;padding:0;display:flex;& .pagesjs-front,& .chapter{min-height:unset;box-shadow:none}&>*,&:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc){display:none}& .pagesjs-page{width:var(--paper-width);height:var(--paper-height);padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);break-after:page;flex-direction:column;justify-content:space-between;display:flex;overflow:hidden;& img{max-width:100%}& .chapter-before,& .chapter-after,& .buttons:has(+.chapter-before){display:none}& #TOC{border:none;margin-left:auto;padding:0;&:not(.chapter-toc):is(.fragment-first,:not(.pagesjs-fragmented)):before{content:"Contents";margin-bottom:1em;font-size:1.5em;font-weight:700;display:block}& a{display:flex;&:after{content:attr(data-page-number);align-self:end;margin-left:1ch}& .section-number{margin-right:.3em}& .toc-text{flex:1 0;position:relative;overflow:hidden;&:after{content:"";border-bottom:1px dashed;width:100%;margin-left:1ch;position:absolute;bottom:1.5ex}}}}& .pagesjs-wrap{box-shadow:none!important;float:none!important;background:0 0!important;border:none!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:block!important;position:static!important;transform:none!important}& .pagesjs-run{display:block}& .pagesjs-fragmented{&:not(.fragment-first){border-top:none;margin-top:0;padding-top:0;&>thead{opacity:.5}}&:not(.fragment-last){border-bottom:none;margin-bottom:0;padding-bottom:0;&>tfoot{opacity:.5}}}& li.pagesjs-fragmented:not(.fragment-first)::marker{content:""}& .fullwidth{float:none;max-width:none;width:var(--paper-width);margin-left:calc(0px - var(--paper-margin-left));transform:none}& .footnotes:before{content:"";border-top:1px solid;max-width:20em;display:block}&:has(.side-left,.embed-left) .pagesjs-body{padding-left:calc(0px - var(--side-margin));& .fullwidth{transform:translate(var(--side-margin))}}&:has(.side-right,.embed-right) .pagesjs-body{padding-right:calc(0px - var(--side-margin))}& .side{background:0 0;font-size:.9em}}}.pagesjs-settle .pagesjs-body{padding:0!important}.pagesjs-header,.pagesjs-footer{justify-content:space-between;font-size:.9em;display:flex}.pagesjs-header{flex:0 0 var(--page-header-height);margin-bottom:var(--page-header-bottom);align-items:end;&:before{content:attr(data-main-title)}&:after{content:attr(data-page-title)}}.pagesjs-footer{flex:0 0 var(--page-footer-height);margin-top:var(--page-footer-top);align-items:start;&:before{content:" "}&:after{content:attr(data-page-number)}}.pagesjs-body{flex-grow:1;min-height:0;position:relative}@media only screen{.pagesjs{&:has(.pagesjs-page){background:#f7f7f7}& .pagesjs-page{background:#fff}& .page-multiple{overflow-y:auto}}.pagesjs-filling{display:block;& .pagesjs-page{height:auto;& .pagesjs-body:has(.footnotes){margin-bottom:1em;& .footnotes{float:left;width:100%}}}}}@media print{.pagesjs{gap:0;margin:0;& .page-multiple{height:auto;padding-top:0;padding-bottom:0}}}
1
+ :root{--paper-width:210mm;--paper-height:297mm;--paper-margin-top:40px;--paper-margin-right:80px;--paper-margin-bottom:40px;--paper-margin-left:80px;--page-header-height:40px;--page-header-bottom:40px;--page-footer-height:40px;--page-footer-top:40px}@page{size:var(--paper-width) var(--paper-height);margin:0}@page multiple{margin-top:var(--paper-margin-top);margin-bottom:var(--paper-margin-bottom)}.page-multiple{page:multiple}.pagesjs{flex-wrap:wrap;justify-content:center;gap:5mm;max-width:100%;margin:5mm;padding:0;display:flex;& .pagesjs-front,& .chapter{min-height:unset;box-shadow:none}&>*,&:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc){display:none}& .pagesjs-page{width:var(--paper-width);height:var(--paper-height);padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);break-after:page;flex-direction:column;justify-content:space-between;display:flex;overflow:hidden;& img{max-width:100%}& .chapter-before,& .chapter-after,& .buttons:has(+.chapter-before){display:none}& #TOC{border:none;margin-left:auto;padding:0;&:not(.chapter-toc):is(.fragment-first,:not(.pagesjs-fragmented)):before{content:"Contents";margin-bottom:1em;font-size:1.5em;font-weight:700;display:block}& a{display:flex;&:after{content:attr(data-page-number);align-self:end;margin-left:1ch}& .section-number{margin-right:.3em}& .toc-text{flex:1 0;position:relative;overflow:hidden;&:after{content:"";border-bottom:1px dashed;width:100%;margin-left:1ch;position:absolute;bottom:1.5ex}}}}& .pagesjs-wrap{box-shadow:none!important;float:none!important;background:0 0!important;border:none!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:block!important;position:static!important;transform:none!important}& .pagesjs-run{display:block}& .pagesjs-fragmented{&:not(.fragment-first){border-top:none;margin-top:0;padding-top:0;&>thead{opacity:.5}}&:not(.fragment-last){border-bottom:none;margin-bottom:0;padding-bottom:0;&>tfoot{opacity:.5}}}& li.pagesjs-fragmented:not(.fragment-first)::marker{content:""}& .fullwidth{float:none;max-width:none;width:var(--paper-width);margin-left:calc(0px - var(--paper-margin-left));transform:none}& .footnotes:before{content:"";border-top:1px solid;max-width:20em;display:block}&:has(.side-left,.embed-left) .pagesjs-body{padding-left:calc(0px - var(--side-margin));& .fullwidth{transform:translate(var(--side-margin))}}&:has(.side-right,.embed-right) .pagesjs-body{padding-right:calc(0px - var(--side-margin))}& .side{background:0 0;font-size:.9em}}}.pagesjs>.pagesjs-progress{z-index:9999;color:#fff;background:#000000bf;border-radius:1em;padding:.3em .8em;font:14px sans-serif;display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.pagesjs-settle .pagesjs-body{padding:0!important}.pagesjs-header,.pagesjs-footer{justify-content:space-between;font-size:.9em;display:flex}.pagesjs-header{flex:0 0 var(--page-header-height);margin-bottom:var(--page-header-bottom);align-items:end;&:before{content:attr(data-main-title)}&:after{content:attr(data-page-title)}}.pagesjs-footer{flex:0 0 var(--page-footer-height);margin-top:var(--page-footer-top);align-items:start;&:before{content:" "}&:after{content:attr(data-page-number)}}.pagesjs-body{flex-grow:1;min-height:0;position:relative}@media only screen{.pagesjs{&:has(.pagesjs-page){background:#f7f7f7}& .pagesjs-page{background:#fff}& .page-multiple{overflow-y:auto}}.pagesjs-filling{display:block;& .pagesjs-page{opacity:0;height:auto;& .pagesjs-body:has(.footnotes){margin-bottom:1em;& .footnotes{float:left;width:100%}}}}}@media print{.pagesjs{gap:0;margin:0;& .page-multiple{height:auto;padding-top:0;padding-bottom:0}}}
2
2
  /*# sourceMappingURL=pages.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,0PAYA,2DAIA,2FAIA,6BAGA,wGAQE,6DAIA,sFAGA,oRASE,qBAGA,iFAGA,8CAIE,4JAOA,iBAEE,sEAKA,oCAGA,uDAIE,yGAaN,2TAeA,6BAIA,sBACE,kEAIE,oBAEF,0EAIE,qBAIJ,gEAGA,gIAOA,iFAMA,wFAEE,sDAIF,2FAGA,wCAMJ,kDAIA,0FAKA,2GAIE,uCAGA,uCAIF,uGAIE,qBAGA,wCAIF,yDAKA,mBACE,SACE,wCAGA,gCAGA,kCAIF,+BAEE,4BAEE,kDAEE,uCAQR,aACE,wBAGE","sources":["pages.css"],"sourcesContent":[":root {\n --paper-width: 210mm;\n --paper-height: 297mm;\n --paper-margin-top: 40px;\n --paper-margin-right: 80px;\n --paper-margin-bottom: 40px;\n --paper-margin-left: 80px;\n --page-header-height: 40px;\n --page-header-bottom: 40px;\n --page-footer-height: 40px;\n --page-footer-top: 40px;\n}\n@page {\n size: var(--paper-width) var(--paper-height);\n margin: 0;\n}\n@page multiple {\n margin-top: var(--paper-margin-top);\n margin-bottom: var(--paper-margin-bottom);\n}\n.page-multiple {\n page: multiple;\n}\n.pagesjs {\n padding: 0;\n max-width: 100%;\n margin: 5mm;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n gap: 5mm;\n .pagesjs-front, .chapter {\n min-height: unset;\n box-shadow: none;\n }\n & > *, &:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc) {\n display: none;\n }\n .pagesjs-page {\n width: var(--paper-width);\n height: var(--paper-height);\n padding: var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);\n break-after: page;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow: hidden;\n img {\n max-width: 100%;\n }\n .chapter-before, .chapter-after, .buttons:has(+ .chapter-before) {\n display: none;\n }\n #TOC {\n border: none;\n padding: 0;\n margin-left: auto;\n &:not(.chapter-toc):is(.fragment-first, :not(.pagesjs-fragmented))::before {\n content: \"Contents\";\n display: block;\n font-weight: bold;\n font-size: 1.5em;\n margin-bottom: 1em;\n }\n a {\n display: flex;\n &::after {\n content: attr(data-page-number);\n align-self: end;\n margin-left: 1ch;\n }\n .section-number {\n margin-right: .3em;\n }\n .toc-text {\n position: relative;\n flex: 1 0;\n overflow: hidden;\n &::after {\n content: \"\";\n width: 100%;\n position: absolute;\n bottom: 1.5ex;\n margin-left: 1ch;\n border-bottom: dashed 1px;\n }\n }\n }\n }\n /* wrappers cloned from the content root and its ancestors: keep their\n context for CSS selectors, but not their boxes */\n .pagesjs-wrap {\n display: block !important;\n margin: 0 !important;\n padding: 0 !important;\n border: none !important;\n box-shadow: none !important;\n background: none !important;\n width: auto !important;\n max-width: none !important;\n min-height: 0 !important;\n height: auto !important;\n float: none !important;\n position: static !important;\n transform: none !important;\n }\n .pagesjs-run {\n display: block;\n }\n /* pieces of a fragmented element: slice it (instead of decorating each piece) */\n .pagesjs-fragmented {\n &:not(.fragment-first) {\n border-top: none;\n margin-top: 0;\n padding-top: 0;\n & > thead { opacity: .5; }\n }\n &:not(.fragment-last) {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n & > tfoot { opacity: .5; }\n }\n }\n /* a list item continued from the previous page has no marker */\n li.pagesjs-fragmented:not(.fragment-first)::marker {\n content: \"\";\n }\n .fullwidth {\n float: none;\n max-width: none;\n width: var(--paper-width);\n margin-left: calc(0px - var(--paper-margin-left));\n transform: none;\n }\n .footnotes::before {\n content: \"\";\n display: block;\n max-width: 20em;\n border-top: solid 1px;\n }\n &:has(.side-left, .embed-left) .pagesjs-body {\n padding-left: calc(0px - var(--side-margin));\n .fullwidth {\n transform: translate(var(--side-margin));\n }\n }\n &:has(.side-right, .embed-right) .pagesjs-body {\n padding-right: calc(0px - var(--side-margin));\n }\n .side {\n font-size: .9em;\n background: none;\n }\n }\n}\n.pagesjs-settle .pagesjs-body {\n /* the probe page that holds all content has sides, but normal pages don't */\n padding: 0 !important;\n}\n.pagesjs-header, .pagesjs-footer {\n font-size: .9em;\n display: flex;\n justify-content: space-between;\n}\n.pagesjs-header {\n flex: 0 0 var(--page-header-height);\n margin-bottom: var(--page-header-bottom);\n align-items: end;\n &::before {\n content: attr(data-main-title);\n }\n &::after {\n content: attr(data-page-title);\n }\n}\n.pagesjs-footer {\n flex: 0 0 var(--page-footer-height);\n margin-top: var(--page-footer-top);\n align-items: start;\n &::before {\n content: \" \";\n }\n &::after {\n content: attr(data-page-number);\n }\n}\n.pagesjs-body {\n flex-grow: 1;\n min-height: 0; /* don't let the body push the footer down when content overhangs by a few pixels */\n position: relative;\n}\n@media only screen {\n .pagesjs {\n &:has(.pagesjs-page) {\n background: #f7f7f7;\n }\n .pagesjs-page {\n background: white;\n }\n .page-multiple {\n overflow-y: auto;\n }\n }\n .pagesjs-filling {\n display: block;\n .pagesjs-page {\n height: auto;\n .pagesjs-body:has(.footnotes) {\n margin-bottom: 1em;\n .footnotes {\n float: left;\n width: 100%;\n }\n }\n }\n }\n}\n@media print {\n .pagesjs {\n margin: 0;\n gap: 0;\n .page-multiple {\n padding-top: 0;\n padding-bottom: 0;\n height: auto;\n }\n }\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,0PAYA,2DAIA,2FAIA,6BAGA,wGAQE,6DAIA,sFAGA,oRASE,qBAGA,iFAGA,8CAIE,4JAOA,iBAEE,sEAKA,oCAGA,uDAIE,yGAaN,2TAeA,6BAIA,sBACE,kEAIE,oBAEF,0EAIE,qBAIJ,gEAGA,gIAOA,iFAMA,wFAEE,sDAIF,2FAGA,wCAMJ,8MAaA,kDAIA,0FAKA,2GAIE,uCAGA,uCAIF,uGAIE,qBAGA,wCAIF,yDAKA,mBACE,SACE,wCAGA,gCAGA,kCAIF,+BAEE,sCAGE,kDAEE,uCAQR,aACE,wBAGE","sources":["pages.css"],"sourcesContent":[":root {\n --paper-width: 210mm;\n --paper-height: 297mm;\n --paper-margin-top: 40px;\n --paper-margin-right: 80px;\n --paper-margin-bottom: 40px;\n --paper-margin-left: 80px;\n --page-header-height: 40px;\n --page-header-bottom: 40px;\n --page-footer-height: 40px;\n --page-footer-top: 40px;\n}\n@page {\n size: var(--paper-width) var(--paper-height);\n margin: 0;\n}\n@page multiple {\n margin-top: var(--paper-margin-top);\n margin-bottom: var(--paper-margin-bottom);\n}\n.page-multiple {\n page: multiple;\n}\n.pagesjs {\n padding: 0;\n max-width: 100%;\n margin: 5mm;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n gap: 5mm;\n .pagesjs-front, .chapter {\n min-height: unset;\n box-shadow: none;\n }\n & > *, &:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc) {\n display: none;\n }\n .pagesjs-page {\n width: var(--paper-width);\n height: var(--paper-height);\n padding: var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);\n break-after: page;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow: hidden;\n img {\n max-width: 100%;\n }\n .chapter-before, .chapter-after, .buttons:has(+ .chapter-before) {\n display: none;\n }\n #TOC {\n border: none;\n padding: 0;\n margin-left: auto;\n &:not(.chapter-toc):is(.fragment-first, :not(.pagesjs-fragmented))::before {\n content: \"Contents\";\n display: block;\n font-weight: bold;\n font-size: 1.5em;\n margin-bottom: 1em;\n }\n a {\n display: flex;\n &::after {\n content: attr(data-page-number);\n align-self: end;\n margin-left: 1ch;\n }\n .section-number {\n margin-right: .3em;\n }\n .toc-text {\n position: relative;\n flex: 1 0;\n overflow: hidden;\n &::after {\n content: \"\";\n width: 100%;\n position: absolute;\n bottom: 1.5ex;\n margin-left: 1ch;\n border-bottom: dashed 1px;\n }\n }\n }\n }\n /* wrappers cloned from the content root and its ancestors: keep their\n context for CSS selectors, but not their boxes */\n .pagesjs-wrap {\n display: block !important;\n margin: 0 !important;\n padding: 0 !important;\n border: none !important;\n box-shadow: none !important;\n background: none !important;\n width: auto !important;\n max-width: none !important;\n min-height: 0 !important;\n height: auto !important;\n float: none !important;\n position: static !important;\n transform: none !important;\n }\n .pagesjs-run {\n display: block;\n }\n /* pieces of a fragmented element: slice it (instead of decorating each piece) */\n .pagesjs-fragmented {\n &:not(.fragment-first) {\n border-top: none;\n margin-top: 0;\n padding-top: 0;\n & > thead { opacity: .5; }\n }\n &:not(.fragment-last) {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n & > tfoot { opacity: .5; }\n }\n }\n /* a list item continued from the previous page has no marker */\n li.pagesjs-fragmented:not(.fragment-first)::marker {\n content: \"\";\n }\n .fullwidth {\n float: none;\n max-width: none;\n width: var(--paper-width);\n margin-left: calc(0px - var(--paper-margin-left));\n transform: none;\n }\n .footnotes::before {\n content: \"\";\n display: block;\n max-width: 20em;\n border-top: solid 1px;\n }\n &:has(.side-left, .embed-left) .pagesjs-body {\n padding-left: calc(0px - var(--side-margin));\n .fullwidth {\n transform: translate(var(--side-margin));\n }\n }\n &:has(.side-right, .embed-right) .pagesjs-body {\n padding-right: calc(0px - var(--side-margin));\n }\n .side {\n font-size: .9em;\n background: none;\n }\n }\n}\n.pagesjs > .pagesjs-progress {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9999;\n padding: .3em .8em;\n border-radius: 1em;\n background: rgba(0, 0, 0, .75);\n color: white;\n font: 14px sans-serif;\n}\n.pagesjs-settle .pagesjs-body {\n /* the probe page that holds all content has sides, but normal pages don't */\n padding: 0 !important;\n}\n.pagesjs-header, .pagesjs-footer {\n font-size: .9em;\n display: flex;\n justify-content: space-between;\n}\n.pagesjs-header {\n flex: 0 0 var(--page-header-height);\n margin-bottom: var(--page-header-bottom);\n align-items: end;\n &::before {\n content: attr(data-main-title);\n }\n &::after {\n content: attr(data-page-title);\n }\n}\n.pagesjs-footer {\n flex: 0 0 var(--page-footer-height);\n margin-top: var(--page-footer-top);\n align-items: start;\n &::before {\n content: \" \";\n }\n &::after {\n content: attr(data-page-number);\n }\n}\n.pagesjs-body {\n flex-grow: 1;\n min-height: 0; /* don't let the body push the footer down when content overhangs by a few pixels */\n position: relative;\n}\n@media only screen {\n .pagesjs {\n &:has(.pagesjs-page) {\n background: #f7f7f7;\n }\n .pagesjs-page {\n background: white;\n }\n .page-multiple {\n overflow-y: auto;\n }\n }\n .pagesjs-filling {\n display: block;\n .pagesjs-page {\n opacity: 0; /* don't show the page that is being filled (only the progress) */\n height: auto;\n .pagesjs-body:has(.footnotes) {\n margin-bottom: 1em;\n .footnotes {\n float: left;\n width: 100%;\n }\n }\n }\n }\n}\n@media print {\n .pagesjs {\n margin: 0;\n gap: 0;\n .page-multiple {\n padding-top: 0;\n padding-bottom: 0;\n height: auto;\n }\n }\n}\n"],"names":[]}
package/css/site.css CHANGED
@@ -33,13 +33,13 @@ footer {
33
33
  :is(.site-nav, footer) a {
34
34
  text-decoration: none;
35
35
  }
36
- .body, .frontmatter, .body ~ .appendix {
36
+ :where(article, .appendix):not(article *, .pagesjs *), .frontmatter {
37
37
  box-shadow: none;
38
38
  margin-top: auto;
39
39
  }
40
40
  .frontmatter {
41
41
  background: linear-gradient(0, white, aliceblue);
42
42
  }
43
- .body ~ .appendix {
43
+ .appendix:not(article *) {
44
44
  background: linear-gradient(0, whitesmoke, white);
45
45
  }
package/css/site.min.css CHANGED
@@ -1,2 +1,2 @@
1
- .site-nav{&>p{flex-wrap:wrap;display:flex;&:last-child{border-bottom:1px dashed #666}}& a{background:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block;&:hover{color:#fff;background:#4682b4}&.right{margin-left:auto;margin-right:0;& img{vertical-align:middle}&:hover img{filter:invert()}}}}footer{border-top:1px dashed #666;margin-top:2em;& .flex-col{gap:2em}}:is(.site-nav,footer) a{text-decoration:none}.body,.frontmatter,.body~.appendix{box-shadow:none;margin-top:auto}.frontmatter{background:linear-gradient(#f0f8ff,#fff)}.body~.appendix{background:linear-gradient(#fff,#f5f5f5)}
1
+ .site-nav{&>p{flex-wrap:wrap;display:flex;&:last-child{border-bottom:1px dashed #666}}& a{background:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block;&:hover{color:#fff;background:#4682b4}&.right{margin-left:auto;margin-right:0;& img{vertical-align:middle}&:hover img{filter:invert()}}}}footer{border-top:1px dashed #666;margin-top:2em;& .flex-col{gap:2em}}:is(.site-nav,footer) a{text-decoration:none}:where(article,.appendix):not(article *,.pagesjs *),.frontmatter{box-shadow:none;margin-top:auto}.frontmatter{background:linear-gradient(#f0f8ff,#fff)}.appendix:not(article *){background:linear-gradient(#fff,#f5f5f5)}
2
2
  /*# sourceMappingURL=site.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,UACE,gCAGE,4CAIF,6EAKE,sCAIA,wCAGE,4BACA,+BAIN,iDAGE,qBAIF,6CAGA,mEAIA,sDAGA","sources":["site.css"],"sourcesContent":[".site-nav {\n & > p {\n display: flex;\n flex-wrap: wrap;\n &:last-child {\n border-bottom: 1px dashed #666;\n }\n }\n a {\n display: inline-block;\n background: white;\n padding: .2em .5em;\n margin-right: .5em;\n &:hover {\n background: #4682b4;\n color: white;\n }\n &.right {\n margin-left: auto;\n margin-right: 0;\n img { vertical-align: middle; }\n &:hover img { filter: invert(1); }\n }\n }\n}\nfooter {\n border-top: 1px dashed #666;\n margin-top: 2em;\n .flex-col {\n gap: 2em;\n }\n}\n:is(.site-nav, footer) a {\n text-decoration: none;\n}\n.body, .frontmatter, .body ~ .appendix {\n box-shadow: none;\n margin-top: auto;\n}\n.frontmatter {\n background: linear-gradient(0, white, aliceblue);\n}\n.body ~ .appendix {\n background: linear-gradient(0, whitesmoke, white);\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,UACE,gCAGE,4CAIF,6EAKE,sCAIA,wCAGE,4BACA,+BAIN,iDAGE,qBAIF,6CAGA,iGAIA,sDAGA","sources":["site.css"],"sourcesContent":[".site-nav {\n & > p {\n display: flex;\n flex-wrap: wrap;\n &:last-child {\n border-bottom: 1px dashed #666;\n }\n }\n a {\n display: inline-block;\n background: white;\n padding: .2em .5em;\n margin-right: .5em;\n &:hover {\n background: #4682b4;\n color: white;\n }\n &.right {\n margin-left: auto;\n margin-right: 0;\n img { vertical-align: middle; }\n &:hover img { filter: invert(1); }\n }\n }\n}\nfooter {\n border-top: 1px dashed #666;\n margin-top: 2em;\n .flex-col {\n gap: 2em;\n }\n}\n:is(.site-nav, footer) a {\n text-decoration: none;\n}\n:where(article, .appendix):not(article *, .pagesjs *), .frontmatter {\n box-shadow: none;\n margin-top: auto;\n}\n.frontmatter {\n background: linear-gradient(0, white, aliceblue);\n}\n.appendix:not(article *) {\n background: linear-gradient(0, whitesmoke, white);\n}\n"],"names":[]}
@@ -2,7 +2,7 @@
2
2
  (d => {
3
3
  // find the body of the article
4
4
  let b;
5
- ['.article', '.body', 'article', 'body'].forEach(s => {
5
+ ['.article', 'article', 'body'].forEach(s => {
6
6
  if (!b) b = d.querySelector(s);
7
7
  });
8
8
  const hs = b.querySelectorAll('h1, h2, h3, h4, h5, h6');
@@ -1,2 +1,2 @@
1
- (e=>{let r;[".article",".body","article","body"].forEach(n=>{r||(r=e.querySelector(n))});const n=r.querySelectorAll("h1, h2, h3, h4, h5, h6");if(0===n.length)return;if(r.querySelectorAll("span.header-section-number").forEach(e=>{e.classList.add("section-number")}),r.querySelector("span.section-number"))return void r.querySelectorAll("span.section-number").forEach(e=>{e.innerText=e.innerText.replace(/^(0\.)+/,"")});let t,c=0,a=[0,0,0,0,0,0];n.forEach(e=>{if(t=parseInt(e.tagName.replace(/^h/i,"")),t<c)for(let e=t;e<a.length;e++)a[e]=0;e.insertAdjacentHTML("afterbegin",(a[t-1]++,`<span class="section-number">${a.join(".").replace(/^(0\.)+|(\.0)+$/g,"").replace(/^([0-9]+)$/,"$1.")}</span> `)),c=t})})(document);
1
+ (e=>{let r;[".article","article","body"].forEach(n=>{r||(r=e.querySelector(n))});const n=r.querySelectorAll("h1, h2, h3, h4, h5, h6");if(0===n.length)return;if(r.querySelectorAll("span.header-section-number").forEach(e=>{e.classList.add("section-number")}),r.querySelector("span.section-number"))return void r.querySelectorAll("span.section-number").forEach(e=>{e.innerText=e.innerText.replace(/^(0\.)+/,"")});let t,c=0,a=[0,0,0,0,0,0];n.forEach(e=>{if(t=parseInt(e.tagName.replace(/^h/i,"")),t<c)for(let e=t;e<a.length;e++)a[e]=0;e.insertAdjacentHTML("afterbegin",(a[t-1]++,`<span class="section-number">${a.join(".").replace(/^(0\.)+|(\.0)+$/g,"").replace(/^([0-9]+)$/,"$1.")}</span> `)),c=t})})(document);
2
2
  //# sourceMappingURL=number-sections.min.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["d","b","forEach","s","querySelector","hs","querySelectorAll","length","el","classList","add","innerText","replace","t1","t0","dict","h","parseInt","tagName","j","insertAdjacentHTML","join","document"],"sources":["number-sections.js"],"mappings":"AACA,CAACA,IAEC,IAAIC,EACJ,CAAC,WAAY,QAAS,UAAW,QAAQC,QAAQC,IAC1CF,IAAGA,EAAID,EAAEI,cAAcD,MAE9B,MAAME,EAAKJ,EAAEK,iBAAiB,0BAC9B,GAAkB,IAAdD,EAAGE,OAAc,OAMrB,GAJAN,EAAEK,iBAAiB,8BAA8BJ,QAAQM,IACvDA,EAAGC,UAAUC,IAAI,oBAGfT,EAAEG,cAAc,uBAKlB,YAHAH,EAAEK,iBAAiB,uBAAuBJ,QAAQC,IAChDA,EAAEQ,UAAYR,EAAEQ,UAAUC,QAAQ,UAAW,MAIjD,IAAYC,EAARC,EAAK,EAAOC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAOvCV,EAAGH,QAAQc,IAIT,GAFAH,EAAKI,SAASD,EAAEE,QAAQN,QAAQ,MAAO,KAEnCC,EAAKC,EACP,IAAK,IAAIK,EAAIN,EAAIM,EAAIJ,EAAKR,OAAQY,IAChCJ,EAAKI,GAAK,EAGdH,EAAEI,mBAAmB,cAbrBL,EAakDF,EAAK,KAXhD,gCADGE,EAAKM,KAAK,KAAKT,QAAQ,mBAAoB,IAAIA,QAAQ,aAAc,mBAa/EE,EAAKD,GAER,EAvCD,CAuCGS","ignoreList":[]}
1
+ {"version":3,"names":["d","b","forEach","s","querySelector","hs","querySelectorAll","length","el","classList","add","innerText","replace","t1","t0","dict","h","parseInt","tagName","j","insertAdjacentHTML","join","document"],"sources":["number-sections.js"],"mappings":"AACA,CAACA,IAEC,IAAIC,EACJ,CAAC,WAAY,UAAW,QAAQC,QAAQC,IACjCF,IAAGA,EAAID,EAAEI,cAAcD,MAE9B,MAAME,EAAKJ,EAAEK,iBAAiB,0BAC9B,GAAkB,IAAdD,EAAGE,OAAc,OAMrB,GAJAN,EAAEK,iBAAiB,8BAA8BJ,QAAQM,IACvDA,EAAGC,UAAUC,IAAI,oBAGfT,EAAEG,cAAc,uBAKlB,YAHAH,EAAEK,iBAAiB,uBAAuBJ,QAAQC,IAChDA,EAAEQ,UAAYR,EAAEQ,UAAUC,QAAQ,UAAW,MAIjD,IAAYC,EAARC,EAAK,EAAOC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAOvCV,EAAGH,QAAQc,IAIT,GAFAH,EAAKI,SAASD,EAAEE,QAAQN,QAAQ,MAAO,KAEnCC,EAAKC,EACP,IAAK,IAAIK,EAAIN,EAAIM,EAAIJ,EAAKR,OAAQY,IAChCJ,EAAKI,GAAK,EAGdH,EAAEI,mBAAmB,cAbrBL,EAakDF,EAAK,KAXhD,gCADGE,EAAKM,KAAK,KAAKT,QAAQ,mBAAoB,IAAIA,QAAQ,aAAc,mBAa/EE,EAAKD,GAER,EAvCD,CAuCGS","ignoreList":[]}
package/js/pages.js CHANGED
@@ -59,6 +59,8 @@
59
59
  main_title, // the title of the document
60
60
  probed, // the content that is on the probe page (see probe())
61
61
  pending, // the rest of the pagination, which is waiting for the probe
62
+ running, // the generator that does the rest of the pagination (see advance())
63
+ progress, n_done = 0, // the progress indicator and the number of finished pages
62
64
  finished; // is the pagination finished?
63
65
 
64
66
  // --- Page boxes ----------------------------------------------------
@@ -99,6 +101,7 @@
99
101
  if (n > 1) box.dataset.pagesOffset = n;
100
102
  }
101
103
  box.remove();
104
+ progress && (progress.textContent = `Paginating: ${++n_done} pages done`);
102
105
  }
103
106
  // calculate how many new pages we need for overflowed content (this is just
104
107
  // an estimate; if not accurate, use <div class="pagesjs-page" data-pages-offset="N">
@@ -127,7 +130,7 @@
127
130
  }
128
131
  // The container for the content on the current page. It is a chain of empty
129
132
  // clones of the content root and its ancestors (i.e., the original context), so
130
- // CSS selectors that depend on them (e.g., `.body h2`) still apply on pages.
133
+ // CSS selectors that depend on them (e.g., `main h2`) still apply on pages.
131
134
  function ctx() {
132
135
  if (!wrap.length) return box_body;
133
136
  if (!box_ctx || !box_body.contains(box_ctx)) {
@@ -148,7 +151,7 @@
148
151
 
149
152
  // --- Putting elements on pages -------------------------------------
150
153
 
151
- function fill(el) {
154
+ function* fill(el) {
152
155
  // if the element is already a page, just use it as the box
153
156
  if (el.classList.contains('pagesjs-page')) {
154
157
  nextPage(el, () => nChild(el) > 3 && (
@@ -161,13 +164,13 @@
161
164
  // in a book, a chapter (a container of <h1>) starts on a new page
162
165
  if (book && box.innerText !== '' && $('h1', el)) nextPage();
163
166
  if (el.innerText.trim() && H - box.scrollHeight < H_min) breakPage();
164
- place(el);
167
+ yield* place(el);
165
168
  }
166
169
  }
167
170
 
168
171
  // append el to the page, and if it overflows, put as much of it as possible on
169
172
  // the page and the rest on the next page(s)
170
- function place(el) {
173
+ function* place(el) {
171
174
  for (;;) {
172
175
  const c = ctx();
173
176
  endFrag(el);
@@ -182,6 +185,7 @@
182
185
  }
183
186
  if (!el) return;
184
187
  breakPage(el);
188
+ yield; // (a chance to paint the progress)
185
189
  // TODO: remove possibly duplicated citations: .citation + div > [id^="ref-"]
186
190
  }
187
191
  }
@@ -331,12 +335,19 @@
331
335
  const n = nChild(head), rest = split(item, head, big ? 'block' : undefined);
332
336
  if (rest) { partial = nChild(head) > n; el.prepend(rest); break; }
333
337
  }
338
+ blank(el) || moveTrailingHeadings(head, el, prev);
334
339
  prev && !partial && moveShortHead(head, el);
335
340
  blank(el) && fitLastPiece(head, el, prev);
336
341
  el.tagName === 'OL' && nChild(head) && !blank(el) && fixOlStart(head, el);
337
342
  return [head, blank(el) ? null : el];
338
343
  }
339
344
 
345
+ // a heading should not be the last child of a piece that is continued, so move it
346
+ // (and the headings before it) to the rest (el)
347
+ function moveTrailingHeadings(head, el, prev) {
348
+ for (let h; (h = head.lastElementChild)?.matches('h1,h2,h3,h4,h5,h6') && (nChild(head) > 1 || prev);)
349
+ el.prepend(h);
350
+ }
340
351
  // if only about one line (e.g., a legend or the first list item) is left on the
341
352
  // page, and no child was split, move it to the next page with the rest (el)
342
353
  function moveShortHead(head, el) {
@@ -593,11 +604,14 @@
593
604
 
594
605
  // The content root is specified via <body data-pages-root="selector">, or is
595
606
  // <main> (or an element with role="main"), or the top-level <article> elements,
596
- // or <body>. Everything else (e.g., navigation bars) will be hidden.
607
+ // or <body>. If <main> only has a child (e.g., <article>), the child is the root
608
+ // (and so on). Everything else (e.g., navigation bars) will be hidden.
597
609
  function findRoots() {
598
610
  const sel = d.body.dataset.pagesRoot, x = sel ? [...$$(sel)] : [];
599
611
  if (x.length) return x;
600
- const main = $('main, [role="main"]');
612
+ let main = $('main, [role="main"]');
613
+ // if it only contains a wrapper (e.g., an <article>), use the wrapper instead
614
+ while (main?.childElementCount === 1) main = main.firstElementChild;
601
615
  if (main) return [main];
602
616
  const articles = [...$$('article')].filter(el => !el.parentNode.closest('article'));
603
617
  return articles.length ? articles : [d.body];
@@ -640,30 +654,42 @@
640
654
  // move <style>/<link> into <head> so styles can be applied globally (not
641
655
  // only when they are in the DOM), no matter how deeply they are nested
642
656
  $$('style, link[rel="stylesheet"]', el).forEach(el => d.head.append(el));
643
- const ch = [...el.children].filter(el => el !== box &&
657
+ const ch = [...el.children].filter(el => ![box, hold, progress].includes(el) &&
644
658
  !['SCRIPT', 'NOSCRIPT', 'TEMPLATE'].includes(el.tagName));
645
659
  ch.forEach(el => el.remove());
646
660
  return ch;
647
661
  });
648
662
  }
649
663
  // iteratively add elements to pages
650
- function fillPages(roots, els) {
651
- $$('.pagesjs-front, .abstract, #TOC:not(.chapter-toc)').forEach(el => {
652
- (fill(el), book && nextPage());
653
- });
654
- roots.forEach((el, i) => {
664
+ function* fillPages(roots, els) {
665
+ for (const el of $$('.pagesjs-front, .abstract, #TOC:not(.chapter-toc)')) {
666
+ yield* fill(el);
667
+ book && nextPage();
668
+ }
669
+ for (const [i, el] of roots.entries()) {
655
670
  wrap = ancestors(el); box_ctx = null;
656
671
  book && (box.innerText === '' ? newPage(box) : nextPage());
657
- els[i].forEach(fill);
672
+ for (const child of els[i]) yield* fill(child);
658
673
  // clean up container and self if empty
659
674
  removeBlank(el.parentNode); removeBlank(el);
660
- });
675
+ }
661
676
  finish(box); // finish the last box
662
677
  // unwrap the blocks created for runs of inline nodes
663
678
  $$('.pagesjs-run').forEach(el => el.replaceWith(...el.childNodes));
664
679
  }
665
-
680
+ // Run the rest of the pagination. If it is not sync, do it in slices of 0.5s,
681
+ // so the browser can show the progress in between (not too often, to save time).
682
+ function advance(sync) {
683
+ const t = performance.now();
684
+ while (!running.next().done) {
685
+ if (sync || performance.now() - t < 500) continue;
686
+ return new Promise(go => { requestAnimationFrame(go); setTimeout(go, 50); })
687
+ .then(() => advance());
688
+ }
689
+ }
666
690
  function paginate(sync) {
691
+ // nobody sees the progress in a headless browser (and printing has to be sync)
692
+ const quiet = sync || /Headless/.test(navigator.userAgent) || navigator.webdriver;
667
693
  // we need to wait for all resources to be fully loaded before paginating
668
694
  if (d.readyState !== 'complete') return addEventListener('load', () => paginate(sync));
669
695
 
@@ -677,6 +703,12 @@
677
703
 
678
704
  cls.add('pagesjs');
679
705
  d.body.append(hold);
706
+ if (!quiet) { // a simple indicator to tell users to wait
707
+ progress = d.createElement('div');
708
+ progress.className = 'pagesjs-progress';
709
+ progress.textContent = 'Paginating...';
710
+ d.body.append(progress);
711
+ }
680
712
  d.body.insertAdjacentElement('afterbegin', newPage());
681
713
  H = (box.clientHeight || window.innerHeight) + tol; B = box_body.clientHeight || H; // use window height if box height not specified
682
714
  removeSideClasses();
@@ -685,26 +717,27 @@
685
717
  addTocLeaders();
686
718
 
687
719
  const roots = findRoots(), els = detachContent(roots);
688
- function run() {
689
- fillPages(roots, els);
720
+ function* run() {
721
+ yield* fillPages(roots, els);
690
722
  cls.remove('pagesjs-filling');
691
723
  numberPages();
692
724
  d.body.prepend(...boxes); // unhide all pages
693
725
  numberToc();
694
- hold.remove();
726
+ hold.remove(); progress?.remove();
695
727
  finished = true;
696
728
  dispatchEvent(new Event('pagesjs:after'));
697
729
  }
698
730
  // Pagination is async unless it has to be sync (beforeprint). If printing
699
731
  // starts while it's pending (e.g., headless printing right after the page is
700
732
  // loaded), finish it right away.
701
- pending = () => { pending = null; unprobe(); run(); };
702
- sync ? pending() : probe(roots, els).then(() => pending?.());
733
+ pending = sync => { pending = null; unprobe(); running = run(); return advance(sync || quiet); };
734
+ sync ? pending(true) : probe(roots, els).then(() => pending?.());
703
735
  }
704
-
705
- // --- Triggering pagination -----------------------------------------
706
-
707
- addEventListener('beforeprint', () => pending ? pending() : paginate(true));
736
+ addEventListener('beforeprint', () => {
737
+ if (pending) pending(true);
738
+ else if (running) while (!running.next().done); // finish the pagination in progress
739
+ else paginate(true);
740
+ });
708
741
  // A script that controls the browser can request the pagination by dispatching
709
742
  // pagesjs:paginate, and wait for pagesjs:after (which is also dispatched if the
710
743
  // pagination was already finished)
package/js/pages.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (e=>{function t(t,n=e){return n?.querySelector(t)}function n(t,n=e){return n?n.querySelectorAll(t):[]}function o(e){return e.childElementCount}const r=n("h1").length>1,i="h1,h2,h3,h4,h5,h6,hr,img,svg,video,canvas,iframe,object,embed,math,mjx-container,figure,.figure,details",s="pagesjs-fragmented",a="fragment-first",c="fragment-last",l=["top","bottom"].map(t=>parseFloat(getComputedStyle(e.documentElement).getPropertyValue(`--paper-margin-${t}`))||0),d=e.createElement("div"),f=[],p=new WeakSet,u=e.createElement("div");d.className="pagesjs-page",d.innerHTML='<div class="pagesjs-header"></div>\n<div class="pagesjs-body"></div>\n<div class="pagesjs-footer"></div>',u.style.display="none";let h,g,m,E,b,L,T,v,C,N,y=[];function j(e){return e&&!t(".pagesjs-body",e)&&e.insertAdjacentHTML("afterbegin",d.innerHTML),h=e||d.cloneNode(!0),g=h.children[1],m=null,f.includes(h)||f.push(h),h}function H(e=g){let t=0;for(let n=e.lastElementChild;n;n=n.lastElementChild){const e=getComputedStyle(n);if(t=Math.max(t,parseFloat(e.marginBottom)||0),parseFloat(e.paddingBottom)||parseFloat(e.borderBottomWidth))break}return t}function S(){return h.getBoundingClientRect().height-H()}function M(){return h.scrollHeight-H()>E}function x(e,t){const n=h;n.after(j(e)),t&&t(),R(n)}function R(e){const t=e.scrollHeight;if(t-H(e.children[1])>E&&!e.dataset.pagesOffset){const o=function(e,t){let o=+e.dataset.pagesOffset;if(o)return o;if(o=Math.ceil(t/E),o<=1)return o;const r=l.concat([...n("thead",e)].map(e=>+e.offsetHeight)).reduce((e,t)=>e+t);if(!r)return o;function i(){return Math.ceil((t+(o-1)*r)/E)}let s=i();for(;s>o;)o=s,s=i();return o}(e,t);o>1&&(e.dataset.pagesOffset=o)}e.remove()}function w(t){const n=[];for(;t&&t!==e.body;t=t.parentNode)n.unshift(t);return n}function O(){return y.length?(m&&g.contains(m)||(m=y.reduce((e,t)=>{const n=t.cloneNode();return n.classList.add("pagesjs-wrap"),e.appendChild(n)},g)),m):g}function B(e){if(!e||"BODY"===e.tagName)return!1;const t=!("P"===e.tagName?e.innerHTML:e.innerText).trim();return t&&e.remove(),t}function k(e){e.classList.contains("pagesjs-page")?x(e,()=>o(e)>3&&(g.append(...[...e.children].slice(3)),x())):(r&&""!==h.innerText&&t("h1",e)&&x(),e.innerText.trim()&&E-h.scrollHeight<L&&A(),function(e){for(;;){const t=O();if(X(e),F(e))e=P(e,t,"block");else{if(t.append(e),!M())return;e=P(e,t)}if(!e)return;A(e)}}(e))}function A(e){let t=O(),n=t.lastElementChild,o=0;const r=e=>e?.matches("h1,h2,h3,h4,h5,h6");for(;e&&n&&!r(n)&&n.classList.contains(s);)t=n,n=n.lastElementChild,o++;const i=r(n)&&$(n)&&n;if(i&&i.remove(),x(),!i)return;let a=e;for(let e=1;e<o&&a;e++)a=a.firstElementChild;a?.tagName===t.tagName&&o?a.prepend(i):O().append(i)}function P(e,t,n){const o=n||function(e){const t=getComputedStyle(e),n=e.tagName;if(/avoid/.test(t.breakInside)||e.matches(i))return;if("TABLE"===n)return e.tBodies[0]&&"table";if(!["block","list-item","flow-root"].includes(t.display)||!I(t))return;if("PRE"===n){if("CODE"===e.firstElementChild?.tagName&&D(e).length>1)return"code";if(e.offsetHeight<=b)return}return[...e.children].some(e=>!q(e))?"block":"inline"}(e),r="block"===o?void 0:$(e),l=!e.classList.contains(s),d=o&&J[o](e,t,r,l);if(!d)return r&&(e.remove(),e);const[f,p]=d;return W(f)?(f.remove(),p):(p?(p.classList.add(s),p.classList.remove(a,c)):f.classList.add(c),p)}function F(e){return!["TABLE","PRE"].includes(e.tagName)&&e.getElementsByTagName("*").length>300}function W(e){return!e.firstElementChild&&!e.textContent.trim()}function $(e){for(;e&&e!==g;e=e.parentNode)for(let t=e.previousElementSibling;t;t=t.previousElementSibling)if(t.getBoundingClientRect().height)return!0;return!1}function I(e){return"none"===e.float&&!["absolute","fixed"].includes(e.position)}function q(e){if(1!==e.nodeType)return!0;const t=getComputedStyle(e),n=t.display;return n.startsWith("inline")||"none"===n||"contents"===n||!I(t)}function z(e){const t=getComputedStyle(e);return(t.display.startsWith("inline")||"contents"===t.display)&&I(t)}function D(e){const t=[];return e.firstElementChild.innerHTML.replace(/\n$/,"").split("\n").map(e=>{const n=t.map(e=>e[0]).join("");return e.replace(/<(\/?)([a-z][\w-]*)[^>]*>/gi,(e,n,o)=>{n?t.pop():t.push([e,o])}),n+e+t.map(e=>`</${e[1]}>`).reverse().join("")})}function V(e,t){e.classList.add(s),e.classList.remove(c),t&&e.classList.add(a)}function X(e){1===e.nodeType&&[e,...n("."+s,e)].forEach(e=>e.classList.contains(s)&&e.classList.add(c))}function _(e,t,n){const o=e.cloneNode();return e.remove(),t.append(o),V(o,n),o}const J={block:function(t,n,r,i){!function(t){if(p.has(t))return;p.add(t),t.isConnected||u.append(t);let n=[];function o(){if(n.some(e=>1===e.nodeType||3===e.nodeType&&e.nodeValue.trim())){const t=e.createElement("span");t.className="pagesjs-run",n[0].before(t),t.append(...n)}n=[]}for(const e of[...t.childNodes])q(e)?n.push(e):o();o(),t.parentNode===u&&t.remove()}(t);const s=_(t,n,i);let a,c;r=$(s);for(;a=t.firstChild;){if(1!==a.nodeType){s.append(a);continue}X(a);const e=F(a);if(!e&&(s.append(a),!M()))continue;const n=o(s),r=P(a,s,e?"block":void 0);if(r){c=o(s)>n,t.prepend(r);break}}return r&&!c&&U(s,t),W(t)&&Y(s,t,r),"OL"===t.tagName&&o(s)&&!W(t)&&G(s,t),[s,W(t)?null:t]},inline:function(n,o,r,i){const s=function(n){const o=e.createRange(),r=[{node:n,i:0}],i=e.createTreeWalker(n,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let s,a;function c(e){return a&&a.bottom<=e.top&&a.right>e.left}for(;s=i.nextNode();){const e=s.tagName;if(e){if(("MJX-CONTAINER"===e||"SPAN"===e&&t(".katex",s)||!z(s))&&(s=i.nextSibling(),!s))break;if(s.firstChild)continue}if(s.tagName){const e=s.getBoundingClientRect();c(e)&&r.push({node:s,i:-1}),a=e}else if(s.textContent.trim()){o.selectNodeContents(s);const e=o.getClientRects();if(!e.length)continue;c(e[0])&&r.push({node:s,i:0});for(let t=1;t<e.length;t++)r.push({node:s,i:K(s,t,o)});a=e[e.length-1]}}return r}(n);if(s.length<2)return;const a=e.createRange(),c=n.cloneNode(),l=s.length;let d=l;function f(){const e=s[--d];e.i<0?a.setStartBefore(e.node):a.setStart(e.node,e.i),a.setEnd(n,n.childNodes.length),c.prepend(a.extractContents());const t=n.lastChild;""===t?.innerHTML&&t.remove()}V(n,i);for(;d>(r?0:1)&&(f(),!(d>0)||M()););d>1&&l-d===1&&f();1===d&&r&&l<5&&f();return[n,c]},table:function(e,t,n,o){const r=_(e,t,o),i=e.tBodies[0],s=i.cloneNode(),a=[...i.rows],c=a.length,l=n?0:1;r.append(s),[e.tHead,e.tFoot].forEach(e=>e&&r.append(e.cloneNode(!0))),s.append(...a);const d=S()-E-.5;if(d>=0){const e=a[c-1].getBoundingClientRect().bottom-d;let t=0,n=c;for(;t<n;){const o=t+n>>1;a[o].getBoundingClientRect().bottom<=e?t=o+1:n=o}let o=Math.max(t,l);for(i.prepend(...a.slice(o));o>l&&S()>E+.5;)i.prepend(a[--o])}s.rows.length||(r.innerHTML="");const f=s.rows.length;(1===i.rows.length&&f>1||1===f&&n&&i.rows.length)&&(i.prepend(s.rows[f-1]),1===f&&(r.innerHTML=""));return[r,i.rows.length?e:null]},code:function(t,n,o,r){const i=t.firstElementChild,s=D(t),a=[...t.children],c=a.filter((e,t)=>t>a.indexOf(i)&&I(getComputedStyle(e))),l=_(t,n,r),d=i.cloneNode();l.append(d,...a.filter(e=>e!==i&&!c.includes(e)));let f=function(t,n,o){const r=n.length,i=o?0:1;t.innerHTML=n.join("\n");const s=S()-E-.5;if(s<0)return r;const a=e.createRange(),c=[];t.childNodes.forEach(e=>{if(3===e.nodeType)for(let t=e.data.indexOf("\n");t>=0;t=e.data.indexOf("\n",t+1))a.setStart(e,t),a.setEnd(e,t+1),c.push(a.getBoundingClientRect().bottom)}),a.selectNodeContents(t);const l=a.getClientRects(),d=l[l.length-1].bottom;c.push(d);let f=0;for(;f<r&&c[f]<=d-s;)f++;for(;f&&f<r&&!n[f].trim();)f++;t.innerHTML=n.slice(0,Math.max(f,i)).join("\n");for(;f>i&&S()>E+.5;)t.innerHTML=n.slice(0,--f).join("\n");return Math.max(f,i)}(d,s,o);f>1&&s.length-f===1&&f--;1===f&&o&&(f=0);f?d.innerHTML=s.slice(0,f).join("\n"):l.innerHTML="";return i.innerHTML=s.slice(f).join("\n"),i.innerHTML.trim()?[l,t]:(f&&l.append(...c),[l,null])}};function U(e,t){!W(t)&&e.getBoundingClientRect().height<1.5*L&&t.prepend(...e.childNodes)}function Y(e,t,n){for(e.classList.add(c);M()&&e.lastElementChild&&(o(e)>1||n);)t.prepend(e.lastElementChild);W(t)||e.classList.remove(c)}function G(e,t){t.start+=o(e)-(t.firstElementChild.classList.contains(s)?1:0)}function K(e,t,n){let o=0,r=e.length;for(;o<r;){const i=o+r>>1;n.setStart(e,0),n.setEnd(e,i),n.getClientRects().length>t?r=i:o=i+1}return o-1}function Q(e){return e&&(e.dataset.shortTitle||e.innerText)}const Z=(r?"h1":"h2")+":not(.pagesjs-front *)";function ee(o){if("complete"!==e.readyState)return addEventListener("load",()=>ee(o));const i=e.body.classList;if(i.contains("pagesjs"))return;dispatchEvent(new Event("pagesjs:before")),n(e.body.dataset.pagesFront||"body > header").forEach(e=>e.classList.add("pagesjs-front")),T=Q(t("h1.title, .pagesjs-front h1, .title, h1")),i.add("pagesjs"),e.body.append(u),e.body.insertAdjacentElement("afterbegin",j()),E=(h.clientHeight||window.innerHeight)+3,b=g.clientHeight||E,n(":is(#TOC, .footnotes, .chapter-before, .chapter-after):is(.side-left, .side-right).side").forEach(e=>{e.classList.remove("side","side-left","side-right")}),i.add("pagesjs-filling"),function(){const t=e.createElement("p"),n=h.scrollHeight;t.innerText="A",g.append(t),L=h.scrollHeight-n,t.remove()}(),n('#TOC a[href^="#"]').forEach(t=>{const n=e.createElement("span");let o;for(n.className="toc-text",t.append(n);(o=n.previousSibling)&&!o.classList?.contains("section-number");)n.prepend(o);t.dataset.pageNumber="000"});const s=function(){const o=e.body.dataset.pagesRoot,r=o?[...n(o)]:[];if(r.length)return r;const i=t('main, [role="main"]');if(i)return[i];const s=[...n("article")].filter(e=>!e.parentNode.closest("article"));return s.length?s:[e.body]}(),a=function(t){return t.map(t=>{n('style, link[rel="stylesheet"]',t).forEach(t=>e.head.append(t));const o=[...t.children].filter(e=>e!==h&&!["SCRIPT","NOSCRIPT","TEMPLATE"].includes(e.tagName));return o.forEach(e=>e.remove()),o})}(s);function c(){!function(e,t){n(".pagesjs-front, .abstract, #TOC:not(.chapter-toc)").forEach(e=>{k(e),r&&x()}),e.forEach((e,n)=>{y=w(e),m=null,r&&(""===h.innerText?j(h):x()),t[n].forEach(k),B(e.parentNode),B(e)}),R(h),n(".pagesjs-run").forEach(e=>e.replaceWith(...e.childNodes))}(s,a),i.remove("pagesjs-filling"),function(){let e,o=0;f.forEach(i=>{if(r){if(t(".pagesjs-front",i))return;t(Z,i)&&(e="")}const s=+i.dataset.pagesOffset||1;s>1&&i.classList.add("page-multiple"),o+=s,i.classList.add("page-"+(o%2==0?"even":"odd"));const a={pageNumber:o,mainTitle:T,pageTitle:e};let c;[i.children[0],i.children[2]].forEach(e=>{for(const t in a)a[t]&&(e.dataset[t]=a[t])}),e=Q([...n(Z,i)].pop())||e,n(".footnotes",i).forEach((e,t)=>{0===t?(c=e,i.children[1].after(e)):(c.append(...e.children),e.remove())})})}(),e.body.prepend(...f),n('#TOC a[href^="#"]').forEach(e=>{const n=t(`.pagesjs-page:has(#${CSS.escape(e.getAttribute("href").replace(/^#/,""))}) .pagesjs-header`);e.dataset.pageNumber=n?n.dataset.pageNumber:""}),u.remove(),N=!0,dispatchEvent(new Event("pagesjs:after"))}C=()=>{C=null,v&&(v.forEach(e=>e.forEach(e=>e.remove())),g.innerHTML="",m=null,y=[],h.classList.remove("pagesjs-settle"),v=null),c()},o?C():function(e,t){return h.classList.add("pagesjs-settle"),e.forEach((e,n)=>{y=w(e),m=null,O().append(...t[n])}),v=t,new Promise(e=>{const t=setTimeout(e,500);let n=0;!function o(){requestAnimationFrame(()=>++n<3?o():(clearTimeout(t),e()))}()})}(s,a).then(()=>C?.())}addEventListener("beforeprint",()=>C?C():ee(!0)),addEventListener("pagesjs:paginate",()=>{N?dispatchEvent(new Event("pagesjs:after")):ee()});const te=new URLSearchParams(location.search);te.get("paged")&&ee(),addEventListener("keypress",e=>{"p"===e.key&&(te.get("paged")?(te.delete("paged"),location.href=location.pathname+(te.size?`?${te}`:"")):(ee(),te.set("paged",1),history.replaceState({},"",`${location.pathname}?${te}`)))})})(document);
1
+ (e=>{function t(t,n=e){return n?.querySelector(t)}function n(t,n=e){return n?n.querySelectorAll(t):[]}function o(e){return e.childElementCount}const i=n("h1").length>1,r="h1,h2,h3,h4,h5,h6,hr,img,svg,video,canvas,iframe,object,embed,math,mjx-container,figure,.figure,details",s="pagesjs-fragmented",a="fragment-first",l="fragment-last",c=["top","bottom"].map(t=>parseFloat(getComputedStyle(e.documentElement).getPropertyValue(`--paper-margin-${t}`))||0),d=e.createElement("div"),f=[],p=new WeakSet,u=e.createElement("div");d.className="pagesjs-page",d.innerHTML='<div class="pagesjs-header"></div>\n<div class="pagesjs-body"></div>\n<div class="pagesjs-footer"></div>',u.style.display="none";let h,g,m,E,v,C,b,T,L,N,y,j,H=[],S=0;function x(e){return e&&!t(".pagesjs-body",e)&&e.insertAdjacentHTML("afterbegin",d.innerHTML),h=e||d.cloneNode(!0),g=h.children[1],m=null,f.includes(h)||f.push(h),h}function M(e=g){let t=0;for(let n=e.lastElementChild;n;n=n.lastElementChild){const e=getComputedStyle(n);if(t=Math.max(t,parseFloat(e.marginBottom)||0),parseFloat(e.paddingBottom)||parseFloat(e.borderBottomWidth))break}return t}function w(){return h.getBoundingClientRect().height-M()}function R(){return h.scrollHeight-M()>E}function O(e,t){const n=h;n.after(x(e)),t&&t(),B(n)}function B(e){const t=e.scrollHeight;if(t-M(e.children[1])>E&&!e.dataset.pagesOffset){const o=function(e,t){let o=+e.dataset.pagesOffset;if(o)return o;if(o=Math.ceil(t/E),o<=1)return o;const i=c.concat([...n("thead",e)].map(e=>+e.offsetHeight)).reduce((e,t)=>e+t);if(!i)return o;function r(){return Math.ceil((t+(o-1)*i)/E)}let s=r();for(;s>o;)o=s,s=r();return o}(e,t);o>1&&(e.dataset.pagesOffset=o)}e.remove(),y&&(y.textContent=`Paginating: ${++S} pages done`)}function k(t){const n=[];for(;t&&t!==e.body;t=t.parentNode)n.unshift(t);return n}function A(){return H.length?(m&&g.contains(m)||(m=H.reduce((e,t)=>{const n=t.cloneNode();return n.classList.add("pagesjs-wrap"),e.appendChild(n)},g)),m):g}function P(e){if(!e||"BODY"===e.tagName)return!1;const t=!("P"===e.tagName?e.innerHTML:e.innerText).trim();return t&&e.remove(),t}function*F(e){e.classList.contains("pagesjs-page")?O(e,()=>o(e)>3&&(g.append(...[...e.children].slice(3)),O())):(i&&""!==h.innerText&&t("h1",e)&&O(),e.innerText.trim()&&E-h.scrollHeight<C&&W(),yield*function*(e){for(;;){const t=A();if(U(e),q(e))e=$(e,t,"block");else{if(t.append(e),!R())return;e=$(e,t)}if(!e)return;W(e),yield}}(e))}function W(e){let t=A(),n=t.lastElementChild,o=0;const i=e=>e?.matches("h1,h2,h3,h4,h5,h6");for(;e&&n&&!i(n)&&n.classList.contains(s);)t=n,n=n.lastElementChild,o++;const r=i(n)&&z(n)&&n;if(r&&r.remove(),O(),!r)return;let a=e;for(let e=1;e<o&&a;e++)a=a.firstElementChild;a?.tagName===t.tagName&&o?a.prepend(r):A().append(r)}function $(e,t,n){const o=n||function(e){const t=getComputedStyle(e),n=e.tagName;if(/avoid/.test(t.breakInside)||e.matches(r))return;if("TABLE"===n)return e.tBodies[0]&&"table";if(!["block","list-item","flow-root"].includes(t.display)||!D(t))return;if("PRE"===n){if("CODE"===e.firstElementChild?.tagName&&_(e).length>1)return"code";if(e.offsetHeight<=v)return}return[...e.children].some(e=>!V(e))?"block":"inline"}(e),i="block"===o?void 0:z(e),c=!e.classList.contains(s),d=o&&G[o](e,t,i,c);if(!d)return i&&(e.remove(),e);const[f,p]=d;return I(f)?(f.remove(),p):(p?(p.classList.add(s),p.classList.remove(a,l)):f.classList.add(l),p)}function q(e){return!["TABLE","PRE"].includes(e.tagName)&&e.getElementsByTagName("*").length>300}function I(e){return!e.firstElementChild&&!e.textContent.trim()}function z(e){for(;e&&e!==g;e=e.parentNode)for(let t=e.previousElementSibling;t;t=t.previousElementSibling)if(t.getBoundingClientRect().height)return!0;return!1}function D(e){return"none"===e.float&&!["absolute","fixed"].includes(e.position)}function V(e){if(1!==e.nodeType)return!0;const t=getComputedStyle(e),n=t.display;return n.startsWith("inline")||"none"===n||"contents"===n||!D(t)}function X(e){const t=getComputedStyle(e);return(t.display.startsWith("inline")||"contents"===t.display)&&D(t)}function _(e){const t=[];return e.firstElementChild.innerHTML.replace(/\n$/,"").split("\n").map(e=>{const n=t.map(e=>e[0]).join("");return e.replace(/<(\/?)([a-z][\w-]*)[^>]*>/gi,(e,n,o)=>{n?t.pop():t.push([e,o])}),n+e+t.map(e=>`</${e[1]}>`).reverse().join("")})}function J(e,t){e.classList.add(s),e.classList.remove(l),t&&e.classList.add(a)}function U(e){1===e.nodeType&&[e,...n("."+s,e)].forEach(e=>e.classList.contains(s)&&e.classList.add(l))}function Y(e,t,n){const o=e.cloneNode();return e.remove(),t.append(o),J(o,n),o}const G={block:function(t,n,i,r){!function(t){if(p.has(t))return;p.add(t),t.isConnected||u.append(t);let n=[];function o(){if(n.some(e=>1===e.nodeType||3===e.nodeType&&e.nodeValue.trim())){const t=e.createElement("span");t.className="pagesjs-run",n[0].before(t),t.append(...n)}n=[]}for(const e of[...t.childNodes])V(e)?n.push(e):o();o(),t.parentNode===u&&t.remove()}(t);const s=Y(t,n,r);let a,l;i=z(s);for(;a=t.firstChild;){if(1!==a.nodeType){s.append(a);continue}U(a);const e=q(a);if(!e&&(s.append(a),!R()))continue;const n=o(s),i=$(a,s,e?"block":void 0);if(i){l=o(s)>n,t.prepend(i);break}}return I(t)||K(s,t,i),i&&!l&&Q(s,t),I(t)&&Z(s,t,i),"OL"===t.tagName&&o(s)&&!I(t)&&ee(s,t),[s,I(t)?null:t]},inline:function(n,o,i,r){const s=function(n){const o=e.createRange(),i=[{node:n,i:0}],r=e.createTreeWalker(n,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let s,a;function l(e){return a&&a.bottom<=e.top&&a.right>e.left}for(;s=r.nextNode();){const e=s.tagName;if(e){if(("MJX-CONTAINER"===e||"SPAN"===e&&t(".katex",s)||!X(s))&&(s=r.nextSibling(),!s))break;if(s.firstChild)continue}if(s.tagName){const e=s.getBoundingClientRect();l(e)&&i.push({node:s,i:-1}),a=e}else if(s.textContent.trim()){o.selectNodeContents(s);const e=o.getClientRects();if(!e.length)continue;l(e[0])&&i.push({node:s,i:0});for(let t=1;t<e.length;t++)i.push({node:s,i:te(s,t,o)});a=e[e.length-1]}}return i}(n);if(s.length<2)return;const a=e.createRange(),l=n.cloneNode(),c=s.length;let d=c;function f(){const e=s[--d];e.i<0?a.setStartBefore(e.node):a.setStart(e.node,e.i),a.setEnd(n,n.childNodes.length),l.prepend(a.extractContents());const t=n.lastChild;""===t?.innerHTML&&t.remove()}J(n,r);for(;d>(i?0:1)&&(f(),!(d>0)||R()););d>1&&c-d===1&&f();1===d&&i&&c<5&&f();return[n,l]},table:function(e,t,n,o){const i=Y(e,t,o),r=e.tBodies[0],s=r.cloneNode(),a=[...r.rows],l=a.length,c=n?0:1;i.append(s),[e.tHead,e.tFoot].forEach(e=>e&&i.append(e.cloneNode(!0))),s.append(...a);const d=w()-E-.5;if(d>=0){const e=a[l-1].getBoundingClientRect().bottom-d;let t=0,n=l;for(;t<n;){const o=t+n>>1;a[o].getBoundingClientRect().bottom<=e?t=o+1:n=o}let o=Math.max(t,c);for(r.prepend(...a.slice(o));o>c&&w()>E+.5;)r.prepend(a[--o])}s.rows.length||(i.innerHTML="");const f=s.rows.length;(1===r.rows.length&&f>1||1===f&&n&&r.rows.length)&&(r.prepend(s.rows[f-1]),1===f&&(i.innerHTML=""));return[i,r.rows.length?e:null]},code:function(t,n,o,i){const r=t.firstElementChild,s=_(t),a=[...t.children],l=a.filter((e,t)=>t>a.indexOf(r)&&D(getComputedStyle(e))),c=Y(t,n,i),d=r.cloneNode();c.append(d,...a.filter(e=>e!==r&&!l.includes(e)));let f=function(t,n,o){const i=n.length,r=o?0:1;t.innerHTML=n.join("\n");const s=w()-E-.5;if(s<0)return i;const a=e.createRange(),l=[];t.childNodes.forEach(e=>{if(3===e.nodeType)for(let t=e.data.indexOf("\n");t>=0;t=e.data.indexOf("\n",t+1))a.setStart(e,t),a.setEnd(e,t+1),l.push(a.getBoundingClientRect().bottom)}),a.selectNodeContents(t);const c=a.getClientRects(),d=c[c.length-1].bottom;l.push(d);let f=0;for(;f<i&&l[f]<=d-s;)f++;for(;f&&f<i&&!n[f].trim();)f++;t.innerHTML=n.slice(0,Math.max(f,r)).join("\n");for(;f>r&&w()>E+.5;)t.innerHTML=n.slice(0,--f).join("\n");return Math.max(f,r)}(d,s,o);f>1&&s.length-f===1&&f--;1===f&&o&&(f=0);f?d.innerHTML=s.slice(0,f).join("\n"):c.innerHTML="";return r.innerHTML=s.slice(f).join("\n"),r.innerHTML.trim()?[c,t]:(f&&c.append(...l),[c,null])}};function K(e,t,n){for(let i;(i=e.lastElementChild)?.matches("h1,h2,h3,h4,h5,h6")&&(o(e)>1||n);)t.prepend(i)}function Q(e,t){!I(t)&&e.getBoundingClientRect().height<1.5*C&&t.prepend(...e.childNodes)}function Z(e,t,n){for(e.classList.add(l);R()&&e.lastElementChild&&(o(e)>1||n);)t.prepend(e.lastElementChild);I(t)||e.classList.remove(l)}function ee(e,t){t.start+=o(e)-(t.firstElementChild.classList.contains(s)?1:0)}function te(e,t,n){let o=0,i=e.length;for(;o<i;){const r=o+i>>1;n.setStart(e,0),n.setEnd(e,r),n.getClientRects().length>t?i=r:o=r+1}return o-1}function ne(e){return e&&(e.dataset.shortTitle||e.innerText)}const oe=(i?"h1":"h2")+":not(.pagesjs-front *)";function ie(e){const t=performance.now();for(;!N.next().done;)if(!(e||performance.now()-t<500))return new Promise(e=>{requestAnimationFrame(e),setTimeout(e,50)}).then(()=>ie())}function re(o){const r=o||/Headless/.test(navigator.userAgent)||navigator.webdriver;if("complete"!==e.readyState)return addEventListener("load",()=>re(o));const s=e.body.classList;if(s.contains("pagesjs"))return;dispatchEvent(new Event("pagesjs:before")),n(e.body.dataset.pagesFront||"body > header").forEach(e=>e.classList.add("pagesjs-front")),b=ne(t("h1.title, .pagesjs-front h1, .title, h1")),s.add("pagesjs"),e.body.append(u),r||(y=e.createElement("div"),y.className="pagesjs-progress",y.textContent="Paginating...",e.body.append(y)),e.body.insertAdjacentElement("afterbegin",x()),E=(h.clientHeight||window.innerHeight)+3,v=g.clientHeight||E,n(":is(#TOC, .footnotes, .chapter-before, .chapter-after):is(.side-left, .side-right).side").forEach(e=>{e.classList.remove("side","side-left","side-right")}),s.add("pagesjs-filling"),function(){const t=e.createElement("p"),n=h.scrollHeight;t.innerText="A",g.append(t),C=h.scrollHeight-n,t.remove()}(),n('#TOC a[href^="#"]').forEach(t=>{const n=e.createElement("span");let o;for(n.className="toc-text",t.append(n);(o=n.previousSibling)&&!o.classList?.contains("section-number");)n.prepend(o);t.dataset.pageNumber="000"});const a=function(){const o=e.body.dataset.pagesRoot,i=o?[...n(o)]:[];if(i.length)return i;let r=t('main, [role="main"]');for(;1===r?.childElementCount;)r=r.firstElementChild;if(r)return[r];const s=[...n("article")].filter(e=>!e.parentNode.closest("article"));return s.length?s:[e.body]}(),l=function(t){return t.map(t=>{n('style, link[rel="stylesheet"]',t).forEach(t=>e.head.append(t));const o=[...t.children].filter(e=>![h,u,y].includes(e)&&!["SCRIPT","NOSCRIPT","TEMPLATE"].includes(e.tagName));return o.forEach(e=>e.remove()),o})}(a);function*c(){yield*function*(e,t){for(const e of n(".pagesjs-front, .abstract, #TOC:not(.chapter-toc)"))yield*F(e),i&&O();for(const[n,o]of e.entries()){H=k(o),m=null,i&&(""===h.innerText?x(h):O());for(const e of t[n])yield*F(e);P(o.parentNode),P(o)}B(h),n(".pagesjs-run").forEach(e=>e.replaceWith(...e.childNodes))}(a,l),s.remove("pagesjs-filling"),function(){let e,o=0;f.forEach(r=>{if(i){if(t(".pagesjs-front",r))return;t(oe,r)&&(e="")}const s=+r.dataset.pagesOffset||1;s>1&&r.classList.add("page-multiple"),o+=s,r.classList.add("page-"+(o%2==0?"even":"odd"));const a={pageNumber:o,mainTitle:b,pageTitle:e};let l;[r.children[0],r.children[2]].forEach(e=>{for(const t in a)a[t]&&(e.dataset[t]=a[t])}),e=ne([...n(oe,r)].pop())||e,n(".footnotes",r).forEach((e,t)=>{0===t?(l=e,r.children[1].after(e)):(l.append(...e.children),e.remove())})})}(),e.body.prepend(...f),n('#TOC a[href^="#"]').forEach(e=>{const n=t(`.pagesjs-page:has(#${CSS.escape(e.getAttribute("href").replace(/^#/,""))}) .pagesjs-header`);e.dataset.pageNumber=n?n.dataset.pageNumber:""}),u.remove(),y?.remove(),j=!0,dispatchEvent(new Event("pagesjs:after"))}L=e=>(L=null,T&&(T.forEach(e=>e.forEach(e=>e.remove())),g.innerHTML="",m=null,H=[],h.classList.remove("pagesjs-settle"),T=null),N=c(),ie(e||r)),o?L(!0):function(e,t){return h.classList.add("pagesjs-settle"),e.forEach((e,n)=>{H=k(e),m=null,A().append(...t[n])}),T=t,new Promise(e=>{const t=setTimeout(e,500);let n=0;!function o(){requestAnimationFrame(()=>++n<3?o():(clearTimeout(t),e()))}()})}(a,l).then(()=>L?.())}addEventListener("beforeprint",()=>{if(L)L(!0);else if(N)for(;!N.next().done;);else re(!0)}),addEventListener("pagesjs:paginate",()=>{j?dispatchEvent(new Event("pagesjs:after")):re()});const se=new URLSearchParams(location.search);se.get("paged")&&re(),addEventListener("keypress",e=>{"p"===e.key&&(se.get("paged")?(se.delete("paged"),location.href=location.pathname+(se.size?`?${se}`:"")):(re(),se.set("paged",1),history.replaceState({},"",`${location.pathname}?${se}`)))})})(document);
2
2
  //# sourceMappingURL=pages.min.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["d","$","s","el","querySelector","$$","querySelectorAll","nChild","childElementCount","book","length","atomic","fr_cls","fr_1","fr_2","tb","map","i","parseFloat","getComputedStyle","documentElement","getPropertyValue","tpl","createElement","boxes","wrapped","WeakSet","hold","className","innerHTML","style","display","box","box_body","box_ctx","H","B","H_min","main_title","probed","pending","finished","wrap","newPage","insertAdjacentHTML","cloneNode","children","includes","push","trailingMargin","body","m","e","lastElementChild","cs","Math","max","marginBottom","paddingBottom","borderBottomWidth","pageHeight","getBoundingClientRect","height","overflows","scrollHeight","nextPage","callback","cur","after","finish","h","dataset","pagesOffset","n","ceil","concat","offsetHeight","reduce","m1","m2","nPages","n2","calcPages","remove","ancestors","a","parentNode","unshift","ctx","contains","p","c","classList","add","appendChild","removeBlank","tagName","v","innerText","trim","fill","append","slice","breakPage","endFrag","isBigBlock","split","place","rest","parent","depth","isHeading","matches","keep","hasPrev","target","firstElementChild","prepend","container","kind","k","t","test","breakInside","tBodies","inFlow","codeLines","some","isInline","kindOf","prev","undefined","first","r","splitters","head","blank","getElementsByTagName","textContent","previousElementSibling","float","position","nodeType","startsWith","inTextFlow","pre","open","replace","line","start","join","pop","reverse","mark","forEach","cut","block","has","isConnected","run","flush","nodeValue","before","childNodes","wrapRuns","item","partial","firstChild","big","moveShortHead","fitLastPiece","fixOlStart","inline","ends","createRange","node","walker","createTreeWalker","NodeFilter","SHOW_TEXT","SHOW_ELEMENT","newLine","rect","bottom","top","right","left","nextNode","nextSibling","selectNodeContents","rects","getClientRects","lineOffset","lineStarts","cutLine","loc","setStartBefore","setStart","setEnd","extractContents","last","lastChild","table","tb2","rows","min","tHead","tFoot","over","limit","lo","hi","mid","code","lines","kids","tail","filter","j","indexOf","code2","bottoms","data","fitLines","shortTitle","ps","paginate","sync","readyState","addEventListener","cls","dispatchEvent","Event","pagesFront","insertAdjacentElement","clientHeight","window","innerHeight","H0","measureMinHeight","previousSibling","pageNumber","roots","sel","pagesRoot","x","main","articles","closest","findRoots","els","ch","detachContent","replaceWith","fillPages","page_title","N","info","mainTitle","pageTitle","ft","key","numberPages","CSS","escape","getAttribute","Promise","done","setTimeout","tick","requestAnimationFrame","clearTimeout","probe","then","SP","URLSearchParams","location","search","get","delete","href","pathname","size","set","history","replaceState","document"],"sources":["pages.js"],"mappings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xF,QAAQ,CAACvJ,EAAIc,KACjByB,EAAO0C,EAAUjF,GAAK+B,EAAU,KAAMsD,IAAMa,UAAUqJ,EAAIzO,MAE5DsB,EAASmN,EACF,IAAIgB,QAAQC,IACjB,MAAMlJ,EAAImJ,WAAWD,EAAM,KAC3B,IAAIlM,EAAI,GACR,SAAUoM,IACRC,sBAAsB,MAAQrM,EAAI,EAAIoM,KAAUE,aAAatJ,GAAIkJ,KAClE,CAFD,IAIJ,CAmKqBK,CAAM9B,EAAOQ,GAAKuB,KAAK,IAAMzO,MAClD,CAIA6L,iBAAiB,cAAe,IAAM7L,EAAUA,IAAY0L,IAAS,IAIrEG,iBAAiB,mBAAoB,KACnC5L,EAAW8L,cAAc,IAAIC,MAAM,kBAAoBN,OAGzD,MAAMgD,GAAK,IAAIC,gBAAgBC,SAASC,QACxCH,GAAGI,IAAI,UAAYpD,KACnBG,iBAAiB,WAAYjL,IACb,MAAVA,EAAEiN,MACAa,GAAGI,IAAI,UACTJ,GAAGK,OAAO,SAAUH,SAASI,KAAOJ,SAASK,UAAYP,GAAGQ,KAAO,IAAIR,KAAO,MAE9EhD,KACAgD,GAAGS,IAAI,QAAS,GAAIC,QAAQC,aAAa,CAAC,EAAG,GAAI,GAAGT,SAASK,YAAYP,SAIhF,EApsBD,CAosBGY","ignoreList":[]}
1
+ {"version":3,"names":["d","$","s","el","querySelector","$$","querySelectorAll","nChild","childElementCount","book","length","atomic","fr_cls","fr_1","fr_2","tb","map","i","parseFloat","getComputedStyle","documentElement","getPropertyValue","tpl","createElement","boxes","wrapped","WeakSet","hold","className","innerHTML","style","display","box","box_body","box_ctx","H","B","H_min","main_title","probed","pending","running","progress","finished","wrap","n_done","newPage","insertAdjacentHTML","cloneNode","children","includes","push","trailingMargin","body","m","e","lastElementChild","cs","Math","max","marginBottom","paddingBottom","borderBottomWidth","pageHeight","getBoundingClientRect","height","overflows","scrollHeight","nextPage","callback","cur","after","finish","h","dataset","pagesOffset","n","ceil","concat","offsetHeight","reduce","m1","m2","nPages","n2","calcPages","remove","textContent","ancestors","a","parentNode","unshift","ctx","contains","p","c","classList","add","appendChild","removeBlank","tagName","v","innerText","trim","fill","append","slice","breakPage","endFrag","isBigBlock","split","place","rest","parent","depth","isHeading","matches","keep","hasPrev","target","firstElementChild","prepend","container","kind","k","t","test","breakInside","tBodies","inFlow","codeLines","some","isInline","kindOf","prev","undefined","first","r","splitters","head","blank","getElementsByTagName","previousElementSibling","float","position","nodeType","startsWith","inTextFlow","pre","open","replace","line","start","join","pop","reverse","mark","forEach","cut","block","has","isConnected","run","flush","nodeValue","before","childNodes","wrapRuns","item","partial","firstChild","big","moveTrailingHeadings","moveShortHead","fitLastPiece","fixOlStart","inline","ends","createRange","node","walker","createTreeWalker","NodeFilter","SHOW_TEXT","SHOW_ELEMENT","newLine","rect","bottom","top","right","left","nextNode","nextSibling","selectNodeContents","rects","getClientRects","lineOffset","lineStarts","cutLine","loc","setStartBefore","setStart","setEnd","extractContents","last","lastChild","table","tb2","rows","min","tHead","tFoot","over","limit","lo","hi","mid","code","lines","kids","tail","filter","j","indexOf","code2","bottoms","data","fitLines","shortTitle","ps","advance","sync","performance","now","next","done","Promise","go","requestAnimationFrame","setTimeout","then","paginate","quiet","navigator","userAgent","webdriver","readyState","addEventListener","cls","dispatchEvent","Event","pagesFront","insertAdjacentElement","clientHeight","window","innerHeight","H0","measureMinHeight","previousSibling","pageNumber","roots","sel","pagesRoot","x","main","articles","closest","findRoots","els","ch","detachContent","entries","child","replaceWith","fillPages","page_title","N","info","mainTitle","pageTitle","ft","key","numberPages","CSS","escape","getAttribute","tick","clearTimeout","probe","SP","URLSearchParams","location","search","get","delete","href","pathname","size","set","history","replaceState","document"],"sources":["pages.js"],"mappings":"AAkBA,CAACA,IAIC,SAAUC,EAAEC,EAAGC,EAAKH,GAAK,OAAOG,GAAIC,cAAcF,EAAI,CACtD,SAASG,EAAGH,EAAGC,EAAKH,GAAK,OAAOG,EAAKA,EAAGG,iBAAiBJ,GAAK,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AAoBT,OAGzD,MAAMgD,GAAK,IAAIC,gBAAgBC,SAASC,QACxCH,GAAGI,IAAI,UAAYpD,KACnBM,iBAAiB,WAAYhM,IACb,MAAVA,EAAEkO,MACAQ,GAAGI,IAAI,UACTJ,GAAGK,OAAO,SAAUH,SAASI,KAAOJ,SAASK,UAAYP,GAAGQ,KAAO,IAAIR,KAAO,MAE9EhD,KACAgD,GAAGS,IAAI,QAAS,GAAIC,QAAQC,aAAa,CAAC,EAAG,GAAI,GAAGT,SAASK,YAAYP,SAIhF,EAruBD,CAquBGY","ignoreList":[]}
package/js/snap.js CHANGED
@@ -4,12 +4,14 @@
4
4
  // find a container that has at least n "slides"
5
5
  function findContainer(s, n = 1) {
6
6
  if (p.querySelectorAll(s).length >= n) return true;
7
- // if body doesn't contain headings or <hr>s, look into children
8
- for (let i = 0; i < p.children.length; i++) {
9
- if (p.children[i].querySelectorAll(s).length >= n) {
10
- p = p.children[i]; break;
7
+ // if body doesn't contain headings or <hr>s, look into children (and their
8
+ // children, e.g., <main> > <article>)
9
+ (function find(el) {
10
+ for (const c of el.children) {
11
+ if (c.querySelectorAll(s).length >= n) return p = c;
11
12
  }
12
- }
13
+ return [...el.children].some(find);
14
+ })(p);
13
15
  return false;
14
16
  }
15
17
  function newEl(tag, cls) {
package/js/snap.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){let t=e.body;const n=":scope > h2";function o(e,n=1){if(t.querySelectorAll(e).length>=n)return!0;for(let o=0;o<t.children.length;o++)if(t.children[o].querySelectorAll(e).length>=n){t=t.children[o];break}return!1}function r(t,n){const o=e.createElement(t);return n&&(o.className=n),o}if(!o(":scope > hr:not([class])",3)&&"BODY"===t.tagName){if(!o(n)&&"BODY"===t.tagName)return;t.querySelectorAll(n).forEach(e=>e.before(r("hr")))}function i(e){return""===e?.innerHTML?e:r("div","slide")}function s(e){return"HR"===e.tagName&&0===e.attributes.length}t.classList.add("slide-container"),[".frontmatter",".abstract","#TOC"].forEach(t=>{const n=e.body.querySelector(t);if(n)if(".frontmatter"===t)n.classList.add("slide");else{const e=i();n.before(e),e.append(n)}});let l=t.firstElementChild;if(s(l)&&l.remove(),l=t.firstElementChild,!l)return;let c=i();for(l.before(c);;){let e=c.nextSibling;if(!e)break;s(e)?(c=i(c),e.before(c),e.remove()):e.classList?.contains("slide")?(c=i(c),e.after(c)):c.append(e)}function a(e,t){const n=r("div");n.innerHTML=`<div ${t}></div>`;const o=n.firstElementChild.attributes;for(const t of o)e.setAttribute(t.name,t.value);n.remove()}function d(e){setTimeout(()=>e?.scrollIntoView(),100)}const f=e.documentElement,u=e.body.classList,h=e.querySelectorAll(".slide"),m=h.length,p=e.querySelector("span.timer"),y=e.querySelector(".footnotes");h.forEach((e,t)=>{const n=r("div","header"),o=r("div","main"),i=r("div","footer");o.append(...e.childNodes),e.append(o),e.insertAdjacentElement("afterbegin",n),e.insertAdjacentElement("beforeend",i),y&&e.querySelectorAll('.footnote-ref > a[href^="#fn"]').forEach(t=>{const n=y.querySelector("li"+t.getAttribute("href"));if(!n)return;let o=e.querySelector("section.footnotes");o&&!o.contains(n)||(o=r("section","footnotes"),i.before(o)),o.append(n),n.firstElementChild?.insertAdjacentHTML("afterbegin",`[${t.innerHTML}] `),n.outerHTML=n.innerHTML}),i.append(p?p.cloneNode():r("span","timer"));const s=r("span","page-number");s.innerText=t+1+"/"+m,s.onclick=e=>location.hash=t+1,i.append(s);for(const t of o.childNodes){if(t.nodeType!==Node.COMMENT_NODE)continue;let n=t.textContent;if(!/^#/.test(n))continue;n=n.replace(/^#/,"");const o=/[\s\n]class="([^"]+)"/,r=n.match(o);r&&(n=n.replace(o,"").trim(),e.className+=" "+r[1]),n&&a(e,n);break}e.addEventListener("click",e=>{(e.altKey||e.ctrlKey)&&(L(e),d(e.target))})}),[...e.querySelectorAll("a.footnote-backref"),y,p].forEach(e=>e?.remove());const g=e.querySelectorAll("span.timer"),b=1e3*g[0].dataset.total;let v;function E(){v=new Date,setInterval(S,1e3)}function S(){if(!u.contains("slide-mode"))return;let e=new Date-v;b&&(e=b-e);const t=new Date(Math.abs(e)).toISOString().slice(11,19).replace(/^00:/,"");g.forEach(n=>{n.innerText=t,e<0&&(n.style.opacity=Math.ceil(e/1e3)%2)})}function L(e){u.toggle("overview")?u.remove("slide-mode"):H(e)}e.addEventListener("keyup",t=>{t.target===e.body&&("f"===t.key&&f.requestFullscreen(),"o"===t.key&&L(t),"m"===t.key&&u.toggle("mirrored"),sessionStorage.setItem("body-class",e.body.className))}),e.onfullscreenchange=t=>{e.fullscreenElement&&(!v&&E(),H(t))},g.forEach(e=>e.addEventListener("click",e=>E()));let q=-1;function T(){if(q>=0)return q;const e=r("div","slide");return t.querySelector(".slide:last-of-type").after(e),q=e.offsetHeight,e.remove(),q}const w=r("style");w.setAttribute("type","text/css"),e.head.append(w),w.innerHTML=`:root{--slide-ratio:${screen.height/screen.width}}`;const A=+getComputedStyle(f).getPropertyValue("--slide-ratio");function H(t){if("load"===t.type&&d(h[location.hash.replace(/^#/,"")-1]),u.contains("overview"))return;let n=window.innerHeight,o=n/900,i=n/window.innerWidth,s=e.fullscreenElement;u.toggle("slide-mode",s||i<=A)&&!s&&f.scrollWidth>f.offsetWidth&&u.remove("slide-mode"),w.innerHTML=`:root{--slide-ratio:${A};--slide-scale:${o};--slide-top:${(o-1)/2*e.body.scrollHeight+"px"};}`,!e.querySelector(".spacer.fade")&&u.contains("slide-mode")&&h.forEach(e=>{const t=r("div","spacer fade"),n=e.offsetHeight,i=T();e.append(t),n<=i||(t.style.height=(i-n%i)*o+"px")})}["load","resize"].forEach(e=>window.addEventListener(e,H));const N=sessionStorage.getItem("body-class");N&&(e.body.className+=" "+N)}(document);
1
+ !function(e){let t=e.body;const n=":scope > h2";function o(e,n=1){return t.querySelectorAll(e).length>=n||(function o(r){for(const o of r.children)if(o.querySelectorAll(e).length>=n)return t=o;return[...r.children].some(o)}(t),!1)}function r(t,n){const o=e.createElement(t);return n&&(o.className=n),o}if(!o(":scope > hr:not([class])",3)&&"BODY"===t.tagName){if(!o(n)&&"BODY"===t.tagName)return;t.querySelectorAll(n).forEach(e=>e.before(r("hr")))}function i(e){return""===e?.innerHTML?e:r("div","slide")}function s(e){return"HR"===e.tagName&&0===e.attributes.length}t.classList.add("slide-container"),[".frontmatter",".abstract","#TOC"].forEach(t=>{const n=e.body.querySelector(t);if(n)if(".frontmatter"===t)n.classList.add("slide");else{const e=i();n.before(e),e.append(n)}});let l=t.firstElementChild;if(s(l)&&l.remove(),l=t.firstElementChild,!l)return;let c=i();for(l.before(c);;){let e=c.nextSibling;if(!e)break;s(e)?(c=i(c),e.before(c),e.remove()):e.classList?.contains("slide")?(c=i(c),e.after(c)):c.append(e)}function a(e,t){const n=r("div");n.innerHTML=`<div ${t}></div>`;const o=n.firstElementChild.attributes;for(const t of o)e.setAttribute(t.name,t.value);n.remove()}function d(e){setTimeout(()=>e?.scrollIntoView(),100)}const f=e.documentElement,u=e.body.classList,h=e.querySelectorAll(".slide"),m=h.length,p=e.querySelector("span.timer"),y=e.querySelector(".footnotes");h.forEach((e,t)=>{const n=r("div","header"),o=r("div","main"),i=r("div","footer");o.append(...e.childNodes),e.append(o),e.insertAdjacentElement("afterbegin",n),e.insertAdjacentElement("beforeend",i),y&&e.querySelectorAll('.footnote-ref > a[href^="#fn"]').forEach(t=>{const n=y.querySelector("li"+t.getAttribute("href"));if(!n)return;let o=e.querySelector("section.footnotes");o&&!o.contains(n)||(o=r("section","footnotes"),i.before(o)),o.append(n),n.firstElementChild?.insertAdjacentHTML("afterbegin",`[${t.innerHTML}] `),n.outerHTML=n.innerHTML}),i.append(p?p.cloneNode():r("span","timer"));const s=r("span","page-number");s.innerText=t+1+"/"+m,s.onclick=e=>location.hash=t+1,i.append(s);for(const t of o.childNodes){if(t.nodeType!==Node.COMMENT_NODE)continue;let n=t.textContent;if(!/^#/.test(n))continue;n=n.replace(/^#/,"");const o=/[\s\n]class="([^"]+)"/,r=n.match(o);r&&(n=n.replace(o,"").trim(),e.className+=" "+r[1]),n&&a(e,n);break}e.addEventListener("click",e=>{(e.altKey||e.ctrlKey)&&(L(e),d(e.target))})}),[...e.querySelectorAll("a.footnote-backref"),y,p].forEach(e=>e?.remove());const g=e.querySelectorAll("span.timer"),b=1e3*g[0].dataset.total;let v;function E(){v=new Date,setInterval(S,1e3)}function S(){if(!u.contains("slide-mode"))return;let e=new Date-v;b&&(e=b-e);const t=new Date(Math.abs(e)).toISOString().slice(11,19).replace(/^00:/,"");g.forEach(n=>{n.innerText=t,e<0&&(n.style.opacity=Math.ceil(e/1e3)%2)})}function L(e){u.toggle("overview")?u.remove("slide-mode"):H(e)}e.addEventListener("keyup",t=>{t.target===e.body&&("f"===t.key&&f.requestFullscreen(),"o"===t.key&&L(t),"m"===t.key&&u.toggle("mirrored"),sessionStorage.setItem("body-class",e.body.className))}),e.onfullscreenchange=t=>{e.fullscreenElement&&(!v&&E(),H(t))},g.forEach(e=>e.addEventListener("click",e=>E()));let q=-1;function T(){if(q>=0)return q;const e=r("div","slide");return t.querySelector(".slide:last-of-type").after(e),q=e.offsetHeight,e.remove(),q}const w=r("style");w.setAttribute("type","text/css"),e.head.append(w),w.innerHTML=`:root{--slide-ratio:${screen.height/screen.width}}`;const A=+getComputedStyle(f).getPropertyValue("--slide-ratio");function H(t){if("load"===t.type&&d(h[location.hash.replace(/^#/,"")-1]),u.contains("overview"))return;let n=window.innerHeight,o=n/900,i=n/window.innerWidth,s=e.fullscreenElement;u.toggle("slide-mode",s||i<=A)&&!s&&f.scrollWidth>f.offsetWidth&&u.remove("slide-mode"),w.innerHTML=`:root{--slide-ratio:${A};--slide-scale:${o};--slide-top:${(o-1)/2*e.body.scrollHeight+"px"};}`,!e.querySelector(".spacer.fade")&&u.contains("slide-mode")&&h.forEach(e=>{const t=r("div","spacer fade"),n=e.offsetHeight,i=T();e.append(t),n<=i||(t.style.height=(i-n%i)*o+"px")})}["load","resize"].forEach(e=>window.addEventListener(e,H));const N=sessionStorage.getItem("body-class");N&&(e.body.className+=" "+N)}(document);
2
2
  //# sourceMappingURL=snap.min.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["d","p","body","s2","findContainer","s","n","querySelectorAll","length","i","children","newEl","tag","cls","el","createElement","className","tagName","forEach","h2","before","newSlide","innerHTML","isSep","attributes","classList","add","sel","querySelector","append","firstElementChild","remove","nextSibling","contains","after","setAttr","attr","m","attrs","a","setAttribute","name","value","reveal","setTimeout","scrollIntoView","dE","documentElement","dC","slides","N","tm","fn","header","main","footer","childNodes","insertAdjacentElement","li","getAttribute","f","insertAdjacentHTML","outerHTML","cloneNode","innerText","onclick","e","location","hash","node","nodeType","Node","COMMENT_NODE","t","textContent","test","replace","r","match","trim","addEventListener","altKey","ctrlKey","toggleView","target","tms","t1","dataset","total","t0","startTimers","Date","setInterval","setTimers","t2","Math","abs","toISOString","slice","style","opacity","ceil","toggle","setScale","key","requestFullscreen","sessionStorage","setItem","onfullscreenchange","fullscreenElement","H","slideHeight","offsetHeight","sty","head","screen","height","width","ratio","getComputedStyle","getPropertyValue","type","h","window","innerHeight","r2","innerWidth","full","scrollWidth","offsetWidth","scrollHeight","sp","evt","bc","getItem","document"],"sources":["snap.js"],"mappings":"CAAA,SAAUA,GACR,IAAIC,EAAID,EAAEE,KACV,MAAuCC,EAAK,cAE5C,SAASC,EAAcC,EAAGC,EAAI,GAC5B,GAAIL,EAAEM,iBAAiBF,GAAGG,QAAUF,EAAG,OAAO,EAE9C,IAAK,IAAIG,EAAI,EAAGA,EAAIR,EAAES,SAASF,OAAQC,IACrC,GAAIR,EAAES,SAASD,GAAGF,iBAAiBF,GAAGG,QAAUF,EAAG,CACjDL,EAAIA,EAAES,SAASD,GAAI,KACrB,CAEF,OAAO,CACT,CACA,SAASE,EAAMC,EAAKC,GAClB,MAAMC,EAAKd,EAAEe,cAAcH,GAE3B,OADIC,IAAKC,EAAGE,UAAYH,GACjBC,CACT,CACA,IAAKV,EAjBM,2BAiBY,IAEH,SAAdH,EAAEgB,QAAoB,CAExB,IAAKb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AKc,WAAa,IAAMqH,EACnC,CAhMD,CAgMGE","ignoreList":[]}
1
+ {"version":3,"names":["d","p","body","s2","findContainer","s","n","querySelectorAll","length","find","el","c","children","some","newEl","tag","cls","createElement","className","tagName","forEach","h2","before","newSlide","innerHTML","isSep","attributes","classList","add","sel","querySelector","append","firstElementChild","remove","nextSibling","contains","after","setAttr","attr","m","attrs","a","setAttribute","name","value","reveal","setTimeout","scrollIntoView","dE","documentElement","dC","slides","N","tm","fn","i","header","main","footer","childNodes","insertAdjacentElement","li","getAttribute","f","insertAdjacentHTML","outerHTML","cloneNode","innerText","onclick","e","location","hash","node","nodeType","Node","COMMENT_NODE","t","textContent","test","replace","r","match","trim","addEventListener","altKey","ctrlKey","toggleView","target","tms","t1","dataset","total","t0","startTimers","Date","setInterval","setTimers","t2","Math","abs","toISOString","slice","style","opacity","ceil","toggle","setScale","key","requestFullscreen","sessionStorage","setItem","onfullscreenchange","fullscreenElement","H","slideHeight","offsetHeight","sty","head","screen","height","width","ratio","getComputedStyle","getPropertyValue","type","h","window","innerHeight","r2","innerWidth","full","scrollWidth","offsetWidth","scrollHeight","sp","evt","bc","getItem","document"],"sources":["snap.js"],"mappings":"CAAA,SAAUA,GACR,IAAIC,EAAID,EAAEE,KACV,MAAuCC,EAAK,cAE5C,SAASC,EAAcC,EAAGC,EAAI,GAC5B,OAAIL,EAAEM,iBAAiBF,GAAGG,QAAUF,IAGpC,SAAUG,EAAKC,GACb,IAAK,MAAMC,KAAKD,EAAGE,SACjB,GAAID,EAAEJ,iBAAiBF,GAAGG,QAAUF,EAAG,OAAOL,EAAIU,EAEpD,MAAO,IAAID,EAAGE,UAAUC,KAAKJ,EAC9B,CALD,CAKGR,IACI,EACT,CACA,SAASa,EAAMC,EAAKC,GAClB,MAAMN,EAAKV,EAAEiB,cAAcF,GAE3B,OADIC,IAAKN,EAAGQ,UAAYF,GACjBN,CACT,CACA,IAAKN,EAnBM,2BAmBY,IAEH,SAAdH,EAAEkB,QAAoB,CAExB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,cAC9BD,IAAIxI,EAAEE,KAAKgB,WAAa,IAAMsH,EACnC,CAlMD,CAkMGE","ignoreList":[]}
package/js/toc.js CHANGED
@@ -2,7 +2,7 @@
2
2
  (d => {
3
3
  // find the body of the article
4
4
  let b;
5
- ['.article', '.body', 'article', '.main', 'body'].forEach(s => {
5
+ ['.article', 'article', '.main', 'body'].forEach(s => {
6
6
  if (!b) b = d.querySelector(s);
7
7
  });
8
8
  const hs = b.querySelectorAll([1, 2, 3, 4, 5, 6].map(i => `:scope > h${i}`).join(','));
package/js/toc.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (e=>{let t;[".article",".body","article",".main","body"].forEach(n=>{t||(t=e.querySelector(n))});const n=t.querySelectorAll([1,2,3,4,5,6].map(e=>`:scope > h${e}`).join(","));if(0===n.length)return;let r,i,l=e.getElementById("TOC")||e.getElementById("TableOfContents");l?l.innerHTML="":(l=e.createElement("div"),l.id="TOC");let a,d=l,o=0;if(n.forEach(t=>{if(a=parseInt(t.tagName.replace(/^h/i,"")),r=e.createElement("li"),a>o)i=e.createElement("ul"),i.appendChild(r),d.appendChild(i);else if(a<o)for(let e=0;e<o-a;e++)d=d.parentNode.parentNode;a<=o&&d.parentNode.appendChild(r),d=r;const n=e.createElement("a");if(n.innerHTML=t.innerHTML,t.id)n.href="#"+t.id;else{const e=t.parentNode;e.classList.contains("section")&&e.id&&(n.href="#"+e.id)}d.appendChild(n),o=a}),!l.parentNode){const e=t.querySelector("header");e?e.after(l):t.insertBefore(l,t.firstChild)}l.querySelector("span.section-number")&&l.firstElementChild.classList.add("numbered")})(document);
1
+ (e=>{let t;[".article","article",".main","body"].forEach(n=>{t||(t=e.querySelector(n))});const n=t.querySelectorAll([1,2,3,4,5,6].map(e=>`:scope > h${e}`).join(","));if(0===n.length)return;let r,i,l=e.getElementById("TOC")||e.getElementById("TableOfContents");l?l.innerHTML="":(l=e.createElement("div"),l.id="TOC");let a,d=l,o=0;if(n.forEach(t=>{if(a=parseInt(t.tagName.replace(/^h/i,"")),r=e.createElement("li"),a>o)i=e.createElement("ul"),i.appendChild(r),d.appendChild(i);else if(a<o)for(let e=0;e<o-a;e++)d=d.parentNode.parentNode;a<=o&&d.parentNode.appendChild(r),d=r;const n=e.createElement("a");if(n.innerHTML=t.innerHTML,t.id)n.href="#"+t.id;else{const e=t.parentNode;e.classList.contains("section")&&e.id&&(n.href="#"+e.id)}d.appendChild(n),o=a}),!l.parentNode){const e=t.querySelector("header");e?e.after(l):t.insertBefore(l,t.firstChild)}l.querySelector("span.section-number")&&l.firstElementChild.classList.add("numbered")})(document);
2
2
  //# sourceMappingURL=toc.min.js.map
package/js/toc.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["d","b","forEach","s","querySelector","hs","querySelectorAll","map","i","join","length","li","ul","toc","getElementById","innerHTML","createElement","id","t1","p","t0","h","parseInt","tagName","replace","appendChild","j","parentNode","a","href","classList","contains","header","after","insertBefore","firstChild","firstElementChild","add","document"],"sources":["toc.js"],"mappings":"AACA,CAACA,IAEC,IAAIC,EACJ,CAAC,WAAY,QAAS,UAAW,QAAS,QAAQC,QAAQC,IACnDF,IAAGA,EAAID,EAAEI,cAAcD,MAE9B,MAAME,EAAKJ,EAAEK,iBAAiB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAAGC,IAAIC,GAAK,aAAaA,KAAKC,KAAK,MACjF,GAAkB,IAAdJ,EAAGK,OAAc,OAErB,IAQIC,EAAIC,EARJC,EAAMb,EAAEc,eAAe,QAAUd,EAAEc,eAAe,mBAClDD,EACFA,EAAIE,UAAY,IAEhBF,EAAMb,EAAEgB,cAAc,OACtBH,EAAII,GAAK,OAIX,IACIC,EADAC,EAAIN,EACAO,EAAK,EA6Bb,GA5BAf,EAAGH,QAAQmB,IAGT,GAFAH,EAAKI,SAASD,EAAEE,QAAQC,QAAQ,MAAO,KACvCb,EAAKX,EAAEgB,cAAc,MACjBE,EAAKE,EAEPR,EAAKZ,EAAEgB,cAAc,MACrBJ,EAAGa,YAAYd,GACfQ,EAAEM,YAAYb,QACT,GAAIM,EAAKE,EAEd,IAAK,IAAIM,EAAI,EAAGA,EAAIN,EAAKF,EAAIQ,IAC3BP,EAAIA,EAAEQ,WAAWA,WAGjBT,GAAME,GAAID,EAAEQ,WAAWF,YAAYd,GACvCQ,EAAIR,EACJ,MAAMiB,EAAI5B,EAAEgB,cAAc,KAE1B,GADAY,EAAEb,UAAYM,EAAEN,UACZM,EAAEJ,GACJW,EAAEC,KAAO,IAAMR,EAAEJ,OACZ,CAEL,MAAMd,EAAIkB,EAAEM,WACRxB,EAAE2B,UAAUC,SAAS,YAAc5B,EAAEc,KAAIW,EAAEC,KAAO,IAAM1B,EAAEc,GAChE,CACAE,EAAEM,YAAYG,GACdR,EAAKF,KAEFL,EAAIc,WAAY,CAEnB,MAAMK,EAAS/B,EAAEG,cAAc,UAC/B4B,EAASA,EAAOC,MAAMpB,GAAOZ,EAAEiC,aAAarB,EAAKZ,EAAEkC,WACrD,CAGAtB,EAAIT,cAAc,wBAA0BS,EAAIuB,kBAAkBN,UAAUO,IAAI,WACjF,EAxDD,CAwDGC","ignoreList":[]}
1
+ {"version":3,"names":["d","b","forEach","s","querySelector","hs","querySelectorAll","map","i","join","length","li","ul","toc","getElementById","innerHTML","createElement","id","t1","p","t0","h","parseInt","tagName","replace","appendChild","j","parentNode","a","href","classList","contains","header","after","insertBefore","firstChild","firstElementChild","add","document"],"sources":["toc.js"],"mappings":"AACA,CAACA,IAEC,IAAIC,EACJ,CAAC,WAAY,UAAW,QAAS,QAAQC,QAAQC,IAC1CF,IAAGA,EAAID,EAAEI,cAAcD,MAE9B,MAAME,EAAKJ,EAAEK,iBAAiB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAAGC,IAAIC,GAAK,aAAaA,KAAKC,KAAK,MACjF,GAAkB,IAAdJ,EAAGK,OAAc,OAErB,IAQIC,EAAIC,EARJC,EAAMb,EAAEc,eAAe,QAAUd,EAAEc,eAAe,mBAClDD,EACFA,EAAIE,UAAY,IAEhBF,EAAMb,EAAEgB,cAAc,OACtBH,EAAII,GAAK,OAIX,IACIC,EADAC,EAAIN,EACAO,EAAK,EA6Bb,GA5BAf,EAAGH,QAAQmB,IAGT,GAFAH,EAAKI,SAASD,EAAEE,QAAQC,QAAQ,MAAO,KACvCb,EAAKX,EAAEgB,cAAc,MACjBE,EAAKE,EAEPR,EAAKZ,EAAEgB,cAAc,MACrBJ,EAAGa,YAAYd,GACfQ,EAAEM,YAAYb,QACT,GAAIM,EAAKE,EAEd,IAAK,IAAIM,EAAI,EAAGA,EAAIN,EAAKF,EAAIQ,IAC3BP,EAAIA,EAAEQ,WAAWA,WAGjBT,GAAME,GAAID,EAAEQ,WAAWF,YAAYd,GACvCQ,EAAIR,EACJ,MAAMiB,EAAI5B,EAAEgB,cAAc,KAE1B,GADAY,EAAEb,UAAYM,EAAEN,UACZM,EAAEJ,GACJW,EAAEC,KAAO,IAAMR,EAAEJ,OACZ,CAEL,MAAMd,EAAIkB,EAAEM,WACRxB,EAAE2B,UAAUC,SAAS,YAAc5B,EAAEc,KAAIW,EAAEC,KAAO,IAAM1B,EAAEc,GAChE,CACAE,EAAEM,YAAYG,GACdR,EAAKF,KAEFL,EAAIc,WAAY,CAEnB,MAAMK,EAAS/B,EAAEG,cAAc,UAC/B4B,EAASA,EAAOC,MAAMpB,GAAOZ,EAAEiC,aAAarB,EAAKZ,EAAEkC,WACrD,CAGAtB,EAAIT,cAAc,wBAA0BS,EAAIuB,kBAAkBN,UAAUO,IAAI,WACjF,EAxDD,CAwDGC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiee/utils",
3
- "version": "1.14.127",
3
+ "version": "1.14.129",
4
4
  "description": "Miscellaneous tools and utilities to manipulate HTML pages",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/purge.sh CHANGED
@@ -12,12 +12,19 @@ for i in $(git diff --name-only $tag1 $tag2 | grep -E "[.](css|js)$"); do
12
12
  fi
13
13
  done
14
14
 
15
- # wait (up to ~10 min) for the new version to show up on jsdelivr
16
- url="https://cdn.jsdelivr.net/npm/@xiee/utils@${tag2}/"
17
- for i in $(seq 20); do
18
- echo "checking: $url"
19
- sleep 30
20
- curl -sSfL "$url" | grep "${tag2#v}" >/dev/null && exit 0
21
- done
22
- echo "${tag2} not available on jsdelivr" >&2
23
- exit 1
15
+ # wait (up to ~10 min) until the URL's response contains the new version
16
+ wait_for() {
17
+ for i in $(seq 20); do
18
+ echo "checking: $1"
19
+ sleep 30
20
+ curl -sSfL "$1" | grep "$2" >/dev/null && return 0
21
+ done
22
+ echo "${tag2} not available on jsdelivr ($1)" >&2
23
+ exit 1
24
+ }
25
+
26
+ ver="${tag2#v}"
27
+ # 1. the package listing at the new version
28
+ wait_for "https://cdn.jsdelivr.net/npm/@xiee/utils@${tag2}/" "$ver"
29
+ # 2. the API, so that the latest version resolves to the new one
30
+ wait_for "https://data.jsdelivr.com/v1/packages/npm/@xiee/utils/resolved?specifier=latest" "\"version\":[[:space:]]*\"$ver\""