@internetarchive/bookreader 5.0.0-63 → 5.0.0-64
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/node.js.yml +1 -0
- package/BookReader/BookReader.css +45 -58
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +2 -0
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +95 -95
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +2 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/1up.svg +1 -1
- package/BookReader/icons/2up.svg +1 -1
- package/BookReader/icons/advance.svg +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -1
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -1
- package/BookReader/icons/fullscreen_exit.svg +1 -1
- package/BookReader/icons/hamburger.svg +1 -1
- package/BookReader/icons/left-arrow.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/magnify.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/play.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/review.svg +1 -1
- package/BookReader/icons/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +3 -3
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_bookmark.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_hamburger.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_one_page.svg +1 -1
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_skip-ahead.svg +1 -1
- package/BookReader/images/icon_skip-back.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_thumbnails.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/icon_two_pages.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +2 -1
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +2 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +2 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +2 -0
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/CHANGELOG.md +5 -0
- package/babel.config.js +5 -4
- package/netlify.toml +4 -0
- package/package.json +15 -15
- package/src/BookNavigator/search/search-results.js +1 -7
- package/src/BookReader/utils.js +10 -0
- package/src/css/_BRnav.scss +2 -2
- package/src/css/_BRsearch.scss +38 -10
- package/src/plugins/search/plugin.search.js +14 -21
- package/src/plugins/search/utils.js +43 -0
- package/src/plugins/search/view.js +11 -24
- package/tests/e2e/helpers/desktopSearch.js +3 -3
- package/tests/jest/BookNavigator/search/search-results.test.js +6 -1
- package/tests/jest/BookReader/utils.test.js +12 -0
- package/tests/jest/plugins/search/plugin.search.test.js +2 -39
- package/tests/jest/plugins/search/plugin.search.view.test.js +5 -0
- package/tests/jest/plugins/search/utils.js +25 -0
- package/tests/jest/plugins/search/utils.test.js +29 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugins/plugin.mobile_nav.js","mappings":"mLAmCuCA,E,+CAzBjCC,EAAa,CACjB,CACEC,OAAQ,kBACRC,MAAO,aAET,CACED,OAAQ,mBACRC,MAAO,mBAET,CACED,OAAQ,eACRC,MAAO,wBAET,CACED,OAAQ,iBACRC,MAAO,kBAIXC,EAAOC,OAAOC,WAAWC,eAAgB,CACvCC,iBAAiB,EACjBC,eAAgB,mBAChBC,yBAAyB,IAG3BJ,WAAWK,UAAUC,OAAkBZ,EAUpCM,WAAWK,UAAUC,MATf,SAAUC,GACfb,EAAOc,KAAKC,KAAMF,GAElBE,KAAKP,gBAAkBK,EAAQL,gBAC/BO,KAAKN,eAAiBI,EAAQJ,eAC9BM,KAAKL,wBAA0BG,EAAQH,wBAEvCK,KAAKC,KAAKC,OAAS,OAMvBX,WAAWK,UAAUO,YAAe,SAAUlB,GAC5C,OAAO,SAAUmB,EAAMC,GAAI,IACrBC,E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mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/js/jquery.mmenu.min.js"],"sourcesContent":["/* global BookReader */\n/**\n * Adds mobile navigation at responsive breakpoint\n */\n\nimport * as utils from '../BookReader/utils.js';\nimport 'jquery.mmenu/dist/js/jquery.mmenu.min.js';\nimport 'jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js';\n\n//contains all filters and labels for checkboxs\nconst FILTERLIST = [\n {\n filter: \"grayscale(100%)\",\n label: \"Grayscale\"\n },\n {\n filter: \"brightness(120%)\",\n label: \"High brightness\"\n },\n {\n filter: \"invert(100%)\",\n label: \"Inverted (dark mode)\"\n },\n {\n filter: \"contrast(120%)\",\n label: \"High contrast\"\n },\n];\n\njQuery.extend(BookReader.defaultOptions, {\n enableMobileNav: true,\n mobileNavTitle: 'Internet Archive',\n mobileNavFullscreenOnly: false,\n});\n\nBookReader.prototype.setup = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n this.enableMobileNav = options.enableMobileNav;\n this.mobileNavTitle = options.mobileNavTitle;\n this.mobileNavFullscreenOnly = options.mobileNavFullscreenOnly;\n\n this.refs.$mmenu = null;\n };\n})(BookReader.prototype.setup);\n\n\n// Extend initToolbar\nBookReader.prototype.initToolbar = (function (super_) {\n return function (mode, ui) {\n let $mmenuEl;\n if (this.enableMobileNav) {\n const $drawerEl = this.buildMobileDrawerElement();\n this.refs.$br.append($drawerEl);\n\n // Render info into mobile info before mmenu\n this.buildInfoDiv(this.$('.BRmobileInfo'));\n this.buildShareDiv(this.$('.BRmobileShare'));\n\n $mmenuEl = $drawerEl;\n $mmenuEl.mmenu({\n navbars: [\n { \"position\": \"top\" },\n ],\n navbar: {\n add: true,\n title: this.mobileNavTitle,\n titleLink: 'panel'\n },\n extensions: [ \"panelshadow\" ],\n }, {\n offCanvas: {\n wrapPageIfNeeded: false,\n zposition: 'next',\n pageSelector: this.el,\n }\n });\n\n const $BRpageviewField = $mmenuEl.find('.BRpageviewValue');\n $mmenuEl.data('mmenu').bind('opened', () => {\n // Update \"Link to this page view\" link\n if ($BRpageviewField.length) {\n $BRpageviewField.val(window.location.href);\n }\n });\n\n //apply filters when checkboxs clicked\n $drawerEl.find('.BRcheckbox-filters')\n .on(\"click\", () => applyFilters($drawerEl, this));\n\n // Bind mobile switch buttons\n $drawerEl.find('.DrawerLayoutButton.one_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode1up));\n $drawerEl.find('.DrawerLayoutButton.two_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode2up));\n $drawerEl.find('.DrawerLayoutButton.thumbnail_mode')\n .on(\"click\", () => this.switchMode(this.constModeThumb));\n\n if (this.mobileNavFullscreenOnly) {\n $(document.body).addClass('BRbodyMobileNavEnabledFullscreen');\n } else {\n $(document.body).addClass('BRbodyMobileNavEnabled');\n }\n\n this.refs.$mmenu = $mmenuEl;\n\n }\n\n // Call the parent method at the end, because it binds events to DOM\n super_.apply(this, arguments);\n\n\n if (this.enableMobileNav) {\n // Need to bind more, console after toolbar is initialized\n this.$('.BRmobileHamburger').click(() => {\n if ($mmenuEl.data('mmenu').getInstance().vars.opened) {\n $mmenuEl.data('mmenu').close();\n } else {\n $mmenuEl.data('mmenu').open();\n this.trigger(\"mobileNavOpen\");\n }\n });\n\n\n const closeMobileMenu = (e) => {\n // Need to close the mobile menu to reset DOM & Style\n // driven by menu plugin\n const width = $( window ).width();\n const mobileMenuIsOpen = $mmenuEl.data('mmenu').getInstance().vars.opened;\n // $brBreakPointMobile: 800px;\n if (mobileMenuIsOpen && (width >= 800)) {\n $mmenuEl.data('mmenu').close ();\n }\n };\n\n window.addEventListener('resize', utils.debounce(closeMobileMenu, 900));\n }\n };\n})(BookReader.prototype.initToolbar);\n\n\nBookReader.prototype.buildToolbarElement = (function (super_) {\n return function () {\n const $el = super_.call(this);\n if (this.enableMobileNav) {\n const escapedTitle = BookReader.util.escapeHTML(this.bookTitle);\n const toolbar = `\n <span class=\"BRmobileHamburgerWrapper\">\n <button class=\"BRmobileHamburger\"></button>\n <span class=\"BRtoolbarMobileTitle\" title=\"${escapedTitle}\">${escapedTitle}</span>\n </span>\n `;\n $el\n .addClass('responsive')\n .prepend($(toolbar));\n }\n return $el;\n };\n})(BookReader.prototype.buildToolbarElement);\n\n/**\n * This method builds the html for the mobile drawer. It can be decorated to\n * extend the default drawer.\n * @return {jqueryElement}\n */\nBookReader.prototype.buildMobileDrawerElement = function() {\n let experimentalHtml = '';\n //builds filters checkbox html\n if (this.enableExperimentalControls) {\n experimentalHtml = `\n <p class=\"DrawerSettingsTitle\">Visual Adjustment</p>\n <div class=\"BRcheckbox-group-filters\">\n `;\n FILTERLIST.forEach( (el, i) => {\n const checkboxHtml = `\n <input type=\"checkbox\" class=\"BRcheckbox-filters\" id=\"filter${i}\">\n <label for=\"filter${i}\" class=\"BRcheckbox-label-filters\">${el.label}</label><br>\n \n `;\n experimentalHtml = experimentalHtml.concat(checkboxHtml);\n });\n experimentalHtml = experimentalHtml.concat(\"</div>\");\n }\n\n\n const settingsSection = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${`${this.imagesBaseURL}icon_gear.svg`}\" alt=\"settings-icon\"/>\n </span>\n Settings\n </span>\n <div class=DrawerSettingsWrapper>\n <div class=\"DrawerSettingsLayoutWrapper\">\n <button class=\"DrawerLayoutButton one_page_mode\">\n <img src=\"${this.imagesBaseURL}icon_one_page.svg\" alt=\"Single Page\"/>\n <br>\n One Page\n </button>\n <button class=\"DrawerLayoutButton two_page_mode TwoPagesButton\">\n <img src=\"${this.imagesBaseURL}icon_two_pages.svg\" alt=\"Two Pages\"/>\n <br>\n Two Pages\n </button>\n <button class=\"DrawerLayoutButton thumbnail_mode\">\n <img src=\"${this.imagesBaseURL}icon_thumbnails.svg\" alt=\"Thumbnails\"/>\n <br>\n Thumbnails\n </button>\n </div>\n <br>\n <div class=\"DrawerSettingsTitle\">Zoom</div>\n <button class='BRicon zoom_out'></button>\n <button class='BRicon zoom_in'></button>\n <br style=\"clear:both\"><br><br>\n ${experimentalHtml}\n </div>\n `;\n const moreInfo = `\n <span>\n <span class=\"DrawerIconWrapper \">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_info.svg\" alt=\"info-icon\"/>\n </span>\n About This Book\n </span>\n <div class=\"BRmobileInfo\"></div>\n `;\n const share = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_share.svg\" alt=\"info-share\"/>\n </span>\n Share This Book\n </span>\n <div class=\"BRmobileShare\"></div>\n `;\n const navMenu = `\n <nav id=\"BRmobileMenu\" class=\"BRmobileMenu\">\n <ul>\n <li class=\"BRmobileMenu__settings\">${settingsSection}</li>\n <li class=\"BRmobileMenu__moreInfoRow\">${moreInfo}</li>\n <li class=\"BRmobileMenu__share\">${share}</li>\n </ul>\n </nav>\n `;\n\n const $el = $(navMenu);\n return $el;\n};\n\n/**\n * Mmenu moves itself out side of the root BookReader element, so we need to\n * include it in the scoped $ function.\n */\nBookReader.prototype.$ = (function (super_) {\n return function (arg) {\n let $results = super_.call(this, arg);\n if (this.refs.$mmenu) {\n $results = $results.add(this.refs.$mmenu.find(arg));\n }\n return $results;\n };\n})(BookReader.prototype.$);\n\n/**\n* Dynamically creates styles combining different filters for BookReaders imgs\n* based on filters checkbox\n*/\nconst applyFilters = (drawerEl, br) => {\n let filterStr = \"\";\n\n $('.BRcheckbox-filters').each(\n (i, el) => {\n br.refs.$br.removeClass(\"filter-applied\");\n if ($(el).is(':checked')) {\n br.refs.$br.addClass($(el).attr(\"filter-applied\"));\n filterStr = filterStr + FILTERLIST[i].filter;\n }\n }\n );\n const filtersSheet = $(\"#filtersStyle\")[0] || document.createElement('style');\n filtersSheet.id = \"filtersStyle\";\n filtersSheet.innerHTML = `.BRpagecontainer img {\n filter: ${filterStr};\n -webkit-filter: ${filterStr};}`;\n document.body.appendChild(filtersSheet);\n};\n","/*\t\n * jQuery mmenu navbar addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\n!function(n){var a=\"mmenu\",t=\"navbars\";n[a].addons[t]={setup:function(){var r=this,s=this.opts[t],c=this.conf[t];if(i=n[a].glbl,\"undefined\"!=typeof s){s instanceof Array||(s=[s]);var o={};n.each(s,function(i){var d=s[i];\"boolean\"==typeof d&&d&&(d={}),\"object\"!=typeof d&&(d={}),\"undefined\"==typeof d.content&&(d.content=[\"prev\",\"title\"]),d.content instanceof Array||(d.content=[d.content]),d=n.extend(!0,{},r.opts.navbar,d);var l=d.position,h=d.height;\"number\"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),\"bottom\"!=l&&(l=\"top\"),o[l]||(o[l]=0),o[l]++;var f=n(\"<div />\").addClass(e.navbar+\" \"+e.navbar+\"-\"+l+\" \"+e.navbar+\"-\"+l+\"-\"+o[l]+\" \"+e.navbar+\"-size-\"+h);o[l]+=h-1;for(var u=0,v=0,p=d.content.length;p>v;v++){var b=n[a].addons[t][d.content[v]]||!1;b?u+=b.call(r,f,d,c):(b=d.content[v],b instanceof n||(b=n(d.content[v])),f.append(b))}u+=Math.ceil(f.children().not(\".\"+e.btn).length/h),u>1&&f.addClass(e.navbar+\"-content-\"+u),f.children(\".\"+e.btn).length&&f.addClass(e.hasbtns),f.prependTo(r.$menu)});for(var d in o)r.$menu.addClass(e.hasnavbar+\"-\"+d+\"-\"+o[d])}},add:function(){e=n[a]._c,r=n[a]._d,s=n[a]._e,e.add(\"close hasbtns\")},clickAnchor:function(n,a){}},n[a].configuration[t]={breadcrumbSeparator:\"/\"},n[a].configuration.classNames[t]={};var e,r,s,i}(jQuery),/*\t\n * jQuery mmenu navbar addon breadcrumbs content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"breadcrumbs\";n[a].addons[t][e]=function(t,e,r){var s=n[a]._c,i=n[a]._d;s.add(\"breadcrumbs separator\");var c=n('<span class=\"'+s.breadcrumbs+'\" />').appendTo(t);this.bind(\"init\",function(a){a.removeClass(s.hasnavbar).each(function(){for(var a=[],t=n(this),e=n('<span class=\"'+s.breadcrumbs+'\"></span>'),c=n(this).children().first(),o=!0;c&&c.length;){c.is(\".\"+s.panel)||(c=c.closest(\".\"+s.panel));var d=c.children(\".\"+s.navbar).children(\".\"+s.title).text();a.unshift(o?\"<span>\"+d+\"</span>\":'<a href=\"#'+c.attr(\"id\")+'\">'+d+\"</a>\"),o=!1,c=c.data(i.parent)}e.append(a.join('<span class=\"'+s.separator+'\">'+r.breadcrumbSeparator+\"</span>\")).appendTo(t.children(\".\"+s.navbar))})});var o=function(){c.html(this.$pnls.children(\".\"+s.current).children(\".\"+s.navbar).children(\".\"+s.breadcrumbs).html())};return this.bind(\"openPanel\",o),this.bind(\"init\",o),0}}(jQuery),/*\t\n * jQuery mmenu navbar addon close content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"close\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n[a].glbl,i=n('<a class=\"'+r.close+\" \"+r.btn+'\" href=\"#\" />').appendTo(t),c=function(n){i.attr(\"href\",\"#\"+n.attr(\"id\"))};return c.call(this,s.$page),this.bind(\"setPage\",c),-1}}(jQuery),/*\t\n * jQuery mmenu navbar addon next content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"next\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.next+\" \"+c.btn+'\" href=\"#\" />').appendTo(e),d=function(n){n=n||this.$pnls.children(\".\"+c.current);var a=n.find(\".\"+this.conf.classNames[t].panelNext);s=a.attr(\"href\"),i=a.html(),o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelNext=\"Next\"}(jQuery),/*\t\n * jQuery mmenu navbar addon prev content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"prev\";n[a].addons[t][e]=function(e,r){var s=n[a]._c,i=n('<a class=\"'+s.prev+\" \"+s.btn+'\" href=\"#\" />').appendTo(e);this.bind(\"init\",function(n){n.removeClass(s.hasnavbar).children(\".\"+s.navbar).addClass(s.hidden)});var c,o,d=function(n){if(n=n||this.$pnls.children(\".\"+s.current),!n.hasClass(s.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelPrev);a.length||(a=n.children(\".\"+s.navbar).children(\".\"+s.prev)),c=a.attr(\"href\"),o=a.html(),i[c?\"attr\":\"removeAttr\"](\"href\",c),i[c||o?\"removeClass\":\"addClass\"](s.hidden),i.html(o)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelPrev=\"Prev\"}(jQuery),/*\t\n * jQuery mmenu navbar addon searchfield content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"searchfield\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n('<div class=\"'+r.search+'\" />').appendTo(t);return\"object\"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=s,0}}(jQuery),/*\t\n * jQuery mmenu navbar addon title content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"title\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.title+'\" />').appendTo(e),d=function(n){if(n=n||this.$pnls.children(\".\"+c.current),!n.hasClass(c.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelTitle);a.length||(a=n.children(\".\"+c.navbar).children(\".\"+c.title)),s=a.attr(\"href\"),i=a.html()||r.title,o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(n){d.call(this)}),0},n[a].configuration.classNames[t].panelTitle=\"Title\"}(jQuery);","/*\n * jQuery mmenu v5.6.5\n * @requires jQuery 1.7.0 or later\n *\n * mmenu.frebsite.nl\n *\t\n * Copyright (c) Fred Heusschen\n * www.frebsite.nl\n *\n * License: CC-BY-NC-4.0\n * http://creativecommons.org/licenses/by-nc/4.0/\n */\n!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e(\"html\"),$body:e(\"body\")},i={},a={},o={},e.each([i,a,o],function(e,t){t.add=function(e){e=e.split(\" \");for(var n=0,s=e.length;s>n;n++)t[e[n]]=t.mm(e[n])}}),i.mm=function(e){return\"mm-\"+e},i.add(\"wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen\"),i.umm=function(e){return\"mm-\"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return\"mm-\"+e},a.add(\"parent sub\"),o.mm=function(e){return e+\".mm\"},o.add(\"transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange\"),e[n]._c=i,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n=\"mmenu\",s=\"5.6.4\";if(!(e[n]&&e[n].version>s)){e[n]=function(e,t,n){this.$menu=e,this._api=[\"bind\",\"init\",\"update\",\"setSelected\",\"getInstance\",\"openPanel\",\"closePanel\",\"closeAllPanels\"],this.opts=t,this.conf=n,this.vars={},this.cbck={},\"function\"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$pnls.children();return this._initAddons(),this.init(s),\"function\"==typeof this.___debug&&this.___debug(),this},e[n].version=s,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],navbar:{add:!0,title:\"Menu\",titleLink:\"panel\"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:\"Divider\",inset:\"Inset\",panel:\"Panel\",selected:\"Selected\",spacer:\"Spacer\",vertical:\"Vertical\"},clone:!1,openingInterval:25,panelNodetype:\"ul, ol, div\",transitionDuration:400},e[n].prototype={init:function(e){e=e.not(\".\"+i.nopanel),e=this._initPanels(e),this.trigger(\"init\",e),this.trigger(\"update\")},update:function(){this.trigger(\"update\")},setSelected:function(e){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected),e.addClass(i.selected),this.trigger(\"setSelected\",e)},openPanel:function(t){var s=t.parent(),a=this;if(s.hasClass(i.vertical)){var o=s.parents(\".\"+i.subopened);if(o.length)return void this.openPanel(o.first());s.addClass(i.opened),this.trigger(\"openPanel\",t),this.trigger(\"openingPanel\",t),this.trigger(\"openedPanel\",t)}else{if(t.hasClass(i.current))return;var r=this.$pnls.children(\".\"+i.panel),l=r.filter(\".\"+i.current);r.removeClass(i.highest).removeClass(i.current).not(t).not(l).not(\".\"+i.vertical).addClass(i.hidden),e[n].support.csstransitions||l.addClass(i.hidden),t.hasClass(i.opened)?t.nextAll(\".\"+i.opened).addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(t.addClass(i.highest),l.addClass(i.subopened)),t.removeClass(i.hidden).addClass(i.current),a.trigger(\"openPanel\",t),setTimeout(function(){t.removeClass(i.subopened).addClass(i.opened),a.trigger(\"openingPanel\",t),a.__transitionend(t,function(){a.trigger(\"openedPanel\",t)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&(t.removeClass(i.opened),this.trigger(\"closePanel\",e),this.trigger(\"closingPanel\",e),this.trigger(\"closedPanel\",e))},closeAllPanels:function(){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected).filter(\".\"+i.vertical).removeClass(i.opened);var e=this.$pnls.children(\".\"+i.panel),t=e.first();this.$pnls.children(\".\"+i.panel).not(t).removeClass(i.subopened).removeClass(i.opened).removeClass(i.current).removeClass(i.highest).addClass(i.hidden),this.openPanel(t)},togglePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&this[t.hasClass(i.opened)?\"closePanel\":\"openPanel\"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var s=0,i=this.cbck[n].length;i>s;s++)this.cbck[n][s].apply(e,t)},_initMenu:function(){this.$menu.attr(\"id\",this.$menu.attr(\"id\")||this.__getUniqueId()),this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find(\"[id]\")).filter(\"[id]\").each(function(){e(this).attr(\"id\",i.mm(e(this).attr(\"id\")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$pnls=e('<div class=\"'+i.panels+'\" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(i.wrapper);var t=[i.menu];this.opts.slidingSubmenus||t.push(i.vertical),this.opts.extensions=this.opts.extensions.length?\"mm-\"+this.opts.extensions.join(\" mm-\"):\"\",this.opts.extensions&&t.push(this.opts.extensions),this.$menu.addClass(t.join(\" \"))},_initPanels:function(t){var n=this,s=this.__findAddBack(t,\"ul, ol\");this.__refactorClass(s,this.conf.classNames.inset,\"inset\").addClass(i.nolistview+\" \"+i.nopanel),s.not(\".\"+i.nolistview).addClass(i.listview);var o=this.__findAddBack(t,\".\"+i.listview).children();this.__refactorClass(o,this.conf.classNames.selected,\"selected\"),this.__refactorClass(o,this.conf.classNames.divider,\"divider\"),this.__refactorClass(o,this.conf.classNames.spacer,\"spacer\"),this.__refactorClass(this.__findAddBack(t,\".\"+this.conf.classNames.panel),this.conf.classNames.panel,\"panel\");var r=e(),l=t.add(t.find(\".\"+i.panel)).add(this.__findAddBack(t,\".\"+i.listview).children().children(this.conf.panelNodetype)).not(\".\"+i.nopanel);this.__refactorClass(l,this.conf.classNames.vertical,\"vertical\"),this.opts.slidingSubmenus||l.addClass(i.vertical),l.each(function(){var t=e(this),s=t;t.is(\"ul, ol\")?(t.wrap('<div class=\"'+i.panel+'\" />'),s=t.parent()):s.addClass(i.panel);var a=t.attr(\"id\");t.removeAttr(\"id\"),s.attr(\"id\",a||n.__getUniqueId()),t.hasClass(i.vertical)&&(t.removeClass(n.conf.classNames.vertical),s.add(s.parent()).addClass(i.vertical)),r=r.add(s)});var d=e(\".\"+i.panel,this.$menu);r.each(function(t){var s,o,r=e(this),l=r.parent(),d=l.children(\"a, span\").first();if(l.is(\".\"+i.panels)||(l.data(a.sub,r),r.data(a.parent,l)),l.children(\".\"+i.next).length||l.parent().is(\".\"+i.listview)&&(s=r.attr(\"id\"),o=e('<a class=\"'+i.next+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').insertBefore(d),d.is(\"span\")&&o.addClass(i.fullsubopen)),!r.children(\".\"+i.navbar).length&&!l.hasClass(i.vertical)){l.parent().is(\".\"+i.listview)?l=l.closest(\".\"+i.panel):(d=l.closest(\".\"+i.panel).find('a[href=\"#'+r.attr(\"id\")+'\"]').first(),l=d.closest(\".\"+i.panel));var c=!1,p=e('<div class=\"'+i.navbar+'\" />');if(n.opts.navbar.add&&r.addClass(i.hasnavbar),l.length){switch(s=l.attr(\"id\"),n.opts.navbar.titleLink){case\"anchor\":c=d.attr(\"href\");break;case\"panel\":case\"parent\":c=\"#\"+s;break;default:c=!1}p.append('<a class=\"'+i.btn+\" \"+i.prev+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').append(e('<a class=\"'+i.title+'\"'+(c?' href=\"'+c+'\"':\"\")+\" />\").text(d.text())).prependTo(r)}else n.opts.navbar.title&&p.append('<a class=\"'+i.title+'\">'+n.opts.navbar.title+\"</a>\").prependTo(r)}});var c=this.__findAddBack(t,\".\"+i.listview).children(\".\"+i.selected).removeClass(i.selected).last().addClass(i.selected);c.add(c.parentsUntil(\".\"+i.menu,\"li\")).filter(\".\"+i.vertical).addClass(i.opened).end().each(function(){e(this).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened)}),c.children(\".\"+i.panel).not(\".\"+i.vertical).addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened);var p=d.filter(\".\"+i.opened);return p.length||(p=r.first()),p.addClass(i.opened).last().addClass(i.current),r.not(\".\"+i.vertical).not(p.last()).addClass(i.hidden).end().filter(function(){return!e(this).parent().hasClass(i.panels)}).appendTo(this.$pnls),r},_initAnchors:function(){var t=this;r.$body.on(o.click+\"-oncanvas\",\"a[href]\",function(s){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr(\"href\");if(!o&&r&&d.length>1&&\"#\"==d.slice(0,1))try{var c=e(d,t.$menu);c.is(\".\"+i.panel)&&(o=!0,t[a.parent().hasClass(i.vertical)?\"togglePanel\":\"openPanel\"](c))}catch(p){}if(o&&s.preventDefault(),!o&&r&&a.is(\".\"+i.listview+\" > li > a\")&&!a.is('[rel=\"external\"]')&&!a.is('[target=\"_blank\"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(s.target).parent());var h=t.__valueOrFn(t.opts.onClick.preventDefault,a,\"#\"==d.slice(0,1));h&&s.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,h)&&t.close()}})},_initAddons:function(){var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr(\"id\");return e&&e.length&&this.conf.clone&&(e=i.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return\"undefined\"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return\"function\"==typeof e?e.call(t[0]):\"undefined\"==typeof e&&\"undefined\"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter(\".\"+t).removeClass(t).addClass(i[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not(\".\"+i.divider).not(\".\"+i.hidden)},__transitionend:function(e,t,n){var s=!1,i=function(){s||t.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return i.mm(e[n].uniqueId++)}},e.fn[n]=function(s,i){return t(),s=e.extend(!0,{},e[n].defaults,s),i=e.extend(!0,{},e[n].configuration,i),this.each(function(){var t=e(this);if(!t.data(n)){var a=new e[n](t,s,i);a.$menu.data(n,a.__api())}})},e[n].support={touch:\"ontouchstart\"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if(\"undefined\"!=typeof Modernizr&&\"undefined\"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,t=e.style,n=\"transition\";if(\"string\"==typeof t[n])return!0;var s=[\"Moz\",\"webkit\",\"Webkit\",\"Khtml\",\"O\",\"ms\"];n=n.charAt(0).toUpperCase()+n.substr(1);for(var i=0;i<s.length;i++)if(\"string\"==typeof t[s[i]+n])return!0;return!1}()};var i,a,o,r}}(jQuery),/*\t\n * jQuery mmenu offCanvas addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"offCanvas\";e[t].addons[n]={setup:function(){if(this.opts[n]){var i=this.opts[n],a=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,[\"open\",\"close\",\"setPage\"]),(\"top\"==i.position||\"bottom\"==i.position)&&(i.zposition=\"front\"),\"string\"!=typeof a.pageSelector&&(a.pageSelector=\"> \"+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];\"left\"!=i.position&&r.push(s.mm(i.position)),\"back\"!=i.zposition&&r.push(s.mm(i.zposition)),this.$menu.addClass(r.join(\" \")).parent().removeClass(s.wrapper),this.setPage(o.$page),this._initBlocker(),this[\"_initWindow_\"+n](),this.$menu[a.menuInjectMethod+\"To\"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e,s.add(\"offcanvas slideout blocking modal background opening blocker page\"),i.add(\"style\"),a.add(\"resize\")},clickAnchor:function(e,t){if(!this.opts[n])return!1;var s=this._getOriginalMenuId();if(s&&e.is('[href=\"#'+s+'\"]'))return this.open(),!0;if(o.$page)return s=o.$page.first().attr(\"id\"),s&&e.is('[href=\"#'+s+'\"]')?(this.close(),!0):!1}},e[t].defaults[n]={position:\"left\",zposition:\"back\",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:\"div\",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:\"body\",menuInjectMethod:\"prepend\"},e[t].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger(\"open\")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(i.style,e(this).attr(\"style\")||\"\")}),o.$wndw.trigger(a.resize+\"-\"+n,[!0]);var l=[s.opened];r.blockUI&&l.push(s.blocking),\"modal\"==r.blockUI&&l.push(s.modal),r.moveBackground&&l.push(s.background),\"left\"!=r.position&&l.push(s.mm(this.opts[n].position)),\"back\"!=r.zposition&&l.push(s.mm(this.opts[n].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(\" \")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+\" \"+s.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger(\"opened\")},this.conf.transitionDuration),o.$html.addClass(s.opening),this.trigger(\"opening\")},e[t].prototype.close=function(){if(this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(s.current).removeClass(s.opened),o.$html.removeClass(s.opened).removeClass(s.blocking).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(t.opts[n].position)).removeClass(s.mm(t.opts[n].zposition)),t.opts.extensions&&o.$html.removeClass(t.opts.extensions),o.$page.each(function(){e(this).attr(\"style\",e(this).data(i.style))}),t.vars.opened=!1,t.trigger(\"closed\")},this.conf.transitionDuration),o.$html.removeClass(s.opening),this.trigger(\"close\"),this.trigger(\"closing\")}},e[t].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){var i=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(\", \"))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll(\"<\"+this.conf[n].pageNodetype+\" />\").parent())),t.each(function(){e(this).attr(\"id\",e(this).attr(\"id\")||i.__getUniqueId())}),t.addClass(s.page+\" \"+s.slideout),o.$page=t,this.trigger(\"setPage\",t)},e[t].prototype[\"_initWindow_\"+n]=function(){o.$wndw.off(a.keydown+\"-\"+n).on(a.keydown+\"-\"+n,function(e){return o.$html.hasClass(s.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var e=0;o.$wndw.off(a.resize+\"-\"+n).on(a.resize+\"-\"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(s.opened))){var i=o.$wndw.height();(n||i!=e)&&(e=i,o.$page.css(\"minHeight\",i))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id=\"'+s.blocker+'\" class=\"'+s.slideout+'\" />')),o.$blck.appendTo(o.$body).off(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n).on(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+\"-\"+n)}).off(a.mousedown+\"-\"+n).on(a.mousedown+\"-\"+n,function(e){e.preventDefault(),o.$html.hasClass(s.modal)||(t.closeAllOthers(),t.close())}))};var s,i,a,o}(jQuery),/*\t\n * jQuery mmenu scrollBugFix addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"scrollBugFix\";e[t].addons[n]={setup:function(){var i=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&(\"boolean\"==typeof r&&(r={fix:r}),\"object\"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),r.fix)){var l=this.$menu.attr(\"id\"),d=!1;this.bind(\"opening\",function(){this.$pnls.children(\".\"+s.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){i.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(e){i.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(t){i.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){i.$pnls.children(\".\"+s.current).scrollTop(0).css({\"-webkit-overflow-scrolling\":\"auto\"}).css({\"-webkit-overflow-scrolling\":\"touch\"})})}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0};var s,i,a,o}(jQuery);"],"names":["super_","FILTERLIST","filter","label","jQuery","extend","BookReader","defaultOptions","enableMobileNav","mobileNavTitle","mobileNavFullscreenOnly","prototype","setup","options","call","this","refs","$mmenu","initToolbar","mode","ui","$mmenuEl","$drawerEl","buildMobileDrawerElement","$br","append","buildInfoDiv","$","buildShareDiv","mmenu","navbars","navbar","add","title","titleLink","extensions","offCanvas","wrapPageIfNeeded","zposition","pageSelector","el","$BRpageviewField","find","data","bind","length","val","window","location","href","on","applyFilters","switchMode","constMode1up","constMode2up","constModeThumb","document","body","addClass","apply","arguments","click","getInstance","vars","opened","close","open","trigger","closeMobileMenu","e","width","addEventListener","utils","buildToolbarElement","$el","escapedTitle","util","escapeHTML","bookTitle","toolbar","prepend","experimentalHtml","enableExperimentalControls","forEach","i","checkboxHtml","concat","settingsSection","imagesBaseURL","moreInfo","share","navMenu","arg","$results","drawerEl","br","filterStr","each","removeClass","is","attr","filtersSheet","createElement","id","innerHTML","appendChild","n","a","t","addons","r","s","opts","c","conf","glbl","Array","o","d","content","l","position","h","height","Math","min","max","f","u","v","p","b","ceil","children","not","btn","hasbtns","prependTo","$menu","hasnavbar","_c","_d","_e","clickAnchor","configuration","breadcrumbSeparator","classNames","breadcrumbs","appendTo","first","panel","closest","text","unshift","parent","join","separator","html","$pnls","current","$page","next","panelNext","hidden","prev","hasClass","vertical","panelPrev","search","searchfield","addTo","panelTitle","$wndw","$docu","$html","$body","split","mm","umm","slice","version","_api","cbck","___deprecated","_initMenu","_initAnchors","_initAddons","init","___debug","uniqueId","defaults","onClick","setSelected","slidingSubmenus","divider","inset","selected","spacer","clone","openingInterval","panelNodetype","transitionDuration","nopanel","_initPanels","update","listview","openPanel","parents","subopened","highest","support","csstransitions","nextAll","setTimeout","__transitionend","closePanel","closeAllPanels","togglePanel","push","shift","__getUniqueId","contents","nodeType","remove","panels","wrapper","menu","__findAddBack","__refactorClass","nolistview","wrap","removeAttr","sub","insertBefore","fullsubopen","last","parentsUntil","end","preventDefault","__valueOrFn","target","_getOriginalMenuId","__api","__filterListItems","one","transitionend","webkitTransitionEnd","fn","touch","navigator","msMaxTouchPoints","Modernizr","documentElement","style","charAt","toUpperCase","substr","merge","pageNodetype","$allMenus","offcanvas","setPage","_initBlocker","menuInjectMethod","menuWrapperSelector","hash","blockUI","moveBackground","noPageSelector","_openSetup","_openFinish","closeAllOthers","resize","blocking","modal","background","opening","wrapAll","page","slideout","off","keydown","keyCode","css","$blck","blocker","touchstart","touchmove","stopPropagation","mousedown","fix","scrollTop","currentTarget","scrollHeight","offsetHeight","innerHeight","orientationchange"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"plugins/plugin.mobile_nav.js","mappings":"mLAmCuCA,E,+CAzBjCC,EAAa,CACjB,CACEC,OAAQ,kBACRC,MAAO,aAET,CACED,OAAQ,mBACRC,MAAO,mBAET,CACED,OAAQ,eACRC,MAAO,wBAET,CACED,OAAQ,iBACRC,MAAO,kBAIXC,EAAOC,OAAOC,WAAWC,eAAgB,CACvCC,iBAAiB,EACjBC,eAAgB,mBAChBC,yBAAyB,IAG3BJ,WAAWK,UAAUC,OAAkBZ,EAUpCM,WAAWK,UAAUC,MATf,SAAUC,GACfb,EAAOc,KAAKC,KAAMF,GAElBE,KAAKP,gBAAkBK,EAAQL,gBAC/BO,KAAKN,eAAiBI,EAAQJ,eAC9BM,KAAKL,wBAA0BG,EAAQH,wBAEvCK,KAAKC,KAAKC,OAAS,IACrB,GAKFX,WAAWK,UAAUO,YAAe,SAAUlB,GAC5C,OAAO,SAAUmB,EAAMC,GAAI,IACrBC,EADqBC,EAAA,KAEzB,GAAIP,KAAKP,gBAAiB,CACxB,IAAMe,EAAYR,KAAKS,2BACvBT,KAAKC,KAAKS,IAAIC,OAAOH,GAGrBR,KAAKY,aAAaZ,KAAKa,EAAE,kBACzBb,KAAKc,cAAcd,KAAKa,EAAE,oBAE1BP,EAAWE,GACFO,MAAM,CACbC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AU5N,EAAE6N,cAAcE,eAAe/N,EAAE6N,cAAcD,WAAW,GAAG7K,GAAE,GAAI,IAAGnE,GAAGwD,EAAEoL,UAAU,IAAIvK,EAAE,MAAMT,EAAEiH,OAAO,MAAMjH,EAAEgD,SAAQ,SAASnD,GAAGvB,EAAErB,KAAKC,QAAQM,EAAExD,MAAM,GAAGsR,aAAa9N,EAAExD,MAAMwR,eAAe3L,EAAEoL,iBAAiB,IAAG3K,EAAEuD,MAAMzH,GAAGwD,EAAE6L,mBAAkB,WAAWnN,EAAEyE,MAAMzB,SAAS,IAAItB,EAAEgD,SAASoI,UAAU,GAAGR,IAAI,CAAC,6BAA6B,SAASA,IAAI,CAAC,6BAA6B,SAAS,GAAE,CAAC,EAAE1P,IAAI,WAAW8E,EAAExC,EAAEqC,GAAGgC,GAAKrE,EAAEqC,GAAGiC,GAAGlC,EAAEpC,EAAEqC,GAAGkC,EAAE,EAAEC,YAAY,SAASxE,EAAEqC,GAAG,GAAGrC,EAAEqC,GAAGkF,SAASpF,GAAG,CAACwL,KAAI,EAAe,CAAzsC,CAA2sC9R,E","sources":["webpack://@internetarchive/bookreader/./src/plugins/plugin.mobile_nav.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/js/jquery.mmenu.min.js"],"sourcesContent":["/* global BookReader */\n/**\n * Adds mobile navigation at responsive breakpoint\n */\n\nimport * as utils from '../BookReader/utils.js';\nimport 'jquery.mmenu/dist/js/jquery.mmenu.min.js';\nimport 'jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js';\n\n//contains all filters and labels for checkboxs\nconst FILTERLIST = [\n {\n filter: \"grayscale(100%)\",\n label: \"Grayscale\"\n },\n {\n filter: \"brightness(120%)\",\n label: \"High brightness\"\n },\n {\n filter: \"invert(100%)\",\n label: \"Inverted (dark mode)\"\n },\n {\n filter: \"contrast(120%)\",\n label: \"High contrast\"\n },\n];\n\njQuery.extend(BookReader.defaultOptions, {\n enableMobileNav: true,\n mobileNavTitle: 'Internet Archive',\n mobileNavFullscreenOnly: false,\n});\n\nBookReader.prototype.setup = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n this.enableMobileNav = options.enableMobileNav;\n this.mobileNavTitle = options.mobileNavTitle;\n this.mobileNavFullscreenOnly = options.mobileNavFullscreenOnly;\n\n this.refs.$mmenu = null;\n };\n})(BookReader.prototype.setup);\n\n\n// Extend initToolbar\nBookReader.prototype.initToolbar = (function (super_) {\n return function (mode, ui) {\n let $mmenuEl;\n if (this.enableMobileNav) {\n const $drawerEl = this.buildMobileDrawerElement();\n this.refs.$br.append($drawerEl);\n\n // Render info into mobile info before mmenu\n this.buildInfoDiv(this.$('.BRmobileInfo'));\n this.buildShareDiv(this.$('.BRmobileShare'));\n\n $mmenuEl = $drawerEl;\n $mmenuEl.mmenu({\n navbars: [\n { \"position\": \"top\" },\n ],\n navbar: {\n add: true,\n title: this.mobileNavTitle,\n titleLink: 'panel'\n },\n extensions: [ \"panelshadow\" ],\n }, {\n offCanvas: {\n wrapPageIfNeeded: false,\n zposition: 'next',\n pageSelector: this.el,\n }\n });\n\n const $BRpageviewField = $mmenuEl.find('.BRpageviewValue');\n $mmenuEl.data('mmenu').bind('opened', () => {\n // Update \"Link to this page view\" link\n if ($BRpageviewField.length) {\n $BRpageviewField.val(window.location.href);\n }\n });\n\n //apply filters when checkboxs clicked\n $drawerEl.find('.BRcheckbox-filters')\n .on(\"click\", () => applyFilters($drawerEl, this));\n\n // Bind mobile switch buttons\n $drawerEl.find('.DrawerLayoutButton.one_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode1up));\n $drawerEl.find('.DrawerLayoutButton.two_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode2up));\n $drawerEl.find('.DrawerLayoutButton.thumbnail_mode')\n .on(\"click\", () => this.switchMode(this.constModeThumb));\n\n if (this.mobileNavFullscreenOnly) {\n $(document.body).addClass('BRbodyMobileNavEnabledFullscreen');\n } else {\n $(document.body).addClass('BRbodyMobileNavEnabled');\n }\n\n this.refs.$mmenu = $mmenuEl;\n\n }\n\n // Call the parent method at the end, because it binds events to DOM\n super_.apply(this, arguments);\n\n\n if (this.enableMobileNav) {\n // Need to bind more, console after toolbar is initialized\n this.$('.BRmobileHamburger').click(() => {\n if ($mmenuEl.data('mmenu').getInstance().vars.opened) {\n $mmenuEl.data('mmenu').close();\n } else {\n $mmenuEl.data('mmenu').open();\n this.trigger(\"mobileNavOpen\");\n }\n });\n\n\n const closeMobileMenu = (e) => {\n // Need to close the mobile menu to reset DOM & Style\n // driven by menu plugin\n const width = $( window ).width();\n const mobileMenuIsOpen = $mmenuEl.data('mmenu').getInstance().vars.opened;\n // $brBreakPointMobile: 800px;\n if (mobileMenuIsOpen && (width >= 800)) {\n $mmenuEl.data('mmenu').close ();\n }\n };\n\n window.addEventListener('resize', utils.debounce(closeMobileMenu, 900));\n }\n };\n})(BookReader.prototype.initToolbar);\n\n\nBookReader.prototype.buildToolbarElement = (function (super_) {\n return function () {\n const $el = super_.call(this);\n if (this.enableMobileNav) {\n const escapedTitle = BookReader.util.escapeHTML(this.bookTitle);\n const toolbar = `\n <span class=\"BRmobileHamburgerWrapper\">\n <button class=\"BRmobileHamburger\"></button>\n <span class=\"BRtoolbarMobileTitle\" title=\"${escapedTitle}\">${escapedTitle}</span>\n </span>\n `;\n $el\n .addClass('responsive')\n .prepend($(toolbar));\n }\n return $el;\n };\n})(BookReader.prototype.buildToolbarElement);\n\n/**\n * This method builds the html for the mobile drawer. It can be decorated to\n * extend the default drawer.\n * @return {jqueryElement}\n */\nBookReader.prototype.buildMobileDrawerElement = function() {\n let experimentalHtml = '';\n //builds filters checkbox html\n if (this.enableExperimentalControls) {\n experimentalHtml = `\n <p class=\"DrawerSettingsTitle\">Visual Adjustment</p>\n <div class=\"BRcheckbox-group-filters\">\n `;\n FILTERLIST.forEach( (el, i) => {\n const checkboxHtml = `\n <input type=\"checkbox\" class=\"BRcheckbox-filters\" id=\"filter${i}\">\n <label for=\"filter${i}\" class=\"BRcheckbox-label-filters\">${el.label}</label><br>\n \n `;\n experimentalHtml = experimentalHtml.concat(checkboxHtml);\n });\n experimentalHtml = experimentalHtml.concat(\"</div>\");\n }\n\n\n const settingsSection = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${`${this.imagesBaseURL}icon_gear.svg`}\" alt=\"settings-icon\"/>\n </span>\n Settings\n </span>\n <div class=DrawerSettingsWrapper>\n <div class=\"DrawerSettingsLayoutWrapper\">\n <button class=\"DrawerLayoutButton one_page_mode\">\n <img src=\"${this.imagesBaseURL}icon_one_page.svg\" alt=\"Single Page\"/>\n <br>\n One Page\n </button>\n <button class=\"DrawerLayoutButton two_page_mode TwoPagesButton\">\n <img src=\"${this.imagesBaseURL}icon_two_pages.svg\" alt=\"Two Pages\"/>\n <br>\n Two Pages\n </button>\n <button class=\"DrawerLayoutButton thumbnail_mode\">\n <img src=\"${this.imagesBaseURL}icon_thumbnails.svg\" alt=\"Thumbnails\"/>\n <br>\n Thumbnails\n </button>\n </div>\n <br>\n <div class=\"DrawerSettingsTitle\">Zoom</div>\n <button class='BRicon zoom_out'></button>\n <button class='BRicon zoom_in'></button>\n <br style=\"clear:both\"><br><br>\n ${experimentalHtml}\n </div>\n `;\n const moreInfo = `\n <span>\n <span class=\"DrawerIconWrapper \">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_info.svg\" alt=\"info-icon\"/>\n </span>\n About This Book\n </span>\n <div class=\"BRmobileInfo\"></div>\n `;\n const share = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_share.svg\" alt=\"info-share\"/>\n </span>\n Share This Book\n </span>\n <div class=\"BRmobileShare\"></div>\n `;\n const navMenu = `\n <nav id=\"BRmobileMenu\" class=\"BRmobileMenu\">\n <ul>\n <li class=\"BRmobileMenu__settings\">${settingsSection}</li>\n <li class=\"BRmobileMenu__moreInfoRow\">${moreInfo}</li>\n <li class=\"BRmobileMenu__share\">${share}</li>\n </ul>\n </nav>\n `;\n\n const $el = $(navMenu);\n return $el;\n};\n\n/**\n * Mmenu moves itself out side of the root BookReader element, so we need to\n * include it in the scoped $ function.\n */\nBookReader.prototype.$ = (function (super_) {\n return function (arg) {\n let $results = super_.call(this, arg);\n if (this.refs.$mmenu) {\n $results = $results.add(this.refs.$mmenu.find(arg));\n }\n return $results;\n };\n})(BookReader.prototype.$);\n\n/**\n* Dynamically creates styles combining different filters for BookReaders imgs\n* based on filters checkbox\n*/\nconst applyFilters = (drawerEl, br) => {\n let filterStr = \"\";\n\n $('.BRcheckbox-filters').each(\n (i, el) => {\n br.refs.$br.removeClass(\"filter-applied\");\n if ($(el).is(':checked')) {\n br.refs.$br.addClass($(el).attr(\"filter-applied\"));\n filterStr = filterStr + FILTERLIST[i].filter;\n }\n }\n );\n const filtersSheet = $(\"#filtersStyle\")[0] || document.createElement('style');\n filtersSheet.id = \"filtersStyle\";\n filtersSheet.innerHTML = `.BRpagecontainer img {\n filter: ${filterStr};\n -webkit-filter: ${filterStr};}`;\n document.body.appendChild(filtersSheet);\n};\n","/*\t\n * jQuery mmenu navbar addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\n!function(n){var a=\"mmenu\",t=\"navbars\";n[a].addons[t]={setup:function(){var r=this,s=this.opts[t],c=this.conf[t];if(i=n[a].glbl,\"undefined\"!=typeof s){s instanceof Array||(s=[s]);var o={};n.each(s,function(i){var d=s[i];\"boolean\"==typeof d&&d&&(d={}),\"object\"!=typeof d&&(d={}),\"undefined\"==typeof d.content&&(d.content=[\"prev\",\"title\"]),d.content instanceof Array||(d.content=[d.content]),d=n.extend(!0,{},r.opts.navbar,d);var l=d.position,h=d.height;\"number\"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),\"bottom\"!=l&&(l=\"top\"),o[l]||(o[l]=0),o[l]++;var f=n(\"<div />\").addClass(e.navbar+\" \"+e.navbar+\"-\"+l+\" \"+e.navbar+\"-\"+l+\"-\"+o[l]+\" \"+e.navbar+\"-size-\"+h);o[l]+=h-1;for(var u=0,v=0,p=d.content.length;p>v;v++){var b=n[a].addons[t][d.content[v]]||!1;b?u+=b.call(r,f,d,c):(b=d.content[v],b instanceof n||(b=n(d.content[v])),f.append(b))}u+=Math.ceil(f.children().not(\".\"+e.btn).length/h),u>1&&f.addClass(e.navbar+\"-content-\"+u),f.children(\".\"+e.btn).length&&f.addClass(e.hasbtns),f.prependTo(r.$menu)});for(var d in o)r.$menu.addClass(e.hasnavbar+\"-\"+d+\"-\"+o[d])}},add:function(){e=n[a]._c,r=n[a]._d,s=n[a]._e,e.add(\"close hasbtns\")},clickAnchor:function(n,a){}},n[a].configuration[t]={breadcrumbSeparator:\"/\"},n[a].configuration.classNames[t]={};var e,r,s,i}(jQuery),/*\t\n * jQuery mmenu navbar addon breadcrumbs content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"breadcrumbs\";n[a].addons[t][e]=function(t,e,r){var s=n[a]._c,i=n[a]._d;s.add(\"breadcrumbs separator\");var c=n('<span class=\"'+s.breadcrumbs+'\" />').appendTo(t);this.bind(\"init\",function(a){a.removeClass(s.hasnavbar).each(function(){for(var a=[],t=n(this),e=n('<span class=\"'+s.breadcrumbs+'\"></span>'),c=n(this).children().first(),o=!0;c&&c.length;){c.is(\".\"+s.panel)||(c=c.closest(\".\"+s.panel));var d=c.children(\".\"+s.navbar).children(\".\"+s.title).text();a.unshift(o?\"<span>\"+d+\"</span>\":'<a href=\"#'+c.attr(\"id\")+'\">'+d+\"</a>\"),o=!1,c=c.data(i.parent)}e.append(a.join('<span class=\"'+s.separator+'\">'+r.breadcrumbSeparator+\"</span>\")).appendTo(t.children(\".\"+s.navbar))})});var o=function(){c.html(this.$pnls.children(\".\"+s.current).children(\".\"+s.navbar).children(\".\"+s.breadcrumbs).html())};return this.bind(\"openPanel\",o),this.bind(\"init\",o),0}}(jQuery),/*\t\n * jQuery mmenu navbar addon close content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"close\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n[a].glbl,i=n('<a class=\"'+r.close+\" \"+r.btn+'\" href=\"#\" />').appendTo(t),c=function(n){i.attr(\"href\",\"#\"+n.attr(\"id\"))};return c.call(this,s.$page),this.bind(\"setPage\",c),-1}}(jQuery),/*\t\n * jQuery mmenu navbar addon next content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"next\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.next+\" \"+c.btn+'\" href=\"#\" />').appendTo(e),d=function(n){n=n||this.$pnls.children(\".\"+c.current);var a=n.find(\".\"+this.conf.classNames[t].panelNext);s=a.attr(\"href\"),i=a.html(),o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelNext=\"Next\"}(jQuery),/*\t\n * jQuery mmenu navbar addon prev content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"prev\";n[a].addons[t][e]=function(e,r){var s=n[a]._c,i=n('<a class=\"'+s.prev+\" \"+s.btn+'\" href=\"#\" />').appendTo(e);this.bind(\"init\",function(n){n.removeClass(s.hasnavbar).children(\".\"+s.navbar).addClass(s.hidden)});var c,o,d=function(n){if(n=n||this.$pnls.children(\".\"+s.current),!n.hasClass(s.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelPrev);a.length||(a=n.children(\".\"+s.navbar).children(\".\"+s.prev)),c=a.attr(\"href\"),o=a.html(),i[c?\"attr\":\"removeAttr\"](\"href\",c),i[c||o?\"removeClass\":\"addClass\"](s.hidden),i.html(o)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelPrev=\"Prev\"}(jQuery),/*\t\n * jQuery mmenu navbar addon searchfield content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"searchfield\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n('<div class=\"'+r.search+'\" />').appendTo(t);return\"object\"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=s,0}}(jQuery),/*\t\n * jQuery mmenu navbar addon title content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"title\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.title+'\" />').appendTo(e),d=function(n){if(n=n||this.$pnls.children(\".\"+c.current),!n.hasClass(c.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelTitle);a.length||(a=n.children(\".\"+c.navbar).children(\".\"+c.title)),s=a.attr(\"href\"),i=a.html()||r.title,o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(n){d.call(this)}),0},n[a].configuration.classNames[t].panelTitle=\"Title\"}(jQuery);","/*\n * jQuery mmenu v5.6.5\n * @requires jQuery 1.7.0 or later\n *\n * mmenu.frebsite.nl\n *\t\n * Copyright (c) Fred Heusschen\n * www.frebsite.nl\n *\n * License: CC-BY-NC-4.0\n * http://creativecommons.org/licenses/by-nc/4.0/\n */\n!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e(\"html\"),$body:e(\"body\")},i={},a={},o={},e.each([i,a,o],function(e,t){t.add=function(e){e=e.split(\" \");for(var n=0,s=e.length;s>n;n++)t[e[n]]=t.mm(e[n])}}),i.mm=function(e){return\"mm-\"+e},i.add(\"wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen\"),i.umm=function(e){return\"mm-\"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return\"mm-\"+e},a.add(\"parent sub\"),o.mm=function(e){return e+\".mm\"},o.add(\"transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange\"),e[n]._c=i,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n=\"mmenu\",s=\"5.6.4\";if(!(e[n]&&e[n].version>s)){e[n]=function(e,t,n){this.$menu=e,this._api=[\"bind\",\"init\",\"update\",\"setSelected\",\"getInstance\",\"openPanel\",\"closePanel\",\"closeAllPanels\"],this.opts=t,this.conf=n,this.vars={},this.cbck={},\"function\"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$pnls.children();return this._initAddons(),this.init(s),\"function\"==typeof this.___debug&&this.___debug(),this},e[n].version=s,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],navbar:{add:!0,title:\"Menu\",titleLink:\"panel\"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:\"Divider\",inset:\"Inset\",panel:\"Panel\",selected:\"Selected\",spacer:\"Spacer\",vertical:\"Vertical\"},clone:!1,openingInterval:25,panelNodetype:\"ul, ol, div\",transitionDuration:400},e[n].prototype={init:function(e){e=e.not(\".\"+i.nopanel),e=this._initPanels(e),this.trigger(\"init\",e),this.trigger(\"update\")},update:function(){this.trigger(\"update\")},setSelected:function(e){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected),e.addClass(i.selected),this.trigger(\"setSelected\",e)},openPanel:function(t){var s=t.parent(),a=this;if(s.hasClass(i.vertical)){var o=s.parents(\".\"+i.subopened);if(o.length)return void this.openPanel(o.first());s.addClass(i.opened),this.trigger(\"openPanel\",t),this.trigger(\"openingPanel\",t),this.trigger(\"openedPanel\",t)}else{if(t.hasClass(i.current))return;var r=this.$pnls.children(\".\"+i.panel),l=r.filter(\".\"+i.current);r.removeClass(i.highest).removeClass(i.current).not(t).not(l).not(\".\"+i.vertical).addClass(i.hidden),e[n].support.csstransitions||l.addClass(i.hidden),t.hasClass(i.opened)?t.nextAll(\".\"+i.opened).addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(t.addClass(i.highest),l.addClass(i.subopened)),t.removeClass(i.hidden).addClass(i.current),a.trigger(\"openPanel\",t),setTimeout(function(){t.removeClass(i.subopened).addClass(i.opened),a.trigger(\"openingPanel\",t),a.__transitionend(t,function(){a.trigger(\"openedPanel\",t)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&(t.removeClass(i.opened),this.trigger(\"closePanel\",e),this.trigger(\"closingPanel\",e),this.trigger(\"closedPanel\",e))},closeAllPanels:function(){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected).filter(\".\"+i.vertical).removeClass(i.opened);var e=this.$pnls.children(\".\"+i.panel),t=e.first();this.$pnls.children(\".\"+i.panel).not(t).removeClass(i.subopened).removeClass(i.opened).removeClass(i.current).removeClass(i.highest).addClass(i.hidden),this.openPanel(t)},togglePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&this[t.hasClass(i.opened)?\"closePanel\":\"openPanel\"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var s=0,i=this.cbck[n].length;i>s;s++)this.cbck[n][s].apply(e,t)},_initMenu:function(){this.$menu.attr(\"id\",this.$menu.attr(\"id\")||this.__getUniqueId()),this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find(\"[id]\")).filter(\"[id]\").each(function(){e(this).attr(\"id\",i.mm(e(this).attr(\"id\")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$pnls=e('<div class=\"'+i.panels+'\" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(i.wrapper);var t=[i.menu];this.opts.slidingSubmenus||t.push(i.vertical),this.opts.extensions=this.opts.extensions.length?\"mm-\"+this.opts.extensions.join(\" mm-\"):\"\",this.opts.extensions&&t.push(this.opts.extensions),this.$menu.addClass(t.join(\" \"))},_initPanels:function(t){var n=this,s=this.__findAddBack(t,\"ul, ol\");this.__refactorClass(s,this.conf.classNames.inset,\"inset\").addClass(i.nolistview+\" \"+i.nopanel),s.not(\".\"+i.nolistview).addClass(i.listview);var o=this.__findAddBack(t,\".\"+i.listview).children();this.__refactorClass(o,this.conf.classNames.selected,\"selected\"),this.__refactorClass(o,this.conf.classNames.divider,\"divider\"),this.__refactorClass(o,this.conf.classNames.spacer,\"spacer\"),this.__refactorClass(this.__findAddBack(t,\".\"+this.conf.classNames.panel),this.conf.classNames.panel,\"panel\");var r=e(),l=t.add(t.find(\".\"+i.panel)).add(this.__findAddBack(t,\".\"+i.listview).children().children(this.conf.panelNodetype)).not(\".\"+i.nopanel);this.__refactorClass(l,this.conf.classNames.vertical,\"vertical\"),this.opts.slidingSubmenus||l.addClass(i.vertical),l.each(function(){var t=e(this),s=t;t.is(\"ul, ol\")?(t.wrap('<div class=\"'+i.panel+'\" />'),s=t.parent()):s.addClass(i.panel);var a=t.attr(\"id\");t.removeAttr(\"id\"),s.attr(\"id\",a||n.__getUniqueId()),t.hasClass(i.vertical)&&(t.removeClass(n.conf.classNames.vertical),s.add(s.parent()).addClass(i.vertical)),r=r.add(s)});var d=e(\".\"+i.panel,this.$menu);r.each(function(t){var s,o,r=e(this),l=r.parent(),d=l.children(\"a, span\").first();if(l.is(\".\"+i.panels)||(l.data(a.sub,r),r.data(a.parent,l)),l.children(\".\"+i.next).length||l.parent().is(\".\"+i.listview)&&(s=r.attr(\"id\"),o=e('<a class=\"'+i.next+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').insertBefore(d),d.is(\"span\")&&o.addClass(i.fullsubopen)),!r.children(\".\"+i.navbar).length&&!l.hasClass(i.vertical)){l.parent().is(\".\"+i.listview)?l=l.closest(\".\"+i.panel):(d=l.closest(\".\"+i.panel).find('a[href=\"#'+r.attr(\"id\")+'\"]').first(),l=d.closest(\".\"+i.panel));var c=!1,p=e('<div class=\"'+i.navbar+'\" />');if(n.opts.navbar.add&&r.addClass(i.hasnavbar),l.length){switch(s=l.attr(\"id\"),n.opts.navbar.titleLink){case\"anchor\":c=d.attr(\"href\");break;case\"panel\":case\"parent\":c=\"#\"+s;break;default:c=!1}p.append('<a class=\"'+i.btn+\" \"+i.prev+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').append(e('<a class=\"'+i.title+'\"'+(c?' href=\"'+c+'\"':\"\")+\" />\").text(d.text())).prependTo(r)}else n.opts.navbar.title&&p.append('<a class=\"'+i.title+'\">'+n.opts.navbar.title+\"</a>\").prependTo(r)}});var c=this.__findAddBack(t,\".\"+i.listview).children(\".\"+i.selected).removeClass(i.selected).last().addClass(i.selected);c.add(c.parentsUntil(\".\"+i.menu,\"li\")).filter(\".\"+i.vertical).addClass(i.opened).end().each(function(){e(this).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened)}),c.children(\".\"+i.panel).not(\".\"+i.vertical).addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened);var p=d.filter(\".\"+i.opened);return p.length||(p=r.first()),p.addClass(i.opened).last().addClass(i.current),r.not(\".\"+i.vertical).not(p.last()).addClass(i.hidden).end().filter(function(){return!e(this).parent().hasClass(i.panels)}).appendTo(this.$pnls),r},_initAnchors:function(){var t=this;r.$body.on(o.click+\"-oncanvas\",\"a[href]\",function(s){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr(\"href\");if(!o&&r&&d.length>1&&\"#\"==d.slice(0,1))try{var c=e(d,t.$menu);c.is(\".\"+i.panel)&&(o=!0,t[a.parent().hasClass(i.vertical)?\"togglePanel\":\"openPanel\"](c))}catch(p){}if(o&&s.preventDefault(),!o&&r&&a.is(\".\"+i.listview+\" > li > a\")&&!a.is('[rel=\"external\"]')&&!a.is('[target=\"_blank\"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(s.target).parent());var h=t.__valueOrFn(t.opts.onClick.preventDefault,a,\"#\"==d.slice(0,1));h&&s.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,h)&&t.close()}})},_initAddons:function(){var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr(\"id\");return e&&e.length&&this.conf.clone&&(e=i.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return\"undefined\"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return\"function\"==typeof e?e.call(t[0]):\"undefined\"==typeof e&&\"undefined\"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter(\".\"+t).removeClass(t).addClass(i[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not(\".\"+i.divider).not(\".\"+i.hidden)},__transitionend:function(e,t,n){var s=!1,i=function(){s||t.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return i.mm(e[n].uniqueId++)}},e.fn[n]=function(s,i){return t(),s=e.extend(!0,{},e[n].defaults,s),i=e.extend(!0,{},e[n].configuration,i),this.each(function(){var t=e(this);if(!t.data(n)){var a=new e[n](t,s,i);a.$menu.data(n,a.__api())}})},e[n].support={touch:\"ontouchstart\"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if(\"undefined\"!=typeof Modernizr&&\"undefined\"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,t=e.style,n=\"transition\";if(\"string\"==typeof t[n])return!0;var s=[\"Moz\",\"webkit\",\"Webkit\",\"Khtml\",\"O\",\"ms\"];n=n.charAt(0).toUpperCase()+n.substr(1);for(var i=0;i<s.length;i++)if(\"string\"==typeof t[s[i]+n])return!0;return!1}()};var i,a,o,r}}(jQuery),/*\t\n * jQuery mmenu offCanvas addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"offCanvas\";e[t].addons[n]={setup:function(){if(this.opts[n]){var i=this.opts[n],a=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,[\"open\",\"close\",\"setPage\"]),(\"top\"==i.position||\"bottom\"==i.position)&&(i.zposition=\"front\"),\"string\"!=typeof a.pageSelector&&(a.pageSelector=\"> \"+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];\"left\"!=i.position&&r.push(s.mm(i.position)),\"back\"!=i.zposition&&r.push(s.mm(i.zposition)),this.$menu.addClass(r.join(\" \")).parent().removeClass(s.wrapper),this.setPage(o.$page),this._initBlocker(),this[\"_initWindow_\"+n](),this.$menu[a.menuInjectMethod+\"To\"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e,s.add(\"offcanvas slideout blocking modal background opening blocker page\"),i.add(\"style\"),a.add(\"resize\")},clickAnchor:function(e,t){if(!this.opts[n])return!1;var s=this._getOriginalMenuId();if(s&&e.is('[href=\"#'+s+'\"]'))return this.open(),!0;if(o.$page)return s=o.$page.first().attr(\"id\"),s&&e.is('[href=\"#'+s+'\"]')?(this.close(),!0):!1}},e[t].defaults[n]={position:\"left\",zposition:\"back\",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:\"div\",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:\"body\",menuInjectMethod:\"prepend\"},e[t].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger(\"open\")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(i.style,e(this).attr(\"style\")||\"\")}),o.$wndw.trigger(a.resize+\"-\"+n,[!0]);var l=[s.opened];r.blockUI&&l.push(s.blocking),\"modal\"==r.blockUI&&l.push(s.modal),r.moveBackground&&l.push(s.background),\"left\"!=r.position&&l.push(s.mm(this.opts[n].position)),\"back\"!=r.zposition&&l.push(s.mm(this.opts[n].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(\" \")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+\" \"+s.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger(\"opened\")},this.conf.transitionDuration),o.$html.addClass(s.opening),this.trigger(\"opening\")},e[t].prototype.close=function(){if(this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(s.current).removeClass(s.opened),o.$html.removeClass(s.opened).removeClass(s.blocking).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(t.opts[n].position)).removeClass(s.mm(t.opts[n].zposition)),t.opts.extensions&&o.$html.removeClass(t.opts.extensions),o.$page.each(function(){e(this).attr(\"style\",e(this).data(i.style))}),t.vars.opened=!1,t.trigger(\"closed\")},this.conf.transitionDuration),o.$html.removeClass(s.opening),this.trigger(\"close\"),this.trigger(\"closing\")}},e[t].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){var i=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(\", \"))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll(\"<\"+this.conf[n].pageNodetype+\" />\").parent())),t.each(function(){e(this).attr(\"id\",e(this).attr(\"id\")||i.__getUniqueId())}),t.addClass(s.page+\" \"+s.slideout),o.$page=t,this.trigger(\"setPage\",t)},e[t].prototype[\"_initWindow_\"+n]=function(){o.$wndw.off(a.keydown+\"-\"+n).on(a.keydown+\"-\"+n,function(e){return o.$html.hasClass(s.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var e=0;o.$wndw.off(a.resize+\"-\"+n).on(a.resize+\"-\"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(s.opened))){var i=o.$wndw.height();(n||i!=e)&&(e=i,o.$page.css(\"minHeight\",i))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id=\"'+s.blocker+'\" class=\"'+s.slideout+'\" />')),o.$blck.appendTo(o.$body).off(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n).on(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+\"-\"+n)}).off(a.mousedown+\"-\"+n).on(a.mousedown+\"-\"+n,function(e){e.preventDefault(),o.$html.hasClass(s.modal)||(t.closeAllOthers(),t.close())}))};var s,i,a,o}(jQuery),/*\t\n * jQuery mmenu scrollBugFix addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"scrollBugFix\";e[t].addons[n]={setup:function(){var i=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&(\"boolean\"==typeof r&&(r={fix:r}),\"object\"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),r.fix)){var l=this.$menu.attr(\"id\"),d=!1;this.bind(\"opening\",function(){this.$pnls.children(\".\"+s.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){i.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(e){i.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(t){i.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){i.$pnls.children(\".\"+s.current).scrollTop(0).css({\"-webkit-overflow-scrolling\":\"auto\"}).css({\"-webkit-overflow-scrolling\":\"touch\"})})}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0};var s,i,a,o}(jQuery);"],"names":["super_","FILTERLIST","filter","label","jQuery","extend","BookReader","defaultOptions","enableMobileNav","mobileNavTitle","mobileNavFullscreenOnly","prototype","setup","options","call","this","refs","$mmenu","initToolbar","mode","ui","$mmenuEl","_this","$drawerEl","buildMobileDrawerElement","$br","append","buildInfoDiv","$","buildShareDiv","mmenu","navbars","navbar","add","title","titleLink","extensions","offCanvas","wrapPageIfNeeded","zposition","pageSelector","el","$BRpageviewField","find","data","bind","length","val","window","location","href","on","applyFilters","switchMode","constMode1up","constMode2up","constModeThumb","document","body","addClass","apply","arguments","click","getInstance","vars","opened","close","open","trigger","addEventListener","utils","e","width","buildToolbarElement","$el","escapedTitle","util","escapeHTML","bookTitle","toolbar","concat","prepend","experimentalHtml","enableExperimentalControls","forEach","i","checkboxHtml","settingsSection","imagesBaseURL","moreInfo","share","navMenu","arg","$results","drawerEl","br","filterStr","each","removeClass","is","attr","filtersSheet","createElement","id","innerHTML","appendChild","n","a","t","addons","r","s","opts","c","conf","glbl","Array","o","d","content","l","position","h","height","Math","min","max","f","u","v","p","b","ceil","children","not","btn","hasbtns","prependTo","$menu","hasnavbar","_c","_d","_e","clickAnchor","configuration","breadcrumbSeparator","classNames","breadcrumbs","appendTo","first","panel","closest","text","unshift","parent","join","separator","html","$pnls","current","$page","next","panelNext","hidden","prev","hasClass","vertical","panelPrev","search","searchfield","addTo","panelTitle","$wndw","$docu","$html","$body","split","mm","umm","slice","version","_api","cbck","___deprecated","_initMenu","_initAnchors","_initAddons","init","___debug","uniqueId","defaults","onClick","setSelected","slidingSubmenus","divider","inset","selected","spacer","clone","openingInterval","panelNodetype","transitionDuration","nopanel","_initPanels","update","listview","openPanel","parents","subopened","highest","support","csstransitions","nextAll","setTimeout","__transitionend","closePanel","closeAllPanels","togglePanel","push","shift","__getUniqueId","contents","nodeType","remove","panels","wrapper","menu","__findAddBack","__refactorClass","nolistview","wrap","removeAttr","sub","insertBefore","fullsubopen","last","parentsUntil","end","preventDefault","__valueOrFn","target","_getOriginalMenuId","__api","__filterListItems","one","transitionend","webkitTransitionEnd","fn","touch","navigator","msMaxTouchPoints","Modernizr","documentElement","style","charAt","toUpperCase","substr","merge","pageNodetype","$allMenus","offcanvas","setPage","_initBlocker","menuInjectMethod","menuWrapperSelector","hash","blockUI","moveBackground","noPageSelector","_openSetup","_openFinish","closeAllOthers","resize","blocking","modal","background","opening","wrapAll","page","slideout","off","keydown","keyCode","css","$blck","blocker","touchstart","touchmove","stopPropagation","mousedown","fix","scrollTop","currentTarget","scrollHeight","offsetHeight","innerHeight","orientationchange"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{5842:function(e,o,t){var n={};function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;try{return e.cookie,!1}catch(e){return!0}}t.r(n),t.d(n,{areCookiesBlocked:function(){return r},getItem:function(){return u},removeItem:function(){return i},setItem:function(){return c}}),t(1058),t(4916),t(4723),t(5306),t(4603),t(9714);var a=r();function u(e){return a||!e?null:decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function c(e,o,t,n,r,u){return!a&&(document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+(t?"; expires=".concat(t.toUTCString()):"")+(r?"; domain=".concat(r):"")+(n?"; path=".concat(n):"")+(u?"; secure":""),!0)}function i(e,o,t){return!a&&!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(t?"; domain=".concat(t):"")+(o?"; path=".concat(o):""),!0)}var s,d=t(
|
1
|
+
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{5842:function(e,o,t){var n={};function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;try{return e.cookie,!1}catch(e){return!0}}t.r(n),t.d(n,{areCookiesBlocked:function(){return r},getItem:function(){return u},removeItem:function(){return i},setItem:function(){return c}}),t(1058),t(4916),t(4723),t(5306),t(4603),t(9714);var a=r();function u(e){return a||!e?null:decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function c(e,o,t,n,r,u){return!a&&(document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+(t?"; expires=".concat(t.toUTCString()):"")+(r?"; domain=".concat(r):"")+(n?"; path=".concat(n):"")+(u?"; secure":""),!0)}function i(e,o,t){return!a&&!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(t?"; domain=".concat(t):"")+(o?"; path=".concat(o):""),!0)}var s,d=t(5311);BookReader.docCookies=n,d.extend(BookReader.defaultOptions,{enablePageResume:!0,resumeCookiePath:null}),BookReader.prototype.init=(s=BookReader.prototype.init,function(){var e=this;s.call(this),this.options.enablePageResume&&this.bind(BookReader.eventNames.fragmentChange,(function(){var o=e.paramsFromCurrent();e.updateResumeValue(o.index)}))}),BookReader.prototype.getResumeValue=function(){var e=BookReader.docCookies.getItem("br-resume");return null!==e?parseInt(e):null},BookReader.prototype.getCookiePath=function(e){return e.match(".+?(?=/page/|/mode/|$)")[0]},BookReader.prototype.updateResumeValue=function(e,o){var t=new Date(+new Date+12096e5),n=this.options.resumeCookiePath||this.getCookiePath(window.location.pathname);BookReader.docCookies.setItem(o||"br-resume",e,t,n,null,!1)}}},function(e){e(e.s=5842)}]);
|
2
2
|
//# sourceMappingURL=plugin.resume.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugins/plugin.resume.js","mappings":"wJAgBO,SAASA,IAAkC,IAAhBC,
|
1
|
+
{"version":3,"file":"plugins/plugin.resume.js","mappings":"wJAgBO,SAASA,IAAkC,IAAhBC,EAAGC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGG,SACtC,IAEE,OADAJ,EAAIK,QACG,CACT,CAAE,MAAOC,GACP,OAAO,CACT,CACF,C,iMAEA,IAAMC,EAAkBR,IASjB,SAASS,EAAQC,GACtB,OAAIF,IAAoBE,EAAa,KAE9BC,mBAELN,SAASC,OAAOM,QAAQ,IAAIC,OAAO,mBAAqBC,mBAAmBJ,GAAME,QAAQ,cAAe,QAAU,+BAAgC,QAAU,IAChK,CAcO,SAASG,EAAQL,EAAMM,EAAQC,EAAMC,EAAOC,E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archive/bookreader/./src/plugins/plugin.resume.js"],"sourcesContent":["/**\n * Helper module use to get, set and remove item from cookie\n *\n * See more:\n * https://developer.mozilla.org/en-US/docs/Web/API/document.cookie\n * https://developer.mozilla.org/User:fusionchess\n * https://github.com/madmurphy/cookies.js\n * This framework is released under the GNU Public License, version 3 or later.\n * http://www.gnu.org/licenses/gpl-3.0-standalone.html\n */\n\n/**\n * Check to see if the browser has cookies enabled.\n * Accessing document.cookies errors if eg iframe with sandbox enabled.\n * @returns {boolean}\n */\nexport function areCookiesBlocked(doc = document) {\n try {\n doc.cookie;\n return false;\n } catch (e) {\n return true;\n }\n}\n\nconst COOKIES_BLOCKED = areCookiesBlocked();\n\n/**\n * Get specific key's value stored in cookie\n *\n * @param {string} sKey\n *\n * @returns {string|null}\n */\nexport function getItem(sKey) {\n if (COOKIES_BLOCKED || !sKey) return null;\n\n return decodeURIComponent(\n // eslint-disable-next-line no-useless-escape\n document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + encodeURIComponent(sKey).replace(/[\\-\\.\\+\\*]/g, '\\\\$&') + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1')) || null;\n}\n\n/**\n * Set specific key's value in cookie\n *\n * @param {string} sKey cookie name\n * @param {string} sValue cookie value\n * @param {string} [vEnd] expire|max-age\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain] domain name\n * @param {boolean} [bSecure]\n *\n * @returns {boolean}\n */\nexport function setItem(sKey, sValue, vEnd, sPath, sDomain, bSecure) {\n if (COOKIES_BLOCKED) return false;\n\n document.cookie = encodeURIComponent(sKey) + '=' + encodeURIComponent(sValue)\n + (vEnd ? `; expires=${vEnd.toUTCString()}` : '')\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '')\n + (bSecure ? `; secure` : '');\n\n return true;\n}\n\n/**\n * BROKEN Remove specific key's value from cookie\n * @fixme hasItem isn't even implemented! This will always error.\n * @param {string} sKey cookie name\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain]\n *\n * @returns {boolean}\n */\nexport function removeItem(sKey, sPath, sDomain) {\n if (COOKIES_BLOCKED) return false;\n // eslint-disable-next-line\n if (!hasItem(sKey)) return false;\n\n document.cookie = encodeURIComponent(sKey) + `=; expires=Thu, 01 Jan 1970 00:00:00 GMT`\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '');\n\n return true;\n}\n","import * as docCookies from '../util/docCookies.js';\n\n/* global BookReader */\n\n/** @deprecated Exposed for backward compatibility */\nBookReader.docCookies = docCookies;\n\n/**\n * Plugin to remember the current page number in a cookie\n */\njQuery.extend(BookReader.defaultOptions, {\n enablePageResume: true,\n /** @type {string|null} eg '/', '/details/id' */\n resumeCookiePath: null,\n});\n\n/** @override */\nBookReader.prototype.init = (function(super_) {\n return function() {\n super_.call(this);\n if (this.options.enablePageResume) {\n this.bind(BookReader.eventNames.fragmentChange, () => {\n const params = this.paramsFromCurrent();\n this.updateResumeValue(params.index);\n });\n }\n };\n})(BookReader.prototype.init);\n\n/**\n * Gets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @return {number|null}\n */\nBookReader.prototype.getResumeValue = function() {\n const val = BookReader.docCookies.getItem('br-resume');\n if (val !== null) return parseInt(val);\n else return null;\n};\n\n/**\n * Return cookie path using pathname up to /page/... or /mode/...\n * using window.location.pathname for urlPathPart:\n * - matches encoding\n * - ignores querystring part\n * - ignores fragment part (after #)\n * @param {string} urlPathPart - window.location.pathname\n */\nBookReader.prototype.getCookiePath = function(urlPathPart) {\n return urlPathPart.match('.+?(?=/page/|/mode/|$)')[0];\n};\n\n/**\n * Sets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @param {Number} index leaf index\n * @param {string} [cookieName]\n */\nBookReader.prototype.updateResumeValue = function(index, cookieName) {\n const ttl = new Date(+new Date + 12096e5); // 2 weeks\n // For multiple files in item, leave resumeCookiePath blank\n // It's likely we can remove resumeCookiePath using getCookiePath()\n const path = this.options.resumeCookiePath\n || this.getCookiePath(window.location.pathname);\n BookReader.docCookies.setItem(cookieName || 'br-resume', index, ttl, path, null, false);\n};\n"],"names":["areCookiesBlocked","doc","arguments","length","undefined","document","cookie","e","COOKIES_BLOCKED","getItem","sKey","decodeURIComponent","replace","RegExp","encodeURIComponent","setItem","sValue","vEnd","sPath","sDomain","bSecure","concat","toUTCString","removeItem","hasItem","super_","BookReader","docCookies","jQuery","extend","defaultOptions","enablePageResume","resumeCookiePath","prototype","init","_this","call","this","options","bind","eventNames","fragmentChange","params","paramsFromCurrent","updateResumeValue","index","getResumeValue","val","parseInt","getCookiePath","urlPathPart","match","cookieName","ttl","Date","path","window","location","pathname"],"sourceRoot":""}
|
@@ -1,2 +1,3 @@
|
|
1
|
-
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{8011:function(e,t,r){"use strict";r(5666),r(4916),r(4765),r(9826),r(1539),r(1249),r(5306),r(2222),r(6992),r(3948),r(9601),r(9720),r(4678),r(8674),r(8783),r(1637),r(7042),r(8309),r(1038),r(2526),r(1817),r(2165);var n=r(5685),a=r(9860),i=(r(4603),r(9714),r(4747),r(1058),r(3609));function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o,c=function(){function e(t){var r=t.br,n=t.searchCancelledCallback,a=void 0===n?function(){}:n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=r,this.matcher=new RegExp("{{{([^]+?)}}}","g"),this.matches=[],this.cacheDOMElements(),this.bindEvents(),this.cancelSearch=a}var t,r;return t=e,(r=[{key:"cacheDOMElements",value:function(){this.dom={},this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.br.removeSearchResults(),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),e&&this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";i(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=i(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return t[0]>r}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return e[e.length-1]>r}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(r,n){if(1===r.length)return r[0];var a=r.slice(0,r.length/2),i=r.slice(r.length/2);return t(e(a,i,n)?a:i,n)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation&&this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation&&(this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length))}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=i(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var r=e.text,a=t.br.book.leafNumToIndex(e.par[0].page),s=t.br.constructor.util.cssPercentage(a,t.br.book.getNumLeafs()-1),o=(0,n.escapeHTML)(r).replace(t.matcher,"<b>$1</b>"),c="";r.length>100&&(c=r.replace(/^(.{100}[^\s]*).*/,"$1"),c=(0,n.escapeHTML)(c).replace(t.matcher,"<b>$1</b>")+"..."),i("<div>").addClass("BRsearch").css({left:s}).attr("title","Search result").append('\n <div class="BRquery">\n <div>'.concat(c||o,"</div>\n <div>Page ").concat(e.displayPageNumber,"</div>\n </div>\n ")).appendTo(t.br.$(".BRnavline")).on("mouseenter",(function(e){var t=e.currentTarget,r=t.querySelector(".BRquery"),n=r.getBoundingClientRect(),a=t.getBoundingClientRect(),s=2*parseInt(getComputedStyle(r).paddingLeft);n.x-s<0&&r.style.setProperty("transform","translateX(-".concat(a.left-s,"px)")),i(".BRsearch,.BRchapter").removeClass("front"),i(e.target).addClass("front")})).on("mouseleave",(function(e){return i(e.target).removeClass("front")})).on("click",(function(){t.br._searchPluginGoToResult(e.matchIndex)}))}))}},{key:"toggleSearchPending",value:function(e){var t=this;e?this.br.showProgressPopup("Search results will appear below...",(function(){return t.progressPopupClosed()})):this.br.removeProgressPopup()}},{key:"progressPopupClosed",value:function(){this.toggleSearchPending(),this.cancelSearch()}},{key:"renderErrorModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t="".concat(e?"":"The text may still be processing. ","Please try again.");this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n ".concat(t,"\n ")),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var r=this,n=t.results,a=t.options;this.matches=n.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderPins(n.matches),this.toggleSearchPending(!1),a.goToFirstResult?i(document).one("BookReader:pageChanged",(function(){r.br.resize()})):this.br.resize()}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.toggleSearchPending(!1);var a=null==n||null===(e=n.detail)||void 0===e||null===(t=e.props)||void 0===t||null===(r=t.results)||void 0===r?void 0:r.indexed;this.renderErrorModal(a)}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e="BookReader:";window.addEventListener("".concat(e,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)),i(document).on("".concat(e,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(e,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(e,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(e,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(e,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),h=r(3609),l=r(3609);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,a=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw a}}return i}}(e,t)||p(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 d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t,r,n,a,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,a)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){f(i,n,a,s,o,"next",e)}function o(e){f(i,n,a,s,o,"throw",e)}s(void 0)}))}}h.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideUrl:"/fulltext/inside.php",initialSearchTerm:null}),BookReader.prototype.setup=(o=BookReader.prototype.setup,function(e){o.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchXHR=null,this._cancelSearch.bind(this),this.cancelSearchRequest.bind(this),this._searchBoxesByIndex={},this.searchView=void 0}),BookReader.prototype.init=function(e){return function(){var t=this;e.call(this),this.searchView=new c({br:this,searchCancelledCallback:function(){t._cancelSearch(),t.trigger("SearchCanceled",{term:t.searchTerm,instance:t})}}),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.options.goToFirstResult,suppressFragmentChange:!1})}}(BookReader.prototype.init),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype._createPageContainer=function(e){return function(t){var r=e.call(this,t);if(this.enableSearch&&r.page&&t in this._searchBoxesByIndex){var n=r.page.index,i=this._searchBoxesByIndex[n];(0,a.Tm)("searchHiliteLayer",i,r.page,r.$container[0],i.map((function(e){return"match-index-".concat(e.matchIndex)})))}return r}}(BookReader.prototype._createPageContainer),BookReader.prototype.search=g(regeneratorRuntime.mark((function e(){var t,r,n,a,i,s,o,c,u,d,p,v,f=this,g=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=g.length>0&&void 0!==g[0]?g[0]:"",r=g.length>1&&void 0!==g[1]?g[1]:{},n={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},a=h.extend({},n,r),this.suppressFragmentChange=a.suppressFragmentChange,this.searchCancelled=!1,this.searchTerm=t.replace(/\//g," "),a.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange),i=this.server.replace(/:.+/,""),s="https://".concat(i).concat(this.searchInsideUrl,"?"),o=this.bookPath,c="/".concat(this.subPrefix),this.bookPath.length-this.bookPath.lastIndexOf(c)==c.length&&(o=this.bookPath.substr(0,this.bookPath.length-c.length)),u={item_id:this.bookId,doc:this.subPrefix,path:o,q:t},d=l.param(u).replace(/%2F/g,"/"),p="".concat(s).concat(d),v=function(e){if(!f.searchCancelled){var t=e.error||!e.matches.length,r="function"==typeof a.error,n="function"==typeof a.success;t?(console.error("Search Inside Response Error",e.error||"matches.length == 0"),r?a.error.call(f,e,a):f.BRSearchCallbackError(e,a)):n?a.success.call(f,e,a):f.BRSearchCallback(e,a)}},this.trigger("SearchStarted",{term:this.searchTerm,instance:this}),e.t0=v,e.next=21,l.ajax({url:p,dataType:"jsonp",cache:!0,beforeSend:function(e){f.searchXHR=e}});case 21:e.t1=e.sent,(0,e.t0)(e.t1);case 23:case"end":return e.stop()}}),e,this)}))),BookReader.prototype._cancelSearch=function(){var e;null===(e=this.searchXHR)||void 0===e||e.abort(),this.searchView.clearSearchFieldAndResults(!1),this.searchTerm="",this.searchXHR=null,this.searchCancelled=!0,this.searchResults=[]},BookReader.prototype.cancelSearchRequest=function(){this.searchCancelled=!0,null!==this.searchXHR&&(this._cancelSearch(),this.searchView.toggleSearchPending(),this.trigger("SearchCanceled",{term:this.searchTerm,instance:this}))},BookReader.prototype.BRSearchCallback=function(e,t){var r=this;!function(e,t){var n,a,i=d(e.matches.entries());try{for(i.s();!(n=i.n()).done;){var s=u(n.value,2),o=s[0],c=s[1];c.matchIndex=o,c.displayPageNumber=(a=c.par[0].page,r.book.getPageNum(r.book.leafNumToIndex(a)));var h,l=d(c.par);try{for(l.s();!(h=l.n()).done;){var p,v=d(h.value.boxes);try{for(v.s();!(p=v.n()).done;)p.value.matchIndex=o}catch(e){v.e(e)}finally{v.f()}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}(e),this.searchResults=e||[],this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult&&this._searchPluginGoToResult(0),this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var r=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",r)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){var e,t=(null===(e=this.searchResults)||void 0===e?void 0:e.matches)||[],r={};this.removeSearchHilites();var n,i=d(t);try{for(i.s();!(n=i.n()).done;){var s,o=d(n.value.par[0].boxes);try{for(o.s();!(s=o.n()).done;){var c=s.value,h=this.book.leafNumToIndex(c.page);(r[h]||(r[h]=[])).push(c)}}catch(e){o.e(e)}finally{o.f()}}}catch(e){i.e(e)}finally{i.f()}for(var l=0,p=Object.entries(r);l<p.length;l++){var v,f=u(p[l],2),g=f[0],b=f[1],m=parseFloat(g),y=this.book.getPage(m),k=d(this.getActivePageContainerElementsForIndex(m));try{for(k.s();!(v=k.n()).done;){var S=v.value;(0,a.Tm)("searchHiliteLayer",b,y,S,b.map((function(e){return"match-index-".concat(e.matchIndex)})))}}catch(e){k.e(e)}finally{k.f()}}this._searchBoxesByIndex=r},BookReader.prototype.removeSearchHilites=function(){l(this.getActivePageContainerElements()).find(".searchHiliteLayer").remove()},BookReader.prototype._searchPluginGoToResult=function(){var e=g(regeneratorRuntime.mark((function e(t){var r,a,i,s,o,c,h,u,p,v,f,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=this.searchResults)||void 0===r?void 0:r.matches[t],i=this.book,s=i.leafNumToIndex(a.par[0].page),o=i.getPage(s),c=Math.abs(this.currentIndex()-s)<3,h=!1,o.isViewable){e.next=17;break}return e.next=9,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:o.leafNum})).then((function(e){return e.json()}));case 9:u=e.sent,p=d(u.value);try{for(p.s();!(v=p.n()).done;)f=v.value,i.getPage(i.leafNumToIndex(f)).makeViewable()}catch(e){p.e(e)}finally{p.f()}if(u.value.length||(i.getPage(s).makeViewable(),h=!0),this._modes.mode1Up.mode1UpLit.updatePages(),this.activeMode!=this._modes.mode1Up){e.next=17;break}return e.next=17,this._modes.mode1Up.mode1UpLit.updateComplete;case 17:return this._isIndexDisplayed(s)||(this.suppressFragmentChange=!1,this.jumpToIndex(s)),h&&i.getPage(s).makeViewable(!1),e.next=21,(0,n.poll)((function(){return l("rect.match-index-".concat(a.matchIndex))}),{until:function(e){return e.length>0}});case 21:if(!(g=e.sent).length){e.next=28;break}return g.css("animation","none"),g[0].scrollIntoView({block:this.constMode1up==this.mode||this.isFullscreenActive?"center":"nearest",inline:"center",behavior:c?"smooth":"auto"}),e.next=27,new Promise((function(e){return setTimeout(e,100)}));case 27:g.removeAttr("style");case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,r=[];if(null==t)return!1;if(this.constMode2up==this.mode)r=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;r=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var n=e.book.leafNumToIndex(t.page);if(h.inArray(n,r)>=0)return!0}))})),!1}},2814:function(e,t,r){var n=r(7854),a=r(7293),i=r(1702),s=r(1340),o=r(3111).trim,c=r(1361),h=i("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,p=1/l(c+"-0")!=-1/0||d&&!a((function(){l(Object(d))}));e.exports=p?function(e){var t=o(s(e)),r=l(t);return 0===r&&"-"==h(t,0)?-0:r}:l},9720:function(e,t,r){var n=r(2109),a=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return a(e)}})},4678:function(e,t,r){var n=r(2109),a=r(2814);n({global:!0,forced:parseFloat!=a},{parseFloat:a})}},function(e){e(e.s=8011)}]);
|
1
|
+
/*! For license information please see plugin.search.js.LICENSE.txt */
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{2225:function(e,t,r){"use strict";r(4916),r(4765),r(9826),r(1539),r(1249),r(5306),r(2222),r(9601),r(8674),r(9720),r(4678),r(6992),r(8783),r(3948),r(1637),r(2526),r(1817),r(2165),r(2443),r(3680),r(3706),r(2703),r(489),r(4747),r(8309),r(5069),r(7042),r(9714),r(1038);var n=r(5685),a=r(9860),o=(r(1058),r(6649),r(6078),r(9653),r(5311));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},i(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===i(a)?a:String(a)),n)}var a}var c=function(){function e(t){var r=t.br,n=t.searchCancelledCallback,a=void 0===n?function(){}:n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=r,this.matches=[],this.cacheDOMElements(),this.bindEvents(),this.cancelSearch=a}var t,r;return t=e,r=[{key:"cacheDOMElements",value:function(){this.dom={},this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.br.removeSearchResults(),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),e&&this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";o(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=o(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return t[0]>r}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return e[e.length-1]>r}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(r,n){if(1===r.length)return r[0];var a=r.slice(0,r.length/2),o=r.slice(r.length/2);return t(e(a,o,n)?a:o,n)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation&&this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation&&(this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length))}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=o(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var r=t.br.book.leafNumToIndex(e.par[0].page),n=t.br.constructor.util.cssPercentage(r,t.br.book.getNumLeafs()-1),a=e.html;if(a.length>200){var i=Math.max(0,a.indexOf("<mark>")-100);0!=i&&(a="…"+e.html.substring(i).replace(/^\S+/,""))}o("<div>").addClass("BRsearch").css({left:n}).attr("title","Search result").append('\n <div class="BRquery">\n <main>'.concat(a,"</main>\n <footer>Page ").concat(e.displayPageNumber,"</footer>\n </div>\n ")).appendTo(t.br.$(".BRnavline")).on("mouseenter",(function(e){var t=e.currentTarget,r=t.querySelector(".BRquery"),n=r.getBoundingClientRect(),a=t.getBoundingClientRect(),i=2*parseInt(getComputedStyle(r).paddingLeft);n.x-i<0&&r.style.setProperty("transform","translateX(-".concat(a.left-i,"px)")),o(".BRsearch,.BRchapter").removeClass("front"),o(e.target).addClass("front")})).on("mouseleave",(function(e){return o(e.target).removeClass("front")})).on("click",(function(){t.br._searchPluginGoToResult(e.matchIndex)}))}))}},{key:"toggleSearchPending",value:function(e){var t=this;e?this.br.showProgressPopup("Search results will appear below...",(function(){return t.progressPopupClosed()})):this.br.removeProgressPopup()}},{key:"progressPopupClosed",value:function(){this.toggleSearchPending(),this.cancelSearch()}},{key:"renderErrorModal",value:function(){var e="".concat(arguments.length>0&&void 0!==arguments[0]&&arguments[0]?"":"The text may still be processing. ","Please try again.");this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n ".concat(e,"\n ")),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var r=this,n=t.results,a=t.options;this.matches=n.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderPins(n.matches),this.toggleSearchPending(!1),a.goToFirstResult?o(document).one("BookReader:pageChanged",(function(){r.br.resize()})):this.br.resize()}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.toggleSearchPending(!1);var a=null==n||null===(e=n.detail)||void 0===e||null===(t=e.props)||void 0===t||null===(r=t.results)||void 0===r?void 0:r.indexed;this.renderErrorModal(a)}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e="BookReader:";window.addEventListener("".concat(e,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)),o(document).on("".concat(e,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(e,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(e,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(e,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(e,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this))}}],r&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),h=c;function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t,r){var a=(0,n.escapeRegExp)((0,n.escapeHTML)(t)),o=(0,n.escapeRegExp)((0,n.escapeHTML)(r)),i=new RegExp("".concat(a,"([^]+?)").concat(o),"g");return(0,n.escapeHTML)(e).replace(i,"<mark>$1</mark>").replace(/(\b)- /g,"$1")}r(4603);var p,v=r(5311),g=r(5311);function m(e){return m="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},m(e)}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function b(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function h(e,t,r,a){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),s=new B(a||[]);return n(i,"_invoke",{value:R(e,r,s)}),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=h;var u={};function d(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(C([])));y&&y!==t&&r.call(y,o)&&(v=y);var b=p.prototype=d.prototype=Object.create(v);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function a(n,o,i,s){var c=l(e[n],e,o);if("throw"!==c.type){var h=c.arg,u=h.value;return u&&"object"==m(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){a("next",e,i,s)}),(function(e){a("throw",e,i,s)})):t.resolve(u).then((function(e){h.value=e,i(h)}),(function(e){return a("throw",e,i,s)}))}s(c.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function R(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=w(i,r);if(s){if(s===u)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),u;var a=l(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,u;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:M}}function M(){return{value:void 0,done:!0}}return f.prototype=p,n(b,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:f,configurable:!0}),f.displayName=c(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},S(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(h(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,B.prototype={constructor:B,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;I(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function x(e,t,r,n,a,o,i){try{var s=e[o](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){x(o,n,a,i,s,"next",e)}function s(e){x(o,n,a,i,s,"throw",e)}i(void 0)}))}}v.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideProtocol:"https",searchInsideUrl:"/fulltext/inside.php",searchInsidePreTag:"{{{",searchInsidePostTag:"}}}",initialSearchTerm:null}),BookReader.prototype.setup=(p=BookReader.prototype.setup,function(e){p.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchXHR=null,this._cancelSearch.bind(this),this.cancelSearchRequest.bind(this),this._searchBoxesByIndex={},this.searchView=void 0}),BookReader.prototype.init=function(e){return function(){var t=this;e.call(this),this.searchView=new h({br:this,searchCancelledCallback:function(){t._cancelSearch(),t.trigger("SearchCanceled",{term:t.searchTerm,instance:t})}}),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.options.goToFirstResult,suppressFragmentChange:!1})}}(BookReader.prototype.init),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype._createPageContainer=function(e){return function(t){var r=e.call(this,t);if(this.enableSearch&&r.page&&t in this._searchBoxesByIndex){var n=r.page.index,o=this._searchBoxesByIndex[n];(0,a.Tm)("searchHiliteLayer",o,r.page,r.$container[0],o.map((function(e){return"match-index-".concat(e.matchIndex)})))}return r}}(BookReader.prototype._createPageContainer),BookReader.prototype.search=R(k().mark((function e(){var t,r,n,a,o,i,s,c,h,l,u,d,f=this,p=arguments;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:"",r=p.length>1&&void 0!==p[1]?p[1]:{},n={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},a=v.extend({},n,r),this.suppressFragmentChange=a.suppressFragmentChange,this.searchCancelled=!1,this.searchTerm=t.replace(/\//g," "),a.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange),o=this.server.replace(/:.+/,""),i="".concat(this.options.searchInsideProtocol,"://").concat(o).concat(this.searchInsideUrl,"?"),s=this.bookPath,c="/".concat(this.subPrefix),this.bookPath.length-this.bookPath.lastIndexOf(c)==c.length&&(s=this.bookPath.substr(0,this.bookPath.length-c.length)),h={item_id:this.bookId,doc:this.subPrefix,path:s,q:t,pre_tag:this.options.searchInsidePreTag,post_tag:this.options.searchInsidePostTag},l=g.param(h).replace(/%2F/g,"/"),u="".concat(i).concat(l),d=function(e){if(!f.searchCancelled){var t=e.error||!e.matches.length,r="function"==typeof a.error,n="function"==typeof a.success;t?(console.error("Search Inside Response Error",e.error||"matches.length == 0"),r?a.error.call(f,e,a):f.BRSearchCallbackError(e,a)):n?a.success.call(f,e,a):f.BRSearchCallback(e,a)}},this.trigger("SearchStarted",{term:this.searchTerm,instance:this}),e.t0=d,e.next=21,g.ajax({url:u,dataType:"jsonp",cache:!0,beforeSend:function(e){f.searchXHR=e}});case 21:e.t1=e.sent,(0,e.t0)(e.t1);case 23:case"end":return e.stop()}}),e,this)}))),BookReader.prototype._cancelSearch=function(){var e;null===(e=this.searchXHR)||void 0===e||e.abort(),this.searchView.clearSearchFieldAndResults(!1),this.searchTerm="",this.searchXHR=null,this.searchCancelled=!0,this.searchResults=[]},BookReader.prototype.cancelSearchRequest=function(){this.searchCancelled=!0,null!==this.searchXHR&&(this._cancelSearch(),this.searchView.toggleSearchPending(),this.trigger("SearchCanceled",{term:this.searchTerm,instance:this}))},BookReader.prototype.BRSearchCallback=function(e,t){var r=this;!function(e,t,n,a){var o,i,s,c,h=l(e.matches.entries());try{for(h.s();!(o=h.n()).done;){var d=(s=o.value,c=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],c=!0,h=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){h=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(h)throw a}}return s}}(s,c)||u(s,c)||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.")}()),p=d[0],v=d[1];v.matchIndex=p,v.displayPageNumber=(i=v.par[0].page,r.book.getPageNum(r.book.leafNumToIndex(i))),v.html=f(v.text,n,a);var g,m=l(v.par);try{for(m.s();!(g=m.n()).done;){var y,b=l(g.value.boxes);try{for(b.s();!(y=b.n()).done;)y.value.matchIndex=p}catch(e){b.e(e)}finally{b.f()}}}catch(e){m.e(e)}finally{m.f()}}}catch(e){h.e(e)}finally{h.f()}}(e,0,this.options.searchInsidePreTag,this.options.searchInsidePostTag),this.searchResults=e||[],this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult&&this._searchPluginGoToResult(0),this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var r=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",r)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){var e,t=(null===(e=this.searchResults)||void 0===e?void 0:e.matches)||[],r={};this.removeSearchHilites();var n,o,i,s=y(t);try{for(s.s();!(n=s.n()).done;){var c,h=y(n.value.par[0].boxes);try{for(h.s();!(c=h.n()).done;){var l=c.value,u=this.book.leafNumToIndex(l.page);(r[u]||(r[u]=[])).push(l)}}catch(e){h.e(e)}finally{h.f()}}}catch(e){s.e(e)}finally{s.f()}for(var d=0,f=Object.entries(r);d<f.length;d++){var p,v=(o=f[d],i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],c=!0,h=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){h=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(h)throw a}}return s}}(o,i)||b(o,i)||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.")}()),g=v[0],m=v[1],S=parseFloat(g),k=this.book.getPage(S),x=y(this.getActivePageContainerElementsForIndex(S));try{for(x.s();!(p=x.n()).done;){var R=p.value;(0,a.Tm)("searchHiliteLayer",m,k,R,m.map((function(e){return"match-index-".concat(e.matchIndex)})))}}catch(e){x.e(e)}finally{x.f()}}this._searchBoxesByIndex=r},BookReader.prototype.removeSearchHilites=function(){g(this.getActivePageContainerElements()).find(".searchHiliteLayer").remove()},BookReader.prototype._searchPluginGoToResult=function(){var e=R(k().mark((function e(t){var r,a,o,i,s,c,h,l,u,d,f,p;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=this.searchResults)||void 0===r?void 0:r.matches[t],o=this.book,i=o.leafNumToIndex(a.par[0].page),s=o.getPage(i),c=Math.abs(this.currentIndex()-i)<3,h=!1,s.isViewable){e.next=17;break}return e.next=9,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:s.leafNum})).then((function(e){return e.json()}));case 9:l=e.sent,u=y(l.value);try{for(u.s();!(d=u.n()).done;)f=d.value,o.getPage(o.leafNumToIndex(f)).makeViewable()}catch(e){u.e(e)}finally{u.f()}if(l.value.length||(o.getPage(i).makeViewable(),h=!0),this._modes.mode1Up.mode1UpLit.updatePages(),this.activeMode!=this._modes.mode1Up){e.next=17;break}return e.next=17,this._modes.mode1Up.mode1UpLit.updateComplete;case 17:return this._isIndexDisplayed(i)||(this.suppressFragmentChange=!1,this.jumpToIndex(i)),h&&o.getPage(i).makeViewable(!1),e.next=21,(0,n.poll)((function(){return g("rect.match-index-".concat(a.matchIndex))}),{until:function(e){return e.length>0}});case 21:if(!(p=e.sent).length){e.next=28;break}return p.css("animation","none"),p[0].scrollIntoView({block:this.constMode1up==this.mode||this.isFullscreenActive?"center":"nearest",inline:"center",behavior:c?"smooth":"auto"}),e.next=27,new Promise((function(e){return setTimeout(e,100)}));case 27:p.removeAttr("style");case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,r=[];if(null==t)return!1;if(this.constMode2up==this.mode)r=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;r=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var n=e.book.leafNumToIndex(t.page);if(v.inArray(n,r)>=0)return!0}))})),!1}},2814:function(e,t,r){var n=r(7854),a=r(7293),o=r(1702),i=r(1340),s=r(3111).trim,c=r(1361),h=o("".charAt),l=n.parseFloat,u=n.Symbol,d=u&&u.iterator,f=1/l(c+"-0")!=-1/0||d&&!a((function(){l(Object(d))}));e.exports=f?function(e){var t=s(i(e)),r=l(t);return 0===r&&"-"==h(t,0)?-0:r}:l},9720:function(e,t,r){var n=r(2109),a=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return a(e)}})},4678:function(e,t,r){var n=r(2109),a=r(2814);n({global:!0,forced:parseFloat!=a},{parseFloat:a})}},function(e){e(e.s=2225)}]);
|
2
3
|
//# sourceMappingURL=plugin.search.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|