mangadex/scripts/reader.min.js
2021-03-14 14:31:55 -07:00

8 lines
202 KiB
JavaScript

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=89)}([function(e,t){var r=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(2),a=r(0),i=r(8),o=r(9),u=r(14),s=function(e,t,r){var l,c,d,f=e&s.F,h=e&s.G,g=e&s.S,p=e&s.P,m=e&s.B,v=e&s.W,y=h?a:a[t]||(a[t]={}),w=y.prototype,b=h?n:g?n[t]:(n[t]||{}).prototype;for(l in h&&(r=t),r)(c=!f&&b&&void 0!==b[l])&&u(y,l)||(d=c?b[l]:r[l],y[l]=h&&"function"!=typeof b[l]?r[l]:m&&c?i(d,n):v&&b[l]==d?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):p&&"function"==typeof d?i(Function.call,d):d,p&&((y.virtual||(y.virtual={}))[l]=d,e&s.R&&w&&!w[l]&&o(w,l,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(45)("wks"),a=r(34),i=r(2).Symbol,o="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=n},function(e,t,r){var n=r(6),a=r(59),i=r(43),o=Object.defineProperty;t.f=r(7)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),a)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(5);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){var n=r(22);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,a){return e.call(t,r,n,a)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){var n=r(4),a=r(23);e.exports=r(7)?function(e,t,r){return n.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(62),a=r(40);e.exports=function(e){return n(a(e))}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(106));t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),(0,n.default)(e,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},function(e,t,r){"use strict";var n=r(93)(!0);r(41)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){e.exports={default:r(115),__esModule:!0}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,r){r(98);for(var n=r(2),a=r(9),i=r(17),o=r(3)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<u.length;s++){var l=u[s],c=n[l],d=c&&c.prototype;d&&!d[o]&&a(d,o,l),i[l]=i.Array}},function(e,t,r){e.exports={default:r(144),__esModule:!0}},function(e,t,r){e.exports={default:r(92),__esModule:!0}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(4).f,a=r(14),i=r(3)("toStringTag");e.exports=function(e,t,r){e&&!a(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(8),a=r(66),i=r(67),o=r(6),u=r(33),s=r(48),l={},c={};(t=e.exports=function(e,t,r,d,f){var h,g,p,m,v=f?function(){return e}:s(e),y=n(r,d,t?2:1),w=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(i(v)){for(h=u(e.length);h>w;w++)if((m=t?y(o(g=e[w])[0],g[1]):y(e[w]))===l||m===c)return m}else for(p=v.call(e);!(g=p.next()).done;)if((m=a(p,y,g.value,t))===l||m===c)return m}).BREAK=l,t.RETURN=c},function(e,t,r){"use strict";t.__esModule=!0;var n=o(r(132)),a=o(r(134)),i="function"==typeof a.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof a.default&&"symbol"===i(n.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(27));t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";t.__esModule=!0;var n=o(r(146)),a=o(r(150)),i=o(r(27));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,a.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},function(e,t){},function(e,t,r){var n=r(6),a=r(95),i=r(46),o=r(44)("IE_PROTO"),u=function(){},s=function(){var e,t=r(42)("iframe"),n=i.length;for(t.style.display="none",r(63).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;n--;)delete s.prototype[i[n]];return s()};e.exports=Object.create||function(e,t){var r;return null!==e?(u.prototype=n(e),r=new u,u.prototype=null,r[o]=e):r=s(),void 0===t?r:a(r,t)}},function(e,t,r){var n=r(61),a=r(46);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){var n=r(39),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(40);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(24),a=r(3)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?r:i?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(27)),a=o(r(11)),i=o(r(12));function o(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"range",value:function(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=[],a=e;a<t;a+=r)n.push(a);return n}},{key:"clamp",value:function(e,t,r){return Math.max(t,Math.min(e,r))}},{key:"emptyNode",value:function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}},{key:"scrollBy",value:function(){window.scrollBy.apply(null,arguments)}},{key:"stableSort",value:function(e,t){t=t||function(e,t){return e<t?-1:e>t?1:0};var r=e.map(function(e,t){return[e,t]});r.sort(function(e,r){var n=t(e[0],r[0]);return 0!=n?n:e[1]-r[1]});for(var n=0;n<e.length;++n)e[n]=r[n][0];return e}}]),e}();t.default=u;try{window.scrollBy({top:0,behavior:"smooth"})}catch(e){u.scrollBy=function(){var e=arguments[0];switch(void 0===e?"undefined":(0,n.default)(e)){case"object":return window.scrollBy(e.top||0,e.left||0);case"number":return window.scrollBy.apply(null,arguments)}}}"object"===(0,n.default)(t)&&"object"===(0,n.default)(e)&&(e.exports=u)}).call(this,r(159)(e))},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(21),a=r(1),i=r(60),o=r(9),u=r(17),s=r(94),l=r(25),c=r(64),d=r(3)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,r,g,p,m,v){s(r,t,g);var y,w,b,T=function(e){if(!f&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},_=t+" Iterator",k="values"==p,S=!1,E=e.prototype,C=E[d]||E["@@iterator"]||p&&E[p],x=C||T(p),P=p?k?T("entries"):x:void 0,M="Array"==t&&E.entries||C;if(M&&(b=c(M.call(new e)))!==Object.prototype&&b.next&&(l(b,_,!0),n||"function"==typeof b[d]||o(b,d,h)),k&&C&&"values"!==C.name&&(S=!0,x=function(){return C.call(this)}),n&&!v||!f&&!S&&E[d]||o(E,d,x),u[t]=x,u[_]=h,p)if(y={values:k?x:T("values"),keys:m?x:T("keys"),entries:P},v)for(w in y)w in E||i(E,w,y[w]);else a(a.P+a.F*(f||S),t,y);return y}},function(e,t,r){var n=r(5),a=r(2).document,i=n(a)&&n(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,r){var n=r(5);e.exports=function(e,t){if(!n(e))return e;var r,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){var n=r(45)("keys"),a=r(34);e.exports=function(e){return n[e]||(n[e]=a(e))}},function(e,t,r){var n=r(0),a=r(2),i=a["__core-js_shared__"]||(a["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(21)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(36),a=r(3)("iterator"),i=r(17);e.exports=r(0).getIteratorMethod=function(e){if(void 0!=e)return e[a]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(22);e.exports.f=function(e){return new function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}(e)}},function(e,t,r){var n=r(9);e.exports=function(e,t,r){for(var a in t)r&&e[a]?e[a]=t[a]:n(e,a,t[a]);return e}},function(e,t,r){e.exports={default:r(110),__esModule:!0}},function(e,t,r){var n=r(34)("meta"),a=r(5),i=r(14),o=r(4).f,u=0,s=Object.isExtensible||function(){return!0},l=!r(16)(function(){return s(Object.preventExtensions({}))}),c=function(e){o(e,n,{value:{i:"O"+ ++u,w:{}}})},d=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!i(e,n)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&d.NEED&&s(e)&&!i(e,n)&&c(e),e}}},function(e,t,r){var n=r(5);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){t.f=r(3)},function(e,t,r){var n=r(2),a=r(0),i=r(21),o=r(54),u=r(4).f;e.exports=function(e){var t=a.Symbol||(a.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:o.f(e)})}},function(e,t,r){var n=r(37),a=r(23),i=r(10),o=r(43),u=r(14),s=r(59),l=Object.getOwnPropertyDescriptor;t.f=r(7)?l:function(e,t){if(e=i(e),t=o(t,!0),s)try{return l(e,t)}catch(e){}if(u(e,t))return a(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";t.__esModule=!0;var n=i(r(141)),a=i(r(15));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,n.default)(Object(e)))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var u,s=(0,a.default)(e);!(n=(u=s.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(r(20)),a=b(r(51)),i=b(r(86)),o=b(r(15)),u=b(r(57)),s=b(r(19)),l=b(r(11)),c=b(r(12)),d=b(r(28)),f=b(r(29)),h=b(r(85)),g=b(r(74)),p=w(r(161)),m=b(r(162)),v=w(r(163)),y=b(r(38));function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}var T=function(e){function t(e){(0,l.default)(this,t);var r=(0,d.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r.model=e,r.el=null,r.imageContainer=null,r.renderer=null,r._isRendering=!1,r._lastHistoryUpdate=Date.now(),r._listeners={},r}return(0,f.default)(t,e),(0,c.default)(t,[{key:"initialize",value:function(e){if(!e)throw new Error("Main container missing");if(this.el=e,this.imageContainer=this.el.querySelector(".reader-images"),!this.imageContainer)throw new Error("Image container (.reader-images) missing");this.el.classList.remove("container"),this.el.classList.add("reader","row","flex-column","no-gutters"),this.el.classList.add("layout-horizontal");var t=document.querySelector("footer");if(t&&t.classList.add("d-none"),document.body.style.removeProperty("margin-bottom"),this.model.isUserGuest){var r=this.el.querySelector("#report-button");r&&(r.dataset.toggle="",r.href="/login",r.firstElementChild.classList.replace("fa-flag","fa-sign-in-alt"))}var n=!0,a=!1,s=void 0;try{for(var l,c=(0,o.default)((0,i.default)(this.model.settings));!(n=(l=c.next()).done);n=!0){var d=l.value,f=(0,u.default)(d,2),h=f[0],g=f[1];this.onSettingChange(h,g)}}catch(e){a=!0,s=e}finally{try{!n&&c.return&&c.return()}finally{if(a)throw s}}this.onRenderingModeChange(),this.onDisplayFitChange(),this.onDirectionChange(),this.initializeModelEventHandlers()}},{key:"addListeners",value:function(){this.listenSettingEvents(),this.listenButtonEvents(),this.listenInputs()}},{key:"initializeModelEventHandlers",value:function(){var e=this;this.model.on("loadingchange",function(){return e.onLoadingChange()}),this.model.on("renderingmodechange",function(){return e.onRenderingModeChange()}),this.model.on("displayfitchange",function(){return e.onDisplayFitChange()}),this.model.on("directionchange",function(){return e.onDirectionChange()}),this.model.on("chapterchange",function(){return e.onChapterChange()}),this.model.on("mangachange",function(){return e.onMangaChange()}),this.model.on("statechange",function(){return e.onStateChange()}),this.model.on("currentpagechange",function(){return e.onCurrentPageChange()}),this.model.on("readererror",function(t){return e.onReaderError(t)}),this.model.on("pageload",function(t){return e.onPageLoad(t)}),this.model.on("pageerror",function(t){return e.onPageError(t)}),this.model.on("settingchange",function(t,r){return e.onSettingChange(t,r)})}},{key:"onLoadingChange",value:function(){this.el.classList.toggle("is-loading",this.model.isLoading||this._isRendering)}},{key:"onRenderingModeChange",value:function(){null!=this.renderer&&this.renderer.destroy();var e=t.getRendererClass(this.model.renderingMode);if(this.renderer=new e(this.imageContainer,this.model,this),this.el.dataset.renderer=this.renderer.name,this.toggleListener("go to top scroll",this.model.isLongStrip),this.resetGoToTop(),this.model.chapter&&(this.renderer.initialize(),"long-strip"===this.renderer.name))try{this.renderer.scrollToPage(this.model.currentPage)}catch(e){}}},{key:"renderPageInNewMode",value:function(e,t){return this.model.renderingMode!==e&&(this.model.renderingMode=e),this.renderPage(t)}},{key:"onDisplayFitChange",value:function(){this.el.dataset.display=t.getDisplayFitString(this.model.displayFit),this.el.classList.toggle("fit-horizontal",this.model.isFitBoth||this.model.isFitWidth),this.el.classList.toggle("fit-vertical",this.model.isFitBoth||this.model.isFitHeight),this.forceImageLayoutRefresh()}},{key:"forceImageLayoutRefresh",value:function(){Modernizr.requestanimationframe&&(0,a.default)(this.el.querySelectorAll(".reader-image-wrapper img")).forEach(function(e){e.classList.add("m-0"),requestAnimationFrame(function(){return e.classList.remove("m-0")})})}},{key:"onDirectionChange",value:function(){this.el.dataset.direction=g.default.directionState.LTR===this.model.direction?"ltr":"rtl",this.model.chapter&&(this.updateChapterLinks(),this.updatePageBar())}},{key:"onChapterChange",value:function(){if(this.model.chapter&&this.model.manga){var e=this.model.manga.isLongStrip;this.model.renderingMode=e?g.default.renderingModeState.LONG:this.model.settings.renderingMode,this.model.displayFit=e?g.default.displayFitState.FIT_WIDTH:this.model.settings.displayFit,this.renderer&&this.renderer.reinitialize(),this.el.dataset.mangaId=this.model.manga.id||0,this.el.dataset.chapterId=this.model.chapter.id||0,this.el.dataset.totalPages=this.model.totalPages||0,this.el.classList.toggle("native-long-strip",e),this.resetPageBar(),this.updateUI();var t=document.querySelector("#preload-all");t&&(t.disabled=this.model.isUserGuest,t.textContent=this.model.isUserGuest?"Logged in users only":"Start preloading")}}},{key:"onMangaChange",value:function(){this.model.chapter&&this.model.manga&&this.model.settings.gapWarning&&!this.model.manga.areChaptersSequential(this.model.chapter.id,this.model.chapter.prevChapterId)&&this.moveToGapCheck(this.model.chapter.id,this.model.chapter.prevChapterId)}},{key:"onStateChange",value:function(){switch(this.toggleListener("page tap",this.model.isStateReading),this.toggleListener("page wheel",this.model.isStateReading),this.model.state){case g.default.readerState.RECS:this.imageContainer.classList.remove("cursor-pointer"),this.renderPageInNewMode(g.default.renderingModeState.RECS,{});break;case g.default.readerState.GAP:this.renderPageInNewMode(g.default.renderingModeState.ALERT,{isSpoilerNet:!0,chapterId:this.gapChapterId,prevChapterId:this.gapPrevChapterId});break;case g.default.readerState.EXITING:this.el.classList.add("is-loading");break;case g.default.readerState.ERROR:this.imageContainer.classList.remove("cursor-pointer");break;case g.default.readerState.READING:default:this.imageContainer.classList.toggle("cursor-pointer",this.model.settings.tapTargetArea),this.model.renderingMode=this.model.settings.renderingMode}}},{key:"onCurrentPageChange",value:function(){this.el.dataset.currentPage=this.model.currentPage||0,this.model.currentPage>0&&(this.model.preload(this.model.currentPage+this.renderedPages),this.renderPage(this.model.currentPage))}},{key:"onPageLoad",value:function(e){if(this.model.chapter&&e.chapter===this.model.chapter.id){var t=this.el.querySelector('.notch[data-page="'+e.number+'"]');t&&(t.classList.add("loaded"),t.classList.remove("failed"))}}},{key:"onPageError",value:function(e){if(this.model.chapter&&e.chapter===this.model.chapter.id){var t=this.el.querySelector('.notch[data-page="'+e.number+'"]');t&&t.classList.add("failed")}}},{key:"onReaderError",value:function(e){this.renderPageInNewMode(g.default.renderingModeState.ALERT,e)}},{key:"onSettingChange",value:function(e,t){var r=null;switch(e){case"renderingMode":this.model.chapter&&this.renderPage();break;case"showAdvancedSettings":(r=this.el.querySelector("#modal-settings"))&&r.classList.toggle("show-advanced",!!t);break;case"swipeSensitivity":jQuery&&jQuery(this.imageContainer).swipe("option","threshold",this.swipeThreshold);break;case"containerWidth":t||(t=null),this.imageContainer.classList.toggle("constrained",!!parseInt(t)),this.imageContainer.style.maxWidth=parseInt(t)?t+"px":null;break;case"showDropdownTitles":this.model.chapter&&this.updateChapterDropdown();break;case"tapTargetArea":this.imageContainer.classList.toggle("cursor-pointer",!!t);break;case"hideHeader":this.el.classList.toggle("hide-header",t),(r=document.querySelector("nav.navbar"))&&r.classList.toggle("d-none",t),(r=document.querySelector("#hide-header-button"))&&r.classList.toggle("active",t);break;case"hideSidebar":this.el.classList.toggle("hide-sidebar",t);break;case"hidePagebar":this.el.classList.toggle("hide-page-bar",t);break;case"preloadPages":this.el.querySelector(".preload-max-value").textContent=this.model.preloadMax,this.el.querySelector('input[data-setting="preloadPages"]').max=this.model.preloadMax,this.model.chapter&&this.model.preload(this.model.currentPage+this.renderedPages)}(0,a.default)(this.el.querySelectorAll('select[data-setting="'+e+'"]')).forEach(function(e){e.value=t}),(0,a.default)(this.el.querySelectorAll('input[data-setting="'+e+'"]')).forEach(function(e){e.value=t}),(0,a.default)(this.el.querySelectorAll('input[type="checkbox"][data-setting="'+e+'"]')).forEach(function(e){e.checked=!!t}),(0,a.default)(this.el.querySelectorAll('button[data-setting="'+e+'"]')).forEach(function(e){e.classList.toggle("active",e.dataset.value==t)})}},{key:"updateUI",value:function(){this.updateTitles(),this.updateChapterDropdown(),this.resetPageDropdown(),this.updatePageDropdown(),this.updatePageLinks(),this.updateGroupList(),this.updateCommentsButton(),this.updateChapterLinks()}},{key:"updatePage",value:function(){this.model.chapter&&(this.updatePageBar(),this.updatePageDropdown(),this.updatePageLinks())}},{key:"updateTitles",value:function(){if(this.model.chapter&&this.model.manga){var e=this.model.chapter,t=this.model.manga,r=t.title+" - "+t.getChapterTitle(e.id)+" - MangaDex",n=document.createElement("textarea");n.innerHTML=r,document.title=n.value,n.innerHTML=e.title,p.Flag.render(t,this.el.querySelector(".reader-controls-title .flag")),p.Link.render(t,this.el.querySelector(".manga-link")),this.el.querySelector(".chapter-title").textContent=n.value,this.el.querySelector(".chapter-title").dataset.chapterId=e.id,this.el.querySelector(".chapter-tag-h").classList.toggle("d-none",!t.isHentai),this.el.querySelector(".chapter-tag-end").classList.toggle("d-none",!e.isLastChapter),this.el.querySelector(".chapter-tag-doujinshi").classList.toggle("d-none",!t.isDoujinshi)}}},{key:"resetChapterDropdown",value:function(){this.model.chapter&&this.model.manga&&p.ChapterDropdown.render(this.model,this.el.querySelector("#jump-chapter"))}},{key:"updateChapterDropdown",value:function(){this.resetChapterDropdown()}},{key:"resetPageDropdown",value:function(){this.model.chapter&&this.model.manga&&p.PageDropdown.render(this.model,this.el.querySelector("#jump-page"))}},{key:"updatePageDropdown",value:function(){this.el.querySelector("#jump-page").selectedIndex=this.model.currentPage-1}},{key:"updateGroupList",value:function(){if(this.model.chapter&&this.model.manga){var e=this.el.querySelector(".reader-controls-groups ul");y.default.emptyNode(e);var t=!0,r=!1,n=void 0;try{for(var a,i=(0,o.default)(this.model.manga.getAltChapters(this.model.chapter.id));!(t=(a=i.next()).done);t=!0){var u=a.value;u.isCurrentChapter=u.id==this.model.chapter.id,e.appendChild(p.GroupItem.render(u))}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}}},{key:"updateCommentsButton",value:function(){this.model.chapter&&this.model.manga&&(this.el.querySelector("#comment-button").href=this.pageURL(this.model.chapter.id)+"/comments",this.el.querySelector(".comment-amount").textContent=this.model.chapter.comments||"")}},{key:"updateChapterLinks",value:function(){var e=this;if(this.model.chapter&&this.model.manga){var t=function(t){var r=t?e.model.chapter.prevChapterId:e.model.chapter.nextChapterId;return function(t){t.dataset.chapter=r,t.href=e.pageURL(r),t.title=e.model.manga.getChapterTitle(r)||"Back to manga"}};(0,a.default)(this.el.querySelectorAll(".chapter-link-left")).forEach(t(this.model.isDirectionLTR)),(0,a.default)(this.el.querySelectorAll(".chapter-link-right")).forEach(t(this.model.isDirectionRTL))}}},{key:"updatePageLinks",value:function(){if(this.model.chapter&&this.model.manga){var e=this.model.currentPage,t=e+(2===this.renderedPages?" - "+(e+1):""),r=this.el.querySelector(".reader-controls-pages");r.querySelector(".current-page").textContent=t,r.querySelector(".total-pages").textContent=this.model.totalPages,r.querySelector(".page-link-left").href=this.pageLeftURL(1),r.querySelector(".page-link-right").href=this.pageRightURL(1),this.el.querySelector("#jump-page").value=e}}},{key:"resetPageBar",value:function(){if(this.model.chapter&&this.model.manga){var e=this.el.querySelector(".reader-page-bar .notches");if(e){y.default.emptyNode(e);for(var t=1;t<=this.model.totalPages;++t){var r=e.appendChild(document.createElement("div"));r.classList.add("notch","col"),r.style.order=t,r.dataset.page=t}this.updatePageBar()}}}},{key:"updatePageBar",value:function(){if(this.model.chapter&&this.model.manga){var e=this.el.querySelector(".reader-page-bar .trail"),t=this.el.querySelector(".reader-page-bar .thumb");if(e&&t){var r=Math.max(this.model.totalPages,1),n=Math.max(this.renderedPages,1),a=Math.max(this.model.currentPage+n-1,1),i=100/r;e.style.width=Math.min(a*i,100)+"%",t.style.width=100/a*n+"%",e.style.right=this.model.isDirectionLTR?null:0,t.style.float=this.model.isDirectionLTR?"right":"left"}}}},{key:"renderPage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.model.currentPage;return new n.default(function(r,n){return e.renderer?e.isRendering?n("Already rendering"):(e.updatePage(),r(e.renderer.render(t))):n("No renderer")}).then(function(){e.el.dataset.renderedPages=e.renderedPages,e.model.isLongStrip||e.scrollPageIntoView(),e.forceImageLayoutRefresh(),e.model.chapter&&(e.model.preload(e.model.currentPage+e.renderedPages),e.updatePage())}).catch(function(r){console.error(r),r&&!0===r.revert&&e.renderPageInNewMode(e.model.settings.renderingMode,t)})}},{key:"scrollPageIntoView",value:function(){var e=this,r=function(){if(e.imageContainer.scrollIntoView(!0),(e.model.isFitHeight||e.model.isNoResize)&&t.scroll(document.body.scrollWidth*(e.model.isDirectionRTL?1:-1),0),e.model.isFitWidth||e.model.isNoResize){var r=document.querySelector("nav.navbar");r&&t.scroll(0,-r.offsetHeight)}};Modernizr.requestanimationframe?window.requestAnimationFrame(function(){r()}):r()}},{key:"getHistoryStateObject",value:function(){return{page:this.model.currentPage,chapter:this.model.chapter.id,state:this.model.state}}},{key:"pushHistory",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.model.chapter.id,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.model.currentPage;if(Modernizr.history&&this._lastHistoryUpdate+100<Date.now()){var r=window.history.state;if(t=t||null,!r||r.page!==t||r.chapter!==e||r.state!==this.model.state){this._lastHistoryUpdate=Date.now();var n=this.pageURL(e,t),a={chapter:e,page:t,state:this.model.state};try{window.history.pushState(a,"",n)}catch(e){console.warn(e)}}}}},{key:"replaceHistory",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.model.chapter.id,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.model.currentPage;if(Modernizr.history&&this._lastHistoryUpdate+100<Date.now()){this._lastHistoryUpdate=Date.now();var r=this.pageURL(e,t),n={chapter:e,page:t,state:this.model.state};try{window.history.replaceState(n,"",r)}catch(e){console.warn(e)}}}},{key:"turnPageLeft",value:function(e){this.turnPage(this.model.isDirectionRTL,e)}},{key:"turnPageRight",value:function(e){this.turnPage(this.model.isDirectionLTR,e)}},{key:"turnPageBackward",value:function(e){this.turnPage(!1,e)}},{key:"turnPageForward",value:function(e){this.turnPage(!0,e)}},{key:"turnPage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.model.isDoublePage?2:1;this.model.isDoublePage&&(e&&1===this.renderedPages||!e&&this.model.currentPage<=2)&&(t=1),t=e?t:-t,this.moveToPage(Math.max(this.model.currentPage,1)+t)}},{key:"moveToPage",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("recs"===e)return this.moveToRecommendations(r);if("gap"===e)return this.moveToGapCheck(this.model.chapter.id,this.model.chapter.prevChapterId,r),n.default.resolve();var a=this.model.state;return this.model.isStateReading||(this.model.state=g.default.readerState.READING),this.model.moveToPage(e).then(function(){t.model.isLongStrip&&t.renderer.scrollToPage(e),r&&(t.model.isLongStrip?t.replaceHistory():t.pushHistory())}).catch(function(e){return e&&null!=e.chapter?t.moveToChapter(e.chapter,e.page,r,a===g.default.readerState.GAP):(console.error(e),n.default.resolve())})}},{key:"moveToChapter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.model.isStateGap;return this.model.isLoading||isNaN(e)||this.model.exiting?n.default.resolve():-1!==e?0===e?this.model.isLoading?n.default.resolve():(this.model.isLoading=!0,this.model.chapter.loadManga(!0).then(function(){r.model.isLoading=!1,0!==r.model.chapter.nextChapterId?r.moveToChapter(r.model.chapter.nextChapterId,1,a):r.model.settings.betaRecommendations?r.moveToRecommendations():r.exitToURL(r.model.manga.url)}).catch(function(e){r.model.isLoading=!1})):i||!this.model.settings.gapWarning||e!==this.model.chapter.nextChapterId||this.model.manga.areChaptersSequential(this.model.chapter.id,e)?this.model.moveToChapter(e,t).catch(function(e){return n.default.resolve()}).then(function(){return r.model.chapter&&!r.model.chapter.error&&r.model.isStateReading?r.moveToPage(t,a):(a&&r.pushHistory(),n.default.resolve())}):(this.moveToGapCheck(e,this.model.chapter.id,a),n.default.resolve()):void 0}},{key:"moveToGapCheck",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.model.isDoublePage&&2===this.renderedPages&&this.model.currentPage===this.model.totalPages-1;this.gapChapterId=e,this.gapPrevChapterId=t,n&&this.model.setCurrentPage(this.model.totalPages),this.model.state=g.default.readerState.GAP,r&&this.pushHistory(void 0,"gap")}},{key:"moveToRecommendations",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.model.moveToRecommendations().then(function(){e.model.setCurrentPage(e.model.totalPages+1),t&&e.pushHistory(void 0,"recs")})}},{key:"exitToURL",value:function(e){this.model.exiting||(this.model.exitReader(),window.location=e)}},{key:"pageURL",value:function(e,t){return null!=e&&e>0||"string"==typeof e?null==t||this.model.chapter.isExternal&&"string"!=typeof t?"/chapter/"+e:0===t?this.pageURL(this.model.chapter.prevChapterId,-1):t>this.model.totalPages?this.pageURL(this.model.chapter.nextChapterId):"/chapter/"+e+"/"+t:this.model.manga.url}},{key:"pageLeftURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.model.isDoublePage?2:1;return this.pageURL(this.model.chapter.id,Math.min(this.model.currentPage+(this.model.isDirectionLTR?-e:e)),0)}},{key:"pageRightURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.model.isDoublePage?2:1;return this.pageURL(this.model.chapter.id,Math.min(this.model.currentPage+(this.model.isDirectionLTR?e:-e)),0)}},{key:"addListener",value:function(e,t,r,n){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if("string"==typeof t){var i=t;if(!(t=this.el.querySelector(i)))throw new Error('Element "'+i+'" not found')}this._listeners[e]={el:t,type:r,handler:n,useCapture:a,active:!1},this.toggleListener(e,!0)}},{key:"toggleListener",value:function(e,t){var r=this._listeners[e];r&&r.active&&!t?(r.el.removeEventListener(r.type,r.handler,r.useCapture),r.active=!1):r&&!r.active&&t&&(r.el.addEventListener(r.type,r.handler,r.useCapture),r.active=!0)}},{key:"listenSettingEvents",value:function(){var e=this,t=function(t){if("checkbox"===t.target.type)e.model.saveSetting(t.target.dataset.setting,t.target.checked?1:0);else{var r=null!=t.target.dataset.value?t.target.dataset.value:t.target.value;e.model.saveSetting(t.target.dataset.setting,r)}},r=function(r,n){(0,a.default)(e.el.querySelectorAll(r)).forEach(function(e){return e.addEventListener(n,t)})},n=!0,i=!1,s=void 0;try{for(var l,c=(0,o.default)([['#modal-settings input[type="checkbox"][data-setting]',"change"],["#modal-settings input[data-setting]","keyup"],["#modal-settings input[data-setting]","change"],["#modal-settings select[data-setting]","change"],["#modal-settings button[data-setting]","click"]]);!(n=(l=c.next()).done);n=!0){var d=l.value,f=(0,u.default)(d,2);r(f[0],f[1])}}catch(e){i=!0,s=e}finally{try{!n&&c.return&&c.return()}finally{if(i)throw s}}}},{key:"listenButtonEvents",value:function(){var e=this;this.el.querySelector(".reader-controls-mode-display-fit").addEventListener("click",function(){e.model.saveSetting("displayFit",e.model.displayFit%4+1)}),this.el.querySelector(".reader-controls-mode-rendering").addEventListener("click",function(){e.model.saveSetting("renderingMode",e.model.renderingMode%3+1)}),this.el.querySelector(".reader-controls-mode-direction").addEventListener("click",function(){e.model.saveSetting("direction",e.model.direction%2+1)}),this.el.querySelector("#reader-controls-collapser").addEventListener("click",function(){e.model.saveSetting("hideSidebar",e.model.settings.hideSidebar?0:1)}),this.el.querySelector("#hide-header-button").addEventListener("click",function(){e.model.saveSetting("hideHeader",e.model.settings.hideHeader?0:1)}),this.el.addEventListener("click",function(t){if(!t.ctrlKey&&!t.metaKey){for(var r=t.target;r&&("A"!==r.nodeName||!r.dataset.action);)r=r.parentElement;if(r){var n=r.dataset;switch(t.preventDefault(),n.action){case"page":n.direction&&"left"===n.direction?e.turnPageLeft(parseInt(n.by)):n.direction&&"right"===n.direction?e.turnPageRight(parseInt(n.by)):n.to&&e.moveToPage(parseInt(n.to));break;case"chapter":return e.moveToChapter(parseInt(n.chapter));case"url":return e.exitToURL(r.href)}}}}),this.addListener("preload all button","#preload-all","click",function(t){t.target.disabled=!0,t.target.textContent="Preloading...",e.model.on("pageload",function(){var r=e.model.getLoadedPages().length;if(t.target.textContent="Preloading... "+Math.round(r/e.model.totalPages*100)+"%",r===e.model.totalPages)return t.target.textContent="Preloading done",!0}),e.model.preloadEverything()}),this.addListener("report submit","#chapter-report-form","submit",function(t){t.preventDefault();var r=t.target.querySelector("button[type=submit]");r.classList.add("is-loading");var a=t.target.querySelector(".alert-container");y.default.emptyNode(a),fetch("/ajax/actions.ajax.php?function=chapter_report&id="+e.model.chapter.id,{method:"POST",body:new FormData(t.target),credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(e){if(e.ok)return e.text();throw new Error(e.statusText)}).then(function(e){return a.innerHTML=e||v.Alert.container("This chapter has been reported.","success").outerHTML,n.default.resolve()}).catch(function(e){return a.innerHTML=v.Alert.container("Something weird went wrong. Details in the Console (F12), hopefully.","danger").outerHTML,console.error(e),n.default.resolve()}).then(function(){r.classList.remove("is-loading")})});var t=this.el.querySelector(".reader-page-bar .notch-display");this.addListener("page bar hover",".reader-page-bar .notches","mouseover",function(r){r.target.dataset.page?t.textContent=r.target.dataset.page+" / "+e.model.totalPages:t.textContent=""})}},{key:"listenInputs",value:function(){var e=this;Modernizr.history&&(window.onpopstate=function(t){null!=t.state&&(t.state.state!==e.model.state&&(e.model.state=t.state.state),t.state.chapter===e.model.chapter.id&&null!==t.state.page?e.moveToPage(t.state.page,!1):e.moveToChapter(t.state.chapter,t.state.page,!1,!0))}),this.addListener("track tap",".reader-page-bar .track","click",function(t){t.stopPropagation();var r=parseInt(t.target.dataset.page||t.currentTarget.dataset.page);if(r)return e.moveToPage(e.isDoublePage?Math.max(r,1):r)});var r=null;this.addListener("window resize",window,"resize",function(t){clearTimeout(r),r=setTimeout(function(){return e.forceImageLayoutRefresh()},100)});var n=!1;this.addListener("page tap",this.imageContainer,"click",function(t){if(t.preventDefault(),n||1!==e.model.settings.tapTargetArea&&"img"!==t.target.nodeName.toLowerCase())n=!1;else switch(e.model.settings.pageTapTurn){case 1:t.stopPropagation();var r=function(){try{return e.imageContainer.scrollWidth-parseFloat(window.getComputedStyle(e.imageContainer).paddingRight)}catch(t){return e.imageContainer.scrollWidth}}(),a=document.body.clientWidth-document.body.scrollWidth+r;return t.clientX<a/2?e.turnPageLeft():e.turnPageRight();case 2:return t.stopPropagation(),e.turnPageForward()}}),jQuery&&jQuery(this.imageContainer).swipe({swipeRight:function(t){e.model.settings.swipeSensitivity>0&&(1===e.model.settings.swipeDirection?e.turnPageRight():e.turnPageLeft(),n=!0)},swipeLeft:function(t){e.model.settings.swipeSensitivity>0&&(1===e.model.settings.swipeDirection?e.turnPageLeft():e.turnPageRight(),n=!0)},preventDefaultEvents:!1,cancelThreshold:10,threshold:this.swipeThreshold});var a=0;this.addListener("page wheel",this.imageContainer,"wheel",function(r){0!==e.model.settings.pageWheelTurn&&(r.deltaY>0&&t.isScrolledToBottom||r.deltaY<0&&t.isScrolledToTop?(r.preventDefault(),a++,(!e.model.isLongStrip||a>=6)&&(a=0,e.turnPage(r.deltaY>0))):a=0)}),this.addListener("single page wheel",".reader-controls-pages","wheel",function(t){0!==e.model.settings.pageWheelTurn&&(t.deltaY>0?e.turnPageForward(1):e.turnPageBackward(1))}),this.addListener("jump chapter","#jump-chapter","change",function(t){var r=parseInt(t.target.value);e.model.chapter&&e.model.chapter.id===r||(e.moveToChapter(r,1),t.target.blur())}),this.addListener("jump page","#jump-page","change",function(t){e.moveToPage(parseInt(t.target.value)),t.target.blur()}),this.addListener("page prompt",".reader-controls-page-text","click",function(t){var r=parseInt(prompt("Move to page number:"));e.moveToPage(r)});this.addListener("go to top scroll",window,"scroll",function(t){var r=e.el.querySelector(".reader-goto-top"),n=r.dataset.scroll<window.scrollY;n===r.dataset.turn>window.scrollY&&(r.dataset.turn=r.dataset.scroll),n||r.classList.contains("show")||!function(e,t){return Math.abs(window.scrollY-e)>t}(r.dataset.turn,r.dataset.threshold)?n&&r.classList.contains("show")&&r.classList.remove("show"):r.classList.add("show"),r.dataset.scroll=window.scrollY}),this.resetGoToTop(),this.addListener("go to top click",".reader-goto-top","click",function(){window.scrollTo(0,0),e.resetGoToTop()}),m.default.registerDefaults(),document.addEventListener("keydown",function(t){m.default.keydownHandler(t,e)})}},{key:"resetGoToTop",value:function(){this.toggleListener("go to top scroll",this.model.isLongStrip);var e=this.el.querySelector(".reader-goto-top");e.dataset.scroll=0,e.dataset.turn=0,e.dataset.threshold=100,e.classList.remove("show")}},{key:"renderedPages",get:function(){return null==this.renderer?0:this.model.isLongStrip?1:this.renderer.renderedPages}},{key:"isRendering",get:function(){return this._isRendering},set:function(e){this._isRendering=e,this.onLoadingChange()}},{key:"swipeThreshold",get:function(){return screen.availWidth/(.9*(this.model.settings.swipeSensitivity+1))}}],[{key:"scroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";y.default.scrollBy({behavior:r,left:e,top:t})}},{key:"getRendererClass",value:function(e){var t=g.default.renderingModeState;switch(e){case t.ALERT:return v.Alert;case t.RECS:return v.Recommendations;case t.LONG:return v.LongStrip;case t.DOUBLE:return v.DoublePage;case t.SINGLE:default:return v.SinglePage}}},{key:"getDisplayFitString",value:function(e){var t=g.default.displayFitState;switch(e){case t.FIT_BOTH:return"fit-both";case t.FIT_WIDTH:return"fit-width";case t.FIT_HEIGHT:return"fit-height";case t.NO_RESIZE:return"no-resize";default:return"fit-unknown"}}},{key:"isTestReader",get:function(){try{return window.location.href.includes("chapter_test")}catch(e){return!1}}},{key:"isScrolledToLeft",get:function(){return 0===window.pageXOffset}},{key:"isScrolledToRight",get:function(){return window.innerWidth+Math.ceil(window.pageXOffset+1)>=document.body.scrollWidth}},{key:"isScrolledToTop",get:function(){return 0===window.pageYOffset}},{key:"isScrolledToBottom",get:function(){return window.innerHeight+Math.ceil(window.pageYOffset+1)>=document.body.scrollHeight}}]),t}(h.default);t.default=T},function(e,t,r){e.exports=!r(7)&&!r(16)(function(){return 7!=Object.defineProperty(r(42)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){e.exports=r(9)},function(e,t,r){var n=r(14),a=r(10),i=r(96)(!1),o=r(44)("IE_PROTO");e.exports=function(e,t){var r,u=a(e),s=0,l=[];for(r in u)r!=o&&n(u,r)&&l.push(r);for(;t.length>s;)n(u,r=t[s++])&&(~i(l,r)||l.push(r));return l}},function(e,t,r){var n=r(24);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(2).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(14),a=r(35),i=r(44)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(6);e.exports=function(e,t,r,a){try{return a?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(17),a=r(3)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[a]===e)}},function(e,t,r){var n=r(6),a=r(22),i=r(3)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||void 0==(r=n(o)[i])?t:a(r)}},function(e,t,r){var n,a,i,o=r(8),u=r(101),s=r(63),l=r(42),c=r(2),d=c.process,f=c.setImmediate,h=c.clearImmediate,g=c.MessageChannel,p=c.Dispatch,m=0,v={},y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},w=function(e){y.call(e.data)};f&&h||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++m]=function(){u("function"==typeof e?e:Function(e),t)},n(m),m},h=function(e){delete v[e]},"process"==r(24)(d)?n=function(e){d.nextTick(o(y,e,1))}:p&&p.now?n=function(e){p.now(o(y,e,1))}:g?(i=(a=new g).port2,a.port1.onmessage=w,n=o(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):n="onreadystatechange"in l("script")?function(e){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),e.exports={set:f,clear:h}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,r){var n=r(6),a=r(5),i=r(49);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(4),o=r(7),u=r(3)("species");e.exports=function(e){var t="function"==typeof a[e]?a[e]:n[e];o&&t&&!t[u]&&i.f(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3)("iterator"),a=!1;try{var i=[7][n]();i.return=function(){a=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var i=[7],o=i[n]();o.next=function(){return{done:r=!0}},i[n]=function(){return o},e(i)}catch(e){}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=b(r(109)),a=b(r(51)),i=b(r(113)),o=b(r(15)),u=b(r(117)),s=b(r(81)),l=b(r(27)),c=b(r(57)),d=b(r(20)),f=b(r(19)),h=b(r(11)),g=b(r(12)),p=b(r(28)),m=b(r(29)),v=b(r(85)),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(153)),w=b(r(38));function b(e){return e&&e.__esModule?e:{default:e}}var T=function(e){function t(e,r,n,a){(0,h.default)(this,t);var i=(0,p.default)(this,(t.__proto__||(0,f.default)(t)).call(this));return i._number=e,i._chapter=r,i._state=t.STATE_WAIT,i._error=null,i._url=n,i._networkImg=a,i._image=new Image,i.addImageListeners(),i}return(0,m.default)(t,e),(0,g.default)(t,[{key:"load",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new d.default(function(n,a){if(!r&&e.isDone)return n(e);e.loading||(e._error=null,e._image.src=e._url+(r?"?t="+Date.now():""),e.state=t.STATE_LOADING),e.once("statechange",function(){switch(e.state){case t.STATE_LOADED:return n(e);case t.STATE_ERROR:return a(e)}})})}},{key:"addImageListeners",value:function(){var e=this;this._image.addEventListener("error",function(){e._error=new Error("Image #"+e.number+" failed to load."),e.state=t.STATE_ERROR}),this._image.addEventListener("load",function(){e.state=t.STATE_LOADED;try{e._image.decode()}catch(e){}})}},{key:"reload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.load(this.hasError||e)}},{key:"number",get:function(){return this._number}},{key:"chapter",get:function(){return this._chapter}},{key:"image",get:function(){return this._image}},{key:"networkImg",get:function(){return this._networkImg}},{key:"waiting",get:function(){return this.state===t.STATE_WAIT}},{key:"loading",get:function(){return this.state===t.STATE_LOADING}},{key:"loaded",get:function(){return this.state===t.STATE_LOADED}},{key:"hasError",get:function(){return this.state===t.STATE_ERROR}},{key:"isDone",get:function(){return this.loaded||this.hasError}},{key:"error",get:function(){return this._error}},{key:"state",get:function(){return this._state},set:function(e){this._state=e,this.trigger("statechange",[this])}},{key:"stateName",get:function(){switch(this.state){case 0:return"wait";case 1:return"loading";case 2:return"loaded";case 3:return"error"}}}],[{key:"STATE_WAIT",get:function(){return 0}},{key:"STATE_LOADING",get:function(){return 1}},{key:"STATE_LOADED",get:function(){return 2}},{key:"STATE_ERROR",get:function(){return 3}}]),t}(v.default),_=function(){function e(){(0,h.default)(this,e)}return(0,g.default)(e,null,[{key:"save",value:function(e,t){}},{key:"load",value:function(e){}},{key:"clear",value:function(e){}}]),e}(),k=function(e){function t(){return(0,h.default)(this,t),(0,p.default)(this,(t.__proto__||(0,f.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,g.default)(t,null,[{key:"save",value:function(e,t){localStorage.setItem("reader."+e,t)}},{key:"load",value:function(e){return localStorage.getItem("reader."+e)}},{key:"clear",value:function(e){localStorage.clearItem("reader."+e)}}]),t}(_),S=function(e){function t(){return(0,h.default)(this,t),(0,p.default)(this,(t.__proto__||(0,f.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,g.default)(t,null,[{key:"save",value:function(e,t){document.cookie="r-"+e+"="+t}},{key:"load",value:function(e){return this.cookies["r-"+e]||null}},{key:"clear",value:function(e){document.cookie="r-"+e+"=; Max-Age=-99999999;"}},{key:"cookies",get:function(){return document.cookie.split(";").reduce(function(e,t){var r=t.split("="),n=(0,c.default)(r,2),a=n[0],i=n[1];return e[a.trim()]=i.trim(),e},{})}}]),t}(_),E=Modernizr.localstorage?k:S,C=function(){function e(t,r,n,a){(0,h.default)(this,e),this._name=t,this._default=r,this._value=r,this.test=n||e.getTest(r),this.parser=a||e.getParser(r)}return(0,g.default)(e,[{key:"load",value:function(){this.value=E.load(this.name)}},{key:"save",value:function(e){this.value=e,E.save(this.name,this.value)}},{key:"clear",value:function(){E.clear(this.name)}},{key:"name",get:function(){return this._name}},{key:"value",get:function(){return this._value},set:function(e){var t=this.parser(e);this.test(t)&&(this._value=t)}}],[{key:"getTest",value:function(e){switch(void 0===e?"undefined":(0,l.default)(e)){case"number":return function(e){return!isNaN(e)};case"string":return function(e){return"string"==typeof e};default:return function(e){return!0}}}},{key:"getParser",value:function(e){switch(void 0===e?"undefined":(0,l.default)(e)){case"number":return function(e){return parseFloat(e)};default:return function(e){return e}}}}]),e}(),x=function(e){function t(){(0,h.default)(this,t);var e=(0,p.default)(this,(t.__proto__||(0,f.default)(t)).call(this));return e._state=t.readerState.READING,e._isLoading=!1,e._currentPage=0,e._chapter=null,e._renderingMode=0,e._displayFit=0,e._direction=0,e._appMeta={},e._settings={},e._settingsShortcut={},e._pageCache=new s.default,e._preloadSet=new u.default,e.on("pageload",function(t){return e._reportPagePerformance(t)}),e.on("pageerror",function(t){return e._reportPagePerformance(t)}),e}return(0,m.default)(t,e),(0,g.default)(t,[{key:"setCurrentPage",value:function(e){if(this._currentPage!==e&&!isNaN(e)&&!this.exiting)return this._currentPage=e,this.trigger("currentpagechange",[e]),!0}},{key:"exitReader",value:function(){var e=this;this.state=t.readerState.EXITING,window.onunload=function(){e.state=t.readerState.READING}}},{key:"saveSetting",value:function(e,t){var r=this._settings[e];r.save(t),this._settingsShortcut[r.name]=r.value,["renderingMode","displayFit","direction"].includes(e)&&(this[e]=r.value),this.trigger("settingchange",[r.name,r.value])}},{key:"loadSettings",value:function(){var e=this,r=[new C("displayFit",t.displayFitState.FIT_WIDTH),new C("direction",t.directionState.LTR),new C("renderingMode",t.renderingModeState.SINGLE),new C("showAdvancedSettings",0),new C("scrollingMethod",0),new C("swipeDirection",0),new C("swipeSensitivity",3),new C("pageTapTurn",1),new C("pageWheelTurn",0),new C("showDropdownTitles",1),new C("tapTargetArea",1),new C("hideHeader",0),new C("hideSidebar",0),new C("hidePagebar",0),new C("betaRecommendations",0),new C("imageServer","0"),new C("dataSaver",this.isUserGuest?1:0),new C("gapWarning",1),new C("preloadPages",10,null,function(t){if(isNaN(parseInt(t)))return null;var r=w.default.clamp(parseInt(t),0,e.preloadMax);return isNaN(r)?0:r}),new C("containerWidth",null,function(e){return!e||!isNaN(parseInt(e))})],n=!0,a=!1,i=void 0;try{for(var u,s=(0,o.default)(r);!(n=(u=s.next()).done);n=!0){var l=u.value;l.load(),this._settings[l.name]=l,this._settingsShortcut[l.name]=l.value,this.trigger("settingchange",[l.name,l.value])}}catch(e){a=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}this.saveSetting("gapWarning",1)}},{key:"getChapterParams",value:function(e){return{id:e,server:"0"!==this.settings.imageServer?this.settings.imageServer:null,saver:this.settings.dataSaver}}},{key:"setChapter",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.exiting||this.isLoading)return d.default.reject(new Error("Trying to set chapter while "+(this.exiting?"exiting":"loading")));if(isNaN(e)||e<=0)return d.default.reject(new Error("Trying to set invalid chapter: "+e));this.isLoading=!0;var a=this.manga;return y.Chapter.create(this.getChapterParams(e)).catch(function(e){return e instanceof y.Chapter?e.manga instanceof y.Manga?d.default.resolve(e):(r._chapter=e,r._createPageCache({}),d.default.reject(e)):(r._chapter=null,r._createPageCache({}),d.default.reject(e))}).then(function(e){return r._chapter=e,r._createPageCache(e),r.isLoading=!1,r.state=t.readerState.READING,r._currentPage=n,r.trigger("chapterchange",[e]),a&&a.id===e.manga.id||r.trigger("mangachange",[e.manga]),e.error?d.default.reject(e):0===e.totalPages?(e.error=new Error("Chapter has no pages."),d.default.reject(e)):(e.isNetworkServer&&r.preload(r.currentPage,1/0),d.default.resolve(e))}).catch(function(e){return r.isLoading=!1,r.state=t.readerState.ERROR,console.error(e),r.trigger("readererror",[e]),d.default.resolve(e)})}},{key:"_createPageCache",value:function(e){var t=this,r=!0,n=!1,a=void 0;try{for(var i,u=(0,o.default)(this._pageCache);!(r=(i=u.next()).done);r=!0){var s=i.value,l=(0,c.default)(s,2);l[0];l[1].off()}}catch(e){n=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw a}}this._pageCache.clear(),this._preloadSet.clear(),this._preloading=!1;for(var d=1;d<=e.totalPages;++d){var f=e.imageURL(d),h=new T(d,e.id,f,this.chapter.isNetworkServer);this._pageCache.set(d,h),h.on("statechange",function(e){switch(e.state){case T.STATE_LOADING:return t.trigger("pageloading",[e]);case T.STATE_LOADED:return t.trigger("pageload",[e]);case T.STATE_ERROR:return t.trigger("pageerror",[e])}})}}},{key:"_reportPagePerformance",value:function(e){if(e.networkImg&&"performance"in window){var t=e.image.src,r=performance.getEntriesByName(t,"resource"),n={url:t,success:e.loaded};e.loaded&&r&&r.length>0&&r[0].transferSize&&(n.bytes=r[0].transferSize),fetch("https://api.mangadex.network/report",{method:"post",mode:"cors",headers:{"Content-Type":"application/json"},body:(0,i.default)(n)}).then(function(e){if(!e.ok)throw e}).catch(function(e){return console.error(e)})}}},{key:"_loadPage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this._pageCache.get(e);return r?r.load(t):d.default.reject(new Error("Page "+e+" not in cache"))}},{key:"getPage",value:function(e){var t=this;return new d.default(function(r,n){return null==t.chapter||0===t._pageCache.size?n(new Error("Tried to get a page before chapter has loaded")):isNaN(e)||e<1||e>t.totalPages?r(null):t._pageCache.get(e).loaded?r(t._pageCache.get(e)):r(t._loadPage(e))})}},{key:"reloadErrorPages",value:function(){(0,a.default)(this._pageCache.values()).filter(function(e){return e.hasError}).forEach(function(e){return e.reload()})}},{key:"getPageWithoutLoading",value:function(e){return this._pageCache.get(e)}},{key:"getAllPages",value:function(){return(0,a.default)(this._pageCache.values())}},{key:"getLoadedPages",value:function(){return this.getAllPages().filter(function(e){return e.loaded||e.hasError})}},{key:"_preloadNextInSet",value:function(){var e=this;if(this._preloadSet.size>0){this._preloading=!0;var t=[].concat((0,n.default)(this._preloadSet))[0];this._preloadSet.delete(t),this._loadPage(t).catch(function(e){console.warn("Preload failed:",e.error.message)}).then(function(){return e._preloadNextInSet()})}else this._preloading=!1}},{key:"_preloadArray",value:function(e){var t=this;if(e.length>0&&(e.filter(function(e){return!t.getPageWithoutLoading(e).loaded}).forEach(function(e){return t._preloadSet.add(e)}),!this._preloading))return this._preloadNextInSet()}},{key:"preload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentPage+1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.preloadPages;null==t&&(t=10),t!==1/0&&(t=w.default.clamp(t,0,this.chapter.isNetworkServer?this.totalPages:this.preloadMax)),e=w.default.clamp(e,1,this.totalPages+1);var r=w.default.clamp(e+t,1,this.totalPages+1);return this._preloadArray(w.default.range(e,r))}},{key:"preloadEverything",value:function(){return this.preload(1,1/0)}},{key:"moveToPage",value:function(e){return!this.chapter||isNaN(e)?d.default.resolve():e<=-1?this.moveToPage(this.totalPages):0===e?d.default.reject({chapter:this.chapter.prevChapterId,page:-1}):e>this.totalPages?d.default.reject({chapter:this.chapter.nextChapterId,page:1}):(this.currentPage===e?this.trigger("currentpagechange",[e]):this.setCurrentPage(e),d.default.resolve())}},{key:"moveToChapter",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e<=0?d.default.reject({chapter:e}):this.setChapter(e,r).then(function(){return t.chapter&&t.totalPages>0&&t.isStateReading?t.moveToPage(r):d.default.resolve()})}},{key:"moveToRecommendations",value:function(){var e=this;return this.isLoading=!0,y.Follows.create({},!0).then(function(r){return e.recommendations=r,e.state=t.readerState.RECS,e.isLoading=!1,d.default.resolve(r)}).catch(function(r){return e.state=t.readerState.ERROR,e.trigger("readererror",[r]),e.isLoading=!1,d.default.reject(r)})}},{key:"appMeta",get:function(){return this._appMeta},set:function(e){this._appMeta=e}},{key:"isUserGuest",get:function(){return"0"!==this.appMeta.guest}},{key:"isLoading",get:function(){return this._isLoading},set:function(e){e=!!e,this._isLoading===e||this.exiting||(this._isLoading=e,this.trigger("loadingchange",[e]))}},{key:"currentPage",get:function(){return this._currentPage}},{key:"totalPages",get:function(){return this.chapter?this.chapter.totalPages:0}},{key:"state",get:function(){return this._state},set:function(e){this._state===e||this.exiting||(this._state=e,this.trigger("statechange",[e]))}},{key:"isStateReading",get:function(){return this._state===t.readerState.READING}},{key:"isStateRecommendations",get:function(){return this._state===t.readerState.RECS}},{key:"isStateGap",get:function(){return this._state===t.readerState.GAP}},{key:"exiting",get:function(){return this._state===t.readerState.EXITING}},{key:"renderingMode",get:function(){return this._renderingMode},set:function(e){this._renderingMode===e||this.exiting||(this._renderingMode=e,this.trigger("renderingmodechange",[e]))}},{key:"displayFit",get:function(){return this._displayFit},set:function(e){this._displayFit===e||this.exiting||(this._displayFit=e,this.trigger("displayfitchange",[e]))}},{key:"direction",get:function(){return this._direction},set:function(e){this._direction===e||this.exiting||(this._direction=e,this.trigger("directionchange",[e]))}},{key:"isSinglePage",get:function(){return this.renderingMode===t.renderingModeState.SINGLE}},{key:"isDoublePage",get:function(){return this.renderingMode===t.renderingModeState.DOUBLE}},{key:"isLongStrip",get:function(){return this.renderingMode===t.renderingModeState.LONG}},{key:"isNoResize",get:function(){return this.displayFit===t.displayFitState.NO_RESIZE}},{key:"isFitHeight",get:function(){return this.displayFit===t.displayFitState.FIT_HEIGHT}},{key:"isFitWidth",get:function(){return this.displayFit===t.displayFitState.FIT_WIDTH}},{key:"isFitBoth",get:function(){return this.displayFit===t.displayFitState.FIT_BOTH}},{key:"isDirectionLTR",get:function(){return this.direction===t.directionState.LTR}},{key:"isDirectionRTL",get:function(){return this.direction===t.directionState.RTL}},{key:"settings",get:function(){return this._settingsShortcut}},{key:"chapter",get:function(){return this._chapter}},{key:"manga",get:function(){return this._chapter?this._chapter.manga:null}},{key:"currentPageObject",get:function(){return this.getPageWithoutLoading(this.currentPage)}},{key:"preloadMax",get:function(){return this.isUserGuest?M:P}}]),t}(v.default);t.default=x;var P=20,M=5;x.renderingModeState={SINGLE:1,DOUBLE:2,LONG:3,ALERT:4,RECS:5},x.directionState={LTR:1,RTL:2},x.displayFitState={FIT_BOTH:1,FIT_WIDTH:2,FIT_HEIGHT:3,NO_RESIZE:4},x.readerState={ERROR:0,READING:1,RECS:2,EXITING:3,GAP:4}},function(e,t,r){"use strict";var n=r(4).f,a=r(31),i=r(50),o=r(8),u=r(47),s=r(26),l=r(41),c=r(65),d=r(72),f=r(7),h=r(52).fastKey,g=r(53),p=f?"_s":"size",m=function(e,t){var r,n=h(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){u(e,c,t,"_i"),e._t=t,e._i=a(null),e._f=void 0,e._l=void 0,e[p]=0,void 0!=n&&s(n,r,e[l],e)});return i(c.prototype,{clear:function(){for(var e=g(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[p]=0},delete:function(e){var r=g(this,t),n=m(r,e);if(n){var a=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=a),a&&(a.p=i),r._f==n&&(r._f=a),r._l==n&&(r._l=i),r[p]--}return!!n},forEach:function(e){g(this,t);for(var r,n=o(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!m(g(this,t),e)}}),f&&n(c.prototype,"size",{get:function(){return g(this,t)[p]}}),c},def:function(e,t,r){var n,a,i=m(e,t);return i?i.v=r:(e._l=i={i:a=h(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=i),n&&(n.n=i),e[p]++,"F"!==a&&(e._i[a]=i)),e},getEntry:m,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=g(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),d(t)}}},function(e,t,r){"use strict";var n=r(2),a=r(1),i=r(52),o=r(16),u=r(9),s=r(50),l=r(26),c=r(47),d=r(5),f=r(25),h=r(4).f,g=r(120)(0),p=r(7);e.exports=function(e,t,r,m,v,y){var w=n[e],b=w,T=v?"set":"add",_=b&&b.prototype,k={};return p&&"function"==typeof b&&(y||_.forEach&&!o(function(){(new b).entries().next()}))?(b=t(function(t,r){c(t,b,e,"_c"),t._c=new w,void 0!=r&&l(r,v,t[T],t)}),g("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in _&&(!y||"clear"!=e)&&u(b.prototype,e,function(r,n){if(c(this,b,e),!t&&y&&!d(r))return"get"==e&&void 0;var a=this._c[e](0===r?0:r,n);return t?this:a})}),y||h(b.prototype,"size",{get:function(){return this._c.size}})):(b=m.getConstructor(t,e,v,T),s(b.prototype,r),i.NEED=!0),f(b,e),k[e]=b,a(a.G+a.W+a.F,k),y||m.setStrong(b,e,v),b}},function(e,t,r){var n=r(24);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(36),a=r(124);e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return a(this)}}},function(e,t,r){"use strict";var n=r(1);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";var n=r(1),a=r(22),i=r(8),o=r(26);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,u,s=arguments[1];return a(this),(t=void 0!==s)&&a(s),void 0==e?new this:(r=[],t?(n=0,u=i(s,arguments[2],2),o(e,!1,function(e){r.push(u(e,n++))})):o(e,!1,r.push,r),new this(r))}})}},function(e,t,r){e.exports={default:r(127),__esModule:!0}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(61),a=r(46).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},function(e,t,r){var n=r(1),a=r(0),i=r(16);e.exports=function(e,t){var r=(a.Object||{})[e]||Object[e],o={};o[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",o)}},function(e,t,r){var n;
/*!
* EventEmitter v5.2.6 - git.io/ee
* Unlicense - http://unlicense.org/
* Oliver Caldwell - https://oli.me.uk/
* @preserve
*/!function(t){"use strict";function a(){}var i=a.prototype,o=t.EventEmitter;function u(e,t){for(var r=e.length;r--;)if(e[r].listener===t)return r;return-1}function s(e){return function(){return this[e].apply(this,arguments)}}i.getListeners=function(e){var t,r,n=this._getEvents();if(e instanceof RegExp)for(r in t={},n)n.hasOwnProperty(r)&&e.test(r)&&(t[r]=n[r]);else t=n[e]||(n[e]=[]);return t},i.flattenListeners=function(e){var t,r=[];for(t=0;t<e.length;t+=1)r.push(e[t].listener);return r},i.getListenersAsObject=function(e){var t,r=this.getListeners(e);return r instanceof Array&&((t={})[e]=r),t||r},i.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var r,n=this.getListenersAsObject(e),a="object"==typeof t;for(r in n)n.hasOwnProperty(r)&&-1===u(n[r],t)&&n[r].push(a?t:{listener:t,once:!1});return this},i.on=s("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=s("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var r,n,a=this.getListenersAsObject(e);for(n in a)a.hasOwnProperty(n)&&-1!==(r=u(a[n],t))&&a[n].splice(r,1);return this},i.off=s("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,r){var n,a,i=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(n=r.length;n--;)i.call(this,t,r[n]);else for(n in t)t.hasOwnProperty(n)&&(a=t[n])&&("function"==typeof a?i.call(this,n,a):o.call(this,n,a));return this},i.removeEvent=function(e){var t,r=typeof e,n=this._getEvents();if("string"===r)delete n[e];else if(e instanceof RegExp)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},i.removeAllListeners=s("removeEvent"),i.emitEvent=function(e,t){var r,n,a,i,o=this.getListenersAsObject(e);for(i in o)if(o.hasOwnProperty(i))for(r=o[i].slice(0),a=0;a<r.length;a++)!0===(n=r[a]).once&&this.removeListener(e,n.listener),n.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=s("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return t.EventEmitter=o,a},void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}("undefined"!=typeof window?window:this||{})},function(e,t,r){e.exports={default:r(154),__esModule:!0}},function(e,t,r){var n=r(32),a=r(10),i=r(37).f;e.exports=function(e){return function(t){for(var r,o=a(t),u=n(o),s=u.length,l=0,c=[];s>l;)i.call(o,r=u[l++])&&c.push(e?[r,o[r]]:o[r]);return c}}},function(e,t,r){"use strict";t.__esModule=!0;var n=i(r(19)),a=i(r(156));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t,r,i){null===t&&(t=Function.prototype);var o=(0,a.default)(t,r);if(void 0===o){var u=(0,n.default)(t);return null===u?void 0:e(u,r,i)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(i):void 0}},function(e,t,r){e.exports=r(90)},function(e,t,r){"use strict";var n=new(function(e){return e&&e.__esModule?e:{default:e}}(r(91)).default);n.initialize(),window.reader=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(20)),a=s(r(11)),i=s(r(12)),o=s(r(74)),u=s(r(58));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){(0,a.default)(this,e),this.model=new o.default,this.view=new u.default(this.model)}return(0,i.default)(e,[{key:"initialize",value:function(){var e=this;return new n.default(function(t,r){var n=document.querySelector('meta[name="app"]');e.model.appMeta=n?n.dataset:{},e.model.loadSettings();for(var a=["renderingMode","displayFit","direction"],i=0;i<a.length;i++){var o=a[i];e.model[o]=e.model.settings[o]}return"undefined"==typeof window?r():t()}).then(function(){e.view.initialize(document.querySelector('div[role="main"]')),e.view.addListeners();var t=parseInt(e.model.appMeta.page)||1;return-1===t&&e.model.chapter&&(t=e.model.chapter.totalPages),"recs"===e.model.appMeta.page?e.model.moveToRecommendations().then(function(){e.view.renderer.render()}):e.model.setChapter(parseInt(e.model.appMeta.chapterId),t).then(function(r){if("recs"===e.model.appMeta.page)e.view.moveToRecommendations();else if(r.error)e.view.replaceHistory(r.id,null);else if(e.model.preload(t),e.model.isStateReading)return e.view.moveToPage(t,!1).then(function(){e.view.replaceHistory(),e.view.updatePage()})})}).catch(function(e){console.error(e)})}}]),e}();t.default=l},function(e,t,r){r(30),r(13),r(18),r(100),r(104),r(105),e.exports=r(0).Promise},function(e,t,r){var n=r(39),a=r(40);e.exports=function(e){return function(t,r){var i,o,u=String(a(t)),s=n(r),l=u.length;return s<0||s>=l?e?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===l||(o=u.charCodeAt(s+1))<56320||o>57343?e?u.charAt(s):i:e?u.slice(s,s+2):o-56320+(i-55296<<10)+65536}}},function(e,t,r){"use strict";var n=r(31),a=r(23),i=r(25),o={};r(9)(o,r(3)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(o,{next:a(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(4),a=r(6),i=r(32);e.exports=r(7)?Object.defineProperties:function(e,t){a(e);for(var r,o=i(t),u=o.length,s=0;u>s;)n.f(e,r=o[s++],t[r]);return e}},function(e,t,r){var n=r(10),a=r(33),i=r(97);e.exports=function(e){return function(t,r,o){var u,s=n(t),l=a(s.length),c=i(o,l);if(e&&r!=r){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){var n=r(39),a=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?a(e+t,0):i(e,t)}},function(e,t,r){"use strict";var n=r(99),a=r(65),i=r(17),o=r(10);e.exports=r(41)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t,r){"use strict";var n,a,i,o,u=r(21),s=r(2),l=r(8),c=r(36),d=r(1),f=r(5),h=r(22),g=r(47),p=r(26),m=r(68),v=r(69).set,y=r(102)(),w=r(49),b=r(70),T=r(103),_=r(71),k=s.TypeError,S=s.process,E=S&&S.versions,C=E&&E.v8||"",x=s.Promise,P="process"==c(S),M=function(){},D=a=w.f,L=!!function(){try{var e=x.resolve(1),t=(e.constructor={})[r(3)("species")]=function(e){e(M,M)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof t&&0!==C.indexOf("6.6")&&-1===T.indexOf("Chrome/66")}catch(e){}}(),O=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},q=function(e,t){if(!e._n){e._n=!0;var r=e._c;y(function(){for(var n=e._v,a=1==e._s,i=0,o=function(t){var r,i,o,u=a?t.ok:t.fail,s=t.resolve,l=t.reject,c=t.domain;try{u?(a||(2==e._h&&N(e),e._h=1),!0===u?r=n:(c&&c.enter(),r=u(n),c&&(c.exit(),o=!0)),r===t.promise?l(k("Promise-chain cycle")):(i=O(r))?i.call(r,s,l):s(r)):l(n)}catch(e){c&&!o&&c.exit(),l(e)}};r.length>i;)o(r[i++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){v.call(s,function(){var t,r,n,a=e._v,i=R(e);if(i&&(t=b(function(){P?S.emit("unhandledRejection",a,e):(r=s.onunhandledrejection)?r({promise:e,reason:a}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",a)}),e._h=P||R(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){v.call(s,function(){var t;P?S.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},H=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),q(t,!0))},F=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw k("Promise can't be resolved itself");(t=O(e))?y(function(){var n={_w:r,_d:!1};try{t.call(e,l(F,n,1),l(H,n,1))}catch(e){H.call(n,e)}}):(r._v=e,r._s=1,q(r,!1))}catch(e){H.call({_w:r,_d:!1},e)}}};L||(x=function(e){g(this,x,"Promise","_h"),h(e),n.call(this);try{e(l(F,this,1),l(H,this,1))}catch(e){H.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(50)(x.prototype,{then:function(e,t){var r=D(m(this,x));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=P?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&q(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n;this.promise=e,this.resolve=l(F,e,1),this.reject=l(H,e,1)},w.f=D=function(e){return e===x||e===o?new i(e):a(e)}),d(d.G+d.W+d.F*!L,{Promise:x}),r(25)(x,"Promise"),r(72)("Promise"),o=r(0).Promise,d(d.S+d.F*!L,"Promise",{reject:function(e){var t=D(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(u||!L),"Promise",{resolve:function(e){return _(u&&this===o?x:this,e)}}),d(d.S+d.F*!(L&&r(73)(function(e){x.all(e).catch(M)})),"Promise",{all:function(e){var t=this,r=D(t),n=r.resolve,a=r.reject,i=b(function(){var r=[],i=0,o=1;p(e,!1,function(e){var u=i++,s=!1;r.push(void 0),o++,t.resolve(e).then(function(e){s||(s=!0,r[u]=e,--o||n(r))},a)}),--o||n(r)});return i.e&&a(i.v),r.promise},race:function(e){var t=this,r=D(t),n=r.reject,a=b(function(){p(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return a.e&&n(a.v),r.promise}})},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(2),a=r(69).set,i=n.MutationObserver||n.WebKitMutationObserver,o=n.process,u=n.Promise,s="process"==r(24)(o);e.exports=function(){var e,t,r,l=function(){var n,a;for(s&&(n=o.domain)&&n.exit();e;){a=e.fn,e=e.next;try{a()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(s)r=function(){o.nextTick(l)};else if(!i||n.navigator&&n.navigator.standalone)if(u&&u.resolve){var c=u.resolve(void 0);r=function(){c.then(l)}}else r=function(){a.call(n,l)};else{var d=!0,f=document.createTextNode("");new i(l).observe(f,{characterData:!0}),r=function(){f.data=d=!d}}return function(n){var a={fn:n,next:void 0};t&&(t.next=a),e||(e=a,r()),t=a}}},function(e,t,r){var n=r(2).navigator;e.exports=n&&n.userAgent||""},function(e,t,r){"use strict";var n=r(1),a=r(0),i=r(2),o=r(68),u=r(71);n(n.P+n.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),r="function"==typeof e;return this.then(r?function(r){return u(t,e()).then(function(){return r})}:e,r?function(r){return u(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){"use strict";var n=r(1),a=r(49),i=r(70);n(n.S,"Promise",{try:function(e){var t=a.f(this),r=i(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},function(e,t,r){e.exports={default:r(107),__esModule:!0}},function(e,t,r){r(108);var n=r(0).Object;e.exports=function(e,t,r){return n.defineProperty(e,t,r)}},function(e,t,r){var n=r(1);n(n.S+n.F*!r(7),"Object",{defineProperty:r(4).f})},function(e,t,r){"use strict";t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(r(51));t.default=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return(0,n.default)(e)}},function(e,t,r){r(13),r(111),e.exports=r(0).Array.from},function(e,t,r){"use strict";var n=r(8),a=r(1),i=r(35),o=r(66),u=r(67),s=r(33),l=r(112),c=r(48);a(a.S+a.F*!r(73)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,a,d,f=i(e),h="function"==typeof this?this:Array,g=arguments.length,p=g>1?arguments[1]:void 0,m=void 0!==p,v=0,y=c(f);if(m&&(p=n(p,g>2?arguments[2]:void 0,2)),void 0==y||h==Array&&u(y))for(r=new h(t=s(f.length));t>v;v++)l(r,v,m?p(f[v],v):f[v]);else for(d=y.call(f),r=new h;!(a=d.next()).done;v++)l(r,v,m?o(d,p,[a.value,v],!0):a.value);return r.length=v,r}})},function(e,t,r){"use strict";var n=r(4),a=r(23);e.exports=function(e,t,r){t in e?n.f(e,t,a(0,r)):e[t]=r}},function(e,t,r){e.exports={default:r(114),__esModule:!0}},function(e,t,r){var n=r(0),a=n.JSON||(n.JSON={stringify:JSON.stringify});e.exports=function(e){return a.stringify.apply(a,arguments)}},function(e,t,r){r(18),r(13),e.exports=r(116)},function(e,t,r){var n=r(6),a=r(48);e.exports=r(0).getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){e.exports={default:r(118),__esModule:!0}},function(e,t,r){r(30),r(13),r(18),r(119),r(123),r(125),r(126),e.exports=r(0).Set},function(e,t,r){"use strict";var n=r(75),a=r(53);e.exports=r(76)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(a(this,"Set"),e=0===e?0:e,e)}},n)},function(e,t,r){var n=r(8),a=r(62),i=r(35),o=r(33),u=r(121);e.exports=function(e,t){var r=1==e,s=2==e,l=3==e,c=4==e,d=6==e,f=5==e||d,h=t||u;return function(t,u,g){for(var p,m,v=i(t),y=a(v),w=n(u,g,3),b=o(y.length),T=0,_=r?h(t,b):s?h(t,0):void 0;b>T;T++)if((f||T in y)&&(m=w(p=y[T],T,v),e))if(r)_[T]=m;else if(m)switch(e){case 3:return!0;case 5:return p;case 6:return T;case 2:_.push(p)}else if(c)return!1;return d?-1:l||c?c:_}}},function(e,t,r){var n=r(122);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){var n=r(5),a=r(77),i=r(3)("species");e.exports=function(e){var t;return a(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!a(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){var n=r(1);n(n.P+n.R,"Set",{toJSON:r(78)("Set")})},function(e,t,r){var n=r(26);e.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},function(e,t,r){r(79)("Set")},function(e,t,r){r(80)("Set")},function(e,t,r){r(30),r(13),r(18),r(128),r(129),r(130),r(131),e.exports=r(0).Map},function(e,t,r){"use strict";var n=r(75),a=r(53);e.exports=r(76)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(a(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(a(this,"Map"),0===e?0:e,t)}},n,!0)},function(e,t,r){var n=r(1);n(n.P+n.R,"Map",{toJSON:r(78)("Map")})},function(e,t,r){r(79)("Map")},function(e,t,r){r(80)("Map")},function(e,t,r){e.exports={default:r(133),__esModule:!0}},function(e,t,r){r(13),r(18),e.exports=r(54).f("iterator")},function(e,t,r){e.exports={default:r(135),__esModule:!0}},function(e,t,r){r(136),r(30),r(139),r(140),e.exports=r(0).Symbol},function(e,t,r){"use strict";var n=r(2),a=r(14),i=r(7),o=r(1),u=r(60),s=r(52).KEY,l=r(16),c=r(45),d=r(25),f=r(34),h=r(3),g=r(54),p=r(55),m=r(137),v=r(77),y=r(6),w=r(5),b=r(10),T=r(43),_=r(23),k=r(31),S=r(138),E=r(56),C=r(4),x=r(32),P=E.f,M=C.f,D=S.f,L=n.Symbol,O=n.JSON,q=O&&O.stringify,I=h("_hidden"),R=h("toPrimitive"),N={}.propertyIsEnumerable,H=c("symbol-registry"),F=c("symbols"),W=c("op-symbols"),U=Object.prototype,j="function"==typeof L,A=n.QObject,Y=!A||!A.prototype||!A.prototype.findChild,G=i&&l(function(){return 7!=k(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=P(U,t);n&&delete U[t],M(e,t,r),n&&e!==U&&M(U,t,n)}:M,B=function(e){var t=F[e]=k(L.prototype);return t._k=e,t},z=j&&"symbol"==typeof L.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof L},X=function(e,t,r){return e===U&&X(W,t,r),y(e),t=T(t,!0),y(r),a(F,t)?(r.enumerable?(a(e,I)&&e[I][t]&&(e[I][t]=!1),r=k(r,{enumerable:_(0,!1)})):(a(e,I)||M(e,I,_(1,{})),e[I][t]=!0),G(e,t,r)):M(e,t,r)},Q=function(e,t){y(e);for(var r,n=m(t=b(t)),a=0,i=n.length;i>a;)X(e,r=n[a++],t[r]);return e},V=function(e){var t=N.call(this,e=T(e,!0));return!(this===U&&a(F,e)&&!a(W,e))&&(!(t||!a(this,e)||!a(F,e)||a(this,I)&&this[I][e])||t)},K=function(e,t){if(e=b(e),t=T(t,!0),e!==U||!a(F,t)||a(W,t)){var r=P(e,t);return!r||!a(F,t)||a(e,I)&&e[I][t]||(r.enumerable=!0),r}},J=function(e){for(var t,r=D(b(e)),n=[],i=0;r.length>i;)a(F,t=r[i++])||t==I||t==s||n.push(t);return n},$=function(e){for(var t,r=e===U,n=D(r?W:b(e)),i=[],o=0;n.length>o;)!a(F,t=n[o++])||r&&!a(U,t)||i.push(F[t]);return i};j||(u((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(W,r),a(this,I)&&a(this[I],e)&&(this[I][e]=!1),G(this,e,_(1,r))};return i&&Y&&G(U,e,{configurable:!0,set:t}),B(e)}).prototype,"toString",function(){return this._k}),E.f=K,C.f=X,r(83).f=S.f=J,r(37).f=V,r(82).f=$,i&&!r(21)&&u(U,"propertyIsEnumerable",V,!0),g.f=function(e){return B(h(e))}),o(o.G+o.W+o.F*!j,{Symbol:L});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)h(Z[ee++]);for(var te=x(h.store),re=0;te.length>re;)p(te[re++]);o(o.S+o.F*!j,"Symbol",{for:function(e){return a(H,e+="")?H[e]:H[e]=L(e)},keyFor:function(e){if(!z(e))throw TypeError(e+" is not a symbol!");for(var t in H)if(H[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),o(o.S+o.F*!j,"Object",{create:function(e,t){return void 0===t?k(e):Q(k(e),t)},defineProperty:X,defineProperties:Q,getOwnPropertyDescriptor:K,getOwnPropertyNames:J,getOwnPropertySymbols:$}),O&&o(o.S+o.F*(!j||l(function(){var e=L();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],a=1;arguments.length>a;)n.push(arguments[a++]);if(r=t=n[1],(w(t)||void 0!==e)&&!z(e))return v(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,q.apply(O,n)}}),L.prototype[R]||r(9)(L.prototype,R,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},function(e,t,r){var n=r(32),a=r(82),i=r(37);e.exports=function(e){var t=n(e),r=a.f;if(r)for(var o,u=r(e),s=i.f,l=0;u.length>l;)s.call(e,o=u[l++])&&t.push(o);return t}},function(e,t,r){var n=r(10),a=r(83).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(n(e))}},function(e,t,r){r(55)("asyncIterator")},function(e,t,r){r(55)("observable")},function(e,t,r){e.exports={default:r(142),__esModule:!0}},function(e,t,r){r(18),r(13),e.exports=r(143)},function(e,t,r){var n=r(36),a=r(3)("iterator"),i=r(17);e.exports=r(0).isIterable=function(e){var t=Object(e);return void 0!==t[a]||"@@iterator"in t||i.hasOwnProperty(n(t))}},function(e,t,r){r(145),e.exports=r(0).Object.getPrototypeOf},function(e,t,r){var n=r(35),a=r(64);r(84)("getPrototypeOf",function(){return function(e){return a(n(e))}})},function(e,t,r){e.exports={default:r(147),__esModule:!0}},function(e,t,r){r(148),e.exports=r(0).Object.setPrototypeOf},function(e,t,r){var n=r(1);n(n.S,"Object",{setPrototypeOf:r(149).set})},function(e,t,r){var n=r(5),a=r(6),i=function(e,t){if(a(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(8)(Function.call,r(56).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},function(e,t,r){e.exports={default:r(151),__esModule:!0}},function(e,t,r){r(152);var n=r(0).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){var n=r(1);n(n.S,"Object",{create:r(31)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Follows=t.Chapter=t.Manga=void 0;var n=p(r(15)),a=p(r(57)),i=p(r(86)),o=p(r(19)),u=p(r(28)),s=p(r(88)),l=p(r(29)),c=p(r(20)),d=p(r(11)),f=p(r(12)),h=p(r(38)),g=p(r(160));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,d.default)(this,e),this.initialize(t)}return(0,f.default)(e,[{key:"resourceType",get:function(){return"resource"}},{key:"resourceFormat",get:function(){return"json"}}]),(0,f.default)(e,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._data=e}},{key:"load",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=null!=r.id?r.id:"",i=this.resourceType;return new c.default(function(o,u){if(r.type=i,i in e.cache||(e.cache[i]={}),!n&&a in e.cache[i])return o(e.cache[i][a]);var s=r.baseURL||window.location;delete r.baseURL;var l=new URL(t.constructor.API_URL(),s);for(var c in r)l.searchParams.append(c,r[c]);return o(fetch(l,{credentials:"same-origin"}).catch(function(e){throw console.error(e),t.response=e,t._data.message=e.message,e}).then(function(e){return e.ok||console.error("Fetch not ok:",i,a,e),t.response=e,"follows"===i?e.text():e.json().catch(function(e){return console.error("JSON parsing error:",e),{id:a}})}).then(function(r){return e.cache[i][a]=t,t.initialize(r),t.response.ok||(console.error("Response status:",t.response.status,t.response.statusText),console.error("Resource status:",r.status)),t}))}).catch(function(e){throw console.error("Error:",e),e})}},{key:"status",get:function(){return this._data.status}},{key:"isCloudFlareError",get:function(){try{return 403===this.error.response.status&&"cloudflare"===this.error.response.headers.server}catch(e){return!1}}}],[{key:"create",value:function(e,t){return(new this).load(e,t)}}]),e}();t.default=m,m.cache={};var v=t.Manga=function(e){function t(){return(0,d.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,f.default)(t,[{key:"initialize",value:function(e){(0,s.default)(t.prototype.__proto__||(0,o.default)(t.prototype),"initialize",this).call(this,e.manga),this.chapters=(0,i.default)(e.chapter||{}).map(function(e){var t=(0,a.default)(e,2),r=t[0],n=t[1];return n.id=parseInt(r),n}),this.chapterList=[]}},{key:"getChapterData",value:function(e){return this.chapters.find(function(t){return t.id===e})}},{key:"getChapterTitle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.getChapterData(e);if(r){var n="";return r.volume&&(n+="Vol. "+r.volume+" "),r.chapter&&(n+="Ch. "+r.chapter+" "),r.title&&!t&&(n+=""+r.title),n||(n="Oneshot"),n.trim()}return""}},{key:"getChapterName",value:function(e){var t=this.getChapterData(e);return t?t.title?t.title:t.volume&&t.chapter?"Vol. "+t.volume+" Ch. "+t.chapter:t.chapter?"Ch. "+t.chapter:t.volume?"Vol. "+t.volume:"Oneshot":""}},{key:"makeChapterList",value:function(e,r){var i=(0,a.default)(r,3),o=i[0],u=void 0===o?0:o,s=i[1],l=void 0===s?0:s,c=i[2],d=void 0===c?0:c;this.chapterList=[];var f=this.chapters.filter(function(t){return t.lang_code===e});t.sortChapters(f);var h=null,g=!0,p=!1,m=void 0;try{for(var v,y=(0,n.default)(f);!(g=(v=y.next()).done);g=!0){var w=v.value;h?(w.chapter||w.volume&&"0"!==w.volume)&&h.chapter===w.chapter&&h.volume===w.volume?w.group_id===u&&w.group_id_2===l&&w.group_id_3===d&&(h=w):(this.chapterList.push(h),h=w):h=w}}catch(e){p=!0,m=e}finally{try{!g&&y.return&&y.return()}finally{if(p)throw m}}return h&&this.chapterList.push(h),this.chapterList}},{key:"getAltChapters",value:function(e){var t=this.getChapterData(e);if(t){var r=(""===t.volume||"0"===t.volume)&&""===t.chapter;return this.chapters.filter(function(e){return e.lang_code===t.lang_code&&e.volume===t.volume&&e.chapter===t.chapter&&(!r||t.title===e.title)}).map(function(e){return new y(e)})}return[]}},{key:"getPrevChapterId",value:function(e){var t=this.chapterList.findIndex(function(t){return t.id===e});return t<=0?-1:this.chapterList[t-1].id}},{key:"getNextChapterId",value:function(e){var t=this.chapterList.findIndex(function(t){return t.id===e});return-1===t||t===this.chapterList.length-1?0:this.chapterList[t+1].id}},{key:"areChaptersSequential",value:function(e,t){var r=this.getChapterData(e),n=this.getChapterData(t);if(!r||!n)return!0;var a=parseFloat(r.chapter),i=parseFloat(n.chapter),o=parseFloat(r.volume),u=parseFloat(n.volume);return!(!isNaN(a)&&!isNaN(i))||(a===i&&o===u||(Math.abs(a-i).toFixed(1)<=1.1||(a<=1&&Math.floor(o-u)<=1||i<=1&&Math.floor(u-o)<=1)))}},{key:"resourceType",get:function(){return"manga"}},{key:"id",get:function(){return this._data.id}},{key:"title",get:function(){return this._data.title||""}},{key:"langCode",get:function(){return this._data.lang_flag}},{key:"langName",get:function(){return this._data.lang_name}},{key:"lastChapter",get:function(){return this._data.last_chapter}},{key:"isLongStrip",get:function(){return this._data.genres&&this._data.genres.includes(36)}},{key:"isDoujinshi",get:function(){return this._data.genres&&this._data.genres.includes(7)}},{key:"isHentai",get:function(){return!!this._data.hentai}},{key:"url",get:function(){var e=this.title.toLowerCase().replace(/&[0-9a-z]+;/gi,"").replace(/[^0-9a-z]/gi," ").split(" ").filter(function(e){return e}).join("-");return"/title/"+this.id+"/"+e}},{key:"coverUrl",get:function(){return"/images/manga/"+this.id+".jpg"}},{key:"coverThumbUrl",get:function(){return"/images/manga/"+this.id+".thumb.jpg"}}],[{key:"API_URL",value:function(){return"/api/"}},{key:"sortChapters",value:function(e){var t=(0,g.default)({desc:!1,insensitive:!0});h.default.stableSort(e,function(e,r){return t(r.volume,e.volume)}),h.default.stableSort(e,function(e,r){return t(e.group_id,r.group_id)}),h.default.stableSort(e,function(e,r){return t(e.chapter,r.chapter)});var r="0";e.forEach(function(e){e.__prev_vol=r,e.volume&&(r=e.volume)}),h.default.stableSort(e,function(e,r){return t(e.volume||e.__prev_vol,r.volume||r.__prev_vol)}),e.forEach(function(e){delete e.__prev_vol})}},{key:"create",value:function(e,r){return(0,s.default)(t.__proto__||(0,o.default)(t),"create",this).call(this,e,r).then(function(t){return t._data.id=e.id,t})}}]),t}(m),y=t.Chapter=function(e){function t(){return(0,d.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,f.default)(t,[{key:"getPage",value:function(e){return e>=1&&e<=this.totalPages?this._data.page_array[e-1]:""}},{key:"imageURL",value:function(e){return this._data.server+this._data.hash+"/"+this.getPage(e)}},{key:"makeMangaChapterList",value:function(){this.manga.makeChapterList(this.langCode,this.groupIds)}},{key:"loadManga",value:function(e){var t=this;return this._data.manga_id?v.create({id:this._data.manga_id},e).then(function(e){return t.manga=e,t.makeMangaChapterList(),c.default.resolve(t)}):(console.warn("No manga id for chapter",this.id),c.default.resolve(this))}},{key:"resourceType",get:function(){return"chapter"}},{key:"id",get:function(){return this._data.id}},{key:"mangaId",get:function(){return this._data.manga_id}},{key:"title",get:function(){return this._data.title}},{key:"chapter",get:function(){return this._data.chapter}},{key:"volume",get:function(){return this._data.volume}},{key:"comments",get:function(){return this._data.comments}},{key:"isLastChapter",get:function(){return this.manga&&this.manga.lastChapter&&"0"!==this.manga.lastChapter&&this.manga.lastChapter===this.chapter}},{key:"langCode",get:function(){return this._data.lang_code}},{key:"langName",get:function(){return this._data.lang_name}},{key:"totalPages",get:function(){return this._data.page_array?this._data.page_array.length:0}},{key:"groupIds",get:function(){return[this._data.group_id,this._data.group_id_2,this._data.group_id_3].filter(function(e){return e})}},{key:"groupNames",get:function(){return[this._data.group_name,this._data.group_name_2,this._data.group_name_3].filter(function(e){return e})}},{key:"groupWebsite",get:function(){return this._data.group_website}},{key:"timestamp",get:function(){return this._data.timestamp}},{key:"prevChapterId",get:function(){return this.manga.getPrevChapterId(this.id)}},{key:"nextChapterId",get:function(){return this.manga.getNextChapterId(this.id)}},{key:"url",get:function(){return"/chapter/"+this.id}},{key:"externalUrl",get:function(){return this._data.external||""}},{key:"fullTitle",get:function(){var e="";return this.volume&&(e+="Vol. "+this.volume+" "),this.chapter&&(e+="Ch. "+this.chapter+" "),this.title&&(e+=""+this.title),e||(e="Oneshot"),e.trim()}},{key:"isNotFound",get:function(){try{return 404==this.response.status}catch(e){return!1}}},{key:"isDelayed",get:function(){try{return 409==this.response.status}catch(e){return!1}}},{key:"isDeleted",get:function(){try{return 410==this.response.status}catch(e){return!1}}},{key:"isRestricted",get:function(){try{return 451==this.response.status}catch(e){return!1}}},{key:"isExternal",get:function(){return"external"===this._data.status}},{key:"message",get:function(){return this._data.message}},{key:"isNetworkServer",get:function(){return this._isNetworkServer||(this._isNetworkServer=/mangadex\.network/.test(this._data.server||"")),this._isNetworkServer}},{key:"pageArray",get:function(){return this._data.page_array||[]}},{key:"pagesFullURL",get:function(){var e=this;return this.pageArray.map(function(t,r){return e.imageURL(r+1)})}}],[{key:"API_URL",value:function(){return"/api/"}},{key:"create",value:function(e,r){return(0,s.default)(t.__proto__||(0,o.default)(t),"create",this).call(this,e,r).catch(function(e){return e.mangaId?c.default.resolve(e):c.default.reject(e)}).then(function(e){return e._data.page_array&&(e._data.page_array=e._data.page_array.filter(function(e){return!!e})),c.default.resolve(e)}).then(function(e){return e.loadManga(r)}).catch(function(e){return e.manga&&e.manga.id?c.default.resolve(e):c.default.reject(e)})}}]),t}(m);t.Follows=function(e){function t(){return(0,d.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,f.default)(t,[{key:"resourceType",get:function(){return"follows"}},{key:"resourceFormat",get:function(){return"text"}},{key:"unreadChapters",get:function(){return this.chapters.filter(function(e){return e.id&&!e._data.read})}},{key:"unreadManga",get:function(){return this.unreadChapters.reduce(function(e,t){return e[t.manga.id]=t.manga,e},{})}}],[{key:"API_URL",value:function(){return"/follows/"}},{key:"create",value:function(e,r){return(0,s.default)(t.__proto__||(0,o.default)(t),"create",this).call(this,e,r).then(function(e){var t=e._data.match(/col-md-3 [\s\S]*?chapter-list-group/gim);if(!t)return[];var r={},n="";return e.chapters=t.map(function(e){var t=["",""];(n=(e.match(/manga_title[\s\S]*?title='([\s\S]*?)'/)||t)[1].trim()||"")&&console.log(n);var a=parseInt((e.match(/data-manga-id="(\d*?)"/)||t)[1]);a in r||(r[a]=new v,r[a].initialize({manga:{id:a||0,title:n}}));var i=r[a],o=new y;return o.initialize({id:parseInt((e.match(/data-id="(\d*?)"/)||t)[1])||null,title:(e.match(/data-title="([\s\S]*?)"/)||t)[1],chapter:parseFloat((e.match(/data-chapter="([\d\.]*?)"/)||t)[1])||null,volume:parseFloat((e.match(/data-volume="([\d\.]*?)"/)||t)[1])||null,timestamp:1e3*parseInt((e.match(/data-timestamp="(.*?)"/)||t)[1])||null,lang_code:(e.match(/flag-(..)/)||t)[1],read:/chapter_mark_unread_button/.test(e)}),o.manga=i,i.chapters.push(o),o}),e})}}]),t}(m)},function(e,t,r){r(155),e.exports=r(0).Object.entries},function(e,t,r){var n=r(1),a=r(87)(!0);n(n.S,"Object",{entries:function(e){return a(e)}})},function(e,t,r){e.exports={default:r(157),__esModule:!0}},function(e,t,r){r(158);var n=r(0).Object;e.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)}},function(e,t,r){var n=r(10),a=r(56).f;r(84)("getOwnPropertyDescriptor",function(){return function(e,t){return a(n(e),t)}})},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){void 0===e&&(e={});var t=/^0/,r=/\s+/g,n=/^\s+|\s+$/g,a=/[^\x00-\x80]/,i=/^0x[0-9a-f]+$/i,o=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,s=String.prototype.toLocaleLowerCase||String.prototype.toLowerCase,l=e.desc?-1:1,c=-l,d=e.insensitive?function(e){return s.call(""+e).replace(n,"")}:function(e){return(""+e).replace(n,"")};function f(e){return e.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function h(e,a){return(!e.match(t)||1===a)&&parseFloat(e)||e.replace(r," ").replace(n,"")||0}return function(e,t){var r=d(e),n=d(t);if(!r&&!n)return 0;if(!r&&n)return c;if(r&&!n)return l;var o=f(r),s=f(n),g=r.match(i),p=n.match(i),m=g&&p?parseInt(g[0],16):1!==o.length&&Date.parse(r),v=g&&p?parseInt(p[0],16):m&&n.match(u)&&Date.parse(n)||null;if(v){if(m===v)return 0;if(m<v)return c;if(m>v)return l}for(var y=o.length,w=s.length,b=0,T=Math.max(y,w);b<T;b+=1){var _=h(o[b]||"",y),k=h(s[b]||"",w);if(isNaN(_)!==isNaN(k))return isNaN(_)?l:c;if(a.test(_+k)&&_.localeCompare){var S=_.localeCompare(k);if(S>0)return l;if(S<0)return c;if(b===T-1)return 0}if(_<k)return c;if(_>k)return l;if(""+_<""+k)return c;if(""+_>""+k)return l}return 0}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupItem=t.PageDropdown=t.ChapterDropdown=t.Link=t.Flag=t.Option=void 0;var n=l(r(15)),a=l(r(19)),i=l(r(28)),o=l(r(29)),u=l(r(11)),s=l(r(12));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(){(0,u.default)(this,e)}return(0,s.default)(e,null,[{key:"create",value:function(e,t){var r="string"==typeof e?document.createElement(e):e;for(var n in t)r[n]=t[n];return r}},{key:"empty",value:function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}]),e}();t.default=c;var d=t.Option=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e){return this.create("option",{value:e.value,selected:e.selected||!1,textContent:e.text})}}]),t}(c),f=t.Flag=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e,t){var r=e.langCode.replace(/\W/g,"")||"_unknown";return(t=this.create(t||"span",{title:e.langName||r})).className="",t.classList.add("rounded","flag",("flag-"+r).trim()),t}}]),t}(c);t.Link=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e,t){return this.create(t||"a",{href:e.url,title:e.title,innerHTML:e.title})}}]),t}(c),t.ChapterDropdown=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e,t){this.empty(t);var r=!0,a=!1,i=void 0;try{for(var o,u=(0,n.default)(e.manga.chapterList.slice().reverse());!(r=(o=u.next()).done);r=!0){var s=o.value;t.appendChild(d.render({value:s.id,selected:s.id===e.chapter.id,text:e.manga.getChapterTitle(s.id,!e.settings.showDropdownTitles)}))}}catch(e){a=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(a)throw i}}return t}}]),t}(c),t.PageDropdown=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e,t){this.empty(t);for(var r=1;r<=e.chapter.totalPages;++r)t.appendChild(d.render({value:r,selected:r===e.currentPage,text:r}));return t}}]),t}(c),t.GroupItem=function(e){function t(){return(0,u.default)(this,t),(0,i.default)(this,(t.__proto__||(0,a.default)(t)).apply(this,arguments))}return(0,o.default)(t,e),(0,s.default)(t,null,[{key:"render",value:function(e){var t=this.create("li");t.appendChild(f.render(e)).classList.add("mr-1");var r=t.appendChild(this.create(e.isCurrentChapter?"strong":"a",{innerHTML:e.groupNames.join(" | "),href:e.url}));return r.dataset.action="chapter",r.dataset.chapter=e.id,t}}]),t}(c)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(15)),a=u(r(11)),i=u(r(12)),o=u(r(58));function u(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,a.default)(this,e)}return(0,i.default)(e,null,[{key:"registerDefaults",value:function(){this.register("turnPageLeft",["arrowleft","left","a"],function(e,t){o.default.isScrolledToLeft&&t.turnPageLeft(e.shiftKey?1:void 0)}),this.register("turnPageRight",["arrowright","right","d"],function(e,t){o.default.isScrolledToRight&&t.turnPageRight(e.shiftKey?1:void 0)}),this.register("turnPageUp",["arrowup","up","w"],function(e,t){1==t.model.settings.pageWheelTurn&&o.default.isScrolledToTop&&t.turnPageBackward(e.shiftKey?1:void 0)}),this.register("turnPageDown",["arrowdown","down","s"],function(e,t){1==t.model.settings.pageWheelTurn&&o.default.isScrolledToBottom&&t.turnPageForward(e.shiftKey?1:void 0)}),this.register("scrollLeft",["arrowleft","left","a"],function(e,t){if(1==t.model.settings.scrollingMethod)o.default.scroll(-Math.floor(.9*t.el.clientWidth),0,"smooth");else if(0==t.model.settings.scrollingMethod){var r=e.key.toLowerCase();"arrowleft"!==r&&"left"!==r&&o.default.scroll(-50,0)}}),this.register("scrollRight",["arrowright","right","d"],function(e,t){if(1==t.model.settings.scrollingMethod)o.default.scroll(Math.floor(.9*t.el.clientWidth),0,"smooth");else if(0==t.model.settings.scrollingMethod){var r=e.key.toLowerCase();"arrowright"!==r&&"right"!==r&&o.default.scroll(50,0)}}),this.register("scrollUp",["arrowup","up","w"],function(e,t){if(1==t.model.settings.scrollingMethod)o.default.scroll(0,-Math.floor(.9*t.el.clientHeight),"smooth");else if(0==t.model.settings.scrollingMethod){var r=e.key.toLowerCase();"arrowup"!==r&&"up"!==r&&o.default.scroll(0,-50)}}),this.register("scrollDown",["arrowdown","down","s"],function(e,t){if(1==t.model.settings.scrollingMethod)o.default.scroll(0,Math.floor(.9*t.el.clientHeight),"smooth");else if(0==t.model.settings.scrollingMethod){var r=e.key.toLowerCase();"arrowdown"!==r&&"down"!==r&&o.default.scroll(0,50)}}),this.register("turnChapterLeft",["^q"],function(e,t){t.moveToChapter(t.model.isDirectionLTR?t.model.chapter.prevChapterId:t.model.chapter.nextChapterId,1)}),this.register("turnChapterRight",["^e"],function(e,t){t.moveToChapter(t.model.isDirectionRTL?t.model.chapter.prevChapterId:t.model.chapter.nextChapterId,1)}),this.register("toggleDisplayFit",["f"],function(e,t){t.model.saveSetting("displayFit",t.model.displayFit%2+(e.shiftKey?3:1))}),this.register("toggleRenderingMode",["g"],function(e,t){t.model.saveSetting("renderingMode",(t.model.renderingMode+(e.shiftKey?-1:1))%3||3)}),this.register("toggleDirection",["h"],function(e,t){t.model.saveSetting("direction",t.model.direction%2+1)}),this.register("toggleHeader",["!r"],function(e,t){t.model.saveSetting("hideHeader",t.model.settings.hideHeader?0:1)}),this.register("toggleSidebar",["!t"],function(e,t){t.model.saveSetting("hideSidebar",t.model.settings.hideSidebar?0:1)}),this.register("togglePagebar",["!y"],function(e,t){t.model.saveSetting("hidePagebar",t.model.settings.hidePagebar?0:1)}),this.register("toggleAllBars",["^r","^t","^y"],function(e,t){var r=t.model.settings.hideSidebar||t.model.settings.hideHeader||t.model.settings.hidePagebar;t.model.saveSetting("hideSidebar",r?0:1),t.model.saveSetting("hideHeader",r?0:1),t.model.saveSetting("hidePagebar",r?0:1)}),this.register("exitToManga",["^m"],function(e,t){t.exitToURL(t.model.manga.url)}),this.register("exitToComments",["^k"],function(e,t){t.exitToURL(t.pageURL(t.model.chapter.id)+"/comments")})}},{key:"register",value:function(e,t,r){this._kbdInput=this._kbdInput||{},this._kbdHandlers=this._kbdHandlers||{},this._kbdHandlers[e]=r;var a=!0,i=!1,o=void 0;try{for(var u,s=(0,n.default)(t);!(a=(u=s.next()).done);a=!0){var l=u.value;this._kbdInput[l]=this._kbdInput[l]||[],this._kbdInput[l].push(e)}}catch(e){i=!0,o=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}}},{key:"fire",value:function(e,t,r){if(e in this._kbdInput){var a=!0,i=!1,o=void 0;try{for(var u,s=(0,n.default)(this._kbdInput[e]);!(a=(u=s.next()).done);a=!0){var l=u.value;l in this._kbdHandlers&&this._kbdHandlers[l](t,r)}}catch(e){i=!0,o=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}}}},{key:"keydownHandler",value:function(e,t){if(!(e.altKey||e.ctrlKey||e.metaKey||"OS"===e.key)){var r=(e.target||e.srcElement).tagName,n=e.key.toLowerCase();["INPUT","SELECT","TEXTAREA"].includes(r)||(e.stopPropagation(),this.fire(n,e,t),this.fire(e.shiftKey?"^"+n:"!"+n,e,t))}}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Recommendations=t.Alert=t.LongStrip=t.DoublePage=t.SinglePage=void 0;var n=v(r(164)),a=v(r(27)),i=v(r(81)),o=v(r(15)),u=v(r(20)),s=v(r(19)),l=v(r(28)),c=v(r(88)),d=v(r(29)),f=v(r(11)),h=v(r(12)),g=r(167),p=v(r(38)),m=v(r(58));function v(e){return e&&e.__esModule?e:{default:e}}var y=function(){function e(t,r,n){(0,f.default)(this,e),this.el=t,this.model=r,this.view=n,this._initialized=!1}return(0,h.default)(e,[{key:"initialize",value:function(){var e=this;this._initialized=!0,this.clearImageContainer(),this.renderedPages=0,this._pageStateHandler=function(t){e.pageStateHandler(t)},this.model.on("pageloading",this._pageStateHandler),this.model.on("pageload",this._pageStateHandler),this.model.on("pageerror",this._pageStateHandler)}},{key:"destroy",value:function(){this._initialized&&(this._initialized=!1,this.clearImageContainer(),this.model.off("pageloading",this._pageStateHandler),this.model.off("pageload",this._pageStateHandler),this.model.off("pageerror",this._pageStateHandler))}},{key:"reinitialize",value:function(){this._initialized&&this.destroy(),this.initialize()}},{key:"createAndAppendWrapper",value:function(e){return this.el.appendChild(this.updateWrapper(this.createWrapper(),e))}},{key:"createWrapper",value:function(){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,["reader-image-wrapper","col-auto","my-auto","justify-content-center","align-items-center","noselect","nodrag","row","no-gutters"]),t.dataset.state=0,t}},{key:"updateWrapper",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.state!==parseInt(e.dataset.state)){for(;e.firstChild;)e.removeChild(e.firstChild);switch(t.state){case 1:e.appendChild(this.createPageLoading());break;case 2:e.appendChild(this.createPageLoaded());break;case 3:e.appendChild(this.createPageError())}}switch(e.style.order=t.number||0,e.dataset.page=t.number||0,e.dataset.state=t.state||0,t.state){case 1:e.querySelector(".loading-page-number").textContent=t.number;break;case 2:e.firstChild.src=t.image.src;break;case 3:e.querySelector(".alert .message").textContent=t.error.message}return e}},{key:"createPageLoading",value:function(){var e=document.createElement("div");e.classList.add("m-5","d-flex","align-items-center","justify-content-center"),e.style.color="#fff",e.style.textShadow="0 0 7px rgba(0,0,0,0.5)";var t=e.appendChild(document.createElement("span"));t.classList.add("fas","fa-circle-notch","fa-spin","position-absolute"),t.style.opacity="0.5",t.style.fontSize="7em";var r=e.appendChild(document.createElement("span"));return r.classList.add("loading-page-number"),r.style.fontSize="2em",e}},{key:"createPageLoaded",value:function(){var e=document.createElement("img");return e.draggable=!1,e.classList.add("noselect","nodrag","cursor-pointer"),e}},{key:"createPageError",value:function(){var e=this,t=w.container("","danger");return t.appendChild(document.createElement("div")).innerHTML="Tap to reload.",t.addEventListener("click",function(r){r.preventDefault(),r.stopPropagation(),e.model.getPageWithoutLoading(parseInt(t.parentElement.dataset.page)).reload(!0).catch(console.error)}),t}},{key:"clearImageContainer",value:function(){for(;this.el&&this.el.firstChild;)this.el.removeChild(this.el.firstChild)}},{key:"render",value:function(){throw new Error("Not implemented")}},{key:"pageStateHandler",value:function(){throw new Error("Not implemented")}},{key:"chapter",get:function(){return this.model.chapter}}]),e}();t.default=y;t.SinglePage=function(e){function t(){return(0,f.default)(this,t),(0,l.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,d.default)(t,e),(0,h.default)(t,[{key:"initialize",value:function(){(0,c.default)(t.prototype.__proto__||(0,s.default)(t.prototype),"initialize",this).call(this),this.renderedPages=1,this.pageToRender=null,this.pageWrapper=this.createAndAppendWrapper()}},{key:"pageStateHandler",value:function(e){this.pageToRender===e&&this.updateWrapper(this.pageWrapper,e)}},{key:"render",value:function(e){var t=this.model.getPageWithoutLoading(e);return this.pageToRender=t,this.updateWrapper(this.pageWrapper,t),t.load().catch(function(e){return u.default.resolve(e)})}},{key:"name",get:function(){return"single-page"}}]),t}(y),t.DoublePage=function(e){function t(){return(0,f.default)(this,t),(0,l.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,d.default)(t,e),(0,h.default)(t,[{key:"isPageTurnForwards",value:function(){return this.previousPage<this.model.currentPage}},{key:"isSinglePageBackwards",value:function(){return this.previousPage===this.model.currentPage+1}},{key:"isImageTooWide",value:function(e){return e&&e.naturalWidth>e.naturalHeight&&e.naturalWidth>this.el.offsetWidth/2}},{key:"initialize",value:function(){(0,c.default)(t.prototype.__proto__||(0,s.default)(t.prototype),"initialize",this).call(this),this.pageWrapperLoading=this.createAndAppendWrapper({state:1,number:""}),this.previousPage=0,this.pageWrappers=[this.createAndAppendWrapper(),this.createAndAppendWrapper()],this.pagesToRender=[],this.setLoading(!0)}},{key:"pageStateHandler",value:function(e){this.pagesToRender.includes(e)&&this.checkRender()}},{key:"render",value:function(e){var t=this;return this.pagesToRender=[e,e+1].map(function(e){return t.model.getPageWithoutLoading(e)}).filter(function(e){return e}),this.checkRender(),u.default.all(this.pagesToRender.map(function(e){return e.load().catch(function(e){return u.default.resolve(e)})}))}},{key:"checkRender",value:function(){var e=this,t=this.pagesToRender.every(function(e){return e.isDone});t&&(this.pagesToRender.length>1&&this.pagesToRender.some(function(t){return e.isImageTooWide(t.image)})&&(this.isPageTurnForwards()||this.isSinglePageBackwards()?this.pagesToRender.pop():(this.pagesToRender.shift(),this.model.setCurrentPage(this.pagesToRender[0].number))),this.updateWrapper(this.pageWrappers[0],this.pagesToRender[0]),this.updateWrapper(this.pageWrappers[1],this.pagesToRender[1]),this.previousPage=this.model.currentPage),this.setLoading(!t)}},{key:"setLoading",value:function(e){this.pageWrapperLoading.classList.toggle("d-none",!e);var t=!0,r=!1,n=void 0;try{for(var a,i=(0,o.default)(this.pageWrappers);!(t=(a=i.next()).done);t=!0){a.value.classList.toggle("d-none",e)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}}},{key:"name",get:function(){return"double-page"}},{key:"renderedPages",get:function(){return this.pagesToRender.length},set:function(e){}}]),t}(y),t.LongStrip=function(e){function t(){return(0,f.default)(this,t),(0,l.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,d.default)(t,e),(0,h.default)(t,[{key:"initialize",value:function(){var e=this;(0,c.default)(t.prototype.__proto__||(0,s.default)(t.prototype),"initialize",this).call(this),this._pageWrapperMap=new i.default,this._renderedPageSet=[],this._scrollY=-1,this.observer=new MutationObserver(function(t){-1===e._scrollY&&1!==e.model.currentPage&&(e._scrollY=-2,requestAnimationFrame(function(){e.getPageWrapper(e.model.currentPage).scrollIntoView(!0),requestAnimationFrame(function(){e._scrollY=window.pageYOffset||-1,-1!==e._scrollY&&(m.default.scroll(0,1-document.querySelector("nav.navbar").offsetHeight),e.observer.disconnect())})}))}),this.observer.observe(this.el,{childList:!0,subtree:!0});var r=!0,n=!1,a=void 0;try{for(var u,l=(0,o.default)(this.model.getAllPages());!(r=(u=l.next()).done);r=!0){var d=u.value;this._pageWrapperMap.set(d.number,this.createAndAppendWrapper(d)),d.isDone&&this._renderedPageSet.push(d.number)}}catch(e){n=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(n)throw a}}p.default.stableSort(this._renderedPageSet),this.renderEndBlock(),this.render(this.model.currentPage),this.addScrollHandler(),this._currentPageHandler=function(t){e.render(t+1).then(function(){e.render(t-1)})},this.model.on("currentpagechange",this._currentPageHandler)}},{key:"destroy",value:function(){this._initialized&&((0,c.default)(t.prototype.__proto__||(0,s.default)(t.prototype),"destroy",this).call(this),this.observer.disconnect(),this._pageWrapperMap.clear(),this.removeScrollHandler(),window.scrollTo(0,0),this.model.off("currentpagechange",this._currentPageHandler))}},{key:"pageStateHandler",value:function(e){this.updateWrapper(this.getPageWrapper(e.number),e),(e.isDone||e.loading)&&(this.isRendered(e.number)||(this._renderedPageSet.push(e.number),p.default.stableSort(this._renderedPageSet)),this.isChapterFullyRendered&&this.showEndBlock(),this._scrollY>=0&&this.updateCurrentPage())}},{key:"getPageWrapper",value:function(e){if(!this._pageWrapperMap.has(e))throw new Error("No wrapper for page ",e);return this._pageWrapperMap.get(e)}},{key:"isRendered",value:function(e){return this._renderedPageSet.includes(e)}},{key:"render",value:function(e){return this.isChapterFullyRendered||this.isRendered(e)?u.default.resolve():this.model.getPage(e).catch(function(e){return u.default.resolve(e)})}},{key:"renderEndBlock",value:function(){var e=this;this._endBlock=this.createAndAppendWrapper({number:this.model.totalPages+1,chapter:this.model.chapter.id}),this._endBlock.textContent="End of chapter / Go to next",this._endBlock.classList.add("reader-image-block","py-3","d-none"),this._endBlock.addEventListener("click",function(t){t.stopPropagation(),e.view.moveToChapter(e.model.chapter.nextChapterId)},{once:!0}),this.isChapterFullyRendered&&this.showEndBlock()}},{key:"showEndBlock",value:function(){this._endBlock.classList.remove("d-none")}},{key:"updateCurrentPage",value:function(){if(this.renderedPages>0&&!this._updating){if(this._updating=!0,m.default.isScrolledToTop)this.model.setCurrentPage(this._renderedPageSet[0]),this.view.replaceHistory();else if(m.default.isScrolledToBottom)this.model.setCurrentPage(this.lastRenderedPage),this.view.replaceHistory();else for(var e=Math.floor(window.pageYOffset),t=this._renderedPageSet.length-1;t>=0;--t){var r=this._renderedPageSet[t];if(e>=this.getPageWrapper(r).offsetTop){this.model.setCurrentPage(r)&&this.view.replaceHistory();break}}this._updating=!1}}},{key:"scrollToPage",value:function(e){var t=this.getPageWrapper(e);this.isRendered(e)&&t&&(t.scrollIntoView(!0),m.default.isScrolledToBottom||m.default.scroll(0,1-document.querySelector("nav.navbar").offsetHeight))}},{key:"addScrollHandler",value:function(){var e=this;if(!this._scrollHandler){var t=function(){e.model.chapter&&e.updateCurrentPage()};if(Modernizr.requestanimationframe){var r=!1;this._scrollHandler=function(){r||(r=!0,requestAnimationFrame(function(){t(),r=!1}))}}else this._scrollHandler=function(){t()};window.addEventListener("scroll",this._scrollHandler)}}},{key:"removeScrollHandler",value:function(){this._scrollHandler&&(window.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}},{key:"name",get:function(){return"long-strip"}},{key:"renderedPages",get:function(){return this._renderedPageSet.length},set:function(e){}},{key:"lastRenderedPage",get:function(){return this._renderedPageSet[this._renderedPageSet.length-1]}},{key:"isChapterFullyRendered",get:function(){return this.renderedPages===this.model.totalPages}}]),t}(y);var w=t.Alert=function(e){function t(){return(0,f.default)(this,t),(0,l.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,d.default)(t,e),(0,h.default)(t,[{key:"pageStateHandler",value:function(){}},{key:"renderChapterButtons",value:function(e){var r=this.el.appendChild(document.createElement("div"));r.classList.add("row","justify-content-center","directional");var n=[{text:"Previous chapter",id:e.prevChapterId,order:1},{text:"Next chapter",id:e.nextChapterId,order:2}],a=["col-auto","hover","text-dark"],i=!0,u=!1,s=void 0;try{for(var l,c=(0,o.default)(n);!(i=(l=c.next()).done);i=!0){var d,f=l.value,h=r.appendChild(t.container(f.text,"dark","a"));h.setAttribute("href",this.view.pageURL(f.id)),h.dataset.action="chapter",h.dataset.chapter=f.id,(d=h.classList).add.apply(d,a),h.classList.replace("m-auto","m-1"),h.style.order=f.order}}catch(e){u=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(u)throw s}}}},{key:"render",value:function(e){var r=this;if(this.clearImageContainer(),"object"!==(void 0===e?"undefined":(0,a.default)(e)))return u.default.reject({message:"Data is not an object",data:e,revert:!0});if(e.isExternal)this.el.appendChild(t.container("This chapter can be read for free on the official publisher's <a target='_blank' rel='noopener noreferrer' href='"+e.externalUrl+"'>"+t.icon("external-link-alt","Website")+" <strong>website</strong></a>.<br>Feel free to write your comments about it here on MangaDex!","info")),this.renderChapterButtons(e);else if(e.isDelayed){var n=new Date,i=new Date(1e3*e.timestamp),o=i>n?(0,g.formatDistance)(i,n,{addSuffix:!0}):"within a few minutes";this.el.appendChild(t.container("Due to the group's delay policy, this chapter will be available "+o+".","danger")),this.el.appendChild(t.container("You might be able to read it on the group's <a target='_blank' rel='noopener noreferrer' href='"+e.groupWebsite+"'>"+t.icon("external-link-alt","Website")+" <strong>website</strong></a>.","info")),this.renderChapterButtons(e)}else if(e.isSpoilerNet){var s=document.createElement("div");s.classList.add("alert","alert-warning","text-center","m-auto"),s.attributes.role="alert",s.innerHTML="<h3>"+t.icon("warning")+' Spoiler Warning</h3><div class="my-3"><div>There seems to be a gap between chapters ('+this.model.manga.getChapterTitle(e.prevChapterId,!0)+" &rarr; "+this.model.manga.getChapterTitle(e.chapterId,!0)+").</div><div>This may be an attempt to troll you into reading a chapter early.</div>";var l=document.createElement("button");l.classList.add("btn","btn-secondary"),l.type="button",l.textContent="I understand, I'm fine with spoilers!",l.addEventListener("click",function(t){t.stopPropagation(),r.view.moveToChapter(e.chapterId,1,!0,!0)}),s.appendChild(l),this.el.appendChild(s)}else if(e.isNotFound)this.el.appendChild(t.container("Data not found"+(e.message?": "+e.message:"."),"danger"));else if(e.isDeleted)this.el.appendChild(t.container("This chapter has been deleted.","danger"));else if(e.isRestricted)this.el.appendChild(t.container("This chapter is unavailable.","danger"));else if(e.isCloudFlareError)this.el.appendChild(t.container("CloudFlare might be thinking you're a robot. If you're using Tor, try another node or circuit.","danger"));else if("unavailable"===e.status)this.el.appendChild(t.container("This chapter is unavailable.","danger"));else if(null!=e){var c=e instanceof Error||e.error instanceof Error,d=e.type||c?"danger":void 0,f=e.message||e.error&&e.error.message||e.error&&e.error.status||e;this.el.appendChild(t.container(f,d))}return u.default.resolve()}},{key:"name",get:function(){return"alert"}}],[{key:"icon",value:function(e,r){return"<span class='fas fa-"+(e=t.iconTypes[e]||e)+" fa-fw' aria-hidden='true'"+(r?" title="+r:"")+"></span> "}},{key:"container",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dark",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"div",a=document.createElement(n);a.classList.add("alert","alert-"+r,"text-center","m-auto"),a.attributes.role="alert",t.iconTypes[r]&&(a.innerHTML=t.icon(r));var i=a.appendChild(document.createElement("span"));return i.classList.add("message"),i.innerHTML=e,a}},{key:"iconTypes",get:function(){return{success:"check-circle",danger:"times",info:"info",warning:"exclamation-triangle"}}}]),t}(y);t.Recommendations=function(e){function t(){return(0,f.default)(this,t),(0,l.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,d.default)(t,e),(0,h.default)(t,[{key:"render",value:function(){var e=this;if(!this.model.recommendations.unreadManga)return this.el.appendChild(w.container("No recommendations found. You must be logged in and have followed some titles.","danger"));var t=(0,n.default)(this.model.recommendations.unreadManga).sort(function(e,t){return t.chapters[0].timestamp-e.chapters[0].timestamp}).reduce(function(e,t){var r=t.chapters.filter(function(e){return!e._data.read});if(0===r.length)return e;var n=r[r.length-1],a=r.length>=2?' <em class="ml-1">(+'+(r.length-1)+" more)</em>":"",i=(0,g.formatDistance)(new Date(n.timestamp),new Date,{addSuffix:!0});return e+'\n <div class="col-xl-3 col-md-4 col-sm-6 border-bottom p-2 text-left">\n <div class="rounded sm_md_logo float-left mr-2">\n <a href="'+t.url+'">\n <img class="rounded max-width" src="'+t.coverThumbUrl+'">\n </a>\n </div>\n <div>\n <div class="text-truncate py-0 mb-1 border-bottom">\n <span class="fas fa-book fa-fw" aria-hidden="true" title=""></span>\n <a class="manga_title" title="'+t.title+'" href="'+t.url+'">'+t.title+'</a>\n </div>\n <p class="py-0 mb-1 row no-gutters align-items-center flex-nowrap">\n <div class="col-auto">\n <span class="col-auto px-0">\n <span class="rounded flag flag-'+n.langCode+'"></span>\n </span>\n <a class="" href="'+n.url+'" data-chapter="'+n.id+'">'+n.fullTitle+"</a>\n "+a+'\n </div>\n </p>\n <p class="text-truncate py-0 mb-1"><span class="far fa-clock fa-fw " aria-hidden="true" title=""></span> '+i+"</span></p>\n </div>\n </div>"},"");this.el.innerHTML='<h2 class="text-left">Recommendations</h2><h3 class="text-left">Unread Follows</h3><div class="row no-gutters">'+t+"</div>";var r=function(t){var r=t.target.dataset.chapter||t.currentTarget.dataset.chapter;r&&(t.preventDefault(),t.stopPropagation(),e.view.moveToChapter(parseInt(r),1))};return this.el.querySelectorAll("a").forEach(function(e){return e.addEventListener("click",r,!0)}),u.default.resolve()}},{key:"pageStateHandler",value:function(){}},{key:"getChapterTitle",value:function(e,t){var r="";return e.volume&&(r+="Vol. "+e.volume+" "),e.chapter&&(r+="Ch. "+e.chapter+" "),e.title&&!t&&(r+=""+e.title),r||(r="Oneshot"),r.trim()}},{key:"name",get:function(){return"recommendations"}}]),t}(y)},function(e,t,r){e.exports={default:r(165),__esModule:!0}},function(e,t,r){r(166),e.exports=r(0).Object.values},function(e,t,r){var n=r(1),a=r(87)(!1);n(n.S,"Object",{values:function(e){return a(e)}})},function(e,t,r){"use strict";function n(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function a(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fpAk2"),console.warn((new Error).stack)),new Date(NaN))}function i(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setDate(r.getDate()+i),r}function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e).getTime(),i=n(t);return new Date(r+i)}r.r(t);var u=36e5;function s(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return o(e,n(t)*u)}function l(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,u=null==o?0:n(o),s=null==r.weekStartsOn?u:n(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=a(e),c=l.getDay(),d=(c<s?7:0)+c-s;return l.setDate(l.getDate()-d),l.setHours(0,0,0,0),l}function c(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return l(e,{weekStartsOn:1})}function d(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear(),n=new Date(0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);var i=c(n),o=new Date(0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);var u=c(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=u.getTime()?r:r-1}function f(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=d(e),r=new Date(0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),c(r)}var h=6e4;function g(e){var t=new Date(e.getTime()),r=t.getTimezoneOffset();t.setSeconds(0,0);var n=t.getTime()%h;return r*h+n}function p(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setHours(0,0,0,0),t}var m=864e5;function v(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=p(e),n=p(t),a=r.getTime()-g(r),i=n.getTime()-g(n);return Math.round((a-i)/m)}function y(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t),o=v(r,f(r)),u=new Date(0);return u.setFullYear(i,0,4),u.setHours(0,0,0,0),(r=f(u)).setDate(r.getDate()+o),r}function w(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=n(t);return y(e,d(e)+r)}var b=6e4;function T(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return o(e,n(t)*b)}function _(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}function k(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t),o=r.getMonth()+i,u=new Date(0);u.setFullYear(r.getFullYear(),o,1),u.setHours(0,0,0,0);var s=_(u);return r.setMonth(o,Math.min(s,r.getDate())),r}function S(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return k(e,3*n(t))}function E(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return o(e,1e3*n(t))}function C(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return i(e,7*n(t))}function x(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return k(e,12*n(t))}function P(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=e||{},n=t||{},i=a(r.start).getTime(),o=a(r.end).getTime(),u=a(n.start).getTime(),s=a(n.end).getTime();if(!(i<=o&&u<=s))throw new RangeError("Invalid interval");return i<s&&u<o}function M(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e);if(isNaN(r))return NaN;var n,i,o=r.getTime();return(null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t)).forEach(function(e,t){var r=a(e);if(isNaN(r))return n=NaN,void(i=NaN);var u=Math.abs(o-r.getTime());(null==n||u<i)&&(n=t,i=u)}),n}function D(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e);if(isNaN(r))return new Date(NaN);var n,i,o=r.getTime();return(null==t?[]:"function"==typeof t.forEach?t:Array.prototype.slice.call(t)).forEach(function(e){var t=a(e);if(isNaN(t))return n=new Date(NaN),void(i=NaN);var r=Math.abs(o-t.getTime());(null==n||r<i)&&(n=t,i=r)}),n}function L(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function O(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=r.getTime()-n.getTime();return i>0?-1:i<0?1:i}function q(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return d(e)-d(t)}var I=6048e5;function R(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=c(e),n=c(t),a=r.getTime()-g(r),i=n.getTime()-g(n);return Math.round((a-i)/I)}function N(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}function H(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return Math.floor(t.getMonth()/3)+1}function F(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return 4*(r.getFullYear()-n.getFullYear())+(H(r)-H(n))}var W=6048e5;function U(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=l(e,r),a=l(t,r),i=n.getTime()-g(n),o=a.getTime()-g(a);return Math.round((i-o)/W)}function j(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getFullYear()-n.getFullYear()}function A(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=L(r,n),o=Math.abs(v(r,n));r.setDate(r.getDate()-i*o);var u=i*(o-(L(r,n)===-i));return 0===u?0:u}function Y(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getTime()-n.getTime()}var G=36e5;function B(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Y(e,t)/G;return r>0?Math.floor(r):Math.ceil(r)}function z(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return w(e,-n(t))}function X(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=L(r,n),o=Math.abs(q(r,n)),u=i*(o-(L(r=z(r,i*o),n)===-i));return 0===u?0:u}var Q=6e4;function V(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Y(e,t)/Q;return r>0?Math.floor(r):Math.ceil(r)}function K(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=L(r,n),o=Math.abs(N(r,n));r.setMonth(r.getMonth()-i*o);var u=i*(o-(L(r,n)===-i));return 0===u?0:u}function J(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=K(e,t)/3;return r>0?Math.floor(r):Math.ceil(r)}function $(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Y(e,t)/1e3;return r>0?Math.floor(r):Math.ceil(r)}function Z(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=A(e,t)/7;return r>0?Math.floor(r):Math.ceil(r)}function ee(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t),i=L(r,n),o=Math.abs(j(r,n));r.setFullYear(r.getFullYear()-i*o);var u=i*(o-(L(r,n)===-i));return 0===u?0:u}function te(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=e||{},n=a(r.start),i=a(r.end).getTime();if(!(n.getTime()<=i))throw new RangeError("Invalid interval");var o=[],u=n;u.setHours(0,0,0,0);var s=t&&"step"in t?Number(t.step):1;if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=i;)o.push(a(u)),u.setDate(u.getDate()+s),u.setHours(0,0,0,0);return o}function re(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=e||{},n=a(r.start),i=a(r.end),o=i.getTime();if(!(n.getTime()<=o))throw new RangeError("Invalid interval");var u=l(n,t),s=l(i,t);u.setHours(15),s.setHours(15),o=s.getTime();for(var c=[],d=u;d.getTime()<=o;)d.setHours(0),c.push(a(d)),(d=C(d,1)).setHours(15);return c}function ne(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 0===a(e).getDay()}function ae(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e).getDay();return 0===t||6===t}function ie(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");for(var t=te(e),r=[],n=0;n++<t.length;){var a=t[n];ae(a)&&(r.push(a),ne(a)&&(n+=5))}return r}function oe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ue(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function se(e){if(arguments.length<1)throw new TypeError("1 arguments required, but only "+arguments.length+" present");var t=oe(e);if(isNaN(t))throw new RangeError("The passed date is invalid");return ie({start:t,end:ue(e)})}function le(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function ce(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function de(e){if(arguments.length<1)throw new TypeError("1 arguments required, but only "+arguments.length+" present");var t=le(e);if(isNaN(t))throw new RangeError("The passed date is invalid");return ie({start:t,end:ce(e)})}function fe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setHours(23,59,59,999),t}function he(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear(),n=9+10*Math.floor(r/10);return t.setFullYear(n,11,31),t.setHours(23,59,59,999),t}function ge(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setMinutes(59,59,999),t}function pe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,u=null==o?0:n(o),s=null==r.weekStartsOn?u:n(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=a(e),c=l.getDay(),d=6+(c<s?-7:0)-(c-s);return l.setDate(l.getDate()+d),l.setHours(23,59,59,999),l}function me(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return pe(e,{weekStartsOn:1})}function ve(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=d(e),r=new Date(0);r.setFullYear(t+1,0,4),r.setHours(0,0,0,0);var n=c(r);return n.setMilliseconds(n.getMilliseconds()-1),n}function ye(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setSeconds(59,999),t}function we(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getMonth(),n=r-r%3+3;return t.setMonth(n,0),t.setHours(23,59,59,999),t}function be(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setMilliseconds(999),t}function Te(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return!isNaN(t)}var _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ke(e){return function(t){var r=t||{},n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Se={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ee(e){return function(t,r){var n=r||{},a=n.width?String(n.width):e.defaultWidth;return("formatting"===(n.context?String(n.context):"standalone")&&e.formattingValues?e.formattingValues[a]||e.formattingValues[e.defaultFormattingWidth]:e.values[a]||e.values[e.defaultWidth])[e.argumentCallback?e.argumentCallback(t):t]}}function Ce(e){return function(t,r){var n=String(t),a=r||{},i=a.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],u=n.match(o);if(!u)return null;var s,l=u[0],c=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth];return s="[object Array]"===Object.prototype.toString.call(c)?c.findIndex(function(e){return e.test(n)}):function(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}(c,function(e){return e.test(n)}),s=e.valueCallback?e.valueCallback(s):s,{value:s=a.valueCallback?a.valueCallback(s):s,rest:n.slice(l.length)}}}var xe={formatDistance:function(e,t,r){var n;return r=r||{},n="string"==typeof _e[e]?_e[e]:1===t?_e[e].one:_e[e].other.replace("{{count}}",t),r.addSuffix?r.comparison>0?"in "+n:n+" ago":n},formatLong:{date:ke({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ke({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ke({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:function(e,t,r,n){return Se[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:Ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function(e){return function(t,r){var n=String(t),a=r||{},i=n.match(e.matchPattern);if(!i)return null;var o=i[0],u=n.match(e.parsePattern);if(!u)return null;var s=e.valueCallback?e.valueCallback(u[0]):u[0];return{value:s=a.valueCallback?a.valueCallback(s):s,rest:n.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Ce({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ce({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ce({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ce({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ce({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pe(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Me={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return Pe("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):Pe(r+1,2)},d:function(e,t){return Pe(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return r.toUpperCase();case"aaaaa":return r[0];case"aaaa":default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return Pe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Pe(e.getUTCHours(),t.length)},m:function(e,t){return Pe(e.getUTCMinutes(),t.length)},s:function(e,t){return Pe(e.getUTCSeconds(),t.length)}},De=864e5;function Le(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getUTCDay(),n=(r<1?7:0)+r-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function Oe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Le(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var u=Le(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=u.getTime()?r:r-1}var qe=6048e5;function Ie(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=Le(t).getTime()-function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Oe(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),Le(r)}(t).getTime();return Math.round(r/qe)+1}function Re(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,u=null==o?0:n(o),s=null==r.weekStartsOn?u:n(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=a(e),c=l.getUTCDay(),d=(c<s?7:0)+c-s;return l.setUTCDate(l.getUTCDate()-d),l.setUTCHours(0,0,0,0),l}function Ne(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=a(e,t),i=r.getUTCFullYear(),o=t||{},u=o.locale,s=u&&u.options&&u.options.firstWeekContainsDate,l=null==s?1:n(s),c=null==o.firstWeekContainsDate?l:n(o.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(i+1,0,c),d.setUTCHours(0,0,0,0);var f=Re(d,t),h=new Date(0);h.setUTCFullYear(i,0,c),h.setUTCHours(0,0,0,0);var g=Re(h,t);return r.getTime()>=f.getTime()?i+1:r.getTime()>=g.getTime()?i:i-1}var He=6048e5;function Fe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=a(e),i=Re(r,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,i=a&&a.options&&a.options.firstWeekContainsDate,o=null==i?1:n(i),u=null==r.firstWeekContainsDate?o:n(r.firstWeekContainsDate),s=Ne(e,t),l=new Date(0);return l.setUTCFullYear(s,0,u),l.setUTCHours(0,0,0,0),Re(l,t)}(r,t).getTime();return Math.round(i/He)+1}var We="midnight",Ue="noon",je="morning",Ae="afternoon",Ye="evening",Ge="night";function Be(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(0===i)return r+String(a);var o=t||"";return r+String(a)+o+Pe(i,2)}function ze(e,t){return e%60==0?(e>0?"-":"+")+Pe(Math.abs(e)/60,2):Xe(e,t)}function Xe(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e);return n+Pe(Math.floor(a/60),2)+r+Pe(a%60,2)}var Qe={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Me.y(e,t)},Y:function(e,t,r,n){var a=Ne(e,n),i=a>0?a:1-a;return"YY"===t?Pe(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):Pe(i,t.length)},R:function(e,t){return Pe(Oe(e),t.length)},u:function(e,t){return Pe(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Pe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Pe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return Me.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return Pe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var a=Fe(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):Pe(a,t.length)},I:function(e,t,r){var n=Ie(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Pe(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):Me.d(e,t)},D:function(e,t,r){var n=function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=r-t.getTime();return Math.floor(n/De)+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Pe(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var a=e.getUTCDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Pe(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var a=e.getUTCDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Pe(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return Pe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,a=e.getUTCHours();switch(n=12===a?Ue:0===a?We:a/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,a=e.getUTCHours();switch(n=a>=17?Ye:a>=12?Ae:a>=4?je:Ge,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Me.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Me.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Pe(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Me.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Me.s(e,t)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds();return Pe(Math.floor(n*Math.pow(10,r-3)),r)},X:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return ze(a);case"XXXX":case"XX":return Xe(a);case"XXXXX":case"XXX":default:return Xe(a,":")}},x:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return ze(a);case"xxxx":case"xx":return Xe(a);case"xxxxx":case"xxx":default:return Xe(a,":")}},O:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Be(a,":");case"OOOO":default:return"GMT"+Xe(a,":")}},z:function(e,t,r,n){var a=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Be(a,":");case"zzzz":default:return"GMT"+Xe(a,":")}},t:function(e,t,r,n){var a=n._originalDate||e;return Pe(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,r,n){return Pe((n._originalDate||e).getTime(),t.length)}};function Ve(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function Ke(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Je={p:Ke,P:function(e,t){var r,n=e.match(/(P+)(p+)?/),a=n[1],i=n[2];if(!i)return Ve(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",Ve(a,t)).replace("{{time}}",Ke(i,t))}};function $e(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return o(e,-n(t))}var Ze=["D","DD","YY","YYYY"];function et(e){return-1!==Ze.indexOf(e)}function tt(e){throw new RangeError("`options.awareOfUnicodeTokens` must be set to `true` to use `"+e+"` token; see: https://git.io/fxCyr")}var rt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,at=/^'(.*?)'?$/,it=/''/g;function ot(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=String(t),o=r||{},u=o.locale||xe,s=u.options&&u.options.firstWeekContainsDate,l=null==s?1:n(s),c=null==o.firstWeekContainsDate?l:n(o.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=u.options&&u.options.weekStartsOn,f=null==d?0:n(d),h=null==o.weekStartsOn?f:n(o.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");var p=a(e);if(!Te(p))throw new RangeError("Invalid time value");var m=$e(p,g(p)),v={firstWeekContainsDate:c,weekStartsOn:h,locale:u,_originalDate:p};return i.match(nt).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,Je[t])(e,u.formatLong,v):e}).join("").match(rt).map(function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return function(e){return e.match(at)[1].replace(it,"'")}(e);var r=Qe[t];return r?(!o.awareOfUnicodeTokens&&et(e)&&tt(e),r(m,e,u.localize,v)):e}).join("")}function ut(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t=t||{})t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function st(e){return ut({},e)}var lt=1440,ct=2520,dt=43200,ft=86400;function ht(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=r||{},i=n.locale||xe;if(!i.formatDistance)throw new RangeError("locale must contain formatDistance property");var o=L(e,t);if(isNaN(o))throw new RangeError("Invalid time value");var u,s,l=st(n);l.addSuffix=Boolean(n.addSuffix),l.comparison=o,o>0?(u=a(t),s=a(e)):(u=a(e),s=a(t));var c,d=$(s,u),f=(g(s)-g(u))/1e3,h=Math.round((d-f)/60);if(h<2)return n.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,l):d<10?i.formatDistance("lessThanXSeconds",10,l):d<20?i.formatDistance("lessThanXSeconds",20,l):d<40?i.formatDistance("halfAMinute",null,l):d<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):0===h?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",h,l);if(h<45)return i.formatDistance("xMinutes",h,l);if(h<90)return i.formatDistance("aboutXHours",1,l);if(h<lt){var p=Math.round(h/60);return i.formatDistance("aboutXHours",p,l)}if(h<ct)return i.formatDistance("xDays",1,l);if(h<dt){var m=Math.round(h/lt);return i.formatDistance("xDays",m,l)}if(h<ft)return c=Math.round(h/dt),i.formatDistance("aboutXMonths",c,l);if((c=K(s,u))<12){var v=Math.round(h/dt);return i.formatDistance("xMonths",v,l)}var y=c%12,w=Math.floor(c/12);return y<3?i.formatDistance("aboutXYears",w,l):y<9?i.formatDistance("overXYears",w,l):i.formatDistance("almostXYears",w+1,l)}var gt=1440,pt=43200,mt=525600;function vt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=r||{},i=n.locale||xe;if(!i.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var o=L(e,t);if(isNaN(o))throw new RangeError("Invalid time value");var u,s,l=st(n);l.addSuffix=Boolean(n.addSuffix),l.comparison=o,o>0?(u=a(t),s=a(e)):(u=a(e),s=a(t));var c,d=null==n.roundingMethod?"round":String(n.roundingMethod);if("floor"===d)c=Math.floor;else if("ceil"===d)c=Math.ceil;else{if("round"!==d)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");c=Math.round}var f,h=$(s,u),p=c((h-(g(s)-g(u))/1e3)/60);if("second"===(f=null==n.unit?p<1?"second":p<60?"minute":p<gt?"hour":p<pt?"day":p<mt?"month":"year":String(n.unit)))return i.formatDistance("xSeconds",h,l);if("minute"===f)return i.formatDistance("xMinutes",p,l);if("hour"===f){var m=c(p/60);return i.formatDistance("xHours",m,l)}if("day"===f){var v=c(p/gt);return i.formatDistance("xDays",v,l)}if("month"===f){var y=c(p/pt);return i.formatDistance("xMonths",y,l)}if("year"===f){var w=c(p/mt);return i.formatDistance("xYears",w,l)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function yt(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=a(e),i=a(t),o=r||{},u=o.locale||xe;if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");if(!u.formatRelative)throw new RangeError("locale must contain formatRelative property");var s,l=v(n,i);if(isNaN(l))throw new RangeError("Invalid time value");s=l<-6?"other":l<-1?"lastWeek":l<0?"yesterday":l<1?"today":l<2?"tomorrow":l<7?"nextWeek":"other";var c=$e(n,g(n)),d=$e(i,g(i));return ot(n,u.formatRelative(s,c,d,o),o)}function wt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(1e3*n(e))}function bt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getDate()}function Tt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getDay()}function _t(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return v(t,le(t))+1}function kt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e).getFullYear();return t%400==0||t%4==0&&t%100!=0}function St(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return isNaN(t)?NaN:kt(t)?366:365}function Et(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e).getFullYear();return 10*Math.floor(t/10)}function Ct(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getHours()}function xt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e).getDay();return 0===t&&(t=7),t}var Pt=6048e5;function Mt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=c(t).getTime()-f(t).getTime();return Math.round(r/Pt)+1}var Dt=6048e5;function Lt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=f(e),r=f(C(t,60)).valueOf()-t.valueOf();return Math.round(r/Dt)}function Ot(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getMilliseconds()}function qt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getMinutes()}function It(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getMonth()}var Rt=864e5;function Nt(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=e||{},n=t||{},i=a(r.start).getTime(),o=a(r.end).getTime(),u=a(n.start).getTime(),s=a(n.end).getTime();if(!(i<=o&&u<=s))throw new RangeError("Invalid interval");if(!(i<s&&u<o))return 0;var l=(s>o?o:s)-(u<i?i:u);return Math.ceil(l/Rt)}function Ht(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getSeconds()}function Ft(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getTime()}function Wt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Math.floor(Ft(e)/1e3)}function Ut(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=a(e),i=r.getFullYear(),o=t||{},u=o.locale,s=u&&u.options&&u.options.firstWeekContainsDate,c=null==s?1:n(s),d=null==o.firstWeekContainsDate?c:n(o.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setFullYear(i+1,0,d),f.setHours(0,0,0,0);var h=l(f,t),g=new Date(0);g.setFullYear(i,0,d),g.setHours(0,0,0,0);var p=l(g,t);return r.getTime()>=h.getTime()?i+1:r.getTime()>=p.getTime()?i:i-1}function jt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,i=a&&a.options&&a.options.firstWeekContainsDate,o=null==i?1:n(i),u=null==r.firstWeekContainsDate?o:n(r.firstWeekContainsDate),s=Ut(e,t),c=new Date(0);return c.setFullYear(s,0,u),c.setHours(0,0,0,0),l(c,t)}var At=6048e5;function Yt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=a(e),n=l(r,t).getTime()-jt(r,t).getTime();return Math.round(n/At)+1}function Gt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,i=a&&a.options&&a.options.weekStartsOn,o=null==i?0:n(i),u=null==r.weekStartsOn?o:n(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Tt(oe(e)),l=Tt(e),c=(s<u?7-u:s)>l?7-u:0;return Math.ceil((bt(e)+c)/7)}function Bt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function zt(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return U(Bt(e),oe(e),t)+1}function Xt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return a(e).getFullYear()}function Qt(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getTime()>n.getTime()}function Vt(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getTime()<n.getTime()}function Kt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Jt(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getTime()===n.getTime()}function $t(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===a(e).getDate()}function Zt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 5===a(e).getDay()}function er(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return fe(t).getTime()===ue(t).getTime()}function tr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 1===a(e).getDay()}function rr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=p(e),n=p(t);return r.getTime()===n.getTime()}function nr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setMinutes(0,0,0),t}function ar(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=nr(e),n=nr(t);return r.getTime()===n.getTime()}function ir(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=l(e,r),a=l(t,r);return n.getTime()===a.getTime()}function or(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return ir(e,t,{weekStartsOn:1})}function ur(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=f(e),n=f(t);return r.getTime()===n.getTime()}function sr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setSeconds(0,0),t}function lr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=sr(e),n=sr(t);return r.getTime()===n.getTime()}function cr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function dr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function fr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=dr(e),n=dr(t);return r.getTime()===n.getTime()}function hr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e);return t.setMilliseconds(0),t}function gr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=hr(e),n=hr(t);return r.getTime()===n.getTime()}function pr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),n=a(t);return r.getFullYear()===n.getFullYear()}function mr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 6===a(e).getDay()}function vr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 4===a(e).getDay()}function yr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 2===a(e).getDay()}function wr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return 3===a(e).getDay()}function br(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=t||{},n=a(e).getTime(),i=a(r.start).getTime(),o=a(r.end).getTime();if(!(i<=o))throw new RangeError("Invalid interval");return n>=i&&n<=o}function Tr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear(),n=9+10*Math.floor(r/10);return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}function _r(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,u=null==o?0:n(o),s=null==r.weekStartsOn?u:n(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var l=a(e),c=l.getDay(),d=6+(c<s?-7:0)-(c-s);return l.setHours(0,0,0,0),l.setDate(l.getDate()+d),l}function kr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return _r(e,{weekStartsOn:1})}function Sr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=d(e),r=new Date(0);r.setFullYear(t+1,0,4),r.setHours(0,0,0,0);var n=c(r);return n.setDate(n.getDate()-1),n}function Er(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getMonth(),n=r-r%3+3;return t.setMonth(n,0),t.setHours(0,0,0,0),t}function Cr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(0,0,0,0),t}var xr=/(\w)\1*|''|'(''|[^'])+('|$)|./g,Pr=/^'(.*?)'?$/,Mr=/''/g;function Dr(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(t),n=a(e);if(!Te(n))throw new RangeError("Invalid time value");var i=$e(n,g(n));return r.match(xr).map(function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return function(e){return e.match(Pr)[1].replace(Mr,"'")}(e);var r=Me[t];return r?r(i,e,null,{}):e}).join("")}function Lr(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t;return(null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e)).forEach(function(e){var r=a(e);(void 0===t||t<r||isNaN(r))&&(t=r)}),t}function Or(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t;return(null==e?[]:"function"==typeof e.forEach?e:Array.prototype.slice.call(e)).forEach(function(e){var r=a(e);(void 0===t||t>r||isNaN(r))&&(t=r)}),t}function qr(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=r||{},o=i.locale,u=o&&o.options&&o.options.weekStartsOn,s=null==u?0:n(u),l=null==i.weekStartsOn?s:n(i.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=a(e),d=n(t),f=c.getUTCDay(),h=((d%7+7)%7<l?7:0)+d-f;return c.setUTCDate(c.getUTCDate()+h),c}var Ir=36e5,Rr=6e4,Nr=1e3,Hr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fr=/^([+-])(\d{2})(\d{2})?|Z/,Wr=/^([+-])(\d{2})(\d{2})|Z/,Ur=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,jr=/^([+-])(\d{2}):(\d{2})|Z/,Ar=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Yr(e,t,r){var n=t.match(e);if(!n)return null;var a=parseInt(n[0],10);return{value:r?r(a):a,rest:t.slice(n[0].length)}}function Gr(e,t){var r=t.match(e);if(!r)return null;if("Z"===r[0])return{value:0,rest:t.slice(1)};var n="+"===r[1]?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*Ir+i*Rr+o*Nr),rest:t.slice(r[0].length)}}function Br(e,t){return Yr(Hr.anyDigitsSigned,e,t)}function zr(e,t,r){switch(e){case 1:return Yr(Hr.singleDigit,t,r);case 2:return Yr(Hr.twoDigits,t,r);case 3:return Yr(Hr.threeDigits,t,r);case 4:return Yr(Hr.fourDigits,t,r);default:return Yr(new RegExp("^\\d{1,"+e+"}"),t,r)}}function Xr(e,t,r){switch(e){case 1:return Yr(Hr.singleDigitSigned,t,r);case 2:return Yr(Hr.twoDigitsSigned,t,r);case 3:return Yr(Hr.threeDigitsSigned,t,r);case 4:return Yr(Hr.fourDigitsSigned,t,r);default:return Yr(new RegExp("^-?\\d{1,"+e+"}"),t,r)}}function Qr(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Vr(e,t){var r,n=t>0,a=n?t:1-t;if(a<=50)r=e||100;else{var i=a+50;r=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return n?r:1-r}var Kr=[31,28,31,30,31,30,31,31,30,31,30,31],Jr=[31,29,31,30,31,30,31,31,30,31,30,31];function $r(e){return e%400==0||e%4==0&&e%100!=0}var Zr={G:{priority:140,parse:function(e,t,r,n){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}},set:function(e,t,r,n){return e.setUTCFullYear(1===r?10:-9,0,1),e.setUTCHours(0,0,0,0),e}},y:{priority:130,parse:function(e,t,r,n){var a=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return zr(4,e,a);case"yo":return r.ordinalNumber(e,{unit:"year",valueCallback:a});default:return zr(t.length,e,a)}},validate:function(e,t,r){return t.isTwoDigitYear||t.year>0},set:function(e,t,r,n){var a=Ne(e,n);if(r.isTwoDigitYear){var i=Vr(r.year,a);return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}var o=a>0?r.year:1-r.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}},Y:{priority:130,parse:function(e,t,r,n){var a=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return zr(4,e,a);case"Yo":return r.ordinalNumber(e,{unit:"year",valueCallback:a});default:return zr(t.length,e,a)}},validate:function(e,t,r){return t.isTwoDigitYear||t.year>0},set:function(e,t,r,n){var a=e.getUTCFullYear();if(r.isTwoDigitYear){var i=Vr(r.year,a);return e.setUTCFullYear(i,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Re(e,n)}var o=a>0?r.year:1-r.year;return e.setUTCFullYear(o,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Re(e,n)}},R:{priority:130,parse:function(e,t,r,n){return Xr("R"===t?4:t.length,e)},set:function(e,t,r,n){var a=new Date(0);return a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0),Le(a)}},u:{priority:130,parse:function(e,t,r,n){return Xr("u"===t?4:t.length,e)},set:function(e,t,r,n){return e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0),e}},Q:{priority:120,parse:function(e,t,r,n){switch(t){case"Q":case"QQ":return zr(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=1&&t<=4},set:function(e,t,r,n){return e.setUTCMonth(3*(r-1),1),e.setUTCHours(0,0,0,0),e}},q:{priority:120,parse:function(e,t,r,n){switch(t){case"q":case"qq":return zr(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=1&&t<=4},set:function(e,t,r,n){return e.setUTCMonth(3*(r-1),1),e.setUTCHours(0,0,0,0),e}},M:{priority:110,parse:function(e,t,r,n){var a=function(e){return e-1};switch(t){case"M":return Yr(Hr.month,e,a);case"MM":return zr(2,e,a);case"Mo":return r.ordinalNumber(e,{unit:"month",valueCallback:a});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r,n){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}},L:{priority:110,parse:function(e,t,r,n){var a=function(e){return e-1};switch(t){case"L":return Yr(Hr.month,e,a);case"LL":return zr(2,e,a);case"Lo":return r.ordinalNumber(e,{unit:"month",valueCallback:a});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r,n){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}},w:{priority:100,parse:function(e,t,r,n){switch(t){case"w":return Yr(Hr.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=53},set:function(e,t,r,i){return Re(function(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=a(e),o=n(t),u=Fe(i,r)-o;return i.setUTCDate(i.getUTCDate()-7*u),i}(e,r,i),i)}},I:{priority:100,parse:function(e,t,r,n){switch(t){case"I":return Yr(Hr.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=53},set:function(e,t,r,i){return Le(function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t),o=Ie(r)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,r,i),i)}},d:{priority:90,parse:function(e,t,r,n){switch(t){case"d":return Yr(Hr.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return zr(t.length,e)}},validate:function(e,t,r){var n=$r(e.getUTCFullYear()),a=e.getUTCMonth();return n?t>=1&&t<=Jr[a]:t>=1&&t<=Kr[a]},set:function(e,t,r,n){return e.setUTCDate(r),e.setUTCHours(0,0,0,0),e}},D:{priority:90,parse:function(e,t,r,n){switch(t){case"D":case"DD":return Yr(Hr.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return zr(t.length,e)}},validate:function(e,t,r){return $r(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,r,n){return e.setUTCMonth(0,r),e.setUTCHours(0,0,0,0),e}},E:{priority:90,parse:function(e,t,r,n){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r,n){return(e=qr(e,r,n)).setUTCHours(0,0,0,0),e}},e:{priority:90,parse:function(e,t,r,n){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return zr(t.length,e,a);case"eo":return r.ordinalNumber(e,{unit:"day",valueCallback:a});case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r,n){return(e=qr(e,r,n)).setUTCHours(0,0,0,0),e}},c:{priority:90,parse:function(e,t,r,n){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return zr(t.length,e,a);case"co":return r.ordinalNumber(e,{unit:"day",valueCallback:a});case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,r){return t>=0&&t<=6},set:function(e,t,r,n){return(e=qr(e,r,n)).setUTCHours(0,0,0,0),e}},i:{priority:90,parse:function(e,t,r,n){var a=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return zr(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiii":return r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiiii":return r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiii":default:return r.day(e,{width:"wide",context:"formatting",valueCallback:a})||r.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||r.day(e,{width:"short",context:"formatting",valueCallback:a})||r.day(e,{width:"narrow",context:"formatting",valueCallback:a})}},validate:function(e,t,r){return t>=1&&t<=7},set:function(e,t,r,i){return(e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=n(t);r%7==0&&(r-=7);var i=a(e),o=i.getUTCDay(),u=((r%7+7)%7<1?7:0)+r-o;return i.setUTCDate(i.getUTCDate()+u),i}(e,r,i)).setUTCHours(0,0,0,0),e}},a:{priority:80,parse:function(e,t,r,n){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r,n){return e.setUTCHours(Qr(r),0,0,0),e}},b:{priority:80,parse:function(e,t,r,n){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r,n){return e.setUTCHours(Qr(r),0,0,0),e}},B:{priority:80,parse:function(e,t,r,n){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,r,n){return e.setUTCHours(Qr(r),0,0,0),e}},h:{priority:70,parse:function(e,t,r,n){switch(t){case"h":return Yr(Hr.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=12},set:function(e,t,r,n){var a=e.getUTCHours()>=12;return a&&r<12?e.setUTCHours(r+12,0,0,0):a||12!==r?e.setUTCHours(r,0,0,0):e.setUTCHours(0,0,0,0),e}},H:{priority:70,parse:function(e,t,r,n){switch(t){case"H":return Yr(Hr.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=23},set:function(e,t,r,n){return e.setUTCHours(r,0,0,0),e}},K:{priority:70,parse:function(e,t,r,n){switch(t){case"K":return Yr(Hr.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=11},set:function(e,t,r,n){return e.getUTCHours()>=12&&r<12?e.setUTCHours(r+12,0,0,0):e.setUTCHours(r,0,0,0),e}},k:{priority:70,parse:function(e,t,r,n){switch(t){case"k":return Yr(Hr.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=1&&t<=24},set:function(e,t,r,n){var a=r<=24?r%24:r;return e.setUTCHours(a,0,0,0),e}},m:{priority:60,parse:function(e,t,r,n){switch(t){case"m":return Yr(Hr.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=59},set:function(e,t,r,n){return e.setUTCMinutes(r,0,0),e}},s:{priority:50,parse:function(e,t,r,n){switch(t){case"s":return Yr(Hr.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return zr(t.length,e)}},validate:function(e,t,r){return t>=0&&t<=59},set:function(e,t,r,n){return e.setUTCSeconds(r,0),e}},S:{priority:30,parse:function(e,t,r,n){return zr(t.length,e,function(e){return Math.floor(e*Math.pow(10,3-t.length))})},set:function(e,t,r,n){return e.setUTCMilliseconds(r),e}},X:{priority:10,parse:function(e,t,r,n){switch(t){case"X":return Gr(Fr,e);case"XX":return Gr(Wr,e);case"XXXX":return Gr(Ur,e);case"XXXXX":return Gr(Ar,e);case"XXX":default:return Gr(jr,e)}},set:function(e,t,r,n){return t.timestampIsSet?e:new Date(e.getTime()-r)}},x:{priority:10,parse:function(e,t,r,n){switch(t){case"x":return Gr(Fr,e);case"xx":return Gr(Wr,e);case"xxxx":return Gr(Ur,e);case"xxxxx":return Gr(Ar,e);case"xxx":default:return Gr(jr,e)}},set:function(e,t,r,n){return t.timestampIsSet?e:new Date(e.getTime()-r)}},t:{priority:40,parse:function(e,t,r,n){return Br(e)},set:function(e,t,r,n){return[new Date(1e3*r),{timestampIsSet:!0}]}},T:{priority:20,parse:function(e,t,r,n){return Br(e)},set:function(e,t,r,n){return[new Date(r),{timestampIsSet:!0}]}}},en=10,tn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rn=/^'(.*?)'?$/,nn=/''/g,an=/\S/;function on(e,t,r,i){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var o=String(e),u=String(t),s=i||{},l=s.locale||xe;if(!l.match)throw new RangeError("locale must contain match property");var c=l.options&&l.options.firstWeekContainsDate,d=null==c?1:n(c),f=null==s.firstWeekContainsDate?d:n(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=l.options&&l.options.weekStartsOn,p=null==h?0:n(h),m=null==s.weekStartsOn?p:n(s.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===u)return""===o?a(r):new Date(NaN);var v,y={firstWeekContainsDate:f,weekStartsOn:m,locale:l},w=[{priority:en,set:un,index:0}],b=u.match(tn);for(v=0;v<b.length;v++){var T=b[v];!s.awareOfUnicodeTokens&&et(T)&&tt(T);var _=T[0],k=Zr[_];if(k){var S=k.parse(o,T,l.match,y);if(!S)return new Date(NaN);w.push({priority:k.priority,set:k.set,validate:k.validate,value:S.value,index:w.length}),o=S.rest}else{if("''"===T?T="'":"'"===_&&(T=sn(T)),0!==o.indexOf(T))return new Date(NaN);o=o.slice(T.length)}}if(o.length>0&&an.test(o))return new Date(NaN);var E=w.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,r){return r.indexOf(e)===t}).map(function(e){return w.filter(function(t){return t.priority===e}).reverse()}).map(function(e){return e[0]}),C=a(r);if(isNaN(C))return new Date(NaN);var x=$e(C,g(C)),P={};for(v=0;v<E.length;v++){var M=E[v];if(M.validate&&!M.validate(x,M.value,y))return new Date(NaN);var D=M.set(x,P,M.value,y);D[0]?(x=D[0],ut(P,D[1])):x=D}return x}function un(e,t){if(t.timestampIsSet)return e;var r=new Date(0);return r.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),r.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),r}function sn(e){return e.match(rn)[1].replace(nn,"'")}var ln=36e5,cn=6e4,dn=2,fn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},hn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gn=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mn(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=null==r.additionalDigits?dn:n(r.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i=function(e){var t,r={},n=e.split(fn.dateTimeDelimiter);/:/.test(n[0])?(r.date=null,t=n[0]):(r.date=n[0],t=n[1],fn.timeZoneDelimiter.test(r.date)&&(r.date=e.split(fn.timeZoneDelimiter)[0],t=e.substr(r.date.length,e.length)));if(t){var a=fn.timezone.exec(t);a?(r.time=t.replace(a[1],""),r.timezone=a[1]):r.time=t}return r}(e),o=function(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:null};var a=n[1]&&parseInt(n[1]),i=n[2]&&parseInt(n[2]);return{year:null==i?a:100*i,restDateString:e.slice((n[1]||n[2]).length)}}(i.date,a),u=function(e,t){if(null===t)return null;var r=e.match(hn);if(!r)return null;var n=!!r[4],a=vn(r[1]),i=vn(r[2])-1,o=vn(r[3]),u=vn(r[4])-1,s=vn(r[5])-1;if(n)return function(e,t,r){return!(t<0||t>52||r<0||r>6)}(0,u,s)?function(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=7*(t||0)+(r||0)+1-a;return n.setUTCDate(n.getUTCDate()+i),n}(t,u,s):new Date(NaN);var l=new Date(0);return function(e,t,r){return!(t<0||t>11||r<1||r>(wn[t]||(bn(e)?29:28)))}(t,i,o)&&function(e,t){return!(t<1||t>(bn(e)?366:365))}(t,a)?(l.setUTCFullYear(t,i,Math.max(a,o)),l):new Date(NaN)}(o.restDateString,o.year);if(isNaN(u)||!u)return new Date(NaN);var s,l=u.getTime(),c=0;if(i.time&&(c=function(e){var t=e.match(gn);if(!t)return null;var r=yn(t[1]),n=yn(t[2]),a=yn(t[3]);if(!function(e,t,r){return!(r<0||r>=60||t<0||t>=60||e<0||e>=25)}(r,n,a))return NaN;return r%24*ln+n*cn+1e3*a}(i.time),isNaN(c)))return new Date(NaN);if(i.timezone){if(s=function(e){if("Z"===e)return 0;var t=e.match(pn);if(!t)return 0;var r="+"===t[1]?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;if(!function(e,t){return!(t<0||t>59)}(0,a))return NaN;return r*(n*ln+a*cn)}(i.timezone),isNaN(s))return new Date(NaN)}else{var d=l+c,f=new Date(d);s=g(f);var h=new Date(d);h.setDate(f.getDate()+1);var p=g(h)-s;p>0&&(s+=p)}return new Date(l+c+s)}function vn(e){return e?parseInt(e):1}function yn(e){return e&&parseFloat(e.replace(",","."))||0}var wn=[31,null,31,30,31,30,31,31,30,31,30,31];function bn(e){return e%400==0||e%4==0&&e%100}function Tn(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only none provided present");var r=t&&"nearestTo"in t?n(t.nearestTo):1;if(r<1||r>30)throw new RangeError("`options.nearestTo` must be between 1 and 30");var i=a(e),o=i.getSeconds(),u=i.getMinutes()+o/60,s=Math.floor(u/r)*r,l=u%r,c=Math.round(l/r)*r;return new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),s+c)}function _n(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setDate(i),r}function kn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var o=r||{},u=o.locale,s=u&&u.options&&u.options.weekStartsOn,l=null==s?0:n(s),c=null==o.weekStartsOn?l:n(o.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=a(e,o),f=n(t),h=d.getDay();return i(d,((f%7+7)%7<c?7:0)+f-h,o)}function Sn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setMonth(0),r.setDate(i),r}function En(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setHours(i),r}function Cn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e);return i(r,n(t)-xt(r))}function xn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t),o=Mt(r)-i;return r.setDate(r.getDate()-7*o),r}function Pn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setMilliseconds(i),r}function Mn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setMinutes(i),r}function Dn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t),o=r.getFullYear(),u=r.getDate(),s=new Date(0);s.setFullYear(o,i,15),s.setHours(0,0,0,0);var l=_(s);return r.setMonth(i,Math.min(u,l)),r}function Ln(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t)-(Math.floor(r.getMonth()/3)+1);return Dn(r,r.getMonth()+3*i)}function On(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return r.setSeconds(i),r}function qn(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=a(e),o=n(t),u=Yt(i,r)-o;return i.setDate(i.getDate()-7*u),i}function In(e,t,r){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=r||{},o=i.locale,u=o&&o.options&&o.options.firstWeekContainsDate,s=null==u?1:n(u),l=null==i.firstWeekContainsDate?s:n(i.firstWeekContainsDate),c=a(e),d=n(t),f=v(c,jt(c,r)),h=new Date(0);return h.setFullYear(d,0,l),h.setHours(0,0,0,0),(c=jt(h,r)).setDate(c.getDate()+f),c}function Rn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=a(e),i=n(t);return isNaN(r)?new Date(NaN):(r.setFullYear(i),r)}function Nn(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=a(e),r=t.getFullYear(),n=10*Math.floor(r/10);return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}function Hn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return i(e,-n(t))}function Fn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return s(e,-n(t))}function Wn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return T(e,-n(t))}function Un(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return k(e,-n(t))}function jn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return S(e,-n(t))}function An(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return E(e,-n(t))}function Yn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return C(e,-n(t))}function Gn(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return x(e,-n(t))}r.d(t,"addDays",function(){return i}),r.d(t,"addHours",function(){return s}),r.d(t,"addISOWeekYears",function(){return w}),r.d(t,"addMilliseconds",function(){return o}),r.d(t,"addMinutes",function(){return T}),r.d(t,"addMonths",function(){return k}),r.d(t,"addQuarters",function(){return S}),r.d(t,"addSeconds",function(){return E}),r.d(t,"addWeeks",function(){return C}),r.d(t,"addYears",function(){return x}),r.d(t,"areIntervalsOverlapping",function(){return P}),r.d(t,"closestIndexTo",function(){return M}),r.d(t,"closestTo",function(){return D}),r.d(t,"compareAsc",function(){return L}),r.d(t,"compareDesc",function(){return O}),r.d(t,"differenceInCalendarDays",function(){return v}),r.d(t,"differenceInCalendarISOWeekYears",function(){return q}),r.d(t,"differenceInCalendarISOWeeks",function(){return R}),r.d(t,"differenceInCalendarMonths",function(){return N}),r.d(t,"differenceInCalendarQuarters",function(){return F}),r.d(t,"differenceInCalendarWeeks",function(){return U}),r.d(t,"differenceInCalendarYears",function(){return j}),r.d(t,"differenceInDays",function(){return A}),r.d(t,"differenceInHours",function(){return B}),r.d(t,"differenceInISOWeekYears",function(){return X}),r.d(t,"differenceInMilliseconds",function(){return Y}),r.d(t,"differenceInMinutes",function(){return V}),r.d(t,"differenceInMonths",function(){return K}),r.d(t,"differenceInQuarters",function(){return J}),r.d(t,"differenceInSeconds",function(){return $}),r.d(t,"differenceInWeeks",function(){return Z}),r.d(t,"differenceInYears",function(){return ee}),r.d(t,"eachDayOfInterval",function(){return te}),r.d(t,"eachWeekOfInterval",function(){return re}),r.d(t,"eachWeekendOfInterval",function(){return ie}),r.d(t,"eachWeekendOfMonth",function(){return se}),r.d(t,"eachWeekendOfYear",function(){return de}),r.d(t,"endOfDay",function(){return fe}),r.d(t,"endOfDecade",function(){return he}),r.d(t,"endOfHour",function(){return ge}),r.d(t,"endOfISOWeek",function(){return me}),r.d(t,"endOfISOWeekYear",function(){return ve}),r.d(t,"endOfMinute",function(){return ye}),r.d(t,"endOfMonth",function(){return ue}),r.d(t,"endOfQuarter",function(){return we}),r.d(t,"endOfSecond",function(){return be}),r.d(t,"endOfWeek",function(){return pe}),r.d(t,"endOfYear",function(){return ce}),r.d(t,"format",function(){return ot}),r.d(t,"formatDistance",function(){return ht}),r.d(t,"formatDistanceStrict",function(){return vt}),r.d(t,"formatRelative",function(){return yt}),r.d(t,"fromUnixTime",function(){return wt}),r.d(t,"getDate",function(){return bt}),r.d(t,"getDay",function(){return Tt}),r.d(t,"getDayOfYear",function(){return _t}),r.d(t,"getDaysInMonth",function(){return _}),r.d(t,"getDaysInYear",function(){return St}),r.d(t,"getDecade",function(){return Et}),r.d(t,"getHours",function(){return Ct}),r.d(t,"getISODay",function(){return xt}),r.d(t,"getISOWeek",function(){return Mt}),r.d(t,"getISOWeekYear",function(){return d}),r.d(t,"getISOWeeksInYear",function(){return Lt}),r.d(t,"getMilliseconds",function(){return Ot}),r.d(t,"getMinutes",function(){return qt}),r.d(t,"getMonth",function(){return It}),r.d(t,"getOverlappingDaysInIntervals",function(){return Nt}),r.d(t,"getQuarter",function(){return H}),r.d(t,"getSeconds",function(){return Ht}),r.d(t,"getTime",function(){return Ft}),r.d(t,"getUnixTime",function(){return Wt}),r.d(t,"getWeek",function(){return Yt}),r.d(t,"getWeekOfMonth",function(){return Gt}),r.d(t,"getWeekYear",function(){return Ut}),r.d(t,"getWeeksInMonth",function(){return zt}),r.d(t,"getYear",function(){return Xt}),r.d(t,"isAfter",function(){return Qt}),r.d(t,"isBefore",function(){return Vt}),r.d(t,"isDate",function(){return Kt}),r.d(t,"isEqual",function(){return Jt}),r.d(t,"isFirstDayOfMonth",function(){return $t}),r.d(t,"isFriday",function(){return Zt}),r.d(t,"isLastDayOfMonth",function(){return er}),r.d(t,"isLeapYear",function(){return kt}),r.d(t,"isMonday",function(){return tr}),r.d(t,"isSameDay",function(){return rr}),r.d(t,"isSameHour",function(){return ar}),r.d(t,"isSameISOWeek",function(){return or}),r.d(t,"isSameISOWeekYear",function(){return ur}),r.d(t,"isSameMinute",function(){return lr}),r.d(t,"isSameMonth",function(){return cr}),r.d(t,"isSameQuarter",function(){return fr}),r.d(t,"isSameSecond",function(){return gr}),r.d(t,"isSameWeek",function(){return ir}),r.d(t,"isSameYear",function(){return pr}),r.d(t,"isSaturday",function(){return mr}),r.d(t,"isSunday",function(){return ne}),r.d(t,"isThursday",function(){return vr}),r.d(t,"isTuesday",function(){return yr}),r.d(t,"isValid",function(){return Te}),r.d(t,"isWednesday",function(){return wr}),r.d(t,"isWeekend",function(){return ae}),r.d(t,"isWithinInterval",function(){return br}),r.d(t,"lastDayOfDecade",function(){return Tr}),r.d(t,"lastDayOfISOWeek",function(){return kr}),r.d(t,"lastDayOfISOWeekYear",function(){return Sr}),r.d(t,"lastDayOfMonth",function(){return Bt}),r.d(t,"lastDayOfQuarter",function(){return Er}),r.d(t,"lastDayOfWeek",function(){return _r}),r.d(t,"lastDayOfYear",function(){return Cr}),r.d(t,"lightFormat",function(){return Dr}),r.d(t,"max",function(){return Lr}),r.d(t,"min",function(){return Or}),r.d(t,"parse",function(){return on}),r.d(t,"parseISO",function(){return mn}),r.d(t,"roundToNearestMinutes",function(){return Tn}),r.d(t,"setDate",function(){return _n}),r.d(t,"setDay",function(){return kn}),r.d(t,"setDayOfYear",function(){return Sn}),r.d(t,"setHours",function(){return En}),r.d(t,"setISODay",function(){return Cn}),r.d(t,"setISOWeek",function(){return xn}),r.d(t,"setISOWeekYear",function(){return y}),r.d(t,"setMilliseconds",function(){return Pn}),r.d(t,"setMinutes",function(){return Mn}),r.d(t,"setMonth",function(){return Dn}),r.d(t,"setQuarter",function(){return Ln}),r.d(t,"setSeconds",function(){return On}),r.d(t,"setWeek",function(){return qn}),r.d(t,"setWeekYear",function(){return In}),r.d(t,"setYear",function(){return Rn}),r.d(t,"startOfDay",function(){return p}),r.d(t,"startOfDecade",function(){return Nn}),r.d(t,"startOfHour",function(){return nr}),r.d(t,"startOfISOWeek",function(){return c}),r.d(t,"startOfISOWeekYear",function(){return f}),r.d(t,"startOfMinute",function(){return sr}),r.d(t,"startOfMonth",function(){return oe}),r.d(t,"startOfQuarter",function(){return dr}),r.d(t,"startOfSecond",function(){return hr}),r.d(t,"startOfWeek",function(){return l}),r.d(t,"startOfWeekYear",function(){return jt}),r.d(t,"startOfYear",function(){return le}),r.d(t,"subDays",function(){return Hn}),r.d(t,"subHours",function(){return Fn}),r.d(t,"subISOWeekYears",function(){return z}),r.d(t,"subMilliseconds",function(){return $e}),r.d(t,"subMinutes",function(){return Wn}),r.d(t,"subMonths",function(){return Un}),r.d(t,"subQuarters",function(){return jn}),r.d(t,"subSeconds",function(){return An}),r.d(t,"subWeeks",function(){return Yn}),r.d(t,"subYears",function(){return Gn}),r.d(t,"toDate",function(){return a})}]);
//# sourceMappingURL=reader.min.js.map