bok-reader 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/bok.es.js +2757 -2551
- package/dist/bok.umd.js +10 -160
- package/dist/main.css +1 -1
- package/package.json +44 -47
package/dist/bok.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(bt,Q){typeof exports=="object"&&typeof module<"u"?Q(exports,require("react/jsx-runtime"),require("react"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","styled-components"],Q):(bt=typeof globalThis<"u"?globalThis:bt||self,Q(bt.Bok={},bt.jsxRuntime,bt.React,bt.styled))})(this,function(bt,Q,nt,Bt){"use strict";var Ft=document.createElement("style");Ft.textContent=`._loading-screen_13vxc_1,._loading-screen-gon_13vxc_2{height:100%;width:100%;position:absolute;top:0;left:0;background-color:#000;display:flex;align-items:center;justify-content:center;z-index:9999;will-change:opacity}._loading-screen_13vxc_1{opacity:1;transition:opacity .5s cubic-bezier(.65,0,.35,1);pointer-events:all}._loading-screen-gon_13vxc_2{opacity:0;transition:opacity .8s cubic-bezier(.65,0,.35,1);pointer-events:none}._spinner_13vxc_32{--loader-color: red;--loader-size: 80px;position:relative;width:var(--loader-size);height:var(--loader-size);display:flex;align-items:center;justify-content:center}._spinner_13vxc_32:before{content:"";position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid transparent;border-top-color:var(--loader-color);border-right-color:var(--loader-color);border-bottom-color:transparent;box-shadow:0 0 10px #0000;animation:_spin-outer_13vxc_1 2s cubic-bezier(.77,0,.175,1) infinite}._spinner_13vxc_32:after{content:"";position:absolute;width:70%;height:70%;border-radius:50%;border:2px solid transparent;border-bottom-color:var(--loader-color);border-left-color:var(--loader-color);box-shadow:0 0 5px #0000;animation:_spin-inner_13vxc_1 1.2s cubic-bezier(.55,.055,.675,.19) infinite}._core_13vxc_82{width:15%;height:15%;background-color:var(--loader-color);border-radius:50%;box-shadow:0 0 15px var(--loader-color);animation:_pulse_13vxc_1 1.5s ease-in-out infinite alternate}@keyframes _spin-outer_13vxc_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _spin-inner_13vxc_1{0%{transform:rotate(0) scale(1)}50%{transform:rotate(-180deg) scale(.9)}to{transform:rotate(-360deg) scale(1)}}@keyframes _pulse_13vxc_1{0%{opacity:.3;transform:scale(.8)}to{opacity:1;transform:scale(1.1)}}.options-menu-overlay{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:#0009;z-index:9999;opacity:1;container-type:size;container-name:options-overlay;transition:opacity .4s cubic-bezier(.32,.72,0,1),backdrop-filter .4s ease;overflow:hidden}.options-menu-overlay.fade-out{opacity:0;-webkit-backdrop-filter:blur(0px);backdrop-filter:blur(0px)}.options-menu{position:absolute;bottom:20px;left:50%;width:calc(100% - 40px);max-width:400px;background:#1e1e1ef2;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);padding:24px;box-sizing:border-box;border-radius:24px;border:1px solid rgba(255,255,255,.1);color:#fff;max-height:80%;overflow-y:auto;transform:translate(-50%) translateY(120%);transition:transform .5s cubic-bezier(.19,1,.22,1);box-shadow:0 10px 40px #00000080}.options-menu.visible{transform:translate(-50%) translateY(0)}.options-menu.slide-down{transform:translate(-50%) translateY(120%)}.options-menu h2{margin:0 0 24px;font-size:1.25rem;font-weight:600;text-align:center;color:#ffffffe6;letter-spacing:-.02em}.close-button{position:absolute;top:20px;right:20px;width:32px;height:32px;background:#ffffff1a;border:none;border-radius:50%;font-size:16px;color:#fffc;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.close-button:hover{background:#fff3;color:#fff;transform:rotate(90deg)}.options-buttons{display:flex;flex-direction:column;gap:16px}.font-family-buttons,.padding-buttons,.font-buttons{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background:#0000004d;padding:8px 12px;border-radius:16px;gap:12px;border:1px solid rgba(255,255,255,.05)}.option-label{font-size:.9rem;color:#ffffffb3;font-weight:500;margin-right:auto;padding-left:4px}.options-buttons button:not(.close-button){height:36px;min-width:36px;padding:0 12px;font-size:16px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.05);border-radius:10px;color:#fff;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;font-weight:500}.options-buttons button:not(.close-button):hover{background-color:#fff3;transform:translateY(-1px)}.options-buttons button:not(.close-button):active{transform:translateY(1px)}.options-buttons>button:last-child{width:100%;margin-top:8px;background-color:#ffffff14;height:44px}.font-family-buttons select{height:36px;border-radius:10px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.05);color:#fff;padding:0 32px 0 12px;outline:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.9rem;transition:background .2s;background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E);background-repeat:no-repeat;background-position:right 12px top 50%;background-size:10px auto}.font-family-buttons select:hover{background-color:#fff3}.option-value{font-variant-numeric:tabular-nums;font-weight:600;min-width:24px;text-align:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s;display:inline-block;color:#fff}.option-value.value-changed{transform:scale(1.3);color:#4facfe}.padding-buttons,.font-buttons{justify-content:space-between}.padding-buttons>div,.font-buttons>div{display:flex;align-items:center;gap:8px}.options-menu::-webkit-scrollbar{width:6px}.options-menu::-webkit-scrollbar-track{background:transparent}.options-menu::-webkit-scrollbar-thumb{background-color:#fff3;border-radius:20px}@keyframes _fadeIn_1cqa3_1{0%{opacity:0}to{opacity:1}}@keyframes _pulse_1cqa3_1{0%{box-shadow:0 0 0 0 var(--accent-color)}70%{box-shadow:0 0 0 20px transparent}to{box-shadow:0 0 0 0 transparent}}@keyframes _float_1cqa3_1{0%{transform:translateY(0)}50%{transform:translateY(-6px)}to{transform:translateY(0)}}@keyframes _bounce_1cqa3_169{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-6px)}60%{transform:translateY(-3px)}}._overlay_1cqa3_53{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;background:radial-gradient(circle at center,#0006,#000000d9);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;pointer-events:auto;opacity:1;transition:opacity .4s cubic-bezier(.25,.1,.25,1);animation:_fadeIn_1cqa3_1 .5s ease-out}._overlay_1cqa3_53._fadeOut_1cqa3_80{opacity:0;pointer-events:none}._interactionZone_1cqa3_86{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;color:#fff;cursor:pointer}._centerZone_1cqa3_96{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:100px;pointer-events:none}._iconWrapper_1cqa3_107{width:64px;height:64px;border-radius:50%;background-color:#ffffff1a;border:1px solid var(--accent-color);display:flex;align-items:center;justify-content:center;margin-bottom:16px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:_pulse_1cqa3_1 2s infinite}._iconWrapper_1cqa3_107 svg{width:32px;height:32px;fill:var(--accent-color);filter:drop-shadow(0 0 5px var(--accent-color))}._label_1cqa3_131{font-family:Inter,system-ui,sans-serif;font-size:1.1rem;font-weight:500;text-transform:uppercase;letter-spacing:.1em;text-shadow:0 2px 10px rgba(0,0,0,.8);opacity:.9;text-align:center}._bottomIconGroup_1cqa3_143{display:flex;flex-direction:column;align-items:center;margin-bottom:40px}._bottomIconWrapper_1cqa3_150{width:48px;height:48px;border-radius:50%;background-color:#ffffff1a;border:1px solid var(--accent-color);display:flex;align-items:center;justify-content:center;margin-bottom:8px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}._bottomIconWrapper_1cqa3_150 svg{width:24px;height:24px;fill:var(--accent-color)}._bounceArrow_1cqa3_169{margin-top:8px;animation:_bounce_1cqa3_169 2s infinite}._bounceArrow_1cqa3_169 svg{opacity:.8;fill:var(--accent-color)}._dismissButton_1cqa3_179{margin-top:20px;background:var(--accent-color);color:#000;font-weight:700;border:none;padding:12px 32px;border-radius:30px;font-size:1rem;cursor:pointer;pointer-events:auto;box-shadow:0 4px 20px #0000004d;transition:transform .2s,box-shadow .2s;animation:_float_1cqa3_1 3s ease-in-out infinite}._dismissButton_1cqa3_179:hover{transform:scale(1.05);box-shadow:0 6px 25px #00000080}._dismissButton_1cqa3_179:active{transform:scale(.95)}
|
|
2
|
-
|
|
1
|
+
(function(Et,J){typeof exports=="object"&&typeof module<"u"?J(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],J):(Et=typeof globalThis<"u"?globalThis:Et||self,J(Et.Bok={},Et.jsxRuntime,Et.React))})(this,function(Et,J,nt){"use strict";var Rt=document.createElement("style");Rt.textContent=`._loading-screen_13vxc_1,._loading-screen-gon_13vxc_2{height:100%;width:100%;position:absolute;top:0;left:0;background-color:#000;display:flex;align-items:center;justify-content:center;z-index:9999;will-change:opacity}._loading-screen_13vxc_1{opacity:1;transition:opacity .5s cubic-bezier(.65,0,.35,1);pointer-events:all}._loading-screen-gon_13vxc_2{opacity:0;transition:opacity .8s cubic-bezier(.65,0,.35,1);pointer-events:none}._spinner_13vxc_32{--loader-color: red;--loader-size: 80px;position:relative;width:var(--loader-size);height:var(--loader-size);display:flex;align-items:center;justify-content:center}._spinner_13vxc_32:before{content:"";position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid transparent;border-top-color:var(--loader-color);border-right-color:var(--loader-color);border-bottom-color:transparent;box-shadow:0 0 10px #0000;animation:_spin-outer_13vxc_1 2s cubic-bezier(.77,0,.175,1) infinite}._spinner_13vxc_32:after{content:"";position:absolute;width:70%;height:70%;border-radius:50%;border:2px solid transparent;border-bottom-color:var(--loader-color);border-left-color:var(--loader-color);box-shadow:0 0 5px #0000;animation:_spin-inner_13vxc_1 1.2s cubic-bezier(.55,.055,.675,.19) infinite}._core_13vxc_82{width:15%;height:15%;background-color:var(--loader-color);border-radius:50%;box-shadow:0 0 15px var(--loader-color);animation:_pulse_13vxc_1 1.5s ease-in-out infinite alternate}@keyframes _spin-outer_13vxc_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _spin-inner_13vxc_1{0%{transform:rotate(0) scale(1)}50%{transform:rotate(-180deg) scale(.9)}to{transform:rotate(-360deg) scale(1)}}@keyframes _pulse_13vxc_1{0%{opacity:.3;transform:scale(.8)}to{opacity:1;transform:scale(1.1)}}.options-menu-overlay{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:#0009;z-index:9999;opacity:1;container-type:size;container-name:options-overlay;transition:opacity .4s cubic-bezier(.32,.72,0,1),backdrop-filter .4s ease;overflow:hidden}.options-menu-overlay.fade-out{opacity:0;-webkit-backdrop-filter:blur(0px);backdrop-filter:blur(0px)}.options-menu{position:absolute;bottom:20px;left:50%;width:calc(100% - 40px);max-width:400px;background:#1e1e1ef2;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);padding:24px;box-sizing:border-box;border-radius:24px;border:1px solid rgba(255,255,255,.1);color:#fff;max-height:80%;overflow-y:auto;transform:translate(-50%) translateY(120%);transition:transform .5s cubic-bezier(.19,1,.22,1);box-shadow:0 10px 40px #00000080}.options-menu.visible{transform:translate(-50%) translateY(0)}.options-menu.slide-down{transform:translate(-50%) translateY(120%)}.options-menu h2{margin:0 0 24px;font-size:1.25rem;font-weight:600;text-align:center;color:#ffffffe6;letter-spacing:-.02em}.close-button{position:absolute;top:20px;right:20px;width:32px;height:32px;background:#ffffff1a;border:none;border-radius:50%;font-size:16px;color:#fffc;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.close-button:hover{background:#fff3;color:#fff;transform:rotate(90deg)}.options-buttons{display:flex;flex-direction:column;gap:16px}.font-family-buttons,.padding-buttons,.font-buttons{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background:#0000004d;padding:8px 12px;border-radius:16px;gap:12px;border:1px solid rgba(255,255,255,.05)}.option-label{font-size:.9rem;color:#ffffffb3;font-weight:500;margin-right:auto;padding-left:4px}.options-buttons button:not(.close-button){height:36px;min-width:36px;padding:0 12px;font-size:16px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.05);border-radius:10px;color:#fff;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;font-weight:500}.options-buttons button:not(.close-button):hover{background-color:#fff3;transform:translateY(-1px)}.options-buttons button:not(.close-button):active{transform:translateY(1px)}.options-buttons>button:last-child{width:100%;margin-top:8px;background-color:#ffffff14;height:44px}.font-family-buttons select{height:36px;border-radius:10px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.05);color:#fff;padding:0 32px 0 12px;outline:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.9rem;transition:background .2s;background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E);background-repeat:no-repeat;background-position:right 12px top 50%;background-size:10px auto}.font-family-buttons select:hover{background-color:#fff3}.option-value{font-variant-numeric:tabular-nums;font-weight:600;min-width:24px;text-align:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s;display:inline-block;color:#fff}.option-value.value-changed{transform:scale(1.3);color:#4facfe}.padding-buttons,.font-buttons{justify-content:space-between}.padding-buttons>div,.font-buttons>div{display:flex;align-items:center;gap:8px}.options-menu::-webkit-scrollbar{width:6px}.options-menu::-webkit-scrollbar-track{background:transparent}.options-menu::-webkit-scrollbar-thumb{background-color:#fff3;border-radius:20px}@keyframes _fadeIn_1cqa3_1{0%{opacity:0}to{opacity:1}}@keyframes _pulse_1cqa3_1{0%{box-shadow:0 0 0 0 var(--accent-color)}70%{box-shadow:0 0 0 20px transparent}to{box-shadow:0 0 0 0 transparent}}@keyframes _float_1cqa3_1{0%{transform:translateY(0)}50%{transform:translateY(-6px)}to{transform:translateY(0)}}@keyframes _bounce_1cqa3_169{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-6px)}60%{transform:translateY(-3px)}}._overlay_1cqa3_53{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;background:radial-gradient(circle at center,#0006,#000000d9);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;pointer-events:auto;opacity:1;transition:opacity .4s cubic-bezier(.25,.1,.25,1);animation:_fadeIn_1cqa3_1 .5s ease-out}._overlay_1cqa3_53._fadeOut_1cqa3_80{opacity:0;pointer-events:none}._interactionZone_1cqa3_86{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;color:#fff;cursor:pointer}._centerZone_1cqa3_96{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:100px;pointer-events:none}._iconWrapper_1cqa3_107{width:64px;height:64px;border-radius:50%;background-color:#ffffff1a;border:1px solid var(--accent-color);display:flex;align-items:center;justify-content:center;margin-bottom:16px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:_pulse_1cqa3_1 2s infinite}._iconWrapper_1cqa3_107 svg{width:32px;height:32px;fill:var(--accent-color);filter:drop-shadow(0 0 5px var(--accent-color))}._label_1cqa3_131{font-family:Inter,system-ui,sans-serif;font-size:1.1rem;font-weight:500;text-transform:uppercase;letter-spacing:.1em;text-shadow:0 2px 10px rgba(0,0,0,.8);opacity:.9;text-align:center}._bottomIconGroup_1cqa3_143{display:flex;flex-direction:column;align-items:center;margin-bottom:40px}._bottomIconWrapper_1cqa3_150{width:48px;height:48px;border-radius:50%;background-color:#ffffff1a;border:1px solid var(--accent-color);display:flex;align-items:center;justify-content:center;margin-bottom:8px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}._bottomIconWrapper_1cqa3_150 svg{width:24px;height:24px;fill:var(--accent-color)}._bounceArrow_1cqa3_169{margin-top:8px;animation:_bounce_1cqa3_169 2s infinite}._bounceArrow_1cqa3_169 svg{opacity:.8;fill:var(--accent-color)}._dismissButton_1cqa3_179{margin-top:20px;background:var(--accent-color);color:#000;font-weight:700;border:none;padding:12px 32px;border-radius:30px;font-size:1rem;cursor:pointer;pointer-events:auto;box-shadow:0 4px 20px #0000004d;transition:transform .2s,box-shadow .2s;animation:_float_1cqa3_1 3s ease-in-out infinite}._dismissButton_1cqa3_179:hover{transform:scale(1.05);box-shadow:0 6px 25px #00000080}._dismissButton_1cqa3_179:active{transform:scale(.95)}.bok-reader-container{--bg-color: black;--text-color: rgb(215, 215, 215);--page-num-text: rgba(255, 255, 255, .4);--page-num-bg: rgba(0, 0, 0, .3);--page-num-border: transparent;width:100%;height:100%;position:relative;overflow-y:hidden;overflow-x:hidden;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;text-align:justify;color-scheme:dark light;color:var(--text-color)!important;background-color:var(--bg-color);overflow:hidden;scrollbar-width:none;-ms-overflow-style:none;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;container-type:size}.bok-reader-container.davinci{--bg-color: #dccba3;--text-color: #463425;--page-num-text: #2b1f15;--page-num-bg: rgba(70, 52, 37, .1);--page-num-border: rgba(70, 52, 37, .2)}.bok-reader-container::-webkit-scrollbar{display:none}.bok-reader-container .book-page{margin:0;font-family:var(--font-family);padding:var(--top-padding) var(--side-padding) var(--bottom-padding);height:100%;text-shadow:0 1px 2px var(--bg-color);font-size:var(--font-size);column-gap:calc(2 * var(--side-padding));-webkit-column-fill:auto;-webkit-column-gap:calc(2 * var(--side-padding));overflow-x:hidden;overscroll-behavior-x:none;overflow-y:hidden;-webkit-overflow-scrolling:touch;box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none}.bok-reader-container .book-page::-webkit-scrollbar{display:none}.bok-reader-container .book-page>*{break-inside:avoid-column;page-break-inside:avoid;-webkit-column-break-inside:avoid}@container (aspect-ratio > 1/1){.bok-reader-container .book-page{column-count:2;-moz-column-count:2;-webkit-column-count:2;column-width:calc(50% - var(--side-padding));-webkit-column-width:calc(50% - var(--side-padding))}.bok-reader-container .book-page img,.bok-reader-container .book-page svg{max-width:calc(100% - 2 * var(--side-padding))!important;margin-bottom:10px}}@container (aspect-ratio <= 1/1){.bok-reader-container .book-page{column-count:1;-moz-column-count:1;-webkit-column-count:1;column-width:var(--computed-width, 100%);-webkit-column-width:var(--computed-width, 100%);width:100%;box-sizing:border-box}.bok-reader-container .book-page img,.bok-reader-container .book-page svg{max-width:calc(100% - 2 * var(--side-padding))!important;margin-bottom:10px}}.bok-reader-container .book-page img,.bok-reader-container .book-page svg{border-radius:10px;max-height:calc(100% - var(--top-padding) - var(--bottom-padding))!important;display:block;margin-left:auto;margin-right:auto;object-fit:contain;box-sizing:border-box;break-inside:avoid-column;page-break-inside:avoid;-webkit-column-break-inside:avoid}.bok-reader-container .book-page svg>image{width:100%;height:100%}.bok-reader-container .bok-chapter{margin-bottom:100%;break-inside:avoid-column;page-break-inside:avoid;-webkit-column-break-inside:avoid}.bok-reader-container parsererror{display:none}.bok-reader-container .page-number{position:absolute;bottom:20px;left:50%;transform:translate(-50%);font-size:12px;font-weight:500;letter-spacing:.5px;z-index:10;pointer-events:none;font-variant-numeric:tabular-nums;color:var(--page-num-text);background:var(--page-num-bg);border:1px solid var(--page-num-border);padding:4px 10px;border-radius:12px;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.bok-reader-container .bottom-click-area{position:absolute;bottom:0;left:0;width:100%;height:15%;z-index:1000;background-color:transparent;cursor:pointer}
|
|
2
|
+
`,document.head.appendChild(Rt);var Bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mt(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X}var Dt={exports:{}},Pt={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-compiler-runtime.production.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var Ut;function Ht(){if(Ut)return Pt;Ut=1;var X=nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Pt.c=function(t){return X.H.useMemoCache(t)},Pt}var Lt={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-compiler-runtime.development.js
|
|
13
13
|
*
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
18
|
+
*/var jt;function Gt(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&function(){var X=nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Lt.c=function(t){var b=X.H;return b===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
19
19
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
20
20
|
2. You might be breaking the Rules of Hooks
|
|
21
21
|
3. You might have more than one copy of React in the same app
|
|
22
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),
|
|
22
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),b.useMemoCache(t)}}()),Lt}process.env.NODE_ENV==="production"?Dt.exports=Ht():Dt.exports=Gt();var St=Dt.exports;function Ft(X){throw new Error('Could not dynamically require "'+X+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wt={exports:{}};/*!
|
|
23
23
|
|
|
24
24
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
25
25
|
<http://stuartk.com/jszip>
|
|
@@ -29,158 +29,8 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
29
29
|
|
|
30
30
|
JSZip uses the library pako released under the MIT license :
|
|
31
31
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
32
|
-
*/(function(
|
|
33
|
-
\0`,M+=o(B,2),M+=P.magic,M+=o(k,2),M+=o(S,2),M+=o($.crc32,4),M+=o($.compressedSize,4),M+=o($.uncompressedSize,4),M+=o(W.length,2),M+=o(N.length,2),{fileRecord:y.LOCAL_FILE_HEADER+M+W+N,dirRecord:y.CENTRAL_FILE_HEADER+o(V,2)+M+o(Y.length,2)+"\0\0\0\0"+o(T,4)+o(f,4)+W+N+Y}}var n=p("../utils"),l=p("../stream/GenericWorker"),v=p("../utf8"),b=p("../crc32"),y=p("../signature");function w(s,h,i,f){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=h,this.zipPlatform=i,this.encodeFileName=f,this.streamFiles=s,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(w,l),w.prototype.push=function(s){var h=s.meta.percent||0,i=this.entriesCount,f=this._sources.length;this.accumulate?this.contentBuffer.push(s):(this.bytesWritten+=s.data.length,l.prototype.push.call(this,{data:s.data,meta:{currentFile:this.currentFile,percent:i?(h+100*(i-f-1))/i:100}}))},w.prototype.openedSource=function(s){this.currentSourceOffset=this.bytesWritten,this.currentFile=s.file.name;var h=this.streamFiles&&!s.file.dir;if(h){var i=c(s,h,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(s){this.accumulate=!1;var h=this.streamFiles&&!s.file.dir,i=c(s,h,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),h)this.push({data:function(f){return y.DATA_DESCRIPTOR+o(f.crc32,4)+o(f.compressedSize,4)+o(f.uncompressedSize,4)}(s),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var s=this.bytesWritten,h=0;h<this.dirRecords.length;h++)this.push({data:this.dirRecords[h],meta:{percent:100}});var i=this.bytesWritten-s,f=function(a,m,k,S,E){var P=n.transformTo("string",E(S));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(a,2)+o(a,2)+o(m,4)+o(k,4)+o(P.length,2)+P}(this.dirRecords.length,i,s,this.zipComment,this.encodeFileName);this.push({data:f,meta:{percent:100}})},w.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},w.prototype.registerPrevious=function(s){this._sources.push(s);var h=this;return s.on("data",function(i){h.processChunk(i)}),s.on("end",function(){h.closedSource(h.previous.streamInfo),h._sources.length?h.prepareNextSource():h.end()}),s.on("error",function(i){h.error(i)}),this},w.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},w.prototype.error=function(s){var h=this._sources;if(!l.prototype.error.call(this,s))return!1;for(var i=0;i<h.length;i++)try{h[i].error(s)}catch{}return!0},w.prototype.lock=function(){l.prototype.lock.call(this);for(var s=this._sources,h=0;h<s.length;h++)s[h].lock()},A.exports=w},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(p,A,d){var o=p("../compressions"),c=p("./ZipFileWorker");d.generateWorker=function(n,l,v){var b=new c(l.streamFiles,v,l.platform,l.encodeFileName),y=0;try{n.forEach(function(w,s){y++;var h=function(m,k){var S=m||k,E=o[S];if(!E)throw new Error(S+" is not a valid compression method !");return E}(s.options.compression,l.compression),i=s.options.compressionOptions||l.compressionOptions||{},f=s.dir,a=s.date;s._compressWorker(h,i).withStreamInfo("file",{name:w,dir:f,date:a,comment:s.comment||"",unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions}).pipe(b)}),b.entriesCount=y}catch(w){b.error(w)}return b}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(p,A,d){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new o;for(var n in this)typeof this[n]!="function"&&(c[n]=this[n]);return c}}(o.prototype=p("./object")).loadAsync=p("./load"),o.support=p("./support"),o.defaults=p("./defaults"),o.version="3.10.1",o.loadAsync=function(c,n){return new o().loadAsync(c,n)},o.external=p("./external"),A.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(p,A,d){var o=p("./utils"),c=p("./external"),n=p("./utf8"),l=p("./zipEntries"),v=p("./stream/Crc32Probe"),b=p("./nodejsUtils");function y(w){return new c.Promise(function(s,h){var i=w.decompressed.getContentWorker().pipe(new v);i.on("error",function(f){h(f)}).on("end",function(){i.streamInfo.crc32!==w.decompressed.crc32?h(new Error("Corrupted zip : CRC32 mismatch")):s()}).resume()})}A.exports=function(w,s){var h=this;return s=o.extend(s||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),b.isNode&&b.isStream(w)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",w,!0,s.optimizedBinaryString,s.base64).then(function(i){var f=new l(s);return f.load(i),f}).then(function(i){var f=[c.Promise.resolve(i)],a=i.files;if(s.checkCRC32)for(var m=0;m<a.length;m++)f.push(y(a[m]));return c.Promise.all(f)}).then(function(i){for(var f=i.shift(),a=f.files,m=0;m<a.length;m++){var k=a[m],S=k.fileNameStr,E=o.resolve(k.fileNameStr);h.file(E,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:s.createFolders}),k.dir||(h.file(E).unsafeOriginalName=S)}return f.zipComment.length&&(h.comment=f.zipComment),h})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(p,A,d){var o=p("../utils"),c=p("../stream/GenericWorker");function n(l,v){c.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(v)}o.inherits(n,c),n.prototype._bindStream=function(l){var v=this;(this._stream=l).pause(),l.on("data",function(b){v.push({data:b,meta:{percent:0}})}).on("error",function(b){v.isPaused?this.generatedError=b:v.error(b)}).on("end",function(){v.isPaused?v._upstreamEnded=!0:v.end()})},n.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},A.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(p,A,d){var o=p("readable-stream").Readable;function c(n,l,v){o.call(this,l),this._helper=n;var b=this;n.on("data",function(y,w){b.push(y)||b._helper.pause(),v&&v(w)}).on("error",function(y){b.emit("error",y)}).on("end",function(){b.push(null)})}p("../utils").inherits(c,o),c.prototype._read=function(){this._helper.resume()},A.exports=c},{"../utils":32,"readable-stream":16}],14:[function(p,A,d){A.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,c);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,c)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var c=new Buffer(o);return c.fill(0),c},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(p,A,d){function o(E,P,D){var W,z=n.getTypeOf(P),I=n.extend(D||{},b);I.date=I.date||new Date,I.compression!==null&&(I.compression=I.compression.toUpperCase()),typeof I.unixPermissions=="string"&&(I.unixPermissions=parseInt(I.unixPermissions,8)),I.unixPermissions&&16384&I.unixPermissions&&(I.dir=!0),I.dosPermissions&&16&I.dosPermissions&&(I.dir=!0),I.dir&&(E=a(E)),I.createFolders&&(W=f(E))&&m.call(this,W,!0);var Y=z==="string"&&I.binary===!1&&I.base64===!1;D&&D.binary!==void 0||(I.binary=!Y),(P instanceof y&&P.uncompressedSize===0||I.dir||!P||P.length===0)&&(I.base64=!1,I.binary=!0,P="",I.compression="STORE",z="string");var g=null;g=P instanceof y||P instanceof l?P:h.isNode&&h.isStream(P)?new i(E,P):n.prepareContent(E,P,I.binary,I.optimizedBinaryString,I.base64);var O=new w(E,g,I);this.files[E]=O}var c=p("./utf8"),n=p("./utils"),l=p("./stream/GenericWorker"),v=p("./stream/StreamHelper"),b=p("./defaults"),y=p("./compressedObject"),w=p("./zipObject"),s=p("./generate"),h=p("./nodejsUtils"),i=p("./nodejs/NodejsStreamInputAdapter"),f=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var P=E.lastIndexOf("/");return 0<P?E.substring(0,P):""},a=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},m=function(E,P){return P=P!==void 0?P:b.createFolders,E=a(E),this.files[E]||o.call(this,E,null,{dir:!0,createFolders:P}),this.files[E]};function k(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var P,D,W;for(P in this.files)W=this.files[P],(D=P.slice(this.root.length,P.length))&&P.slice(0,this.root.length)===this.root&&E(D,W)},filter:function(E){var P=[];return this.forEach(function(D,W){E(D,W)&&P.push(W)}),P},file:function(E,P,D){if(arguments.length!==1)return E=this.root+E,o.call(this,E,P,D),this;if(k(E)){var W=E;return this.filter(function(I,Y){return!Y.dir&&W.test(I)})}var z=this.files[this.root+E];return z&&!z.dir?z:null},folder:function(E){if(!E)return this;if(k(E))return this.filter(function(z,I){return I.dir&&E.test(z)});var P=this.root+E,D=m.call(this,P),W=this.clone();return W.root=D.name,W},remove:function(E){E=this.root+E;var P=this.files[E];if(P||(E.slice(-1)!=="/"&&(E+="/"),P=this.files[E]),P&&!P.dir)delete this.files[E];else for(var D=this.filter(function(z,I){return I.name.slice(0,E.length)===E}),W=0;W<D.length;W++)delete this.files[D[W].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var P,D={};try{if((D=n.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=D.type.toLowerCase(),D.compression=D.compression.toUpperCase(),D.type==="binarystring"&&(D.type="string"),!D.type)throw new Error("No output type specified.");n.checkSupport(D.type),D.platform!=="darwin"&&D.platform!=="freebsd"&&D.platform!=="linux"&&D.platform!=="sunos"||(D.platform="UNIX"),D.platform==="win32"&&(D.platform="DOS");var W=D.comment||this.comment||"";P=s.generateWorker(this,D,W)}catch(z){(P=new l("error")).error(z)}return new v(P,D.type||"string",D.mimeType)},generateAsync:function(E,P){return this.generateInternalStream(E).accumulate(P)},generateNodeStream:function(E,P){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(P)}};A.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(p,A,d){A.exports=p("stream")},{stream:void 0}],17:[function(p,A,d){var o=p("./DataReader");function c(n){o.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}p("../utils").inherits(c,o),c.prototype.byteAt=function(n){return this.data[this.zero+n]},c.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),v=n.charCodeAt(1),b=n.charCodeAt(2),y=n.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===l&&this.data[w+1]===v&&this.data[w+2]===b&&this.data[w+3]===y)return w-this.zero;return-1},c.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),v=n.charCodeAt(1),b=n.charCodeAt(2),y=n.charCodeAt(3),w=this.readData(4);return l===w[0]&&v===w[1]&&b===w[2]&&y===w[3]},c.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},A.exports=c},{"../utils":32,"./DataReader":18}],18:[function(p,A,d){var o=p("../utils");function c(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,v=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)v=(v<<8)+this.byteAt(l);return this.index+=n,v},readString:function(n){return o.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},A.exports=c},{"../utils":32}],19:[function(p,A,d){var o=p("./Uint8ArrayReader");function c(n){o.call(this,n)}p("../utils").inherits(c,o),c.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},A.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(p,A,d){var o=p("./DataReader");function c(n){o.call(this,n)}p("../utils").inherits(c,o),c.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},c.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},c.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},c.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},A.exports=c},{"../utils":32,"./DataReader":18}],21:[function(p,A,d){var o=p("./ArrayReader");function c(n){o.call(this,n)}p("../utils").inherits(c,o),c.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},A.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(p,A,d){var o=p("../utils"),c=p("../support"),n=p("./ArrayReader"),l=p("./StringReader"),v=p("./NodeBufferReader"),b=p("./Uint8ArrayReader");A.exports=function(y){var w=o.getTypeOf(y);return o.checkSupport(w),w!=="string"||c.uint8array?w==="nodebuffer"?new v(y):c.uint8array?new b(o.transformTo("uint8array",y)):new n(o.transformTo("array",y)):new l(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(p,A,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(p,A,d){var o=p("./GenericWorker"),c=p("../utils");function n(l){o.call(this,"ConvertWorker to "+l),this.destType=l}c.inherits(n,o),n.prototype.processChunk=function(l){this.push({data:c.transformTo(this.destType,l.data),meta:l.meta})},A.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(p,A,d){var o=p("./GenericWorker"),c=p("../crc32");function n(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}p("../utils").inherits(n,o),n.prototype.processChunk=function(l){this.streamInfo.crc32=c(l.data,this.streamInfo.crc32||0),this.push(l)},A.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(p,A,d){var o=p("../utils"),c=p("./GenericWorker");function n(l){c.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(n,c),n.prototype.processChunk=function(l){if(l){var v=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=v+l.data.length}c.prototype.processChunk.call(this,l)},A.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(p,A,d){var o=p("../utils"),c=p("./GenericWorker");function n(l){c.call(this,"DataWorker");var v=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(b){v.dataIsReady=!0,v.data=b,v.max=b&&b.length||0,v.type=o.getTypeOf(b),v.isPaused||v._tickAndRepeat()},function(b){v.error(b)})}o.inherits(n,c),n.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,v=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,v);break;case"uint8array":l=this.data.subarray(this.index,v);break;case"array":case"nodebuffer":l=this.data.slice(this.index,v)}return this.index=v,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},A.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(p,A,d){function o(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,n){return this._listeners[c].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,n){if(this._listeners[c])for(var l=0;l<this._listeners[c].length;l++)this._listeners[c][l].call(this,n)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var n=this;return c.on("data",function(l){n.processChunk(l)}),c.on("end",function(){n.end()}),c.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,n){return this.extraStreamInfo[c]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},A.exports=o},{}],29:[function(p,A,d){var o=p("../utils"),c=p("./ConvertWorker"),n=p("./GenericWorker"),l=p("../base64"),v=p("../support"),b=p("../external"),y=null;if(v.nodestream)try{y=p("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(h,i){return new b.Promise(function(f,a){var m=[],k=h._internalType,S=h._outputType,E=h._mimeType;h.on("data",function(P,D){m.push(P),i&&i(D)}).on("error",function(P){m=[],a(P)}).on("end",function(){try{var P=function(D,W,z){switch(D){case"blob":return o.newBlob(o.transformTo("arraybuffer",W),z);case"base64":return l.encode(W);default:return o.transformTo(D,W)}}(S,function(D,W){var z,I=0,Y=null,g=0;for(z=0;z<W.length;z++)g+=W[z].length;switch(D){case"string":return W.join("");case"array":return Array.prototype.concat.apply([],W);case"uint8array":for(Y=new Uint8Array(g),z=0;z<W.length;z++)Y.set(W[z],I),I+=W[z].length;return Y;case"nodebuffer":return Buffer.concat(W);default:throw new Error("concat : unsupported type '"+D+"'")}}(k,m),E);f(P)}catch(D){a(D)}m=[]}).resume()})}function s(h,i,f){var a=i;switch(i){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=i,this._mimeType=f,o.checkSupport(a),this._worker=h.pipe(new c(a)),h.lock()}catch(m){this._worker=new n("error"),this._worker.error(m)}}s.prototype={accumulate:function(h){return w(this,h)},on:function(h,i){var f=this;return h==="data"?this._worker.on(h,function(a){i.call(f,a.data,a.meta)}):this._worker.on(h,function(){o.delay(i,arguments,f)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(h){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},h)}},A.exports=s},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(p,A,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var o=new ArrayBuffer(0);try{d.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(o),d.blob=c.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!p("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(p,A,d){for(var o=p("./utils"),c=p("./support"),n=p("./nodejsUtils"),l=p("./stream/GenericWorker"),v=new Array(256),b=0;b<256;b++)v[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;v[254]=v[254]=1;function y(){l.call(this,"utf-8 decode"),this.leftOver=null}function w(){l.call(this,"utf-8 encode")}d.utf8encode=function(s){return c.nodebuffer?n.newBufferFrom(s,"utf-8"):function(h){var i,f,a,m,k,S=h.length,E=0;for(m=0;m<S;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<S&&(64512&(a=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(a-56320),m++),E+=f<128?1:f<2048?2:f<65536?3:4;for(i=c.uint8array?new Uint8Array(E):new Array(E),m=k=0;k<E;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<S&&(64512&(a=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(a-56320),m++),f<128?i[k++]=f:(f<2048?i[k++]=192|f>>>6:(f<65536?i[k++]=224|f>>>12:(i[k++]=240|f>>>18,i[k++]=128|f>>>12&63),i[k++]=128|f>>>6&63),i[k++]=128|63&f);return i}(s)},d.utf8decode=function(s){return c.nodebuffer?o.transformTo("nodebuffer",s).toString("utf-8"):function(h){var i,f,a,m,k=h.length,S=new Array(2*k);for(i=f=0;i<k;)if((a=h[i++])<128)S[f++]=a;else if(4<(m=v[a]))S[f++]=65533,i+=m-1;else{for(a&=m===2?31:m===3?15:7;1<m&&i<k;)a=a<<6|63&h[i++],m--;1<m?S[f++]=65533:a<65536?S[f++]=a:(a-=65536,S[f++]=55296|a>>10&1023,S[f++]=56320|1023&a)}return S.length!==f&&(S.subarray?S=S.subarray(0,f):S.length=f),o.applyFromCharCode(S)}(s=o.transformTo(c.uint8array?"uint8array":"array",s))},o.inherits(y,l),y.prototype.processChunk=function(s){var h=o.transformTo(c.uint8array?"uint8array":"array",s.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var i=h;(h=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),h.set(i,this.leftOver.length)}else h=this.leftOver.concat(h);this.leftOver=null}var f=function(m,k){var S;for((k=k||m.length)>m.length&&(k=m.length),S=k-1;0<=S&&(192&m[S])==128;)S--;return S<0||S===0?k:S+v[m[S]]>k?S:k}(h),a=h;f!==h.length&&(c.uint8array?(a=h.subarray(0,f),this.leftOver=h.subarray(f,h.length)):(a=h.slice(0,f),this.leftOver=h.slice(f,h.length))),this.push({data:d.utf8decode(a),meta:s.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=y,o.inherits(w,l),w.prototype.processChunk=function(s){this.push({data:d.utf8encode(s.data),meta:s.meta})},d.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(p,A,d){var o=p("./support"),c=p("./base64"),n=p("./nodejsUtils"),l=p("./external");function v(i){return i}function b(i,f){for(var a=0;a<i.length;++a)f[a]=255&i.charCodeAt(a);return f}p("setimmediate"),d.newBlob=function(i,f){d.checkSupport("blob");try{return new Blob([i],{type:f})}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(i),a.getBlob(f)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(i,f,a){var m=[],k=0,S=i.length;if(S<=a)return String.fromCharCode.apply(null,i);for(;k<S;)f==="array"||f==="nodebuffer"?m.push(String.fromCharCode.apply(null,i.slice(k,Math.min(k+a,S)))):m.push(String.fromCharCode.apply(null,i.subarray(k,Math.min(k+a,S)))),k+=a;return m.join("")},stringifyByChar:function(i){for(var f="",a=0;a<i.length;a++)f+=String.fromCharCode(i[a]);return f},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}}()}};function w(i){var f=65536,a=d.getTypeOf(i),m=!0;if(a==="uint8array"?m=y.applyCanBeUsed.uint8array:a==="nodebuffer"&&(m=y.applyCanBeUsed.nodebuffer),m)for(;1<f;)try{return y.stringifyByChunk(i,a,f)}catch{f=Math.floor(f/2)}return y.stringifyByChar(i)}function s(i,f){for(var a=0;a<i.length;a++)f[a]=i[a];return f}d.applyFromCharCode=w;var h={};h.string={string:v,array:function(i){return b(i,new Array(i.length))},arraybuffer:function(i){return h.string.uint8array(i).buffer},uint8array:function(i){return b(i,new Uint8Array(i.length))},nodebuffer:function(i){return b(i,n.allocBuffer(i.length))}},h.array={string:w,array:v,arraybuffer:function(i){return new Uint8Array(i).buffer},uint8array:function(i){return new Uint8Array(i)},nodebuffer:function(i){return n.newBufferFrom(i)}},h.arraybuffer={string:function(i){return w(new Uint8Array(i))},array:function(i){return s(new Uint8Array(i),new Array(i.byteLength))},arraybuffer:v,uint8array:function(i){return new Uint8Array(i)},nodebuffer:function(i){return n.newBufferFrom(new Uint8Array(i))}},h.uint8array={string:w,array:function(i){return s(i,new Array(i.length))},arraybuffer:function(i){return i.buffer},uint8array:v,nodebuffer:function(i){return n.newBufferFrom(i)}},h.nodebuffer={string:w,array:function(i){return s(i,new Array(i.length))},arraybuffer:function(i){return h.nodebuffer.uint8array(i).buffer},uint8array:function(i){return s(i,new Uint8Array(i.length))},nodebuffer:v},d.transformTo=function(i,f){if(f=f||"",!i)return f;d.checkSupport(i);var a=d.getTypeOf(f);return h[a][i](f)},d.resolve=function(i){for(var f=i.split("/"),a=[],m=0;m<f.length;m++){var k=f[m];k==="."||k===""&&m!==0&&m!==f.length-1||(k===".."?a.pop():a.push(k))}return a.join("/")},d.getTypeOf=function(i){return typeof i=="string"?"string":Object.prototype.toString.call(i)==="[object Array]"?"array":o.nodebuffer&&n.isBuffer(i)?"nodebuffer":o.uint8array&&i instanceof Uint8Array?"uint8array":o.arraybuffer&&i instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(i){if(!o[i.toLowerCase()])throw new Error(i+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(i){var f,a,m="";for(a=0;a<(i||"").length;a++)m+="\\x"+((f=i.charCodeAt(a))<16?"0":"")+f.toString(16).toUpperCase();return m},d.delay=function(i,f,a){setImmediate(function(){i.apply(a||null,f||[])})},d.inherits=function(i,f){function a(){}a.prototype=f.prototype,i.prototype=new a},d.extend=function(){var i,f,a={};for(i=0;i<arguments.length;i++)for(f in arguments[i])Object.prototype.hasOwnProperty.call(arguments[i],f)&&a[f]===void 0&&(a[f]=arguments[i][f]);return a},d.prepareContent=function(i,f,a,m,k){return l.Promise.resolve(f).then(function(S){return o.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,P){var D=new FileReader;D.onload=function(W){E(W.target.result)},D.onerror=function(W){P(W.target.error)},D.readAsArrayBuffer(S)}):S}).then(function(S){var E=d.getTypeOf(S);return E?(E==="arraybuffer"?S=d.transformTo("uint8array",S):E==="string"&&(k?S=c.decode(S):a&&m!==!0&&(S=function(P){return b(P,o.uint8array?new Uint8Array(P.length):new Array(P.length))}(S))),S):l.Promise.reject(new Error("Can't read the data of '"+i+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(p,A,d){var o=p("./reader/readerFor"),c=p("./utils"),n=p("./signature"),l=p("./zipEntry"),v=p("./support");function b(y){this.files=[],this.loadOptions=y}b.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(w)+", expected "+c.pretty(y)+")")}},isSignature:function(y,w){var s=this.reader.index;this.reader.setIndex(y);var h=this.reader.readString(4)===w;return this.reader.setIndex(s),h},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),w=v.uint8array?"uint8array":"array",s=c.transformTo(w,y);this.zipComment=this.loadOptions.decodeFileName(s)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,w,s,h=this.zip64EndOfCentralSize-44;0<h;)y=this.reader.readInt(2),w=this.reader.readInt(4),s=this.reader.readData(w),this.zip64ExtensibleData[y]={id:y,length:w,value:s}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,w;for(y=0;y<this.files.length;y++)w=this.files[y],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(y=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var w=y;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var s=this.centralDirOffset+this.centralDirSize;this.zip64&&(s+=20,s+=12+this.zip64EndOfCentralSize);var h=w-s;if(0<h)this.isSignature(w,n.CENTRAL_FILE_HEADER)||(this.reader.zero=h);else if(h<0)throw new Error("Corrupted zip: missing "+Math.abs(h)+" bytes.")},prepareReader:function(y){this.reader=o(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},A.exports=b},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(p,A,d){var o=p("./reader/readerFor"),c=p("./utils"),n=p("./compressedObject"),l=p("./crc32"),v=p("./utf8"),b=p("./compressions"),y=p("./support");function w(s,h){this.options=s,this.loadOptions=h}w.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(s){var h,i;if(s.skip(22),this.fileNameLength=s.readInt(2),i=s.readInt(2),this.fileName=s.readData(this.fileNameLength),s.skip(i),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((h=function(f){for(var a in b)if(Object.prototype.hasOwnProperty.call(b,a)&&b[a].magic===f)return b[a];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,h,s.readData(this.compressedSize))},readCentralPart:function(s){this.versionMadeBy=s.readInt(2),s.skip(2),this.bitFlag=s.readInt(2),this.compressionMethod=s.readString(2),this.date=s.readDate(),this.crc32=s.readInt(4),this.compressedSize=s.readInt(4),this.uncompressedSize=s.readInt(4);var h=s.readInt(2);if(this.extraFieldsLength=s.readInt(2),this.fileCommentLength=s.readInt(2),this.diskNumberStart=s.readInt(2),this.internalFileAttributes=s.readInt(2),this.externalFileAttributes=s.readInt(4),this.localHeaderOffset=s.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");s.skip(h),this.readExtraFields(s),this.parseZIP64ExtraField(s),this.fileComment=s.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var s=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),s==0&&(this.dosPermissions=63&this.externalFileAttributes),s==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var s=o(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=s.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=s.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=s.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=s.readInt(4))}},readExtraFields:function(s){var h,i,f,a=s.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});s.index+4<a;)h=s.readInt(2),i=s.readInt(2),f=s.readData(i),this.extraFields[h]={id:h,length:i,value:f};s.setIndex(a)},handleUTF8:function(){var s=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=v.utf8decode(this.fileName),this.fileCommentStr=v.utf8decode(this.fileComment);else{var h=this.findExtraFieldUnicodePath();if(h!==null)this.fileNameStr=h;else{var i=c.transformTo(s,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var f=this.findExtraFieldUnicodeComment();if(f!==null)this.fileCommentStr=f;else{var a=c.transformTo(s,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var s=this.extraFields[28789];if(s){var h=o(s.value);return h.readInt(1)!==1||l(this.fileName)!==h.readInt(4)?null:v.utf8decode(h.readData(s.length-5))}return null},findExtraFieldUnicodeComment:function(){var s=this.extraFields[25461];if(s){var h=o(s.value);return h.readInt(1)!==1||l(this.fileComment)!==h.readInt(4)?null:v.utf8decode(h.readData(s.length-5))}return null}},A.exports=w},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(p,A,d){function o(h,i,f){this.name=h,this.dir=f.dir,this.date=f.date,this.comment=f.comment,this.unixPermissions=f.unixPermissions,this.dosPermissions=f.dosPermissions,this._data=i,this._dataBinary=f.binary,this.options={compression:f.compression,compressionOptions:f.compressionOptions}}var c=p("./stream/StreamHelper"),n=p("./stream/DataWorker"),l=p("./utf8"),v=p("./compressedObject"),b=p("./stream/GenericWorker");o.prototype={internalStream:function(h){var i=null,f="string";try{if(!h)throw new Error("No output type specified.");var a=(f=h.toLowerCase())==="string"||f==="text";f!=="binarystring"&&f!=="text"||(f="string"),i=this._decompressWorker();var m=!this._dataBinary;m&&!a&&(i=i.pipe(new l.Utf8EncodeWorker)),!m&&a&&(i=i.pipe(new l.Utf8DecodeWorker))}catch(k){(i=new b("error")).error(k)}return new c(i,f,"")},async:function(h,i){return this.internalStream(h).accumulate(i)},nodeStream:function(h,i){return this.internalStream(h||"nodebuffer").toNodejsStream(i)},_compressWorker:function(h,i){if(this._data instanceof v&&this._data.compression.magic===h.magic)return this._data.getCompressedWorker();var f=this._decompressWorker();return this._dataBinary||(f=f.pipe(new l.Utf8EncodeWorker)),v.createWorkerFrom(f,h,i)},_decompressWorker:function(){return this._data instanceof v?this._data.getContentWorker():this._data instanceof b?this._data:new n(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],w=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},s=0;s<y.length;s++)o.prototype[y[s]]=w;A.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(p,A,d){(function(o){var c,n,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var v=0,b=new l(h),y=o.document.createTextNode("");b.observe(y,{characterData:!0}),c=function(){y.data=v=++v%2}}else if(o.setImmediate||o.MessageChannel===void 0)c="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var i=o.document.createElement("script");i.onreadystatechange=function(){h(),i.onreadystatechange=null,i.parentNode.removeChild(i),i=null},o.document.documentElement.appendChild(i)}:function(){setTimeout(h,0)};else{var w=new o.MessageChannel;w.port1.onmessage=h,c=function(){w.port2.postMessage(0)}}var s=[];function h(){var i,f;n=!0;for(var a=s.length;a;){for(f=s,s=[],i=-1;++i<a;)f[i]();a=s.length}n=!1}A.exports=function(i){s.push(i)!==1||n||c()}}).call(this,typeof xt<"u"?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(p,A,d){var o=p("immediate");function c(){}var n={},l=["REJECTED"],v=["FULFILLED"],b=["PENDING"];function y(a){if(typeof a!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,a!==c&&i(this,a)}function w(a,m,k){this.promise=a,typeof m=="function"&&(this.onFulfilled=m,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function s(a,m,k){o(function(){var S;try{S=m(k)}catch(E){return n.reject(a,E)}S===a?n.reject(a,new TypeError("Cannot resolve promise with itself")):n.resolve(a,S)})}function h(a){var m=a&&a.then;if(a&&(typeof a=="object"||typeof a=="function")&&typeof m=="function")return function(){m.apply(a,arguments)}}function i(a,m){var k=!1;function S(D){k||(k=!0,n.reject(a,D))}function E(D){k||(k=!0,n.resolve(a,D))}var P=f(function(){m(E,S)});P.status==="error"&&S(P.value)}function f(a,m){var k={};try{k.value=a(m),k.status="success"}catch(S){k.status="error",k.value=S}return k}(A.exports=y).prototype.finally=function(a){if(typeof a!="function")return this;var m=this.constructor;return this.then(function(k){return m.resolve(a()).then(function(){return k})},function(k){return m.resolve(a()).then(function(){throw k})})},y.prototype.catch=function(a){return this.then(null,a)},y.prototype.then=function(a,m){if(typeof a!="function"&&this.state===v||typeof m!="function"&&this.state===l)return this;var k=new this.constructor(c);return this.state!==b?s(k,this.state===v?a:m,this.outcome):this.queue.push(new w(k,a,m)),k},w.prototype.callFulfilled=function(a){n.resolve(this.promise,a)},w.prototype.otherCallFulfilled=function(a){s(this.promise,this.onFulfilled,a)},w.prototype.callRejected=function(a){n.reject(this.promise,a)},w.prototype.otherCallRejected=function(a){s(this.promise,this.onRejected,a)},n.resolve=function(a,m){var k=f(h,m);if(k.status==="error")return n.reject(a,k.value);var S=k.value;if(S)i(a,S);else{a.state=v,a.outcome=m;for(var E=-1,P=a.queue.length;++E<P;)a.queue[E].callFulfilled(m)}return a},n.reject=function(a,m){a.state=l,a.outcome=m;for(var k=-1,S=a.queue.length;++k<S;)a.queue[k].callRejected(m);return a},y.resolve=function(a){return a instanceof this?a:n.resolve(new this(c),a)},y.reject=function(a){var m=new this(c);return n.reject(m,a)},y.all=function(a){var m=this;if(Object.prototype.toString.call(a)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=a.length,S=!1;if(!k)return this.resolve([]);for(var E=new Array(k),P=0,D=-1,W=new this(c);++D<k;)z(a[D],D);return W;function z(I,Y){m.resolve(I).then(function(g){E[Y]=g,++P!==k||S||(S=!0,n.resolve(W,E))},function(g){S||(S=!0,n.reject(W,g))})}},y.race=function(a){var m=this;if(Object.prototype.toString.call(a)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=a.length,S=!1;if(!k)return this.resolve([]);for(var E=-1,P=new this(c);++E<k;)D=a[E],m.resolve(D).then(function(W){S||(S=!0,n.resolve(P,W))},function(W){S||(S=!0,n.reject(P,W))});var D;return P}},{immediate:36}],38:[function(p,A,d){var o={};(0,p("./lib/utils/common").assign)(o,p("./lib/deflate"),p("./lib/inflate"),p("./lib/zlib/constants")),A.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(p,A,d){var o=p("./zlib/deflate"),c=p("./utils/common"),n=p("./utils/strings"),l=p("./zlib/messages"),v=p("./zlib/zstream"),b=Object.prototype.toString,y=0,w=-1,s=0,h=8;function i(a){if(!(this instanceof i))return new i(a);this.options=c.assign({level:w,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:s,to:""},a||{});var m=this.options;m.raw&&0<m.windowBits?m.windowBits=-m.windowBits:m.gzip&&0<m.windowBits&&m.windowBits<16&&(m.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var k=o.deflateInit2(this.strm,m.level,m.method,m.windowBits,m.memLevel,m.strategy);if(k!==y)throw new Error(l[k]);if(m.header&&o.deflateSetHeader(this.strm,m.header),m.dictionary){var S;if(S=typeof m.dictionary=="string"?n.string2buf(m.dictionary):b.call(m.dictionary)==="[object ArrayBuffer]"?new Uint8Array(m.dictionary):m.dictionary,(k=o.deflateSetDictionary(this.strm,S))!==y)throw new Error(l[k]);this._dict_set=!0}}function f(a,m){var k=new i(m);if(k.push(a,!0),k.err)throw k.msg||l[k.err];return k.result}i.prototype.push=function(a,m){var k,S,E=this.strm,P=this.options.chunkSize;if(this.ended)return!1;S=m===~~m?m:m===!0?4:0,typeof a=="string"?E.input=n.string2buf(a):b.call(a)==="[object ArrayBuffer]"?E.input=new Uint8Array(a):E.input=a,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new c.Buf8(P),E.next_out=0,E.avail_out=P),(k=o.deflate(E,S))!==1&&k!==y)return this.onEnd(k),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(c.shrinkBuf(E.output,E.next_out))):this.onData(c.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&k!==1);return S===4?(k=o.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===y):S!==2||(this.onEnd(y),!(E.avail_out=0))},i.prototype.onData=function(a){this.chunks.push(a)},i.prototype.onEnd=function(a){a===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},d.Deflate=i,d.deflate=f,d.deflateRaw=function(a,m){return(m=m||{}).raw=!0,f(a,m)},d.gzip=function(a,m){return(m=m||{}).gzip=!0,f(a,m)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(p,A,d){var o=p("./zlib/inflate"),c=p("./utils/common"),n=p("./utils/strings"),l=p("./zlib/constants"),v=p("./zlib/messages"),b=p("./zlib/zstream"),y=p("./zlib/gzheader"),w=Object.prototype.toString;function s(i){if(!(this instanceof s))return new s(i);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},i||{});var f=this.options;f.raw&&0<=f.windowBits&&f.windowBits<16&&(f.windowBits=-f.windowBits,f.windowBits===0&&(f.windowBits=-15)),!(0<=f.windowBits&&f.windowBits<16)||i&&i.windowBits||(f.windowBits+=32),15<f.windowBits&&f.windowBits<48&&!(15&f.windowBits)&&(f.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var a=o.inflateInit2(this.strm,f.windowBits);if(a!==l.Z_OK)throw new Error(v[a]);this.header=new y,o.inflateGetHeader(this.strm,this.header)}function h(i,f){var a=new s(f);if(a.push(i,!0),a.err)throw a.msg||v[a.err];return a.result}s.prototype.push=function(i,f){var a,m,k,S,E,P,D=this.strm,W=this.options.chunkSize,z=this.options.dictionary,I=!1;if(this.ended)return!1;m=f===~~f?f:f===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof i=="string"?D.input=n.binstring2buf(i):w.call(i)==="[object ArrayBuffer]"?D.input=new Uint8Array(i):D.input=i,D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0&&(D.output=new c.Buf8(W),D.next_out=0,D.avail_out=W),(a=o.inflate(D,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&z&&(P=typeof z=="string"?n.string2buf(z):w.call(z)==="[object ArrayBuffer]"?new Uint8Array(z):z,a=o.inflateSetDictionary(this.strm,P)),a===l.Z_BUF_ERROR&&I===!0&&(a=l.Z_OK,I=!1),a!==l.Z_STREAM_END&&a!==l.Z_OK)return this.onEnd(a),!(this.ended=!0);D.next_out&&(D.avail_out!==0&&a!==l.Z_STREAM_END&&(D.avail_in!==0||m!==l.Z_FINISH&&m!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=n.utf8border(D.output,D.next_out),S=D.next_out-k,E=n.buf2string(D.output,k),D.next_out=S,D.avail_out=W-S,S&&c.arraySet(D.output,D.output,k,S,0),this.onData(E)):this.onData(c.shrinkBuf(D.output,D.next_out)))),D.avail_in===0&&D.avail_out===0&&(I=!0)}while((0<D.avail_in||D.avail_out===0)&&a!==l.Z_STREAM_END);return a===l.Z_STREAM_END&&(m=l.Z_FINISH),m===l.Z_FINISH?(a=o.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===l.Z_OK):m!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(D.avail_out=0))},s.prototype.onData=function(i){this.chunks.push(i)},s.prototype.onEnd=function(i){i===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg},d.Inflate=s,d.inflate=h,d.inflateRaw=function(i,f){return(f=f||{}).raw=!0,h(i,f)},d.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(p,A,d){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(l){for(var v=Array.prototype.slice.call(arguments,1);v.length;){var b=v.shift();if(b){if(typeof b!="object")throw new TypeError(b+"must be non-object");for(var y in b)b.hasOwnProperty(y)&&(l[y]=b[y])}}return l},d.shrinkBuf=function(l,v){return l.length===v?l:l.subarray?l.subarray(0,v):(l.length=v,l)};var c={arraySet:function(l,v,b,y,w){if(v.subarray&&l.subarray)l.set(v.subarray(b,b+y),w);else for(var s=0;s<y;s++)l[w+s]=v[b+s]},flattenChunks:function(l){var v,b,y,w,s,h;for(v=y=0,b=l.length;v<b;v++)y+=l[v].length;for(h=new Uint8Array(y),v=w=0,b=l.length;v<b;v++)s=l[v],h.set(s,w),w+=s.length;return h}},n={arraySet:function(l,v,b,y,w){for(var s=0;s<y;s++)l[w+s]=v[b+s]},flattenChunks:function(l){return[].concat.apply([],l)}};d.setTyped=function(l){l?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,c)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,n))},d.setTyped(o)},{}],42:[function(p,A,d){var o=p("./common"),c=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new o.Buf8(256),v=0;v<256;v++)l[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;function b(y,w){if(w<65537&&(y.subarray&&n||!y.subarray&&c))return String.fromCharCode.apply(null,o.shrinkBuf(y,w));for(var s="",h=0;h<w;h++)s+=String.fromCharCode(y[h]);return s}l[254]=l[254]=1,d.string2buf=function(y){var w,s,h,i,f,a=y.length,m=0;for(i=0;i<a;i++)(64512&(s=y.charCodeAt(i)))==55296&&i+1<a&&(64512&(h=y.charCodeAt(i+1)))==56320&&(s=65536+(s-55296<<10)+(h-56320),i++),m+=s<128?1:s<2048?2:s<65536?3:4;for(w=new o.Buf8(m),i=f=0;f<m;i++)(64512&(s=y.charCodeAt(i)))==55296&&i+1<a&&(64512&(h=y.charCodeAt(i+1)))==56320&&(s=65536+(s-55296<<10)+(h-56320),i++),s<128?w[f++]=s:(s<2048?w[f++]=192|s>>>6:(s<65536?w[f++]=224|s>>>12:(w[f++]=240|s>>>18,w[f++]=128|s>>>12&63),w[f++]=128|s>>>6&63),w[f++]=128|63&s);return w},d.buf2binstring=function(y){return b(y,y.length)},d.binstring2buf=function(y){for(var w=new o.Buf8(y.length),s=0,h=w.length;s<h;s++)w[s]=y.charCodeAt(s);return w},d.buf2string=function(y,w){var s,h,i,f,a=w||y.length,m=new Array(2*a);for(s=h=0;s<a;)if((i=y[s++])<128)m[h++]=i;else if(4<(f=l[i]))m[h++]=65533,s+=f-1;else{for(i&=f===2?31:f===3?15:7;1<f&&s<a;)i=i<<6|63&y[s++],f--;1<f?m[h++]=65533:i<65536?m[h++]=i:(i-=65536,m[h++]=55296|i>>10&1023,m[h++]=56320|1023&i)}return b(m,h)},d.utf8border=function(y,w){var s;for((w=w||y.length)>y.length&&(w=y.length),s=w-1;0<=s&&(192&y[s])==128;)s--;return s<0||s===0?w:s+l[y[s]]>w?s:w}},{"./common":41}],43:[function(p,A,d){A.exports=function(o,c,n,l){for(var v=65535&o|0,b=o>>>16&65535|0,y=0;n!==0;){for(n-=y=2e3<n?2e3:n;b=b+(v=v+c[l++]|0)|0,--y;);v%=65521,b%=65521}return v|b<<16|0}},{}],44:[function(p,A,d){A.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(p,A,d){var o=function(){for(var c,n=[],l=0;l<256;l++){c=l;for(var v=0;v<8;v++)c=1&c?3988292384^c>>>1:c>>>1;n[l]=c}return n}();A.exports=function(c,n,l,v){var b=o,y=v+l;c^=-1;for(var w=v;w<y;w++)c=c>>>8^b[255&(c^n[w])];return-1^c}},{}],46:[function(p,A,d){var o,c=p("../utils/common"),n=p("./trees"),l=p("./adler32"),v=p("./crc32"),b=p("./messages"),y=0,w=4,s=0,h=-2,i=-1,f=4,a=2,m=8,k=9,S=286,E=30,P=19,D=2*S+1,W=15,z=3,I=258,Y=I+z+1,g=42,O=113,r=1,N=2,q=3,R=4;function tt(e,L){return e.msg=b[L],L}function Z(e){return(e<<1)-(4<e?9:0)}function $(e){for(var L=e.length;0<=--L;)e[L]=0}function B(e){var L=e.state,F=L.pending;F>e.avail_out&&(F=e.avail_out),F!==0&&(c.arraySet(e.output,L.pending_buf,L.pending_out,F,e.next_out),e.next_out+=F,L.pending_out+=F,e.total_out+=F,e.avail_out-=F,L.pending-=F,L.pending===0&&(L.pending_out=0))}function T(e,L){n._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,L),e.block_start=e.strstart,B(e.strm)}function V(e,L){e.pending_buf[e.pending++]=L}function M(e,L){e.pending_buf[e.pending++]=L>>>8&255,e.pending_buf[e.pending++]=255&L}function G(e,L){var F,_,u=e.max_chain_length,x=e.strstart,U=e.prev_length,j=e.nice_match,C=e.strstart>e.w_size-Y?e.strstart-(e.w_size-Y):0,H=e.window,J=e.w_mask,X=e.prev,et=e.strstart+I,ft=H[x+U-1],st=H[x+U];e.prev_length>=e.good_match&&(u>>=2),j>e.lookahead&&(j=e.lookahead);do if(H[(F=L)+U]===st&&H[F+U-1]===ft&&H[F]===H[x]&&H[++F]===H[x+1]){x+=2,F++;do;while(H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&H[++x]===H[++F]&&x<et);if(_=I-(et-x),x=et-I,U<_){if(e.match_start=L,j<=(U=_))break;ft=H[x+U-1],st=H[x+U]}}while((L=X[L&J])>C&&--u!=0);return U<=e.lookahead?U:e.lookahead}function at(e){var L,F,_,u,x,U,j,C,H,J,X=e.w_size;do{if(u=e.window_size-e.lookahead-e.strstart,e.strstart>=X+(X-Y)){for(c.arraySet(e.window,e.window,X,X,0),e.match_start-=X,e.strstart-=X,e.block_start-=X,L=F=e.hash_size;_=e.head[--L],e.head[L]=X<=_?_-X:0,--F;);for(L=F=X;_=e.prev[--L],e.prev[L]=X<=_?_-X:0,--F;);u+=X}if(e.strm.avail_in===0)break;if(U=e.strm,j=e.window,C=e.strstart+e.lookahead,H=u,J=void 0,J=U.avail_in,H<J&&(J=H),F=J===0?0:(U.avail_in-=J,c.arraySet(j,U.input,U.next_in,J,C),U.state.wrap===1?U.adler=l(U.adler,j,J,C):U.state.wrap===2&&(U.adler=v(U.adler,j,J,C)),U.next_in+=J,U.total_in+=J,J),e.lookahead+=F,e.lookahead+e.insert>=z)for(x=e.strstart-e.insert,e.ins_h=e.window[x],e.ins_h=(e.ins_h<<e.hash_shift^e.window[x+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[x+z-1])&e.hash_mask,e.prev[x&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=x,x++,e.insert--,!(e.lookahead+e.insert<z)););}while(e.lookahead<Y&&e.strm.avail_in!==0)}function ot(e,L){for(var F,_;;){if(e.lookahead<Y){if(at(e),e.lookahead<Y&&L===y)return r;if(e.lookahead===0)break}if(F=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),F!==0&&e.strstart-F<=e.w_size-Y&&(e.match_length=G(e,F)),e.match_length>=z)if(_=n._tr_tally(e,e.strstart-e.match_start,e.match_length-z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=z){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else _=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(_&&(T(e,!1),e.strm.avail_out===0))return r}return e.insert=e.strstart<z-1?e.strstart:z-1,L===w?(T(e,!0),e.strm.avail_out===0?q:R):e.last_lit&&(T(e,!1),e.strm.avail_out===0)?r:N}function rt(e,L){for(var F,_,u;;){if(e.lookahead<Y){if(at(e),e.lookahead<Y&&L===y)return r;if(e.lookahead===0)break}if(F=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=z-1,F!==0&&e.prev_length<e.max_lazy_match&&e.strstart-F<=e.w_size-Y&&(e.match_length=G(e,F),e.match_length<=5&&(e.strategy===1||e.match_length===z&&4096<e.strstart-e.match_start)&&(e.match_length=z-1)),e.prev_length>=z&&e.match_length<=e.prev_length){for(u=e.strstart+e.lookahead-z,_=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-z),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=u&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=z-1,e.strstart++,_&&(T(e,!1),e.strm.avail_out===0))return r}else if(e.match_available){if((_=n._tr_tally(e,0,e.window[e.strstart-1]))&&T(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return r}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(_=n._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<z-1?e.strstart:z-1,L===w?(T(e,!0),e.strm.avail_out===0?q:R):e.last_lit&&(T(e,!1),e.strm.avail_out===0)?r:N}function it(e,L,F,_,u){this.good_length=e,this.max_lazy=L,this.nice_length=F,this.max_chain=_,this.func=u}function ct(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*D),this.dyn_dtree=new c.Buf16(2*(2*E+1)),this.bl_tree=new c.Buf16(2*(2*P+1)),$(this.dyn_ltree),$(this.dyn_dtree),$(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(W+1),this.heap=new c.Buf16(2*S+1),$(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*S+1),$(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function lt(e){var L;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=a,(L=e.state).pending=0,L.pending_out=0,L.wrap<0&&(L.wrap=-L.wrap),L.status=L.wrap?g:O,e.adler=L.wrap===2?0:1,L.last_flush=y,n._tr_init(L),s):tt(e,h)}function dt(e){var L=lt(e);return L===s&&function(F){F.window_size=2*F.w_size,$(F.head),F.max_lazy_match=o[F.level].max_lazy,F.good_match=o[F.level].good_length,F.nice_match=o[F.level].nice_length,F.max_chain_length=o[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=z-1,F.match_available=0,F.ins_h=0}(e.state),L}function ut(e,L,F,_,u,x){if(!e)return h;var U=1;if(L===i&&(L=6),_<0?(U=0,_=-_):15<_&&(U=2,_-=16),u<1||k<u||F!==m||_<8||15<_||L<0||9<L||x<0||f<x)return tt(e,h);_===8&&(_=9);var j=new ct;return(e.state=j).strm=e,j.wrap=U,j.gzhead=null,j.w_bits=_,j.w_size=1<<j.w_bits,j.w_mask=j.w_size-1,j.hash_bits=u+7,j.hash_size=1<<j.hash_bits,j.hash_mask=j.hash_size-1,j.hash_shift=~~((j.hash_bits+z-1)/z),j.window=new c.Buf8(2*j.w_size),j.head=new c.Buf16(j.hash_size),j.prev=new c.Buf16(j.w_size),j.lit_bufsize=1<<u+6,j.pending_buf_size=4*j.lit_bufsize,j.pending_buf=new c.Buf8(j.pending_buf_size),j.d_buf=1*j.lit_bufsize,j.l_buf=3*j.lit_bufsize,j.level=L,j.strategy=x,j.method=F,dt(e)}o=[new it(0,0,0,0,function(e,L){var F=65535;for(F>e.pending_buf_size-5&&(F=e.pending_buf_size-5);;){if(e.lookahead<=1){if(at(e),e.lookahead===0&&L===y)return r;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var _=e.block_start+F;if((e.strstart===0||e.strstart>=_)&&(e.lookahead=e.strstart-_,e.strstart=_,T(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Y&&(T(e,!1),e.strm.avail_out===0))return r}return e.insert=0,L===w?(T(e,!0),e.strm.avail_out===0?q:R):(e.strstart>e.block_start&&(T(e,!1),e.strm.avail_out),r)}),new it(4,4,8,4,ot),new it(4,5,16,8,ot),new it(4,6,32,32,ot),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)],d.deflateInit=function(e,L){return ut(e,L,m,15,8,0)},d.deflateInit2=ut,d.deflateReset=dt,d.deflateResetKeep=lt,d.deflateSetHeader=function(e,L){return e&&e.state?e.state.wrap!==2?h:(e.state.gzhead=L,s):h},d.deflate=function(e,L){var F,_,u,x;if(!e||!e.state||5<L||L<0)return e?tt(e,h):h;if(_=e.state,!e.output||!e.input&&e.avail_in!==0||_.status===666&&L!==w)return tt(e,e.avail_out===0?-5:h);if(_.strm=e,F=_.last_flush,_.last_flush=L,_.status===g)if(_.wrap===2)e.adler=0,V(_,31),V(_,139),V(_,8),_.gzhead?(V(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),V(_,255&_.gzhead.time),V(_,_.gzhead.time>>8&255),V(_,_.gzhead.time>>16&255),V(_,_.gzhead.time>>24&255),V(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),V(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(V(_,255&_.gzhead.extra.length),V(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(e.adler=v(e.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(V(_,0),V(_,0),V(_,0),V(_,0),V(_,0),V(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),V(_,3),_.status=O);else{var U=m+(_.w_bits-8<<4)<<8;U|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(U|=32),U+=31-U%31,_.status=O,M(_,U),_.strstart!==0&&(M(_,e.adler>>>16),M(_,65535&e.adler)),e.adler=1}if(_.status===69)if(_.gzhead.extra){for(u=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),B(e),u=_.pending,_.pending!==_.pending_buf_size));)V(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){u=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),B(e),u=_.pending,_.pending===_.pending_buf_size)){x=1;break}x=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,V(_,x)}while(x!==0);_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),x===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){u=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),B(e),u=_.pending,_.pending===_.pending_buf_size)){x=1;break}x=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,V(_,x)}while(x!==0);_.gzhead.hcrc&&_.pending>u&&(e.adler=v(e.adler,_.pending_buf,_.pending-u,u)),x===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&B(e),_.pending+2<=_.pending_buf_size&&(V(_,255&e.adler),V(_,e.adler>>8&255),e.adler=0,_.status=O)):_.status=O),_.pending!==0){if(B(e),e.avail_out===0)return _.last_flush=-1,s}else if(e.avail_in===0&&Z(L)<=Z(F)&&L!==w)return tt(e,-5);if(_.status===666&&e.avail_in!==0)return tt(e,-5);if(e.avail_in!==0||_.lookahead!==0||L!==y&&_.status!==666){var j=_.strategy===2?function(C,H){for(var J;;){if(C.lookahead===0&&(at(C),C.lookahead===0)){if(H===y)return r;break}if(C.match_length=0,J=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,J&&(T(C,!1),C.strm.avail_out===0))return r}return C.insert=0,H===w?(T(C,!0),C.strm.avail_out===0?q:R):C.last_lit&&(T(C,!1),C.strm.avail_out===0)?r:N}(_,L):_.strategy===3?function(C,H){for(var J,X,et,ft,st=C.window;;){if(C.lookahead<=I){if(at(C),C.lookahead<=I&&H===y)return r;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=z&&0<C.strstart&&(X=st[et=C.strstart-1])===st[++et]&&X===st[++et]&&X===st[++et]){ft=C.strstart+I;do;while(X===st[++et]&&X===st[++et]&&X===st[++et]&&X===st[++et]&&X===st[++et]&&X===st[++et]&&X===st[++et]&&X===st[++et]&&et<ft);C.match_length=I-(ft-et),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=z?(J=n._tr_tally(C,1,C.match_length-z),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(J=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),J&&(T(C,!1),C.strm.avail_out===0))return r}return C.insert=0,H===w?(T(C,!0),C.strm.avail_out===0?q:R):C.last_lit&&(T(C,!1),C.strm.avail_out===0)?r:N}(_,L):o[_.level].func(_,L);if(j!==q&&j!==R||(_.status=666),j===r||j===q)return e.avail_out===0&&(_.last_flush=-1),s;if(j===N&&(L===1?n._tr_align(_):L!==5&&(n._tr_stored_block(_,0,0,!1),L===3&&($(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),B(e),e.avail_out===0))return _.last_flush=-1,s}return L!==w?s:_.wrap<=0?1:(_.wrap===2?(V(_,255&e.adler),V(_,e.adler>>8&255),V(_,e.adler>>16&255),V(_,e.adler>>24&255),V(_,255&e.total_in),V(_,e.total_in>>8&255),V(_,e.total_in>>16&255),V(_,e.total_in>>24&255)):(M(_,e.adler>>>16),M(_,65535&e.adler)),B(e),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?s:1)},d.deflateEnd=function(e){var L;return e&&e.state?(L=e.state.status)!==g&&L!==69&&L!==73&&L!==91&&L!==103&&L!==O&&L!==666?tt(e,h):(e.state=null,L===O?tt(e,-3):s):h},d.deflateSetDictionary=function(e,L){var F,_,u,x,U,j,C,H,J=L.length;if(!e||!e.state||(x=(F=e.state).wrap)===2||x===1&&F.status!==g||F.lookahead)return h;for(x===1&&(e.adler=l(e.adler,L,J,0)),F.wrap=0,J>=F.w_size&&(x===0&&($(F.head),F.strstart=0,F.block_start=0,F.insert=0),H=new c.Buf8(F.w_size),c.arraySet(H,L,J-F.w_size,F.w_size,0),L=H,J=F.w_size),U=e.avail_in,j=e.next_in,C=e.input,e.avail_in=J,e.next_in=0,e.input=L,at(F);F.lookahead>=z;){for(_=F.strstart,u=F.lookahead-(z-1);F.ins_h=(F.ins_h<<F.hash_shift^F.window[_+z-1])&F.hash_mask,F.prev[_&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=_,_++,--u;);F.strstart=_,F.lookahead=z-1,at(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=z-1,F.match_available=0,e.next_in=j,e.input=C,e.avail_in=U,F.wrap=x,s},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(p,A,d){A.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(p,A,d){A.exports=function(o,c){var n,l,v,b,y,w,s,h,i,f,a,m,k,S,E,P,D,W,z,I,Y,g,O,r,N;n=o.state,l=o.next_in,r=o.input,v=l+(o.avail_in-5),b=o.next_out,N=o.output,y=b-(c-o.avail_out),w=b+(o.avail_out-257),s=n.dmax,h=n.wsize,i=n.whave,f=n.wnext,a=n.window,m=n.hold,k=n.bits,S=n.lencode,E=n.distcode,P=(1<<n.lenbits)-1,D=(1<<n.distbits)-1;t:do{k<15&&(m+=r[l++]<<k,k+=8,m+=r[l++]<<k,k+=8),W=S[m&P];e:for(;;){if(m>>>=z=W>>>24,k-=z,(z=W>>>16&255)===0)N[b++]=65535&W;else{if(!(16&z)){if(!(64&z)){W=S[(65535&W)+(m&(1<<z)-1)];continue e}if(32&z){n.mode=12;break t}o.msg="invalid literal/length code",n.mode=30;break t}I=65535&W,(z&=15)&&(k<z&&(m+=r[l++]<<k,k+=8),I+=m&(1<<z)-1,m>>>=z,k-=z),k<15&&(m+=r[l++]<<k,k+=8,m+=r[l++]<<k,k+=8),W=E[m&D];r:for(;;){if(m>>>=z=W>>>24,k-=z,!(16&(z=W>>>16&255))){if(!(64&z)){W=E[(65535&W)+(m&(1<<z)-1)];continue r}o.msg="invalid distance code",n.mode=30;break t}if(Y=65535&W,k<(z&=15)&&(m+=r[l++]<<k,(k+=8)<z&&(m+=r[l++]<<k,k+=8)),s<(Y+=m&(1<<z)-1)){o.msg="invalid distance too far back",n.mode=30;break t}if(m>>>=z,k-=z,(z=b-y)<Y){if(i<(z=Y-z)&&n.sane){o.msg="invalid distance too far back",n.mode=30;break t}if(O=a,(g=0)===f){if(g+=h-z,z<I){for(I-=z;N[b++]=a[g++],--z;);g=b-Y,O=N}}else if(f<z){if(g+=h+f-z,(z-=f)<I){for(I-=z;N[b++]=a[g++],--z;);if(g=0,f<I){for(I-=z=f;N[b++]=a[g++],--z;);g=b-Y,O=N}}}else if(g+=f-z,z<I){for(I-=z;N[b++]=a[g++],--z;);g=b-Y,O=N}for(;2<I;)N[b++]=O[g++],N[b++]=O[g++],N[b++]=O[g++],I-=3;I&&(N[b++]=O[g++],1<I&&(N[b++]=O[g++]))}else{for(g=b-Y;N[b++]=N[g++],N[b++]=N[g++],N[b++]=N[g++],2<(I-=3););I&&(N[b++]=N[g++],1<I&&(N[b++]=N[g++]))}break}}break}}while(l<v&&b<w);l-=I=k>>3,m&=(1<<(k-=I<<3))-1,o.next_in=l,o.next_out=b,o.avail_in=l<v?v-l+5:5-(l-v),o.avail_out=b<w?w-b+257:257-(b-w),n.hold=m,n.bits=k}},{}],49:[function(p,A,d){var o=p("../utils/common"),c=p("./adler32"),n=p("./crc32"),l=p("./inffast"),v=p("./inftrees"),b=1,y=2,w=0,s=-2,h=1,i=852,f=592;function a(g){return(g>>>24&255)+(g>>>8&65280)+((65280&g)<<8)+((255&g)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(g){var O;return g&&g.state?(O=g.state,g.total_in=g.total_out=O.total=0,g.msg="",O.wrap&&(g.adler=1&O.wrap),O.mode=h,O.last=0,O.havedict=0,O.dmax=32768,O.head=null,O.hold=0,O.bits=0,O.lencode=O.lendyn=new o.Buf32(i),O.distcode=O.distdyn=new o.Buf32(f),O.sane=1,O.back=-1,w):s}function S(g){var O;return g&&g.state?((O=g.state).wsize=0,O.whave=0,O.wnext=0,k(g)):s}function E(g,O){var r,N;return g&&g.state?(N=g.state,O<0?(r=0,O=-O):(r=1+(O>>4),O<48&&(O&=15)),O&&(O<8||15<O)?s:(N.window!==null&&N.wbits!==O&&(N.window=null),N.wrap=r,N.wbits=O,S(g))):s}function P(g,O){var r,N;return g?(N=new m,(g.state=N).window=null,(r=E(g,O))!==w&&(g.state=null),r):s}var D,W,z=!0;function I(g){if(z){var O;for(D=new o.Buf32(512),W=new o.Buf32(32),O=0;O<144;)g.lens[O++]=8;for(;O<256;)g.lens[O++]=9;for(;O<280;)g.lens[O++]=7;for(;O<288;)g.lens[O++]=8;for(v(b,g.lens,0,288,D,0,g.work,{bits:9}),O=0;O<32;)g.lens[O++]=5;v(y,g.lens,0,32,W,0,g.work,{bits:5}),z=!1}g.lencode=D,g.lenbits=9,g.distcode=W,g.distbits=5}function Y(g,O,r,N){var q,R=g.state;return R.window===null&&(R.wsize=1<<R.wbits,R.wnext=0,R.whave=0,R.window=new o.Buf8(R.wsize)),N>=R.wsize?(o.arraySet(R.window,O,r-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(N<(q=R.wsize-R.wnext)&&(q=N),o.arraySet(R.window,O,r-N,q,R.wnext),(N-=q)?(o.arraySet(R.window,O,r-N,N,0),R.wnext=N,R.whave=R.wsize):(R.wnext+=q,R.wnext===R.wsize&&(R.wnext=0),R.whave<R.wsize&&(R.whave+=q))),0}d.inflateReset=S,d.inflateReset2=E,d.inflateResetKeep=k,d.inflateInit=function(g){return P(g,15)},d.inflateInit2=P,d.inflate=function(g,O){var r,N,q,R,tt,Z,$,B,T,V,M,G,at,ot,rt,it,ct,lt,dt,ut,e,L,F,_,u=0,x=new o.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!g||!g.state||!g.output||!g.input&&g.avail_in!==0)return s;(r=g.state).mode===12&&(r.mode=13),tt=g.next_out,q=g.output,$=g.avail_out,R=g.next_in,N=g.input,Z=g.avail_in,B=r.hold,T=r.bits,V=Z,M=$,L=w;t:for(;;)switch(r.mode){case h:if(r.wrap===0){r.mode=13;break}for(;T<16;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(2&r.wrap&&B===35615){x[r.check=0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0),T=B=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&B)<<8)+(B>>8))%31){g.msg="incorrect header check",r.mode=30;break}if((15&B)!=8){g.msg="unknown compression method",r.mode=30;break}if(T-=4,e=8+(15&(B>>>=4)),r.wbits===0)r.wbits=e;else if(e>r.wbits){g.msg="invalid window size",r.mode=30;break}r.dmax=1<<e,g.adler=r.check=1,r.mode=512&B?10:12,T=B=0;break;case 2:for(;T<16;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(r.flags=B,(255&r.flags)!=8){g.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){g.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=B>>8&1),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),T=B=0,r.mode=3;case 3:for(;T<32;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.head&&(r.head.time=B),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,x[2]=B>>>16&255,x[3]=B>>>24&255,r.check=n(r.check,x,4,0)),T=B=0,r.mode=4;case 4:for(;T<16;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.head&&(r.head.xflags=255&B,r.head.os=B>>8),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),T=B=0,r.mode=5;case 5:if(1024&r.flags){for(;T<16;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.length=B,r.head&&(r.head.extra_len=B),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),T=B=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(Z<(G=r.length)&&(G=Z),G&&(r.head&&(e=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),o.arraySet(r.head.extra,N,R,G,e)),512&r.flags&&(r.check=n(r.check,N,G,R)),Z-=G,R+=G,r.length-=G),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(Z===0)break t;for(G=0;e=N[R+G++],r.head&&e&&r.length<65536&&(r.head.name+=String.fromCharCode(e)),e&&G<Z;);if(512&r.flags&&(r.check=n(r.check,N,G,R)),Z-=G,R+=G,e)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(Z===0)break t;for(G=0;e=N[R+G++],r.head&&e&&r.length<65536&&(r.head.comment+=String.fromCharCode(e)),e&&G<Z;);if(512&r.flags&&(r.check=n(r.check,N,G,R)),Z-=G,R+=G,e)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;T<16;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(B!==(65535&r.check)){g.msg="header crc mismatch",r.mode=30;break}T=B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),g.adler=r.check=0,r.mode=12;break;case 10:for(;T<32;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}g.adler=r.check=a(B),T=B=0,r.mode=11;case 11:if(r.havedict===0)return g.next_out=tt,g.avail_out=$,g.next_in=R,g.avail_in=Z,r.hold=B,r.bits=T,2;g.adler=r.check=1,r.mode=12;case 12:if(O===5||O===6)break t;case 13:if(r.last){B>>>=7&T,T-=7&T,r.mode=27;break}for(;T<3;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}switch(r.last=1&B,T-=1,3&(B>>>=1)){case 0:r.mode=14;break;case 1:if(I(r),r.mode=20,O!==6)break;B>>>=2,T-=2;break t;case 2:r.mode=17;break;case 3:g.msg="invalid block type",r.mode=30}B>>>=2,T-=2;break;case 14:for(B>>>=7&T,T-=7&T;T<32;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if((65535&B)!=(B>>>16^65535)){g.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&B,T=B=0,r.mode=15,O===6)break t;case 15:r.mode=16;case 16:if(G=r.length){if(Z<G&&(G=Z),$<G&&(G=$),G===0)break t;o.arraySet(q,N,R,G,tt),Z-=G,R+=G,$-=G,tt+=G,r.length-=G;break}r.mode=12;break;case 17:for(;T<14;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(r.nlen=257+(31&B),B>>>=5,T-=5,r.ndist=1+(31&B),B>>>=5,T-=5,r.ncode=4+(15&B),B>>>=4,T-=4,286<r.nlen||30<r.ndist){g.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;T<3;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.lens[U[r.have++]]=7&B,B>>>=3,T-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},L=v(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,L){g.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;it=(u=r.lencode[B&(1<<r.lenbits)-1])>>>16&255,ct=65535&u,!((rt=u>>>24)<=T);){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(ct<16)B>>>=rt,T-=rt,r.lens[r.have++]=ct;else{if(ct===16){for(_=rt+2;T<_;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(B>>>=rt,T-=rt,r.have===0){g.msg="invalid bit length repeat",r.mode=30;break}e=r.lens[r.have-1],G=3+(3&B),B>>>=2,T-=2}else if(ct===17){for(_=rt+3;T<_;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}T-=rt,e=0,G=3+(7&(B>>>=rt)),B>>>=3,T-=3}else{for(_=rt+7;T<_;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}T-=rt,e=0,G=11+(127&(B>>>=rt)),B>>>=7,T-=7}if(r.have+G>r.nlen+r.ndist){g.msg="invalid bit length repeat",r.mode=30;break}for(;G--;)r.lens[r.have++]=e}}if(r.mode===30)break;if(r.lens[256]===0){g.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,F={bits:r.lenbits},L=v(b,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,L){g.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},L=v(y,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,L){g.msg="invalid distances set",r.mode=30;break}if(r.mode=20,O===6)break t;case 20:r.mode=21;case 21:if(6<=Z&&258<=$){g.next_out=tt,g.avail_out=$,g.next_in=R,g.avail_in=Z,r.hold=B,r.bits=T,l(g,M),tt=g.next_out,q=g.output,$=g.avail_out,R=g.next_in,N=g.input,Z=g.avail_in,B=r.hold,T=r.bits,r.mode===12&&(r.back=-1);break}for(r.back=0;it=(u=r.lencode[B&(1<<r.lenbits)-1])>>>16&255,ct=65535&u,!((rt=u>>>24)<=T);){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(it&&!(240&it)){for(lt=rt,dt=it,ut=ct;it=(u=r.lencode[ut+((B&(1<<lt+dt)-1)>>lt)])>>>16&255,ct=65535&u,!(lt+(rt=u>>>24)<=T);){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}B>>>=lt,T-=lt,r.back+=lt}if(B>>>=rt,T-=rt,r.back+=rt,r.length=ct,it===0){r.mode=26;break}if(32&it){r.back=-1,r.mode=12;break}if(64&it){g.msg="invalid literal/length code",r.mode=30;break}r.extra=15&it,r.mode=22;case 22:if(r.extra){for(_=r.extra;T<_;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.length+=B&(1<<r.extra)-1,B>>>=r.extra,T-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;it=(u=r.distcode[B&(1<<r.distbits)-1])>>>16&255,ct=65535&u,!((rt=u>>>24)<=T);){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(!(240&it)){for(lt=rt,dt=it,ut=ct;it=(u=r.distcode[ut+((B&(1<<lt+dt)-1)>>lt)])>>>16&255,ct=65535&u,!(lt+(rt=u>>>24)<=T);){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}B>>>=lt,T-=lt,r.back+=lt}if(B>>>=rt,T-=rt,r.back+=rt,64&it){g.msg="invalid distance code",r.mode=30;break}r.offset=ct,r.extra=15&it,r.mode=24;case 24:if(r.extra){for(_=r.extra;T<_;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}r.offset+=B&(1<<r.extra)-1,B>>>=r.extra,T-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){g.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if($===0)break t;if(G=M-$,r.offset>G){if((G=r.offset-G)>r.whave&&r.sane){g.msg="invalid distance too far back",r.mode=30;break}at=G>r.wnext?(G-=r.wnext,r.wsize-G):r.wnext-G,G>r.length&&(G=r.length),ot=r.window}else ot=q,at=tt-r.offset,G=r.length;for($<G&&(G=$),$-=G,r.length-=G;q[tt++]=ot[at++],--G;);r.length===0&&(r.mode=21);break;case 26:if($===0)break t;q[tt++]=r.length,$--,r.mode=21;break;case 27:if(r.wrap){for(;T<32;){if(Z===0)break t;Z--,B|=N[R++]<<T,T+=8}if(M-=$,g.total_out+=M,r.total+=M,M&&(g.adler=r.check=r.flags?n(r.check,q,M,tt-M):c(r.check,q,M,tt-M)),M=$,(r.flags?B:a(B))!==r.check){g.msg="incorrect data check",r.mode=30;break}T=B=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;T<32;){if(Z===0)break t;Z--,B+=N[R++]<<T,T+=8}if(B!==(4294967295&r.total)){g.msg="incorrect length check",r.mode=30;break}T=B=0}r.mode=29;case 29:L=1;break t;case 30:L=-3;break t;case 31:return-4;case 32:default:return s}return g.next_out=tt,g.avail_out=$,g.next_in=R,g.avail_in=Z,r.hold=B,r.bits=T,(r.wsize||M!==g.avail_out&&r.mode<30&&(r.mode<27||O!==4))&&Y(g,g.output,g.next_out,M-g.avail_out)?(r.mode=31,-4):(V-=g.avail_in,M-=g.avail_out,g.total_in+=V,g.total_out+=M,r.total+=M,r.wrap&&M&&(g.adler=r.check=r.flags?n(r.check,q,M,g.next_out-M):c(r.check,q,M,g.next_out-M)),g.data_type=r.bits+(r.last?64:0)+(r.mode===12?128:0)+(r.mode===20||r.mode===15?256:0),(V==0&&M===0||O===4)&&L===w&&(L=-5),L)},d.inflateEnd=function(g){if(!g||!g.state)return s;var O=g.state;return O.window&&(O.window=null),g.state=null,w},d.inflateGetHeader=function(g,O){var r;return g&&g.state&&2&(r=g.state).wrap?((r.head=O).done=!1,w):s},d.inflateSetDictionary=function(g,O){var r,N=O.length;return g&&g.state?(r=g.state).wrap!==0&&r.mode!==11?s:r.mode===11&&c(1,O,N,0)!==r.check?-3:Y(g,O,N,N)?(r.mode=31,-4):(r.havedict=1,w):s},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(p,A,d){var o=p("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];A.exports=function(b,y,w,s,h,i,f,a){var m,k,S,E,P,D,W,z,I,Y=a.bits,g=0,O=0,r=0,N=0,q=0,R=0,tt=0,Z=0,$=0,B=0,T=null,V=0,M=new o.Buf16(16),G=new o.Buf16(16),at=null,ot=0;for(g=0;g<=15;g++)M[g]=0;for(O=0;O<s;O++)M[y[w+O]]++;for(q=Y,N=15;1<=N&&M[N]===0;N--);if(N<q&&(q=N),N===0)return h[i++]=20971520,h[i++]=20971520,a.bits=1,0;for(r=1;r<N&&M[r]===0;r++);for(q<r&&(q=r),g=Z=1;g<=15;g++)if(Z<<=1,(Z-=M[g])<0)return-1;if(0<Z&&(b===0||N!==1))return-1;for(G[1]=0,g=1;g<15;g++)G[g+1]=G[g]+M[g];for(O=0;O<s;O++)y[w+O]!==0&&(f[G[y[w+O]]++]=O);if(D=b===0?(T=at=f,19):b===1?(T=c,V-=257,at=n,ot-=257,256):(T=l,at=v,-1),g=r,P=i,tt=O=B=0,S=-1,E=($=1<<(R=q))-1,b===1&&852<$||b===2&&592<$)return 1;for(;;){for(W=g-tt,I=f[O]<D?(z=0,f[O]):f[O]>D?(z=at[ot+f[O]],T[V+f[O]]):(z=96,0),m=1<<g-tt,r=k=1<<R;h[P+(B>>tt)+(k-=m)]=W<<24|z<<16|I|0,k!==0;);for(m=1<<g-1;B&m;)m>>=1;if(m!==0?(B&=m-1,B+=m):B=0,O++,--M[g]==0){if(g===N)break;g=y[w+f[O]]}if(q<g&&(B&E)!==S){for(tt===0&&(tt=q),P+=r,Z=1<<(R=g-tt);R+tt<N&&!((Z-=M[R+tt])<=0);)R++,Z<<=1;if($+=1<<R,b===1&&852<$||b===2&&592<$)return 1;h[S=B&E]=q<<24|R<<16|P-i|0}}return B!==0&&(h[P+B]=g-tt<<24|64<<16|0),a.bits=q,0}},{"../utils/common":41}],51:[function(p,A,d){A.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(p,A,d){var o=p("../utils/common"),c=0,n=1;function l(u){for(var x=u.length;0<=--x;)u[x]=0}var v=0,b=29,y=256,w=y+1+b,s=30,h=19,i=2*w+1,f=15,a=16,m=7,k=256,S=16,E=17,P=18,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],W=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(w+2));l(Y);var g=new Array(2*s);l(g);var O=new Array(512);l(O);var r=new Array(256);l(r);var N=new Array(b);l(N);var q,R,tt,Z=new Array(s);function $(u,x,U,j,C){this.static_tree=u,this.extra_bits=x,this.extra_base=U,this.elems=j,this.max_length=C,this.has_stree=u&&u.length}function B(u,x){this.dyn_tree=u,this.max_code=0,this.stat_desc=x}function T(u){return u<256?O[u]:O[256+(u>>>7)]}function V(u,x){u.pending_buf[u.pending++]=255&x,u.pending_buf[u.pending++]=x>>>8&255}function M(u,x,U){u.bi_valid>a-U?(u.bi_buf|=x<<u.bi_valid&65535,V(u,u.bi_buf),u.bi_buf=x>>a-u.bi_valid,u.bi_valid+=U-a):(u.bi_buf|=x<<u.bi_valid&65535,u.bi_valid+=U)}function G(u,x,U){M(u,U[2*x],U[2*x+1])}function at(u,x){for(var U=0;U|=1&u,u>>>=1,U<<=1,0<--x;);return U>>>1}function ot(u,x,U){var j,C,H=new Array(f+1),J=0;for(j=1;j<=f;j++)H[j]=J=J+U[j-1]<<1;for(C=0;C<=x;C++){var X=u[2*C+1];X!==0&&(u[2*C]=at(H[X]++,X))}}function rt(u){var x;for(x=0;x<w;x++)u.dyn_ltree[2*x]=0;for(x=0;x<s;x++)u.dyn_dtree[2*x]=0;for(x=0;x<h;x++)u.bl_tree[2*x]=0;u.dyn_ltree[2*k]=1,u.opt_len=u.static_len=0,u.last_lit=u.matches=0}function it(u){8<u.bi_valid?V(u,u.bi_buf):0<u.bi_valid&&(u.pending_buf[u.pending++]=u.bi_buf),u.bi_buf=0,u.bi_valid=0}function ct(u,x,U,j){var C=2*x,H=2*U;return u[C]<u[H]||u[C]===u[H]&&j[x]<=j[U]}function lt(u,x,U){for(var j=u.heap[U],C=U<<1;C<=u.heap_len&&(C<u.heap_len&&ct(x,u.heap[C+1],u.heap[C],u.depth)&&C++,!ct(x,j,u.heap[C],u.depth));)u.heap[U]=u.heap[C],U=C,C<<=1;u.heap[U]=j}function dt(u,x,U){var j,C,H,J,X=0;if(u.last_lit!==0)for(;j=u.pending_buf[u.d_buf+2*X]<<8|u.pending_buf[u.d_buf+2*X+1],C=u.pending_buf[u.l_buf+X],X++,j===0?G(u,C,x):(G(u,(H=r[C])+y+1,x),(J=D[H])!==0&&M(u,C-=N[H],J),G(u,H=T(--j),U),(J=W[H])!==0&&M(u,j-=Z[H],J)),X<u.last_lit;);G(u,k,x)}function ut(u,x){var U,j,C,H=x.dyn_tree,J=x.stat_desc.static_tree,X=x.stat_desc.has_stree,et=x.stat_desc.elems,ft=-1;for(u.heap_len=0,u.heap_max=i,U=0;U<et;U++)H[2*U]!==0?(u.heap[++u.heap_len]=ft=U,u.depth[U]=0):H[2*U+1]=0;for(;u.heap_len<2;)H[2*(C=u.heap[++u.heap_len]=ft<2?++ft:0)]=1,u.depth[C]=0,u.opt_len--,X&&(u.static_len-=J[2*C+1]);for(x.max_code=ft,U=u.heap_len>>1;1<=U;U--)lt(u,H,U);for(C=et;U=u.heap[1],u.heap[1]=u.heap[u.heap_len--],lt(u,H,1),j=u.heap[1],u.heap[--u.heap_max]=U,u.heap[--u.heap_max]=j,H[2*C]=H[2*U]+H[2*j],u.depth[C]=(u.depth[U]>=u.depth[j]?u.depth[U]:u.depth[j])+1,H[2*U+1]=H[2*j+1]=C,u.heap[1]=C++,lt(u,H,1),2<=u.heap_len;);u.heap[--u.heap_max]=u.heap[1],function(st,mt){var yt,gt,wt,ht,zt,Tt,vt=mt.dyn_tree,jt=mt.max_code,pe=mt.stat_desc.static_tree,me=mt.stat_desc.has_stree,_e=mt.stat_desc.extra_bits,Wt=mt.stat_desc.extra_base,kt=mt.stat_desc.max_length,Ct=0;for(ht=0;ht<=f;ht++)st.bl_count[ht]=0;for(vt[2*st.heap[st.heap_max]+1]=0,yt=st.heap_max+1;yt<i;yt++)kt<(ht=vt[2*vt[2*(gt=st.heap[yt])+1]+1]+1)&&(ht=kt,Ct++),vt[2*gt+1]=ht,jt<gt||(st.bl_count[ht]++,zt=0,Wt<=gt&&(zt=_e[gt-Wt]),Tt=vt[2*gt],st.opt_len+=Tt*(ht+zt),me&&(st.static_len+=Tt*(pe[2*gt+1]+zt)));if(Ct!==0){do{for(ht=kt-1;st.bl_count[ht]===0;)ht--;st.bl_count[ht]--,st.bl_count[ht+1]+=2,st.bl_count[kt]--,Ct-=2}while(0<Ct);for(ht=kt;ht!==0;ht--)for(gt=st.bl_count[ht];gt!==0;)jt<(wt=st.heap[--yt])||(vt[2*wt+1]!==ht&&(st.opt_len+=(ht-vt[2*wt+1])*vt[2*wt],vt[2*wt+1]=ht),gt--)}}(u,x),ot(H,ft,u.bl_count)}function e(u,x,U){var j,C,H=-1,J=x[1],X=0,et=7,ft=4;for(J===0&&(et=138,ft=3),x[2*(U+1)+1]=65535,j=0;j<=U;j++)C=J,J=x[2*(j+1)+1],++X<et&&C===J||(X<ft?u.bl_tree[2*C]+=X:C!==0?(C!==H&&u.bl_tree[2*C]++,u.bl_tree[2*S]++):X<=10?u.bl_tree[2*E]++:u.bl_tree[2*P]++,H=C,ft=(X=0)===J?(et=138,3):C===J?(et=6,3):(et=7,4))}function L(u,x,U){var j,C,H=-1,J=x[1],X=0,et=7,ft=4;for(J===0&&(et=138,ft=3),j=0;j<=U;j++)if(C=J,J=x[2*(j+1)+1],!(++X<et&&C===J)){if(X<ft)for(;G(u,C,u.bl_tree),--X!=0;);else C!==0?(C!==H&&(G(u,C,u.bl_tree),X--),G(u,S,u.bl_tree),M(u,X-3,2)):X<=10?(G(u,E,u.bl_tree),M(u,X-3,3)):(G(u,P,u.bl_tree),M(u,X-11,7));H=C,ft=(X=0)===J?(et=138,3):C===J?(et=6,3):(et=7,4)}}l(Z);var F=!1;function _(u,x,U,j){M(u,(v<<1)+(j?1:0),3),function(C,H,J,X){it(C),V(C,J),V(C,~J),o.arraySet(C.pending_buf,C.window,H,J,C.pending),C.pending+=J}(u,x,U)}d._tr_init=function(u){F||(function(){var x,U,j,C,H,J=new Array(f+1);for(C=j=0;C<b-1;C++)for(N[C]=j,x=0;x<1<<D[C];x++)r[j++]=C;for(r[j-1]=C,C=H=0;C<16;C++)for(Z[C]=H,x=0;x<1<<W[C];x++)O[H++]=C;for(H>>=7;C<s;C++)for(Z[C]=H<<7,x=0;x<1<<W[C]-7;x++)O[256+H++]=C;for(U=0;U<=f;U++)J[U]=0;for(x=0;x<=143;)Y[2*x+1]=8,x++,J[8]++;for(;x<=255;)Y[2*x+1]=9,x++,J[9]++;for(;x<=279;)Y[2*x+1]=7,x++,J[7]++;for(;x<=287;)Y[2*x+1]=8,x++,J[8]++;for(ot(Y,w+1,J),x=0;x<s;x++)g[2*x+1]=5,g[2*x]=at(x,5);q=new $(Y,D,y+1,w,f),R=new $(g,W,0,s,f),tt=new $(new Array(0),z,0,h,m)}(),F=!0),u.l_desc=new B(u.dyn_ltree,q),u.d_desc=new B(u.dyn_dtree,R),u.bl_desc=new B(u.bl_tree,tt),u.bi_buf=0,u.bi_valid=0,rt(u)},d._tr_stored_block=_,d._tr_flush_block=function(u,x,U,j){var C,H,J=0;0<u.level?(u.strm.data_type===2&&(u.strm.data_type=function(X){var et,ft=4093624447;for(et=0;et<=31;et++,ft>>>=1)if(1&ft&&X.dyn_ltree[2*et]!==0)return c;if(X.dyn_ltree[18]!==0||X.dyn_ltree[20]!==0||X.dyn_ltree[26]!==0)return n;for(et=32;et<y;et++)if(X.dyn_ltree[2*et]!==0)return n;return c}(u)),ut(u,u.l_desc),ut(u,u.d_desc),J=function(X){var et;for(e(X,X.dyn_ltree,X.l_desc.max_code),e(X,X.dyn_dtree,X.d_desc.max_code),ut(X,X.bl_desc),et=h-1;3<=et&&X.bl_tree[2*I[et]+1]===0;et--);return X.opt_len+=3*(et+1)+5+5+4,et}(u),C=u.opt_len+3+7>>>3,(H=u.static_len+3+7>>>3)<=C&&(C=H)):C=H=U+5,U+4<=C&&x!==-1?_(u,x,U,j):u.strategy===4||H===C?(M(u,2+(j?1:0),3),dt(u,Y,g)):(M(u,4+(j?1:0),3),function(X,et,ft,st){var mt;for(M(X,et-257,5),M(X,ft-1,5),M(X,st-4,4),mt=0;mt<st;mt++)M(X,X.bl_tree[2*I[mt]+1],3);L(X,X.dyn_ltree,et-1),L(X,X.dyn_dtree,ft-1)}(u,u.l_desc.max_code+1,u.d_desc.max_code+1,J+1),dt(u,u.dyn_ltree,u.dyn_dtree)),rt(u),j&&it(u)},d._tr_tally=function(u,x,U){return u.pending_buf[u.d_buf+2*u.last_lit]=x>>>8&255,u.pending_buf[u.d_buf+2*u.last_lit+1]=255&x,u.pending_buf[u.l_buf+u.last_lit]=255&U,u.last_lit++,x===0?u.dyn_ltree[2*U]++:(u.matches++,x--,u.dyn_ltree[2*(r[U]+y+1)]++,u.dyn_dtree[2*T(x)]++),u.last_lit===u.lit_bufsize-1},d._tr_align=function(u){M(u,2,3),G(u,k,Y),function(x){x.bi_valid===16?(V(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):8<=x.bi_valid&&(x.pending_buf[x.pending++]=255&x.bi_buf,x.bi_buf>>=8,x.bi_valid-=8)}(u)}},{"../utils/common":41}],53:[function(p,A,d){A.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(p,A,d){(function(o){(function(c,n){if(!c.setImmediate){var l,v,b,y,w=1,s={},h=!1,i=c.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(c);f=f&&f.setTimeout?f:c,l={}.toString.call(c.process)==="[object process]"?function(S){process.nextTick(function(){m(S)})}:function(){if(c.postMessage&&!c.importScripts){var S=!0,E=c.onmessage;return c.onmessage=function(){S=!1},c.postMessage("","*"),c.onmessage=E,S}}()?(y="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",k,!1):c.attachEvent("onmessage",k),function(S){c.postMessage(y+S,"*")}):c.MessageChannel?((b=new MessageChannel).port1.onmessage=function(S){m(S.data)},function(S){b.port2.postMessage(S)}):i&&"onreadystatechange"in i.createElement("script")?(v=i.documentElement,function(S){var E=i.createElement("script");E.onreadystatechange=function(){m(S),E.onreadystatechange=null,v.removeChild(E),E=null},v.appendChild(E)}):function(S){setTimeout(m,0,S)},f.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var E=new Array(arguments.length-1),P=0;P<E.length;P++)E[P]=arguments[P+1];var D={callback:S,args:E};return s[w]=D,l(w),w++},f.clearImmediate=a}function a(S){delete s[S]}function m(S){if(h)setTimeout(m,0,S);else{var E=s[S];if(E){h=!0;try{(function(P){var D=P.callback,W=P.args;switch(W.length){case 0:D();break;case 1:D(W[0]);break;case 2:D(W[0],W[1]);break;case 3:D(W[0],W[1],W[2]);break;default:D.apply(n,W)}})(E)}finally{a(S),h=!1}}}}function k(S){S.source===c&&typeof S.data=="string"&&S.data.indexOf(y)===0&&m(+S.data.slice(y.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof xt<"u"?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Pt);var Gt=Pt.exports;const Yt=Zt(Gt);function Xt(){const[K,t]=nt.useState(""),[p,A]=nt.useState(!1),[d,o]=nt.useState(""),[c,n]=nt.useState(null);let l="",v="";const b=nt.useRef(null),y=nt.useRef(null),w={},s=["text/html","text/xml","application/xml","application/xhtml+xml","image/svg+xml"],h=nt.useCallback(async z=>{A(!0),t(""),o("Loading..."),n(null),y.current&&(document.head.removeChild(y.current),URL.revokeObjectURL(y.current.href),y.current=null);try{let I;if(typeof z=="string"){const Y=await fetch(z);if(!Y.ok)throw new Error(`HTTP error! status: ${Y.status} ${Y.statusText}`);I=await Y.arrayBuffer()}else z instanceof File?I=await z.arrayBuffer():I=z;if(!I||I.byteLength===0)throw new Error("EPUB source is empty or could not be read.");b.current=await Yt.loadAsync(I),await i()}catch(I){const Y=I instanceof Error?I.message:"An unknown error occurred while fetching or loading the EPUB.";console.error("Error processing EPUB source:",I),n(Y),t(""),o(""),A(!1)}},[]);async function i(){if(!b.current)throw new Error("Zip not loaded");const I=b.current.file("META-INF/container.xml");if(!I)throw new Error("META-INF/container.xml not found.");const Y=await I.async("text"),g=f(Y);if(!g)throw new Error("OPF file path not found in container.xml.");l=g.substring(0,g.lastIndexOf("/")+1);const O=b.current.file(g);if(!O)throw new Error(`OPF file not found at path: ${g}`);const r=await O.async("text"),q=new DOMParser().parseFromString(r,"application/xml"),R=q.querySelector("parsererror");if(R)throw new Error(`Error parsing OPF file: ${R.textContent||"Unknown XML parse error"}`);a(q),await m(q)}function f(z){const g=new DOMParser().parseFromString(z,"application/xml").querySelector('rootfile[media-type="application/oebps-package+xml"]');return(g==null?void 0:g.getAttribute("full-path"))??null}function a(z){const I=z.querySelector("metadata > dc\\:title")||z.querySelector("metadata > title");o((I==null?void 0:I.textContent)||"Untitled Book")}async function m(z){if(!b.current)return;const I={};z.querySelectorAll("manifest > item").forEach(r=>{const N=r.getAttribute("id"),q=r.getAttribute("href"),R=r.getAttribute("media-type");N&&q&&R&&(I[N]={href:decodeURIComponent(q),type:R})});const Y=Array.from(z.querySelectorAll("spine > itemref")).map(r=>r.getAttribute("idref"));let g="";const O=new Set;for(const r of Y){if(!r)continue;const N=I[r];if(N){const q=l+N.href,R=b.current.file(q);if(R&&(N.type.includes("html")||N.type.includes("xml")))try{const tt=await R.async("text"),Z=await k(tt,N.type);g+=`<div class="bok-chapter">${Z}</div>`}catch(tt){console.warn(`Failed to process spine item ${q}:`,tt)}}}for(const r in I){const N=I[r];if(N.type.includes("css")){const q=l+N.href;if(!O.has(q)){const R=b.current.file(q);if(R)try{v+=await R.async("text")+`
|
|
34
|
-
`,
|
|
35
|
-
`);Y=
|
|
36
|
-
`)}async function E(z,I){const Y=new DOMParser;if(s.includes(I))try{const g=Y.parseFromString(z,I),O=g.querySelector("parsererror");if(O)return console.warn("Parser error in content item during cleanImages, skipping.",O.textContent),z;const r=g.querySelectorAll("img");for(const tt of r)await P(tt);const N=g.querySelectorAll("image");for(const tt of N)await D(tt);return new XMLSerializer().serializeToString(g.documentElement||g)}catch(g){return console.error("Error during cleanImages DOM processing:",g),z}else return z}async function P(z){var Y;let I=z.getAttribute("src");if(I){for(;I.startsWith(".")||I.startsWith("/");)I=I.slice(1);if(I=l+I,w[I]===void 0){const g=(Y=b.current)==null?void 0:Y.file(I);if(g)try{const O=await g.async("blob"),r=URL.createObjectURL(O);w[I]=r}catch(O){console.warn(`Could not load image blob (formatImg) ${I}:`,O),w[I]=""}else console.warn(`Image file not found in zip (formatImg): ${I}`),w[I]=""}z.setAttribute("src",w[I])}}async function D(z){var Y;let I=z.getAttribute("xlink:href");if(I){for(;I.startsWith(".")||I.startsWith("/");)I=I.slice(1);if(I=l+I,w[I]===void 0){const g=(Y=b.current)==null?void 0:Y.file(I);if(g)try{const O=await g.async("blob"),r=URL.createObjectURL(O);w[I]=r}catch(O){console.warn(`Could not load image blob (formatXMLImage) ${I}:`,O),w[I]=""}else console.warn(`Image file not found in zip (formatXMLImage): ${I}`),w[I]=""}z.setAttribute("xlink:href",w[I])}}function W(){if(!v.trim())return;const z=new Blob([v],{type:"text/css"}),I=URL.createObjectURL(z);y.current=document.createElement("link"),y.current.href=I,y.current.rel="stylesheet",y.current.setAttribute("data-bok-reader-style","true"),document.head.appendChild(y.current)}return{title:d,rawContent:K,isLoading:p,error:c,loadEpub:h,setIsLoading:A}}function Lt(K){const t=_t.c(8);let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={width:0,height:0,noOfPages:1},t[0]=p):p=t[0];const[A,d]=nt.useState(p);let o,c;t[1]!==K?(o=()=>{const l=K==null?void 0:K.current,v=()=>{if(l){const b=l.getBoundingClientRect(),y=b.height<b.width;d(w=>{const s=y?b.width/2:b.width,h=b.height,i=y?2:1;return w.width!==s||w.height!==h||w.noOfPages!==i?{width:s,height:h,noOfPages:i}:w})}else d({width:0,height:0,noOfPages:1})};if(l){v();const b=new ResizeObserver(v);return b.observe(l),()=>{b.unobserve(l)}}},c=[K],t[1]=K,t[2]=o,t[3]=c):(o=t[2],c=t[3]),nt.useEffect(o,c);let n;return t[4]!==A.height||t[5]!==A.noOfPages||t[6]!==A.width?(n=[A.width,A.height,A.noOfPages],t[4]=A.height,t[5]=A.noOfPages,t[6]=A.width,t[7]=n):n=t[7],n}function Kt(K){const t=_t.c(8),[p,A]=nt.useState(0);let d;t[0]!==K?(d=()=>{if(K.current){const v=K.current.scrollWidth,b=K.current.scrollLeft,y=v>0?b/v:0;A(y)}},t[0]=K,t[1]=d):d=t[1];const o=d;let c,n;t[2]!==K||t[3]!==o?(c=()=>{const v=K.current;if(!v)return;let b=null;const y=()=>{b&&clearTimeout(b),b=setTimeout(()=>{o()},100)};return v.addEventListener("scroll",y),o(),()=>{b&&clearTimeout(b),v.removeEventListener("scroll",y)}},n=[o,K],t[2]=K,t[3]=o,t[4]=c,t[5]=n):(c=t[4],n=t[5]),nt.useEffect(c,n);let l;return t[6]!==p?(l=[p,A],t[6]=p,t[7]=l):l=t[7],l}function Vt(K,t,p,A,d){let o="";nt.useEffect(()=>{t>1e-7&&(o=JSON.stringify({percentRead:t,padding:p,fontSize:A,fontFamily:d}),localStorage.setItem(K,o))},[K,t,p,A,d])}const qt=(K,t,p,A)=>{const d=_t.c(21),[o,c]=Lt(p),n=nt.useRef(null),l=nt.useRef("");let v;d[0]!==K||d[1]!==t||d[2]!==c||d[3]!==o||d[4]!==A?(v=(a,m)=>{!t&&!A&&(a/o<=.4&&m/c<.8&&K(-1),a/o>.4&&m/c<.8&&K(1))},d[0]=K,d[1]=t,d[2]=c,d[3]=o,d[4]=A,d[5]=v):v=d[5];const b=v;let y,w;d[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const a=()=>{var k;const m=(k=window.getSelection())==null?void 0:k.toString();m&&m.length>0?l.current=m:l.current=""};return document.addEventListener("selectionchange",a),()=>{document.removeEventListener("selectionchange",a)}},w=[],d[6]=y,d[7]=w):(y=d[6],w=d[7]),nt.useEffect(y,w);let s;d[8]!==b?(s=()=>{const a=()=>{n.current=window.setTimeout(()=>{n.current=null},500)},m=k=>{if(n.current&&l.current){clearTimeout(n.current),n.current=null;const{pageX:S,pageY:E}=k.touches[0];b(S,E)}};return window.addEventListener("touchstart",a),window.addEventListener("touchend",m),()=>{window.removeEventListener("touchstart",a),window.removeEventListener("touchend",m)}},d[8]=b,d[9]=s):s=d[9];let h;d[10]!==b||d[11]!==o?(h=[o,b],d[10]=b,d[11]=o,d[12]=h):h=d[12],nt.useEffect(s,h);let i;d[13]!==p||d[14]!==b?(i=()=>{const a=p.current,m=()=>{n.current=window.setTimeout(Jt,200)},k=S=>{n.current&&!l.current&&(clearTimeout(n.current),n.current=null,b(S.clientX,S.clientY))};return a==null||a.addEventListener("mousedown",m),a==null||a.addEventListener("mouseup",k),()=>{a==null||a.removeEventListener("mousedown",m),a==null||a.removeEventListener("mouseup",k)}},d[13]=p,d[14]=b,d[15]=i):i=d[15];let f;d[16]!==p||d[17]!==b||d[18]!==t||d[19]!==o?(f=[o,t,b,p],d[16]=p,d[17]=b,d[18]=t,d[19]=o,d[20]=f):f=d[20],nt.useEffect(i,f)};function Jt(){}function Qt(K){const t=_t.c(3),{currentPage:p,pages:A}=K,d=p+1;let o;return t[0]!==A||t[1]!==d?(o=Q.jsxs("div",{className:"page-number",children:[d,"/",A]}),t[0]=A,t[1]=d,t[2]=o):o=t[2],o}const $t=K=>1+2.2*Math.pow(K-1,3)+1.2*Math.pow(K-1,2);function te(K){const t=_t.c(43),{content:p,title:A,setIsLoading:d,fontSize:o,sidePadding:c,fontFamily:n,isOptionMenuVisible:l,setFontSize:v,setPadding:b,setFontFamily:y,containerElementRef:w,showTutorial:s}=K,h=nt.useRef(null),[i,f,a]=Lt(w),[m,k]=Kt(h),[S,E]=nt.useState(1),[P,D]=nt.useState(0),W=nt.useRef(m),z=nt.useRef(null);let I,Y;t[0]!==m?(I=()=>{W.current=m},Y=[m],t[0]=m,t[1]=I,t[2]=Y):(I=t[1],Y=t[2]),nt.useEffect(I,Y),Vt(A,m,c,o,n);let g;t[3]!==a||t[4]!==P||t[5]!==i?(g=V=>{E(M=>{const G=h.current;if(G&&P>0&&a>0&&G.clientWidth>0){let at=M+V;at<0&&(at=0),at>=P&&(at=P-1),z.current&&cancelAnimationFrame(z.current);const ot=G.scrollLeft,rt=at*i*a,it=rt-ot,ct=performance.now(),lt=dt=>{const ut=dt-ct;if(ut<450){const e=$t(ut/450);G.scrollLeft=ot+it*e,z.current=requestAnimationFrame(lt)}else G.scrollLeft=rt,z.current=null};return z.current=requestAnimationFrame(lt),at}return M})},t[3]=a,t[4]=P,t[5]=i,t[6]=g):g=t[6];const O=g;qt(O,l,w,s);let r,N;t[7]!==y||t[8]!==v||t[9]!==b||t[10]!==k||t[11]!==A?(r=()=>{if(!A)return;const V=localStorage.getItem(A);if(V)try{const M=JSON.parse(V);M&&(M.percentRead!==void 0&&k(M.percentRead),M.fontSize!==void 0&&v(M.fontSize),M.padding!==void 0&&b(M.padding),M.fontFamily!==void 0&&y(M.fontFamily))}catch(M){console.error("Failed to parse local storage for",A,M),k(0)}else k(0)},N=[A,v,b,y,k],t[7]=y,t[8]=v,t[9]=b,t[10]=k,t[11]=A,t[12]=r,t[13]=N):(r=t[12],N=t[13]),nt.useEffect(r,N);let q;t[14]!==n||t[15]!==o||t[16]!==a||t[17]!==f||t[18]!==i||t[19]!==d||t[20]!==c?(q=()=>{const V=h.current;if(!V||i<=0||f<=0)return;d(!0);const M=setTimeout(()=>{V.style.setProperty("--side-padding",`${c}px`),V.style.setProperty("--font-size",`${o}em`),V.style.setProperty("--font-family",n),V.style.setProperty("--computed-width",`${i}px`),V.style.maxHeight=`${f}px`,requestAnimationFrame(()=>{if(!V)return;const G=V.scrollWidth,at=i>0&&G>0?Math.round(G/i):0,ot=a===1?at:Math.round(at/2);if(D(ot),ot>0&&V.clientWidth>0){const rt=W.current;let it=Math.round(ot*rt);it=Math.max(0,Math.min(ot-1,it)),E(it),V.scrollLeft=it*i*a}else E(1);d(!1)})},400);return()=>{clearTimeout(M),z.current&&cancelAnimationFrame(z.current)}},t[14]=n,t[15]=o,t[16]=a,t[17]=f,t[18]=i,t[19]=d,t[20]=c,t[21]=q):q=t[21];let R;t[22]!==p||t[23]!==n||t[24]!==o||t[25]!==a||t[26]!==f||t[27]!==i||t[28]!==d||t[29]!==c||t[30]!==A?(R=[i,f,c,o,n,a,p,A,d],t[22]=p,t[23]=n,t[24]=o,t[25]=a,t[26]=f,t[27]=i,t[28]=d,t[29]=c,t[30]=A,t[31]=R):R=t[31],nt.useEffect(q,R);let tt,Z;t[32]!==O?(tt=()=>{const V=M=>{M.key==="ArrowLeft"?(M.preventDefault(),O(-1)):M.key==="ArrowRight"&&(M.preventDefault(),O(1))};return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},Z=[O],t[32]=O,t[33]=tt,t[34]=Z):(tt=t[33],Z=t[34]),nt.useEffect(tt,Z);let $;t[35]!==p?($=Q.jsx("div",{ref:h,dangerouslySetInnerHTML:{__html:p},className:"book-page"}),t[35]=p,t[36]=$):$=t[36];let B;t[37]!==S||t[38]!==P?(B=Q.jsx(Qt,{pages:P,currentPage:S}),t[37]=S,t[38]=P,t[39]=B):B=t[39];let T;return t[40]!==$||t[41]!==B?(T=Q.jsxs(Q.Fragment,{children:[$,B]}),t[40]=$,t[41]=B,t[42]=T):T=t[42],T}const Et={"loading-screen":"_loading-screen_13vxc_1","loading-screen-gon":"_loading-screen-gon_13vxc_2",spinner:"_spinner_13vxc_32",core:"_core_13vxc_82"};function ee(K){const t=_t.c(8),{isLoading:p,color:A}=K,d=A||"red";let o;t[0]!==d?(o={"--loader-color":d},t[0]=d,t[1]=o):o=t[1];const c=o,n=p?Et["loading-screen"]:Et["loading-screen-gon"];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=Q.jsx("div",{className:Et.core}),t[2]=l):l=t[2];let v;t[3]!==c?(v=Q.jsx("div",{className:Et.spinner,style:c,children:l}),t[3]=c,t[4]=v):v=t[4];let b;return t[5]!==n||t[6]!==v?(b=Q.jsx("div",{className:n,children:v}),t[5]=n,t[6]=v,t[7]=b):b=t[7],b}function re(){document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.documentElement.requestFullscreen()}function ne(K){const t=_t.c(72),{onClose:p,fontSize:A,padding:d,fontFamily:o,setFontSize:c,setPadding:n,setFontFamily:l,supportedFonts:v}=K,[b,y]=nt.useState(!1),[w,s]=nt.useState(!1),h=nt.useRef(null),i=nt.useRef(null);let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={displayName:"System Default",name:"system-ui"},t[0]=f):f=t[0];let a;t[1]!==v?(a=[f,...v],t[1]=v,t[2]=a):a=t[2];const m=a;let k,S;t[3]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{const et=setTimeout(()=>{s(!0)},0);return()=>clearTimeout(et)},S=[],t[3]=k,t[4]=S):(k=t[3],S=t[4]),nt.useEffect(k,S);let E;t[5]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{s(!1),y(!0)},t[5]=E):E=t[5];const P=E;let D,W;t[6]!==b||t[7]!==p?(D=()=>{if(b){const et=setTimeout(()=>{p()},300);return()=>clearTimeout(et)}},W=[b,p],t[6]=b,t[7]=p,t[8]=D,t[9]=W):(D=t[8],W=t[9]),nt.useEffect(D,W);let z;t[10]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{P()},t[10]=z):z=t[10];const I=z,Y=fe,g=ce;let O;t[11]!==d||t[12]!==n?(O=()=>{d<=70&&(n(le),g(i))},t[11]=d,t[12]=n,t[13]=O):O=t[13];const r=O;let N;t[14]!==d||t[15]!==n?(N=()=>{d-5>0&&(n(oe),g(i))},t[14]=d,t[15]=n,t[16]=N):N=t[16];const q=N;let R;t[17]!==A||t[18]!==c?(R=()=>{A<3&&(c(se),g(h))},t[17]=A,t[18]=c,t[19]=R):R=t[19];const tt=R;let Z;t[20]!==A||t[21]!==c?(Z=()=>{A-.2>.6&&(c(ae),g(h))},t[20]=A,t[21]=c,t[22]=Z):Z=t[22];const $=Z,B=`options-menu-overlay ${b?"fade-out":""}`,T=`options-menu ${w?"visible":""} ${b?"slide-down":""}`;let V,M;t[23]===Symbol.for("react.memo_cache_sentinel")?(V=Q.jsx("button",{onClick:P,className:"close-button","aria-label":"Close menu",children:"✕"}),M=Q.jsx("h2",{children:"Reader Options"}),t[23]=V,t[24]=M):(V=t[23],M=t[24]);let G;t[25]===Symbol.for("react.memo_cache_sentinel")?(G=Q.jsx("div",{className:"option-label",children:"Font family"}),t[25]=G):G=t[25];let at;t[26]!==m||t[27]!==l?(at=et=>{const ft=m.find(st=>st.name===et.target.value);ft&&l(ft.name)},t[26]=m,t[27]=l,t[28]=at):at=t[28];let ot;t[29]!==m?(ot=m.map(ie),t[29]=m,t[30]=ot):ot=t[30];let rt;t[31]!==o||t[32]!==at||t[33]!==ot?(rt=Q.jsxs("div",{className:"font-family-buttons",children:[G,Q.jsx("select",{value:o,onChange:at,children:ot})]}),t[31]=o,t[32]=at,t[33]=ot,t[34]=rt):rt=t[34];let it,ct;t[35]===Symbol.for("react.memo_cache_sentinel")?(it=Q.jsx("div",{className:"option-label",children:"Side padding"}),ct={display:"flex",alignItems:"center",gap:"8px"},t[35]=it,t[36]=ct):(it=t[35],ct=t[36]);let lt;t[37]!==q?(lt=Q.jsx("button",{onClick:q,children:"-"}),t[37]=q,t[38]=lt):lt=t[38];let dt;t[39]!==d?(dt=Q.jsx("span",{ref:i,className:"option-value",children:d}),t[39]=d,t[40]=dt):dt=t[40];let ut;t[41]!==r?(ut=Q.jsx("button",{onClick:r,children:"+"}),t[41]=r,t[42]=ut):ut=t[42];let e;t[43]!==lt||t[44]!==dt||t[45]!==ut?(e=Q.jsxs("div",{className:"padding-buttons",children:[it,Q.jsxs("div",{style:ct,children:[lt,dt,ut]})]}),t[43]=lt,t[44]=dt,t[45]=ut,t[46]=e):e=t[46];let L,F;t[47]===Symbol.for("react.memo_cache_sentinel")?(L=Q.jsx("div",{className:"option-label",children:"Font size"}),F={display:"flex",alignItems:"center",gap:"8px"},t[47]=L,t[48]=F):(L=t[47],F=t[48]);let _;t[49]!==$?(_=Q.jsx("button",{onClick:$,children:"-"}),t[49]=$,t[50]=_):_=t[50];let u;t[51]!==A?(u=Math.round(A*10),t[51]=A,t[52]=u):u=t[52];let x;t[53]!==u?(x=Q.jsx("span",{ref:h,className:"option-value",children:u}),t[53]=u,t[54]=x):x=t[54];let U;t[55]!==tt?(U=Q.jsx("button",{onClick:tt,children:"+"}),t[55]=tt,t[56]=U):U=t[56];let j;t[57]!==_||t[58]!==x||t[59]!==U?(j=Q.jsxs("div",{className:"font-buttons",children:[L,Q.jsxs("div",{style:F,children:[_,x,U]})]}),t[57]=_,t[58]=x,t[59]=U,t[60]=j):j=t[60];let C;t[61]===Symbol.for("react.memo_cache_sentinel")?(C=Q.jsx("button",{onClick:re,children:"Toggle fullscreen"}),t[61]=C):C=t[61];let H;t[62]!==rt||t[63]!==e||t[64]!==j?(H=Q.jsxs("div",{className:"options-buttons",children:[rt,e,j,C]}),t[62]=rt,t[63]=e,t[64]=j,t[65]=H):H=t[65];let J;t[66]!==T||t[67]!==H?(J=Q.jsxs("div",{className:T,onClick:Y,children:[V,M,H]}),t[66]=T,t[67]=H,t[68]=J):J=t[68];let X;return t[69]!==B||t[70]!==J?(X=Q.jsx("div",{className:B,onClick:I,children:J}),t[69]=B,t[70]=J,t[71]=X):X=t[71],X}function ie(K){return Q.jsx("option",{value:K.name,children:K.displayName},K.displayName)}function ae(K){return K-.2}function se(K){return K+.2}function oe(K){return K-5}function le(K){return K+5}function ce(K){K.current&&(K.current.classList.add("value-changed"),setTimeout(()=>{K.current&&K.current.classList.remove("value-changed")},300))}function fe(K){K.stopPropagation()}const pt={overlay:"_overlay_1cqa3_53",fadeOut:"_fadeOut_1cqa3_80",interactionZone:"_interactionZone_1cqa3_86",centerZone:"_centerZone_1cqa3_96",iconWrapper:"_iconWrapper_1cqa3_107",label:"_label_1cqa3_131",bottomIconGroup:"_bottomIconGroup_1cqa3_143",bottomIconWrapper:"_bottomIconWrapper_1cqa3_150",bounceArrow:"_bounceArrow_1cqa3_169",dismissButton:"_dismissButton_1cqa3_179"},ue=K=>{const t=_t.c(16),{color:p,onDismiss:A}=K,d=p===void 0?"#4fc3f7":p,[o,c]=nt.useState(!1);let n;t[0]!==A?(n=()=>{c(!0),setTimeout(A,400)},t[0]=A,t[1]=n):n=t[1];const l=n,v=`${pt.overlay} ${o?pt.fadeOut:""}`;let b;t[2]!==d?(b={"--accent-color":d},t[2]=d,t[3]=b):b=t[3];const y=b;let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=Q.jsxs("div",{className:pt.interactionZone,children:[Q.jsx("div",{className:pt.iconWrapper,children:Q.jsx("svg",{viewBox:"0 0 24 24",children:Q.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),Q.jsx("div",{className:pt.label,children:"Previous"})]}),t[4]=w):w=t[4];let s;t[5]===Symbol.for("react.memo_cache_sentinel")?(s=Q.jsxs("div",{className:pt.interactionZone,children:[Q.jsx("div",{className:pt.iconWrapper,children:Q.jsx("svg",{viewBox:"0 0 24 24",children:Q.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})}),Q.jsx("div",{className:pt.label,children:"Next"})]}),t[5]=s):s=t[5];let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=Q.jsx("div",{className:pt.bottomIconWrapper,children:Q.jsx("svg",{viewBox:"0 0 24 24",children:Q.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})})}),t[6]=h):h=t[6];let i;t[7]===Symbol.for("react.memo_cache_sentinel")?(i=Q.jsx("div",{className:pt.label,style:{fontSize:"0.9rem"},children:"Options"}),t[7]=i):i=t[7];let f;t[8]===Symbol.for("react.memo_cache_sentinel")?(f=Q.jsxs("div",{className:pt.bottomIconGroup,children:[h,i,Q.jsx("div",{className:pt.bounceArrow,children:Q.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:Q.jsx("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})})]}),t[8]=f):f=t[8];let a;t[9]!==l?(a=Q.jsxs("div",{className:pt.centerZone,children:[f,Q.jsx("button",{className:pt.dismissButton,onClick:k=>{k.stopPropagation(),l()},children:"Start Reading"})]}),t[9]=l,t[10]=a):a=t[10];let m;return t[11]!==l||t[12]!==a||t[13]!==v||t[14]!==y?(m=Q.jsxs("div",{className:v,onClick:l,style:y,children:[w,s,a]}),t[11]=l,t[12]=a,t[13]=v,t[14]=y,t[15]=m):m=t[15],m},Rt=Bt.createGlobalStyle`
|
|
37
|
-
.bok-reader-container {
|
|
38
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
39
|
-
line-height: 1.5;
|
|
40
|
-
font-weight: 400;
|
|
41
|
-
text-align: justify;
|
|
42
|
-
color-scheme: dark light;
|
|
43
|
-
color: rgb(215, 215, 215) !important;
|
|
44
|
-
background-color: black;
|
|
45
|
-
height: 100%;
|
|
46
|
-
width: 100%;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
scrollbar-width: none;
|
|
49
|
-
-ms-overflow-style: none;
|
|
50
|
-
&::-webkit-scrollbar { display: none; }
|
|
51
|
-
font-synthesis: none;
|
|
52
|
-
text-rendering: optimizeLegibility;
|
|
53
|
-
-webkit-font-smoothing: antialiased;
|
|
54
|
-
-moz-osx-font-smoothing: grayscale;
|
|
55
|
-
container-type: size;
|
|
56
|
-
|
|
57
|
-
.book-page {
|
|
58
|
-
margin: 0;
|
|
59
|
-
font-family: var(--font-family);
|
|
60
|
-
padding: var(--top-padding) var(--side-padding) var(--bottom-padding);
|
|
61
|
-
height: 100%;
|
|
62
|
-
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
|
|
63
|
-
font-size: var(--font-size);
|
|
64
|
-
|
|
65
|
-
column-gap: calc(2 * var(--side-padding));
|
|
66
|
-
-webkit-column-fill: auto;
|
|
67
|
-
-webkit-column-gap: calc(2 * var(--side-padding));
|
|
68
|
-
|
|
69
|
-
overflow-x: auto;
|
|
70
|
-
overscroll-behavior-x: none;
|
|
71
|
-
|
|
72
|
-
overflow-y: hidden;
|
|
73
|
-
-webkit-overflow-scrolling: touch;
|
|
74
|
-
box-sizing: border-box;
|
|
75
|
-
|
|
76
|
-
scrollbar-width: none;
|
|
77
|
-
-ms-overflow-style: none;
|
|
78
|
-
&::-webkit-scrollbar {
|
|
79
|
-
display: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
> * {
|
|
83
|
-
break-inside: avoid-column;
|
|
84
|
-
page-break-inside: avoid;
|
|
85
|
-
-webkit-column-break-inside: avoid;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@container (aspect-ratio > 1/1) {
|
|
90
|
-
.book-page {
|
|
91
|
-
column-count: 2;
|
|
92
|
-
-moz-column-count: 2;
|
|
93
|
-
-webkit-column-count: 2;
|
|
94
|
-
column-width: calc(50% - var(--side-padding));
|
|
95
|
-
-webkit-column-width: calc(50% - var(--side-padding));
|
|
96
|
-
|
|
97
|
-
img, svg {
|
|
98
|
-
max-width: calc(100% - 2 * var(--side-padding)) !important;
|
|
99
|
-
margin-bottom: 10px;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@container (aspect-ratio <= 1/1) {
|
|
105
|
-
.book-page {
|
|
106
|
-
column-count: 1;
|
|
107
|
-
-moz-column-count: 1;
|
|
108
|
-
-webkit-column-count: 1;
|
|
109
|
-
|
|
110
|
-
column-width: var(--computed-width, 100%);
|
|
111
|
-
-webkit-column-width: var(--computed-width, 100%);
|
|
112
|
-
|
|
113
|
-
width: 100%;
|
|
114
|
-
box-sizing: border-box;
|
|
115
|
-
|
|
116
|
-
img, svg {
|
|
117
|
-
max-width: calc(100% - 2 * var(--side-padding)) !important;
|
|
118
|
-
margin-bottom: 10px;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.book-page img,
|
|
124
|
-
.book-page svg {
|
|
125
|
-
border-radius: 10px;
|
|
126
|
-
max-height: calc(100% - var(--top-padding) - var(--bottom-padding)) !important;
|
|
127
|
-
display: block;
|
|
128
|
-
margin-left: auto;
|
|
129
|
-
margin-right: auto;
|
|
130
|
-
object-fit: contain;
|
|
131
|
-
box-sizing: border-box;
|
|
132
|
-
break-inside: avoid-column;
|
|
133
|
-
page-break-inside: avoid;
|
|
134
|
-
-webkit-column-break-inside: avoid;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.book-page svg > image {
|
|
138
|
-
width: 100%;
|
|
139
|
-
height: 100%;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.bok-chapter {
|
|
143
|
-
margin-bottom: 100%;
|
|
144
|
-
break-inside: avoid-column;
|
|
145
|
-
page-break-inside: avoid;
|
|
146
|
-
-webkit-column-break-inside: avoid;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
parsererror { display: none; }
|
|
150
|
-
|
|
151
|
-
.page-number {
|
|
152
|
-
position: absolute;
|
|
153
|
-
bottom: 20px;
|
|
154
|
-
left: 50%;
|
|
155
|
-
transform: translateX(-50%);
|
|
156
|
-
font-size: 12px;
|
|
157
|
-
font-weight: 500;
|
|
158
|
-
letter-spacing: 0.5px;
|
|
159
|
-
color: rgba(255, 255, 255, 0.4);
|
|
160
|
-
z-index: 10;
|
|
161
|
-
pointer-events: none;
|
|
162
|
-
font-variant-numeric: tabular-nums;
|
|
163
|
-
background: rgba(0, 0, 0, 0.3);
|
|
164
|
-
padding: 4px 10px;
|
|
165
|
-
border-radius: 12px;
|
|
166
|
-
backdrop-filter: blur(2px);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.bottom-click-area {
|
|
170
|
-
position: absolute;
|
|
171
|
-
bottom: 0;
|
|
172
|
-
left: 0;
|
|
173
|
-
width: 100%;
|
|
174
|
-
height: 15%;
|
|
175
|
-
z-index: 1000;
|
|
176
|
-
background-color: transparent;
|
|
177
|
-
cursor: pointer;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
`,Ut=Bt.div`
|
|
181
|
-
width: 100%;
|
|
182
|
-
height: 100%;
|
|
183
|
-
position: relative;
|
|
184
|
-
overflow: hidden;
|
|
185
|
-
overflow-y: hidden;
|
|
186
|
-
`;function de(K,t){const p=_t.c(9);let A;p[0]!==t||p[1]!==K?(A=()=>{if(typeof window>"u")return t;const v=localStorage.getItem(K);return v===null?t:v==="true"},p[0]=t,p[1]=K,p[2]=A):A=p[2];const[d,o]=nt.useState(A);let c,n;p[3]!==K||p[4]!==d?(c=()=>{localStorage.setItem(K,d?"true":"false")},n=[K,d],p[3]=K,p[4]=d,p[5]=c,p[6]=n):(c=p[5],n=p[6]),nt.useEffect(c,n);let l;return p[7]!==d?(l=[d,o],p[7]=d,p[8]=l):l=p[8],l}const he=K=>{const t=_t.c(66),{epubDataSource:p,onTitleChange:A,onLoadingChange:d,onError:o,className:c,style:n,color:l,supportedFonts:v}=K;let b;t[0]!==v?(b=v===void 0?[]:v,t[0]=v,t[1]=b):b=t[1];const y=b,{title:w,rawContent:s,isLoading:h,error:i,loadEpub:f,setIsLoading:a}=Xt(),[m,k]=nt.useState(!1),[S,E]=nt.useState(1.2),[P,D]=nt.useState(30),[W,z]=nt.useState("Inter"),I=nt.useRef(null),[Y,g]=de("bokreader_tutorial_shown",!1),[O,r]=nt.useState(!Y);let N,q;t[2]!==Y?(N=()=>{Y&&r(!1)},q=[Y],t[2]=Y,t[3]=N,t[4]=q):(N=t[3],q=t[4]),nt.useEffect(N,q);let R;t[5]!==g?(R=()=>{r(!1),g(!0)},t[5]=g,t[6]=R):R=t[6];const tt=R;let Z,$;t[7]!==p||t[8]!==f?(Z=()=>{p&&f(p)},$=[p,f],t[7]=p,t[8]=f,t[9]=Z,t[10]=$):(Z=t[9],$=t[10]),nt.useEffect(Z,$);let B,T;t[11]!==A||t[12]!==w?(B=()=>{A&&A(w)},T=[w,A],t[11]=A,t[12]=w,t[13]=B,t[14]=T):(B=t[13],T=t[14]),nt.useEffect(B,T);let V,M;t[15]!==h||t[16]!==d?(V=()=>{d&&d(h)},M=[h,d],t[15]=h,t[16]=d,t[17]=V,t[18]=M):(V=t[17],M=t[18]),nt.useEffect(V,M);let G,at;t[19]!==i||t[20]!==o?(G=()=>{i&&o&&o(i)},at=[i,o],t[19]=i,t[20]=o,t[21]=G,t[22]=at):(G=t[21],at=t[22]),nt.useEffect(G,at);const ot=`${P}px`,rt=`${S}em`;let it;t[23]!==l||t[24]!==W||t[25]!==ot||t[26]!==rt?(it={"--color-tint":l,"--side-padding":ot,"--top-padding":"30px","--bottom-padding":"70px","--font-size":rt,"--font-family":W},t[23]=l,t[24]=W,t[25]=ot,t[26]=rt,t[27]=it):it=t[27];const ct=it;if(i&&!h&&!s){const x=`bok-reader-container ${c||""}`;let U,j;t[28]===Symbol.for("react.memo_cache_sentinel")?(U=Q.jsx(Rt,{}),j={padding:"20px",color:"red"},t[28]=U,t[29]=j):(U=t[28],j=t[29]);let C;t[30]!==i?(C=Q.jsxs("div",{style:j,children:["Error loading EPUB: ",i]}),t[30]=i,t[31]=C):C=t[31];let H;return t[32]!==n||t[33]!==x||t[34]!==C?(H=Q.jsxs(Ut,{className:x,style:n,children:[U,C]}),t[32]=n,t[33]=x,t[34]=C,t[35]=H):H=t[35],H}const lt=`bok-reader-container ${c||""}`;let dt;t[36]!==ct||t[37]!==n?(dt={...n,...ct},t[36]=ct,t[37]=n,t[38]=dt):dt=t[38];const ut=dt;let e;t[39]===Symbol.for("react.memo_cache_sentinel")?(e=Q.jsx(Rt,{}),t[39]=e):e=t[39];let L;t[40]!==l||t[41]!==h?(L=Q.jsx(ee,{isLoading:h,color:l}),t[40]=l,t[41]=h,t[42]=L):L=t[42];let F;t[43]!==l||t[44]!==tt||t[45]!==W||t[46]!==S||t[47]!==h||t[48]!==m||t[49]!==s||t[50]!==a||t[51]!==O||t[52]!==P||t[53]!==y||t[54]!==w?(F=s&&Q.jsxs(Q.Fragment,{children:[O&&!h&&Q.jsx(ue,{color:l,onDismiss:tt}),Q.jsx(te,{content:s,title:w,setIsLoading:a,fontSize:S,sidePadding:P,fontFamily:W,setPadding:D,setFontSize:E,setFontFamily:z,isOptionMenuVisible:m,containerElementRef:I,showTutorial:O}),m&&Q.jsx(ne,{onClose:()=>k(!1),fontSize:S,padding:P,fontFamily:W,setPadding:D,setFontSize:E,setFontFamily:z,supportedFonts:y}),!m&&Q.jsx("div",{className:"bottom-click-area",onClick:()=>{O||k(!0)},"aria-label":"Open reader options"})]}),t[43]=l,t[44]=tt,t[45]=W,t[46]=S,t[47]=h,t[48]=m,t[49]=s,t[50]=a,t[51]=O,t[52]=P,t[53]=y,t[54]=w,t[55]=F):F=t[55];let _;t[56]!==p||t[57]!==i||t[58]!==h?(_=!p&&!h&&!i&&Q.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No EPUB loaded."}),t[56]=p,t[57]=i,t[58]=h,t[59]=_):_=t[59];let u;return t[60]!==lt||t[61]!==ut||t[62]!==L||t[63]!==F||t[64]!==_?(u=Q.jsxs(Ut,{className:lt,style:ut,ref:I,children:[e,L,F,_]}),t[60]=lt,t[61]=ut,t[62]=L,t[63]=F,t[64]=_,t[65]=u):u=t[65],u};bt.BokReader=he,Object.defineProperty(bt,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
*/(function(X,t){(function(b){X.exports=b()})(function(){return function b(T,h,l){function c(w,y){if(!h[w]){if(!T[w]){var v=typeof Ft=="function"&&Ft;if(!y&&v)return v(w,!0);if(n)return n(w,!0);var g=new Error("Cannot find module '"+w+"'");throw g.code="MODULE_NOT_FOUND",g}var o=h[w]={exports:{}};T[w][0].call(o.exports,function(u){var i=T[w][1][u];return c(i||u)},o,o.exports,b,T,h,l)}return h[w].exports}for(var n=typeof Ft=="function"&&Ft,s=0;s<l.length;s++)c(l[s]);return c}({1:[function(b,T,h){var l=b("./utils"),c=b("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";h.encode=function(s){for(var w,y,v,g,o,u,i,f=[],a=0,m=s.length,k=m,E=l.getTypeOf(s)!=="string";a<s.length;)k=m-a,v=E?(w=s[a++],y=a<m?s[a++]:0,a<m?s[a++]:0):(w=s.charCodeAt(a++),y=a<m?s.charCodeAt(a++):0,a<m?s.charCodeAt(a++):0),g=w>>2,o=(3&w)<<4|y>>4,u=1<k?(15&y)<<2|v>>6:64,i=2<k?63&v:64,f.push(n.charAt(g)+n.charAt(o)+n.charAt(u)+n.charAt(i));return f.join("")},h.decode=function(s){var w,y,v,g,o,u,i=0,f=0,a="data:";if(s.substr(0,a.length)===a)throw new Error("Invalid base64 input, it looks like a data url.");var m,k=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===n.charAt(64)&&k--,s.charAt(s.length-2)===n.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(m=c.uint8array?new Uint8Array(0|k):new Array(0|k);i<s.length;)w=n.indexOf(s.charAt(i++))<<2|(g=n.indexOf(s.charAt(i++)))>>4,y=(15&g)<<4|(o=n.indexOf(s.charAt(i++)))>>2,v=(3&o)<<6|(u=n.indexOf(s.charAt(i++))),m[f++]=w,o!==64&&(m[f++]=y),u!==64&&(m[f++]=v);return m}},{"./support":30,"./utils":32}],2:[function(b,T,h){var l=b("./external"),c=b("./stream/DataWorker"),n=b("./stream/Crc32Probe"),s=b("./stream/DataLengthProbe");function w(y,v,g,o,u){this.compressedSize=y,this.uncompressedSize=v,this.crc32=g,this.compression=o,this.compressedContent=u}w.prototype={getContentWorker:function(){var y=new c(l.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),v=this;return y.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new c(l.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},w.createWorkerFrom=function(y,v,g){return y.pipe(new n).pipe(new s("uncompressedSize")).pipe(v.compressWorker(g)).pipe(new s("compressedSize")).withStreamInfo("compression",v)},T.exports=w},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(b,T,h){var l=b("./stream/GenericWorker");h.STORE={magic:"\0\0",compressWorker:function(){return new l("STORE compression")},uncompressWorker:function(){return new l("STORE decompression")}},h.DEFLATE=b("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(b,T,h){var l=b("./utils"),c=function(){for(var n,s=[],w=0;w<256;w++){n=w;for(var y=0;y<8;y++)n=1&n?3988292384^n>>>1:n>>>1;s[w]=n}return s}();T.exports=function(n,s){return n!==void 0&&n.length?l.getTypeOf(n)!=="string"?function(w,y,v,g){var o=c,u=g+v;w^=-1;for(var i=g;i<u;i++)w=w>>>8^o[255&(w^y[i])];return-1^w}(0|s,n,n.length,0):function(w,y,v,g){var o=c,u=g+v;w^=-1;for(var i=g;i<u;i++)w=w>>>8^o[255&(w^y.charCodeAt(i))];return-1^w}(0|s,n,n.length,0):0}},{"./utils":32}],5:[function(b,T,h){h.base64=!1,h.binary=!1,h.dir=!1,h.createFolders=!0,h.date=null,h.compression=null,h.compressionOptions=null,h.comment=null,h.unixPermissions=null,h.dosPermissions=null},{}],6:[function(b,T,h){var l=null;l=typeof Promise<"u"?Promise:b("lie"),T.exports={Promise:l}},{lie:37}],7:[function(b,T,h){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=b("pako"),n=b("./utils"),s=b("./stream/GenericWorker"),w=l?"uint8array":"array";function y(v,g){s.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=g,this.meta={}}h.magic="\b\0",n.inherits(y,s),y.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(w,v.data),!1)},y.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(g){v.push({data:g,meta:v.meta})}},h.compressWorker=function(v){return new y("Deflate",v)},h.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(b,T,h){function l(o,u){var i,f="";for(i=0;i<u;i++)f+=String.fromCharCode(255&o),o>>>=8;return f}function c(o,u,i,f,a,m){var k,E,S=o.file,L=o.compression,D=m!==w.utf8encode,U=n.transformTo("string",m(S.name)),z=n.transformTo("string",w.utf8encode(S.name)),A=S.comment,Y=n.transformTo("string",m(A)),_=n.transformTo("string",w.utf8encode(A)),I=z.length!==S.name.length,r=_.length!==A.length,N="",K="",R="",$=S.dir,Z=S.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};u&&!i||(tt.crc32=o.crc32,tt.compressedSize=o.compressedSize,tt.uncompressedSize=o.uncompressedSize);var B=0;u&&(B|=8),D||!I&&!r||(B|=2048);var O=0,Q=0;$&&(O|=16),a==="UNIX"?(Q=798,O|=function(H,at){var st=H;return H||(st=at?16893:33204),(65535&st)<<16}(S.unixPermissions,$)):(Q=20,O|=function(H){return 63&(H||0)}(S.dosPermissions)),k=Z.getUTCHours(),k<<=6,k|=Z.getUTCMinutes(),k<<=5,k|=Z.getUTCSeconds()/2,E=Z.getUTCFullYear()-1980,E<<=4,E|=Z.getUTCMonth()+1,E<<=5,E|=Z.getUTCDate(),I&&(K=l(1,1)+l(y(U),4)+z,N+="up"+l(K.length,2)+K),r&&(R=l(1,1)+l(y(Y),4)+_,N+="uc"+l(R.length,2)+R);var G="";return G+=`
|
|
33
|
+
\0`,G+=l(B,2),G+=L.magic,G+=l(k,2),G+=l(E,2),G+=l(tt.crc32,4),G+=l(tt.compressedSize,4),G+=l(tt.uncompressedSize,4),G+=l(U.length,2),G+=l(N.length,2),{fileRecord:v.LOCAL_FILE_HEADER+G+U+N,dirRecord:v.CENTRAL_FILE_HEADER+l(Q,2)+G+l(Y.length,2)+"\0\0\0\0"+l(O,4)+l(f,4)+U+N+Y}}var n=b("../utils"),s=b("../stream/GenericWorker"),w=b("../utf8"),y=b("../crc32"),v=b("../signature");function g(o,u,i,f){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=u,this.zipPlatform=i,this.encodeFileName=f,this.streamFiles=o,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(g,s),g.prototype.push=function(o){var u=o.meta.percent||0,i=this.entriesCount,f=this._sources.length;this.accumulate?this.contentBuffer.push(o):(this.bytesWritten+=o.data.length,s.prototype.push.call(this,{data:o.data,meta:{currentFile:this.currentFile,percent:i?(u+100*(i-f-1))/i:100}}))},g.prototype.openedSource=function(o){this.currentSourceOffset=this.bytesWritten,this.currentFile=o.file.name;var u=this.streamFiles&&!o.file.dir;if(u){var i=c(o,u,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(o){this.accumulate=!1;var u=this.streamFiles&&!o.file.dir,i=c(o,u,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),u)this.push({data:function(f){return v.DATA_DESCRIPTOR+l(f.crc32,4)+l(f.compressedSize,4)+l(f.uncompressedSize,4)}(o),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var o=this.bytesWritten,u=0;u<this.dirRecords.length;u++)this.push({data:this.dirRecords[u],meta:{percent:100}});var i=this.bytesWritten-o,f=function(a,m,k,E,S){var L=n.transformTo("string",S(E));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+l(a,2)+l(a,2)+l(m,4)+l(k,4)+l(L.length,2)+L}(this.dirRecords.length,i,o,this.zipComment,this.encodeFileName);this.push({data:f,meta:{percent:100}})},g.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},g.prototype.registerPrevious=function(o){this._sources.push(o);var u=this;return o.on("data",function(i){u.processChunk(i)}),o.on("end",function(){u.closedSource(u.previous.streamInfo),u._sources.length?u.prepareNextSource():u.end()}),o.on("error",function(i){u.error(i)}),this},g.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},g.prototype.error=function(o){var u=this._sources;if(!s.prototype.error.call(this,o))return!1;for(var i=0;i<u.length;i++)try{u[i].error(o)}catch{}return!0},g.prototype.lock=function(){s.prototype.lock.call(this);for(var o=this._sources,u=0;u<o.length;u++)o[u].lock()},T.exports=g},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(b,T,h){var l=b("../compressions"),c=b("./ZipFileWorker");h.generateWorker=function(n,s,w){var y=new c(s.streamFiles,w,s.platform,s.encodeFileName),v=0;try{n.forEach(function(g,o){v++;var u=function(m,k){var E=m||k,S=l[E];if(!S)throw new Error(E+" is not a valid compression method !");return S}(o.options.compression,s.compression),i=o.options.compressionOptions||s.compressionOptions||{},f=o.dir,a=o.date;o._compressWorker(u,i).withStreamInfo("file",{name:g,dir:f,date:a,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(y)}),y.entriesCount=v}catch(g){y.error(g)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(b,T,h){function l(){if(!(this instanceof l))return new l;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new l;for(var n in this)typeof this[n]!="function"&&(c[n]=this[n]);return c}}(l.prototype=b("./object")).loadAsync=b("./load"),l.support=b("./support"),l.defaults=b("./defaults"),l.version="3.10.1",l.loadAsync=function(c,n){return new l().loadAsync(c,n)},l.external=b("./external"),T.exports=l},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(b,T,h){var l=b("./utils"),c=b("./external"),n=b("./utf8"),s=b("./zipEntries"),w=b("./stream/Crc32Probe"),y=b("./nodejsUtils");function v(g){return new c.Promise(function(o,u){var i=g.decompressed.getContentWorker().pipe(new w);i.on("error",function(f){u(f)}).on("end",function(){i.streamInfo.crc32!==g.decompressed.crc32?u(new Error("Corrupted zip : CRC32 mismatch")):o()}).resume()})}T.exports=function(g,o){var u=this;return o=l.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),y.isNode&&y.isStream(g)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):l.prepareContent("the loaded zip file",g,!0,o.optimizedBinaryString,o.base64).then(function(i){var f=new s(o);return f.load(i),f}).then(function(i){var f=[c.Promise.resolve(i)],a=i.files;if(o.checkCRC32)for(var m=0;m<a.length;m++)f.push(v(a[m]));return c.Promise.all(f)}).then(function(i){for(var f=i.shift(),a=f.files,m=0;m<a.length;m++){var k=a[m],E=k.fileNameStr,S=l.resolve(k.fileNameStr);u.file(S,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:o.createFolders}),k.dir||(u.file(S).unsafeOriginalName=E)}return f.zipComment.length&&(u.comment=f.zipComment),u})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(b,T,h){var l=b("../utils"),c=b("../stream/GenericWorker");function n(s,w){c.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(w)}l.inherits(n,c),n.prototype._bindStream=function(s){var w=this;(this._stream=s).pause(),s.on("data",function(y){w.push({data:y,meta:{percent:0}})}).on("error",function(y){w.isPaused?this.generatedError=y:w.error(y)}).on("end",function(){w.isPaused?w._upstreamEnded=!0:w.end()})},n.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},T.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(b,T,h){var l=b("readable-stream").Readable;function c(n,s,w){l.call(this,s),this._helper=n;var y=this;n.on("data",function(v,g){y.push(v)||y._helper.pause(),w&&w(g)}).on("error",function(v){y.emit("error",v)}).on("end",function(){y.push(null)})}b("../utils").inherits(c,l),c.prototype._read=function(){this._helper.resume()},T.exports=c},{"../utils":32,"readable-stream":16}],14:[function(b,T,h){T.exports={isNode:typeof Buffer<"u",newBufferFrom:function(l,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(l,c);if(typeof l=="number")throw new Error('The "data" argument must not be a number');return new Buffer(l,c)},allocBuffer:function(l){if(Buffer.alloc)return Buffer.alloc(l);var c=new Buffer(l);return c.fill(0),c},isBuffer:function(l){return Buffer.isBuffer(l)},isStream:function(l){return l&&typeof l.on=="function"&&typeof l.pause=="function"&&typeof l.resume=="function"}}},{}],15:[function(b,T,h){function l(S,L,D){var U,z=n.getTypeOf(L),A=n.extend(D||{},y);A.date=A.date||new Date,A.compression!==null&&(A.compression=A.compression.toUpperCase()),typeof A.unixPermissions=="string"&&(A.unixPermissions=parseInt(A.unixPermissions,8)),A.unixPermissions&&16384&A.unixPermissions&&(A.dir=!0),A.dosPermissions&&16&A.dosPermissions&&(A.dir=!0),A.dir&&(S=a(S)),A.createFolders&&(U=f(S))&&m.call(this,U,!0);var Y=z==="string"&&A.binary===!1&&A.base64===!1;D&&D.binary!==void 0||(A.binary=!Y),(L instanceof v&&L.uncompressedSize===0||A.dir||!L||L.length===0)&&(A.base64=!1,A.binary=!0,L="",A.compression="STORE",z="string");var _=null;_=L instanceof v||L instanceof s?L:u.isNode&&u.isStream(L)?new i(S,L):n.prepareContent(S,L,A.binary,A.optimizedBinaryString,A.base64);var I=new g(S,_,A);this.files[S]=I}var c=b("./utf8"),n=b("./utils"),s=b("./stream/GenericWorker"),w=b("./stream/StreamHelper"),y=b("./defaults"),v=b("./compressedObject"),g=b("./zipObject"),o=b("./generate"),u=b("./nodejsUtils"),i=b("./nodejs/NodejsStreamInputAdapter"),f=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var L=S.lastIndexOf("/");return 0<L?S.substring(0,L):""},a=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},m=function(S,L){return L=L!==void 0?L:y.createFolders,S=a(S),this.files[S]||l.call(this,S,null,{dir:!0,createFolders:L}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var E={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var L,D,U;for(L in this.files)U=this.files[L],(D=L.slice(this.root.length,L.length))&&L.slice(0,this.root.length)===this.root&&S(D,U)},filter:function(S){var L=[];return this.forEach(function(D,U){S(D,U)&&L.push(U)}),L},file:function(S,L,D){if(arguments.length!==1)return S=this.root+S,l.call(this,S,L,D),this;if(k(S)){var U=S;return this.filter(function(A,Y){return!Y.dir&&U.test(A)})}var z=this.files[this.root+S];return z&&!z.dir?z:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(z,A){return A.dir&&S.test(z)});var L=this.root+S,D=m.call(this,L),U=this.clone();return U.root=D.name,U},remove:function(S){S=this.root+S;var L=this.files[S];if(L||(S.slice(-1)!=="/"&&(S+="/"),L=this.files[S]),L&&!L.dir)delete this.files[S];else for(var D=this.filter(function(z,A){return A.name.slice(0,S.length)===S}),U=0;U<D.length;U++)delete this.files[D[U].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var L,D={};try{if((D=n.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=D.type.toLowerCase(),D.compression=D.compression.toUpperCase(),D.type==="binarystring"&&(D.type="string"),!D.type)throw new Error("No output type specified.");n.checkSupport(D.type),D.platform!=="darwin"&&D.platform!=="freebsd"&&D.platform!=="linux"&&D.platform!=="sunos"||(D.platform="UNIX"),D.platform==="win32"&&(D.platform="DOS");var U=D.comment||this.comment||"";L=o.generateWorker(this,D,U)}catch(z){(L=new s("error")).error(z)}return new w(L,D.type||"string",D.mimeType)},generateAsync:function(S,L){return this.generateInternalStream(S).accumulate(L)},generateNodeStream:function(S,L){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(L)}};T.exports=E},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(b,T,h){T.exports=b("stream")},{stream:void 0}],17:[function(b,T,h){var l=b("./DataReader");function c(n){l.call(this,n);for(var s=0;s<this.data.length;s++)n[s]=255&n[s]}b("../utils").inherits(c,l),c.prototype.byteAt=function(n){return this.data[this.zero+n]},c.prototype.lastIndexOfSignature=function(n){for(var s=n.charCodeAt(0),w=n.charCodeAt(1),y=n.charCodeAt(2),v=n.charCodeAt(3),g=this.length-4;0<=g;--g)if(this.data[g]===s&&this.data[g+1]===w&&this.data[g+2]===y&&this.data[g+3]===v)return g-this.zero;return-1},c.prototype.readAndCheckSignature=function(n){var s=n.charCodeAt(0),w=n.charCodeAt(1),y=n.charCodeAt(2),v=n.charCodeAt(3),g=this.readData(4);return s===g[0]&&w===g[1]&&y===g[2]&&v===g[3]},c.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,s},T.exports=c},{"../utils":32,"./DataReader":18}],18:[function(b,T,h){var l=b("../utils");function c(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var s,w=0;for(this.checkOffset(n),s=this.index+n-1;s>=this.index;s--)w=(w<<8)+this.byteAt(s);return this.index+=n,w},readString:function(n){return l.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},T.exports=c},{"../utils":32}],19:[function(b,T,h){var l=b("./Uint8ArrayReader");function c(n){l.call(this,n)}b("../utils").inherits(c,l),c.prototype.readData=function(n){this.checkOffset(n);var s=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,s},T.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(b,T,h){var l=b("./DataReader");function c(n){l.call(this,n)}b("../utils").inherits(c,l),c.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},c.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},c.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},c.prototype.readData=function(n){this.checkOffset(n);var s=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,s},T.exports=c},{"../utils":32,"./DataReader":18}],21:[function(b,T,h){var l=b("./ArrayReader");function c(n){l.call(this,n)}b("../utils").inherits(c,l),c.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,s},T.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(b,T,h){var l=b("../utils"),c=b("../support"),n=b("./ArrayReader"),s=b("./StringReader"),w=b("./NodeBufferReader"),y=b("./Uint8ArrayReader");T.exports=function(v){var g=l.getTypeOf(v);return l.checkSupport(g),g!=="string"||c.uint8array?g==="nodebuffer"?new w(v):c.uint8array?new y(l.transformTo("uint8array",v)):new n(l.transformTo("array",v)):new s(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(b,T,h){h.LOCAL_FILE_HEADER="PK",h.CENTRAL_FILE_HEADER="PK",h.CENTRAL_DIRECTORY_END="PK",h.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",h.ZIP64_CENTRAL_DIRECTORY_END="PK",h.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(b,T,h){var l=b("./GenericWorker"),c=b("../utils");function n(s){l.call(this,"ConvertWorker to "+s),this.destType=s}c.inherits(n,l),n.prototype.processChunk=function(s){this.push({data:c.transformTo(this.destType,s.data),meta:s.meta})},T.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(b,T,h){var l=b("./GenericWorker"),c=b("../crc32");function n(){l.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}b("../utils").inherits(n,l),n.prototype.processChunk=function(s){this.streamInfo.crc32=c(s.data,this.streamInfo.crc32||0),this.push(s)},T.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(b,T,h){var l=b("../utils"),c=b("./GenericWorker");function n(s){c.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}l.inherits(n,c),n.prototype.processChunk=function(s){if(s){var w=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=w+s.data.length}c.prototype.processChunk.call(this,s)},T.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(b,T,h){var l=b("../utils"),c=b("./GenericWorker");function n(s){c.call(this,"DataWorker");var w=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(y){w.dataIsReady=!0,w.data=y,w.max=y&&y.length||0,w.type=l.getTypeOf(y),w.isPaused||w._tickAndRepeat()},function(y){w.error(y)})}l.inherits(n,c),n.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,l.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(l.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,w=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,w);break;case"uint8array":s=this.data.subarray(this.index,w);break;case"array":case"nodebuffer":s=this.data.slice(this.index,w)}return this.index=w,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},T.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(b,T,h){function l(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}l.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,n){return this._listeners[c].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,n){if(this._listeners[c])for(var s=0;s<this._listeners[c].length;s++)this._listeners[c][s].call(this,n)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var n=this;return c.on("data",function(s){n.processChunk(s)}),c.on("end",function(){n.end()}),c.on("error",function(s){n.error(s)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,n){return this.extraStreamInfo[c]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},T.exports=l},{}],29:[function(b,T,h){var l=b("../utils"),c=b("./ConvertWorker"),n=b("./GenericWorker"),s=b("../base64"),w=b("../support"),y=b("../external"),v=null;if(w.nodestream)try{v=b("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(u,i){return new y.Promise(function(f,a){var m=[],k=u._internalType,E=u._outputType,S=u._mimeType;u.on("data",function(L,D){m.push(L),i&&i(D)}).on("error",function(L){m=[],a(L)}).on("end",function(){try{var L=function(D,U,z){switch(D){case"blob":return l.newBlob(l.transformTo("arraybuffer",U),z);case"base64":return s.encode(U);default:return l.transformTo(D,U)}}(E,function(D,U){var z,A=0,Y=null,_=0;for(z=0;z<U.length;z++)_+=U[z].length;switch(D){case"string":return U.join("");case"array":return Array.prototype.concat.apply([],U);case"uint8array":for(Y=new Uint8Array(_),z=0;z<U.length;z++)Y.set(U[z],A),A+=U[z].length;return Y;case"nodebuffer":return Buffer.concat(U);default:throw new Error("concat : unsupported type '"+D+"'")}}(k,m),S);f(L)}catch(D){a(D)}m=[]}).resume()})}function o(u,i,f){var a=i;switch(i){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=i,this._mimeType=f,l.checkSupport(a),this._worker=u.pipe(new c(a)),u.lock()}catch(m){this._worker=new n("error"),this._worker.error(m)}}o.prototype={accumulate:function(u){return g(this,u)},on:function(u,i){var f=this;return u==="data"?this._worker.on(u,function(a){i.call(f,a.data,a.meta)}):this._worker.on(u,function(){l.delay(i,arguments,f)}),this},resume:function(){return l.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(u){if(l.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},u)}},T.exports=o},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(b,T,h){if(h.base64=!0,h.array=!0,h.string=!0,h.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",h.nodebuffer=typeof Buffer<"u",h.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")h.blob=!1;else{var l=new ArrayBuffer(0);try{h.blob=new Blob([l],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(l),h.blob=c.getBlob("application/zip").size===0}catch{h.blob=!1}}}try{h.nodestream=!!b("readable-stream").Readable}catch{h.nodestream=!1}},{"readable-stream":16}],31:[function(b,T,h){for(var l=b("./utils"),c=b("./support"),n=b("./nodejsUtils"),s=b("./stream/GenericWorker"),w=new Array(256),y=0;y<256;y++)w[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;w[254]=w[254]=1;function v(){s.call(this,"utf-8 decode"),this.leftOver=null}function g(){s.call(this,"utf-8 encode")}h.utf8encode=function(o){return c.nodebuffer?n.newBufferFrom(o,"utf-8"):function(u){var i,f,a,m,k,E=u.length,S=0;for(m=0;m<E;m++)(64512&(f=u.charCodeAt(m)))==55296&&m+1<E&&(64512&(a=u.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(a-56320),m++),S+=f<128?1:f<2048?2:f<65536?3:4;for(i=c.uint8array?new Uint8Array(S):new Array(S),m=k=0;k<S;m++)(64512&(f=u.charCodeAt(m)))==55296&&m+1<E&&(64512&(a=u.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(a-56320),m++),f<128?i[k++]=f:(f<2048?i[k++]=192|f>>>6:(f<65536?i[k++]=224|f>>>12:(i[k++]=240|f>>>18,i[k++]=128|f>>>12&63),i[k++]=128|f>>>6&63),i[k++]=128|63&f);return i}(o)},h.utf8decode=function(o){return c.nodebuffer?l.transformTo("nodebuffer",o).toString("utf-8"):function(u){var i,f,a,m,k=u.length,E=new Array(2*k);for(i=f=0;i<k;)if((a=u[i++])<128)E[f++]=a;else if(4<(m=w[a]))E[f++]=65533,i+=m-1;else{for(a&=m===2?31:m===3?15:7;1<m&&i<k;)a=a<<6|63&u[i++],m--;1<m?E[f++]=65533:a<65536?E[f++]=a:(a-=65536,E[f++]=55296|a>>10&1023,E[f++]=56320|1023&a)}return E.length!==f&&(E.subarray?E=E.subarray(0,f):E.length=f),l.applyFromCharCode(E)}(o=l.transformTo(c.uint8array?"uint8array":"array",o))},l.inherits(v,s),v.prototype.processChunk=function(o){var u=l.transformTo(c.uint8array?"uint8array":"array",o.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var i=u;(u=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),u.set(i,this.leftOver.length)}else u=this.leftOver.concat(u);this.leftOver=null}var f=function(m,k){var E;for((k=k||m.length)>m.length&&(k=m.length),E=k-1;0<=E&&(192&m[E])==128;)E--;return E<0||E===0?k:E+w[m[E]]>k?E:k}(u),a=u;f!==u.length&&(c.uint8array?(a=u.subarray(0,f),this.leftOver=u.subarray(f,u.length)):(a=u.slice(0,f),this.leftOver=u.slice(f,u.length))),this.push({data:h.utf8decode(a),meta:o.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:h.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},h.Utf8DecodeWorker=v,l.inherits(g,s),g.prototype.processChunk=function(o){this.push({data:h.utf8encode(o.data),meta:o.meta})},h.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(b,T,h){var l=b("./support"),c=b("./base64"),n=b("./nodejsUtils"),s=b("./external");function w(i){return i}function y(i,f){for(var a=0;a<i.length;++a)f[a]=255&i.charCodeAt(a);return f}b("setimmediate"),h.newBlob=function(i,f){h.checkSupport("blob");try{return new Blob([i],{type:f})}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(i),a.getBlob(f)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(i,f,a){var m=[],k=0,E=i.length;if(E<=a)return String.fromCharCode.apply(null,i);for(;k<E;)f==="array"||f==="nodebuffer"?m.push(String.fromCharCode.apply(null,i.slice(k,Math.min(k+a,E)))):m.push(String.fromCharCode.apply(null,i.subarray(k,Math.min(k+a,E)))),k+=a;return m.join("")},stringifyByChar:function(i){for(var f="",a=0;a<i.length;a++)f+=String.fromCharCode(i[a]);return f},applyCanBeUsed:{uint8array:function(){try{return l.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return l.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}}()}};function g(i){var f=65536,a=h.getTypeOf(i),m=!0;if(a==="uint8array"?m=v.applyCanBeUsed.uint8array:a==="nodebuffer"&&(m=v.applyCanBeUsed.nodebuffer),m)for(;1<f;)try{return v.stringifyByChunk(i,a,f)}catch{f=Math.floor(f/2)}return v.stringifyByChar(i)}function o(i,f){for(var a=0;a<i.length;a++)f[a]=i[a];return f}h.applyFromCharCode=g;var u={};u.string={string:w,array:function(i){return y(i,new Array(i.length))},arraybuffer:function(i){return u.string.uint8array(i).buffer},uint8array:function(i){return y(i,new Uint8Array(i.length))},nodebuffer:function(i){return y(i,n.allocBuffer(i.length))}},u.array={string:g,array:w,arraybuffer:function(i){return new Uint8Array(i).buffer},uint8array:function(i){return new Uint8Array(i)},nodebuffer:function(i){return n.newBufferFrom(i)}},u.arraybuffer={string:function(i){return g(new Uint8Array(i))},array:function(i){return o(new Uint8Array(i),new Array(i.byteLength))},arraybuffer:w,uint8array:function(i){return new Uint8Array(i)},nodebuffer:function(i){return n.newBufferFrom(new Uint8Array(i))}},u.uint8array={string:g,array:function(i){return o(i,new Array(i.length))},arraybuffer:function(i){return i.buffer},uint8array:w,nodebuffer:function(i){return n.newBufferFrom(i)}},u.nodebuffer={string:g,array:function(i){return o(i,new Array(i.length))},arraybuffer:function(i){return u.nodebuffer.uint8array(i).buffer},uint8array:function(i){return o(i,new Uint8Array(i.length))},nodebuffer:w},h.transformTo=function(i,f){if(f=f||"",!i)return f;h.checkSupport(i);var a=h.getTypeOf(f);return u[a][i](f)},h.resolve=function(i){for(var f=i.split("/"),a=[],m=0;m<f.length;m++){var k=f[m];k==="."||k===""&&m!==0&&m!==f.length-1||(k===".."?a.pop():a.push(k))}return a.join("/")},h.getTypeOf=function(i){return typeof i=="string"?"string":Object.prototype.toString.call(i)==="[object Array]"?"array":l.nodebuffer&&n.isBuffer(i)?"nodebuffer":l.uint8array&&i instanceof Uint8Array?"uint8array":l.arraybuffer&&i instanceof ArrayBuffer?"arraybuffer":void 0},h.checkSupport=function(i){if(!l[i.toLowerCase()])throw new Error(i+" is not supported by this platform")},h.MAX_VALUE_16BITS=65535,h.MAX_VALUE_32BITS=-1,h.pretty=function(i){var f,a,m="";for(a=0;a<(i||"").length;a++)m+="\\x"+((f=i.charCodeAt(a))<16?"0":"")+f.toString(16).toUpperCase();return m},h.delay=function(i,f,a){setImmediate(function(){i.apply(a||null,f||[])})},h.inherits=function(i,f){function a(){}a.prototype=f.prototype,i.prototype=new a},h.extend=function(){var i,f,a={};for(i=0;i<arguments.length;i++)for(f in arguments[i])Object.prototype.hasOwnProperty.call(arguments[i],f)&&a[f]===void 0&&(a[f]=arguments[i][f]);return a},h.prepareContent=function(i,f,a,m,k){return s.Promise.resolve(f).then(function(E){return l.blob&&(E instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(E))!==-1)&&typeof FileReader<"u"?new s.Promise(function(S,L){var D=new FileReader;D.onload=function(U){S(U.target.result)},D.onerror=function(U){L(U.target.error)},D.readAsArrayBuffer(E)}):E}).then(function(E){var S=h.getTypeOf(E);return S?(S==="arraybuffer"?E=h.transformTo("uint8array",E):S==="string"&&(k?E=c.decode(E):a&&m!==!0&&(E=function(L){return y(L,l.uint8array?new Uint8Array(L.length):new Array(L.length))}(E))),E):s.Promise.reject(new Error("Can't read the data of '"+i+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(b,T,h){var l=b("./reader/readerFor"),c=b("./utils"),n=b("./signature"),s=b("./zipEntry"),w=b("./support");function y(v){this.files=[],this.loadOptions=v}y.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var g=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(g)+", expected "+c.pretty(v)+")")}},isSignature:function(v,g){var o=this.reader.index;this.reader.setIndex(v);var u=this.reader.readString(4)===g;return this.reader.setIndex(o),u},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),g=w.uint8array?"uint8array":"array",o=c.transformTo(g,v);this.zipComment=this.loadOptions.decodeFileName(o)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,g,o,u=this.zip64EndOfCentralSize-44;0<u;)v=this.reader.readInt(2),g=this.reader.readInt(4),o=this.reader.readData(g),this.zip64ExtensibleData[v]={id:v,length:g,value:o}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,g;for(v=0;v<this.files.length;v++)g=this.files[v],this.reader.setIndex(g.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),g.readLocalPart(this.reader),g.handleUTF8(),g.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(v=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var g=v;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var o=this.centralDirOffset+this.centralDirSize;this.zip64&&(o+=20,o+=12+this.zip64EndOfCentralSize);var u=g-o;if(0<u)this.isSignature(g,n.CENTRAL_FILE_HEADER)||(this.reader.zero=u);else if(u<0)throw new Error("Corrupted zip: missing "+Math.abs(u)+" bytes.")},prepareReader:function(v){this.reader=l(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},T.exports=y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(b,T,h){var l=b("./reader/readerFor"),c=b("./utils"),n=b("./compressedObject"),s=b("./crc32"),w=b("./utf8"),y=b("./compressions"),v=b("./support");function g(o,u){this.options=o,this.loadOptions=u}g.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(o){var u,i;if(o.skip(22),this.fileNameLength=o.readInt(2),i=o.readInt(2),this.fileName=o.readData(this.fileNameLength),o.skip(i),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((u=function(f){for(var a in y)if(Object.prototype.hasOwnProperty.call(y,a)&&y[a].magic===f)return y[a];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,u,o.readData(this.compressedSize))},readCentralPart:function(o){this.versionMadeBy=o.readInt(2),o.skip(2),this.bitFlag=o.readInt(2),this.compressionMethod=o.readString(2),this.date=o.readDate(),this.crc32=o.readInt(4),this.compressedSize=o.readInt(4),this.uncompressedSize=o.readInt(4);var u=o.readInt(2);if(this.extraFieldsLength=o.readInt(2),this.fileCommentLength=o.readInt(2),this.diskNumberStart=o.readInt(2),this.internalFileAttributes=o.readInt(2),this.externalFileAttributes=o.readInt(4),this.localHeaderOffset=o.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");o.skip(u),this.readExtraFields(o),this.parseZIP64ExtraField(o),this.fileComment=o.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var o=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),o==0&&(this.dosPermissions=63&this.externalFileAttributes),o==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var o=l(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=o.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=o.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=o.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=o.readInt(4))}},readExtraFields:function(o){var u,i,f,a=o.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});o.index+4<a;)u=o.readInt(2),i=o.readInt(2),f=o.readData(i),this.extraFields[u]={id:u,length:i,value:f};o.setIndex(a)},handleUTF8:function(){var o=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=w.utf8decode(this.fileName),this.fileCommentStr=w.utf8decode(this.fileComment);else{var u=this.findExtraFieldUnicodePath();if(u!==null)this.fileNameStr=u;else{var i=c.transformTo(o,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var f=this.findExtraFieldUnicodeComment();if(f!==null)this.fileCommentStr=f;else{var a=c.transformTo(o,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var o=this.extraFields[28789];if(o){var u=l(o.value);return u.readInt(1)!==1||s(this.fileName)!==u.readInt(4)?null:w.utf8decode(u.readData(o.length-5))}return null},findExtraFieldUnicodeComment:function(){var o=this.extraFields[25461];if(o){var u=l(o.value);return u.readInt(1)!==1||s(this.fileComment)!==u.readInt(4)?null:w.utf8decode(u.readData(o.length-5))}return null}},T.exports=g},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(b,T,h){function l(u,i,f){this.name=u,this.dir=f.dir,this.date=f.date,this.comment=f.comment,this.unixPermissions=f.unixPermissions,this.dosPermissions=f.dosPermissions,this._data=i,this._dataBinary=f.binary,this.options={compression:f.compression,compressionOptions:f.compressionOptions}}var c=b("./stream/StreamHelper"),n=b("./stream/DataWorker"),s=b("./utf8"),w=b("./compressedObject"),y=b("./stream/GenericWorker");l.prototype={internalStream:function(u){var i=null,f="string";try{if(!u)throw new Error("No output type specified.");var a=(f=u.toLowerCase())==="string"||f==="text";f!=="binarystring"&&f!=="text"||(f="string"),i=this._decompressWorker();var m=!this._dataBinary;m&&!a&&(i=i.pipe(new s.Utf8EncodeWorker)),!m&&a&&(i=i.pipe(new s.Utf8DecodeWorker))}catch(k){(i=new y("error")).error(k)}return new c(i,f,"")},async:function(u,i){return this.internalStream(u).accumulate(i)},nodeStream:function(u,i){return this.internalStream(u||"nodebuffer").toNodejsStream(i)},_compressWorker:function(u,i){if(this._data instanceof w&&this._data.compression.magic===u.magic)return this._data.getCompressedWorker();var f=this._decompressWorker();return this._dataBinary||(f=f.pipe(new s.Utf8EncodeWorker)),w.createWorkerFrom(f,u,i)},_decompressWorker:function(){return this._data instanceof w?this._data.getContentWorker():this._data instanceof y?this._data:new n(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],g=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},o=0;o<v.length;o++)l.prototype[v[o]]=g;T.exports=l},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(b,T,h){(function(l){var c,n,s=l.MutationObserver||l.WebKitMutationObserver;if(s){var w=0,y=new s(u),v=l.document.createTextNode("");y.observe(v,{characterData:!0}),c=function(){v.data=w=++w%2}}else if(l.setImmediate||l.MessageChannel===void 0)c="document"in l&&"onreadystatechange"in l.document.createElement("script")?function(){var i=l.document.createElement("script");i.onreadystatechange=function(){u(),i.onreadystatechange=null,i.parentNode.removeChild(i),i=null},l.document.documentElement.appendChild(i)}:function(){setTimeout(u,0)};else{var g=new l.MessageChannel;g.port1.onmessage=u,c=function(){g.port2.postMessage(0)}}var o=[];function u(){var i,f;n=!0;for(var a=o.length;a;){for(f=o,o=[],i=-1;++i<a;)f[i]();a=o.length}n=!1}T.exports=function(i){o.push(i)!==1||n||c()}}).call(this,typeof Bt<"u"?Bt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(b,T,h){var l=b("immediate");function c(){}var n={},s=["REJECTED"],w=["FULFILLED"],y=["PENDING"];function v(a){if(typeof a!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,a!==c&&i(this,a)}function g(a,m,k){this.promise=a,typeof m=="function"&&(this.onFulfilled=m,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function o(a,m,k){l(function(){var E;try{E=m(k)}catch(S){return n.reject(a,S)}E===a?n.reject(a,new TypeError("Cannot resolve promise with itself")):n.resolve(a,E)})}function u(a){var m=a&&a.then;if(a&&(typeof a=="object"||typeof a=="function")&&typeof m=="function")return function(){m.apply(a,arguments)}}function i(a,m){var k=!1;function E(D){k||(k=!0,n.reject(a,D))}function S(D){k||(k=!0,n.resolve(a,D))}var L=f(function(){m(S,E)});L.status==="error"&&E(L.value)}function f(a,m){var k={};try{k.value=a(m),k.status="success"}catch(E){k.status="error",k.value=E}return k}(T.exports=v).prototype.finally=function(a){if(typeof a!="function")return this;var m=this.constructor;return this.then(function(k){return m.resolve(a()).then(function(){return k})},function(k){return m.resolve(a()).then(function(){throw k})})},v.prototype.catch=function(a){return this.then(null,a)},v.prototype.then=function(a,m){if(typeof a!="function"&&this.state===w||typeof m!="function"&&this.state===s)return this;var k=new this.constructor(c);return this.state!==y?o(k,this.state===w?a:m,this.outcome):this.queue.push(new g(k,a,m)),k},g.prototype.callFulfilled=function(a){n.resolve(this.promise,a)},g.prototype.otherCallFulfilled=function(a){o(this.promise,this.onFulfilled,a)},g.prototype.callRejected=function(a){n.reject(this.promise,a)},g.prototype.otherCallRejected=function(a){o(this.promise,this.onRejected,a)},n.resolve=function(a,m){var k=f(u,m);if(k.status==="error")return n.reject(a,k.value);var E=k.value;if(E)i(a,E);else{a.state=w,a.outcome=m;for(var S=-1,L=a.queue.length;++S<L;)a.queue[S].callFulfilled(m)}return a},n.reject=function(a,m){a.state=s,a.outcome=m;for(var k=-1,E=a.queue.length;++k<E;)a.queue[k].callRejected(m);return a},v.resolve=function(a){return a instanceof this?a:n.resolve(new this(c),a)},v.reject=function(a){var m=new this(c);return n.reject(m,a)},v.all=function(a){var m=this;if(Object.prototype.toString.call(a)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=a.length,E=!1;if(!k)return this.resolve([]);for(var S=new Array(k),L=0,D=-1,U=new this(c);++D<k;)z(a[D],D);return U;function z(A,Y){m.resolve(A).then(function(_){S[Y]=_,++L!==k||E||(E=!0,n.resolve(U,S))},function(_){E||(E=!0,n.reject(U,_))})}},v.race=function(a){var m=this;if(Object.prototype.toString.call(a)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=a.length,E=!1;if(!k)return this.resolve([]);for(var S=-1,L=new this(c);++S<k;)D=a[S],m.resolve(D).then(function(U){E||(E=!0,n.resolve(L,U))},function(U){E||(E=!0,n.reject(L,U))});var D;return L}},{immediate:36}],38:[function(b,T,h){var l={};(0,b("./lib/utils/common").assign)(l,b("./lib/deflate"),b("./lib/inflate"),b("./lib/zlib/constants")),T.exports=l},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(b,T,h){var l=b("./zlib/deflate"),c=b("./utils/common"),n=b("./utils/strings"),s=b("./zlib/messages"),w=b("./zlib/zstream"),y=Object.prototype.toString,v=0,g=-1,o=0,u=8;function i(a){if(!(this instanceof i))return new i(a);this.options=c.assign({level:g,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:o,to:""},a||{});var m=this.options;m.raw&&0<m.windowBits?m.windowBits=-m.windowBits:m.gzip&&0<m.windowBits&&m.windowBits<16&&(m.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var k=l.deflateInit2(this.strm,m.level,m.method,m.windowBits,m.memLevel,m.strategy);if(k!==v)throw new Error(s[k]);if(m.header&&l.deflateSetHeader(this.strm,m.header),m.dictionary){var E;if(E=typeof m.dictionary=="string"?n.string2buf(m.dictionary):y.call(m.dictionary)==="[object ArrayBuffer]"?new Uint8Array(m.dictionary):m.dictionary,(k=l.deflateSetDictionary(this.strm,E))!==v)throw new Error(s[k]);this._dict_set=!0}}function f(a,m){var k=new i(m);if(k.push(a,!0),k.err)throw k.msg||s[k.err];return k.result}i.prototype.push=function(a,m){var k,E,S=this.strm,L=this.options.chunkSize;if(this.ended)return!1;E=m===~~m?m:m===!0?4:0,typeof a=="string"?S.input=n.string2buf(a):y.call(a)==="[object ArrayBuffer]"?S.input=new Uint8Array(a):S.input=a,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new c.Buf8(L),S.next_out=0,S.avail_out=L),(k=l.deflate(S,E))!==1&&k!==v)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||E!==4&&E!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(c.shrinkBuf(S.output,S.next_out))):this.onData(c.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return E===4?(k=l.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===v):E!==2||(this.onEnd(v),!(S.avail_out=0))},i.prototype.onData=function(a){this.chunks.push(a)},i.prototype.onEnd=function(a){a===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},h.Deflate=i,h.deflate=f,h.deflateRaw=function(a,m){return(m=m||{}).raw=!0,f(a,m)},h.gzip=function(a,m){return(m=m||{}).gzip=!0,f(a,m)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(b,T,h){var l=b("./zlib/inflate"),c=b("./utils/common"),n=b("./utils/strings"),s=b("./zlib/constants"),w=b("./zlib/messages"),y=b("./zlib/zstream"),v=b("./zlib/gzheader"),g=Object.prototype.toString;function o(i){if(!(this instanceof o))return new o(i);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},i||{});var f=this.options;f.raw&&0<=f.windowBits&&f.windowBits<16&&(f.windowBits=-f.windowBits,f.windowBits===0&&(f.windowBits=-15)),!(0<=f.windowBits&&f.windowBits<16)||i&&i.windowBits||(f.windowBits+=32),15<f.windowBits&&f.windowBits<48&&!(15&f.windowBits)&&(f.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new y,this.strm.avail_out=0;var a=l.inflateInit2(this.strm,f.windowBits);if(a!==s.Z_OK)throw new Error(w[a]);this.header=new v,l.inflateGetHeader(this.strm,this.header)}function u(i,f){var a=new o(f);if(a.push(i,!0),a.err)throw a.msg||w[a.err];return a.result}o.prototype.push=function(i,f){var a,m,k,E,S,L,D=this.strm,U=this.options.chunkSize,z=this.options.dictionary,A=!1;if(this.ended)return!1;m=f===~~f?f:f===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof i=="string"?D.input=n.binstring2buf(i):g.call(i)==="[object ArrayBuffer]"?D.input=new Uint8Array(i):D.input=i,D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0&&(D.output=new c.Buf8(U),D.next_out=0,D.avail_out=U),(a=l.inflate(D,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&z&&(L=typeof z=="string"?n.string2buf(z):g.call(z)==="[object ArrayBuffer]"?new Uint8Array(z):z,a=l.inflateSetDictionary(this.strm,L)),a===s.Z_BUF_ERROR&&A===!0&&(a=s.Z_OK,A=!1),a!==s.Z_STREAM_END&&a!==s.Z_OK)return this.onEnd(a),!(this.ended=!0);D.next_out&&(D.avail_out!==0&&a!==s.Z_STREAM_END&&(D.avail_in!==0||m!==s.Z_FINISH&&m!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=n.utf8border(D.output,D.next_out),E=D.next_out-k,S=n.buf2string(D.output,k),D.next_out=E,D.avail_out=U-E,E&&c.arraySet(D.output,D.output,k,E,0),this.onData(S)):this.onData(c.shrinkBuf(D.output,D.next_out)))),D.avail_in===0&&D.avail_out===0&&(A=!0)}while((0<D.avail_in||D.avail_out===0)&&a!==s.Z_STREAM_END);return a===s.Z_STREAM_END&&(m=s.Z_FINISH),m===s.Z_FINISH?(a=l.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===s.Z_OK):m!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(D.avail_out=0))},o.prototype.onData=function(i){this.chunks.push(i)},o.prototype.onEnd=function(i){i===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg},h.Inflate=o,h.inflate=u,h.inflateRaw=function(i,f){return(f=f||{}).raw=!0,u(i,f)},h.ungzip=u},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(b,T,h){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";h.assign=function(s){for(var w=Array.prototype.slice.call(arguments,1);w.length;){var y=w.shift();if(y){if(typeof y!="object")throw new TypeError(y+"must be non-object");for(var v in y)y.hasOwnProperty(v)&&(s[v]=y[v])}}return s},h.shrinkBuf=function(s,w){return s.length===w?s:s.subarray?s.subarray(0,w):(s.length=w,s)};var c={arraySet:function(s,w,y,v,g){if(w.subarray&&s.subarray)s.set(w.subarray(y,y+v),g);else for(var o=0;o<v;o++)s[g+o]=w[y+o]},flattenChunks:function(s){var w,y,v,g,o,u;for(w=v=0,y=s.length;w<y;w++)v+=s[w].length;for(u=new Uint8Array(v),w=g=0,y=s.length;w<y;w++)o=s[w],u.set(o,g),g+=o.length;return u}},n={arraySet:function(s,w,y,v,g){for(var o=0;o<v;o++)s[g+o]=w[y+o]},flattenChunks:function(s){return[].concat.apply([],s)}};h.setTyped=function(s){s?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,c)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,n))},h.setTyped(l)},{}],42:[function(b,T,h){var l=b("./common"),c=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var s=new l.Buf8(256),w=0;w<256;w++)s[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;function y(v,g){if(g<65537&&(v.subarray&&n||!v.subarray&&c))return String.fromCharCode.apply(null,l.shrinkBuf(v,g));for(var o="",u=0;u<g;u++)o+=String.fromCharCode(v[u]);return o}s[254]=s[254]=1,h.string2buf=function(v){var g,o,u,i,f,a=v.length,m=0;for(i=0;i<a;i++)(64512&(o=v.charCodeAt(i)))==55296&&i+1<a&&(64512&(u=v.charCodeAt(i+1)))==56320&&(o=65536+(o-55296<<10)+(u-56320),i++),m+=o<128?1:o<2048?2:o<65536?3:4;for(g=new l.Buf8(m),i=f=0;f<m;i++)(64512&(o=v.charCodeAt(i)))==55296&&i+1<a&&(64512&(u=v.charCodeAt(i+1)))==56320&&(o=65536+(o-55296<<10)+(u-56320),i++),o<128?g[f++]=o:(o<2048?g[f++]=192|o>>>6:(o<65536?g[f++]=224|o>>>12:(g[f++]=240|o>>>18,g[f++]=128|o>>>12&63),g[f++]=128|o>>>6&63),g[f++]=128|63&o);return g},h.buf2binstring=function(v){return y(v,v.length)},h.binstring2buf=function(v){for(var g=new l.Buf8(v.length),o=0,u=g.length;o<u;o++)g[o]=v.charCodeAt(o);return g},h.buf2string=function(v,g){var o,u,i,f,a=g||v.length,m=new Array(2*a);for(o=u=0;o<a;)if((i=v[o++])<128)m[u++]=i;else if(4<(f=s[i]))m[u++]=65533,o+=f-1;else{for(i&=f===2?31:f===3?15:7;1<f&&o<a;)i=i<<6|63&v[o++],f--;1<f?m[u++]=65533:i<65536?m[u++]=i:(i-=65536,m[u++]=55296|i>>10&1023,m[u++]=56320|1023&i)}return y(m,u)},h.utf8border=function(v,g){var o;for((g=g||v.length)>v.length&&(g=v.length),o=g-1;0<=o&&(192&v[o])==128;)o--;return o<0||o===0?g:o+s[v[o]]>g?o:g}},{"./common":41}],43:[function(b,T,h){T.exports=function(l,c,n,s){for(var w=65535&l|0,y=l>>>16&65535|0,v=0;n!==0;){for(n-=v=2e3<n?2e3:n;y=y+(w=w+c[s++]|0)|0,--v;);w%=65521,y%=65521}return w|y<<16|0}},{}],44:[function(b,T,h){T.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(b,T,h){var l=function(){for(var c,n=[],s=0;s<256;s++){c=s;for(var w=0;w<8;w++)c=1&c?3988292384^c>>>1:c>>>1;n[s]=c}return n}();T.exports=function(c,n,s,w){var y=l,v=w+s;c^=-1;for(var g=w;g<v;g++)c=c>>>8^y[255&(c^n[g])];return-1^c}},{}],46:[function(b,T,h){var l,c=b("../utils/common"),n=b("./trees"),s=b("./adler32"),w=b("./crc32"),y=b("./messages"),v=0,g=4,o=0,u=-2,i=-1,f=4,a=2,m=8,k=9,E=286,S=30,L=19,D=2*E+1,U=15,z=3,A=258,Y=A+z+1,_=42,I=113,r=1,N=2,K=3,R=4;function $(e,P){return e.msg=y[P],P}function Z(e){return(e<<1)-(4<e?9:0)}function tt(e){for(var P=e.length;0<=--P;)e[P]=0}function B(e){var P=e.state,F=P.pending;F>e.avail_out&&(F=e.avail_out),F!==0&&(c.arraySet(e.output,P.pending_buf,P.pending_out,F,e.next_out),e.next_out+=F,P.pending_out+=F,e.total_out+=F,e.avail_out-=F,P.pending-=F,P.pending===0&&(P.pending_out=0))}function O(e,P){n._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,P),e.block_start=e.strstart,B(e.strm)}function Q(e,P){e.pending_buf[e.pending++]=P}function G(e,P){e.pending_buf[e.pending++]=P>>>8&255,e.pending_buf[e.pending++]=255&P}function H(e,P){var F,p,d=e.max_chain_length,x=e.strstart,j=e.prev_length,W=e.nice_match,C=e.strstart>e.w_size-Y?e.strstart-(e.w_size-Y):0,M=e.window,V=e.w_mask,q=e.prev,et=e.strstart+A,ct=M[x+j-1],ot=M[x+j];e.prev_length>=e.good_match&&(d>>=2),W>e.lookahead&&(W=e.lookahead);do if(M[(F=P)+j]===ot&&M[F+j-1]===ct&&M[F]===M[x]&&M[++F]===M[x+1]){x+=2,F++;do;while(M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&M[++x]===M[++F]&&x<et);if(p=A-(et-x),x=et-A,j<p){if(e.match_start=P,W<=(j=p))break;ct=M[x+j-1],ot=M[x+j]}}while((P=q[P&V])>C&&--d!=0);return j<=e.lookahead?j:e.lookahead}function at(e){var P,F,p,d,x,j,W,C,M,V,q=e.w_size;do{if(d=e.window_size-e.lookahead-e.strstart,e.strstart>=q+(q-Y)){for(c.arraySet(e.window,e.window,q,q,0),e.match_start-=q,e.strstart-=q,e.block_start-=q,P=F=e.hash_size;p=e.head[--P],e.head[P]=q<=p?p-q:0,--F;);for(P=F=q;p=e.prev[--P],e.prev[P]=q<=p?p-q:0,--F;);d+=q}if(e.strm.avail_in===0)break;if(j=e.strm,W=e.window,C=e.strstart+e.lookahead,M=d,V=void 0,V=j.avail_in,M<V&&(V=M),F=V===0?0:(j.avail_in-=V,c.arraySet(W,j.input,j.next_in,V,C),j.state.wrap===1?j.adler=s(j.adler,W,V,C):j.state.wrap===2&&(j.adler=w(j.adler,W,V,C)),j.next_in+=V,j.total_in+=V,V),e.lookahead+=F,e.lookahead+e.insert>=z)for(x=e.strstart-e.insert,e.ins_h=e.window[x],e.ins_h=(e.ins_h<<e.hash_shift^e.window[x+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[x+z-1])&e.hash_mask,e.prev[x&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=x,x++,e.insert--,!(e.lookahead+e.insert<z)););}while(e.lookahead<Y&&e.strm.avail_in!==0)}function st(e,P){for(var F,p;;){if(e.lookahead<Y){if(at(e),e.lookahead<Y&&P===v)return r;if(e.lookahead===0)break}if(F=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),F!==0&&e.strstart-F<=e.w_size-Y&&(e.match_length=H(e,F)),e.match_length>=z)if(p=n._tr_tally(e,e.strstart-e.match_start,e.match_length-z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=z){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else p=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(p&&(O(e,!1),e.strm.avail_out===0))return r}return e.insert=e.strstart<z-1?e.strstart:z-1,P===g?(O(e,!0),e.strm.avail_out===0?K:R):e.last_lit&&(O(e,!1),e.strm.avail_out===0)?r:N}function rt(e,P){for(var F,p,d;;){if(e.lookahead<Y){if(at(e),e.lookahead<Y&&P===v)return r;if(e.lookahead===0)break}if(F=0,e.lookahead>=z&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=z-1,F!==0&&e.prev_length<e.max_lazy_match&&e.strstart-F<=e.w_size-Y&&(e.match_length=H(e,F),e.match_length<=5&&(e.strategy===1||e.match_length===z&&4096<e.strstart-e.match_start)&&(e.match_length=z-1)),e.prev_length>=z&&e.match_length<=e.prev_length){for(d=e.strstart+e.lookahead-z,p=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-z),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=d&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+z-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=z-1,e.strstart++,p&&(O(e,!1),e.strm.avail_out===0))return r}else if(e.match_available){if((p=n._tr_tally(e,0,e.window[e.strstart-1]))&&O(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return r}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(p=n._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<z-1?e.strstart:z-1,P===g?(O(e,!0),e.strm.avail_out===0?K:R):e.last_lit&&(O(e,!1),e.strm.avail_out===0)?r:N}function it(e,P,F,p,d){this.good_length=e,this.max_lazy=P,this.nice_length=F,this.max_chain=p,this.func=d}function lt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*D),this.dyn_dtree=new c.Buf16(2*(2*S+1)),this.bl_tree=new c.Buf16(2*(2*L+1)),tt(this.dyn_ltree),tt(this.dyn_dtree),tt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(U+1),this.heap=new c.Buf16(2*E+1),tt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*E+1),tt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function dt(e){var P;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=a,(P=e.state).pending=0,P.pending_out=0,P.wrap<0&&(P.wrap=-P.wrap),P.status=P.wrap?_:I,e.adler=P.wrap===2?0:1,P.last_flush=v,n._tr_init(P),o):$(e,u)}function ut(e){var P=dt(e);return P===o&&function(F){F.window_size=2*F.w_size,tt(F.head),F.max_lazy_match=l[F.level].max_lazy,F.good_match=l[F.level].good_length,F.nice_match=l[F.level].nice_length,F.max_chain_length=l[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=z-1,F.match_available=0,F.ins_h=0}(e.state),P}function ht(e,P,F,p,d,x){if(!e)return u;var j=1;if(P===i&&(P=6),p<0?(j=0,p=-p):15<p&&(j=2,p-=16),d<1||k<d||F!==m||p<8||15<p||P<0||9<P||x<0||f<x)return $(e,u);p===8&&(p=9);var W=new lt;return(e.state=W).strm=e,W.wrap=j,W.gzhead=null,W.w_bits=p,W.w_size=1<<W.w_bits,W.w_mask=W.w_size-1,W.hash_bits=d+7,W.hash_size=1<<W.hash_bits,W.hash_mask=W.hash_size-1,W.hash_shift=~~((W.hash_bits+z-1)/z),W.window=new c.Buf8(2*W.w_size),W.head=new c.Buf16(W.hash_size),W.prev=new c.Buf16(W.w_size),W.lit_bufsize=1<<d+6,W.pending_buf_size=4*W.lit_bufsize,W.pending_buf=new c.Buf8(W.pending_buf_size),W.d_buf=1*W.lit_bufsize,W.l_buf=3*W.lit_bufsize,W.level=P,W.strategy=x,W.method=F,ut(e)}l=[new it(0,0,0,0,function(e,P){var F=65535;for(F>e.pending_buf_size-5&&(F=e.pending_buf_size-5);;){if(e.lookahead<=1){if(at(e),e.lookahead===0&&P===v)return r;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var p=e.block_start+F;if((e.strstart===0||e.strstart>=p)&&(e.lookahead=e.strstart-p,e.strstart=p,O(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Y&&(O(e,!1),e.strm.avail_out===0))return r}return e.insert=0,P===g?(O(e,!0),e.strm.avail_out===0?K:R):(e.strstart>e.block_start&&(O(e,!1),e.strm.avail_out),r)}),new it(4,4,8,4,st),new it(4,5,16,8,st),new it(4,6,32,32,st),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)],h.deflateInit=function(e,P){return ht(e,P,m,15,8,0)},h.deflateInit2=ht,h.deflateReset=ut,h.deflateResetKeep=dt,h.deflateSetHeader=function(e,P){return e&&e.state?e.state.wrap!==2?u:(e.state.gzhead=P,o):u},h.deflate=function(e,P){var F,p,d,x;if(!e||!e.state||5<P||P<0)return e?$(e,u):u;if(p=e.state,!e.output||!e.input&&e.avail_in!==0||p.status===666&&P!==g)return $(e,e.avail_out===0?-5:u);if(p.strm=e,F=p.last_flush,p.last_flush=P,p.status===_)if(p.wrap===2)e.adler=0,Q(p,31),Q(p,139),Q(p,8),p.gzhead?(Q(p,(p.gzhead.text?1:0)+(p.gzhead.hcrc?2:0)+(p.gzhead.extra?4:0)+(p.gzhead.name?8:0)+(p.gzhead.comment?16:0)),Q(p,255&p.gzhead.time),Q(p,p.gzhead.time>>8&255),Q(p,p.gzhead.time>>16&255),Q(p,p.gzhead.time>>24&255),Q(p,p.level===9?2:2<=p.strategy||p.level<2?4:0),Q(p,255&p.gzhead.os),p.gzhead.extra&&p.gzhead.extra.length&&(Q(p,255&p.gzhead.extra.length),Q(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(e.adler=w(e.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=69):(Q(p,0),Q(p,0),Q(p,0),Q(p,0),Q(p,0),Q(p,p.level===9?2:2<=p.strategy||p.level<2?4:0),Q(p,3),p.status=I);else{var j=m+(p.w_bits-8<<4)<<8;j|=(2<=p.strategy||p.level<2?0:p.level<6?1:p.level===6?2:3)<<6,p.strstart!==0&&(j|=32),j+=31-j%31,p.status=I,G(p,j),p.strstart!==0&&(G(p,e.adler>>>16),G(p,65535&e.adler)),e.adler=1}if(p.status===69)if(p.gzhead.extra){for(d=p.pending;p.gzindex<(65535&p.gzhead.extra.length)&&(p.pending!==p.pending_buf_size||(p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),B(e),d=p.pending,p.pending!==p.pending_buf_size));)Q(p,255&p.gzhead.extra[p.gzindex]),p.gzindex++;p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),p.gzindex===p.gzhead.extra.length&&(p.gzindex=0,p.status=73)}else p.status=73;if(p.status===73)if(p.gzhead.name){d=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),B(e),d=p.pending,p.pending===p.pending_buf_size)){x=1;break}x=p.gzindex<p.gzhead.name.length?255&p.gzhead.name.charCodeAt(p.gzindex++):0,Q(p,x)}while(x!==0);p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),x===0&&(p.gzindex=0,p.status=91)}else p.status=91;if(p.status===91)if(p.gzhead.comment){d=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),B(e),d=p.pending,p.pending===p.pending_buf_size)){x=1;break}x=p.gzindex<p.gzhead.comment.length?255&p.gzhead.comment.charCodeAt(p.gzindex++):0,Q(p,x)}while(x!==0);p.gzhead.hcrc&&p.pending>d&&(e.adler=w(e.adler,p.pending_buf,p.pending-d,d)),x===0&&(p.status=103)}else p.status=103;if(p.status===103&&(p.gzhead.hcrc?(p.pending+2>p.pending_buf_size&&B(e),p.pending+2<=p.pending_buf_size&&(Q(p,255&e.adler),Q(p,e.adler>>8&255),e.adler=0,p.status=I)):p.status=I),p.pending!==0){if(B(e),e.avail_out===0)return p.last_flush=-1,o}else if(e.avail_in===0&&Z(P)<=Z(F)&&P!==g)return $(e,-5);if(p.status===666&&e.avail_in!==0)return $(e,-5);if(e.avail_in!==0||p.lookahead!==0||P!==v&&p.status!==666){var W=p.strategy===2?function(C,M){for(var V;;){if(C.lookahead===0&&(at(C),C.lookahead===0)){if(M===v)return r;break}if(C.match_length=0,V=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,V&&(O(C,!1),C.strm.avail_out===0))return r}return C.insert=0,M===g?(O(C,!0),C.strm.avail_out===0?K:R):C.last_lit&&(O(C,!1),C.strm.avail_out===0)?r:N}(p,P):p.strategy===3?function(C,M){for(var V,q,et,ct,ot=C.window;;){if(C.lookahead<=A){if(at(C),C.lookahead<=A&&M===v)return r;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=z&&0<C.strstart&&(q=ot[et=C.strstart-1])===ot[++et]&&q===ot[++et]&&q===ot[++et]){ct=C.strstart+A;do;while(q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&q===ot[++et]&&et<ct);C.match_length=A-(ct-et),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=z?(V=n._tr_tally(C,1,C.match_length-z),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(V=n._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),V&&(O(C,!1),C.strm.avail_out===0))return r}return C.insert=0,M===g?(O(C,!0),C.strm.avail_out===0?K:R):C.last_lit&&(O(C,!1),C.strm.avail_out===0)?r:N}(p,P):l[p.level].func(p,P);if(W!==K&&W!==R||(p.status=666),W===r||W===K)return e.avail_out===0&&(p.last_flush=-1),o;if(W===N&&(P===1?n._tr_align(p):P!==5&&(n._tr_stored_block(p,0,0,!1),P===3&&(tt(p.head),p.lookahead===0&&(p.strstart=0,p.block_start=0,p.insert=0))),B(e),e.avail_out===0))return p.last_flush=-1,o}return P!==g?o:p.wrap<=0?1:(p.wrap===2?(Q(p,255&e.adler),Q(p,e.adler>>8&255),Q(p,e.adler>>16&255),Q(p,e.adler>>24&255),Q(p,255&e.total_in),Q(p,e.total_in>>8&255),Q(p,e.total_in>>16&255),Q(p,e.total_in>>24&255)):(G(p,e.adler>>>16),G(p,65535&e.adler)),B(e),0<p.wrap&&(p.wrap=-p.wrap),p.pending!==0?o:1)},h.deflateEnd=function(e){var P;return e&&e.state?(P=e.state.status)!==_&&P!==69&&P!==73&&P!==91&&P!==103&&P!==I&&P!==666?$(e,u):(e.state=null,P===I?$(e,-3):o):u},h.deflateSetDictionary=function(e,P){var F,p,d,x,j,W,C,M,V=P.length;if(!e||!e.state||(x=(F=e.state).wrap)===2||x===1&&F.status!==_||F.lookahead)return u;for(x===1&&(e.adler=s(e.adler,P,V,0)),F.wrap=0,V>=F.w_size&&(x===0&&(tt(F.head),F.strstart=0,F.block_start=0,F.insert=0),M=new c.Buf8(F.w_size),c.arraySet(M,P,V-F.w_size,F.w_size,0),P=M,V=F.w_size),j=e.avail_in,W=e.next_in,C=e.input,e.avail_in=V,e.next_in=0,e.input=P,at(F);F.lookahead>=z;){for(p=F.strstart,d=F.lookahead-(z-1);F.ins_h=(F.ins_h<<F.hash_shift^F.window[p+z-1])&F.hash_mask,F.prev[p&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=p,p++,--d;);F.strstart=p,F.lookahead=z-1,at(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=z-1,F.match_available=0,e.next_in=W,e.input=C,e.avail_in=j,F.wrap=x,o},h.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(b,T,h){T.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(b,T,h){T.exports=function(l,c){var n,s,w,y,v,g,o,u,i,f,a,m,k,E,S,L,D,U,z,A,Y,_,I,r,N;n=l.state,s=l.next_in,r=l.input,w=s+(l.avail_in-5),y=l.next_out,N=l.output,v=y-(c-l.avail_out),g=y+(l.avail_out-257),o=n.dmax,u=n.wsize,i=n.whave,f=n.wnext,a=n.window,m=n.hold,k=n.bits,E=n.lencode,S=n.distcode,L=(1<<n.lenbits)-1,D=(1<<n.distbits)-1;t:do{k<15&&(m+=r[s++]<<k,k+=8,m+=r[s++]<<k,k+=8),U=E[m&L];e:for(;;){if(m>>>=z=U>>>24,k-=z,(z=U>>>16&255)===0)N[y++]=65535&U;else{if(!(16&z)){if(!(64&z)){U=E[(65535&U)+(m&(1<<z)-1)];continue e}if(32&z){n.mode=12;break t}l.msg="invalid literal/length code",n.mode=30;break t}A=65535&U,(z&=15)&&(k<z&&(m+=r[s++]<<k,k+=8),A+=m&(1<<z)-1,m>>>=z,k-=z),k<15&&(m+=r[s++]<<k,k+=8,m+=r[s++]<<k,k+=8),U=S[m&D];r:for(;;){if(m>>>=z=U>>>24,k-=z,!(16&(z=U>>>16&255))){if(!(64&z)){U=S[(65535&U)+(m&(1<<z)-1)];continue r}l.msg="invalid distance code",n.mode=30;break t}if(Y=65535&U,k<(z&=15)&&(m+=r[s++]<<k,(k+=8)<z&&(m+=r[s++]<<k,k+=8)),o<(Y+=m&(1<<z)-1)){l.msg="invalid distance too far back",n.mode=30;break t}if(m>>>=z,k-=z,(z=y-v)<Y){if(i<(z=Y-z)&&n.sane){l.msg="invalid distance too far back",n.mode=30;break t}if(I=a,(_=0)===f){if(_+=u-z,z<A){for(A-=z;N[y++]=a[_++],--z;);_=y-Y,I=N}}else if(f<z){if(_+=u+f-z,(z-=f)<A){for(A-=z;N[y++]=a[_++],--z;);if(_=0,f<A){for(A-=z=f;N[y++]=a[_++],--z;);_=y-Y,I=N}}}else if(_+=f-z,z<A){for(A-=z;N[y++]=a[_++],--z;);_=y-Y,I=N}for(;2<A;)N[y++]=I[_++],N[y++]=I[_++],N[y++]=I[_++],A-=3;A&&(N[y++]=I[_++],1<A&&(N[y++]=I[_++]))}else{for(_=y-Y;N[y++]=N[_++],N[y++]=N[_++],N[y++]=N[_++],2<(A-=3););A&&(N[y++]=N[_++],1<A&&(N[y++]=N[_++]))}break}}break}}while(s<w&&y<g);s-=A=k>>3,m&=(1<<(k-=A<<3))-1,l.next_in=s,l.next_out=y,l.avail_in=s<w?w-s+5:5-(s-w),l.avail_out=y<g?g-y+257:257-(y-g),n.hold=m,n.bits=k}},{}],49:[function(b,T,h){var l=b("../utils/common"),c=b("./adler32"),n=b("./crc32"),s=b("./inffast"),w=b("./inftrees"),y=1,v=2,g=0,o=-2,u=1,i=852,f=592;function a(_){return(_>>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new l.Buf16(320),this.work=new l.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(_){var I;return _&&_.state?(I=_.state,_.total_in=_.total_out=I.total=0,_.msg="",I.wrap&&(_.adler=1&I.wrap),I.mode=u,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new l.Buf32(i),I.distcode=I.distdyn=new l.Buf32(f),I.sane=1,I.back=-1,g):o}function E(_){var I;return _&&_.state?((I=_.state).wsize=0,I.whave=0,I.wnext=0,k(_)):o}function S(_,I){var r,N;return _&&_.state?(N=_.state,I<0?(r=0,I=-I):(r=1+(I>>4),I<48&&(I&=15)),I&&(I<8||15<I)?o:(N.window!==null&&N.wbits!==I&&(N.window=null),N.wrap=r,N.wbits=I,E(_))):o}function L(_,I){var r,N;return _?(N=new m,(_.state=N).window=null,(r=S(_,I))!==g&&(_.state=null),r):o}var D,U,z=!0;function A(_){if(z){var I;for(D=new l.Buf32(512),U=new l.Buf32(32),I=0;I<144;)_.lens[I++]=8;for(;I<256;)_.lens[I++]=9;for(;I<280;)_.lens[I++]=7;for(;I<288;)_.lens[I++]=8;for(w(y,_.lens,0,288,D,0,_.work,{bits:9}),I=0;I<32;)_.lens[I++]=5;w(v,_.lens,0,32,U,0,_.work,{bits:5}),z=!1}_.lencode=D,_.lenbits=9,_.distcode=U,_.distbits=5}function Y(_,I,r,N){var K,R=_.state;return R.window===null&&(R.wsize=1<<R.wbits,R.wnext=0,R.whave=0,R.window=new l.Buf8(R.wsize)),N>=R.wsize?(l.arraySet(R.window,I,r-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(N<(K=R.wsize-R.wnext)&&(K=N),l.arraySet(R.window,I,r-N,K,R.wnext),(N-=K)?(l.arraySet(R.window,I,r-N,N,0),R.wnext=N,R.whave=R.wsize):(R.wnext+=K,R.wnext===R.wsize&&(R.wnext=0),R.whave<R.wsize&&(R.whave+=K))),0}h.inflateReset=E,h.inflateReset2=S,h.inflateResetKeep=k,h.inflateInit=function(_){return L(_,15)},h.inflateInit2=L,h.inflate=function(_,I){var r,N,K,R,$,Z,tt,B,O,Q,G,H,at,st,rt,it,lt,dt,ut,ht,e,P,F,p,d=0,x=new l.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!_||!_.state||!_.output||!_.input&&_.avail_in!==0)return o;(r=_.state).mode===12&&(r.mode=13),$=_.next_out,K=_.output,tt=_.avail_out,R=_.next_in,N=_.input,Z=_.avail_in,B=r.hold,O=r.bits,Q=Z,G=tt,P=g;t:for(;;)switch(r.mode){case u:if(r.wrap===0){r.mode=13;break}for(;O<16;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(2&r.wrap&&B===35615){x[r.check=0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0),O=B=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&B)<<8)+(B>>8))%31){_.msg="incorrect header check",r.mode=30;break}if((15&B)!=8){_.msg="unknown compression method",r.mode=30;break}if(O-=4,e=8+(15&(B>>>=4)),r.wbits===0)r.wbits=e;else if(e>r.wbits){_.msg="invalid window size",r.mode=30;break}r.dmax=1<<e,_.adler=r.check=1,r.mode=512&B?10:12,O=B=0;break;case 2:for(;O<16;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(r.flags=B,(255&r.flags)!=8){_.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){_.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=B>>8&1),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),O=B=0,r.mode=3;case 3:for(;O<32;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.head&&(r.head.time=B),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,x[2]=B>>>16&255,x[3]=B>>>24&255,r.check=n(r.check,x,4,0)),O=B=0,r.mode=4;case 4:for(;O<16;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.head&&(r.head.xflags=255&B,r.head.os=B>>8),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),O=B=0,r.mode=5;case 5:if(1024&r.flags){for(;O<16;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.length=B,r.head&&(r.head.extra_len=B),512&r.flags&&(x[0]=255&B,x[1]=B>>>8&255,r.check=n(r.check,x,2,0)),O=B=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(Z<(H=r.length)&&(H=Z),H&&(r.head&&(e=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),l.arraySet(r.head.extra,N,R,H,e)),512&r.flags&&(r.check=n(r.check,N,H,R)),Z-=H,R+=H,r.length-=H),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(Z===0)break t;for(H=0;e=N[R+H++],r.head&&e&&r.length<65536&&(r.head.name+=String.fromCharCode(e)),e&&H<Z;);if(512&r.flags&&(r.check=n(r.check,N,H,R)),Z-=H,R+=H,e)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(Z===0)break t;for(H=0;e=N[R+H++],r.head&&e&&r.length<65536&&(r.head.comment+=String.fromCharCode(e)),e&&H<Z;);if(512&r.flags&&(r.check=n(r.check,N,H,R)),Z-=H,R+=H,e)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;O<16;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(B!==(65535&r.check)){_.msg="header crc mismatch",r.mode=30;break}O=B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),_.adler=r.check=0,r.mode=12;break;case 10:for(;O<32;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}_.adler=r.check=a(B),O=B=0,r.mode=11;case 11:if(r.havedict===0)return _.next_out=$,_.avail_out=tt,_.next_in=R,_.avail_in=Z,r.hold=B,r.bits=O,2;_.adler=r.check=1,r.mode=12;case 12:if(I===5||I===6)break t;case 13:if(r.last){B>>>=7&O,O-=7&O,r.mode=27;break}for(;O<3;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}switch(r.last=1&B,O-=1,3&(B>>>=1)){case 0:r.mode=14;break;case 1:if(A(r),r.mode=20,I!==6)break;B>>>=2,O-=2;break t;case 2:r.mode=17;break;case 3:_.msg="invalid block type",r.mode=30}B>>>=2,O-=2;break;case 14:for(B>>>=7&O,O-=7&O;O<32;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if((65535&B)!=(B>>>16^65535)){_.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&B,O=B=0,r.mode=15,I===6)break t;case 15:r.mode=16;case 16:if(H=r.length){if(Z<H&&(H=Z),tt<H&&(H=tt),H===0)break t;l.arraySet(K,N,R,H,$),Z-=H,R+=H,tt-=H,$+=H,r.length-=H;break}r.mode=12;break;case 17:for(;O<14;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(r.nlen=257+(31&B),B>>>=5,O-=5,r.ndist=1+(31&B),B>>>=5,O-=5,r.ncode=4+(15&B),B>>>=4,O-=4,286<r.nlen||30<r.ndist){_.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;O<3;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.lens[j[r.have++]]=7&B,B>>>=3,O-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},P=w(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,P){_.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;it=(d=r.lencode[B&(1<<r.lenbits)-1])>>>16&255,lt=65535&d,!((rt=d>>>24)<=O);){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(lt<16)B>>>=rt,O-=rt,r.lens[r.have++]=lt;else{if(lt===16){for(p=rt+2;O<p;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(B>>>=rt,O-=rt,r.have===0){_.msg="invalid bit length repeat",r.mode=30;break}e=r.lens[r.have-1],H=3+(3&B),B>>>=2,O-=2}else if(lt===17){for(p=rt+3;O<p;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}O-=rt,e=0,H=3+(7&(B>>>=rt)),B>>>=3,O-=3}else{for(p=rt+7;O<p;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}O-=rt,e=0,H=11+(127&(B>>>=rt)),B>>>=7,O-=7}if(r.have+H>r.nlen+r.ndist){_.msg="invalid bit length repeat",r.mode=30;break}for(;H--;)r.lens[r.have++]=e}}if(r.mode===30)break;if(r.lens[256]===0){_.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,F={bits:r.lenbits},P=w(y,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,P){_.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},P=w(v,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,P){_.msg="invalid distances set",r.mode=30;break}if(r.mode=20,I===6)break t;case 20:r.mode=21;case 21:if(6<=Z&&258<=tt){_.next_out=$,_.avail_out=tt,_.next_in=R,_.avail_in=Z,r.hold=B,r.bits=O,s(_,G),$=_.next_out,K=_.output,tt=_.avail_out,R=_.next_in,N=_.input,Z=_.avail_in,B=r.hold,O=r.bits,r.mode===12&&(r.back=-1);break}for(r.back=0;it=(d=r.lencode[B&(1<<r.lenbits)-1])>>>16&255,lt=65535&d,!((rt=d>>>24)<=O);){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(it&&!(240&it)){for(dt=rt,ut=it,ht=lt;it=(d=r.lencode[ht+((B&(1<<dt+ut)-1)>>dt)])>>>16&255,lt=65535&d,!(dt+(rt=d>>>24)<=O);){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}B>>>=dt,O-=dt,r.back+=dt}if(B>>>=rt,O-=rt,r.back+=rt,r.length=lt,it===0){r.mode=26;break}if(32&it){r.back=-1,r.mode=12;break}if(64&it){_.msg="invalid literal/length code",r.mode=30;break}r.extra=15&it,r.mode=22;case 22:if(r.extra){for(p=r.extra;O<p;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.length+=B&(1<<r.extra)-1,B>>>=r.extra,O-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;it=(d=r.distcode[B&(1<<r.distbits)-1])>>>16&255,lt=65535&d,!((rt=d>>>24)<=O);){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(!(240&it)){for(dt=rt,ut=it,ht=lt;it=(d=r.distcode[ht+((B&(1<<dt+ut)-1)>>dt)])>>>16&255,lt=65535&d,!(dt+(rt=d>>>24)<=O);){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}B>>>=dt,O-=dt,r.back+=dt}if(B>>>=rt,O-=rt,r.back+=rt,64&it){_.msg="invalid distance code",r.mode=30;break}r.offset=lt,r.extra=15&it,r.mode=24;case 24:if(r.extra){for(p=r.extra;O<p;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}r.offset+=B&(1<<r.extra)-1,B>>>=r.extra,O-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){_.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(tt===0)break t;if(H=G-tt,r.offset>H){if((H=r.offset-H)>r.whave&&r.sane){_.msg="invalid distance too far back",r.mode=30;break}at=H>r.wnext?(H-=r.wnext,r.wsize-H):r.wnext-H,H>r.length&&(H=r.length),st=r.window}else st=K,at=$-r.offset,H=r.length;for(tt<H&&(H=tt),tt-=H,r.length-=H;K[$++]=st[at++],--H;);r.length===0&&(r.mode=21);break;case 26:if(tt===0)break t;K[$++]=r.length,tt--,r.mode=21;break;case 27:if(r.wrap){for(;O<32;){if(Z===0)break t;Z--,B|=N[R++]<<O,O+=8}if(G-=tt,_.total_out+=G,r.total+=G,G&&(_.adler=r.check=r.flags?n(r.check,K,G,$-G):c(r.check,K,G,$-G)),G=tt,(r.flags?B:a(B))!==r.check){_.msg="incorrect data check",r.mode=30;break}O=B=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;O<32;){if(Z===0)break t;Z--,B+=N[R++]<<O,O+=8}if(B!==(4294967295&r.total)){_.msg="incorrect length check",r.mode=30;break}O=B=0}r.mode=29;case 29:P=1;break t;case 30:P=-3;break t;case 31:return-4;case 32:default:return o}return _.next_out=$,_.avail_out=tt,_.next_in=R,_.avail_in=Z,r.hold=B,r.bits=O,(r.wsize||G!==_.avail_out&&r.mode<30&&(r.mode<27||I!==4))&&Y(_,_.output,_.next_out,G-_.avail_out)?(r.mode=31,-4):(Q-=_.avail_in,G-=_.avail_out,_.total_in+=Q,_.total_out+=G,r.total+=G,r.wrap&&G&&(_.adler=r.check=r.flags?n(r.check,K,G,_.next_out-G):c(r.check,K,G,_.next_out-G)),_.data_type=r.bits+(r.last?64:0)+(r.mode===12?128:0)+(r.mode===20||r.mode===15?256:0),(Q==0&&G===0||I===4)&&P===g&&(P=-5),P)},h.inflateEnd=function(_){if(!_||!_.state)return o;var I=_.state;return I.window&&(I.window=null),_.state=null,g},h.inflateGetHeader=function(_,I){var r;return _&&_.state&&2&(r=_.state).wrap?((r.head=I).done=!1,g):o},h.inflateSetDictionary=function(_,I){var r,N=I.length;return _&&_.state?(r=_.state).wrap!==0&&r.mode!==11?o:r.mode===11&&c(1,I,N,0)!==r.check?-3:Y(_,I,N,N)?(r.mode=31,-4):(r.havedict=1,g):o},h.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(b,T,h){var l=b("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],w=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];T.exports=function(y,v,g,o,u,i,f,a){var m,k,E,S,L,D,U,z,A,Y=a.bits,_=0,I=0,r=0,N=0,K=0,R=0,$=0,Z=0,tt=0,B=0,O=null,Q=0,G=new l.Buf16(16),H=new l.Buf16(16),at=null,st=0;for(_=0;_<=15;_++)G[_]=0;for(I=0;I<o;I++)G[v[g+I]]++;for(K=Y,N=15;1<=N&&G[N]===0;N--);if(N<K&&(K=N),N===0)return u[i++]=20971520,u[i++]=20971520,a.bits=1,0;for(r=1;r<N&&G[r]===0;r++);for(K<r&&(K=r),_=Z=1;_<=15;_++)if(Z<<=1,(Z-=G[_])<0)return-1;if(0<Z&&(y===0||N!==1))return-1;for(H[1]=0,_=1;_<15;_++)H[_+1]=H[_]+G[_];for(I=0;I<o;I++)v[g+I]!==0&&(f[H[v[g+I]]++]=I);if(D=y===0?(O=at=f,19):y===1?(O=c,Q-=257,at=n,st-=257,256):(O=s,at=w,-1),_=r,L=i,$=I=B=0,E=-1,S=(tt=1<<(R=K))-1,y===1&&852<tt||y===2&&592<tt)return 1;for(;;){for(U=_-$,A=f[I]<D?(z=0,f[I]):f[I]>D?(z=at[st+f[I]],O[Q+f[I]]):(z=96,0),m=1<<_-$,r=k=1<<R;u[L+(B>>$)+(k-=m)]=U<<24|z<<16|A|0,k!==0;);for(m=1<<_-1;B&m;)m>>=1;if(m!==0?(B&=m-1,B+=m):B=0,I++,--G[_]==0){if(_===N)break;_=v[g+f[I]]}if(K<_&&(B&S)!==E){for($===0&&($=K),L+=r,Z=1<<(R=_-$);R+$<N&&!((Z-=G[R+$])<=0);)R++,Z<<=1;if(tt+=1<<R,y===1&&852<tt||y===2&&592<tt)return 1;u[E=B&S]=K<<24|R<<16|L-i|0}}return B!==0&&(u[L+B]=_-$<<24|64<<16|0),a.bits=K,0}},{"../utils/common":41}],51:[function(b,T,h){T.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(b,T,h){var l=b("../utils/common"),c=0,n=1;function s(d){for(var x=d.length;0<=--x;)d[x]=0}var w=0,y=29,v=256,g=v+1+y,o=30,u=19,i=2*g+1,f=15,a=16,m=7,k=256,E=16,S=17,L=18,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(g+2));s(Y);var _=new Array(2*o);s(_);var I=new Array(512);s(I);var r=new Array(256);s(r);var N=new Array(y);s(N);var K,R,$,Z=new Array(o);function tt(d,x,j,W,C){this.static_tree=d,this.extra_bits=x,this.extra_base=j,this.elems=W,this.max_length=C,this.has_stree=d&&d.length}function B(d,x){this.dyn_tree=d,this.max_code=0,this.stat_desc=x}function O(d){return d<256?I[d]:I[256+(d>>>7)]}function Q(d,x){d.pending_buf[d.pending++]=255&x,d.pending_buf[d.pending++]=x>>>8&255}function G(d,x,j){d.bi_valid>a-j?(d.bi_buf|=x<<d.bi_valid&65535,Q(d,d.bi_buf),d.bi_buf=x>>a-d.bi_valid,d.bi_valid+=j-a):(d.bi_buf|=x<<d.bi_valid&65535,d.bi_valid+=j)}function H(d,x,j){G(d,j[2*x],j[2*x+1])}function at(d,x){for(var j=0;j|=1&d,d>>>=1,j<<=1,0<--x;);return j>>>1}function st(d,x,j){var W,C,M=new Array(f+1),V=0;for(W=1;W<=f;W++)M[W]=V=V+j[W-1]<<1;for(C=0;C<=x;C++){var q=d[2*C+1];q!==0&&(d[2*C]=at(M[q]++,q))}}function rt(d){var x;for(x=0;x<g;x++)d.dyn_ltree[2*x]=0;for(x=0;x<o;x++)d.dyn_dtree[2*x]=0;for(x=0;x<u;x++)d.bl_tree[2*x]=0;d.dyn_ltree[2*k]=1,d.opt_len=d.static_len=0,d.last_lit=d.matches=0}function it(d){8<d.bi_valid?Q(d,d.bi_buf):0<d.bi_valid&&(d.pending_buf[d.pending++]=d.bi_buf),d.bi_buf=0,d.bi_valid=0}function lt(d,x,j,W){var C=2*x,M=2*j;return d[C]<d[M]||d[C]===d[M]&&W[x]<=W[j]}function dt(d,x,j){for(var W=d.heap[j],C=j<<1;C<=d.heap_len&&(C<d.heap_len&<(x,d.heap[C+1],d.heap[C],d.depth)&&C++,!lt(x,W,d.heap[C],d.depth));)d.heap[j]=d.heap[C],j=C,C<<=1;d.heap[j]=W}function ut(d,x,j){var W,C,M,V,q=0;if(d.last_lit!==0)for(;W=d.pending_buf[d.d_buf+2*q]<<8|d.pending_buf[d.d_buf+2*q+1],C=d.pending_buf[d.l_buf+q],q++,W===0?H(d,C,x):(H(d,(M=r[C])+v+1,x),(V=D[M])!==0&&G(d,C-=N[M],V),H(d,M=O(--W),j),(V=U[M])!==0&&G(d,W-=Z[M],V)),q<d.last_lit;);H(d,k,x)}function ht(d,x){var j,W,C,M=x.dyn_tree,V=x.stat_desc.static_tree,q=x.stat_desc.has_stree,et=x.stat_desc.elems,ct=-1;for(d.heap_len=0,d.heap_max=i,j=0;j<et;j++)M[2*j]!==0?(d.heap[++d.heap_len]=ct=j,d.depth[j]=0):M[2*j+1]=0;for(;d.heap_len<2;)M[2*(C=d.heap[++d.heap_len]=ct<2?++ct:0)]=1,d.depth[C]=0,d.opt_len--,q&&(d.static_len-=V[2*C+1]);for(x.max_code=ct,j=d.heap_len>>1;1<=j;j--)dt(d,M,j);for(C=et;j=d.heap[1],d.heap[1]=d.heap[d.heap_len--],dt(d,M,1),W=d.heap[1],d.heap[--d.heap_max]=j,d.heap[--d.heap_max]=W,M[2*C]=M[2*j]+M[2*W],d.depth[C]=(d.depth[j]>=d.depth[W]?d.depth[j]:d.depth[W])+1,M[2*j+1]=M[2*W+1]=C,d.heap[1]=C++,dt(d,M,1),2<=d.heap_len;);d.heap[--d.heap_max]=d.heap[1],function(ot,pt){var wt,_t,bt,ft,vt,kt,mt=pt.dyn_tree,It=pt.max_code,zt=pt.stat_desc.static_tree,Ct=pt.stat_desc.has_stree,Tt=pt.stat_desc.extra_bits,xt=pt.stat_desc.extra_base,yt=pt.stat_desc.max_length,At=0;for(ft=0;ft<=f;ft++)ot.bl_count[ft]=0;for(mt[2*ot.heap[ot.heap_max]+1]=0,wt=ot.heap_max+1;wt<i;wt++)yt<(ft=mt[2*mt[2*(_t=ot.heap[wt])+1]+1]+1)&&(ft=yt,At++),mt[2*_t+1]=ft,It<_t||(ot.bl_count[ft]++,vt=0,xt<=_t&&(vt=Tt[_t-xt]),kt=mt[2*_t],ot.opt_len+=kt*(ft+vt),Ct&&(ot.static_len+=kt*(zt[2*_t+1]+vt)));if(At!==0){do{for(ft=yt-1;ot.bl_count[ft]===0;)ft--;ot.bl_count[ft]--,ot.bl_count[ft+1]+=2,ot.bl_count[yt]--,At-=2}while(0<At);for(ft=yt;ft!==0;ft--)for(_t=ot.bl_count[ft];_t!==0;)It<(bt=ot.heap[--wt])||(mt[2*bt+1]!==ft&&(ot.opt_len+=(ft-mt[2*bt+1])*mt[2*bt],mt[2*bt+1]=ft),_t--)}}(d,x),st(M,ct,d.bl_count)}function e(d,x,j){var W,C,M=-1,V=x[1],q=0,et=7,ct=4;for(V===0&&(et=138,ct=3),x[2*(j+1)+1]=65535,W=0;W<=j;W++)C=V,V=x[2*(W+1)+1],++q<et&&C===V||(q<ct?d.bl_tree[2*C]+=q:C!==0?(C!==M&&d.bl_tree[2*C]++,d.bl_tree[2*E]++):q<=10?d.bl_tree[2*S]++:d.bl_tree[2*L]++,M=C,ct=(q=0)===V?(et=138,3):C===V?(et=6,3):(et=7,4))}function P(d,x,j){var W,C,M=-1,V=x[1],q=0,et=7,ct=4;for(V===0&&(et=138,ct=3),W=0;W<=j;W++)if(C=V,V=x[2*(W+1)+1],!(++q<et&&C===V)){if(q<ct)for(;H(d,C,d.bl_tree),--q!=0;);else C!==0?(C!==M&&(H(d,C,d.bl_tree),q--),H(d,E,d.bl_tree),G(d,q-3,2)):q<=10?(H(d,S,d.bl_tree),G(d,q-3,3)):(H(d,L,d.bl_tree),G(d,q-11,7));M=C,ct=(q=0)===V?(et=138,3):C===V?(et=6,3):(et=7,4)}}s(Z);var F=!1;function p(d,x,j,W){G(d,(w<<1)+(W?1:0),3),function(C,M,V,q){it(C),q&&(Q(C,V),Q(C,~V)),l.arraySet(C.pending_buf,C.window,M,V,C.pending),C.pending+=V}(d,x,j,!0)}h._tr_init=function(d){F||(function(){var x,j,W,C,M,V=new Array(f+1);for(C=W=0;C<y-1;C++)for(N[C]=W,x=0;x<1<<D[C];x++)r[W++]=C;for(r[W-1]=C,C=M=0;C<16;C++)for(Z[C]=M,x=0;x<1<<U[C];x++)I[M++]=C;for(M>>=7;C<o;C++)for(Z[C]=M<<7,x=0;x<1<<U[C]-7;x++)I[256+M++]=C;for(j=0;j<=f;j++)V[j]=0;for(x=0;x<=143;)Y[2*x+1]=8,x++,V[8]++;for(;x<=255;)Y[2*x+1]=9,x++,V[9]++;for(;x<=279;)Y[2*x+1]=7,x++,V[7]++;for(;x<=287;)Y[2*x+1]=8,x++,V[8]++;for(st(Y,g+1,V),x=0;x<o;x++)_[2*x+1]=5,_[2*x]=at(x,5);K=new tt(Y,D,v+1,g,f),R=new tt(_,U,0,o,f),$=new tt(new Array(0),z,0,u,m)}(),F=!0),d.l_desc=new B(d.dyn_ltree,K),d.d_desc=new B(d.dyn_dtree,R),d.bl_desc=new B(d.bl_tree,$),d.bi_buf=0,d.bi_valid=0,rt(d)},h._tr_stored_block=p,h._tr_flush_block=function(d,x,j,W){var C,M,V=0;0<d.level?(d.strm.data_type===2&&(d.strm.data_type=function(q){var et,ct=4093624447;for(et=0;et<=31;et++,ct>>>=1)if(1&ct&&q.dyn_ltree[2*et]!==0)return c;if(q.dyn_ltree[18]!==0||q.dyn_ltree[20]!==0||q.dyn_ltree[26]!==0)return n;for(et=32;et<v;et++)if(q.dyn_ltree[2*et]!==0)return n;return c}(d)),ht(d,d.l_desc),ht(d,d.d_desc),V=function(q){var et;for(e(q,q.dyn_ltree,q.l_desc.max_code),e(q,q.dyn_dtree,q.d_desc.max_code),ht(q,q.bl_desc),et=u-1;3<=et&&q.bl_tree[2*A[et]+1]===0;et--);return q.opt_len+=3*(et+1)+5+5+4,et}(d),C=d.opt_len+3+7>>>3,(M=d.static_len+3+7>>>3)<=C&&(C=M)):C=M=j+5,j+4<=C&&x!==-1?p(d,x,j,W):d.strategy===4||M===C?(G(d,2+(W?1:0),3),ut(d,Y,_)):(G(d,4+(W?1:0),3),function(q,et,ct,ot){var pt;for(G(q,et-257,5),G(q,ct-1,5),G(q,ot-4,4),pt=0;pt<ot;pt++)G(q,q.bl_tree[2*A[pt]+1],3);P(q,q.dyn_ltree,et-1),P(q,q.dyn_dtree,ct-1)}(d,d.l_desc.max_code+1,d.d_desc.max_code+1,V+1),ut(d,d.dyn_ltree,d.dyn_dtree)),rt(d),W&&it(d)},h._tr_tally=function(d,x,j){return d.pending_buf[d.d_buf+2*d.last_lit]=x>>>8&255,d.pending_buf[d.d_buf+2*d.last_lit+1]=255&x,d.pending_buf[d.l_buf+d.last_lit]=255&j,d.last_lit++,x===0?d.dyn_ltree[2*j]++:(d.matches++,x--,d.dyn_ltree[2*(r[j]+v+1)]++,d.dyn_dtree[2*O(x)]++),d.last_lit===d.lit_bufsize-1},h._tr_align=function(d){G(d,2,3),H(d,k,Y),function(x){x.bi_valid===16?(Q(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):8<=x.bi_valid&&(x.pending_buf[x.pending++]=255&x.bi_buf,x.bi_buf>>=8,x.bi_valid-=8)}(d)}},{"../utils/common":41}],53:[function(b,T,h){T.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(b,T,h){(function(l){(function(c,n){if(!c.setImmediate){var s,w,y,v,g=1,o={},u=!1,i=c.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(c);f=f&&f.setTimeout?f:c,s={}.toString.call(c.process)==="[object process]"?function(E){process.nextTick(function(){m(E)})}:function(){if(c.postMessage&&!c.importScripts){var E=!0,S=c.onmessage;return c.onmessage=function(){E=!1},c.postMessage("","*"),c.onmessage=S,E}}()?(v="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",k,!1):c.attachEvent("onmessage",k),function(E){c.postMessage(v+E,"*")}):c.MessageChannel?((y=new MessageChannel).port1.onmessage=function(E){m(E.data)},function(E){y.port2.postMessage(E)}):i&&"onreadystatechange"in i.createElement("script")?(w=i.documentElement,function(E){var S=i.createElement("script");S.onreadystatechange=function(){m(E),S.onreadystatechange=null,w.removeChild(S),S=null},w.appendChild(S)}):function(E){setTimeout(m,0,E)},f.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var S=new Array(arguments.length-1),L=0;L<S.length;L++)S[L]=arguments[L+1];var D={callback:E,args:S};return o[g]=D,s(g),g++},f.clearImmediate=a}function a(E){delete o[E]}function m(E){if(u)setTimeout(m,0,E);else{var S=o[E];if(S){u=!0;try{(function(L){var D=L.callback,U=L.args;switch(U.length){case 0:D();break;case 1:D(U[0]);break;case 2:D(U[0],U[1]);break;case 3:D(U[0],U[1],U[2]);break;default:D.apply(n,U)}})(S)}finally{a(E),u=!1}}}}function k(E){E.source===c&&typeof E.data=="string"&&E.data.indexOf(v)===0&&m(+E.data.slice(v.length))}})(typeof self>"u"?l===void 0?this:l:self)}).call(this,typeof Bt<"u"?Bt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Wt);var Yt=Wt.exports;const qt=Mt(Yt);function Xt(){const[X,t]=nt.useState(""),[b,T]=nt.useState(!1),[h,l]=nt.useState(""),[c,n]=nt.useState(null);let s="",w="";const y=nt.useRef(null),v=nt.useRef(null),g={},o=["text/html","text/xml","application/xml","application/xhtml+xml","image/svg+xml"],u=nt.useCallback(async z=>{T(!0),t(""),l("Loading..."),n(null),v.current&&(document.head.removeChild(v.current),URL.revokeObjectURL(v.current.href),v.current=null);try{let A;if(typeof z=="string"){const Y=await fetch(z);if(!Y.ok)throw new Error(`HTTP error! status: ${Y.status} ${Y.statusText}`);A=await Y.arrayBuffer()}else z instanceof File?A=await z.arrayBuffer():A=z;if(!A||A.byteLength===0)throw new Error("EPUB source is empty or could not be read.");y.current=await qt.loadAsync(A),await i()}catch(A){const Y=A instanceof Error?A.message:"An unknown error occurred while fetching or loading the EPUB.";console.error("Error processing EPUB source:",A),n(Y),t(""),l(""),T(!1)}},[]);async function i(){if(!y.current)throw new Error("Zip not loaded");const A=y.current.file("META-INF/container.xml");if(!A)throw new Error("META-INF/container.xml not found.");const Y=await A.async("text"),_=f(Y);if(!_)throw new Error("OPF file path not found in container.xml.");s=_.substring(0,_.lastIndexOf("/")+1);const I=y.current.file(_);if(!I)throw new Error(`OPF file not found at path: ${_}`);const r=await I.async("text"),K=new DOMParser().parseFromString(r,"application/xml"),R=K.querySelector("parsererror");if(R)throw new Error(`Error parsing OPF file: ${R.textContent||"Unknown XML parse error"}`);a(K),await m(K)}function f(z){const _=new DOMParser().parseFromString(z,"application/xml").querySelector('rootfile[media-type="application/oebps-package+xml"]');return(_==null?void 0:_.getAttribute("full-path"))??null}function a(z){const A=z.querySelector("metadata > dc\\:title")||z.querySelector("metadata > title");l((A==null?void 0:A.textContent)||"Untitled Book")}async function m(z){if(!y.current)return;const A={};z.querySelectorAll("manifest > item").forEach(r=>{const N=r.getAttribute("id"),K=r.getAttribute("href"),R=r.getAttribute("media-type");N&&K&&R&&(A[N]={href:decodeURIComponent(K),type:R})});const Y=Array.from(z.querySelectorAll("spine > itemref")).map(r=>r.getAttribute("idref"));let _="";const I=new Set;for(const r of Y){if(!r)continue;const N=A[r];if(N){const K=s+N.href,R=y.current.file(K);if(R&&(N.type.includes("html")||N.type.includes("xml")))try{const $=await R.async("text"),Z=await k($,N.type);_+=`<div class="bok-chapter">${Z}</div>`}catch($){console.warn(`Failed to process spine item ${K}:`,$)}}}for(const r in A){const N=A[r];if(N.type.includes("css")){const K=s+N.href;if(!I.has(K)){const R=y.current.file(K);if(R)try{w+=await R.async("text")+`
|
|
34
|
+
`,I.add(K)}catch($){console.warn(`Failed to load CSS ${K}:`,$)}}}}U(),t(_)}async function k(z,A){let Y=[...z.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/gi)].map(I=>I[1]).join(`
|
|
35
|
+
`);Y=E(Y),w+=Y;let _=z.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,"");return _=_.replace(/<link[^>]*?>/gi,""),_=_.replace(/<title[^>]*>[\s\S]*?<\/title>/gi,""),_=await S(_,A),_}function E(z){const A=["background-color","color","font-size","font-family","font-weight","line-height","text-align"];return z.split(/}/).map(Y=>{const _=Y.split(/{/),I=_[0],r=_[1];if(!r)return"";const N=r.split(/;/).map(K=>K.trim()).filter(K=>K?!A.some(R=>new RegExp(`^${R}s*:`,"i").test(K)):!1).join("; ");return N?`${I.trim()} { ${N}; }`:""}).filter(Y=>!!Y).join(`
|
|
36
|
+
`)}async function S(z,A){const Y=new DOMParser;if(o.includes(A))try{const _=Y.parseFromString(z,A),I=_.querySelector("parsererror");if(I)return console.warn("Parser error in content item during cleanImages, skipping.",I.textContent),z;const r=_.querySelectorAll("img");for(const $ of r)await L($);const N=_.querySelectorAll("image");for(const $ of N)await D($);return new XMLSerializer().serializeToString(_.documentElement||_)}catch(_){return console.error("Error during cleanImages DOM processing:",_),z}else return z}async function L(z){var Y;let A=z.getAttribute("src");if(A){for(;A.startsWith(".")||A.startsWith("/");)A=A.slice(1);if(A=s+A,g[A]===void 0){const _=(Y=y.current)==null?void 0:Y.file(A);if(_)try{const I=await _.async("blob"),r=URL.createObjectURL(I);g[A]=r}catch(I){console.warn(`Could not load image blob (formatImg) ${A}:`,I),g[A]=""}else console.warn(`Image file not found in zip (formatImg): ${A}`),g[A]=""}z.setAttribute("src",g[A])}}async function D(z){var Y;let A=z.getAttribute("xlink:href");if(A){for(;A.startsWith(".")||A.startsWith("/");)A=A.slice(1);if(A=s+A,g[A]===void 0){const _=(Y=y.current)==null?void 0:Y.file(A);if(_)try{const I=await _.async("blob"),r=URL.createObjectURL(I);g[A]=r}catch(I){console.warn(`Could not load image blob (formatXMLImage) ${A}:`,I),g[A]=""}else console.warn(`Image file not found in zip (formatXMLImage): ${A}`),g[A]=""}z.setAttribute("xlink:href",g[A])}}function U(){if(!w.trim())return;const z=new Blob([w],{type:"text/css"}),A=URL.createObjectURL(z);v.current=document.createElement("link"),v.current.href=A,v.current.rel="stylesheet",v.current.setAttribute("data-bok-reader-style","true"),document.head.appendChild(v.current)}return{title:h,rawContent:X,isLoading:b,error:c,loadEpub:u,setIsLoading:T}}function Ot(X,t){const[b,T]=nt.useState(()=>{if(typeof window>"u")return t;try{const h=localStorage.getItem(X);return h?JSON.parse(h):t}catch(h){return console.warn(`Error reading localStorage key "${X}":`,h),t}});return nt.useEffect(()=>{try{b!==void 0&&localStorage.setItem(X,JSON.stringify(b))}catch(h){console.warn(`Error saving localStorage key "${X}":`,h)}},[X,b]),[b,T]}function Zt(X){const t=St.c(8);let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b={width:0,height:0,noOfPages:1},t[0]=b):b=t[0];const[T,h]=nt.useState(b);let l,c;t[1]!==X?(l=()=>{const s=X==null?void 0:X.current,w=()=>{if(s){const y=s.getBoundingClientRect(),v=y.height<y.width;h(g=>{const o=v?y.width/2:y.width,u=y.height,i=v?2:1;return g.width!==o||g.height!==u||g.noOfPages!==i?{width:o,height:u,noOfPages:i}:g})}else h({width:0,height:0,noOfPages:1})};if(s){w();const y=new ResizeObserver(w);return y.observe(s),()=>{y.unobserve(s)}}},c=[X],t[1]=X,t[2]=l,t[3]=c):(l=t[2],c=t[3]),nt.useEffect(l,c);let n;return t[4]!==T.height||t[5]!==T.noOfPages||t[6]!==T.width?(n=[T.width,T.height,T.noOfPages],t[4]=T.height,t[5]=T.noOfPages,t[6]=T.width,t[7]=n):n=t[7],n}function Kt(X){const t=St.c(8),[b,T]=nt.useState(0);let h;t[0]!==X?(h=()=>{if(X.current){const w=X.current.scrollWidth,y=X.current.scrollLeft,v=w>0?y/w:0;T(v)}},t[0]=X,t[1]=h):h=t[1];const l=h;let c,n;t[2]!==X||t[3]!==l?(c=()=>{const w=X.current;if(!w)return;let y=null;const v=()=>{y&&clearTimeout(y),y=setTimeout(()=>{l()},100)};return w.addEventListener("scroll",v),l(),()=>{y&&clearTimeout(y),w.removeEventListener("scroll",v)}},n=[l,X],t[2]=X,t[3]=l,t[4]=c,t[5]=n):(c=t[4],n=t[5]),nt.useEffect(c,n);let s;return t[6]!==b?(s=[b,T],t[6]=b,t[7]=s):s=t[7],s}const Vt=(X,t,b,T)=>{const h=St.c(21),[l,c]=Zt(b),n=nt.useRef(null),s=nt.useRef("");let w;h[0]!==X||h[1]!==t||h[2]!==c||h[3]!==l||h[4]!==T?(w=(a,m)=>{!t&&!T&&(a/l<=.4&&m/c<.8&&X(-1),a/l>.4&&m/c<.8&&X(1))},h[0]=X,h[1]=t,h[2]=c,h[3]=l,h[4]=T,h[5]=w):w=h[5];const y=w;let v,g;h[6]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const a=()=>{var k;const m=(k=window.getSelection())==null?void 0:k.toString();m&&m.length>0?s.current=m:s.current=""};return document.addEventListener("selectionchange",a),()=>{document.removeEventListener("selectionchange",a)}},g=[],h[6]=v,h[7]=g):(v=h[6],g=h[7]),nt.useEffect(v,g);let o;h[8]!==y?(o=()=>{const a=()=>{n.current=window.setTimeout(()=>{n.current=null},500)},m=k=>{if(n.current&&s.current){clearTimeout(n.current),n.current=null;const{pageX:E,pageY:S}=k.touches[0];y(E,S)}};return window.addEventListener("touchstart",a),window.addEventListener("touchend",m),()=>{window.removeEventListener("touchstart",a),window.removeEventListener("touchend",m)}},h[8]=y,h[9]=o):o=h[9];let u;h[10]!==y||h[11]!==l?(u=[l,y],h[10]=y,h[11]=l,h[12]=u):u=h[12],nt.useEffect(o,u);let i;h[13]!==b||h[14]!==y?(i=()=>{const a=b.current,m=()=>{n.current=window.setTimeout(Jt,200)},k=E=>{n.current&&!s.current&&(clearTimeout(n.current),n.current=null,y(E.clientX,E.clientY))};return a==null||a.addEventListener("mousedown",m),a==null||a.addEventListener("mouseup",k),()=>{a==null||a.removeEventListener("mousedown",m),a==null||a.removeEventListener("mouseup",k)}},h[13]=b,h[14]=y,h[15]=i):i=h[15];let f;h[16]!==b||h[17]!==y||h[18]!==t||h[19]!==l?(f=[l,t,y,b],h[16]=b,h[17]=y,h[18]=t,h[19]=l,h[20]=f):f=h[20],nt.useEffect(i,f)};function Jt(){}function Qt(X){const t=St.c(3),{currentPage:b,pages:T}=X,h=b+1;let l;return t[0]!==T||t[1]!==h?(l=J.jsxs("div",{className:"page-number",children:[h,"/",T]}),t[0]=T,t[1]=h,t[2]=l):l=t[2],l}const $t=X=>1+2.2*Math.pow(X-1,3)+1.2*Math.pow(X-1,2);function te(X){const t=St.c(44),{content:b,title:T,setIsLoading:h,fontSize:l,sidePadding:c,fontFamily:n,isOptionMenuVisible:s,containerElementRef:w,showTutorial:y}=X,v=nt.useRef(null),[g,o,u]=Zt(w),[i,f]=Kt(v),[a,m]=nt.useState(1),[k,E]=nt.useState(0),[S,L]=Ot(`bok_progress_${T}`,0),D=nt.useRef(i),U=nt.useRef(null);let z,A;t[0]!==i?(z=()=>{D.current=i},A=[i],t[0]=i,t[1]=z,t[2]=A):(z=t[1],A=t[2]),nt.useEffect(z,A);let Y,_;t[3]!==i||t[4]!==L?(Y=()=>{i>0&&L(i)},_=[i,L],t[3]=i,t[4]=L,t[5]=Y,t[6]=_):(Y=t[5],_=t[6]),nt.useEffect(Y,_);let I,r;t[7]!==S||t[8]!==f?(I=()=>{S>0&&f(S)},r=[S,f],t[7]=S,t[8]=f,t[9]=I,t[10]=r):(I=t[9],r=t[10]),nt.useEffect(I,r);let N;t[11]!==u||t[12]!==k||t[13]!==g?(N=G=>{m(H=>{const at=v.current;if(at&&k>0&&u>0&&at.clientWidth>0){let st=H+G;st<0&&(st=0),st>=k&&(st=k-1),U.current&&cancelAnimationFrame(U.current);const rt=at.scrollLeft,it=st*g*u,lt=it-rt,dt=performance.now(),ut=ht=>{const e=ht-dt;if(e<450){const P=$t(e/450);at.scrollLeft=rt+lt*P,U.current=requestAnimationFrame(ut)}else at.scrollLeft=it,U.current=null};return U.current=requestAnimationFrame(ut),st}return H})},t[11]=u,t[12]=k,t[13]=g,t[14]=N):N=t[14];const K=N;Vt(K,s,w,y);let R;t[15]!==n||t[16]!==l||t[17]!==u||t[18]!==o||t[19]!==g||t[20]!==h||t[21]!==c?(R=()=>{const G=v.current;if(!G||g<=0||o<=0)return;h(!0);const H=setTimeout(()=>{G.style.setProperty("--side-padding",`${c}px`),G.style.setProperty("--font-size",`${l}em`),G.style.setProperty("--font-family",n),G.style.setProperty("--computed-width",`${g}px`),G.style.maxHeight=`${o}px`,requestAnimationFrame(()=>{if(!G)return;const at=G.scrollWidth,st=g>0&&at>0?Math.round(at/g):0,rt=u===1?st:Math.round(st/2);if(E(rt),rt>0&&G.clientWidth>0){const it=D.current;let lt=Math.round(rt*it);lt=Math.max(0,Math.min(rt-1,lt)),m(lt),G.scrollLeft=lt*g*u}else m(1);h(!1)})},400);return()=>{clearTimeout(H),U.current&&cancelAnimationFrame(U.current)}},t[15]=n,t[16]=l,t[17]=u,t[18]=o,t[19]=g,t[20]=h,t[21]=c,t[22]=R):R=t[22];let $;t[23]!==b||t[24]!==n||t[25]!==l||t[26]!==u||t[27]!==o||t[28]!==g||t[29]!==h||t[30]!==c||t[31]!==T?($=[g,o,c,l,n,u,b,T,h],t[23]=b,t[24]=n,t[25]=l,t[26]=u,t[27]=o,t[28]=g,t[29]=h,t[30]=c,t[31]=T,t[32]=$):$=t[32],nt.useEffect(R,$);let Z,tt;t[33]!==K?(Z=()=>{const G=H=>{H.key==="ArrowLeft"?(H.preventDefault(),K(-1)):H.key==="ArrowRight"&&(H.preventDefault(),K(1))};return document.addEventListener("keydown",G),()=>{document.removeEventListener("keydown",G)}},tt=[K],t[33]=K,t[34]=Z,t[35]=tt):(Z=t[34],tt=t[35]),nt.useEffect(Z,tt);let B;t[36]!==b?(B=J.jsx("div",{ref:v,dangerouslySetInnerHTML:{__html:b},className:"book-page"}),t[36]=b,t[37]=B):B=t[37];let O;t[38]!==a||t[39]!==k?(O=J.jsx(Qt,{pages:k,currentPage:a}),t[38]=a,t[39]=k,t[40]=O):O=t[40];let Q;return t[41]!==B||t[42]!==O?(Q=J.jsxs(J.Fragment,{children:[B,O]}),t[41]=B,t[42]=O,t[43]=Q):Q=t[43],Q}const Nt={"loading-screen":"_loading-screen_13vxc_1","loading-screen-gon":"_loading-screen-gon_13vxc_2",spinner:"_spinner_13vxc_32","spin-outer":"_spin-outer_13vxc_1","spin-inner":"_spin-inner_13vxc_1",core:"_core_13vxc_82",pulse:"_pulse_13vxc_1"};function ee(X){const t=St.c(8),{isLoading:b,color:T}=X,h=T||"red";let l;t[0]!==h?(l={"--loader-color":h},t[0]=h,t[1]=l):l=t[1];const c=l,n=b?Nt["loading-screen"]:Nt["loading-screen-gon"];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=J.jsx("div",{className:Nt.core}),t[2]=s):s=t[2];let w;t[3]!==c?(w=J.jsx("div",{className:Nt.spinner,style:c,children:s}),t[3]=c,t[4]=w):w=t[4];let y;return t[5]!==n||t[6]!==w?(y=J.jsx("div",{className:n,children:w}),t[5]=n,t[6]=w,t[7]=y):y=t[7],y}function re(){document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():document.documentElement.requestFullscreen()}function ne(X){const t=St.c(91),{onClose:b,fontSize:T,padding:h,fontFamily:l,colorScheme:c,setFontSize:n,setPadding:s,setColorScheme:w,setFontFamily:y,supportedFonts:v,supportedColorschemes:g}=X;let o;t[0]!==v?(o=v===void 0?[]:v,t[0]=v,t[1]=o):o=t[1];const u=o;let i;t[2]!==g?(i=g===void 0?[]:g,t[2]=g,t[3]=i):i=t[3];const f=i,[a,m]=nt.useState(!1),[k,E]=nt.useState(!1),S=nt.useRef(null),L=nt.useRef(null);let D;t[4]===Symbol.for("react.memo_cache_sentinel")?(D={displayName:"System Default",name:"system-ui"},t[4]=D):D=t[4];let U;t[5]!==u?(U=[D,...u],t[5]=u,t[6]=U):U=t[6];const z=U;let A,Y;t[7]===Symbol.for("react.memo_cache_sentinel")?(A={displayName:"Amoled Dark",name:"amoled"},Y={displayName:"Da Vinci",name:"davinci"},t[7]=A,t[8]=Y):(A=t[7],Y=t[8]);let _;t[9]!==f?(_=[A,Y,...f],t[9]=f,t[10]=_):_=t[10];const I=_;let r,N;t[11]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const xt=setTimeout(()=>{E(!0)},0);return()=>clearTimeout(xt)},N=[],t[11]=r,t[12]=N):(r=t[11],N=t[12]),nt.useEffect(r,N);let K;t[13]===Symbol.for("react.memo_cache_sentinel")?(K=()=>{E(!1),m(!0)},t[13]=K):K=t[13];const R=K;let $,Z;t[14]!==a||t[15]!==b?($=()=>{if(a){const xt=setTimeout(()=>{b()},300);return()=>clearTimeout(xt)}},Z=[a,b],t[14]=a,t[15]=b,t[16]=$,t[17]=Z):($=t[16],Z=t[17]),nt.useEffect($,Z);let tt;t[18]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{R()},t[18]=tt):tt=t[18];const B=tt,O=fe,Q=de;let G;t[19]!==h||t[20]!==s?(G=()=>{h<=70&&(s(ce),Q(L))},t[19]=h,t[20]=s,t[21]=G):G=t[21];const H=G;let at;t[22]!==h||t[23]!==s?(at=()=>{h-5>0&&(s(le),Q(L))},t[22]=h,t[23]=s,t[24]=at):at=t[24];const st=at;let rt;t[25]!==T||t[26]!==n?(rt=()=>{T<3&&(n(se),Q(S))},t[25]=T,t[26]=n,t[27]=rt):rt=t[27];const it=rt;let lt;t[28]!==T||t[29]!==n?(lt=()=>{T-.2>.6&&(n(ae),Q(S))},t[28]=T,t[29]=n,t[30]=lt):lt=t[30];const dt=lt,ut=`options-menu-overlay ${a?"fade-out":""}`,ht=`options-menu ${k?"visible":""} ${a?"slide-down":""}`;let e,P;t[31]===Symbol.for("react.memo_cache_sentinel")?(e=J.jsx("button",{onClick:R,className:"close-button","aria-label":"Close menu",children:"✕"}),P=J.jsx("h2",{children:"Reader Options"}),t[31]=e,t[32]=P):(e=t[31],P=t[32]);let F;t[33]===Symbol.for("react.memo_cache_sentinel")?(F=J.jsx("div",{className:"option-label",children:"Font family"}),t[33]=F):F=t[33];let p;t[34]!==z||t[35]!==y?(p=xt=>{const yt=z.find(At=>At.name===xt.target.value);yt&&y(yt.name)},t[34]=z,t[35]=y,t[36]=p):p=t[36];let d;t[37]!==z?(d=z.map(oe),t[37]=z,t[38]=d):d=t[38];let x;t[39]!==l||t[40]!==p||t[41]!==d?(x=J.jsxs("div",{className:"font-family-buttons",children:[F,J.jsx("select",{value:l,onChange:p,children:d})]}),t[39]=l,t[40]=p,t[41]=d,t[42]=x):x=t[42];let j;t[43]===Symbol.for("react.memo_cache_sentinel")?(j=J.jsx("div",{className:"option-label",children:"Color Scheme"}),t[43]=j):j=t[43];let W;t[44]!==I||t[45]!==w?(W=xt=>{const yt=I.find(At=>At.name===xt.target.value);yt&&w(yt.name)},t[44]=I,t[45]=w,t[46]=W):W=t[46];let C;t[47]!==I?(C=I.map(ie),t[47]=I,t[48]=C):C=t[48];let M;t[49]!==c||t[50]!==W||t[51]!==C?(M=J.jsxs("div",{className:"font-family-buttons",children:[j,J.jsx("select",{value:c,onChange:W,children:C})]}),t[49]=c,t[50]=W,t[51]=C,t[52]=M):M=t[52];let V,q;t[53]===Symbol.for("react.memo_cache_sentinel")?(V=J.jsx("div",{className:"option-label",children:"Side padding"}),q={display:"flex",alignItems:"center",gap:"8px"},t[53]=V,t[54]=q):(V=t[53],q=t[54]);let et;t[55]!==st?(et=J.jsx("button",{onClick:st,children:"-"}),t[55]=st,t[56]=et):et=t[56];let ct;t[57]!==h?(ct=J.jsx("span",{ref:L,className:"option-value",children:h}),t[57]=h,t[58]=ct):ct=t[58];let ot;t[59]!==H?(ot=J.jsx("button",{onClick:H,children:"+"}),t[59]=H,t[60]=ot):ot=t[60];let pt;t[61]!==et||t[62]!==ct||t[63]!==ot?(pt=J.jsxs("div",{className:"padding-buttons",children:[V,J.jsxs("div",{style:q,children:[et,ct,ot]})]}),t[61]=et,t[62]=ct,t[63]=ot,t[64]=pt):pt=t[64];let wt,_t;t[65]===Symbol.for("react.memo_cache_sentinel")?(wt=J.jsx("div",{className:"option-label",children:"Font size"}),_t={display:"flex",alignItems:"center",gap:"8px"},t[65]=wt,t[66]=_t):(wt=t[65],_t=t[66]);let bt;t[67]!==dt?(bt=J.jsx("button",{onClick:dt,children:"-"}),t[67]=dt,t[68]=bt):bt=t[68];let ft;t[69]!==T?(ft=Math.round(T*10),t[69]=T,t[70]=ft):ft=t[70];let vt;t[71]!==ft?(vt=J.jsx("span",{ref:S,className:"option-value",children:ft}),t[71]=ft,t[72]=vt):vt=t[72];let kt;t[73]!==it?(kt=J.jsx("button",{onClick:it,children:"+"}),t[73]=it,t[74]=kt):kt=t[74];let mt;t[75]!==bt||t[76]!==vt||t[77]!==kt?(mt=J.jsxs("div",{className:"font-buttons",children:[wt,J.jsxs("div",{style:_t,children:[bt,vt,kt]})]}),t[75]=bt,t[76]=vt,t[77]=kt,t[78]=mt):mt=t[78];let It;t[79]===Symbol.for("react.memo_cache_sentinel")?(It=J.jsx("button",{onClick:re,children:"Toggle fullscreen"}),t[79]=It):It=t[79];let zt;t[80]!==x||t[81]!==M||t[82]!==pt||t[83]!==mt?(zt=J.jsxs("div",{className:"options-buttons",children:[x,M,pt,mt,It]}),t[80]=x,t[81]=M,t[82]=pt,t[83]=mt,t[84]=zt):zt=t[84];let Ct;t[85]!==ht||t[86]!==zt?(Ct=J.jsxs("div",{className:ht,onClick:O,children:[e,P,zt]}),t[85]=ht,t[86]=zt,t[87]=Ct):Ct=t[87];let Tt;return t[88]!==ut||t[89]!==Ct?(Tt=J.jsx("div",{className:ut,onClick:B,children:Ct}),t[88]=ut,t[89]=Ct,t[90]=Tt):Tt=t[90],Tt}function ie(X){return J.jsx("option",{value:X.name,children:X.displayName},X.displayName)}function oe(X){return J.jsx("option",{value:X.name,children:X.displayName},X.displayName)}function ae(X){return X-.2}function se(X){return X+.2}function le(X){return X-5}function ce(X){return X+5}function de(X){X.current&&(X.current.classList.add("value-changed"),setTimeout(()=>{X.current&&X.current.classList.remove("value-changed")},300))}function fe(X){X.stopPropagation()}const gt={overlay:"_overlay_1cqa3_53",fadeIn:"_fadeIn_1cqa3_1",fadeOut:"_fadeOut_1cqa3_80",interactionZone:"_interactionZone_1cqa3_86",centerZone:"_centerZone_1cqa3_96",iconWrapper:"_iconWrapper_1cqa3_107",pulse:"_pulse_1cqa3_1",label:"_label_1cqa3_131",bottomIconGroup:"_bottomIconGroup_1cqa3_143",bottomIconWrapper:"_bottomIconWrapper_1cqa3_150",bounceArrow:"_bounceArrow_1cqa3_169",bounce:"_bounce_1cqa3_169",dismissButton:"_dismissButton_1cqa3_179",float:"_float_1cqa3_1"},ue=X=>{const t=St.c(16),{color:b,onDismiss:T}=X,h=b===void 0?"#4fc3f7":b,[l,c]=nt.useState(!1);let n;t[0]!==T?(n=()=>{c(!0),setTimeout(T,400)},t[0]=T,t[1]=n):n=t[1];const s=n,w=`${gt.overlay} ${l?gt.fadeOut:""}`;let y;t[2]!==h?(y={"--accent-color":h},t[2]=h,t[3]=y):y=t[3];const v=y;let g;t[4]===Symbol.for("react.memo_cache_sentinel")?(g=J.jsxs("div",{className:gt.interactionZone,children:[J.jsx("div",{className:gt.iconWrapper,children:J.jsx("svg",{viewBox:"0 0 24 24",children:J.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),J.jsx("div",{className:gt.label,children:"Previous"})]}),t[4]=g):g=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=J.jsxs("div",{className:gt.interactionZone,children:[J.jsx("div",{className:gt.iconWrapper,children:J.jsx("svg",{viewBox:"0 0 24 24",children:J.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})}),J.jsx("div",{className:gt.label,children:"Next"})]}),t[5]=o):o=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=J.jsx("div",{className:gt.bottomIconWrapper,children:J.jsx("svg",{viewBox:"0 0 24 24",children:J.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})})}),t[6]=u):u=t[6];let i;t[7]===Symbol.for("react.memo_cache_sentinel")?(i=J.jsx("div",{className:gt.label,style:{fontSize:"0.9rem"},children:"Options"}),t[7]=i):i=t[7];let f;t[8]===Symbol.for("react.memo_cache_sentinel")?(f=J.jsxs("div",{className:gt.bottomIconGroup,children:[u,i,J.jsx("div",{className:gt.bounceArrow,children:J.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:J.jsx("path",{d:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})})]}),t[8]=f):f=t[8];let a;t[9]!==s?(a=J.jsxs("div",{className:gt.centerZone,children:[f,J.jsx("button",{className:gt.dismissButton,onClick:k=>{k.stopPropagation(),s()},children:"Start Reading"})]}),t[9]=s,t[10]=a):a=t[10];let m;return t[11]!==s||t[12]!==a||t[13]!==w||t[14]!==v?(m=J.jsxs("div",{className:w,onClick:s,style:v,children:[g,o,a]}),t[11]=s,t[12]=a,t[13]=w,t[14]=v,t[15]=m):m=t[15],m},he=X=>{const t=St.c(69),{epubDataSource:b,onTitleChange:T,onLoadingChange:h,onError:l,className:c,style:n,color:s,supportedFonts:w}=X;let y;t[0]!==w?(y=w===void 0?[]:w,t[0]=w,t[1]=y):y=t[1];const v=y,{title:g,rawContent:o,isLoading:u,error:i,loadEpub:f,setIsLoading:a}=Xt(),[m,k]=nt.useState(!1),[E,S]=Ot("bok_global_side_padding",30),[L,D]=Ot("bok_global_fontsize",1.2),[U,z]=Ot("bok_global_font_family","Inter"),[A,Y]=Ot("bok_global_theme","Amoled Dark"),_=nt.useRef(null),[I,r]=Ot("bok_tutorial_shown",!1),[N,K]=nt.useState(!I);let R,$;t[2]!==I?(R=()=>{I&&K(!1)},$=[I],t[2]=I,t[3]=R,t[4]=$):(R=t[3],$=t[4]),nt.useEffect(R,$);let Z;t[5]!==r?(Z=()=>{K(!1),r(!0)},t[5]=r,t[6]=Z):Z=t[6];const tt=Z;let B,O;t[7]!==b||t[8]!==f?(B=()=>{b&&f(b)},O=[b,f],t[7]=b,t[8]=f,t[9]=B,t[10]=O):(B=t[9],O=t[10]),nt.useEffect(B,O);let Q,G;t[11]!==T||t[12]!==g?(Q=()=>{T&&T(g)},G=[g,T],t[11]=T,t[12]=g,t[13]=Q,t[14]=G):(Q=t[13],G=t[14]),nt.useEffect(Q,G);let H,at;t[15]!==u||t[16]!==h?(H=()=>{h&&h(u)},at=[u,h],t[15]=u,t[16]=h,t[17]=H,t[18]=at):(H=t[17],at=t[18]),nt.useEffect(H,at);let st,rt;t[19]!==i||t[20]!==l?(st=()=>{i&&l&&l(i)},rt=[i,l],t[19]=i,t[20]=l,t[21]=st,t[22]=rt):(st=t[21],rt=t[22]),nt.useEffect(st,rt);const it=`${E}px`,lt=`${L}em`;let dt;t[23]!==s||t[24]!==U||t[25]!==it||t[26]!==lt?(dt={"--color-tint":s,"--side-padding":it,"--top-padding":"30px","--bottom-padding":"70px","--font-size":lt,"--font-family":U},t[23]=s,t[24]=U,t[25]=it,t[26]=lt,t[27]=dt):dt=t[27];const ut=dt;if(i&&!u&&!o){const j=`bok-reader-container ${c||""}`;let W;t[28]===Symbol.for("react.memo_cache_sentinel")?(W={padding:"20px",color:"red"},t[28]=W):W=t[28];let C;t[29]!==i?(C=J.jsxs("div",{style:W,children:["Error loading EPUB: ",i]}),t[29]=i,t[30]=C):C=t[30];let M;return t[31]!==n||t[32]!==j||t[33]!==C?(M=J.jsx("div",{className:j,style:n,children:C}),t[31]=n,t[32]=j,t[33]=C,t[34]=M):M=t[34],M}const ht=`bok-reader-container ${A==="davinci"?"davinci":""}`;let e;t[35]!==ut||t[36]!==n?(e={...n,...ut},t[35]=ut,t[36]=n,t[37]=e):e=t[37];const P=e;let F;t[38]!==s||t[39]!==u?(F=J.jsx(ee,{isLoading:u,color:s}),t[38]=s,t[39]=u,t[40]=F):F=t[40];let p;t[41]!==s||t[42]!==A||t[43]!==tt||t[44]!==U||t[45]!==L||t[46]!==u||t[47]!==m||t[48]!==o||t[49]!==Y||t[50]!==z||t[51]!==D||t[52]!==a||t[53]!==S||t[54]!==N||t[55]!==E||t[56]!==v||t[57]!==g?(p=o&&J.jsxs(J.Fragment,{children:[N&&!u&&J.jsx(ue,{color:s,onDismiss:tt}),J.jsx(te,{content:o,title:g,setIsLoading:a,fontSize:L,sidePadding:E,fontFamily:U,isOptionMenuVisible:m,containerElementRef:_,showTutorial:N}),m&&J.jsx(ne,{onClose:()=>k(!1),fontSize:L,padding:E,fontFamily:U,colorScheme:A,setPadding:S,setFontSize:D,setFontFamily:z,setColorScheme:Y,supportedFonts:v,supportedColorschemes:[]}),!m&&J.jsx("div",{className:"bottom-click-area",onClick:()=>{N||k(!0)},"aria-label":"Open reader options"})]}),t[41]=s,t[42]=A,t[43]=tt,t[44]=U,t[45]=L,t[46]=u,t[47]=m,t[48]=o,t[49]=Y,t[50]=z,t[51]=D,t[52]=a,t[53]=S,t[54]=N,t[55]=E,t[56]=v,t[57]=g,t[58]=p):p=t[58];let d;t[59]!==b||t[60]!==i||t[61]!==u?(d=!b&&!u&&!i&&J.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No EPUB loaded."}),t[59]=b,t[60]=i,t[61]=u,t[62]=d):d=t[62];let x;return t[63]!==ht||t[64]!==P||t[65]!==F||t[66]!==p||t[67]!==d?(x=J.jsxs("div",{className:ht,style:P,ref:_,children:[F,p,d]}),t[63]=ht,t[64]=P,t[65]=F,t[66]=p,t[67]=d,t[68]=x):x=t[68],x};Et.BokReader=he,Object.defineProperty(Et,Symbol.toStringTag,{value:"Module"})});
|