@internetarchive/bookreader 5.0.0-117 → 5.0.0-118-alpha2

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.
Files changed (196) hide show
  1. package/package.json +8 -8
  2. package/src/plugins/tts/plugin.tts.js +24 -0
  3. package/BookReader/474.js +0 -2
  4. package/BookReader/474.js.map +0 -1
  5. package/BookReader/BookReader.css +0 -2451
  6. package/BookReader/BookReader.js +0 -3
  7. package/BookReader/BookReader.js.LICENSE.txt +0 -72
  8. package/BookReader/BookReader.js.map +0 -1
  9. package/BookReader/bergamot-translator-worker.js +0 -2966
  10. package/BookReader/bergamot-translator-worker.wasm +0 -0
  11. package/BookReader/hypothesis/LICENSE +0 -50
  12. package/BookReader/hypothesis/README.md +0 -55
  13. package/BookReader/hypothesis/build/boot.js +0 -1
  14. package/BookReader/hypothesis/build/manifest.json +0 -20
  15. package/BookReader/hypothesis/build/scripts/annotator.bundle.js +0 -184
  16. package/BookReader/hypothesis/build/scripts/annotator.bundle.js.map +0 -1
  17. package/BookReader/hypothesis/build/scripts/sidebar.bundle.js +0 -798
  18. package/BookReader/hypothesis/build/scripts/sidebar.bundle.js.map +0 -1
  19. package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js +0 -711
  20. package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js.map +0 -1
  21. package/BookReader/hypothesis/build/styles/annotator.css +0 -2235
  22. package/BookReader/hypothesis/build/styles/annotator.css.map +0 -1
  23. package/BookReader/hypothesis/build/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  24. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  25. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  26. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  27. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  28. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
  29. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  30. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
  31. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
  32. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  33. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
  34. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  35. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  36. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  37. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
  38. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  39. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  40. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  41. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  42. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  43. package/BookReader/hypothesis/build/styles/highlights.css +0 -2
  44. package/BookReader/hypothesis/build/styles/highlights.css.map +0 -1
  45. package/BookReader/hypothesis/build/styles/katex.min.css +0 -2
  46. package/BookReader/hypothesis/build/styles/katex.min.css.map +0 -1
  47. package/BookReader/hypothesis/build/styles/pdfjs-overrides.css +0 -2
  48. package/BookReader/hypothesis/build/styles/pdfjs-overrides.css.map +0 -1
  49. package/BookReader/hypothesis/build/styles/sidebar.css +0 -2731
  50. package/BookReader/hypothesis/build/styles/sidebar.css.map +0 -1
  51. package/BookReader/hypothesis/build/styles/ui-playground.css +0 -2659
  52. package/BookReader/hypothesis/build/styles/ui-playground.css.map +0 -1
  53. package/BookReader/hypothesis/package.json +0 -126
  54. package/BookReader/ia-bookreader-bundle.js +0 -1886
  55. package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +0 -19
  56. package/BookReader/ia-bookreader-bundle.js.map +0 -1
  57. package/BookReader/icons/1up.svg +0 -1
  58. package/BookReader/icons/2up.svg +0 -1
  59. package/BookReader/icons/advance.svg +0 -3
  60. package/BookReader/icons/chevron-right.svg +0 -1
  61. package/BookReader/icons/close-circle-dark.svg +0 -1
  62. package/BookReader/icons/close-circle.svg +0 -1
  63. package/BookReader/icons/fullscreen.svg +0 -1
  64. package/BookReader/icons/fullscreen_exit.svg +0 -1
  65. package/BookReader/icons/hamburger.svg +0 -1
  66. package/BookReader/icons/left-arrow.svg +0 -1
  67. package/BookReader/icons/magnify-minus.svg +0 -1
  68. package/BookReader/icons/magnify-plus.svg +0 -1
  69. package/BookReader/icons/magnify.svg +0 -1
  70. package/BookReader/icons/pause.svg +0 -1
  71. package/BookReader/icons/play.svg +0 -1
  72. package/BookReader/icons/playback-speed.svg +0 -1
  73. package/BookReader/icons/read-aloud.svg +0 -1
  74. package/BookReader/icons/review.svg +0 -3
  75. package/BookReader/icons/slider-toggle.svg +0 -1
  76. package/BookReader/icons/thumbnails.svg +0 -1
  77. package/BookReader/icons/voice.svg +0 -1
  78. package/BookReader/icons/volume-full.svg +0 -1
  79. package/BookReader/images/BRicons.png +0 -0
  80. package/BookReader/images/BRicons.svg +0 -5
  81. package/BookReader/images/BRicons_ia.png +0 -0
  82. package/BookReader/images/back_pages.png +0 -0
  83. package/BookReader/images/book_bottom_icon.png +0 -0
  84. package/BookReader/images/book_down_icon.png +0 -0
  85. package/BookReader/images/book_left_icon.png +0 -0
  86. package/BookReader/images/book_leftmost_icon.png +0 -0
  87. package/BookReader/images/book_right_icon.png +0 -0
  88. package/BookReader/images/book_rightmost_icon.png +0 -0
  89. package/BookReader/images/book_top_icon.png +0 -0
  90. package/BookReader/images/book_up_icon.png +0 -0
  91. package/BookReader/images/books_graphic.svg +0 -1
  92. package/BookReader/images/booksplit.png +0 -0
  93. package/BookReader/images/control_pause_icon.png +0 -0
  94. package/BookReader/images/control_play_icon.png +0 -0
  95. package/BookReader/images/embed_icon.png +0 -0
  96. package/BookReader/images/hypothesis.ico +0 -0
  97. package/BookReader/images/icon-home-ia.png +0 -0
  98. package/BookReader/images/icon_OL-logo-xs.png +0 -0
  99. package/BookReader/images/icon_alert-xs.png +0 -0
  100. package/BookReader/images/icon_book.svg +0 -1
  101. package/BookReader/images/icon_bookmark.svg +0 -1
  102. package/BookReader/images/icon_close-pop.png +0 -0
  103. package/BookReader/images/icon_download.png +0 -0
  104. package/BookReader/images/icon_experiment.svg +0 -1
  105. package/BookReader/images/icon_gear.svg +0 -1
  106. package/BookReader/images/icon_hamburger.svg +0 -1
  107. package/BookReader/images/icon_home.png +0 -0
  108. package/BookReader/images/icon_home.svg +0 -1
  109. package/BookReader/images/icon_home_ia.png +0 -0
  110. package/BookReader/images/icon_indicator.png +0 -0
  111. package/BookReader/images/icon_info.svg +0 -1
  112. package/BookReader/images/icon_one_page.svg +0 -1
  113. package/BookReader/images/icon_pause.svg +0 -1
  114. package/BookReader/images/icon_play.svg +0 -1
  115. package/BookReader/images/icon_playback-rate.svg +0 -1
  116. package/BookReader/images/icon_return.png +0 -0
  117. package/BookReader/images/icon_search_button.svg +0 -1
  118. package/BookReader/images/icon_share.svg +0 -1
  119. package/BookReader/images/icon_skip-ahead.svg +0 -1
  120. package/BookReader/images/icon_skip-back.svg +0 -2
  121. package/BookReader/images/icon_speaker.svg +0 -1
  122. package/BookReader/images/icon_speaker_open.svg +0 -1
  123. package/BookReader/images/icon_thumbnails.svg +0 -1
  124. package/BookReader/images/icon_toc.svg +0 -1
  125. package/BookReader/images/icon_two_pages.svg +0 -1
  126. package/BookReader/images/icon_zoomer.png +0 -0
  127. package/BookReader/images/loading.gif +0 -0
  128. package/BookReader/images/logo_icon.png +0 -0
  129. package/BookReader/images/marker_chap-off.png +0 -0
  130. package/BookReader/images/marker_chap-off.svg +0 -1
  131. package/BookReader/images/marker_chap-off_ia.png +0 -0
  132. package/BookReader/images/marker_chap-on.png +0 -0
  133. package/BookReader/images/marker_chap-on.svg +0 -1
  134. package/BookReader/images/marker_srch-on.svg +0 -1
  135. package/BookReader/images/marker_srchchap-off.png +0 -0
  136. package/BookReader/images/marker_srchchap-on.png +0 -0
  137. package/BookReader/images/nav_control-dn.png +0 -0
  138. package/BookReader/images/nav_control-dn_ia.png +0 -0
  139. package/BookReader/images/nav_control-up.png +0 -0
  140. package/BookReader/images/nav_control-up_ia.png +0 -0
  141. package/BookReader/images/nav_control.png +0 -0
  142. package/BookReader/images/one_page_mode_icon.png +0 -0
  143. package/BookReader/images/paper-badge.png +0 -0
  144. package/BookReader/images/print_icon.png +0 -0
  145. package/BookReader/images/progressbar.gif +0 -0
  146. package/BookReader/images/right_edges.png +0 -0
  147. package/BookReader/images/slider.png +0 -0
  148. package/BookReader/images/slider_ia.png +0 -0
  149. package/BookReader/images/thumbnail_mode_icon.png +0 -0
  150. package/BookReader/images/translate.svg +0 -1
  151. package/BookReader/images/transparent.png +0 -0
  152. package/BookReader/images/two_page_mode_icon.png +0 -0
  153. package/BookReader/images/unviewable_page.png +0 -0
  154. package/BookReader/images/zoom_in_icon.png +0 -0
  155. package/BookReader/images/zoom_out_icon.png +0 -0
  156. package/BookReader/jquery-3.js +0 -2
  157. package/BookReader/jquery-3.js.LICENSE.txt +0 -24
  158. package/BookReader/plugins/plugin.archive_analytics.js +0 -2
  159. package/BookReader/plugins/plugin.archive_analytics.js.map +0 -1
  160. package/BookReader/plugins/plugin.autoplay.js +0 -2
  161. package/BookReader/plugins/plugin.autoplay.js.map +0 -1
  162. package/BookReader/plugins/plugin.chapters.js +0 -23
  163. package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +0 -1
  164. package/BookReader/plugins/plugin.chapters.js.map +0 -1
  165. package/BookReader/plugins/plugin.experiments.js +0 -3
  166. package/BookReader/plugins/plugin.experiments.js.LICENSE.txt +0 -1
  167. package/BookReader/plugins/plugin.experiments.js.map +0 -1
  168. package/BookReader/plugins/plugin.iframe.js +0 -2
  169. package/BookReader/plugins/plugin.iframe.js.map +0 -1
  170. package/BookReader/plugins/plugin.iiif.js +0 -2
  171. package/BookReader/plugins/plugin.iiif.js.map +0 -1
  172. package/BookReader/plugins/plugin.resume.js +0 -2
  173. package/BookReader/plugins/plugin.resume.js.map +0 -1
  174. package/BookReader/plugins/plugin.search.js +0 -3
  175. package/BookReader/plugins/plugin.search.js.LICENSE.txt +0 -1
  176. package/BookReader/plugins/plugin.search.js.map +0 -1
  177. package/BookReader/plugins/plugin.text_selection.js +0 -65
  178. package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +0 -1
  179. package/BookReader/plugins/plugin.text_selection.js.map +0 -1
  180. package/BookReader/plugins/plugin.translate.js +0 -199
  181. package/BookReader/plugins/plugin.translate.js.LICENSE.txt +0 -1
  182. package/BookReader/plugins/plugin.translate.js.map +0 -1
  183. package/BookReader/plugins/plugin.tts.js +0 -3
  184. package/BookReader/plugins/plugin.tts.js.LICENSE.txt +0 -29
  185. package/BookReader/plugins/plugin.tts.js.map +0 -1
  186. package/BookReader/plugins/plugin.url.js +0 -2
  187. package/BookReader/plugins/plugin.url.js.map +0 -1
  188. package/BookReader/plugins/plugin.vendor-fullscreen.js +0 -2
  189. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +0 -1
  190. package/BookReader/plugins/translator-worker.js +0 -2
  191. package/BookReader/plugins/translator-worker.js.map +0 -1
  192. package/BookReader/silence.mp3 +0 -0
  193. package/BookReader/translator-worker.js +0 -475
  194. package/BookReader/webcomponents-bundle.js +0 -3
  195. package/BookReader/webcomponents-bundle.js.LICENSE.txt +0 -9
  196. package/BookReader/webcomponents-bundle.js.map +0 -1
