openmedialibrary_reader/epub.js/js/epub.min.js

1 line
243 KiB
JavaScript
Raw Normal View History

2019-01-28 17:55:51 +00:00
(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t(require('xmldom'),function(){try{return require('jszip')}catch(t){}}()):'function'==typeof define&&define.amd?define(['xmldom','jszip'],t):'object'==typeof exports?exports.ePub=t(require('xmldom'),function(){try{return require('jszip')}catch(t){}}()):e.ePub=t(e.xmldom,e.jszip)})('undefined'==typeof self?this:self,function(e,t){var n=String.prototype,a=Math.abs,i=Math.min,o=Math.ceil,r=Math.round,s=Math.max,l=Math.floor;return function(e){function t(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='/dist/',t(t.s=25)}([function(e,t,n){'use strict';function a(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')}function i(){var e=new Date().getTime(),t='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(t){var n=0|(e+16*Math.random())%16;return e=l(e/16),('x'==t?n:8|7&n).toString(16)});return t}function o(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t,n,a,i){var o=a||0,s=i||t.length,l=parseInt(o+(s-o)/2),d;return(n||(n=function(e,t){return e>t?1:e<t?-1:e==t?0:void 0}),0>=s-o)?l:(d=n(t[l],e),1==s-o?0<=d?l:l+1:0===d?l:-1===d?r(e,t,n,l,s):r(e,t,n,o,l))}function d(e,t,n,a,i){var o=a||0,r=i||t.length,s=parseInt(o+(r-o)/2),l;return(n||(n=function(e,t){return e>t?1:e<t?-1:e==t?0:void 0}),0>=r-o)?-1:(l=n(t[s],e),1==r-o?0===l?s:-1:0===l?s:-1===l?d(e,t,n,s,r):d(e,t,n,o,s))}function u(e,t){for(var n=e.parentNode,a=n.childNodes,o=-1,r=0,i;r<a.length&&(i=a[r],i.nodeType===t&&o++,i!=e);r++);return o}function c(e,t){return new Blob([e],{type:t})}function p(e,t){return'undefined'==typeof e.querySelector?e.getElementsByTagName(t):e.querySelectorAll(t)}function g(e,t,n){for(var a=document.createTreeWalker(e,n,null,!1),i=void 0;i=a.nextNode();)t(i)}function h(e,t){if(t(e))return!0;if(e=e.firstChild,e)do{var n=h(e,t);if(n)return!0;e=e.nextSibling}while(e)}function m(e){for(var t=[e];e;e=e.parentNode)t.unshift(e);return t}Object.defineProperty(t,'__esModule',{value:!0});var f=function(){function e(e,t){for(var n=0,a;n<t.length;n++)a=t[n],a.enumerable=a.enumerable||!1,a.configurable=!0,'value'in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();t.uuid=i,t.documentHeight=function(){return s(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)},t.isElement=function(e){return!!(e&&1==e.nodeType)},t.isNumber=o,t.isFloat=function(e){var t=parseFloat(e);return!1!==o(e)&&('string'==typeof e&&-1<e.indexOf('.')||l(t)!==t)},t.prefixed=function(e){var t=['Webkit','webkit','Moz','O','ms'],n=['-webkit-','-webkit-','-moz-','-o-','-ms-'],a=e[0].toUpperCase()+e.slice(1),o=t.length;if('undefined'==typeof document||'undefined'!=typeof document.body.style[e])return e;for(var r=0;r<o;r++)if('undefined'!=typeof document.body.style[t[r]+a])return n[r]+e;return e},t.defaults=function(e){for(var t=1,n=arguments.length,a;t<n;t++)for(var i in a=arguments[t],a)void 0===e[i]&&(e[i]=a[i]);return e},t.extend=function(e){var t=[].slice.call(arguments,1);return t.forEach(function(t){t&&Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}),e},t.insert=function(e,t,n){var a=r(e,t,n);return t.splice(a,0,e),a},t.locationOf=r,t.indexOfSorted=d,t.bounds=function(e){var t=window.getComputedStyle(e),n=0,a=0;return['width','paddingRight','paddingLeft','marginRight','marginLeft','borderRightWidth','borderLeftWidth'].forEach(function(e){n+=parseFloat(t[e])||0}),['height','paddingTop','paddingBottom','marginTop','marginBottom','border