@internetarchive/bookreader 5.0.0-28-remove-url-defaults → 5.0.0-29
Sign up to get free protection for your applications and to get access to all the features.
- package/.husky/_/husky.sh +30 -0
- package/BookReader/BookReader.css +1 -1
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/bookreader-component-bundle.js +570 -542
- package/BookReader/bookreader-component-bundle.js.LICENSE.txt +23 -0
- package/BookReader/bookreader-component-bundle.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReaderDemo/BookReaderDemo.css +14 -1
- package/BookReaderDemo/IADemoBr.js +104 -0
- package/BookReaderDemo/demo-internetarchive.html +65 -98
- package/CHANGELOG.md +4 -0
- package/package.json +9 -6
- package/src/BookNavigator/assets/ia-logo.js +17 -0
- package/src/BookNavigator/book-navigator.js +521 -0
- package/src/BookNavigator/bookmarks/bookmark-button.js +2 -1
- package/src/BookNavigator/bookmarks/bookmarks-provider.js +20 -8
- package/src/BookNavigator/bookmarks/ia-bookmarks.js +84 -51
- package/src/BookNavigator/downloads/downloads-provider.js +5 -9
- package/src/BookNavigator/downloads/downloads.js +1 -0
- package/src/BookNavigator/search/search-provider.js +15 -8
- package/src/BookNavigator/sharing.js +27 -0
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +9 -8
- package/src/BookNavigator/volumes/volumes-provider.js +3 -4
- package/src/BookReader/options.js +6 -0
- package/src/BookReader.js +20 -8
- package/src/BookReaderComponent/BookReaderComponent.js +53 -32
- package/src/css/_BRComponent.scss +1 -1
- package/src/plugins/search/plugin.search.js +9 -9
- package/{src → stat}/BookNavigator/BookModel.js +0 -0
- package/{src → stat}/BookNavigator/BookNavigator.js +109 -102
- package/stat/BookNavigator/assets/bookmark-colors.js +15 -0
- package/stat/BookNavigator/assets/button-base.js +61 -0
- package/stat/BookNavigator/assets/ia-logo.js +17 -0
- package/stat/BookNavigator/assets/icon_checkmark.js +6 -0
- package/stat/BookNavigator/assets/icon_close.js +3 -0
- package/stat/BookNavigator/assets/icon_sort_asc.js +5 -0
- package/stat/BookNavigator/assets/icon_sort_desc.js +5 -0
- package/stat/BookNavigator/assets/icon_sort_neutral.js +5 -0
- package/stat/BookNavigator/assets/icon_volumes.js +11 -0
- package/stat/BookNavigator/bookmarks/bookmark-button.js +64 -0
- package/stat/BookNavigator/bookmarks/bookmark-edit.js +215 -0
- package/stat/BookNavigator/bookmarks/bookmarks-list.js +285 -0
- package/stat/BookNavigator/bookmarks/bookmarks-loginCTA.js +28 -0
- package/stat/BookNavigator/bookmarks/bookmarks-provider.js +56 -0
- package/stat/BookNavigator/bookmarks/ia-bookmarks.js +523 -0
- package/{src → stat}/BookNavigator/br-fullscreen-mgr.js +1 -2
- package/stat/BookNavigator/delete-modal-actions.js +49 -0
- package/stat/BookNavigator/downloads/downloads-provider.js +72 -0
- package/stat/BookNavigator/downloads/downloads.js +139 -0
- package/stat/BookNavigator/provider-config.js +0 -0
- package/stat/BookNavigator/search/a-search-result.js +55 -0
- package/stat/BookNavigator/search/search-provider.js +180 -0
- package/stat/BookNavigator/search/search-results.js +360 -0
- package/{src/ItemNavigator/providers → stat/BookNavigator}/sharing.js +3 -5
- package/stat/BookNavigator/visual-adjustments/visual-adjustments-provider.js +94 -0
- package/stat/BookNavigator/visual-adjustments/visual-adjustments.js +280 -0
- package/stat/BookNavigator/volumes/volumes-provider.js +83 -0
- package/stat/BookNavigator/volumes/volumes.js +178 -0
- package/stat/BookReader/BookModel.js +518 -0
- package/stat/BookReader/DebugConsole.js +54 -0
- package/stat/BookReader/DragScrollable.js +233 -0
- package/stat/BookReader/ImageCache.js +116 -0
- package/stat/BookReader/Mode1Up.js +102 -0
- package/stat/BookReader/Mode1UpLit.js +434 -0
- package/stat/BookReader/Mode2Up.js +1372 -0
- package/stat/BookReader/ModeSmoothZoom.js +177 -0
- package/stat/BookReader/ModeThumb.js +344 -0
- package/stat/BookReader/Navbar/Navbar.js +310 -0
- package/stat/BookReader/PageContainer.js +120 -0
- package/stat/BookReader/ReduceSet.js +26 -0
- package/stat/BookReader/Toolbar/Toolbar.js +384 -0
- package/stat/BookReader/events.js +20 -0
- package/stat/BookReader/options.js +324 -0
- package/stat/BookReader/utils/HTMLDimensionsCacher.js +44 -0
- package/stat/BookReader/utils/classes.js +36 -0
- package/stat/BookReader/utils.js +240 -0
- package/stat/BookReader.js +2550 -0
- package/stat/BookReaderComponent/BookReaderComponent.js +117 -0
- package/stat/assets/icons/1up.svg +12 -0
- package/stat/assets/icons/2up.svg +15 -0
- package/stat/assets/icons/advance.svg +26 -0
- package/stat/assets/icons/chevron-right.svg +1 -0
- package/stat/assets/icons/close-circle-dark.svg +1 -0
- package/stat/assets/icons/close-circle.svg +1 -0
- package/stat/assets/icons/fullscreen.svg +17 -0
- package/stat/assets/icons/fullscreen_exit.svg +17 -0
- package/stat/assets/icons/hamburger.svg +15 -0
- package/stat/assets/icons/left-arrow.svg +12 -0
- package/stat/assets/icons/magnify-minus.svg +16 -0
- package/stat/assets/icons/magnify-plus.svg +17 -0
- package/stat/assets/icons/magnify.svg +15 -0
- package/stat/assets/icons/pause.svg +23 -0
- package/stat/assets/icons/play.svg +22 -0
- package/stat/assets/icons/playback-speed.svg +34 -0
- package/stat/assets/icons/read-aloud.svg +22 -0
- package/stat/assets/icons/review.svg +22 -0
- package/stat/assets/icons/thumbnails.svg +17 -0
- package/stat/assets/icons/voice.svg +1 -0
- package/stat/assets/icons/volume-full.svg +22 -0
- package/stat/assets/images/BRicons.png +0 -0
- package/stat/assets/images/BRicons.svg +94 -0
- package/stat/assets/images/BRicons_ia.png +0 -0
- package/stat/assets/images/back_pages.png +0 -0
- package/stat/assets/images/book_bottom_icon.png +0 -0
- package/stat/assets/images/book_down_icon.png +0 -0
- package/stat/assets/images/book_left_icon.png +0 -0
- package/stat/assets/images/book_leftmost_icon.png +0 -0
- package/stat/assets/images/book_right_icon.png +0 -0
- package/stat/assets/images/book_rightmost_icon.png +0 -0
- package/stat/assets/images/book_top_icon.png +0 -0
- package/stat/assets/images/book_up_icon.png +0 -0
- package/stat/assets/images/books_graphic.svg +177 -0
- package/stat/assets/images/booksplit.png +0 -0
- package/stat/assets/images/control_pause_icon.png +0 -0
- package/stat/assets/images/control_play_icon.png +0 -0
- package/stat/assets/images/embed_icon.png +0 -0
- package/stat/assets/images/icon-home-ia.png +0 -0
- package/stat/assets/images/icon_OL-logo-xs.png +0 -0
- package/stat/assets/images/icon_alert-xs.png +0 -0
- package/stat/assets/images/icon_book.svg +12 -0
- package/stat/assets/images/icon_bookmark.svg +12 -0
- package/stat/assets/images/icon_close-pop.png +0 -0
- package/stat/assets/images/icon_download.png +0 -0
- package/stat/assets/images/icon_gear.svg +14 -0
- package/stat/assets/images/icon_hamburger.svg +20 -0
- package/stat/assets/images/icon_home.png +0 -0
- package/stat/assets/images/icon_home.svg +21 -0
- package/stat/assets/images/icon_home_ia.png +0 -0
- package/stat/assets/images/icon_indicator.png +0 -0
- package/stat/assets/images/icon_info.svg +11 -0
- package/stat/assets/images/icon_one_page.svg +8 -0
- package/stat/assets/images/icon_pause.svg +1 -0
- package/stat/assets/images/icon_play.svg +1 -0
- package/stat/assets/images/icon_playback-rate.svg +15 -0
- package/stat/assets/images/icon_return.png +0 -0
- package/stat/assets/images/icon_search_button.svg +8 -0
- package/stat/assets/images/icon_share.svg +9 -0
- package/stat/assets/images/icon_skip-ahead.svg +6 -0
- package/stat/assets/images/icon_skip-back.svg +13 -0
- package/stat/assets/images/icon_speaker.svg +18 -0
- package/stat/assets/images/icon_speaker_open.svg +10 -0
- package/stat/assets/images/icon_thumbnails.svg +12 -0
- package/stat/assets/images/icon_toc.svg +5 -0
- package/stat/assets/images/icon_two_pages.svg +9 -0
- package/stat/assets/images/icon_zoomer.png +0 -0
- package/stat/assets/images/loading.gif +0 -0
- package/stat/assets/images/logo_icon.png +0 -0
- package/stat/assets/images/marker_chap-off.png +0 -0
- package/stat/assets/images/marker_chap-off.svg +11 -0
- package/stat/assets/images/marker_chap-off_ia.png +0 -0
- package/stat/assets/images/marker_chap-on.png +0 -0
- package/stat/assets/images/marker_chap-on.svg +11 -0
- package/stat/assets/images/marker_srch-on.svg +11 -0
- package/stat/assets/images/marker_srchchap-off.png +0 -0
- package/stat/assets/images/marker_srchchap-on.png +0 -0
- package/stat/assets/images/nav_control-dn.png +0 -0
- package/stat/assets/images/nav_control-dn_ia.png +0 -0
- package/stat/assets/images/nav_control-up.png +0 -0
- package/stat/assets/images/nav_control-up_ia.png +0 -0
- package/stat/assets/images/nav_control.png +0 -0
- package/stat/assets/images/one_page_mode_icon.png +0 -0
- package/stat/assets/images/paper-badge.png +0 -0
- package/stat/assets/images/print_icon.png +0 -0
- package/stat/assets/images/progressbar.gif +0 -0
- package/stat/assets/images/right_edges.png +0 -0
- package/stat/assets/images/slider.png +0 -0
- package/stat/assets/images/slider_ia.png +0 -0
- package/stat/assets/images/thumbnail_mode_icon.png +0 -0
- package/stat/assets/images/transparent.png +0 -0
- package/stat/assets/images/two_page_mode_icon.png +0 -0
- package/stat/assets/images/zoom_in_icon.png +0 -0
- package/stat/assets/images/zoom_out_icon.png +0 -0
- package/stat/css/BookReader.scss +89 -0
- package/stat/css/_BRBookmarks.scss +29 -0
- package/stat/css/_BRComponent.scss +13 -0
- package/stat/css/_BRfloat.scss +197 -0
- package/stat/css/_BRicon.scss +48 -0
- package/stat/css/_BRmain.scss +251 -0
- package/stat/css/_BRnav.scss +359 -0
- package/stat/css/_BRpages.scss +139 -0
- package/stat/css/_BRsearch.scss +226 -0
- package/stat/css/_BRtoolbar.scss +84 -0
- package/stat/css/_BRvendor.scss +5 -0
- package/stat/css/_MobileNav.scss +194 -0
- package/stat/css/_TextSelection.scss +32 -0
- package/stat/css/_colorbox.scss +52 -0
- package/stat/css/_controls.scss +253 -0
- package/stat/css/_icons.scss +121 -0
- package/stat/jquery-wrapper.js +4 -0
- package/stat/plugins/plugin.archive_analytics.js +86 -0
- package/stat/plugins/plugin.autoplay.js +129 -0
- package/stat/plugins/plugin.chapters.js +248 -0
- package/stat/plugins/plugin.iframe.js +48 -0
- package/stat/plugins/plugin.mobile_nav.js +288 -0
- package/stat/plugins/plugin.resume.js +68 -0
- package/stat/plugins/plugin.text_selection.js +291 -0
- package/stat/plugins/plugin.url.js +198 -0
- package/stat/plugins/plugin.vendor-fullscreen.js +247 -0
- package/stat/plugins/search/plugin.search.js +439 -0
- package/stat/plugins/search/view.js +439 -0
- package/stat/plugins/tts/AbstractTTSEngine.js +249 -0
- package/stat/plugins/tts/FestivalTTSEngine.js +169 -0
- package/stat/plugins/tts/PageChunk.js +107 -0
- package/stat/plugins/tts/PageChunkIterator.js +163 -0
- package/stat/plugins/tts/WebTTSEngine.js +357 -0
- package/stat/plugins/tts/plugin.tts.js +357 -0
- package/stat/plugins/tts/tooltip_dict.js +15 -0
- package/stat/plugins/tts/utils.js +91 -0
- package/stat/util/browserSniffing.js +30 -0
- package/stat/util/debouncer.js +26 -0
- package/stat/util/docCookies.js +67 -0
- package/stat/util/strings.js +34 -0
- package/tests/e2e/viewmode.test.js +30 -30
- package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +64 -52
- package/tests/karma/BookNavigator/book-navigator.test.js +413 -108
- package/tests/karma/BookNavigator/bookmarks/bookmark-button.test.js +44 -0
- package/tests/karma/BookNavigator/downloads/downloads-provider.test.js +6 -3
- package/tests/karma/BookNavigator/search/search-provider.test.js +106 -6
- package/tests/karma/BookNavigator/search/search-results.test.js +0 -2
- package/tests/karma/BookNavigator/sharing/sharing-provider.test.js +29 -20
- package/tests/karma/BookNavigator/volumes/volumes-provider.test.js +41 -17
- package/.nvmrc +0 -1
- package/src/BookNavigator/assets/book-loader.js +0 -27
- package/src/ItemNavigator/ItemNavigator.js +0 -377
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see bookreader-component-bundle.js.LICENSE.txt */
|
2
|
-
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[854],{9903:function(e,t,n){"use strict";n(2419),n(7042),n(3371),n(2526),n(1817),n(2165),n(5666),n(6992),n(1539),n(8783),n(3948),n(285),n(4916),n(4765),n(8674),n(2222),n(489);var o=n(3282),r=(n(1038),n(8309),n(1249),n(9890));const i=o.iv`42px`,a=o.iv`var(--menuWidth, 320px)`,s=o.iv`var(--animationTiming, 200ms)`;var l=o.iv`
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[854],{6877:function(e,t,n){"use strict";n(2419),n(7042),n(3371),n(2526),n(1817),n(1539),n(2165),n(6992),n(8783),n(3948),n(489);var r=n(3397);function o(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}var i=n(5683);window.JSCompiler_renameProperty=(e,t)=>e;const s={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},a=(e,t)=>t!==e&&(t==t||e==e),l={attribute:!0,type:String,converter:s,reflect:!1,hasChanged:a};class c extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach(((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))})),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(((e,t)=>this._classProperties.set(t,e)))}}static createProperty(e,t=l){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():`__${e}`,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const o=this[e];this[t]=r,this.requestUpdateInternal(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||l}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=a){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,r=t.converter||s,o="function"==typeof r?r:r.fromAttribute;return o?o(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,r=t.converter;return(r&&r.toAttribute||s.toAttribute)(e,n)}initialize(){this._updateState=0,this._updatePromise=new Promise((e=>this._enableUpdatingResolver=e)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((e,t)=>this[t]=e)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=l){const r=this.constructor,o=r._attributeNameForProperty(e,n);if(void 0!==o){const e=r._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(o):this.setAttribute(o,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){const e=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,n){let r=!0;if(void 0!==e){const o=this.constructor;n=n||o.getPropertyOptions(e),o._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):r=!1}!this._hasRequestedUpdate&&r&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((e,t)=>this._propertyToAttribute(t,this[t],e))),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}c.finalized=!0;const d=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:r}=t;return{kind:n,elements:r,finisher(t){window.customElements.define(e,t)}}})(e,t),u=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function h(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):u(e,t)}function p(e,t){return(n,r)=>{const o={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};if(t){const t=void 0!==r?r:n.key,i="symbol"==typeof t?Symbol():`__${t}`;o.get=function(){return void 0===this[i]&&(this[i]=this.renderRoot.querySelector(e)),this[i]}}return void 0!==r?f(o,n,r):m(o,n)}}const f=(e,t,n)=>{Object.defineProperty(t,n,e)},m=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),v=Element.prototype;v.msMatchesSelector||v.webkitMatchesSelector;var b=n(9890);const y=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,g=Symbol();class k{constructor(e,t){if(t!==g)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(y?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const w=(e,...t)=>{const n=t.reduce(((t,n,r)=>t+(e=>{if(e instanceof k)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1]),e[0]);return new k(n,g)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const S={};class C extends c{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,n)=>e.reduceRight(((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e)),n),n=t(e,new Set),r=[];n.forEach((e=>r.unshift(e))),this._styles=r}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!y){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new k(String(t),g)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?y?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==S&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return S}}C.finalized=!0,C.render=i.sY,C.shadowRootOptions={mode:"open"};class x{parseValue(e){return("string"!=typeof e||"false"!==e&&"0"!==e)&&Boolean(e)}}x.shared=new x;class O{parseValue(e){if("number"==typeof e)return e;if("boolean"==typeof e)return;const t=parseFloat(e);return Number.isNaN(t)?void 0:t}}O.shared=new O;class _{parseValue(e){return O.shared.parseValue(e)}}_.shared=new _;class E{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.indexOf("Z")>-1||t.indexOf("+")>-1||t.match(/^[0-9]{4}$/)||t.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)||t.match(/^.*?-[0-9]{2}:[0-9]{2}$/)||t.match(/^.*?-[0-9]{4}$/))&&(r=new Date(r.getTime()+1e3*r.getTimezoneOffset()*60)),r}}E.shared=new E;class B{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}}var P,A,$,z;B.shared=new B,function(e){e.Audio="audio",e.Collection="collection",e.Data="data",e.Etree="etree",e.Image="image",e.Movies="movies",e.Software="software",e.Texts="texts",e.Web="web"}(P||(P={}));class j{parseValue(e){if("string"==typeof e)switch(e.toLowerCase()){case"audio":return P.Audio;case"collection":return P.Collection;case"data":return P.Data;case"etree":return P.Etree;case"image":return P.Image;case"movies":return P.Movies;case"software":return P.Software;case"texts":return P.Texts;case"web":return P.Web;default:return}}}j.shared=new j,function(e){e.RightToLeft="rl",e.LeftToRight="lr"}(A||(A={}));class T{parseValue(e){if("string"==typeof e)switch(e.toLowerCase()){case"rl":return A.RightToLeft;case"lr":return A.LeftToRight;default:return}}}T.shared=new T;class M{parseValue(e){return String(e)}}M.shared=new M;class I{constructor(e,t){this.values=[],this.parser=e,this.rawValue=t,this.processRawValue()}get value(){return this.values.length>0?this.values[0]:void 0}processRawValue(){void 0!==this.rawValue&&(Array.isArray(this.rawValue)?this.rawValue.forEach((e=>{this.parseAndPersistValue(e)})):this.parseAndPersistValue(this.rawValue))}parseAndPersistValue(e){const t=this.parser.parseValue(e);void 0!==t&&this.values.push(t)}}class L extends I{constructor(e){super(x.shared,e)}}class D extends I{constructor(e){super(E.shared,e)}}class R extends I{constructor(e){super(B.shared,e)}}class H extends I{constructor(e){super(O.shared,e)}}class N extends I{constructor(e){super(M.shared,e)}}class U extends I{constructor(e){super(_.shared,e)}}class F extends I{constructor(e){super(j.shared,e)}}class V{constructor(e){this.rawMetadata=e,this.identifier=e.identifier,this.addeddate=e.addeddate?new D(e.addeddate):void 0,this.publicdate=e.publicdate?new D(e.publicdate):void 0,this.indexdate=e.indexdate?new D(e.indexdate):void 0,this.audio_codec=e.audio_codec?new N(e.audio_codec):void 0,this.audio_sample_rate=e.audio_sample_rate?new H(e.audio_sample_rate):void 0,this.collection=e.collection?new N(e.collection):void 0,this.collections_raw=e.collections_raw?new N(e.collections_raw):void 0,this.collection_size=e.collection_size?new U(e.collection_size):void 0,this.contributor=e.contributor?new N(e.contributor):void 0,this.coverage=e.coverage?new N(e.coverage):void 0,this.creator=e.creator?new N(e.creator):void 0,this.date=e.date?new D(e.date):void 0,this.description=e.description?new N(e.description):void 0,this.downloads=e.downloads?new H(e.downloads):void 0,this.duration=e.duration?new R(e.duration):void 0,this.files_count=e.files_count?new H(e.files_count):void 0,this.item_count=e.item_count?new H(e.item_count):void 0,this.item_size=e.item_size?new U(e.item_size):void 0,this.language=e.language?new N(e.language):void 0,this.length=e.length?new R(e.length):void 0,this.lineage=e.lineage?new N(e.lineage):void 0,this.mediatype=e.mediatype?new F(e.mediatype):void 0,this.month=e.month?new H(e.month):void 0,this.noindex=e.noindex?new L(e.noindex):void 0,this.notes=e.notes?new N(e.notes):void 0,this.num_favorites=e.num_favorites?new H(e.num_favorites):void 0,this.num_reviews=e.num_reviews?new H(e.num_reviews):void 0,this.runtime=e.runtime?new R(e.runtime):void 0,this.scanner=e.scanner?new N(e.scanner):void 0,this.source=e.source?new N(e.source):void 0,this.start_localtime=e.start_localtime?new D(e.start_localtime):void 0,this.start_time=e.start_time?new D(e.start_time):void 0,this.stop_time=e.stop_time?new D(e.stop_time):void 0,this.subject=e.subject?new N(e.subject):void 0,this.taper=e.taper?new N(e.taper):void 0,this.title=e.title?new N(e.title):void 0,this.track=e.track?new H(e.track):void 0,this.transferer=e.transferer?new N(e.transferer):void 0,this.type=e.type?new N(e.type):void 0,this.uploader=e.uploader?new N(e.uploader):void 0,this.utc_offset=e.utc_offset?new H(e.utc_offset):void 0,this.venue=e.venue?new N(e.venue):void 0,this.week=e.week?new H(e.week):void 0,this.year=e.year?new D(e.year):void 0}}class q{constructor(e){this.name=e.name,this.source=e.source,this.btih=e.btih,this.md5=e.md5,this.format=e.format,this.mtime=e.mtime,this.crc32=e.crc32,this.sha1=e.sha1,this.original=e.original,this.title=e.title,this.length=e.length?B.shared.parseValue(e.length):void 0,this.size=e.size?_.shared.parseValue(e.size):void 0,this.height=e.height?O.shared.parseValue(e.height):void 0,this.width=e.width?O.shared.parseValue(e.width):void 0,this.track=e.track?O.shared.parseValue(e.track):void 0,this.external_identifier=e["external-identifier"],this.creator=e.creator,this.album=e.album}}class W{constructor(e){this.reviewbody=e.reviewbody,this.reviewtitle=e.reviewtitle,this.reviewer=e.reviewer,this.reviewdate=E.shared.parseValue(e.reviewdate),this.createdate=E.shared.parseValue(e.createdate),this.stars=e.stars?parseFloat(e.stars):void 0}}class Z{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 q(e))),this.files_count=e.files_count,this.item_last_updated=e.item_last_updated,this.item_size=e.item_size,this.metadata=new V(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 W(e)))}}class G{constructor(e){this.numFound=e.numFound,this.start=e.start,this.docs=e.docs.map((e=>new V(e))),this.aggregations=e.aggregations}}class J{constructor(e){this.rawResponse=e,this.responseHeader=e.responseHeader,this.response=new G(e.response)}}!function(e){e.networkError="SearchService.NetworkError",e.itemNotFound="SearchService.ItemNotFound",e.decodingError="SearchService.DecodingError",e.searchEngineError="SearchService.SearchEngineError"}($||($={}));class Y extends Error{constructor(e,t,n){super(t),this.name=e,this.type=e,this.details=n}}class X{constructor(e){this.searchBackend=e}async search(e){const t=await this.searchBackend.performSearch(e);return t.error?t:{success:new J(t.success)}}async fetchMetadata(e){var t;const n=await this.searchBackend.fetchMetadata(e);return n.error?n:void 0===(null===(t=n.success)||void 0===t?void 0:t.metadata)?{error:new Y($.itemNotFound)}:{success:new Z(n.success)}}}X.default=new X(new class{constructor(e="archive.org"){this.baseUrl=e}async performSearch(e){const t=e.asUrlSearchParams.toString(),n=`https://${this.baseUrl}/advancedsearch.php?${t}`;return this.fetchUrl(n)}async fetchMetadata(e){const t=`https://${this.baseUrl}/metadata/${e}`;return this.fetchUrl(t)}async fetchUrl(e){let t;try{t=await fetch(e)}catch(e){const t=e instanceof Error?e.message:e;return this.getErrorResult($.networkError,t)}try{const e=await t.json(),n=e.error;if(n){const t=e.forensics;return this.getErrorResult($.searchEngineError,n,t)}return{success:e}}catch(e){const t=e instanceof Error?e.message:e;return this.getErrorResult($.decodingError,t)}}getErrorResult(e,t,n){return{error:new Y(e,t,n)}}}),function(e){e.Asc="asc",e.Desc="desc"}(z||(z={}));const Q=r.iv`42px`,K=r.iv`var(--menuWidth, 320px)`,ee=r.iv`var(--animationTiming, 200ms)`;var te=r.iv`
|
3
3
|
|
4
4
|
.main {
|
5
5
|
overflow: hidden;
|
@@ -8,7 +8,7 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
.animate {
|
11
|
-
transition: transform ${
|
11
|
+
transition: transform ${ee} ease-out;
|
12
12
|
}
|
13
13
|
|
14
14
|
.menu {
|
@@ -16,13 +16,13 @@
|
|
16
16
|
top: 0;
|
17
17
|
left: 0;
|
18
18
|
bottom: 0;
|
19
|
-
width: ${
|
19
|
+
width: ${K};
|
20
20
|
padding: .5rem .5rem 0 0;
|
21
21
|
box-sizing: border-box;
|
22
22
|
font-size: 1.4rem;
|
23
23
|
color: var(--primaryTextColor);
|
24
24
|
background: var(--menuSliderBg);
|
25
|
-
transform: translateX(calc(${
|
25
|
+
transform: translateX(calc(${K} * -1));
|
26
26
|
}
|
27
27
|
|
28
28
|
.menu > button.close {
|
@@ -82,10 +82,10 @@
|
|
82
82
|
top: 0;
|
83
83
|
right: 0;
|
84
84
|
bottom: 0;
|
85
|
-
left: ${
|
85
|
+
left: ${Q};
|
86
86
|
z-index: 1;
|
87
|
-
transform: translateX(calc(${
|
88
|
-
transition: transform ${
|
87
|
+
transform: translateX(calc(${K} * -1));
|
88
|
+
transition: transform ${ee} ease-out;
|
89
89
|
background: var(--activeButtonBg);
|
90
90
|
border-right: .2rem solid;
|
91
91
|
border-color: var(--subpanelRightBorderColor);
|
@@ -123,7 +123,7 @@
|
|
123
123
|
padding-bottom: 3rem;
|
124
124
|
position: relative;
|
125
125
|
}
|
126
|
-
`,c=r.dy`
|
126
|
+
`;const ne=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),oe=new Map;class ie{constructor(e,t){if(this._$cssResult$=!0,t!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=oe.get(this.cssText);return ne&&void 0===e&&(oe.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const se=e=>new ie("string"==typeof e?e:e+"",re),ae=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new ie(n,re)},le=ne?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return se(t)})(e):e;var ce;const de=window.trustedTypes,ue=de?de.emptyScript:"",he=window.reactiveElementPolyfillSupport,pe={toAttribute(e,t){switch(t){case Boolean:e=e?ue:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},fe=(e,t)=>t!==e&&(t==t||e==e),me={attribute:!0,type:String,converter:pe,reflect:!1,hasChanged:fe};class ve extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const r=this._$Eh(n,t);void 0!==r&&(this._$Eu.set(r,n),e.push(r))})),e}static createProperty(e,t=me){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const o=this[e];this[t]=r,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||me}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(le(e))}else void 0!==e&&t.push(le(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{ne?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=me){var r,o;const i=this.constructor._$Eh(e,n);if(void 0!==i&&!0===n.reflect){const s=(null!==(o=null===(r=n.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==o?o:pe.toAttribute)(t,n.type);this._$Ei=e,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Ei=null}}_$AK(e,t){var n,r,o;const i=this.constructor,s=i._$Eu.get(e);if(void 0!==s&&this._$Ei!==s){const e=i.getPropertyOptions(s),a=e.converter,l=null!==(o=null!==(r=null===(n=a)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof a?a:null)&&void 0!==o?o:pe.fromAttribute;this._$Ei=s,this[s]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let r=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||fe)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var be;ve.finalized=!0,ve.elementProperties=new Map,ve.elementStyles=[],ve.shadowRootOptions={mode:"open"},null==he||he({ReactiveElement:ve}),(null!==(ce=globalThis.reactiveElementVersions)&&void 0!==ce?ce:globalThis.reactiveElementVersions=[]).push("1.0.2");const ye=globalThis.trustedTypes,ge=ye?ye.createPolicy("lit-html",{createHTML:e=>e}):void 0,ke=`lit$${(Math.random()+"").slice(9)}$`,we="?"+ke,Se=`<${we}>`,Ce=document,xe=(e="")=>Ce.createComment(e),Oe=e=>null===e||"object"!=typeof e&&"function"!=typeof e,_e=Array.isArray,Ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Be=/-->/g,Pe=/>/g,Ae=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,$e=/'/g,ze=/"/g,je=/^(?:script|style|textarea)$/i,Te=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Me=Te(1),Ie=(Te(2),Symbol.for("lit-noChange")),Le=Symbol.for("lit-nothing"),De=new WeakMap,Re=Ce.createTreeWalker(Ce,129,null,!1),He=(e,t)=>{const n=e.length-1,r=[];let o,i=2===t?"<svg>":"",s=Ee;for(let t=0;t<n;t++){const n=e[t];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===Ee?"!--"===l[1]?s=Be:void 0!==l[1]?s=Pe:void 0!==l[2]?(je.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=Ae):void 0!==l[3]&&(s=Ae):s===Ae?">"===l[0]?(s=null!=o?o:Ee,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?Ae:'"'===l[3]?ze:$e):s===ze||s===$e?s=Ae:s===Be||s===Pe?s=Ee:(s=Ae,o=void 0);const u=s===Ae&&e[t+1].startsWith("/>")?" ":"";i+=s===Ee?n+Se:c>=0?(r.push(a),n.slice(0,c)+"$lit$"+n.slice(c)+ke+u):n+ke+(-2===c?(r.push(void 0),t):u)}const a=i+(e[n]||"<?>")+(2===t?"</svg>":"");return[void 0!==ge?ge.createHTML(a):a,r]};class Ne{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let o=0,i=0;const s=e.length-1,a=this.parts,[l,c]=He(e,t);if(this.el=Ne.createElement(l,n),Re.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=Re.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(ke)){const n=c[i++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+"$lit$").split(ke),t=/([.?@])?(.*)/.exec(n);a.push({type:1,index:o,name:t[2],strings:e,ctor:"."===t[1]?We:"?"===t[1]?Ge:"@"===t[1]?Je:qe})}else a.push({type:6,index:o})}for(const t of e)r.removeAttribute(t)}if(je.test(r.tagName)){const e=r.textContent.split(ke),t=e.length-1;if(t>0){r.textContent=ye?ye.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],xe()),Re.nextNode(),a.push({type:2,index:++o});r.append(e[t],xe())}}}else if(8===r.nodeType)if(r.data===we)a.push({type:2,index:o});else{let e=-1;for(;-1!==(e=r.data.indexOf(ke,e+1));)a.push({type:7,index:o}),e+=ke.length-1}o++}}static createElement(e,t){const n=Ce.createElement("template");return n.innerHTML=e,n}}function Ue(e,t,n=e,r){var o,i,s,a;if(t===Ie)return t;let l=void 0!==r?null===(o=n._$Cl)||void 0===o?void 0:o[r]:n._$Cu;const c=Oe(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(i=null==l?void 0:l._$AO)||void 0===i||i.call(l,!1),void 0===c?l=void 0:(l=new c(e),l._$AT(e,n,r)),void 0!==r?(null!==(s=(a=n)._$Cl)&&void 0!==s?s:a._$Cl=[])[r]=l:n._$Cu=l),void 0!==l&&(t=Ue(e,l._$AS(e,t.values),l,r)),t}class Fe{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:r}=this._$AD,o=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:Ce).importNode(n,!0);Re.currentNode=o;let i=Re.nextNode(),s=0,a=0,l=r[0];for(;void 0!==l;){if(s===l.index){let t;2===l.type?t=new Ve(i,i.nextSibling,this,e):1===l.type?t=new l.ctor(i,l.name,l.strings,this,e):6===l.type&&(t=new Ye(i,this,e)),this.v.push(t),l=r[++a]}s!==(null==l?void 0:l.index)&&(i=Re.nextNode(),s++)}return o}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ve{constructor(e,t,n,r){var o;this.type=2,this._$AH=Le,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cg=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ue(this,e,t),Oe(e)?e===Le||null==e||""===e?(this._$AH!==Le&&this._$AR(),this._$AH=Le):e!==this._$AH&&e!==Ie&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.S(e):(e=>{var t;return _e(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])})(e)?this.M(e):this.$(e)}A(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}S(e){this._$AH!==e&&(this._$AR(),this._$AH=this.A(e))}$(e){this._$AH!==Le&&Oe(this._$AH)?this._$AA.nextSibling.data=e:this.S(Ce.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:r}=e,o="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Ne.createElement(r.h,this.options)),r);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===o)this._$AH.m(n);else{const e=new Fe(o,this),t=e.p(this.options);e.m(n),this.S(t),this._$AH=e}}_$AC(e){let t=De.get(e.strings);return void 0===t&&De.set(e.strings,t=new Ne(e)),t}M(e){_e(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const o of e)r===t.length?t.push(n=new Ve(this.A(xe()),this.A(xe()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class qe{constructor(e,t,n,r,o){this.type=1,this._$AH=Le,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Le}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,r){const o=this.strings;let i=!1;if(void 0===o)e=Ue(this,e,t,0),i=!Oe(e)||e!==this._$AH&&e!==Ie,i&&(this._$AH=e);else{const r=e;let s,a;for(e=o[0],s=0;s<o.length-1;s++)a=Ue(this,r[n+s],t,s),a===Ie&&(a=this._$AH[s]),i||(i=!Oe(a)||a!==this._$AH[s]),a===Le?e=Le:e!==Le&&(e+=(null!=a?a:"")+o[s+1]),this._$AH[s]=a}i&&!r&&this.k(e)}k(e){e===Le?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class We extends qe{constructor(){super(...arguments),this.type=3}k(e){this.element[this.name]=e===Le?void 0:e}}const Ze=ye?ye.emptyScript:"";class Ge extends qe{constructor(){super(...arguments),this.type=4}k(e){e&&e!==Le?this.element.setAttribute(this.name,Ze):this.element.removeAttribute(this.name)}}class Je extends qe{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=Ue(this,e,t,0))&&void 0!==n?n:Le)===Ie)return;const r=this._$AH,o=e===Le&&r!==Le||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==Le&&(r===Le||o);o&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class Ye{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Ue(this,e)}}const Xe=window.litHtmlPolyfillSupport;var Qe,Ke;null==Xe||Xe(Ne,Ve),(null!==(be=globalThis.litHtmlVersions)&&void 0!==be?be:globalThis.litHtmlVersions=[]).push("2.0.2");class et extends ve{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var r,o;const i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:t;let s=i._$litPart$;if(void 0===s){const e=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;i._$litPart$=s=new Ve(t.insertBefore(xe(),e),e,void 0,null!=n?n:{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return Ie}}et.finalized=!0,et._$litElement$=!0,null===(Qe=globalThis.litElementHydrateSupport)||void 0===Qe||Qe.call(globalThis,{LitElement:et});const tt=globalThis.litElementPolyfillSupport;null==tt||tt({LitElement:et}),(null!==(Ke=globalThis.litElementVersions)&&void 0!==Ke?Ke:globalThis.litElementVersions=[]).push("3.0.2");var nt=Me`
|
127
127
|
<svg
|
128
128
|
viewBox="0 0 18 18"
|
129
129
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -133,7 +133,7 @@
|
|
133
133
|
<desc id="collapseSidebarDescID">A circle with a left pointing chevron</desc>
|
134
134
|
<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" />
|
135
135
|
</svg>
|
136
|
-
`;class
|
136
|
+
`;customElements.define("ia-icon-collapse-sidebar",class extends et{static get styles(){return ae`
|
137
137
|
:host {
|
138
138
|
width: var(--iconWidth, 'auto');
|
139
139
|
height: var(--iconHeight, 'auto');
|
@@ -146,7 +146,7 @@
|
|
146
146
|
.stroke-color {
|
147
147
|
stroke: var(--iconStrokeColor);
|
148
148
|
}
|
149
|
-
`}render(){return
|
149
|
+
`}render(){return nt}});var rt=r.iv`
|
150
150
|
a {
|
151
151
|
display: inline-block;
|
152
152
|
text-decoration: none;
|
@@ -221,26 +221,26 @@
|
|
221
221
|
.icon.active .fill-color {
|
222
222
|
fill: #fff;
|
223
223
|
}
|
224
|
-
`;class
|
224
|
+
`;class ot extends r.oi{static get styles(){return rt}static get properties(){return{icon:{type:String},href:{type:String},label:{type:String},menuDetails:{type:String},id:{type:String},selected:{type:Boolean},followable:{type:Boolean}}}constructor(){super(),this.icon="",this.href="",this.label="",this.menuDetails="",this.id="",this.selected=!1,this.followable=!1}onClick(e){e.preventDefault(),this.dispatchMenuTypeSelectedEvent()}dispatchMenuTypeSelectedEvent(){this.dispatchEvent(new CustomEvent("menuTypeSelected",{bubbles:!0,composed:!0,detail:{id:this.id}}))}get buttonClass(){return this.selected?"selected":""}get iconClass(){return this.selected?"active":""}get menuItem(){return r.dy`
|
225
225
|
<span class="icon ${this.iconClass}">
|
226
226
|
${this.icon}
|
227
227
|
</span>
|
228
228
|
<span class="label">${this.label}</span>
|
229
229
|
<span class="menu-details">${this.menuDetails}</span>
|
230
|
-
`}get linkButton(){return
|
230
|
+
`}get linkButton(){return r.dy`
|
231
231
|
<a
|
232
232
|
href="${this.href}"
|
233
233
|
class="menu-item ${this.buttonClass}"
|
234
234
|
@click=${this.followable?void 0:this.onClick}
|
235
235
|
>${this.menuItem}</a>
|
236
|
-
`}get clickButton(){return
|
236
|
+
`}get clickButton(){return r.dy`
|
237
237
|
<button
|
238
238
|
class="menu-item ${this.buttonClass}"
|
239
239
|
@click=${this.onClick}
|
240
240
|
>
|
241
241
|
${this.menuItem}
|
242
242
|
</button>
|
243
|
-
`}render(){return this.href?this.linkButton:this.clickButton}}customElements.define("menu-button",
|
243
|
+
`}render(){return this.href?this.linkButton:this.clickButton}}customElements.define("menu-button",ot);const it={closeDrawer:"menuSliderClosed"};class st extends r.oi{static get styles(){return te}static get properties(){return{menus:{type:Array},open:{type:Boolean},manuallyHandleClose:{type:Boolean},selectedMenu:{type:String},selectedMenuAction:{type:Object},animateMenuOpen:{type:Boolean}}}constructor(){super(),this.menus=[],this.open=!1,this.selectedMenu="",this.selectedMenuAction=b.Ld,this.animateMenuOpen=!1,this.manuallyHandleClose=!1}updated(){const{actionButton:e}=this.selectedMenuDetails||{};e!==this.selectedMenuAction&&(this.selectedMenuAction=e||b.Ld)}setSelectedMenu({detail:e}){const{id:t}=e;this.selectedMenu=this.selectedMenu===t?"":t;const{actionButton:n}=this.selectedMenuDetails||{};this.selectedMenuAction=n||b.Ld}closeMenu(){this.manuallyHandleClose||(this.open=!1);const{closeDrawer:e}=it,t=new CustomEvent(e,{detail:this.selectedMenuDetails});this.dispatchEvent(t)}get selectedMenuDetails(){return this.menus.find((e=>e.id===this.selectedMenu))}get selectedMenuComponent(){const e=this.selectedMenuDetails;return e&&e.component?e.component:r.dy``}get sliderDetailsClass(){return`${this.animateMenuOpen?"animate":""} ${this.open?"open":""}`}get selectedMenuClass(){return this.selectedMenu?"open":""}get menuItems(){return this.menus.map((e=>r.dy`
|
244
244
|
<li>
|
245
245
|
<menu-button
|
246
246
|
@menuTypeSelected=${this.setSelectedMenu}
|
@@ -253,20 +253,20 @@
|
|
253
253
|
.href=${e.href}
|
254
254
|
></menu-button>
|
255
255
|
</li>
|
256
|
-
`))}get renderMenuHeader(){const{label:e="",menuDetails:t=""}=this.selectedMenuDetails||{},n=this.selectedMenuAction?"with-secondary-action":"",
|
256
|
+
`))}get renderMenuHeader(){const{label:e="",menuDetails:t=""}=this.selectedMenuDetails||{},n=this.selectedMenuAction?"with-secondary-action":"",o=this.selectedMenuAction?r.dy`<span class="custom-action">${this.selectedMenuAction}</span>`:b.Ld;return r.dy`
|
257
257
|
<header class="${n}">
|
258
258
|
<div class="details">
|
259
259
|
<h3>${e}</h3>
|
260
260
|
<span class="extra-details">${t}</span>
|
261
261
|
</div>
|
262
|
-
${
|
262
|
+
${o}
|
263
263
|
${this.closeButton}
|
264
264
|
</header>
|
265
|
-
`}get closeButton(){return
|
265
|
+
`}get closeButton(){return r.dy`
|
266
266
|
<button class="close" aria-label="Close this menu" @click=${this.closeMenu}>
|
267
267
|
<ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>
|
268
268
|
</button>
|
269
|
-
`}render(){return
|
269
|
+
`}render(){return r.dy`
|
270
270
|
<div class="main">
|
271
271
|
<div class="menu ${this.sliderDetailsClass}">
|
272
272
|
${this.closeButton}
|
@@ -283,157 +283,7 @@
|
|
283
283
|
</div>
|
284
284
|
</div>
|
285
285
|
</div>
|
286
|
-
`}}var
|
287
|
-
<svg
|
288
|
-
viewBox="0 0 21 19"
|
289
|
-
version="1.1"
|
290
|
-
xmlns="http://www.w3.org/2000/svg"
|
291
|
-
aria-labelledby="advanceTitleID advanceDescID"
|
292
|
-
>
|
293
|
-
<title id="advanceTitleID">Advance icon</title>
|
294
|
-
<desc id="advanceDescID">An arrow pointing in a forward direction</desc>
|
295
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
296
|
-
<g transform="translate(-200.000000, -15.000000)">
|
297
|
-
<g transform="translate(56.922243, 5.000000)">
|
298
|
-
<g transform="translate(144.000000, 10.000000)">
|
299
|
-
<g transform="translate(11.000000, 10.000000) scale(-1, 1) translate(-11.000000, -10.000000) translate(1.000000, 0.000000)">
|
300
|
-
<polyline class="stroke-color" stroke-width="2" stroke-linejoin="round" points="14.4444444 16.6666667 20 16.6666667 20 3.33333333 5.55555556 3.33333333"></polyline>
|
301
|
-
<polygon class="fill-color" points="5.55555556 0 5.55555556 6.66666667 1.11111111 3.33333333"></polygon>
|
302
|
-
<text transform="translate(6.666667, 13.333333) scale(-1, 1) translate(-6.666667, -13.333333) " font-family="HelveticaNeue, Helvetica Neue" font-size="10" font-weight="normal" class="fill-color">
|
303
|
-
<tspan x="0" y="17.3333333">10</tspan>
|
304
|
-
</text>
|
305
|
-
</g>
|
306
|
-
</g>
|
307
|
-
</g>
|
308
|
-
</g>
|
309
|
-
</g>
|
310
|
-
</svg>
|
311
|
-
`,v=r.dy`
|
312
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 468 300" aria-labelledby="applePayTitleID applePayDescID">
|
313
|
-
<title id="donateTitleID">ApplePay icon</title>
|
314
|
-
<desc id="donateDescID">An illustration of the Apple Pay logo</desc>
|
315
|
-
<g fill="none">
|
316
|
-
<path
|
317
|
-
fill="#000"
|
318
|
-
d="M425.540484,0 L41.8576242,0 C40.2596386,0 38.6588291,0 37.0636954,0.0093185241 C35.715305,0.0189194277 34.3700489,0.0338855422 33.0247929,0.0705948795 C30.0908697,0.149943524 27.1318148,0.323042169 24.2346009,0.84375 C21.2910768,1.37349398 18.5519955,2.2375753 15.8798381,3.59807982 C13.2528614,4.93401732 10.8478351,6.68138178 8.76362011,8.76647214 C6.67850151,10.8515625 4.93113705,13.2526355 3.59548193,15.882436 C2.23469503,18.5545934 1.37004895,21.2945218 0.843975904,24.240305 C0.320472515,27.138366 0.146216114,30.0968562 0.0671498494,33.0276732 C0.0310052711,34.3729292 0.0155026355,35.7181852 0.00672063253,37.0631589 C1.12951807e-05,38.6617093 1.12951807e-05,40.2591303 1.12951807e-05,41.8605045 L1.12951807e-05,257.36634 C1.12951807e-05,258.967715 1.12951807e-05,260.56234 0.00672063253,262.163997 C0.0155026355,263.50897 0.0310052711,264.854226 0.0671498494,266.199482 C0.146216114,269.12773 0.320472515,272.08622 0.843975904,274.983434 C1.37004895,277.930346 2.23469503,280.669145 3.59548193,283.341585 C4.93113705,285.971386 6.67850151,288.375565 8.76362011,290.457549 C10.8478351,292.546028 13.2528614,294.29311 15.8798381,295.625659 C18.5519955,296.989834 21.2910768,297.854198 24.2346009,298.38366 C27.1318148,298.900979 30.0908697,299.077184 33.0247929,299.156532 C34.3700489,299.187029 35.715305,299.205102 37.0636954,299.211314 C38.6588291,299.223739 40.2596386,299.223739 41.8576242,299.223739 L425.540484,299.223739 C427.135646,299.223739 428.736483,299.223739 430.331306,299.211314 C431.676591,299.205102 433.021875,299.187029 434.373287,299.156532 C437.300998,299.077184 440.259488,298.900979 443.16379,298.38366 C446.10336,297.854198 448.843006,296.989834 451.515446,295.625659 C454.145247,294.29311 456.543213,292.546028 458.631721,290.457549 C460.713422,288.375565 462.460759,285.971386 463.799831,283.341585 C465.163695,280.669145 466.027494,277.930346 466.551026,274.983434 C467.07484,272.08622 467.244832,269.12773 467.324181,266.199482 C467.36089,264.854226 467.378991,263.50897 467.385203,262.163997 C467.3976,260.56234 467.3976,258.967743 467.3976,257.36634 L467.3976,41.8605045 C467.3976,40.2591303 467.3976,38.6617093 467.385203,37.0631589 C467.378991,35.7181852 467.36089,34.3729292 467.324181,33.0276732 C467.244804,30.0968562 467.07484,27.138366 466.551026,24.240305 C466.027523,21.2945218 465.163695,18.5545934 463.799831,15.882436 C462.460759,13.2526355 460.713422,10.8515625 458.631721,8.76647214 C456.543213,6.68138178 454.145247,4.93401732 451.515446,3.59807982 C448.843006,2.2375753 446.10336,1.37349398 443.16379,0.84375 C440.259516,0.323042169 437.301026,0.149943524 434.373287,0.0705948795 C433.021875,0.0338855422 431.676591,0.0189194277 430.331306,0.0093185241 C428.736483,0 427.135646,0 425.540484,0 L425.540484,0 Z"
|
319
|
-
/>
|
320
|
-
<path
|
321
|
-
fill="#FFF"
|
322
|
-
d="M425.540484,9.97364458 L430.260429,9.98268072 C431.539044,9.99171687 432.817686,10.0055535 434.103389,10.0405685 C436.339863,10.1009977 438.956052,10.2221386 441.394682,10.659262 C443.514505,11.0410392 445.292338,11.6216114 446.998503,12.4902108 C448.682897,13.3461032 450.22613,14.4677146 451.573588,15.813253 C452.926186,17.1678276 454.049238,18.713573 454.916425,20.4166039 C455.780196,22.1094691 456.357097,23.8788592 456.736615,26.0142131 C457.172609,28.4262989 457.293185,31.0496047 457.35449,33.299887 C457.388912,34.5700301 457.405855,35.8401732 457.412095,37.1405309 C457.423956,38.7131024 457.423956,40.2848268 457.423956,41.8605045 L457.423956,257.36634 C457.423956,258.942018 457.423956,260.510919 457.411813,262.117093 C457.405855,263.386954 457.38894,264.657097 457.354207,265.929499 C457.293185,268.176393 457.172637,270.798287 456.731278,273.238893 C456.357097,275.34488 455.780506,277.114552 454.911935,278.815889 C454.047261,280.514684 452.925932,282.058735 451.579236,283.404838 C450.224125,284.76026 448.685975,285.878483 446.981561,286.742282 C445.288131,287.606645 443.513347,288.186681 441.41442,288.564477 C438.926402,289.007812 436.200593,289.1298 434.147694,289.185429 C432.85609,289.214514 431.570698,289.231994 430.253991,289.238234 C428.68478,289.250095 427.109977,289.250095 425.540512,289.250095 L41.8576242,289.250095 C41.8367282,289.250095 41.8163968,289.250095 41.7952184,289.250095 C40.2438253,289.250095 38.6893261,289.250095 37.109695,289.237952 C35.821762,289.231994 34.5366529,289.214797 33.294183,289.186559 C31.1944089,289.1298 28.4669051,289.008095 25.9991905,288.5673 C23.8822195,288.186653 22.107436,287.606645 20.391698,286.730986 C18.7033791,285.874812 17.1663592,284.757718 15.8106551,283.399755 C14.4653991,282.056758 13.3474586,280.517508 12.4830949,278.816171 C11.617884,277.116529 11.039006,275.341491 10.6583867,273.210373 C10.2184111,270.774567 10.0975527,268.163121 10.0371517,265.931476 C10.0026732,264.653709 9.98827184,263.376224 9.98008283,262.106081 L9.97387048,258.356363 L9.97387048,257.36634 L9.97387048,41.8605045 L9.97387048,40.8704819 L9.97980045,37.1286709 C9.98827184,35.8509036 10.0026732,34.5734187 10.0371517,33.2967809 C10.0975527,31.0628765 10.2184111,28.4503012 10.6620294,25.9941642 C11.0392884,23.8822477 11.617884,22.1072101 12.487613,20.3990964 C13.3451995,18.7107492 14.4651167,17.1695218 15.8174605,15.8174887 C17.1644108,14.4699736 18.7064571,13.3497741 20.4055346,12.4856928 C22.1029179,11.6213291 23.8810617,11.0410392 25.998061,10.6601092 C28.4372553,10.2218562 31.0551958,10.1009977 33.2972892,10.0402861 C34.5753389,10.0055535 35.8533886,9.99171687 37.1218373,9.9829631 L41.8576242,9.97364458 L425.540484,9.97364458"
|
323
|
-
/>
|
324
|
-
<g fill="#000">
|
325
|
-
<path
|
326
|
-
d="M64.3701386 18.7514966C68.3721341 13.7458678 71.0878627 7.02478351 70.371607.156635919 64.5132486.44793863 57.3642463 4.02159262 53.225325 9.03114646 49.5090129 13.3210561 46.2197715 20.3235599 47.0772734 26.9037933 53.6535818 27.4742282 60.223819 23.6166698 64.3701386 18.7514966M70.2968894 28.1885919C60.7465035 27.6197101 52.6263416 33.608895 48.0655453 33.608895 43.5022358 33.608895 36.5181714 28.4752636 28.9643216 28.6136295 19.1325163 28.7580384 10.0097377 34.3170181 5.02051515 43.1584055-5.24146716 60.845529 2.31238262 87.0817206 12.2916183 101.486888 17.1377591 108.613582 22.9781865 116.460599 30.6738472 116.178727 37.9449504 115.893411 40.7949222 111.470557 49.6332599 111.470557 58.4651029 111.470557 61.032328 116.178727 68.7292313 116.036098 76.7111119 115.893383 81.7012098 108.905845 86.5472941 101.772204 92.1067256 93.6481457 94.3825633 85.8036992 94.5257015 85.3730704 94.3825351 85.2304405 79.13438 79.3808641 78.9929926 61.8407474 78.8490355 47.1541604 90.9645005 40.1684017 91.5347094 39.7351751 84.6929926 29.6162462 74.0029511 28.4752636 70.2968894 28.1885919"
|
327
|
-
transform="translate(63.226 81.89)"
|
328
|
-
/>
|
329
|
-
<path
|
330
|
-
d="M40.5024334.459215539C61.2600389.459215539 75.7143122 14.7676399 75.7143122 35.5995958 75.7143122 56.5059305 60.9626085 70.8886771 39.9819233 70.8886771L16.9992802 70.8886771 16.9992802 107.437566.394319742 107.437566.394319742.459215539 40.5024334.459215539 40.5024334.459215539zM16.999252 56.95065L36.0523017 56.95065C50.509427 56.95065 58.7375426 49.1672539 58.7375426 35.6739463 58.7375426 22.1820789 50.509427 14.4716214 36.1266522 14.4716214L16.999252 14.4716214 16.999252 56.95065 16.999252 56.95065zM80.0528476 85.271452C80.0528476 71.6294151 90.5060291 63.2525984 109.041449 62.2144301L130.391063 60.9546222 130.391063 54.9501323C130.391063 46.2758571 124.533862 41.0864557 114.74992 41.0864557 105.480784 41.0864557 99.6979342 45.5337073 98.2908371 52.5034268L83.1673243 52.5034268C84.0567915 38.4166704 96.0657712 28.0378676 115.341929 28.0378676 134.246278 28.0378676 146.329608 38.0463014 146.329608 53.6888842L146.329608 107.437595 130.983072 107.437595 130.983072 94.6120864 130.614143 94.6120864C126.092541 103.286362 116.231396 108.771753 106.001295 108.771753 90.7290807 108.771753 80.0528476 99.2823895 80.0528476 85.271452zM130.391063 78.2287939L130.391063 72.075603 111.189256 73.2610604C101.625542 73.9288597 96.2145005 78.1544433 96.2145005 84.8267325 96.2145005 91.6463108 101.848621 96.0949742 110.448546 96.0949742 121.642437 96.0949742 130.391063 88.3845167 130.391063 78.2287939zM160.81819 136.128737L160.81819 123.154528C162.002208 123.450546 164.670553 123.450546 166.006151 123.450546 173.419179 123.450546 177.423122 120.337453 179.868388 112.331006 179.868388 112.182277 181.278337 107.586324 181.278337 107.511973L153.107705 29.4464049 170.453375 29.4464049 190.175664 92.9075589 190.470242 92.9075589 210.19256 29.4464049 227.09495 29.4464049 197.883269 111.514477C191.21386 130.420266 183.503375 136.499106 167.34175 136.499106 166.00618 136.499106 162.002236 136.350377 160.81819 136.128737z"
|
331
|
-
transform="translate(63.226 81.89) translate(112.952 7.853)"
|
332
|
-
/>
|
333
|
-
</g>
|
334
|
-
</g>
|
335
|
-
</svg>
|
336
|
-
`,b=r.dy`
|
337
|
-
<svg
|
338
|
-
viewBox="0 0 40 40"
|
339
|
-
version="1.1"
|
340
|
-
xmlns="http://www.w3.org/2000/svg"
|
341
|
-
aria-labelledby="audioTitleID audioDescID"
|
342
|
-
>
|
343
|
-
<title id="audioTitleID">Audio icon</title>
|
344
|
-
<desc id="audioDescID">An illustration of an audio speaker.</desc>
|
345
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
346
|
-
<g transform="translate(10, 8)" class="fill-color">
|
347
|
-
<path
|
348
|
-
d="M19.4264564,11.8585048 L19.4264564,20.7200433 C19.4264564,22.3657576 18.8838179,23.2519114 16.8489237,23.2519114 C12.2364969,23.125318 7.75972977,23.125318 3.14730298,23.2519114 C1.24806842,23.2519114 0.569770368,22.492351 0.569770368,20.7200433 L0.569770368,2.74377955 C0.569770368,1.09806526 1.11240881,0.211911416 3.14730298,0.211911416 C7.75972977,0.338504822 12.2364969,0.338504822 16.8489237,0.211911416 C18.7481583,0.211911416 19.4264564,0.971471855 19.4264564,2.74377955 C19.2907967,5.78202131 19.4264564,8.82026306 19.4264564,11.8585048 L19.4264564,11.8585048 Z M10.0659432,2.74377955 C8.16670861,2.74377955 6.67445288,4.13630702 6.67445288,5.90861471 C6.67445288,7.6809224 8.16670861,9.07344988 10.0659432,9.07344988 C11.9651777,9.07344988 13.4574335,7.6809224 13.4574335,5.90861471 C13.4574335,4.13630702 11.8295181,2.74377955 10.0659432,2.74377955 L10.0659432,2.74377955 Z M10.0659432,11.4787246 C7.21709133,11.4787246 5.04653754,13.6308125 5.04653754,16.1626806 C5.04653754,18.8211422 7.35275094,20.8466367 10.0659432,20.8466367 C12.914795,20.8466367 15.0853488,18.6945488 15.0853488,16.1626806 C15.0853488,13.6308125 12.7791354,11.4787246 10.0659432,11.4787246 L10.0659432,11.4787246 Z"
|
349
|
-
></path>
|
350
|
-
<ellipse cx="10.2016028" cy="16.5690777" rx="1.35659611" ry="1.34075134"></ellipse>
|
351
|
-
</g>
|
352
|
-
</g>
|
353
|
-
</svg>
|
354
|
-
`,y=r.dy`
|
355
|
-
<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-labelledby="calendarTitleID calendarDescID">
|
356
|
-
<title id="calendarTitleID">Calendar icon</title>
|
357
|
-
<desc id="calendarDescID">An illustration of a calendar</desc>
|
358
|
-
|
359
|
-
<g class="fill-color" fill-rule="evenodd">
|
360
|
-
<path d="m11.998.857v11h-11.998v-11z" fill-rule="nonzero" />
|
361
|
-
<path d="m11.143 3h-10.286v8h10.286z" fill="#fff" fill-rule="nonzero" />
|
362
|
-
<path d="m9 0h1v1h-1z" />
|
363
|
-
<path d="m2.143 0h1v1h-1z" />
|
364
|
-
<path d="m2.143.857h1v1h-1z" fill="#fff" />
|
365
|
-
<path d="m9 .857h1v1h-1z" fill="#fff" />
|
366
|
-
<path
|
367
|
-
d="m4.92342857 9.14285714v-4.2h-.678c-.02400012.1600008-.07399962.29399946-.15.402s-.16899945.19499967-.279.261-.23399931.11199987-.372.138-.28099926.03700002-.429.033v.642h1.056v2.724zm3.336 0h-.852v-2.724h-1.056v-.642c.14800074.00400002.29099931-.00699987.429-.033s.26199945-.07199967.372-.138.20299962-.15299946.279-.261.12599988-.2419992.15-.402h.678z"
|
368
|
-
fill-rule="nonzero"
|
369
|
-
/>
|
370
|
-
</g>
|
371
|
-
</svg>
|
372
|
-
`,g=r.dy`
|
373
|
-
<svg
|
374
|
-
viewBox="0 0 24 24"
|
375
|
-
xmlns="http://www.w3.org/2000/svg"
|
376
|
-
aria-labelledby="calendarBlankTitleID calendarBlankDescID"
|
377
|
-
>
|
378
|
-
<title id="calendarBlankTitleID">Blank calendar page icon</title>
|
379
|
-
<desc id="calendarBlankDescID">A page-a-day calendar page without a date</desc>
|
380
|
-
<path d="m6 0v1.71428571h12v-1.71428571h1.7142857v1.71428571h4.2814286v21.99999999h-23.9957143v-21.99999999h4.28571429v-1.71428571zm16.2857143 6h-20.57142859v16h20.57142859z" class="fill-color" />
|
381
|
-
</svg>
|
382
|
-
`,k=r.dy`
|
383
|
-
<svg
|
384
|
-
viewBox="0 0 40 40"
|
385
|
-
version="1.1"
|
386
|
-
xmlns="http://www.w3.org/2000/svg"
|
387
|
-
aria-labelledby="closeTitleID closeDescID"
|
388
|
-
>
|
389
|
-
<title id="closeTitleID">Close icon</title>
|
390
|
-
<desc id="closeDescID">A line drawing of an X</desc>
|
391
|
-
<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"/>
|
392
|
-
</svg>
|
393
|
-
`,w=r.dy`
|
394
|
-
<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-labelledby="creditCardTitleID creditCardDescID">
|
395
|
-
<title id="creditCardTitleID">Credit card icon</title>
|
396
|
-
<desc id="creditCardDescID">An illustration of a credit card</desc>
|
397
|
-
<g class="fill-color" fill-rule="evenodd" transform="translate(0 2)">
|
398
|
-
<g fill-rule="nonzero">
|
399
|
-
<path d="m11.998 0v9h-11.998v-9z" />
|
400
|
-
<g fill="#fff">
|
401
|
-
<path d="m11.143 3.429h-10.286v4.714h10.286z" />
|
402
|
-
<path d="m11.143.857h-10.286v1.286h10.286z" />
|
403
|
-
</g>
|
404
|
-
</g>
|
405
|
-
<g>
|
406
|
-
<path d="m8.143 6.429h1v1h-1z" />
|
407
|
-
<path d="m9.429 6.429h1v1h-1z" />
|
408
|
-
</g>
|
409
|
-
</g>
|
410
|
-
</svg>
|
411
|
-
`,C=r.dy`
|
412
|
-
<svg
|
413
|
-
viewBox="0 0 40 40"
|
414
|
-
xmlns="http://www.w3.org/2000/svg"
|
415
|
-
aria-labelledby="donateTitleID donateDescID"
|
416
|
-
>
|
417
|
-
<title id="donateTitleID">Donate icon</title>
|
418
|
-
<desc id="donateDescID">An illustration of a heart shape</desc>
|
419
|
-
<path class="fill-color" d="m30.0120362 11.0857287c-1.2990268-1.12627221-2.8599641-1.65258786-4.682812-1.57894699-.8253588.02475323-1.7674318.3849128-2.8262192 1.08047869-1.0587873.6955659-1.89622 1.5724492-2.512298 2.63065-.591311-1.0588196-1.4194561-1.9357029-2.4844351-2.63065-1.0649791-.69494706-2.0039563-1.05510663-2.8169316-1.08047869-1.2067699-.04950647-2.318187.17203498-3.3342513.66462439-1.0160643.4925893-1.82594378 1.2002224-2.42963831 2.1228992-.60369453.9226769-.91173353 1.9629315-.92411701 3.1207641-.03715043 1.9202322.70183359 3.7665141 2.21695202 5.5388457 1.2067699 1.4035084 2.912594 3.1606786 5.1174721 5.2715107 2.2048782 2.1108321 3.7565279 3.5356901 4.6549492 4.2745742.8253588-.6646243 2.355647-2.0647292 4.5908647-4.2003145s3.9747867-3.9171994 5.218707-5.3448422c1.502735-1.7723316 2.2355273-3.6186135 2.1983769-5.5388457-.0256957-1.7608832-.6875926-3.2039968-1.9866194-4.3302689z"/>
|
420
|
-
</svg>
|
421
|
-
`,x=r.dy`
|
422
|
-
<svg
|
423
|
-
viewBox="0 0 24 24"
|
424
|
-
xmlns="http://www.w3.org/2000/svg"
|
425
|
-
aria-labelledby="downloadTitleID downloadDescID"
|
426
|
-
>
|
427
|
-
<title id="downloadTitleID">Download icon</title>
|
428
|
-
<desc id="downloadDescID">An arrow pointing downward at an empty document tray</desc>
|
429
|
-
<g class="fill-color" fill-rule="nonzero">
|
430
|
-
<path d="m1.04347826 22c-.57629713 0-1.04347826.4477153-1.04347826 1s.46718113 1 1.04347826 1h21.91304344c.5762972 0 1.0434783-.4477153 1.0434783-1s-.4671811-1-1.0434783-1z"/>
|
431
|
-
<path d="m12 0c-.8284271 0-1.5.67526574-1.5 1.50824823v8.0007855h-4.75l6.25 10.49096627 6.25-10.49096627h-4.75v-8.0007855c0-.83298249-.6715729-1.50824823-1.5-1.50824823z"/>
|
432
|
-
</g>
|
433
|
-
</svg>
|
434
|
-
`,S=r.dy`
|
435
|
-
<svg height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg" aria-labelledby="editPencilTitleID editPencilDescID"><title id="editPencilTitleID">Pencil icon</title><desc id="editPencilDescID">An illustration of a pencil, used to represent an edit action</desc><path class="fill-color" 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" fill-rule="evenodd"/></svg>
|
436
|
-
`,B=r.dy`
|
286
|
+
`}}window.customElements.define("ia-menu-slider",st);var at=Me`
|
437
287
|
<svg
|
438
288
|
viewBox="0 0 40 40"
|
439
289
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -443,337 +293,8 @@
|
|
443
293
|
<desc id="ellipsesDescID">An illustration of text ellipses.</desc>
|
444
294
|
<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"/>
|
445
295
|
</svg>
|
446
|
-
|
447
|
-
|
448
|
-
<title id="emailTitleID">Email icon</title>
|
449
|
-
<desc id="emailDescID">An illustration of an envelope</desc>
|
450
|
-
<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" />
|
451
|
-
</svg>
|
452
|
-
`,I=r.dy`
|
453
|
-
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="facebookTitleID facebookDescID">
|
454
|
-
<title id="facebookTitleID">Facebook icon</title>
|
455
|
-
<desc id="facebookDescID">A lowercase f</desc>
|
456
|
-
<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" />
|
457
|
-
</svg>
|
458
|
-
`,z=r.dy`
|
459
|
-
<svg viewBox="0 0 469 300" xmlns="http://www.w3.org/2000/svg" aria-labelledby="googlePayTitleID googlePayDescID">
|
460
|
-
<title id="googlePayTitleID">GooglePay icon</title>
|
461
|
-
<desc id="googlePayDescID">The GooglePay logo</desc>
|
462
|
-
<g fill="none">
|
463
|
-
<path
|
464
|
-
d="m426.541557.09900471h-384.5859537c-1.6020287 0-3.2068878 0-4.8060861.00848612-1.3501196.01131483-2.6974088.02545836-4.0475283.06223154-2.9408266.07920377-5.9071271.25175484-8.811158.77506548-2.9493177.52896804-5.6948441 1.39455212-8.3724397 2.75798848-2.6351391 1.33797799-5.043843 3.08894709-7.13553773 5.1765322-2.08886428 2.09041387-3.84090626 4.49481397-5.17970411 7.13116817-1.36427179 2.6759559-2.23038625 5.4198009-2.75684798 8.3701415-.52646173 2.9050811-.69911853 5.8667364-.77837083 8.8029334-.03679572 1.3492928-.05377835 2.695757-.06226967 4.042221-.00611375 1.6010478-.00611375 3.2020954-.00611375 4.8059718v215.8811936c0 1.603877 0 3.202097.00611375 4.805973.00849132 1.346464.02547395 2.695757.06226967 4.042221.0792523 2.933368.2519091 5.897852.77837083 8.800105.52646173 2.95034 1.39257619 5.694185 2.75684798 8.372969 1.33879785 2.633526 3.09083983 5.040754 5.17970411 7.12834 2.09169473 2.090414 4.50039863 3.841383 7.13553773 5.176532 2.6775956 1.366265 5.423122 2.23185 8.3724397 2.763646 2.9040309.517653 5.8703314.693033 8.811158.772236 1.3501195.031116 2.6974087.050918 4.0475283.056575 1.5991983.011315 3.2040574.011315 4.8060861.011315h384.5859537c1.599199 0 3.204058 0 4.803256-.011315 1.347289-.005657 2.694578-.025459 4.050359-.056575 2.935166-.079203 5.901466-.254583 8.811157-.772236 2.946488-.531796 5.692014-1.397381 8.37244-2.763646 2.635139-1.335149 5.038182-3.086118 7.132707-5.176532 2.086035-2.087586 3.838077-4.494814 5.179705-7.12834 1.367102-2.678784 2.233216-5.422629 2.756848-8.372969.526462-2.902253.696288-5.866737.77554-8.800105.036796-1.346464.053778-2.695757.06227-4.042221.011322-1.603876.011322-3.202096.011322-4.805973v-215.8811936c0-1.6038764 0-3.204924-.011322-4.8059718-.008492-1.346464-.025474-2.6929282-.06227-4.042221-.079252-2.936197-.249078-5.8978523-.77554-8.8029334-.523632-2.9503406-1.389746-5.6941856-2.756848-8.3701415-1.341628-2.6363542-3.09367-5.0407543-5.179705-7.13116817-2.094525-2.08758511-4.497568-3.83855421-7.132707-5.1765322-2.680426-1.36343636-5.425952-2.22902044-8.37244-2.75798848-2.909691-.52331064-5.875991-.69586171-8.811157-.77506548-1.355781-.03677318-2.70307-.05091671-4.050359-.06223154-1.599198-.00848612-3.204057-.00848612-4.803256-.00848612"
|
465
|
-
fill="#3c4043"
|
466
|
-
/>
|
467
|
-
<path
|
468
|
-
d="m426.541557 10.0899948 4.732495.0084861c1.279359.0084861 2.561548.0226296 3.849398.0594028 2.241708.0594028 4.865525.1810372 7.311024.6194866 2.12283.3818754 3.906007.9645889 5.615592 1.8330016 1.689772.857098 3.235192 1.9829231 4.585313 3.3293871 1.35578 1.357779 2.482295 2.9050813 3.351239 4.610791.866115 1.6972237 1.443525 3.4679938 1.825633 5.6064956.435888 2.4185437.557598 5.0464117.617037 7.3008905.036796 1.270089.053778 2.5430068.059439 3.8470403.011322 1.5755893.011322 3.14835.011322 4.726768v215.8811936c0 1.578418 0 3.151179-.011322 4.757884-.005661 1.272918-.022643 2.545836-.059439 3.821582-.059439 2.248821-.181149 4.87669-.622697 7.320692-.376448 2.110214-.953858 3.880984-1.825633 5.586695-.866115 1.70288-1.989799 3.247354-3.339919 4.596647-1.358611 1.357779-2.89837 2.477946-4.607955 3.343531-1.698263.865584-3.47578 1.448298-5.578796 1.824515-2.496448.444107-5.227821.56857-7.285551.622315-1.293511.031116-2.581361.048088-3.903177.053746-1.570893.011314-3.150279.011314-4.724003.011314h-384.5859537c-.0198131 0-.0396261 0-.0622696 0-1.5539113 0-3.1134834 0-4.6956991-.011314-1.2906803-.005658-2.5785302-.02263-3.8239236-.050917-2.1058469-.056574-4.8400513-.181037-7.3138554-.622315-2.1228296-.379046-3.9003455-.96176-5.6212527-1.838659-1.6926027-.857098-3.2323618-1.977266-4.5909726-3.337874-1.3472892-1.343635-2.4681433-2.88528-3.3342577-4.590989-.8689448-1.702882-1.449185-3.479309-1.8312943-5.614982-.4387181-2.441174-.560427-5.054898-.6226967-7.292405-.0339652-1.278574-.0481174-2.559979-.0566087-3.830068l-.00566093-3.756521v-217.8641178l.00566093-3.7480355c.0084913-1.2814039.0226435-2.5599791.0566087-3.8385543.0622697-2.2403353.1839786-4.8568884.6283576-7.3178627.3764484-2.1130435.9566886-3.8922997 1.8284639-5.6036669.8604536-1.6915663 1.984138-3.2360398 3.337088-4.5881613 1.3501196-1.3521215 2.8983699-2.4722892 4.599464-3.3378733 1.7010941-.8684127 3.4842709-1.4482975 5.6071005-1.8301729 2.4454996-.4384494 5.0693169-.5600838 7.3166859-.6194866 1.2793586-.0367732 2.5615477-.0509167 3.8324149-.0594028l4.7466469-.0084861z"
|
469
|
-
fill="#fffffe"
|
470
|
-
/>
|
471
|
-
<g transform="translate(53.778 84.906)">
|
472
|
-
<g fill="#3c4043" transform="translate(158.35 8.41)">
|
473
|
-
<path
|
474
|
-
d="m13.4306616 63.5773585v42.7212935h-13.34775628v-105.45768165h35.40057118c8.5392479-.16819407 16.8297798 3.1115903 22.8818681 9.16657685 12.1041765 11.4371967 12.8503244 30.6954178 1.4922957 43.0576819-.4974319.5045823-.9948639 1.0091644-1.4922957 1.5137466-6.217899 5.9708896-13.8451883 8.9983828-22.8818681 8.9983828zm0-49.7854447v36.8345013h22.3844362c4.9743191.1681941 9.7828276-1.8501348 13.1819457-5.4663073 6.9640468-7.316442 6.7982361-19.090027-.4145266-26.1541779-3.3991181-3.3638814-7.9589106-5.2140161-12.7674191-5.2140161zm85.3095733 17.9967654c9.8657331 0 17.6588331 2.6911052 23.3793001 7.9892184 5.720466 5.2981131 8.539248 12.6986522 8.539248 22.0334232v44.4873312h-12.767419v-10.0075469h-.580338c-5.554657 8.2415099-12.850324 12.3622639-22.0528145 12.3622639-7.7931 0-14.4255256-2.354717-19.6485607-7.064151-5.1401297-4.3730455-8.0418158-10.8485172-7.8760052-17.660377 0-7.4846361 2.8187808-13.3714286 8.3734372-17.8285714 5.5546563-4.4571429 13.0161351-6.6436658 22.3015308-6.6436658 7.9589104 0 14.4255254 1.5137466 19.5656554 4.3730458v-3.1115903c0-4.6253369-1.989728-8.9983828-5.471751-12.025876-3.564929-3.1956874-8.124721-4.9617251-12.8503246-4.9617251-7.4614787 0-13.3477564 3.1956874-17.658833 9.587062l-11.7725553-7.4846362c6.3008043-9.3347708 15.834916-14.0442048 28.5194298-14.0442048zm-17.2443063 52.3924529c0 3.5320754 1.6581063 6.8118598 4.3939818 8.8301887 2.9845915 2.3547169 6.6324255 3.6161724 10.3631649 3.5320754 5.6375617 0 11.0264077-2.2706199 15.0058627-6.3072776 4.393981-4.2048518 6.632426-9.1665768 6.632426-14.8851752-4.145267-3.3638815-9.948639-5.0458221-17.410117-4.961725-5.3888462 0-9.9486387 1.3455525-13.5964727 3.9525605-3.5649288 2.6070082-5.3888457 5.8867925-5.3888457 9.8393532z"
|
475
|
-
/>
|
476
|
-
<path
|
477
|
-
d="m203.947 34.143-44.603 103.86h-13.762l16.581-36.33-29.266-67.53h14.509l21.141 51.804h.248l20.644-51.804z"
|
478
|
-
/>
|
479
|
-
</g>
|
480
|
-
<path
|
481
|
-
d="m117.808458 62.7363881c0-4.1207546-.331621-8.2415094-.994864-12.278167h-56.2927112v23.2948786h32.2501691c-1.3264851 7.4846362-5.6375617 14.2123989-11.938366 18.4172507v15.1374666h19.2340341c11.275123-10.5121296 17.741738-26.0700811 17.741738-44.5714289z"
|
482
|
-
fill="#4285f4"
|
483
|
-
/>
|
484
|
-
<path
|
485
|
-
d="m60.5208828 121.940701c16.0836319 0 29.6801042-5.382211 39.5458372-14.632884l-19.2340341-15.1374666c-5.3888456 3.7002695-12.2699871 5.8026954-20.3118031 5.8026954-15.5862 0-28.7681456-10.6803234-33.4937488-24.9768194h-19.81437125v15.6420486c10.11444885 20.435579 30.75787325 33.302426 53.30812005 33.302426z"
|
486
|
-
fill="#34a853"
|
487
|
-
/>
|
488
|
-
<path
|
489
|
-
d="m27.027134 72.9962264c-2.4871596-7.4846361-2.4871596-15.6420485 0-23.2107817v-15.5579515h-19.81437125c-8.53924786 17.0716981-8.53924786 37.2549866 0 54.3266847z"
|
490
|
-
fill="#fbbc04"
|
491
|
-
/>
|
492
|
-
<path
|
493
|
-
d="m60.5208828 24.8086253c8.5392479-.168194 16.7468744 3.1115903 22.881868 9.0824798l17.0784962-17.3239891c-10.8605972-10.25983837-25.120312-15.89433972-39.9603642-15.72614565-22.5502468 0-43.1936712 12.95094345-53.30812005 33.38652285l19.81437125 15.6420486c4.7256032-14.380593 17.9075488-25.0609165 33.4937488-25.0609165z"
|
494
|
-
fill="#ea4335"
|
495
|
-
/>
|
496
|
-
</g>
|
497
|
-
</g>
|
498
|
-
</svg>
|
499
|
-
`,D=r.dy`
|
500
|
-
<svg
|
501
|
-
class="ia-logo"
|
502
|
-
viewBox="0 0 27 30"
|
503
|
-
xmlns="http://www.w3.org/2000/svg"
|
504
|
-
aria-labelledby="logoTitleID logoDescID"
|
505
|
-
>
|
506
|
-
<title id="logoTitleID">Internet Archive logo</title>
|
507
|
-
<desc id="logoDescID">A line drawing of the Internet Archive headquarters building façade.</desc>
|
508
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
509
|
-
<mask id="mask-2" class="fill-color">
|
510
|
-
<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>
|
511
|
-
</mask>
|
512
|
-
<use class="fill-color" xlink:href="#path-1"></use>
|
513
|
-
<g mask="url(#mask-2)" class="fill-color">
|
514
|
-
<path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>
|
515
|
-
</g>
|
516
|
-
</g>
|
517
|
-
</svg>
|
518
|
-
`,L=r.dy`
|
519
|
-
<svg
|
520
|
-
viewBox="0 0 40 40"
|
521
|
-
xmlns="http://www.w3.org/2000/svg"
|
522
|
-
aria-labelledby="imagesTitleID imagesDescID"
|
523
|
-
>
|
524
|
-
<title id="imagesTitleID">Images icon</title>
|
525
|
-
<desc id="imagesDescID">An illustration of two photographs.</desc>
|
526
|
-
<path class="fill-color" d="m20.8219178 15.3769871c0 1.1136708-.8767123 1.8932404-1.8630137 1.8932404s-1.9726027-.8909367-1.9726027-1.8932404c0-1.0023038.8767123-1.8932404 1.9726027-1.8932404.9863014 0 1.8630137.8909366 1.8630137 1.8932404zm-5.9178082-3.7864808h15.4520548v6.0138225l-1.9726028-3.3410125-2.6301369 6.3479237-2.1917809-2.67281-6.1369863 5.1228859h-2.5205479zm-1.7534247-1.6705063v14.9231892h18.8493151v-14.9231892zm-2.9589041 7.2388604c.2191781 0 1.9726028-.3341012 1.9726028-.3341012v-2.0046075l-4.1643836.5568354c.43835616 4.7887846.87671233 9.9116704 1.31506849 14.700455 6.02739731-.5568354 13.26027401-1.5591391 19.39726031-2.1159746-.1095891-.5568354-.1095891-2.0046075-.2191781-2.67281-.4383562.1113671-1.4246575 0-1.8630137.1113671v.8909367c-5.1506849.4454683-10.3013699 1.1136708-15.4520548 1.6705062.109589-.111367-.5479452-7.0161262-.9863014-10.8026071z" fill-rule="evenodd"/>
|
527
|
-
</svg>
|
528
|
-
`,T=r.dy`
|
529
|
-
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="linkTitleID linkDescID">
|
530
|
-
<title id="linkTitleID">Link icon</title>
|
531
|
-
<desc id="linkDescID">Two chain links linked together</desc>
|
532
|
-
<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" />
|
533
|
-
</svg>
|
534
|
-
`,E=r.dy`
|
535
|
-
<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-labelledby="localPinTitleID localePinDescID">
|
536
|
-
<title id="localePinTitleID">Locale pin icon</title>
|
537
|
-
<desc id="localePinDescID">An illustration of a map pin</desc>
|
538
|
-
<path
|
539
|
-
d="m6.30188679 0c2.37586647 0 4.30188681 1.92602032 4.30188681 4.30188679 0 1.58391098-1.43396228 4.14994872-4.30188681 7.69811321l-.3127572-.3901988c-2.65941973-3.34669534-3.98912959-5.7826668-3.98912959-7.30791441 0-2.37586647 1.92602032-4.30188679 4.30188679-4.30188679zm0 2.26415094c-1.12541043 0-2.03773585.91232542-2.03773585 2.03773585 0 1.12541044.91232542 2.03773585 2.03773585 2.03773585 1.12541044 0 2.03773585-.91232541 2.03773585-2.03773585 0-1.12541043-.91232541-2.03773585-2.03773585-2.03773585z"
|
540
|
-
class="fill-color"
|
541
|
-
fill-rule="evenodd"
|
542
|
-
/>
|
543
|
-
</svg>
|
544
|
-
`,j=r.dy`
|
545
|
-
<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-labelledby="lockTitleID lockDescID">
|
546
|
-
<title id="lockTitleID">Lock icon</title>
|
547
|
-
<desc id="lockDescID">An illustration of a lock</desc>
|
548
|
-
<path
|
549
|
-
d="m9.8480234 5.66075891v-2.17912633c-.00688261-.97492716-.37725298-1.79574705-1.11111111-2.46245966s-1.63734389-1.00632179-2.71045726-1.01882754c-1.04529617-.01250574-1.94175593.31459769-2.68937928.9813103-.74762335.66671262-1.13190232 1.4842758-1.15283692 2.45268954v2.22641369c-.04846504.00625288-.10037138.01250575-.15571902.01875862-.05534764.00625288-.09348877.00937931-.11442337.00937931-.35302046.00625288-.59362498.06917241-.72181356.18875862-.12818859.1195862-.19228288.33022987-.19228288.631931v4.73576994c0 .5030957.269999.7546436.80999699.7546436h8.36968211c.2839076 0 .491533-.0597931.6228761-.1793793s.197158-.3082145.1974448-.565885v-4.82057452c0-.25793103-.0640943-.44499615-.1922829-.56119538s-.3340933-.17755555-.6177141-.18406896c-.0415824 0-.102092-.00468965-.1815288-.01406896-.07943676-.00937931-.13306375-.01406897-.16088096-.01406897zm-1.85873446.00937931h-3.92523766c-.01376522-.12583907-.02064783-.21077393-.02064783-.25480458l-.01032391-.97154019c0-.65420686.0034413-.9813103.01032391-.9813103.00688261-.49684289.1919961-.91513405.55534047-1.2548735.36334438-.33973945.81845687-.51273561 1.36533747-.51898848.52623277-.01875862.98492995.13691187 1.37609154.46701147.39116158.3300996.60050759.74044441.62803802 1.23103443.01376522.2076475.02064783.83032946.02064783 1.86804589v.41503446z"
|
550
|
-
class="fill-color"
|
551
|
-
/>
|
552
|
-
</svg>
|
553
|
-
`,M=r.dy`
|
554
|
-
<svg
|
555
|
-
viewBox="0 0 18 18"
|
556
|
-
xmlns="http://www.w3.org/2000/svg"
|
557
|
-
aria-labelledby="magnify-minusTitleID magnify-minusDescID"
|
558
|
-
>
|
559
|
-
<title id="magnify-minusTitleID">Zoom out</title>
|
560
|
-
<desc id="magnify-minusDescID">Take a look further.</desc>
|
561
|
-
<g
|
562
|
-
class="fill-color"
|
563
|
-
fill="none"
|
564
|
-
fill-rule="nonzero"
|
565
|
-
>
|
566
|
-
<path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
|
567
|
-
<path d="m10 7.75v-1.5h-6v1.5z"/>
|
568
|
-
</g>
|
569
|
-
</svg>
|
570
|
-
`,P=r.dy`
|
571
|
-
<svg
|
572
|
-
viewBox="0 0 18 18"
|
573
|
-
xmlns="http://www.w3.org/2000/svg"
|
574
|
-
aria-labelledby="magnify-plusTitleID magnify-plusDescID"
|
575
|
-
>
|
576
|
-
<title id="magnify-plusTitleID">Zoom in</title>
|
577
|
-
<desc id="magnify-plusDescID">Take a look closer.</desc>
|
578
|
-
<g
|
579
|
-
class="fill-color"
|
580
|
-
fill="none"
|
581
|
-
fill-rule="nonzero"
|
582
|
-
>
|
583
|
-
<path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
|
584
|
-
<path d="m7.75 4v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z"/>
|
585
|
-
</g>
|
586
|
-
</svg>
|
587
|
-
`,A=r.dy`
|
588
|
-
<svg viewBox="0 0 468 300" xmlns="http://www.w3.org/2000/svg" aria-labelledby="payPalTitleID payPalDescID">
|
589
|
-
<title id="payPalTitleID">PayPal icon</title>
|
590
|
-
<desc id="payPalDescID">The PayPal logo</desc>
|
591
|
-
<g fill="none" fill-rule="nonzero">
|
592
|
-
<g>
|
593
|
-
<path
|
594
|
-
d="m426.088936 0h-384.1773743c-1.6000453 0-3.202918 0-4.8001076.0093427-1.3501283.00962581-2.6971182.02463075-4.044108.06143532-2.9377047.0795545-5.9005735.2531022-8.8015214.77516088-2.9473179.53111826-5.6899295 1.39744123-8.365531 2.76147524-2.6303624 1.33940326-5.0384885 3.09130081-7.1253898 5.18180042-2.08780603 2.09049964-3.8374226 4.49780164-5.1747992 7.13442444-1.36254076 2.6790896-2.22830126 5.4261262-2.75505234 8.3795514-.52417811 2.9055793-.6986591 5.8717446-.77782727 8.8101648-.03619117 1.348746-.05171378 2.697492-.06050711 4.0459548-.00671798 1.6026975-.00671798 3.2042625-.00671798 4.8097911v216.0649119c0 1.605529 0 3.204291.00671798 4.810103.00879333 1.348462.02431594 2.697208.06050711 4.045954.07916817 2.935844.25364916 5.90201.77782727 8.80674.52675108 2.954557 1.39251158 5.700461 2.75505234 8.379834 1.3373766 2.636623 3.08699317 5.047039 5.1747992 7.134425 2.0869013 2.093897 4.4950274 3.845511 7.1253898 5.181517 2.6756015 1.367714 5.4182131 2.23432 8.365531 2.765156 2.9009479.518661 5.8638167.695323 8.8015214.774877 1.3469898.030576 2.6939797.048696 4.044108.054924 1.5971896.012457 3.2000623.012457 4.8001076.012457h384.1773743c1.597218 0 3.200119 0 4.796997-.012457 1.347018-.006228 2.694037-.024348 4.04719-.054924 2.931485-.079554 5.893788-.256216 8.801833-.774877 2.943359-.530836 5.686536-1.397442 8.36242-2.765156 2.63319-1.336006 5.034248-3.08762 7.125447-5.181517 2.084385-2.087386 3.833973-4.497802 5.174771-7.134425 1.365622-2.679373 2.230535-5.425277 2.754741-8.379834.524489-2.90473.694701-5.870896.774152-8.80674.036756-1.348746.05488-2.697492.061101-4.045954.012412-1.605812.012412-3.204546.012412-4.810103v-216.0649119c0-1.6055286 0-3.2070936-.012412-4.8097911-.006221-1.3484628-.024345-2.6972088-.061101-4.0459548-.079479-2.9384202-.249663-5.9045855-.774152-8.8101648-.524178-2.9534252-1.389119-5.7004618-2.754741-8.3795514-1.340798-2.6366228-3.090386-5.0439248-5.174771-7.13442444-2.091199-2.09049961-4.492257-3.84239716-7.125447-5.18180042-2.675884-1.36403401-5.419061-2.23035698-8.36242-2.76147524-2.908017-.52205868-5.87032-.69560638-8.801833-.77516088-1.353153-.03680457-2.700172-.05180951-4.04719-.06143532-1.596878-.0093427-3.199779-.0093427-4.796997-.0093427z"
|
595
|
-
fill="#333"
|
596
|
-
/>
|
597
|
-
<path
|
598
|
-
d="m426.077344 10 4.725746.0090596c1.280186.0090595 2.5604.022932 3.847682.0580377 2.239223.0605858 4.858628.1820405 7.300254.6202965 2.122429.3827662 3.902447.9648426 5.610709 1.8356924 1.686464.8581098 3.231593 1.9826271 4.580707 3.3316515 1.354261 1.358084 2.478692 2.9078342 3.346946 4.6152773.864832 1.6972511 1.442442 3.4712253 1.822427 5.6121115.43653 2.418335.557254 5.0484372.618634 7.3045496.034464 1.2734338.051428 2.5468676.057676 3.8505942.011875 1.5766458.011875 3.1524422.011875 4.7322022v216.0641685c0 1.57976 0 3.152725-.012158 4.763061-.005965 1.273151-.022901 2.546585-.057676 3.822284-.061097 2.252715-.181793 4.881401-.623695 7.328331-.374641 2.111442-.95194 3.885699-1.821579 5.591444-.865737 1.703196-1.988444 3.251248-3.336795 4.600839-1.356777 1.358933-2.896816 2.480053-4.603326 3.34609-1.695511.866603-3.472476 1.448141-5.573982 1.826916-2.491076.444484-5.220235.566788-7.275657.622561-1.293191.02916-2.580163.046685-3.898488.052942-1.57114.011891-3.147878.011891-4.719272.011891h-384.1544332c-.0209218 0-.0412781 0-.0624826 0-1.5532997 0-3.1097094 0-4.6912818-.012174-1.2895158-.005974-2.5762044-.023215-3.8202013-.051527-2.1023547-.056905-4.8332106-.178926-7.303958-.620862-2.1195728-.381634-3.8965375-.963144-5.6143841-1.841072-1.6903938-.858393-3.2293027-1.97838-4.586673-3.339861-1.3469093-1.346477-2.4662238-2.889716-3.3316498-4.59546-.8662742-1.704046-1.4458636-3.483682-1.8269507-5.620322-.4405163-2.442116-.5615233-5.060328-.6219985-7.297755-.0345209-1.281077-.0489399-2.561872-.057139-3.835306l-.00622-3.759432v-.992588-216.0641685-.9925876l.0059373-3.7515053c.0084818-1.2810777.0229008-2.5618724.0574217-3.8418177.0604752-2.239692.1814822-4.8590359.6256456-7.3215363.3777227-2.117388.9570294-3.8970244 1.8278273-5.6095635.8586405-1.6927213 1.9799341-3.2379418 3.3339398-4.5934777 1.3486057-1.3510062 2.8925472-2.474108 4.5937129-3.340428 1.6994694-.8666031 3.4797986-1.4483964 5.5993996-1.8303133 2.442192-.4393884 5.06335-.56056 7.3081989-.6214289 1.2796204-.0348226 2.5592408-.0486951 3.8292485-.0574715l4.7416072-.0093427z"
|
599
|
-
fill="#fff"
|
600
|
-
/>
|
601
|
-
</g>
|
602
|
-
<g transform="translate(23 94)">
|
603
|
-
<g fill="#238ec2">
|
604
|
-
<path
|
605
|
-
d="m400.83873 2.69525159-13.453417 85.59022681c-.260388 1.6582649 1.02176 3.1566421 2.69982 3.1566421h13.529554c2.241475 0 4.149469-1.6308556 4.498177-3.8449211l13.26612-84.05073558c.261911-1.65978771-1.020237-3.1596876-2.69982-3.1596876h-15.140614c-1.346103 0-2.491204.97912247-2.69982 2.30847537"
|
606
|
-
/>
|
607
|
-
<path
|
608
|
-
d="m360.463252 61.2598709c-1.515127 8.9689446-8.635464 14.9898625-17.715569 14.9898625-4.552995 0-8.196915-1.4648768-10.540413-4.2377882-2.32218-2.7485476-3.196233-6.6635147-2.459227-11.0246449 1.413104-8.8882393 8.647647-15.1025454 17.590704-15.1025454 4.457063 0 8.075096 1.4770588 10.464277 4.2758568 2.404408 2.8185936 3.348507 6.7609701 2.660228 11.0992592zm21.875698-30.5507529h-15.696415c-1.34458 0-2.489681.9775997-2.698297 2.3069526l-.691324 4.3885396-1.096374-1.5897416c-3.40028-4.9352036-10.975917-6.5828094-18.540894-6.5828094-17.340975 0-32.1542 13.1412549-35.038271 31.5709894-1.4999 9.195833.630415 17.9820486 5.84428 24.1156494 4.789021 5.6341417 11.624605 7.9806856 19.768224 7.9806856 13.97724 0 21.731037-8.9796037 21.731037-8.9796037l-.701984 4.362653c-.261911 1.6582649 1.020237 3.1596876 2.69982 3.1596876h14.135605c2.239952 0 4.147946-1.6293329 4.498177-3.8433983l8.484713-53.7329621c.261911-1.658265-1.020237-3.1566421-2.698297-3.1566421z"
|
609
|
-
/>
|
610
|
-
<path
|
611
|
-
d="m288.146759 31.085235c-1.792266 11.7662198-10.777961 11.7662198-19.469767 11.7662198h-4.945863l3.468805-21.9685846c.210138-1.3278301 1.355239-2.3054299 2.699819-2.3054299h2.265839c5.917372 0 11.505831 0 14.386857 3.3698259 1.723743 2.0176318 2.246043 5.0067724 1.59431 9.1379688zm-3.782489-30.69845878h-32.780046c-2.241474 0-4.149469 1.63085562-4.498177 3.84492105l-13.25546 84.05225833c-.261911 1.658265 1.020236 3.1581649 2.698297 3.1581649h16.818675c1.568423 0 2.905389-1.1420558 3.149028-2.6906834l3.759647-23.8293741c.348708-2.2140654 2.256703-3.844921 4.498177-3.844921h10.372912c21.590945 0 34.051535-10.4490488 37.308678-31.1598493 1.466399-9.0572636.059387-16.1745551-4.181447-21.15696366-4.662633-5.47729942-12.925026-8.37355282-23.890284-8.37355282z"
|
612
|
-
/>
|
613
|
-
</g>
|
614
|
-
<path
|
615
|
-
d="m232.141867 30.709118h-15.777119c-1.509037 0-2.920618.7491886-3.767262 1.9963134l-21.763014 32.0521756-9.223243-30.8004824c-.577118-1.9262674-2.351112-3.2480066-4.362653-3.2480066h-15.509117c-1.872971 0-3.190142 1.8425166-2.587137 3.6149871l17.372952 50.9905056-16.340533 23.0558213c-1.282148 1.809017.012182 4.312403 2.229293 4.312403h15.761892c1.493809 0 2.893208-.732439 3.742897-1.959768l52.469087-75.7243876c1.254739-1.8120618-.041114-4.2895614-2.246043-4.2895614"
|
616
|
-
fill="#253667"
|
617
|
-
/>
|
618
|
-
<path
|
619
|
-
d="m126.667688 61.2598709c-1.51665 8.9689446-8.635464 14.9898625-17.717091 14.9898625-4.551473 0-8.195392-1.4648768-10.5388909-4.2377882-2.3221801-2.7485476-3.1962334-6.6635147-2.4592267-11.0246449 1.4131036-8.8882393 8.6461236-15.1025454 17.5891816-15.1025454 4.457063 0 8.076618 1.4770588 10.465799 4.2758568 2.404408 2.8185936 3.348507 6.7609701 2.660228 11.0992592zm21.874175-30.5507529h-15.694892c-1.346103 0-2.491204.9775997-2.699819 2.3069526l-.689802 4.3885396-1.097896-1.5897416c-3.398758-4.9352036-10.974395-6.5828094-18.539372-6.5828094-17.3409749 0-32.1541994 13.1412549-35.0382709 31.5709894-1.4998999 9.195833.6304148 17.9820486 5.8427572 24.1156494 4.7905433 5.6341417 11.6261277 7.9806856 19.7697467 7.9806856 13.97724 0 21.729514-8.9796037 21.729514-8.9796037l-.700461 4.362653c-.261911 1.6582649 1.020237 3.1596876 2.69982 3.1596876h14.134082c2.241475 0 4.149469-1.6293329 4.498177-3.8433983l8.486236-53.7329621c.261911-1.658265-1.020237-3.1566421-2.69982-3.1566421z"
|
620
|
-
fill="#253667"
|
621
|
-
/>
|
622
|
-
<path
|
623
|
-
d="m54.3511949 31.085235c-1.7922661 11.7662198-10.7794836 11.7662198-19.4697665 11.7662198h-4.9458629l3.4688041-21.9685846c.2101382-1.3278301 1.3537167-2.3054299 2.698297-2.3054299h2.2673614c5.9158488 0 11.5058311 0 14.3868571 3.3698259 1.7237428 2.0176318 2.246043 5.0067724 1.5943098 9.1379688zm-3.7840114-30.69845878h-32.7800457c-2.2399521 0-4.1494693 1.63085562-4.498177 3.84492105l-13.2554605 84.05225833c-.26038871 1.658265 1.02023648 3.1581649 2.69981982 3.1581649h15.65073208c2.2414748 0 4.1494693-1.6308556 4.498177-3.8449211l3.5769186-22.6751364c.3502304-2.2140654 2.2582249-3.844921 4.4996997-3.844921h10.371389c21.5924676 0 34.0530573-10.4490488 37.3102003-31.1598493 1.4648769-9.0572636.0593869-16.1745551-4.1829696-21.15696366-4.6611102-5.47729942-12.9235029-8.37355282-23.8902837-8.37355282z"
|
624
|
-
fill="#253667"
|
625
|
-
/>
|
626
|
-
</g>
|
627
|
-
</g>
|
628
|
-
</svg>
|
629
|
-
`,R=r.dy`
|
630
|
-
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="pinterestTitleID pinterestDescID">
|
631
|
-
<title id="pinterestTitleID">Pinterest icon</title>
|
632
|
-
<desc id="pinterestDescID">A stylized letter p</desc>
|
633
|
-
<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" />
|
634
|
-
</svg>
|
635
|
-
`,_=r.dy`
|
636
|
-
<svg
|
637
|
-
viewBox="0 0 18 18"
|
638
|
-
xmlns="http://www.w3.org/2000/svg"
|
639
|
-
aria-labelledby="searchTitleID searchDescID"
|
640
|
-
>
|
641
|
-
<title id="searchTitleID">Search icon</title>
|
642
|
-
<desc id="searchDescID">Search for something.</desc>
|
643
|
-
<path
|
644
|
-
class="fill-color"
|
645
|
-
fill="none"
|
646
|
-
d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z" />
|
647
|
-
</svg>
|
648
|
-
`,$=r.dy`
|
649
|
-
<svg
|
650
|
-
viewBox="0 0 24 24"
|
651
|
-
xmlns="http://www.w3.org/2000/svg"
|
652
|
-
aria-labelledby="shareTitleID shareDescID"
|
653
|
-
>
|
654
|
-
<title id="shareTitleID">Share icon</title>
|
655
|
-
<desc id="shareDescID">A square with an arrow arcing out from the center of the square</desc>
|
656
|
-
<g class="fill-color">
|
657
|
-
<path d="m0 6.765625v17.143466h23.996455v-12.820312c0-.6024929-.564349-1.0909095-1.26051-1.0909095-.696159 0-1.260509.4884166-1.260509 1.0909095v10.638494h-18.9544172v-12.7798301h4.7793938c.6961602 0 1.2605092-.4884166 1.2605092-1.0909091 0-.6024924-.564349-1.0909088-1.2605092-1.0909088z"/>
|
658
|
-
<path d="m23.97066.18118436-10.372158.62642052 1.587358 2.76562492c-.632399.5111771-1.204137 1.0741171-1.700285 1.6981534-1.40286 1.7644678-2.279987 4.0202049-2.712357 6.6775568-.144711.891238.459803 1.731264 1.350853 1.87713.428345.07012.866999-.03282 1.21944-.286164.35244-.253341.589789-.636328.659821-1.064688.366789-2.2542958 1.073357-3.946915 2.043324-5.1669026.237573-.298812.501471-.5831095.792613-.8522728l1.40625 2.4502844z"/>
|
659
|
-
</g>
|
660
|
-
</svg>
|
661
|
-
`,N=r.dy`
|
662
|
-
<svg
|
663
|
-
viewBox="0 0 40 40"
|
664
|
-
xmlns="http://www.w3.org/2000/svg"
|
665
|
-
aria-labelledby="softwareTitleID softwareDescID"
|
666
|
-
>
|
667
|
-
<title id="softwareTitleID">Software icon</title>
|
668
|
-
<desc id="softwareDescID">An illustration of a 3.5" floppy disk.</desc>
|
669
|
-
<path class="fill-color" d="m32 30.6900373v-21.44521088c0-.82988428-.4156786-1.24482642-1.2470357-1.24482642h-21.50592858c-.83135715 0-1.24703572.4221795-1.24703572 1.26653851v21.44521089c0 .8588337.41567857 1.2882506 1.24703572 1.2882506h21.48327168c.8458575 0 1.2687863-.4366542 1.2687863-1.3099627zm-5.9950155-20.4410268v6.114667c0 .6694561-.3428744 1.0041841-1.0286232 1.0041841h-10.1294464c-.2622159 0-.4773054-.0802141-.6452685-.2406423s-.2519447-.3642806-.2519447-.6115572v-6.1363791l.0217506-.1311772h12.0326259zm-4.9437353.8295827v5.0010178h3.0405558v-5.0010178zm-9.7134658 18.8035735v-7.753025c0-.5241057.1604108-.9025595.4812325-1.1353613.1897138-.1453504.4011782-.2180256.6343932-.2180256h14.7451099c.3208217 0 .5905898.1091636.8093044.3274907s.3280719.5023936.3280719.8521995v7.8181612l-.0217506.1094652h-16.9772676z"/>
|
670
|
-
</svg>
|
671
|
-
`,H=r.dy`
|
672
|
-
<svg
|
673
|
-
viewBox="0 0 40 40"
|
674
|
-
xmlns="http://www.w3.org/2000/svg"
|
675
|
-
aria-labelledby="textsTitleID textsDescID"
|
676
|
-
>
|
677
|
-
<title id="textsTitleID">Texts icon</title>
|
678
|
-
<desc id="textsDescID">An illustration of an open book.</desc>
|
679
|
-
<path class="fill-color" d="m10.3323235 11.0007023h6.9060825c.8851083 0 1.5847122.3064258 2.0988114.9192774v14.4324451h-.6460032c-.1435563-.120323-.3528315-.2434552-.6278257-.3693964-.2749942-.1259413-.5201585-.2191097-.7354929-.2795053l-.3048241-.1081503h-5.7042647c-.3108832 0-.5621067-.0601615-.7536705-.1804846-.0717781-.0599274-.1256117-.1439663-.1615008-.2521166-.0358891-.1081502-.0598928-.2043619-.0720112-.2886348v-13.8741368zm19.1752505 0v13.603761c-.0717781.3361555-.2211606.5943584-.4481473.7746089-.0717781.0599274-.1733862.1079162-.304824.1439663-.1314379.0360501-.2451643.0601615-.3411793.0723343h-5.5965975c-.9568865.2640552-1.5068748.5164059-1.649965.757052h-.6634817v-14.4324451c.5140992-.6128516 1.2076439-.9192774 2.0806339-.9192774h6.92426zm1.3814961.6489017-.1796783 15.2976474c-.0955489 0-1.0342578.0119386-2.8161268.035816-1.7818691.0238773-3.3006293.0898911-4.5562806.1980414-1.2556514.1081503-1.9613144.2884008-2.1169891.5407514-.0955488.1924233-.5439291.273419-1.345141.2429871-.8012118-.0304319-1.3155441-.1776755-1.5429969-.4417308-.334654-.3843783-3.4558378-.5765674-9.36355164-.5765674v-15.3875385l-.96830576.3960828v16.2702977c6.4096947-.2041278 9.7760429-.0840388 10.0990445.3602669.2391051.276228.9864833.414342 2.2421347.414342.1915638 0 .4187835-.0210682.6816593-.0632047s.4810068-.0870821.6543929-.1348367c.1733862-.0477547.2719646-.0838048.2957353-.1081503.0838965-.1563732.9599161-.2675666 2.6280587-.3335805 1.6681426-.0660138 3.3213703-.0931684 4.9596831-.0814638l2.4392915.0182591v-16.2344816z"/>
|
680
|
-
</svg>
|
681
|
-
`,F=r.dy`
|
682
|
-
<svg
|
683
|
-
viewBox="0 0 24 24"
|
684
|
-
xmlns="http://www.w3.org/2000/svg"
|
685
|
-
aria-labelledby="tocTitleID tocDescID"
|
686
|
-
>
|
687
|
-
<title id="tocTitleID">Table of contents icon</title>
|
688
|
-
<desc id="tocDescID">An illustration of three text list items</desc>
|
689
|
-
<g class="fill-color" fill-rule="evenodd"><rect height="3" rx="1.5" width="18" x="6"/><rect height="3" rx="1.5" width="18" x="6" y="21"/><rect height="3" rx="1.5" width="18" x="6" y="14"/><rect height="3" rx="1.5" width="18" x="6" y="7"/><rect height="3" rx="1.5" width="4"/><rect height="3" rx="1.5" width="4" y="21"/><rect height="3" rx="1.5" width="4" y="14"/><rect height="3" rx="1.5" width="4" y="7"/></g>
|
690
|
-
</svg>
|
691
|
-
`,Z=r.dy`
|
692
|
-
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="tumblrTitleID tumblrDescID">
|
693
|
-
<title id="tumblrTitleID">Tumblr icon</title>
|
694
|
-
<desc id="tumblrDescID">A lowercase letter t</desc>
|
695
|
-
<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" />
|
696
|
-
</svg>
|
697
|
-
`,W=r.dy`
|
698
|
-
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="twitterTitleID twitterDescID">
|
699
|
-
<title id="twitterTitleID">Twitter icon</title>
|
700
|
-
<desc id="twitterDescID">The Twitter logo, a cartoon bird</desc>
|
701
|
-
<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" />
|
702
|
-
</svg>
|
703
|
-
`,q=r.dy`
|
704
|
-
<svg
|
705
|
-
viewBox="0 0 40 41"
|
706
|
-
xmlns="http://www.w3.org/2000/svg"
|
707
|
-
aria-labelledby="uploadTitleID uploadDescID"
|
708
|
-
>
|
709
|
-
<title id="uploadTitleID">Upload icon</title>
|
710
|
-
<desc id="uploadDescID">An illustration of a horizontal line over an up pointing arrow.</desc>
|
711
|
-
<path class="fill-color" d="m20 12.8 8 10.4h-4.8v8.8h-6.4v-8.8h-4.8zm12-4.8v3.2h-24v-3.2z" fill-rule="evenodd"/>
|
712
|
-
</svg>
|
713
|
-
`,U=r.dy`
|
714
|
-
<svg
|
715
|
-
viewBox="0 0 40 40"
|
716
|
-
xmlns="http://www.w3.org/2000/svg"
|
717
|
-
aria-labelledby="userTitleID userDescID"
|
718
|
-
>
|
719
|
-
<title id="userTitleID">User icon</title>
|
720
|
-
<desc id="userDescID">An illustration of a person's head and chest.</desc>
|
721
|
-
<path class="fill-color" d="m20.7130435 18.0434783c-3.5658385 0-6.4565218-2.9198821-6.4565218-6.5217392 0-3.60185703 2.8906833-6.5217391 6.4565218-6.5217391s6.4565217 2.91988207 6.4565217 6.5217391c0 3.6018571-2.8906832 6.5217392-6.4565217 6.5217392zm-12.9130435 16.9565217c0-7.9240855 5.7813665-14.3478261 12.9130435-14.3478261s12.9130435 6.4237406 12.9130435 14.3478261z" fill-rule="evenodd"/>
|
722
|
-
</svg>
|
723
|
-
`,V=r.dy`
|
724
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 449 300" aria-labelledby="venmoTitleID venmoDescID">
|
725
|
-
<title id="venmoTitleID">Venmo icon</title>
|
726
|
-
<desc id="venmoDescID">The Venmo logo</desc>
|
727
|
-
<g fill="none">
|
728
|
-
<rect width="448.934" height="299.289" fill="#3D95CE" rx="29.929" />
|
729
|
-
<path
|
730
|
-
fill="#FFF"
|
731
|
-
d="M314.253648,95.768518 C314.253648,140.505629 276.917862,198.622312 246.615405,239.43135 L177.402732,239.43135 L149.644594,69.6528784 L210.247869,63.767475 L224.923984,184.575771 C238.636763,161.724586 255.559021,125.813905 255.559021,101.330492 C255.559021,87.9291341 253.314515,78.8010611 249.806862,71.285106 L304.995473,59.8578376 C311.376749,70.6382477 314.253648,81.742087 314.253648,95.768518 Z"
|
732
|
-
/>
|
733
|
-
</g>
|
734
|
-
</svg>
|
735
|
-
`,G=r.dy`
|
736
|
-
<svg
|
737
|
-
viewBox="0 0 40 40"
|
738
|
-
xmlns="http://www.w3.org/2000/svg"
|
739
|
-
aria-labelledby="videoTitleID videoDescID"
|
740
|
-
>
|
741
|
-
<title id="videoTitleID">Video icon</title>
|
742
|
-
<desc id="videoDescID">An illustration of two cells of a film strip.</desc>
|
743
|
-
<path class="fill-color" d="m31.0117647 12.0677966c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.3898305c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm-4.0941176-10.440678c0 .5423729-.4235295.9491525-.9882353.9491525h-11.5764706c-.5647059 0-.9882353-.4067796-.9882353-.9491525v-6.9152542c0-.5423729.4235294-.9491526.9882353-.9491526h11.5764706c.5647058 0 .9882353.4067797.9882353.9491526zm-.1411765 11.2542373c0 .5423729-.4235294.9491525-.9882353.9491525h-11.5764706c-.5647059 0-.9882353-.4067796-.9882353-.9491525v-6.9152542c0-.5423729.4235294-.9491526.9882353-.9491526h11.5764706c.5647059 0 .9882353.4067797.9882353.9491526zm-14.9647059-17.220339c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.3898305c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm20.0470588-20.4745763h-.8470588v.27118644.6779661c0 .40677966-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.27118644-.7058823-.6779661v-.6779661-.27118644h-16.5176471v.27118644.6779661c0 .40677966-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.27118644-.70588236-.6779661v-.6779661-.27118644h-1.12941176v24h1.12941176v-.2711864-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661v.6779661.2711864h16.6588235v-.2711864-.6779661c0-.4067797.282353-.6779661.7058824-.6779661h1.2705882c.4235294 0 .7058824.2711864.7058824.6779661v.6779661.2711864h.8470588v-24z" fill-rule="evenodd"/>
|
744
|
-
</svg>
|
745
|
-
`,X=r.dy`
|
746
|
-
<svg
|
747
|
-
viewBox="0 0 24 24"
|
748
|
-
xmlns="http://www.w3.org/2000/svg"
|
749
|
-
aria-labelledby="visualAdjustmentTitleID visualAdjustmentDescID"
|
750
|
-
>
|
751
|
-
<title id="visualAdjustmentTitleID">Visual adjustment</title>
|
752
|
-
<desc id="visualAdjustmentDescID">A circle with its left hemisphere filled</desc>
|
753
|
-
<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" />
|
754
|
-
</svg>
|
755
|
-
`,Y=r.dy`
|
756
|
-
<svg
|
757
|
-
viewBox="0 0 22 24"
|
758
|
-
xmlns="http://www.w3.org/2000/svg"
|
759
|
-
aria-labelledby="volumesTitleID volumesDescID"
|
760
|
-
>
|
761
|
-
<title id="volumesTitleID">Volumes icon</title>
|
762
|
-
<desc id="volumesDescID">Three books stacked on each other</desc>
|
763
|
-
<path class="fill-color" 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" />
|
764
|
-
</svg>
|
765
|
-
`,J=r.dy`
|
766
|
-
<svg
|
767
|
-
viewBox="0 0 40 40"
|
768
|
-
xmlns="http://www.w3.org/2000/svg"
|
769
|
-
aria-labelledby="webTitleID webDescID"
|
770
|
-
>
|
771
|
-
<title id="webTitleID">Web icon</title>
|
772
|
-
<desc id="webDescID">An illustration of a computer application window</desc>
|
773
|
-
<path class="fill-color" d="m8 28.7585405v-8.1608108-9.3577297h24v9.3577297 8.1608108zm14.2702703-15.8863783h-12.43243246v2.6114594h12.43243246zm7.7837838 14.0365946v-7.0727027-1.8497838h-20.21621626v1.8497838 7.0727027zm-3.7837838-14.0365946h-2.7027027v2.6114594h2.7027027zm4 0h-2.7027027v2.6114594h2.7027027z" fill-rule="evenodd"/>
|
774
|
-
</svg>
|
775
|
-
`;const Q={applePay:v,advance:m,audio:b,calendar:y,calendarBlank:g,close:k,collapseSidebar:c,creditCard:w,donate:C,download:x,editPencil:S,ellipses:B,email:O,facebook:I,googlePay:z,iaLogo:D,images:L,link:T,localePin:E,lock:j,magnifyMinus:M,magnifyPlus:P,paypal:A,pinterest:R,search:_,share:$,software:N,texts:H,toc:F,tumblr:Z,twitter:W,upload:q,user:U,venmo:V,video:G,visualAdjustment:X,volumes:Y,web:J};class K extends o.oi{static get properties(){return{icon:{type:String}}}static get styles(){return o.iv`
|
776
|
-
svg {
|
296
|
+
`;customElements.define("ia-icon-ellipses",class extends et{static get styles(){return ae`
|
297
|
+
:host {
|
777
298
|
width: var(--iconWidth, 'auto');
|
778
299
|
height: var(--iconHeight, 'auto');
|
779
300
|
}
|
@@ -785,7 +306,341 @@
|
|
785
306
|
.stroke-color {
|
786
307
|
stroke: var(--iconStrokeColor);
|
787
308
|
}
|
788
|
-
`}
|
309
|
+
`}render(){return at}});let lt=class extends C{static get properties(){return{title:{type:String}}}get bookIconSvg(){return b.YP`
|
310
|
+
<g class="bookIcon" transform="matrix(1 0 0 -1 28 67.362264)">
|
311
|
+
<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"/>
|
312
|
+
<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"/>
|
313
|
+
<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"/>
|
314
|
+
</g>
|
315
|
+
`}get icon(){return this.bookIconSvg}get loader(){return b.YP`
|
316
|
+
<svg
|
317
|
+
height="100"
|
318
|
+
viewBox="0 0 100 100"
|
319
|
+
width="100"
|
320
|
+
xmlns="http://www.w3.org/2000/svg"
|
321
|
+
aria-labelledby="item-loading"
|
322
|
+
>
|
323
|
+
<title id="item-loading">Currently loading viewer.</title>
|
324
|
+
<desc>Please wait while we load theater.</desc>
|
325
|
+
<g fill="#333" fill-rule="evenodd" class="book-icon">
|
326
|
+
${this.icon}
|
327
|
+
<path
|
328
|
+
class="ring"
|
329
|
+
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"
|
330
|
+
fill-rule="nonzero"
|
331
|
+
/>
|
332
|
+
</g>
|
333
|
+
</svg>
|
334
|
+
`}render(){const e=this.title?b.dy`<h2>${this.title}</h2>`:b.Ld;return b.dy`
|
335
|
+
<div class="place-holder">
|
336
|
+
${e} ${this.loader}
|
337
|
+
<h3>Loading viewer</h3>
|
338
|
+
</div>
|
339
|
+
`}static get styles(){return w`
|
340
|
+
.place-holder {
|
341
|
+
width: 30%;
|
342
|
+
margin: auto;
|
343
|
+
text-align: center;
|
344
|
+
color: var(--primaryTextColor);
|
345
|
+
}
|
346
|
+
|
347
|
+
.place-holder {
|
348
|
+
position: relative;
|
349
|
+
}
|
350
|
+
|
351
|
+
.place-holder svg {
|
352
|
+
display: block;
|
353
|
+
width: 60%;
|
354
|
+
max-width: 100px;
|
355
|
+
height: auto;
|
356
|
+
margin: auto;
|
357
|
+
}
|
358
|
+
|
359
|
+
svg * {
|
360
|
+
fill: var(--primaryTextColor);
|
361
|
+
}
|
362
|
+
|
363
|
+
svg .ring {
|
364
|
+
animation: rotate 1.3s infinite linear;
|
365
|
+
transform-origin: 50px 50px;
|
366
|
+
transform-box: fill-box;
|
367
|
+
display: block; // transform won't work on inline style
|
368
|
+
}
|
369
|
+
|
370
|
+
@keyframes rotate {
|
371
|
+
0% {
|
372
|
+
-moz-transform: rotate(-360deg);
|
373
|
+
-webkit-transform: rotate(-360deg);
|
374
|
+
transform: rotate(-360deg);
|
375
|
+
}
|
376
|
+
}
|
377
|
+
`}};lt=o([d("ia-itemnav-loader")],lt);let ct=class extends C{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 b.dy`
|
378
|
+
<section>
|
379
|
+
<h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>
|
380
|
+
<p>
|
381
|
+
This item does not appear to have any files that can be experienced on
|
382
|
+
Archive.org. <br />
|
383
|
+
Please download files in this item to interact with them on your
|
384
|
+
computer.
|
385
|
+
</p>
|
386
|
+
<a href=${this.downloadUrl}>Show all files</a>
|
387
|
+
</section>
|
388
|
+
`}static get styles(){return w`
|
389
|
+
:host {
|
390
|
+
color: var(--primaryTextColor, #fff);
|
391
|
+
text-align: center;
|
392
|
+
}
|
393
|
+
section {
|
394
|
+
margin: 10% auto 0;
|
395
|
+
padding: 0 5%;
|
396
|
+
}
|
397
|
+
p {
|
398
|
+
font-size: 1.4rem;
|
399
|
+
}
|
400
|
+
a {
|
401
|
+
color: var(--primaryTextColor, #fff);
|
402
|
+
background-color: rgb(25, 72, 128);
|
403
|
+
min-height: 35px;
|
404
|
+
outline: none;
|
405
|
+
cursor: pointer;
|
406
|
+
line-height: normal;
|
407
|
+
border-radius: 0.4rem;
|
408
|
+
text-align: center;
|
409
|
+
vertical-align: middle;
|
410
|
+
font-size: 1.4rem;
|
411
|
+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
412
|
+
display: inline-block;
|
413
|
+
padding: 0.85rem 1.2rem;
|
414
|
+
border: 1px solid rgb(197, 209, 223);
|
415
|
+
white-space: nowrap;
|
416
|
+
appearance: auto;
|
417
|
+
box-sizing: border-box;
|
418
|
+
user-select: none;
|
419
|
+
text-decoration: none;
|
420
|
+
}
|
421
|
+
`}};var dt;o([h({type:String})],ct.prototype,"identifier",void 0),ct=o([d("ia-no-theater-available")],ct),function(e){e.BOOK="bookreader"}(dt||(dt={}));let ut=class extends C{constructor(){super(...arguments),this.baseHost="archive.org",this.signedIn=!1,this.menuContents=[],this.menuShortcuts=[],this.viewportInFullscreen=null,this.menuOpened=!1,this.loaded=null,this.openMenuState="shift"}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;null===(e=this.sharedObserver)||void 0===e||e.addObserver(this.resizeObserverConfig)}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 readerHeightStyle(){var e;const t=`calc(100vh - ${null===(e=this.headerSlot)||void 0===e?void 0:e.offsetHeight}px)`;return this.viewportInFullscreen?`height: ${t}`:""}get loadingArea(){return b.dy`
|
422
|
+
<div class="loading-area">
|
423
|
+
<div class="loading-view">
|
424
|
+
<ia-itemnav-loader .title=${this.loaderTitle}></ia-itemnav-loader>
|
425
|
+
</div>
|
426
|
+
</div>
|
427
|
+
`}render(){const e=this.loaded?"":"hidden";return b.dy`
|
428
|
+
<div id="frame" class=${`${this.menuClass}`}>
|
429
|
+
<div class="menu-and-reader">
|
430
|
+
${this.shouldRenderMenu?this.renderSideMenu:b.Ld}
|
431
|
+
<slot name="theater-header"></slot>
|
432
|
+
<div
|
433
|
+
id="reader"
|
434
|
+
class=${e}
|
435
|
+
style=${this.readerHeightStyle}
|
436
|
+
>
|
437
|
+
${this.renderViewport}
|
438
|
+
</div>
|
439
|
+
${this.loaded?b.Ld:this.loadingArea}
|
440
|
+
</div>
|
441
|
+
</div>
|
442
|
+
`}get noTheaterView(){var e,t;return b.dy`<ia-no-theater-available
|
443
|
+
.identifier=${null===(t=null===(e=this.item)||void 0===e?void 0:e.metadata)||void 0===t?void 0:t.identifier}
|
444
|
+
@loadingStateUpdated=${this.loadingStateUpdated}
|
445
|
+
></ia-no-theater-available>`}get theaterSlot(){return b.dy`
|
446
|
+
<slot name="theater-main" style=${this.readerHeightStyle}></slot>
|
447
|
+
`}get booksViewer(){const e=this.loaded?"opacity: 1;":"opacity: 0;";return b.dy`
|
448
|
+
<book-navigator
|
449
|
+
.modal=${this.modal}
|
450
|
+
.baseHost=${this.baseHost}
|
451
|
+
.itemMD=${this.item}
|
452
|
+
?signedIn=${this.signedIn}
|
453
|
+
?sideMenuOpen=${this.menuOpened}
|
454
|
+
.sharedObserver=${this.sharedObserver}
|
455
|
+
@ViewportInFullScreen=${this.manageViewportFullscreen}
|
456
|
+
@loadingStateUpdated=${this.loadingStateUpdated}
|
457
|
+
@updateSideMenu=${this.manageSideMenuEvents}
|
458
|
+
@menuUpdated=${this.setMenuContents}
|
459
|
+
@menuShortcutsUpdated=${this.setMenuShortcuts}
|
460
|
+
>
|
461
|
+
<div slot="theater-main" style=${e}>
|
462
|
+
${this.theaterSlot}
|
463
|
+
</div>
|
464
|
+
</book-navigator>
|
465
|
+
`}get renderViewport(){return this.item?this.itemType===dt.BOOK?this.booksViewer:this.noTheaterView:b.Ld}loadingStateUpdated(e){const{loaded:t}=e.detail;this.loaded=t||null}manageViewportFullscreen(e){const t=!!e.detail.isFullScreen;this.viewportInFullscreen=t||null;const n=new CustomEvent("fullscreenToggled",{detail:e.detail});this.dispatchEvent(n)}get shouldRenderMenu(){return!!this.menuContents.length}toggleMenu(){this.menuOpened=!this.menuOpened}closeMenu(){this.menuOpened=!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 b.dy`
|
466
|
+
<button
|
467
|
+
class="toggle-menu"
|
468
|
+
@click=${this.toggleMenu}
|
469
|
+
title="Toggle theater side panels"
|
470
|
+
>
|
471
|
+
<div>
|
472
|
+
<ia-icon-ellipses
|
473
|
+
style="width: var(--iconWidth); height: var(--iconHeight);"
|
474
|
+
></ia-icon-ellipses>
|
475
|
+
</div>
|
476
|
+
</button>
|
477
|
+
`}get selectedMenuId(){return this.openMenu||""}get renderSideMenu(){const e=this.menuOpened?"":"hidden";return b.dy`
|
478
|
+
<nav>
|
479
|
+
<div class="minimized">${this.shortcuts} ${this.menuToggleButton}</div>
|
480
|
+
<div id="menu" class=${e}>
|
481
|
+
<ia-menu-slider
|
482
|
+
.menus=${this.menuContents}
|
483
|
+
.selectedMenu=${this.selectedMenuId}
|
484
|
+
@menuTypeSelected=${this.setOpenMenu}
|
485
|
+
@menuSliderClosed=${this.closeMenu}
|
486
|
+
manuallyHandleClose
|
487
|
+
open
|
488
|
+
></ia-menu-slider>
|
489
|
+
</div>
|
490
|
+
</nav>
|
491
|
+
`}openShortcut(e=""){this.openMenu=e,this.menuOpened=!0}get shortcuts(){const e=this.menuShortcuts.map((({icon:e,id:t})=>"fullscreen"===t?b.dy`${e}`:b.dy`
|
492
|
+
<button class="shortcut ${t}" @click="${()=>this.openShortcut(t)}">
|
493
|
+
${e}
|
494
|
+
</button>
|
495
|
+
`));return b.dy`<div class="shortcuts">${e}</div>`}get menuClass(){return`${this.menuOpened?"open":""} ${this.viewportInFullscreen?"fullscreen":""} ${this.openMenuState}`}static get styles(){const e=w`var(--menuWidth, 320px)`,t=w`var(--animationTiming, 200ms)`,n=w`transform ${t} ease-out`,r=w`var(--theaterMenuMargin, 42px)`,o=w`var(--theaterBgColor, #000)`;return w`
|
496
|
+
:host,
|
497
|
+
#frame,
|
498
|
+
.menu-and-reader {
|
499
|
+
min-height: inherit;
|
500
|
+
height: inherit;
|
501
|
+
position: relative;
|
502
|
+
overflow: hidden;
|
503
|
+
display: block;
|
504
|
+
}
|
505
|
+
|
506
|
+
:host,
|
507
|
+
#frame,
|
508
|
+
.menu-and-reader,
|
509
|
+
.loading-area,
|
510
|
+
.loading-view {
|
511
|
+
min-height: inherit;
|
512
|
+
height: inherit;
|
513
|
+
}
|
514
|
+
|
515
|
+
slot {
|
516
|
+
display: block;
|
517
|
+
overflow: hidden;
|
518
|
+
}
|
519
|
+
|
520
|
+
#frame {
|
521
|
+
background-color: ${o};
|
522
|
+
color-scheme: dark;
|
523
|
+
}
|
524
|
+
|
525
|
+
#frame.fullscreen {
|
526
|
+
position: fixed;
|
527
|
+
top: 0;
|
528
|
+
bottom: 0;
|
529
|
+
left: 0;
|
530
|
+
right: 0;
|
531
|
+
z-index: 9;
|
532
|
+
}
|
533
|
+
|
534
|
+
.loading-view {
|
535
|
+
display: flex;
|
536
|
+
align-items: center;
|
537
|
+
justify-content: center;
|
538
|
+
}
|
539
|
+
|
540
|
+
ia-itemnav-loader {
|
541
|
+
display: block;
|
542
|
+
width: 100%;
|
543
|
+
}
|
544
|
+
|
545
|
+
.hidden {
|
546
|
+
display: none;
|
547
|
+
}
|
548
|
+
|
549
|
+
button {
|
550
|
+
cursor: pointer;
|
551
|
+
padding: 0;
|
552
|
+
border: 0;
|
553
|
+
}
|
554
|
+
|
555
|
+
button:focus,
|
556
|
+
button:active {
|
557
|
+
outline: none;
|
558
|
+
}
|
559
|
+
|
560
|
+
.menu-and-reader {
|
561
|
+
position: relative;
|
562
|
+
}
|
563
|
+
|
564
|
+
nav button {
|
565
|
+
background: none;
|
566
|
+
}
|
567
|
+
|
568
|
+
nav .minimized {
|
569
|
+
background: rgba(0, 0, 0, 0.7);
|
570
|
+
padding-top: 6px;
|
571
|
+
position: absolute;
|
572
|
+
width: ${r};
|
573
|
+
z-index: 2;
|
574
|
+
left: 0;
|
575
|
+
border-bottom-right-radius: 5%;
|
576
|
+
}
|
577
|
+
|
578
|
+
nav .minimized button {
|
579
|
+
width: var(--iconWidth);
|
580
|
+
height: var(--iconHeight);
|
581
|
+
margin-bottom: 0.2rem;
|
582
|
+
margin: auto;
|
583
|
+
display: inline-flex;
|
584
|
+
vertical-align: middle;
|
585
|
+
-webkit-box-align: center;
|
586
|
+
align-items: center;
|
587
|
+
-webkit-box-pack: center;
|
588
|
+
justify-content: center;
|
589
|
+
width: ${r};
|
590
|
+
height: ${r};
|
591
|
+
}
|
592
|
+
|
593
|
+
nav .minimized button.toggle-menu > * {
|
594
|
+
border: 2px solid var(--iconStrokeColor);
|
595
|
+
border-radius: var(--iconWidth);
|
596
|
+
width: var(--iconWidth);
|
597
|
+
height: var(--iconHeight);
|
598
|
+
margin: auto;
|
599
|
+
}
|
600
|
+
|
601
|
+
ia-icon-ellipses {
|
602
|
+
width: var(--iconWidth);
|
603
|
+
height: var(--iconHeight);
|
604
|
+
}
|
605
|
+
|
606
|
+
#menu {
|
607
|
+
position: absolute;
|
608
|
+
top: 0;
|
609
|
+
bottom: 0;
|
610
|
+
left: 0;
|
611
|
+
z-index: 3;
|
612
|
+
overflow: hidden;
|
613
|
+
transform: translateX(-${e});
|
614
|
+
width: ${e};
|
615
|
+
transform: translateX(calc(${e} * -1));
|
616
|
+
transition: ${n};
|
617
|
+
}
|
618
|
+
|
619
|
+
#reader {
|
620
|
+
position: relative;
|
621
|
+
z-index: 1;
|
622
|
+
/* transition: ${n}; */
|
623
|
+
transform: translateX(0);
|
624
|
+
width: 100%;
|
625
|
+
}
|
626
|
+
|
627
|
+
.open.overlay #reader {
|
628
|
+
transition: none;
|
629
|
+
}
|
630
|
+
|
631
|
+
.open #menu {
|
632
|
+
width: ${e};
|
633
|
+
transform: translateX(0);
|
634
|
+
transition: ${n};
|
635
|
+
}
|
636
|
+
|
637
|
+
.open.shift slot[name='theater-header'],
|
638
|
+
.open.shift #reader {
|
639
|
+
width: calc(100% - var(--menuWidth));
|
640
|
+
float: right;
|
641
|
+
transition: ${n};
|
642
|
+
}
|
643
|
+
`}};o([h({type:Object,converter:e=>e&&"string"==typeof e?new Z(JSON.parse(atob(e))):e})],ut.prototype,"item",void 0),o([h({type:String})],ut.prototype,"itemType",void 0),o([h({type:String})],ut.prototype,"baseHost",void 0),o([h({converter:e=>"boolean"==typeof e?e:"true"===e})],ut.prototype,"signedIn",void 0),o([h({type:Array})],ut.prototype,"menuContents",void 0),o([h({type:Array})],ut.prototype,"menuShortcuts",void 0),o([h({type:Boolean,reflect:!0,attribute:!0})],ut.prototype,"viewportInFullscreen",void 0),o([h({type:Boolean})],ut.prototype,"menuOpened",void 0),o([h({type:String})],ut.prototype,"openMenu",void 0),o([h({attribute:!1})],ut.prototype,"modal",void 0),o([h({attribute:!1})],ut.prototype,"sharedObserver",void 0),o([h({type:Boolean,reflect:!0,attribute:!0})],ut.prototype,"loaded",void 0),o([h({attribute:!1,hasChanged:void 0})],ut.prototype,"openMenuState",void 0),o([p("#frame")],ut.prototype,"frame",void 0),o([p('slot[name="theater-header"]')],ut.prototype,"headerSlot",void 0),ut=o([d("ia-item-navigator")],ut),n(5003),n(4747),n(9337),n(4916),n(4765),n(7941),n(7327),n(561),n(9826),n(5827),n(2222);var ht,pt=[],ft="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(ht||(ht={}));var mt,vt=function(e){return Object.freeze(e)},bt=function(e,t){this.inlineSize=e,this.blockSize=t,vt(this)},yt=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,vt(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),gt=function(e){return e instanceof SVGElement&&"getBBox"in e},kt=function(e){if(gt(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},wt=function(e){var t,n;if(e instanceof Element)return!0;var r=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(r&&e instanceof r.Element)},St="undefined"!=typeof window?window:{},Ct=new WeakMap,xt=/auto|scroll/,Ot=/^tb|vertical/,_t=/msie|trident/i.test(St.navigator&&St.navigator.userAgent),Et=function(e){return parseFloat(e||"0")},Bt=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new bt((n?t:e)||0,(n?e:t)||0)},Pt=vt({devicePixelContentBoxSize:Bt(),borderBoxSize:Bt(),contentBoxSize:Bt(),contentRect:new yt(0,0,0,0)}),At=function(e,t){if(void 0===t&&(t=!1),Ct.has(e)&&!t)return Ct.get(e);if(kt(e))return Ct.set(e,Pt),Pt;var n=getComputedStyle(e),r=gt(e)&&e.ownerSVGElement&&e.getBBox(),o=!_t&&"border-box"===n.boxSizing,i=Ot.test(n.writingMode||""),s=!r&&xt.test(n.overflowY||""),a=!r&&xt.test(n.overflowX||""),l=r?0:Et(n.paddingTop),c=r?0:Et(n.paddingRight),d=r?0:Et(n.paddingBottom),u=r?0:Et(n.paddingLeft),h=r?0:Et(n.borderTopWidth),p=r?0:Et(n.borderRightWidth),f=r?0:Et(n.borderBottomWidth),m=u+c,v=l+d,b=(r?0:Et(n.borderLeftWidth))+p,y=h+f,g=a?e.offsetHeight-y-e.clientHeight:0,k=s?e.offsetWidth-b-e.clientWidth:0,w=o?m+b:0,S=o?v+y:0,C=r?r.width:Et(n.width)-w-k,x=r?r.height:Et(n.height)-S-g,O=C+m+k+b,_=x+v+g+y,E=vt({devicePixelContentBoxSize:Bt(Math.round(C*devicePixelRatio),Math.round(x*devicePixelRatio),i),borderBoxSize:Bt(O,_,i),contentBoxSize:Bt(C,x,i),contentRect:new yt(u,l,C,x)});return Ct.set(e,E),E},$t=function(e,t,n){var r=At(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case ht.DEVICE_PIXEL_CONTENT_BOX:return s;case ht.BORDER_BOX:return o;default:return i}},zt=function(e){var t=At(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=vt([t.borderBoxSize]),this.contentBoxSize=vt([t.contentBoxSize]),this.devicePixelContentBoxSize=vt([t.devicePixelContentBoxSize])},jt=function(e){if(kt(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Tt=function(){var e=1/0,t=[];pt.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new zt(t.target),o=jt(t.target);r.push(n),t.lastReportedSize=$t(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++)(0,r[n])();return e},Mt=function(e){pt.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(jt(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},It=[],Lt=0,Dt={attributes:!0,characterData:!0,childList:!0,subtree:!0},Rt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ht=function(e){return void 0===e&&(e=0),Date.now()+e},Nt=!1,Ut=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Nt){Nt=!0;var n,r=Ht(e);n=function(){var n=!1;try{n=function(){var e,t=0;for(Mt(t);pt.some((function(e){return e.activeTargets.length>0}));)t=Tt(),Mt(t);return pt.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:ft}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=ft),window.dispatchEvent(e)),t>0}()}finally{if(Nt=!1,e=r-Ht(),!Lt)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!mt){var t=0,n=document.createTextNode("");new MutationObserver((function(){return It.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),mt=function(){n.textContent=""+(t?t--:t++)}}It.push(e),mt()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Dt)};document.body?t():St.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Rt.forEach((function(t){return St.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Rt.forEach((function(t){return St.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Ft=function(e){!Lt&&e>0&&Ut.start(),!(Lt+=e)&&Ut.stop()},Vt=function(){function e(e,t){this.target=e,this.observedBox=t||ht.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=$t(this.target,this.observedBox,!0);return e=this.target,gt(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),qt=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},Wt=new WeakMap,Zt=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Gt=function(){function e(){}return e.connect=function(e,t){var n=new qt(e,t);Wt.set(e,n)},e.observe=function(e,t,n){var r=Wt.get(e),o=0===r.observationTargets.length;Zt(r.observationTargets,t)<0&&(o&&pt.push(r),r.observationTargets.push(new Vt(t,n&&n.box)),Ft(1),Ut.schedule())},e.unobserve=function(e,t){var n=Wt.get(e),r=Zt(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&pt.splice(pt.indexOf(n),1),n.observationTargets.splice(r,1),Ft(-1))},e.disconnect=function(e){var t=this,n=Wt.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Jt=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Gt.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!wt(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Gt.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!wt(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Gt.unobserve(this,e)},e.prototype.disconnect=function(){Gt.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const Yt=window.ResizeObserver||Jt;class Xt{constructor(){this.resizeObserver=new Yt((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}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&&(this.resizeObserver.unobserve(e.target),t.delete(e.handler),0===t.size&&this.resizeHandlers.delete(e.target))}}class Qt{constructor(e){var t,n,r,o,i;this.title=null==e?void 0:e.title,this.subtitle=null==e?void 0:e.subtitle,this.headline=null==e?void 0:e.headline,this.message=null==e?void 0:e.message,this.headerColor=null!==(t=null==e?void 0:e.headerColor)&&void 0!==t?t:"#55A183",this.showProcessingIndicator=null!==(n=null==e?void 0:e.showProcessingIndicator)&&void 0!==n&&n,this.processingImageMode=null!==(r=null==e?void 0:e.processingImageMode)&&void 0!==r?r:"complete",this.showCloseButton=null===(o=null==e?void 0:e.showCloseButton)||void 0===o||o,this.closeOnBackdropClick=null===(i=null==e?void 0:e.closeOnBackdropClick)||void 0===i||i}}const Kt=Object.freeze({processing:"processing",complete:"complete"});class en extends r.oi{static get properties(){return{mode:{type:String}}}constructor(){super(),this.mode=Kt.processing}render(){return r.dy`
|
789
644
|
<div class="${this.mode}">
|
790
645
|
<svg
|
791
646
|
viewBox="0 0 120 120"
|
@@ -834,7 +689,7 @@
|
|
834
689
|
</g>
|
835
690
|
</svg>
|
836
691
|
</div>
|
837
|
-
`}static get styles(){const e=
|
692
|
+
`}static get styles(){const e=r.iv`var(--activityIndicatorCheckmarkColor, #31A481)`,t=r.iv`var(--activityIndicatorCompletedRingColor, #31A481)`,n=r.iv`var(--activityIndicatorLoadingRingColor, #333333)`,o=r.iv`var(--activityIndicatorLoadingDotColor, #333333)`;return r.iv`
|
838
693
|
#completed-ring {
|
839
694
|
fill: ${t};
|
840
695
|
}
|
@@ -848,7 +703,7 @@
|
|
848
703
|
}
|
849
704
|
|
850
705
|
#activity-dots {
|
851
|
-
fill: ${
|
706
|
+
fill: ${o};
|
852
707
|
}
|
853
708
|
|
854
709
|
.activity-indicator {
|
@@ -915,7 +770,7 @@
|
|
915
770
|
opacity: 0;
|
916
771
|
}
|
917
772
|
}
|
918
|
-
`}}window.customElements.define("ia-activity-indicator",
|
773
|
+
`}}window.customElements.define("ia-activity-indicator",en);var tn=b.dy`
|
919
774
|
<svg
|
920
775
|
viewBox="0 0 40 40"
|
921
776
|
version="1.1"
|
@@ -926,7 +781,7 @@
|
|
926
781
|
<desc id="closeDescID">A line drawing of an X</desc>
|
927
782
|
<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"/>
|
928
783
|
</svg>
|
929
|
-
`,
|
784
|
+
`,nn=b.dy`
|
930
785
|
<svg
|
931
786
|
class="ia-logo"
|
932
787
|
viewBox="0 0 27 30"
|
@@ -945,16 +800,16 @@
|
|
945
800
|
</g>
|
946
801
|
</g>
|
947
802
|
</svg>
|
948
|
-
`;let
|
803
|
+
`;let rn=class extends r.oi{constructor(){super(...arguments),this.config=new Qt}render(){return r.dy`
|
949
804
|
<div class="modal-wrapper">
|
950
805
|
<div class="modal-container">
|
951
806
|
<header style="background-color: ${this.config.headerColor}">
|
952
807
|
${this.config.showCloseButton?this.closeButtonTemplate:""}
|
953
808
|
<div class="logo-icon">
|
954
|
-
${
|
809
|
+
${nn}
|
955
810
|
</div>
|
956
|
-
${this.config.title?
|
957
|
-
${this.config.subtitle?
|
811
|
+
${this.config.title?r.dy`<h1 class="title">${this.config.title}</h1>`:""}
|
812
|
+
${this.config.subtitle?r.dy`<h2 class="subtitle">${this.config.subtitle}</h2>`:""}
|
958
813
|
</header>
|
959
814
|
<section class="modal-body">
|
960
815
|
<div class="content">
|
@@ -966,8 +821,8 @@
|
|
966
821
|
></ia-activity-indicator>
|
967
822
|
</div>
|
968
823
|
|
969
|
-
${this.config.headline?
|
970
|
-
${this.config.message?
|
824
|
+
${this.config.headline?r.dy` <h1 class="headline">${this.config.headline}</h1> `:""}
|
825
|
+
${this.config.message?r.dy` <p class="message">${this.config.message}</p> `:""}
|
971
826
|
|
972
827
|
<div class="slot-container">
|
973
828
|
<slot> </slot>
|
@@ -976,16 +831,16 @@
|
|
976
831
|
</section>
|
977
832
|
</div>
|
978
833
|
</div>
|
979
|
-
`}handleCloseButton(){const e=new Event("closeButtonPressed");this.dispatchEvent(e)}get closeButtonTemplate(){return
|
834
|
+
`}handleCloseButton(){const e=new Event("closeButtonPressed");this.dispatchEvent(e)}get closeButtonTemplate(){return r.dy`
|
980
835
|
<button
|
981
836
|
type="button"
|
982
837
|
class="close-button"
|
983
838
|
tabindex="0"
|
984
839
|
@click=${this.handleCloseButton}
|
985
840
|
>
|
986
|
-
${
|
841
|
+
${tn}
|
987
842
|
</button>
|
988
|
-
`}static get styles(){const e=
|
843
|
+
`}static get styles(){const e=r.iv`var(--modalLogoSize, 6.5rem)`,t=r.iv`var(--processingImageSize, 7.5rem)`,n=r.iv`var(--modalCornerRadius, 1rem)`,o=r.iv`var(--modalBorder, 2px solid black)`,i=r.iv`var(--modalBottomMargin, 2.5rem)`,s=r.iv`var(--modalTopMargin, 5rem)`,a=r.iv`var(--modalHeaderBottomPadding, 0.5em)`,l=r.iv`var(--modalBottomPadding, 2rem)`,c=r.iv`var(--modalScrollOffset, 5px)`,d=r.iv`var(--modalTitleFontSize, 1.8rem)`,u=r.iv`var(--modalSubtitleFontSize, 1.4rem)`,h=r.iv`var(--modalHeadlineFontSize, 1.6rem)`,p=r.iv`var(--modalMessageFontSize, 1.4rem)`,f=r.iv`var(--modalTitleLineHeight, normal)`,m=r.iv`var(--modalSubtitleLineHeight, normal)`,v=r.iv`var(--modalHeadlineLineHeight, normal)`,b=r.iv`var(--modalMessageLineHeight, normal)`;return r.iv`
|
989
844
|
.processing-logo {
|
990
845
|
margin: auto;
|
991
846
|
width: ${t};
|
@@ -1007,7 +862,7 @@
|
|
1007
862
|
.modal-container {
|
1008
863
|
border-radius: ${n};
|
1009
864
|
width: 100%;
|
1010
|
-
margin-top: ${
|
865
|
+
margin-top: ${s};
|
1011
866
|
}
|
1012
867
|
|
1013
868
|
header {
|
@@ -1015,10 +870,10 @@
|
|
1015
870
|
background-color: #36a483;
|
1016
871
|
color: white;
|
1017
872
|
border-radius: calc(${n}) calc(${n}) 0 0;
|
1018
|
-
border: ${
|
873
|
+
border: ${o};
|
1019
874
|
border-bottom: 0;
|
1020
875
|
text-align: center;
|
1021
|
-
padding-bottom: ${
|
876
|
+
padding-bottom: ${a};
|
1022
877
|
}
|
1023
878
|
|
1024
879
|
.title {
|
@@ -1026,7 +881,7 @@
|
|
1026
881
|
padding: 0;
|
1027
882
|
font-size: ${d};
|
1028
883
|
font-weight: bold;
|
1029
|
-
line-height: ${
|
884
|
+
line-height: ${f};
|
1030
885
|
}
|
1031
886
|
|
1032
887
|
.subtitle {
|
@@ -1041,7 +896,7 @@
|
|
1041
896
|
.modal-body {
|
1042
897
|
background-color: #f5f5f7;
|
1043
898
|
border-radius: 0 0 calc(${n}) calc(${n});
|
1044
|
-
border: ${
|
899
|
+
border: ${o};
|
1045
900
|
border-top: 0;
|
1046
901
|
padding: 0 1rem calc(${l} - ${c}) 1rem;
|
1047
902
|
color: #333;
|
@@ -1068,7 +923,7 @@
|
|
1068
923
|
.message {
|
1069
924
|
margin: 1rem 0 0 0;
|
1070
925
|
text-align: center;
|
1071
|
-
font-size: ${
|
926
|
+
font-size: ${p};
|
1072
927
|
line-height: ${b};
|
1073
928
|
}
|
1074
929
|
|
@@ -1113,7 +968,7 @@
|
|
1113
968
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
|
1114
969
|
0 4px 4px 0 rgba(0, 0, 0, 0.08);
|
1115
970
|
}
|
1116
|
-
`}};
|
971
|
+
`}};o([(0,r.Cb)({type:Object})],rn.prototype,"config",void 0),rn=o([(0,r.Mo)("modal-template")],rn);var on,sn=n(3774);!function(e){e.Open="open",e.Closed="closed"}(on||(on={}));class an{constructor(e){this.windowResizeThrottler=(0,sn.throttle)(100,!1,this.updateModalContainerHeight).bind(this),this.modalManager=e}handleModeChange(e){switch(e){case on.Open:this.startResizeListener(),this.stopDocumentScroll();break;case on.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 ln=class extends r.oi{constructor(){super(...arguments),this.mode=on.Closed,this.hostBridge=new an(this),this.closeOnBackdropClick=!0}render(){return r.dy`
|
1117
972
|
<div class="container">
|
1118
973
|
<div class="backdrop" @click=${this.backdropClicked}></div>
|
1119
974
|
<modal-template
|
@@ -1123,7 +978,7 @@
|
|
1123
978
|
${this.customModalContent}
|
1124
979
|
</modal-template>
|
1125
980
|
</div>
|
1126
|
-
`}getMode(){return this.mode}closeModal(){this.mode=
|
981
|
+
`}getMode(){return this.mode}closeModal(){this.mode=on.Closed}callUserClosedModalCallback(){const e=this.userClosedModalCallback;this.userClosedModalCallback=void 0,e&&e()}showModal(e){return function(e,t,n,r){return new(n||(n=Promise))((function(t,o){function i(e){try{a(r.next(e))}catch(e){o(e)}}function s(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){e.done?t(e.value):new n((function(t){t(e.value)})).then(i,s)}a((r=r.apply(e,[])).next())}))}(this,0,void 0,(function*(){this.closeOnBackdropClick=e.config.closeOnBackdropClick,this.userClosedModalCallback=e.userClosedModalCallback,this.modalTemplate.config=e.config,this.customModalContent=e.customModalContent,this.mode=on.Open,yield this.modalTemplate.updateComplete,this.modalTemplate.focus()}))}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.iv`var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`,t=r.iv`var(--modalBackdropZindex, 1000)`,n=r.iv`var(--modalWidth, 32rem)`,o=r.iv`var(--modalMaxWidth, 95%)`,i=r.iv`var(--modalZindex, 2000)`;return r.iv`
|
1127
982
|
.container {
|
1128
983
|
width: 100%;
|
1129
984
|
height: 100%;
|
@@ -1147,9 +1002,22 @@
|
|
1147
1002
|
transform: translate(-50%, 0);
|
1148
1003
|
z-index: ${i};
|
1149
1004
|
width: ${n};
|
1150
|
-
max-width: ${
|
1005
|
+
max-width: ${o};
|
1151
1006
|
}
|
1152
|
-
`}};function he(e){return(he="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})(e)}var fe,pe,me,ve,be,ye,ge,ke,we,Ce,xe,Se,Be;function Oe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ie(e){return function(e){if(Array.isArray(e))return ze(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 ze(e,t);var n=Object.prototype.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)?ze(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 ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Te(e,t){if(t&&("object"===he(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)}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ne([(0,o.Cb)({type:String,reflect:!0})],ue.prototype,"mode",void 0),ne([(0,o.Cb)({type:Object})],ue.prototype,"customModalContent",void 0),ne([(0,o.Cb)({type:Object})],ue.prototype,"hostBridge",void 0),ne([(0,o.IO)("modal-template")],ue.prototype,"modalTemplate",void 0),ue=ne([(0,o.Mo)("modal-manager")],ue);var je=function(e){!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}}),t&&Le(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ee(a);if(s){var n=Ee(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Te(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).baseHost="archive.org",e.item={},e.itemType="",e.menuOpened=!1,e.signedIn=!1,e.menuShortcuts=[],e.menuContents=[],e.viewportInFullscreen=!1,e.openMenu="",e.renderModalManager(),e}return t=c,i=[{key:"properties",get:function(){return{baseHost:{type:String},item:{type:Object,converter:function(e){return e?JSON.parse(atob(e)):{}}},itemType:{type:String},menuShortcuts:{type:Array,hasChanged:function(e,t){return e!==t}},menuOpened:{type:Boolean},menuContents:{type:Array},openMenu:{type:String},signedIn:{type:Boolean,converter:function(e){return"boolean"==typeof e?e:"true"===e}},viewportInFullscreen:{type:Boolean}}}},{key:"styles",get:function(){var e=(0,o.iv)(we||(we=Oe(["var(--menuWidth, 320px)"]))),t=(0,o.iv)(Ce||(Ce=Oe(["@media (min-width: 640px)"]))),n=(0,o.iv)(xe||(xe=Oe(["var(--animationTiming, 200ms)"]))),r=(0,o.iv)(Se||(Se=Oe(["transform "," ease-out"])),n);return(0,o.iv)(Be||(Be=Oe(["\n #frame {\n position: relative;\n overflow: hidden;\n color-scheme: dark;\n }\n\n #frame.fullscreen,\n #frame.fullscreen #reader {\n height: 100vh;\n }\n\n button {\n cursor: pointer;\n padding: 0;\n border: 0;\n }\n\n button:focus,\n button:active {\n outline: none;\n }\n\n .menu-and-reader {\n position: relative;\n }\n\n nav button {\n background: none;\n }\n\n nav .minimized {\n background: rgba(0, 0, 0, .7);\n border-bottom-right-radius: 5%;\n position: absolute;\n padding-top: .6rem;\n left: 0;\n width: 4rem;\n z-index: 2;\n }\n\n nav .minimized button {\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n display: inline-flex;\n vertical-align: middle;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: 4rem;\n height: 4rem;\n }\n\n nav .minimized button.toggle-menu > * {\n border: 2px solid var(--iconStrokeColor);\n border-radius: var(--iconWidth);\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n }\n\n #menu {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n overflow: hidden;\n transform: translateX(-",");\n width: ",";\n transform: translateX(calc("," * -1));\n transition: ",";\n }\n\n #reader {\n position: relative;\n z-index: 1;\n transition: ",";\n transform: translateX(0);\n width: 100%;\n }\n\n .open #menu {\n width: ",";\n transform: translateX(0);\n transition: ",";\n }\n\n "," {\n .open #reader {\n transition: ",";\n transform: translateX(",");\n width: calc(100% - ",");\n }\n }\n\n #loading-indicator {\n display: none;\n }\n\n #loading-indicator.visible {\n display: block;\n }\n "])),e,e,e,r,r,e,r,t,r,e,e)}}],(n=[{key:"showItemNavigatorModal",value:function(e){var t=e.detail;this.modal.showModal({config:this.modalConfig,customModalContent:t.customModalContent})}},{key:"closeItemNavigatorModal",value:function(){this.modal.closeModal()}},{key:"manageViewportFullscreen",value:function(e){var t=e.detail.isFullScreen;this.viewportInFullscreen=t}},{key:"manageSideMenuEvents",value:function(e){var t=e.detail,n=t.action,o=void 0===n?"":n,r=t.menuId,i=void 0===r?"":r;if(i)switch(o){case"open":this.openShortcut(i);break;case"toggle":this.openMenu=i,this.toggleMenu();break;default:this.closeMenu()}}},{key:"toggleMenu",value:function(){this.menuOpened=!this.menuOpened}},{key:"closeMenu",value:function(){this.menuOpened=!1}},{key:"openShortcut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.openMenu=e,this.menuOpened=!0}},{key:"setOpenMenu",value:function(e){var t=e.detail.id;this.openMenu=t===this.openMenu?"":t}},{key:"setMenuContents",value:function(e){var t=e.detail;this.menuContents=Ie(t)}},{key:"setMenuShortcuts",value:function(e){var t=e.detail;this.menuShortcuts=Ie(t)}},{key:"menuClass",get:function(){var e=this.menuOpened?"open":"",t=this.viewportInFullscreen?"fullscreen":"";return"".concat(e," ").concat(t)}},{key:"menuToggleButton",get:function(){return(0,o.dy)(fe||(fe=Oe(['\n <button class="toggle-menu" @click=','>\n <div>\n <ia-icon icon="ellipses" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon>\n </div>\n </button>\n '])),this.toggleMenu.bind(this))}},{key:"menuSlider",get:function(){return(0,o.dy)(pe||(pe=Oe(['\n <div id="menu">\n <ia-menu-slider\n .menus=',"\n .open=","\n .selectedMenu=","\n @menuTypeSelected=","\n @menuSliderClosed=","\n ?manuallyHandleClose=","\n ?animateMenuOpen=","\n ></ia-menu-slider>\n </div>\n "])),this.menuContents,!0,this.openMenu,this.setOpenMenu,this.closeMenu,!0,!1)}},{key:"shortcuts",get:function(){var e=this,t=this.menuShortcuts.map((function(t){var n=t.icon,r=t.id;return(0,o.dy)(me||(me=Oe(['\n <button class="shortcut ','" @click="','">\n ',"\n </button>\n "])),r,(function(t){e.openShortcut(r)}),n)}));return(0,o.dy)(ve||(ve=Oe(['<div class="shortcuts">',"</div>"])),t)}},{key:"renderSideMenu",get:function(){return(0,o.dy)(be||(be=Oe(['\n <nav>\n <div class="minimized">\n ',"\n ","\n </div>\n ","\n </nav>\n "])),this.shortcuts,this.menuToggleButton,this.menuSlider)}},{key:"renderViewport",get:function(){return"bookreader"===this.itemType?(0,o.dy)(ye||(ye=Oe(["\n <book-navigator\n .baseHost=","\n .book=","\n ?signedIn=","\n ?sideMenuOpen=","\n @ViewportInFullScreen=","\n @updateSideMenu=","\n @menuUpdated=","\n @menuShortcutsUpdated=","\n @showItemNavigatorModal=","\n @closeItemNavigatorModal=",'\n >\n <div slot="bookreader">\n <slot name="bookreader"></slot>\n </div>\n </book-navigator>\n '])),this.baseHost,this.item,this.signedIn,this.menuOpened,this.manageViewportFullscreen,this.manageSideMenuEvents,this.setMenuContents,this.setMenuShortcuts,this.showItemNavigatorModal,this.closeItemNavigatorModal):(0,o.dy)(ge||(ge=Oe(['<div class="viewport"></div>'])))}},{key:"renderModalManager",value:function(){this.modal=document.createElement("modal-manager"),this.modal.setAttribute("id","item-navigator-modal"),this.modalConfig=new te,this.modalConfig.title="Delete Bookmark",this.modalConfig.headline="This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?",this.modalConfig.headerColor="#194880",document.body.appendChild(this.modal)}},{key:"render",value:function(){var e=this.menuContents.length||this.menuShortcuts.length;return(0,o.dy)(ke||(ke=Oe(['\n <div id="frame" class=','>\n <slot name="item-nav-header"></slot>\n <div class="menu-and-reader">\n ','\n <div id="reader">\n ',"\n </div>\n </div>\n </div>\n "])),this.menuClass,e?this.renderSideMenu:r.Ld,this.renderViewport)}}])&&De(t.prototype,n),i&&De(t,i),c}(o.oi);customElements.define("ia-icon",ee),customElements.define("ia-menu-slider",p),customElements.define("item-navigator",je),n(7941),n(7327),n(561),n(9826),n(5827),n(4747),n(9653);var Me,Pe=[],Ae="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Me||(Me={}));var Re,_e,$e,Ne,He,Fe=function(e){return Object.freeze(e)},Ze=function(e,t){this.inlineSize=e,this.blockSize=t,Fe(this)},We=function(){function e(e,t,n,o){return this.x=e,this.y=t,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Fe(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),qe=function(e){return e instanceof SVGElement&&"getBBox"in e},Ue=function(e){if(qe(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var r=e,i=r.offsetWidth,a=r.offsetHeight;return!(i||a||e.getClientRects().length)},Ve=function(e){var t,n;if(e instanceof Element)return!0;var o=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(o&&e instanceof o.Element)},Ge="undefined"!=typeof window?window:{},Xe=new WeakMap,Ye=/auto|scroll/,Je=/^tb|vertical/,Qe=/msie|trident/i.test(Ge.navigator&&Ge.navigator.userAgent),Ke=function(e){return parseFloat(e||"0")},et=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Ze((n?t:e)||0,(n?e:t)||0)},tt=Fe({devicePixelContentBoxSize:et(),borderBoxSize:et(),contentBoxSize:et(),contentRect:new We(0,0,0,0)}),nt=function(e,t){if(void 0===t&&(t=!1),Xe.has(e)&&!t)return Xe.get(e);if(Ue(e))return Xe.set(e,tt),tt;var n=getComputedStyle(e),o=qe(e)&&e.ownerSVGElement&&e.getBBox(),r=!Qe&&"border-box"===n.boxSizing,i=Je.test(n.writingMode||""),a=!o&&Ye.test(n.overflowY||""),s=!o&&Ye.test(n.overflowX||""),l=o?0:Ke(n.paddingTop),c=o?0:Ke(n.paddingRight),d=o?0:Ke(n.paddingBottom),u=o?0:Ke(n.paddingLeft),h=o?0:Ke(n.borderTopWidth),f=o?0:Ke(n.borderRightWidth),p=o?0:Ke(n.borderBottomWidth),m=u+c,v=l+d,b=(o?0:Ke(n.borderLeftWidth))+f,y=h+p,g=s?e.offsetHeight-y-e.clientHeight:0,k=a?e.offsetWidth-b-e.clientWidth:0,w=r?m+b:0,C=r?v+y:0,x=o?o.width:Ke(n.width)-w-k,S=o?o.height:Ke(n.height)-C-g,B=x+m+k+b,O=S+v+g+y,I=Fe({devicePixelContentBoxSize:et(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:et(B,O,i),contentBoxSize:et(x,S,i),contentRect:new We(u,l,x,S)});return Xe.set(e,I),I},ot=function(e,t,n){var o=nt(e,n),r=o.borderBoxSize,i=o.contentBoxSize,a=o.devicePixelContentBoxSize;switch(t){case Me.DEVICE_PIXEL_CONTENT_BOX:return a;case Me.BORDER_BOX:return r;default:return i}},rt=function(e){var t=nt(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Fe([t.borderBoxSize]),this.contentBoxSize=Fe([t.contentBoxSize]),this.devicePixelContentBoxSize=Fe([t.devicePixelContentBoxSize])},it=function(e){if(Ue(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},at=function(){var e=1/0,t=[];Pe.forEach((function(n){if(0!==n.activeTargets.length){var o=[];n.activeTargets.forEach((function(t){var n=new rt(t.target),r=it(t.target);o.push(n),t.lastReportedSize=ot(t.target,t.observedBox),r<e&&(e=r)})),t.push((function(){n.callback.call(n.observer,o,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,o=t;n<o.length;n++)(0,o[n])();return e},st=function(e){Pe.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(it(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},lt=[],ct=0,dt={attributes:!0,characterData:!0,childList:!0,subtree:!0},ut=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ht=function(e){return void 0===e&&(e=0),Date.now()+e},ft=!1,pt=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!ft){ft=!0;var n,o=ht(e);n=function(){var n=!1;try{n=function(){var e,t=0;for(st(t);Pe.some((function(e){return e.activeTargets.length>0}));)t=at(),st(t);return Pe.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Ae}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Ae),window.dispatchEvent(e)),t>0}()}finally{if(ft=!1,e=o-ht(),!ct)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!Re){var t=0,n=document.createTextNode("");new MutationObserver((function(){return lt.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Re=function(){n.textContent=""+(t?t--:t++)}}lt.push(e),Re()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,dt)};document.body?t():Ge.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ut.forEach((function(t){return Ge.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ut.forEach((function(t){return Ge.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),mt=function(e){!ct&&e>0&&pt.start(),!(ct+=e)&&pt.stop()},vt=function(){function e(e,t){this.target=e,this.observedBox=t||Me.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=ot(this.target,this.observedBox,!0);return e=this.target,qe(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),bt=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},yt=new WeakMap,gt=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},kt=function(){function e(){}return e.connect=function(e,t){var n=new bt(e,t);yt.set(e,n)},e.observe=function(e,t,n){var o=yt.get(e),r=0===o.observationTargets.length;gt(o.observationTargets,t)<0&&(r&&Pe.push(o),o.observationTargets.push(new vt(t,n&&n.box)),mt(1),pt.schedule())},e.unobserve=function(e,t){var n=yt.get(e),o=gt(n.observationTargets,t),r=1===n.observationTargets.length;o>=0&&(r&&Pe.splice(Pe.indexOf(n),1),n.observationTargets.splice(o,1),mt(-1))},e.disconnect=function(e){var t=this,n=yt.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),wt=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");kt.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ve(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");kt.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ve(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");kt.unobserve(this,e)},e.prototype.disconnect=function(){kt.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),Ct=(n(4723),n(4603),n(9714),n(5306),n(3161),n(4129),n(7552)),xt=new WeakMap,St=(0,r.XM)((function(e){return function(t){if(!(t instanceof r.nt))throw new Error("unsafeHTML can only be used in text bindings");var n=xt.get(t);if(void 0===n||!(0,Ct.pt)(e)||e!==n.value||t.value!==n.fragment){var o=document.createElement("template");o.innerHTML=e;var i=document.importNode(o.content,!0);t.setValue(i),xt.set(t,{value:e,fragment:i})}}}));function Bt(e){return(Bt="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})(e)}function Ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function It(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lt(e,t){if(t&&("object"===Bt(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)}function Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Et,jt=function(e){!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}}),t&&Dt(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Tt(a);if(s){var n=Tt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Lt(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).matchRegex=new RegExp("{{{(.+?)}}}","g"),e}return t=c,i=[{key:"properties",get:function(){return{match:{type:Object}}}}],(n=[{key:"createRenderRoot",value:function(){return this}},{key:"highlightedHit",value:function(e){return(0,o.dy)(_e||(_e=It(["\n <p>","</p>\n "])),St(e.replace(this.matchRegex,"<mark>$1</mark>")))}},{key:"resultSelected",value:function(){this.dispatchEvent(new CustomEvent("resultSelected",{bubbles:!0,composed:!0,detail:{match:this.match}}))}},{key:"render",value:function(){var e,t,n=this.match,i=n.par,a=(e=void 0===i?[]:i,t=1,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 o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ot(e,t);var n=Object.prototype.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)?Ot(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.")}())[0],s=void 0===a?{}:a,l=Number.isInteger(s.page)?(0,o.dy)($e||($e=It(['<p class="page-num">Page -',"-</p>"])),s.page):r.Ld,c=(0,o.dy)(Ne||(Ne=It(['<img src="','" />'])),n.cover);return(0,o.dy)(He||(He=It(["\n <li @click=",">\n ","\n <h4>","</h4>\n ","\n ","\n </li>\n "])),this.resultSelected,n.cover?c:r.Ld,n.title||r.Ld,l,this.highlightedHit(n.text))}}])&&zt(t.prototype,n),i&&zt(t,i),c}(o.oi);customElements.define("book-search-result",jt);var Mt,Pt,At,Rt,_t,$t,Nt,Ht,Ft,Zt,Wt,qt,Ut,Vt,Gt,Xt,Yt,Jt,Qt,Kt=(0,o.iv)(Et||(Mt=["data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"],Pt||(Pt=Mt.slice(0)),Et=Object.freeze(Object.defineProperties(Mt,{raw:{value:Object.freeze(Pt)}})))),en=(0,o.iv)(At||(At=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="]))),tn=(0,o.iv)(Rt||(Rt=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 outline: 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 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"])));function nn(e){return(nn="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})(e)}function on(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function an(e,t){return(an=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sn(e,t){if(t&&("object"===nn(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)}function ln(e){return(ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cn,dn,un,hn,fn=function(e){!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}}),t&&an(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ln(a);if(s){var n=ln(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return sn(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).results=[],e.query="",e.queryInProgress=!1,e.renderHeader=!1,e.renderSearchAllFields=!1,e.displayResultImages=!1,e.errorMessage="",e.bindBookReaderListeners(),e}return t=c,i=[{key:"properties",get:function(){return{results:{type:Array},query:{type:String},queryInProgress:{type:Boolean},renderHeader:{type:Boolean},renderSearchAllFiles:{type:Boolean},displayResultImages:{type:Boolean},errorMessage:{type:String}}}},{key:"styles",get:function(){var e=(0,o.iv)(Gt||(Gt=on(["var(--searchResultText, #adaedc)"]))),t=(0,o.iv)(Xt||(Xt=on(["var(--searchResultBg, #272958)"]))),n=(0,o.iv)(Yt||(Yt=on(["var(--searchResultBorder, #adaedc)"]))),r=(0,o.iv)(Jt||(Jt=on(["(--tertiaryBGColor, #333)"]))),i=(0,o.iv)(Qt||(Qt=on(["\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 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 fieldset {\n padding: 0 0 1rem 0;\n border: none;\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 1.5rem;\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 -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 p.page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n p.search-cta {\n text-align: center;\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 ul.show-image li {\n display: grid;\n }\n\n li {\n cursor: pointer;\n grid-template-columns: 30px 1fr;\n grid-gap: 0 .5rem;\n }\n\n li img {\n display: block;\n width: 100%;\n }\n\n li h4 {\n grid-column: 2 / 3;\n padding: 0 0 2rem 0;\n margin: 0;\n font-weight: normal;\n }\n\n li p {\n grid-column: 2 / 3;\n padding: 0 0 1.5rem 0;\n margin: 0;\n font-size: 1.2rem;\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,Kt,r,en,en);return[tn,i]}}],(n=[{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}},{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(){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?(0,o.dy)(_t||(_t=on(["<p>("," result",")</p>"])),e,e>1?"s":""):r.Ld}},{key:"headerSection",get:function(){var e=(0,o.dy)($t||($t=on(["<header>\n <h3>Search inside</h3>\n ","\n </header>"])),this.resultsCount);return this.renderHeader?e:r.Ld}},{key:"searchMultipleControls",get:function(){var e=(0,o.dy)(Nt||(Nt=on(['\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.Ld}},{key:"loadingIndicator",get:function(){return(0,o.dy)(Ht||(Ht=on(['\n <div class="loading">\n <ia-activity-indicator mode="processing"></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,t=this.displayResultImages?"show-image":"";return(0,o.dy)(Ft||(Ft=on(['\n <ul class="results ','">\n ',"\n </ul>\n "])),t,this.results.map((function(t){return(0,o.dy)(Zt||(Zt=on(["\n <book-search-result\n .match=","\n @resultSelected=","\n ></book-search-result>\n "])),t,e.selectResult)})))}},{key:"searchForm",get:function(){return(0,o.dy)(Wt||(Wt=on(['\n <form action="" method="get" @submit=',">\n <fieldset>\n ",'\n <input\n type="search"\n name="query"\n alt="Search inside this book."\n @keyup=',"\n .value=","\n />\n </fieldset>\n </form>\n "])),this.performSearch,this.searchMultipleControls,this.setQuery,this.query)}},{key:"setErrorMessage",get:function(){return(0,o.dy)(qt||(qt=on(['\n <p class="error-message">',"</p>\n "])),this.errorMessage)}},{key:"searchCTA",get:function(){return(0,o.dy)(Ut||(Ut=on(['<p class="search-cta"><em>Please enter text to search for</em></p>'])))}},{key:"render",value:function(){var e=!(this.queryInProgress||this.errorMessage||this.queryInProgress||this.results.length);return(0,o.dy)(Vt||(Vt=on(["\n ","\n ",'\n <div class="results-container">\n ',"\n ","\n ","\n ","\n </div>\n "])),this.headerSection,this.searchForm,this.queryInProgress?this.loadingIndicator:r.Ld,this.errorMessage?this.setErrorMessage:r.Ld,this.results.length?this.resultsSet:r.Ld,e?this.searchCTA:r.Ld)}}])&&rn(t.prototype,n),i&&rn(t,i),c}(o.oi);function pn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-search-results",fn);var bn,yn,gn,kn,wn,Cn,xn,Sn,Bn,On,In,zn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},Dn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0;mn(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.advanceToPage=this.advanceToPage.bind(this),this.updateMenu=this.updateMenu.bind(this),this.onSearchChange=t,this.bookreader=n,this.icon=(0,o.dy)(cn||(cn=pn(['<ia-icon icon="search" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon>']))),this.label="Search inside",this.menuDetails=this.getMenuDetails(),this.id="search",this.component=this.getComponent(),this.bindEventListeners()}var t,n;return t=e,(n=[{key:"getMenuDetails",value:function(){var e=zn,t=e.resultsCount,n=e.query;if(e.queryInProgress||!n)return r.Ld;var i=1===t?"result":"results";return(0,o.dy)(dn||(dn=pn(["("," ",")"])),t,i)}},{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(){zn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu({searchCanceled:!0})}},{key:"onSearchStarted",value:function(e){var t=e.detail.props.term,n=void 0===t?"":t;zn.query=n,zn.results=[],zn.resultsCount=0,zn.queryInProgress=!0,zn.errorMessage="",this.updateMenu()}},{key:"onBookSearchInitiated",value:function(e){var t=e.detail;zn.query=t.query,this.bookreader.search(zn.query)}},{key:"onSearchRequestError",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=e.detail.props,i=void 0===r?{}:r,a=i.instance,s=void 0===a?null:a;s&&(this.bookreader=s);var l={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."},c=null!==(t=l[n])&&void 0!==t?t:l.default;zn.results=[],zn.resultsCount=0,zn.queryInProgress=!1,zn.errorMessage=(0,o.dy)(un||(un=pn(['<p class="error">',"</p>"])),c),this.updateMenu()}},{key:"onSearchResultsChange",value:function(e){var t=e.detail.props,n=void 0===t?{}:t,o=n.instance,r=void 0===o?null:o,i=n.results,a=void 0===i?[]:i;r&&(this.bookreader=r);var s=a.matches||[],l=s.length,c=a.q;zn={results:s,resultsCount:l,query:c,queryInProgress:!1,errorMessage:""},this.updateMenu()}},{key:"searchCanceledInMenu",value:function(){var e;null===(e=this.bookreader)||void 0===e||e.cancelSearchRequest()}},{key:"onSearchResultsCleared",value:function(){var e,t;zn={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu(),null===(e=this.bookreader)||void 0===e||null===(t=e.searchView)||void 0===t||t.clearSearchFieldAndResults()}},{key:"updateMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.menuDetails=this.getMenuDetails(),this.component=this.getComponent(),this.onSearchChange(this.bookreader,e)}},{key:"getComponent",value:function(){var e=zn,t=e.query,n=e.results,r=e.queryInProgress,i=e.errorMessage;return(0,o.dy)(hn||(hn=pn(["\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,r,!1,this.onSearchResultsClicked,this.onBookSearchInitiated,this.onSearchResultsCleared,this.searchCanceledInMenu)}},{key:"onSearchResultsClicked",value:function(e){var t=e.detail.match.par[0].page;this.advanceToPage(t)}},{key:"advanceToPage",value:function(e){var t=this.bookreader.leafNumToIndex(e);this.bookreader._searchPluginGoToResult(t)}}])&&vn(t.prototype,n),e}();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})(e)}function Tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function En(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function jn(e,t){return(jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e,t){if(t&&("object"===Ln(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)}function Pn(e){return(Pn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9601);var An,Rn,_n=function(e){!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}}),t&&jn(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pn(a);if(s){var n=Pn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Mn(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).downloads=[],e.expiration=0,e.renderHeader=!1,e.isBookProtected=!1,e}return t=c,i=[{key:"properties",get:function(){return{downloads:{type:Array},expiration:{type:Number},renderHeader:{type:Boolean},isBookProtected:{type:Boolean}}}},{key:"styles",get:function(){var e=(0,o.iv)(In||(In=Tn(["\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[tn,e]}}],(n=[{key:"formatsCount",get:function(){var e=this.downloads.length;return e?(0,o.dy)(bn||(bn=Tn(["<p>"," format","</p>"])),e,e>1?"s":""):(0,o.dy)(yn||(yn=Tn([""])))}},{key:"loanExpiryMessage",get:function(){return this.expiration?(0,o.dy)(gn||(gn=Tn(["<h2>These files will expire in "," days.</h2>"])),this.expiration):(0,o.dy)(kn||(kn=Tn([""])))}},{key:"renderDownloadOptions",value:function(){return this.downloads.map((function(e){return(0,o.dy)(wn||(wn=Tn(['\n <li>\n <a class="ia-button link primary" href="','">Get ',"</a>\n ","\n </li>\n "])),e.url,e.type,e.note?(0,o.dy)(Cn||(Cn=Tn(["<p>","</p>"])),e.note):(0,o.dy)(xn||(xn=Tn([""]))))}))}},{key:"header",get:function(){return this.renderHeader?(0,o.dy)(Sn||(Sn=Tn(["\n <header>\n <h3>Downloadable files</h3>\n ","\n </header>\n "])),this.formatsCount):r.Ld}},{key:"accessProtectedBook",get:function(){return(0,o.dy)(Bn||(Bn=Tn(['\n <p>To access downloaded books, you need Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.</p>\n <a class="ia-button external primary" href="https://www.adobe.com/solutions/ebook/digital-editions/download.html" rel="noopener noreferrer" target="_blank">Install Adobe Digital Editions</a>\n '])))}},{key:"render",value:function(){return(0,o.dy)(On||(On=Tn(["\n ","\n ","\n <ul>","</ul>\n ","\n "])),this.header,this.loanExpiryMessage,this.renderDownloadOptions(),this.isBookProtected?this.accessProtectedBook:r.Ld)}}])&&En(t.prototype,n),i&&En(t,i),c}(o.oi);function $n(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 o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nn(e,t);var n=Object.prototype.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)?Nn(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 Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Hn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Fn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-downloads",_n);var Zn={pdf:{type:"Encrypted Adobe PDF",url:"#",note:"PDF files contain high quality images of pages."},epub:{type:"Encrypted Adobe ePub",url:"#",note:"ePub files are smaller in size, but may contain errors."}},Wn={pdf:"PDF",epub:"ePub"},qn=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.icon=(0,o.dy)(An||(An=Hn(['<ia-icon icon="download" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon>']))),this.label="Downloadable files",this.menuDetails="",this.downloads=[],this.id="downloads",this.component="",this.isBookProtected=t,this.computeAvailableTypes=this.computeAvailableTypes.bind(this),this.update=this.update.bind(this)}var t,n;return t=e,(n=[{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]:[],n=t.reduce((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=$n(n,2),r=o[0],i=void 0===r?"":r,a=o[1],s=void 0===a?"":a,l=i.toLowerCase(),c=Zn[l]||null;if(c){var d=e.isBookProtected?Zn[l].type:Wn[l],u=Object.assign({},c,{url:s,type:d});t.push(u)}return t}),[]);this.downloads=n}},{key:"menu",get:function(){return(0,o.dy)(Rn||(Rn=Hn(["<ia-book-downloads .downloads=","></ia-book-downloads>"])),this.downloads)}}])&&Fn(t.prototype,n),e}();function Un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n(9600),n(1532);var Vn,Gn,Xn,Yn,Jn,Qn,Kn,eo=function(e,t){var n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,i=n.insertBefore((0,r.IW)(),o);n.insertBefore((0,r.IW)(),o);var a=new r.nt(e.options);return a.insertAfterNode(i),a},to=function(e,t){return e.setValue(t),e.commit(),e},no=function(e,t,n){var o=e.startNode.parentNode,i=n?n.startNode:e.endNode,a=t.endNode.nextSibling;a!==i&&(0,r.V)(o,t.startNode,a,i)},oo=function(e){(0,r.r4)(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ro=function(e,t,n){for(var o=new Map,r=t;r<=n;r++)o.set(e[r],r);return o},io=new WeakMap,ao=new WeakMap,so=(0,r.XM)((function(e,t,n){var o;return void 0===n?n=t:void 0!==t&&(o=t),function(t){if(!(t instanceof r.nt))throw new Error("repeat can only be used in text bindings");var i,a,s,l=io.get(t)||[],c=ao.get(t)||[],d=[],u=[],h=[],f=0,p=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Un(e,t);var n=Object.prototype.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)?Un(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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 i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{for(p.s();!(i=p.n()).done;){var m=i.value;h[f]=o?o(m,f):f,u[f]=n(m,f),f++}}catch(e){p.e(e)}finally{p.f()}for(var 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(c[v]===h[y])d[y]=to(l[v],u[y]),v++,y++;else if(c[b]===h[g])d[g]=to(l[b],u[g]),b--,g--;else if(c[v]===h[g])d[g]=to(l[v],u[g]),no(t,l[v],d[g+1]),v++,g--;else if(c[b]===h[y])d[y]=to(l[b],u[y]),no(t,l[b],l[v]),b--,y++;else if(void 0===a&&(a=ro(h,y,g),s=ro(c,v,b)),a.has(c[v]))if(a.has(c[b])){var k=s.get(h[y]),w=void 0!==k?l[k]:null;if(null===w){var C=eo(t,l[v]);to(C,u[y]),d[y]=C}else d[y]=to(w,u[y]),no(t,w,l[v]),l[k]=null;y++}else oo(l[b]),b--;else oo(l[v]),v++;for(;y<=g;){var x=eo(t,d[g+1]);to(x,u[y]),d[y++]=x}for(;v<=b;){var S=l[v++];null!==S&&oo(S)}io.set(t,d),ao.set(t,h)}}));class lo extends o.oi{static get styles(){return o.iv`
|
1007
|
+
`}};o([(0,r.Cb)({type:String,reflect:!0})],ln.prototype,"mode",void 0),o([(0,r.Cb)({type:Object})],ln.prototype,"customModalContent",void 0),o([(0,r.Cb)({type:Object})],ln.prototype,"hostBridge",void 0),o([(0,r.IO)("modal-template")],ln.prototype,"modalTemplate",void 0),ln=o([(0,r.Mo)("modal-manager")],ln),n(4723);var cn=b.dy`
|
1008
|
+
<svg
|
1009
|
+
viewBox="0 0 18 18"
|
1010
|
+
xmlns="http://www.w3.org/2000/svg"
|
1011
|
+
aria-labelledby="searchTitleID searchDescID"
|
1012
|
+
>
|
1013
|
+
<title id="searchTitleID">Search icon</title>
|
1014
|
+
<desc id="searchDescID">Search for something.</desc>
|
1015
|
+
<path
|
1016
|
+
class="fill-color"
|
1017
|
+
fill="none"
|
1018
|
+
d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z" />
|
1019
|
+
</svg>
|
1020
|
+
`;class dn extends r.oi{static get styles(){return r.iv`
|
1153
1021
|
:host {
|
1154
1022
|
width: var(--iconWidth, 'auto');
|
1155
1023
|
height: var(--iconHeight, 'auto');
|
@@ -1162,7 +1030,20 @@
|
|
1162
1030
|
.stroke-color {
|
1163
1031
|
stroke: var(--iconStrokeColor);
|
1164
1032
|
}
|
1165
|
-
`}render(){return M}}customElements.define("ia-icon-magnify-minus",lo);class co extends o.oi{static get styles(){return o.iv`
|
1033
|
+
`}render(){return cn}}customElements.define("ia-icon-search",dn),n(1249),n(8309),n(1038),n(4603),n(9714),n(5306),n(3161),n(9653),n(4129);var un,hn,pn,fn,mn=n(7552),vn=new WeakMap,bn=(0,b.XM)((function(e){return function(t){if(!(t instanceof b.nt))throw new Error("unsafeHTML can only be used in text bindings");var n=vn.get(t);if(void 0===n||!(0,mn.pt)(e)||e!==n.value||t.value!==n.fragment){var r=document.createElement("template");r.innerHTML=e;var o=document.importNode(r.content,!0);t.setValue(o),vn.set(t,{value:e,fragment:o})}}}));function yn(e){return(yn="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})(e)}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wn(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,r.key,r)}}function Sn(e,t){return(Sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e,t){if(t&&("object"===yn(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)}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var On,_n=function(e){!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}}),t&&Sn(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=xn(i);if(s){var n=xn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cn(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).matchRegex=new RegExp("{{{(.+?)}}}","g"),e}return t=l,o=[{key:"properties",get:function(){return{match:{type:Object}}}}],(n=[{key:"createRenderRoot",value:function(){return this}},{key:"highlightedHit",value:function(e){return(0,r.dy)(un||(un=kn(["\n <p>","</p>\n "])),bn(e.replace(this.matchRegex,"<mark>$1</mark>")))}},{key:"resultSelected",value:function(){this.dispatchEvent(new CustomEvent("resultSelected",{bubbles:!0,composed:!0,detail:{match:this.match}}))}},{key:"render",value:function(){var e,t,n=this.match,o=n.par,i=(e=void 0===o?[]:o,t=1,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=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gn(e,t);var n=Object.prototype.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)?gn(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.")}())[0],s=void 0===i?{}:i,a=Number.isInteger(s.page)?(0,r.dy)(hn||(hn=kn(['<p class="page-num">Page -',"-</p>"])),s.page):b.Ld,l=(0,r.dy)(pn||(pn=kn(['<img src="','" />'])),n.cover);return(0,r.dy)(fn||(fn=kn(["\n <li @click=",">\n ","\n <h4>","</h4>\n ","\n ","\n </li>\n "])),this.resultSelected,n.cover?l:b.Ld,n.title||b.Ld,a,this.highlightedHit(n.text))}}])&&wn(t.prototype,n),o&&wn(t,o),l}(r.oi);customElements.define("book-search-result",_n);var En,Bn,Pn,An,$n,zn,jn,Tn,Mn,In,Ln,Dn,Rn,Hn,Nn,Un,Fn,Vn,qn,Wn=(0,r.iv)(On||(En=["data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"],Bn||(Bn=En.slice(0)),On=Object.freeze(Object.defineProperties(En,{raw:{value:Object.freeze(Bn)}})))),Zn=(0,r.iv)(Pn||(Pn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="]))),Gn=(0,r.iv)(An||(An=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 outline: 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 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"])));function Jn(e){return(Jn="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})(e)}function Yn(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,r.key,r)}}function Qn(e,t){return(Qn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kn(e,t){if(t&&("object"===Jn(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)}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr,nr,rr,or,ir=function(e){!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}}),t&&Qn(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=er(i);if(s){var n=er(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Kn(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).results=[],e.query="",e.queryInProgress=!1,e.renderHeader=!1,e.renderSearchAllFields=!1,e.displayResultImages=!1,e.errorMessage="",e.bindBookReaderListeners(),e}return t=l,o=[{key:"properties",get:function(){return{results:{type:Array},query:{type:String},queryInProgress:{type:Boolean},renderHeader:{type:Boolean},renderSearchAllFiles:{type:Boolean},displayResultImages:{type:Boolean},errorMessage:{type:String}}}},{key:"styles",get:function(){var e=(0,r.iv)(Nn||(Nn=Yn(["var(--searchResultText, #adaedc)"]))),t=(0,r.iv)(Un||(Un=Yn(["var(--searchResultBg, #272958)"]))),n=(0,r.iv)(Fn||(Fn=Yn(["var(--searchResultBorder, #adaedc)"]))),o=(0,r.iv)(Vn||(Vn=Yn(["(--tertiaryBGColor, #333)"]))),i=(0,r.iv)(qn||(qn=Yn(["\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 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 fieldset {\n padding: 0 0 1rem 0;\n border: none;\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 1.5rem;\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 -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 p.page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n p.search-cta {\n text-align: center;\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 ul.show-image li {\n display: grid;\n }\n\n li {\n cursor: pointer;\n grid-template-columns: 30px 1fr;\n grid-gap: 0 .5rem;\n }\n\n li img {\n display: block;\n width: 100%;\n }\n\n li h4 {\n grid-column: 2 / 3;\n padding: 0 0 2rem 0;\n margin: 0;\n font-weight: normal;\n }\n\n li p {\n grid-column: 2 / 3;\n padding: 0 0 1.5rem 0;\n margin: 0;\n font-size: 1.2rem;\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,Wn,o,Zn,Zn);return[Gn,i]}}],(n=[{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}},{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(){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?(0,r.dy)($n||($n=Yn(["<p>("," result",")</p>"])),e,e>1?"s":""):b.Ld}},{key:"headerSection",get:function(){var e=(0,r.dy)(zn||(zn=Yn(["<header>\n <h3>Search inside</h3>\n ","\n </header>"])),this.resultsCount);return this.renderHeader?e:b.Ld}},{key:"searchMultipleControls",get:function(){var e=(0,r.dy)(jn||(jn=Yn(['\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:b.Ld}},{key:"loadingIndicator",get:function(){return(0,r.dy)(Tn||(Tn=Yn(['\n <div class="loading">\n <ia-activity-indicator mode="processing"></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,t=this.displayResultImages?"show-image":"";return(0,r.dy)(Mn||(Mn=Yn(['\n <ul class="results ','">\n ',"\n </ul>\n "])),t,this.results.map((function(t){return(0,r.dy)(In||(In=Yn(["\n <book-search-result\n .match=","\n @resultSelected=","\n ></book-search-result>\n "])),t,e.selectResult)})))}},{key:"searchForm",get:function(){return(0,r.dy)(Ln||(Ln=Yn(['\n <form action="" method="get" @submit=',">\n <fieldset>\n ",'\n <input\n type="search"\n name="query"\n alt="Search inside this book."\n @keyup=',"\n .value=","\n />\n </fieldset>\n </form>\n "])),this.performSearch,this.searchMultipleControls,this.setQuery,this.query)}},{key:"setErrorMessage",get:function(){return(0,r.dy)(Dn||(Dn=Yn(['\n <p class="error-message">',"</p>\n "])),this.errorMessage)}},{key:"searchCTA",get:function(){return(0,r.dy)(Rn||(Rn=Yn(['<p class="search-cta"><em>Please enter text to search for</em></p>'])))}},{key:"render",value:function(){var e=!(this.queryInProgress||this.errorMessage||this.queryInProgress||this.results.length);return(0,r.dy)(Hn||(Hn=Yn(["\n ","\n ",'\n <div class="results-container">\n ',"\n ","\n ","\n ","\n </div>\n "])),this.headerSection,this.searchForm,this.queryInProgress?this.loadingIndicator:b.Ld,this.errorMessage?this.setErrorMessage:b.Ld,this.results.length?this.resultsSet:b.Ld,e?this.searchCTA:b.Ld)}}])&&Xn(t.prototype,n),o&&Xn(t,o),l}(r.oi);function sr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ar(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,r.key,r)}}customElements.define("ia-book-search-results",ir);var lr,cr,dr,ur,hr,pr,fr,mr,vr,br,yr,gr={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},kr=function(){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.advanceToPage=this.advanceToPage.bind(this),this.updateMenu=this.updateMenu.bind(this),this.onProviderChange=n,this.bookreader=o,this.icon=(0,r.dy)(tr||(tr=sr(['<ia-icon-search style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-search>']))),this.label="Search inside",this.menuDetails=this.getMenuDetails(),this.id="search",this.component=this.getComponent(),this.bindEventListeners()}var t,n;return t=e,(n=[{key:"getMenuDetails",value:function(){var e=gr,t=e.resultsCount,n=e.query;if(e.queryInProgress||!n)return b.Ld;var o=1===t?"result":"results";return(0,r.dy)(nr||(nr=sr(["("," ",")"])),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(){gr={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu({searchCanceled:!0})}},{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),gr.query=r,gr.results=[],gr.resultsCount=0,gr.queryInProgress=!0,gr.errorMessage="",this.updateMenu()}},{key:"onBookSearchInitiated",value:function(e){var t=e.detail;gr.query=t.query,this.bookreader.search(gr.query)}},{key:"onSearchRequestError",value:function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=e.detail.props,s=void 0===i?{}:i,a=s.instance,l=void 0===a?null:a;l&&(this.bookreader=l);var c={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."},d=null!==(t=c[o])&&void 0!==t?t:c.default;gr.query=(null==l||null===(n=l.searchResults)||void 0===n?void 0:n.q)||"",gr.results=[],gr.resultsCount=0,gr.queryInProgress=!1,gr.errorMessage=(0,r.dy)(rr||(rr=sr(['<p class="error">',"</p>"])),d),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,s=void 0===i?[]:i;o&&(this.bookreader=o);var a=s.matches||[],l=a.length,c=s.q;gr={results:a,resultsCount:l,query:c,queryInProgress:!1,errorMessage:""},this.updateMenu()}},{key:"searchCanceledInMenu",value:function(){var e;null===(e=this.bookreader)||void 0===e||e.cancelSearchRequest()}},{key:"onSearchResultsCleared",value:function(){var e,t;gr={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu(),null===(e=this.bookreader)||void 0===e||null===(t=e.searchView)||void 0===t||t.clearSearchFieldAndResults()}},{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=gr,t=e.query,n=e.results,o=e.queryInProgress,i=e.errorMessage;return(0,r.dy)(or||(or=sr(["\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.match.par[0].page;this.advanceToPage(t)}},{key:"advanceToPage",value:function(e){var t=this.bookreader.leafNumToIndex(e);this.bookreader._searchPluginGoToResult(t)}}])&&ar(t.prototype,n),e}(),wr=(n(9601),b.dy`
|
1034
|
+
<svg
|
1035
|
+
viewBox="0 0 24 24"
|
1036
|
+
xmlns="http://www.w3.org/2000/svg"
|
1037
|
+
aria-labelledby="downloadTitleID downloadDescID"
|
1038
|
+
>
|
1039
|
+
<title id="downloadTitleID">Download icon</title>
|
1040
|
+
<desc id="downloadDescID">An arrow pointing downward at an empty document tray</desc>
|
1041
|
+
<g class="fill-color" fill-rule="nonzero">
|
1042
|
+
<path d="m1.04347826 22c-.57629713 0-1.04347826.4477153-1.04347826 1s.46718113 1 1.04347826 1h21.91304344c.5762972 0 1.0434783-.4477153 1.0434783-1s-.4671811-1-1.0434783-1z"/>
|
1043
|
+
<path d="m12 0c-.8284271 0-1.5.67526574-1.5 1.50824823v8.0007855h-4.75l6.25 10.49096627 6.25-10.49096627h-4.75v-8.0007855c0-.83298249-.6715729-1.50824823-1.5-1.50824823z"/>
|
1044
|
+
</g>
|
1045
|
+
</svg>
|
1046
|
+
`);class Sr extends r.oi{static get styles(){return r.iv`
|
1166
1047
|
:host {
|
1167
1048
|
width: var(--iconWidth, 'auto');
|
1168
1049
|
height: var(--iconHeight, 'auto');
|
@@ -1175,7 +1056,17 @@
|
|
1175
1056
|
.stroke-color {
|
1176
1057
|
stroke: var(--iconStrokeColor);
|
1177
1058
|
}
|
1178
|
-
`}render(){return P}}function uo(e){return(uo="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})(e)}function ho(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fo(e){return function(e){if(Array.isArray(e))return po(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 po(e,t);var n=Object.prototype.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)?po(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 po(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function mo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bo(e,t){if(t&&("object"===uo(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)}function yo(e){return(yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-magnify-plus",co);var go,ko,wo=function(e){return"visualAdjustment".concat(e)},Co={optionChange:wo("OptionChanged"),zoomIn:wo("ZoomIn"),zoomOut:wo("ZoomOut")},xo=function(e){!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}}),t&&vo(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yo(a);if(s){var n=yo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return bo(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).activeCount=0,e.options=[],e.renderHeader=!1,e.showZoomControls=!0,e}return t=c,i=[{key:"properties",get:function(){return{activeCount:{type:Number},options:{type:Array},renderHeader:{type:Boolean},showZoomControls:{type:Boolean}}}},{key:"styles",get:function(){return(0,o.iv)(Kn||(Kn=ho(['\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\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 ul {\n padding: 1rem 2rem 0 0;\n list-style: none;\n margin-top: 0;\n }\n\n [type="checkbox"] {\n display: none;\n }\n\n label {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n font-size: 1.4rem;\n font-weight: bold;\n line-height: 150%;\n vertical-align: middle;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n :checked + .icon {\n background-image: url(\'',"');\n }\n\n .range {\n display: none;\n padding-top: .5rem;\n }\n .range.visible {\n display: flex;\n }\n\n .range p {\n margin-left: 1rem;\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 border-radius: 0;\n background: transparent;\n outline: none;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n }\n\n button * {\n display: inline-block;\n }"])),Kt)}}],(n=[{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(fo(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(Co.optionChange,{bubbles:!0,composed:!0,detail:t}))}},{key:"emitZoomIn",value:function(){this.dispatchEvent(new CustomEvent(Co.zoomIn))}},{key:"emitZoomOut",value:function(){this.dispatchEvent(new CustomEvent(Co.zoomOut))}},{key:"changeActiveStateFor",value:function(e){var t=fo(this.options),n=t.find((function(t){return t.id===e}));n.active=!n.active,this.options=t,this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent(n.id)}},{key:"setRangeValue",value:function(e,t){var n=fo(this.options);n.find((function(t){return t.id===e})).value=t,this.options=fo(n)}},{key:"rangeSlider",value:function(e){var t=this;return(0,o.dy)(Vn||(Vn=ho(["\n <div class=",'>\n <input\n type="range"\n name="','_range"\n min=',"\n max=","\n step=","\n .value=","\n @input=","\n @change=","\n />\n <p>","%</p>\n </div>\n "])),"range".concat(e.active?" visible":""),e.id,e.min||0,e.max||100,e.step||1,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,n="adjustment_".concat(e.id);return(0,o.dy)(Gn||(Gn=ho(['<li>\n <label for="','">\n <span class="name">','</span>\n <input\n type="checkbox"\n name="','"\n id="','"\n @change=',"\n ?checked=",'\n />\n <span class="icon"></span>\n </label>\n ',"\n </li>"])),n,e.name,n,n,(function(){return t.changeActiveStateFor(e.id)}),e.active,void 0!==e.value?this.rangeSlider(e):r.Ld)}},{key:"headerSection",get:function(){var e=this.activeCount?(0,o.dy)(Xn||(Xn=ho(["<p>("," active)</p>"])),this.activeCount):r.Ld,t=(0,o.dy)(Yn||(Yn=ho(["<header>\n <h3>Visual adjustments</h3>\n ","\n </header>"])),e);return this.renderHeader?t:r.Ld}},{key:"zoomControls",get:function(){return(0,o.dy)(Jn||(Jn=ho(['\n <h4>Zoom</h4>\n <button class="zoom_out" @click=',' title="zoom out">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class="zoom_in" @click=',' title="zoom in">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n '])),this.emitZoomOut,this.emitZoomIn)}},{key:"render",value:function(){return(0,o.dy)(Qn||(Qn=ho(["\n ","\n <ul>\n ","\n </ul>\n ","\n "])),this.headerSection,so(this.options,(function(e){return e.id}),this.adjustmentCheckbox.bind(this)),this.showZoomControls?this.zoomControls:r.Ld)}}])&&mo(t.prototype,n),i&&mo(t,i),c}(o.oi);function So(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Bo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-visual-adjustments",xo);var Io,zo,Do=[{id:"brightness",name:"Adjust brightness",active:!1,min:0,max:150,step:1,value:100},{id:"contrast",name:"Adjust contrast",active:!1,min:0,max:150,step:1,value:100},{id:"invert",name:"Inverted colors (dark mode)",active:!1},{id:"grayscale",name:"Grayscale",active:!1}],Lo=function(){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.onOptionChange,r=void 0===n?function(){}:n,i=t.bookContainerSelector,a=t.bookreader;this.onOptionChange=r,this.bookContainerSelector=i,this.bookreader=a,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,o.dy)(go||(go=Bo(['<ia-icon icon="visualAdjustment" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon>']))),this.label="Visual Adjustments",this.menuDetails=this.updateOptionsCount(),this.id="adjustment",this.component=(0,o.dy)(ko||(ko=Bo(["\n <ia-book-visual-adjustments\n .options=","\n @visualAdjustmentOptionChanged=","\n @visualAdjustmentZoomIn=","\n @visualAdjustmentZoomOut=","\n ></ia-book-visual-adjustments>\n "])),Do,this.onAdjustmentChange,this.onZoomIn,this.onZoomOut)}var t,n;return t=e,(n=[{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%)"}},o=t.options.reduce((function(e,t){var o,r="".concat(t.active?n[t.id](t.value):"");return r?[].concat(function(e){if(Array.isArray(e))return So(e)}(o=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return So(e,t);var n=Object.prototype.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)?So(e,t):void 0}}(o)||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.")}(),[r]):e}),[]).join(" ");document.querySelector(this.bookContainerSelector).style.setProperty("filter",o),this.optionUpdateComplete(e)}},{key:"optionUpdateComplete",value:function(e){this.activeCount=e.detail.activeCount,this.updateOptionsCount(e),this.onOptionChange(e)}},{key:"updateOptionsCount",value:function(){this.menuDetails="(".concat(this.activeCount," active)")}}])&&Oo(t.prototype,n),e}();function To(e){return(To="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})(e)}function Eo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function jo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Po(e,t){return(Po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ao(e,t){if(t&&("object"===To(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)}function Ro(e){return(Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _o,$o,No=function(e){!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}}),t&&Po(e,t)}(l,e);var t,n,r,i,a,s=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ro(i);if(a){var n=Ro(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ao(this,e)});function l(){return jo(this,l),s.apply(this,arguments)}return t=l,r=[{key:"styles",get:function(){return(0,o.iv)(zo||(zo=Eo(['\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}}}}],(n=[{key:"render",value:function(){var e=this;return(0,o.dy)(Io||(Io=Eo(['\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()}))}}])&&Mo(t.prototype,n),r&&Mo(t,r),l}(o.oi);function Ho(e){return(Ho="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})(e)}function Fo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Zo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Wo(e,t){return(Wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qo(e,t){if(t&&("object"===Ho(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)}function Uo(e){return(Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("delete-modal-actions",No);var Vo,Go=function(e){!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}}),t&&Wo(e,t)}(l,e);var t,n,r,i,a,s=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Uo(i);if(a){var n=Uo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return qo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=s.call(this)).state="hollow",e}return t=l,r=[{key:"styles",get:function(){return(0,o.iv)($o||($o=Fo(["\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('/images/bookreader/bookmark-add.png'), 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}}}}],(n=[{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,o.dy)(_o||(_o=Fo(["\n <button title="," @click="," class=",">\n <icon-bookmark state=","></icon-bookmark>\n </button>\n "])),this.title,this.handleClick,e,this.state)}}])&&Zo(t.prototype,n),r&&Zo(t,r),l}(o.oi);function Xo(e){return(Xo="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})(e)}function Yo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Jo(e,t){return(Jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qo(e,t){if(t&&("object"===Xo(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)}function Ko(e){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmark-button",Go),n(5003),n(9337),n(6699),n(2023);var er,tr,nr,or,rr,ir,ar,sr,lr=function(e){!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}}),t&&Jo(e,t)}(l,e);var t,n,r,i,a,s=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ko(i);if(a){var n=Ko(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=s.call(this)).url="https://archive.org/account/login",e}return t=l,r=[{key:"properties",get:function(){return{url:{type:String}}}},{key:"styles",get:function(){return tn}}],(n=[{key:"render",value:function(){return(0,o.dy)(Vo||(Vo=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)}}])&&Yo(t.prototype,n),r&&Yo(t,r),l}(o.oi);function cr(e){return(cr="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})(e)}function dr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){fr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function mr(e,t){return(mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vr(e,t){if(t&&("object"===cr(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)}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmarks-login",lr);var yr,gr={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})})}},kr=function(e){!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}}),t&&mr(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=br(a);if(s){var n=br(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vr(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).bookmarks=[],e.bookreader={},e.editedBookmark={},e.options={},e.displayMode="bookmarks",e.bookmarkColors=[{id:0,className:"red"},{id:1,className:"blue"},{id:2,className:"green"}],e.defaultColor=e.bookmarkColors[0],e.api=gr,e}return t=c,i=[{key:"properties",get:function(){return{activeBookmarkID:{type:String},bookmarks:{type:Array},bookreader:{type:Object},options:{type:Object},displayMode:{type:String},editedBookmark:{type:Object}}}},{key:"styles",get:function(){var e=(0,o.iv)(sr||(sr=dr(["\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[tn,e]}},{key:"formatPage",value:function(e){return isNaN(+e)?"(".concat(e.replace(/\D/g,""),")"):e}}],(n=[{key:"updated",value:function(){this.emitBookmarksChanged()}},{key:"setup",value:function(){var e=this;this.api.identifier=this.bookreader.bookId,"login"!==this.displayMode&&this.fetchBookmarks().then((function(){return e.initializeBookmarks()})).catch((function(t){return e.displayMode="login"}))}},{key:"initializeBookmarks",value:function(){var e=this;this.displayMode="bookmarks",["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.bookreader.mode===e.bookreader.constModeThumb&&e.renderBookmarkButtons()}))})),this.renderBookmarkButtons(),this.markActiveBookmark(!0),this.emitBookmarksChanged()}},{key:"formatBookmark",value:function(e){var t=e.leafNum,n=void 0===t?"":t,o=e.notes,r=void 0===o?{}:o,i=r.note,a=void 0===i?"":i,s=r.color,l={note:a,color:this.getBookmarkColor(s)?s:this.defaultColor.id},d=c.formatPage(this.bookreader.getPageNum(n)),u=this.bookreader.getPageURI("".concat(n).replace(/\D/g,""),32);return hr(hr({},l),{},{id:n,leafNum:n,page:d,thumbnail:u})}},{key:"fetchBookmarks",value:function(){var e=this;return this.api.getAll().then((function(e){return e.json()})).then((function(t){var n=t.success,o=t.error,r=void 0===o?"Something happened while fetching bookmarks.":o,i=t.value,a=void 0===i?[]:i;if(!n)throw new Error("Failed to load bookmarks: ".concat(r));var s={};return Object.keys(a).forEach((function(t){var n=a[t],o=parseInt(t,10),r=e.formatBookmark(hr(hr({},n),{},{leafNum:o}));s[t]=r})),e.bookmarks=s,s}))}},{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 i=+t.classList.value.match(/pagediv\d+/)[0].replace(/\D/g,""),a=e.getBookmark(i),s=a?"filled":"hollow";if(e.bookreader._models.book.getPage(i).isViewable){var l=document.createElement("div");["mousedown","mouseup"].forEach((function(e){l.addEventListener(e,(function(e){return e.stopPropagation()}))})),l.classList.add("bookmark-button",s),a&&l.classList.add(e.getBookmarkColor(a.color));var c="L"===t.getAttribute("data-side")&&e.bookreader.mode===e.bookreader.constMode2up?"left":"right";(0,r.sY)((0,o.dy)(er||(er=dr(["\n <bookmark-button\n @bookmarkButtonClicked=","\n state=","\n side=","\n ></bookmark-button>"])),(function(){return e.bookmarkButtonClicked(i)}),s,c),l),t.appendChild(l)}}))}},{key:"markActiveBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.bookreader,n=t.mode,o=t.constMode2up,r=t.constModeThumb,i=this.bookreader.currentIndex();if(n!==r){if(n===o){var a=this.bookreader.displayedIndices,s=a.includes(+this.activeBookmarkID);if(s)return}this.bookmarks[i]?this.activeBookmarkID=i:this.activeBookmarkID=""}else{var l=this.bookmarks[i];e&&l&&(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.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.emitShowModal(e):this.deleteBookmark({detail:{id:"".concat(e)}})}},{key:"emitShowModal",value:function(e){var t=this;this.dispatchEvent(new CustomEvent("showItemNavigatorModal",{bubbles:!0,composed:!0,detail:{customModalContent:(0,o.dy)(tr||(tr=dr(["\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.emitCloseModal()}),e)}}))}},{key:"emitCloseModal",value:function(){this.dispatchEvent(new CustomEvent("closeItemNavigatorModal",{bubbles:!0,composed:!0}))}},{key:"deleteBookmark",value:function(e){var t=e.detail,n=t.id,o=this.bookmarks;delete o[n],this.bookmarks=hr({},o),this.api.delete(t.id),this.editedBookmark={},this.emitCloseModal(),this.renderBookmarkButtons()}},{key:"loginClick",value:function(){var e=this.options.loginClicked;(void 0===e?function(){}:e)()}},{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,o.dy)(nr||(nr=dr(['\n <button\n class="ia-button primary"\n tabindex="-1"\n ?disabled=',"\n @click=",">\n Add bookmark\n </button>\n "])),this.shouldEnableAddBookmarkButton,this.addBookmark)}},{key:"bookmarksList",get:function(){return(0,o.dy)(or||(or=dr(["\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,hr({},this.bookmarks),this.activeBookmarkID,this.bookmarkColors,this.defaultColor)}},{key:"render",value:function(){var e=this.options.loginUrl,t=(0,o.dy)(rr||(rr=dr(["\n ","\n ","\n "])),this.bookmarksList,this.allowAddingBookmark?this.addBookmarkButton:r.Ld);return(0,o.dy)(ir||(ir=dr(['\n <section class="bookmarks">\n ',"\n </section>\n "])),"login"===this.displayMode?(0,o.dy)(ar||(ar=dr(["<bookmarks-login @click="," .url=","></bookmarks-login>"])),this.loginClick,e):t)}}])&&pr(t.prototype,n),i&&pr(t,i),c}(o.oi);customElements.define("ia-bookmarks",kr);var wr,Cr,xr,Sr,Br,Or=(0,o.iv)(yr||(yr=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 Ir(e){return(Ir="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})(e)}function zr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Dr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Lr(e,t){return(Lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tr(e,t){if(t&&("object"===Ir(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)}function Er(e){return(Er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jr,Mr,Pr,Ar,Rr,_r,$r,Nr,Hr=function(e){!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}}),t&&Lr(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Er(a);if(s){var n=Er(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Tr(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).bookmark={},e.bookmarkColors=[],e.renderHeader=!1,e.showBookmark=!0,e}return t=c,i=[{key:"properties",get:function(){return{bookmark:{type:Object},bookmarkColors:{type:Array},renderHeader:{type:Boolean},showBookmark:{type:Boolean}}}},{key:"headerSection",get:function(){return(0,o.dy)(Sr||(Sr=zr(["<header>\n <h3>Edit Bookmark</h3>\n </header>"])))}},{key:"styles",get:function(){var e=(0,o.iv)(Br||(Br=zr(['\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: 2rem 0 0 0;\n border: none;\n }\n\n label {\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 ul {\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-gap: 0 2rem;\n justify-content: start;\n padding: 1rem 0 0 0;\n margin: 0 0 2rem 0;\n list-style: none;\n }\n\n li input {\n display: none;\n }\n\n li 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 li input:checked + label {\n border-color: var(--primaryTextColor);\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 display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n '])));return[tn,Or,e]}}],(n=[{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,o.dy)(wr||(wr=zr(['\n <li>\n <input type="radio" name="color" id="color_','" .value='," @change="," ?checked=",'>\n <label for="color_','">\n <icon-bookmark class=',"></icon-bookmark>\n </label>\n </li>\n "])),e.id,e.id,(function(){return t.changeColorTo(e.id)}),this.bookmark.color===e.id,e.id,e.className)}},{key:"bookmarkTemplate",get:function(){return(0,o.dy)(Cr||(Cr=zr(['\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,o.dy)(xr||(xr=zr(["\n ","\n ",'\n <form action="" method="put" @submit=','>\n <fieldset>\n <label for="note">Note <small>(optional)</small></label>\n <textarea rows="4" cols="80" name="note" id="note" @change=',">",'</textarea>\n <label for="color">Bookmark color</label>\n <ul>\n ','\n </ul>\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 </fieldset>\n </form>\n '])),this.renderHeader?c.headerSection:r.Ld,this.showBookmark?this.bookmarkTemplate:r.Ld,this.emitSaveEvent,this.updateNote,this.bookmark.note,so(this.bookmarkColors,(function(e){return e.id}),this.bookmarkColor.bind(this)),this.emitDeleteEvent)}}])&&Dr(t.prototype,n),i&&Dr(t,i),c}(o.oi);customElements.define("ia-bookmark-edit",Hr),n(2707);class Fr extends o.oi{static get styles(){return o.iv`
|
1059
|
+
`}render(){return wr}}function Cr(e){return(Cr="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})(e)}function xr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Or(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,r.key,r)}}function _r(e,t){return(_r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Er(e,t){if(t&&("object"===Cr(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)}function Br(e){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-dl",Sr);var Pr,Ar,$r=function(e){!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}}),t&&_r(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Br(i);if(s){var n=Br(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Er(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).downloads=[],e.expiration=0,e.renderHeader=!1,e.isBookProtected=!1,e}return t=l,o=[{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.iv)(yr||(yr=xr(["\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[Gn,e]}}],(n=[{key:"formatsCount",get:function(){var e=this.downloads.length;return e?(0,r.dy)(lr||(lr=xr(["<p>"," format","</p>"])),e,e>1?"s":""):(0,r.dy)(cr||(cr=xr([""])))}},{key:"loanExpiryMessage",get:function(){return this.expiration?(0,r.dy)(dr||(dr=xr(["<h2>These files will expire in "," days.</h2>"])),this.expiration):(0,r.dy)(ur||(ur=xr([""])))}},{key:"renderDownloadOptions",value:function(){return this.downloads.map((function(e){return(0,r.dy)(hr||(hr=xr(['\n <li>\n <a class="ia-button link primary" href="','">Get ',"</a>\n ","\n </li>\n "])),e.url,e.type,e.note?(0,r.dy)(pr||(pr=xr(["<p>","</p>"])),e.note):(0,r.dy)(fr||(fr=xr([""]))))}))}},{key:"header",get:function(){return this.renderHeader?(0,r.dy)(mr||(mr=xr(["\n <header>\n <h3>Downloadable files</h3>\n ","\n </header>\n "])),this.formatsCount):b.Ld}},{key:"accessProtectedBook",get:function(){return(0,r.dy)(vr||(vr=xr(['\n <p>To access downloaded books, you need Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.</p>\n <a class="ia-button external primary" href="https://www.adobe.com/solutions/ebook/digital-editions/download.html" rel="noopener noreferrer" target="_blank">Install Adobe Digital Editions</a>\n '])))}},{key:"render",value:function(){return(0,r.dy)(br||(br=xr(["\n ","\n ","\n <ul>","</ul>\n ","\n "])),this.header,this.loanExpiryMessage,this.renderDownloadOptions(),this.isBookProtected?this.accessProtectedBook:b.Ld)}}])&&Or(t.prototype,n),o&&Or(t,o),l}(r.oi);function zr(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=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jr(e,t);var n=Object.prototype.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)?jr(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 jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tr(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,r.key,r)}}customElements.define("ia-book-downloads",$r);var Ir={pdf:{type:"Encrypted Adobe PDF",url:"#",note:"PDF files contain high quality images of pages."},epub:{type:"Encrypted Adobe ePub",url:"#",note:"ePub files are smaller in size, but may contain errors."}},Lr={pdf:"PDF",epub:"ePub"},Dr=function(){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.dy)(Pr||(Pr=Tr(['<ia-icon-dl 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,this.computeAvailableTypes=this.computeAvailableTypes.bind(this),this.update=this.update.bind(this)}var t,n;return t=e,(n=[{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]:[],n=t.reduce((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=zr(n,2),o=r[0],i=void 0===o?"":o,s=r[1],a=void 0===s?"":s,l=i.toLowerCase(),c=Ir[l]||null;if(c){var d=e.isBookProtected?Ir[l].type:Lr[l],u=Object.assign({},c,{url:a,type:d});t.push(u)}return t}),[]);this.downloads=n}},{key:"menu",get:function(){return(0,r.dy)(Ar||(Ar=Tr(["<ia-book-downloads .downloads=","></ia-book-downloads>"])),this.downloads)}}])&&Mr(t.prototype,n),e}(),Rr=(n(9600),b.dy`
|
1060
|
+
<svg
|
1061
|
+
viewBox="0 0 24 24"
|
1062
|
+
xmlns="http://www.w3.org/2000/svg"
|
1063
|
+
aria-labelledby="visualAdjustmentTitleID visualAdjustmentDescID"
|
1064
|
+
>
|
1065
|
+
<title id="visualAdjustmentTitleID">Visual adjustment</title>
|
1066
|
+
<desc id="visualAdjustmentDescID">A circle with its left hemisphere filled</desc>
|
1067
|
+
<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" />
|
1068
|
+
</svg>
|
1069
|
+
`);class Hr extends r.oi{static get styles(){return r.iv`
|
1179
1070
|
:host {
|
1180
1071
|
width: var(--iconWidth, 'auto');
|
1181
1072
|
height: var(--iconHeight, 'auto');
|
@@ -1188,7 +1079,82 @@
|
|
1188
1079
|
.stroke-color {
|
1189
1080
|
stroke: var(--iconStrokeColor);
|
1190
1081
|
}
|
1191
|
-
`}render(){return
|
1082
|
+
`}render(){return Rr}}function Nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}customElements.define("ia-icon-visual-adjustment",Hr),n(1532);var Ur=function(e,t){var n=e.startNode.parentNode,r=void 0===t?e.endNode:t.startNode,o=n.insertBefore((0,b.IW)(),r);n.insertBefore((0,b.IW)(),r);var i=new b.nt(e.options);return i.insertAfterNode(o),i},Fr=function(e,t){return e.setValue(t),e.commit(),e},Vr=function(e,t,n){var r=e.startNode.parentNode,o=n?n.startNode:e.endNode,i=t.endNode.nextSibling;i!==o&&(0,b.V)(r,t.startNode,i,o)},qr=function(e){(0,b.r4)(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},Wr=function(e,t,n){for(var r=new Map,o=t;o<=n;o++)r.set(e[o],o);return r},Zr=new WeakMap,Gr=new WeakMap,Jr=(0,b.XM)((function(e,t,n){var r;return void 0===n?n=t:void 0!==t&&(r=t),function(t){if(!(t instanceof b.nt))throw new Error("repeat can only be used in text bindings");var o,i,s,a=Zr.get(t)||[],l=Gr.get(t)||[],c=[],d=[],u=[],h=0,p=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Nr(e,t);var n=Object.prototype.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)?Nr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(e);try{for(p.s();!(o=p.n()).done;){var f=o.value;u[h]=r?r(f,h):h,d[h]=n(f,h),h++}}catch(e){p.e(e)}finally{p.f()}for(var m=0,v=a.length-1,y=0,g=d.length-1;m<=v&&y<=g;)if(null===a[m])m++;else if(null===a[v])v--;else if(l[m]===u[y])c[y]=Fr(a[m],d[y]),m++,y++;else if(l[v]===u[g])c[g]=Fr(a[v],d[g]),v--,g--;else if(l[m]===u[g])c[g]=Fr(a[m],d[g]),Vr(t,a[m],c[g+1]),m++,g--;else if(l[v]===u[y])c[y]=Fr(a[v],d[y]),Vr(t,a[v],a[m]),v--,y++;else if(void 0===i&&(i=Wr(u,y,g),s=Wr(l,m,v)),i.has(l[m]))if(i.has(l[v])){var k=s.get(u[y]),w=void 0!==k?a[k]:null;if(null===w){var S=Ur(t,a[m]);Fr(S,d[y]),c[y]=S}else c[y]=Fr(w,d[y]),Vr(t,w,a[m]),a[k]=null;y++}else qr(a[v]),v--;else qr(a[m]),m++;for(;y<=g;){var C=Ur(t,c[g+1]);Fr(C,d[y]),c[y++]=C}for(;m<=v;){var x=a[m++];null!==x&&qr(x)}Zr.set(t,c),Gr.set(t,u)}})),Yr=b.dy`
|
1083
|
+
<svg
|
1084
|
+
viewBox="0 0 18 18"
|
1085
|
+
xmlns="http://www.w3.org/2000/svg"
|
1086
|
+
aria-labelledby="magnify-minusTitleID magnify-minusDescID"
|
1087
|
+
>
|
1088
|
+
<title id="magnify-minusTitleID">Zoom out</title>
|
1089
|
+
<desc id="magnify-minusDescID">Take a look further.</desc>
|
1090
|
+
<g
|
1091
|
+
class="fill-color"
|
1092
|
+
fill="none"
|
1093
|
+
fill-rule="nonzero"
|
1094
|
+
>
|
1095
|
+
<path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
|
1096
|
+
<path d="m10 7.75v-1.5h-6v1.5z"/>
|
1097
|
+
</g>
|
1098
|
+
</svg>
|
1099
|
+
`;class Xr extends r.oi{static get styles(){return r.iv`
|
1100
|
+
:host {
|
1101
|
+
width: var(--iconWidth, 'auto');
|
1102
|
+
height: var(--iconHeight, 'auto');
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
.fill-color {
|
1106
|
+
fill: var(--iconFillColor);
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
.stroke-color {
|
1110
|
+
stroke: var(--iconStrokeColor);
|
1111
|
+
}
|
1112
|
+
`}render(){return Yr}}customElements.define("ia-icon-magnify-minus",Xr);var Qr,Kr,eo,to,no,ro,oo,io=b.dy`
|
1113
|
+
<svg
|
1114
|
+
viewBox="0 0 18 18"
|
1115
|
+
xmlns="http://www.w3.org/2000/svg"
|
1116
|
+
aria-labelledby="magnify-plusTitleID magnify-plusDescID"
|
1117
|
+
>
|
1118
|
+
<title id="magnify-plusTitleID">Zoom in</title>
|
1119
|
+
<desc id="magnify-plusDescID">Take a look closer.</desc>
|
1120
|
+
<g
|
1121
|
+
class="fill-color"
|
1122
|
+
fill="none"
|
1123
|
+
fill-rule="nonzero"
|
1124
|
+
>
|
1125
|
+
<path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
|
1126
|
+
<path d="m7.75 4v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z"/>
|
1127
|
+
</g>
|
1128
|
+
</svg>
|
1129
|
+
`;class so extends r.oi{static get styles(){return r.iv`
|
1130
|
+
:host {
|
1131
|
+
width: var(--iconWidth, 'auto');
|
1132
|
+
height: var(--iconHeight, 'auto');
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
.fill-color {
|
1136
|
+
fill: var(--iconFillColor);
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
.stroke-color {
|
1140
|
+
stroke: var(--iconStrokeColor);
|
1141
|
+
}
|
1142
|
+
`}render(){return io}}function ao(e){return(ao="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})(e)}function lo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function co(e){return function(e){if(Array.isArray(e))return uo(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 uo(e,t);var n=Object.prototype.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)?uo(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 uo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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,r.key,r)}}function po(e,t){return(po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fo(e,t){if(t&&("object"===ao(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)}function mo(e){return(mo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-magnify-plus",so);var vo,bo,yo=function(e){return"visualAdjustment".concat(e)},go={optionChange:yo("OptionChanged"),zoomIn:yo("ZoomIn"),zoomOut:yo("ZoomOut")},ko=function(e){!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}}),t&&po(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=mo(i);if(s){var n=mo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return fo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).activeCount=0,e.options=[],e.renderHeader=!1,e.showZoomControls=!0,e}return t=l,o=[{key:"properties",get:function(){return{activeCount:{type:Number},options:{type:Array},renderHeader:{type:Boolean},showZoomControls:{type:Boolean}}}},{key:"styles",get:function(){return(0,r.iv)(oo||(oo=lo(['\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\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 ul {\n padding: 1rem 2rem 0 0;\n list-style: none;\n margin-top: 0;\n }\n\n [type="checkbox"] {\n display: none;\n }\n\n label {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n font-size: 1.4rem;\n font-weight: bold;\n line-height: 150%;\n vertical-align: middle;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n :checked + .icon {\n background-image: url(\'',"');\n }\n\n .range {\n display: none;\n padding-top: .5rem;\n }\n .range.visible {\n display: flex;\n }\n\n .range p {\n margin-left: 1rem;\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 border-radius: 0;\n background: transparent;\n outline: none;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n }\n\n button * {\n display: inline-block;\n }"])),Wn)}}],(n=[{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(co(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(go.optionChange,{bubbles:!0,composed:!0,detail:t}))}},{key:"emitZoomIn",value:function(){this.dispatchEvent(new CustomEvent(go.zoomIn))}},{key:"emitZoomOut",value:function(){this.dispatchEvent(new CustomEvent(go.zoomOut))}},{key:"changeActiveStateFor",value:function(e){var t=co(this.options),n=t.find((function(t){return t.id===e}));n.active=!n.active,this.options=t,this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent(n.id)}},{key:"setRangeValue",value:function(e,t){var n=co(this.options);n.find((function(t){return t.id===e})).value=t,this.options=co(n)}},{key:"rangeSlider",value:function(e){var t=this;return(0,r.dy)(Qr||(Qr=lo(["\n <div class=",'>\n <input\n type="range"\n name="','_range"\n min=',"\n max=","\n step=","\n .value=","\n @input=","\n @change=","\n />\n <p>","%</p>\n </div>\n "])),"range".concat(e.active?" visible":""),e.id,e.min||0,e.max||100,e.step||1,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,n="adjustment_".concat(e.id);return(0,r.dy)(Kr||(Kr=lo(['<li>\n <label for="','">\n <span class="name">','</span>\n <input\n type="checkbox"\n name="','"\n id="','"\n @change=',"\n ?checked=",'\n />\n <span class="icon"></span>\n </label>\n ',"\n </li>"])),n,e.name,n,n,(function(){return t.changeActiveStateFor(e.id)}),e.active,void 0!==e.value?this.rangeSlider(e):b.Ld)}},{key:"headerSection",get:function(){var e=this.activeCount?(0,r.dy)(eo||(eo=lo(["<p>("," active)</p>"])),this.activeCount):b.Ld,t=(0,r.dy)(to||(to=lo(["<header>\n <h3>Visual adjustments</h3>\n ","\n </header>"])),e);return this.renderHeader?t:b.Ld}},{key:"zoomControls",get:function(){return(0,r.dy)(no||(no=lo(['\n <h4>Zoom</h4>\n <button class="zoom_out" @click=',' title="zoom out">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class="zoom_in" @click=',' title="zoom in">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n '])),this.emitZoomOut,this.emitZoomIn)}},{key:"render",value:function(){return(0,r.dy)(ro||(ro=lo(["\n ","\n <ul>\n ","\n </ul>\n ","\n "])),this.headerSection,Jr(this.options,(function(e){return e.id}),this.adjustmentCheckbox.bind(this)),this.showZoomControls?this.zoomControls:b.Ld)}}])&&ho(t.prototype,n),o&&ho(t,o),l}(r.oi);function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function So(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Co(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,r.key,r)}}customElements.define("ia-book-visual-adjustments",ko);var xo,Oo,_o=[{id:"brightness",name:"Adjust brightness",active:!1,min:0,max:150,step:1,value:100},{id:"contrast",name:"Adjust contrast",active:!1,min:0,max:150,step:1,value:100},{id:"invert",name:"Inverted colors (dark mode)",active:!1},{id:"grayscale",name:"Grayscale",active:!1}],Eo=function(){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.onProviderChange,o=t.bookreader;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.dy)(vo||(vo=So(['<ia-icon-visual-adjustment style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-visual-adjustment>']))),this.label="Visual Adjustments",this.menuDetails=this.updateOptionsCount(),this.id="adjustment",this.component=(0,r.dy)(bo||(bo=So(["\n <ia-book-visual-adjustments\n .options=","\n @visualAdjustmentOptionChanged=","\n @visualAdjustmentZoomIn=","\n @visualAdjustmentZoomOut=","\n ></ia-book-visual-adjustments>\n "])),_o,this.onAdjustmentChange,this.onZoomIn,this.onZoomOut)}var t,n;return t=e,(n=[{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,o="".concat(t.active?n[t.id](t.value):"");return o?[].concat(function(e){if(Array.isArray(e))return wo(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return wo(e,t);var n=Object.prototype.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)?wo(e,t):void 0}}(r)||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.")}(),[o]):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)")}}])&&Co(t.prototype,n),e}();function Bo(e){return(Bo="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})(e)}function Po(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ao(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $o(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,r.key,r)}}function zo(e,t){return(zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jo(e,t){if(t&&("object"===Bo(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)}function To(e){return(To=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mo,Io,Lo=function(e){!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}}),t&&zo(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=To(i);if(s){var n=To(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jo(this,e)});function l(){return Ao(this,l),a.apply(this,arguments)}return t=l,o=[{key:"styles",get:function(){return(0,r.iv)(Oo||(Oo=Po(['\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}}}}],(n=[{key:"render",value:function(){var e=this;return(0,r.dy)(xo||(xo=Po(['\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()}))}}])&&$o(t.prototype,n),o&&$o(t,o),l}(r.oi);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})(e)}function Ro(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}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,r.key,r)}}function No(e,t){return(No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uo(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)}function Fo(e){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("delete-modal-actions",Lo);var Vo,qo=function(e){!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}}),t&&No(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fo(i);if(s){var n=Fo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Uo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).state="hollow",e.side=void 0,e}return t=l,o=[{key:"styles",get:function(){return(0,r.iv)(Io||(Io=Ro(["\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}}}}],(n=[{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.dy)(Mo||(Mo=Ro(["\n <button title="," @click="," class=",">\n <icon-bookmark state=","></icon-bookmark>\n </button>\n "])),this.title,this.handleClick,e,this.state)}}])&&Ho(t.prototype,n),o&&Ho(t,o),l}(r.oi);function Wo(e){return(Wo="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})(e)}function Zo(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,r.key,r)}}function Go(e,t){return(Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jo(e,t){if(t&&("object"===Wo(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)}function Yo(e){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmark-button",qo),n(8674),n(6699),n(2023);var Xo,Qo,Ko,ei,ti,ni,ri,oi,ii,si=function(e){!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}}),t&&Go(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Yo(i);if(s){var n=Yo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Jo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).url="https://archive.org/account/login",e}return t=l,o=[{key:"properties",get:function(){return{url:{type:String}}}},{key:"styles",get:function(){return Gn}}],(n=[{key:"render",value:function(){return(0,r.dy)(Vo||(Vo=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)}}])&&Zo(t.prototype,n),o&&Zo(t,o),l}(r.oi);function ai(e){return(ai="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})(e)}function li(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ci(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 di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){ui(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(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,r.key,r)}}function pi(e,t){return(pi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fi(e,t){if(t&&("object"===ai(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)}function mi(e){return(mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmarks-login",si);var vi,bi={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})})}},yi=function(e){!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}}),t&&pi(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=mi(i);if(s){var n=mi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return fi(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).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=bi,e.deleteModalConfig=new Qt({title:"Delete Bookmark",headline:"This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?",headerColor:"#194880"}),e}return t=l,o=[{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.iv)(ii||(ii=li(["\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[Gn,e]}},{key:"formatPage",value:function(e){return isNaN(+e)?"(".concat(e.replace(/\D/g,""),")"):e}}],(n=[{key:"updated",value:function(e){e.has("displayMode")&&this.updateDisplay(),this.emitBookmarksChanged()}},{key:"setup",value:function(){this.api.identifier=this.bookreader.bookId,"login"!==this.displayMode&&(this.setBREventListeners(),this.initializeBookmarks())}},{key:"updateDisplay",value:function(){"bookmarks"===this.displayMode&&this.fetchUserBookmarks()}},{key:"fetchUserBookmarks",value:function(){var e=this;this.fetchBookmarks().then((function(){e.initializeBookmarks()}))}},{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 t=e.leafNum,n=void 0===t?"":t,r=e.notes,o=void 0===r?{}:r,i=o.note,s=void 0===i?"":i,a=o.color,c={note:s,color:this.getBookmarkColor(a)?a:this.defaultColor.id},d=l.formatPage(this.bookreader.getPageNum(n)),u=this.bookreader.getPageURI("".concat(n).replace(/\D/g,""),32);return di(di({},c),{},{id:n,leafNum:n,page:d,thumbnail:u})}},{key:"fetchBookmarks",value:function(){var e=this;return this.api.getAll().then((function(e){var t;try{t=JSON.parse(e)}catch(e){t={error:e.message}}return t})).then((function(t){var n,r=t.success,o=t.error,i=void 0===o?"Something happened while fetching bookmarks.":o,s=t.value,a=void 0===s?[]:s;r||null===(n=console)||void 0===n||n.warn("Error fetching bookmarks",i);var l={};return Object.keys(a).forEach((function(t){var n=a[t],r=parseInt(t,10),o=e.formatBookmark(di(di({},n),{},{leafNum:r}));l[t]=o})),e.bookmarks=l,l}))}},{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),s=i?"filled":"hollow";if(e.bookreader._models.book.getPage(o).isViewable){var a=document.createElement("div");["mousedown","mouseup"].forEach((function(e){a.addEventListener(e,(function(e){return e.stopPropagation()}))})),a.classList.add("bookmark-button",s),i&&a.classList.add(e.getBookmarkColor(i.color));var l="L"===t.getAttribute("data-side")&&e.bookreader.mode===e.bookreader.constMode2up?"left":"right";(0,b.sY)((0,r.dy)(Xo||(Xo=li(["\n <bookmark-button\n @bookmarkButtonClicked=","\n state=","\n side=","\n ></bookmark-button>"])),(function(){return e.bookmarkButtonClicked(o)}),s,l),a),t.appendChild(a)}}))}},{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){var s=this.bookreader.displayedIndices,a=s.includes(+this.activeBookmarkID);if(a)return}this.bookmarks[i]?this.activeBookmarkID=i:this.activeBookmarkID=""}else{var l=this.bookmarks[i];e&&l&&(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.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.dy)(Qo||(Qo=li(["\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=di({},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.dy)(Ko||(Ko=li(['\n <button\n class="ia-button primary"\n tabindex="-1"\n ?disabled=',"\n @click=",">\n Add bookmark\n </button>\n "])),this.shouldEnableAddBookmarkButton,this.addBookmark)}},{key:"bookmarksList",get:function(){return(0,r.dy)(ei||(ei=li(["\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,di({},this.bookmarks),this.activeBookmarkID,this.bookmarkColors,this.defaultColor)}},{key:"bookmarkHelperMessage",get:function(){return(0,r.dy)(ti||(ti=li(["<p>Please use 1up or 2up view modes to add bookmark.</p>"])))}},{key:"render",value:function(){var e=this,t=(0,r.dy)(ni||(ni=li(["\n ","\n ","\n "])),this.bookmarksList,this.allowAddingBookmark?this.addBookmarkButton:this.bookmarkHelperMessage);return(0,r.dy)(ri||(ri=li(['\n <section class="bookmarks">\n ',"\n </section>\n "])),"login"===this.displayMode?(0,r.dy)(oi||(oi=li(["<bookmarks-login\n @click=","\n .url=","></bookmarks-login>"])),(function(){return e.loginOptions.loginClicked()}),this.loginOptions.loginUrl):t)}}])&&hi(t.prototype,n),o&&hi(t,o),l}(r.oi);customElements.define("ia-bookmarks",yi);var gi,ki,wi,Si,Ci,xi=(0,r.iv)(vi||(vi=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 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})(e)}function _i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ei(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,r.key,r)}}function Bi(e,t){return(Bi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pi(e,t){if(t&&("object"===Oi(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)}function Ai(e){return(Ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $i=function(e){!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}}),t&&Bi(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ai(i);if(s){var n=Ai(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Pi(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).bookmark={},e.bookmarkColors=[],e.renderHeader=!1,e.showBookmark=!0,e}return t=l,o=[{key:"properties",get:function(){return{bookmark:{type:Object},bookmarkColors:{type:Array},renderHeader:{type:Boolean},showBookmark:{type:Boolean}}}},{key:"headerSection",get:function(){return(0,r.dy)(Si||(Si=_i(["<header>\n <h3>Edit Bookmark</h3>\n </header>"])))}},{key:"styles",get:function(){var e=(0,r.iv)(Ci||(Ci=_i(['\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: 2rem 0 0 0;\n border: none;\n }\n\n label {\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 ul {\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-gap: 0 2rem;\n justify-content: start;\n padding: 1rem 0 0 0;\n margin: 0 0 2rem 0;\n list-style: none;\n }\n\n li input {\n display: none;\n }\n\n li 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 li input:checked + label {\n border-color: var(--primaryTextColor);\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 display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n '])));return[Gn,xi,e]}}],(n=[{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.dy)(gi||(gi=_i(['\n <li>\n <input type="radio" name="color" id="color_','" .value='," @change="," ?checked=",'>\n <label for="color_','">\n <icon-bookmark class=',"></icon-bookmark>\n </label>\n </li>\n "])),e.id,e.id,(function(){return t.changeColorTo(e.id)}),this.bookmark.color===e.id,e.id,e.className)}},{key:"bookmarkTemplate",get:function(){return(0,r.dy)(ki||(ki=_i(['\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.dy)(wi||(wi=_i(["\n ","\n ",'\n <form action="" method="put" @submit=','>\n <fieldset>\n <label for="note">Note <small>(optional)</small></label>\n <textarea rows="4" cols="80" name="note" id="note" @change=',">",'</textarea>\n <label for="color">Bookmark color</label>\n <ul>\n ','\n </ul>\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 </fieldset>\n </form>\n '])),this.renderHeader?l.headerSection:b.Ld,this.showBookmark?this.bookmarkTemplate:b.Ld,this.emitSaveEvent,this.updateNote,this.bookmark.note,Jr(this.bookmarkColors,(function(e){return e.id}),this.bookmarkColor.bind(this)),this.emitDeleteEvent)}}])&&Ei(t.prototype,n),o&&Ei(t,o),l}(r.oi);customElements.define("ia-bookmark-edit",$i),n(2707);var zi,ji,Ti,Mi,Ii,Li,Di,Ri,Hi=b.dy`
|
1143
|
+
<svg height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg" aria-labelledby="editPencilTitleID editPencilDescID"><title id="editPencilTitleID">Pencil icon</title><desc id="editPencilDescID">An illustration of a pencil, used to represent an edit action</desc><path class="fill-color" 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" fill-rule="evenodd"/></svg>
|
1144
|
+
`;class Ni extends r.oi{static get styles(){return r.iv`
|
1145
|
+
:host {
|
1146
|
+
width: var(--iconWidth, 'auto');
|
1147
|
+
height: var(--iconHeight, 'auto');
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
.fill-color {
|
1151
|
+
fill: var(--iconFillColor);
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
.stroke-color {
|
1155
|
+
stroke: var(--iconStrokeColor);
|
1156
|
+
}
|
1157
|
+
`}render(){return Hi}}function Ui(e){return(Ui="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})(e)}function Fi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vi(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,r.key,r)}}function qi(e,t){return(qi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wi(e,t){if(t&&("object"===Ui(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)}function Zi(e){return(Zi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-edit-pencil",Ni);var Gi,Ji=function(e){!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}}),t&&qi(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Zi(i);if(s){var n=Zi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Wi(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).activeBookmarkID=void 0,e.bookmarkColors=[],e.defaultBookmarkColor={},e.bookmarks={},e.editedBookmark={},e.renderHeader=!1,e}return t=l,o=[{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.iv)(Ri||(Ri=Fi(["\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 h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n h4 * {\n display: inline-block;\n }\n h4 icon-bookmark {\n vertical-align: bottom;\n }\n h4 span {\n vertical-align: top;\n padding-top: 1%;\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 cursor: pointer;\n outline: none;\n position: relative;\n }\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n li button.edit {\n padding: 5px 2px 0 0;\n background: transparent;\n cursor: pointer;\n height: 40px;\n width: 40px;\n position: absolute;\n right: 2px;\n top: 2px;\n text-align: right;\n -webkit-appearance: none;\n appearance: none;\n outline: none;\n box-sizing: border-box;\n border: none;\n }\n li button.edit > * {\n display: block;\n height: 100%;\n width: 100%;\n }\n "]))),xi]}}],(n=[{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.dy)(zi||(zi=Fi(["\n <li\n @click=",'\n tabindex="0"\n data-pageIndex=','\n >\n <div class="separator"></div>\n <div class="content ','">\n <button\n class="edit"\n @click=','\n title="Edit this bookmark"\n >\n <ia-icon-edit-pencil></ia-icon-edit-pencil>\n </button>\n <h4>\n <icon-bookmark class=',"></icon-bookmark>\n <span> Page ","</span>\n </h4>\n ","\n ","\n </div>\n </li>\n "])),(function(){return t.emitSelectedEvent(e)}),e.id,i,(function(n){return t.editBookmark(n,e)}),o,e.page,!n&&e.note?(0,r.dy)(ji||(ji=Fi(["<p>","</p>"])),e.note):b.Ld,n?this.editBookmarkComponent:b.Ld)}},{key:"editBookmarkComponent",get:function(){return(0,r.dy)(Ti||(Ti=Fi(["\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.dy)(Mi||(Mi=Fi(["<small>(",")</small>"])),e)}},{key:"headerSection",get:function(){return(0,r.dy)(Ii||(Ii=Fi(["<header>\n <h3>\n Bookmarks\n ","\n </h3>\n </header>"])),this.bookmarks.length?this.bookmarksCount:b.Ld)}},{key:"bookmarkslist",get:function(){var e=this.sortBookmarks(),t=Jr(e,(function(e){return null==e?void 0:e.id}),this.bookmarkItem.bind(this));return(0,r.dy)(Li||(Li=Fi(["\n <ul>\n ",'\n <div class="separator"></div>\n </ul>\n '])),t)}},{key:"render",value:function(){return(0,r.dy)(Di||(Di=Fi(["\n ","\n ","\n "])),this.renderHeader?this.headerSection:b.Ld,Object.keys(this.bookmarks).length?this.bookmarkslist:b.Ld)}}])&&Vi(t.prototype,n),o&&Vi(t,o),l}(r.oi);customElements.define("ia-bookmarks-list",Ji);class Yi extends r.oi{static get styles(){return r.iv`
|
1192
1158
|
:host {
|
1193
1159
|
width: var(--iconWidth, 'auto');
|
1194
1160
|
height: var(--iconHeight, 'auto');
|
@@ -1227,11 +1193,43 @@
|
|
1227
1193
|
.stroke-color {
|
1228
1194
|
stroke: var(--iconStrokeColor);
|
1229
1195
|
}
|
1230
|
-
`}static get properties(){return{state:{type:String}}}render(){return
|
1196
|
+
`}static get properties(){return{state:{type:String}}}render(){return r.dy`
|
1231
1197
|
<div class=${this.state}>
|
1232
1198
|
<svg height="24" viewBox="0 0 16 24" width="16" xmlns="http://www.w3.org/2000/svg" aria-labelledby="bookmarkTitleID bookmarDescID"><title id="bookmarkTitleID">Bookmark icon</title><desc id="bookmarkDescID">An outline of the shape of a bookmark</desc><path id="filled" d="m1 0h14c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1z" class="fill-color" fill-rule="evenodd"/><g class="fill-color" fill-rule="evenodd"><path id="hollow" 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"/><path id="plus" d="m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z" fill-rule="nonzero"/><path id="minus" d="m11 8.25v1.5h-6v-1.5z" fill-rule="nonzero"/></g></svg>
|
1233
1199
|
</div>
|
1234
|
-
`}}function
|
1200
|
+
`}}function Xi(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,r.key,r)}}customElements.define("icon-bookmark",Yi);var Qi=function(){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,s=t.modal,a=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=s,this.component.loginOptions={loginClicked:this.bookmarksLoginClicked,loginUrl:c},this.bindEvents(),this.icon=(0,r.dy)(Gi||(Gi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<icon-bookmark state="hollow" style="--iconWidth: 16px; --iconHeight: 24px;"></icon-bookmark>']))),this.label="Bookmarks",this.id="bookmarks",this.onProviderChange=a,this.component.setup(),this.updateMenu(this.component.bookmarks.length)}var t,n;return t=e,(n=[{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;window.archive_analytics&&(null===(e=window.archive_analytics)||void 0===e||e.send_event_no_sampling("BookReader","BookmarksLogin",window.location.path))}}])&&Xi(t.prototype,n),e}(),Ki=b.dy`
|
1201
|
+
<svg
|
1202
|
+
viewBox="0 0 24 24"
|
1203
|
+
xmlns="http://www.w3.org/2000/svg"
|
1204
|
+
aria-labelledby="shareTitleID shareDescID"
|
1205
|
+
>
|
1206
|
+
<title id="shareTitleID">Share icon</title>
|
1207
|
+
<desc id="shareDescID">A square with an arrow arcing out from the center of the square</desc>
|
1208
|
+
<g class="fill-color">
|
1209
|
+
<path d="m0 6.765625v17.143466h23.996455v-12.820312c0-.6024929-.564349-1.0909095-1.26051-1.0909095-.696159 0-1.260509.4884166-1.260509 1.0909095v10.638494h-18.9544172v-12.7798301h4.7793938c.6961602 0 1.2605092-.4884166 1.2605092-1.0909091 0-.6024924-.564349-1.0909088-1.2605092-1.0909088z"/>
|
1210
|
+
<path d="m23.97066.18118436-10.372158.62642052 1.587358 2.76562492c-.632399.5111771-1.204137 1.0741171-1.700285 1.6981534-1.40286 1.7644678-2.279987 4.0202049-2.712357 6.6775568-.144711.891238.459803 1.731264 1.350853 1.87713.428345.07012.866999-.03282 1.21944-.286164.35244-.253341.589789-.636328.659821-1.064688.366789-2.2542958 1.073357-3.946915 2.043324-5.1669026.237573-.298812.501471-.5831095.792613-.8522728l1.40625 2.4502844z"/>
|
1211
|
+
</g>
|
1212
|
+
</svg>
|
1213
|
+
`;class es extends r.oi{static get styles(){return r.iv`
|
1214
|
+
:host {
|
1215
|
+
width: var(--iconWidth, 'auto');
|
1216
|
+
height: var(--iconHeight, 'auto');
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
.fill-color {
|
1220
|
+
fill: var(--iconFillColor);
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
.stroke-color {
|
1224
|
+
stroke: var(--iconStrokeColor);
|
1225
|
+
}
|
1226
|
+
`}render(){return Ki}}function ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ns(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,r.key,r)}}customElements.define("ia-icon-share",es),n(189),n(3123);var rs=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.classes=new Set,this.changed=!1,this.element=t;var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ts(e,t);var n=Object.prototype.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)?ts(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}((t.getAttribute("class")||"").split(/\s+/));try{for(r.s();!(n=r.n()).done;){var o=n.value;this.classes.add(o)}}catch(e){r.e(e)}finally{r.f()}}var t,n;return t=e,(n=[{key:"add",value:function(e){this.classes.add(e),this.changed=!0}},{key:"remove",value:function(e){this.classes.delete(e),this.changed=!0}},{key:"commit",value:function(){if(this.changed){var e="";this.classes.forEach((function(t){return e+=t+" "})),this.element.setAttribute("class",e)}}}])&&ns(t.prototype,n),e}(),os=new WeakMap,is=(0,b.XM)((function(e){return function(t){if(!(t instanceof b._l)||t instanceof b.sL||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");var n=t.committer,r=n.element,o=os.get(t);void 0===o&&(r.setAttribute("class",n.strings.join(" ")),os.set(t,o=new Set));var i=r.classList||new rs(r);for(var s in o.forEach((function(t){t in e||(i.remove(t),o.delete(t))})),e){var a=e[s];a!=o.has(s)&&(a?(i.add(s),o.add(s)):(i.remove(s),o.delete(s)))}"function"==typeof i.commit&&i.commit()}})),ss=Me`
|
1227
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="linkTitleID linkDescID">
|
1228
|
+
<title id="linkTitleID">Link icon</title>
|
1229
|
+
<desc id="linkDescID">Two chain links linked together</desc>
|
1230
|
+
<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" />
|
1231
|
+
</svg>
|
1232
|
+
`;customElements.define("ia-icon-link",class extends et{static get styles(){return ae`
|
1235
1233
|
:host {
|
1236
1234
|
width: var(--iconWidth, 'auto');
|
1237
1235
|
height: var(--iconHeight, 'auto');
|
@@ -1244,7 +1242,7 @@
|
|
1244
1242
|
.stroke-color {
|
1245
1243
|
stroke: var(--iconStrokeColor);
|
1246
1244
|
}
|
1247
|
-
`}render(){return
|
1245
|
+
`}render(){return ss}});var as=r.iv`
|
1248
1246
|
:host {
|
1249
1247
|
display: block;
|
1250
1248
|
height: 100%;
|
@@ -1338,7 +1336,13 @@ small {
|
|
1338
1336
|
small.visible {
|
1339
1337
|
opacity: 1;
|
1340
1338
|
}
|
1341
|
-
|
1339
|
+
`,ls=Me`
|
1340
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="emailTitleID emailDescID">
|
1341
|
+
<title id="emailTitleID">Email icon</title>
|
1342
|
+
<desc id="emailDescID">An illustration of an envelope</desc>
|
1343
|
+
<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" />
|
1344
|
+
</svg>
|
1345
|
+
`;customElements.define("ia-icon-email",class extends et{static get styles(){return ae`
|
1342
1346
|
:host {
|
1343
1347
|
width: var(--iconWidth, 'auto');
|
1344
1348
|
height: var(--iconHeight, 'auto');
|
@@ -1351,7 +1355,13 @@ small.visible {
|
|
1351
1355
|
.stroke-color {
|
1352
1356
|
stroke: var(--iconStrokeColor);
|
1353
1357
|
}
|
1354
|
-
`}render(){return
|
1358
|
+
`}render(){return ls}});var cs=class{constructor(e){this.promoCopy=" : Free Download, Borrow, and Streaming : Internet Archive",Object.assign(this,e)}get encodedDescription(){return this.encodeString(this.description)}get encodedCreator(){return this.encodeString(this.creator)}get encodedPromoCopy(){return this.encodeString(this.promoCopy)}get itemPath(){const e=this.fileSubPrefix?encodeURIComponent(this.fileSubPrefix):"";return e?`${this.identifier}/${e}`:this.identifier}encodeString(e){return encodeURIComponent(e.replace(/\s/g,"+")).replace(/%2B/g,"+")}},ds=class extends cs{constructor(e){super(e),this.name="Email",this.icon=r.dy`<ia-icon-email></ia-icon-email>`,this.class="email"}get url(){return`mailto:?body=https://${this.baseHost}/details/${this.itemPath}&subject=${this.description} : ${this.creator}${this.promoCopy}`}},us=Me`
|
1359
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="facebookTitleID facebookDescID">
|
1360
|
+
<title id="facebookTitleID">Facebook icon</title>
|
1361
|
+
<desc id="facebookDescID">A lowercase f</desc>
|
1362
|
+
<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" />
|
1363
|
+
</svg>
|
1364
|
+
`;customElements.define("ia-icon-facebook",class extends et{static get styles(){return ae`
|
1355
1365
|
:host {
|
1356
1366
|
width: var(--iconWidth, 'auto');
|
1357
1367
|
height: var(--iconHeight, 'auto');
|
@@ -1364,7 +1374,13 @@ small.visible {
|
|
1364
1374
|
.stroke-color {
|
1365
1375
|
stroke: var(--iconStrokeColor);
|
1366
1376
|
}
|
1367
|
-
`}render(){return
|
1377
|
+
`}render(){return us}});var hs=class extends cs{constructor(e){super(e),this.name="Facebook",this.icon=r.dy`<ia-icon-facebook></ia-icon-facebook>`,this.class="facebook"}get url(){return`https://www.facebook.com/sharer/sharer.php?u=https://${this.baseHost}/details/${this.itemPath}`}},ps=Me`
|
1378
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="pinterestTitleID pinterestDescID">
|
1379
|
+
<title id="pinterestTitleID">Pinterest icon</title>
|
1380
|
+
<desc id="pinterestDescID">A stylized letter p</desc>
|
1381
|
+
<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" />
|
1382
|
+
</svg>
|
1383
|
+
`;customElements.define("ia-icon-pinterest",class extends et{static get styles(){return ae`
|
1368
1384
|
:host {
|
1369
1385
|
width: var(--iconWidth, 'auto');
|
1370
1386
|
height: var(--iconHeight, 'auto');
|
@@ -1377,7 +1393,13 @@ small.visible {
|
|
1377
1393
|
.stroke-color {
|
1378
1394
|
stroke: var(--iconStrokeColor);
|
1379
1395
|
}
|
1380
|
-
`}render(){return
|
1396
|
+
`}render(){return ps}});var fs=class extends cs{constructor(e){super(e),this.name="Pinterest",this.icon=r.dy`<ia-icon-pinterest></ia-icon-pinterest>`,this.class="pinterest"}get url(){return`http://www.pinterest.com/pin/create/button/?url=https://${this.baseHost}/details/${this.itemPath}&description=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}},ms=Me`
|
1397
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="tumblrTitleID tumblrDescID">
|
1398
|
+
<title id="tumblrTitleID">Tumblr icon</title>
|
1399
|
+
<desc id="tumblrDescID">A lowercase letter t</desc>
|
1400
|
+
<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" />
|
1401
|
+
</svg>
|
1402
|
+
`;customElements.define("ia-icon-tumblr",class extends et{static get styles(){return ae`
|
1381
1403
|
:host {
|
1382
1404
|
width: var(--iconWidth, 'auto');
|
1383
1405
|
height: var(--iconHeight, 'auto');
|
@@ -1390,7 +1412,13 @@ small.visible {
|
|
1390
1412
|
.stroke-color {
|
1391
1413
|
stroke: var(--iconStrokeColor);
|
1392
1414
|
}
|
1393
|
-
`}render(){return
|
1415
|
+
`}render(){return ms}});var vs=class extends cs{constructor(e){super(e),this.name="Tumblr",this.icon=r.dy`<ia-icon-tumblr></ia-icon-tumblr>`,this.class="tumblr"}get url(){return`https://www.tumblr.com/share/video?embed=%3Ciframe+width%3D%22640%22+height%3D%22480%22+frameborder%3D%220%22+allowfullscreen+src%3D%22https%3A%2F%2F${this.baseHost}%2Fembed%2F%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%26gt%3B%26lt%3B%2Fiframe%3E&name=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}},bs=Me`
|
1416
|
+
<svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="twitterTitleID twitterDescID">
|
1417
|
+
<title id="twitterTitleID">Twitter icon</title>
|
1418
|
+
<desc id="twitterDescID">The Twitter logo, a cartoon bird</desc>
|
1419
|
+
<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" />
|
1420
|
+
</svg>
|
1421
|
+
`;customElements.define("ia-icon-twitter",class extends et{static get styles(){return ae`
|
1394
1422
|
:host {
|
1395
1423
|
width: var(--iconWidth, 'auto');
|
1396
1424
|
height: var(--iconHeight, 'auto');
|
@@ -1403,34 +1431,34 @@ small.visible {
|
|
1403
1431
|
.stroke-color {
|
1404
1432
|
stroke: var(--iconStrokeColor);
|
1405
1433
|
}
|
1406
|
-
`}render(){return
|
1434
|
+
`}render(){return bs}});var ys=class extends cs{constructor(e){super(e),this.name="Twitter",this.icon=r.dy`<ia-icon-twitter></ia-icon-twitter>`,this.class="twitter"}get url(){return`https://twitter.com/intent/tweet?url=https://${this.baseHost}/details/${this.itemPath}&via=internetarchive&text=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}};const gs=({currentTarget:e})=>{const t=e.querySelector("textarea"),n=e.querySelector("small");t.select(),document.execCommand("copy"),t.blur(),n.classList.add("visible"),clearTimeout(n.timeout),n.timeout=setTimeout((()=>n.classList.remove("visible")),4e3)};class ks extends r.oi{static get styles(){return as}static get properties(){return{baseHost:{type:String},creator:{type:String},description:{type:String},embedOptionsVisible:{type:Boolean},identifier:{type:String},sharingOptions:{type:Array},type:{type:String},renderHeader:{type:Boolean},fileSubPrefix:{type:String}}}constructor(){super(),this.baseHost="",this.sharingOptions=[],this.fileSubPrefix=""}firstUpdated(){const{baseHost:e,creator:t,description:n,identifier:r,type:o,fileSubPrefix:i}=this,s={baseHost:e,creator:t,description:n,identifier:r,type:o,fileSubPrefix:i};this.sharingOptions=[new ys(s),new hs(s),new vs(s),new fs(s),new ds(s)]}get sharingItems(){return this.sharingOptions.map((e=>r.dy`<li>
|
1407
1435
|
<a class="${e.class}" href="${e.url}" target="_blank">
|
1408
1436
|
${e.icon}
|
1409
1437
|
${e.name}
|
1410
1438
|
</a>
|
1411
|
-
</li>`))}get embedOption(){return
|
1439
|
+
</li>`))}get embedOption(){return r.dy`<li>
|
1412
1440
|
<a href="#" @click=${this.toggleEmbedOptions}>
|
1413
1441
|
<ia-icon-link></ia-icon-link>
|
1414
1442
|
Get an embeddable link
|
1415
1443
|
</a>
|
1416
|
-
</li>`}get iframeEmbed(){return
|
1444
|
+
</li>`}get iframeEmbed(){return r.dy`<iframe src="https://${this.baseHost}/embed/${this.identifier}" width="560" height="384" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></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}`}toggleEmbedOptions(e){e.preventDefault(),this.embedOptionsVisible=!this.embedOptionsVisible}get header(){const e=r.dy`<header><h3>Share this ${this.type}</h3></header>`;return this.renderHeader?e:b.Ld}render(){return r.dy`
|
1417
1445
|
${this.header}
|
1418
1446
|
<ul>
|
1419
1447
|
${this.sharingItems}
|
1420
1448
|
${this.embedOption}
|
1421
|
-
<div class=${
|
1449
|
+
<div class=${is({visible:this.embedOptionsVisible,embed:!0})}>
|
1422
1450
|
<h4>Embed</h4>
|
1423
|
-
<div class="code" @click=${
|
1451
|
+
<div class="code" @click=${gs}>
|
1424
1452
|
<textarea readonly="readonly">${this.iframeEmbed}</textarea>
|
1425
1453
|
<small>Copied to clipboard</small>
|
1426
1454
|
</div>
|
1427
1455
|
<h4>Embed for wordpress.com hosted blogs and archive.org item <description> tags</h4>
|
1428
|
-
<div class="code" @click=${
|
1456
|
+
<div class="code" @click=${gs}>
|
1429
1457
|
<textarea readonly="readonly">${this.bbcodeEmbed}</textarea>
|
1430
1458
|
<small>Copied to clipboard</small>
|
1431
1459
|
</div>
|
1432
1460
|
<p>Want more? <a href=${this.helpURL}>Advanced embedding details, examples, and help</a>!</p>
|
1433
1461
|
</div>
|
1434
1462
|
</ul>
|
1435
|
-
`}}var ki,wi;function Ci(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Si(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-sharing-options",gi);var Bi,Oi,Ii,zi,Di,Li,Ti,Ei,ji,Mi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";xi(this,e);var a=t.identifier,s=t.creator,l=t.title,c=encodeURIComponent(i),d=i&&i!==a?"".concat(a,"/").concat(c):a;this.idPath=d,this.itemType=r;var u="Share this ".concat(this.reconcileItemType);this.icon=(0,o.dy)(ki||(ki=Ci(['<ia-icon icon="share" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon>']))),this.label=u,this.id="share",this.component=(0,o.dy)(wi||(wi=Ci(['<ia-sharing-options\n identifier="','"\n type="book"\n creator="','"\n description="','"\n baseHost="','"\n ></ia-sharing-options>'])),d,s,l,n)}var t,n;return t=e,(n=[{key:"reconcileItemType",get:function(){return"bookreader"===this.itemType?"book":"item"}}])&&Si(t.prototype,n),e}(),Pi=(0,r.dy)(Bi||(Bi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-desc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path 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" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538"/></g></svg>\n']))),Ai=(0,r.dy)(Oi||(Oi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-asc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path 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" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538" transform="matrix(1 0 0 -1 0 18.692308)"/></g></svg>\n']))),Ri=(0,r.dy)(Ii||(Ii=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-neutral" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="evenodd"><path 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" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill-rule="nonzero"/><circle cx="13" cy="9" r="2"/></g></svg>\n']))),_i=(0,r.dy)(zi||(zi=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" aria-labelledby="volumesTitleID volumesDescID">\n <title id="volumesTitleID">Volumes icon</title>\n <desc id="volumesDescID">Three books stacked on each other</desc>\n <g fill="#ffffff">\n <path fill="#ffffff" 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" />\n </g>\n </svg>\n'])));function $i(e){return($i="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})(e)}function Ni(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Hi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Fi(e,t){return(Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zi(e,t){if(t&&("object"===$i(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)}function Wi(e){return(Wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qi,Ui,Vi,Gi,Xi=function(e){!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}}),t&&Fi(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Wi(a);if(s){var n=Wi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Zi(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).hostUrl="",e.sortOrderBy="",e.subPrefix="",e.viewableFiles=[],e}return t=c,i=[{key:"properties",get:function(){return{subPrefix:{type:String},hostUrl:{type:String},viewableFiles:{type:Array},sortOrderBy:{type:String}}}},{key:"styles",get:function(){return(0,o.iv)(ji||(ji=Ni(["\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-top: 14px;\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n a {\n color: #ffffff;\n text-decoration: none\n }\n\n img {\n width: 35px;\n height: 45px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n \n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n small {\n font-style: italic;\n white-space: initial;\n }\n\n .container {\n display: flex;\n align-items: center;\n justify-content: center\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .text {\n padding-left: 10px;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n\n "])))}}],(n=[{key:"firstUpdated",value:function(){var e=this.shadowRoot.querySelector(".content.active");setTimeout((function(){null!=e&&e.scrollIntoViewIfNeeded&&(null==e||e.scrollIntoViewIfNeeded(!0))}),350)}},{key:"volumeItemWithImageTitle",value:function(e){var t="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,o.dy)(Di||(Di=Ni(['\n <li class="content active">\n <div class="separator"></div>\n <a class="container" href="','">\n <div class="image">\n <img src="','">\n </div>\n <div class="text">\n <p class="item-title">',"</p>\n <small>by: ","</small>\n </div>\n </a>\n </li>\n "])),t,e.image,e.title,e.author)}},{key:"volumeItem",value:function(e){var t=this.subPrefix===e.file_subprefix?" active":"",n="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,o.dy)(Li||(Li=Ni(['\n <li>\n <div class="separator"></div>\n <div class="content','">\n <a href="https://','">\n <p class="item-title">',"</p>\n </a>\n </div>\n </li>\n "])),t,n,e.title)}},{key:"volumesList",get:function(){var e=so(this.viewableFiles,(function(e){return null==e?void 0:e.file_prefix}),this.volumeItem.bind(this));return(0,o.dy)(Ti||(Ti=Ni(["\n <ul>\n ",'\n <div class="separator"></div> \n </ul>\n '])),e)}},{key:"render",value:function(){return(0,o.dy)(Ei||(Ei=Ni(["\n ","\n "])),this.viewableFiles.length?this.volumesList:r.Ld)}}])&&Hi(t.prototype,n),i&&Hi(t,i),c}(o.oi);function Yi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ji(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Qi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("viewable-files",Xi);var Ki="title_asc",ea="title_desc",ta="default",na=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.optionChange=r,this.component=document.createElement("viewable-files");var i=n.options.multipleBooksList.by_subprefix;if(this.viewableFiles=Object.keys(i).map((function(e){return i[e]})),this.volumeCount=Object.keys(i).length,this.bookreader=n,this.component.subPrefix=n.options.subPrefix||"",this.component.hostUrl=t,this.component.viewableFiles=this.viewableFiles,this.id="volumes",this.label="Viewable files (".concat(this.volumeCount,")"),this.icon=(0,o.dy)(qi||(qi=Ji(["",""])),_i),this.sortOrderBy=ta,this.bookreader.urlPlugin){this.bookreader.urlPlugin.pullFromAddressBar();var a=this.bookreader.urlPlugin.getUrlParam("sort");a!==Ki&&a!==ea||(this.sortOrderBy=a)}this.sortVolumes(this.sortOrderBy)}var t,n;return t=e,(n=[{key:"sortButton",get:function(){var e=this;return{default:(0,o.dy)(Ui||(Ui=Ji(['\n <button class="sort-by neutral-icon" aria-label="Sort volumes in initial order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_asc")}),Ri),title_asc:(0,o.dy)(Vi||(Vi=Ji(['\n <button class="sort-by asc-icon" aria-label="Sort volumes in ascending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_desc")}),Ai),title_desc:(0,o.dy)(Gi||(Gi=Ji(['\n <button class="sort-by desc-icon" aria-label="Sort volumes in descending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("default")}),Pi)}[this.sortOrderBy]}},{key:"sortVolumes",value:function(e){var t,n;t=this.viewableFiles.sort((function(t,n){return e===Ki?t.title.localeCompare(n.title):e===ea?n.title.localeCompare(t.title):t.orig_sort-n.orig_sort})),this.sortOrderBy=e,this.component.sortOrderBy=e,this.component.viewableFiles=function(e){if(Array.isArray(e))return Yi(e)}(n=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Yi(e,t);var n=Object.prototype.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)?Yi(e,t):void 0}}(n)||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.")}(),this.actionButton=this.sortButton,this.bookreader.urlPlugin&&(this.bookreader.urlPlugin.pullFromAddressBar(),this.sortOrderBy!==ta?this.bookreader.urlPlugin.setUrlParam("sort",e):this.bookreader.urlPlugin.removeUrlParam("sort")),this.optionChange(this.bookreader),this.multipleFilesClicked(e)}},{key:"multipleFilesClicked",value:function(e){var t;window.archive_analytics&&(null===(t=window.archive_analytics)||void 0===t||t.send_event_no_sampling("BookReader","VolumesSort|".concat(e),window.location.path))}}])&&Qi(t.prototype,n),e}();function oa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ra(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var ia=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;oa(this,e),this.callback=t,this.threshhold=n,this.context=o,this.deferTimeout=void 0}var t,n;return t=e,(n=[{key:"execute",value:function(){clearTimeout(this.deferTimeout),this.deferTimeout=setTimeout(this.executeCallback.bind(this),this.threshhold)}},{key:"executeCallback",value:function(){this.callback.apply(this.context)}}])&&ra(t.prototype,n),e}();function aa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sa(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var la=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#BookReader";aa(this,e),this.debounceTime=250,this.savedScrollY=0,this.savedScrollX=0,this.brSelector=t,this.setup=this.setup.bind(this),this.teardown=this.teardown.bind(this),this.resizeBookReaderContainer=this.resizeBookReaderContainer.bind(this),this.handleResizeEvent=this.handleResizeEvent.bind(this),this.handleBookReaderHeight=new ia(this.resizeBookReaderContainer,this.debounceTime,this)}var t,n;return t=e,(n=[{key:"brDom",get:function(){return document.querySelector(this.brSelector)}},{key:"setup",value:function(e){this.bookreader=e,this.resizeBookReaderContainer(),window.addEventListener("resize",this.handleResizeEvent)}},{key:"teardown",value:function(){this.brDom.setAttribute("style",""),window.removeEventListener("resize",this.handleResizeEvent),window.scrollTo(this.savedScrollX,this.savedScrollY),this.savedScrollX=0,this.savedScrollY=0}},{key:"handleResizeEvent",value:function(){this.handleBookReaderHeight.execute()}},{key:"resizeBookReaderContainer",value:function(){var e,t=window,n=t.scrollX,o=t.scrollY;this.savedScrollX=n,this.savedScrollY=o,this.bookreader.updateBrClasses();var r=document.querySelector(".BookReaderMessage"),i=null!==(e=null==r?void 0:r.offsetHeight)&&void 0!==e?e:0,a=window.innerHeight,s="".concat(a-i,"px");this.brDom.style.height=s,this.brDom.style.top=i,window.scrollTo(0,0)}}])&&sa(t.prototype,n),e}();function ca(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var da,ua,ha,fa,pa,ma=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata={},this.isRestricted=null}var t,n;return t=e,(n=[{key:"setMetadata",value:function(e){this.metadata=e}},{key:"setRestriction",value:function(e){this.isRestricted=e}}])&&ca(t.prototype,n),e}(),va=(0,o.dy)(da||(da=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg\n height="100"\n viewBox="0 0 100 100"\n width="100"\n xmlns="http://www.w3.org/2000/svg"\n aria-labelledby="bookreader-loading"\n >\n <title id="bookreader-loading">Currently loading viewer.</title>\n <desc>Please wait while we load book reader.</desc>\n <g fill="#333" fill-rule="evenodd" class="book-icon">\n <g transform="matrix(1 0 0 -1 28 67.362264)">\n <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"/>\n <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"/>\n <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"/>\n </g>\n <path\n class="ring"\n 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"\n fill-rule="nonzero"\n />\n </g>\n </svg>\n'])));function ba(e){return(ba="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})(e)}function ya(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ga(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ka(e,t){return(ka=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wa(e,t){if(t&&("object"===ba(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)}function Ca(e){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xa,Sa,Ba=window.ResizeObserver||wt,Oa="updateSideMenu",Ia=function(e){!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}}),t&&ka(e,t)}(c,e);var t,n,i,a,s,l=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ca(a);if(s){var n=Ca(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wa(this,e)});function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(e=l.call(this)).book={},e.pageContainerSelector=".BRcontainer",e.brWidth=0,e.bookReaderCannotLoad=!1,e.bookReaderLoaded=!1,e.bookreader=null,e.downloadableTypes=[],e.isAdmin=!1,e.lendingInitialized=!1,e.lendingStatus={},e.menuProviders={},e.menuShortcuts=[],e.sideMenuOpen=!1,e.signedIn=!1,e.fullscreenMgr=null,e.brResizeObserver=null,e.model=new ma,e.shortcutOrder=["volumes","search","bookmarks"],e}return t=c,i=[{key:"properties",get:function(){return{book:{type:Object},pageContainerSelector:{type:String},brWidth:{type:Number},bookReaderLoaded:{type:Boolean},bookreader:{type:Object},downloadableTypes:{type:Array},isAdmin:{type:Boolean},lendingInitialized:{type:Boolean},lendingStatus:{type:Object},menuProviders:{type:Object},menuShortcuts:{type:Array},sideMenuOpen:{type:Boolean},signedIn:{type:Boolean}}}},{key:"styles",get:function(){return(0,o.iv)(pa||(pa=ya(["\n #book-navigator.loading {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 30vh;\n }\n\n #book-navigator .book-loader {\n width: 30%;\n margin: auto;\n text-align: center;\n color: var(--primaryTextColor);\n }\n\n .book-loader {\n position: relative;\n }\n\n .book-loader svg {\n display: block;\n width: 60%;\n max-width: 100px;\n height: auto;\n margin: auto;\n }\n\n svg * {\n fill: var(--primaryTextColor);\n }\n\n svg .ring {\n animation: rotate 1.3s infinite linear;\n transform-origin: 50px 50px;\n transform-box: fill-box;\n display: block; // transform won't work on inline style\n }\n\n @keyframes rotate {\n 0% {\n transform: rotate(-360deg);\n }\n }\n\n .cover-img {\n max-height: 300px;\n }\n "])))}}],(n=[{key:"firstUpdated",value:function(){this.model.setMetadata(this.book),this.bindEventListeners(),this.emitPostInit()}},{key:"updated",value:function(e){if(this.bookreader&&(!e.has("sideMenuOpen")||void 0!==e.get("sideMenuOpen"))){if(this.bookreader.animating)return;this.bookreader.resize()}}},{key:"emitPostInit",value:function(){var e;this.dispatchEvent(new CustomEvent("BrBookNav:".concat("PostInit"),{detail:{brSelector:null===(e=this.bookreader)||void 0===e?void 0:e.el},bubbles:!0,composed:!0}))}},{key:"initializeBookSubmenus",value:function(){var e=this,t=this.bookreader.options.protected;this.menuProviders={search:new Dn((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(e.bookreader=t),e.updateMenuContents();var o=e.brWidth>=640;!o||null!=n&&n.searchCanceled||e.updateSideMenu("search","open")}),this.bookreader),downloads:new qn(t),visualAdjustments:new Lo({onOptionChange:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n&&(e.bookreader=n),e.updateMenuContents()},bookContainerSelector:this.pageContainerSelector,bookreader:this.bookreader}),share:new Mi(this.book.metadata,this.baseHost,this.itemType,this.bookreader.options.subPrefix),bookmarks:new Kr(this.bookmarksOptions,this.bookreader)},this.bookreader.options.enableMultipleBooks&&(this.menuProviders.volumes=new na(this.baseHost,this.bookreader,(function(t){t&&(e.bookreader=t),e.updateMenuContents(),e.updateSideMenu("volumes","open")})),this.addMenuShortcut("volumes")),this.addMenuShortcut("search"),this.updateMenuContents()}},{key:"mainBRContainer",get:function(){return document.querySelector(this.bookreader.el)}},{key:"bookmarksOptions",get:function(){var e=this,t="referer=".concat(encodeURIComponent(location.href));return{loginUrl:"https://".concat(this.baseHost,"/account/login?").concat(t),displayMode:this.signedIn?"bookmarks":"login",showItemNavigatorModal:this.showItemNavigatorModal.bind(this),closeItemNavigatorModal:this.closeItemNavigatorModal.bind(this),onBookmarksChanged:function(t){var n=Object.keys(t).length?"add":"remove";e["".concat(n,"MenuShortcut")]("bookmarks"),e.updateMenuContents()}}}},{key:"updateSideMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";if(e&&t){var n=new CustomEvent(Oa,{detail:{menuId:e,action:t}});this.dispatchEvent(n)}}},{key:"updateMenuContents",value:function(){var e=this.menuProviders,t=e.search,n=e.downloads,o=e.visualAdjustments,r=e.share,i=e.bookmarks,a=[e.volumes,t,i,o,r].filter((function(e){return!!e}));this.shouldShowDownloadsMenu()&&(n.update(this.downloadableTypes),a.splice(1,0,n));var s=new CustomEvent("menuUpdated",{detail:a});this.dispatchEvent(s)}},{key:"shouldShowDownloadsMenu",value:function(){if(!1===this.model.isRestricted)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.menuShortcuts.push(this.menuProviders[e]),this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated())}},{key:"removeMenuShortcut",value:function(e){this.menuShortcuts=this.menuShortcuts.filter((function(t){return t.id!==e})),this.emitMenuShortcutsUpdated()}},{key:"sortMenuShortcuts",value:function(){var e=this;this.menuShortcuts=this.shortcutOrder.reduce((function(t,n){var o=e.menuShortcuts.find((function(e){return e.id===n}));return o&&t.push(o),t}),[])}},{key:"emitMenuShortcutsUpdated",value:function(){var e=new CustomEvent("menuShortcutsUpdated",{detail:this.menuShortcuts});this.dispatchEvent(e)}},{key:"bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:PostInit",(function(t){e.bookreader=t.detail.props,e.bookReaderLoaded=!0,e.bookReaderCannotLoad=!1,e.fullscreenMgr=new la(e.bookreader.el),e.initializeBookSubmenus(),setTimeout((function(){return e.bookreader.resize()}),0),e.brResizeObserver=new Ba((function(t){return e.reactToBrResize(t)})),e.brResizeObserver.observe(e.mainBRContainer)})),window.addEventListener("BookReader:fullscreenToggled",(function(t){var n=t.detail.props,o=void 0===n?null:n;o&&(e.bookreader=o),e.manageFullScreenBehavior(t)}),{passive:!0}),window.addEventListener("BookReader:ToggleSearchMenu",(function(t){e.dispatchEvent(new CustomEvent(Oa,{detail:{menuId:"search",action:"toggle"}}))})),window.addEventListener("LendingFlow:PostInit",(function(t){var n=t.detail,o=n.downloadTypesAvailable,r=n.lendingStatus,i=n.isAdmin,a=n.previewType;e.lendingInitialized=!0,e.downloadableTypes=o,e.lendingStatus=r,e.isAdmin=i,e.bookReaderCannotLoad="singlePagePreview"===a})),window.addEventListener("BRJSIA:PostInit",(function(t){var n=t.detail,o=n.isRestricted,r=n.downloadURLs;e.bookReaderLoaded=!0,e.downloadableTypes=r,e.model.setRestriction(o)}))}},{key:"reactToBrResize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.brWidth,o=this.bookreader.animating;t.forEach((function(t){var n=t.contentRect;t.target===e.mainBRContainer&&(e.brWidth=n.width)})),setTimeout((function(){n&&!o&&e.bookreader.resize()}),0)}},{key:"manageFullScreenBehavior",value:function(){this.emitFullScreenState(),this.bookreader.isFullscreen()?this.fullscreenMgr.setup(this.bookreader):this.fullscreenMgr.teardown()}},{key:"emitFullScreenState",value:function(){var e=this.bookreader.isFullscreen(),t=new CustomEvent("ViewportInFullScreen",{detail:{isFullScreen:e}});this.dispatchEvent(t)}},{key:"emitShowItemNavigatorModal",value:function(e){this.dispatchEvent(new CustomEvent("showItemNavigatorModal",{detail:e.detail}))}},{key:"emitCloseItemNavigatorModal",value:function(){this.dispatchEvent(new CustomEvent("closeItemNavigatorModal"))}},{key:"showItemNavigatorModal",value:function(e){this.emitShowItemNavigatorModal(e)}},{key:"closeItemNavigatorModal",value:function(){this.emitCloseItemNavigatorModal()}},{key:"loader",get:function(){var e=(0,o.dy)(ua||(ua=ya(['\n <div class="book-loader">',"<div>\n <h3>Loading viewer</h3>\n "])),va);return this.bookReaderLoaded?r.Ld:e}},{key:"loadingClass",get:function(){return this.bookReaderLoaded?"":"loading"}},{key:"itemImage",get:function(){var e="https://".concat(this.baseHost,"/services/img/").concat(this.book.metadata.identifier);return(0,o.dy)(ha||(ha=ya(['<img class="cover-img" src="','" alt="cover image for ','">'])),e,this.book.metadata.identifier)}},{key:"render",value:function(){var e=this.bookReaderCannotLoad?this.itemImage:this.loader;return(0,o.dy)(fa||(fa=ya(['<div id="book-navigator" class="','">\n ','\n <slot name="bookreader"></slot>\n </div>\n '])),this.loadingClass,e)}}])&&ga(t.prototype,n),i&&ga(t,i),c}(o.oi);function za(e){return(za="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})(e)}function Da(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function La(e,t,n,o,r,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(o,r)}function Ta(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ea(e,t){return(Ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ja(e,t){if(t&&("object"===za(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)}function Ma(e){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("book-navigator",Ia);var Pa=function(e){!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}}),t&&Ea(e,t)}(d,e);var t,n,r,i,a,s,l,c=(s=d,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ma(s);if(l){var n=Ma(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ja(this,e)});function d(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(e=c.call(this)).base64Json="",e.baseHost="https://archive.org",e}return t=d,r=[{key:"properties",get:function(){return{base64Json:{type:String},baseHost:{type:String}}}},{key:"styles",get:function(){return(0,o.iv)(Sa||(Sa=Da(["\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 }\n\n .ia-bookreader {\n background-color: var(--primaryBGColor);\n position: relative;\n height: auto;\n }\n\n item-navigator {\n display: block;\n width: 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 "])))}}],(n=[{key:"firstUpdated",value:function(){this.fetchData()}},{key:"fetchData",value:(i=regeneratorRuntime.mark((function e(){var t,n,o,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URLSearchParams(location.search).get("ocaid"),e.next=3,fetch("".concat(this.baseHost,"/metadata/").concat(t));case 3:return n=e.sent,e.next=6,n.json();case 6:o=e.sent,r=btoa(JSON.stringify(o)),this.setBaseJSON(r);case 9:case"end":return e.stop()}}),e,this)})),a=function(){var e=this,t=arguments;return new Promise((function(n,o){var r=i.apply(e,t);function a(e){La(r,n,o,a,s,"next",e)}function s(e){La(r,n,o,a,s,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"setBaseJSON",value:function(e){this.base64Json=e}},{key:"render",value:function(){return(0,o.dy)(xa||(xa=Da(['\n <div class="ia-bookreader">\n <item-navigator\n itemType="bookreader"\n basehost=',"\n item=",'>\n <div slot="bookreader">\n <slot name="bookreader"></slot>\n </div>\n </item-navigator>\n </div>\n '])),this.baseHost,this.base64Json)}}])&&Ta(t.prototype,n),r&&Ta(t,r),d}(o.oi);window.customElements.define("ia-bookreader",Pa)},8730:function(e,t,n){var o=n(111),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(8730)})},4723:function(e,t,n){"use strict";var o=n(7007),r=n(9670),i=n(7466),a=n(1340),s=n(4488),l=n(1530),c=n(7651);o("match",(function(e,t,n){return[function(t){var n=s(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](a(n))},function(e){var o=r(this),s=a(e),d=n(t,o,s);if(d.done)return d.value;if(!o.global)return c(o,s);var u=o.unicode;o.lastIndex=0;for(var h,f=[],p=0;null!==(h=c(o,s));){var m=a(h[0]);f[p]=m,""===m&&(o.lastIndex=l(s,i(o.lastIndex),u)),p++}return 0===p?null:f}]}))},3774:function(e,t){!function(e){"use strict";function t(e,t,n,o){var r,i=!1,a=0;function s(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=this,h=Date.now()-a;function f(){a=Date.now(),n.apply(u,c)}function p(){r=void 0}i||(o&&!r&&f(),s(),void 0===o&&h>e?f():!0!==t&&(r=setTimeout(o?p:f,void 0===o?e-h:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}e.debounce=function(e,n,o){return void 0===o?t(e,n,!1):t(e,o,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},function(e){e(e.s=9903)}]);
|
1463
|
+
`}}var ws,Ss;function Cs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("ia-sharing-options",ks);var xs,Os,_s,Es,Bs,Ps,As,$s,zs,js=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 s=null==n?void 0:n.metadata,a=s.identifier,l=s.creator,c=s.title,d=Array.isArray(l)?l[0]:l,u=i.options.subPrefix||"";this.icon=(0,r.dy)(ws||(ws=Cs(['<ia-icon-share style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-share>']))),this.label="Share this book",this.id="share",this.component=(0,r.dy)(Ss||(Ss=Cs(["<ia-sharing-options\n .identifier=","\n .type=","\n .creator=","\n .description=","\n .baseHost=","\n .fileSubPrefix=","\n ></ia-sharing-options>"])),a,"book",d,c,o,u)},Ts=(0,b.dy)(xs||(xs=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-desc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path 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" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538"/></g></svg>\n']))),Ms=(0,b.dy)(Os||(Os=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-asc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path 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" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538" transform="matrix(1 0 0 -1 0 18.692308)"/></g></svg>\n']))),Is=(0,b.dy)(_s||(_s=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-neutral" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="evenodd"><path 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" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill-rule="nonzero"/><circle cx="13" cy="9" r="2"/></g></svg>\n']))),Ls=(0,b.dy)(Es||(Es=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" aria-labelledby="volumesTitleID volumesDescID">\n <title id="volumesTitleID">Volumes icon</title>\n <desc id="volumesDescID">Three books stacked on each other</desc>\n <g fill="#ffffff">\n <path fill="#ffffff" 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" />\n </g>\n </svg>\n'])));function Ds(e){return(Ds="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})(e)}function Rs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Hs(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,r.key,r)}}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Us(e,t){if(t&&("object"===Ds(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)}function Fs(e){return(Fs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vs,qs,Ws,Zs,Gs=function(e){!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}}),t&&Ns(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fs(i);if(s){var n=Fs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Us(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).hostUrl="",e.sortOrderBy="",e.subPrefix="",e.viewableFiles=[],e}return t=l,o=[{key:"properties",get:function(){return{subPrefix:{type:String},hostUrl:{type:String},viewableFiles:{type:Array},sortOrderBy:{type:String}}}},{key:"styles",get:function(){return(0,r.iv)(zs||(zs=Rs(["\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-top: 14px;\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n a {\n color: #ffffff;\n text-decoration: none\n }\n\n img {\n width: 35px;\n height: 45px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n \n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n small {\n font-style: italic;\n white-space: initial;\n }\n\n .container {\n display: flex;\n align-items: center;\n justify-content: center\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .text {\n padding-left: 10px;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n\n "])))}}],(n=[{key:"firstUpdated",value:function(){var e=this.shadowRoot.querySelector(".content.active");setTimeout((function(){null!=e&&e.scrollIntoViewIfNeeded&&(null==e||e.scrollIntoViewIfNeeded(!0))}),350)}},{key:"volumeItemWithImageTitle",value:function(e){var t="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,r.dy)(Bs||(Bs=Rs(['\n <li class="content active">\n <div class="separator"></div>\n <a class="container" href="','">\n <div class="image">\n <img src="','">\n </div>\n <div class="text">\n <p class="item-title">',"</p>\n <small>by: ","</small>\n </div>\n </a>\n </li>\n "])),t,e.image,e.title,e.author)}},{key:"volumeItem",value:function(e){var t=this.subPrefix===e.file_subprefix?" active":"",n="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,r.dy)(Ps||(Ps=Rs(['\n <li>\n <div class="separator"></div>\n <div class="content','">\n <a href="https://','">\n <p class="item-title">',"</p>\n </a>\n </div>\n </li>\n "])),t,n,e.title)}},{key:"volumesList",get:function(){var e=Jr(this.viewableFiles,(function(e){return null==e?void 0:e.file_prefix}),this.volumeItem.bind(this));return(0,r.dy)(As||(As=Rs(["\n <ul>\n ",'\n <div class="separator"></div> \n </ul>\n '])),e)}},{key:"render",value:function(){return(0,r.dy)($s||($s=Rs(["\n ","\n "])),this.viewableFiles.length?this.volumesList:b.Ld)}}])&&Hs(t.prototype,n),o&&Hs(t,o),l}(r.oi);function Js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ys(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Xs(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,r.key,r)}}customElements.define("viewable-files",Gs);var Qs,Ks,ea,ta,na,ra="title_asc",oa="title_desc",ia="default",sa=function(){function e(t){var n=t.baseHost,o=t.bookreader,i=t.onProviderChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onProviderChange=i,this.component=document.createElement("viewable-files");var s=o.options.multipleBooksList.by_subprefix;if(this.viewableFiles=Object.keys(s).map((function(e){return s[e]})),this.volumeCount=Object.keys(s).length,this.bookreader=o,this.component.subPrefix=o.options.subPrefix||"",this.component.hostUrl=n,this.component.viewableFiles=this.viewableFiles,this.id="volumes",this.label="Viewable files (".concat(this.volumeCount,")"),this.icon=(0,r.dy)(Vs||(Vs=Ys(["",""])),Ls),this.sortOrderBy=ia,this.bookreader.urlPlugin){this.bookreader.urlPlugin.pullFromAddressBar();var a=this.bookreader.urlPlugin.getUrlParam("sort");a!==ra&&a!==oa||(this.sortOrderBy=a)}this.sortVolumes(this.sortOrderBy)}var t,n;return t=e,(n=[{key:"sortButton",get:function(){var e=this;return{default:(0,r.dy)(qs||(qs=Ys(['\n <button class="sort-by neutral-icon" aria-label="Sort volumes in initial order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_asc")}),Is),title_asc:(0,r.dy)(Ws||(Ws=Ys(['\n <button class="sort-by asc-icon" aria-label="Sort volumes in ascending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_desc")}),Ms),title_desc:(0,r.dy)(Zs||(Zs=Ys(['\n <button class="sort-by desc-icon" aria-label="Sort volumes in descending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("default")}),Ts)}[this.sortOrderBy]}},{key:"sortVolumes",value:function(e){var t,n;t=this.viewableFiles.sort((function(t,n){return e===ra?t.title.localeCompare(n.title):e===oa?n.title.localeCompare(t.title):t.orig_sort-n.orig_sort})),this.sortOrderBy=e,this.component.sortOrderBy=e,this.component.viewableFiles=function(e){if(Array.isArray(e))return Js(e)}(n=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Js(e,t);var n=Object.prototype.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)?Js(e,t):void 0}}(n)||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.")}(),this.actionButton=this.sortButton,this.bookreader.urlPlugin&&(this.bookreader.urlPlugin.pullFromAddressBar(),this.sortOrderBy!==ia?this.bookreader.urlPlugin.setUrlParam("sort",e):this.bookreader.urlPlugin.removeUrlParam("sort")),this.onProviderChange(this.bookreader),this.multipleFilesClicked(e)}},{key:"multipleFilesClicked",value:function(e){var t;window.archive_analytics&&(null===(t=window.archive_analytics)||void 0===t||t.send_event_no_sampling("BookReader","VolumesSort|".concat(e),window.location.path))}}])&&Xs(t.prototype,n),e}(),aa=(0,r.YP)(Qs||(Qs=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg class="ia-logo" width="27" height="30" viewBox="0 0 27 30" xmlns="http://www.w3.org/2000/svg" aria-labelledby="logoTitleID logoDescID">\n <title id="logoTitleID">Internet Archive logo</title>\n <desc id="logoDescID">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <mask id="mask-2" fill="white">\n <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>\n </mask>\n <use fill="#FFFFFF" xlink:href="#path-1"></use>\n <g mask="url(#mask-2)" fill="#FFFFFF">\n <path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>\n </g>\n </g>\n </svg>\n'])));function la(e){return(la="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})(e)}function ca(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function da(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 ua(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?da(Object(n),!0).forEach((function(t){ha(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ha(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(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,r.key,r)}}function fa(e,t){return(fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ma(e,t){if(t&&("object"===la(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)}function va(e){return(va=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ba,ya,ga="updateSideMenu",ka=function(e){!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}}),t&&fa(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=va(i);if(s){var n=va(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ma(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).itemMD=void 0,e.loaded=!1,e.bookReaderCannotLoad=!1,e.bookReaderLoaded=!1,e.bookreader=null,e.bookIsRestricted=!1,e.downloadableTypes=[],e.isAdmin=!1,e.lendingInitialized=!1,e.lendingStatus={},e.menuProviders={},e.menuShortcuts=[],e.signedIn=!1,e.modal=void 0,e.sharedObserver=void 0,e.fullscreenBranding=aa,e.sharedObserverHandler=void 0,e.brWidth=0,e.brHeight=0,e.shortcutOrder=["fullscreen","volumes","search","bookmarks"],e}return t=l,o=[{key:"properties",get:function(){return{itemMD:{type:Object},bookReaderLoaded:{type:Boolean},bookreader:{type:Object},bookIsRestricted:{type:Boolean},downloadableTypes:{type:Array},isAdmin:{type:Boolean},lendingInitialized:{type:Boolean},lendingStatus:{type:Object},menuProviders:{type:Object},menuShortcuts:{type:Array},signedIn:{type:Boolean},loaded:{type:Boolean},sharedObserver:{type:Object,attribute:!1},modal:{type:Object,attribute:!1},fullscreenBranding:{type:Object}}}},{key:"styles",get:function(){return(0,r.iv)(na||(na=ca(["\n .cover-img {\n max-height: 300px;\n }\n "])))}}],(n=[{key:"disconnectedCallback",value:function(){this.sharedObserver.removeObserver({target:this.mainBRContainer,handler:this.sharedObserverHandler})}},{key:"firstUpdated",value:function(){this.bindEventListeners(),this.emitPostInit(),this.loaded=!0}},{key:"updated",value:function(e){this.bookreader&&this.itemMD&&this.bookReaderLoaded&&((e.has("loaded")&&this.loaded||e.has("itemMD")||e.has("bookreader")||e.has("signedIn")||e.has("isAdmin")||e.has("modal"))&&this.initializeBookSubmenus(),e.has("sharedObserver")&&this.bookreader&&this.loadSharedObserver())}},{key:"emitPostInit",value:function(){var e;this.dispatchEvent(new CustomEvent("BrBookNav:".concat("PostInit"),{detail:{brSelector:null===(e=this.bookreader)||void 0===e?void 0:e.el},bubbles:!0,composed:!0}))}},{key:"baseProviderConfig",get:function(){return{baseHost:this.baseHost,modal:this.modal,sharedObserver:this.sharedObserver,bookreader:this.bookreader,item:this.itemMD,signedIn:this.signedIn,isAdmin:this.isAdmin,onProviderChange:function(){}}}},{key:"initializeBookSubmenus",value:function(){var e=this,t={downloads:new Dr(this.baseProviderConfig),share:new js(this.baseProviderConfig),visualAdjustments:new Eo(ua(ua({},this.baseProviderConfig),{},{onProviderChange:function(){e.updateMenuContents()}}))};this.bookreader.options.enableSearch&&(t.search=new kr(ua(ua({},this.baseProviderConfig),{},{onProviderChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(e.bookreader=t);var r=e.brWidth>=640;!r||null!=n&&n.searchCanceled||setTimeout((function(){e.updateSideMenu("search","open")}),0),e.updateMenuContents()}}))),this.bookreader.options.enableBookmarks&&(t.bookmarks=new Qi(ua(ua({},this.baseProviderConfig),{},{onProviderChange:function(t){var n=Object.keys(t).length?"add":"remove";e["".concat(n,"MenuShortcut")]("bookmarks"),e.updateMenuContents()}}))),this.bookreader.options.enableMultipleBooks&&(t.volumes=new sa(ua(ua({},this.baseProviderConfig),{},{onProviderChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&(e.bookreader=t),e.updateMenuContents(),e.updateSideMenu("volumes","open")}}))),this.menuProviders=t,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:"addFullscreenShortcut",value:function(){var e={icon:this.fullscreenShortcut,id:"fullscreen"};this.menuShortcuts.push(e),this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated()}},{key:"deleteFullscreenShortcut",value:function(){var e=this.menuShortcuts.filter((function(e){return"fullscreen"!==e.id}));this.menuShortcuts=e,this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated()}},{key:"closeFullscreen",value:function(){this.bookreader.exitFullScreen()}},{key:"fullscreenShortcut",get:function(){var e=this;return(0,r.dy)(Ks||(Ks=ca(["\n <button\n @click=",'\n title="Exit fullscreen view"\n >',"</button>\n "])),(function(){return e.closeFullscreen()}),this.fullscreenBranding)}},{key:"updateSideMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";if(e){var n=new CustomEvent(ga,{detail:{menuId:e,action:t}});this.dispatchEvent(n)}}},{key:"updateMenuContents",value:function(){var e=this.menuProviders,t=e.search,n=e.downloads,r=e.visualAdjustments,o=e.share,i=e.bookmarks,s=[e.volumes,t,i,r,o].filter((function(e){return!!e}));this.shouldShowDownloadsMenu()&&(null==n||n.update(this.downloadableTypes),s.splice(1,0,n));var a=new CustomEvent("menuUpdated",{detail:s});this.dispatchEvent(a)}},{key:"shouldShowDownloadsMenu",value:function(){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(),this.emitMenuShortcutsUpdated())}},{key:"removeMenuShortcut",value:function(e){this.menuShortcuts=this.menuShortcuts.filter((function(t){return t.id!==e})),this.emitMenuShortcutsUpdated()}},{key:"sortMenuShortcuts",value:function(){var e=this;this.menuShortcuts=this.shortcutOrder.reduce((function(t,n){var r=e.menuShortcuts.find((function(e){return e.id===n}));return r&&t.push(r),t}),[])}},{key:"emitMenuShortcutsUpdated",value:function(){var e=new CustomEvent("menuShortcutsUpdated",{detail:this.menuShortcuts});this.dispatchEvent(e)}},{key:"emitLoadingStatusUpdate",value:function(e){var t=new CustomEvent("loadingStateUpdated",{detail:{loaded:e}});this.dispatchEvent(t)}},{key:"bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:PostInit",(function(t){e.bookreader=t.detail.props,e.bookReaderLoaded=!0,e.bookReaderCannotLoad=!1,e.emitLoadingStatusUpdate(!0),e.loadSharedObserver(),setTimeout((function(){e.bookreader.resize()}),0)})),window.addEventListener("BookReader:fullscreenToggled",(function(t){var n=t.detail.props,r=void 0===n?null:n;r&&(e.bookreader=r),e.manageFullScreenBehavior()}),{passive:!0}),window.addEventListener("BookReader:ToggleSearchMenu",(function(t){e.dispatchEvent(new CustomEvent(ga,{detail:{menuId:"search",action:"toggle"}}))})),window.addEventListener("LendingFlow:PostInit",(function(t){var n=t.detail,r=n.downloadTypesAvailable,o=n.lendingStatus,i=n.isAdmin,s=n.previewType;e.lendingInitialized=!0,e.downloadableTypes=r,e.lendingStatus=o,e.isAdmin=i,e.bookReaderCannotLoad="singlePagePreview"===s})),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}))}},{key:"loadSharedObserver",value:function(){var e;this.sharedObserverHandler={handleResize:this.handleResize.bind(this)},null===(e=this.sharedObserver)||void 0===e||e.addObserver({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);var s=r!==this.brWidth,a=o!==this.brHeight;i||!s&&!a||this.bookreader.resize()}},{key:"manageFullScreenBehavior",value:function(){this.emitFullScreenState(),this.bookreader.options.enableFSLogoShortcut&&(this.bookreader.isFullscreen()?this.addFullscreenShortcut():this.deleteFullscreenShortcut())}},{key:"emitFullScreenState",value:function(){var e=this.bookreader.isFullscreen(),t=new CustomEvent("ViewportInFullScreen",{detail:{isFullScreen:e}});this.dispatchEvent(t)}},{key:"loadingClass",get:function(){return this.bookReaderLoaded?"":"loading"}},{key:"itemImage",get:function(){var e="https://".concat(this.baseHost,"/services/img/").concat(this.item.metadata.identifier);return(0,r.dy)(ea||(ea=ca(['<img class="cover-img" src=',' alt="cover image for ','">'])),e,this.item.metadata.identifier)}},{key:"render",value:function(){var e=this.bookReaderCannotLoad?this.itemImage:this.loader;return(0,r.dy)(ta||(ta=ca(['<div id="book-navigator" class="','">\n ','\n <slot name="theater-main"></slot>\n </div>\n '])),this.loadingClass,e)}}])&&pa(t.prototype,n),o&&pa(t,o),l}(r.oi);function wa(e){return(wa="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})(e)}function Sa(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ca(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,r.key,r)}}function xa(e,t){return(xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e,t){if(t&&("object"===wa(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)}function _a(e){return(_a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("book-navigator",ka);var Ea=function(e){!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}}),t&&xa(e,t)}(l,e);var t,n,o,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_a(i);if(s){var n=_a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Oa(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).item=void 0,e.bookreader=void 0,e.baseHost="https://archive.org",e.fullscreen=!1,e.modal=void 0,e.sharedObserver=new Xt,e}return t=l,o=[{key:"properties",get:function(){return{item:{type:Object},baseHost:{type:String},fullscreen:{type:Boolean,reflect:!0,attribute:!0},sharedObserver:{type:Object}}}},{key:"styles",get:function(){return(0,r.iv)(ya||(ya=Sa(["\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 }\n\n :host([fullscreen]),\n ia-item-navigator[viewportinfullscreen] {\n position: fixed;\n inset: 0;\n height: 100vh;\n min-height: unset;\n }\n\n .ia-bookreader {\n background-color: var(--primaryBGColor);\n position: relative;\n min-height: inherit;\n height: inherit;\n }\n\n ia-item-navigator {\n min-height: var(--br-height, inherit);\n height: var(--br-height, inherit);\n display: block;\n width: 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 "])))}}],(n=[{key:"firstUpdated",value:function(){this.createModal()}},{key:"createModal",value:function(){this.modal=document.createElement("modal-manager"),document.body.appendChild(this.modal)}},{key:"manageFullscreen",value:function(e){var t=!!e.detail.isFullScreen;this.fullscreen=t}},{key:"render",value:function(){return(0,r.dy)(ba||(ba=Sa(['\n <div class="ia-bookreader">\n <ia-item-navigator\n ?viewportInFullscreen=',"\n @fullscreenToggled=","\n .itemType=","\n .basehost=","\n .item=","\n .modal=","\n .sharedObserver=",'\n >\n <div slot="theater-main">\n <slot name="theater-main"></slot>\n </div>\n </ia-item-navigator>\n </div>\n '])),this.fullscreen,this.manageFullscreen,"bookreader",this.baseHost,this.item,this.modal,this.sharedObserver)}}])&&Ca(t.prototype,n),o&&Ca(t,o),l}(r.oi);window.customElements.define("ia-bookreader",Ea)},8730:function(e,t,n){var r=n(111),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(8730)})},4723:function(e,t,n){"use strict";var r=n(7007),o=n(9670),i=n(7466),s=n(1340),a=n(4488),l=n(1530),c=n(7651);r("match",(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](s(n))},function(e){var r=o(this),a=s(e),d=n(t,r,a);if(d.done)return d.value;if(!r.global)return c(r,a);var u=r.unicode;r.lastIndex=0;for(var h,p=[],f=0;null!==(h=c(r,a));){var m=s(h[0]);p[f]=m,""===m&&(r.lastIndex=l(a,i(r.lastIndex),u)),f++}return 0===f?null:p}]}))},3774:function(e,t){!function(e){"use strict";function t(e,t,n,r){var o,i=!1,s=0;function a(){o&&clearTimeout(o)}function l(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=this,h=Date.now()-s;function p(){s=Date.now(),n.apply(u,c)}function f(){o=void 0}i||(r&&!o&&p(),a(),void 0===r&&h>e?p():!0!==t&&(o=setTimeout(r?f:p,void 0===r?e-h:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){a(),i=!0},l}e.debounce=function(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},function(e){e(e.s=6877)}]);
|
1436
1464
|
//# sourceMappingURL=bookreader-component-bundle.js.map
|