@@ -1,1886 +0,0 @@
1
- /*! For license information please see ia-bookreader-bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[68],{8248:function(e,t,n){var r,o=n(1635),i=n(420),a=n(9696);!function(e){e.processing="processing",e.complete="complete"}(r||(r={}));let s=class extends i.WF{constructor(){super(...arguments),this.mode="processing"}render(){return i.qy`
3
- <div class="${this.mode}">
4
- <svg
5
- viewBox="0 0 120 120"
6
- preserveAspectRatio="none"
7
- version="1.1"
8
- xmlns="http://www.w3.org/2000/svg"
9
- xmlns:xlink="http://www.w3.org/1999/xlink"
10
- aria-labelledby="indicatorTitle indicatorDescription"
11
- >
12
- <title id="indicatorTitle">Activity Indicator</title>
13
- <desc id="indicatorDescription">
14
- A rotating activity indicator with three dots in the middle.
15
- </desc>
16
- <g
17
- id="icons/check-ring---squared"
18
- stroke="none"
19
- stroke-width="1"
20
- fill="none"
21
- fill-rule="evenodd"
22
- >
23
- <path
24
- id="completed-ring"
25
- class="loaded-indicator"
26
- d="M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
27
- ></path>
28
- <polygon
29
- id="check"
30
- class="loaded-indicator"
31
- transform="translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) "
32
- points="96 85 54 85 54 65 76 64.999 76 -2 96 -2"
33
- ></polygon>
34
- <path
35
- id="activity-ring"
36
- class="activity-indicator"
37
- d="M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
38
- ></path>
39
- <g
40
- id="activity-dots"
41
- class="activity-indicator"
42
- transform="translate(40.000000, 55.000000)"
43
- >
44
- <circle id="left-dot" cx="5" cy="5" r="5"></circle>
45
- <circle id="middle-dot" cx="20" cy="5" r="5"></circle>
46
- <circle id="right-dot" cx="35" cy="5" r="5"></circle>
47
- </g>
48
- </g>
49
- </svg>
50
- </div>
51
- `}static get styles(){const e=i.AH`var(--activityIndicatorCheckmarkColor, #31A481)`,t=i.AH`var(--activityIndicatorCompletedRingColor, #31A481)`,n=i.AH`var(--activityIndicatorLoadingRingColor, #333333)`,r=i.AH`var(--activityIndicatorLoadingDotColor, #333333)`;return i.AH`
52
- #completed-ring {
53
- fill: ${t};
54
- }
55
-
56
- #check {
57
- fill: ${e};
58
- }
59
-
60
- #activity-ring {
61
- fill: ${n};
62
- }
63
-
64
- #activity-dots {
65
- fill: ${r};
66
- }
67
-
68
- .activity-indicator {
69
- opacity: 0;
70
- transition: opacity 0.25s ease-out;
71
- }
72
-
73
- .processing .activity-indicator {
74
- opacity: 1;
75
- }
76
-
77
- .loaded-indicator {
78
- opacity: 1;
79
- transition: opacity 0.25s ease-out;
80
- }
81
-
82
- .processing .loaded-indicator {
83
- opacity: 0;
84
- }
85
-
86
- .image {
87
- border: 1px solid red;
88
- display: inline-block;
89
- }
90
-
91
- .processing #activity-ring {
92
- animation: rotate 1.3s infinite linear;
93
- transform-origin: 50px 50px;
94
- transform-box: fill-box;
95
- }
96
-
97
- .processing #left-dot {
98
- opacity: 0;
99
- animation: dot 1.3s infinite;
100
- animation-delay: 0.2s;
101
- }
102
-
103
- .processing #middle-dot {
104
- opacity: 0;
105
- animation: dot 1.3s infinite;
106
- animation-delay: 0.4s;
107
- }
108
-
109
- .processing #right-dot {
110
- opacity: 0;
111
- animation: dot 1.3s infinite;
112
- animation-delay: 0.6s;
113
- }
114
-
115
- @keyframes rotate {
116
- 0% {
117
- transform: rotate(-360deg);
118
- }
119
- 100% {
120
- /* This frame is supposed to be inferred, but Safari doesn't rotate it unless we're explicit */
121
- transform: rotate(0deg);
122
- }
123
- }
124
-
125
- @keyframes dot {
126
- 0% {
127
- opacity: 0;
128
- }
129
- 25% {
130
- opacity: 1;
131
- }
132
- 100% {
133
- opacity: 0;
134
- }
135
- }
136
- `}};(0,o.Cg)([(0,a.MZ)({type:String})],s.prototype,"mode",void 0),s=(0,o.Cg)([(0,a.EM)("ia-activity-indicator")],s)},8918:function(e,t,n){var r=n(420),o=r.qy`
137
- <svg height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg">
138
- <path
139
- class="fill-color"
140
- d="m15.6111048 9.3708338-9.52237183 9.5222966-5.14363353 1.0897111c-.42296707.0896082-.83849202-.1806298-.92810097-.6035935-.02266463-.1069795-.02266463-.2175207 0-.3245001l1.08971974-5.1435929 9.52237189-9.52229656zm-10.89310224 5.9110366-2.78094924-.5403869-.67567462 3.166657.83033407.8303275 3.16668096-.6756703zm14.82724244-12.05935921c.6114418.61143705.6055516 1.6086709-.0131615 2.22737904l-2.2405581 2.24054036-4.9820147-4.98197536 2.2405581-2.24054036c.618713-.61870814 1.6159506-.62460252 2.2273925-.01316547z"
141
- fill-rule="evenodd" />
142
- </svg>
143
- `;class i extends r.WF{static get styles(){return r.AH`
144
- :host {
145
- width: var(--iconWidth, 'auto');
146
- height: var(--iconHeight, 'auto');
147
- }
148
-
149
- .fill-color {
150
- fill: var(--iconFillColor);
151
- }
152
-
153
- .stroke-color {
154
- stroke: var(--iconStrokeColor);
155
- }
156
- `}render(){return o}}customElements.define("ia-icon-edit-pencil",i)},6090:function(e,t,n){var r=n(420),o=r.qy`
157
- <svg
158
- viewBox="0 0 40 40"
159
- xmlns="http://www.w3.org/2000/svg"
160
- >
161
- <path class="fill-color" d="m10.5 17.5c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5c-1.38071187 0-2.5-1.1192881-2.5-2.5s1.11928813-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5z" fill-rule="evenodd"/>
162
- </svg>
163
- `;class i extends r.WF{static get styles(){return r.AH`
164
- :host {
165
- width: var(--iconWidth, 'auto');
166
- height: var(--iconHeight, 'auto');
167
- }
168
-
169
- .fill-color {
170
- fill: var(--iconFillColor);
171
- }
172
-
173
- .stroke-color {
174
- stroke: var(--iconStrokeColor);
175
- }
176
- `}render(){return o}}customElements.define("ia-icon-ellipses",i)},90:function(e,t,n){var r=n(420),o=r.qy`
177
- <svg
178
- viewBox="0 0 100 100"
179
- xmlns="http://www.w3.org/2000/svg"
180
- >
181
- <g class="fill-color">
182
- <path d="M70.6784759,10 L70.6784759,21.3240186 C64.5020053,21.66334 58.9104278,22.5826126 53.9037433,24.0818363 C48.8970588,25.5810601 44.8495989,27.4085163 41.7613636,29.5642049 C38.6731283,31.7198935 35.9982175,34.0552229 33.736631,36.5701929 C31.4750446,39.085163 29.8217469,41.5657574 28.776738,44.011976 C27.7317291,46.4581947 26.9173351,48.6848525 26.3335561,50.6919494 C25.7497772,52.6990464 25.4088681,54.3324462 25.3108289,55.592149 L25.2372995,57.4085163 C29.0296346,54.1661122 33.1751337,51.5524507 37.6737968,49.5675316 C42.1724599,47.5826126 46.2934492,46.3118208 50.0367647,45.7551564 C53.7800802,45.1984919 57.2571301,44.8713684 60.4679144,44.7737858 C63.6786988,44.6762031 66.1831551,44.7726769 67.9812834,45.0632069 L70.6784759,45.499002 L70.6784759,57.4051896 L100,33.3765802 L70.6784759,10 Z M76.4438503,62.4883566 L82.8609626,57.1157685 C82.9099822,57.0669772 82.9946524,57.0303837 83.1149733,57.005988 C83.2352941,56.9815924 83.4536542,56.9571967 83.7700535,56.9328011 C84.0864528,56.9084054 84.3905971,56.9449989 84.6824866,57.0425815 C84.9743761,57.1401641 85.217246,57.2854291 85.4110963,57.4783766 C85.6049465,57.671324 85.7263815,57.8409847 85.7754011,57.9873586 L85.8489305,58.2035928 L85.8489305,90 L0,90 L0,17.910845 L43.1784759,17.910845 C43.2765152,17.9596363 43.410205,18.0317143 43.5795455,18.1270792 C43.7488859,18.222444 43.9438503,18.4519849 44.1644385,18.8157019 C44.3850267,19.1794189 44.469697,19.5542249 44.4184492,19.9401198 C44.4184492,20.2794411 44.3092692,20.582169 44.0909091,20.8483034 C43.872549,21.1144378 43.6664439,21.3206919 43.4725936,21.4670659 L43.1818182,21.6134398 C40.557041,23.06609 38.2954545,24.396762 36.3970588,25.6054558 L30.7820856,29.8170326 L11.5274064,29.8170326 L11.5274064,78.1669993 L74.1811497,78.1669993 L74.1811497,65.5355955 C74.1811497,65.1009093 74.3995098,64.6407186 74.8362299,64.1550233 L76.4438503,62.4883566 Z" id="Shape"></path>
183
- </g>
184
- </svg>
185
- `;class i extends r.WF{static get styles(){return r.AH`
186
- :host {
187
- width: var(--iconWidth, 'auto');
188
- height: var(--iconHeight, 'auto');
189
- }
190
-
191
- .fill-color {
192
- fill: var(--iconFillColor);
193
- }
194
-
195
- .stroke-color {
196
- stroke: var(--iconStrokeColor);
197
- }
198
- `}render(){return o}}customElements.define("ia-icon-share",i)},4535:function(e,t,n){n.d(t,{J:function(){return o}});var r=n(6681),o=function(e){return null!=e?e:r.s6}},4844:function(e,t,n){n(2675),n(9463),n(2259),n(5700),n(3418),n(3792),n(4782),n(9572),n(2010),n(2892),n(2811),n(3851),n(1278),n(875),n(825),n(888),n(8781),n(7764),n(3500),n(2953),n(8706),n(2008),n(113),n(2062),n(9085),n(5506),n(9432),n(6099),n(7495),n(1761),n(5746);var r=n(420),o=n(1635),i=n(9696),a=(n(8598),n(1415),n(744),n(6681)),s=n(1091);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var m=(0,s.u$)(function(e){function t(e){var n,r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=p(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,[e]),e.type!==s.OA.ATTRIBUTE||"class"!==e.name||(null===(r=e.strings)||void 0===r?void 0:r.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),function(e,t){return t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(e){return" "+Object.keys(e).filter(function(t){return e[t]}).join(" ")+" "}},{key:"update",value:function(e,t){var n,r,o=this,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];if(void 0===this.it){for(var s in this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(function(e){return""!==e}))),i)i[s]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(s))&&this.it.add(s);return this.render(i)}var l=e.element.classList;for(var u in this.it.forEach(function(e){e in i||(l.remove(e),o.it.delete(e))}),i){var d=!!i[u];d===this.it.has(u)||(null===(r=this.nt)||void 0===r?void 0:r.has(u))||(d?(l.add(u),this.it.add(u)):(l.remove(u),this.it.delete(u)))}return a.c0}}])}(s.WL));function v(e){let t,n,r;return"object"==typeof e?(t=e.hashFunction,n=e.expiring,r=e.tags):t=e,(e,o,i)=>{if(null!=i.value)i.value=y(i.value,t,n,r);else{if(null==i.get)throw"Only put a Memoize() decorator on a method or get accessor.";i.get=y(i.get,t,n,r)}}}const b=new Map;function y(e,t,n=0,r){const o=Symbol("__memoized_map__");return function(...i){let a;this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:new Map});let s=this[o];if(Array.isArray(r))for(const e of r)b.has(e)?b.get(e).push(s):b.set(e,[s]);if(t||i.length>0||n>0){let r;r=!0===t?i.map(e=>e.toString()).join("!"):t?t.apply(this,i):i[0];const o=`${r}__timestamp`;let l=!1;if(n>0)if(s.has(o)){let e=s.get(o);l=Date.now()-e>n}else l=!0;s.has(r)&&!l?a=s.get(r):(a=e.apply(this,i),s.set(r,a),n>0&&s.set(o,Date.now()))}else{const t=this;s.has(t)?a=s.get(t):(a=e.apply(this,i),s.set(t,a))}return a}}class g{parseValue(e){return("string"!=typeof e||"false"!==e&&"0"!==e)&&Boolean(e)}}g.shared=new g;class k{parseValue(e){if("number"==typeof e)return e;if("boolean"==typeof e)return;const t=parseFloat(e);return Number.isNaN(t)?void 0:t}}k.shared=new k;class w{parseValue(e){return k.shared.parseValue(e)}}w.shared=new w;class C{parseValue(e){return this.parseJSDate(e)||this.parseBracketDate(e)}parseBracketDate(e){if("string"!=typeof e)return;const t=e.match(/\[([0-9]{4})\]/);return!t||t.length<2?void 0:this.parseJSDate(t[1])}parseJSDate(e){if("string"!=typeof e)return;let t=e;t.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$/)&&(t=t.replace(" ","T"));const n=Date.parse(t);if(Number.isNaN(n))return;let r=new Date(t);return(t.match(/^[0-9]{4}$/)||t.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/))&&(r=new Date(r.getTime()+1e3*r.getTimezoneOffset()*60)),r}}C.shared=new C;class x{parseValue(e){if("number"==typeof e)return e;if("boolean"==typeof e)return;const t=e.split(":");let n;return n=1===t.length?this.parseNumberFormat(t[0]):this.parseColonSeparatedFormat(t),n}parseNumberFormat(e){let t=parseFloat(e);return Number.isNaN(t)&&(t=void 0),t}parseColonSeparatedFormat(e){let t=!1;const n=e.map((n,r)=>{const o=parseFloat(n);if(Number.isNaN(o))return t=!0,0;const i=60**(e.length-1-r);return o*Math.floor(i)}).reduce((e,t)=>e+t,0);return t?void 0:n}}x.shared=new x;class S{parseValue(e){if("string"==typeof e)return e}}S.shared=new S;class O{constructor(e,t){this.separators=[";",","],this.parser=e,t&&t.separators&&(this.separators=t.separators)}parseValue(e){const t=String(e);let n=[];for(const e of this.separators)if(n=t.split(e),n.length>1)break;return this.parseListValues(n)}parseListValues(e){const t=e.map(e=>e.trim()),n=t.map(e=>this.parser.parseValue(e)),r=[];return n.forEach(e=>{void 0!==e&&r.push(e)}),r}}class M{parseValue(e){if("string"==typeof e)return e}}M.shared=new M;class B{parseValue(e){return String(e)}}B.shared=new B;class j{get name(){return this.rawValue.name}get source(){return this.rawValue.source}get btih(){return this.rawValue.btih}get md5(){return this.rawValue.md5}get format(){return this.rawValue.format}get mtime(){if(null==this.rawValue.mtime)return;const e=k.shared.parseValue(this.rawValue.mtime);return e?new Date(1e3*e):void 0}get crc32(){return this.rawValue.crc32}get sha1(){return this.rawValue.sha1}get original(){return this.rawValue.original}get size(){return null!=this.rawValue.size?w.shared.parseValue(this.rawValue.size):void 0}get title(){return this.rawValue.title}get length(){return null!=this.rawValue.length?x.shared.parseValue(this.rawValue.length):void 0}get height(){return null!=this.rawValue.height?k.shared.parseValue(this.rawValue.height):void 0}get width(){return null!=this.rawValue.width?k.shared.parseValue(this.rawValue.width):void 0}get track(){return null!=this.rawValue.track?k.shared.parseValue(this.rawValue.track):void 0}get external_identifier(){return this.rawValue.external_identifier}get creator(){return this.rawValue.creator}get album(){return this.rawValue.album}constructor(e={}){this.rawValue=e}}(0,o.Cg)([v()],j.prototype,"mtime",null),(0,o.Cg)([v()],j.prototype,"size",null),(0,o.Cg)([v()],j.prototype,"length",null),(0,o.Cg)([v()],j.prototype,"height",null),(0,o.Cg)([v()],j.prototype,"width",null),(0,o.Cg)([v()],j.prototype,"track",null);class P{get values(){return this.parseRawValue()}get value(){return this.values[0]}constructor(e,t){this.parser=e,this.rawValue=t}parseRawValue(){const e=Array.isArray(this.rawValue)?this.rawValue:[this.rawValue],t=[];return e.forEach(e=>{const n=this.parser.parseValue(e);Array.isArray(n)?t.push(...n):void 0!==n&&t.push(n)}),t}}(0,o.Cg)([v()],P.prototype,"values",null),(0,o.Cg)([v()],P.prototype,"value",null);class E extends P{constructor(e){super(g.shared,e)}}class L extends P{constructor(e){super(C.shared,e)}}class A extends P{constructor(e){super(x.shared,e)}}class _ extends P{constructor(e){super(k.shared,e)}}class z extends P{constructor(e){super(B.shared,e)}}class T extends P{constructor(e){super(M.shared,e)}}class $ extends P{constructor(e){super(w.shared,e)}}class H extends P{constructor(e){super(S.shared,e)}}class I extends P{constructor(e,t){super(t,e)}}class q extends I{constructor(e){super(e,new O(B.shared))}}class R{get identifier(){return this.rawMetadata.identifier}get addeddate(){return null!=this.rawMetadata.addeddate?new L(this.rawMetadata.addeddate):void 0}get audio_codec(){return null!=this.rawMetadata.audio_codec?new z(this.rawMetadata.audio_codec):void 0}get audio_sample_rate(){return null!=this.rawMetadata.audio_sample_rate?new _(this.rawMetadata.audio_sample_rate):void 0}get avg_rating(){return null!=this.rawMetadata.avg_rating?new _(this.rawMetadata.avg_rating):void 0}get collection(){return null!=this.rawMetadata.collection?new z(this.rawMetadata.collection):void 0}get collections_raw(){return null!=this.rawMetadata.collections_raw?new z(this.rawMetadata.collections_raw):void 0}get collection_size(){return null!=this.rawMetadata.collection_size?new $(this.rawMetadata.collection_size):void 0}get contact(){return null!=this.rawMetadata.contact?new z(this.rawMetadata.contact):void 0}get contributor(){return null!=this.rawMetadata.contributor?new z(this.rawMetadata.contributor):void 0}get coverage(){return null!=this.rawMetadata.coverage?new z(this.rawMetadata.coverage):void 0}get creator(){return null!=this.rawMetadata.creator?new z(this.rawMetadata.creator):void 0}get creator_alt_script(){return null!=this.rawMetadata["creator-alt-script"]?new z(this.rawMetadata["creator-alt-script"]):void 0}get credits(){return null!=this.rawMetadata.credits?new z(this.rawMetadata.credits):void 0}get collection_layout(){return null!=this.rawMetadata.collection_layout?new z(this.rawMetadata.collection_layout):void 0}get date(){return null!=this.rawMetadata.date?new L(this.rawMetadata.date):void 0}get description(){return null!=this.rawMetadata.description?new z(this.rawMetadata.description):void 0}get downloads(){return null!=this.rawMetadata.downloads?new _(this.rawMetadata.downloads):void 0}get duration(){return null!=this.rawMetadata.duration?new A(this.rawMetadata.duration):void 0}get external_identifier(){return null!=this.rawMetadata["external-identifier"]?new z(this.rawMetadata["external-identifier"]):void 0}get external_link(){return null!=this.rawMetadata["external-link"]?new z(this.rawMetadata["external-link"]):void 0}get files_count(){return null!=this.rawMetadata.files_count?new _(this.rawMetadata.files_count):void 0}get indexdate(){return null!=this.rawMetadata.indexdate?new L(this.rawMetadata.indexdate):void 0}get isbn(){return null!=this.rawMetadata.isbn?new z(this.rawMetadata.isbn):void 0}get issue(){return null!=this.rawMetadata.issue?new z(this.rawMetadata.issue):void 0}get item_count(){return null!=this.rawMetadata.item_count?new _(this.rawMetadata.item_count):void 0}get item_size(){return null!=this.rawMetadata.item_size?new $(this.rawMetadata.item_size):void 0}get language(){return null!=this.rawMetadata.language?new z(this.rawMetadata.language):void 0}get length(){return null!=this.rawMetadata.length?new A(this.rawMetadata.length):void 0}get licenseurl(){return null!=this.rawMetadata.licenseurl?new z(this.rawMetadata.licenseurl):void 0}get lineage(){return null!=this.rawMetadata.lineage?new z(this.rawMetadata.lineage):void 0}get month(){return null!=this.rawMetadata.month?new _(this.rawMetadata.month):void 0}get mediatype(){return null!=this.rawMetadata.mediatype?new H(this.rawMetadata.mediatype):void 0}get noindex(){return null!=this.rawMetadata.noindex?new E(this.rawMetadata.noindex):void 0}get notes(){return null!=this.rawMetadata.notes?new z(this.rawMetadata.notes):void 0}get num_favorites(){return null!=this.rawMetadata.num_favorites?new _(this.rawMetadata.num_favorites):void 0}get num_reviews(){return null!=this.rawMetadata.num_reviews?new _(this.rawMetadata.num_reviews):void 0}get openlibrary_edition(){return null!=this.rawMetadata.openlibrary_edition?new z(this.rawMetadata.openlibrary_edition):void 0}get openlibrary_work(){return null!=this.rawMetadata.openlibrary_work?new z(this.rawMetadata.openlibrary_work):void 0}get page_progression(){return null!=this.rawMetadata.page_progression?new T(this.rawMetadata.page_progression):void 0}get paginated(){return null!=this.rawMetadata.paginated?new E(this.rawMetadata.paginated):void 0}get partner(){return null!=this.rawMetadata.partner?new z(this.rawMetadata.partner):void 0}get post_text(){return null!=this.rawMetadata.post_text?new z(this.rawMetadata.post_text):void 0}get ppi(){return null!=this.rawMetadata.ppi?new _(this.rawMetadata.ppi):void 0}get publicdate(){return null!=this.rawMetadata.publicdate?new L(this.rawMetadata.publicdate):void 0}get publisher(){return null!=this.rawMetadata.publisher?new z(this.rawMetadata.publisher):void 0}get reviewdate(){return null!=this.rawMetadata.reviewdate?new L(this.rawMetadata.reviewdate):void 0}get rights(){return null!=this.rawMetadata.rights?new z(this.rawMetadata.rights):void 0}get rights_holder(){var e;const t=null!==(e=this.rawMetadata["rights-holder"])&&void 0!==e?e:this.rawMetadata.rights_holder;return null!=t?new z(t):void 0}get runtime(){return null!=this.rawMetadata.runtime?new A(this.rawMetadata.runtime):void 0}get scanner(){return null!=this.rawMetadata.scanner?new z(this.rawMetadata.scanner):void 0}get segments(){return null!=this.rawMetadata.segments?new z(this.rawMetadata.segments):void 0}get shotlist(){return null!=this.rawMetadata.shotlist?new z(this.rawMetadata.shotlist):void 0}get source(){return null!=this.rawMetadata.source?new z(this.rawMetadata.source):void 0}get sponsor(){return null!=this.rawMetadata.sponsor?new z(this.rawMetadata.sponsor):void 0}get start_localtime(){return null!=this.rawMetadata.start_localtime?new L(this.rawMetadata.start_localtime):void 0}get start_time(){return null!=this.rawMetadata.start_time?new L(this.rawMetadata.start_time):void 0}get stop_time(){return null!=this.rawMetadata.stop_time?new L(this.rawMetadata.stop_time):void 0}get subject(){return null!=this.rawMetadata.subject?new q(this.rawMetadata.subject):void 0}get taper(){return null!=this.rawMetadata.taper?new z(this.rawMetadata.taper):void 0}get title(){return null!=this.rawMetadata.title?new z(this.rawMetadata.title):void 0}get title_alt_script(){return null!=this.rawMetadata["title-alt-script"]?new z(this.rawMetadata["title-alt-script"]):void 0}get transferer(){return null!=this.rawMetadata.transferer?new z(this.rawMetadata.transferer):void 0}get track(){return null!=this.rawMetadata.track?new _(this.rawMetadata.track):void 0}get type(){return null!=this.rawMetadata.type?new z(this.rawMetadata.type):void 0}get uploader(){return null!=this.rawMetadata.uploader?new z(this.rawMetadata.uploader):void 0}get utc_offset(){return null!=this.rawMetadata.utc_offset?new _(this.rawMetadata.utc_offset):void 0}get venue(){return null!=this.rawMetadata.venue?new z(this.rawMetadata.venue):void 0}get volume(){return null!=this.rawMetadata.volume?new z(this.rawMetadata.volume):void 0}get week(){return null!=this.rawMetadata.week?new _(this.rawMetadata.week):void 0}get year(){return null!=this.rawMetadata.year?new _(this.rawMetadata.year):void 0}constructor(e={}){this.rawMetadata=e}}(0,o.Cg)([v()],R.prototype,"addeddate",null),(0,o.Cg)([v()],R.prototype,"audio_codec",null),(0,o.Cg)([v()],R.prototype,"audio_sample_rate",null),(0,o.Cg)([v()],R.prototype,"avg_rating",null),(0,o.Cg)([v()],R.prototype,"collection",null),(0,o.Cg)([v()],R.prototype,"collections_raw",null),(0,o.Cg)([v()],R.prototype,"collection_size",null),(0,o.Cg)([v()],R.prototype,"contact",null),(0,o.Cg)([v()],R.prototype,"contributor",null),(0,o.Cg)([v()],R.prototype,"coverage",null),(0,o.Cg)([v()],R.prototype,"creator",null),(0,o.Cg)([v()],R.prototype,"creator_alt_script",null),(0,o.Cg)([v()],R.prototype,"credits",null),(0,o.Cg)([v()],R.prototype,"collection_layout",null),(0,o.Cg)([v()],R.prototype,"date",null),(0,o.Cg)([v()],R.prototype,"description",null),(0,o.Cg)([v()],R.prototype,"downloads",null),(0,o.Cg)([v()],R.prototype,"duration",null),(0,o.Cg)([v()],R.prototype,"external_identifier",null),(0,o.Cg)([v()],R.prototype,"external_link",null),(0,o.Cg)([v()],R.prototype,"files_count",null),(0,o.Cg)([v()],R.prototype,"indexdate",null),(0,o.Cg)([v()],R.prototype,"isbn",null),(0,o.Cg)([v()],R.prototype,"issue",null),(0,o.Cg)([v()],R.prototype,"item_count",null),(0,o.Cg)([v()],R.prototype,"item_size",null),(0,o.Cg)([v()],R.prototype,"language",null),(0,o.Cg)([v()],R.prototype,"length",null),(0,o.Cg)([v()],R.prototype,"licenseurl",null),(0,o.Cg)([v()],R.prototype,"lineage",null),(0,o.Cg)([v()],R.prototype,"month",null),(0,o.Cg)([v()],R.prototype,"mediatype",null),(0,o.Cg)([v()],R.prototype,"noindex",null),(0,o.Cg)([v()],R.prototype,"notes",null),(0,o.Cg)([v()],R.prototype,"num_favorites",null),(0,o.Cg)([v()],R.prototype,"num_reviews",null),(0,o.Cg)([v()],R.prototype,"openlibrary_edition",null),(0,o.Cg)([v()],R.prototype,"openlibrary_work",null),(0,o.Cg)([v()],R.prototype,"page_progression",null),(0,o.Cg)([v()],R.prototype,"paginated",null),(0,o.Cg)([v()],R.prototype,"partner",null),(0,o.Cg)([v()],R.prototype,"post_text",null),(0,o.Cg)([v()],R.prototype,"ppi",null),(0,o.Cg)([v()],R.prototype,"publicdate",null),(0,o.Cg)([v()],R.prototype,"publisher",null),(0,o.Cg)([v()],R.prototype,"reviewdate",null),(0,o.Cg)([v()],R.prototype,"rights",null),(0,o.Cg)([v()],R.prototype,"rights_holder",null),(0,o.Cg)([v()],R.prototype,"runtime",null),(0,o.Cg)([v()],R.prototype,"scanner",null),(0,o.Cg)([v()],R.prototype,"segments",null),(0,o.Cg)([v()],R.prototype,"shotlist",null),(0,o.Cg)([v()],R.prototype,"source",null),(0,o.Cg)([v()],R.prototype,"sponsor",null),(0,o.Cg)([v()],R.prototype,"start_localtime",null),(0,o.Cg)([v()],R.prototype,"start_time",null),(0,o.Cg)([v()],R.prototype,"stop_time",null),(0,o.Cg)([v()],R.prototype,"subject",null),(0,o.Cg)([v()],R.prototype,"taper",null),(0,o.Cg)([v()],R.prototype,"title",null),(0,o.Cg)([v()],R.prototype,"title_alt_script",null),(0,o.Cg)([v()],R.prototype,"transferer",null),(0,o.Cg)([v()],R.prototype,"track",null),(0,o.Cg)([v()],R.prototype,"type",null),(0,o.Cg)([v()],R.prototype,"uploader",null),(0,o.Cg)([v()],R.prototype,"utc_offset",null),(0,o.Cg)([v()],R.prototype,"venue",null),(0,o.Cg)([v()],R.prototype,"volume",null),(0,o.Cg)([v()],R.prototype,"week",null),(0,o.Cg)([v()],R.prototype,"year",null);class F{get reviewbody(){return this.rawValue.reviewbody}get reviewtitle(){return this.rawValue.reviewtitle}get reviewer(){return this.rawValue.reviewer}get reviewer_itemname(){return this.rawValue.reviewer_itemname}get reviewdate(){return null!=this.rawValue.reviewdate?C.shared.parseValue(this.rawValue.reviewdate):void 0}get createdate(){return null!=this.rawValue.createdate?C.shared.parseValue(this.rawValue.createdate):void 0}get stars(){return null!=this.rawValue.stars?k.shared.parseValue(this.rawValue.stars):void 0}constructor(e={}){this.rawValue=e}}(0,o.Cg)([v()],F.prototype,"reviewdate",null),(0,o.Cg)([v()],F.prototype,"createdate",null),(0,o.Cg)([v()],F.prototype,"stars",null);class D{constructor(e){var t,n;this.rawResponse=e,this.created=e.created,this.d1=e.d1,this.d2=e.d2,this.dir=e.dir,this.files=null===(t=e.files)||void 0===t?void 0:t.map(e=>new j(e)),this.files_count=e.files_count,this.item_last_updated=e.item_last_updated,this.item_size=e.item_size,this.metadata=new R(e.metadata),this.server=e.server,this.uniq=e.uniq,this.workable_servers=e.workable_servers,this.speech_vs_music_asr=e.speech_vs_music_asr,this.reviews=null===(n=e.reviews)||void 0===n?void 0:n.map(e=>new F(e))}}var W;!function(e){e.networkError="MetadataService.NetworkError",e.itemNotFound="MetadataService.ItemNotFound",e.decodingError="MetadataService.DecodingError",e.searchEngineError="MetadataService.SearchEngineError"}(W||(W={}));class V extends Error{constructor(e,t,n){super(t),this.name=e,this.type=e,this.details=n}}class N{constructor(e){this.backend=e}async fetchMetadata(e){var t;const n=await this.backend.fetchMetadata(e);return n.error?n:void 0===(null===(t=n.success)||void 0===t?void 0:t.metadata)?{error:new V(W.itemNotFound)}:{success:new D(n.success)}}async fetchMetadataValue(e,t){var n;const r=await this.backend.fetchMetadata(e,t);return r.error?r:void 0===(null===(n=r.success)||void 0===n?void 0:n.result)?{error:new V(W.itemNotFound)}:{success:r.success.result}}}N.default=new N(new class{constructor(e){var t;if(this.baseUrl=null!==(t=null==e?void 0:e.baseUrl)&&void 0!==t?t:"archive.org",void 0!==(null==e?void 0:e.includeCredentials)?this.includeCredentials=e.includeCredentials:this.includeCredentials=null!==window.location.href.match(/^https?:\/\/.*archive\.org(:[0-9]+)?/),void 0!==(null==e?void 0:e.scope))this.requestScope=e.scope;else{const e=new URL(window.location.href).searchParams.get("scope");e&&(this.requestScope=e)}}async fetchMetadata(e,t){const n=t?`/${t}`:"",r=`https://${this.baseUrl}/metadata/${e}${n}`;return this.fetchUrl(r,{requestOptions:{credentials:"omit"}})}async fetchUrl(e,t){var n;const r=new URL(e);let o;this.requestScope&&r.searchParams.set("scope",this.requestScope);try{const e=null!==(n=null==t?void 0:t.requestOptions)&&void 0!==n?n:{credentials:this.includeCredentials?"include":"same-origin"};o=await fetch(r.href,e)}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:"Unknown error";return this.getErrorResult(W.networkError,t)}try{const e=await o.json(),t=e.error;if(t){const n=e.forensics;return this.getErrorResult(W.searchEngineError,t,n)}return{success:e}}catch(e){const t=e instanceof Error?e.message:"string"==typeof e?e:"Unknown error";return this.getErrorResult(W.decodingError,t)}}getErrorResult(e,t,n){return{error:new V(e,t,n)}}}),n(6090);const Z=r.AH`42px`,U=r.AH`var(--menuWidth, 320px)`,G=r.AH`var(--animationTiming, 200ms)`;var J=r.AH`
199
- .main {
200
- overflow: hidden;
201
- width: 100%;
202
- height: 100%;
203
- }
204
-
205
- .animate {
206
- transition: transform ${G} ease-out;
207
- }
208
-
209
- .menu {
210
- position: absolute;
211
- top: 0;
212
- left: 0;
213
- bottom: 0;
214
- width: ${U};
215
- padding: 0.5rem 0.5rem 0 0;
216
- box-sizing: border-box;
217
- font-size: 1.4rem;
218
- color: var(--primaryTextColor);
219
- background: var(--menuSliderBg);
220
- transform: translateX(calc(${U} * -1));
221
- }
222
-
223
- button {
224
- cursor: pointer;
225
- }
226
-
227
- header {
228
- margin: 0 0 0.5rem 0;
229
- }
230
-
231
- header * {
232
- margin: 0;
233
- display: inline-block;
234
- }
235
- header button {
236
- cursor: pointer;
237
- }
238
-
239
- header.with-secondary-action .details {
240
- width: 80%;
241
- }
242
-
243
- header .details {
244
- font-weight: bold;
245
- width: 88%;
246
- }
247
-
248
- header .custom-action > *,
249
- button.close {
250
- padding: 0;
251
- background-color: transparent;
252
- border: 0;
253
- --iconWidth: var(--menuSliderHeaderIconWidth);
254
- --iconHeight: var(--menuSliderHeaderIconHeight);
255
- }
256
-
257
- header .custom-action,
258
- button.close {
259
- position: absolute;
260
- }
261
- button.close {
262
- min-width: 38px;
263
- min-height: 38px;
264
- display: flex;
265
- justify-content: center;
266
- align-items: center;
267
- right: 0;
268
- top: 0;
269
- }
270
-
271
- .content {
272
- position: absolute;
273
- top: 0;
274
- right: 0;
275
- bottom: 0;
276
- left: ${Z};
277
- z-index: 1;
278
- transform: translateX(calc(${U} * -1));
279
- transition: transform ${G} ease-out;
280
- background: var(--activeButtonBg);
281
- border-right: 0.2rem solid;
282
- border-color: var(--subpanelRightBorderColor);
283
- padding: 0.5rem 0 0 0.5rem;
284
- display: flex;
285
- flex-direction: column;
286
- }
287
-
288
- .open {
289
- transform: translateX(0);
290
- }
291
-
292
- .menu-list {
293
- padding: 0;
294
- margin: 0;
295
- list-style: none;
296
- background: var(--menuSliderBg);
297
- }
298
- .menu-list li {
299
- margin-bottom: 0.2rem;
300
- }
301
-
302
- .content > section {
303
- overflow: auto;
304
- overscroll-behavior: contain;
305
- }
306
- `,X=r.qy`
307
- <svg
308
- viewBox="0 0 18 18"
309
- xmlns="http://www.w3.org/2000/svg"
310
- >
311
- <path d="m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm1.6976167 5.28352881c-.365258-.3556459-.9328083-.37581056-1.32099801-.06558269l-.09308988.0844372-3 3.08108108-.08194436.09533317c-.27484337.36339327-.26799482.87009349.01656959 1.22592581l.084491.09308363 3 2.91891889.09533796.0818904c.3633964.2746544.8699472.2677153 1.2256839-.0167901l.093059-.0844712.0818904-.095338c.2746544-.3633964.2677153-.8699472-.0167901-1.2256839l-.0844712-.093059-2.283355-2.2222741 2.3024712-2.36338332.0819252-.09530804c.2997677-.39632298.2644782-.96313393-.1007797-1.31877983z" fill-rule="evenodd" class="fill-color" />
312
- </svg>
313
- `;class K extends r.WF{static get styles(){return r.AH`
314
- :host {
315
- width: var(--iconWidth, 'auto');
316
- height: var(--iconHeight, 'auto');
317
- }
318
-
319
- .fill-color {
320
- fill: var(--iconFillColor);
321
- }
322
-
323
- .stroke-color {
324
- stroke: var(--iconStrokeColor);
325
- }
326
- `}render(){return X}}customElements.define("ia-icon-collapse-sidebar",K);var Q=r.AH`
327
- a {
328
- display: inline-block;
329
- text-decoration: none;
330
- }
331
-
332
- button.menu-item {
333
- -webkit-appearance: none;
334
- appearance: none;
335
- }
336
-
337
- .menu-item {
338
- display: inline-flex;
339
- width: 100%;
340
- padding: 0;
341
- font-size: 1.6rem;
342
- text-align: left;
343
- background: transparent;
344
- -webkit-box-align: center;
345
- -ms-flex-align: center;
346
- align-items: center;
347
- border: none;
348
- cursor: pointer;
349
- transition: background-color 0.2s;
350
- border-radius: 6px;
351
- }
352
-
353
- .menu-item:hover {
354
- background-color: rgba(255, 255, 255, 0.1);
355
- }
356
-
357
- .label {
358
- display: var(--menuButtonLabelDisplay, none);
359
- padding: 0;
360
- font-weight: 400;
361
- color: var(--primaryTextColor);
362
- text-align: left;
363
- vertical-align: middle;
364
- margin-left: 1rem;
365
- }
366
-
367
- .menu-details {
368
- color: var(--primaryTextColor);
369
- display: inline-block;
370
- margin-left: 0.5rem;
371
- font-style: italic;
372
- font-size: 1.5rem;
373
- }
374
-
375
- .menu-item > .icon {
376
- position: relative;
377
- display: inline-flex;
378
- z-index: 2;
379
- min-width: 4.2rem;
380
- max-width: 4.2rem;
381
- height: 4.2rem;
382
- vertical-align: middle;
383
- -webkit-box-align: center;
384
- -ms-flex-align: center;
385
- align-items: center;
386
- -webkit-box-pack: center;
387
- -ms-flex-pack: center;
388
- justify-content: center;
389
- }
390
-
391
- .menu-item > .icon > * {
392
- /* Prevent tooltip containing icon literal description */
393
- pointer-events: none;
394
- }
395
-
396
- .menu-item[aria-expanded='true'] .icon {
397
- background-color: var(--activeButtonBg);
398
- border-radius: 1rem 0 0 1rem;
399
- }
400
-
401
- .icon .fill-color {
402
- fill: #999;
403
- }
404
-
405
- .icon.active .fill-color {
406
- fill: #fff;
407
- }
408
- `;let Y=class extends r.WF{constructor(){super(...arguments),this.icon="",this.href="",this.label="",this.menuDetails="",this.buttonId="",this.selected=!1,this.followable=!1}static get styles(){return Q}onClick(e){e.preventDefault(),this.dispatchMenuTypeSelectedEvent()}dispatchMenuTypeSelectedEvent(){this.dispatchEvent(new CustomEvent("menuTypeSelected",{bubbles:!0,composed:!0,detail:{id:this.buttonId}}))}get iconClass(){return this.selected?"active":""}get menuItem(){return r.qy`
409
- <span
410
- class="icon ${this.iconClass}"
411
- aria-hidden="true"
412
- title="${this.label}"
413
- >${this.icon}</span
414
- >
415
- <span class="label">${this.label}</span>
416
- <span class="menu-details">${this.menuDetails}</span>
417
- `}get linkButton(){return r.qy`
418
- <a
419
- href="${this.href}"
420
- class="menu-item"
421
- aria-expanded="${this.selected}"
422
- @click=${this.followable?void 0:this.onClick}
423
- >${this.menuItem}</a
424
- >
425
- `}get clickButton(){return r.qy`
426
- <button
427
- class="menu-item"
428
- aria-expanded="${this.selected}"
429
- @click=${this.onClick}
430
- >
431
- ${this.menuItem}
432
- </button>
433
- `}render(){return this.href?this.linkButton:this.clickButton}};Y.shadowRootOptions={...r.WF.shadowRootOptions,delegatesFocus:!0},(0,o.Cg)([(0,i.MZ)({type:Object})],Y.prototype,"icon",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],Y.prototype,"href",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],Y.prototype,"label",void 0),(0,o.Cg)([(0,i.MZ)({type:Object})],Y.prototype,"menuDetails",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],Y.prototype,"buttonId",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],Y.prototype,"selected",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],Y.prototype,"followable",void 0),Y=(0,o.Cg)([(0,i.EM)("menu-button")],Y);const ee={closeDrawer:"menuSliderClosed"};let te=class extends r.WF{constructor(){super(...arguments),this.menus=[],this.open=!1,this.manuallyHandleClose=!1,this.selectedMenu="",this.selectedMenuAction=r.s6,this.animateMenuOpen=!1}static get styles(){return J}updated(){var e;const t=(null===(e=this.selectedMenuDetails)||void 0===e?void 0:e.actionButton)||r.s6;t!==this.selectedMenuAction&&(this.selectedMenuAction=t)}setSelectedMenu({detail:e}){var t;const{id:n}=e;this.selectedMenu=this.selectedMenu===n?"":n,this.selectedMenuAction=(null===(t=this.selectedMenuDetails)||void 0===t?void 0:t.actionButton)||r.s6,this.updateComplete.then(()=>{var e;null===(e=this.contentCloseButton)||void 0===e||e.focus()})}closeMenu(){this.manuallyHandleClose||(this.open=!1);const{closeDrawer:e}=ee,t=new CustomEvent(e,{detail:this.selectedMenuDetails});this.dispatchEvent(t)}closePanel(){const e=this.selectedMenu;this.selectedMenu="",this.selectedMenuAction=r.s6,e&&this.updateComplete.then(()=>{const t=this.menus.findIndex(t=>t.id===e);if(-1!==t){const e=this.menuList.querySelector(`li:nth-child(${t+1}) menu-button`);null==e||e.focus()}})}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.selectedMenu?this.closePanel():this.closeMenu())}get selectedMenuDetails(){return this.menus.find(e=>e.id===this.selectedMenu)}get sliderDetailsClass(){return`${this.animateMenuOpen?"animate":""} ${this.open?"open":""}`}get selectedMenuClass(){return this.selectedMenu?"open":""}get menuItems(){return this.menus.map(e=>r.qy`
434
- <li>
435
- <menu-button
436
- @menuTypeSelected=${this.setSelectedMenu}
437
- .icon=${e.icon}
438
- .label=${e.label}
439
- .menuDetails=${e.menuDetails||""}
440
- .buttonId=${e.id}
441
- .selected=${e.id===this.selectedMenu}
442
- .followable=${e.followable||!1}
443
- .href=${e.href||""}
444
- ></menu-button>
445
- </li>
446
- `)}get renderMenuHeader(){const{label:e="",menuDetails:t=""}=this.selectedMenuDetails||{},n=this.selectedMenuAction?"with-secondary-action":"",o=this.selectedMenuAction?r.qy`<span class="custom-action">${this.selectedMenuAction}</span>`:r.s6;return r.qy`
447
- <header class="${n}">
448
- <div class="details">
449
- <h3>${e}</h3>
450
- <span class="extra-details">${t}</span>
451
- </div>
452
- ${o}
453
- <button
454
- class="close"
455
- aria-label="Close this menu"
456
- title="Close this menu"
457
- @click=${this.closePanel}
458
- >
459
- <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>
460
- </button>
461
- </header>
462
- `}get closeButton(){return r.qy`
463
- <button
464
- class="close"
465
- aria-label="Close this menu"
466
- title="Close this menu"
467
- @click=${this.closeMenu}
468
- >
469
- <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>
470
- </button>
471
- `}render(){var e;return r.qy`
472
- <div class="main" @keydown=${this.handleKeyDown}>
473
- <div class="menu ${this.sliderDetailsClass}">
474
- ${this.closeButton}
475
- <ul class="menu-list">
476
- ${this.menuItems}
477
- </ul>
478
- <div
479
- class="content ${this.selectedMenuClass}"
480
- @menuTypeSelected=${this.setSelectedMenu}
481
- >
482
- ${this.renderMenuHeader}
483
- <section>
484
- <div class="selected-menu">
485
- ${(null===(e=this.selectedMenuDetails)||void 0===e?void 0:e.component)||r.s6}
486
- </div>
487
- </section>
488
- </div>
489
- </div>
490
- </div>
491
- `}};(0,o.Cg)([(0,i.MZ)({type:Array})],te.prototype,"menus",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],te.prototype,"open",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],te.prototype,"manuallyHandleClose",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],te.prototype,"selectedMenu",void 0),(0,o.Cg)([(0,i.MZ)({type:Object})],te.prototype,"selectedMenuAction",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],te.prototype,"animateMenuOpen",void 0),(0,o.Cg)([(0,i.P)(".content.open button.close")],te.prototype,"contentCloseButton",void 0),(0,o.Cg)([(0,i.P)(".menu-list")],te.prototype,"menuList",void 0),te=(0,o.Cg)([(0,i.EM)("ia-menu-slider")],te);let ne=class extends r.WF{constructor(){super(...arguments),this.loaderMessage=""}get bookIconSvg(){return r.JW`
492
- <g class="bookIcon" transform="matrix(1 0 0 -1 28 67.362264)">
493
- <path d="m44.71698 31.6981124v-29.99320678s-18.0956599.30735848-18.6322637-.7171698c-.0633962-.12226414-1.890566-.59207545-2.9745282-.59207545-1.3228302 0-3.5122641 0-4.1286791.74547168-.9707547 1.17452827-18.82811278.71660375-18.82811278.71660375v30.040754l1.83849052.7867924.29094339-28.48188608s15.94981097.15339622 17.09094297-1.10716978c.8145283-.90056602 4.997547-.91641507 5.3450942-.3526415.9611321 1.55716977 14.7101883 1.31716978 17.6077354 1.45981128l.3266038 28.22830118z"/>
494
- <path d="m40.1129424 33.5957539h-12.8337733c-1.8690565 0-3.1098112-.7545283-3.9299999-1.6279245v-26.70452764l1.2362264-.00792453c.4584906.72962262 3.0922641 1.39415091 3.0922641 1.39415091h10.1298111s1.0381131.01754717 1.5141509.47377357c.5643396.54056602.7913207 1.36981129.7913207 1.36981129z"/>
495
- <path d="m17.3354713 33.5957539h-12.8337733v-25.37660316s0-.75283017.49358489-1.14113205c.52867924-.41433961 1.3415094-.42849055 1.3415094-.42849055h10.59905631s2.2075471-.52698112 3.0928301-1.39415091l1.2.00792453v26.74245214c-.8201886.8581132-2.0530188 1.59-3.8932074 1.59"/>
496
- </g>
497
- `}get icon(){return this.bookIconSvg}get loader(){return r.JW`
498
- <svg
499
- height="100"
500
- viewBox="0 0 100 100"
501
- width="100"
502
- xmlns="http://www.w3.org/2000/svg"
503
- aria-labelledby="item-loading"
504
- >
505
- <title id="item-loading">Currently loading viewer.</title>
506
- <desc>Please wait while we load theater.</desc>
507
- <g fill="#333" fill-rule="evenodd" class="book-icon">
508
- ${this.icon}
509
- <path
510
- class="ring"
511
- d="m17.8618849 11.6970233c18.5864635-15.59603144 45.6875867-15.59603102 64.2740497.000001 1.9271446 1.6170806 2.1785128 4.4902567.5614466 6.4174186-1.6170661 1.9271618-4.4902166 2.1785323-6.4173612.5614517-15.1996922-12.75416882-37.3625282-12.75416916-52.5622206-.000001-15.19969387 12.7541707-19.04823077 34.5805019-9.1273354 51.7641499 9.9208955 17.183646 30.7471499 24.7638499 49.3923323 17.9774983 18.6451823-6.7863521 29.7266014-25.9801026 26.2811129-45.5206248-.436848-2.4775114 1.2174186-4.8400696 3.6949079-5.2769215 2.4774893-.4368518 4.8400264 1.2174296 5.2768744 3.694941 4.2132065 23.8945096-9.3373563 47.3649806-32.137028 55.6634567-22.799672 8.2984758-48.2663986-.9707372-60.39785211-21.9832155-12.1314534-21.012481-7.42539173-47.7021198 11.16107351-63.2981544z"
512
- fill-rule="nonzero"
513
- />
514
- </g>
515
- </svg>
516
- `}render(){const e=this.loaderMessage?r.qy`<h2>${this.loaderMessage}</h2>`:r.s6;return r.qy`
517
- <div class="place-holder">
518
- ${e} ${this.loader}
519
- <h3>Loading viewer</h3>
520
- </div>
521
- `}static get styles(){return r.AH`
522
- .place-holder {
523
- width: 30%;
524
- margin: auto;
525
- text-align: center;
526
- color: var(--primaryTextColor);
527
- }
528
-
529
- .place-holder {
530
- position: relative;
531
- }
532
-
533
- .place-holder svg {
534
- display: block;
535
- width: 60%;
536
- max-width: 100px;
537
- height: auto;
538
- margin: auto;
539
- }
540
-
541
- svg * {
542
- fill: var(--primaryTextColor);
543
- }
544
-
545
- svg .ring {
546
- animation: rotate 1.3s infinite linear;
547
- transform-origin: 50px 50px;
548
- transform-box: fill-box;
549
- display: block; // transform won't work on inline style
550
- }
551
-
552
- @keyframes rotate {
553
- 0% {
554
- -moz-transform: rotate(-360deg);
555
- -webkit-transform: rotate(-360deg);
556
- transform: rotate(-360deg);
557
- }
558
- }
559
- `}};(0,o.Cg)([(0,i.MZ)({type:String})],ne.prototype,"loaderMessage",void 0),ne=(0,o.Cg)([(0,i.EM)("ia-itemnav-loader")],ne);let re=class extends r.WF{constructor(){super(...arguments),this.identifier=""}emitLoaded(){this.dispatchEvent(new CustomEvent("loadingStateUpdated",{detail:{loaded:!0}}))}updated(e){e.has("identifier")&&this.emitLoaded()}get downloadUrl(){return`/download/${this.identifier}`}render(){return r.qy`
560
- <section>
561
- <h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>
562
- <p>
563
- This item does not appear to have any files that can be experienced on
564
- Archive.org. <br />
565
- Please download files in this item to interact with them on your
566
- computer.
567
- </p>
568
- <a href=${this.downloadUrl}>Show all files</a>
569
- </section>
570
- `}static get styles(){return r.AH`
571
- :host {
572
- color: var(--primaryTextColor, #fff);
573
- text-align: center;
574
- }
575
- section {
576
- width: 100%;
577
- margin: 5%;
578
- padding: 0 5%;
579
- }
580
- p {
581
- font-size: 1.4rem;
582
- }
583
- a {
584
- color: var(--primaryTextColor, #fff);
585
- background-color: rgb(25, 72, 128);
586
- min-height: 35px;
587
- cursor: pointer;
588
- line-height: normal;
589
- border-radius: 0.4rem;
590
- text-align: center;
591
- vertical-align: middle;
592
- font-size: 1.4rem;
593
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
594
- display: inline-block;
595
- padding: 0.85rem 1.2rem;
596
- border: 1px solid rgb(197, 209, 223);
597
- white-space: nowrap;
598
- appearance: auto;
599
- box-sizing: border-box;
600
- user-select: none;
601
- text-decoration: none;
602
- }
603
- `}};(0,o.Cg)([(0,i.MZ)({type:String})],re.prototype,"identifier",void 0),re=(0,o.Cg)([(0,i.EM)("ia-no-theater-available")],re);let oe=class extends r.WF{constructor(){super(...arguments),this.viewAvailable=!0,this.baseHost="archive.org",this.signedIn=!1,this.menuContents=[],this.menuShortcuts=[],this.viewportInFullscreen=null,this.menuOpened=!1,this.loaded=!1,this.openMenuState="shift"}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeObserver()}updated(e){if(e.has("sharedObserver")){const t=e.get("sharedObserver");null==t||t.removeObserver(this.resizeObserverConfig),this.setResizeObserver()}}handleResize(e){const{width:t}=e.contentRect;this.openMenuState=t<=600?"overlay":"shift"}setResizeObserver(){var e,t;null===(e=this.sharedObserver)||void 0===e||e.addObserver(this.resizeObserverConfig),null===(t=this.sharedObserver)||void 0===t||t.addObserver({target:this.headerSlot,handler:{handleResize:({contentRect:e})=>{e.height&&this.requestUpdate()}}})}removeResizeObserver(){var e;null===(e=this.sharedObserver)||void 0===e||e.removeObserver(this.resizeObserverConfig)}get resizeObserverConfig(){return{handler:this,target:this.frame}}get loaderTitle(){return this.viewportInFullscreen?"Internet Archive":""}get loadingArea(){return r.qy`
604
- <div class="loading-area">
605
- <div class="loading-view">
606
- <ia-itemnav-loader
607
- .loaderMessage=${this.loaderTitle}
608
- ></ia-itemnav-loader>
609
- </div>
610
- </div>
611
- `}slotChange(e,t){var n;const r=null===(n=e.target.assignedNodes())||void 0===n?void 0:n[0];this.dispatchEvent(new CustomEvent("slotChange",{detail:{slot:r,type:t}})),this.requestUpdate()}render(){var e,t;const n=this.loaded?"":"hidden",o=(null===(t=null===(e=this.headerSlot)||void 0===e?void 0:e.assignedNodes()[0])||void 0===t?void 0:t.offsetHeight)||0;return r.qy`
612
- <div id="frame" class=${this.menuClass}>
613
- <slot
614
- name="header"
615
- style=${`height: ${o}px`}
616
- @slotchange=${e=>this.slotChange(e,"header")}
617
- ></slot>
618
- <div class="menu-and-reader">
619
- ${this.shouldRenderMenu?this.renderSideMenu:r.s6}
620
- <div id="reader" class=${n}>
621
- ${this.renderViewport}
622
- </div>
623
- ${this.loaded?r.s6:this.loadingArea}
624
- </div>
625
- </div>
626
- `}get noTheaterView(){var e,t;return r.qy`<ia-no-theater-available
627
- .identifier=${null===(t=null===(e=this.item)||void 0===e?void 0:e.metadata)||void 0===t?void 0:t.identifier}
628
- @loadingStateUpdated=${this.loadingStateUpdated}
629
- ></ia-no-theater-available>`}get renderViewport(){if(!this.viewAvailable)return this.noTheaterView;const e=this.loaded?"opacity: 1;":"opacity: 0;";return r.qy`
630
- <div slot="main" style=${e}>
631
- <slot
632
- name="main"
633
- @slotchange=${e=>this.slotChange(e,"main")}
634
- ></slot>
635
- </div>
636
- `}loadingStateUpdated(e){const{loaded:t}=e.detail;this.loaded=null!=t&&t}manageViewportFullscreen(e){const t=!!e.detail.isFullScreen;this.viewportInFullscreen=t||null;const n=new CustomEvent("fullscreenToggled",{detail:e.detail});this.dispatchEvent(n)}get shouldRenderMenu(){var e;return!!(null===(e=this.menuContents)||void 0===e?void 0:e.length)}toggleMenu(e=void 0){this.menuOpened=void 0!==e?e:!this.menuOpened,this.menuOpened?this.updateComplete.then(()=>{var e,t;const n=null===(t=null===(e=this.menuSlider)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("button.close");null==n||n.focus()}):this.updateComplete.then(()=>{var e;null===(e=this.toggleMenuButton)||void 0===e||e.focus()})}closeMenu(){this.toggleMenu(!1)}setOpenMenu(e){const{id:t}=e.detail;this.openMenu=t!==this.openMenu?t:void 0}setMenuContents(e){const t=[...e.detail];this.menuContents=t}setMenuShortcuts(e){this.menuShortcuts=[...e.detail]}manageSideMenuEvents(e){const{menuId:t,action:n}=e.detail;t&&("open"===n?this.openShortcut(t):"toggle"===n&&(this.openMenu=t,this.toggleMenu()))}get menuToggleButton(){return r.qy`
637
- <button
638
- class="toggle-menu"
639
- @click=${this.toggleMenu}
640
- title="Open side panel"
641
- aria-label="Open side panel"
642
- aria-expanded="false"
643
- >
644
- <ia-icon-ellipses aria-hidden="true"></ia-icon-ellipses>
645
- </button>
646
- `}get selectedMenuId(){return this.openMenu||""}get renderSideMenu(){return r.qy`
647
- <nav>
648
- <div class="minimized ${m({hidden:this.menuOpened})}">
649
- ${this.shortcuts} ${this.menuToggleButton}
650
- </div>
651
- <div id="menu" class=${m({hidden:!this.menuOpened})}>
652
- <ia-menu-slider
653
- .menus=${this.menuContents}
654
- .selectedMenu=${this.selectedMenuId}
655
- @menuTypeSelected=${this.setOpenMenu}
656
- @menuSliderClosed=${this.closeMenu}
657
- manuallyHandleClose
658
- open
659
- ></ia-menu-slider>
660
- </div>
661
- </nav>
662
- `}openShortcut(e=""){this.openMenu=e,this.menuOpened=!0}get shortcuts(){const e=this.menuShortcuts.map(({icon:e,id:t,label:n})=>"fullscreen"===t?r.qy`${e}`:r.qy`
663
- <button
664
- class="shortcut ${t}"
665
- @click="${()=>this.openShortcut(t)}"
666
- title=${n}
667
- aria-label=${n}
668
- aria-expanded="false"
669
- >
670
- ${e}
671
- </button>
672
- `);return r.qy`<div class="shortcuts">${e}</div>`}get menuClass(){var e,t;const n=(null===(e=this.menuContents)||void 0===e?void 0:e.length)||(null===(t=this.menuShortcuts)||void 0===t?void 0:t.length);return`${this.menuOpened&&n?"open":""} ${this.viewportInFullscreen?"fullscreen":""} ${this.openMenuState}`}static get styles(){const e=r.AH`var(--menuWidth, 320px)`,t=r.AH`var(--animationTiming, 200ms)`,n=r.AH`transform ${t} ease-out`,o=r.AH`var(--theaterMenuMargin, 42px)`,i=r.AH`var(--theaterBgColor, #000)`;return r.AH`
673
- :host,
674
- #frame,
675
- .menu-and-reader {
676
- position: relative;
677
- overflow: hidden;
678
- display: block;
679
- }
680
-
681
- :host,
682
- #frame,
683
- .loading-area,
684
- .loading-view {
685
- min-height: inherit;
686
- height: inherit;
687
- }
688
-
689
- slot {
690
- display: block;
691
- width: 100%;
692
- }
693
-
694
- slot * {
695
- display: block;
696
- height: inherit;
697
- }
698
-
699
- #frame {
700
- background-color: ${i};
701
- color-scheme: dark;
702
- display: flex;
703
- flex-direction: column;
704
- }
705
-
706
- #frame.fullscreen {
707
- position: fixed;
708
- top: 0;
709
- bottom: 0;
710
- left: 0;
711
- right: 0;
712
- z-index: 9;
713
- }
714
-
715
- .loading-view {
716
- height: 100%;
717
- display: flex;
718
- align-items: center;
719
- justify-content: center;
720
- }
721
-
722
- .loading-area {
723
- width: 100%;
724
- }
725
-
726
- ia-itemnav-loader {
727
- display: block;
728
- width: 100%;
729
- }
730
-
731
- .hidden {
732
- display: none !important;
733
- }
734
-
735
- button {
736
- cursor: pointer;
737
- padding: 0;
738
- border: 0;
739
- }
740
-
741
- .menu-and-reader {
742
- position: relative;
743
- display: flex;
744
- flex: 1;
745
- }
746
-
747
- nav button {
748
- background: none;
749
- }
750
-
751
- nav .minimized {
752
- background: rgba(0, 0, 0, 0.7);
753
- padding-top: 6px;
754
- position: absolute;
755
- width: ${o};
756
- z-index: 2;
757
- left: 0;
758
- border-bottom-right-radius: 5%;
759
- }
760
-
761
- nav .minimized button {
762
- width: var(--iconWidth);
763
- height: var(--iconHeight);
764
- margin-bottom: 0.2rem;
765
- margin: auto;
766
- display: inline-flex;
767
- vertical-align: middle;
768
- -webkit-box-align: center;
769
- align-items: center;
770
- -webkit-box-pack: center;
771
- justify-content: center;
772
- width: ${o};
773
- height: ${o};
774
- }
775
-
776
- nav .minimized button > * {
777
- /** Prevent the icon's SVG description from stealing tooltip message */
778
- pointer-events: none;
779
- }
780
-
781
- nav .minimized button.toggle-menu > * {
782
- border: 2px solid var(--iconStrokeColor);
783
- border-radius: var(--iconWidth);
784
- width: var(--iconWidth);
785
- height: var(--iconHeight);
786
- margin: auto;
787
- }
788
-
789
- ia-icon-ellipses {
790
- width: var(--iconWidth);
791
- height: var(--iconHeight);
792
- }
793
-
794
- #menu {
795
- position: absolute;
796
- top: 0;
797
- bottom: 0;
798
- left: 0;
799
- z-index: 3;
800
- overflow: hidden;
801
- transform: translateX(-${e});
802
- width: ${e};
803
- transform: translateX(calc(${e} * -1));
804
- transition: ${n};
805
- }
806
-
807
- #reader {
808
- position: relative;
809
- z-index: 1;
810
- transform: translateX(0);
811
- width: 100%;
812
- display: flex;
813
- }
814
-
815
- #reader > * {
816
- width: 100%;
817
- display: flex;
818
- flex: 1;
819
- }
820
-
821
- .open.overlay #reader {
822
- transition: none;
823
- }
824
-
825
- .open #menu {
826
- width: ${e};
827
- transform: translateX(0);
828
- transition: ${n};
829
- }
830
-
831
- .open.shift #reader {
832
- width: calc(100% - ${e});
833
- margin-left: ${e};
834
- transition: ${n};
835
- }
836
- `}};(0,o.Cg)([(0,i.MZ)({type:Object,converter:e=>e&&"string"==typeof e?new D(JSON.parse(atob(e))):e})],oe.prototype,"item",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],oe.prototype,"viewAvailable",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],oe.prototype,"baseHost",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],oe.prototype,"signedIn",void 0),(0,o.Cg)([(0,i.MZ)({type:Array})],oe.prototype,"menuContents",void 0),(0,o.Cg)([(0,i.MZ)({type:Array})],oe.prototype,"menuShortcuts",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0,attribute:!0})],oe.prototype,"viewportInFullscreen",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],oe.prototype,"menuOpened",void 0),(0,o.Cg)([(0,i.MZ)({type:String,reflect:!0})],oe.prototype,"openMenu",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],oe.prototype,"modal",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],oe.prototype,"sharedObserver",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0,attribute:!0})],oe.prototype,"loaded",void 0),(0,o.Cg)([(0,i.wk)()],oe.prototype,"openMenuState",void 0),(0,o.Cg)([(0,i.P)("#frame")],oe.prototype,"frame",void 0),(0,o.Cg)([(0,i.P)('slot[name="header"]')],oe.prototype,"headerSlot",void 0),(0,o.Cg)([(0,i.P)('slot[name="main"]')],oe.prototype,"mainSlot",void 0),(0,o.Cg)([(0,i.P)("ia-menu-slider")],oe.prototype,"menuSlider",void 0),(0,o.Cg)([(0,i.P)("button.toggle-menu")],oe.prototype,"toggleMenuButton",void 0),oe=(0,o.Cg)([(0,i.EM)("iaux-item-navigator")],oe),n(90);var ie=r.qy`
837
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
838
- <path d="m31.5297453 8.76273313c-.3135031.40766104-.7447036.83083673-1.2936015 1.26952707-.5488979.4386904-.9169698.7837578-1.1042157 1.0352022.1562166 2.319709-.1417719 4.5297454-.8939653 6.6301092-.7521935 2.1003638-1.8023754 3.9182538-3.1505457 5.45367-1.3481704 1.5354162-2.9627648 2.8284828-4.8437835 3.8791996-1.8810186 1.0507169-3.8321207 1.7483416-5.8533062 2.092874s-4.1215493.2894286-6.30109136-.1653114c-2.17954205-.45474-4.2092874-1.3401455-6.08923604-2.6562165 2.72737.4697196 5.67408517-.2514445 8.8401455-2.1634924-3.0719024-.7521935-4.88979241-2.2881447-5.45367-4.6078537 1.12882516.0631287 1.86550396.0631287 2.21003638 0-2.91568586-1.2850417-4.38904344-3.3693558-4.42007276-6.2529424.21934517.0310293.53284828.1487267.94050931.3530922s.78375775.3060133 1.12829017.3049433c-.81532206-.7211641-1.41076396-1.9045581-1.7863257-3.5501819-.37556173-1.64562376-.17173122-3.17355015.61149155-4.58377912 1.81789001 1.88101862 3.6908838 3.36989086 5.61898138 4.46661672 1.92809757 1.0967259 4.22426707 1.7547614 6.88850847 1.9741066-.2503745-1.1908838-.1722662-2.32719882.2343248-3.40894502.4065911-1.0817462 1.0416221-1.93612241 1.9050931-2.56312861.863471-.62700621 1.8114702-1.0817462 2.8439975-1.36421999 1.0325272-.28247378 2.0827091-.27444896 3.1505456.02407447s1.9767815.87042585 2.726835 1.71570726c1.3791997-.37663172 2.6802911-.87845068 3.9032742-1.50545688-.0310293.37663171-.1407019.74470361-.3290178 1.1042157-.1883158.35951209-.3530922.62593623-.4943291.79927242s-.3841216.4317355-.728654.77519795c-.3445324.34346244-.5638776.57832227-.6580355.70457949.2193452-.09415792.6895998-.23539482 1.410764-.42371067.7211641-.18831586 1.2069334-.39214638 1.4573079-.61149155 0 .44350524-.1567516.86668093-.4702547 1.27434196z" class="fill-color" />
839
- </svg>
840
- `;class ae extends r.WF{static get styles(){return r.AH`
841
- :host {
842
- width: var(--iconWidth, 'auto');
843
- height: var(--iconHeight, 'auto');
844
- }
845
-
846
- .fill-color {
847
- fill: var(--iconFillColor);
848
- }
849
-
850
- .stroke-color {
851
- stroke: var(--iconStrokeColor);
852
- }
853
- `}render(){return ie}}customElements.define("ia-icon-twitter",ae);var se=r.qy`
854
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
855
- <path d="m30.91057 19.2442068.2670004-5.3339402h-5.7329237c-.0890001-3.4962895.25183-5.42243459 1.0224903-5.77843514.3560005-.17800028.8004955-.28925046 1.333485-.33375053s1.0442346-.0520853 1.5337353-.02275571c.4895008.02932959 1.045246.01466479 1.6672356-.04399439.0890001-1.59997977.1335002-3.24445961.1335002-4.93343953-2.1633102-.20732987-3.6742898-.28115953-4.5329389-.22148898-2.8146294.17800028-4.7847688 1.25965538-5.9104183 3.2449653-.1780003.3256596-.3261653.68873971-.444495 1.08924034-.1183298.40050062-.2144095.76358074-.2882391 1.08924034-.0738297.32565959-.125915.7848194-.1562559 1.37747942-.030341.59266002-.052591 1.04474028-.0667501 1.35624078-.0141592.3115005-.0217444.8449956-.0227558 1.6004854v1.5777298h-3.8229605v5.3339401h3.8669549v14.622824h5.8224296c0-.3560006-.0146648-1.6819003-.0439944-3.9776994-.0293296-2.295799-.0515796-4.2957737-.0667501-5.9999241s-.0075853-3.2525506.0227557-4.6452005h5.4219289z" class="fill-color" />
856
- </svg>
857
- `;class le extends r.WF{static get styles(){return r.AH`
858
- :host {
859
- width: var(--iconWidth, 'auto');
860
- height: var(--iconHeight, 'auto');
861
- }
862
-
863
- .fill-color {
864
- fill: var(--iconFillColor);
865
- }
866
-
867
- .stroke-color {
868
- stroke: var(--iconStrokeColor);
869
- }
870
- `}render(){return se}}customElements.define("ia-icon-facebook",le);var ce=r.qy`
871
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
872
- <path d="m8.50321407 8.54544475v5.32088575c.15641786.0310693.6819176.0310693 1.57649923 0 .8945816-.0310693 1.3574071.0160703 1.3884764.1414189.0942792 1.5695354.1333837 3.2253149.1173133 4.9673385-.0160703 1.7420236-.0316049 3.3426283-.0466039 4.8018141s.2046288 2.824628.6588835 4.0963267c.4542546 1.2716986 1.1999178 2.2209194 2.2369897 2.8476622 1.2556283.784232 2.9896167 1.207953 5.2019653 1.271163 2.2123485.0632099 4.1659648-.2506972 5.8608487-.9417213-.0310693-.3449764-.0230341-1.4045467.0241055-3.1787109.0471397-1.7741643-.0080351-2.75499-.1655244-2.9424772-3.5472571 1.0360005-5.697467.6904885-6.4506298-1.0365361-.7220934-1.6638147-.8635123-4.9909084-.4242566-9.981281v-.046604h6.7318605v-5.32088568h-6.7318605v-6.54383772h-4.0497228c-.2828378 1.28669763-.6122795 2.35376743-.9883252 3.20120941-.3760457.84744199-.98029 1.60060471-1.812733 2.25948817-.832443.65888347-1.87594303 1.01993018-3.1305 1.08314014z" class="fill-color" />
873
- </svg>
874
- `;class ue extends r.WF{static get styles(){return r.AH`
875
- :host {
876
- width: var(--iconWidth, 'auto');
877
- height: var(--iconHeight, 'auto');
878
- }
879
-
880
- .fill-color {
881
- fill: var(--iconFillColor);
882
- }
883
-
884
- .stroke-color {
885
- stroke: var(--iconStrokeColor);
886
- }
887
- `}render(){return ce}}customElements.define("ia-icon-tumblr",ue);var de=r.qy`
888
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
889
- <path d="m11.9051049 30.5873434.653491-1.0742755.4207845-.839975c.2805229-.591861.5371377-1.2533214.7698443-1.9843813.2327065-.7310599.4659444-1.6029125.6997135-2.6155579.2337692-1.0126455.4128151-1.752206.5371377-2.2186817.0308151.030815.0775689.0855382.1402615.1641697.0626927.0786314.1094465.1333547.1402615.1641697.1243227.1870153.2178304.311338.280523.372968 1.1210293.964829 2.3817888 1.4631823 3.7822785 1.4950599 1.4939973 0 2.8790795-.3426843 4.1552465-1.0280529 2.1166733-1.1826593 3.6733633-3.1128487 4.6700699-5.7905679.4048457-1.1518444.6848374-2.5996192.8399751-4.3433245.1243226-1.587505-.0781002-3.0974411-.6072685-4.5298084-.903199-2.36638128-2.5528653-4.20306294-4.948999-5.51004497-1.276167-.65349101-2.5990879-1.05833667-3.9687625-1.21453696-1.525875-.21783034-3.1293188-.17107651-4.8103315.14026149-2.7701643.52916833-5.02709913 1.743174-6.77080442 3.64201699-1.99235065 2.14748836-2.98852598 4.62225355-2.98852598 7.42429545 0 2.9571797.9494215 5.0584455 2.84826449 6.3037975l.83997504.4207845c.12432268 0 .22526845.0154075.3028373.0462225s.1551377.0074381.23270656-.0701308c.07756885-.0775688.13229208-.1243226.16416969-.1402614s.07066204-.0860696.11635328-.2103923c.04569124-.1243226.07703756-.2098609.09403895-.2566147.01700139-.0467539.04834771-.1476996.09403895-.3028373s.06906816-.2486454.07013074-.280523l.14026149-.5132295c.06269263-.311338.09403895-.5291684.09403895-.653491-.03081502-.1243227-.12432268-.2799917-.28052297-.467007-.15620029-.1870154-.23376915-.2959305-.23270656-.3267455-.62267599-.8096914-.9494215-1.7904592-.98023652-2.9423035-.03081502-1.55669.28052297-2.9731185.93401399-4.24928547 1.18265932-2.45882635 3.17501002-3.93741618 5.97705192-4.43576949 1.6183201-.311338 3.1356943-.25661476 4.5521228.16416969 1.4164285.42078446 2.5135496 1.09765239 3.2913633 2.03060379.8405063 1.02752164 1.3229208 2.28828114 1.4472435 3.78227848.1243227 1.4004897-.0313463 2.9725872-.467007 4.7162925-.3740306 1.3696746-.9186065 2.5528653-1.6337275 3.5495719-.9967066 1.245352-2.0863896 1.8834355-3.269049 1.9142505-1.7118277.0626926-2.7547568-.6375522-3.1287874-2.1007345-.0935077-.4664757 0-1.2134744.2805229-2.240996.7469987-2.5842117 1.1359055-3.9384788 1.1667206-4.0628015.1870153-1.0275216.2024228-1.7904591.0462225-2.2888124-.1870153-.65349104-.5759222-1.15928246-1.1667205-1.51737429-.5907984-.35809182-1.2756357-.39687625-2.054512-.11635327-1.1826594.43566067-1.9610044 1.40048968-2.335035 2.89448706-.311338 1.306982-.2491767 2.6299028.186484 3.9687625 0 .0626926.0313463.1402615.094039.2327065.0626926.0924451.0940389.1700139.0940389.2327066 0 .0935076-.0313463.2491766-.0940389.467007-.0626927.2178303-.094039.3580918-.094039.4207844-.0935076.4356607-.3038999 1.3308903-.6311767 2.6856887-.3272768 1.3547985-.5838915 2.3897582-.7698443 3.1048793-.7778136 3.2068876-1.12049796 5.5881451-1.02805289 7.1437725l.37296809 2.7558194c.653491-.591861 1.2294131-1.2299445 1.7277664-1.9142505z" class="fill-color" />
890
- </svg>
891
- `;class he extends r.WF{static get styles(){return r.AH`
892
- :host {
893
- width: var(--iconWidth, 'auto');
894
- height: var(--iconHeight, 'auto');
895
- }
896
-
897
- .fill-color {
898
- fill: var(--iconFillColor);
899
- }
900
-
901
- .stroke-color {
902
- stroke: var(--iconStrokeColor);
903
- }
904
- `}render(){return de}}customElements.define("ia-icon-pinterest",he);var pe=r.qy`
905
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
906
- <path d="m32 7.04156803v19.91686397c0 .5752421-.4763773 1.041568-1.0640184 1.041568h-27.87196316c-.58764116 0-1.06401844-.4663259-1.06401844-1.041568v-19.91686397c0-.57524214.47637728-1.04156803 1.06401844-1.04156803h27.87196316c.5876411 0 1.0640184.46632589 1.0640184 1.04156803zm-26.25039901 1.19676167 10.04327011 10.1323738c.5135662.4194048.8817166.6291071 1.1044511.6291071.1198794 0 .2695514-.0503424.4490158-.1510273.1794644-.100685.3291364-.2013699.4490158-.3020548l.1798191-.1510273 10.1198794-10.15841306zm16.77212271 9.7303286 6.8831353 6.7889404v-13.5778809zm-17.92871075-6.6379131v13.350819l6.78098955-6.6629107zm22.09008685 14.2059464-5.9074304-5.8588202-.9757049.9551179-.3594018.3295984c-.0342324.0304241-.0665646.0587822-.0969964.0850743l-.1597867.1329606c-.0684912.0540844-.1198794.0895749-.1541644.1064714-.6674943.3687151-1.3523675.5530727-2.0546196.5530727-.65047 0-1.3782586-.218035-2.1833659-.6541048l-.6682036-.4520405-1.0278418-1.0311524-5.95850326 5.832781z" class="fill-color" />
907
- </svg>
908
- `;class fe extends r.WF{static get styles(){return r.AH`
909
- :host {
910
- width: var(--iconWidth, 'auto');
911
- height: var(--iconHeight, 'auto');
912
- }
913
-
914
- .fill-color {
915
- fill: var(--iconFillColor);
916
- }
917
-
918
- .stroke-color {
919
- stroke: var(--iconStrokeColor);
920
- }
921
- `}render(){return pe}}customElements.define("ia-icon-email",fe);var me=r.qy`
922
- <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg">
923
- <path d="m7.80511706 12.3659763c1.2669254-2.2579539 4.09819784-2.9949938 6.41200864-1.7733458l.2295791.12871 1.6067188.9559859 3.5467013-6.31849361c1.2682451-2.26030597 4.104098-2.99652769 6.4192376-1.76952182l.2223501.12488594 3.2168204 1.91103915c2.2770002 1.3527136 3.1866331 4.21502324 2.0564431 6.51290984l-.1198433.2278304-5.2002499 9.2680474c-1.2669254 2.2579539-4.0981978 2.9949938-6.4120086 1.7733458l-.2295791-.12871-1.6096554-.9558482-3.5437647 6.3183559c-1.2682451 2.260306-4.104098 2.9965277-6.41923761 1.7695218l-.22235013-.1248859-3.21682032-1.9110392c-2.27700024-1.3527136-3.18663314-4.2150232-2.05644312-6.5129098l.11984332-.2278304zm13.93955474-5.73311741-3.563271 6.35055051c1.889633 1.4530595 2.5776248 4.0429866 1.5410255 6.156875l-.1223014.2328355-.4183304.7430134 1.6096554.9558483c1.1431442.6791157 2.5155496.3977368 3.1667361-.5628389l.0921501-.1491451 5.2002498-9.2680474c.5752467-1.0252226.2110342-2.4011579-.8559335-3.14755806l-.1742742-.11247814-3.2168203-1.91103915c-1.1402863-.67741793-2.5086889-.39913772-3.1618387.55564729zm-11.79500786 7.00714351-5.20024982 9.2680474c-.57524673 1.0252226-.21103426 2.4011579.85593348 3.1475581l.17427416.1124781 3.21682032 1.9110392c1.14028632.6774179 2.50868892.3991377 3.16183872-.5556473l.0970474-.1563368 3.5622708-6.3513198c-1.8888875-1.4532134-2.5764504-4.042623-1.5400057-6.1561456l.1222818-.2327956.4153938-.7428758-1.6067188-.9559859c-1.1431442-.6791157-2.5155496-.3977368-3.1667361.5628389zm6.97653866 1.5796652-.3817806.6812386c-.5117123.9119895-.2800268 2.1014993.528439 2.8785267l.382717-.6803391c.5119098-.9123415.2798478-2.1024176-.5293754-2.8794262z" class="fill-color" />
924
- </svg>
925
- `;class ve extends r.WF{static get styles(){return r.AH`
926
- :host {
927
- width: var(--iconWidth, 'auto');
928
- height: var(--iconHeight, 'auto');
929
- }
930
-
931
- .fill-color {
932
- fill: var(--iconFillColor);
933
- }
934
-
935
- .stroke-color {
936
- stroke: var(--iconStrokeColor);
937
- }
938
- `}render(){return me}}customElements.define("ia-icon-link",ve);const be=e=>{const t=e.currentTarget,n=t.querySelector("textarea"),r=t.querySelector("small");n.select(),document.execCommand("copy"),n.blur(),r.classList.add("visible"),clearTimeout(r.timeout),r.timeout=setTimeout(()=>r.classList.remove("visible"),4e3)},ye=r.qy`<ia-icon-share
939
- style="width: var(--iconWidth); height: var(--iconHeight);"
940
- ></ia-icon-share>`;let ge=class extends r.WF{constructor(){super(...arguments),this.baseHost="archive.org",this.creator="",this.description="",this.embedOptionsVisible=!1,this.identifier="",this.sharingOptions=[],this.type="",this.renderHeader=!1,this.fileSubPrefix=""}updated(e){e.has("sharingOptions")&&!this.sharingOptions.length&&this.loadProviders()}loadProviders(){let e=`https://${this.baseHost}/details/${this.identifier}`;this.fileSubPrefix&&(e+=`/${this.fileSubPrefix}`);const t=[this.description,this.creator,"Free Download, Borrow, and Streaming","Internet Archive"].filter(Boolean).join(" : ");this.sharingOptions=[{name:"Twitter",icon:r.qy`<ia-icon-twitter aria-hidden="true"></ia-icon-twitter>`,url:`https://twitter.com/intent/tweet?${new URLSearchParams({url:e,text:t,via:"internetarchive"})}`},{name:"Facebook",icon:r.qy`<ia-icon-facebook aria-hidden="true"></ia-icon-facebook>`,url:`https://www.facebook.com/sharer/sharer.php?${new URLSearchParams({u:e})}`},{name:"Tumblr",icon:r.qy`<ia-icon-tumblr aria-hidden="true"></ia-icon-tumblr>`,url:`https://www.tumblr.com/widgets/share/tool/preview?${new URLSearchParams({posttype:"link",canonicalUrl:e,title:t})}`},{name:"Pinterest",icon:r.qy`<ia-icon-pinterest aria-hidden="true"></ia-icon-pinterest>`,url:`http://www.pinterest.com/pin/create/button/?${new URLSearchParams({url:e,description:t})}`},{name:"Email",icon:r.qy`<ia-icon-email aria-hidden="true"></ia-icon-email>`,url:`mailto:?${new URLSearchParams({subject:t,body:e})}`}]}get iframeEmbed(){return`<iframe\n src="https://${this.baseHost}/embed/${this.identifier}"\n width="560" height="384" frameborder="0"\n webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen\n ></iframe>`}get bbcodeEmbed(){return`[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`}get helpURL(){return`https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`}get header(){const e=r.qy`<header><h3>Share this ${this.type}</h3></header>`;return this.renderHeader?e:r.s6}render(){return r.qy`
941
- ${this.header}
942
- <div>
943
- ${this.sharingOptions.map(e=>r.qy` <a class="share-option" href="${e.url}" target="_blank">
944
- ${e.icon} ${e.name}
945
- </a>`)}
946
- <details>
947
- <summary class="share-option">
948
- <ia-icon-link aria-hidden="true"></ia-icon-link>
949
- Get an embeddable link
950
- </summary>
951
- <div class="embed">
952
- <h4>Embed</h4>
953
- <div class="code" @click=${be}>
954
- <textarea readonly>${this.iframeEmbed}</textarea>
955
- <small>Copied to clipboard</small>
956
- </div>
957
- <h4>
958
- Embed for wordpress.com hosted blogs and archive.org item
959
- &lt;description&gt; tags
960
- </h4>
961
- <div class="code" @click=${be}>
962
- <textarea readonly>${this.bbcodeEmbed}</textarea>
963
- <small>Copied to clipboard</small>
964
- </div>
965
- <p>
966
- Want more?
967
- <a href=${this.helpURL}
968
- >Advanced embedding details, examples, and help</a
969
- >!
970
- </p>
971
- </div>
972
- </details>
973
- </div>
974
- `}get providerIcon(){return r.qy`<ia-icon-share
975
- style="width: var(--iconWidth); height: var(--iconHeight);"
976
- ></ia-icon-share>`}static get styles(){return r.AH`
977
- :host {
978
- display: block;
979
- height: 100%;
980
- overflow-y: auto;
981
- font-size: 1.4rem;
982
- box-sizing: border-box;
983
- }
984
-
985
- header {
986
- display: flex;
987
- align-items: baseline;
988
- }
989
-
990
- h3 {
991
- padding: 0;
992
- margin: 0 1rem 0 0;
993
- font-size: 1.6rem;
994
- }
995
-
996
- h4 {
997
- font-size: 1.4rem;
998
- }
999
-
1000
- :host > div {
1001
- padding: 1rem 0;
1002
- }
1003
-
1004
- .share-option {
1005
- display: block;
1006
- padding: 0.5rem 0;
1007
- font-size: 1.6rem;
1008
- text-decoration: none;
1009
- color: var(--shareLinkColor);
1010
- cursor: pointer;
1011
- transition: background-color 0.2s;
1012
- border-radius: 6px;
1013
- }
1014
-
1015
- .share-option:hover {
1016
- background-color: rgba(255, 255, 255, 0.05);
1017
- }
1018
-
1019
- .share-option > * {
1020
- display: inline-block;
1021
- padding: 0.2rem;
1022
- margin-right: 1rem;
1023
- vertical-align: middle;
1024
- border: 1px solid var(--shareIconBorder);
1025
- border-radius: 7px;
1026
- background: var(--shareIconBg);
1027
- }
1028
-
1029
- /* Hide the triangle that appears on details tags */
1030
- summary::marker {
1031
- content: '';
1032
- }
1033
-
1034
- summary::-webkit-details-marker {
1035
- display: none;
1036
- }
1037
-
1038
- .embed {
1039
- padding-right: 5px;
1040
- }
1041
-
1042
- .embed a {
1043
- color: var(--shareLinkColor);
1044
- }
1045
-
1046
- .code {
1047
- position: relative;
1048
- }
1049
-
1050
- textarea {
1051
- display: block;
1052
- width: 100%;
1053
- height: 120px;
1054
- padding: 0.8rem 1rem;
1055
- box-sizing: border-box;
1056
- resize: none;
1057
- cursor: pointer;
1058
- font:
1059
- normal 1.4rem 'Helvetica Neue',
1060
- Helvetica,
1061
- Arial,
1062
- sans-serif;
1063
- color: var(--textareaColor, #fff);
1064
- background: var(--textareaBg, #151515);
1065
- }
1066
-
1067
- small {
1068
- position: absolute;
1069
- bottom: 0;
1070
- left: 0;
1071
- height: 3rem;
1072
- padding: 0.5rem 1rem;
1073
- box-sizing: border-box;
1074
- font:
1075
- normal 1.2rem/2rem 'Helvetica Neue',
1076
- Helvetica,
1077
- Arial,
1078
- sans-serif;
1079
- color: var(--textareaBg, #151515);
1080
- background: var(--textareaColor, #fff);
1081
- opacity: 0;
1082
- transition: opacity 300ms linear;
1083
- }
1084
- small.visible {
1085
- opacity: 1;
1086
- }
1087
- `}};(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"baseHost",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"creator",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"description",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],ge.prototype,"embedOptionsVisible",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"identifier",void 0),(0,o.Cg)([(0,i.MZ)({type:Array})],ge.prototype,"sharingOptions",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"type",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],ge.prototype,"renderHeader",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],ge.prototype,"fileSubPrefix",void 0),ge=(0,o.Cg)([(0,i.EM)("iaux-in-share-panel")],ge),n(6033);var ke=a.ge.I,we=function(){return document.createComment("")},Ce=function(e,t,n){var r,o=e._$AA.parentNode,i=void 0===t?e._$AB:t._$AA;if(void 0===n){var a=o.insertBefore(we(),i),s=o.insertBefore(we(),i);n=new ke(a,s,e,e.options)}else{var l,c=n._$AB.nextSibling,u=n._$AM,d=u!==e;if(d&&(null===(r=n._$AQ)||void 0===r||r.call(n,e),n._$AM=e,void 0!==n._$AP&&(l=e._$AU)!==u._$AU&&n._$AP(l)),c!==i||d)for(var h=n._$AA;h!==c;){var p=h.nextSibling;o.insertBefore(h,i),h=p}}return n},xe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return e._$AI(t,n),e},Se={},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return e._$AH=t},Me=function(e){var t;null===(t=e._$AP)||void 0===t||t.call(e,!1,!0);for(var n=e._$AA,r=e._$AB.nextSibling;n!==r;){var o=n.nextSibling;n.remove(),n=o}};function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function je(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Le(r.key),r)}}function Le(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ae=function(){return!!e})()}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}function ze(e,t){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ze(e,t)}var Te=function(e,t,n){for(var r=new Map,o=t;o<=n;o++)r.set(e[o],o);return r},$e=(0,s.u$)(function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=_e(t),function(e,t){if(t&&("object"==Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ae()?Reflect.construct(t,n||[],_e(e).constructor):t.apply(e,n))}(this,t,[e]),e.type!==s.OA.CHILD)throw Error("repeat() can only be used in text expressions");return n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ze(e,t)}(t,e),function(e,t){return t&&Ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"ct",value:function(e,t,n){var r;void 0===n?n=t:void 0!==t&&(r=t);var o,i=[],a=[],s=0,l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=je(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e);try{for(l.s();!(o=l.n()).done;){var c=o.value;i[s]=r?r(c,s):s,a[s]=n(c,s),s++}}catch(e){l.e(e)}finally{l.f()}return{values:a,keys:i}}},{key:"render",value:function(e,t,n){return this.ct(e,t,n).values}},{key:"update",value:function(e,t){var n,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,3),o=r[0],i=r[1],s=r[2],l=function(e){return e._$AH}(e),c=this.ct(o,i,s),u=c.values,d=c.keys;if(!Array.isArray(l))return this.ut=d,u;for(var h,p,f=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],m=[],v=0,b=l.length-1,y=0,g=u.length-1;v<=b&&y<=g;)if(null===l[v])v++;else if(null===l[b])b--;else if(f[v]===d[y])m[y]=xe(l[v],u[y]),v++,y++;else if(f[b]===d[g])m[g]=xe(l[b],u[g]),b--,g--;else if(f[v]===d[g])m[g]=xe(l[v],u[g]),Ce(e,m[g+1],l[v]),v++,g--;else if(f[b]===d[y])m[y]=xe(l[b],u[y]),Ce(e,l[v],l[b]),b--,y++;else if(void 0===h&&(h=Te(d,y,g),p=Te(f,v,b)),h.has(f[v]))if(h.has(f[b])){var k=p.get(d[y]),w=void 0!==k?l[k]:null;if(null===w){var C=Ce(e,l[v]);xe(C,u[y]),m[y]=C}else m[y]=xe(w,u[y]),Ce(e,l[v],w),l[k]=null;y++}else Me(l[b]),b--;else Me(l[v]),v++;for(;y<=g;){var x=Ce(e,m[g+1]);xe(x,u[y]),m[y++]=x}for(;v<=b;){var S=l[v++];null!==S&&Me(S)}return this.ut=d,Oe(e,m),a.c0}}])}(s.WL));const He=r.qy`
1088
- <svg
1089
- name="sort-asc"
1090
- height="18"
1091
- viewBox="0 0 18 18"
1092
- width="18"
1093
- xmlns="http://www.w3.org/2000/svg"
1094
- >
1095
- <g fill="none" fill-rule="evenodd">
1096
- <path
1097
- d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z"
1098
- fill="#fff"
1099
- fill-rule="nonzero"
1100
- />
1101
- <path
1102
- d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z"
1103
- fill="#fff"
1104
- fill-rule="nonzero"
1105
- />
1106
- <path
1107
- d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612"
1108
- stroke="#fff"
1109
- stroke-linecap="round"
1110
- stroke-linejoin="round"
1111
- stroke-width="1.661538"
1112
- transform="matrix(1 0 0 -1 0 18.692308)"
1113
- />
1114
- </g>
1115
- </svg>
1116
- `,Ie=r.qy`
1117
- <svg
1118
- name="sort-desc"
1119
- height="18"
1120
- viewBox="0 0 18 18"
1121
- width="18"
1122
- xmlns="http://www.w3.org/2000/svg"
1123
- >
1124
- <g fill="none" fill-rule="evenodd">
1125
- <path
1126
- d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z"
1127
- fill="#fff"
1128
- fill-rule="nonzero"
1129
- />
1130
- <path
1131
- d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z"
1132
- fill="#fff"
1133
- fill-rule="nonzero"
1134
- />
1135
- <path
1136
- d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612"
1137
- stroke="#fff"
1138
- stroke-linecap="round"
1139
- stroke-linejoin="round"
1140
- stroke-width="1.661538"
1141
- />
1142
- </g>
1143
- </svg>
1144
- `,qe=r.qy`
1145
- <svg
1146
- name="sort-neutral"
1147
- height="18"
1148
- viewBox="0 0 18 18"
1149
- width="18"
1150
- xmlns="http://www.w3.org/2000/svg"
1151
- >
1152
- <g fill="#fff" fill-rule="evenodd">
1153
- <path
1154
- d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z"
1155
- fill-rule="nonzero"
1156
- />
1157
- <path
1158
- d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z"
1159
- fill-rule="nonzero"
1160
- />
1161
- <circle cx="13" cy="9" r="2" />
1162
- </g>
1163
- </svg>
1164
- `,Re=r.qy`
1165
- <svg
1166
- height="24"
1167
- viewBox="0 0 24 24"
1168
- width="24"
1169
- xmlns="http://www.w3.org/2000/svg"
1170
- aria-labelledby="volumesTitleID volumesDescID"
1171
- >
1172
- <title id="volumesTitleID">Viewable Files</title>
1173
- <g fill="#ffffff">
1174
- <path
1175
- fill="#ffffff"
1176
- d="m9.83536396 0h10.07241114c.1725502.47117517.3378411.76385809.4958725.87804878.1295523.11419069.3199719.1998337.5712586.25692905.2512868.05709534.4704647.08564301.6575337.08564301h.2806036v15.24362526h-4.3355343v3.8106985h-4.44275v3.7250554h-12.01318261c-.27306495 0-.50313194-.085643-.69020098-.256929-.18706903-.1712861-.30936193-.3425721-.36687867-.5138581l-.06449694-.2785477v-14.2159091c0-.32815965.08627512-.5922949.25882537-.79240577.17255024-.20011086.34510049-.32150776.51765073-.36419068l.25882537-.0640244h3.36472977v-2.54767184c0-.31374722.08627513-.57067627.25882537-.77078714.17255025-.20011086.34510049-.32150776.51765074-.36419068l.25882536-.06402439h3.36472978v-2.56929047c0-.32815964.08627512-.5922949.25882537-.79240576.17255024-.20011087.34510049-.31430156.51765073-.34257207zm10.78355264 15.6294346v-13.53076498c-.2730649-.08536585-.4456152-.16380266-.5176507-.23531042-.1725502-.1424612-.2730649-.27078714-.3015441-.38497783v13.36031043h-9.87808272c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144124-.08962561.006929-.13988296.0640244-.05025735.0570953-.07538603.1427383-.07538603.256929s.02149898.210643.06449694.289357c.04299795.078714.08599591.1322062.12899387.1604767l.06449693.0216187h10.71905571zm-10.2449613-2.4412417h7.98003v-11.60421286h-7.98003zm1.6827837-9.41990022h4.6153002c.1725502 0 .3199718.05349224.4422647.16047672s.1834393.23891353.1834393.39578714c0 .15687362-.0611464.28519956-.1834393.38497783s-.2697145.1496674-.4422647.1496674h-4.6153002c-.1725503 0-.3199719-.04988913-.4422647-.1496674-.1222929-.09977827-.1834394-.22810421-.1834394-.38497783 0-.15687361.0611465-.28880266.1834394-.39578714.1222928-.10698448.2697144-.16047672.4422647-.16047672zm-6.08197737 13.50997782h7.72120467v-.8131929h-3.79610541c-.27306495 0-.49950224-.085643-.67931188-.256929-.17980964-.1712861-.29847284-.3425721-.35598958-.5138581l-.06449694-.2785477v-10.02023282h-2.82530086zm6.77217827-11.36890243h3.2139578c.1295522 0 .240956.05709534.3342113.17128603.0932554.11419069.139883.24972284.139883.40659645 0 .15687362-.0466276.28880267-.139883.39578714-.0932553.10698448-.2046591.16047672-.3342113.16047672h-3.2139578c-.1295523 0-.2373264-.05349224-.3233223-.16047672-.0859959-.10698447-.1289938-.23891352-.1289938-.39578714 0-.15687361.0429979-.29240576.1289938-.40659645s.19377-.17128603.3233223-.17128603zm-11.15043132 15.11557653h7.69942646v-.7491685h-3.79610539c-.25854616 0-.48135376-.0892462-.66842279-.2677384-.18706904-.1784922-.30936193-.3605876-.36687868-.546286l-.06449694-.2569291v-10.04101994h-2.80352266zm14.62237682-4.5606985h-.8191949v2.1410754h-9.89986085s-.04299796.0285477-.12899387.085643c-.08599592.0570954-.12201369.1427384-.10805331.2569291 0 .1141907.01786928.210643.05360784.289357.03573856.0787139.07538603.125.1189424.138858l.06449694.0432373h10.71905575v-2.9542683zm-4.3991936 3.8106985h-.8191949v2.077051h-9.8563045c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144125-.08962561.0105321-.13988296.0748337-.05025735.0643015-.07538603.1607538-.07538603.289357 0 .1141906.02149898.2070399.06449694.2785476.04299795.0715078.08599591.1141907.12899387.1280488l.06449693.0216186h10.69811519v-2.8686252z"
1177
- />
1178
- </g>
1179
- </svg>
1180
- `;let Fe=class extends r.WF{constructor(){super(...arguments),this.fileListRaw=[],this.fileListSorted=[],this.sortOrderBy="default"}render(){return r.qy`<div class="sort-multi-file-list">${this.sortButton}</div>`}get sortButton(){return{default:r.qy`
1181
- <button
1182
- class="sort-by neutral-icon"
1183
- aria-label="Sort volumes in initial order"
1184
- @click=${()=>this.sortVolumes("title_asc")}
1185
- >
1186
- ${qe}
1187
- </button>
1188
- `,title_asc:r.qy`
1189
- <button
1190
- class="sort-by asc-icon"
1191
- aria-label="Sort volumes in ascending order"
1192
- @click=${()=>this.sortVolumes("title_desc")}
1193
- >
1194
- ${He}
1195
- </button>
1196
- `,title_desc:r.qy`
1197
- <button
1198
- class="sort-by desc-icon"
1199
- aria-label="Sort volumes in descending order"
1200
- @click=${()=>this.sortVolumes("default")}
1201
- >
1202
- ${Ie}
1203
- </button>
1204
- `}[this.sortOrderBy]}sortVolumes(e){this.sortOrderBy=e;let t=[];t=this.fileListRaw.sort((t,n)=>"title_asc"===e?t.title.localeCompare(n.title):"title_desc"===e?n.title.localeCompare(t.title):t.orig_sort-n.orig_sort),this.dispatchEvent(new CustomEvent("fileListSorted",{detail:{sortType:e,sortedFiles:t},bubbles:!0,composed:!0})),this.fileListSorted=t}static get styles(){return r.AH`
1205
- button.sort-by {
1206
- padding: 0px;
1207
- background-color: transparent;
1208
- border: 0px;
1209
- --iconWidth: var(--menuSliderHeaderIconWidth);
1210
- --iconHeight: var(--menuSliderHeaderIconHeight);
1211
- }
1212
- `}};(0,o.Cg)([(0,i.MZ)({type:Array})],Fe.prototype,"fileListRaw",void 0),(0,o.Cg)([(0,i.MZ)({type:Array})],Fe.prototype,"fileListSorted",void 0),(0,o.Cg)([(0,i.MZ)({type:String,reflect:!0})],Fe.prototype,"sortOrderBy",void 0),Fe=(0,o.Cg)([(0,i.EM)("iaux-in-sort-files-button")],Fe);let De=class extends r.WF{constructor(){super(...arguments),this.baseHost="archive.org",this.sortOrderBy="default",this.subPrefix="",this.fileList=[],this.addSortToUrl=!1}firstUpdated(){const e=this.shadowRoot.querySelector(".content.active");setTimeout(()=>{(null==e?void 0:e.scrollIntoViewIfNeeded)?null==e||e.scrollIntoViewIfNeeded(!0):null==e||e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},350)}volumeItemWithImageTitle(e){const t=this.fileUrl(e);return r.qy`
1213
- <li class="content active">
1214
- <div class="separator"></div>
1215
- <a class="container" href="${t}">
1216
- <div class="image">
1217
- <img src="${e.image}" alt="preview" />
1218
- </div>
1219
- <div class="text">
1220
- <p class="item-title">${e.title}</p>
1221
- <small>by: ${e.author}</small>
1222
- </div>
1223
- </a>
1224
- </li>
1225
- `}fileUrl(e){const t=`//${this.baseHost}${e.url_path}`;let n=t;return this.addSortToUrl&&(n="default"===this.sortOrderBy?`${t}`:`${t}?sort=${this.sortOrderBy}`),n}get pdfLabel(){return r.qy`<span class="pdf-label"
1226
- ><span class="sr-only">view this</span> PDF</span
1227
- >`}fileLi(e){var t;const n=this.subPrefix===e.file_subprefix?" active":"",o=this.fileUrl(e),i=(null!==(t=e.file_source)&&void 0!==t?t:"").match(/^[^+]+\.pdf$/i);return r.qy`
1228
- <li>
1229
- <div class="separator"></div>
1230
- <div class="content${n}">
1231
- <a href=${o}>
1232
- <p class="item-title">
1233
- ${e.title}${i?this.pdfLabel:r.s6}
1234
- </p>
1235
- </a>
1236
- </div>
1237
- </li>
1238
- `}get fileListTemplate(){const e=$e(this.fileList,e=>null==e?void 0:e.file_prefix,this.fileLi.bind(this));return r.qy`
1239
- <ul>
1240
- ${e}
1241
- <div class="separator"></div>
1242
- </ul>
1243
- `}render(){return r.qy` ${this.fileList.length?this.fileListTemplate:r.s6} `}static get styles(){return r.AH`
1244
- :host {
1245
- display: block;
1246
- overflow-y: auto;
1247
- box-sizing: border-box;
1248
- color: var(--primaryTextColor);
1249
- margin-top: 14px;
1250
- margin-bottom: 2rem;
1251
- --activeBorderWidth: 2px;
1252
- }
1253
-
1254
- a {
1255
- color: #ffffff;
1256
- text-decoration: none;
1257
- }
1258
-
1259
- img {
1260
- width: 35px;
1261
- height: 45px;
1262
- }
1263
-
1264
- ul {
1265
- padding: 0;
1266
- list-style: none;
1267
- margin: var(--activeBorderWidth) 0.5rem 1rem 0;
1268
- }
1269
-
1270
- ul > li:first-child .separator {
1271
- display: none;
1272
- }
1273
-
1274
- li {
1275
- cursor: pointer;
1276
- position: relative;
1277
- }
1278
-
1279
- li .content {
1280
- padding: 2px 0 4px 2px;
1281
- border: var(--activeBorderWidth) solid transparent;
1282
- padding: 0.2rem 0 0.4rem 0.2rem;
1283
- }
1284
-
1285
- li .content.active {
1286
- border: var(--activeBorderWidth) solid #538bc5;
1287
- }
1288
-
1289
- li.content a {
1290
- display: flex;
1291
- }
1292
-
1293
- small {
1294
- font-style: italic;
1295
- white-space: initial;
1296
- }
1297
-
1298
- .container {
1299
- display: flex;
1300
- align-items: center;
1301
- justify-content: center;
1302
- }
1303
-
1304
- .item-title {
1305
- margin-block-start: 0em;
1306
- margin-block-end: 0em;
1307
- font-size: 14px;
1308
- font-weight: bold;
1309
- word-wrap: break-word;
1310
- padding-left: 5px;
1311
- }
1312
-
1313
- .separator {
1314
- background-color: var(--secondaryBGColor);
1315
- width: 98%;
1316
- margin: 1px auto;
1317
- height: 1px;
1318
- }
1319
-
1320
- .text {
1321
- padding-left: 10px;
1322
- }
1323
-
1324
- .icon {
1325
- display: inline-block;
1326
- width: 14px;
1327
- height: 14px;
1328
- margin-left: 0.7rem;
1329
- border: 1px solid var(--primaryTextColor);
1330
- border-radius: 2px;
1331
- background: var(--activeButtonBg) 50% 50% no-repeat;
1332
- }
1333
-
1334
- .pdf-label {
1335
- border: 1px solid;
1336
- padding: 2px 5px;
1337
- border-radius: 20px;
1338
- display: inline-block;
1339
- margin-left: 5px;
1340
- font-size: 0.9rem;
1341
- }
1342
-
1343
- .pdf-label .sr-only {
1344
- position: absolute;
1345
- clip: rect(1px, 1px, 1px, 1px);
1346
- padding: 0;
1347
- border: 0;
1348
- height: 1px;
1349
- width: 1px;
1350
- overflow: hidden;
1351
- }
1352
- `}};(0,o.Cg)([(0,i.MZ)({type:String})],De.prototype,"baseHost",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],De.prototype,"sortOrderBy",void 0),(0,o.Cg)([(0,i.MZ)({type:String})],De.prototype,"subPrefix",void 0),(0,o.Cg)([(0,i.MZ)({type:Array})],De.prototype,"fileList",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],De.prototype,"addSortToUrl",void 0),De=(0,o.Cg)([(0,i.EM)("iaux-in-viewable-files-panel")],De);class We{constructor(e){this.title=e?.title,this.subtitle=e?.subtitle,this.headline=e?.headline,this.message=e?.message,this.headerColor=e?.headerColor??"#55A183",this.bodyColor=e?.bodyColor??"#fbfbfd",this.showProcessingIndicator=e?.showProcessingIndicator??!1,this.processingImageMode=e?.processingImageMode??"complete",this.showCloseButton=e?.showCloseButton??!0,this.showLeftNavButton=e?.showLeftNavButton??!1,this.leftNavButtonText=e?.leftNavButtonText??"",this.showHeaderLogo=e?.showHeaderLogo??!0,this.closeOnBackdropClick=e?.closeOnBackdropClick??!0}}function*Ve(e=document.activeElement){null!=e&&(yield e,"shadowRoot"in e&&e.shadowRoot&&"closed"!==e.shadowRoot.mode&&(yield*Ve(e.shadowRoot.activeElement)))}function Ne(){return[...Ve()].pop()}const Ze=new WeakMap;function Ue(e){let t=Ze.get(e);return t||(t=window.getComputedStyle(e,null),Ze.set(e,t)),t}function Ge(e){const t=new WeakMap,n=[];return function r(o){if(o instanceof Element){if(o.hasAttribute("inert")||o.closest("[inert]"))return;if(t.has(o))return;t.set(o,!0),!n.includes(o)&&function(e){const t=e.tagName.toLowerCase(),n=Number(e.getAttribute("tabindex"));return(!e.hasAttribute("tabindex")||!(isNaN(n)||n<=-1))&&!e.hasAttribute("disabled")&&!e.closest("[inert]")&&!("input"===t&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&!!function(e){if("checkVisibility"in e&&"function"==typeof e.checkVisibility)return e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const t=Ue(e);return"hidden"!==t.visibility&&"none"!==t.display}(e)&&(!("audio"!==t&&"video"!==t||!e.hasAttribute("controls"))||!!e.hasAttribute("tabindex")||!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||!!["button","input","select","textarea","a","audio","video","summary","iframe"].includes(t)||function(e){const t=Ue(e),{overflowY:n,overflowX:r}=t;return"scroll"===n||"scroll"===r||"auto"===n&&"auto"===r&&(e.scrollHeight>e.clientHeight&&"auto"===n||!(!(e.scrollWidth>e.clientWidth)||"auto"!==r))}(e))}(o)&&n.push(o),o instanceof HTMLSlotElement&&function(e,t){return e.getRootNode({composed:!0})?.host!==t}(o,e)&&o.assignedElements({flatten:!0}).forEach(e=>{r(e)}),null!==o.shadowRoot&&"open"===o.shadowRoot.mode&&r(o.shadowRoot)}for(const e of Array.from(o.children))r(e)}(e),n.sort((e,t)=>{const n=Number(e.getAttribute("tabindex"))||0;return(Number(t.getAttribute("tabindex"))||0)-n})}let Je=[];class Xe{constructor(e){this.isExternalActivated=!1,this.tabDirection="forward",this.currentFocus=null,this.previousFocus=null,this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=e=>{if("Tab"!==e.key||this.isExternalActivated)return;if(!this.isActive())return;const t=Ne();if(this.previousFocus=t,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;e.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const n=Ge(this.element);let r=n.findIndex(e=>e===t);this.previousFocus=this.currentFocus;const o="forward"===this.tabDirection?1:-1;for(;;){r+o>=n.length?r=0:r+o<0?r=n.length-1:r+=o,this.previousFocus=this.currentFocus;const t=n[r];if("backward"===this.tabDirection&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(t&&this.possiblyHasTabbableChildren(t))return;e.preventDefault(),this.currentFocus=t,this.currentFocus?.focus({preventScroll:!1});const i=[...Ve()];if(i.includes(this.currentFocus)||!i.includes(this.previousFocus))break}setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e,this.elementsWithTabbableControls=["iframe"]}activate(){Je.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Je=Je.filter(e=>e!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Je[Je.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const e=Ge(this.element);if(!this.element.matches(":focus-within")){const t=e[0],n=e[e.length-1],r="forward"===this.tabDirection?t:n;"function"==typeof r?.focus&&(this.currentFocus=r,r.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(e){return this.elementsWithTabbableControls.includes(e.tagName.toLowerCase())||e.hasAttribute("controls")}}n(8248);var Ke=r.qy`
1353
- <svg
1354
- viewBox="0 0 40 40"
1355
- version="1.1"
1356
- xmlns="http://www.w3.org/2000/svg"
1357
- >
1358
- <path d="m29.1923882 10.8076118c.5857864.5857865.5857864 1.535534 0 2.1213204l-7.0711162 7.0703398 7.0711162 7.0717958c.5857864.5857864.5857864 1.5355339 0 2.1213204-.5857865.5857864-1.535534.5857864-2.1213204 0l-7.0717958-7.0711162-7.0703398 7.0711162c-.5857864.5857864-1.5355339.5857864-2.1213204 0-.5857864-.5857865-.5857864-1.535534 0-2.1213204l7.0706602-7.0717958-7.0706602-7.0703398c-.5857864-.5857864-.5857864-1.5355339 0-2.1213204.5857865-.5857864 1.535534-.5857864 2.1213204 0l7.0703398 7.0706602 7.0717958-7.0706602c.5857864-.5857864 1.5355339-.5857864 2.1213204 0z" class="fill-color" fill-rule="evenodd"/>
1359
- </svg>
1360
- `;class Qe extends r.WF{static get styles(){return r.AH`
1361
- :host {
1362
- width: var(--iconWidth, 'auto');
1363
- height: var(--iconHeight, 'auto');
1364
- }
1365
-
1366
- .fill-color {
1367
- fill: var(--iconFillColor);
1368
- }
1369
-
1370
- .stroke-color {
1371
- stroke: var(--iconStrokeColor);
1372
- }
1373
- `}render(){return Ke}}customElements.define("ia-icon-close",Qe);var Ye=r.qy`
1374
- <svg
1375
- class="ia-logo"
1376
- viewBox="0 0 27 30"
1377
- xmlns="http://www.w3.org/2000/svg"
1378
- aria-labelledby="logoTitleID logoDescID"
1379
- >
1380
- <title id="logoTitleID">Internet Archive logo</title>
1381
- <desc id="logoDescID">
1382
- A line drawing of the Internet Archive headquarters building façade.
1383
- </desc>
1384
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
1385
- <mask id="mask-2" class="fill-color">
1386
- <path
1387
- d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z"
1388
- id="path-1"
1389
- ></path>
1390
- </mask>
1391
- <use class="fill-color" xlink:href="#path-1"></use>
1392
- <g mask="url(#mask-2)" class="fill-color">
1393
- <path
1394
- d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z"
1395
- id="swatch"
1396
- ></path>
1397
- </g>
1398
- </g>
1399
- </svg>
1400
- `,et=r.qy`
1401
- <svg
1402
- viewBox="0 0 100 100"
1403
- xmlns="http://www.w3.org/2000/svg"
1404
- fill="#fff"
1405
- title="Left arrow icon"
1406
- alt="Left arrow icon"
1407
- >
1408
- <path
1409
- d="m20.1116715 50.0035012-.1116715-.1085359 43.1159942-46.61088155c2.401537-2.18938917 4.6902018-3.28408375 6.8659943-3.28408375s4.1642651.63837733 5.9654178 1.91513199c1.8011528 1.27675467 3.1520173 2.97248092 4.0525937 5.08717877l-39.4020173 42.99768924 39.4020173 42.9976892c-.9005764 2.1146979-2.2514409 3.8104241-4.0525937 5.0871788-1.8011527 1.2767547-3.7896253 1.915132-5.9654178 1.915132-2.1013449 0-4.3900096-1.0573489-6.8659943-3.1720468l-43.1159942-46.7194174z"
1410
- />
1411
- </svg>
1412
- `;let tt=class extends r.WF{constructor(){super(...arguments),this.config=new We}render(){return r.qy`
1413
- <div class="modal-wrapper">
1414
- <div class="modal-container">
1415
- <header style="background-color: ${this.config.headerColor}">
1416
- ${this.config.showLeftNavButton?this.leftNavButtonTemplate:r.s6}
1417
- ${this.config.showCloseButton?this.closeButtonTemplate:""}
1418
- ${this.config.showHeaderLogo?r.qy`<div class="logo-icon">${Ye}</div>`:r.s6}
1419
- ${this.config.title?r.qy`<h1 class="title">${this.config.title}</h1>`:""}
1420
- ${this.config.subtitle?r.qy`<h2 class="subtitle">${this.config.subtitle}</h2>`:""}
1421
- </header>
1422
- <section
1423
- class="modal-body"
1424
- style="background-color: ${this.config.bodyColor}"
1425
- >
1426
- <div class="content">
1427
- <div
1428
- class="processing-logo ${this.config.showProcessingIndicator?"":"hidden"}"
1429
- >
1430
- <ia-activity-indicator
1431
- .mode=${this.config.processingImageMode}
1432
- ></ia-activity-indicator>
1433
- </div>
1434
- ${this.config.headline?r.qy` <h1 class="headline">${this.config.headline}</h1> `:""}
1435
- ${this.config.message?r.qy` <p class="message">${this.config.message}</p> `:""}
1436
-
1437
- <div class="slot-container">
1438
- <slot> </slot>
1439
- </div>
1440
- </div>
1441
- </section>
1442
- </div>
1443
- </div>
1444
- `}handleCloseButton(e){if(e.preventDefault(),"keydown"===e.type&&" "!==e.key&&"Enter"!==e.key)return;const t=new Event("closeButtonPressed");this.dispatchEvent(t)}handleLeftNavButtonPressed(e){if(e.preventDefault(),"keydown"===e.type&&" "!==e.key&&"Enter"!==e.key)return;const t=new Event("leftNavButtonPressed");this.dispatchEvent(t)}get closeButtonTemplate(){return r.qy`
1445
- <button
1446
- type="button"
1447
- class="close-button"
1448
- @click=${this.handleCloseButton}
1449
- @keydown=${this.handleCloseButton}
1450
- >
1451
- <ia-icon-close></ia-icon-close>
1452
- </button>
1453
- `}get leftNavButtonTemplate(){return r.qy`<button
1454
- type="button"
1455
- class="back-button"
1456
- @click=${this.handleLeftNavButtonPressed}
1457
- @keydown=${this.handleLeftNavButtonPressed}
1458
- >
1459
- ${et} ${this.config.leftNavButtonText??""}
1460
- </button> `}static get styles(){const e=r.AH`var(--modalLogoSize, 6.5rem)`,t=r.AH`var(--processingImageSize, 7.5rem)`,n=r.AH`var(--modalCornerRadius, 1rem)`,o=r.AH`var(--modalBorder, 2px solid black)`,i=r.AH`var(--modalBottomMargin, 2.5rem)`,a=r.AH`var(--modalTopMargin, 5rem)`,s=r.AH`var(--modalHeaderBottomPadding, 0.5em)`,l=r.AH`var(--modalBottomPadding, 2rem)`,c=r.AH`var(--modalScrollOffset, 5px)`,u=r.AH`var(--modalTitleFontSize, 1.8rem)`,d=r.AH`var(--modalSubtitleFontSize, 1.4rem)`,h=r.AH`var(--modalHeadlineFontSize, 1.6rem)`,p=r.AH`var(--modalMessageFontSize, 1.4rem)`,f=r.AH`var(--modalTitleLineHeight, normal)`,m=r.AH`var(--modalSubtitleLineHeight, normal)`,v=r.AH`var(--modalHeadlineLineHeight, normal)`,b=r.AH`var(--modalMessageLineHeight, normal)`;return r.AH`
1461
- .processing-logo {
1462
- margin: auto;
1463
- width: ${t};
1464
- height: ${t};
1465
- }
1466
-
1467
- .processing-logo.hidden {
1468
- height: 1rem;
1469
- }
1470
-
1471
- .processing-logo.hidden ia-activity-indicator {
1472
- display: none;
1473
- }
1474
-
1475
- .modal-wrapper {
1476
- outline: none;
1477
- }
1478
-
1479
- .modal-container {
1480
- border-radius: ${n};
1481
- width: 100%;
1482
- margin-top: ${a};
1483
- }
1484
-
1485
- header {
1486
- position: relative;
1487
- background-color: #36a483;
1488
- color: white;
1489
- border-radius: calc(${n}) calc(${n}) 0 0;
1490
- border: ${o};
1491
- border-bottom: 0;
1492
- text-align: center;
1493
- padding-bottom: ${s};
1494
- }
1495
-
1496
- .title {
1497
- margin: 0;
1498
- padding: 0;
1499
- font-size: ${u};
1500
- font-weight: bold;
1501
- line-height: ${f};
1502
- }
1503
-
1504
- .subtitle {
1505
- margin: 0;
1506
- padding: 0;
1507
- font-weight: normal;
1508
- padding-top: 0;
1509
- font-size: ${d};
1510
- line-height: ${m};
1511
- }
1512
-
1513
- .modal-body {
1514
- background-color: #fbfbfd;
1515
- border-radius: 0 0 calc(${n}) calc(${n});
1516
- border: ${o};
1517
- border-top: 0;
1518
- padding: 0 1rem calc(${l} - ${c}) 1rem;
1519
- color: #333;
1520
- margin-bottom: 2.5rem;
1521
- min-height: 5rem;
1522
- }
1523
-
1524
- .content {
1525
- overflow-y: auto;
1526
- max-height: calc(100vh - (16.5rem + ${i}));
1527
- min-height: 5rem;
1528
- padding: 0 0 calc(${c}) 0;
1529
- }
1530
-
1531
- .headline {
1532
- font-size: ${h};
1533
- font-weight: bold;
1534
- text-align: center;
1535
- line-height: ${v};
1536
- margin: 0;
1537
- padding: 0;
1538
- }
1539
-
1540
- .message {
1541
- margin: 1rem 0 0 0;
1542
- text-align: center;
1543
- font-size: ${p};
1544
- line-height: ${b};
1545
- }
1546
-
1547
- .logo-icon {
1548
- border-radius: 100%;
1549
- border: 3px solid #fff;
1550
- box-shadow:
1551
- 0 0 0 1px rgba(0, 0, 0, 0.18),
1552
- 0 2px 2px 0 rgba(0, 0, 0, 0.08);
1553
- width: ${e};
1554
- height: ${e};
1555
- margin: -2.9rem auto 0.5rem auto;
1556
- background-color: black;
1557
- display: flex;
1558
- justify-content: center;
1559
- align-items: center;
1560
- }
1561
-
1562
- .logo-icon svg {
1563
- width: calc(${e} * 0.65);
1564
- height: calc(${e} * 0.65);
1565
- }
1566
-
1567
- .logo-icon svg .fill-color {
1568
- fill: white;
1569
- }
1570
-
1571
- .logo-icon svg .stroke-color {
1572
- stroke: red;
1573
- }
1574
-
1575
- .close-button {
1576
- position: absolute;
1577
- right: 1.2rem;
1578
- top: 1.2rem;
1579
- width: 2rem;
1580
- height: 2rem;
1581
- border-radius: 100%;
1582
- border: 0;
1583
- padding: 0;
1584
- cursor: pointer;
1585
- background-color: white;
1586
- box-shadow:
1587
- 0 0 0 1px rgba(0, 0, 0, 0.18),
1588
- 0 4px 4px 0 rgba(0, 0, 0, 0.08);
1589
- }
1590
-
1591
- .back-button {
1592
- position: absolute;
1593
- left: 1.2rem;
1594
- top: 1.2rem;
1595
- height: 2rem;
1596
- background-color: transparent;
1597
- outline: none;
1598
- border: none;
1599
- padding: 0;
1600
- cursor: pointer;
1601
- color: white;
1602
- font-family: inherit;
1603
- display: flex;
1604
- flex-direction: row;
1605
- align-items: center;
1606
- gap: 0.5rem;
1607
- }
1608
-
1609
- .back-button svg {
1610
- height: 1.5rem;
1611
- }
1612
-
1613
- .sr-only {
1614
- position: absolute;
1615
- width: 1px;
1616
- height: 1px;
1617
- padding: 0;
1618
- margin: -1px;
1619
- overflow: hidden;
1620
- clip: rect(0, 0, 0, 0);
1621
- border: 0;
1622
- }
1623
-
1624
- slot::slotted(.sr-only) {
1625
- position: absolute;
1626
- width: 1px;
1627
- height: 1px;
1628
- padding: 0;
1629
- margin: -1px;
1630
- overflow: hidden;
1631
- clip: rect(0, 0, 0, 0);
1632
- border: 0;
1633
- }
1634
- `}};var nt;(0,o.Cg)([(0,i.MZ)({type:Object})],tt.prototype,"config",void 0),tt=(0,o.Cg)([(0,i.EM)("modal-template")],tt),function(e){e.Open="open",e.Closed="closed"}(nt||(nt={}));class rt{constructor(e){this.windowResizeThrottler=function(e,t,n){var r,o=n||{},i=o.noTrailing,a=void 0!==i&&i,s=o.noLeading,l=void 0!==s&&s,c=o.debounceMode,u=void 0===c?void 0:c,d=!1,h=0;function p(){r&&clearTimeout(r)}function f(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var s=this,c=Date.now()-h;function f(){h=Date.now(),t.apply(s,o)}function m(){r=void 0}d||(l||!u||r||f(),p(),void 0===u&&c>e?l?(h=Date.now(),a||(r=setTimeout(u?m:f,e))):f():!0!==a&&(r=setTimeout(u?m:f,void 0===u?e-c:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;p(),d=!n},f}(100,this.updateModalContainerHeight,{noLeading:!1,noTrailing:!1}).bind(this),this.modalManager=e}handleModeChange(e){switch(e){case nt.Open:this.startResizeListener(),this.stopDocumentScroll();break;case nt.Closed:this.stopResizeListener(),this.resumeDocumentScroll()}}updateModalContainerHeight(){this.modalManager.style.setProperty("--containerHeight",`${window.innerHeight}px`)}stopDocumentScroll(){document.body.classList.add("modal-manager-open")}resumeDocumentScroll(){document.body.classList.remove("modal-manager-open")}startResizeListener(){window.addEventListener("resize",this.windowResizeThrottler)}stopResizeListener(){window.removeEventListener("resize",this.windowResizeThrottler)}}let ot=class extends r.WF{constructor(){super(...arguments),this.mode=nt.Closed,this.hostBridge=new rt(this),this.modal=new Xe(this),this.closeOnBackdropClick=!0}async firstUpdated(){await new Promise(e=>setTimeout(e,0)),this.closeOnBackdropClick&&this.addEventListener("keydown",e=>{"Escape"===e.key&&this.backdropClicked()})}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate()}render(){return r.qy`
1635
- <div class="container">
1636
- <div class="backdrop" @click=${this.backdropClicked}></div>
1637
- <modal-template
1638
- @closeButtonPressed=${this.closeButtonPressed}
1639
- @leftNavButtonPressed=${this.callUserPressedLeftNavButtonCallback}
1640
- tabindex="-1"
1641
- >
1642
- ${this.customModalContent}
1643
- </modal-template>
1644
- </div>
1645
- `}getMode(){return this.mode}closeModal(){this.mode=nt.Closed,this.customModalContent=void 0,this.modalTemplate&&(this.modalTemplate.config=new We),this.modal.deactivate(),this.triggeringElement?.focus?.(),this.triggeringElement=void 0}callUserClosedModalCallback(){const e=this.userClosedModalCallback;this.userClosedModalCallback=void 0,e&&e()}callUserPressedLeftNavButtonCallback(){const e=this.userPressedLeftNavButtonCallback;this.userPressedLeftNavButtonCallback=void 0,e&&e()}async showModal(e){this.mode===nt.Closed&&this.captureFocusedElement(),this.closeOnBackdropClick=e.config.closeOnBackdropClick,this.userClosedModalCallback=e.userClosedModalCallback,this.userPressedLeftNavButtonCallback=e.userPressedLeftNavButtonCallback,this.customModalContent=e.customModalContent,this.mode=nt.Open,this.modalTemplate&&(this.modalTemplate.config=e.config,await this.modalTemplate.updateComplete,this.modalTemplate.focus()),this.modal.activate()}captureFocusedElement(){this.triggeringElement=Ne()}updated(e){e.has("mode")&&this.handleModeChange()}backdropClicked(){this.closeOnBackdropClick&&(this.closeModal(),this.callUserClosedModalCallback())}handleModeChange(){this.hostBridge.handleModeChange(this.mode),this.emitModeChangeEvent()}emitModeChangeEvent(){const e=new CustomEvent("modeChanged",{detail:{mode:this.mode}});this.dispatchEvent(e)}closeButtonPressed(){this.closeModal(),this.callUserClosedModalCallback()}static get styles(){const e=r.AH`var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`,t=r.AH`var(--modalBackdropZindex, 1000)`,n=r.AH`var(--modalWidth, 32rem)`,o=r.AH`var(--modalMaxWidth, 95%)`,i=r.AH`var(--modalZindex, 2000)`;return r.AH`
1646
- .container {
1647
- width: 100%;
1648
- height: 100%;
1649
- }
1650
-
1651
- .backdrop {
1652
- position: fixed;
1653
- top: 0;
1654
- left: 0;
1655
- background-color: ${e};
1656
- width: 100%;
1657
- height: 100%;
1658
- z-index: ${t};
1659
- }
1660
-
1661
- modal-template {
1662
- outline: 0;
1663
- position: fixed;
1664
- top: 0;
1665
- left: 50%;
1666
- transform: translate(-50%, 0);
1667
- z-index: ${i};
1668
- width: ${n};
1669
- max-width: ${o};
1670
- }
1671
- `}};(0,o.Cg)([(0,i.MZ)({type:String,reflect:!0})],ot.prototype,"mode",void 0),(0,o.Cg)([(0,i.MZ)({type:Object})],ot.prototype,"customModalContent",void 0),(0,o.Cg)([(0,i.MZ)({type:Object})],ot.prototype,"hostBridge",void 0),(0,o.Cg)([(0,i.P)("modal-template")],ot.prototype,"modalTemplate",void 0),ot=(0,o.Cg)([(0,i.EM)("modal-manager")],ot);class it{constructor(){this.resizeObserver=new ResizeObserver(e=>{window.requestAnimationFrame(()=>{for(const t of e){const e=this.resizeHandlers.get(t.target);null==e||e.forEach(e=>{e.handleResize(t)})}})}),this.resizeHandlers=new Map}shutdown(){this.resizeHandlers.forEach((e,t)=>{this.resizeObserver.unobserve(t)}),this.resizeHandlers.clear()}addObserver(e){var t;const n=null!==(t=this.resizeHandlers.get(e.target))&&void 0!==t?t:new Set;n.add(e.handler),this.resizeHandlers.set(e.target,n),this.resizeObserver.observe(e.target,e.options)}removeObserver(e){const t=this.resizeHandlers.get(e.target);t&&(t.delete(e.handler),0===t.size&&(this.resizeObserver.unobserve(e.target),this.resizeHandlers.delete(e.target)))}}var at=r.qy`
1672
- <svg
1673
- class="ia-logo"
1674
- viewBox="0 0 27 30"
1675
- xmlns="http://www.w3.org/2000/svg"
1676
- >
1677
- <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
1678
- <mask id="mask-2" class="fill-color">
1679
- <path d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z" id="path-1"></path>
1680
- </mask>
1681
- <use class="fill-color" xlink:href="#path-1"></use>
1682
- <g mask="url(#mask-2)" class="fill-color">
1683
- <path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>
1684
- </g>
1685
- </g>
1686
- </svg>
1687
- `;class st extends r.WF{static get styles(){return r.AH`
1688
- :host {
1689
- width: var(--iconWidth, 'auto');
1690
- height: var(--iconHeight, 'auto');
1691
- }
1692
-
1693
- .fill-color {
1694
- fill: var(--iconFillColor);
1695
- }
1696
-
1697
- .stroke-color {
1698
- stroke: var(--iconStrokeColor);
1699
- }
1700
- `}render(){return at}}customElements.define("ia-icon-ia-logo",st);var lt=r.qy`
1701
- <svg
1702
- viewBox="0 0 100 100"
1703
- xmlns="http://www.w3.org/2000/svg"
1704
- >
1705
- <path
1706
- class="fill-color"
1707
- fill="none"
1708
- d="m17.0555551 41.3194459c0-12.7430552 10.3541664-23.1027772 23.0847216-23.1027772 12.7166664 0 23.0777773 10.359722 23.0777773 23.1027772 0 12.7361108-10.3611109 23.0986106-23.0777773 23.0986106-12.7305552 0-23.0847216-10.3624998-23.0847216-23.0986106zm-17.24305512 0c0 22.2916661 18.04583292 40.3472213 40.32777672 40.3472213 8.9208332 0 17.145833-2.9319449 23.8194439-7.8527776l24.1513883 24.0777771c1.2125 1.1402778 2.8430555 1.8430556 4.6374999 1.8430556 3.7444443 0 6.7805554-3.0361111 6.7805554-6.7791665 0-2.0652778-.9222222-3.9069444-2.3736111-5.1499999l-23.718055-23.7458328c4.4152777-6.4791665 7.0152776-14.3055552 7.0152776-22.7402772 0-22.2791661-18.0458328-40.34861006-40.312499-40.34861006-22.2819438 0-40.32777672 18.06944396-40.32777672 40.34861006z" />
1709
- </svg>
1710
- `;class ct extends r.WF{static get styles(){return r.AH`
1711
- :host {
1712
- width: var(--iconWidth, 'auto');
1713
- height: var(--iconHeight, 'auto');
1714
- }
1715
-
1716
- .fill-color {
1717
- fill: var(--iconFillColor);
1718
- }
1719
-
1720
- .stroke-color {
1721
- stroke: var(--iconStrokeColor);
1722
- }
1723
- `}render(){return lt}}function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ht(r.key),r)}}function ht(e){var t=function(e){if("object"!=ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ut(t)?t:t+""}function pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pt=function(){return!!e})()}function ft(e){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ft(e)}function mt(e,t){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mt(e,t)}customElements.define("ia-icon-search",ct);var vt=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ft(t),function(e,t){if(t&&("object"==ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pt()?Reflect.construct(t,n||[],ft(e).constructor):t.apply(e,n))}(this,t,[e])).et=a.s6,e.type!==s.OA.CHILD)throw Error(n.constructor.directiveName+"() can only be used in child bindings");return n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mt(e,t)}(t,e),function(e,t){return t&&dt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(e){if(e===a.s6||null==e)return this.ft=void 0,this.et=e;if(e===a.c0)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;var t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}])}(s.WL);vt.directiveName="unsafeHTML",vt.resultType=1;var bt,yt,gt,kt,wt,Ct,xt,St,Ot,Mt,Bt,jt,Pt,Et,Lt,At,_t,zt,Tt=(0,s.u$)(vt),$t=(0,r.qy)(bt||(gt=['\n<svg height="10" viewBox="0 0 13 10" width="13" xmlns="http://www.w3.org/2000/svg">\n <path\n d="m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z"\n fill="#fff" fill-rule="evenodd" />\n</svg>\n'],kt||(kt=gt.slice(0)),bt=Object.freeze(Object.defineProperties(gt,{raw:{value:Object.freeze(kt)}})))),Ht=(0,r.AH)(yt||(yt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .ia-button {\n min-height: 3rem;\n border: none;\n cursor: pointer;\n color: var(--primaryTextColor);\n line-height: normal;\n border-radius: .4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n font-family: inherit;\n display: inline-block;\n padding: .6rem 1.2rem;\n border: 1px solid transparent;\n\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n\n .ia-button.link,\n .ia-button.external {\n min-height: unset;\n text-decoration: none;\n }\n\n .ia-button:disabled,\n .ia-button.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .ia-button.transparent {\n background-color: transparent;\n }\n \n .ia-button.slim {\n padding: 0;\n }\n\n .ia-button.primary {\n background-color: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n .ia-button.cancel {\n background-color: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .ia-button.external {\n background: var(--secondaryCTAFill);\n border-color: var(--secondaryCTABorder);\n }\n"]))),It=n(4535),qt=(0,r.AH)(wt||(wt=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .sr-only {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0 0 0 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n }\n"])));function Rt(e){e.prototype&&(e=e.prototype.render());var t=e.strings[0];return(0,r.AH)(["data:image/svg+xml;base64,".concat(btoa(t.replace(/\n/g," ")))])}function Ft(e){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(e)}function Dt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vt(r.key),r)}}function Vt(e){var t=function(e){if("object"!=Ft(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ft(t)?t:t+""}function Nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nt=function(){return!!e})()}function Zt(e){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zt(e)}function Ut(e,t){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ut(e,t)}n(5440);var Gt,Jt,Xt,Kt,Qt=Rt($t),Yt=Rt(Ke),en=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Zt(t),function(e,t){if(t&&("object"==Ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Nt()?Reflect.construct(t,n||[],Zt(e).constructor):t.apply(e,n))}(this,t)).results=[],e.query="",e.queryInProgress=!1,e.renderHeader=!1,e.renderSearchAllFiles=!1,e.errorMessage="",e.bindBookReaderListeners(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ut(e,t)}(t,e),function(e,t,n){return t&&Wt(e.prototype,t),n&&Wt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updated",value:function(){this.focusOnInputIfNecessary()}},{key:"bindBookReaderListeners",value:function(){document.addEventListener("BookReader:SearchCallback",this.setResults.bind(this))}},{key:"focusOnInputIfNecessary",value:function(){this.results.length||this.shadowRoot.querySelector("input[type='search']").focus()}},{key:"setResults",value:function(e){var t=e.detail;this.results=t.results}},{key:"setQuery",value:function(e){this.query=e.currentTarget.value,this.query||this.cancelSearch()}},{key:"performSearch",value:function(e){e.preventDefault();var t=e.currentTarget.querySelector('input[type="search"]');t&&t.value&&this.dispatchEvent(new CustomEvent("bookSearchInitiated",{bubbles:!0,composed:!0,detail:{query:this.query}}))}},{key:"selectResult",value:function(e){this.dispatchEvent(new CustomEvent("resultSelected",{bubbles:!0,composed:!0,detail:{match:e}})),this.dispatchEvent(new CustomEvent("closeMenu",{bubbles:!0,composed:!0}))}},{key:"cancelSearch",value:function(){this.queryInProgress=!1,this.dispatchSearchCanceled()}},{key:"dispatchSearchCanceled",value:function(){this.dispatchEvent(new Event("bookSearchCanceled"))}},{key:"resultsCount",get:function(){var e=this.results.length;return e?"".concat(e," result").concat(e>1?"s":""):r.s6}},{key:"headerSection",get:function(){var e=(0,r.qy)(Ct||(Ct=Dt(["<header>\n <h3>Search inside</h3>\n ","\n </header>"])),this.resultsCount?(0,r.qy)(xt||(xt=Dt(["(",")"])),this.resultsCount):r.s6);return this.renderHeader?e:r.s6}},{key:"searchMultipleControls",get:function(){var e=(0,r.qy)(St||(St=Dt(['\n <input name="all_files" id="all_files" type="checkbox" />\n <label class="checkbox" for="all_files">Search all files</label>\n '])));return this.renderSearchAllFiles?e:r.s6}},{key:"loadingIndicator",get:function(){return(0,r.qy)(Ot||(Ot=Dt(['\n <div class="loading">\n <ia-activity-indicator mode="processing" aria-hidden="true" role="presentation"></ia-activity-indicator>\n <p>Searching</p>\n <button class="ia-button external cancel-search" @click=',">Cancel</button>\n </div>\n "])),this.cancelSearch)}},{key:"resultsSet",get:function(){var e=this;return(0,r.qy)(Mt||(Mt=Dt(['\n <nav aria-label="Search results">\n <div>\n ','\n <a\n href="#"\n class="skip-link"\n @click=','\n >Skip to last result</a>\n </div>\n <ul class="results">\n ','\n </ul>\n <a\n href="#"\n class="skip-link"\n @click=',"\n >Skip to first result</a>\n </nav>\n "])),this.resultsCount,function(t){t.preventDefault(),e.shadowRoot.querySelector(".results li:last-child .result-item").focus()},this.results.map(function(t){return(0,r.qy)(Bt||(Bt=Dt(['\n <li>\n <button class="result-item" @click=','>\n <span class="page-num">Page ',"</span> — <span lang=",">","</span>\n </button>\n </li>\n "])),e.selectResult.bind(e,t),t.displayPageNumber,(0,It.J)(t.lang),Tt(t.html))}),function(t){t.preventDefault(),e.shadowRoot.querySelector(".results li:first-child .result-item").focus()})}},{key:"setErrorMessage",get:function(){return(0,r.qy)(jt||(jt=Dt(['\n <p class="error-message">',"</p>\n "])),this.errorMessage)}},{key:"render",value:function(){var e=!(this.queryInProgress||this.errorMessage||this.queryInProgress||this.results.length);return(0,r.qy)(Pt||(Pt=Dt(["\n ",'\n <form action="" method="get" @submit=',">\n ",'\n <input\n type="search"\n name="query"\n id="br-search-input"\n @keyup=',"\n @search=","\n .value=",'\n />\n <label class="search-cta ','" for="br-search-input">\n Please enter text to search for\n </label>\n </form>\n <div class="results-container" aria-live="polite">\n ',"\n ","\n ","\n </div>\n "])),this.headerSection,this.performSearch,this.searchMultipleControls,this.setQuery,this.setQuery,this.query,e?"":"sr-only",this.queryInProgress?this.loadingIndicator:r.s6,this.errorMessage?this.setErrorMessage:r.s6,this.results.length?this.resultsSet:r.s6)}}],[{key:"properties",get:function(){return{results:{type:Array},query:{type:String},queryInProgress:{type:Boolean},renderHeader:{type:Boolean},renderSearchAllFiles:{type:Boolean},errorMessage:{type:String}}}},{key:"styles",get:function(){var e=(0,r.AH)(Et||(Et=Dt(["var(--searchResultText, #adaedc)"]))),t=(0,r.AH)(Lt||(Lt=Dt(["var(--searchResultBg, #272958)"]))),n=(0,r.AH)(At||(At=Dt(["var(--searchResultBorder, #adaedc)"]))),o=(0,r.AH)(_t||(_t=Dt(["(--tertiaryBGColor, #333)"]))),i=(0,r.AH)(zt||(zt=Dt(["\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 1rem 2rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n .skip-link {\n position: absolute;\n left: -9999px;\n }\n .skip-link:focus {\n position: static;\n left: auto;\n }\n\n mark {\n padding: 0 .2rem;\n color: ",";\n background: ",";\n border: 1px solid ",';\n border-radius: 2px;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 2rem;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem 0 0;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n form {\n padding: 0 0 1rem 0;\n }\n\n [type="checkbox"] {\n display: none;\n }\n\n label {\n display: block;\n text-align: center;\n }\n\n label.checkbox {\n padding-bottom: .5rem;\n font-size: 1.6rem;\n line-height: 150%;\n vertical-align: middle;\n }\n\n label.checkbox:after {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n content: "";\n border-radius: 2px;\n }\n :checked + label.checkbox:after {\n background-image: url(\'','\');\n }\n\n label.checkbox[for="all_files"]:after {\n background: ',' 50% 50% no-repeat;\n border: 1px solid var(--primaryTextColor);\n }\n\n [type="search"] {\n color: var(--primaryTextColor);\n border: 1px solid var(--primaryTextColor);\n -webkit-appearance: textfield;\n width: 100%;\n height: 3rem;\n padding: 0 10px;\n box-sizing: border-box;\n font: normal 1.6rem "Helvetica qNeue", Helvetica, Arial, sans-serif;\n border-radius: 1.5rem;\n background: transparent;\n }\n [type="search"]:focus {\n outline: none;\n }\n [type="search"]::-webkit-search-cancel-button {\n width: 18px;\n height: 18px;\n margin-right: -5px;\n -webkit-appearance: none;\n appearance: none;\n -webkit-mask: url(\'',"') 0 0 no-repeat;\n mask: url('","') 0 0 no-repeat;\n -webkit-mask-size: 100%;\n mask-size: 100%;\n background: #fff;\n }\n\n .page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n .search-cta {\n padding: 10px 0;\n text-align: center;\n font-style: italic;\n }\n\n .results-container {\n padding-bottom: 2rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n margin: 0;\n list-style: none;\n }\n\n .result-item {\n cursor: pointer;\n margin-top: 8px;\n font-size: 12px;\n padding: 5px;\n border-radius: 4px;\n display: block;\n width: 100%;\n /* Reset button styles */\n background: none;\n border: none;\n text-align: left;\n font-family: inherit;\n transition: background-color 0.2s;\n }\n\n .result-item:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n\n .loading {\n text-align: center;\n }\n\n .loading p {\n padding: 0 0 1rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n ia-activity-indicator {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 auto;\n }\n "])),e,t,n,Qt,o,Yt,Yt);return[qt,Ht,i]}}])}(r.WF);function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function nn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,on(r.key),r)}}function on(e){var t=function(e){if("object"!=tn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tn(t)?t:t+""}customElements.define("ia-book-search-results",en);var an,sn,ln,cn,un,dn,hn,pn,fn,mn,vn,bn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},yn=function(){return function(e,t){return t&&rn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=t.onProviderChange,o=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onBookSearchInitiated=this.onBookSearchInitiated.bind(this),this.onSearchStarted=this.onSearchStarted.bind(this),this.onSearchRequestError=this.onSearchRequestError.bind(this),this.onSearchResultsClicked=this.onSearchResultsClicked.bind(this),this.onSearchResultsChange=this.onSearchResultsChange.bind(this),this.onSearchResultsCleared=this.onSearchResultsCleared.bind(this),this.searchCanceledInMenu=this.searchCanceledInMenu.bind(this),this.bindEventListeners=this.bindEventListeners.bind(this),this.getMenuDetails=this.getMenuDetails.bind(this),this.getComponent=this.getComponent.bind(this),this.updateMenu=this.updateMenu.bind(this),this.onProviderChange=n,this.bookreader=o,this.icon=(0,r.qy)(Gt||(Gt=nn(['\n <ia-icon-search\n aria-hidden="true" role="presentation"\n style="width: var(--iconWidth); height: var(--iconHeight);"\n ></ia-icon-search>']))),this.label="Search inside",this.menuDetails=this.getMenuDetails(),this.id="search",this.component=this.getComponent(),this.bindEventListeners()},[{key:"getMenuDetails",value:function(){var e=bn,t=e.resultsCount,n=e.query;if(e.queryInProgress||!n)return r.s6;var o=1===t?"result":"results";return(0,r.qy)(Jt||(Jt=nn(["("," ",")"])),t,o)}},{key:"bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:SearchStarted",this.onSearchStarted),window.addEventListener("BookReader:SearchCallback",this.onSearchResultsChange),window.addEventListener("BookReader:SearchCallbackEmpty",function(t){e.onSearchRequestError(t,"noResults")}),window.addEventListener("BookReader:SearchCallbackNotIndexed",function(t){e.onSearchRequestError(t,"notIndexed")}),window.addEventListener("BookReader:SearchCallbackError",function(t){e.onSearchRequestError(t)}),window.addEventListener("BookReader:SearchResultsCleared",function(){e.onSearchResultsCleared()}),window.addEventListener("BookReader:SearchCanceled",function(t){e.onSearchCanceled(t)})}},{key:"onSearchCanceled",value:function(){bn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu({searchCanceled:!0}),this.bookreader.urlPlugin&&this.updateSearchInUrl()}},{key:"onSearchStarted",value:function(e){var t=e.detail.props,n=t.term,r=void 0===n?"":n,o=t.instance;o&&(this.bookreader=o),bn.query=r,bn.results=[],bn.resultsCount=0,bn.queryInProgress=!0,bn.errorMessage="",this.updateMenu()}},{key:"onBookSearchInitiated",value:function(e){var t=e.detail;bn.query=t.query,this.bookreader.search(bn.query)}},{key:"onSearchRequestError",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",o=e.detail.props,i=o.instance,a=o.results;i&&(this.bookreader=i);var s={noResults:"0 results",notIndexed:"This book hasn't been indexed for searching yet. We've just started indexing it,\n so search should be available soon. Please try again later. Thanks!",default:"Sorry, there was an error with your search. Please try again."},l=null!==(t=s[n])&&void 0!==t?t:s.default;bn.query=(null==a?void 0:a.q)||"",bn.results=[],bn.resultsCount=0,bn.queryInProgress=!1,bn.errorMessage=(0,r.qy)(Xt||(Xt=nn(['<p class="error">',"</p>"])),l),this.updateMenu()}},{key:"onSearchResultsChange",value:function(e){var t=e.detail.props,n=void 0===t?{}:t,r=n.instance,o=void 0===r?null:r,i=n.results,a=void 0===i?[]:i;o&&(this.bookreader=o);var s=a.matches||[],l=s.length,c=a.q;bn={results:s,resultsCount:l,query:c,queryInProgress:!1,errorMessage:""},this.updateMenu()}},{key:"searchCanceledInMenu",value:function(){this.bookreader.plugins.search.cancelSearchRequest()}},{key:"onSearchResultsCleared",value:function(){bn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu({openMenu:!1}),this.bookreader.plugins.search.searchView.clearSearchFieldAndResults(!1),this.bookreader.urlPlugin&&this.updateSearchInUrl()}},{key:"updateSearchInUrl",value:function(){this.bookreader.urlPlugin&&(this.bookreader.urlPlugin.pullFromAddressBar(),bn.query?this.bookreader.urlPlugin.setUrlParam("q",bn.query):this.bookreader.urlPlugin.removeUrlParam("q"))}},{key:"updateMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.menuDetails=this.getMenuDetails(),this.component=this.getComponent(),this.onProviderChange(this.bookreader,e)}},{key:"getComponent",value:function(){var e=bn,t=e.query,n=e.results,o=e.queryInProgress,i=e.errorMessage;return(0,r.qy)(Kt||(Kt=nn(["\n <ia-book-search-results\n .query=","\n .results=","\n .errorMessage=","\n ?queryInProgress=","\n ?renderSearchAllFiles=","\n @resultSelected=","\n @bookSearchInitiated=","\n @bookSearchResultsCleared=","\n @bookSearchCanceled=","\n ></ia-book-search-results>\n "])),t,n,i,o,!1,this.onSearchResultsClicked,this.onBookSearchInitiated,this.onSearchResultsCleared,this.searchCanceledInMenu)}},{key:"onSearchResultsClicked",value:function(e){var t=e.detail;this.bookreader.plugins.search.jumpToMatch(t.match.matchIndex)}}])}(),gn=(n(2712),r.qy`
1724
- <svg
1725
- viewBox="0 0 100 100"
1726
- xmlns="http://www.w3.org/2000/svg"
1727
- >
1728
- <g class="fill-color">
1729
-
1730
- <path d="m50 80 33.3333333-43.3333333h-20v-36.6666667h-26.6666666v36.6666667h-20zm50 20v-13.3333333h-100v13.3333333z"/>
1731
- </g>
1732
- </svg>
1733
- `);class kn extends r.WF{static get styles(){return r.AH`
1734
- :host {
1735
- width: var(--iconWidth, 'auto');
1736
- height: var(--iconHeight, 'auto');
1737
- }
1738
-
1739
- .fill-color {
1740
- fill: var(--iconFillColor);
1741
- }
1742
-
1743
- .stroke-color {
1744
- stroke: var(--iconStrokeColor);
1745
- }
1746
- `}render(){return gn}}function wn(e){return wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(e)}function Cn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sn(r.key),r)}}function Sn(e){var t=function(e){if("object"!=wn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wn(t)?t:t+""}function On(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(On=function(){return!!e})()}function Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}function Bn(e,t){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bn(e,t)}customElements.define("ia-icon-dl",kn);var jn,Pn,En=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Mn(t),function(e,t){if(t&&("object"==wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,On()?Reflect.construct(t,n||[],Mn(e).constructor):t.apply(e,n))}(this,t)).downloads=[],e.expiration=0,e.renderHeader=!1,e.isBookProtected=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bn(e,t)}(t,e),function(e,t,n){return t&&xn(e.prototype,t),n&&xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"formatsCount",get:function(){var e=this.downloads.length;return e?(0,r.qy)(an||(an=Cn(["<p>"," format","</p>"])),e,e>1?"s":""):(0,r.qy)(sn||(sn=Cn([""])))}},{key:"loanExpiryMessage",get:function(){return this.expiration?(0,r.qy)(ln||(ln=Cn(["<h2>These files will expire in "," days.</h2>"])),this.expiration):(0,r.qy)(cn||(cn=Cn([""])))}},{key:"renderDownloadOptions",value:function(){return this.downloads.map(function(e){return(0,r.qy)(un||(un=Cn(['\n <li>\n <a class="ia-button link primary" href="','">Get ',"</a>\n ","\n </li>\n "])),e.url,e.type,e.note?(0,r.qy)(dn||(dn=Cn(["<p>","</p>"])),e.note):(0,r.qy)(hn||(hn=Cn([""]))))})}},{key:"hasLCPOption",get:function(){var e=/^(LCP)/g;return this.downloads.some(function(t){var n;return null===(n=t.type)||void 0===n?void 0:n.match(e)})}},{key:"header",get:function(){return this.renderHeader?(0,r.qy)(pn||(pn=Cn(["\n <header>\n <h3>Downloadable files</h3>\n ","\n </header>\n "])),this.formatsCount):r.s6}},{key:"installLCPSoftwareMsg",get:function(){return(0,r.qy)(fn||(fn=Cn(['\n <p>For LCP downloads, make sure you have LCP software such as <a href="https://thorium.edrlab.org/" rel="noopener noreferrer nofollow" target="_blank">Thorium (desktop)</a>, <a href="https://apps.apple.com/us/app/cantook-by-aldiko/id1476410111" rel="noopener noreferrer nofollow" target="_blank">Cantook (iOS)</a> or <a href="https://play.google.com/store/apps/details?id=com.aldiko.android" rel="noopener noreferrer nofollow" target="_blank">Cantook (Android)</a> installed on your device.</p>\n '])))}},{key:"render",value:function(){return(0,r.qy)(mn||(mn=Cn(["\n ","\n ","\n <ul>","</ul>\n ","\n "])),this.header,this.loanExpiryMessage,this.renderDownloadOptions(),this.hasLCPOption?this.installLCPSoftwareMsg:r.s6)}}],[{key:"properties",get:function(){return{downloads:{type:Array},expiration:{type:Number},renderHeader:{type:Boolean},isBookProtected:{type:Boolean}}}},{key:"styles",get:function(){var e=(0,r.AH)(vn||(vn=Cn(["\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n a.close ia-icon {\n --iconWidth: 18px;\n --iconHeight: 18px;\n }\n a.close {\n justify-self: end;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n header div {\n display: flex;\n align-items: baseline;\n } \n\n h2 {\n font-size: 1.6rem;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n p {\n margin: .3rem 0 0 0;\n }\n\n li,\n ul + p {\n padding-bottom: 1.2rem;\n font-size: 1.2rem;\n line-height: 140%;\n }\n "])));return[Ht,e]}}])}(r.WF);function Ln(e){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ln(e)}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tn(r.key),r)}}function Tn(e){var t=function(e){if("object"!=Ln(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ln(t)?t:t+""}customElements.define("ia-book-downloads",En);var $n={pdf:{type:"Encrypted Adobe PDF",url:"#",note:"PDF files contain high quality images of pages."},lcppdf:{type:"Get LCP PDF",url:"#",note:"PDF files contain high quality images of pages."},lcpepub:{type:"Get LCP ePub",url:"#",note:"ePub files are smaller in size, but may contain errors."},epub:{type:"Encrypted Adobe ePub",url:"#",note:"ePub files are smaller in size, but may contain errors."}},Hn={pdf:"PDF",epub:"ePub",lcppdf:"LCP PDF",lcpepub:"LCP ePub"},In=function(){return function(e,t){return t&&zn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n,o=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.icon=(0,r.qy)(jn||(jn=_n(['<ia-icon-dl aria-hidden="true" role="presentation" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-dl>']))),this.label="Downloadable files",this.menuDetails="",this.downloads=[],this.id="downloads",this.component="",this.isBookProtected=(null==o||null===(n=o.options)||void 0===n?void 0:n.isProtected)||!1},[{key:"update",value:function(e){this.computeAvailableTypes(e),this.component=this.menu,this.component.isBookProtected=this.isBookProtected;var t=1===this.downloads.length?"":"s";this.menuDetails="(".concat(this.downloads.length," format").concat(t,")")}},{key:"computeAvailableTypes",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return An(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),r=n[0],o=void 0===r?"":r,i=n[1],a=void 0===i?"":i,s=o.toLowerCase(),l=$n[s]||null;if(l){var c=e.isBookProtected?$n[s].type:Hn[s],u=Object.assign({},l,{url:a,type:c});t.push(u)}return t},[]);this.downloads=t}},{key:"menu",get:function(){return(0,r.qy)(Pn||(Pn=_n(["<ia-book-downloads .downloads=","></ia-book-downloads>"])),this.downloads)}}])}(),qn=r.qy`
1747
- <svg
1748
- viewBox="0 0 24 24"
1749
- xmlns="http://www.w3.org/2000/svg"
1750
- >
1751
- <path class="fill-color" d="m12 0c6.627417 0 12 5.372583 12 12s-5.372583 12-12 12-12-5.372583-12-12 5.372583-12 12-12zm0 2v20l.2664041-.0034797c5.399703-.1412166 9.7335959-4.562751 9.7335959-9.9965203 0-5.5228475-4.4771525-10-10-10z" fill-rule="evenodd" />
1752
- </svg>
1753
- `;class Rn extends r.WF{static get styles(){return r.AH`
1754
- :host {
1755
- width: var(--iconWidth, 'auto');
1756
- height: var(--iconHeight, 'auto');
1757
- }
1758
-
1759
- .fill-color {
1760
- fill: var(--iconFillColor);
1761
- }
1762
-
1763
- .stroke-color {
1764
- stroke: var(--iconStrokeColor);
1765
- }
1766
- `}render(){return qn}}customElements.define("ia-icon-visual-adjustment",Rn);var Fn=r.qy`
1767
- <svg
1768
- viewBox="0 0 100 100"
1769
- xmlns="http://www.w3.org/2000/svg"
1770
- >
1771
- <g
1772
- class="fill-color"
1773
- fill="none"
1774
- fill-rule="nonzero"
1775
- >
1776
- <path d="m2.3239824 87.3815869 25.8938394-23.8143095c-4.5929593-6.6937643-6.889439-14.1059452-6.889439-22.2365428 0-7.1360431 1.7567382-13.7186647 5.2702146-19.7478649 3.5134763-6.0292002 8.2852035-10.8003118 14.3151815-14.31333499 6.029978-3.51302314 12.6134488-5.26953471 19.7504125-5.26953471s13.7204346 1.75651157 19.7504126 5.26953471c6.029978 3.51302319 10.8017051 8.28413479 14.3151815 14.31333499 3.5134763 6.0292002 5.2702145 12.6118218 5.2702145 19.7478649s-1.7567382 13.7324143-5.2702145 19.7891137c-3.5134764 6.0566994-8.2852035 10.8415607-14.3151815 14.3545838-6.029978 3.5130232-12.6134489 5.2695347-19.7504126 5.2695347-8.5762743 0-16.3217363-2.5723212-23.2363861-7.7169637l-26.3063807 24.2302349c-1.27200216 1.1618413-2.76631826 1.742762-4.48294825 1.742762-1.826641 0-3.38971397-.6496687-4.68921892-1.949006s-1.94925743-2.8622087-1.94925743-4.688614c0-1.9364022.7746608-3.5955208 2.3239824-4.9773557zm58.3436469-19.9162976c7.1919692 0 13.3331041-2.5585716 18.4234048-7.6757149s7.635451-11.2712357 7.635451-18.4622772-2.5451503-13.3313843-7.635451-18.4210284-11.2314356-7.6344661-18.4234048-7.6344661-13.3331042 2.544822-18.4234049 7.6344661-7.635451 11.2299869-7.635451 18.4210284 2.5451503 13.3451339 7.635451 18.4622772 11.2314357 7.6757149 18.4234049 7.6757149zm-14.9374313-21.3256316h31.2878163v-9.5422233h-31.2878163z"/>
1777
- </g>
1778
- </svg>
1779
- `;class Dn extends r.WF{static get styles(){return r.AH`
1780
- :host {
1781
- width: var(--iconWidth, 'auto');
1782
- height: var(--iconHeight, 'auto');
1783
- }
1784
-
1785
- .fill-color {
1786
- fill: var(--iconFillColor);
1787
- }
1788
-
1789
- .stroke-color {
1790
- stroke: var(--iconStrokeColor);
1791
- }
1792
- `}render(){return Fn}}customElements.define("ia-icon-magnify-minus",Dn);var Wn,Vn,Nn,Zn,Un,Gn,Jn,Xn=r.qy`
1793
- <svg
1794
- viewBox="0 0 100 100"
1795
- xmlns="http://www.w3.org/2000/svg"
1796
- >
1797
- <g
1798
- class="fill-color"
1799
- fill="none"
1800
- fill-rule="nonzero"
1801
- >
1802
- <path d="m2.40305276 87.4017263 25.81133064-23.7730295c-4.5356618-6.5723551-6.8034928-14.000283-6.8034928-22.2837838 0-7.1236734 1.7429868-13.6948847 5.2289603-19.7136338 3.4859736-6.0187491 8.2577006-10.7953163 14.3151813-14.32970144 6.0574806-3.53438517 12.6547027-5.30157776 19.7916662-5.30157776 10.8429591 0 20.0964884 3.85236545 27.760588 11.5570964 7.6640996 7.7047309 11.4950036 16.9684802 11.4927136 27.791248 0 10.8799585-3.8309059 20.1574336-11.4927136 27.8324254-7.6618077 7.6749917-16.915337 11.5124876-27.760588 11.5124876-8.6312796 0-16.431747-2.5678624-23.4014021-7.7035871l-26.1413636 24.188234c-1.21699671 1.2147305-2.73881553 1.8220957-4.56545649 1.8220957s-3.3897139-.6485425-4.68921882-1.9456276c-1.29950493-1.297085-1.94925739-2.8572473-1.94925739-4.6804867 0-1.8781426.80216353-3.5343852 2.4064906-4.9687279zm58.34020784-19.878343c7.1369635 0 13.264347-2.5678623 18.3821503-7.7035871 5.1178034-5.1357247 7.676705-11.2928753 7.676705-18.4714518s-2.5589016-13.3082755-7.676705-18.3890972c-5.1178033-5.0808217-11.2451868-7.6212325-18.3821503-7.6212325-7.2469746 0-13.4156121 2.5404108-18.5059127 7.6212325s-7.6354509 11.2105207-7.6354509 18.3890972 2.5589016 13.3357271 7.676705 18.4714518c5.1178033 5.1357248 11.2726895 7.7035871 18.4646586 7.7035871zm-13.3594607-21.8685793h10.206958v10.1879511h7.2194718v-10.1879511h10.206958v-7.206028h-10.206958v-10.187951h-7.2194718v10.187951h-10.206958z"/>
1803
- </g>
1804
- </svg>
1805
- `;class Kn extends r.WF{static get styles(){return r.AH`
1806
- :host {
1807
- width: var(--iconWidth, 'auto');
1808
- height: var(--iconHeight, 'auto');
1809
- }
1810
-
1811
- .fill-color {
1812
- fill: var(--iconFillColor);
1813
- }
1814
-
1815
- .stroke-color {
1816
- stroke: var(--iconStrokeColor);
1817
- }
1818
- `}render(){return Xn}}function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function Yn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function er(e){return function(e){if(Array.isArray(e))return tr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return tr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rr(r.key),r)}}function rr(e){var t=function(e){if("object"!=Qn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qn(t)?t:t+""}function or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(or=function(){return!!e})()}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}function ar(e,t){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ar(e,t)}customElements.define("ia-icon-magnify-plus",Kn);var sr,lr,cr=function(e){return"visualAdjustment".concat(e)},ur={optionChange:cr("OptionChanged"),zoomIn:cr("ZoomIn"),zoomOut:cr("ZoomOut")},dr=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=ir(t),function(e,t){if(t&&("object"==Qn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,or()?Reflect.construct(t,n||[],ir(e).constructor):t.apply(e,n))}(this,t)).activeCount=0,e.options=[],e.renderHeader=!1,e.showZoomControls=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ar(e,t)}(t,e),function(e,t,n){return t&&nr(e.prototype,t),n&&nr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"firstUpdated",value:function(){this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent()}},{key:"activeOptions",get:function(){return this.options.reduce(function(e,t){return t.active?[].concat(er(e),[t.id]):e},[])}},{key:"prepareEventDetails",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{options:this.options,activeCount:this.activeCount,changedOptionId:e}}},{key:"emitOptionChangedEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.prepareEventDetails(e);this.dispatchEvent(new CustomEvent(ur.optionChange,{bubbles:!0,composed:!0,detail:t}))}},{key:"emitZoomIn",value:function(){this.dispatchEvent(new CustomEvent(ur.zoomIn))}},{key:"emitZoomOut",value:function(){this.dispatchEvent(new CustomEvent(ur.zoomOut))}},{key:"changeActiveStateFor",value:function(e){var t=er(this.options),n=t.find(function(t){return t.id===e});if(n.active=!n.active,this.options=t,this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent(n.id),n.active&&void 0!==n.value){var r=this.shadowRoot.querySelector('input[name="'.concat(n.id,'_range"]'));requestAnimationFrame(function(){null==r||r.focus()})}}},{key:"setRangeValue",value:function(e,t){var n=er(this.options);n.find(function(t){return t.id===e}).value=t,this.options=er(n)}},{key:"rangeSlider",value:function(e){var t=this;return(0,r.qy)(Wn||(Wn=Yn(["\n <label class=",'>\n <span class="sr-only">','</span>\n <input\n type="range"\n name="','_range"\n min=',"\n max=","\n step=","\n .value=","\n aria-valuetext=","\n @input=","\n @change=",'\n />\n <span aria-hidden="true">',"%</span>\n </label>\n "])),"range".concat(e.active?" visible":""),e.name,e.id,e.min||0,e.max||100,e.step||1,e.value,"".concat(e.value,"%"),function(n){return t.setRangeValue(e.id,n.target.value)},function(){return t.emitOptionChangedEvent()},e.value)}},{key:"adjustmentCheckbox",value:function(e){var t=this;return(0,r.qy)(Vn||(Vn=Yn(['\n <div\n class="adjustment-option ','">\n <label class="checkbox-label">\n ','\n <input\n type="checkbox"\n @change=',"\n ?checked=","\n />\n </label>\n ","\n </div>\n "])),m({active:e.active,"has-range":void 0!==e.value}),e.name,function(){return t.changeActiveStateFor(e.id)},e.active,void 0!==e.value?this.rangeSlider(e):r.s6)}},{key:"headerSection",get:function(){var e=this.activeCount?(0,r.qy)(Nn||(Nn=Yn(["<p>("," active)</p>"])),this.activeCount):r.s6,t=(0,r.qy)(Zn||(Zn=Yn(["<header>\n <h3>Visual adjustments</h3>\n ","\n </header>"])),e);return this.renderHeader?t:r.s6}},{key:"zoomControls",get:function(){return(0,r.qy)(Un||(Un=Yn(['\n <h4>Adjust zoom</h4>\n <button class="zoom_out" @click=',' title="Zoom out" aria-label="Zoom out">\n <ia-icon-magnify-minus aria-hidden="true" role="presentation"></ia-icon-magnify-minus>\n </button>\n <button class="zoom_in" @click=',' title="Zoom in" aria-label="Zoom in">\n <ia-icon-magnify-plus aria-hidden="true" role="presentation"></ia-icon-magnify-plus>\n </button>\n '])),this.emitZoomOut,this.emitZoomIn)}},{key:"render",value:function(){return(0,r.qy)(Gn||(Gn=Yn(["\n ","\n ","\n ","\n "])),this.headerSection,$e(this.options,function(e){return e.id},this.adjustmentCheckbox.bind(this)),this.showZoomControls?this.zoomControls:r.s6)}}],[{key:"properties",get:function(){return{activeCount:{type:Number},options:{type:Array},renderHeader:{type:Boolean},showZoomControls:{type:Boolean}}}},{key:"styles",get:function(){var e=(0,r.AH)(Jn||(Jn=Yn(['\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n padding: 10px 10px 0 0;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n .adjustment-option {\n border: 2px solid transparent;\n border-radius: 4px;\n margin-bottom: 4px;\n }\n .adjustment-option.has-range.active {\n border: 2px solid rgba(255, 255, 255, 0.2);\n }\n\n .checkbox-label {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1.4rem;\n font-weight: bold;\n cursor: pointer;\n padding: 6px 8px;\n transition: background-color 0.2s;\n border-radius: inherit;\n }\n .checkbox-label:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n .adjustment-option.has-range.active > .checkbox-label {\n border-radius: 4px 4px 0 0;\n }\n\n [type="checkbox"] {\n transform: scale(1.5);\n }\n\n .range {\n display: none;\n padding: 10px;\n align-items: center;\n gap: 10px;\n }\n .range.visible {\n display: flex;\n }\n .range input[type="range"] {\n flex: 1;\n }\n\n h4 {\n padding: 1rem 0;\n margin: 0;\n font-size: 1.4rem;\n }\n\n button {\n -webkit-appearance: none;\n appearance: none;\n border: none;\n background: transparent;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n transition: background-color 0.2s;\n border-radius: 4px;\n }\n\n button:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n '])));return[qt,e]}}])}(r.WF);function hr(e){return hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(e)}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vr(r.key),r)}}function vr(e){var t=function(e){if("object"!=hr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hr(t)?t:t+""}customElements.define("ia-book-visual-adjustments",dr);var br,yr,gr=[{id:"brightness",name:"Adjust brightness",active:!1,min:0,max:200,step:1,value:120},{id:"contrast",name:"Adjust contrast",active:!1,min:0,max:200,step:1,value:120},{id:"invert",name:"Invert colors (dark mode)",active:!1},{id:"grayscale",name:"Convert to grayscale",active:!1}],kr=function(){return function(e,t){return t&&mr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=t.onProviderChange,o=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onProviderChange=n,this.bookContainer=o.refs.$brContainer,this.bookreader=o,this.onAdjustmentChange=this.onAdjustmentChange.bind(this),this.optionUpdateComplete=this.optionUpdateComplete.bind(this),this.updateOptionsCount=this.updateOptionsCount.bind(this),this.onZoomIn=this.onZoomIn.bind(this),this.onZoomOut=this.onZoomOut.bind(this),this.activeCount=0,this.icon=(0,r.qy)(sr||(sr=fr(['<ia-icon-visual-adjustment aria-hidden="true" role="presentation" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-visual-adjustment>']))),this.label="Visual Adjustments",this.menuDetails=this.updateOptionsCount(),this.id="visualAdjustments",this.component=(0,r.qy)(lr||(lr=fr(["\n <ia-book-visual-adjustments\n .options=","\n @visualAdjustmentOptionChanged=","\n @visualAdjustmentZoomIn=","\n @visualAdjustmentZoomOut=","\n ></ia-book-visual-adjustments>\n "])),gr,this.onAdjustmentChange,this.onZoomIn,this.onZoomOut)},[{key:"onZoomIn",value:function(){this.bookreader.zoom(1)}},{key:"onZoomOut",value:function(){this.bookreader.zoom(-1)}},{key:"onAdjustmentChange",value:function(e){var t=e.detail,n={brightness:function(e){return"brightness(".concat(e,"%)")},contrast:function(e){return"contrast(".concat(e,"%)")},grayscale:function(){return"grayscale(100%)"},invert:function(){return"invert(100%)"}},r=t.options.reduce(function(e,t){var r="".concat(t.active?n[t.id](t.value):"");return r?[].concat(function(e){return function(e){if(Array.isArray(e))return pr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),[r]):e},[]).join(" ");this.bookContainer.css("filter",r),this.optionUpdateComplete(e)}},{key:"optionUpdateComplete",value:function(e){this.activeCount=e.detail.activeCount,this.updateOptionsCount(e),this.onProviderChange()}},{key:"updateOptionsCount",value:function(){this.menuDetails="(".concat(this.activeCount," active)")}}])}();function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}function Cr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sr(r.key),r)}}function Sr(e){var t=function(e){if("object"!=wr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wr(t)?t:t+""}function Or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Or=function(){return!!e})()}function Mr(e){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mr(e)}function Br(e,t){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Br(e,t)}var jr,Pr,Er=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Mr(t),function(e,t){if(t&&("object"==wr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Or()?Reflect.construct(t,n||[],Mr(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Br(e,t)}(t,e),function(e,t,n){return t&&xr(e.prototype,t),n&&xr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this;return(0,r.qy)(br||(br=Cr(['\n <div>\n <button class="delete" @click=',">Delete</button>\n <button @click=",">Cancel</button>\n </div>\n "])),function(){return e.deleteAction({detail:{id:"".concat(e.pageID)}})},function(){return e.cancelAction()})}}],[{key:"styles",get:function(){return(0,r.AH)(yr||(yr=Cr(['\n div {\n display: flex;\n justify-content: center;\n padding-top: 2rem;\n }\n\n button {\n appearance: none;\n padding: 0.5rem 1rem;\n margin: 0 .5rem;\n box-sizing: border-box;\n font: 1.3rem "Helvetica Neue", Helvetica, Arial, sans-serif;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n background: var(--primaryCTAFill);\n }\n\n .delete {\n background: var(--primaryErrorCTAFill);\n }\n '])))}},{key:"properties",get:function(){return{cancelAction:{type:Function},deleteAction:{type:Function},pageID:{type:String}}}}])}(r.WF);function Lr(e){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lr(e)}function Ar(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zr(r.key),r)}}function zr(e){var t=function(e){if("object"!=Lr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Lr(t)?t:t+""}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tr=function(){return!!e})()}function $r(e){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$r(e)}function Hr(e,t){return Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hr(e,t)}customElements.define("delete-modal-actions",Er);var Ir,qr=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=$r(t),function(e,t){if(t&&("object"==Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tr()?Reflect.construct(t,n||[],$r(e).constructor):t.apply(e,n))}(this,t)).state="hollow",e.side=void 0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hr(e,t)}(t,e),function(e,t,n){return t&&_r(e.prototype,t),n&&_r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleClick",value:function(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("bookmarkButtonClicked"))}},{key:"title",get:function(){return"".concat("hollow"===this.state?"Add":"Remove"," bookmark")}},{key:"render",value:function(){var e=this.side||"right";return(0,r.qy)(jr||(jr=Ar(["\n <button title="," @click="," class=",">\n <icon-bookmark state=",' aria-hidden="true"></icon-bookmark>\n </button>\n '])),this.title,this.handleClick,e,this.state)}}],[{key:"styles",get:function(){return(0,r.AH)(Pr||(Pr=Ar(["\n button {\n -webkit-appearance: none;\n appearance: none;\n outline: 0;\n border: none;\n padding: 0;\n height: 4rem;\n width: 4rem;\n background: transparent;\n cursor: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 16 24' width='16'%3E%3Cg fill='%23333' fill-rule='evenodd'%3E%3Cpath d='m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z'/%3E%3Cpath d='m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E\"), pointer;\n position: relative;\n }\n button > * {\n display: block;\n position: absolute;\n top: 0.2rem;\n }\n button.left > * {\n left: 0.2rem;\n }\n\n button.right > * {\n right: 0.2rem;\n }\n "])))}},{key:"properties",get:function(){return{side:{type:String},state:{type:String}}}}])}(r.WF);function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dr(r.key),r)}}function Dr(e){var t=function(e){if("object"!=Rr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Rr(t)?t:t+""}function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wr=function(){return!!e})()}function Vr(e){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vr(e)}function Nr(e,t){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nr(e,t)}customElements.define("bookmark-button",qr),n(4423),n(739),n(8940),n(3362),n(1699);var Zr,Ur,Gr,Jr,Xr,Kr,Qr,Yr,eo,to=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Vr(t),function(e,t){if(t&&("object"==Rr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wr()?Reflect.construct(t,n||[],Vr(e).constructor):t.apply(e,n))}(this,t)).url="https://archive.org/account/login",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nr(e,t)}(t,e),function(e,t,n){return t&&Fr(e.prototype,t),n&&Fr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return(0,r.qy)(Ir||(Ir=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <p>A free account is required to save and access bookmarks.</p>\n <a class="ia-button link primary" href="','">Log in</a>\n '])),this.url)}}],[{key:"properties",get:function(){return{url:{type:String}}}},{key:"styles",get:function(){return Ht}}])}(r.WF);function no(e){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},no(e)}function ro(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function io(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(n),!0).forEach(function(t){ao(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ao(e,t,n){return(t=po(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return lo(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,h.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=h.p,f=i[2];n>3?(o=f===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,h.v=r,h.n=i[1]):p<f&&(o=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,h.n=f,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),s=u,l=f;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(lo(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,lo(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,lo(d,"constructor",c),lo(c,"constructor",l),l.displayName="GeneratorFunction",lo(c,o,"GeneratorFunction"),lo(d),lo(d,o,"Generator"),lo(d,r,function(){return this}),lo(d,"toString",function(){return"[object Generator]"}),(so=function(){return{w:i,m:h}})()}function lo(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}lo=function(e,t,n,r){function i(t,n){lo(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},lo(e,t,n,r)}function co(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function uo(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){co(i,r,o,a,s,"next",e)}function s(e){co(i,r,o,a,s,"throw",e)}a(void 0)})}}function ho(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,po(r.key),r)}}function po(e){var t=function(e){if("object"!=no(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=no(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==no(t)?t:t+""}function fo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fo=function(){return!!e})()}function mo(e){return mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mo(e)}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vo(e,t)}customElements.define("bookmarks-login",to);var bo,yo={endpoint:"/services/bookmarks.php",headers:{"Content-Type":"application/json"},delete:function(e){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e),{credentials:"same-origin",method:"DELETE",headers:this.headers})},get:function(e){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e),{credentials:"same-origin",method:"GET",headers:this.headers})},getAll:function(){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier),{credentials:"same-origin",method:"GET",headers:this.headers})},post:function(e){return this.sendBookmarkData(e,"POST")},put:function(e){return this.sendBookmarkData(e,"POST")},sendBookmarkData:function(e,t){var n={note:e.note,color:e.color};return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e.id),{credentials:"same-origin",method:t,headers:this.headers,body:JSON.stringify({notes:n})})}},go=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=mo(t),function(e,t){if(t&&("object"==no(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fo()?Reflect.construct(t,n||[],mo(e).constructor):t.apply(e,n))}(this,t)).bookmarks=[],e.bookreader={},e.editedBookmark={},e.modal=void 0,e.loginOptions={loginClicked:function(){},loginUrl:""},e.displayMode="bookmarks",e.bookmarkColors=[{id:0,className:"red"},{id:1,className:"blue"},{id:2,className:"green"}],e.defaultColor=e.bookmarkColors[0],e.api=yo,e.deleteModalConfig=new We({title:"Delete Bookmark",headline:"This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?",headerColor:"#194880"}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vo(e,t)}(t,e),function(e,t,n){return t&&ho(e.prototype,t),n&&ho(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updated",value:function(e){e.has("displayMode")&&this.updateDisplay(),this.emitBookmarksChanged()}},{key:"setup",value:function(){this.api.identifier=this.getIdentifier(),"login"!==this.displayMode&&(this.fetchUserBookmarks(),this.setBREventListeners())}},{key:"getIdentifier",value:function(){return this.bookreader.bookId!==this.bookreader.subPrefix?"".concat(this.bookreader.bookId,"/").concat(this.bookreader.subPrefix):this.bookreader.bookId}},{key:"updateDisplay",value:function(){"bookmarks"===this.displayMode&&this.fetchUserBookmarks()}},{key:"fetchUserBookmarks",value:(o=uo(so().m(function e(){return so().w(function(e){for(;;)switch(e.n){case 0:if(this.api.identifier){e.n=1;break}return e.a(2);case 1:return e.n=2,this.fetchBookmarks();case 2:this.initializeBookmarks();case 3:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"setBREventListeners",value:function(){var e=this;["3PageViewSelected"].forEach(function(t){window.addEventListener("BookReader:".concat(t),function(t){setTimeout(function(){e.renderBookmarkButtons()},100)})}),["pageChanged","1PageViewSelected","2PageViewSelected"].forEach(function(t){window.addEventListener("BookReader:".concat(t),function(t){setTimeout(function(){e.renderBookmarkButtons(),e.markActiveBookmark()},100)})}),["zoomOut","zoomIn","resize"].forEach(function(t){window.addEventListener("BookReader:".concat(t),function(){e.renderBookmarkButtons()})})}},{key:"initializeBookmarks",value:function(){this.renderBookmarkButtons(),this.markActiveBookmark(!0),this.emitBookmarksChanged()}},{key:"formatBookmark",value:function(e){var n=e.leafNum,r=void 0===n?"":n,o=e.notes,i=void 0===o?{}:o,a=i.note,s=void 0===a?"":a,l=i.color,c={note:s,color:this.getBookmarkColor(l)?l:this.defaultColor.id},u=t.formatPage(this.bookreader.book.getPageNum(r)),d=this.bookreader.book.getPageURI("".concat(r).replace(/\D/g,""),32);return io(io({},c),{},{id:r,leafNum:r,page:u,thumbnail:d})}},{key:"fetchBookmarks",value:(n=uo(so().m(function e(){var t,n,r,o,i,a,s,l,c,u,d=this;return so().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.api.getAll().then(function(e){return e.text()});case 1:t=e.v;try{n=JSON.parse(t)}catch(e){n={error:e.message}}return o=(r=n).success,i=r.error,a=void 0===i?"Something happened while fetching bookmarks.":i,s=r.value,l=void 0===s?[]:s,o||null===(c=console)||void 0===c||c.warn("Error fetching bookmarks",a),u={},Object.keys(l).forEach(function(e){var t=l[e],n=parseInt(e,10),r=d.formatBookmark(io(io({},t),{},{leafNum:n}));u[e]=r}),this.bookmarks=u,e.a(2,u)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"emitBookmarksChanged",value:function(){this.dispatchEvent(new CustomEvent("bookmarksChanged",{bubbles:!0,composed:!0,detail:{bookmarks:this.bookmarks}}))}},{key:"emitBookmarkButtonClicked",value:function(){this.dispatchEvent(new CustomEvent("bookmarkButtonClicked",{bubbles:!0,composed:!0,detail:{editedBookmark:this.editedBookmark}}))}},{key:"bookmarkButtonClicked",value:function(e){this.getBookmark(e)?this.confirmDeletion(e):this.createBookmark(e)}},{key:"renderBookmarkButtons",value:function(){var e=this;this.bookreader.$(".BRpagecontainer").not(".BRemptypage").get().forEach(function(t){var n=t.querySelector(".bookmark-button");n&&n.remove();var o=+t.classList.value.match(/pagediv\d+/)[0].replace(/\D/g,""),i=e.getBookmark(o),a=i?"filled":"hollow";if(e.bookreader.book.getPage(o).isViewable){var s=document.createElement("div");["mousedown","mouseup"].forEach(function(e){s.addEventListener(e,function(e){return e.stopPropagation()})}),s.classList.add("bookmark-button",a),i&&s.classList.add(e.getBookmarkColor(i.color));var l="L"===t.getAttribute("data-side")&&e.bookreader.mode===e.bookreader.constMode2up?"left":"right";(0,r.XX)((0,r.qy)(Zr||(Zr=ro(["\n <bookmark-button\n @bookmarkButtonClicked=","\n state=","\n side=","\n ></bookmark-button>"])),function(){return e.bookmarkButtonClicked(o)},a,l),s),t.appendChild(s)}})}},{key:"markActiveBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.bookreader,n=t.mode,r=t.constMode2up,o=t.constModeThumb,i=this.bookreader.currentIndex();if(n!==o){if(n===r&&this.bookreader.displayedIndices.includes(+this.activeBookmarkID))return;this.bookmarks[i]?this.activeBookmarkID=i:this.activeBookmarkID=""}else{var a=this.bookmarks[i];e&&a&&(this.activeBookmarkID=i)}}},{key:"bookmarkEdited",value:function(e){var t=e.detail,n=t.bookmark.id===this.editedBookmark.id;this.editedBookmark=n?{}:t.bookmark}},{key:"getBookmark",value:function(e){return this.bookmarks[e]}},{key:"getBookmarkColor",value:function(e){var t;return null===(t=this.bookmarkColors.find(function(t){return t.id===e}))||void 0===t?void 0:t.className}},{key:"addBookmark",value:function(){var e=this.bookreader.currentIndex();if(this.bookreader.mode===this.bookreader.constMode2up){var t=this.bookreader.displayedIndices;e=t[t.length-1]}this.createBookmark(e)}},{key:"createBookmark",value:function(e){var t=this.getBookmark(e);if(t)return this.bookmarkEdited({detail:{bookmark:t}}),void this.emitBookmarkButtonClicked();this.editedBookmark=this.formatBookmark({leafNum:e}),this.api.post(this.editedBookmark),this.bookmarks[e]=this.editedBookmark,this.activeBookmarkID=e,this.disableAddBookmarkButton=!0,this.renderBookmarkButtons(),this.emitBookmarkButtonClicked()}},{key:"bookmarkSelected",value:function(e){var t=e.detail.bookmark.leafNum;this.bookreader.jumpToPage("".concat(this.bookreader.book.getPageNum("".concat(t).replace(/\D/g,"")))),this.activeBookmarkID=t}},{key:"saveBookmark",value:function(e){var t=e.detail,n=this.bookmarks[t.bookmark.id];Object.assign(n,t.bookmark),this.api.put(n),this.editedBookmark={},this.renderBookmarkButtons()}},{key:"confirmDeletion",value:function(e){this.getBookmark(e).note?this.displayDeletionModal(e):this.deleteBookmark({detail:{id:"".concat(e)}})}},{key:"displayDeletionModal",value:function(e){var t=this,n=(0,r.qy)(Ur||(Ur=ro(["\n <delete-modal-actions\n .deleteAction=","\n .cancelAction=","\n .pageID=","\n ></delete-modal-actions>\n "])),function(){return t.deleteBookmark({detail:{id:"".concat(e)}})},function(){return t.modal.closeModal()},e);this.modal.showModal({config:this.deleteModalConfig,customModalContent:n})}},{key:"deleteBookmark",value:function(e){var t=e.detail,n=t.id,r=this.bookmarks;delete r[n],this.bookmarks=io({},r),this.api.delete(t.id),this.editedBookmark={},this.modal.closeModal(),this.renderBookmarkButtons()}},{key:"shouldEnableAddBookmarkButton",get:function(){var e=this.bookreader.mode===this.bookreader.constMode2up?this.bookreader.displayedIndices[this.bookreader.displayedIndices.length-1]:this.bookreader.currentIndex();return!!this.getBookmark(e)}},{key:"allowAddingBookmark",get:function(){return this.bookreader.mode!==this.bookreader.constModeThumb}},{key:"addBookmarkButton",get:function(){return(0,r.qy)(Gr||(Gr=ro(['\n <button\n class="ia-button primary"\n ?disabled=',"\n @click=",">\n Add bookmark\n </button>\n "])),this.shouldEnableAddBookmarkButton,this.addBookmark)}},{key:"bookmarksList",get:function(){return(0,r.qy)(Jr||(Jr=ro(["\n <ia-bookmarks-list\n @bookmarkEdited=","\n @bookmarkSelected=","\n @saveBookmark=","\n @deleteBookmark=","\n .editedBookmark=","\n .bookmarks=","\n .activeBookmarkID=","\n .bookmarkColors=","\n .defaultBookmarkColor=",">\n </ia-bookmarks-list>\n "])),this.bookmarkEdited,this.bookmarkSelected,this.saveBookmark,this.deleteBookmark,this.editedBookmark,io({},this.bookmarks),this.activeBookmarkID,this.bookmarkColors,this.defaultColor)}},{key:"bookmarkHelperMessage",get:function(){return(0,r.qy)(Xr||(Xr=ro(["<p>Please use 1up or 2up view modes to add bookmark.</p>"])))}},{key:"render",value:function(){var e=this,t=(0,r.qy)(Kr||(Kr=ro(["\n ","\n ","\n "])),this.bookmarksList,this.allowAddingBookmark?this.addBookmarkButton:this.bookmarkHelperMessage);return(0,r.qy)(Qr||(Qr=ro(['\n <section class="bookmarks">\n ',"\n </section>\n "])),"login"===this.displayMode?(0,r.qy)(Yr||(Yr=ro(["<bookmarks-login\n @click=","\n .url=","></bookmarks-login>"])),function(){return e.loginOptions.loginClicked()},this.loginOptions.loginUrl):t)}}],[{key:"properties",get:function(){return{activeBookmarkID:{type:String},bookmarks:{type:Array},bookreader:{type:Object},displayMode:{type:String},editedBookmark:{type:Object},deleteModalConfig:{type:Object},modal:{attribute:!1},loginOptions:{type:Object,attribute:!1}}}},{key:"styles",get:function(){var e=(0,r.AH)(eo||(eo=ro(["\n .bookmarks {\n height: 100%;\n overflow: hidden;\n padding-bottom: 20px;\n }\n\n .list ia-bookmark-edit {\n display: none;\n }\n\n .edit ia-bookmarks-list {\n display: none;\n }\n "])));return[Ht,e]}},{key:"formatPage",value:function(e){return isNaN(+e)?"(".concat(e.replace(/\D/g,""),")"):e}}]);var n,o}(r.WF);customElements.define("ia-bookmarks",go);var ko,wo,Co,xo,So,Oo=(0,r.AH)(bo||(bo=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .blue {\n --iconFillColor: var(--blueBookmarkColor, #0023f5);\n }\n\n .red {\n --iconFillColor: var(--redBookmarkColor, #eb3223);\n }\n\n .green {\n --iconFillColor: var(--greenBookmarkColor, #75ef4c);\n }\n"])));function Mo(e){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mo(e)}function Bo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function jo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Po(r.key),r)}}function Po(e){var t=function(e){if("object"!=Mo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mo(t)?t:t+""}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eo=function(){return!!e})()}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(e)}function Ao(e,t){return Ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ao(e,t)}var _o,zo,To,$o,Ho,Io,qo,Ro,Fo=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Lo(t),function(e,t){if(t&&("object"==Mo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Eo()?Reflect.construct(t,n||[],Lo(e).constructor):t.apply(e,n))}(this,t)).bookmark={},e.bookmarkColors=[],e.renderHeader=!1,e.showBookmark=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ao(e,t)}(t,e),function(e,t,n){return t&&jo(e.prototype,t),n&&jo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"emitSaveEvent",value:function(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("saveBookmark",{detail:{bookmark:this.bookmark}}))}},{key:"emitDeleteEvent",value:function(){this.dispatchEvent(new CustomEvent("deleteBookmark",{detail:{id:this.bookmark.id}}))}},{key:"emitColorChangedEvent",value:function(e){this.dispatchEvent(new CustomEvent("bookmarkColorChanged",{detail:{bookmarkId:this.bookmark.id,colorId:e}}))}},{key:"changeColorTo",value:function(e){this.bookmark.color=e,this.emitColorChangedEvent(e)}},{key:"updateNote",value:function(e){this.bookmark.note=e.currentTarget.value}},{key:"bookmarkColor",value:function(e){var t=this;return(0,r.qy)(ko||(ko=Bo(['\n <div class="color-option">\n <input type="radio" name="color" id="color_','" .value='," @change="," ?checked=",'>\n <label for="color_','" title=',">\n <icon-bookmark class=",' aria-hidden="true"></icon-bookmark>\n </label>\n </div>\n '])),e.id,e.id,function(){return t.changeColorTo(e.id)},this.bookmark.color===e.id,e.id,e.className,e.className)}},{key:"bookmarkTemplate",get:function(){return(0,r.qy)(wo||(wo=Bo(['\n <div class="bookmark">\n <img src='," />\n <h4>Page ","</h4>\n </div>\n "])),this.bookmark.thumbnail,this.bookmark.page)}},{key:"render",value:function(){return(0,r.qy)(Co||(Co=Bo(["\n ","\n ",'\n <form action="" method="put" @submit=','>\n <label for="note">Note <small>(optional)</small></label>\n <textarea rows="4" cols="80" name="note" id="note" @change=',">",'</textarea>\n <fieldset>\n <legend>Bookmark color</legend>\n <div class="color-options">\n ','\n </div>\n </fieldset>\n <div class="actions">\n <button type="button" class="ia-button cancel" @click=','>Delete</button>\n <input class="ia-button" type="submit" value="Save">\n </div>\n </form>\n '])),this.renderHeader?t.headerSection:r.s6,this.showBookmark?this.bookmarkTemplate:r.s6,this.emitSaveEvent,this.updateNote,this.bookmark.note,$e(this.bookmarkColors,function(e){return e.id},this.bookmarkColor.bind(this)),this.emitDeleteEvent)}}],[{key:"properties",get:function(){return{bookmark:{type:Object},bookmarkColors:{type:Array},renderHeader:{type:Boolean},showBookmark:{type:Boolean}}}},{key:"headerSection",get:function(){return(0,r.qy)(xo||(xo=Bo(["<header>\n <h3>Edit Bookmark</h3>\n </header>"])))}},{key:"styles",get:function(){var e=(0,r.AH)(So||(So=Bo(['\n :host {\n display: block;\n padding: 0 1rem 2rem 1rem;\n color: var(--primaryTextColor);\n }\n\n small {\n font-style: italic;\n }\n\n .bookmark {\n display: grid;\n grid-template-columns: 37px 1fr;\n grid-gap: 0 1rem;\n align-items: center;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n\n fieldset {\n padding: 0;\n border: none;\n }\n\n label, legend {\n display: block;\n font-weight: bold;\n }\n\n p {\n padding: 0;\n margin: .5rem 0;\n font-size: 1.2rem;\n line-height: 120%;\n }\n\n textarea {\n width: 100%;\n margin-bottom: 2rem;\n box-sizing: border-box;\n font: normal 1.4rem "Helvetica Neue", Helvetica, Arial, sans-serif;\n resize: vertical;\n }\n\n .color-options {\n display: flex;\n gap: 10px;\n }\n\n .color-option {\n position: relative;\n }\n\n .color-option input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n pointer-events: none;\n }\n\n .color-option label {\n display: block;\n min-width: 50px;\n padding-top: .4rem;\n text-align: center;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .color-option input:checked + label {\n border-color: var(--primaryTextColor);\n }\n\n .color-option input:focus + label {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n }\n\n .color-option input:focus:not(:focus-visible) + label {\n outline: none;\n }\n\n input[type="submit"] {\n background: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n button {\n background: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .button {\n -webkit-appearance: none;\n appearance: none;\n padding: .5rem 1rem;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .actions {\n margin-top: 20px;\n display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n '])));return[Ht,Oo,e]}}])}(r.WF);function Do(e){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(e)}function Wo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,No(r.key),r)}}function No(e){var t=function(e){if("object"!=Do(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Do(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Do(t)?t:t+""}function Zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zo=function(){return!!e})()}function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}function Go(e,t){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Go(e,t)}customElements.define("ia-bookmark-edit",Fo),n(6910),n(8918);var Jo,Xo=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Uo(t),function(e,t){if(t&&("object"==Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zo()?Reflect.construct(t,n||[],Uo(e).constructor):t.apply(e,n))}(this,t)).activeBookmarkID=void 0,e.bookmarkColors=[],e.defaultBookmarkColor={},e.bookmarks={},e.editedBookmark={},e.renderHeader=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Go(e,t)}(t,e),function(e,t,n){return t&&Vo(e.prototype,t),n&&Vo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"emitEditEvent",value:function(e,t){this.dispatchEvent(new CustomEvent("bookmarkEdited",{detail:{bookmark:t}}))}},{key:"emitSelectedEvent",value:function(e){this.activeBookmarkID=e.id,this.dispatchEvent(new CustomEvent("bookmarkSelected",{detail:{bookmark:e}}))}},{key:"emitSaveBookmark",value:function(e){this.dispatchEvent(new CustomEvent("saveBookmark",{detail:{bookmark:e}}))}},{key:"emitDeleteBookmark",value:function(e){this.dispatchEvent(new CustomEvent("deleteBookmark",{detail:{id:e}}))}},{key:"emitBookmarkColorChanged",value:function(e){var t=e.detail,n=t.bookmarkId,r=t.colorId;this.dispatchEvent(new CustomEvent("bookmarkColorChanged",{detail:{bookmarkId:n,colorId:r}}))}},{key:"emitAddBookmark",value:function(){this.dispatchEvent(new CustomEvent("addBookmark"))}},{key:"editBookmark",value:function(e,t){this.emitEditEvent(e,t),this.editedBookmark=this.editedBookmark===t?{}:t}},{key:"saveBookmark",value:function(e){var t=e.detail.bookmark;this.editedBookmark={},this.emitSaveBookmark(t)}},{key:"deleteBookmark",value:function(e){var t=e.detail.id;this.editedBookmark={},this.emitDeleteBookmark(t)}},{key:"bookmarkColorInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.bookmarkColors.find(function(t){return(null==t?void 0:t.id)===e})}},{key:"bookmarkItem",value:function(e){var t=this,n=this.editedBookmark.id===e.id,o=this.bookmarkColorInfo(e.color).className,i=e.id===this.activeBookmarkID?"active":"";return(0,r.qy)(_o||(_o=Wo(["\n <li data-pageIndex=",'>\n <div class="separator"></div>\n <div class="bookmark-card ','">\n <div class="bookmark-header" @click=',">\n <button>\n <icon-bookmark class=",' aria-label="',' bookmark"></icon-bookmark>\n <span> Page ','</span>\n </button>\n <button\n class="edit"\n @click=','\n title="Edit this bookmark"\n aria-expanded=','\n >\n <ia-icon-edit-pencil aria-hidden="true"></ia-icon-edit-pencil>\n </button>\n </div>\n ',"\n ","\n </div>\n </li>\n "])),e.id,i,function(){return t.emitSelectedEvent(e)},o,o,e.page,function(n){return t.editBookmark(n,e)},n?"true":"false",!n&&e.note?(0,r.qy)(zo||(zo=Wo(["<p>","</p>"])),e.note):r.s6,n?this.editBookmarkComponent:r.s6)}},{key:"editBookmarkComponent",get:function(){return(0,r.qy)(To||(To=Wo(["\n <ia-bookmark-edit\n .bookmark=","\n .bookmarkColors=","\n .defaultBookmarkColor=","\n .showBookmark=","\n @saveBookmark=","\n @deleteBookmark=","\n @bookmarkColorChanged=","\n ></ia-bookmark-edit>\n "])),this.editedBookmark,this.bookmarkColors,this.defaultBookmarkColor,!1,this.saveBookmark,this.deleteBookmark,this.emitBookmarkColorChanged)}},{key:"sortBookmarks",value:function(){var e=this;return Object.keys(this.bookmarks).sort(function(e,t){return+e>+t?1:+e<+t?-1:0}).map(function(t){return e.bookmarks[t]})}},{key:"bookmarksCount",get:function(){var e=this.bookmarks.length;return(0,r.qy)($o||($o=Wo(["<small>(",")</small>"])),e)}},{key:"headerSection",get:function(){return(0,r.qy)(Ho||(Ho=Wo(["<header>\n <h3>\n Bookmarks\n ","\n </h3>\n </header>"])),this.bookmarks.length?this.bookmarksCount:r.s6)}},{key:"bookmarkslist",get:function(){var e=this.sortBookmarks(),t=$e(e,function(e){return null==e?void 0:e.id},this.bookmarkItem.bind(this));return(0,r.qy)(Io||(Io=Wo(["\n <ul>\n ",'\n <div class="separator"></div>\n </ul>\n '])),t)}},{key:"render",value:function(){return(0,r.qy)(qo||(qo=Wo(["\n ","\n ","\n "])),this.renderHeader?this.headerSection:r.s6,Object.keys(this.bookmarks).length?this.bookmarkslist:r.s6)}}],[{key:"properties",get:function(){return{activeBookmarkID:{type:Number},bookmarkColors:{type:Array},defaultBookmarkColor:{type:Object},bookmarks:{type:Object},editedBookmark:{type:Object},renderHeader:{type:Boolean}}}},{key:"styles",get:function(){return[(0,r.AH)(Ro||(Ro=Wo(["\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n icon-bookmark {\n width: 16px;\n height: 24px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n small {\n font-style: italic;\n }\n\n .bookmark-header {\n display: flex;\n align-items: center;\n margin: 0;\n font-size: 1.4rem;\n font-weight: bold;\n }\n\n .bookmark-header > button:first-child {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px;\n }\n\n ia-icon-edit-pencil {\n pointer-events: none;\n }\n\n p {\n padding: 0;\n margin: 5px 0 0 0;\n width: 98%;\n overflow-wrap: break-word;\n }\n\n ia-bookmark-edit {\n margin: 5px 5px 3px 6px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n ul > li:first-child .separator {\n display: none;\n }\n li {\n position: relative;\n }\n\n li .bookmark-card {\n border: var(--activeBorderWidth) solid transparent;\n border-radius: 4px;\n }\n\n li .bookmark-card.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n .bookmark-header button {\n background: transparent;\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n box-sizing: border-box;\n border: none;\n padding: 0;\n text-align: left;\n }\n\n li button.edit {\n height: 34px;\n width: 34px;\n flex-shrink: 0;\n text-align: center;\n }\n "]))),Oo]}}])}(r.WF);customElements.define("ia-bookmarks-list",Xo);class Ko extends r.WF{static get styles(){return r.AH`
1819
- :host {
1820
- width: var(--iconWidth, 'auto');
1821
- height: var(--iconHeight, 'auto');
1822
- }
1823
-
1824
- #hollow,
1825
- #plus,
1826
- #minus {
1827
- display: none;
1828
- }
1829
-
1830
- .hollow #filled,
1831
- .plus #filled,
1832
- .minus #filled {
1833
- display: none;
1834
- }
1835
-
1836
- .hollow #hollow,
1837
- .plus #hollow,
1838
- .minus #hollow {
1839
- display: block;
1840
- }
1841
-
1842
- .plus #plus {
1843
- display: block;
1844
- }
1845
-
1846
- .minus #minus {
1847
- display: block;
1848
- }
1849
-
1850
- .fill-color {
1851
- fill: var(--iconFillColor);
1852
- }
1853
-
1854
- .stroke-color {
1855
- stroke: var(--iconStrokeColor);
1856
- }
1857
- `}static get properties(){return{state:{type:String}}}render(){return r.qy`
1858
- <div class=${this.state}>
1859
- <svg
1860
- height="24"
1861
- viewBox="0 0 16 24"
1862
- width="16"
1863
- xmlns="http://www.w3.org/2000/svg"
1864
- >
1865
- <path
1866
- id="filled"
1867
- d="m1 0h14c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1z"
1868
- class="fill-color"
1869
- fill-rule="evenodd"
1870
- />
1871
- <g class="fill-color" fill-rule="evenodd">
1872
- <path
1873
- id="hollow"
1874
- d="m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z"
1875
- />
1876
- <path
1877
- id="plus"
1878
- d="m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z"
1879
- fill-rule="nonzero"
1880
- />
1881
- <path id="minus" d="m11 8.25v1.5h-6v-1.5z" fill-rule="nonzero" />
1882
- </g>
1883
- </svg>
1884
- </div>
1885
- `}}function Qo(e){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qo(e)}function Yo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ei(r.key),r)}}function ei(e){var t=function(e){if("object"!=Qo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qo(t)?t:t+""}window.customElements.define("icon-bookmark",Ko);var ti,ni,ri=function(){return function(e,t){return t&&Yo(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.baseHost,o=t.signedIn,i=t.bookreader,a=t.modal,s=t.onProviderChange,l="referer=".concat(encodeURIComponent(location.href)),c="https://".concat(n,"/account/login?").concat(l);this.component=document.createElement("ia-bookmarks"),this.component.bookreader=i,this.component.displayMode=o?"bookmarks":"login",this.component.modal=a,this.component.loginOptions={loginClicked:this.bookmarksLoginClicked,loginUrl:c},this.bindEvents(),this.icon=(0,r.qy)(Jo||(Jo=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<icon-bookmark aria-hidden="true" role="presentation" state="hollow" style="--iconWidth: 16px; --iconHeight: 24px;"></icon-bookmark>']))),this.label="Bookmarks",this.id="bookmarks",this.onProviderChange=s,this.component.setup(),this.updateMenu(this.component.bookmarks.length)},[{key:"updateMenu",value:function(e){this.menuDetails="(".concat(e,")")}},{key:"bindEvents",value:function(){this.component.addEventListener("bookmarksChanged",this.bookmarksChanged.bind(this))}},{key:"bookmarksChanged",value:function(e){var t=e.detail,n=Object.keys(t.bookmarks).length;this.updateMenu(n),this.onProviderChange(t.bookmarks,t.showSidePanel)}},{key:"bookmarksLoginClicked",value:function(){var e;null===(e=window.archive_analytics)||void 0===e||e.send_event_no_sampling("BookReader","BookmarksLogin",window.location.path)}}])}();function oi(e){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(e)}function ii(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ai(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,li(r.key),r)}}function si(e,t,n){return t&&ai(e.prototype,t),n&&ai(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function li(e){var t=function(e){if("object"!=oi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oi(t)?t:t+""}var ci,ui=si(function e(t){var n=t.item,o=t.baseHost,i=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a=null==n?void 0:n.metadata,s=a.identifier,l=a.creator,c=a.title,u=Array.isArray(l)?l[0]:l,d=i.subPrefix||"";this.icon=(0,r.qy)(ti||(ti=ii(["",""])),ye),this.label="Share this book",this.id="share",this.component=(0,r.qy)(ni||(ni=ii(["<iaux-in-share-panel\n .identifier=","\n .type=","\n .creator=","\n .description=","\n .baseHost=","\n .fileSubPrefix=","\n ></iaux-in-share-panel>"])),s,"book",u,c,o,d)});function di(e){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},di(e)}function hi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return pi(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,h.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=h.p,f=i[2];n>3?(o=f===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,h.v=r,h.n=i[1]):p<f&&(o=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,h.n=f,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),s=u,l=f;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(pi(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,pi(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,pi(d,"constructor",c),pi(c,"constructor",l),l.displayName="GeneratorFunction",pi(c,o,"GeneratorFunction"),pi(d),pi(d,o,"Generator"),pi(d,r,function(){return this}),pi(d,"toString",function(){return"[object Generator]"}),(hi=function(){return{w:i,m:h}})()}function pi(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}pi=function(e,t,n,r){function i(t,n){pi(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},pi(e,t,n,r)}function fi(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function mi(e){return function(e){if(Array.isArray(e))return vi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return vi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yi(r.key),r)}}function yi(e){var t=function(e){if("object"!=di(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==di(t)?t:t+""}var gi,ki,wi,Ci,xi,Si,Oi,Mi="default",Bi=function(){return function(e,t){return t&&bi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=this,o=t.baseHost,i=t.bookreader,a=t.onProviderChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bookreader=i,this.onProviderChange=a,this.baseHost=o;var s=i.options.multipleBooksList.by_subprefix;if(this.viewableFiles=Object.keys(s).map(function(e){return s[e]}),this.volumeCount=Object.keys(s).length,this.id="volumes",this.label="Viewable files (".concat(this.volumeCount,")"),this.icon=(0,r.qy)(ci||(ci=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["",""])),Re),this.sortOrderBy=Mi,this.component=document.createElement("iaux-in-viewable-files-panel"),this.component.addSortToUrl=!0,this.component.subPrefix=i.options.subPrefix||"",this.component.baseHost=o,this.component.fileList=mi(this.viewableFiles),this.sortFilesComponent=document.createElement("iaux-in-sort-files-button"),this.sortFilesComponent.fileListRaw=this.viewableFiles,this.sortFilesComponent.addEventListener("fileListSorted",function(e){return n.handleFileListSorted(e)}),this.actionButton=this.sortFilesComponent,this.bookreader.urlPlugin){this.bookreader.urlPlugin.pullFromAddressBar();var l=this.bookreader.urlPlugin.getUrlParam("sort");"title_asc"!==l&&"title_desc"!==l||(this.sortOrderBy=l)}this.sortFilesComponent.sortVolumes(this.sortOrderBy),this.onProviderChange(this.bookreader)},[{key:"handleFileListSorted",value:(e=hi().m(function e(t){var n,r,o;return hi().w(function(e){for(;;)switch(e.n){case 0:return n=t.detail,r=n.sortType,o=n.sortedFiles,this.viewableFiles=o,this.sortOrderBy=r,this.component.fileList=mi(this.viewableFiles),e.n=1,this.component.updateComplete;case 1:this.bookreader.urlPlugin&&(this.bookreader.urlPlugin.pullFromAddressBar(),this.sortOrderBy!==Mi?this.bookreader.urlPlugin.setUrlParam("sort",this.sortOrderBy):this.bookreader.urlPlugin.removeUrlParam("sort")),this.onProviderChange(this.bookreader),this.multipleFilesClicked(this.sortOrderBy);case 2:return e.a(2)}},e,this)}),t=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){fi(i,r,o,a,s,"next",e)}function s(e){fi(i,r,o,a,s,"throw",e)}a(void 0)})},function(e){return t.apply(this,arguments)})},{key:"multipleFilesClicked",value:function(e){var t;null===(t=window.archive_analytics)||void 0===t||t.send_event("BookReader","VolumesSort|".concat(e),window.location.path)}}]);var e,t}(),ji=n(8004);function Pi(e){return Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pi(e)}function Ei(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Li(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ai(Object(n),!0).forEach(function(t){zi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ai(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zi(e,t,n){return(t=Hi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hi(r.key),r)}}function Hi(e){var t=function(e){if("object"!=Pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pi(t)?t:t+""}function Ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ii=function(){return!!e})()}function qi(){return qi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ri(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},qi.apply(null,arguments)}function Ri(e){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ri(e)}function Fi(e,t){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fi(e,t)}var Di=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=Ri(t),function(e,t){if(t&&("object"==Pi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ii()?Reflect.construct(t,n||[],Ri(e).constructor):t.apply(e,n))}(this,t)).item=void 0,e.bookreader=void 0,e.baseHost="archive.org",e.fullscreen=!1,e.signedIn=!1,e.modal=void 0,e.sharedObserver=void 0,e.loaded=!1,e.menuShortcuts=[],e.menuContents=[],e.openMenuName="",e.bookReaderCannotLoad=!1,e.bookReaderLoaded=!1,e.bookIsRestricted=!1,e.downloadableTypes=[],e.isAdmin=!1,e.lendingInitialized=!1,e.lendingStatus={},e.menuProviders={bookmarks:null,search:null,downloads:null,visualAdjustments:null,share:null,volumes:null},e.signedIn=!1,e.fullscreenBranding=(0,r.qy)(gi||(gi=Ti(['<ia-icon-ia-logo aria-hidden="true"></ia-icon-ia-logo>']))),e._sharedObserverHandler={handleResize:e.handleResize.bind(e)},e._brWidth=0,e._brHeight=0,e.shortcutOrder=["fullscreen","volumes","chapters","search","translate","bookmarks","downloads","visualAdjustments","share","experiments"],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fi(e,t)}(t,e),function(e,t,n){return t&&$i(e.prototype,t),n&&$i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"itemNav",get:function(){return this.shadowRoot.querySelector("iaux-item-navigator")}},{key:"disconnectedCallback",value:function(){!function(e,t,n){var r=qi(Ri(e.prototype),"disconnectedCallback",n);return"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,0,this)([]),this.unloadSharedObserver()}},{key:"firstUpdated",value:function(){this.modal||this.setModalManager(),this.sharedObserver||(this.sharedObserver=new it),this._bindEventListeners(),this.loaded=!0}},{key:"updated",value:function(e){this.bookreader&&this.item&&this.bookReaderLoaded&&((e.has("loaded")&&this.loaded||e.has("item")||e.has("bookreader")||e.has("signedIn")||e.has("isAdmin")||e.has("modal"))&&this.initializeBookSubmenus(),e.has("sharedObserver")&&this.bookreader&&(this.loadSharedObserver(),this.initializeBookSubmenus()),e.has("downloadableTypes")&&this.initializeBookSubmenus())}},{key:"loadSharedObserver",value:function(){var e;this.unloadSharedObserver(),null===(e=this.sharedObserver)||void 0===e||e.addObserver({target:this.mainBRContainer,handler:this._sharedObserverHandler})}},{key:"unloadSharedObserver",value:function(){var e;null===(e=this.sharedObserver)||void 0===e||e.removeObserver({target:this.mainBRContainer,handler:this._sharedObserverHandler})}},{key:"handleResize",value:function(e){var t=e.contentRect,n=e.target,r=this._brWidth,o=this._brHeight,i=this.bookreader.animating;n===this.mainBRContainer&&(this._brWidth=t.width,this._brHeight=t.height),!r&&this._brWidth&&this.initializeBookSubmenus();var a,s=r!==this._brWidth,l=o!==this._brHeight;i||!s&&!l||null===(a=this.bookreader)||void 0===a||a.resize()}},{key:"manageFullScreenBehavior",value:function(){this.bookreader.options.enableFSLogoShortcut&&(this.fullscreen=this.bookreader.isFullscreen(),this.dispatchEvent(new CustomEvent("fullscreenStateUpdated",{detail:{fullscreen:this.fullscreen}})),this.fullscreen?this.addFullscreenShortcut():this.deleteFullscreenShortcut())}},{key:"setModalManager",value:function(){var e=document.querySelector("modal-manager");e||(e=document.createElement("modal-manager"),document.body.appendChild(e)),this.modal=e}},{key:"initializeBookSubmenus",value:function(){var e,t=this,n={visualAdjustments:new kr(_i(_i({},this.baseProviderConfig),{},{onProviderChange:function(){t.updateMenuContents()}}))};this.baseProviderConfig.item&&(n.share=new ui(this.baseProviderConfig)),this.shouldShowDownloadsMenu()&&(n.downloads=new In(this.baseProviderConfig)),null!==(e=this.bookreader.options.plugins)&&void 0!==e&&null!==(e=e.search)&&void 0!==e&&e.enabled&&(n.search=new yn(_i(_i({},this.baseProviderConfig),{},{onProviderChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&(t.bookreader=e),t.updateMenuContents(),!1!==n.openMenu&&(!t.isWideEnoughToOpenMenu||null!=n&&n.searchCanceled||setTimeout(function(){t.updateSideMenu("search","open")},0))}}))),this.bookreader.options.enableBookmarks&&(n.bookmarks=new ri(_i(_i({},this.baseProviderConfig),{},{onProviderChange:function(e){Object.keys(e).length?t.addMenuShortcut("bookmarks"):t.removeMenuShortcut("bookmarks"),t.updateMenuContents()}}))),this.bookreader.options.enableMultipleBooks&&(n.volumes=new Bi(_i(_i({},this.baseProviderConfig),{},{onProviderChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(t.bookreader=e),t.updateMenuContents(),t.isWideEnoughToOpenMenu&&setTimeout(function(){t.updateSideMenu("volumes","open")})}}))),Object.assign(this.menuProviders,n),this.addMenuShortcut("search"),this.addMenuShortcut("volumes"),this.updateMenuContents()}},{key:"mainBRContainer",get:function(){var e;return document.querySelector(null===(e=this.bookreader)||void 0===e?void 0:e.el)}},{key:"baseProviderConfig",get:function(){return{baseHost:this.baseHost,modal:this.modal,sharedObserver:this.sharedObserver,bookreader:this.bookreader,item:this.item,signedIn:this.signedIn,isAdmin:this.isAdmin,onProviderChange:function(){}}}},{key:"isWideEnoughToOpenMenu",get:function(){return this._brWidth>=640}},{key:"updateSideMenu",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";if(t)if(this.openMenuName=t,"open"===n)null===(e=this.itemNav)||void 0===e||e.openShortcut(t);else if("toggle"===n){var r;null===(r=this.itemNav)||void 0===r||r.toggleMenu()}}},{key:"addFullscreenShortcut",value:function(){this.menuShortcuts.push({icon:this.fullscreenShortcut,id:"fullscreen"}),this._sortMenuShortcuts()}},{key:"deleteFullscreenShortcut",value:function(){this.menuShortcuts=this.menuShortcuts.filter(function(e){return"fullscreen"!==e.id}),this._sortMenuShortcuts()}},{key:"fullscreenShortcut",get:function(){var e=this;return(0,r.qy)(ki||(ki=Ti(["\n <button\n @click=",'\n title="Exit fullscreen view"\n >',"</button>\n "])),function(){return e.bookreader.exitFullScreen()},this.fullscreenBranding)}},{key:"updateMenuContents",value:function(){var e,t=this,n=(0,ji.Ul)(Object.entries(this.menuProviders).filter(function(e){var t=Ei(e,2);return t[0],!!t[1]}).filter(function(e){var n=Ei(e,2),r=n[0];return n[1],"downloads"!==r||t.shouldShowDownloadsMenu()}),function(e){var n=Ei(e,2),r=n[0],o=(n[1],t.shortcutOrder.indexOf(r));return-1===o?t.shortcutOrder.length:o}).map(function(e){var t=Ei(e,2);return t[0],t[1]});this.shouldShowDownloadsMenu()&&(null===(e=this.menuProviders.downloads)||void 0===e||e.update(this.downloadableTypes)),this.menuContents=n}},{key:"shouldShowDownloadsMenu",value:function(){if(!this.downloadableTypes.length)return!1;if(!1===this.bookIsRestricted)return!0;if(this.isAdmin)return!0;var e=this.lendingStatus.user_loan_record,t=void 0===e?{}:e;return!Array.isArray(t)&&t.type&&"SESSION_LOAN"!==t.type}},{key:"addMenuShortcut",value:function(e){this.menuShortcuts.find(function(t){return t.id===e})||this.menuProviders[e]&&(this.menuShortcuts.push(this.menuProviders[e]),this._sortMenuShortcuts())}},{key:"removeMenuShortcut",value:function(e){this.menuShortcuts=this.menuShortcuts.filter(function(t){return t.id!==e}),this._sortMenuShortcuts()}},{key:"_sortMenuShortcuts",value:function(){var e=this;this.menuShortcuts=(0,ji.Ul)(this.menuShortcuts,function(t){var n=e.shortcutOrder.indexOf(t.id);return-1===n?e.shortcutOrder.length:n})}},{key:"_bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:PostInit",function(t){e.bookreader=t.detail.props,e.bookreader.shell=e,e.bookReaderLoaded=!0,e.bookReaderCannotLoad=!1,e.loaded=!0,e.loadSharedObserver(),setTimeout(function(){return e.bookreader.resize()},0)}),window.addEventListener("BookReader:fullscreenToggled",function(t){var n=t.detail.props;n&&(e.bookreader=n),e.manageFullScreenBehavior()},{passive:!0}),window.addEventListener("BookReader:ToggleSearchMenu",function(t){e.updateSideMenu("search","toggle")}),window.addEventListener("LendingFlow:PostInit",function(t){var n=t.detail,r=n.downloadTypesAvailable,o=n.lendingStatus,i=n.isAdmin,a=n.previewType;e.lendingInitialized=!0,e.downloadableTypes=r,e.lendingStatus=o,e.isAdmin=i,e.bookReaderCannotLoad="singlePagePreview"===a,e.loaded=!0}),window.addEventListener("BRJSIA:PostInit",function(t){var n=t.detail,r=n.isRestricted,o=n.downloadURLs;e.bookReaderLoaded=!0,e.downloadableTypes=o,e.bookIsRestricted=r}),window.addEventListener("contextmenu",function(t){return e._manageContextMenuVisibility(t)},{capture:!0})}},{key:"_manageContextMenuVisibility",value:function(e){var t,n,r=e.target;if(null===(t=window.archive_analytics)||void 0===t||t.send_event("BookReader","contextmenu-".concat(this.bookIsRestricted?"restricted":"unrestricted"),null==r||null===(n=r.classList)||void 0===n?void 0:n.value),this.bookIsRestricted&&r.classList.value.match(/BRscreen|BRpageimage/g))return e.preventDefault(),!1}},{key:"itemImage",get:function(){var e,t=null===(e=this.item)||void 0===e?void 0:e.metadata.identifier,n="https://".concat(this.baseHost,"/services/img/").concat(t);return(0,r.qy)(wi||(wi=Ti(['<img class="cover-img" src=',' alt="cover image for ','">'])),n,t)}},{key:"placeholder",get:function(){return(0,r.qy)(Ci||(Ci=Ti(['<div class="placeholder">',"</div>"])),this.itemImage)}},{key:"render",value:function(){return(0,r.qy)(xi||(xi=Ti(["\n <iaux-item-navigator\n ?viewportInFullscreen=","\n .basehost=","\n .item=","\n .modal=","\n .loaded=","\n .sharedObserver=","\n ?signedIn=","\n .menuShortcuts=","\n .menuContents=","\n .openMenu=",'\n >\n <div slot="header">\n <slot name="header"></slot>\n </div>\n <div slot="main">\n ',"\n </div>\n </iaux-item-navigator>\n "])),this.fullscreen,this.baseHost,this.item,this.modal,this.loaded,this.sharedObserver,this.signedIn,this.menuShortcuts,this.menuContents,this.openMenuName,this.bookReaderCannotLoad?this.placeholder:(0,r.qy)(Si||(Si=Ti(['<slot name="main"></slot>']))))}}],[{key:"properties",get:function(){return{item:{type:Object},baseHost:{type:String},signedIn:{type:Boolean},fullscreen:{type:Boolean,reflect:!0,attribute:!0},sharedObserver:{type:Object,attribute:!1},modal:{type:Object,attribute:!1},loaded:{type:Boolean},menuShortcuts:{type:Array},menuContents:{type:Array},bookReaderLoaded:{type:Boolean},bookreader:{type:Object},bookIsRestricted:{type:Boolean},downloadableTypes:{type:Array},isAdmin:{type:Boolean},lendingInitialized:{type:Boolean},lendingStatus:{type:Object},menuProviders:{type:Object},fullscreenBranding:{type:Object}}}},{key:"styles",get:function(){return(0,r.AH)(Oi||(Oi=Ti(['\n :host {\n display: block;\n --primaryBGColor: var(--black, #000);\n --secondaryBGColor: #222;\n --tertiaryBGColor: #333;\n --primaryTextColor: var(--white, #fff);\n --primaryCTAFill: #194880;\n --primaryCTABorder: #c5d1df;\n --secondaryCTAFill: #333;\n --secondaryCTABorder: #999;\n --primaryErrorCTAFill: #e51c26;\n --primaryErrorCTABorder: #f8c6c8;\n background-color: var(--primaryBGColor);\n position: relative;\n }\n\n :host([fullscreen]),\n iaux-item-navigator[viewportinfullscreen] {\n position: fixed;\n inset: 0;\n height: 100%;\n min-height: unset;\n }\n\n div[slot="header"],\n div[slot="main"] {\n display: flex;\n width: 100%;\n }\n\n slot {\n display: block;\n flex: 1;\n }\n\n slot,\n slot > * {\n display: block;\n height: inherit;\n width: inherit;\n }\n .placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n margin: 5%;\n }\n .cover-img {\n max-height: 300px;\n }\n\n iaux-item-navigator {\n display: block;\n width: 100%;\n min-height: var(--br-height, inherit);\n height: var(--br-height, 100%);\n color: var(--primaryTextColor);\n --menuButtonLabelDisplay: block;\n --menuWidth: 320px;\n --menuSliderBg: var(--secondaryBGColor);\n --activeButtonBg: var(--tertiaryBGColor);\n --subpanelRightBorderColor: var(--secondaryCTABorder);\n --animationTiming: 100ms;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n --menuSliderHeaderIconHeight: 2rem;\n --menuSliderHeaderIconWidth: 2rem;\n --iconWidth: 2.4rem;\n --iconHeight: 2.4rem;\n --shareLinkColor: var(--primaryTextColor);\n --shareIconBorder: var(--primaryTextColor);\n --shareIconBg: var(--secondaryBGColor);\n --activityIndicatorLoadingDotColor: var(--primaryTextColor);\n --activityIndicatorLoadingRingColor: var(--primaryTextColor);\n }\n '])))}}])}(r.WF);window.customElements.define("ia-bookreader",Di)},1635:function(e,t,n){function r(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}n.d(t,{Cg:function(){return r}}),Object.create,Object.create}},function(e){e(e.s=4844)}]);
1886
- //# sourceMappingURL=ia-bookreader-bundle.js.map