diff options
author | Andrew Dolgov <[email protected]> | 2024-01-13 20:42:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2024-01-13 20:42:29 +0300 |
commit | 98e2ece85a03c8d4991bd0fbca61976d9732c53e (patch) | |
tree | 6dc480c2f6cef957b56d4492a68c22cd6e48471d | |
parent | 56ab880ec95dfd15e12780f7db839963030cd2c5 (diff) |
remove some promise chains with async/await
-rw-r--r-- | dist/app-libs.min.js | 24 | ||||
-rw-r--r-- | dist/app.min.js | 2 | ||||
-rw-r--r-- | js/reader.js | 1045 | ||||
-rw-r--r-- | lib/bootstrap/v3/js/jquery.js | 14901 |
4 files changed, 8489 insertions, 7483 deletions
diff --git a/dist/app-libs.min.js b/dist/app-libs.min.js index 94a1ceb..666b1eb 100644 --- a/dist/app-libs.min.js +++ b/dist/app-libs.min.js @@ -1,33 +1,23 @@ /*! - * jQuery JavaScript Library v1.9.1 - * http://jquery.com/ + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors + * Copyright OpenJS Foundation and other contributors * Released under the MIT license - * http://jquery.org/license + * https://jquery.org/license * - * Date: 2013-2-4 + * Date: 2023-08-28T13:37Z */ /*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under the MIT license */ -if(function(e,t){var i,n,r=e.document,s=e.location,o=e.jQuery,a=e.$,l={},c=[],h=c.concat,u=c.push,d=c.slice,f=c.indexOf,p=l.toString,g=l.hasOwnProperty,m="1.9.1".trim,v=function(e,t){return new v.fn.init(e,t,n)},y=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,b=/\S+/g,w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,_=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,k=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,S=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,C=/^-ms-/,N=/-([\da-z])/gi,O=function(e,t){return t.toUpperCase()},A=function(e){(r.addEventListener||"load"===e.type||"complete"===r.readyState)&&(I(),v.ready())},I=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",A,!1),e.removeEventListener("load",A,!1)):(r.detachEvent("onreadystatechange",A),e.detachEvent("onload",A))};function R(e){var t=e.length,i=v.type(e);return!v.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===i||"function"!==i&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}v.fn=v.prototype={jquery:"1.9.1",constructor:v,init:function(e,t,i){var n,s;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:x.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof v?t[0]:t,v.merge(this,v.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),_.test(n[1])&&v.isPlainObject(t))for(n in t)v.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((s=r.getElementById(n[2]))&&s.parentNode){if(s.id!==n[2])return i.find(e);this.length=1,this[0]=s}return this.context=r,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):v.isFunction(e)?i.ready(e):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=v.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},map:function(e){return this.pushStack(v.map(this,(function(t,i){return e.call(t,i,t)})))},end:function(){return this.prevObject||this.constructor(null)},push:u,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,t,i,n,r,s,o=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[1]||{},a=2),"object"==typeof o||v.isFunction(o)||(o={}),l===a&&(o=this,--a);a<l;a++)if(null!=(r=arguments[a]))for(n in r)e=o[n],o!==(i=r[n])&&(c&&i&&(v.isPlainObject(i)||(t=v.isArray(i)))?(t?(t=!1,s=e&&v.isArray(e)?e:[]):s=e&&v.isPlainObject(e)?e:{},o[n]=v.extend(c,s,i)):void 0!==i&&(o[n]=i));return o},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=o),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(!(!0===e?--v.readyWait:v.isReady)){if(!r.body)return setTimeout(v.ready);v.isReady=!0,!0!==e&&--v.readyWait>0||(i.resolveWith(r,[v]),v.fn.trigger&&v(r).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===v.type(e)},isArray:Array.isArray||function(e){return"array"===v.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?l[p.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==v.type(e)||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}var t;for(t in e);return void 0===t||g.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||r;var n=_.exec(e),s=!i&&[];return n?[t.createElement(n[1])]:(n=v.buildFragment([e],t,s),s&&v(s).remove(),v.merge([],n.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=v.trim(t))&&E.test(t.replace(T,"@").replace(S,"]").replace(k,""))?new Function("return "+t)():void v.error("Invalid JSON: "+t)},parseXML:function(t){var i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?i=(new DOMParser).parseFromString(t,"text/xml"):((i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(t))}catch(e){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||v.error("Invalid XML: "+t),i},noop:function(){},globalEval:function(t){t&&v.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(N,O)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var n=0,r=e.length,s=R(e);if(i){if(s)for(;n<r&&!1!==t.apply(e[n],i);n++);else for(n in e)if(!1===t.apply(e[n],i))break}else if(s)for(;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:m&&!m.call("\ufeff ")?function(e){return null==e?"":m.call(e)}:function(e){return null==e?"":(e+"").replace(w,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(R(Object(e))?v.merge(i,"string"==typeof e?[e]:e):u.call(i,e)),i},inArray:function(e,t,i){var n;if(t){if(f)return f.call(t,e,i);for(n=t.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,t){var i=t.length,n=e.length,r=0;if("number"==typeof i)for(;r<i;r++)e[n++]=t[r];else for(;void 0!==t[r];)e[n++]=t[r++];return e.length=n,e},grep:function(e,t,i){var n=[],r=0,s=e.length;for(i=!!i;r<s;r++)i!==!!t(e[r],r)&&n.push(e[r]);return n},map:function(e,t,i){var n,r=0,s=e.length,o=[];if(R(e))for(;r<s;r++)null!=(n=t(e[r],r,i))&&(o[o.length]=n);else for(r in e)null!=(n=t(e[r],r,i))&&(o[o.length]=n);return h.apply([],o)},guid:1,proxy:function(e,t){var i,n,r;if("string"==typeof t&&(r=e[t],t=e,e=r),v.isFunction(e))return i=d.call(arguments,2),(n=function(){return e.apply(t||this,i.concat(d.call(arguments)))}).guid=e.guid=e.guid||v.guid++,n},access:function(e,t,i,n,r,s,o){var a=0,l=e.length,c=null==i;if("object"===v.type(i))for(a in r=!0,i)v.access(e,t,a,i[a],!0,s,o);else if(void 0!==n&&(r=!0,v.isFunction(n)||(o=!0),c&&(o?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(v(e),i)})),t))for(;a<l;a++)t(e[a],i,o?n:n.call(e[a],a,t(e[a],i)));return r?e:c?t.call(e):l?t(e[0],i):s},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!i)if(i=v.Deferred(),"complete"===r.readyState)setTimeout(v.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",A,!1);else{r.attachEvent("onreadystatechange",A),e.attachEvent("onload",A);var n=!1;try{n=null==e.frameElement&&r.documentElement}catch(e){}n&&n.doScroll&&function e(){if(!v.isReady){try{n.doScroll("left")}catch(t){return setTimeout(e,50)}I(),v.ready()}}()}return i.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()})),n=v(r);var D={};v.Callbacks=function(e){e="string"==typeof e?D[e]||function(e){var t=D[e]={};return v.each(e.match(b)||[],(function(e,i){t[i]=!0})),t}(e):v.extend({},e);var t,i,n,r,s,o,a=[],l=!e.once&&[],c=function(u){for(i=e.memory&&u,n=!0,s=o||0,o=0,r=a.length,t=!0;a&&s<r;s++)if(!1===a[s].apply(u[0],u[1])&&e.stopOnFalse){i=!1;break}t=!1,a&&(l?l.length&&c(l.shift()):i?a=[]:h.disable())},h={add:function(){if(a){var n=a.length;!function t(i){v.each(i,(function(i,n){var r=v.type(n);"function"===r?e.unique&&h.has(n)||a.push(n):n&&n.length&&"string"!==r&&t(n)}))}(arguments),t?r=a.length:i&&(o=n,c(i))}return this},remove:function(){return a&&v.each(arguments,(function(e,i){for(var n;(n=v.inArray(i,a,n))>-1;)a.splice(n,1),t&&(n<=r&&r--,n<=s&&s--)})),this},has:function(e){return e?v.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],this},disable:function(){return a=l=i=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,i||h.disable(),this},locked:function(){return!l},fireWith:function(e,i){return i=[e,(i=i||[]).slice?i.slice():i],!a||n&&!l||(t?l.push(i):c(i)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred((function(i){v.each(t,(function(t,s){var o=s[0],a=v.isFunction(e[t])&&e[t];r[s[1]]((function(){var e=a&&a.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[o+"With"](this===n?i.promise():this,a?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?v.extend(e,n):n}},r={};return n.pipe=n.then,v.each(t,(function(e,s){var o=s[2],a=s[3];n[s[1]]=o.add,a&&o.add((function(){i=a}),t[1^e][2].disable,t[2][2].lock),r[s[0]]=function(){return r[s[0]+"With"](this===r?n:this,arguments),this},r[s[0]+"With"]=o.fireWith})),n.promise(r),e&&e.call(r,r),r},when:function(e){var t,i,n,r=0,s=d.call(arguments),o=s.length,a=1!==o||e&&v.isFunction(e.promise)?o:0,l=1===a?e:v.Deferred(),c=function(e,i,n){return function(r){i[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===t?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(o>1)for(t=new Array(o),i=new Array(o),n=new Array(o);r<o;r++)s[r]&&v.isFunction(s[r].promise)?s[r].promise().done(c(r,n,s)).fail(l.reject).progress(c(r,i,t)):--a;return a||l.resolveWith(n,s),l.promise()}}),v.support=function(){var t,i,n,s,o,a,l,c,h,u,d=r.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=d.getElementsByTagName("*"),n=d.getElementsByTagName("a")[0],!i||!n||!i.length)return{};l=(o=r.createElement("select")).appendChild(r.createElement("option")),s=d.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(n.getAttribute("style")),hrefNormalized:"/a"===n.getAttribute("href"),opacity:/^0.5/.test(n.style.opacity),cssFloat:!!n.style.cssFloat,checkOn:!!s.value,optSelected:l.selected,enctype:!!r.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===r.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,t.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(e){t.deleteExpando=!1}for(u in(s=r.createElement("input")).setAttribute("value",""),t.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),t.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),(a=r.createDocumentFragment()).appendChild(s),t.appendChecked=s.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",(function(){t.noCloneEvent=!1})),d.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+u,"t"),t[u+"Bubbles"]=c in e||!1===d.attributes[c].expando;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,v((function(){var i,n,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=r.getElementsByTagName("body")[0];a&&((i=r.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(i).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(s=d.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=h&&0===s[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,(n=d.appendChild(r.createElement("div"))).style.cssText=d.style.cssText=o,n.style.marginRight=n.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(n,null)||{}).marginRight)),void 0!==d.style.zoom&&(d.innerHTML="",d.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(i),i=d=s=n=null)})),i=o=a=l=n=s=null,t}();var j=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,z=/([A-Z])/g;function L(e,t,i,n){if(v.acceptData(e)){var r,s,o=v.expando,a="string"==typeof t,l=e.nodeType,h=l?v.cache:e,u=l?e[o]:e[o]&&o;if(u&&h[u]&&(n||h[u].data)||!a||void 0!==i)return u||(l?e[o]=u=c.pop()||v.guid++:u=o),h[u]||(h[u]={},l||(h[u].toJSON=v.noop)),"object"!=typeof t&&"function"!=typeof t||(n?h[u]=v.extend(h[u],t):h[u].data=v.extend(h[u].data,t)),r=h[u],n||(r.data||(r.data={}),r=r.data),void 0!==i&&(r[v.camelCase(t)]=i),a?null==(s=r[t])&&(s=r[v.camelCase(t)]):s=r,s}}function B(e,t,i){if(v.acceptData(e)){var n,r,s,o=e.nodeType,a=o?v.cache:e,l=o?e[v.expando]:v.expando;if(a[l]){if(t&&(s=i?a[l]:a[l].data)){for((n=0,r=(t=v.isArray(t)?t.concat(v.map(t,v.camelCase)):t in s||(t=v.camelCase(t))in s?[t]:t.split(" ")).length);n<r;n++)delete s[t[n]];if(!(i?M:v.isEmptyObject)(s))return}(i||(delete a[l].data,M(a[l])))&&(o?v.cleanData([e],!0):v.support.deleteExpando||a!=a.window?delete a[l]:a[l]=null)}}}function P(e,t,i){if(void 0===i&&1===e.nodeType){var n="data-"+t.replace(z,"-$1").toLowerCase();if("string"==typeof(i=e.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:j.test(i)?v.parseJSON(i):i)}catch(e){}v.data(e,t,i)}else i=void 0}return i}function M(e){var t;for(t in e)if(("data"!==t||!v.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}v.extend({cache:{},expando:"jQuery"+("1.9.1"+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?v.cache[e[v.expando]]:e[v.expando])&&!M(e)},data:function(e,t,i){return L(e,t,i)},removeData:function(e,t){return B(e,t)},_data:function(e,t,i){return L(e,t,i,!0)},_removeData:function(e,t){return B(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||!0!==t&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,t){var i,n,r=this[0],s=0,o=null;if(void 0===e){if(this.length&&(o=v.data(r),1===r.nodeType&&!v._data(r,"parsedAttrs"))){for(i=r.attributes;s<i.length;s++)(n=i[s].name).indexOf("data-")||(n=v.camelCase(n.slice(5)),P(r,n,o[n]));v._data(r,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each((function(){v.data(this,e)})):v.access(this,(function(t){if(void 0===t)return r?P(r,e,v.data(r,e)):null;this.each((function(){v.data(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){v.removeData(this,e)}))}}),v.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=v._data(e,t),i&&(!n||v.isArray(i)?n=v._data(e,t,v.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=v.queue(e,t),n=i.length,r=i.shift(),s=v._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),s.cur=r,r&&("fx"===t&&i.unshift("inprogress"),delete s.stop,r.call(e,(function(){v.dequeue(e,t)}),s)),!n&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return v._data(e,i)||v._data(e,i,{empty:v.Callbacks("once memory").add((function(){v._removeData(e,t+"queue"),v._removeData(e,i)}))})}}),v.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?v.queue(this[0],e):void 0===t?this:this.each((function(){var i=v.queue(this,e,t);v._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&v.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){v.dequeue(this,e)}))},delay:function(e,t){return e=v.fx&&v.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var n=setTimeout(t,e);i.stop=function(){clearTimeout(n)}}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=v.Deferred(),s=this,o=this.length,a=function(){--n||r.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(i=v._data(s[o],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(t)}});var F,q,U=/[\t\r\n]/g,W=/\r/g,H=/^(?:input|select|textarea|button|object)$/i,$=/^(?:a|area)$/i,X=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Y=/^(?:checked|selected)$/i,V=v.support.getSetAttribute,Z=v.support.input;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){v.removeAttr(this,e)}))},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each((function(){try{this[e]=void 0,delete this[e]}catch(e){}}))},addClass:function(e){var t,i,n,r,s,o=0,a=this.length,l="string"==typeof e&&e;if(v.isFunction(e))return this.each((function(t){v(this).addClass(e.call(this,t,this.className))}));if(l)for(t=(e||"").match(b)||[];o<a;o++)if(n=1===(i=this[o]).nodeType&&(i.className?(" "+i.className+" ").replace(U," "):" ")){for(s=0;r=t[s++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");i.className=v.trim(n)}return this},removeClass:function(e){var t,i,n,r,s,o=0,a=this.length,l=0===arguments.length||"string"==typeof e&&e;if(v.isFunction(e))return this.each((function(t){v(this).removeClass(e.call(this,t,this.className))}));if(l)for(t=(e||"").match(b)||[];o<a;o++)if(n=1===(i=this[o]).nodeType&&(i.className?(" "+i.className+" ").replace(U," "):"")){for(s=0;r=t[s++];)for(;n.indexOf(" "+r+" ")>=0;)n=n.replace(" "+r+" "," ");i.className=e?v.trim(n):""}return this},toggleClass:function(e,t){var i=typeof e,n="boolean"==typeof t;return v.isFunction(e)?this.each((function(i){v(this).toggleClass(e.call(this,i,this.className,t),t)})):this.each((function(){if("string"===i)for(var r,s=0,o=v(this),a=t,l=e.match(b)||[];r=l[s++];)a=n?a:!o.hasClass(r),o[a?"addClass":"removeClass"](r);else"undefined"!==i&&"boolean"!==i||(this.className&&v._data(this,"__className__",this.className),this.className=this.className||!1===e?"":v._data(this,"__className__")||"")}))},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,i,n,r=this[0];return arguments.length?(n=v.isFunction(e),this.each((function(t){var r,s=v(this);1===this.nodeType&&(null==(r=n?e.call(this,t,s.val()):e)?r="":"number"==typeof r?r+="":v.isArray(r)&&(r=v.map(r,(function(e){return null==e?"":e+""}))),(i=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&void 0!==i.set(this,r,"value")||(this.value=r))}))):r?(i=v.valHooks[r.type]||v.valHooks[r.nodeName.toLowerCase()])&&"get"in i&&void 0!==(t=i.get(r,"value"))?t:"string"==typeof(t=r.value)?t.replace(W,""):null==t?"":t:void 0}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,i,n=e.options,r=e.selectedIndex,s="select-one"===e.type||r<0,o=s?null:[],a=s?r+1:n.length,l=r<0?a:s?r:0;l<a;l++)if(((i=n[l]).selected||l===r)&&(v.support.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!v.nodeName(i.parentNode,"optgroup"))){if(t=v(i).val(),s)return t;o.push(t)}return o},set:function(e,t){var i=v.makeArray(t);return v(e).find("option").each((function(){this.selected=v.inArray(v(this).val(),i)>=0})),i.length||(e.selectedIndex=-1),i}}},attr:function(e,t,i){var n,r,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?v.prop(e,t,i):((r=1!==o||!v.isXMLDoc(e))&&(t=t.toLowerCase(),n=v.attrHooks[t]||(X.test(t)?q:F)),void 0===i?n&&r&&"get"in n&&null!==(s=n.get(e,t))?s:(void 0!==e.getAttribute&&(s=e.getAttribute(t)),null==s?void 0:s):null!==i?n&&r&&"set"in n&&void 0!==(s=n.set(e,i,t))?s:(e.setAttribute(t,i+""),i):void v.removeAttr(e,t))},removeAttr:function(e,t){var i,n,r=0,s=t&&t.match(b);if(s&&1===e.nodeType)for(;i=s[r++];)n=v.propFix[i]||i,X.test(i)?!V&&Y.test(i)?e[v.camelCase("default-"+i)]=e[n]=!1:e[n]=!1:v.attr(e,i,""),e.removeAttribute(V?i:n)},attrHooks:{type:{set:function(e,t){if(!v.support.radioValue&&"radio"===t&&v.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,t,i){var n,r,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return(1!==s||!v.isXMLDoc(e))&&(t=v.propFix[t]||t,r=v.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttributeNode("tabindex");return t&&t.specified?parseInt(t.value,10):H.test(e.nodeName)||$.test(e.nodeName)&&e.href?0:void 0}}}}),q={get:function(e,t){var i=v.prop(e,t),n="boolean"==typeof i&&e.getAttribute(t),r="boolean"==typeof i?Z&&V?null!=n:Y.test(t)?e[v.camelCase("default-"+t)]:!!n:e.getAttributeNode(t);return r&&!1!==r.value?t.toLowerCase():void 0},set:function(e,t,i){return!1===t?v.removeAttr(e,i):Z&&V||!Y.test(i)?e.setAttribute(!V&&v.propFix[i]||i,i):e[v.camelCase("default-"+i)]=e[i]=!0,i}},Z&&V||(v.attrHooks.value={get:function(e,t){var i=e.getAttributeNode(t);return v.nodeName(e,"input")?e.defaultValue:i&&i.specified?i.value:void 0},set:function(e,t,i){if(!v.nodeName(e,"input"))return F&&F.set(e,t,i);e.defaultValue=t}}),V||(F=v.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);return i&&("id"===t||"name"===t||"coords"===t?""!==i.value:i.specified)?i.value:void 0},set:function(e,t,i){var n=e.getAttributeNode(i);return n||e.setAttributeNode(n=e.ownerDocument.createAttribute(i)),n.value=t+="","value"===i||t===e.getAttribute(i)?t:void 0}},v.attrHooks.contenteditable={get:F.get,set:function(e,t,i){F.set(e,""!==t&&t,i)}},v.each(["width","height"],(function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,i){if(""===i)return e.setAttribute(t,"auto"),i}})}))),v.support.hrefNormalized||(v.each(["href","src","width","height"],(function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{get:function(e){var i=e.getAttribute(t,2);return null==i?void 0:i}})})),v.each(["href","src"],(function(e,t){v.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}))),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],(function(){v.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}})),v.each(["radio","checkbox"],(function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})}));var G=/^(?:input|select|textarea)$/i,K=/^key/,Q=/^(?:mouse|contextmenu)|click/,J=/^(?:focusinfocus|focusoutblur)$/,ee=/^([^.]*)(?:\.(.+)|)$/;function te(){return!0}function ie(){return!1}v.event={global:{},add:function(e,t,i,n,r){var s,o,a,l,c,h,u,d,f,p,g,m=v._data(e);if(m){for(i.handler&&(i=(l=i).handler,r=l.selector),i.guid||(i.guid=v.guid++),(o=m.events)||(o=m.events={}),(h=m.handle)||((h=m.handle=function(e){return void 0===v||e&&v.event.triggered===e.type?void 0:v.event.dispatch.apply(h.elem,arguments)}).elem=e),a=(t=(t||"").match(b)||[""]).length;a--;)f=g=(s=ee.exec(t[a])||[])[1],p=(s[2]||"").split(".").sort(),c=v.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,c=v.event.special[f]||{},u=v.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&v.expr.match.needsContext.test(r),namespace:p.join(".")},l),(d=o[f])||((d=o[f]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,n,p,h)||(e.addEventListener?e.addEventListener(f,h,!1):e.attachEvent&&e.attachEvent("on"+f,h))),c.add&&(c.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),v.event.global[f]=!0;e=null}},remove:function(e,t,i,n,r){var s,o,a,l,c,h,u,d,f,p,g,m=v.hasData(e)&&v._data(e);if(m&&(h=m.events)){for(c=(t=(t||"").match(b)||[""]).length;c--;)if(f=g=(a=ee.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(u=v.event.special[f]||{},d=h[f=(n?u.delegateType:u.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=s=d.length;s--;)o=d[s],!r&&g!==o.origType||i&&i.guid!==o.guid||a&&!a.test(o.namespace)||n&&n!==o.selector&&("**"!==n||!o.selector)||(d.splice(s,1),o.selector&&d.delegateCount--,u.remove&&u.remove.call(e,o));l&&!d.length&&(u.teardown&&!1!==u.teardown.call(e,p,m.handle)||v.removeEvent(e,f,m.handle),delete h[f])}else for(f in h)v.event.remove(e,f+t[c],i,n,!0);v.isEmptyObject(h)&&(delete m.handle,v._removeData(e,"events"))}},trigger:function(t,i,n,s){var o,a,l,c,h,u,d,f=[n||r],p=g.call(t,"type")?t.type:t,m=g.call(t,"namespace")?t.namespace.split("."):[];if(l=u=n=n||r,3!==n.nodeType&&8!==n.nodeType&&!J.test(p+v.event.triggered)&&(p.indexOf(".")>=0&&(m=p.split("."),p=m.shift(),m.sort()),a=p.indexOf(":")<0&&"on"+p,(t=t[v.expando]?t:new v.Event(p,"object"==typeof t&&t)).isTrigger=!0,t.namespace=m.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:v.makeArray(i,[t]),h=v.event.special[p]||{},s||!h.trigger||!1!==h.trigger.apply(n,i))){if(!s&&!h.noBubble&&!v.isWindow(n)){for(c=h.delegateType||p,J.test(c+p)||(l=l.parentNode);l;l=l.parentNode)f.push(l),u=l;u===(n.ownerDocument||r)&&f.push(u.defaultView||u.parentWindow||e)}for(d=0;(l=f[d++])&&!t.isPropagationStopped();)t.type=d>1?c:h.bindType||p,(o=(v._data(l,"events")||{})[t.type]&&v._data(l,"handle"))&&o.apply(l,i),(o=a&&l[a])&&v.acceptData(l)&&o.apply&&!1===o.apply(l,i)&&t.preventDefault();if(t.type=p,!s&&!t.isDefaultPrevented()&&(!h._default||!1===h._default.apply(n.ownerDocument,i))&&("click"!==p||!v.nodeName(n,"a"))&&v.acceptData(n)&&a&&n[p]&&!v.isWindow(n)){(u=n[a])&&(n[a]=null),v.event.triggered=p;try{n[p]()}catch(e){}v.event.triggered=void 0,u&&(n[a]=u)}return t.result}},dispatch:function(e){e=v.event.fix(e);var t,i,n,r,s,o=[],a=d.call(arguments),l=(v._data(this,"events")||{})[e.type]||[],c=v.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(o=v.event.handlers.call(this,e,l),t=0;(r=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,s=0;(n=r.handlers[s++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(n.namespace)||(e.handleObj=n,e.data=n.data,void 0!==(i=((v.event.special[n.origType]||{}).handle||n.handler).apply(r.elem,a))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,r,s,o=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],s=0;s<a;s++)void 0===r[i=(n=t[s]).selector+" "]&&(r[i]=n.needsContext?v(i,this).index(l)>=0:v.find(i,this,null,[l]).length),r[i]&&r.push(n);r.length&&o.push({elem:l,handlers:r})}return a<t.length&&o.push({elem:this,handlers:t.slice(a)}),o},fix:function(e){if(e[v.expando])return e;var t,i,n,s=e.type,o=e,a=this.fixHooks[s];for(a||(this.fixHooks[s]=a=Q.test(s)?this.mouseHooks:K.test(s)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new v.Event(o),t=n.length;t--;)e[i=n[t]]=o[i];return e.target||(e.target=o.srcElement||r),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,s,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(s=(n=e.target.ownerDocument||r).documentElement,i=n.body,e.pageX=t.clientX+(s&&s.scrollLeft||i&&i.scrollLeft||0)-(s&&s.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(s&&s.scrollTop||i&&i.scrollTop||0)-(s&&s.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){if(v.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===r.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var r=v.extend(new v.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?v.event.trigger(r,null,t):v.event.dispatch.call(t,r),r.isDefaultPrevented()&&i.preventDefault()}},v.removeEvent=r.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(void 0===e[n]&&(e[n]=null),e.detachEvent(n,i))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?te:ie):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={isDefaultPrevented:ie,isPropagationStopped:ie,isImmediatePropagationStopped:ie,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=te,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=te,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=te,this.stopPropagation()}},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,s=e.handleObj;return r&&(r===n||v.contains(n,r))||(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=t),i}}})),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",(function(e){var t=e.target,i=v.nodeName(t,"input")||v.nodeName(t,"button")?t.form:void 0;i&&!v._data(i,"submitBubbles")&&(v.event.add(i,"submit._submit",(function(e){e._submit_bubble=!0})),v._data(i,"submitBubbles",!0))}))},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if(G.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(v.event.add(this,"propertychange._change",(function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)})),v.event.add(this,"click._change",(function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)}))),!1;v.event.add(this,"beforeactivate._change",(function(e){var t=e.target;G.test(t.nodeName)&&!v._data(t,"changeBubbles")&&(v.event.add(t,"change._change",(function(e){!this.parentNode||e.isSimulated||e.isTrigger||v.event.simulate("change",this.parentNode,e,!0)})),v._data(t,"changeBubbles",!0))}))},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!G.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=0,n=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){0==i++&&r.addEventListener(e,n,!0)},teardown:function(){0==--i&&r.removeEventListener(e,n,!0)}}})),v.fn.extend({on:function(e,t,i,n,r){var s,o;if("object"==typeof e){for(s in"string"!=typeof t&&(i=i||t,t=void 0),e)this.on(s,t,i,e[s],r);return this}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),!1===n)n=ie;else if(!n)return this;return 1===r&&(o=n,(n=function(e){return v().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=v.guid++)),this.each((function(){v.event.add(this,e,n,i,t)}))},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,v(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=ie),this.each((function(){v.event.remove(this,e,i,t)}))},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},trigger:function(e,t){return this.each((function(){v.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return v.event.trigger(e,t,i,!0)}}), -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -function(e,t){var i,n,r,s,o,a,l,c,h,u,d,f,p,g,m,y,b,w="sizzle"+-new Date,x=e.document,_={},E=0,k=0,T=ee(),S=ee(),C=ee(),N=[],O=N.pop,A=N.push,I=N.slice,R=N.indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(this[t]===e)return t;return-1},D="[\\x20\\t\\r\\n\\f]",j="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",z=j.replace("w","w#"),L="\\["+D+"*("+j+")"+D+"*(?:([*^$|!~]?=)"+D+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+z+")|)|)"+D+"*\\]",B=":("+j+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+L.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g"),M=new RegExp("^"+D+"*,"+D+"*"),F=new RegExp("^"+D+"*([\\x20\\t\\r\\n\\f>+~])"+D+"*"),q=new RegExp(B),U=new RegExp("^"+z+"$"),W={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),NAME:new RegExp("^\\[name=['\"]?("+j+")['\"]?\\]"),TAG:new RegExp("^("+j.replace("w","w*")+")"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},H=/[\x20\t\r\n\f]*[+~]/,$=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,Z=/'|\\/g,G=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,K=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Q=function(e,t){var i="0x"+t-65536;return i!=i?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{I.call(x.documentElement.childNodes,0)[0].nodeType}catch(e){I=function(e){for(var t,i=[];t=this[e++];)i.push(t);return i}}function J(e){return $.test(e+"")}function ee(){var e,t=[];return e=function(i,n){return t.push(i+=" ")>r.cacheLength&&delete e[t.shift()],e[i]=n}}function te(e){return e[w]=!0,e}function ie(e){var t=u.createElement("div");try{return e(t)}catch(e){return!1}finally{t=null}}function ne(e,t,i,n){var s,o,l,c,d,g,m,v,b,E;if((t?t.ownerDocument||t:x)!==u&&h(t),i=i||[],!e||"string"!=typeof e)return i;if(1!==(c=(t=t||u).nodeType)&&9!==c)return[];if(!f&&!n){if(s=X.exec(e))if(l=s[1]){if(9===c){if(!(o=t.getElementById(l))||!o.parentNode)return i;if(o.id===l)return i.push(o),i}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(l))&&y(t,o)&&o.id===l)return i.push(o),i}else{if(s[2])return A.apply(i,I.call(t.getElementsByTagName(e),0)),i;if((l=s[3])&&_.getByClassName&&t.getElementsByClassName)return A.apply(i,I.call(t.getElementsByClassName(l),0)),i}if(_.qsa&&!p.test(e)){if(m=!0,v=w,b=t,E=9===c&&e,1===c&&"object"!==t.nodeName.toLowerCase()){for(g=le(e),(m=t.getAttribute("id"))?v=m.replace(Z,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",d=g.length;d--;)g[d]=v+ce(g[d]);b=H.test(e)&&t.parentNode||t,E=g.join(",")}if(E)try{return A.apply(i,I.call(b.querySelectorAll(E),0)),i}catch(e){}finally{m||t.removeAttribute("id")}}}return function(e,t,i,n){var s,o,l,c,h,u=le(e);if(!n&&1===u.length){if((o=u[0]=u[0].slice(0)).length>2&&"ID"===(l=o[0]).type&&9===t.nodeType&&!f&&r.relative[o[1].type]){if(!(t=r.find.ID(l.matches[0].replace(K,Q),t)[0]))return i;e=e.slice(o.shift().value.length)}for(s=W.needsContext.test(e)?0:o.length;s--&&(l=o[s],!r.relative[c=l.type]);)if((h=r.find[c])&&(n=h(l.matches[0].replace(K,Q),H.test(o[0].type)&&t.parentNode||t))){if(o.splice(s,1),!(e=n.length&&ce(o)))return A.apply(i,I.call(n,0)),i;break}}return a(e,u)(n,t,f,i,H.test(e)),i}(e.replace(P,"$1"),t,i,n)}function re(e,t){var i=t&&e,n=i&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function se(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function oe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function ae(e){return te((function(t){return t=+t,te((function(i,n){for(var r,s=e([],i.length,t),o=s.length;o--;)i[r=s[o]]&&(i[r]=!(n[r]=i[r]))}))}))}for(i in o=ne.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=ne.setDocument=function(e){var t=e?e.ownerDocument||e:x;return t!==u&&9===t.nodeType&&t.documentElement?(u=t,d=t.documentElement,f=o(t),_.tagNameNoComments=ie((function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length})),_.attributes=ie((function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t})),_.getByClassName=ie((function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)})),_.getByName=ie((function(e){e.id=w+0,e.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",d.insertBefore(e,d.firstChild);var i=t.getElementsByName&&t.getElementsByName(w).length===2+t.getElementsByName(w+0).length;return _.getIdNotName=!t.getElementById(w),d.removeChild(e),i})),r.attrHandle=ie((function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&void 0!==e.firstChild.getAttribute&&"#"===e.firstChild.getAttribute("href")}))?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},_.getIdNotName?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&!f){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(e){var t=e.replace(K,Q);return function(e){return e.getAttribute("id")===t}}):(r.find.ID=function(e,t){if(void 0!==t.getElementById&&!f){var i=t.getElementById(e);return i?i.id===e||void 0!==i.getAttributeNode&&i.getAttributeNode("id").value===e?[i]:void 0:[]}},r.filter.ID=function(e){var t=e.replace(K,Q);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=_.tagNameNoComments?function(e,t){if(void 0!==t.getElementsByTagName)return t.getElementsByTagName(e)}:function(e,t){var i,n=[],r=0,s=t.getElementsByTagName(e);if("*"===e){for(;i=s[r++];)1===i.nodeType&&n.push(i);return n}return s},r.find.NAME=_.getByName&&function(e,t){if(void 0!==t.getElementsByName)return t.getElementsByName(name)},r.find.CLASS=_.getByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&!f)return t.getElementsByClassName(e)},g=[],p=[":focus"],(_.qsa=J(t.querySelectorAll))&&(ie((function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||p.push("\\["+D+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||p.push(":checked")})),ie((function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&p.push("[*^$]="+D+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||p.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),p.push(",.*:")}))),(_.matchesSelector=J(m=d.matchesSelector||d.mozMatchesSelector||d.webkitMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ie((function(e){_.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",B)})),p=new RegExp(p.join("|")),g=new RegExp(g.join("|")),y=J(d.contains)||d.compareDocumentPosition?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},b=d.compareDocumentPosition?function(e,i){var n;return e===i?(l=!0,0):(n=i.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(i))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===t||y(x,e)?-1:i===t||y(x,i)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,i){var n,r=0,s=e.parentNode,o=i.parentNode,a=[e],c=[i];if(e===i)return l=!0,0;if(!s||!o)return e===t?-1:i===t?1:s?-1:o?1:0;if(s===o)return re(e,i);for(n=e;n=n.parentNode;)a.unshift(n);for(n=i;n=n.parentNode;)c.unshift(n);for(;a[r]===c[r];)r++;return r?re(a[r],c[r]):a[r]===x?-1:c[r]===x?1:0},l=!1,[0,0].sort(b),_.detectDuplicates=l,u):u},ne.matches=function(e,t){return ne(e,null,null,t)},ne.matchesSelector=function(e,t){if((e.ownerDocument||e)!==u&&h(e),t=t.replace(G,"='$1']"),_.matchesSelector&&!f&&(!g||!g.test(t))&&!p.test(t))try{var i=m.call(e,t);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return ne(t,u,null,[e]).length>0},ne.contains=function(e,t){return(e.ownerDocument||e)!==u&&h(e),y(e,t)},ne.attr=function(e,t){var i;return(e.ownerDocument||e)!==u&&h(e),f||(t=t.toLowerCase()),(i=r.attrHandle[t])?i(e):f||_.attributes?e.getAttribute(t):((i=e.getAttributeNode(t))||e.getAttribute(t))&&!0===e[t]?t:i&&i.specified?i.value:null},ne.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ne.uniqueSort=function(e){var t,i=[],n=1,r=0;if(l=!_.detectDuplicates,e.sort(b),l){for(;t=e[n];n++)t===e[n-1]&&(r=i.push(n));for(;r--;)e.splice(i[r],1)}return e},s=ne.getText=function(e){var t,i="",n=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=s(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[n];n++)i+=s(t);return i},r=ne.selectors={cacheLength:50,createPseudo:te,match:W,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,Q),e[3]=(e[4]||e[5]||"").replace(K,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ne.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ne.error(e[0]),e},PSEUDO:function(e){var t,i=!e[5]&&e[2];return W.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:i&&q.test(i)&&(t=le(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(K,Q).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&T(e,(function(e){return t.test(e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=ne.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,l){var c,h,u,d,f,p,g=s!==o?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a;if(m){if(s){for(;g;){for(u=t;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?m.firstChild:m.lastChild],o&&y){for(f=(c=(h=m[w]||(m[w]={}))[e]||[])[0]===E&&c[1],d=c[0]===E&&c[2],u=f&&m.childNodes[f];u=++f&&u&&u[g]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===t){h[e]=[E,f,d];break}}else if(y&&(c=(t[w]||(t[w]={}))[e])&&c[0]===E)d=c[1];else for(;(u=++f&&u&&u[g]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[w]||(u[w]={}))[e]=[E,d]),u!==t)););return(d-=r)===n||d%n==0&&d/n>=0}}},PSEUDO:function(e,t){var i,n=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ne.error("unsupported pseudo: "+e);return n[w]?n(t):n.length>1?(i=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,i){for(var r,s=n(e,t),o=s.length;o--;)e[r=R.call(e,s[o])]=!(i[r]=s[o])})):function(e){return n(e,0,i)}):n}},pseudos:{not:te((function(e){var t=[],i=[],n=a(e.replace(P,"$1"));return n[w]?te((function(e,t,i,r){for(var s,o=n(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))})):function(e,r,s){return t[0]=e,n(t,null,s,i),!i.pop()}})),has:te((function(e){return function(t){return ne(e,t).length>0}})),contains:te((function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}})),lang:te((function(e){return U.test(e||"")||ne.error("unsupported lang: "+e),e=e.replace(K,Q).toLowerCase(),function(t){var i;do{if(i=f?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===u.activeElement&&(!u.hasFocus||u.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,i){return[i<0?i+t:i]})),even:ae((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ae((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ae((function(e,t,i){for(var n=i<0?i+t:i;--n>=0;)e.push(n);return e})),gt:ae((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}},{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[i]=se(i);for(i in{submit:!0,reset:!0})r.pseudos[i]=oe(i);function le(e,t){var i,n,s,o,a,l,c,h=S[e+" "];if(h)return t?0:h.slice(0);for(a=e,l=[],c=r.preFilter;a;){for(o in i&&!(n=M.exec(a))||(n&&(a=a.slice(n[0].length)||a),l.push(s=[])),i=!1,(n=F.exec(a))&&(i=n.shift(),s.push({value:i,type:n[0].replace(P," ")}),a=a.slice(i.length)),r.filter)!(n=W[o].exec(a))||c[o]&&!(n=c[o](n))||(i=n.shift(),s.push({value:i,type:o,matches:n}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ne.error(e):S(e,l).slice(0)}function ce(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function he(e,t,i){var r=t.dir,s=i&&"parentNode"===r,o=k++;return t.first?function(t,i,n){for(;t=t[r];)if(1===t.nodeType||s)return e(t,i,n)}:function(t,i,a){var l,c,h,u=E+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,i,a))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if((c=(h=t[w]||(t[w]={}))[r])&&c[0]===u){if(!0===(l=c[1])||l===n)return!0===l}else if((c=h[r]=[u])[1]=e(t,i,a)||n,!0===c[1])return!0}}function ue(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function de(e,t,i,n,r){for(var s,o=[],a=0,l=e.length,c=null!=t;a<l;a++)(s=e[a])&&(i&&!i(s,n,r)||(o.push(s),c&&t.push(a)));return o}function fe(e,t,i,n,r,s){return n&&!n[w]&&(n=fe(n)),r&&!r[w]&&(r=fe(r,s)),te((function(s,o,a,l){var c,h,u,d=[],f=[],p=o.length,g=s||function(e,t,i){for(var n=0,r=t.length;n<r;n++)ne(e,t[n],i);return i}(t||"*",a.nodeType?[a]:a,[]),m=!e||!s&&t?g:de(g,d,e,a,l),v=i?r||(s?e:p||n)?[]:o:m;if(i&&i(m,v,a,l),n)for(c=de(v,f),n(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[f[h]]=!(m[f[h]]=u));if(s){if(r||e){if(r){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);r(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=r?R.call(s,u):d[h])>-1&&(s[c]=!(o[c]=u))}}else v=de(v===o?v.splice(p,v.length):v),r?r(null,o,v,l):A.apply(o,v)}))}function pe(e){for(var t,i,n,s=e.length,o=r.relative[e[0].type],a=o||r.relative[" "],l=o?1:0,h=he((function(e){return e===t}),a,!0),u=he((function(e){return R.call(t,e)>-1}),a,!0),d=[function(e,i,n){return!o&&(n||i!==c)||((t=i).nodeType?h(e,i,n):u(e,i,n))}];l<s;l++)if(i=r.relative[e[l].type])d=[he(ue(d),i)];else{if((i=r.filter[e[l].type].apply(null,e[l].matches))[w]){for(n=++l;n<s&&!r.relative[e[n].type];n++);return fe(l>1&&ue(d),l>1&&ce(e.slice(0,l-1)).replace(P,"$1"),i,l<n&&pe(e.slice(l,n)),n<s&&pe(e=e.slice(n)),n<s&&ce(e))}d.push(i)}return ue(d)}function ge(){}a=ne.compile=function(e,t){var i,s=[],o=[],a=C[e+" "];if(!a){for(t||(t=le(e)),i=t.length;i--;)(a=pe(t[i]))[w]?s.push(a):o.push(a);a=C(e,function(e,t){var i=0,s=t.length>0,o=e.length>0,a=function(a,l,h,d,f){var p,g,m,v=[],y=0,b="0",w=a&&[],x=null!=f,_=c,k=a||o&&r.find.TAG("*",f&&l.parentNode||l),T=E+=null==_?1:Math.random()||.1;for(x&&(c=l!==u&&l,n=i);null!=(p=k[b]);b++){if(o&&p){for(g=0;m=e[g++];)if(m(p,l,h)){d.push(p);break}x&&(E=T,n=++i)}s&&((p=!m&&p)&&y--,a&&w.push(p))}if(y+=b,s&&b!==y){for(g=0;m=t[g++];)m(w,v,l,h);if(a){if(y>0)for(;b--;)w[b]||v[b]||(v[b]=O.call(d));v=de(v)}A.apply(d,v),x&&!a&&v.length>0&&y+t.length>1&&ne.uniqueSort(d)}return x&&(E=T,c=_),w};return s?te(a):a}(o,s))}return a},r.pseudos.nth=r.pseudos.eq,r.filters=ge.prototype=r.pseudos,r.setFilters=new ge,h(),ne.attr=v.attr,v.find=ne,v.expr=ne.selectors,v.expr[":"]=v.expr.pseudos,v.unique=ne.uniqueSort,v.text=ne.getText,v.isXMLDoc=ne.isXML,v.contains=ne.contains}(e);var ne=/Until$/,re=/^(?:parents|prev(?:Until|All))/,se=/^.[^:#\[\.,]*$/,oe=v.expr.match.needsContext,ae={children:!0,contents:!0,next:!0,prev:!0};function le(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function ce(e,t,i){if(t=t||0,v.isFunction(t))return v.grep(e,(function(e,n){return!!t.call(e,n,e)===i}));if(t.nodeType)return v.grep(e,(function(e){return e===t===i}));if("string"==typeof t){var n=v.grep(e,(function(e){return 1===e.nodeType}));if(se.test(t))return v.filter(t,n,!i);t=v.filter(t,n)}return v.grep(e,(function(e){return v.inArray(e,t)>=0===i}))}function he(e){var t=ue.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}v.fn.extend({find:function(e){var t,i,n,r=this.length;if("string"!=typeof e)return n=this,this.pushStack(v(e).filter((function(){for(t=0;t<r;t++)if(v.contains(n[t],this))return!0})));for(i=[],t=0;t<r;t++)v.find(e,this[t],i);return(i=this.pushStack(r>1?v.unique(i):i)).selector=(this.selector?this.selector+" ":"")+e,i},has:function(e){var t,i=v(e,this),n=i.length;return this.filter((function(){for(t=0;t<n;t++)if(v.contains(this,i[t]))return!0}))},not:function(e){return this.pushStack(ce(this,e,!1))},filter:function(e){return this.pushStack(ce(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?oe.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var i,n=0,r=this.length,s=[],o=oe.test(e)||"string"!=typeof e?v(e,t||this.context):0;n<r;n++)for(i=this[n];i&&i.ownerDocument&&i!==t&&11!==i.nodeType;){if(o?o.index(i)>-1:v.find.matchesSelector(i,e)){s.push(i);break}i=i.parentNode}return this.pushStack(s.length>1?v.unique(s):s)},index:function(e){return e?"string"==typeof e?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var i="string"==typeof e?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),n=v.merge(this.get(),i);return this.pushStack(v.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,i){return v.dir(e,"parentNode",i)},next:function(e){return le(e,"nextSibling")},prev:function(e){return le(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,i){return v.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return v.dir(e,"previousSibling",i)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},(function(e,t){v.fn[e]=function(i,n){var r=v.map(this,t,i);return ne.test(e)||(n=i),n&&"string"==typeof n&&(r=v.filter(n,r)),r=this.length>1&&!ae[e]?v.unique(r):r,this.length>1&&re.test(e)&&(r=r.reverse()),this.pushStack(r)}})),v.extend({filter:function(e,t,i){return i&&(e=":not("+e+")"),1===t.length?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,t,i){for(var n=[],r=e[t];r&&9!==r.nodeType&&(void 0===i||1!==r.nodeType||!v(r).is(i));)1===r.nodeType&&n.push(r),r=r[t];return n},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}});var ue="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",de=/ jQuery\d+="(?:null|\d+)"/g,fe=new RegExp("<(?:"+ue+")[\\s/>]","i"),pe=/^\s+/,ge=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,me=/<([\w:]+)/,ve=/<tbody/i,ye=/<|&#?\w+;/,be=/<(?:script|style|link)/i,we=/^(?:checkbox|radio)$/i,xe=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^$|\/(?:java|ecma)script/i,Ee=/^true\/(.*)/,ke=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Te={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:v.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Se=he(r).appendChild(r.createElement("div"));function Ce(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Ne(e){var t=Ee.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Oe(e,t){for(var i,n=0;null!=(i=e[n]);n++)v._data(i,"globalEval",!t||v._data(t[n],"globalEval"))}function Ae(e,t){if(1===t.nodeType&&v.hasData(e)){var i,n,r,s=v._data(e),o=v._data(t,s),a=s.events;if(a)for(i in delete o.handle,o.events={},a)for(n=0,r=a[i].length;n<r;n++)v.event.add(t,i,a[i][n]);o.data&&(o.data=v.extend({},o.data))}}function Ie(e,t){var i,n,r;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!v.support.noCloneEvent&&t[v.expando]){for(n in(r=v._data(t)).events)v.removeEvent(t,n,r.handle);t.removeAttribute(v.expando)}"script"===i&&t.text!==e.text?(Ce(t).text=e.text,Ne(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&we.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}}function Re(e,t){var i,n,r=0,s=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!s)for(s=[],i=e.childNodes||e;null!=(n=i[r]);r++)!t||v.nodeName(n,t)?s.push(n):v.merge(s,Re(n,t));return void 0===t||t&&v.nodeName(e,t)?v.merge([e],s):s}function De(e){we.test(e.type)&&(e.defaultChecked=e.checked)}Te.optgroup=Te.option,Te.tbody=Te.tfoot=Te.colgroup=Te.caption=Te.thead,Te.th=Te.td,v.fn.extend({text:function(e){return v.access(this,(function(e){return void 0===e?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(e))}),null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each((function(t){v(this).wrapAll(e.call(this,t))}));if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each((function(t){v(this).wrapInner(e.call(this,t))})):this.each((function(){var t=v(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v.isFunction(e);return this.each((function(i){v(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(){return this.parent().each((function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(e)}))},prepend:function(){return this.domManip(arguments,!0,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(e,this.firstChild)}))},before:function(){return this.domManip(arguments,!1,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return this.domManip(arguments,!1,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},remove:function(e,t){for(var i,n=0;null!=(i=this[n]);n++)(!e||v.filter(e,[i]).length>0)&&(t||1!==i.nodeType||v.cleanData(Re(i)),i.parentNode&&(t&&v.contains(i.ownerDocument,i)&&Oe(Re(i,"script")),i.parentNode.removeChild(i)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&v.cleanData(Re(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&v.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return v.clone(this,e,t)}))},html:function(e){return v.access(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(de,""):void 0;if("string"==typeof e&&!be.test(e)&&(v.support.htmlSerialize||!fe.test(e))&&(v.support.leadingWhitespace||!pe.test(e))&&!Te[(me.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ge,"<$1></$2>");try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(v.cleanData(Re(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(e){return v.isFunction(e)||"string"==typeof e||(e=v(e).not(this).detach()),this.domManip([e],!0,(function(e){var t=this.nextSibling,i=this.parentNode;i&&(v(this).remove(),i.insertBefore(e,t))}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,i){e=h.apply([],e);var n,r,s,o,a,l,c,u,d=0,f=this.length,p=this,g=f-1,m=e[0],y=v.isFunction(m);if(y||!(f<=1||"string"!=typeof m||v.support.checkClone)&&xe.test(m))return this.each((function(n){var r=p.eq(n);y&&(e[0]=m.call(this,n,t?r.html():void 0)),r.domManip(e,t,i)}));if(f&&(n=(l=v.buildFragment(e,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=n),n)){for(t=t&&v.nodeName(n,"tr"),s=(o=v.map(Re(l,"script"),Ce)).length;d<f;d++)r=l,d!==g&&(r=v.clone(r,!0,!0),s&&v.merge(o,Re(r,"script"))),i.call(t&&v.nodeName(this[d],"table")?(c=this[d],u="tbody",c.getElementsByTagName(u)[0]||c.appendChild(c.ownerDocument.createElement(u))):this[d],r,d);if(s)for(a=o[o.length-1].ownerDocument,v.map(o,Ne),d=0;d<s;d++)r=o[d],_e.test(r.type||"")&&!v._data(r,"globalEval")&&v.contains(a,r)&&(r.src?v.ajax({url:r.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):v.globalEval((r.text||r.textContent||r.innerHTML||"").replace(ke,"")));l=n=null}return this}}),v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){v.fn[e]=function(e){for(var i,n=0,r=[],s=v(e),o=s.length-1;n<=o;n++)i=n===o?this:this.clone(!0),v(s[n])[t](i),u.apply(r,i.get());return this.pushStack(r)}})),v.extend({clone:function(e,t,i){var n,r,s,o,a,l=v.contains(e.ownerDocument,e);if(v.support.html5Clone||v.isXMLDoc(e)||!fe.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(Se.innerHTML=e.outerHTML,Se.removeChild(s=Se.firstChild)),!(v.support.noCloneEvent&&v.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||v.isXMLDoc(e)))for(n=Re(s),a=Re(e),o=0;null!=(r=a[o]);++o)n[o]&&Ie(r,n[o]);if(t)if(i)for(a=a||Re(e),n=n||Re(s),o=0;null!=(r=a[o]);o++)Ae(r,n[o]);else Ae(e,s);return(n=Re(s,"script")).length>0&&Oe(n,!l&&Re(e,"script")),n=a=r=null,s},buildFragment:function(e,t,i,n){for(var r,s,o,a,l,c,h,u=e.length,d=he(t),f=[],p=0;p<u;p++)if((s=e[p])||0===s)if("object"===v.type(s))v.merge(f,s.nodeType?[s]:s);else if(ye.test(s)){for(a=a||d.appendChild(t.createElement("div")),l=(me.exec(s)||["",""])[1].toLowerCase(),h=Te[l]||Te._default,a.innerHTML=h[1]+s.replace(ge,"<$1></$2>")+h[2],r=h[0];r--;)a=a.lastChild;if(!v.support.leadingWhitespace&&pe.test(s)&&f.push(t.createTextNode(pe.exec(s)[0])),!v.support.tbody)for(r=(s="table"!==l||ve.test(s)?"<table>"!==h[1]||ve.test(s)?0:a:a.firstChild)&&s.childNodes.length;r--;)v.nodeName(c=s.childNodes[r],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(v.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(t.createTextNode(s));for(a&&d.removeChild(a),v.support.appendChecked||v.grep(Re(f,"input"),De),p=0;s=f[p++];)if((!n||-1===v.inArray(s,n))&&(o=v.contains(s.ownerDocument,s),a=Re(d.appendChild(s),"script"),o&&Oe(a),i))for(r=0;s=a[r++];)_e.test(s.type||"")&&i.push(s);return a=null,d},cleanData:function(e,t){for(var i,n,r,s,o=0,a=v.expando,l=v.cache,h=v.support.deleteExpando,u=v.event.special;null!=(i=e[o]);o++)if((t||v.acceptData(i))&&(s=(r=i[a])&&l[r])){if(s.events)for(n in s.events)u[n]?v.event.remove(i,n):v.removeEvent(i,n,s.handle);l[r]&&(delete l[r],h?delete i[a]:void 0!==i.removeAttribute?i.removeAttribute(a):i[a]=null,c.push(r))}}});var je,ze,Le,Be=/alpha\([^)]*\)/i,Pe=/opacity\s*=\s*([^)]*)/,Me=/^(top|right|bottom|left)$/,Fe=/^(none|table(?!-c[ea]).+)/,qe=/^margin/,Ue=new RegExp("^("+y+")(.*)$","i"),We=new RegExp("^("+y+")(?!px)[a-z%]+$","i"),He=new RegExp("^([+-])=("+y+")","i"),$e={BODY:"block"},Xe={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:0,fontWeight:400},Ve=["Top","Right","Bottom","Left"],Ze=["Webkit","O","Moz","ms"];function Ge(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,r=Ze.length;r--;)if((t=Ze[r]+i)in e)return t;return n}function Ke(e,t){return e=t||e,"none"===v.css(e,"display")||!v.contains(e.ownerDocument,e)}function Qe(e,t){for(var i,n,r,s=[],o=0,a=e.length;o<a;o++)(n=e[o]).style&&(s[o]=v._data(n,"olddisplay"),i=n.style.display,t?(s[o]||"none"!==i||(n.style.display=""),""===n.style.display&&Ke(n)&&(s[o]=v._data(n,"olddisplay",it(n.nodeName)))):s[o]||(r=Ke(n),(i&&"none"!==i||!r)&&v._data(n,"olddisplay",r?i:v.css(n,"display"))));for(o=0;o<a;o++)(n=e[o]).style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?s[o]||"":"none"));return e}function Je(e,t,i){var n=Ue.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function et(e,t,i,n,r){for(var s=i===(n?"border":"content")?4:"width"===t?1:0,o=0;s<4;s+=2)"margin"===i&&(o+=v.css(e,i+Ve[s],!0,r)),n?("content"===i&&(o-=v.css(e,"padding"+Ve[s],!0,r)),"margin"!==i&&(o-=v.css(e,"border"+Ve[s]+"Width",!0,r))):(o+=v.css(e,"padding"+Ve[s],!0,r),"padding"!==i&&(o+=v.css(e,"border"+Ve[s]+"Width",!0,r)));return o}function tt(e,t,i){var n=!0,r="width"===t?e.offsetWidth:e.offsetHeight,s=ze(e),o=v.support.boxSizing&&"border-box"===v.css(e,"boxSizing",!1,s);if(r<=0||null==r){if(((r=Le(e,t,s))<0||null==r)&&(r=e.style[t]),We.test(r))return r;n=o&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+et(e,t,i||(o?"border":"content"),n,s)+"px"}function it(e){var t=r,i=$e[e];return i||("none"!==(i=nt(e,t))&&i||((t=((je=(je||v("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||je[0].contentDocument).document).write("<!doctype html><html><body>"),t.close(),i=nt(e,t),je.detach()),$e[e]=i),i}function nt(e,t){var i=v(t.createElement(e)).appendTo(t.body),n=v.css(i[0],"display");return i.remove(),n}v.fn.extend({css:function(e,t){return v.access(this,(function(e,t,i){var n,r,s={},o=0;if(v.isArray(t)){for(r=ze(e),n=t.length;o<n;o++)s[t[o]]=v.css(e,t[o],!1,r);return s}return void 0!==i?v.style(e,t,i):v.css(e,t)}),e,t,arguments.length>1)},show:function(){return Qe(this,!0)},hide:function(){return Qe(this)},toggle:function(e){var t="boolean"==typeof e;return this.each((function(){(t?e:Ke(this))?v(this).show():v(this).hide()}))}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Le(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,o,a=v.camelCase(t),l=e.style;if(t=v.cssProps[a]||(v.cssProps[a]=Ge(l,a)),o=v.cssHooks[t]||v.cssHooks[a],void 0===i)return o&&"get"in o&&void 0!==(r=o.get(e,!1,n))?r:l[t];if(!("string"===(s=typeof i)&&(r=He.exec(i))&&(i=(r[1]+1)*r[2]+parseFloat(v.css(e,t)),s="number"),null==i||"number"===s&&isNaN(i)||("number"!==s||v.cssNumber[a]||(i+="px"),v.support.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(i=o.set(e,i,n)))))try{l[t]=i}catch(e){}}},css:function(e,t,i,n){var r,s,o,a=v.camelCase(t);return t=v.cssProps[a]||(v.cssProps[a]=Ge(e.style,a)),(o=v.cssHooks[t]||v.cssHooks[a])&&"get"in o&&(s=o.get(e,!0,i)),void 0===s&&(s=Le(e,t,n)),"normal"===s&&t in Ye&&(s=Ye[t]),""===i||i?(r=parseFloat(s),!0===i||v.isNumeric(r)?r||0:s):s},swap:function(e,t,i,n){var r,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];for(s in r=i.apply(e,n||[]),t)e.style[s]=o[s];return r}}),e.getComputedStyle?(ze=function(t){return e.getComputedStyle(t,null)},Le=function(e,t,i){var n,r,s,o=i||ze(e),a=o?o.getPropertyValue(t)||o[t]:void 0,l=e.style;return o&&(""!==a||v.contains(e.ownerDocument,e)||(a=v.style(e,t)),We.test(a)&&qe.test(t)&&(n=l.width,r=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=o.width,l.width=n,l.minWidth=r,l.maxWidth=s)),a}):r.documentElement.currentStyle&&(ze=function(e){return e.currentStyle},Le=function(e,t,i){var n,r,s,o=i||ze(e),a=o?o[t]:void 0,l=e.style;return null==a&&l&&l[t]&&(a=l[t]),We.test(a)&&!Me.test(t)&&(n=l.left,(s=(r=e.runtimeStyle)&&r.left)&&(r.left=e.currentStyle.left),l.left="fontSize"===t?"1em":a,a=l.pixelLeft+"px",l.left=n,s&&(r.left=s)),""===a?"auto":a}),v.each(["height","width"],(function(e,t){v.cssHooks[t]={get:function(e,i,n){if(i)return 0===e.offsetWidth&&Fe.test(v.css(e,"display"))?v.swap(e,Xe,(function(){return tt(e,t,n)})):tt(e,t,n)},set:function(e,i,n){var r=n&&ze(e);return Je(0,i,n?et(e,t,n,v.support.boxSizing&&"border-box"===v.css(e,"boxSizing",!1,r),r):0)}}})),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return Pe.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,r=v.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=n&&n.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===v.trim(s.replace(Be,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=Be.test(s)?s.replace(Be,r):s+" "+r)}}),v((function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){if(t)return v.swap(e,{display:"inline-block"},Le,[e,"marginRight"])}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],(function(e,t){v.cssHooks[t]={get:function(e,i){if(i)return i=Le(e,t),We.test(i)?v(e).position()[t]+"px":i}}}))})),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!v.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||v.css(e,"display"))},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},(function(e,t){v.cssHooks[e+t]={expand:function(i){for(var n=0,r={},s="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+Ve[n]+t]=s[n]||s[n-2]||s[0];return r}},qe.test(e)||(v.cssHooks[e+t].set=Je)}));var rt=/%20/g,st=/\[\]$/,ot=/\r?\n/g,at=/^(?:submit|button|image|reset|file)$/i,lt=/^(?:input|select|textarea|keygen)/i;function ct(e,t,i,n){var r;if(v.isArray(t))v.each(t,(function(t,r){i||st.test(e)?n(e,r):ct(e+"["+("object"==typeof r?t:"")+"]",r,i,n)}));else if(i||"object"!==v.type(t))n(e,t);else for(r in t)ct(e+"["+r+"]",t[r],i,n)}v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=v.prop(this,"elements");return e?v.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!v(this).is(":disabled")&<.test(this.nodeName)&&!at.test(e)&&(this.checked||!we.test(e))})).map((function(e,t){var i=v(this).val();return null==i?null:v.isArray(i)?v.map(i,(function(e){return{name:t.name,value:e.replace(ot,"\r\n")}})):{name:t.name,value:i.replace(ot,"\r\n")}})).get()}}),v.param=function(e,t){var i,n=[],r=function(e,t){t=v.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=v.ajaxSettings&&v.ajaxSettings.traditional),v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,(function(){r(this.name,this.value)}));else for(i in e)ct(i,e[i],t,r);return n.join("&").replace(rt,"+")},v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){v.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}})),v.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var ht,ut,dt=v.now(),ft=/\?/,pt=/#.*$/,gt=/([?&])_=[^&]*/,mt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,vt=/^(?:GET|HEAD)$/,yt=/^\/\//,bt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,wt=v.fn.load,xt={},_t={},Et="*/".concat("*");try{ut=s.href}catch(e){(ut=r.createElement("a")).href="",ut=ut.href}function kt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,s=t.toLowerCase().match(b)||[];if(v.isFunction(i))for(;n=s[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Tt(e,t,i,n){var r={},s=e===_t;function o(a){var l;return r[a]=!0,v.each(e[a]||[],(function(e,a){var c=a(t,i,n);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!r["*"]&&o("*")}function St(e,t){var i,n,r=v.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&v.extend(!0,e,i),e}ht=bt.exec(ut.toLowerCase())||[],v.fn.load=function(e,t,i){if("string"!=typeof e&&wt)return wt.apply(this,arguments);var n,r,s,o=this,a=e.indexOf(" ");return a>=0&&(n=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(s="POST"),o.length>0&&v.ajax({url:e,type:s,dataType:"html",data:t}).done((function(e){r=arguments,o.html(n?v("<div>").append(v.parseHTML(e)).find(n):e)})).complete(i&&function(e,t){o.each(i,r||[e.responseText,t,e])}),this},v.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){v.fn[t]=function(e){return this.on(t,e)}})),v.each(["get","post"],(function(e,t){v[t]=function(e,i,n,r){return v.isFunction(i)&&(r=r||n,n=i,i=void 0),v.ajax({url:e,type:t,dataType:r,data:i,success:n})}})),v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ut,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ht[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Et,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?St(St(e,v.ajaxSettings),t):St(v.ajaxSettings,e)},ajaxPrefilter:kt(xt),ajaxTransport:kt(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,r,s,o,a,l,c,h=v.ajaxSetup({},t),u=h.context||h,d=h.context&&(u.nodeType||u.jquery)?v(u):v.event,f=v.Deferred(),p=v.Callbacks("once memory"),g=h.statusCode||{},m={},y={},w=0,x="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!c)for(c={};t=mt.exec(s);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return w||(e=y[i]=y[i]||e,m[e]=t),this},overrideMimeType:function(e){return w||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)g[t]=[g[t],e[t]];else _.always(e[_.status]);return this},abort:function(e){var t=e||x;return l&&l.abort(t),E(0,t),this}};if(f.promise(_).complete=p.add,_.success=_.done,_.error=_.fail,h.url=((e||h.url||ut)+"").replace(pt,"").replace(yt,ht[1]+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=v.trim(h.dataType||"*").toLowerCase().match(b)||[""],null==h.crossDomain&&(i=bt.exec(h.url.toLowerCase()),h.crossDomain=!(!i||i[1]===ht[1]&&i[2]===ht[2]&&(i[3]||("http:"===i[1]?80:443))==(ht[3]||("http:"===ht[1]?80:443)))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=v.param(h.data,h.traditional)),Tt(xt,h,t,_),2===w)return _;for(n in(a=h.global)&&0==v.active++&&v.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!vt.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(ft.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=gt.test(r)?r.replace(gt,"$1_="+dt++):r+(ft.test(r)?"&":"?")+"_="+dt++)),h.ifModified&&(v.lastModified[r]&&_.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&_.setRequestHeader("If-None-Match",v.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&_.setRequestHeader("Content-Type",h.contentType),_.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Et+"; q=0.01":""):h.accepts["*"]),h.headers)_.setRequestHeader(n,h.headers[n]);if(h.beforeSend&&(!1===h.beforeSend.call(u,_,h)||2===w))return _.abort();for(n in x="abort",{success:1,error:1,complete:1})_[n](h[n]);if(l=Tt(_t,h,t,_)){_.readyState=1,a&&d.trigger("ajaxSend",[_,h]),h.async&&h.timeout>0&&(o=setTimeout((function(){_.abort("timeout")}),h.timeout));try{w=1,l.send(m,E)}catch(e){if(!(w<2))throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,i,n){var c,m,y,b,x,E=t;2!==w&&(w=2,o&&clearTimeout(o),l=void 0,s=n||"",_.readyState=e>0?4:0,i&&(b=function(e,t,i){var n,r,s,o,a=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in i&&(t[c[o]]=i[o]);for(;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){l.unshift(o);break}if(l[0]in i)s=l[0];else{for(o in i){if(!l[0]||e.converters[o+" "+l[0]]){s=o;break}n||(n=o)}s=s||n}if(s)return s!==l[0]&&l.unshift(s),i[s]}(h,_,i)),e>=200&&e<300||304===e?(h.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(v.lastModified[r]=x),(x=_.getResponseHeader("etag"))&&(v.etag[r]=x)),204===e?(c=!0,E="nocontent"):304===e?(c=!0,E="notmodified"):(E=(c=function(e,t){var i,n,r,s,o={},a=0,l=e.dataTypes.slice(),c=l[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(l[1])for(r in e.converters)o[r.toLowerCase()]=e.converters[r];for(;n=l[++a];)if("*"!==n){if("*"!==c&&c!==n){if(!(r=o[c+" "+n]||o["* "+n]))for(i in o)if((s=i.split(" "))[1]===n&&(r=o[c+" "+s[0]]||o["* "+s[0]])){!0===r?r=o[i]:!0!==o[i]&&(n=s[0],l.splice(a--,0,n));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+c+" to "+n}}}c=n}return{state:"success",data:t}}(h,b)).state,m=c.data,c=!(y=c.error))):(y=E,!e&&E||(E="error",e<0&&(e=0))),_.status=e,_.statusText=(t||E)+"",c?f.resolveWith(u,[m,E,_]):f.rejectWith(u,[_,E,y]),_.statusCode(g),g=void 0,a&&d.trigger(c?"ajaxSuccess":"ajaxError",[_,h,c?m:y]),p.fireWith(u,[_,E]),a&&(d.trigger("ajaxComplete",[_,h]),--v.active||v.event.trigger("ajaxStop")))}return _},getScript:function(e,t){return v.get(e,void 0,t,"script")},getJSON:function(e,t,i){return v.get(e,t,i,"json")}}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)})),v.ajaxTransport("script",(function(e){if(e.crossDomain){var t,i=r.head||v("head")[0]||r.documentElement;return{send:function(n,s){(t=r.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||s(200,"success"))},i.insertBefore(t,i.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}));var Ct=[],Nt=/(=)\?(?=&|$)|\?\?/;v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ct.pop()||v.expando+"_"+dt++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",(function(t,i,n){var r,s,o,a=!1!==t.jsonp&&(Nt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Nt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=v.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Nt,"$1"+r):!1!==t.jsonp&&(t.url+=(ft.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return o||v.error(r+" was not called"),o[0]},t.dataTypes[0]="json",s=e[r],e[r]=function(){o=arguments},n.always((function(){e[r]=s,t[r]&&(t.jsonpCallback=i.jsonpCallback,Ct.push(r)),o&&v.isFunction(s)&&s(o[0]),o=s=void 0})),"script"}));var Ot,At,It=0,Rt=e.ActiveXObject&&function(){var e;for(e in Ot)Ot[e](void 0,!0)};function Dt(){try{return new e.XMLHttpRequest}catch(e){}}v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Dt()||function(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:Dt,At=v.ajaxSettings.xhr(),v.support.cors=!!At&&"withCredentials"in At,(At=v.support.ajax=!!At)&&v.ajaxTransport((function(t){var i;if(!t.crossDomain||v.support.cors)return{send:function(n,r){var s,o,a=t.xhr();if(t.username?a.open(t.type,t.url,t.async,t.username,t.password):a.open(t.type,t.url,t.async),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");try{for(o in n)a.setRequestHeader(o,n[o])}catch(e){}a.send(t.hasContent&&t.data||null),i=function(e,n){var o,l,c,h;try{if(i&&(n||4===a.readyState))if(i=void 0,s&&(a.onreadystatechange=v.noop,Rt&&delete Ot[s]),n)4!==a.readyState&&a.abort();else{h={},o=a.status,l=a.getAllResponseHeaders(),"string"==typeof a.responseText&&(h.text=a.responseText);try{c=a.statusText}catch(e){c=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=h.text?200:404}}catch(e){n||r(-1,e)}h&&r(o,c,h,l)},t.async?4===a.readyState?setTimeout(i):(s=++It,Rt&&(Ot||(Ot={},v(e).unload(Rt)),Ot[s]=i),a.onreadystatechange=i):i()},abort:function(){i&&i(void 0,!0)}}}));var jt,zt,Lt=/^(?:toggle|show|hide)$/,Bt=new RegExp("^(?:([+-])=|)("+y+")([a-z%]*)$","i"),Pt=/queueHooks$/,Mt=[function(e,t,i){var n,r,s,o,a,l,c,h,u,d=this,f=e.style,p={},g=[],m=e.nodeType&&Ke(e);i.queue||(null==(h=v._queueHooks(e,"fx")).unqueued&&(h.unqueued=0,u=h.empty.fire,h.empty.fire=function(){h.unqueued||u()}),h.unqueued++,d.always((function(){d.always((function(){h.unqueued--,v.queue(e,"fx").length||h.empty.fire()}))})));1===e.nodeType&&("height"in t||"width"in t)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===v.css(e,"display")&&"none"===v.css(e,"float")&&(v.support.inlineBlockNeedsLayout&&"inline"!==it(e.nodeName)?f.zoom=1:f.display="inline-block"));i.overflow&&(f.overflow="hidden",v.support.shrinkWrapBlocks||d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})));for(r in t)if(o=t[r],Lt.exec(o)){if(delete t[r],l=l||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(s=g.length){"hidden"in(a=v._data(e,"fxshow")||v._data(e,"fxshow",{}))&&(m=a.hidden),l&&(a.hidden=!m),m?v(e).show():d.done((function(){v(e).hide()})),d.done((function(){var t;for(t in v._removeData(e,"fxshow"),p)v.style(e,t,p[t])}));for(r=0;r<s;r++)n=g[r],c=d.createTween(n,m?a[n]:0),p[n]=a[n]||v.style(e,n),n in a||(a[n]=c.start,m&&(c.end=c.start,c.start="width"===n||"height"===n?1:0))}}],Ft={"*":[function(e,t){var i,n,r=this.createTween(e,t),s=Bt.exec(t),o=r.cur(),a=+o||0,l=1,c=20;if(s){if(i=+s[2],"px"!==(n=s[3]||(v.cssNumber[e]?"":"px"))&&a){a=v.css(r.elem,e,!0)||i||1;do{a/=l=l||".5",v.style(r.elem,e,a+n)}while(l!==(l=r.cur()/o)&&1!==l&&--c)}r.unit=n,r.start=a,r.end=s[1]?a+(s[1]+1)*i:i}return r}]};function qt(){return setTimeout((function(){jt=void 0})),jt=v.now()}function Ut(e,t,i){var n,r,s=0,o=Mt.length,a=v.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=jt||qt(),i=Math.max(0,c.startTime+c.duration-t),n=1-(i/c.duration||0),s=0,o=c.tweens.length;s<o;s++)c.tweens[s].run(n);return a.notifyWith(e,[c,n,i]),n<1&&o?i:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},i),originalProperties:t,originalOptions:i,startTime:jt||qt(),duration:i.duration,tweens:[],createTween:function(t,i){var n=v.Tween(e,c.opts,t,i,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(n),n},stop:function(t){var i=0,n=t?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),h=c.props;for(!function(e,t){var i,n,r,s,o;for(r in e)if(n=v.camelCase(r),s=t[n],i=e[r],v.isArray(i)&&(s=i[1],i=e[r]=i[0]),r!==n&&(e[n]=i,delete e[r]),(o=v.cssHooks[n])&&"expand"in o)for(r in i=o.expand(i),delete e[n],i)r in e||(e[r]=i[r],t[r]=s);else t[n]=s}(h,c.opts.specialEasing);s<o;s++)if(n=Mt[s].call(c,e,h,c.opts))return n;return function(e,t){v.each(t,(function(t,i){for(var n=(Ft[t]||[]).concat(Ft["*"]),r=0,s=n.length;r<s;r++)if(n[r].call(e,t,i))return}))}(c,h),v.isFunction(c.opts.start)&&c.opts.start.call(e,c),v.fx.timer(v.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function Wt(e,t,i,n,r){return new Wt.prototype.init(e,t,i,n,r)}function Ht(e,t){var i,n={height:e},r=0;for(t=t?1:0;r<4;r+=2-t)n["margin"+(i=Ve[r])]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function $t(e){return v.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}v.Animation=v.extend(Ut,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var i,n=0,r=e.length;n<r;n++)i=e[n],Ft[i]=Ft[i]||[],Ft[i].unshift(t)},prefilter:function(e,t){t?Mt.unshift(e):Mt.push(e)}}),v.Tween=Wt,Wt.prototype={constructor:Wt,init:function(e,t,i,n,r,s){this.elem=e,this.prop=i,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=s||(v.cssNumber[i]?"":"px")},cur:function(){var e=Wt.propHooks[this.prop];return e&&e.get?e.get(this):Wt.propHooks._default.get(this)},run:function(e){var t,i=Wt.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Wt.propHooks._default.set(this),this}},Wt.prototype.init.prototype=Wt.prototype,Wt.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=v.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[v.cssProps[e.prop]]||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Wt.propHooks.scrollTop=Wt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],(function(e,t){var i=v.fn[t];v.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Ht(t,!0),e,n,r)}})),v.fn.extend({fadeTo:function(e,t,i,n){return this.filter(Ke).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=v.isEmptyObject(e),s=v.speed(t,i,n),o=function(){var t=Ut(this,v.extend({},e),s);o.finish=function(){t.stop(!0)},(r||v._data(this,"finish"))&&t.stop(!0)};return o.finish=o,r||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",s=v.timers,o=v._data(this);if(r)o[r]&&o[r].stop&&n(o[r]);else for(r in o)o[r]&&o[r].stop&&Pt.test(r)&&n(o[r]);for(r=s.length;r--;)s[r].elem!==this||null!=e&&s[r].queue!==e||(s[r].anim.stop(i),t=!1,s.splice(r,1));!t&&i||v.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=v._data(this),n=i[e+"queue"],r=i[e+"queueHooks"],s=v.timers,o=n?n.length:0;for(i.finish=!0,v.queue(this,e,[]),r&&r.cur&&r.cur.finish&&r.cur.finish.call(this),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),v.each({slideDown:Ht("show"),slideUp:Ht("hide"),slideToggle:Ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){v.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),v.speed=function(e,t,i){var n=e&&"object"==typeof e?v.extend({},e):{complete:i||!i&&t||v.isFunction(e)&&e,duration:e,easing:i&&t||t&&!v.isFunction(t)&&t};return n.duration=v.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in v.fx.speeds?v.fx.speeds[n.duration]:v.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v.isFunction(n.old)&&n.old.call(this),n.queue&&v.dequeue(this,n.queue)},n},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Wt.prototype.init,v.fx.tick=function(){var e,t=v.timers,i=0;for(jt=v.now();i<t.length;i++)(e=t[i])()||t[i]!==e||t.splice(i--,1);t.length||v.fx.stop(),jt=void 0},v.fx.timer=function(e){e()&&v.timers.push(e)&&v.fx.start()},v.fx.interval=13,v.fx.start=function(){zt||(zt=setInterval(v.fx.tick,v.fx.interval))},v.fx.stop=function(){clearInterval(zt),zt=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,(function(t){return e===t.elem})).length}),v.fn.offset=function(e){if(arguments.length)return void 0===e?this:this.each((function(t){v.offset.setOffset(this,e,t)}));var t,i,n={top:0,left:0},r=this[0],s=r&&r.ownerDocument;return s?(t=s.documentElement,v.contains(t,r)?(void 0!==r.getBoundingClientRect&&(n=r.getBoundingClientRect()),i=$t(s),{top:n.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:n.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):n):void 0},v.offset={setOffset:function(e,t,i){var n=v.css(e,"position");"static"===n&&(e.style.position="relative");var r,s,o=v(e),a=o.offset(),l=v.css(e,"top"),c=v.css(e,"left"),h={},u={};("absolute"===n||"fixed"===n)&&v.inArray("auto",[l,c])>-1?(r=(u=o.position()).top,s=u.left):(r=parseFloat(l)||0,s=parseFloat(c)||0),v.isFunction(t)&&(t=t.call(e,i,a)),null!=t.top&&(h.top=t.top-a.top+r),null!=t.left&&(h.left=t.left-a.left+s),"using"in t?t.using.call(e,h):o.css(h)}},v.fn.extend({position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===v.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),v.nodeName(e[0],"html")||(i=e.offset()),i.top+=v.css(e[0],"borderTopWidth",!0),i.left+=v.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-v.css(n,"marginTop",!0),left:t.left-i.left-v.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||r.documentElement;e&&!v.nodeName(e,"html")&&"static"===v.css(e,"position");)e=e.offsetParent;return e||r.documentElement}))}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i=/Y/.test(t);v.fn[e]=function(n){return v.access(this,(function(e,n,r){var s=$t(e);if(void 0===r)return s?t in s?s[t]:s.document.documentElement[n]:e[n];s?s.scrollTo(i?v(s).scrollLeft():r,i?r:v(s).scrollTop()):e[n]=r}),e,n,arguments.length,null)}})),v.each({Height:"height",Width:"width"},(function(e,t){v.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){v.fn[n]=function(n,r){var s=arguments.length&&(i||"boolean"!=typeof n),o=i||(!0===n||!0===r?"margin":"border");return v.access(this,(function(t,i,n){var r;return v.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===n?v.css(t,i,o):v.style(t,i,n,o)}),t,s?n:void 0,s,null)}}))})),e.jQuery=e.$=v,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],(function(){return v}))}(window),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(e){"use strict";e.fn.emulateTransitionEnd=function(t){var i=!1,n=this;e(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||e(n).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return{end:t[i]};return!1}(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',i=function(i){e(i).on("click",t,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){o.detach().trigger("closed.bs.alert").remove()}var r=e(this),s=r.attr("data-target");s||(s=(s=r.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,""));var o=e(s);t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var n=e.fn.alert;e.fn.alert=function(t){return this.each((function(){var n=e(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof t&&r[t].call(n)}))},e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=n,this},e(document).on("click.bs.alert.data-api",t,i.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each((function(){var n=e(this),r=n.data("bs.button"),s="object"==typeof t&&t;r||n.data("bs.button",r=new i(this,s)),"toggle"==t?r.toggle():t&&r.setState(t)}))}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.5",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(t){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",s=n.data();t+="Text",null==s.resetText&&n.data("resetText",n[r]()),setTimeout(e.proxy((function(){n[r](null==s[t]?this.options[t]:s[t]),"loadingText"==t?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))}),this),0)},i.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),e&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=t,e.fn.button.Constructor=i,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(i){var n=e(i.target);n.hasClass("btn")||(n=n.closest(".btn")),t.call(n,"toggle"),e(i.target).is('input[type="radio"]')||e(i.target).is('input[type="checkbox"]')||i.preventDefault()})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";function t(t){return this.each((function(){var n=e(this),r=n.data("bs.carousel"),s=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t),o="string"==typeof t?t:s.slide;r||n.data("bs.carousel",r=new i(this,s)),"number"==typeof t?r.to(t):o?r[o]():s.interval&&r.pause().cycle()}))}var i=function(t,i){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},i.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},i.prototype.getItemForDirection=function(e,t){var i=this.getItemIndex(t);if(("prev"==e&&0===i||"next"==e&&i==this.$items.length-1)&&!this.options.wrap)return t;var n=(i+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(e){var t=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",this.$items.eq(e))},i.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(t,n){var r=this.$element.find(".item.active"),s=n||this.getItemForDirection(t,r),o=this.interval,a="next"==t?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var c=s[0],h=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=e(this.$indicators.children()[this.getItemIndex(s)]);u&&u.addClass("active")}var d=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(s.addClass(t),s[0].offsetWidth,r.addClass(a),s.addClass(a),r.one("bsTransitionEnd",(function(){s.removeClass([t,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(d)),o&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=i,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this};var r=function(i){var n,r=e(this),s=e(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var o=e.extend({},s.data(),r.data()),a=r.attr("data-slide-to");a&&(o.interval=!1),t.call(s,o),a&&s.data("bs.carousel").to(a),i.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var i=e(this);t.call(i,i.data())}))}))}(jQuery),function(e){"use strict";function t(t){var i,n=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return e(n)}function i(t){return this.each((function(){var i=e(this),r=i.data("bs.collapse"),s=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t);!r&&s.toggle&&/show|hide/.test(t)&&(s.toggle=!1),r||i.data("bs.collapse",r=new n(this,s)),"string"==typeof t&&r[t]()}))}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(t=r.data("bs.collapse"),t&&t.transitioning))){var s=e.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),t||r.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var l=e.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[o](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[i](0).one("bsTransitionEnd",e.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(i,n){var r=e(n);this.addAriaAndCollapsedClass(t(r),r)}),this)).end()},n.prototype.addAriaAndCollapsedClass=function(e,t){var i=e.hasClass("in");e.attr("aria-expanded",i),t.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=e.fn.collapse;e.fn.collapse=i,e.fn.collapse.Constructor=n,e.fn.collapse.noConflict=function(){return e.fn.collapse=r,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(n){var r=e(this);r.attr("data-target")||n.preventDefault();var s=t(r),o=s.data("bs.collapse")?"toggle":r.data();i.call(s,o)}))}(jQuery),function(e){"use strict";function t(t){var i=t.attr("data-target");i||(i=(i=t.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&e(i);return n&&n.length?n:t.parent()}function i(i){i&&3===i.which||(e(n).remove(),e(r).each((function(){var n=e(this),r=t(n),s={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&e.contains(r[0],i.target)||(r.trigger(i=e.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",s))))})))}var n=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.5",s.prototype.toggle=function(n){var r=e(this);if(!r.is(".disabled, :disabled")){var s=t(r),o=s.hasClass("open");if(i(),!o){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",i);var a={relatedTarget:this};if(s.trigger(n=e.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=e(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var s=t(n),o=s.hasClass("open");if(!o&&27!=i.which||o&&27==i.which)return 27==i.which&&s.find(r).trigger("focus"),n.trigger("click");var a=s.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(i.target);38==i.which&&l>0&&l--,40==i.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each((function(){var i=e(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof t&&n[t].call(i)}))},e.fn.dropdown.Constructor=s,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(e){e.stopPropagation()})).on("click.bs.dropdown.data-api",r,s.prototype.toggle).on("keydown.bs.dropdown.data-api",r,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),function(e){"use strict";function t(t,n){return this.each((function(){var r=e(this),s=r.data("bs.modal"),o=e.extend({},i.DEFAULTS,r.data(),"object"==typeof t&&t);s||r.data("bs.modal",s=new i(this,o)),"string"==typeof t?s[t](n):o.show&&s.show(n)}))}var i=function(t,i){this.options=i,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},i.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){n.$element.one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n.$element)&&(n.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var s=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$dialog.one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(s)})).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)})))},i.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy((function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")}),this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy((function(e){27==e.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop((function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")}))},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=e.support.transition&&r;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy((function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))}),this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;s?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){n.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):o()}else t&&t()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var n=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=i,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(i){var n=e(this),r=n.attr("href"),s=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),o=s.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},s.data(),n.data());n.is("a")&&i.preventDefault(),s.one("show.bs.modal",(function(e){e.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){n.is(":visible")&&n.trigger("focus")}))})),t.call(s,o,this)}))}(jQuery),function(e){"use strict";var t=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};t.VERSION="3.3.5",t.TRANSITION_DURATION=150,t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},t.prototype.init=function(t,i,n){if(this.enabled=!0,this.type=t,this.$element=e(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),s=r.length;s--;){var o=r[s];if("click"==o)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",l="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return(t=e.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&e.each(this._options,(function(e,n){i[e]!=n&&(t[e]=n)})),t},t.prototype.enter=function(t){var i=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,i)),t instanceof e.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)):i.show())},t.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},t.prototype.leave=function(t){var i=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,i)),t instanceof e.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)):i.hide())},t.prototype.show=function(){var i=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!n)return;var r=this,s=this.tip(),o=this.getUID(this.type);this.setContent(),s.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),u=s[0].offsetWidth,d=s[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>p.bottom?"top":"top"==a&&h.top-d<p.top?"bottom":"right"==a&&h.right+u>p.width?"left":"left"==a&&h.left-u<p.left?"right":a,s.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,h,u,d);this.applyPlacement(g,a);var m=function(){var e=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==e&&r.leave(r)};e.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(t.TRANSITION_DURATION):m()}},t.prototype.applyPlacement=function(t,i){var n=this.tip(),r=n[0].offsetWidth,s=n[0].offsetHeight,o=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),t.top+=o,t.left+=a,e.offset.setOffset(n[0],e.extend({using:function(e){n.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=s&&(t.top=t.top+s-c);var h=this.getViewportAdjustedDelta(i,t,l,c);h.left?t.left+=h.left:t.top+=h.top;var u=/top|bottom/.test(i),d=u?2*h.left-r+l:2*h.top-s+c,f=u?"offsetWidth":"offsetHeight";n.offset(t),this.replaceArrow(d,n[0][f],u)},t.prototype.replaceArrow=function(e,t,i){this.arrow().css(i?"left":"top",50*(1-e/t)+"%").css(i?"top":"left","")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(i){function n(){"in"!=r.hoverState&&s.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),i&&i()}var r=this,s=e(this.$tip),o=e.Event("hide.bs."+this.type);return this.$element.trigger(o),o.isDefaultPrevented()?void 0:(s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(t.TRANSITION_DURATION):n(),this.hoverState=null,this)},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(t){var i=(t=t||this.$element)[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=e.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var s=n?{top:0,left:0}:t.offset(),o={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=n?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},r,o,a,s)},t.prototype.getCalculatedOffset=function(e,t,i,n){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==e?{top:t.top-n,left:t.left+t.width/2-i/2}:"left"==e?{top:t.top+t.height/2-n/2,left:t.left-i}:{top:t.top+t.height/2-n/2,left:t.left+t.width}},t.prototype.getViewportAdjustedDelta=function(e,t,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var s=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(e)){var a=t.top-s-o.scroll,l=t.top+s-o.scroll+n;a<o.top?r.top=o.top-a:l>o.top+o.height&&(r.top=o.top+o.height-l)}else{var c=t.left-s,h=t.left+s+i;c<o.left?r.left=o.left-c:h>o.right&&(r.left=o.left+o.width-h)}return r},t.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},t.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},t.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var i=this;t&&((i=e(t.currentTarget).data("bs."+this.type))||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,i))),t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},t.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null}))};var i=e.fn.tooltip;e.fn.tooltip=function(i){return this.each((function(){var n=e(this),r=n.data("bs.tooltip"),s="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.tooltip",r=new t(this,s)),"string"==typeof i&&r[i]())}))},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=i,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.5",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),i=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=function(i){return this.each((function(){var n=e(this),r=n.data("bs.popover"),s="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.popover",r=new t(this,s)),"string"==typeof i&&r[i]())}))},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(i,n){this.$body=e(document.body),this.$scrollElement=e(e(i).is(document.body)?window:i),this.options=e.extend({},t.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each((function(){var n=e(this),r=n.data("bs.scrollspy"),s="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new t(this,s)),"string"==typeof i&&r[i]()}))}t.VERSION="3.3.5",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),r=t.data("target")||t.attr("href"),s=/^#./.test(r)&&e(r);return s&&s.length&&s.is(":visible")&&[[s[i]().top+n,r]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,s=this.targets,o=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),t>=n)return o!=(e=s[s.length-1])&&this.activate(e);if(o&&t<r[0])return this.activeTarget=null,this.clear();for(e=r.length;e--;)o!=s[e]&&t>=r[e]&&(void 0===r[e+1]||t<r[e+1])&&this.activate(s[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var i=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=e.fn.scrollspy;e.fn.scrollspy=i,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load.bs.scrollspy.data-api",(function(){e('[data-spy="scroll"]').each((function(){var t=e(this);i.call(t,t.data())}))}))}(jQuery),function(e){"use strict";function t(t){return this.each((function(){var n=e(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof t&&r[t]()}))}var i=function(t){this.element=e(t)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var t=this.element,i=t.closest("ul:not(.dropdown-menu)"),n=t.data("target");if(n||(n=(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=i.find(".active:last a"),s=e.Event("hide.bs.tab",{relatedTarget:t[0]}),o=e.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(s),t.trigger(o),!o.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=e(n);this.activate(t.closest("li"),i),this.activate(a,a.parent(),(function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}}},i.prototype.activate=function(t,n,r){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var o=n.find("> .active"),a=r&&e.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=i,e.fn.tab.noConflict=function(){return e.fn.tab=n,this};var r=function(i){i.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(e){"use strict";function t(t){return this.each((function(){var n=e(this),r=n.data("bs.affix"),s="object"==typeof t&&t;r||n.data("bs.affix",r=new i(this,s)),"string"==typeof t&&r[t]()}))}var i=function(t,n){this.options=e.extend({},i.DEFAULTS,n),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(e,t,i,n){var r=this.$target.scrollTop(),s=this.$element.offset(),o=this.$target.height();if(null!=i&&"top"==this.affixed)return i>r&&"top";if("bottom"==this.affixed)return null!=i?!(r+this.unpin<=s.top)&&"bottom":!(e-n>=r+o)&&"bottom";var a=null==this.affixed,l=a?r:s.top;return null!=i&&i>=r?"top":null!=n&&l+(a?o:t)>=e-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},i.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),n=this.options.offset,r=n.top,s=n.bottom,o=Math.max(e(document).height(),e(document.body).height());"object"!=typeof n&&(s=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof s&&(s=n.bottom(this.$element));var a=this.getState(o,t,r,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:o-t-s})}};var n=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=i,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var i=e(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),t.call(i,n)}))}))}(jQuery),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}((function(){return function e(t,i,n){function r(o,a){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[o]={exports:{}};t[o][0].call(h.exports,(function(e){return r(t[o][1][e]||e)}),h,h.exports,e,t,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,i){"use strict";var n=e("./utils"),r=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(e){for(var t,i,r,o,a,l,c,h=[],u=0,d=e.length,f=d,p="string"!==n.getTypeOf(e);u<e.length;)f=d-u,r=p?(t=e[u++],i=u<d?e[u++]:0,u<d?e[u++]:0):(t=e.charCodeAt(u++),i=u<d?e.charCodeAt(u++):0,u<d?e.charCodeAt(u++):0),o=t>>2,a=(3&t)<<4|i>>4,l=1<f?(15&i)<<2|r>>6:64,c=2<f?63&r:64,h.push(s.charAt(o)+s.charAt(a)+s.charAt(l)+s.charAt(c));return h.join("")},i.decode=function(e){var t,i,n,o,a,l,c=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&f--,e.charAt(e.length-2)===s.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=r.uint8array?new Uint8Array(0|f):new Array(0|f);c<e.length;)t=s.indexOf(e.charAt(c++))<<2|(o=s.indexOf(e.charAt(c++)))>>4,i=(15&o)<<4|(a=s.indexOf(e.charAt(c++)))>>2,n=(3&a)<<6|(l=s.indexOf(e.charAt(c++))),d[h++]=t,64!==a&&(d[h++]=i),64!==l&&(d[h++]=n);return d}},{"./support":30,"./utils":32}],2:[function(e,t,i){"use strict";var n=e("./external"),r=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),o=e("./stream/DataLengthProbe");function a(e,t,i,n,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=i,this.compression=n,this.compressedContent=r}a.prototype={getContentWorker:function(){var e=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,i){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(i)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,i){"use strict";var n=e("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,i){"use strict";var n=e("./utils"),r=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,i,n){var s=r,o=0+i;e^=-1;for(var a=0;a<o;a++)e=e>>>8^s[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,i,n){var s=r,o=0+i;e^=-1;for(var a=0;a<o;a++)e=e>>>8^s[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,i){"use strict";i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(e,t,i){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),s=e("./utils"),o=e("./stream/GenericWorker"),a=n?"uint8array":"array";function l(e,t){o.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}i.magic="\b\0",s.inherits(l,o),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,e.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},i.compressWorker=function(e){return new l("Deflate",e)},i.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,i){"use strict";function n(e,t){var i,n="";for(i=0;i<t;i++)n+=String.fromCharCode(255&e),e>>>=8;return n}function r(e,t,i,r,o,h){var u,d,f=e.file,p=e.compression,g=h!==a.utf8encode,m=s.transformTo("string",h(f.name)),v=s.transformTo("string",a.utf8encode(f.name)),y=f.comment,b=s.transformTo("string",h(y)),w=s.transformTo("string",a.utf8encode(y)),x=v.length!==f.name.length,_=w.length!==y.length,E="",k="",T="",S=f.dir,C=f.date,N={crc32:0,compressedSize:0,uncompressedSize:0};t&&!i||(N.crc32=e.crc32,N.compressedSize=e.compressedSize,N.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),g||!x&&!_||(O|=2048);var A=0,I=0;S&&(A|=16),"UNIX"===o?(I=798,A|=function(e,t){var i=e;return e||(i=t?16893:33204),(65535&i)<<16}(f.unixPermissions,S)):(I=20,A|=function(e){return 63&(e||0)}(f.dosPermissions)),u=C.getUTCHours(),u<<=6,u|=C.getUTCMinutes(),u<<=5,u|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),x&&(k=n(1,1)+n(l(m),4)+v,E+="up"+n(k.length,2)+k),_&&(T=n(1,1)+n(l(b),4)+w,E+="uc"+n(T.length,2)+T);var R="";return R+="\n\0",R+=n(O,2),R+=p.magic,R+=n(u,2),R+=n(d,2),R+=n(N.crc32,4),R+=n(N.compressedSize,4),R+=n(N.uncompressedSize,4),R+=n(m.length,2),R+=n(E.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+m+E,dirRecord:c.CENTRAL_FILE_HEADER+n(I,2)+R+n(b.length,2)+"\0\0\0\0"+n(A,4)+n(r,4)+m+E+b}}var s=e("../utils"),o=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function h(e,t,i,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,o),h.prototype.push=function(e){var t=e.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:i?(t+100*(i-n-1))/i:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var i=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,i=r(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var i=this.bytesWritten-e,r=function(e,t,i,r,o){var a=s.transformTo("string",o(r));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(e,2)+n(e,2)+n(t,4)+n(i,4)+n(a.length,2)+a}(this.dirRecords.length,i,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},h.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var i=0;i<t.length;i++)try{t[i].error(e)}catch(e){}return!0},h.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,i){"use strict";var n=e("../compressions"),r=e("./ZipFileWorker");i.generateWorker=function(e,t,i){var s=new r(t.streamFiles,i,t.platform,t.encodeFileName),o=0;try{e.forEach((function(e,i){o++;var r=function(e,t){var i=e||t,r=n[i];if(!r)throw new Error(i+" is not a valid compression method !");return r}(i.options.compression,t.compression),a=i.options.compressionOptions||t.compressionOptions||{},l=i.dir,c=i.date;i._compressWorker(r,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,i){"use strict";function n(){if(!(this instanceof n))return new n;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 e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.7.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,i){"use strict";var n=e("./utils"),r=e("./external"),s=e("./utf8"),o=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new r.Promise((function(t,i){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",(function(e){i(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var i=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(e)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var i=new o(t);return i.load(e),i})).then((function(e){var i=[r.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var s=0;s<n.length;s++)i.push(c(n[s]));return r.Promise.all(i)})).then((function(e){for(var n=e.shift(),r=n.files,s=0;s<r.length;s++){var o=r[s];i.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders})}return n.zipComment.length&&(i.comment=n.zipComment),i}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,i){"use strict";var n=e("../utils"),r=e("../stream/GenericWorker");function s(e,t){r.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(s,r),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},s.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,i){"use strict";var n=e("readable-stream").Readable;function r(e,t,i){n.call(this,t),this._helper=e;var r=this;e.on("data",(function(e,t){r.push(e)||r._helper.pause(),i&&i(t)})).on("error",(function(e){r.emit("error",e)})).on("end",(function(){r.push(null)}))}e("../utils").inherits(r,n),r.prototype._read=function(){this._helper.resume()},t.exports=r},{"../utils":32,"readable-stream":16}],14:[function(e,t,i){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,i){"use strict";function n(e,t,i){var n,r=s.getTypeOf(t),a=s.extend(i||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=g(e)),a.createFolders&&(n=p(e))&&m.call(this,n,!0);var u="string"===r&&!1===a.binary&&!1===a.base64;i&&void 0!==i.binary||(a.binary=!u),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",r="string");var v;v=t instanceof c||t instanceof o?t:d.isNode&&d.isStream(t)?new f(e,t):s.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var y=new h(e,v,a);this.files[e]=y}var r=e("./utf8"),s=e("./utils"),o=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),h=e("./zipObject"),u=e("./generate"),d=e("./nodejsUtils"),f=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:l.createFolders,e=g(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,i,n;for(t in this.files)n=this.files[t],(i=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(i,n)},filter:function(e){var t=[];return this.forEach((function(i,n){e(i,n)&&t.push(n)})),t},file:function(e,t,i){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,i),this;if(v(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(v(e))return this.filter((function(t,i){return i.dir&&e.test(t)}));var t=this.root+e,i=m.call(this,t),n=this.clone();return n.root=i.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var i=this.filter((function(t,i){return i.name.slice(0,e.length)===e})),n=0;n<i.length;n++)delete this.files[i[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,i={};try{if((i=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");s.checkSupport(i.type),"darwin"!==i.platform&&"freebsd"!==i.platform&&"linux"!==i.platform&&"sunos"!==i.platform||(i.platform="UNIX"),"win32"===i.platform&&(i.platform="DOS");var n=i.comment||this.comment||"";t=u.generateWorker(this,i,n)}catch(e){(t=new o("error")).error(e)}return new a(t,i.type||"string",i.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=y},{"./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(e,t,i){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,i){"use strict";var n=e("./DataReader");function r(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(r,n),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),i=e.charCodeAt(1),n=e.charCodeAt(2),r=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===i&&this.data[s+2]===n&&this.data[s+3]===r)return s-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),i=e.charCodeAt(1),n=e.charCodeAt(2),r=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&i===s[1]&&n===s[2]&&r===s[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],18:[function(e,t,i){"use strict";var n=e("../utils");function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,i=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)i=(i<<8)+this.byteAt(t);return this.index+=e,i},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=r},{"../utils":32}],19:[function(e,t,i){"use strict";var n=e("./Uint8ArrayReader");function r(e){n.call(this,e)}e("../utils").inherits(r,n),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,i){"use strict";var n=e("./DataReader");function r(e){n.call(this,e)}e("../utils").inherits(r,n),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,i){"use strict";var n=e("./ArrayReader");function r(e){n.call(this,e)}e("../utils").inherits(r,n),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,i){"use strict";var n=e("../utils"),r=e("../support"),s=e("./ArrayReader"),o=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new a(e):r.uint8array?new l(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,i){"use strict";i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,i){"use strict";var n=e("./GenericWorker"),r=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,i){"use strict";var n=e("./GenericWorker"),r=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,i){"use strict";var n=e("../utils"),r=e("./GenericWorker");function s(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,r),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,i){"use strict";var n=e("../utils"),r=e("./GenericWorker");function s(e){r.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(s,r),s.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,i){"use strict";function n(e){this.name=e||"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}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var i=0;i<this._listeners[e].length;i++)this._listeners[e][i].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),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 e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},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 e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,i){"use strict";var n=e("../utils"),r=e("./ConvertWorker"),s=e("./GenericWorker"),o=e("../base64"),a=e("../support"),l=e("../external"),c=null;if(a.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function h(e,t,i){var o=t;switch(t){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=t,this._mimeType=i,n.checkSupport(o),this._worker=e.pipe(new r(o)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return function(e,t){return new l.Promise((function(i,r){var s=[],a=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",(function(e,i){s.push(e),t&&t(i)})).on("error",(function(e){s=[],r(e)})).on("end",(function(){try{var e=function(e,t,i){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),i);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(l,function(e,t){var i,n=0,r=null,s=0;for(i=0;i<t.length;i++)s+=t[i].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(s),i=0;i<t.length;i++)r.set(t[i],n),n+=t[i].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(a,s),c);i(e)}catch(e){r(e)}s=[]})).resume()}))}(this,e)},on:function(e,t){var i=this;return"data"===e?this._worker.on(e,(function(e){t.call(i,e.data,e.meta)})):this._worker.on(e,(function(){n.delay(t,arguments,i)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=0===r.getBlob("application/zip").size}catch(e){i.blob=!1}}}try{i.nodestream=!!e("readable-stream").Readable}catch(e){i.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,i){"use strict";for(var n=e("./utils"),r=e("./support"),s=e("./nodejsUtils"),o=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){o.call(this,"utf-8 decode"),this.leftOver=null}function h(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(e){return r.nodebuffer?s.newBufferFrom(e,"utf-8"):function(e){var t,i,n,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=r.uint8array?new Uint8Array(l):new Array(l),s=o=0;o<l;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),i<128?t[o++]=i:(i<2048?t[o++]=192|i>>>6:(i<65536?t[o++]=224|i>>>12:(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63),t[o++]=128|i>>>6&63),t[o++]=128|63&i);return t}(e)},i.utf8decode=function(e){return r.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,i,r,s,o=e.length,l=new Array(2*o);for(t=i=0;t<o;)if((r=e[t++])<128)l[i++]=r;else if(4<(s=a[r]))l[i++]=65533,t+=s-1;else{for(r&=2===s?31:3===s?15:7;1<s&&t<o;)r=r<<6|63&e[t++],s--;1<s?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return l.length!==i&&(l.subarray?l=l.subarray(0,i):l.length=i),n.applyFromCharCode(l)}(e=n.transformTo(r.uint8array?"uint8array":"array",e))},n.inherits(c,o),c.prototype.processChunk=function(e){var t=n.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0||0===i?t:i+a[e[i]]>t?i:t}(t),l=t;o!==t.length&&(r.uint8array?(l=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(l=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:i.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=c,n.inherits(h,o),h.prototype.processChunk=function(e){this.push({data:i.utf8encode(e.data),meta:e.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,i){"use strict";var n=e("./support"),r=e("./base64"),s=e("./nodejsUtils"),o=e("set-immediate-shim"),a=e("./external");function l(e){return e}function c(e,t){for(var i=0;i<e.length;++i)t[i]=255&e.charCodeAt(i);return t}i.newBlob=function(e,t){i.checkSupport("blob");try{return new Blob([e],{type:t})}catch(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(e,t,i){var n=[],r=0,s=e.length;if(s<=i)return String.fromCharCode.apply(null,e);for(;r<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+i,s)))):n.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+i,s)))),r+=i;return n.join("")},stringifyByChar:function(e){for(var t="",i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(e){return!1}}()}};function u(e){var t=65536,n=i.getTypeOf(e),r=!0;if("uint8array"===n?r=h.applyCanBeUsed.uint8array:"nodebuffer"===n&&(r=h.applyCanBeUsed.nodebuffer),r)for(;1<t;)try{return h.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return h.stringifyByChar(e)}function d(e,t){for(var i=0;i<e.length;i++)t[i]=e[i];return t}i.applyFromCharCode=u;var f={};f.string={string:l,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,s.allocBuffer(e.length))}},f.array={string:u,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(e)}},f.arraybuffer={string:function(e){return u(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:u,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return s.newBufferFrom(e)}},f.nodebuffer={string:u,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:l},i.transformTo=function(e,t){if(t=t||"",!e)return t;i.checkSupport(e);var n=i.getTypeOf(t);return f[n][e](t)},i.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&s.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(e){var t,i,n="";for(i=0;i<(e||"").length;i++)n+="\\x"+((t=e.charCodeAt(i))<16?"0":"")+t.toString(16).toUpperCase();return n},i.delay=function(e,t,i){o((function(){e.apply(i||null,t||[])}))},i.inherits=function(e,t){function i(){}i.prototype=t.prototype,e.prototype=new i},i.extend=function(){var e,t,i={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===i[t]&&(i[t]=arguments[e][t]);return i},i.prepareContent=function(e,t,s,o,l){return a.Promise.resolve(t).then((function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,i){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){i(e.target.error)},n.readAsArrayBuffer(e)})):e})).then((function(t){var h=i.getTypeOf(t);return h?("arraybuffer"===h?t=i.transformTo("uint8array",t):"string"===h&&(l?t=r.decode(t):s&&!0!==o&&(t=function(e){return c(e,n.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(e,t,i){"use strict";var n=e("./reader/readerFor"),r=e("./utils"),s=e("./signature"),o=e("./zipEntry"),a=(e("./utf8"),e("./support"));function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(e)+")")}},isSignature:function(e,t){var i=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(i),n},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 e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",i=r.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(i)},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 e,t,i,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),i=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:i}},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 e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,s.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(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=t-i;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,i){"use strict";var n=e("./reader/readerFor"),r=e("./utils"),s=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function h(e,t){this.options=e,this.loadOptions=t}h.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,i;if(e.skip(22),this.fileNameLength=e.readInt(2),i=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(i),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,i,n,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[t]={id:t,length:i,value:n};e.setIndex(r)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var i=r.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var s=r.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||o(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||o(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,i){"use strict";function n(e,t,i){this.name=e,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=t,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}}var r=e("./stream/StreamHelper"),s=e("./stream/DataWorker"),o=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,i="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(i=e.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!n&&(t=t.pipe(new o.Utf8EncodeWorker)),!s&&n&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new r(t,i,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(i,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<c.length;u++)n.prototype[c[u]]=h;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,i){(function(e){"use strict";var i,n,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var s=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)i="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,i=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;n=!0;for(var i=c.length;i;){for(t=c,c=[],e=-1;++e<i;)t[e]();i=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,i){"use strict";var n=e("immediate");function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function h(e,t,i){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(e,t,i){n((function(){var n;try{n=t(i)}catch(n){return s.reject(e,n)}n===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,n)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var i=!1;function n(t){i||(i=!0,s.reject(e,t))}function r(t){i||(i=!0,s.resolve(e,t))}var o=p((function(){t(r,n)}));"error"===o.status&&n(o.value)}function p(e,t){var i={};try{i.value=e(t),i.status="success"}catch(e){i.status="error",i.value=e}return i}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(i){return t.resolve(e()).then((function(){return i}))}),(function(i){return t.resolve(e()).then((function(){throw i}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?e:t,this.outcome):this.queue.push(new h(i,e,t)),i},h.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){s.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},s.resolve=function(e,t){var i=p(d,t);if("error"===i.status)return s.reject(e,i.value);var n=i.value;if(n)f(e,n);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var i=-1,n=e.queue.length;++i<n;)e.queue[i].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:s.resolve(new this(r),e)},c.reject=function(e){var t=new this(r);return s.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(e[l],l);return c;function h(e,r){t.resolve(e).then((function(e){o[r]=e,++a!==i||n||(n=!0,s.resolve(c,o))}),(function(e){n||(n=!0,s.reject(c,e))}))}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,i=!1;if(!t)return this.resolve([]);for(var n,o=-1,a=new this(r);++o<t;)n=e[o],this.resolve(n).then((function(e){i||(i=!0,s.resolve(a,e))}),(function(e){i||(i=!0,s.reject(a,e))}));return a}},{immediate:36}],38:[function(e,t,i){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,i){"use strict";var n=e("./zlib/deflate"),r=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==i)throw new Error(o[i]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(i=n.deflateSetDictionary(this.strm,h)))throw new Error(o[i]);this._dict_set=!0}}function h(e,t){var i=new c(t);if(i.push(e,!0),i.err)throw i.msg||o[i.err];return i.result}c.prototype.push=function(e,t){var i,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(c),a.next_out=0,a.avail_out=c),1!==(i=n.deflate(a,o))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===o?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==o||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Deflate=c,i.deflate=h,i.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},i.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,i){"use strict";var n=e("./zlib/inflate"),r=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),h=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,t.windowBits);if(i!==o.Z_OK)throw new Error(a[i]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var i=new u(t);if(i.push(e,!0),i.err)throw i.msg||a[i.err];return i.result}u.prototype.push=function(e,t){var i,a,l,c,u,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?f.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&g&&(d="string"==typeof g?s.string2buf(g):"[object ArrayBuffer]"===h.call(g)?new Uint8Array(g):g,i=n.inflateSetDictionary(this.strm,d)),i===o.Z_BUF_ERROR&&!0===m&&(i=o.Z_OK,m=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&i!==o.Z_STREAM_END&&(0!==f.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(f.output,f.next_out),c=f.next_out-l,u=s.buf2string(f.output,l),f.next_out=c,f.avail_out=p-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(u)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((0<f.avail_in||0===f.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(f.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=u,i.inflate=d,i.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},i.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,i,n,r){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),r);else for(var s=0;s<n;s++)e[r+s]=t[i+s]},flattenChunks:function(e){var t,i,n,r,s,o;for(t=n=0,i=e.length;t<i;t++)n+=e[t].length;for(o=new Uint8Array(n),t=r=0,i=e.length;t<i;t++)s=e[t],o.set(s,r),r+=s.length;return o}},s={arraySet:function(e,t,i,n,r){for(var s=0;s<n;s++)e[r+s]=t[i+s]},flattenChunks:function(e){return[].concat.apply([],e)}};i.setTyped=function(e){e?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(n)},{}],42:[function(e,t,i){"use strict";var n=e("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var i="",o=0;o<t;o++)i+=String.fromCharCode(e[o]);return i}o[254]=o[254]=1,i.string2buf=function(e){var t,i,r,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),l+=i<128?1:i<2048?2:i<65536?3:4;for(t=new n.Buf8(l),s=o=0;o<l;s++)55296==(64512&(i=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),i<128?t[o++]=i:(i<2048?t[o++]=192|i>>>6:(i<65536?t[o++]=224|i>>>12:(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63),t[o++]=128|i>>>6&63),t[o++]=128|63&i);return t},i.buf2binstring=function(e){return l(e,e.length)},i.binstring2buf=function(e){for(var t=new n.Buf8(e.length),i=0,r=t.length;i<r;i++)t[i]=e.charCodeAt(i);return t},i.buf2string=function(e,t){var i,n,r,s,a=t||e.length,c=new Array(2*a);for(i=n=0;i<a;)if((r=e[i++])<128)c[n++]=r;else if(4<(s=o[r]))c[n++]=65533,i+=s-1;else{for(r&=2===s?31:3===s?15:7;1<s&&i<a;)r=r<<6|63&e[i++],s--;1<s?c[n++]=65533:r<65536?c[n++]=r:(r-=65536,c[n++]=55296|r>>10&1023,c[n++]=56320|1023&r)}return l(c,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0||0===i?t:i+o[e[i]]>t?i:t}},{"./common":41}],43:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var r=65535&e|0,s=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;s=s+(r=r+t[n++]|0)|0,--o;);r%=65521,s%=65521}return r|s<<16|0}},{}],44:[function(e,t,i){"use strict";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(e,t,i){"use strict";var n=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,r){var s=n,o=r+i;e^=-1;for(var a=r;a<o;a++)e=e>>>8^s[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,i){"use strict";var n,r=e("../utils/common"),s=e("./trees"),o=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,h=258,u=262,d=113;function f(e,t){return e.msg=l[t],t}function p(e){return(e<<1)-(4<e?9:0)}function g(e){for(var t=e.length;0<=--t;)e[t]=0}function m(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(r.arraySet(e.output,t.pending_buf,t.pending_out,i,e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))}function v(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var i,n,r=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,d=e.w_mask,f=e.prev,p=e.strstart+h,g=c[s+o-1],m=c[s+o];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(i=t)+o]===m&&c[i+o-1]===g&&c[i]===c[s]&&c[++i]===c[s+1]){s+=2,i++;do{}while(c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&c[++s]===c[++i]&&s<p);if(n=h-(p-s),s=p-h,o<n){if(e.match_start=t,a<=(o=n))break;g=c[s+o-1],m=c[s+o]}}}while((t=f[t&d])>l&&0!=--r);return o<=e.lookahead?o:e.lookahead}function x(e){var t,i,n,s,l,c,h,d,f,p,g=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-u)){for(r.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=i=e.hash_size;n=e.head[--t],e.head[t]=g<=n?n-g:0,--i;);for(t=i=g;n=e.prev[--t],e.prev[t]=g<=n?n-g:0,--i;);s+=g}if(0===e.strm.avail_in)break;if(c=e.strm,h=e.window,d=e.strstart+e.lookahead,p=void 0,(f=s)<(p=c.avail_in)&&(p=f),i=0===p?0:(c.avail_in-=p,r.arraySet(h,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=o(c.adler,h,p,d):2===c.state.wrap&&(c.adler=a(c.adler,h,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=i,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function _(e,t){for(var i,n;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-u&&(e.match_length=w(e,i)),e.match_length>=3)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);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=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function E(e,t){for(var i,n,r;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=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=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-u&&(e.match_length=w(e,i),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(r=e.strstart+e.lookahead-3,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(v(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=s._tr_tally(e,0,e.window[e.strstart-1]))&&v(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}function k(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}function T(){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=8,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 r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),g(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 S(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,s._tr_init(t),0):f(e,c)}function C(e){var t=S(e);return 0===t&&function(e){e.window_size=2*e.w_size,g(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function N(e,t,i,n,s,o){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||9<s||8!==i||n<8||15<n||t<0||9<t||o<0||4<o)return f(e,c);8===n&&(n=9);var l=new T;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new r.Buf8(2*l.w_size),l.head=new r.Buf16(l.hash_size),l.prev=new r.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new r.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=i,C(e)}n=[new k(0,0,0,0,(function(e,t){var i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,v(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(v(e,!1),e.strm.avail_out),1)})),new k(4,4,8,4,_),new k(4,5,16,8,_),new k(4,6,32,32,_),new k(4,4,16,16,E),new k(8,16,32,32,E),new k(8,16,128,128,E),new k(8,32,128,256,E),new k(32,128,258,1024,E),new k(32,258,258,4096,E)],i.deflateInit=function(e,t){return N(e,t,8,15,8,0)},i.deflateInit2=N,i.deflateReset=C,i.deflateResetKeep=S,i.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},i.deflate=function(e,t){var i,r,o,l;if(!e||!e.state||5<t||t<0)return e?f(e,c):c;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return f(e,0===e.avail_out?-5:c);if(r.strm=e,i=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,y(r,31),y(r,139),y(r,8),r.gzhead?(y(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),y(r,255&r.gzhead.time),y(r,r.gzhead.time>>8&255),y(r,r.gzhead.time>>16&255),y(r,r.gzhead.time>>24&255),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(y(r,255&r.gzhead.extra.length),y(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=a(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(y(r,0),y(r,0),y(r,0),y(r,0),y(r,0),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,3),r.status=d);else{var u=8+(r.w_bits-8<<4)<<8;u|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=d,b(r,u),0!==r.strstart&&(b(r,e.adler>>>16),b(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(o=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),m(e),o=r.pending,r.pending!==r.pending_buf_size));)y(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),m(e),o=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),m(e),o=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>o&&(e.adler=a(e.adler,r.pending_buf,r.pending-o,o)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&m(e),r.pending+2<=r.pending_buf_size&&(y(r,255&e.adler),y(r,e.adler>>8&255),e.adler=0,r.status=d)):r.status=d),0!==r.pending){if(m(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(i)&&4!==t)return f(e,-5);if(666===r.status&&0!==e.avail_in)return f(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var w=2===r.strategy?function(e,t){for(var i;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,i=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var i,n,r,o,a=e.window;;){if(e.lookahead<=h){if(x(e),e.lookahead<=h&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=a[r=e.strstart-1])===a[++r]&&n===a[++r]&&n===a[++r]){o=e.strstart+h;do{}while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);e.match_length=h-(o-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=s._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(v(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(v(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(v(e,!1),0===e.strm.avail_out)?1:2}(r,t):n[r.level].func(r,t);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===t?s._tr_align(r):5!==t&&(s._tr_stored_block(r,0,0,!1),3===t&&(g(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),m(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(y(r,255&e.adler),y(r,e.adler>>8&255),y(r,e.adler>>16&255),y(r,e.adler>>24&255),y(r,255&e.total_in),y(r,e.total_in>>8&255),y(r,e.total_in>>16&255),y(r,e.total_in>>24&255)):(b(r,e.adler>>>16),b(r,65535&e.adler)),m(e),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?0:1)},i.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==d&&666!==t?f(e,c):(e.state=null,t===d?f(e,-3):0):c},i.deflateSetDictionary=function(e,t){var i,n,s,a,l,h,u,d,f=t.length;if(!e||!e.state)return c;if(2===(a=(i=e.state).wrap)||1===a&&42!==i.status||i.lookahead)return c;for(1===a&&(e.adler=o(e.adler,t,f,0)),i.wrap=0,f>=i.w_size&&(0===a&&(g(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new r.Buf8(i.w_size),r.arraySet(d,t,f-i.w_size,i.w_size,0),t=d,f=i.w_size),l=e.avail_in,h=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,x(i);i.lookahead>=3;){for(n=i.strstart,s=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--s;);i.strstart=n,i.lookahead=2,x(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=h,e.input=u,e.avail_in=l,i.wrap=a,0},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,i){"use strict";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(e,t,i){"use strict";t.exports=function(e,t){var i,n,r,s,o,a,l,c,h,u,d,f,p,g,m,v,y,b,w,x,_,E,k,T,S;i=e.state,n=e.next_in,T=e.input,r=n+(e.avail_in-5),s=e.next_out,S=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),l=i.dmax,c=i.wsize,h=i.whave,u=i.wnext,d=i.window,f=i.hold,p=i.bits,g=i.lencode,m=i.distcode,v=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;e:do{p<15&&(f+=T[n++]<<p,p+=8,f+=T[n++]<<p,p+=8),b=g[f&v];t:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))S[s++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(f&(1<<w)-1)];continue t}if(32&w){i.mode=12;break e}e.msg="invalid literal/length code",i.mode=30;break e}x=65535&b,(w&=15)&&(p<w&&(f+=T[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=T[n++]<<p,p+=8,f+=T[n++]<<p,p+=8),b=m[f&y];i:for(;;){if(f>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(f&(1<<w)-1)];continue i}e.msg="invalid distance code",i.mode=30;break e}if(_=65535&b,p<(w&=15)&&(f+=T[n++]<<p,(p+=8)<w&&(f+=T[n++]<<p,p+=8)),l<(_+=f&(1<<w)-1)){e.msg="invalid distance too far back",i.mode=30;break e}if(f>>>=w,p-=w,(w=s-o)<_){if(h<(w=_-w)&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(k=d,(E=0)===u){if(E+=c-w,w<x){for(x-=w;S[s++]=d[E++],--w;);E=s-_,k=S}}else if(u<w){if(E+=c+u-w,(w-=u)<x){for(x-=w;S[s++]=d[E++],--w;);if(E=0,u<x){for(x-=w=u;S[s++]=d[E++],--w;);E=s-_,k=S}}}else if(E+=u-w,w<x){for(x-=w;S[s++]=d[E++],--w;);E=s-_,k=S}for(;2<x;)S[s++]=k[E++],S[s++]=k[E++],S[s++]=k[E++],x-=3;x&&(S[s++]=k[E++],1<x&&(S[s++]=k[E++]))}else{for(E=s-_;S[s++]=S[E++],S[s++]=S[E++],S[s++]=S[E++],2<(x-=3););x&&(S[s++]=S[E++],1<x&&(S[s++]=S[E++]))}break}}break}}while(n<r&&s<a);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=s<a?a-s+257:257-(s-a),i.hold=f,i.bits=p}},{}],49:[function(e,t,i){"use strict";var n=e("../utils/common"),r=e("./adler32"),s=e("./crc32"),o=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,d(e))):l}function p(e,t){var i,n;return e?(n=new h,(e.state=n).window=null,0!==(i=f(e,t))&&(e.state=null),i):l}var g,m,v=!0;function y(e){if(v){var t;for(g=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=g,e.lenbits=9,e.distcode=m,e.distbits=5}function b(e,t,i,r){var s,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),r>=o.wsize?(n.arraySet(o.window,t,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r<(s=o.wsize-o.wnext)&&(s=r),n.arraySet(o.window,t,i-r,s,o.wnext),(r-=s)?(n.arraySet(o.window,t,i-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}i.inflateReset=d,i.inflateReset2=f,i.inflateResetKeep=u,i.inflateInit=function(e){return p(e,15)},i.inflateInit2=p,i.inflate=function(e,t){var i,h,u,d,f,p,g,m,v,w,x,_,E,k,T,S,C,N,O,A,I,R,D,j,z=0,L=new n.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(i=e.state).mode&&(i.mode=13),f=e.next_out,u=e.output,g=e.avail_out,d=e.next_in,h=e.input,p=e.avail_in,m=i.hold,v=i.bits,w=p,x=g,R=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;v<16;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(2&i.wrap&&35615===m){L[i.check=0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0),v=m=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",i.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===i.wbits)i.wbits=I;else if(I>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<I,e.adler=i.check=1,i.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(i.flags=m,8!=(255&i.flags)){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0,i.mode=3;case 3:for(;v<32;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.time=m),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,L[2]=m>>>16&255,L[3]=m>>>24&255,i.check=s(i.check,L,4,0)),v=m=0,i.mode=4;case 4:for(;v<16;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0,i.mode=5;case 5:if(1024&i.flags){for(;v<16;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p<(_=i.length)&&(_=p),_&&(i.head&&(I=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,h,d,_,I)),512&i.flags&&(i.check=s(i.check,h,_,d)),p-=_,d+=_,i.length-=_),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break e;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.name+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=s(i.check,h,_,d)),p-=_,d+=_,I)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break e;for(_=0;I=h[d+_++],i.head&&I&&i.length<65536&&(i.head.comment+=String.fromCharCode(I)),I&&_<p;);if(512&i.flags&&(i.check=s(i.check,h,_,d)),p-=_,d+=_,I)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;v<16;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(m!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}v=m=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;v<32;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}e.adler=i.check=c(m),v=m=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=v,2;e.adler=i.check=1,i.mode=12;case 12:if(5===t||6===t)break e;case 13:if(i.last){m>>>=7&v,v-=7&v,i.mode=27;break}for(;v<3;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}switch(i.last=1&m,v-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6!==t)break;m>>>=2,v-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,v=m=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(_=i.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break e;n.arraySet(u,h,d,_,f),p-=_,d+=_,g-=_,f+=_,i.length-=_;break}i.mode=12;break;case 17:for(;v<14;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(i.nlen=257+(31&m),m>>>=5,v-=5,i.ndist=1+(31&m),m>>>=5,v-=5,i.ncode=4+(15&m),m>>>=4,v-=4,286<i.nlen||30<i.ndist){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;v<3;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.lens[B[i.have++]]=7&m,m>>>=3,v-=3}for(;i.have<19;)i.lens[B[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,D={bits:i.lenbits},R=a(0,i.lens,0,19,i.lencode,0,i.work,D),i.lenbits=D.bits,R){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;S=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(C<16)m>>>=T,v-=T,i.lens[i.have++]=C;else{if(16===C){for(j=T+2;v<j;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(m>>>=T,v-=T,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}I=i.lens[i.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===C){for(j=T+3;v<j;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}v-=T,I=0,_=3+(7&(m>>>=T)),m>>>=3,v-=3}else{for(j=T+7;v<j;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}v-=T,I=0,_=11+(127&(m>>>=T)),m>>>=7,v-=7}if(i.have+_>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;_--;)i.lens[i.have++]=I}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,D={bits:i.lenbits},R=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,D),i.lenbits=D.bits,R){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,D={bits:i.distbits},R=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,D),i.distbits=D.bits,R){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=p&&258<=g){e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=v,o(e,x),f=e.next_out,u=e.output,g=e.avail_out,d=e.next_in,h=e.input,p=e.avail_in,m=i.hold,v=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;S=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(S&&0==(240&S)){for(N=T,O=S,A=C;S=(z=i.lencode[A+((m&(1<<N+O)-1)>>N)])>>>16&255,C=65535&z,!(N+(T=z>>>24)<=v);){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}m>>>=N,v-=N,i.back+=N}if(m>>>=T,v-=T,i.back+=T,i.length=C,0===S){i.mode=26;break}if(32&S){i.back=-1,i.mode=12;break}if(64&S){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&S,i.mode=22;case 22:if(i.extra){for(j=i.extra;v<j;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;S=(z=i.distcode[m&(1<<i.distbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(0==(240&S)){for(N=T,O=S,A=C;S=(z=i.distcode[A+((m&(1<<N+O)-1)>>N)])>>>16&255,C=65535&z,!(N+(T=z>>>24)<=v);){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}m>>>=N,v-=N,i.back+=N}if(m>>>=T,v-=T,i.back+=T,64&S){e.msg="invalid distance code",i.mode=30;break}i.offset=C,i.extra=15&S,i.mode=24;case 24:if(i.extra){for(j=i.extra;v<j;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===g)break e;if(_=x-g,i.offset>_){if((_=i.offset-_)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}E=_>i.wnext?(_-=i.wnext,i.wsize-_):i.wnext-_,_>i.length&&(_=i.length),k=i.window}else k=u,E=f-i.offset,_=i.length;for(g<_&&(_=g),g-=_,i.length-=_;u[f++]=k[E++],--_;);0===i.length&&(i.mode=21);break;case 26:if(0===g)break e;u[f++]=i.length,g--,i.mode=21;break;case 27:if(i.wrap){for(;v<32;){if(0===p)break e;p--,m|=h[d++]<<v,v+=8}if(x-=g,e.total_out+=x,i.total+=x,x&&(e.adler=i.check=i.flags?s(i.check,u,x,f-x):r(i.check,u,x,f-x)),x=g,(i.flags?m:c(m))!==i.check){e.msg="incorrect data check",i.mode=30;break}v=m=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;v<32;){if(0===p)break e;p--,m+=h[d++]<<v,v+=8}if(m!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}v=m=0}i.mode=29;case 29:R=1;break e;case 30:R=-3;break e;case 31:return-4;case 32:default:return l}return e.next_out=f,e.avail_out=g,e.next_in=d,e.avail_in=p,i.hold=m,i.bits=v,(i.wsize||x!==e.avail_out&&i.mode<30&&(i.mode<27||4!==t))&&b(e,e.output,e.next_out,x-e.avail_out)?(i.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,i.total+=x,i.wrap&&x&&(e.adler=i.check=i.flags?s(i.check,u,x,e.next_out-x):r(i.check,u,x,e.next_out-x)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==w&&0===x||4===t)&&0===R&&(R=-5),R)},i.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},i.inflateGetHeader=function(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?l:((i.head=t).done=!1,0):l},i.inflateSetDictionary=function(e,t){var i,n=t.length;return e&&e.state?0!==(i=e.state).wrap&&11!==i.mode?l:11===i.mode&&r(1,t,n,0)!==i.check?-3:b(e,t,n,n)?(i.mode=31,-4):(i.havedict=1,0):l},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,i){"use strict";var n=e("../utils/common"),r=[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],s=[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],o=[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],a=[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(e,t,i,l,c,h,u,d){var f,p,g,m,v,y,b,w,x,_=d.bits,E=0,k=0,T=0,S=0,C=0,N=0,O=0,A=0,I=0,R=0,D=null,j=0,z=new n.Buf16(16),L=new n.Buf16(16),B=null,P=0;for(E=0;E<=15;E++)z[E]=0;for(k=0;k<l;k++)z[t[i+k]]++;for(C=_,S=15;1<=S&&0===z[S];S--);if(S<C&&(C=S),0===S)return c[h++]=20971520,c[h++]=20971520,d.bits=1,0;for(T=1;T<S&&0===z[T];T++);for(C<T&&(C=T),E=A=1;E<=15;E++)if(A<<=1,(A-=z[E])<0)return-1;if(0<A&&(0===e||1!==S))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+z[E];for(k=0;k<l;k++)0!==t[i+k]&&(u[L[t[i+k]]++]=k);if(y=0===e?(D=B=u,19):1===e?(D=r,j-=257,B=s,P-=257,256):(D=o,B=a,-1),E=T,v=h,O=k=R=0,g=-1,m=(I=1<<(N=C))-1,1===e&&852<I||2===e&&592<I)return 1;for(;;){for(b=E-O,x=u[k]<y?(w=0,u[k]):u[k]>y?(w=B[P+u[k]],D[j+u[k]]):(w=96,0),f=1<<E-O,T=p=1<<N;c[v+(R>>O)+(p-=f)]=b<<24|w<<16|x|0,0!==p;);for(f=1<<E-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,k++,0==--z[E]){if(E===S)break;E=t[i+u[k]]}if(C<E&&(R&m)!==g){for(0===O&&(O=C),v+=T,A=1<<(N=E-O);N+O<S&&!((A-=z[N+O])<=0);)N++,A<<=1;if(I+=1<<N,1===e&&852<I||2===e&&592<I)return 1;c[g=R&m]=C<<24|N<<16|v-h|0}}return 0!==R&&(c[v+R]=E-O<<24|64<<16|0),d.bits=C,0}},{"../utils/common":41}],51:[function(e,t,i){"use strict";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(e,t,i){"use strict";var n=e("../utils/common");function r(e){for(var t=e.length;0<=--t;)e[t]=0}var s=256,o=286,a=30,l=15,c=[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],h=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);r(f);var p=new Array(60);r(p);var g=new Array(512);r(g);var m=new Array(256);r(m);var v=new Array(29);r(v);var y,b,w,x=new Array(a);function _(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function k(e){return e<256?g[e]:g[256+(e>>>7)]}function T(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function S(e,t,i){e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,T(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)}function C(e,t,i){S(e,i[2*t],i[2*t+1])}function N(e,t){for(var i=0;i|=1&e,e>>>=1,i<<=1,0<--t;);return i>>>1}function O(e,t,i){var n,r,s=new Array(16),o=0;for(n=1;n<=l;n++)s[n]=o=o+i[n-1]<<1;for(r=0;r<=t;r++){var a=e[2*r+1];0!==a&&(e[2*r]=N(s[a]++,a))}}function A(e){var t;for(t=0;t<o;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){8<e.bi_valid?T(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function R(e,t,i,n){var r=2*t,s=2*i;return e[r]<e[s]||e[r]===e[s]&&n[t]<=n[i]}function D(e,t,i){for(var n=e.heap[i],r=i<<1;r<=e.heap_len&&(r<e.heap_len&&R(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!R(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n}function j(e,t,i){var n,r,o,a,l=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],r=e.pending_buf[e.l_buf+l],l++,0===n?C(e,r,t):(C(e,(o=m[r])+s+1,t),0!==(a=c[o])&&S(e,r-=v[o],a),C(e,o=k(--n),i),0!==(a=h[o])&&S(e,n-=x[o],a)),l<e.last_lit;);C(e,256,t)}function z(e,t){var i,n,r,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=573,i=0;i<c;i++)0!==s[2*i]?(e.heap[++e.heap_len]=h=i,e.depth[i]=0):s[2*i+1]=0;for(;e.heap_len<2;)s[2*(r=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[r]=0,e.opt_len--,a&&(e.static_len-=o[2*r+1]);for(t.max_code=h,i=e.heap_len>>1;1<=i;i--)D(e,s,i);for(r=c;i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=n,s[2*r]=s[2*i]+s[2*n],e.depth[r]=(e.depth[i]>=e.depth[n]?e.depth[i]:e.depth[n])+1,s[2*i+1]=s[2*n+1]=r,e.heap[1]=r++,D(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var i,n,r,s,o,a,c=t.dyn_tree,h=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,m=0;for(s=0;s<=l;s++)e.bl_count[s]=0;for(c[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<573;i++)g<(s=c[2*c[2*(n=e.heap[i])+1]+1]+1)&&(s=g,m++),c[2*n+1]=s,h<n||(e.bl_count[s]++,o=0,p<=n&&(o=f[n-p]),a=c[2*n],e.opt_len+=a*(s+o),d&&(e.static_len+=a*(u[2*n+1]+o)));if(0!==m){do{for(s=g-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[g]--,m-=2}while(0<m);for(s=g;0!==s;s--)for(n=e.bl_count[s];0!==n;)h<(r=e.heap[--i])||(c[2*r+1]!==s&&(e.opt_len+=(s-c[2*r+1])*c[2*r],c[2*r+1]=s),n--)}}(e,t),O(s,h,e.bl_count)}function L(e,t,i){var n,r,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++a<l&&r===o||(a<c?e.bl_tree[2*r]+=a:0!==r?(r!==s&&e.bl_tree[2*r]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=r,c=(a=0)===o?(l=138,3):r===o?(l=6,3):(l=7,4))}function B(e,t,i){var n,r,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++a<l&&r===o)){if(a<c)for(;C(e,r,e.bl_tree),0!=--a;);else 0!==r?(r!==s&&(C(e,r,e.bl_tree),a--),C(e,16,e.bl_tree),S(e,a-3,2)):a<=10?(C(e,17,e.bl_tree),S(e,a-3,3)):(C(e,18,e.bl_tree),S(e,a-11,7));s=r,c=(a=0)===o?(l=138,3):r===o?(l=6,3):(l=7,4)}}r(x);var P=!1;function M(e,t,i,r){S(e,0+(r?1:0),3),function(e,t,i,r){I(e),T(e,i),T(e,~i),n.arraySet(e.pending_buf,e.window,t,i,e.pending),e.pending+=i}(e,t,i)}i._tr_init=function(e){P||(function(){var e,t,i,n,r,s=new Array(16);for(n=i=0;n<28;n++)for(v[n]=i,e=0;e<1<<c[n];e++)m[i++]=n;for(m[i-1]=n,n=r=0;n<16;n++)for(x[n]=r,e=0;e<1<<h[n];e++)g[r++]=n;for(r>>=7;n<a;n++)for(x[n]=r<<7,e=0;e<1<<h[n]-7;e++)g[256+r++]=n;for(t=0;t<=l;t++)s[t]=0;for(e=0;e<=143;)f[2*e+1]=8,e++,s[8]++;for(;e<=255;)f[2*e+1]=9,e++,s[9]++;for(;e<=279;)f[2*e+1]=7,e++,s[7]++;for(;e<=287;)f[2*e+1]=8,e++,s[8]++;for(O(f,287,s),e=0;e<a;e++)p[2*e+1]=5,p[2*e]=N(e,5);y=new _(f,c,257,o,l),b=new _(p,h,0,a,l),w=new _(new Array(0),u,0,19,7)}(),P=!0),e.l_desc=new E(e.dyn_ltree,y),e.d_desc=new E(e.dyn_dtree,b),e.bl_desc=new E(e.bl_tree,w),e.bi_buf=0,e.bi_valid=0,A(e)},i._tr_stored_block=M,i._tr_flush_block=function(e,t,i,n){var r,o,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<s;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),z(e,e.l_desc),z(e,e.d_desc),a=function(e){var t;for(L(e,e.dyn_ltree,e.l_desc.max_code),L(e,e.dyn_dtree,e.d_desc.max_code),z(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=r&&(r=o)):r=o=i+5,i+4<=r&&-1!==t?M(e,t,i,n):4===e.strategy||o===r?(S(e,2+(n?1:0),3),j(e,f,p)):(S(e,4+(n?1:0),3),function(e,t,i,n){var r;for(S(e,t-257,5),S(e,i-1,5),S(e,n-4,4),r=0;r<n;r++)S(e,e.bl_tree[2*d[r]+1],3);B(e,e.dyn_ltree,t-1),B(e,e.dyn_dtree,i-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),j(e,e.dyn_ltree,e.dyn_dtree)),A(e),n&&I(e)},i._tr_tally=function(e,t,i){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(m[i]+s+1)]++,e.dyn_dtree[2*k(t)]++),e.last_lit===e.lit_bufsize-1},i._tr_align=function(e){S(e,2,3),C(e,256,f),function(e){16===e.bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,i){"use strict";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(e,t,i){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)})),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("JSZip")):"function"==typeof define&&define.amd?define(["JSZip"],t):"object"==typeof exports?exports.ePub=t(require("JSZip")):e.ePub=t(e.JSZip)}(window,(function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/",i(i.s=30)}([function(e,t,i){"use strict";i.r(t),i.d(t,"requestAnimationFrame",(function(){return r})),i.d(t,"uuid",(function(){return o})),i.d(t,"documentHeight",(function(){return a})),i.d(t,"isElement",(function(){return l})),i.d(t,"isNumber",(function(){return c})),i.d(t,"isFloat",(function(){return h})),i.d(t,"prefixed",(function(){return u})),i.d(t,"defaults",(function(){return d})),i.d(t,"extend",(function(){return f})),i.d(t,"insert",(function(){return p})),i.d(t,"locationOf",(function(){return g})),i.d(t,"indexOfSorted",(function(){return m})),i.d(t,"bounds",(function(){return v})),i.d(t,"borders",(function(){return y})),i.d(t,"nodeBounds",(function(){return b})),i.d(t,"windowBounds",(function(){return w})),i.d(t,"indexOfNode",(function(){return x})),i.d(t,"indexOfTextNode",(function(){return _})),i.d(t,"indexOfElementNode",(function(){return E})),i.d(t,"isXml",(function(){return k})),i.d(t,"createBlob",(function(){return T})),i.d(t,"createBlobUrl",(function(){return S})),i.d(t,"revokeBlobUrl",(function(){return C})),i.d(t,"createBase64Url",(function(){return N})),i.d(t,"type",(function(){return O})),i.d(t,"parse",(function(){return A})),i.d(t,"qs",(function(){return I})),i.d(t,"qsa",(function(){return R})),i.d(t,"qsp",(function(){return D})),i.d(t,"sprint",(function(){return j})),i.d(t,"treeWalker",(function(){return z})),i.d(t,"walk",(function(){return L})),i.d(t,"blob2base64",(function(){return B})),i.d(t,"defer",(function(){return P})),i.d(t,"querySelectorByType",(function(){return M})),i.d(t,"findChildren",(function(){return F})),i.d(t,"parents",(function(){return q})),i.d(t,"filterChildren",(function(){return U})),i.d(t,"getParentByTagName",(function(){return W})),i.d(t,"RangeObject",(function(){return H}));var n=i(15);const r="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),s="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function o(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:7&i|8).toString(16)}))}function a(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function l(e){return!(!e||1!=e.nodeType)}function c(e){return!isNaN(parseFloat(e))&&isFinite(e)}function h(e){let t=parseFloat(e);return!1!==c(e)&&("string"==typeof e&&e.indexOf(".")>-1||Math.floor(t)!==t)}function u(e){var t=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=e.toLowerCase(),n=["Webkit","webkit","Moz","O","ms"].length;if("undefined"==typeof document||void 0!==document.body.style[i])return e;for(var r=0;r<n;r++)if(void 0!==document.body.style[t[r]+i])return t[r]+i;return e}function d(e){for(var t=1,i=arguments.length;t<i;t++){var n=arguments[t];for(var r in n)void 0===e[r]&&(e[r]=n[r])}return e}function f(e){var t=[].slice.call(arguments,1);return t.forEach((function(t){t&&Object.getOwnPropertyNames(t).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))})),e}function p(e,t,i){var n=g(e,t,i);return t.splice(n,0,e),n}function g(e,t,i,n,r){var s,o=n||0,a=r||t.length,l=parseInt(o+(a-o)/2);return i||(i=function(e,t){return e>t?1:e<t?-1:e==t?0:void 0}),a-o<=0?l:(s=i(t[l],e),a-o==1?s>=0?l:l+1:0===s?l:-1===s?g(e,t,i,l,a):g(e,t,i,o,l))}function m(e,t,i,n,r){var s,o=n||0,a=r||t.length,l=parseInt(o+(a-o)/2);return i||(i=function(e,t){return e>t?1:e<t?-1:e==t?0:void 0}),a-o<=0?-1:(s=i(t[l],e),a-o==1?0===s?l:-1:0===s?l:-1===s?m(e,t,i,l,a):m(e,t,i,o,l))}function v(e){var t=window.getComputedStyle(e),i=0,n=0;return["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(e){i+=parseFloat(t[e])||0})),["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(e){n+=parseFloat(t[e])||0})),{height:n,width:i}}function y(e){var t=window.getComputedStyle(e),i=0,n=0;return["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(e){i+=parseFloat(t[e])||0})),["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(e){n+=parseFloat(t[e])||0})),{height:n,width:i}}function b(e){let t,i=e.ownerDocument;if(e.nodeType==Node.TEXT_NODE){let n=i.createRange();n.selectNodeContents(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();return t}function w(){var e=window.innerWidth,t=window.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function x(e,t){for(var i,n=e.parentNode.childNodes,r=-1,s=0;s<n.length&&((i=n[s]).nodeType===t&&r++,i!=e);s++);return r}function _(e){return x(e,3)}function E(e){return x(e,1)}function k(e){return["xml","opf","ncx"].indexOf(e)>-1}function T(e,t){return new Blob([e],{type:t})}function S(e,t){var i=T(e,t);return s.createObjectURL(i)}function C(e){return s.revokeObjectURL(e)}function N(e,t){if("string"==typeof e)return"data:"+t+";base64,"+btoa(e)}function O(e){return Object.prototype.toString.call(e).slice(8,-1)}function A(e,t,i){var r;return r="undefined"==typeof DOMParser||i?n.DOMParser:DOMParser,65279===e.charCodeAt(0)&&(e=e.slice(1)),(new r).parseFromString(e,t)}function I(e,t){var i;if(!e)throw new Error("No Element Provided");return void 0!==e.querySelector?e.querySelector(t):(i=e.getElementsByTagName(t)).length?i[0]:void 0}function R(e,t){return void 0!==e.querySelector?e.querySelectorAll(t):e.getElementsByTagName(t)}function D(e,t,i){var n,r;if(void 0!==e.querySelector){for(var s in t+="[",i)t+=s+"~='"+i[s]+"'";return t+="]",e.querySelector(t)}if(n=e.getElementsByTagName(t),r=Array.prototype.slice.call(n,0).filter((function(e){for(var t in i)if(e.getAttribute(t)===i[t])return!0;return!1})))return r[0]}function j(e,t){void 0!==(e.ownerDocument||e).createTreeWalker?z(e,t,NodeFilter.SHOW_TEXT):L(e,(function(e){e&&3===e.nodeType&&t(e)}))}function z(e,t,i){var n=document.createTreeWalker(e,i,null,!1);let r;for(;r=n.nextNode();)t(r)}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0;e=e.nextSibling}while(e)}function B(e){return new Promise((function(t,i){var n=new FileReader;n.readAsDataURL(e),n.onloadend=function(){t(n.result)}}))}function P(){this.resolve=null,this.reject=null,this.id=o(),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}),Object.freeze(this)}function M(e,t,i){var n;if(void 0!==e.querySelector&&(n=e.querySelector(`${t}[*|type="${i}"]`)),n&&0!==n.length)return n;n=R(e,t);for(var r=0;r<n.length;r++)if(n[r].getAttributeNS("http://www.idpf.org/2007/ops","type")===i||n[r].getAttribute("epub:type")===i)return n[r]}function F(e){for(var t=[],i=e.childNodes,n=0;n<i.length;n++){let e=i[n];1===e.nodeType&&t.push(e)}return t}function q(e){for(var t=[e];e;e=e.parentNode)t.unshift(e);return t}function U(e,t,i){for(var n=[],r=e.childNodes,s=0;s<r.length;s++){let e=r[s];if(1===e.nodeType&&e.nodeName.toLowerCase()===t){if(i)return e;n.push(e)}}if(!i)return n}function W(e,t){let i;if(null!==e&&""!==t)for(i=e.parentNode;1===i.nodeType;){if(i.tagName.toLowerCase()===t)return i;i=i.parentNode}}class H{constructor(){this.collapsed=!1,this.commonAncestorContainer=void 0,this.endContainer=void 0,this.endOffset=void 0,this.startContainer=void 0,this.startOffset=void 0}setStart(e,t){this.startContainer=e,this.startOffset=t,this.endContainer?this.commonAncestorContainer=this._commonAncestorContainer():this.collapse(!0),this._checkCollapsed()}setEnd(e,t){this.endContainer=e,this.endOffset=t,this.startContainer?(this.collapsed=!1,this.commonAncestorContainer=this._commonAncestorContainer()):this.collapse(!1),this._checkCollapsed()}collapse(e){this.collapsed=!0,e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset,this.commonAncestorContainer=this.startContainer.parentNode):(this.startContainer=this.endContainer,this.startOffset=this.endOffset,this.commonAncestorContainer=this.endOffset.parentNode)}selectNode(e){let t=e.parentNode,i=Array.prototype.indexOf.call(t.childNodes,e);this.setStart(t,i),this.setEnd(t,i+1)}selectNodeContents(e){e.childNodes[e.childNodes-1];let t=3===e.nodeType?e.textContent.length:parent.childNodes.length;this.setStart(e,0),this.setEnd(e,t)}_commonAncestorContainer(e,t){var i=q(e||this.startContainer),n=q(t||this.endContainer);if(i[0]==n[0])for(var r=0;r<i.length;r++)if(i[r]!=n[r])return i[r-1]}_checkCollapsed(){this.startContainer===this.endContainer&&this.startOffset===this.endOffset?this.collapsed=!0:this.collapsed=!1}toString(){}}},function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return r})),i.d(t,"c",(function(){return s}));const n="0.3",r=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],s={BOOK:{OPEN_FAILED:"openFailed"},CONTENTS:{EXPAND:"expand",RESIZE:"resize",SELECTED:"selected",SELECTED_RANGE:"selectedRange",LINK_CLICKED:"linkClicked"},LOCATIONS:{CHANGED:"changed"},MANAGERS:{RESIZE:"resize",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",ADDED:"added",SCROLL:"scroll",SCROLLED:"scrolled",REMOVED:"removed"},VIEWS:{AXIS:"axis",WRITING_MODE:"writingMode",LOAD_ERROR:"loaderror",RENDERED:"rendered",RESIZED:"resized",DISPLAYED:"displayed",SHOWN:"shown",HIDDEN:"hidden",MARK_CLICKED:"markClicked"},RENDITION:{STARTED:"started",ATTACHED:"attached",DISPLAYED:"displayed",DISPLAY_ERROR:"displayerror",RENDERED:"rendered",REMOVED:"removed",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",LOCATION_CHANGED:"locationChanged",RELOCATED:"relocated",MARK_CLICKED:"markClicked",SELECTED:"selected",LAYOUT:"layout"},LAYOUT:{UPDATED:"updated"},ANNOTATION:{ATTACH:"attach",DETACH:"detach"}}},function(e,t,i){"use strict";var n=i(0);class r{constructor(e,t,i){var s;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof r))return new r(e,t,i);if("string"==typeof t?this.base=this.parseComponent(t):"object"==typeof t&&t.steps&&(this.base=t),"string"===(s=this.checkType(e)))return this.str=e,Object(n.extend)(this,this.parse(e));if("range"===s)return Object(n.extend)(this,this.fromRange(e,this.base,i));if("node"===s)return Object(n.extend)(this,this.fromNode(e,this.base,i));if("EpubCFI"===s&&e.path)return e;if(e)throw new TypeError("not a valid argument for EpubCFI");return this}checkType(e){return this.isCfiString(e)?"string":!e||"object"!=typeof e||"Range"!==Object(n.type)(e)&&void 0===e.startContainer?e&&"object"==typeof e&&void 0!==e.nodeType?"node":!!(e&&"object"==typeof e&&e instanceof r)&&"EpubCFI":"range"}parse(e){var t,i,n,r={spinePos:-1,range:!1,base:{},path:{},start:null,end:null};return"string"!=typeof e?{spinePos:-1}:(0===e.indexOf("epubcfi(")&&")"===e[e.length-1]&&(e=e.slice(8,e.length-1)),(t=this.getChapterComponent(e))?(r.base=this.parseComponent(t),i=this.getPathComponent(e),r.path=this.parseComponent(i),(n=this.getRange(e))&&(r.range=!0,r.start=this.parseComponent(n[0]),r.end=this.parseComponent(n[1])),r.spinePos=r.base.steps[1].index,r):{spinePos:-1})}parseComponent(e){var t,i={steps:[],terminal:{offset:null,assertion:null}},n=e.split(":"),r=n[0].split("/");return n.length>1&&(t=n[1],i.terminal=this.parseTerminal(t)),""===r[0]&&r.shift(),i.steps=r.map(function(e){return this.parseStep(e)}.bind(this)),i}parseStep(e){var t,i,n,r,s;if((r=e.match(/\[(.*)\]/))&&r[1]&&(s=r[1]),i=parseInt(e),!isNaN(i))return i%2==0?(t="element",n=i/2-1):(t="text",n=(i-1)/2),{type:t,index:n,id:s||null}}parseTerminal(e){var t,i,r=e.match(/\[(.*)\]/);return r&&r[1]?(t=parseInt(e.split("[")[0]),i=r[1]):t=parseInt(e),Object(n.isNumber)(t)||(t=null),{offset:t,assertion:i}}getChapterComponent(e){return e.split("!")[0]}getPathComponent(e){var t=e.split("!");if(t[1]){return t[1].split(",")[0]}}getRange(e){var t=e.split(",");return 3===t.length&&[t[1],t[2]]}getCharecterOffsetComponent(e){return e.split(":")[1]||""}joinSteps(e){return e?e.map((function(e){var t="";return"element"===e.type&&(t+=2*(e.index+1)),"text"===e.type&&(t+=1+2*e.index),e.id&&(t+="["+e.id+"]"),t})).join("/"):""}segmentString(e){var t="/";return t+=this.joinSteps(e.steps),e.terminal&&null!=e.terminal.offset&&(t+=":"+e.terminal.offset),e.terminal&&null!=e.terminal.assertion&&(t+="["+e.terminal.assertion+"]"),t}toString(){var e="epubcfi(";return e+=this.segmentString(this.base),e+="!",e+=this.segmentString(this.path),this.range&&this.start&&(e+=",",e+=this.segmentString(this.start)),this.range&&this.end&&(e+=",",e+=this.segmentString(this.end)),e+=")"}compare(e,t){var i,n,s,o;if("string"==typeof e&&(e=new r(e)),"string"==typeof t&&(t=new r(t)),e.spinePos>t.spinePos)return 1;if(e.spinePos<t.spinePos)return-1;e.range?(i=e.path.steps.concat(e.start.steps),s=e.start.terminal):(i=e.path.steps,s=e.path.terminal),t.range?(n=t.path.steps.concat(t.start.steps),o=t.start.terminal):(n=t.path.steps,o=t.path.terminal);for(var a=0;a<i.length;a++){if(!i[a])return-1;if(!n[a])return 1;if(i[a].index>n[a].index)return 1;if(i[a].index<n[a].index)return-1}return i.length<n.length?-1:s.offset>o.offset?1:s.offset<o.offset?-1:0}step(e){var t=3===e.nodeType?"text":"element";return{id:e.id,tagName:e.tagName,type:t,index:this.position(e)}}filteredStep(e,t){var i,n=this.filter(e,t);if(n)return i=3===n.nodeType?"text":"element",{id:n.id,tagName:n.tagName,type:i,index:this.filteredPosition(n,t)}}pathTo(e,t,i){for(var n,r={steps:[],terminal:{offset:null,assertion:null}},s=e;s&&s.parentNode&&9!=s.parentNode.nodeType;)(n=i?this.filteredStep(s,i):this.step(s))&&r.steps.unshift(n),s=s.parentNode;return null!=t&&t>=0&&(r.terminal.offset=t,"text"!=r.steps[r.steps.length-1].type&&r.steps.push({type:"text",index:0})),r}equalStep(e,t){return!(!e||!t)&&(e.index===t.index&&e.id===t.id&&e.type===t.type)}fromRange(e,t,i){var n={range:!1,base:{},path:{},start:null,end:null},r=e.startContainer,s=e.endContainer,o=e.startOffset,a=e.endOffset,l=!1;if(i&&(l=null!=r.ownerDocument.querySelector("."+i)),"string"==typeof t?(n.base=this.parseComponent(t),n.spinePos=n.base.steps[1].index):"object"==typeof t&&(n.base=t),e.collapsed)l&&(o=this.patchOffset(r,o,i)),n.path=this.pathTo(r,o,i);else{n.range=!0,l&&(o=this.patchOffset(r,o,i)),n.start=this.pathTo(r,o,i),l&&(a=this.patchOffset(s,a,i)),n.end=this.pathTo(s,a,i),n.path={steps:[],terminal:null};var c,h=n.start.steps.length;for(c=0;c<h&&this.equalStep(n.start.steps[c],n.end.steps[c]);c++)c===h-1?n.start.terminal===n.end.terminal&&(n.path.steps.push(n.start.steps[c]),n.range=!1):n.path.steps.push(n.start.steps[c]);n.start.steps=n.start.steps.slice(n.path.steps.length),n.end.steps=n.end.steps.slice(n.path.steps.length)}return n}fromNode(e,t,i){var n={range:!1,base:{},path:{},start:null,end:null};return"string"==typeof t?(n.base=this.parseComponent(t),n.spinePos=n.base.steps[1].index):"object"==typeof t&&(n.base=t),n.path=this.pathTo(e,null,i),n}filter(e,t){var i,n,r,s,o,a=!1;return 3===e.nodeType?(a=!0,r=e.parentNode,i=e.parentNode.classList.contains(t)):(a=!1,i=e.classList.contains(t)),i&&a?(s=r.previousSibling,o=r.nextSibling,s&&3===s.nodeType?n=s:o&&3===o.nodeType&&(n=o),n||e):!(i&&!a)&&e}patchOffset(e,t,i){if(3!=e.nodeType)throw new Error("Anchor must be a text node");var n=e,r=t;for(e.parentNode.classList.contains(i)&&(n=e.parentNode);n.previousSibling;){if(1===n.previousSibling.nodeType){if(!n.previousSibling.classList.contains(i))break;r+=n.previousSibling.textContent.length}else r+=n.previousSibling.textContent.length;n=n.previousSibling}return r}normalizedMap(e,t,i){var n,r,s,o={},a=-1,l=e.length;for(n=0;n<l;n++)1===(r=e[n].nodeType)&&e[n].classList.contains(i)&&(r=3),n>0&&3===r&&3===s?o[n]=a:t===r&&(a+=1,o[n]=a),s=r;return o}position(e){var t,i;return 1===e.nodeType?((t=e.parentNode.children)||(t=Object(n.findChildren)(e.parentNode)),i=Array.prototype.indexOf.call(t,e)):i=(t=this.textNodes(e.parentNode)).indexOf(e),i}filteredPosition(e,t){var i,n;return 1===e.nodeType?(i=e.parentNode.children,n=this.normalizedMap(i,1,t)):(i=e.parentNode.childNodes,e.parentNode.classList.contains(t)&&(i=(e=e.parentNode).parentNode.childNodes),n=this.normalizedMap(i,3,t)),n[Array.prototype.indexOf.call(i,e)]}stepsToXpath(e){var t=[".","*"];return e.forEach((function(e){var i=e.index+1;e.id?t.push("*[position()="+i+" and @id='"+e.id+"']"):"text"===e.type?t.push("text()["+i+"]"):t.push("*["+i+"]")})),t.join("/")}stepsToQuerySelector(e){var t=["html"];return e.forEach((function(e){var i=e.index+1;e.id?t.push("#"+e.id):"text"===e.type||t.push("*:nth-child("+i+")")})),t.join(">")}textNodes(e,t){return Array.prototype.slice.call(e.childNodes).filter((function(e){return 3===e.nodeType||!(!t||!e.classList.contains(t))}))}walkToNode(e,t,i){var r,s,o=t||document,a=o.documentElement,l=e.length;for(s=0;s<l&&("element"===(r=e[s]).type?a=r.id?o.getElementById(r.id):(a.children||Object(n.findChildren)(a))[r.index]:"text"===r.type&&(a=this.textNodes(a,i)[r.index]),a);s++);return a}findNode(e,t,i){var n,r,s=t||document;return i||void 0===s.evaluate?n=i?this.walkToNode(e,s,i):this.walkToNode(e,s):(r=this.stepsToXpath(e),n=s.evaluate(r,s,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),n}fixMiss(e,t,i,n){var r,s,o=this.findNode(e.slice(0,-1),i,n),a=o.childNodes,l=this.normalizedMap(a,3,n),c=e[e.length-1].index;for(let e in l){if(!l.hasOwnProperty(e))return;if(l[e]===c){if(!(t>(s=(r=a[e]).textContent.length))){o=1===r.nodeType?r.childNodes[0]:r;break}t-=s}}return{container:o,offset:t}}toRange(e,t){var i,r,s,o,a,l,c,h,u=e||document,d=!!t&&null!=u.querySelector("."+t);if(i=void 0!==u.createRange?u.createRange():new n.RangeObject,this.range?(r=this.start,l=this.path.steps.concat(r.steps),o=this.findNode(l,u,d?t:null),s=this.end,c=this.path.steps.concat(s.steps),a=this.findNode(c,u,d?t:null)):(r=this.path,l=this.path.steps,o=this.findNode(this.path.steps,u,d?t:null)),!o)return console.log("No startContainer found for",this.toString()),null;try{null!=r.terminal.offset?i.setStart(o,r.terminal.offset):i.setStart(o,0)}catch(e){h=this.fixMiss(l,r.terminal.offset,u,d?t:null),i.setStart(h.container,h.offset)}if(a)try{null!=s.terminal.offset?i.setEnd(a,s.terminal.offset):i.setEnd(a,0)}catch(e){h=this.fixMiss(c,this.end.terminal.offset,u,d?t:null),i.setEnd(h.container,h.offset)}return i}isCfiString(e){return"string"==typeof e&&0===e.indexOf("epubcfi(")&&")"===e[e.length-1]}generateChapterComponent(e,t,i){var n="/"+2*(e+1)+"/";return n+=2*(parseInt(t)+1),i&&(n+="["+i+"]"),n}collapse(e){this.range&&(this.range=!1,e?(this.path.steps=this.path.steps.concat(this.start.steps),this.path.terminal=this.start.terminal):(this.path.steps=this.path.steps.concat(this.end.steps),this.path.terminal=this.end.terminal))}}t.a=r},function(e,t,i){"use strict";var n,r,s,o,a,l,c,h=i(31),u=i(45),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var i,r;return u(t),r=this,n.call(this,e,i=function(){s.call(r,e,i),d.call(t,this,arguments)}),i.__eeOnceListener__=t,this},a={on:n=function(e,t){var i;return u(t),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[e]?"object"==typeof i[e]?i[e].push(t):i[e]=[i[e],t]:i[e]=t,this},once:r,off:s=function(e,t){var i,n,r,s;if(u(t),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[e])return this;if("object"==typeof(n=i[e]))for(s=0;r=n[s];++s)r!==t&&r.__eeOnceListener__!==t||(2===n.length?i[e]=n[s?0:1]:n.splice(s,1));else n!==t&&n.__eeOnceListener__!==t||delete i[e];return this},emit:o=function(e){var t,i,n,r,s;if(v.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(i=arguments.length,s=new Array(i-1),t=1;t<i;++t)s[t-1]=arguments[t];for(r=r.slice(),t=0;n=r[t];++t)d.call(n,this,s)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),t=1;t<i;++t)s[t-1]=arguments[t];d.call(r,this,s)}}},l={on:h(n),once:h(r),off:h(s),emit:h(o)},c=m({},l),e.exports=t=function(e){return null==e?p(c):m(Object(e),l)},t.methods=a},function(e,t,i){"use strict";var n=i(7),r=i.n(n);t.a=class{constructor(e){var t;e.indexOf("://")>-1&&(e=new URL(e).pathname),t=this.parse(e),this.path=e,this.isDirectory(e)?this.directory=e:this.directory=t.dir+"/",this.filename=t.base,this.extension=t.ext.slice(1)}parse(e){return r.a.parse(e)}isAbsolute(e){return r.a.isAbsolute(e||this.path)}isDirectory(e){return"/"===e.charAt(e.length-1)}resolve(e){return r.a.resolve(this.directory,e)}relative(e){return e&&e.indexOf("://")>-1?e:r.a.relative(this.directory,e)}splitPath(e){return this.splitPathRe.exec(e).slice(1)}toString(){return this.path}}},function(e,t,i){"use strict";var n=i(4),r=i(7),s=i.n(r);t.a=class{constructor(e,t){var i=e.indexOf("://")>-1,r=e;if(this.Url=void 0,this.href=e,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=t,!i&&!1!==t&&"string"!=typeof t&&window&&window.location&&(this.base=window.location.href),i||this.base)try{this.base?this.Url=new URL(e,this.base):this.Url=new URL(e),this.href=this.Url.href,this.protocol=this.Url.protocol,this.origin=this.Url.origin,this.hash=this.Url.hash,this.search=this.Url.search,r=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch(e){this.Url=void 0,this.base&&(r=new n.a(this.base).resolve(r))}this.Path=new n.a(r),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(e){var t;return e.indexOf("://")>-1?e:(t=s.a.resolve(this.directory,e),this.origin+t)}relative(e){return s.a.relative(e,this.directory)}toString(){return this.href}}},function(e,t,i){"use strict";t.a=class{constructor(e){this.context=e||this,this.hooks=[]}register(){for(var e=0;e<arguments.length;++e)if("function"==typeof arguments[e])this.hooks.push(arguments[e]);else for(var t=0;t<arguments[e].length;++t)this.hooks.push(arguments[e][t])}deregister(e){let t;for(let i=0;i<this.hooks.length;i++)if(t=this.hooks[i],t===e){this.hooks.splice(i,1);break}}trigger(){var e=arguments,t=this.context,i=[];return this.hooks.forEach((function(n){try{var r=n.apply(t,e)}catch(e){console.log(e)}r&&"function"==typeof r.then&&i.push(r)})),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}},function(e,t,i){"use strict";if(!n)var n={cwd:function(){return"/"}};function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+e)}function s(e,t){for(var i,n="",r=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)i=e.charCodeAt(o);else{if(47===i)break;i=47}if(47===i){if(r===o-1||1===s);else if(r!==o-1&&2===s){if(n.length<2||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){for(var a=n.length-1,l=a;l>=0&&47!==n.charCodeAt(l);--l);if(l!==a){n=-1===l?"":n.slice(0,l),r=o,s=0;continue}}else if(2===n.length||1===n.length){n="",r=o,s=0;continue}t&&(n.length>0?n+="/..":n="..")}else n.length>0?n+="/"+e.slice(r+1,o):n=e.slice(r+1,o);r=o,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var o={resolve:function(){for(var e,t="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=n.cwd()),a=e),r(a),0!==a.length&&(t=a+"/"+t,i=47===a.charCodeAt(0))}return t=s(t,!i),i?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=s(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];r(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":o.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=o.resolve(e))===(t=o.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var n=e.length,s=n-i,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,c=s<l?s:l,h=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===t.charCodeAt(a+u))return t.slice(a+u+1);if(0===u)return t.slice(a+u)}else s>c&&(47===e.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=e.charCodeAt(i+u);if(d!==t.charCodeAt(a+u))break;47===d&&(h=u)}var f="";for(u=i+h+1;u<=n;++u)u!==n&&47!==e.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(a+h):(a+=h,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!s){n=o;break}}else s=!1;return-1===n?i?"/":".":i&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var i,n=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){n=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return n===s?s=l:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname:function(e){r(e);for(var t=-1,i=0,n=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(s=!1,n=a+1),46===l?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){i=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('Parameter "pathObject" must be an object, not '+typeof e);return function(e,t){var i=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+n:i+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,n=e.charCodeAt(0),s=47===n;s?(t.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,h=e.length-1,u=0;h>=i;--h)if(47!==(n=e.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===n?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=h+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(t.base=t.name=0===a&&s?e.slice(1,l):e.slice(a,l)):(0===a&&s?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(a,o),t.base=e.slice(a,l)),t.ext=e.slice(o,l)),a>0?t.dir=e.slice(0,a-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",posix:null};e.exports=o},function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"e",(function(){return c}));var n=i(0),r=i(5);i(4);function s(e,t){var i,r,s=t.url,o=s.indexOf("://")>-1;e&&(r=Object(n.qs)(e,"head"),(i=Object(n.qs)(r,"base"))||(i=e.createElement("base"),r.insertBefore(i,r.firstChild)),!o&&window&&window.location&&(s=window.location.origin+s),i.setAttribute("href",s))}function o(e,t){var i,r,s=t.canonical;e&&(i=Object(n.qs)(e,"head"),(r=Object(n.qs)(i,"link[rel='canonical']"))?r.setAttribute("href",s):((r=e.createElement("link")).setAttribute("rel","canonical"),r.setAttribute("href",s),i.appendChild(r)))}function a(e,t){var i,r,s=t.idref;e&&(i=Object(n.qs)(e,"head"),(r=Object(n.qs)(i,"link[property='dc.identifier']"))?r.setAttribute("content",s):((r=e.createElement("meta")).setAttribute("name","dc.identifier"),r.setAttribute("content",s),i.appendChild(r)))}function l(e,t){var i=e.querySelectorAll("a[href]");if(i.length)for(var s=Object(n.qs)(e.ownerDocument,"base"),o=s?s.getAttribute("href"):void 0,a=function(e){var i=e.getAttribute("href");if(0!==i.indexOf("mailto:"))if(i.indexOf("://")>-1)e.setAttribute("target","_blank");else{var n;try{n=new r.a(i,o)}catch(e){}e.onclick=function(){return n&&n.hash?t(n.Path.path+n.hash):t(n?n.Path.path:i),!1}}}.bind(this),l=0;l<i.length;l++)a(i[l])}function c(e,t,i){return t.forEach((function(t,n){t&&i[n]&&(t=t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e=e.replace(new RegExp(t,"g"),i[n]))})),e}},function(e,t,i){"use strict";var n=i(0);t.a=class{constructor(e){this._q=[],this.context=e,this.tick=n.requestAnimationFrame,this.running=!1,this.paused=!1}enqueue(){var e,t,i=[].shift.call(arguments),r=arguments;if(!i)throw new Error("No Task Provided");return t="function"==typeof i?{task:i,args:r,deferred:e=new n.defer,promise:e.promise}:{promise:i},this._q.push(t),0!=this.paused||this.running||this.run(),t.promise}dequeue(){var e,t,i;return!this._q.length||this.paused?((e=new n.defer).deferred.resolve(),e.promise):(t=(e=this._q.shift()).task)?(i=t.apply(this.context,e.args))&&"function"==typeof i.then?i.then(function(){e.deferred.resolve.apply(this.context,arguments)}.bind(this),function(){e.deferred.reject.apply(this.context,arguments)}.bind(this)):(e.deferred.resolve.apply(this.context,i),e.promise):e.promise?e.promise:void 0}dump(){for(;this._q.length;)this.dequeue()}run(){return this.running||(this.running=!0,this.defered=new n.defer),this.tick.call(window,()=>{this._q.length?this.dequeue().then(function(){this.run()}.bind(this)):(this.defered.resolve(),this.running=void 0)}),1==this.paused&&(this.paused=!1),this.defered.promise}flush(){return this.running?this.running:this._q.length?(this.running=this.dequeue().then(function(){return this.running=void 0,this.flush()}.bind(this)),this.running):void 0}clear(){this._q=[]}length(){return this._q.length}pause(){this.paused=!0}stop(){this._q=[],this.running=!1,this.paused=!0}}},function(e,t,i){"use strict";var n=i(3),r=i.n(n),s=i(0);function o(){var e="reverse",t=function(){var e=document.createElement("div");e.dir="rtl",e.style.position="fixed",e.style.width="1px",e.style.height="1px",e.style.top="0px",e.style.left="0px",e.style.overflow="hidden";var t=document.createElement("div");t.style.width="2px";var i=document.createElement("span");i.style.width="1px",i.style.display="inline-block";var n=document.createElement("span");return n.style.width="1px",n.style.display="inline-block",t.appendChild(i),t.appendChild(n),e.appendChild(t),e}();return document.body.appendChild(t),t.scrollLeft>0?e="default":"undefined"!=typeof Element&&Element.prototype.scrollIntoView?(t.children[0].children[1].scrollIntoView(),t.scrollLeft<0&&(e="negative")):(t.scrollLeft=1,0===t.scrollLeft&&(e="negative")),document.body.removeChild(t),e}var a=i(11),l=i(9),c=i(28),h=i.n(c);var u=class{constructor(e){this.settings=e||{},this.id="epubjs-container-"+Object(s.uuid)(),this.container=this.create(this.settings),this.settings.hidden&&(this.wrapper=this.wrap(this.container))}create(e){let t=e.height,i=e.width,n=e.overflow||!1,r=e.axis||"vertical",o=e.direction;Object(s.extend)(this.settings,e),e.height&&Object(s.isNumber)(e.height)&&(t=e.height+"px"),e.width&&Object(s.isNumber)(e.width)&&(i=e.width+"px");let a=document.createElement("div");return a.id=this.id,a.classList.add("epub-container"),a.style.wordSpacing="0",a.style.lineHeight="0",a.style.verticalAlign="top",a.style.position="relative","horizontal"===r&&(a.style.display="flex",a.style.flexDirection="row",a.style.flexWrap="nowrap"),i&&(a.style.width=i),t&&(a.style.height=t),n&&("scroll"===n&&"vertical"===r?(a.style["overflow-y"]=n,a.style["overflow-x"]="hidden"):"scroll"===n&&"horizontal"===r?(a.style["overflow-y"]="hidden",a.style["overflow-x"]=n):a.style.overflow=n),o&&(a.dir=o,a.style.direction=o),o&&this.settings.fullsize&&(document.body.style.direction=o),a}wrap(e){var t=document.createElement("div");return t.style.visibility="hidden",t.style.overflow="hidden",t.style.width="0",t.style.height="0",t.appendChild(e),t}getElement(e){var t;if(Object(s.isElement)(e)?t=e:"string"==typeof e&&(t=document.getElementById(e)),!t)throw new Error("Not an Element");return t}attachTo(e){var t,i=this.getElement(e);if(i)return t=this.settings.hidden?this.wrapper:this.container,i.appendChild(t),this.element=i,i}getContainer(){return this.container}onResize(e){Object(s.isNumber)(this.settings.width)&&Object(s.isNumber)(this.settings.height)||(this.resizeFunc=h()(e,50),window.addEventListener("resize",this.resizeFunc,!1))}onOrientationChange(e){this.orientationChangeFunc=e,window.addEventListener("orientationchange",this.orientationChangeFunc,!1)}size(e,t){var i;let n=e||this.settings.width,r=t||this.settings.height;null===e?(i=this.element.getBoundingClientRect()).width&&(e=Math.floor(i.width),this.container.style.width=e+"px"):Object(s.isNumber)(e)?this.container.style.width=e+"px":this.container.style.width=e,null===t?(i=i||this.element.getBoundingClientRect()).height&&(t=i.height,this.container.style.height=t+"px"):Object(s.isNumber)(t)?this.container.style.height=t+"px":this.container.style.height=t,Object(s.isNumber)(e)||(e=this.container.clientWidth),Object(s.isNumber)(t)||(t=this.container.clientHeight),this.containerStyles=window.getComputedStyle(this.container),this.containerPadding={left:parseFloat(this.containerStyles["padding-left"])||0,right:parseFloat(this.containerStyles["padding-right"])||0,top:parseFloat(this.containerStyles["padding-top"])||0,bottom:parseFloat(this.containerStyles["padding-bottom"])||0};let o=Object(s.windowBounds)(),a=window.getComputedStyle(document.body),l=parseFloat(a["padding-left"])||0,c=parseFloat(a["padding-right"])||0,h=parseFloat(a["padding-top"])||0,u=parseFloat(a["padding-bottom"])||0;return n||(e=o.width-l-c),(this.settings.fullsize&&!r||!r)&&(t=o.height-h-u),{width:e-this.containerPadding.left-this.containerPadding.right,height:t-this.containerPadding.top-this.containerPadding.bottom}}bounds(){let e;return"visible"!==this.container.style.overflow&&(e=this.container&&this.container.getBoundingClientRect()),e&&e.width&&e.height?e:Object(s.windowBounds)()}getSheet(){var e=document.createElement("style");return e.appendChild(document.createTextNode("")),document.head.appendChild(e),e.sheet}addStyleRules(e,t){var i="#"+this.id+" ",n="";this.sheet||(this.sheet=this.getSheet()),t.forEach((function(e){for(var t in e)e.hasOwnProperty(t)&&(n+=t+":"+e[t]+";")})),this.sheet.insertRule(i+e+" {"+n+"}",0)}axis(e){"horizontal"===e?(this.container.style.display="flex",this.container.style.flexDirection="row",this.container.style.flexWrap="nowrap"):this.container.style.display="block",this.settings.axis=e}direction(e){this.container&&(this.container.dir=e,this.container.style.direction=e),this.settings.fullsize&&(document.body.style.direction=e),this.settings.dir=e}overflow(e){this.container&&("scroll"===e&&"vertical"===this.settings.axis?(this.container.style["overflow-y"]=e,this.container.style["overflow-x"]="hidden"):"scroll"===e&&"horizontal"===this.settings.axis?(this.container.style["overflow-y"]="hidden",this.container.style["overflow-x"]=e):this.container.style.overflow=e),this.settings.overflow=e}destroy(){this.element&&(this.settings.hidden?this.wrapper:this.container,this.element.contains(this.container)&&this.element.removeChild(this.container),window.removeEventListener("resize",this.resizeFunc),window.removeEventListener("orientationChange",this.orientationChangeFunc))}};var d=class{constructor(e){this.container=e,this._views=[],this.length=0,this.hidden=!1}all(){return this._views}first(){return this._views[0]}last(){return this._views[this._views.length-1]}indexOf(e){return this._views.indexOf(e)}slice(){return this._views.slice.apply(this._views,arguments)}get(e){return this._views[e]}append(e){return this._views.push(e),this.container&&this.container.appendChild(e.element),this.length++,e}prepend(e){return this._views.unshift(e),this.container&&this.container.insertBefore(e.element,this.container.firstChild),this.length++,e}insert(e,t){return this._views.splice(t,0,e),this.container&&(t<this.container.children.length?this.container.insertBefore(e.element,this.container.children[t]):this.container.appendChild(e.element)),this.length++,e}remove(e){var t=this._views.indexOf(e);t>-1&&this._views.splice(t,1),this.destroy(e),this.length--}destroy(e){e.displayed&&e.destroy(),this.container&&this.container.removeChild(e.element),e=null}forEach(){return this._views.forEach.apply(this._views,arguments)}clear(){var e,t=this.length;if(this.length){for(var i=0;i<t;i++)e=this._views[i],this.destroy(e);this._views=[],this.length=0}}find(e){for(var t,i=this.length,n=0;n<i;n++)if((t=this._views[n]).displayed&&t.section.index==e.index)return t}displayed(){for(var e,t=[],i=this.length,n=0;n<i;n++)(e=this._views[n]).displayed&&t.push(e);return t}show(){for(var e,t=this.length,i=0;i<t;i++)(e=this._views[i]).displayed&&e.show();this.hidden=!1}hide(){for(var e,t=this.length,i=0;i<t;i++)(e=this._views[i]).displayed&&e.hide();this.hidden=!0}},f=i(1);class p{constructor(e){this.name="default",this.optsSettings=e.settings,this.View=e.view,this.request=e.request,this.renditionQueue=e.queue,this.q=new l.a(this),this.settings=Object(s.extend)(this.settings||{},{infinite:!0,hidden:!1,width:void 0,height:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",ignoreClass:"",fullsize:void 0,allowScriptedContent:!1,allowPopups:!1}),Object(s.extend)(this.settings,e.settings||{}),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,method:this.settings.method,width:0,height:0,forceEvenPages:!0,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.rendered=!1}render(e,t){let i=e.tagName;void 0!==this.settings.fullsize||!i||"body"!=i.toLowerCase()&&"html"!=i.toLowerCase()||(this.settings.fullsize=!0),this.settings.fullsize&&(this.settings.overflow="visible",this.overflow=this.settings.overflow),this.settings.size=t,this.settings.rtlScrollType=o(),this.stage=new u({width:t.width,height:t.height,overflow:this.overflow,hidden:this.settings.hidden,axis:this.settings.axis,fullsize:this.settings.fullsize,direction:this.settings.direction}),this.stage.attachTo(e),this.container=this.stage.getContainer(),this.views=new d(this.container),this._bounds=this.bounds(),this._stageSize=this.stage.size(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.stage.onResize(this.onResized.bind(this)),this.stage.onOrientationChange(this.onOrientationChange.bind(this)),this.addEventListeners(),this.layout&&this.updateLayout(),this.rendered=!0}addEventListeners(){var e;window.addEventListener("unload",function(e){this.destroy()}.bind(this)),e=this.settings.fullsize?window:this.container,this._onScroll=this.onScroll.bind(this),e.addEventListener("scroll",this._onScroll)}removeEventListeners(){(this.settings.fullsize?window:this.container).removeEventListener("scroll",this._onScroll),this._onScroll=void 0}destroy(){clearTimeout(this.orientationTimeout),clearTimeout(this.resizeTimeout),clearTimeout(this.afterScrolled),this.clear(),this.removeEventListeners(),this.stage.destroy(),this.rendered=!1}onOrientationChange(e){let{orientation:t}=window;this.optsSettings.resizeOnOrientationChange&&this.resize(),clearTimeout(this.orientationTimeout),this.orientationTimeout=setTimeout(function(){this.orientationTimeout=void 0,this.optsSettings.resizeOnOrientationChange&&this.resize(),this.emit(f.c.MANAGERS.ORIENTATION_CHANGE,t)}.bind(this),500)}onResized(e){this.resize()}resize(e,t,i){let n=this.stage.size(e,t);this.winBounds=Object(s.windowBounds)(),this.orientationTimeout&&this.winBounds.width===this.winBounds.height?this._stageSize=void 0:this._stageSize&&this._stageSize.width===n.width&&this._stageSize.height===n.height||(this._stageSize=n,this._bounds=this.bounds(),this.clear(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.updateLayout(),this.emit(f.c.MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(e,t){return new this.View(e,Object(s.extend)(this.viewSettings,{forceRight:t}))}handleNextPrePaginated(e,t,i){let n;if("pre-paginated"===this.layout.name&&this.layout.divisor>1){if(e||0===t.index)return;if(n=t.next(),n&&!n.properties.includes("page-spread-left"))return i.call(this,n)}}display(e,t){var i=new s.defer,n=i.promise;(t===e.href||Object(s.isNumber)(t))&&(t=void 0);var r=this.views.find(e);if(r&&e&&"pre-paginated"!==this.layout.name){let e=r.offset();if("ltr"===this.settings.direction)this.scrollTo(e.left,e.top,!0);else{let t=r.width();this.scrollTo(e.left+t,e.top,!0)}if(t){let e=r.locationOf(t),i=r.width();this.moveTo(e,i)}return i.resolve(),n}this.clear();let o=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&e.properties.includes("page-spread-right")&&(o=!0),this.add(e,o).then(function(e){if(t){let i=e.locationOf(t),n=e.width();this.moveTo(i,n)}}.bind(this),e=>{i.reject(e)}).then(function(){return this.handleNextPrePaginated(o,e,this.add)}.bind(this)).then(function(){this.views.show(),i.resolve()}.bind(this)),n}afterDisplayed(e){this.emit(f.c.MANAGERS.ADDED,e)}afterResized(e){this.emit(f.c.MANAGERS.RESIZE,e.section)}moveTo(e,t){var i=0,n=0;this.isPaginated?((i=Math.floor(e.left/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollWidth&&(i=this.container.scrollWidth-this.layout.delta),(n=Math.floor(e.top/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollHeight&&(n=this.container.scrollHeight-this.layout.delta)):n=e.top,"rtl"===this.settings.direction&&(i+=this.layout.delta,i-=t),this.scrollTo(i,n,!0)}add(e,t){var i=this.createView(e,t);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),i.on(f.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),i.display(this.request)}append(e,t){var i=this.createView(e,t);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),i.on(f.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),i.display(this.request)}prepend(e,t){var i=this.createView(e,t);return i.on(f.c.VIEWS.RESIZED,e=>{this.counter(e)}),this.views.prepend(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),i.on(f.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),i.display(this.request)}counter(e){"vertical"===this.settings.axis?this.scrollBy(0,e.heightDelta,!0):this.scrollBy(e.widthDelta,0,!0)}next(){var e;let t=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||t&&"ltr"!==t)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===t)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft>0?this.scrollBy(this.layout.delta,0,!0):e=this.views.last().section.next():this.container.scrollLeft+-1*this.layout.delta>-1*this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):e=this.views.last().section.next();else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop,this.container.scrollTop+this.container.offsetHeight<this.container.scrollHeight?this.scrollBy(0,this.layout.height,!0):e=this.views.last().section.next()}else e=this.views.last().section.next();else this.scrollLeft=this.container.scrollLeft,this.container.scrollLeft+this.container.offsetWidth+this.layout.delta<=this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):e=this.views.last().section.next();if(e){this.clear(),this.updateLayout();let t=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&e.properties.includes("page-spread-right")&&(t=!0),this.append(e,t).then(function(){return this.handleNextPrePaginated(t,e,this.append)}.bind(this),e=>e).then(function(){this.isPaginated||"horizontal"!==this.settings.axis||"rtl"!==this.settings.direction||"default"!==this.settings.rtlScrollType||this.scrollTo(this.container.scrollWidth,0,!0),this.views.show()}.bind(this))}}}prev(){var e;let t=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||t&&"ltr"!==t)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===t)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft+this.container.offsetWidth<this.container.scrollWidth?this.scrollBy(-this.layout.delta,0,!0):e=this.views.first().section.prev():this.container.scrollLeft<0?this.scrollBy(-this.layout.delta,0,!0):e=this.views.first().section.prev();else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop,this.container.scrollTop>0?this.scrollBy(0,-this.layout.height,!0):e=this.views.first().section.prev()}else e=this.views.first().section.prev();else this.scrollLeft=this.container.scrollLeft,this.container.scrollLeft>0?this.scrollBy(-this.layout.delta,0,!0):e=this.views.first().section.prev();if(e){this.clear(),this.updateLayout();let t=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&"object"!=typeof e.prev()&&(t=!0),this.prepend(e,t).then(function(){var t;if("pre-paginated"===this.layout.name&&this.layout.divisor>1&&(t=e.prev()))return this.prepend(t)}.bind(this),e=>e).then(function(){this.isPaginated&&"horizontal"===this.settings.axis&&("rtl"===this.settings.direction?"default"===this.settings.rtlScrollType?this.scrollTo(0,0,!0):this.scrollTo(-1*this.container.scrollWidth+this.layout.delta,0,!0):this.scrollTo(this.container.scrollWidth-this.layout.delta,0,!0)),this.views.show()}.bind(this))}}}current(){var e=this.visible();return e.length?e[e.length-1]:null}clear(){this.views&&(this.views.hide(),this.scrollTo(0,0,!0),this.views.clear())}currentLocation(){return this.updateLayout(),this.isPaginated&&"horizontal"===this.settings.axis?this.location=this.paginatedLocation():this.location=this.scrolledLocation(),this.location}scrolledLocation(){let e=this.visible(),t=this.container.getBoundingClientRect(),i=t.height<window.innerHeight?t.height:window.innerHeight,n=t.width<window.innerWidth?t.width:window.innerWidth,r="vertical"===this.settings.axis,s=(this.settings.direction,0);return this.settings.fullsize&&(s=r?window.scrollY:window.scrollX),e.map(e=>{let o,a,l,c,{index:h,href:u}=e.section,d=e.position(),f=e.width(),p=e.height();r?(o=s+t.top-d.top+0,a=o+i-0,c=this.layout.count(p,i).pages,l=i):(o=s+t.left-d.left+0,a=o+n-0,c=this.layout.count(f,n).pages,l=n);let g=Math.ceil(o/l),m=[],v=Math.ceil(a/l);if("rtl"===this.settings.direction&&!r){let e=g;g=c-v,v=c-e}m=[];for(var y=g;y<=v;y++){let e=y+1;m.push(e)}return{index:h,href:u,pages:m,totalPages:c,mapping:this.mapping.page(e.contents,e.section.cfiBase,o,a)}})}paginatedLocation(){let e=this.visible(),t=this.container.getBoundingClientRect(),i=0,n=0;return this.settings.fullsize&&(i=window.scrollX),e.map(e=>{let r,s,o,a,{index:l,href:c}=e.section,h=e.position(),u=e.width();"rtl"===this.settings.direction?(r=t.right-i,a=Math.min(Math.abs(r-h.left),this.layout.width)-n,o=h.width-(h.right-r)-n,s=o-a):(r=t.left+i,a=Math.min(h.right-r,this.layout.width)-n,s=r-h.left+n,o=s+a),n+=a;let d=this.mapping.page(e.contents,e.section.cfiBase,s,o),f=this.layout.count(u).pages,p=Math.floor(s/this.layout.pageWidth),g=[],m=Math.floor(o/this.layout.pageWidth);if(p<0&&(p=0,m+=1),"rtl"===this.settings.direction){let e=p;p=f-m,m=f-e}for(var v=p+1;v<=m;v++){let e=v;g.push(e)}return{index:l,href:c,pages:g,totalPages:f,mapping:d}})}isVisible(e,t,i,n){var r=e.position(),s=n||this.bounds();return"horizontal"===this.settings.axis&&r.right>s.left-t&&r.left<s.right+i||"vertical"===this.settings.axis&&r.bottom>s.top-t&&r.top<s.bottom+i}visible(){for(var e,t=this.bounds(),i=this.views.displayed(),n=i.length,r=[],s=0;s<n;s++)e=i[s],!0===this.isVisible(e,0,0,t)&&r.push(e);return r}scrollBy(e,t,i){let n="rtl"===this.settings.direction?-1:1;i&&(this.ignore=!0),this.settings.fullsize?window.scrollBy(e*n,t*n):(e&&(this.container.scrollLeft+=e*n),t&&(this.container.scrollTop+=t)),this.scrolled=!0}scrollTo(e,t,i){i&&(this.ignore=!0),this.settings.fullsize?window.scrollTo(e,t):(this.container.scrollLeft=e,this.container.scrollTop=t),this.scrolled=!0}onScroll(){let e,t;this.settings.fullsize?(e=window.scrollY,t=window.scrollX):(e=this.container.scrollTop,t=this.container.scrollLeft),this.scrollTop=e,this.scrollLeft=t,this.ignore?this.ignore=!1:(this.emit(f.c.MANAGERS.SCROLL,{top:e,left:t}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.emit(f.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),20))}bounds(){return this.stage.bounds()}applyLayout(e){this.layout=e,this.updateLayout(),this.views&&this.views.length>0&&"pre-paginated"===this.layout.name&&this.display(this.views.first().section)}updateLayout(){this.stage&&(this._stageSize=this.stage.size(),this.isPaginated?(this.layout.calculate(this._stageSize.width,this._stageSize.height,this.settings.gap),this.settings.offset=this.layout.delta/this.layout.divisor):this.layout.calculate(this._stageSize.width,this._stageSize.height),this.viewSettings.width=this.layout.width,this.viewSettings.height=this.layout.height,this.setLayout(this.layout))}setLayout(e){this.viewSettings.layout=e,this.mapping=new a.a(e.props,this.settings.direction,this.settings.axis),this.views&&this.views.forEach((function(t){t&&t.setLayout(e)}))}updateWritingMode(e){this.writingMode=e}updateAxis(e,t){(t||e!==this.settings.axis)&&(this.settings.axis=e,this.stage&&this.stage.axis(e),this.viewSettings.axis=e,this.mapping&&(this.mapping=new a.a(this.layout.props,this.settings.direction,this.settings.axis)),this.layout&&("vertical"===e?this.layout.spread("none"):this.layout.spread(this.layout.settings.spread)))}updateFlow(e,t="auto"){let i="paginated"===e||"auto"===e;this.isPaginated=i,"scrolled-doc"===e||"scrolled-continuous"===e||"scrolled"===e?this.updateAxis("vertical"):this.updateAxis("horizontal"),this.viewSettings.flow=e,this.settings.overflow?this.overflow=this.settings.overflow:this.overflow=i?"hidden":t,this.stage&&this.stage.overflow(this.overflow),this.updateLayout()}getContents(){var e=[];return this.views?(this.views.forEach((function(t){const i=t&&t.contents;i&&e.push(i)})),e):e}direction(e="ltr"){this.settings.direction=e,this.stage&&this.stage.direction(e),this.viewSettings.direction=e,this.updateLayout()}isRendered(){return this.rendered}}r()(p.prototype);t.a=p},function(e,t,i){"use strict";var n=i(2),r=i(0);t.a=class{constructor(e,t,i,n=!1){this.layout=e,this.horizontal="horizontal"===i,this.direction=t||"ltr",this._dev=n}section(e){var t=this.findRanges(e);return this.rangeListToCfiList(e.section.cfiBase,t)}page(e,t,i,r){var s,o=!(!e||!e.document)&&e.document.body;if(o){if(s=this.rangePairToCfiPair(t,{start:this.findStart(o,i,r),end:this.findEnd(o,i,r)}),!0===this._dev){let t=e.document,i=new n.a(s.start).toRange(t),r=new n.a(s.end).toRange(t),o=t.defaultView.getSelection(),a=t.createRange();o.removeAllRanges(),a.setStart(i.startContainer,i.startOffset),a.setEnd(r.endContainer,r.endOffset),o.addRange(a)}return s}}walk(e,t){if(!e||e.nodeType!==Node.TEXT_NODE){var i=function(e){return e.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},n=i;n.acceptNode=i;for(var r,s,o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,n,!1);(r=o.nextNode())&&!(s=t(r)););return s}}findRanges(e){for(var t,i,n=[],r=e.contents.scrollWidth(),s=Math.ceil(r/this.layout.spreadWidth)*this.layout.divisor,o=this.layout.columnWidth,a=this.layout.gap,l=0;l<s.pages;l++)t=(o+a)*l,i=o*(l+1)+a*l,n.push({start:this.findStart(e.document.body,t,i),end:this.findEnd(e.document.body,t,i)});return n}findStart(e,t,i){for(var n,s,o=[e],a=e;o.length;)if(n=o.shift(),s=this.walk(n,e=>{var n,s,l,c,h;if(h=Object(r.nodeBounds)(e),this.horizontal&&"ltr"===this.direction){if(n=this.horizontal?h.left:h.top,s=this.horizontal?h.right:h.bottom,n>=t&&n<=i)return e;if(s>t)return e;a=e,o.push(e)}else if(this.horizontal&&"rtl"===this.direction){if(n=h.left,(s=h.right)<=i&&s>=t)return e;if(n<i)return e;a=e,o.push(e)}else{if(l=h.top,c=h.bottom,l>=t&&l<=i)return e;if(c>t)return e;a=e,o.push(e)}}))return this.findTextStartRange(s,t,i);return this.findTextStartRange(a,t,i)}findEnd(e,t,i){for(var n,s,o=[e],a=e;o.length;)if(n=o.shift(),s=this.walk(n,e=>{var n,s,l,c,h;if(h=Object(r.nodeBounds)(e),this.horizontal&&"ltr"===this.direction){if(n=Math.round(h.left),s=Math.round(h.right),n>i&&a)return a;if(s>i)return e;a=e,o.push(e)}else if(this.horizontal&&"rtl"===this.direction){if(n=Math.round(this.horizontal?h.left:h.top),(s=Math.round(this.horizontal?h.right:h.bottom))<t&&a)return a;if(n<t)return e;a=e,o.push(e)}else{if(l=Math.round(h.top),c=Math.round(h.bottom),l>i&&a)return a;if(c>i)return e;a=e,o.push(e)}}))return this.findTextEndRange(s,t,i);return this.findTextEndRange(a,t,i)}findTextStartRange(e,t,i){for(var n,r,s=this.splitTextNodeIntoRanges(e),o=0;o<s.length;o++)if(r=(n=s[o]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(r.left>=t)return n}else if(this.horizontal&&"rtl"===this.direction){if(r.right<=i)return n}else if(r.top>=t)return n;return s[0]}findTextEndRange(e,t,i){for(var n,r,s,o,a,l,c,h=this.splitTextNodeIntoRanges(e),u=0;u<h.length;u++){if(s=(r=h[u]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(o=s.left,a=s.right,o>i&&n)return n;if(a>i)return r}else if(this.horizontal&&"rtl"===this.direction){if(o=s.left,(a=s.right)<t&&n)return n;if(o<t)return r}else{if(l=s.top,c=s.bottom,l>i&&n)return n;if(c>i)return r}n=r}return h[h.length-1]}splitTextNodeIntoRanges(e,t){var i,n=[],r=(e.textContent||"").trim(),s=e.ownerDocument,o=t||" ",a=r.indexOf(o);if(-1===a||e.nodeType!=Node.TEXT_NODE)return(i=s.createRange()).selectNodeContents(e),[i];for((i=s.createRange()).setStart(e,0),i.setEnd(e,a),n.push(i),i=!1;-1!=a;)(a=r.indexOf(o,a+1))>0&&(i&&(i.setEnd(e,a),n.push(i)),(i=s.createRange()).setStart(e,a+1));return i&&(i.setEnd(e,r.length),n.push(i)),n}rangePairToCfiPair(e,t){var i=t.start,r=t.end;return i.collapse(!0),r.collapse(!1),{start:new n.a(i,e).toString(),end:new n.a(r,e).toString()}}rangeListToCfiList(e,t){for(var i,n=[],r=0;r<t.length;r++)i=this.rangePairToCfiPair(e,t[r]),n.push(i);return n}axis(e){return e&&(this.horizontal="horizontal"===e),this.horizontal}}},function(e,t,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(2),a=i(11),l=i(8),c=i(1);const h="undefined"!=typeof navigator,u=h&&/Chrome/.test(navigator.userAgent),d=h&&!u&&/AppleWebKit/.test(navigator.userAgent);class f{constructor(e,t,i,n){this.epubcfi=new o.a,this.document=e,this.documentElement=this.document.documentElement,this.content=t||this.document.body,this.window=this.document.defaultView,this._size={width:0,height:0},this.sectionIndex=n||0,this.cfiBase=i||"",this.epubReadingSystem("epub.js",c.b),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return c.a}width(e){var t=this.content;return e&&Object(s.isNumber)(e)&&(e+="px"),e&&(t.style.width=e),parseInt(this.window.getComputedStyle(t).width)}height(e){var t=this.content;return e&&Object(s.isNumber)(e)&&(e+="px"),e&&(t.style.height=e),parseInt(this.window.getComputedStyle(t).height)}contentWidth(e){var t=this.content||this.document.body;return e&&Object(s.isNumber)(e)&&(e+="px"),e&&(t.style.width=e),parseInt(this.window.getComputedStyle(t).width)}contentHeight(e){var t=this.content||this.document.body;return e&&Object(s.isNumber)(e)&&(e+="px"),e&&(t.style.height=e),parseInt(this.window.getComputedStyle(t).height)}textWidth(){let e,t,i=this.document.createRange(),n=this.content||this.document.body,r=Object(s.borders)(n);return i.selectNodeContents(n),e=i.getBoundingClientRect(),t=e.width,r&&r.width&&(t+=r.width),Math.round(t)}textHeight(){let e,t,i=this.document.createRange(),n=this.content||this.document.body;return i.selectNodeContents(n),e=i.getBoundingClientRect(),t=e.bottom,Math.round(t)}scrollWidth(){return this.documentElement.scrollWidth}scrollHeight(){return this.documentElement.scrollHeight}overflow(e){return e&&(this.documentElement.style.overflow=e),this.window.getComputedStyle(this.documentElement).overflow}overflowX(e){return e&&(this.documentElement.style.overflowX=e),this.window.getComputedStyle(this.documentElement).overflowX}overflowY(e){return e&&(this.documentElement.style.overflowY=e),this.window.getComputedStyle(this.documentElement).overflowY}css(e,t,i){var n=this.content||this.document.body;return t?n.style.setProperty(e,t,i?"important":""):n.style.removeProperty(e),this.window.getComputedStyle(n)[e]}viewport(e){var t,i=this.document.querySelector("meta[name='viewport']"),n={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[];if(i&&i.hasAttribute("content")){let e=i.getAttribute("content"),t=e.match(/width\s*=\s*([^,]*)/),r=e.match(/height\s*=\s*([^,]*)/),s=e.match(/initial-scale\s*=\s*([^,]*)/),o=e.match(/minimum-scale\s*=\s*([^,]*)/),a=e.match(/maximum-scale\s*=\s*([^,]*)/),l=e.match(/user-scalable\s*=\s*([^,]*)/);t&&t.length&&void 0!==t[1]&&(n.width=t[1]),r&&r.length&&void 0!==r[1]&&(n.height=r[1]),s&&s.length&&void 0!==s[1]&&(n.scale=s[1]),o&&o.length&&void 0!==o[1]&&(n.minimum=o[1]),a&&a.length&&void 0!==a[1]&&(n.maximum=a[1]),l&&l.length&&void 0!==l[1]&&(n.scalable=l[1])}return t=Object(s.defaults)(e||{},n),e&&(t.width&&r.push("width="+t.width),t.height&&r.push("height="+t.height),t.scale&&r.push("initial-scale="+t.scale),"no"===t.scalable?(r.push("minimum-scale="+t.scale),r.push("maximum-scale="+t.scale),r.push("user-scalable="+t.scalable)):(t.scalable&&r.push("user-scalable="+t.scalable),t.minimum&&r.push("minimum-scale="+t.minimum),t.maximum&&r.push("minimum-scale="+t.maximum)),i||((i=this.document.createElement("meta")).setAttribute("name","viewport"),this.document.querySelector("head").appendChild(i)),i.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),t}expand(){this.emit(c.c.CONTENTS.EXPAND)}listeners(){this.imageLoadListeners(),this.mediaQueryListeners(),this.addEventListeners(),this.addSelectionListeners(),"undefined"==typeof ResizeObserver?(this.resizeListeners(),this.visibilityListeners()):this.resizeObservers(),this.linksHandler()}removeListeners(){this.removeEventListeners(),this.removeSelectionListeners(),this.observer&&this.observer.disconnect(),clearTimeout(this.expanding)}resizeCheck(){let e=this.textWidth(),t=this.textHeight();e==this._size.width&&t==this._size.height||(this._size={width:e,height:t},this.onResize&&this.onResize(this._size),this.emit(c.c.CONTENTS.RESIZE,this._size))}resizeListeners(){clearTimeout(this.expanding),requestAnimationFrame(this.resizeCheck.bind(this)),this.expanding=setTimeout(this.resizeListeners.bind(this),350)}visibilityListeners(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&!1===this.active?(this.active=!0,this.resizeListeners()):(this.active=!1,clearTimeout(this.expanding))})}transitionListeners(){let e=this.content;e.style.transitionProperty="font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height",e.style.transitionDuration="0.001ms",e.style.transitionTimingFunction="linear",e.style.transitionDelay="0",this._resizeCheck=this.resizeCheck.bind(this),this.document.addEventListener("transitionend",this._resizeCheck)}mediaQueryListeners(){for(var e=this.document.styleSheets,t=function(e){e.matches&&!this._expanding&&setTimeout(this.expand.bind(this),1)}.bind(this),i=0;i<e.length;i+=1){var n;try{n=e[i].cssRules}catch(e){return}if(!n)return;for(var r=0;r<n.length;r+=1){if(n[r].media)this.window.matchMedia(n[r].media.mediaText).addListener(t)}}}resizeObservers(){this.observer=new ResizeObserver(e=>{requestAnimationFrame(this.resizeCheck.bind(this))}),this.observer.observe(this.document.documentElement)}mutationObservers(){this.observer=new MutationObserver(e=>{this.resizeCheck()});this.observer.observe(this.document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}imageLoadListeners(){for(var e,t=this.document.querySelectorAll("img"),i=0;i<t.length;i++)void 0!==(e=t[i]).naturalWidth&&0===e.naturalWidth&&(e.onload=this.expand.bind(this))}fontLoadListeners(){this.document&&this.document.fonts&&this.document.fonts.ready.then(function(){this.resizeCheck()}.bind(this))}root(){return this.document?this.document.documentElement:null}locationOf(e,t){var i,n={left:0,top:0};if(!this.document)return n;if(this.epubcfi.isCfiString(e)){let r=new o.a(e).toRange(this.document,t);if(r){try{if(!r.endContainer||r.startContainer==r.endContainer&&r.startOffset==r.endOffset){let e=r.startContainer.textContent.indexOf(" ",r.startOffset);-1==e&&(e=r.startContainer.textContent.length),r.setEnd(r.startContainer,e)}}catch(e){console.error("setting end offset to start container length failed",e)}if(r.startContainer.nodeType===Node.ELEMENT_NODE)i=r.startContainer.getBoundingClientRect(),n.left=i.left,n.top=i.top;else if(d){let e=r.startContainer,t=new Range;try{1===e.nodeType?i=e.getBoundingClientRect():r.startOffset+2<e.length?(t.setStart(e,r.startOffset),t.setEnd(e,r.startOffset+2),i=t.getBoundingClientRect()):r.startOffset-2>0?(t.setStart(e,r.startOffset-2),t.setEnd(e,r.startOffset),i=t.getBoundingClientRect()):i=e.parentNode.getBoundingClientRect()}catch(e){console.error(e,e.stack)}}else i=r.getBoundingClientRect()}}else if("string"==typeof e&&e.indexOf("#")>-1){let t=e.substring(e.indexOf("#")+1),n=this.document.getElementById(t);if(n)if(d){let e=new Range;e.selectNode(n),i=e.getBoundingClientRect()}else i=n.getBoundingClientRect()}return i&&(n.left=i.left,n.top=i.top),n}addStylesheet(e){return new Promise(function(t,i){var n,r=!1;this.document?(n=this.document.querySelector("link[href='"+e+"']"))?t(!0):((n=this.document.createElement("link")).type="text/css",n.rel="stylesheet",n.href=e,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout(()=>{t(!0)},1))},this.document.head.appendChild(n)):t(!1)}.bind(this))}_getStylesheetNode(e){var t;return e="epubjs-inserted-css-"+(e||""),!!this.document&&((t=this.document.getElementById(e))||((t=this.document.createElement("style")).id=e,this.document.head.appendChild(t)),t)}addStylesheetCss(e,t){return!(!this.document||!e)&&(this._getStylesheetNode(t).innerHTML=e,!0)}addStylesheetRules(e,t){var i;if(this.document&&e&&0!==e.length)if(i=this._getStylesheetNode(t).sheet,"[object Array]"===Object.prototype.toString.call(e))for(var n=0,r=e.length;n<r;n++){var s=1,o=e[n],a=e[n][0],l="";"[object Array]"===Object.prototype.toString.call(o[1][0])&&(o=o[1],s=0);for(var c=o.length;s<c;s++){var h=o[s];l+=h[0]+":"+h[1]+(h[2]?" !important":"")+";\n"}i.insertRule(a+"{"+l+"}",i.cssRules.length)}else{Object.keys(e).forEach(t=>{const n=e[t];if(Array.isArray(n))n.forEach(e=>{const n=Object.keys(e).map(t=>`${t}:${e[t]}`).join(";");i.insertRule(`${t}{${n}}`,i.cssRules.length)});else{const e=Object.keys(n).map(e=>`${e}:${n[e]}`).join(";");i.insertRule(`${t}{${e}}`,i.cssRules.length)}})}}addScript(e){return new Promise(function(t,i){var n,r=!1;this.document?((n=this.document.createElement("script")).type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout((function(){t(!0)}),1))},this.document.head.appendChild(n)):t(!1)}.bind(this))}addClass(e){var t;this.document&&(t=this.content||this.document.body)&&t.classList.add(e)}removeClass(e){var t;this.document&&(t=this.content||this.document.body)&&t.classList.remove(e)}addEventListeners(){this.document&&(this._triggerEvent=this.triggerEvent.bind(this),c.a.forEach((function(e){this.document.addEventListener(e,this._triggerEvent,{passive:!0})}),this))}removeEventListeners(){this.document&&(c.a.forEach((function(e){this.document.removeEventListener(e,this._triggerEvent,{passive:!0})}),this),this._triggerEvent=void 0)}triggerEvent(e){this.emit(e.type,e)}addSelectionListeners(){this.document&&(this._onSelectionChange=this.onSelectionChange.bind(this),this.document.addEventListener("selectionchange",this._onSelectionChange,{passive:!0}))}removeSelectionListeners(){this.document&&(this.document.removeEventListener("selectionchange",this._onSelectionChange,{passive:!0}),this._onSelectionChange=void 0)}onSelectionChange(e){this.selectionEndTimeout&&clearTimeout(this.selectionEndTimeout),this.selectionEndTimeout=setTimeout(function(){var e=this.window.getSelection();this.triggerSelectedEvent(e)}.bind(this),250)}triggerSelectedEvent(e){var t,i;e&&e.rangeCount>0&&((t=e.getRangeAt(0)).collapsed||(i=new o.a(t,this.cfiBase).toString(),this.emit(c.c.CONTENTS.SELECTED,i),this.emit(c.c.CONTENTS.SELECTED_RANGE,t)))}range(e,t){return new o.a(e).toRange(this.document,t)}cfiFromRange(e,t){return new o.a(e,this.cfiBase,t).toString()}cfiFromNode(e,t){return new o.a(e,this.cfiBase,t).toString()}map(e){return new a.a(e).section()}size(e,t){var i={scale:1,scalable:"no"};this.layoutStyle("scrolling"),e>=0&&(this.width(e),i.width=e,this.css("padding","0 "+e/12+"px")),t>=0&&(this.height(t),i.height=t),this.css("margin","0"),this.css("box-sizing","border-box"),this.viewport(i)}columns(e,t,i,n,r){let o=Object(s.prefixed)("column-axis"),a=Object(s.prefixed)("column-gap"),l=Object(s.prefixed)("column-width"),c=Object(s.prefixed)("column-fill"),h=0===this.writingMode().indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===r&&"horizontal"===h&&this.direction(r),this.width(e),this.height(t),this.viewport({width:e,height:t,scale:1,scalable:"no"}),this.css("overflow-y","hidden"),this.css("margin","0",!0),"vertical"===h?(this.css("padding-top",n/2+"px",!0),this.css("padding-bottom",n/2+"px",!0),this.css("padding-left","20px"),this.css("padding-right","20px"),this.css(o,"vertical")):(this.css("padding-top","20px"),this.css("padding-bottom","20px"),this.css("padding-left",n/2+"px",!0),this.css("padding-right",n/2+"px",!0),this.css(o,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(c,"auto"),this.css(a,n+"px"),this.css(l,i+"px"),this.css("-webkit-line-box-contain","block glyphs replaced")}scaler(e,t,i){var n="scale("+e+")",r="";this.css("transform-origin","top left"),(t>=0||i>=0)&&(r=" translate("+(t||0)+"px, "+(i||0)+"px )"),this.css("transform",n+r)}fit(e,t,i){var n=this.viewport(),r=parseInt(n.width),s=parseInt(n.height),o=e/r,a=t/s,l=o<a?o:a;if(this.layoutStyle("paginated"),this.width(r),this.height(s),this.overflow("hidden"),this.scaler(l,0,0),this.css("background-size",r*l+"px "+s*l+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var c=e-r*l;this.css("margin-left",c+"px")}}direction(e){this.documentElement&&(this.documentElement.style.direction=e)}mapPage(e,t,i,n,r){return new a.a(t,r).page(this,e,i,n)}linksHandler(){Object(l.c)(this.content,e=>{this.emit(c.c.CONTENTS.LINK_CLICKED,e)})}writingMode(e){let t=Object(s.prefixed)("writing-mode");return e&&this.documentElement&&(this.documentElement.style[t]=e),this.window.getComputedStyle(this.documentElement)[t]||""}layoutStyle(e){return e&&(this._layoutStyle=e,navigator.epubReadingSystem.layoutStyle=this._layoutStyle),this._layoutStyle||"paginated"}epubReadingSystem(e,t){return navigator.epubReadingSystem={name:e,version:t,layoutStyle:this.layoutStyle(),hasFeature:function(e){switch(e){case"dom-manipulation":case"layout-changes":case"touch-events":case"mouse-events":case"keyboard-events":return!0;case"spine-scripting":default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}r()(f.prototype),t.a=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Underline=t.Highlight=t.Mark=t.Pane=void 0;var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=o(i(49)),s=o(i(50));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.Pane=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;c(this,e),this.target=t,this.element=r.default.createElement("svg"),this.marks=[],this.element.style.position="absolute",this.element.setAttribute("pointer-events","none"),s.default.proxyMouse(this.target,this.marks),this.container=i,this.container.appendChild(this.element),this.render()}return n(e,[{key:"addMark",value:function(e){var t=r.default.createElement("g");return this.element.appendChild(t),e.bind(t,this.container),this.marks.push(e),e.render(),e}},{key:"removeMark",value:function(e){var t=this.marks.indexOf(e);if(-1!==t){var i=e.unbind();this.element.removeChild(i),this.marks.splice(t,1)}}},{key:"render",value:function(){var e,t,i,n;!function(e,t){e.style.setProperty("top",t.top+"px","important"),e.style.setProperty("left",t.left+"px","important"),e.style.setProperty("height",t.height+"px","important"),e.style.setProperty("width",t.width+"px","important")}(this.element,(e=this.target,t=this.container,i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),{top:n.top-i.top,left:n.left-i.left,height:e.scrollHeight,width:e.scrollWidth}));var r=!0,s=!1,o=void 0;try{for(var a,l=this.marks[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){a.value.render()}}catch(e){s=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(s)throw o}}}}]),e}();var h=t.Mark=function(){function e(){c(this,e),this.element=null}return n(e,[{key:"bind",value:function(e,t){this.element=e,this.container=t}},{key:"unbind",value:function(){var e=this.element;return this.element=null,e}},{key:"render",value:function(){}},{key:"dispatchEvent",value:function(e){this.element&&this.element.dispatchEvent(e)}},{key:"getBoundingClientRect",value:function(){return this.element.getBoundingClientRect()}},{key:"getClientRects",value:function(){for(var e=[],t=this.element.firstChild;t;)e.push(t.getBoundingClientRect()),t=t.nextSibling;return e}},{key:"filteredRanges",value:function(){var e=Array.from(this.range.getClientRects());return e.filter((function(t){for(var i=0;i<e.length;i++){if(e[i]===t)return!0;if(n=e[i],(r=t).right<=n.right&&r.left>=n.left&&r.top>=n.top&&r.bottom<=n.bottom)return!1}var n,r;return!0}))}}]),e}(),u=t.Highlight=function(e){function t(e,i,n,r){c(this,t);var s=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s.range=e,s.className=i,s.data=n||{},s.attributes=r||{},s}return l(t,e),n(t,[{key:"bind",value:function(e,i){for(var n in function e(t,i,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,i,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"bind",this).call(this,e,i),this.data)this.data.hasOwnProperty(n)&&(this.element.dataset[n]=this.data[n]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&this.element.setAttribute(n,this.attributes[n]);this.className&&this.element.classList.add(this.className)}},{key:"render",value:function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(var e=this.element.ownerDocument.createDocumentFragment(),t=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),s=0,o=t.length;s<o;s++){var a=t[s],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),e.appendChild(l)}this.element.appendChild(e)}}]),t}(h);t.Underline=function(e){function t(e,i,n,r){return c(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,n,r))}return l(t,e),n(t,[{key:"render",value:function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(var e=this.element.ownerDocument.createDocumentFragment(),t=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),s=0,o=t.length;s<o;s++){var a=t[s],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),l.setAttribute("fill","none");var c=r.default.createElement("line");c.setAttribute("x1",a.left-i.left+n.left),c.setAttribute("x2",a.left-i.left+n.left+a.width),c.setAttribute("y1",a.top-i.top+n.top+a.height-1),c.setAttribute("y2",a.top-i.top+n.top+a.height-1),c.setAttribute("stroke-width",1),c.setAttribute("stroke","black"),c.setAttribute("stroke-linecap","square"),e.appendChild(l),e.appendChild(c)}this.element.appendChild(e)}}]),t}(u)},function(e,t,i){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var r=n({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.freeze=n,t.MIME_TYPE=r,t.NAMESPACE=s},function(e,t,i){var n=i(25);t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=i(46).DOMParser},function(e,t,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(6),a=i(2),l=i(9),c=i(1);class h{constructor(e){this.settings=e,this.name=e.layout||"reflowable",this._spread="none"!==e.spread,this._minSpreadWidth=e.minSpreadWidth||800,this._evenSpreads=e.evenSpreads||!1,"scrolled"===e.flow||"scrolled-continuous"===e.flow||"scrolled-doc"===e.flow?this._flow="scrolled":this._flow="paginated",this.width=0,this.height=0,this.spreadWidth=0,this.delta=0,this.columnWidth=0,this.gap=0,this.divisor=1,this.props={name:this.name,spread:this._spread,flow:this._flow,width:0,height:0,spreadWidth:0,delta:0,columnWidth:0,gap:0,divisor:1}}flow(e){return void 0!==e&&(this._flow="scrolled"===e||"scrolled-continuous"===e||"scrolled-doc"===e?"scrolled":"paginated",this.update({flow:this._flow})),this._flow}spread(e,t){return e&&(this._spread="none"!==e,this.update({spread:this._spread})),t>=0&&(this._minSpreadWidth=t),this._spread}calculate(e,t,i){var n,r,s,o,a=1,l=i||0,c=e,h=t,u=Math.floor(c/12);a=this._spread&&c>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(l=u%2==0?u:u-1),"pre-paginated"===this.name&&(l=0),a>1?s=(n=c/a-l)+l:(n=c,s=c),"pre-paginated"===this.name&&a>1&&(c=n),r=n*a+l,o=c,this.width=c,this.height=h,this.spreadWidth=r,this.pageWidth=s,this.delta=o,this.columnWidth=n,this.gap=l,this.divisor=a,this.update({width:c,height:h,spreadWidth:r,pageWidth:s,delta:o,columnWidth:n,gap:l,divisor:a})}format(e,t,i){return"pre-paginated"===this.name?e.fit(this.columnWidth,this.height,t):"paginated"===this._flow?e.columns(this.width,this.height,this.columnWidth,this.gap,this.settings.direction):i&&"horizontal"===i?e.size(null,this.height):e.size(this.width,null)}count(e,t){let i,n;return"pre-paginated"===this.name?(i=1,n=1):"paginated"===this._flow?(t=t||this.delta,i=Math.ceil(e/t),n=i*this.divisor):(t=t||this.height,i=Math.ceil(e/t),n=i),{spreads:i,pages:n}}update(e){if(Object.keys(e).forEach(t=>{this.props[t]===e[t]&&delete e[t]}),Object.keys(e).length>0){let t=Object(s.extend)(this.props,e);this.emit(c.c.LAYOUT.UPDATED,t,e)}}}r()(h.prototype);var u=h,d=i(5);var f=class{constructor(e){this.rendition=e,this._themes={default:{rules:{},url:"",serialized:""}},this._overrides={},this._current="default",this._injected=[],this.rendition.hooks.content.register(this.inject.bind(this)),this.rendition.hooks.content.register(this.overrides.bind(this))}register(){if(0!==arguments.length)return 1===arguments.length&&"object"==typeof arguments[0]?this.registerThemes(arguments[0]):1===arguments.length&&"string"==typeof arguments[0]?this.default(arguments[0]):2===arguments.length&&"string"==typeof arguments[1]?this.registerUrl(arguments[0],arguments[1]):2===arguments.length&&"object"==typeof arguments[1]?this.registerRules(arguments[0],arguments[1]):void 0}default(e){if(e)return"string"==typeof e?this.registerUrl("default",e):"object"==typeof e?this.registerRules("default",e):void 0}registerThemes(e){for(var t in e)e.hasOwnProperty(t)&&("string"==typeof e[t]?this.registerUrl(t,e[t]):this.registerRules(t,e[t]))}registerCss(e,t){this._themes[e]={serialized:t},(this._injected[e]||"default"==e)&&this.update(e)}registerUrl(e,t){var i=new d.a(t);this._themes[e]={url:i.toString()},(this._injected[e]||"default"==e)&&this.update(e)}registerRules(e,t){this._themes[e]={rules:t},(this._injected[e]||"default"==e)&&this.update(e)}select(e){var t=this._current;this._current=e,this.update(e),this.rendition.getContents().forEach(i=>{i.removeClass(t),i.addClass(e)})}update(e){this.rendition.getContents().forEach(t=>{this.add(e,t)})}inject(e){var t,i=[],n=this._themes;for(var r in n)!n.hasOwnProperty(r)||r!==this._current&&"default"!==r||(((t=n[r]).rules&&Object.keys(t.rules).length>0||t.url&&-1===i.indexOf(t.url))&&this.add(r,e),this._injected.push(r));"default"!=this._current&&e.addClass(this._current)}add(e,t){var i=this._themes[e];i&&t&&(i.url?t.addStylesheet(i.url):i.serialized?(t.addStylesheetCss(i.serialized,e),i.injected=!0):i.rules&&(t.addStylesheetRules(i.rules,e),i.injected=!0))}override(e,t,i){var n=this.rendition.getContents();this._overrides[e]={value:t,priority:!0===i},n.forEach(t=>{t.css(e,this._overrides[e].value,this._overrides[e].priority)})}removeOverride(e){var t=this.rendition.getContents();delete this._overrides[e],t.forEach(t=>{t.css(e)})}overrides(e){var t=this._overrides;for(var i in t)t.hasOwnProperty(i)&&e.css(i,t[i].value,t[i].priority)}fontSize(e){this.override("font-size",e)}font(e){this.override("font-family",e,!0)}destroy(){this.rendition=void 0,this._themes=void 0,this._overrides=void 0,this._current=void 0,this._injected=void 0}};i(12);class p{constructor({type:e,cfiRange:t,data:i,sectionIndex:n,cb:r,className:s,styles:o}){this.type=e,this.cfiRange=t,this.data=i,this.sectionIndex=n,this.mark=void 0,this.cb=r,this.className=s,this.styles=o}update(e){this.data=e}attach(e){let t,{cfiRange:i,data:n,type:r,mark:s,cb:o,className:a,styles:l}=this;return"highlight"===r?t=e.highlight(i,n,o,a,l):"underline"===r?t=e.underline(i,n,o,a,l):"mark"===r&&(t=e.mark(i,n,o)),this.mark=t,this.emit(c.c.ANNOTATION.ATTACH,t),t}detach(e){let t,{cfiRange:i,type:n}=this;return e&&("highlight"===n?t=e.unhighlight(i):"underline"===n?t=e.ununderline(i):"mark"===n&&(t=e.unmark(i))),this.mark=void 0,this.emit(c.c.ANNOTATION.DETACH,t),t}text(){}}r()(p.prototype);var g=class{constructor(e){this.rendition=e,this.highlights=[],this.underlines=[],this.marks=[],this._annotations={},this._annotationsBySectionIndex={},this.rendition.hooks.render.register(this.inject.bind(this)),this.rendition.hooks.unloaded.register(this.clear.bind(this))}add(e,t,i,n,r,s){let o=encodeURI(t+e),l=new a.a(t).spinePos,c=new p({type:e,cfiRange:t,data:i,sectionIndex:l,cb:n,className:r,styles:s});return this._annotations[o]=c,l in this._annotationsBySectionIndex?this._annotationsBySectionIndex[l].push(o):this._annotationsBySectionIndex[l]=[o],this.rendition.views().forEach(e=>{c.sectionIndex===e.index&&c.attach(e)}),c}remove(e,t){let i=encodeURI(e+t);if(i in this._annotations){let e=this._annotations[i];if(t&&e.type!==t)return;this.rendition.views().forEach(t=>{this._removeFromAnnotationBySectionIndex(e.sectionIndex,i),e.sectionIndex===t.index&&e.detach(t)}),delete this._annotations[i]}}_removeFromAnnotationBySectionIndex(e,t){this._annotationsBySectionIndex[e]=this._annotationsAt(e).filter(e=>e!==t)}_annotationsAt(e){return this._annotationsBySectionIndex[e]}highlight(e,t,i,n,r){return this.add("highlight",e,t,i,n,r)}underline(e,t,i,n,r){return this.add("underline",e,t,i,n,r)}mark(e,t,i){return this.add("mark",e,t,i)}each(){return this._annotations.forEach.apply(this._annotations,arguments)}inject(e){let t=e.index;if(t in this._annotationsBySectionIndex){this._annotationsBySectionIndex[t].forEach(t=>{this._annotations[t].attach(e)})}}clear(e){let t=e.index;if(t in this._annotationsBySectionIndex){this._annotationsBySectionIndex[t].forEach(t=>{this._annotations[t].detach(e)})}}show(){}hide(){}},m=i(20),v=i(10),y=i(22);class b{constructor(e,t){this.settings=Object(s.extend)(this.settings||{},{width:null,height:null,ignoreClass:"",manager:"default",view:"iframe",flow:null,layout:null,spread:null,minSpreadWidth:800,stylesheet:null,resizeOnOrientationChange:!0,script:null,snap:!1,defaultDirection:"ltr",allowScriptedContent:!1,allowPopups:!1}),Object(s.extend)(this.settings,t),"object"==typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=e,this.hooks={},this.hooks.display=new o.a(this),this.hooks.serialize=new o.a(this),this.hooks.content=new o.a(this),this.hooks.unloaded=new o.a(this),this.hooks.layout=new o.a(this),this.hooks.render=new o.a(this),this.hooks.show=new o.a(this),this.hooks.content.register(this.handleLinks.bind(this)),this.hooks.content.register(this.passEvents.bind(this)),this.hooks.content.register(this.adjustImages.bind(this)),this.book.spine.hooks.content.register(this.injectIdentifier.bind(this)),this.settings.stylesheet&&this.book.spine.hooks.content.register(this.injectStylesheet.bind(this)),this.settings.script&&this.book.spine.hooks.content.register(this.injectScript.bind(this)),this.themes=new f(this),this.annotations=new g(this),this.epubcfi=new a.a,this.q=new l.a(this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new s.defer,this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(e){this.manager=e}requireManager(e){return"string"==typeof e&&"default"===e?v.a:"string"==typeof e&&"continuous"===e?y.a:e}requireView(e){return"string"==typeof e&&"iframe"===e?m.a:e}start(){switch(this.settings.layout||"pre-paginated"!==this.book.package.metadata.layout&&"true"!==this.book.displayOptions.fixedLayout||(this.settings.layout="pre-paginated"),this.book.package.metadata.spread){case"none":this.settings.spread="none";break;case"both":this.settings.spread=!0}this.manager||(this.ViewManager=this.requireManager(this.settings.manager),this.View=this.requireView(this.settings.view),this.manager=new this.ViewManager({view:this.View,queue:this.q,request:this.book.load.bind(this.book),settings:this.settings})),this.direction(this.book.package.metadata.direction||this.settings.defaultDirection),this.settings.globalLayoutProperties=this.determineLayoutProperties(this.book.package.metadata),this.flow(this.settings.globalLayoutProperties.flow),this.layout(this.settings.globalLayoutProperties),this.manager.on(c.c.MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(c.c.MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(c.c.MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(c.c.MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(c.c.MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(c.c.RENDITION.STARTED),this.starting.resolve()}attachTo(e){return this.q.enqueue(function(){this.manager.render(e,{width:this.settings.width,height:this.settings.height}),this.emit(c.c.RENDITION.ATTACHED)}.bind(this))}display(e){return this.displaying&&this.displaying.resolve(),this.q.enqueue(this._display,e)}_display(e){if(this.book){this.epubcfi.isCfiString(e);var t,i=new s.defer,n=i.promise;return this.displaying=i,this.book.locations.length()&&Object(s.isFloat)(e)&&(e=this.book.locations.cfiFromPercentage(parseFloat(e))),(t=this.book.spine.get(e))?(this.manager.display(t,e).then(()=>{i.resolve(t),this.displaying=void 0,this.emit(c.c.RENDITION.DISPLAYED,t),this.reportLocation()},e=>{this.emit(c.c.RENDITION.DISPLAY_ERROR,e)}),n):(i.reject(new Error("No Section Found")),n)}}afterDisplayed(e){e.on(c.c.VIEWS.MARK_CLICKED,(t,i)=>this.triggerMarkEvent(t,i,e.contents)),this.hooks.render.trigger(e,this).then(()=>{e.contents?this.hooks.content.trigger(e.contents,this).then(()=>{this.emit(c.c.RENDITION.RENDERED,e.section,e)}):this.emit(c.c.RENDITION.RENDERED,e.section,e)})}afterRemoved(e){this.hooks.unloaded.trigger(e,this).then(()=>{this.emit(c.c.RENDITION.REMOVED,e.section,e)})}onResized(e,t){this.emit(c.c.RENDITION.RESIZED,{width:e.width,height:e.height},t),this.location&&this.location.start&&this.display(t||this.location.start.cfi)}onOrientationChange(e){this.emit(c.c.RENDITION.ORIENTATION_CHANGE,e)}moveTo(e){this.manager.moveTo(e)}resize(e,t,i){e&&(this.settings.width=e),t&&(this.settings.height=t),this.manager.resize(e,t,i)}clear(){this.manager.clear()}next(){return this.q.enqueue(this.manager.next.bind(this.manager)).then(this.reportLocation.bind(this))}prev(){return this.q.enqueue(this.manager.prev.bind(this.manager)).then(this.reportLocation.bind(this))}determineLayoutProperties(e){var t=this.settings.layout||e.layout||"reflowable",i=this.settings.spread||e.spread||"auto",n=this.settings.orientation||e.orientation||"auto",r=this.settings.flow||e.flow||"auto",s=e.viewport||"",o=this.settings.minSpreadWidth||e.minSpreadWidth||800,a=this.settings.direction||e.direction||"ltr";return(0===this.settings.width||this.settings.width>0)&&(0===this.settings.height||this.settings.height),{layout:t,spread:i,orientation:n,flow:r,viewport:s,minSpreadWidth:o,direction:a}}flow(e){var t=e;"scrolled"!==e&&"scrolled-doc"!==e&&"scrolled-continuous"!==e||(t="scrolled"),"auto"!==e&&"paginated"!==e||(t="paginated"),this.settings.flow=e,this._layout&&this._layout.flow(t),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this.manager&&this.manager.updateFlow(t),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}layout(e){return e&&(this._layout=new u(e),this._layout.spread(e.spread,this.settings.minSpreadWidth),this._layout.on(c.c.LAYOUT.UPDATED,(e,t)=>{this.emit(c.c.RENDITION.LAYOUT,e,t)})),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this._layout}spread(e,t){this.settings.spread=e,t&&(this.settings.minSpreadWidth=t),this._layout&&this._layout.spread(e,t),this.manager&&this.manager.isRendered()&&this.manager.updateLayout()}direction(e){this.settings.direction=e||"ltr",this.manager&&this.manager.direction(this.settings.direction),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}reportLocation(){return this.q.enqueue(function(){requestAnimationFrame(function(){var e=this.manager.currentLocation();if(e&&e.then&&"function"==typeof e.then)e.then(function(e){let t=this.located(e);t&&t.start&&t.end&&(this.location=t,this.emit(c.c.RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(c.c.RENDITION.RELOCATED,this.location))}.bind(this));else if(e){let t=this.located(e);if(!t||!t.start||!t.end)return;this.location=t,this.emit(c.c.RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(c.c.RENDITION.RELOCATED,this.location)}}.bind(this))}.bind(this))}currentLocation(){var e=this.manager.currentLocation();if(e&&e.then&&"function"==typeof e.then)e.then(function(e){return this.located(e)}.bind(this));else if(e){return this.located(e)}}located(e){if(!e.length)return{};let t=e[0],i=e[e.length-1],n={start:{index:t.index,href:t.href,cfi:t.mapping.start,displayed:{page:t.pages[0]||1,total:t.totalPages}},end:{index:i.index,href:i.href,cfi:i.mapping.end,displayed:{page:i.pages[i.pages.length-1]||1,total:i.totalPages}}},r=this.book.locations.locationFromCfi(t.mapping.start),s=this.book.locations.locationFromCfi(i.mapping.end);null!=r&&(n.start.location=r,n.start.percentage=this.book.locations.percentageFromLocation(r)),null!=s&&(n.end.location=s,n.end.percentage=this.book.locations.percentageFromLocation(s));let o=this.book.pageList.pageFromCfi(t.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);return-1!=o&&(n.start.page=o),-1!=a&&(n.end.page=a),i.index===this.book.spine.last().index&&n.end.displayed.page>=n.end.displayed.total&&(n.atEnd=!0),t.index===this.book.spine.first().index&&1===n.start.displayed.page&&(n.atStart=!0),n}destroy(){this.manager&&this.manager.destroy(),this.book=void 0}passEvents(e){c.a.forEach(t=>{e.on(t,t=>this.triggerViewEvent(t,e))}),e.on(c.c.CONTENTS.SELECTED,t=>this.triggerSelectedEvent(t,e))}triggerViewEvent(e,t){this.emit(e.type,e,t)}triggerSelectedEvent(e,t){this.emit(c.c.RENDITION.SELECTED,e,t)}triggerMarkEvent(e,t,i){this.emit(c.c.RENDITION.MARK_CLICKED,e,t,i)}getRange(e,t){var i=new a.a(e),n=this.manager.visible().filter((function(e){if(i.spinePos===e.index)return!0}));if(n.length)return n[0].contents.range(i,t)}adjustImages(e){if("pre-paginated"===this._layout.name)return new Promise((function(e){e()}));let t=e.window.getComputedStyle(e.content,null),i=.95*(e.content.offsetHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom))),n=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight);return e.addStylesheetRules({img:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","object-fit":"contain","page-break-inside":"avoid","break-inside":"avoid","box-sizing":"border-box"},svg:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","page-break-inside":"avoid","break-inside":"avoid"}}),new Promise((function(e,t){setTimeout((function(){e()}),1)}))}getContents(){return this.manager?this.manager.getContents():[]}views(){return(this.manager?this.manager.views:void 0)||[]}handleLinks(e){e&&e.on(c.c.CONTENTS.LINK_CLICKED,e=>{let t=this.book.path.relative(e);this.display(t)})}injectStylesheet(e,t){let i=e.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",this.settings.stylesheet),e.getElementsByTagName("head")[0].appendChild(i)}injectScript(e,t){let i=e.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",this.settings.script),i.textContent=" ",e.getElementsByTagName("head")[0].appendChild(i)}injectIdentifier(e,t){let i=this.book.packaging.metadata.identifier,n=e.createElement("meta");n.setAttribute("name","dc.relation.ispartof"),i&&n.setAttribute("content",i),e.getElementsByTagName("head")[0].appendChild(n)}}r()(b.prototype);t.a=b},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";var n=i(38)();e.exports=function(e){return e!==n&&null!==e}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(2),a=i(12),l=i(1),c=i(13);class h{constructor(e,t){this.settings=Object(s.extend)({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1,allowScriptedContent:!1,allowPopups:!1},t||{}),this.id="epubjs-view-"+Object(s.uuid)(),this.section=e,this.index=e.index,this.element=this.container(this.settings.axis),this.added=!1,this.displayed=!1,this.rendered=!1,this.fixedWidth=0,this.fixedHeight=0,this.epubcfi=new o.a,this.layout=this.settings.layout,this.pane=void 0,this.highlights={},this.underlines={},this.marks={}}container(e){var t=document.createElement("div");return t.classList.add("epub-view"),t.style.height="0px",t.style.width="0px",t.style.overflow="hidden",t.style.position="relative",t.style.display="block",t.style.flex=e&&"horizontal"==e?"none":"initial",t}create(){return this.iframe||(this.element||(this.element=this.createContainer()),this.iframe=document.createElement("iframe"),this.iframe.id=this.id,this.iframe.scrolling="no",this.iframe.style.overflow="hidden",this.iframe.seamless="seamless",this.iframe.style.border="none",this.iframe.sandbox="allow-same-origin",this.settings.allowScriptedContent&&(this.iframe.sandbox+=" allow-scripts"),this.settings.allowPopups&&(this.iframe.sandbox+=" allow-popups"),this.iframe.setAttribute("enable-annotation","true"),this.resizing=!0,this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this.element.setAttribute("ref",this.index),this.added=!0,this.elementBounds=Object(s.bounds)(this.element),"srcdoc"in this.iframe?this.supportsSrcdoc=!0:this.supportsSrcdoc=!1,this.settings.method||(this.settings.method=this.supportsSrcdoc?"srcdoc":"write")),this.iframe}render(e,t){return this.create(),this.size(),this.sectionRender||(this.sectionRender=this.section.render(e)),this.sectionRender.then(function(e){return this.load(e)}.bind(this)).then(function(){let e,t=this.contents.writingMode();return e="scrolled"===this.settings.flow?0===t.indexOf("vertical")?"horizontal":"vertical":0===t.indexOf("vertical")?"vertical":"horizontal",0===t.indexOf("vertical")&&"paginated"===this.settings.flow&&(this.layout.delta=this.layout.height),this.setAxis(e),this.emit(l.c.VIEWS.AXIS,e),this.setWritingMode(t),this.emit(l.c.VIEWS.WRITING_MODE,t),this.layout.format(this.contents,this.section,this.axis),this.addListeners(),new Promise((e,t)=>{this.expand(),this.settings.forceRight&&(this.element.style.marginLeft=this.width()+"px"),e()})}.bind(this),function(e){return this.emit(l.c.VIEWS.LOAD_ERROR,e),new Promise((t,i)=>{i(e)})}.bind(this)).then(function(){this.emit(l.c.VIEWS.RENDERED,this.section)}.bind(this))}reset(){this.iframe&&(this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this._textWidth=void 0,this._contentWidth=void 0,this._textHeight=void 0,this._contentHeight=void 0),this._needsReframe=!0}size(e,t){var i=e||this.settings.width,n=t||this.settings.height;"pre-paginated"===this.layout.name?this.lock("both",i,n):"horizontal"===this.settings.axis?this.lock("height",i,n):this.lock("width",i,n),this.settings.width=i,this.settings.height=n}lock(e,t,i){var n,r=Object(s.borders)(this.element);n=this.iframe?Object(s.borders)(this.iframe):{width:0,height:0},"width"==e&&Object(s.isNumber)(t)&&(this.lockedWidth=t-r.width-n.width),"height"==e&&Object(s.isNumber)(i)&&(this.lockedHeight=i-r.height-n.height),"both"===e&&Object(s.isNumber)(t)&&Object(s.isNumber)(i)&&(this.lockedWidth=t-r.width-n.width,this.lockedHeight=i-r.height-n.height),this.displayed&&this.iframe&&this.expand()}expand(e){var t,i=this.lockedWidth,n=this.lockedHeight;this.iframe&&!this._expanding&&(this._expanding=!0,"pre-paginated"===this.layout.name?(i=this.layout.columnWidth,n=this.layout.height):"horizontal"===this.settings.axis?((i=this.contents.textWidth())%this.layout.pageWidth>0&&(i=Math.ceil(i/this.layout.pageWidth)*this.layout.pageWidth),this.settings.forceEvenPages&&(t=i/this.layout.pageWidth,this.layout.divisor>1&&"reflowable"===this.layout.name&&t%2>0&&(i+=this.layout.pageWidth))):"vertical"===this.settings.axis&&(n=this.contents.textHeight(),"paginated"===this.settings.flow&&n%this.layout.height>0&&(n=Math.ceil(n/this.layout.height)*this.layout.height)),(this._needsReframe||i!=this._width||n!=this._height)&&this.reframe(i,n),this._expanding=!1)}reframe(e,t){var i;Object(s.isNumber)(e)&&(this.element.style.width=e+"px",this.iframe.style.width=e+"px",this._width=e),Object(s.isNumber)(t)&&(this.element.style.height=t+"px",this.iframe.style.height=t+"px",this._height=t),i={width:e,height:t,widthDelta:this.prevBounds?e-this.prevBounds.width:e,heightDelta:this.prevBounds?t-this.prevBounds.height:t},this.pane&&this.pane.render(),requestAnimationFrame(()=>{let e;for(let t in this.marks)this.marks.hasOwnProperty(t)&&(e=this.marks[t],this.placeMark(e.element,e.range))}),this.onResize(this,i),this.emit(l.c.VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=Object(s.bounds)(this.element)}load(e){var t=new s.defer,i=t.promise;if(!this.iframe)return t.reject(new Error("No Iframe Available")),i;if(this.iframe.onload=function(e){this.onLoad(e,t)}.bind(this),"blobUrl"===this.settings.method)this.blobUrl=Object(s.createBlobUrl)(e,"application/xhtml+xml"),this.iframe.src=this.blobUrl,this.element.appendChild(this.iframe);else if("srcdoc"===this.settings.method)this.iframe.srcdoc=e,this.element.appendChild(this.iframe);else{if(this.element.appendChild(this.iframe),this.document=this.iframe.contentDocument,!this.document)return t.reject(new Error("No Document Available")),i;if(this.iframe.contentDocument.open(),window.MSApp&&MSApp.execUnsafeLocalFunction){var n=this;MSApp.execUnsafeLocalFunction((function(){n.iframe.contentDocument.write(e)}))}else this.iframe.contentDocument.write(e);this.iframe.contentDocument.close()}return i}onLoad(e,t){this.window=this.iframe.contentWindow,this.document=this.iframe.contentDocument,this.contents=new a.a(this.document,this.document.body,this.section.cfiBase,this.section.index),this.rendering=!1;var i=this.document.querySelector("link[rel='canonical']");i?i.setAttribute("href",this.section.canonical):((i=this.document.createElement("link")).setAttribute("rel","canonical"),i.setAttribute("href",this.section.canonical),this.document.querySelector("head").appendChild(i)),this.contents.on(l.c.CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(l.c.CONTENTS.RESIZE,e=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),t.resolve(this.contents)}setLayout(e){this.layout=e,this.contents&&(this.layout.format(this.contents),this.expand())}setAxis(e){this.settings.axis=e,this.element.style.flex="horizontal"==e?"none":"initial",this.size()}setWritingMode(e){this.writingMode=e}addListeners(){}removeListeners(e){}display(e){var t=new s.defer;return this.displayed?t.resolve(this):this.render(e).then(function(){this.emit(l.c.VIEWS.DISPLAYED,this),this.onDisplayed(this),this.displayed=!0,t.resolve(this)}.bind(this),(function(e){t.reject(e,this)})),t.promise}show(){this.element.style.visibility="visible",this.iframe&&(this.iframe.style.visibility="visible",this.iframe.style.transform="translateZ(0)",this.iframe.offsetWidth,this.iframe.style.transform=null),this.emit(l.c.VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(l.c.VIEWS.HIDDEN,this)}offset(){return{top:this.element.offsetTop,left:this.element.offsetLeft}}width(){return this._width}height(){return this._height}position(){return this.element.getBoundingClientRect()}locationOf(e){this.iframe.getBoundingClientRect();var t=this.contents.locationOf(e,this.settings.ignoreClass);return{left:t.left,top:t.top}}onDisplayed(e){}onResize(e,t){}bounds(e){return!e&&this.elementBounds||(this.elementBounds=Object(s.bounds)(this.element)),this.elementBounds}highlight(e,t={},i,n="epubjs-hl",r={}){if(!this.contents)return;const s=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(e),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,e,t)};t.epubcfi=e,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Highlight(o,n,t,s),u=this.pane.addMark(h);return this.highlights[e]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}underline(e,t={},i,n="epubjs-ul",r={}){if(!this.contents)return;const s=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(e),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,e,t)};t.epubcfi=e,this.pane||(this.pane=new c.Pane(this.iframe,this.element));let h=new c.Underline(o,n,t,s),u=this.pane.addMark(h);return this.underlines[e]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}mark(e,t={},i){if(!this.contents)return;if(e in this.marks){return this.marks[e]}let n=this.contents.range(e);if(!n)return;let r=n.commonAncestorContainer,s=1===r.nodeType?r:r.parentNode,o=i=>{this.emit(l.c.VIEWS.MARK_CLICKED,e,t)};n.collapsed&&1===r.nodeType?(n=new Range,n.selectNodeContents(r)):n.collapsed&&(n=new Range,n.selectNodeContents(s));let a=this.document.createElement("a");return a.setAttribute("ref","epubjs-mk"),a.style.position="absolute",a.dataset.epubcfi=e,t&&Object.keys(t).forEach(e=>{a.dataset[e]=t[e]}),i&&(a.addEventListener("click",i),a.addEventListener("touchstart",i)),a.addEventListener("click",o),a.addEventListener("touchstart",o),this.placeMark(a,n),this.element.appendChild(a),this.marks[e]={element:a,range:n,listeners:[o,i]},s}placeMark(e,t){let i,n,r;if("pre-paginated"===this.layout.name||"horizontal"!==this.settings.axis){let e=t.getBoundingClientRect();i=e.top,n=e.right}else{let e,o=t.getClientRects();for(var s=0;s!=o.length;s++)e=o[s],(!r||e.left<r)&&(r=e.left,n=Math.ceil(r/this.layout.props.pageWidth)*this.layout.props.pageWidth-this.layout.gap/2,i=e.top)}e.style.top=i+"px",e.style.left=n+"px"}unhighlight(e){let t;e in this.highlights&&(t=this.highlights[e],this.pane.removeMark(t.mark),t.listeners.forEach(e=>{e&&(t.element.removeEventListener("click",e),t.element.removeEventListener("touchstart",e))}),delete this.highlights[e])}ununderline(e){let t;e in this.underlines&&(t=this.underlines[e],this.pane.removeMark(t.mark),t.listeners.forEach(e=>{e&&(t.element.removeEventListener("click",e),t.element.removeEventListener("touchstart",e))}),delete this.underlines[e])}unmark(e){let t;e in this.marks&&(t=this.marks[e],this.element.removeChild(t.element),t.listeners.forEach(e=>{e&&(t.element.removeEventListener("click",e),t.element.removeEventListener("touchstart",e))}),delete this.marks[e])}destroy(){for(let e in this.highlights)this.unhighlight(e);for(let e in this.underlines)this.ununderline(e);for(let e in this.marks)this.unmark(e);this.blobUrl&&Object(s.revokeBlobUrl)(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.pane&&(this.pane.element.remove(),this.pane=void 0),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}r()(h.prototype),t.a=h},function(e,t,i){var n=i(19),r=i(51),s=i(53),o=Math.max,a=Math.min;e.exports=function(e,t,i){var l,c,h,u,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var i=l,n=c;return l=c=void 0,p=t,u=e.apply(n,i)}function b(e){return p=e,d=setTimeout(x,t),g?y(e):u}function w(e){var i=e-f;return void 0===f||i>=t||i<0||m&&e-p>=h}function x(){var e=r();if(w(e))return _(e);d=setTimeout(x,function(e){var i=t-(e-f);return m?a(i,h-(e-p)):i}(e))}function _(e){return d=void 0,v&&l?y(e):(l=c=void 0,u)}function E(){var e=r(),i=w(e);if(l=arguments,c=this,f=e,i){if(void 0===d)return b(f);if(m)return clearTimeout(d),d=setTimeout(x,t),y(f)}return void 0===d&&(d=setTimeout(x,t)),u}return t=s(t)||0,n(i)&&(g=!!i.leading,h=(m="maxWait"in i)?o(s(i.maxWait)||0,t):h,v="trailing"in i?!!i.trailing:v),E.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=c=d=void 0},E.flush=function(){return void 0===d?u:_(r())},E}},function(e,t,i){"use strict";var n=i(0),r=i(10),s=i(1),o=i(3),a=i.n(o);const l=Math.PI/2,c={easeOutSine:function(e){return Math.sin(e*l)},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2)},easeInCubic:function(e){return Math.pow(e,3)}};class h{constructor(e,t){this.settings=Object(n.extend)({duration:80,minVelocity:.2,minDistance:10,easing:c.easeInCubic},t||{}),this.supportsTouch=this.supportsTouch(),this.supportsTouch&&this.setup(e)}setup(e){this.manager=e,this.layout=this.manager.layout,this.fullsize=this.manager.settings.fullsize,this.fullsize?(this.element=this.manager.stage.element,this.scroller=window,this.disableScroll()):(this.element=this.manager.stage.container,this.scroller=this.element,this.element.style.WebkitOverflowScrolling="touch"),this.manager.settings.offset=this.layout.width,this.manager.settings.afterScrolledTimeout=2*this.settings.duration,this.isVertical="vertical"===this.manager.settings.axis,this.manager.isPaginated&&!this.isVertical&&(this.touchCanceler=!1,this.resizeCanceler=!1,this.snapping=!1,this.scrollLeft,this.scrollTop,this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0,this.addListeners())}supportsTouch(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}disableScroll(){this.element.style.overflow="hidden"}enableScroll(){this.element.style.overflow=""}addListeners(){this._onResize=this.onResize.bind(this),window.addEventListener("resize",this._onResize),this._onScroll=this.onScroll.bind(this),this.scroller.addEventListener("scroll",this._onScroll),this._onTouchStart=this.onTouchStart.bind(this),this.scroller.addEventListener("touchstart",this._onTouchStart,{passive:!0}),this.on("touchstart",this._onTouchStart),this._onTouchMove=this.onTouchMove.bind(this),this.scroller.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.on("touchmove",this._onTouchMove),this._onTouchEnd=this.onTouchEnd.bind(this),this.scroller.addEventListener("touchend",this._onTouchEnd,{passive:!0}),this.on("touchend",this._onTouchEnd),this._afterDisplayed=this.afterDisplayed.bind(this),this.manager.on(s.c.MANAGERS.ADDED,this._afterDisplayed)}removeListeners(){window.removeEventListener("resize",this._onResize),this._onResize=void 0,this.scroller.removeEventListener("scroll",this._onScroll),this._onScroll=void 0,this.scroller.removeEventListener("touchstart",this._onTouchStart,{passive:!0}),this.off("touchstart",this._onTouchStart),this._onTouchStart=void 0,this.scroller.removeEventListener("touchmove",this._onTouchMove,{passive:!0}),this.off("touchmove",this._onTouchMove),this._onTouchMove=void 0,this.scroller.removeEventListener("touchend",this._onTouchEnd,{passive:!0}),this.off("touchend",this._onTouchEnd),this._onTouchEnd=void 0,this.manager.off(s.c.MANAGERS.ADDED,this._afterDisplayed),this._afterDisplayed=void 0}afterDisplayed(e){let t=e.contents;["touchstart","touchmove","touchend"].forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))})}triggerViewEvent(e,t){this.emit(e.type,e,t)}onScroll(e){this.scrollLeft=this.fullsize?window.scrollX:this.scroller.scrollLeft,this.scrollTop=this.fullsize?window.scrollY:this.scroller.scrollTop}onResize(e){this.resizeCanceler=!0}onTouchStart(e){let{screenX:t,screenY:i}=e.touches[0];this.fullsize&&this.enableScroll(),this.touchCanceler=!0,this.startTouchX||(this.startTouchX=t,this.startTouchY=i,this.startTime=this.now()),this.endTouchX=t,this.endTouchY=i,this.endTime=this.now()}onTouchMove(e){let{screenX:t,screenY:i}=e.touches[0],n=Math.abs(i-this.endTouchY);this.touchCanceler=!0,!this.fullsize&&n<10&&(this.element.scrollLeft-=t-this.endTouchX),this.endTouchX=t,this.endTouchY=i,this.endTime=this.now()}onTouchEnd(e){this.fullsize&&this.disableScroll(),this.touchCanceler=!1;let t=this.wasSwiped();0!==t?this.snap(t):this.snap(),this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0}wasSwiped(){let e=this.layout.pageWidth*this.layout.divisor,t=this.endTouchX-this.startTouchX,i=Math.abs(t),n=t/(this.endTime-this.startTime),r=this.settings.minVelocity;return i<=this.settings.minDistance||i>=e?0:n>r?-1:n<-r?1:void 0}needsSnap(){return this.scrollLeft%(this.layout.pageWidth*this.layout.divisor)!=0}snap(e=0){let t=this.scrollLeft,i=this.layout.pageWidth*this.layout.divisor,n=Math.round(t/i)*i;return e&&(n+=e*i),this.smoothScrollTo(n)}smoothScrollTo(e){const t=new n.defer,i=this.scrollLeft,r=this.now(),s=this.settings.duration,o=this.settings.easing;return this.snapping=!0,function n(){const a=this.now(),l=Math.min(1,(a-r)/s);if(o(l),this.touchCanceler||this.resizeCanceler)return this.resizeCanceler=!1,this.snapping=!1,void t.resolve();l<1?(window.requestAnimationFrame(n.bind(this)),this.scrollTo(i+(e-i)*l,0)):(this.scrollTo(e,0),this.snapping=!1,t.resolve())}.call(this),t.promise}scrollTo(e=0,t=0){this.fullsize?window.scroll(e,t):(this.scroller.scrollLeft=e,this.scroller.scrollTop=t)}now(){return"now"in window.performance?performance.now():(new Date).getTime()}destroy(){this.scroller&&(this.fullsize&&this.enableScroll(),this.removeListeners(),this.scroller=void 0)}}a()(h.prototype);var u=h,d=i(21),f=i.n(d);class p extends r.a{constructor(e){super(e),this.name="continuous",this.settings=Object(n.extend)(this.settings||{},{infinite:!0,overflow:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",offset:500,offsetDelta:250,width:void 0,height:void 0,snap:!1,afterScrolledTimeout:10,allowScriptedContent:!1,allowPopups:!1}),Object(n.extend)(this.settings,e.settings||{}),"undefined"!=e.settings.gap&&0===e.settings.gap&&(this.settings.gap=e.settings.gap),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,width:0,height:0,forceEvenPages:!1,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.scrollTop=0,this.scrollLeft=0}display(e,t){return r.a.prototype.display.call(this,e,t).then(function(){return this.fill()}.bind(this))}fill(e){var t=e||new n.defer;return this.q.enqueue(()=>this.check()).then(e=>{e?this.fill(t):t.resolve()}),t.promise}moveTo(e){var t=0,i=0;this.isPaginated?(t=Math.floor(e.left/this.layout.delta)*this.layout.delta,this.settings.offsetDelta):(i=e.top,e.top,this.settings.offsetDelta),(t>0||i>0)&&this.scrollBy(t,i,!0)}afterResized(e){this.emit(s.c.MANAGERS.RESIZE,e.section)}removeShownListeners(e){e.onDisplayed=function(){}}add(e){var t=this.createView(e);return this.views.append(t),t.on(s.c.VIEWS.RESIZED,e=>{t.expanded=!0}),t.on(s.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),t.on(s.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),t.onDisplayed=this.afterDisplayed.bind(this),t.onResize=this.afterResized.bind(this),t.display(this.request)}append(e){var t=this.createView(e);return t.on(s.c.VIEWS.RESIZED,e=>{t.expanded=!0}),t.on(s.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),t.on(s.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),this.views.append(t),t.onDisplayed=this.afterDisplayed.bind(this),t}prepend(e){var t=this.createView(e);return t.on(s.c.VIEWS.RESIZED,e=>{this.counter(e),t.expanded=!0}),t.on(s.c.VIEWS.AXIS,e=>{this.updateAxis(e)}),t.on(s.c.VIEWS.WRITING_MODE,e=>{this.updateWritingMode(e)}),this.views.prepend(t),t.onDisplayed=this.afterDisplayed.bind(this),t}counter(e){"vertical"===this.settings.axis?this.scrollBy(0,e.heightDelta,!0):this.scrollBy(e.widthDelta,0,!0)}update(e){for(var t,i=this.bounds(),r=this.views.all(),s=r.length,o=[],a=void 0!==e?e:this.settings.offset||0,l=new n.defer,c=[],h=0;h<s;h++)if(t=r[h],!0===this.isVisible(t,a,a,i)){if(t.displayed)t.show();else{let e=t.display(this.request).then((function(e){e.show()}),e=>{t.hide()});c.push(e)}o.push(t)}else this.q.enqueue(t.destroy.bind(t)),clearTimeout(this.trimTimeout),this.trimTimeout=setTimeout(function(){this.q.enqueue(this.trim.bind(this))}.bind(this),250);return c.length?Promise.all(c).catch(e=>{l.reject(e)}):(l.resolve(),l.promise)}check(e,t){var i=new n.defer,r=[],s="horizontal"===this.settings.axis,o=this.settings.offset||0;e&&s&&(o=e),t&&!s&&(o=t);var a=this._bounds;let l=s?this.scrollLeft:this.scrollTop,c=s?Math.floor(a.width):a.height,h=s?this.container.scrollWidth:this.container.scrollHeight,u=this.writingMode&&0===this.writingMode.indexOf("vertical")?"vertical":"horizontal",d=this.settings.rtlScrollType,f="rtl"===this.settings.direction;this.settings.fullsize?(s&&f&&"negative"===d||!s&&f&&"default"===d)&&(l*=-1):(f&&"default"===d&&"horizontal"===u&&(l=h-c-l),f&&"negative"===d&&"horizontal"===u&&(l*=-1));let p=()=>{let e=this.views.first(),t=e&&e.section.prev();t&&r.push(this.prepend(t))},g=l-o;l+c+o>=h&&(()=>{let e=this.views.last(),t=e&&e.section.next();t&&r.push(this.append(t))})(),g<0&&p();let m=r.map(e=>e.display(this.request));return r.length?Promise.all(m).then(()=>this.check()).then(()=>this.update(o),e=>e):(this.q.enqueue(function(){this.update()}.bind(this)),i.resolve(!1),i.promise)}trim(){for(var e=new n.defer,t=this.views.displayed(),i=t[0],r=t[t.length-1],s=this.views.indexOf(i),o=this.views.indexOf(r),a=this.views.slice(0,s),l=this.views.slice(o+1),c=0;c<a.length-1;c++)this.erase(a[c],a);for(var h=1;h<l.length;h++)this.erase(l[h]);return e.resolve(),e.promise}erase(e,t){var i,n;this.settings.fullsize?(i=window.scrollY,n=window.scrollX):(i=this.container.scrollTop,n=this.container.scrollLeft);var r=e.bounds();this.views.remove(e),t&&("vertical"===this.settings.axis?this.scrollTo(0,i-r.height,!0):"rtl"===this.settings.direction?this.settings.fullsize?this.scrollTo(n+Math.floor(r.width),0,!0):this.scrollTo(n,0,!0):this.scrollTo(n-Math.floor(r.width),0,!0))}addEventListeners(e){window.addEventListener("unload",function(e){this.ignore=!0,this.destroy()}.bind(this)),this.addScrollListeners(),this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}addScrollListeners(){var e;this.tick=n.requestAnimationFrame;let t="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.scrollDeltaVert=0,this.scrollDeltaHorz=0,this.settings.fullsize?(e=window,this.scrollTop=window.scrollY*t,this.scrollLeft=window.scrollX*t):(e=this.container,this.scrollTop=this.container.scrollTop,this.scrollLeft=this.container.scrollLeft),this._onScroll=this.onScroll.bind(this),e.addEventListener("scroll",this._onScroll),this._scrolled=f()(this.scrolled.bind(this),30),this.didScroll=!1}removeEventListeners(){(this.settings.fullsize?window:this.container).removeEventListener("scroll",this._onScroll),this._onScroll=void 0}onScroll(){let e,t,i="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.settings.fullsize?(e=window.scrollY*i,t=window.scrollX*i):(e=this.container.scrollTop,t=this.container.scrollLeft),this.scrollTop=e,this.scrollLeft=t,this.ignore?this.ignore=!1:this._scrolled(),this.scrollDeltaVert+=Math.abs(e-this.prevScrollTop),this.scrollDeltaHorz+=Math.abs(t-this.prevScrollLeft),this.prevScrollTop=e,this.prevScrollLeft=t,clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(function(){this.scrollDeltaVert=0,this.scrollDeltaHorz=0}.bind(this),150),clearTimeout(this.afterScrolled),this.didScroll=!1}scrolled(){this.q.enqueue(function(){return this.check()}.bind(this)),this.emit(s.c.MANAGERS.SCROLL,{top:this.scrollTop,left:this.scrollLeft}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.snapper&&this.snapper.supportsTouch&&this.snapper.needsSnap()||this.emit(s.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),this.settings.afterScrolledTimeout)}next(){let e="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(e,0,!0):this.scrollBy(0,this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}prev(){let e="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(-e,0,!0):this.scrollBy(0,-this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}updateFlow(e){this.rendered&&this.snapper&&(this.snapper.destroy(),this.snapper=void 0),super.updateFlow(e,"scroll"),this.rendered&&this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}destroy(){super.destroy(),this.snapper&&this.snapper.destroy()}}t.a=p},function(e,t,i){(function(t){e.exports=function e(t,i,n){function r(o,a){if(!i[o]){if(!t[o]){if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[o]={exports:{}};t[o][0].call(c.exports,(function(e){var i=t[o][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[o].exports}for(var s=!1,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,i,n){(function(e){"use strict";var t,n,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var s=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),t=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,t=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;n=!0;for(var i=c.length;i;){for(t=c,c=[],e=-1;++e<i;)t[e]();i=c.length}n=!1}i.exports=function(e){1!==c.push(e)||n||t()}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,i){"use strict";var n=e(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function h(e,t,i){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(e,t,i){n((function(){var n;try{n=t(i)}catch(t){return s.reject(e,t)}n===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,n)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var i=!1;function n(t){i||(i=!0,s.reject(e,t))}function r(t){i||(i=!0,s.resolve(e,t))}var o=p((function(){t(r,n)}));"error"===o.status&&n(o.value)}function p(e,t){var i={};try{i.value=e(t),i.status="success"}catch(e){i.status="error",i.value=e}return i}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?e:t,this.outcome):this.queue.push(new h(i,e,t)),i},h.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){s.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},s.resolve=function(e,t){var i=p(d,t);if("error"===i.status)return s.reject(e,i.value);var n=i.value;if(n)f(e,n);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var i=-1,n=e.queue.length;++i<n;)e.queue[i].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:s.resolve(new this(r),e)},c.reject=function(e){var t=new this(r);return s.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,c=new this(r);++l<i;)h(e[l],l);return c;function h(e,r){t.resolve(e).then((function(e){o[r]=e,++a!==i||n||(n=!0,s.resolve(c,o))}),(function(e){n||(n=!0,s.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);for(var o,a=-1,l=new this(r);++a<i;)o=e[a],t.resolve(o).then((function(e){n||(n=!0,s.resolve(l,e))}),(function(e){n||(n=!0,s.reject(l,e))}));return l}},{1:1}],3:[function(e,i,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function s(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)i.append(e[n]);return i.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var o=Promise;function a(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function l(e,t,i){"function"==typeof t&&e.then(t),"function"==typeof i&&e.catch(i)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(e){return"boolean"==typeof u?o.resolve(u):function(e){return new o((function(t){var i=e.transaction("local-forage-detect-blob-support","readwrite"),n=s([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},i.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);t(i||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return u=e}))}function g(e){var t=d[e.name],i={};i.promise=new o((function(e,t){i.resolve=e,i.reject=t})),t.deferredOperations.push(i),t.dbReady?t.dbReady=t.dbReady.then((function(){return i.promise})):t.dbReady=i.promise}function m(e){var t=d[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function v(e,t){var i=d[e.name].deferredOperations.pop();if(i)return i.reject(t),i.promise}function y(e,t){return new o((function(i,n){if(d[e.name]=d[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return i(e.db);g(e),e.db.close()}var s=[e.name];t&&s.push(e.version);var o=r.open.apply(r,s);t&&(o.onupgradeneeded=function(t){var i=o.result;try{i.createObjectStore(e.storeName),t.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),n(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},i(t),m(e)}}))}function b(e){return y(e,!1)}function w(e){return y(e,!0)}function x(e,t){if(!e.db)return!0;var i=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,r=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||i){if(i){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function _(e){return s([function(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;r++)n[r]=e.charCodeAt(r);return i}(atob(e.data))],{type:e.type})}function E(e){return e&&e.__local_forage_encoded_blob}function k(e){var t=this,i=t._initReady().then((function(){var e=d[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return l(i,e,e),i}function T(e,t,i,n){void 0===n&&(n=1);try{var r=e.db.transaction(e.storeName,t);i(null,r)}catch(r){if(n>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return o.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),w(e)})).then((function(){return function(e){g(e);for(var t=d[e.name],i=t.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,b(e).then((function(t){return e.db=t,x(e)?w(e):t})).then((function(n){e.db=t.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(t){throw v(e,t),t}))}(e).then((function(){T(e,t,i,n-1)}))})).catch(i);i(r)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,i={db:null};if(e)for(var n in e)i[n]=e[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=k);var s=[];function a(){return o.resolve()}for(var l=0;l<r.forages.length;l++){var c=r.forages[l];c!==t&&s.push(c._initReady().catch(a))}var h=r.forages.slice(0);return o.all(s).then((function(){return i.db=r.db,b(i)})).then((function(e){return i.db=e,x(i,t._defaultConfig.version)?w(i):e})).then((function(e){i.db=r.db=e,t._dbInfo=i;for(var n=0;n<h.length;n++){var s=h[n];s!==t&&(s._dbInfo.db=i.db,s._dbInfo.version=i.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var i=o.result;if(i){var n=i.value;E(n)&&(n=_(n));var r=e(n,i.key,a++);void 0!==r?t(r):i.continue()}else t()},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),E(e)&&(e=_(e)),t(e)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},setItem:function(e,t,i){var n=this;e=c(e);var r=new o((function(i,r){var s;n.ready().then((function(){return s=n._dbInfo,"[object Blob]"===f.call(t)?p(s.db).then((function(e){return e?t:(i=t,new o((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):t})).then((function(t){T(n._dbInfo,"readwrite",(function(s,o){if(s)return r(s);try{var a=o.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),i(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return a(r,i),r},removeItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readwrite",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).delete(e);s.oncomplete=function(){t()},s.onerror=function(){n(o.error)},s.onabort=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},clear:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},length:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).count();s.onsuccess=function(){e(s.result)},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},key:function(e,t){var i=this,n=new o((function(t,n){e<0?t(null):i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var i=l.result;i?0===e||a?t(i.key):(a=!0,i.advance(e)):t(null)},l.onerror=function(){n(l.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},keys:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var t=s.result;t?(o.push(t.key),t.continue()):e(o)},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},dropInstance:function(e,t){t=h.apply(this,arguments);var i=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||i.name,e.storeName=e.storeName||i.storeName);var n,s=this;if(e.name){var l=e.name===i.name&&s._dbInfo.db,c=l?o.resolve(s._dbInfo.db):b(e).then((function(t){var i=d[e.name],n=i.forages;i.db=t;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=t;return t}));n=e.storeName?c.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var i=t.version+1;g(e);var n=d[e.name],s=n.forages;t.close();for(var a=0;a<s.length;a++){var l=s[a];l._dbInfo.db=null,l._dbInfo.version=i}return new o((function(t,n){var s=r.open(e.name,i);s.onerror=function(e){s.result.close(),n(e)},s.onupgradeneeded=function(){s.result.deleteObjectStore(e.storeName)},s.onsuccess=function(){var e=s.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<s.length;t++){var i=s[t];i._dbInfo.db=e,m(i._dbInfo)}})).catch((function(t){throw(v(e,t)||o.resolve()).catch((function(){})),t}))}})):c.then((function(t){g(e);var i=d[e.name],n=i.forages;t.close();for(var s=0;s<n.length;s++)n[s]._dbInfo.db=null;return new o((function(t,i){var n=r.deleteDatabase(e.name);n.onerror=function(){var e=n.result;e&&e.close(),i(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){i.db=e;for(var t=0;t<n.length;t++)m(n[t]._dbInfo)})).catch((function(t){throw(v(e,t)||o.resolve()).catch((function(){})),t}))}))}else n=o.reject("Invalid arguments");return a(n,t),n}},C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=/^~~local_forage_type~([^~]+)~/,O="__lfsc__:".length,A=O+"arbf".length,I=Object.prototype.toString;function R(e){var t,i,n,r,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)i=C.indexOf(e[t]),n=C.indexOf(e[t+1]),r=C.indexOf(e[t+2]),s=C.indexOf(e[t+3]),h[l++]=i<<2|n>>4,h[l++]=(15&n)<<4|r>>2,h[l++]=(3&r)<<6|63&s;return c}function D(e){var t,i=new Uint8Array(e),n="";for(t=0;t<i.length;t+=3)n+=C[i[t]>>2],n+=C[(3&i[t])<<4|i[t+1]>>4],n+=C[(15&i[t+1])<<2|i[t+2]>>6],n+=C[63&i[t+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var j={serialize:function(e,t){var i="";if(e&&(i=I.call(e)),e&&("[object ArrayBuffer]"===i||e.buffer&&"[object ArrayBuffer]"===I.call(e.buffer))){var n,r="__lfsc__:";e instanceof ArrayBuffer?(n=e,r+="arbf"):(n=e.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(r+D(n))}else if("[object Blob]"===i){var s=new FileReader;s.onload=function(){var i="~~local_forage_type~"+e.type+"~"+D(this.result);t("__lfsc__:blob"+i)},s.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(i){console.error("Couldn't convert value into a JSON string: ",e),t(null,i)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,O))return JSON.parse(e);var t,i=e.substring(A),n=e.substring(O,A);if("blob"===n&&N.test(i)){var r=i.match(N);t=r[1],i=i.substring(r[0].length)}var o=R(i);switch(n){case"arbf":return o;case"blob":return s([o],{type:t});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:D};function z(e,t,i,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function L(e,t,i,n,r,s){e.executeSql(i,n,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?s(e,o):z(e,t,(function(){e.executeSql(i,n,r,s)}),s)}),s):s(e,o)}),s)}function B(e,t,i,n){var r=this;e=c(e);var s=new o((function(s,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(i){L(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){s(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void s(B.apply(r,[e,a,i,n-1]));o(t)}}))}))})).catch(o)}));return a(s,i),s}function P(e){return new o((function(t,i){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],s=0;s<n.rows.length;s++)r.push(n.rows.item(s).name);t({db:e,storeNames:r})}),(function(e,t){i(t)}))}),(function(e){i(e)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(e){var t=this,i={db:null};if(e)for(var n in e)i[n]="string"!=typeof e[n]?e[n].toString():e[n];var r=new o((function(e,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(e){return n(e)}i.db.transaction((function(r){z(r,i,(function(){t._dbInfo=i,e()}),(function(e,t){n(t)}))}),n)}));return i.serializer=j,r},_support:"function"==typeof openDatabase,iterate:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var s=n.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},setItem:function(e,t,i){return B.apply(this,[e,t,i,1])},removeItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},clear:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},length:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,i){var n=i.rows.item(0).c;e(n)}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},key:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,i){var n=i.rows.length?i.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},keys:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);e(n)}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},dropInstance:function(e,t){t=h.apply(this,arguments);var i=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||i.name,e.storeName=e.storeName||i.storeName);var n,r=this;return a(n=e.name?new o((function(t){var n;n=e.name===i.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(P(n))})).then((function(e){return new o((function(t,i){e.db.transaction((function(n){function r(e){return new o((function(t,i){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){i(t)}))}))}for(var s=[],a=0,l=e.storeNames.length;a<l;a++)s.push(r(e.storeNames[a]));o.all(s).then((function(){t()})).catch((function(e){i(e)}))}),(function(e){i(e)}))}))})):o.reject("Invalid arguments"),t),n}};function F(e,t){var i=e.name+"/";return e.storeName!==t.storeName&&(i+=e.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var i in e)t[i]=e[i];return t.keyPrefix=F(e,this._defaultConfig),q()?(this._dbInfo=t,t.serializer=j,o.resolve()):o.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var i=this,n=i.ready().then((function(){for(var t=i._dbInfo,n=t.keyPrefix,r=n.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=i.ready().then((function(){var t=i._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return a(n,t),n},setItem:function(e,t,i){var n=this;e=c(e);var r=n.ready().then((function(){void 0===t&&(t=null);var i=t;return new o((function(r,s){var o=n._dbInfo;o.serializer.serialize(t,(function(t,n){if(n)s(n);else try{localStorage.setItem(o.keyPrefix+e,t),r(i)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||s(e),s(e)}}))}))}));return a(r,i),r},removeItem:function(e,t){var i=this;e=c(e);var n=i.ready().then((function(){var t=i._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return a(n,t),n},clear:function(e){var t=this,i=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return a(i,e),i},length:function(e){var t=this.keys().then((function(e){return e.length}));return a(t,e),t},key:function(e,t){var i=this,n=i.ready().then((function(){var t,n=i._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return a(n,t),n},keys:function(e){var t=this,i=t.ready().then((function(){for(var e=t._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var s=localStorage.key(r);0===s.indexOf(e.keyPrefix)&&n.push(s.substring(e.keyPrefix.length))}return n}));return a(i,e),i},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var i=this.config();e.name=e.name||i.name,e.storeName=e.storeName||i.storeName}var n,r=this;return a(n=e.name?new o((function(t){e.storeName?t(F(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var i=localStorage.key(t);0===i.indexOf(e)&&localStorage.removeItem(i)}})):o.reject("Invalid arguments"),t),n}},W=function(e,t){for(var i,n,r=e.length,s=0;s<r;){if((i=e[s])===(n=t)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;s++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},$={},X={},Y={INDEXEDDB:S,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Q(e,t){e[t]=function(){var i=arguments;return e.ready().then((function(){return e[t].apply(e,i)}))}}function J(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var i in t)t.hasOwnProperty(i)&&(H(t[i])?arguments[0][i]=t[i].slice():arguments[0][i]=t[i])}return arguments[0]}var ee=new(function(){function e(t){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,$[r]||this.defineDriver(n)}this._defaultConfig=J({},K),this._config=J({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,i){var n=new o((function(t,i){try{var n=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void i(r);for(var s=G.concat("_initStorage"),l=0,c=s.length;l<c;l++){var h=s[l];if((!W(Z,h)||e[h])&&"function"!=typeof e[h])return void i(r)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),i=o.reject(t);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];e[r]||(e[r]=t(r))}}();var u=function(i){$[n]&&console.info("Redefining LocalForage driver: "+n),$[n]=e,X[n]=i,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(u,i):u(!!e._support):u(!0)}catch(e){i(e)}}));return l(n,t,i),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,i){var n=$[e]?o.resolve($[e]):o.reject(new Error("Driver not found."));return l(n,t,i),n},e.prototype.getSerializer=function(e){var t=o.resolve(j);return l(t,e),t},e.prototype.ready=function(e){var t=this,i=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return l(i,e,e),i},e.prototype.setDriver=function(e,t,i){var n=this;H(e)||(e=[e]);var r=this._getSupportedDrivers(e);function s(){n._config.driver=n.driver()}function a(e){return n._extend(e),s(),n._ready=n._initStorage(n._config),n._ready}var c=null!==this._driverSet?this._driverSet.catch((function(){return o.resolve()})):o.resolve();return this._driverSet=c.then((function(){var e=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,s(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function i(){for(;t<e.length;){var r=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}s();var l=new Error("No available storage method found.");return n._driverSet=o.reject(l),n._driverSet}()}}(r)}))})).catch((function(){s();var e=new Error("No available storage method found.");return n._driverSet=o.reject(e),n._driverSet})),l(this._driverSet,t,i),this._driverSet},e.prototype.supports=function(e){return!!X[e]},e.prototype._extend=function(e){J(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=G.length;e<t;e++)Q(this,G[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=ee},{3:3}]},{},[4])(4)}).call(this,i(17))},function(e,t,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(5),a=i(4),l=i(2),c=i(6),h=i(8);var u=function(e,t,i,n){var r,o="undefined"!=typeof window&&window.URL,l=o?"blob":"arraybuffer",c=new s.defer,h=new XMLHttpRequest,u=XMLHttpRequest.prototype;for(r in"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),i&&(h.withCredentials=!0),h.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE){var e=!1;if(""!==this.responseType&&"document"!==this.responseType||(e=this.responseXML),200===this.status||0===this.status||e){var i;if(!this.response&&!e)return c.reject({status:this.status,message:"Empty Response",stack:(new Error).stack}),c.promise;if(403===this.status)return c.reject({status:this.status,response:this.response,message:"Forbidden",stack:(new Error).stack}),c.promise;i=e?this.responseXML:Object(s.isXml)(t)?Object(s.parse)(this.response,"text/xml"):"xhtml"==t?Object(s.parse)(this.response,"application/xhtml+xml"):"html"==t||"htm"==t?Object(s.parse)(this.response,"text/html"):"json"==t?JSON.parse(this.response):"blob"==t?o?this.response:new Blob([this.response]):this.response,c.resolve(i)}else c.reject({status:this.status,message:this.response,stack:(new Error).stack})}},h.onerror=function(e){c.reject(e)},h.open("GET",e,!0),n)h.setRequestHeader(r,n[r]);return"json"==t&&h.setRequestHeader("Accept","application/json"),t||(t=new a.a(e).extension),"blob"==t&&(h.responseType=l),Object(s.isXml)(t)&&h.overrideMimeType("text/xml"),"binary"==t&&(h.responseType="arraybuffer"),h.send(),c.promise},d=i(15);var f=class{constructor(e,t){this.idref=e.idref,this.linear="yes"===e.linear,this.properties=e.properties,this.index=e.index,this.href=e.href,this.url=e.url,this.canonical=e.canonical,this.next=e.next,this.prev=e.prev,this.cfiBase=e.cfiBase,t?this.hooks=t:(this.hooks={},this.hooks.serialize=new c.a(this),this.hooks.content=new c.a(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(e){var t=e||this.request||u,i=new s.defer,n=i.promise;return this.contents?i.resolve(this.contents):t(this.url).then(function(e){return this.document=e,this.contents=e.documentElement,this.hooks.content.trigger(this.document,this)}.bind(this)).then(function(){i.resolve(this.contents)}.bind(this)).catch((function(e){i.reject(e)})),n}base(){return Object(h.a)(this.document,this)}render(e){var t=new s.defer,i=t.promise;return this.output,this.load(e).then(function(e){var t=("undefined"!=typeof navigator&&navigator.userAgent||"").indexOf("Trident")>=0,i=new("undefined"==typeof XMLSerializer||t?d.DOMParser:XMLSerializer);return this.output=i.serializeToString(e),this.output}.bind(this)).then(function(){return this.hooks.serialize.trigger(this.output,this)}.bind(this)).then(function(){t.resolve(this.output)}.bind(this)).catch((function(e){t.reject(e)})),i}find(e){var t=this,i=[],n=e.toLowerCase();return Object(s.sprint)(t.document,(function(e){!function(e){for(var r,s,o,a=e.textContent.toLowerCase(),l=t.document.createRange(),c=-1;-1!=s;)-1!=(s=a.indexOf(n,c+1))&&((l=t.document.createRange()).setStart(e,s),l.setEnd(e,s+n.length),r=t.cfiFromRange(l),o=e.textContent.length<150?e.textContent:"..."+(o=e.textContent.substring(s-75,s+75))+"...",i.push({cfi:r,excerpt:o})),c=s}(e)})),i}search(e,t=5){if(void 0===document.createTreeWalker)return this.find(e);let i=[];const n=this,r=e.toLowerCase(),s=function(e){const t=e.reduce((e,t)=>e+t.textContent,"").toLowerCase().indexOf(r);if(-1!=t){const s=0,o=t+r.length;let a=0,l=0;if(t<e[s].length){let r;for(;a<e.length-1&&(l+=e[a].length,!(o<=l));)a+=1;let c=e[s],h=e[a],u=n.document.createRange();u.setStart(c,t);let d=e.slice(0,a).reduce((e,t)=>e+t.textContent.length,0);u.setEnd(h,d>o?o:o-d),r=n.cfiFromRange(u);let f=e.slice(0,a+1).reduce((e,t)=>e+t.textContent,"");f.length>150&&(f=f.substring(t-75,t+75),f="..."+f+"..."),i.push({cfi:r,excerpt:f})}}},o=document.createTreeWalker(n.document,NodeFilter.SHOW_TEXT,null,!1);let a,l=[];for(;a=o.nextNode();)l.push(a),l.length==t&&(s(l.slice(0,t)),l=l.slice(1,t));return l.length>0&&s(l),i}reconcileLayoutSettings(e){var t={layout:e.layout,spread:e.spread,orientation:e.orientation};return this.properties.forEach((function(e){var i,n,r=e.replace("rendition:",""),s=r.indexOf("-");-1!=s&&(i=r.slice(0,s),n=r.slice(s+1),t[i]=n)})),t}cfiFromRange(e){return new l.a(e,this.cfiBase).toString()}cfiFromElement(e){return new l.a(e,this.cfiBase).toString()}unload(){this.document=void 0,this.contents=void 0,this.output=void 0}destroy(){this.unload(),this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.idref=void 0,this.linear=void 0,this.properties=void 0,this.index=void 0,this.href=void 0,this.url=void 0,this.next=void 0,this.prev=void 0,this.cfiBase=void 0}};var p=class{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new c.a,this.hooks.content=new c.a,this.hooks.content.register(h.a),this.hooks.content.register(h.b),this.hooks.content.register(h.d),this.epubcfi=new l.a,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}unpack(e,t,i){this.items=e.spine,this.manifest=e.manifest,this.spineNodeIndex=e.spineNodeIndex,this.baseUrl=e.baseUrl||e.basePath||"",this.length=this.items.length,this.items.forEach((e,n)=>{var r,s=this.manifest[e.idref];e.index=n,e.cfiBase=this.epubcfi.generateChapterComponent(this.spineNodeIndex,e.index,e.id),e.href&&(e.url=t(e.href,!0),e.canonical=i(e.href)),s&&(e.href=s.href,e.url=t(e.href,!0),e.canonical=i(e.href),s.properties.length&&e.properties.push.apply(e.properties,s.properties)),"yes"===e.linear?(e.prev=function(){let t=e.index;for(;t>0;){let e=this.get(t-1);if(e&&e.linear)return e;t-=1}}.bind(this),e.next=function(){let t=e.index;for(;t<this.spineItems.length-1;){let e=this.get(t+1);if(e&&e.linear)return e;t+=1}}.bind(this)):(e.prev=function(){},e.next=function(){}),r=new f(e,this.hooks),this.append(r)}),this.loaded=!0}get(e){var t=0;if(void 0===e)for(;t<this.spineItems.length;){let e=this.spineItems[t];if(e&&e.linear)break;t+=1}else if(this.epubcfi.isCfiString(e)){t=new l.a(e).spinePos}else"number"==typeof e||!1===isNaN(e)?t=e:"string"==typeof e&&0===e.indexOf("#")?t=this.spineById[e.substring(1)]:"string"==typeof e&&(e=e.split("#")[0],t=this.spineByHref[e]||this.spineByHref[encodeURI(e)]);return this.spineItems[t]||null}append(e){var t=this.spineItems.length;return e.index=t,this.spineItems.push(e),this.spineByHref[decodeURI(e.href)]=t,this.spineByHref[encodeURI(e.href)]=t,this.spineByHref[e.href]=t,this.spineById[e.idref]=t,t}prepend(e){return this.spineByHref[e.href]=0,this.spineById[e.idref]=0,this.spineItems.forEach((function(e,t){e.index=t})),0}remove(e){var t=this.spineItems.indexOf(e);if(t>-1)return delete this.spineByHref[e.href],delete this.spineById[e.idref],this.spineItems.splice(t,1)}each(){return this.spineItems.forEach.apply(this.spineItems,arguments)}first(){let e=0;do{let t=this.get(e);if(t&&t.linear)return t;e+=1}while(e<this.spineItems.length)}last(){let e=this.spineItems.length-1;do{let t=this.get(e);if(t&&t.linear)return t;e-=1}while(e>=0)}destroy(){this.each(e=>e.destroy()),this.spineItems=void 0,this.spineByHref=void 0,this.spineById=void 0,this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.epubcfi=void 0,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}},g=i(9),m=i(1);class v{constructor(e,t,i){this.spine=e,this.request=t,this.pause=i||100,this.q=new g.a(this),this.epubcfi=new l.a,this._locations=[],this._locationsWords=[],this.total=0,this.break=150,this._current=0,this._wordCounter=0,this.currentLocation="",this._currentCfi="",this.processingTimeout=void 0}generate(e){return e&&(this.break=e),this.q.pause(),this.spine.each(function(e){e.linear&&this.q.enqueue(this.process.bind(this),e)}.bind(this)),this.q.run().then(function(){return this.total=this._locations.length-1,this._currentCfi&&(this.currentLocation=this._currentCfi),this._locations}.bind(this))}createRange(){return{startContainer:void 0,startOffset:void 0,endContainer:void 0,endOffset:void 0}}process(e){return e.load(this.request).then(function(t){var i=new s.defer,n=this.parse(t,e.cfiBase);return this._locations=this._locations.concat(n),e.unload(),this.processingTimeout=setTimeout(()=>i.resolve(n),this.pause),i.promise}.bind(this))}parse(e,t,i){var n,r,o=[],a=e.ownerDocument,c=Object(s.qs)(a,"body"),h=0,u=i||this.break;if(Object(s.sprint)(c,function(e){var i,s=e.length,a=0;if(0===e.textContent.trim().length)return!1;for(0==h&&((n=this.createRange()).startContainer=e,n.startOffset=0),(i=u-h)>s&&(h+=s,a=s);a<s;)if(i=u-h,0===h&&(a+=1,(n=this.createRange()).startContainer=e,n.startOffset=a),a+i>=s)h+=s-a,a=s;else{a+=i,n.endContainer=e,n.endOffset=a;let r=new l.a(n,t).toString();o.push(r),h=0}r=e}.bind(this)),n&&n.startContainer&&r){n.endContainer=r,n.endOffset=r.length;let e=new l.a(n,t).toString();o.push(e),h=0}return o}generateFromWords(e,t,i){var n=e?new l.a(e):void 0;return this.q.pause(),this._locationsWords=[],this._wordCounter=0,this.spine.each(function(e){e.linear&&(n?e.index>=n.spinePos&&this.q.enqueue(this.processWords.bind(this),e,t,n,i):this.q.enqueue(this.processWords.bind(this),e,t,n,i))}.bind(this)),this.q.run().then(function(){return this._currentCfi&&(this.currentLocation=this._currentCfi),this._locationsWords}.bind(this))}processWords(e,t,i,n){return n&&this._locationsWords.length>=n?Promise.resolve():e.load(this.request).then(function(r){var o=new s.defer,a=this.parseWords(r,e,t,i),l=n-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(a.length>=n?a.slice(0,l):a),e.unload(),this.processingTimeout=setTimeout(()=>o.resolve(a),this.pause),o.promise}.bind(this))}countWords(e){return(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).split(" ").length}parseWords(e,t,i,n){var r,o=t.cfiBase,a=[],c=e.ownerDocument,h=Object(s.qs)(c,"body"),u=i,d=!n||n.spinePos!==t.index;n&&t.index===n.spinePos&&(r=n.findNode(n.range?n.path.steps.concat(n.start.steps):n.path.steps,e.ownerDocument));return Object(s.sprint)(h,function(e){if(!d){if(e!==r)return!1;d=!0}if(e.textContent.length<10&&0===e.textContent.trim().length)return!1;var t,i=this.countWords(e.textContent),n=0;if(0===i)return!1;for((t=u-this._wordCounter)>i&&(this._wordCounter+=i,n=i);n<i;)if(n+(t=u-this._wordCounter)>=i)this._wordCounter+=i-n,n=i;else{n+=t;let i=new l.a(e,o);a.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}e}.bind(this)),a}locationFromCfi(e){let t;return l.a.prototype.isCfiString(e)&&(e=new l.a(e)),0===this._locations.length?-1:(t=Object(s.locationOf)(e,this._locations,this.epubcfi.compare),t>this.total?this.total:t)}percentageFromCfi(e){if(0===this._locations.length)return null;var t=this.locationFromCfi(e);return this.percentageFromLocation(t)}percentageFromLocation(e){return e&&this.total?e/this.total:0}cfiFromLocation(e){var t=-1;return"number"!=typeof e&&(e=parseInt(e)),e>=0&&e<this._locations.length&&(t=this._locations[e]),t}cfiFromPercentage(e){let t;if(e>1&&console.warn("Normalize cfiFromPercentage value to between 0 - 1"),e>=1){let e=new l.a(this._locations[this.total]);return e.collapse(),e.toString()}return t=Math.ceil(this.total*e),this.cfiFromLocation(t)}load(e){return this._locations="string"==typeof e?JSON.parse(e):e,this.total=this._locations.length-1,this._locations}save(){return JSON.stringify(this._locations)}getCurrent(){return this._current}setCurrent(e){var t;if("string"==typeof e)this._currentCfi=e;else{if("number"!=typeof e)return;this._current=e}0!==this._locations.length&&("string"==typeof e?(t=this.locationFromCfi(e),this._current=t):t=e,this.emit(m.c.LOCATIONS.CHANGED,{percentage:this.percentageFromLocation(t)}))}get currentLocation(){return this._current}set currentLocation(e){this.setCurrent(e)}length(){return this._locations.length}destroy(){this.spine=void 0,this.request=void 0,this.pause=void 0,this.q.stop(),this.q=void 0,this.epubcfi=void 0,this._locations=void 0,this.total=void 0,this.break=void 0,this._current=void 0,this.currentLocation=void 0,this._currentCfi=void 0,clearTimeout(this.processingTimeout)}}r()(v.prototype);var y=v,b=i(7),w=i.n(b);var x=class{constructor(e){this.packagePath="",this.directory="",this.encoding="",e&&this.parse(e)}parse(e){var t;if(!e)throw new Error("Container File Not Found");if(!(t=Object(s.qs)(e,"rootfile")))throw new Error("No RootFile Found");this.packagePath=t.getAttribute("full-path"),this.directory=w.a.dirname(this.packagePath),this.encoding=e.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}};var _=class{constructor(e){this.manifest={},this.navPath="",this.ncxPath="",this.coverPath="",this.spineNodeIndex=0,this.spine=[],this.metadata={},e&&this.parse(e)}parse(e){var t,i,n;if(!e)throw new Error("Package File Not Found");if(!(t=Object(s.qs)(e,"metadata")))throw new Error("No Metadata Found");if(!(i=Object(s.qs)(e,"manifest")))throw new Error("No Manifest Found");if(!(n=Object(s.qs)(e,"spine")))throw new Error("No Spine Found");return this.manifest=this.parseManifest(i),this.navPath=this.findNavPath(i),this.ncxPath=this.findNcxPath(i,n),this.coverPath=this.findCoverPath(e),this.spineNodeIndex=Object(s.indexOfElementNode)(n),this.spine=this.parseSpine(n,this.manifest),this.uniqueIdentifier=this.findUniqueIdentifier(e),this.metadata=this.parseMetadata(t),this.metadata.direction=n.getAttribute("page-progression-direction"),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex}}parseMetadata(e){var t={};return t.title=this.getElementText(e,"title"),t.creator=this.getElementText(e,"creator"),t.description=this.getElementText(e,"description"),t.pubdate=this.getElementText(e,"date"),t.publisher=this.getElementText(e,"publisher"),t.identifier=this.getElementText(e,"identifier"),t.language=this.getElementText(e,"language"),t.rights=this.getElementText(e,"rights"),t.modified_date=this.getPropertyText(e,"dcterms:modified"),t.layout=this.getPropertyText(e,"rendition:layout"),t.orientation=this.getPropertyText(e,"rendition:orientation"),t.flow=this.getPropertyText(e,"rendition:flow"),t.viewport=this.getPropertyText(e,"rendition:viewport"),t.media_active_class=this.getPropertyText(e,"media:active-class"),t.spread=this.getPropertyText(e,"rendition:spread"),t}parseManifest(e){var t={},i=Object(s.qsa)(e,"item");return Array.prototype.slice.call(i).forEach((function(e){var i=e.getAttribute("id"),n=e.getAttribute("href")||"",r=e.getAttribute("media-type")||"",s=e.getAttribute("media-overlay")||"",o=e.getAttribute("properties")||"";t[i]={href:n,type:r,overlay:s,properties:o.length?o.split(" "):[]}})),t}parseSpine(e,t){var i=[],n=Object(s.qsa)(e,"itemref");return Array.prototype.slice.call(n).forEach((function(e,t){var n=e.getAttribute("idref"),r=e.getAttribute("properties")||"",s=r.length?r.split(" "):[],o={id:e.getAttribute("id"),idref:n,linear:e.getAttribute("linear")||"yes",properties:s,index:t};i.push(o)})),i}findUniqueIdentifier(e){var t=e.documentElement.getAttribute("unique-identifier");if(!t)return"";var i=e.getElementById(t);return i&&"identifier"===i.localName&&"http://purl.org/dc/elements/1.1/"===i.namespaceURI&&i.childNodes.length>0?i.childNodes[0].nodeValue.trim():""}findNavPath(e){var t=Object(s.qsp)(e,"item",{properties:"nav"});return!!t&&t.getAttribute("href")}findNcxPath(e,t){var i,n=Object(s.qsp)(e,"item",{"media-type":"application/x-dtbncx+xml"});return n||(i=t.getAttribute("toc"))&&(n=e.querySelector("#"+i)),!!n&&n.getAttribute("href")}findCoverPath(e){Object(s.qs)(e,"package").getAttribute("version");var t=Object(s.qsp)(e,"item",{properties:"cover-image"});if(t)return t.getAttribute("href");var i=Object(s.qsp)(e,"meta",{name:"cover"});if(i){var n=i.getAttribute("content"),r=e.getElementById(n);return r?r.getAttribute("href"):""}return!1}getElementText(e,t){var i,n=e.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",t);return n&&0!==n.length&&(i=n[0]).childNodes.length?i.childNodes[0].nodeValue:""}getPropertyText(e,t){var i=Object(s.qsp)(e,"meta",{property:t});return i&&i.childNodes.length?i.childNodes[0].nodeValue:""}load(e){this.metadata=e.metadata;let t=e.readingOrder||e.spine;return this.spine=t.map((e,t)=>(e.index=t,e.linear=e.linear||"yes",e)),e.resources.forEach((e,t)=>{this.manifest[t]=e,e.rel&&"cover"===e.rel[0]&&(this.coverPath=e.href)}),this.spineNodeIndex=0,this.toc=e.toc.map((e,t)=>(e.label=e.title,e)),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex,toc:this.toc}}destroy(){this.manifest=void 0,this.navPath=void 0,this.ncxPath=void 0,this.coverPath=void 0,this.spineNodeIndex=void 0,this.spine=void 0,this.metadata=void 0}};var E=class{constructor(e){this.toc=[],this.tocByHref={},this.tocById={},this.landmarks=[],this.landmarksByType={},this.length=0,e&&this.parse(e)}parse(e){let t,i,n=e.nodeType;n&&(t=Object(s.qs)(e,"html"),i=Object(s.qs)(e,"ncx")),n?t?(this.toc=this.parseNav(e),this.landmarks=this.parseLandmarks(e)):i&&(this.toc=this.parseNcx(e)):this.toc=this.load(e),this.length=0,this.unpack(this.toc)}unpack(e){for(var t,i=0;i<e.length;i++)(t=e[i]).href&&(this.tocByHref[t.href]=i),t.id&&(this.tocById[t.id]=i),this.length++,t.subitems.length&&this.unpack(t.subitems)}get(e){var t;return e?(0===e.indexOf("#")?t=this.tocById[e.substring(1)]:e in this.tocByHref&&(t=this.tocByHref[e]),this.getByIndex(e,t,this.toc)):this.toc}getByIndex(e,t,i){if(0===i.length)return;const n=i[t];if(!n||e!==n.id&&e!==n.href){let n;for(let r=0;r<i.length&&(n=this.getByIndex(e,t,i[r].subitems),!n);++r);return n}return n}landmark(e){var t;return e?(t=this.landmarksByType[e],this.landmarks[t]):this.landmarks}parseNav(e){var t=Object(s.querySelectorByType)(e,"nav","toc"),i=[];if(!t)return i;let n=Object(s.filterChildren)(t,"ol",!0);return n?i=this.parseNavList(n):i}parseNavList(e,t){const i=[];if(!e)return i;if(!e.children)return i;for(let n=0;n<e.children.length;n++){const r=this.navItem(e.children[n],t);r&&i.push(r)}return i}navItem(e,t){let i=e.getAttribute("id")||void 0,n=Object(s.filterChildren)(e,"a",!0)||Object(s.filterChildren)(e,"span",!0);if(!n)return;let r=n.getAttribute("href")||"";i||(i=r);let o=n.textContent||"",a=[],l=Object(s.filterChildren)(e,"ol",!0);return l&&(a=this.parseNavList(l,i)),{id:i,href:r,label:o,subitems:a,parent:t}}parseLandmarks(e){var t,i,n=Object(s.querySelectorByType)(e,"nav","landmarks"),r=n?Object(s.qsa)(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(t=0;t<o;++t)(i=this.landmarkItem(r[t]))&&(a.push(i),this.landmarksByType[i.type]=t);return a}landmarkItem(e){let t=Object(s.filterChildren)(e,"a",!0);if(!t)return;let i=t.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0;return{href:t.getAttribute("href")||"",label:t.textContent||"",type:i}}parseNcx(e){var t,i,n=Object(s.qsa)(e,"navPoint"),r=n.length,o={},a=[];if(!n||0===r)return a;for(t=0;t<r;++t)o[(i=this.ncxItem(n[t])).id]=i,i.parent?o[i.parent].subitems.push(i):a.push(i);return a}ncxItem(e){var t,i=e.getAttribute("id")||!1,n=Object(s.qs)(e,"content").getAttribute("src"),r=Object(s.qs)(e,"navLabel"),o=r.textContent?r.textContent:"",a=e.parentNode;return!a||"navPoint"!==a.nodeName&&"navPoint"!==a.nodeName.split(":").slice(-1)[0]||(t=a.getAttribute("id")),{id:i,href:n,label:o,subitems:[],parent:t}}load(e){return e.map(e=>(e.label=e.title,e.subitems=e.children?this.load(e.children):[],e))}forEach(e){return this.toc.forEach(e)}},k={application:{ecmascript:["es","ecma"],javascript:"js",ogg:"ogx",pdf:"pdf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],"rdf+xml":"rdf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","opf","ncx"],zip:"zip","x-httpd-eruby":"rhtml","x-latex":"latex","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-object":"o","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","epub+zip":"epub","font-tdpfr":"pfr","inkml+xml":["ink","inkml"],json:"json","jsonml+json":"jsonml","mathml+xml":"mathml","metalink+xml":"metalink",mp4:"mp4s","omdoc+xml":"omdoc",oxps:"oxps","vnd.amazon.ebook":"azw",widget:"wgt","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-mobipocket-ebook":["prc","mobi"],"x-mspublisher":"pub","x-nzb":"nzb","x-tgif":"obj","xaml+xml":"xaml","xml-dtd":"dtd","xproc+xml":"xpl","xslt+xml":"xslt","internet-property-stream":"acx","x-compress":"z","x-compressed":"tgz","x-gzip":"gz"},audio:{flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"x-aiff":["aif","aiff","aifc"],"x-ms-wma":"wma","x-wav":"wav",adpcm:"adp",mp4:"mp4a",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"x-icon":"ico",bmp:"bmp",webp:"webp","x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod"},text:{"cache-manifest":["manifest","appcache"],css:"css",csv:"csv",html:["html","htm","shtml","stm"],mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx","tab-separated-values":"tsv","x-bibtex":"bib"},video:{mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"}},T=function(){var e,t,i,n,r={};for(e in k)if(k.hasOwnProperty(e))for(t in k[e])if(k[e].hasOwnProperty(t))if("string"==typeof(i=k[e][t]))r[i]=e+"/"+t;else for(n=0;n<i.length;n++)r[i[n]]=e+"/"+t;return r}();var S={lookup:function(e){return e&&T[e.split(".").pop().toLowerCase()]||"text/plain"}};var C=class{constructor(e,t){this.settings={replacements:t&&t.replacements||"base64",archive:t&&t.archive,resolver:t&&t.resolver,request:t&&t.request},this.process(e)}process(e){this.manifest=e,this.resources=Object.keys(e).map((function(t){return e[t]})),this.replacementUrls=[],this.html=[],this.assets=[],this.css=[],this.urls=[],this.cssUrls=[],this.split(),this.splitUrls()}split(){this.html=this.resources.filter((function(e){if("application/xhtml+xml"===e.type||"text/html"===e.type)return!0})),this.assets=this.resources.filter((function(e){if("application/xhtml+xml"!==e.type&&"text/html"!==e.type)return!0})),this.css=this.resources.filter((function(e){if("text/css"===e.type)return!0}))}splitUrls(){this.urls=this.assets.map(function(e){return e.href}.bind(this)),this.cssUrls=this.css.map((function(e){return e.href}))}createUrl(e){var t=new o.a(e),i=S.lookup(t.filename);return this.settings.archive?this.settings.archive.createUrl(e,{base64:"base64"===this.settings.replacements}):"base64"===this.settings.replacements?this.settings.request(e,"blob").then(e=>Object(s.blob2base64)(e)).then(e=>Object(s.createBase64Url)(e,i)):this.settings.request(e,"blob").then(e=>Object(s.createBlobUrl)(e,i))}replacements(){if("none"===this.settings.replacements)return new Promise(function(e){e(this.urls)}.bind(this));var e=this.urls.map(e=>{var t=this.settings.resolver(e);return this.createUrl(t).catch(e=>(console.error(e),null))});return Promise.all(e).then(e=>(this.replacementUrls=e.filter(e=>"string"==typeof e),e))}replaceCss(e,t){var i=[];return e=e||this.settings.archive,t=t||this.settings.resolver,this.cssUrls.forEach(function(n){var r=this.createCssFile(n,e,t).then(function(e){var t=this.urls.indexOf(n);t>-1&&(this.replacementUrls[t]=e)}.bind(this));i.push(r)}.bind(this)),Promise.all(i)}createCssFile(e){if(w.a.isAbsolute(e))return new Promise((function(e){e()}));var t,i=this.settings.resolver(e);t=this.settings.archive?this.settings.archive.getText(i):this.settings.request(i,"text");var n=this.urls.map(e=>{var t=this.settings.resolver(e);return new a.a(i).relative(t)});return t?t.then(e=>(e=Object(h.e)(e,n,this.replacementUrls),"base64"===this.settings.replacements?Object(s.createBase64Url)(e,"text/css"):Object(s.createBlobUrl)(e,"text/css")),e=>new Promise((function(e){e()}))):new Promise((function(e){e()}))}relativeTo(e,t){return t=t||this.settings.resolver,this.urls.map(function(i){var n=t(i);return new a.a(e).relative(n)}.bind(this))}get(e){var t=this.urls.indexOf(e);if(-1!==t)return this.replacementUrls.length?new Promise(function(e,i){e(this.replacementUrls[t])}.bind(this)):this.createUrl(e)}substitute(e,t){var i;return i=t?this.relativeTo(t):this.urls,Object(h.e)(e,i,this.replacementUrls)}destroy(){this.settings=void 0,this.manifest=void 0,this.resources=void 0,this.replacementUrls=void 0,this.html=void 0,this.assets=void 0,this.css=void 0,this.urls=void 0,this.cssUrls=void 0}};var N=class{constructor(e){this.pages=[],this.locations=[],this.epubcfi=new l.a,this.firstPage=0,this.lastPage=0,this.totalPages=0,this.toc=void 0,this.ncx=void 0,e&&(this.pageList=this.parse(e)),this.pageList&&this.pageList.length&&this.process(this.pageList)}parse(e){var t=Object(s.qs)(e,"html"),i=Object(s.qs)(e,"ncx");return t?this.parseNav(e):i?this.parseNcx(e):void 0}parseNav(e){var t,i,n=Object(s.querySelectorByType)(e,"nav","page-list"),r=n?Object(s.qsa)(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(t=0;t<o;++t)i=this.item(r[t]),a.push(i);return a}parseNcx(e){var t,i,n,r,o=[],a=0;if(!(i=Object(s.qs)(e,"pageList")))return o;if(r=(n=Object(s.qsa)(i,"pageTarget")).length,!n||0===n.length)return o;for(a=0;a<r;++a)t=this.ncxItem(n[a]),o.push(t);return o}ncxItem(e){var t=Object(s.qs)(e,"navLabel"),i=Object(s.qs)(t,"text").textContent;return{href:Object(s.qs)(e,"content").getAttribute("src"),page:parseInt(i,10)}}item(e){var t,i,n=Object(s.qs)(e,"a"),r=n.getAttribute("href")||"",o=n.textContent||"",a=parseInt(o);return-1!=r.indexOf("epubcfi")?(i=(t=r.split("#"))[0],{cfi:t.length>1&&t[1],href:r,packageUrl:i,page:a}):{href:r,page:a}}process(e){e.forEach((function(e){this.pages.push(e.page),e.cfi&&this.locations.push(e.cfi)}),this),this.firstPage=parseInt(this.pages[0]),this.lastPage=parseInt(this.pages[this.pages.length-1]),this.totalPages=this.lastPage-this.firstPage}pageFromCfi(e){var t=-1;if(0===this.locations.length)return-1;var i=Object(s.indexOfSorted)(e,this.locations,this.epubcfi.compare);return-1!=i?t=this.pages[i]:void 0!==(t=(i=Object(s.locationOf)(e,this.locations,this.epubcfi.compare))-1>=0?this.pages[i-1]:this.pages[0])||(t=-1),t}cfiFromPage(e){var t=-1;"number"!=typeof e&&(e=parseInt(e));var i=this.pages.indexOf(e);return-1!=i&&(t=this.locations[i]),t}pageFromPercentage(e){return Math.round(this.totalPages*e)}percentageFromPage(e){var t=(e-this.firstPage)/this.totalPages;return Math.round(1e3*t)/1e3}percentageFromCfi(e){var t=this.pageFromCfi(e);return this.percentageFromPage(t)}destroy(){this.pages=void 0,this.locations=void 0,this.epubcfi=void 0,this.pageList=void 0,this.toc=void 0,this.ncx=void 0}},O=i(16),A=i(29),I=i.n(A);var R=class{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new I.a}catch(e){throw new Error("JSZip lib not loaded")}}open(e,t){return this.zip.loadAsync(e,{base64:t})}openUrl(e,t){return u(e,"binary").then(function(e){return this.zip.loadAsync(e,{base64:t})}.bind(this))}request(e,t){var i,n=new s.defer,r=new a.a(e);return t||(t=r.extension),(i="blob"==t?this.getBlob(e):this.getText(e))?i.then(function(e){let i=this.handleResponse(e,t);n.resolve(i)}.bind(this)):n.reject({message:"File not found in the epub: "+e,stack:(new Error).stack}),n.promise}handleResponse(e,t){return"json"==t?JSON.parse(e):Object(s.isXml)(t)?Object(s.parse)(e,"text/xml"):"xhtml"==t?Object(s.parse)(e,"application/xhtml+xml"):"html"==t||"htm"==t?Object(s.parse)(e,"text/html"):e}getBlob(e,t){var i=window.decodeURIComponent(e.substr(1)),n=this.zip.file(i);if(n)return t=t||S.lookup(n.name),n.async("uint8array").then((function(e){return new Blob([e],{type:t})}))}getText(e,t){var i=window.decodeURIComponent(e.substr(1)),n=this.zip.file(i);if(n)return n.async("string").then((function(e){return e}))}getBase64(e,t){var i=window.decodeURIComponent(e.substr(1)),n=this.zip.file(i);if(n)return t=t||S.lookup(n.name),n.async("base64").then((function(e){return"data:"+t+";base64,"+e}))}createUrl(e,t){var i,n,r=new s.defer,o=window.URL||window.webkitURL||window.mozURL,a=t&&t.base64;return e in this.urlCache?(r.resolve(this.urlCache[e]),r.promise):(a?(n=this.getBase64(e))&&n.then(function(t){this.urlCache[e]=t,r.resolve(t)}.bind(this)):(n=this.getBlob(e))&&n.then(function(t){i=o.createObjectURL(t),this.urlCache[e]=i,r.resolve(i)}.bind(this)),n||r.reject({message:"File not found in the epub: "+e,stack:(new Error).stack}),r.promise)}revokeUrl(e){var t=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[e];i&&t.revokeObjectURL(i)}destroy(){var e=window.URL||window.webkitURL||window.mozURL;for(let t in this.urlCache)e.revokeObjectURL(t);this.zip=void 0,this.urlCache={}}},D=i(23),j=i.n(D);class z{constructor(e,t,i){this.urlCache={},this.storage=void 0,this.name=e,this.requester=t||u,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let e;void 0===j.a&&(e=j.a),this.storage=e.createInstance({name:this.name})}catch(e){throw new Error("localForage lib not loaded")}}addListeners(){this._status=this.status.bind(this),window.addEventListener("online",this._status),window.addEventListener("offline",this._status)}removeListeners(){window.removeEventListener("online",this._status),window.removeEventListener("offline",this._status),this._status=void 0}status(e){let t=navigator.onLine;this.online=t,t?this.emit("online",this):this.emit("offline",this)}add(e,t){let i=e.resources.map(e=>{let{href:i}=e,n=this.resolver(i),r=window.encodeURIComponent(n);return this.storage.getItem(r).then(e=>!e||t?this.requester(n,"binary").then(e=>this.storage.setItem(r,e)):e)});return Promise.all(i)}put(e,t,i){let n=window.encodeURIComponent(e);return this.storage.getItem(n).then(r=>r||this.requester(e,"binary",t,i).then(e=>this.storage.setItem(n,e)))}request(e,t,i,n){return this.online?this.requester(e,t,i,n).then(t=>(this.put(e),t)):this.retrieve(e,t)}retrieve(e,t){new s.defer;var i=new a.a(e);return t||(t=i.extension),("blob"==t?this.getBlob(e):this.getText(e)).then(i=>{var n,r=new s.defer;return i?(n=this.handleResponse(i,t),r.resolve(n)):r.reject({message:"File not found in storage: "+e,stack:(new Error).stack}),r.promise})}handleResponse(e,t){return"json"==t?JSON.parse(e):Object(s.isXml)(t)?Object(s.parse)(e,"text/xml"):"xhtml"==t?Object(s.parse)(e,"application/xhtml+xml"):"html"==t||"htm"==t?Object(s.parse)(e,"text/html"):e}getBlob(e,t){let i=window.encodeURIComponent(e);return this.storage.getItem(i).then((function(i){if(i)return t=t||S.lookup(e),new Blob([i],{type:t})}))}getText(e,t){let i=window.encodeURIComponent(e);return t=t||S.lookup(e),this.storage.getItem(i).then((function(e){var i,n=new s.defer,r=new FileReader;if(e)return i=new Blob([e],{type:t}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsText(i,t),n.promise}))}getBase64(e,t){let i=window.encodeURIComponent(e);return t=t||S.lookup(e),this.storage.getItem(i).then(e=>{var i,n=new s.defer,r=new FileReader;if(e)return i=new Blob([e],{type:t}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsDataURL(i,t),n.promise})}createUrl(e,t){var i,n,r=new s.defer,o=window.URL||window.webkitURL||window.mozURL,a=t&&t.base64;return e in this.urlCache?(r.resolve(this.urlCache[e]),r.promise):(a?(n=this.getBase64(e))&&n.then(function(t){this.urlCache[e]=t,r.resolve(t)}.bind(this)):(n=this.getBlob(e))&&n.then(function(t){i=o.createObjectURL(t),this.urlCache[e]=i,r.resolve(i)}.bind(this)),n||r.reject({message:"File not found in storage: "+e,stack:(new Error).stack}),r.promise)}revokeUrl(e){var t=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[e];i&&t.revokeObjectURL(i)}destroy(){var e=window.URL||window.webkitURL||window.mozURL;for(let t in this.urlCache)e.revokeObjectURL(t);this.urlCache={},this.removeListeners()}}r()(z.prototype);var L=z;var B=class{constructor(e){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",e&&this.parse(e)}parse(e){if(!e)return this;const t=Object(s.qs)(e,"display_options");if(!t)return this;return Object(s.qsa)(t,"option").forEach(e=>{let t="";switch(e.childNodes.length&&(t=e.childNodes[0].nodeValue),e.attributes.name.value){case"interactive":this.interactive=t;break;case"fixed-layout":this.fixedLayout=t;break;case"open-to-spread":this.openToSpread=t;break;case"orientation-lock":this.orientationLock=t}}),this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}};const P="binary",M="base64",F="epub",q="opf",U="json",W="directory";class H{constructor(e,t){void 0===t&&"string"!=typeof e&&e instanceof Blob==!1&&e instanceof ArrayBuffer==!1&&(t=e,e=void 0),this.settings=Object(s.extend)(this.settings||{},{requestMethod:void 0,requestCredentials:void 0,requestHeaders:void 0,encoding:void 0,replacements:void 0,canonical:void 0,openAs:void 0,store:void 0}),Object(s.extend)(this.settings,t),this.opening=new s.defer,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new s.defer,spine:new s.defer,metadata:new s.defer,cover:new s.defer,navigation:new s.defer,pageList:new s.defer,resources:new s.defer,displayOptions:new s.defer},this.loaded={manifest:this.loading.manifest.promise,spine:this.loading.spine.promise,metadata:this.loading.metadata.promise,cover:this.loading.cover.promise,navigation:this.loading.navigation.promise,pageList:this.loading.pageList.promise,resources:this.loading.resources.promise,displayOptions:this.loading.displayOptions.promise},this.ready=Promise.all([this.loaded.manifest,this.loaded.spine,this.loaded.metadata,this.loaded.cover,this.loaded.navigation,this.loaded.resources,this.loaded.displayOptions]),this.isRendered=!1,this.request=this.settings.requestMethod||u,this.spine=new p,this.locations=new y(this.spine,this.load.bind(this)),this.navigation=void 0,this.pageList=void 0,this.url=void 0,this.path=void 0,this.archived=!1,this.archive=void 0,this.storage=void 0,this.resources=void 0,this.rendition=void 0,this.container=void 0,this.packaging=void 0,this.displayOptions=void 0,this.settings.store&&this.store(this.settings.store),e&&this.open(e,this.settings.openAs).catch(t=>{var i=new Error("Cannot load book at "+e);this.emit(m.c.BOOK.OPEN_FAILED,i)})}open(e,t){var i,n=t||this.determineType(e);return n===P?(this.archived=!0,this.url=new o.a("/",""),i=this.openEpub(e)):n===M?(this.archived=!0,this.url=new o.a("/",""),i=this.openEpub(e,n)):n===F?(this.archived=!0,this.url=new o.a("/",""),i=this.request(e,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):n==q?(this.url=new o.a(e),i=this.openPackaging(this.url.Path.toString())):n==U?(this.url=new o.a(e),i=this.openManifest(this.url.Path.toString())):(this.url=new o.a(e),i=this.openContainer("META-INF/container.xml").then(this.openPackaging.bind(this))),i}openEpub(e,t){return this.unarchive(e,t||this.settings.encoding).then(()=>this.openContainer("META-INF/container.xml")).then(e=>this.openPackaging(e))}openContainer(e){return this.load(e).then(e=>(this.container=new x(e),this.resolve(this.container.packagePath)))}openPackaging(e){return this.path=new a.a(e),this.load(e).then(e=>(this.packaging=new _(e),this.unpack(this.packaging)))}openManifest(e){return this.path=new a.a(e),this.load(e).then(e=>(this.packaging=new _,this.packaging.load(e),this.unpack(this.packaging)))}load(e){var t=this.resolve(e);return this.archived?this.archive.request(t):this.request(t,null,this.settings.requestCredentials,this.settings.requestHeaders)}resolve(e,t){if(e){var i=e;return e.indexOf("://")>-1?e:(this.path&&(i=this.path.resolve(e)),0!=t&&this.url&&(i=this.url.resolve(i)),i)}}canonical(e){return e?this.settings.canonical?this.settings.canonical(e):this.resolve(e,!0):""}determineType(e){var t;return"base64"===this.settings.encoding?M:"string"!=typeof e?P:((t=new o.a(e).path().extension)&&(t=t.replace(/\?.*$/,"")),t?"epub"===t?F:"opf"===t?q:"json"===t?U:void 0:W)}unpack(e){this.package=e,""===this.packaging.metadata.layout?this.load(this.url.resolve("META-INF/com.apple.ibooks.display-options.xml")).then(e=>{this.displayOptions=new B(e),this.loading.displayOptions.resolve(this.displayOptions)}).catch(e=>{this.displayOptions=new B,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new B,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new C(this.packaging.manifest,{archive:this.archive,resolver:this.resolve.bind(this),request:this.request.bind(this),replacements:this.settings.replacements||(this.archived?"blobUrl":"base64")}),this.loadNavigation(this.packaging).then(()=>{this.loading.navigation.resolve(this.navigation)}),this.packaging.coverPath&&(this.cover=this.resolve(this.packaging.coverPath)),this.loading.manifest.resolve(this.packaging.manifest),this.loading.metadata.resolve(this.packaging.metadata),this.loading.spine.resolve(this.spine),this.loading.cover.resolve(this.cover),this.loading.resources.resolve(this.resources),this.loading.pageList.resolve(this.pageList),this.isOpen=!0,this.archived||this.settings.replacements&&"none"!=this.settings.replacements?this.replacements().then(()=>{this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}).catch(e=>{console.error(e)}):this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}loadNavigation(e){let t=e.navPath||e.ncxPath,i=e.toc;return i?new Promise((t,n)=>{this.navigation=new E(i),e.pageList&&(this.pageList=new N(e.pageList)),t(this.navigation)}):t?this.load(t,"xml").then(e=>(this.navigation=new E(e),this.pageList=new N(e),this.navigation)):new Promise((e,t)=>{this.navigation=new E,this.pageList=new N,e(this.navigation)})}section(e){return this.spine.get(e)}renderTo(e,t){return this.rendition=new O.a(this,t),this.rendition.attachTo(e),this.rendition}setRequestCredentials(e){this.settings.requestCredentials=e}setRequestHeaders(e){this.settings.requestHeaders=e}unarchive(e,t){return this.archive=new R,this.archive.open(e,t)}store(e){let t=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,n=this.settings.requestMethod||u.bind(this);return this.storage=new L(e,n,this.resolve.bind(this)),this.request=this.storage.request.bind(this.storage),this.opened.then(()=>{this.archived&&(this.storage.requester=this.archive.request.bind(this.archive));let e=(e,t)=>{t.output=this.resources.substitute(e,t.url)};this.resources.settings.replacements=t||"blobUrl",this.resources.replacements().then(()=>this.resources.replaceCss()),this.storage.on("offline",()=>{this.url=new o.a("/",""),this.spine.hooks.serialize.register(e)}),this.storage.on("online",()=>{this.url=i,this.spine.hooks.serialize.deregister(e)})}),this.storage}coverUrl(){return this.loaded.cover.then(()=>this.cover?this.archived?this.archive.createUrl(this.cover):this.cover:null)}replacements(){return this.spine.hooks.serialize.register((e,t)=>{t.output=this.resources.substitute(e,t.url)}),this.resources.replacements().then(()=>this.resources.replaceCss())}getRange(e){var t=new l.a(e),i=this.spine.get(t.spinePos),n=this.load.bind(this);return i?i.load(n).then((function(e){return t.toRange(i.document)})):new Promise((e,t)=>{t("CFI could not be found")})}key(e){var t=e||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${m.b}:${t}`}destroy(){this.opened=void 0,this.loading=void 0,this.loaded=void 0,this.ready=void 0,this.isOpen=!1,this.isRendered=!1,this.spine&&this.spine.destroy(),this.locations&&this.locations.destroy(),this.pageList&&this.pageList.destroy(),this.archive&&this.archive.destroy(),this.resources&&this.resources.destroy(),this.container&&this.container.destroy(),this.packaging&&this.packaging.destroy(),this.rendition&&this.rendition.destroy(),this.displayOptions&&this.displayOptions.destroy(),this.spine=void 0,this.locations=void 0,this.pageList=void 0,this.archive=void 0,this.resources=void 0,this.container=void 0,this.packaging=void 0,this.rendition=void 0,this.navigation=void 0,this.url=void 0,this.path=void 0,this.archived=!1}}r()(H.prototype);t.a=H},function(e,t,i){var n=i(14).NAMESPACE;function r(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function o(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(r):[]}(e);return Object.keys(t.reduce(s,{}))}function a(e,t){for(var i in e)t[i]=e[i]}function l(e,t){var i=e.prototype;if(!(i instanceof t)){function n(){}n.prototype=t.prototype,a(i,n=new n),e.prototype=i=n}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var c={},h=c.ELEMENT_NODE=1,u=c.ATTRIBUTE_NODE=2,d=c.TEXT_NODE=3,f=c.CDATA_SECTION_NODE=4,p=c.ENTITY_REFERENCE_NODE=5,g=c.ENTITY_NODE=6,m=c.PROCESSING_INSTRUCTION_NODE=7,v=c.COMMENT_NODE=8,y=c.DOCUMENT_NODE=9,b=c.DOCUMENT_TYPE_NODE=10,w=c.DOCUMENT_FRAGMENT_NODE=11,x=c.NOTATION_NODE=12,_={},E={},k=(_.INDEX_SIZE_ERR=(E[1]="Index size error",1),_.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),_.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),T=(_.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),_.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),_.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),_.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),_.NOT_FOUND_ERR=(E[8]="Not found",8)),S=(_.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),_.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));_.INVALID_STATE_ERR=(E[11]="Invalid state",11),_.SYNTAX_ERR=(E[12]="Syntax error",12),_.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),_.NAMESPACE_ERR=(E[14]="Invalid namespace",14),_.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function C(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,C);return i.code=e,t&&(this.message=this.message+": "+t),i}function N(){}function O(e,t){this._node=e,this._refresh=t,A(this)}function A(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);ae(e,"length",i.length),a(i,e),e._inc=t}}function I(){}function R(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function D(e,t,i,r){if(r?t[R(t,r)]=i:t[t.length++]=i,e){i.ownerElement=e;var s=e.ownerDocument;s&&(r&&F(s,e,r),function(e,t,i){e&&e._inc++,i.namespaceURI===n.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(s,e,i))}}function j(e,t,i){var n=R(t,i);if(!(n>=0))throw C(T,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var s=e.ownerDocument;s&&(F(s,e,i),i.ownerElement=null)}}function z(){}function L(){}function B(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function P(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(P(e,t))return!0}while(e=e.nextSibling)}function M(){}function F(e,t,i,r){e&&e._inc++,i.namespaceURI===n.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function q(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s}}}function U(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,q(e.ownerDocument,e),t}function W(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===w){var r=t.firstChild;if(null==r)return t;var s=t.lastChild}else r=s=t;var o=i?i.previousSibling:e.lastChild;r.previousSibling=o,s.nextSibling=i,o?o.nextSibling=r:e.firstChild=r,null==i?e.lastChild=s:i.previousSibling=s;do{r.parentNode=e}while(r!==s&&(r=r.nextSibling));return q(e.ownerDocument||e,e),t.nodeType==w&&(t.firstChild=t.lastChild=null),t}function H(){this._nsMap={}}function $(){}function X(){}function Y(){}function V(){}function Z(){}function G(){}function K(){}function Q(){}function J(){}function ee(){}function te(){}function ie(){}function ne(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var o=[{namespace:s,prefix:null}];return oe(this,i,e,t,o),i.join("")}function re(e,t,i){var r=e.prefix||"",s=e.namespaceURI;if(!s)return!1;if("xml"===r&&s===n.XML||s===n.XMLNS)return!1;for(var o=i.length;o--;){var a=i[o];if(a.prefix===r)return a.namespace!==s}return!0}function se(e,t,i){e.push(" ",t,'="',i.replace(/[<&"]/g,B),'"')}function oe(e,t,i,r,s){if(s||(s=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var o=e.attributes,a=o.length,l=e.firstChild,c=e.tagName,g=c;if(!(i=n.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var x,_=0;_<o.length;_++)if("xmlns"===o.item(_).name){x=o.item(_).value;break}if(!x)for(var E=s.length-1;E>=0;E--){if(""===(k=s[E]).prefix&&k.namespace===e.namespaceURI){x=k.namespace;break}}if(x!==e.namespaceURI)for(E=s.length-1;E>=0;E--){var k;if((k=s[E]).namespace===e.namespaceURI){k.prefix&&(g=k.prefix+":"+c);break}}}t.push("<",g);for(var T=0;T<a;T++){"xmlns"==(S=o.item(T)).prefix?s.push({prefix:S.localName,namespace:S.value}):"xmlns"==S.nodeName&&s.push({prefix:"",namespace:S.value})}for(T=0;T<a;T++){var S,C,N;if(re(S=o.item(T),0,s))se(t,(C=S.prefix||"")?"xmlns:"+C:"xmlns",N=S.namespaceURI),s.push({prefix:C,namespace:N});oe(S,t,i,r,s)}if(c===g&&re(e,0,s))se(t,(C=e.prefix||"")?"xmlns:"+C:"xmlns",N=e.namespaceURI),s.push({prefix:C,namespace:N});if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),i&&/^script$/i.test(c))for(;l;)l.data?t.push(l.data):oe(l,t,i,r,s.slice()),l=l.nextSibling;else for(;l;)oe(l,t,i,r,s.slice()),l=l.nextSibling;t.push("</",g,">")}else t.push("/>");return;case y:case w:for(l=e.firstChild;l;)oe(l,t,i,r,s.slice()),l=l.nextSibling;return;case u:return se(t,e.name,e.value);case d:return t.push(e.data.replace(/[<&]/g,B).replace(/]]>/g,"]]>"));case f:return t.push("<![CDATA[",e.data,"]]>");case v:return t.push("\x3c!--",e.data,"--\x3e");case b:var O=e.publicId,A=e.systemId;if(t.push("<!DOCTYPE ",e.name),O)t.push(" PUBLIC ",O),A&&"."!=A&&t.push(" ",A),t.push(">");else if(A&&"."!=A)t.push(" SYSTEM ",A,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case m:return t.push("<?",e.target," ",e.data,"?>");case p:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ae(e,t,i){e[t]=i}C.prototype=Error.prototype,a(_,C),N.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)oe(this[n],i,e,t);return i.join("")}},O.prototype.item=function(e){return A(this),this[e]},l(O,N),I.prototype={length:0,item:N.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new C(S);var i=this.getNamedItem(e.nodeName);return D(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new C(S);return t=this.getNamedItemNS(e.namespaceURI,e.localName),D(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return j(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return j(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},z.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var n=new M;if(n.implementation=this,n.childNodes=new N,n.doctype=i||null,i&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new G;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=i||"",n}},L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return W(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return U(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,i,n){var r=new i.constructor;for(var s in i){var o=i[s];"object"!=typeof o&&o!=r[s]&&(r[s]=o)}i.childNodes&&(r.childNodes=new N);switch(r.ownerDocument=t,r.nodeType){case h:var a=i.attributes,l=r.attributes=new I,c=a.length;l._ownerElement=r;for(var d=0;d<c;d++)r.setAttributeNode(e(t,a.item(d),!0));break;case u:n=!0}if(n)for(var f=i.firstChild;f;)r.appendChild(e(t,f,n)),f=f.nextSibling;return r}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==d&&e.nodeType==d?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(i[n]==e)return n;t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},a(c,L),a(c,L.prototype),M.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e}return null==this.documentElement&&e.nodeType==h&&(this.documentElement=e),W(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),U(this,e)},importNode:function(e,t){return function e(t,i,n){var r;switch(i.nodeType){case h:(r=i.cloneNode(!1)).ownerDocument=t;case w:break;case u:n=!0}r||(r=i.cloneNode(!1));if(r.ownerDocument=t,r.parentNode=null,n)for(var s=i.firstChild;s;)r.appendChild(e(t,s,n)),s=s.nextSibling;return r}(this,e,t)},getElementById:function(e){var t=null;return P(this.documentElement,(function(i){if(i.nodeType==h&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=o(e);return new O(this,(function(i){var n=[];return t.length>0&&P(i.documentElement,(function(r){if(r!==i&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var l=o(s);a=t.every((c=l,function(e){return c&&-1!==c.indexOf(e)}))}a&&n.push(r)}}var c})),n}))},createElement:function(e){var t=new H;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new V;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new te;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new $;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new J;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new H,n=t.split(":"),r=i.attributes=new I;return i.childNodes=new N,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i,i},createAttributeNS:function(e,t){var i=new $,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},l(M,L),H.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?this.insertBefore(e,null):function(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t);n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,q(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new O(this,(function(t){var i=[];return P(t,(function(n){n===t||n.nodeType!=h||"*"!==e&&n.tagName!=e||i.push(n)})),i}))},getElementsByTagNameNS:function(e,t){return new O(this,(function(i){var n=[];return P(i,(function(r){r===i||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},M.prototype.getElementsByTagName=H.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=H.prototype.getElementsByTagNameNS,l(H,L),$.prototype.nodeType=u,l($,L),X.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[k])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},l(X,L),Y.prototype={nodeName:"#text",nodeType:d,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(Y,X),V.prototype={nodeName:"#comment",nodeType:v},l(V,X),Z.prototype={nodeName:"#cdata-section",nodeType:f},l(Z,X),G.prototype.nodeType=b,l(G,L),K.prototype.nodeType=x,l(K,L),Q.prototype.nodeType=g,l(Q,L),J.prototype.nodeType=p,l(J,L),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=w,l(ee,L),te.prototype.nodeType=m,l(te,L),ie.prototype.serializeToString=function(e,t,i){return ne.call(e,t,i)},L.prototype.toString=ne;try{if(Object.defineProperty){Object.defineProperty(O.prototype,"length",{get:function(){return A(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case h:case w:var i=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&i.push(e(t)),t=t.nextSibling;return i.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case h:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ae=function(e,t,i){e["$$"+t]=i}}}catch(e){}t.DocumentType=G,t.DOMException=C,t.DOMImplementation=z,t.Element=H,t.Node=L,t.NodeList=N,t.XMLSerializer=ie},function(e,t,i){var n=i(52),r="object"==typeof self&&self&&self.Object===Object&&self,s=n||r||Function("return this")();e.exports=s},function(e,t,i){var n=i(26).Symbol;e.exports=n},function(e,t,i){var n=i(21),r=i(19);e.exports=function(e,t,i){var s=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(i)&&(s="leading"in i?!!i.leading:s,o="trailing"in i?!!i.trailing:o),n(e,t,{leading:s,maxWait:t,trailing:o})}},function(t,i){t.exports=e},function(e,t,i){"use strict";i.r(t),function(e){var n=i(24),r=i(16),s=i(2),o=i(12),a=i(0),l=i(1);i(20),i(10),i(22);function c(e,t){return new n.a(e,t)}c.VERSION=l.b,void 0!==e&&(e.EPUBJS_VERSION=l.b),c.Book=n.a,c.Rendition=r.a,c.Contents=o.a,c.CFI=s.a,c.utils=a,t.default=c}.call(this,i(17))},function(e,t,i){"use strict";var n=i(32),r=i(40),s=i(41),o=i(42);(e.exports=function(e,t){var i,s,a,l,c;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],null==e?(i=a=!0,s=!1):(i=o.call(e,"c"),s=o.call(e,"e"),a=o.call(e,"w")),c={value:t,configurable:i,enumerable:s,writable:a},l?n(r(l),c):c}).gs=function(e,t,i){var a,l,c,h;return"string"!=typeof e?(c=i,i=t,t=e,e=null):c=arguments[3],null==t?t=void 0:s(t)?null==i?i=void 0:s(i)||(c=i,i=void 0):(c=t,t=i=void 0),null==e?(a=!0,l=!1):(a=o.call(e,"c"),l=o.call(e,"e")),h={get:t,set:i,configurable:a,enumerable:l},c?n(r(c),h):h}},function(e,t,i){"use strict";e.exports=i(33)()?Object.assign:i(34)},function(e,t,i){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,i){"use strict";var n=i(35),r=i(39),s=Math.max;e.exports=function(e,t){var i,o,a,l=s(arguments.length,2);for(e=Object(r(e)),a=function(n){try{e[n]=t[n]}catch(e){i||(i=e)}},o=1;o<l;++o)n(t=arguments[o]).forEach(a);if(void 0!==i)throw i;return e}},function(e,t,i){"use strict";e.exports=i(36)()?Object.keys:i(37)},function(e,t,i){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,i){"use strict";var n=i(18),r=Object.keys;e.exports=function(e){return r(n(e)?Object(e):e)}},function(e,t,i){"use strict";e.exports=function(){}},function(e,t,i){"use strict";var n=i(18);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,i){"use strict";var n=i(18),r=Array.prototype.forEach,s=Object.create,o=function(e,t){var i;for(i in e)t[i]=e[i]};e.exports=function(e){var t=s(null);return r.call(arguments,(function(e){n(e)&&o(Object(e),t)})),t}},function(e,t,i){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,i){"use strict";e.exports=i(43)()?String.prototype.contains:i(44)},function(e,t,i){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,i){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,i){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,i){var n=i(14),r=i(25),s=i(47),o=i(48),a=r.DOMImplementation,l=n.NAMESPACE,c=o.ParseError,h=o.XMLReader;function u(e){this.options=e||{locator:{}}}function d(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function p(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function m(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}u.prototype.parseFromString=function(e,t){var i=this.options,n=new h,r=i.domBuilder||new d,o=i.errorHandler,a=i.locator,c=i.xmlns||{},u=/\/x?html?$/.test(t),f=u?s.HTML_ENTITIES:s.XML_ENTITIES;return a&&r.setDocumentLocator(a),n.errorHandler=function(e,t,i){if(!e){if(t instanceof d)return t;e=t}var n={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(i){e(t,i)}:e),n[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+p(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(o,r,a),n.domBuilder=i.domBuilder||r,u&&(c[""]=l.HTML),c.xml=c.xml||l.XML,e&&"string"==typeof e?n.parse(e,c,f):n.errorHandler.error("invalid doc source"),r.doc},d.prototype={startDocument:function(){this.doc=(new a).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,s=r.createElementNS(e,i||t),o=n.length;m(this,s),this.currentElement=s,this.locator&&f(this.locator,s);for(var a=0;a<o;a++){e=n.getURI(a);var l=n.getValue(a),c=(i=n.getQName(a),r.createAttributeNS(e,i));this.locator&&f(n.getLocator(a),c),c.value=c.nodeValue=l,s.setAttributeNode(c)}},endElement:function(e,t,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,i),m(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&f(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&f(this.locator,n),m(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&f(this.locator,r),m(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,p(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,p(this.locator))},fatalError:function(e){throw new c(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){d.prototype[e]=function(){return null}})),t.__DOMHandler=d,t.DOMParser=u,t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer},function(e,t,i){var n=i(14).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,i){var n=i(14).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function a(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function l(){}function c(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function h(e,t,i,r,s,o){function a(e,t,n){i.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),i.addValue(e,t,n)}for(var l,c=++t,h=0;;){var u=e.charAt(c);switch(u){case"=":if(1===h)l=e.slice(t,c),h=3;else{if(2!==h)throw new Error("attribute equal must after attrName");h=3}break;case"'":case'"':if(3===h||1===h){if(1===h&&(o.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,!((c=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");a(l,d=e.slice(t,c).replace(/&#?\w+;/g,s),t-1),h=5}else{if(4!=h)throw new Error('attribute value must after "="');a(l,d=e.slice(t,c).replace(/&#?\w+;/g,s),t),o.warning('attribute "'+l+'" missed start quot('+u+")!!"),t=c+1,h=5}break;case"/":switch(h){case 0:i.setTagName(e.slice(t,c));case 5:case 6:case 7:h=7,i.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==h&&i.setTagName(e.slice(t,c)),c;case">":switch(h){case 0:i.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,c)).slice(-1)&&(i.closed=!0,d=d.slice(0,-1));case 2:2===h&&(d=l),4==h?(o.warning('attribute "'+d+'" missed quot(")!'),a(l,d.replace(/&#?\w+;/g,s),t)):(n.isHTML(r[""])&&d.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),a(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"":u=" ";default:if(u<=" ")switch(h){case 0:i.setTagName(e.slice(t,c)),h=6;break;case 1:l=e.slice(t,c),h=2;break;case 4:var d=e.slice(t,c).replace(/&#?\w+;/g,s);o.warning('attribute "'+d+'" missed quot(")!!'),a(l,d,t);case 5:h=6}else switch(h){case 2:i.tagName;n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),a(l,l,t),t=c,h=1;break;case 5:o.warning('attribute space is required"'+l+'"!!');case 6:h=1,t=c;break;case 3:h=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function u(e,t,i){for(var r=e.tagName,s=null,o=e.length;o--;){var a=e[o],l=a.qName,c=a.value;if((f=l.indexOf(":"))>0)var h=a.prefix=l.slice(0,f),u=l.slice(f+1),d="xmlns"===h&&u;else u=l,h=null,d="xmlns"===l&&"";a.localName=u,!1!==d&&(null==s&&(s={},p(i,i={})),i[d]=s[d]=c,a.uri=n.XMLNS,t.startPrefixMapping(d,c))}for(o=e.length;o--;){(h=(a=e[o]).prefix)&&("xml"===h&&(a.uri=n.XML),"xmlns"!==h&&(a.uri=i[h||""]))}var f;(f=r.indexOf(":"))>0?(h=e.prefix=r.slice(0,f),u=e.localName=r.slice(f+1)):(h=null,u=e.localName=r);var g=e.uri=i[h||""];if(t.startElement(g,u,r,e),!e.closed)return e.currentNSMap=i,e.localNSMap=s,!0;if(t.endElement(g,u,r),s)for(h in s)t.endPrefixMapping(h)}function d(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=e.indexOf("</"+i+">",t),o=e.substring(t+1,s);if(/[&<]/.test(o))return/^script$/i.test(i)?(r.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,n),r.characters(o,0,o.length),s)}return t+1}function f(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function p(e,t){for(var i in e)t[i]=e[i]}function g(e,t,i,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var s=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var a=s[1][0],l=!1,c=!1;o>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],c=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var h=s[o-1];return i.startDTD(a,l,c),i.endDTD(),h.index+h[0].length}}return-1}function m(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function v(){this.attributeNames={}}a.prototype=new Error,a.prototype.name=a.name,l.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),p(t,t={}),function(e,t,i,r,s){function o(e){var t=e.slice(1,-1);return t in i?i[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>k){var i=e.substring(k,t).replace(/&#?\w+;/g,o);x&&p(k),r.characters(i,0,t-k),k=t}}function p(t,i){for(;t>=b&&(i=w.exec(e));)y=i.index,b=y+i[0].length,x.lineNumber++;x.columnNumber=t-y+1}var y=0,b=0,w=/.*(?:\r\n?|\n)|.*$/g,x=r.locator,_=[{currentNSMap:t}],E={},k=0;for(;;){try{var T=e.indexOf("<",k);if(T<0){if(!e.substr(k).match(/^\s*$/)){var S=r.doc,C=S.createTextNode(e.substr(k));S.appendChild(C),r.currentElement=C}return}switch(T>k&&l(T),e.charAt(T+1)){case"/":var N=e.indexOf(">",T+3),O=e.substring(T+2,N).replace(/[ \t\n\r]+$/g,""),A=_.pop();N<0?(O=e.substring(T+2).replace(/[\s<].*/,""),s.error("end tag name: "+O+" is not complete:"+A.tagName),N=T+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),s.error("end tag name: "+O+" maybe not complete"),N=T+1+O.length);var I=A.localNSMap,R=A.tagName==O;if(R||A.tagName&&A.tagName.toLowerCase()==O.toLowerCase()){if(r.endElement(A.uri,A.localName,O),I)for(var D in I)r.endPrefixMapping(D);R||s.fatalError("end tag name: "+O+" is not match the current start tagName:"+A.tagName)}else _.push(A);N++;break;case"?":x&&p(T),N=m(e,T,r);break;case"!":x&&p(T),N=g(e,T,r,s);break;default:x&&p(T);var j=new v,z=_[_.length-1].currentNSMap,L=(N=h(e,T,j,z,o,s),j.length);if(!j.closed&&f(e,N,j.tagName,E)&&(j.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),x&&L){for(var B=c(x,{}),P=0;P<L;P++){var M=j[P];p(M.offset),M.locator=c(x,{})}r.locator=B,u(j,r,z)&&_.push(j),r.locator=x}else u(j,r,z)&&_.push(j);n.isHTML(j.uri)&&!j.closed?N=d(e,N,j.tagName,o,r):N++}}catch(e){if(e instanceof a)throw e;s.error("element parse error: "+e),N=-1}N>k?k=N:l(Math.max(T,k)+1)}}(e,t,i,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=a},function(e,t,i){"use strict";function n(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=n,t.default={createElement:n}},function(e,t,i){"use strict";function n(e,t){function i(i){for(var n=t.length-1;n>=0;n--){var o=t[n],a=i.clientX,l=i.clientY;if(i.touches&&i.touches.length&&(a=i.touches[0].clientX,l=i.touches[0].clientY),s(o,e,a,l)){o.dispatchEvent(r(i));break}}}if("iframe"===e.nodeName||"IFRAME"===e.nodeName)try{this.target=e.contentDocument}catch(t){this.target=e}else this.target=e;for(var n=["mouseup","mousedown","click","touchstart"],o=0;o<n.length;o++){var a=n[o];this.target.addEventListener(a,(function(e){return i(e)}),!1)}}function r(e){var t=Object.assign({},e,{bubbles:!1});try{return new MouseEvent(e.type,t)}catch(n){var i=document.createEvent("MouseEvents");return i.initMouseEvent(e.type,!1,t.cancelable,t.view,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),i}}function s(e,t,i,n){var r=t.getBoundingClientRect();function s(e,t,i){var n=e.top-r.top,s=e.left-r.left,o=n+e.height,a=s+e.width;return n<=i&&s<=t&&o>i&&a>t}if(!s(e.getBoundingClientRect(),i,n))return!1;for(var o=e.getClientRects(),a=0,l=o.length;a<l;a++)if(s(o[a],i,n))return!0;return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.proxyMouse=n,t.clone=r,t.default={proxyMouse:n}},function(e,t,i){var n=i(26);e.exports=function(){return n.Date.now()}},function(e,t,i){(function(t){var i="object"==typeof t&&t&&t.Object===Object&&t;e.exports=i}).call(this,i(17))},function(e,t,i){var n=i(54),r=i(19),s=i(56),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var i=a.test(e);return i||l.test(e)?c(e.slice(2),i?2:8):o.test(e)?NaN:+e}},function(e,t,i){var n=i(55),r=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(r,""):e}},function(e,t){var i=/\s/;e.exports=function(e){for(var t=e.length;t--&&i.test(e.charAt(t)););return t}},function(e,t,i){var n=i(57),r=i(60);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},function(e,t,i){var n=i(27),r=i(58),s=i(59),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):s(e)}},function(e,t,i){var n=i(27),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(e){}var r=o.call(e);return n&&(t?e[a]=i:delete e[a]),r}},function(e,t){var i=Object.prototype.toString;e.exports=function(e){return i.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}}]).default})), +if(function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var i=[],n=Object.getPrototypeOf,r=i.slice,s=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},o=i.push,a=i.indexOf,l={},h=l.toString,c=l.hasOwnProperty,u=c.toString,d=u.call(Object),f={},p=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},g=function(t){return null!=t&&t===t.window},m=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,i){var n,r,s=(i=i||m).createElement("script");if(s.text=t,e)for(n in v)(r=e[n]||e.getAttribute&&e.getAttribute(n))&&s.setAttribute(n,r);i.head.appendChild(s).parentNode.removeChild(s)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[h.call(t)]||"object":typeof t}var w=/HTML$/i,x=function(t,e){return new x.fn.init(t,e)};function _(t){var e=!!t&&"length"in t&&t.length,i=b(t);return!p(t)&&!g(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}x.fn=x.prototype={jquery:"3.7.1",constructor:x,length:0,toArray:function(){return r.call(this)},get:function(t){return null==t?r.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,(function(e,i){return t.call(e,i,e)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:i.sort,splice:i.splice},x.extend=x.fn.extend=function(){var t,e,i,n,r,s,o=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof o&&(h=o,o=arguments[a]||{},a++),"object"==typeof o||p(o)||(o={}),a===l&&(o=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&o!==n&&(h&&n&&(x.isPlainObject(n)||(r=Array.isArray(n)))?(i=o[e],s=r&&!Array.isArray(i)?[]:r||x.isPlainObject(i)?i:{},r=!1,o[e]=x.extend(h,s,n)):void 0!==n&&(o[e]=n));return o},x.extend({expando:"jQuery"+("3.7.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==h.call(t))&&(!(e=n(t))||"function"==typeof(i=c.call(e,"constructor")&&e.constructor)&&u.call(i)===d)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,i){y(t,{nonce:e&&e.nonce},i)},each:function(t,e){var i,n=0;if(_(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},text:function(t){var e,i="",n=0,r=t.nodeType;if(!r)for(;e=t[n++];)i+=x.text(e);return 1===r||11===r?t.textContent:9===r?t.documentElement.textContent:3===r||4===r?t.nodeValue:i},makeArray:function(t,e){var i=e||[];return null!=t&&(_(Object(t))?x.merge(i,"string"==typeof t?[t]:t):o.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:a.call(e,t,i)},isXMLDoc:function(t){var e=t&&t.namespaceURI,i=t&&(t.ownerDocument||t).documentElement;return!w.test(e||i&&i.nodeName||"HTML")},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;n<i;n++)t[r++]=e[n];return t.length=r,t},grep:function(t,e,i){for(var n=[],r=0,s=t.length,o=!i;r<s;r++)!e(t[r],r)!==o&&n.push(t[r]);return n},map:function(t,e,i){var n,r,o=0,a=[];if(_(t))for(n=t.length;o<n;o++)null!=(r=e(t[o],o,i))&&a.push(r);else for(o in t)null!=(r=e(t[o],o,i))&&a.push(r);return s(a)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=i[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var k=i.pop,T=i.sort,S=i.splice,C="[\\x20\\t\\r\\n\\f]",N=new RegExp("^"+C+"+|((?:^|[^\\\\])(?:\\\\.)*)"+C+"+$","g");x.contains=function(t,e){var i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(t.contains?t.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))};var O=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}x.escapeSelector=function(t){return(t+"").replace(O,I)};var A=m,R=o;!function(){var e,n,s,o,l,h,u,d,p,g,m=R,v=x.expando,y=0,b=0,w=tt(),_=tt(),O=tt(),I=tt(),D=function(t,e){return t===e&&(l=!0),0},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",z="(?:\\\\[\\da-fA-F]{1,6}"+C+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",L="\\["+C+"*("+z+")(?:"+C+"*([*^$|!~]?=)"+C+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+C+"*\\]",P=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+L+")*)|.*)\\)|)",B=new RegExp(C+"+","g"),M=new RegExp("^"+C+"*,"+C+"*"),F=new RegExp("^"+C+"*([>+~]|"+C+")"+C+"*"),q=new RegExp(C+"|>"),U=new RegExp(P),W=new RegExp("^"+z+"$"),$={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+C+"*(even|odd|(([+-]|)(\\d*)n|)"+C+"*(?:([+-]|)"+C+"*(\\d+)|))"+C+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+C+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+C+"*((?:-\\d)?\\d*)"+C+"*\\)|)(?=[^-]|$)","i")},H=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,V=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+C+"?|\\\\([^\\r\\n\\f])","g"),G=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},K=function(){lt()},Q=dt((function(t){return!0===t.disabled&&E(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(i=r.call(A.childNodes),A.childNodes),i[A.childNodes.length].nodeType}catch(t){m={apply:function(t,e){R.apply(t,r.call(e))},call:function(t){R.apply(t,r.call(arguments,1))}}}function J(t,e,i,n){var r,s,o,a,l,c,u,g=e&&e.ownerDocument,y=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==y&&9!==y&&11!==y)return i;if(!n&&(lt(e),e=e||h,d)){if(11!==y&&(l=Y.exec(t)))if(r=l[1]){if(9===y){if(!(o=e.getElementById(r)))return i;if(o.id===r)return m.call(i,o),i}else if(g&&(o=g.getElementById(r))&&J.contains(e,o)&&o.id===r)return m.call(i,o),i}else{if(l[2])return m.apply(i,e.getElementsByTagName(t)),i;if((r=l[3])&&e.getElementsByClassName)return m.apply(i,e.getElementsByClassName(r)),i}if(!(I[t+" "]||p&&p.test(t))){if(u=t,g=e,1===y&&(q.test(t)||F.test(t))){for((g=V.test(t)&&at(e.parentNode)||e)==e&&f.scope||((a=e.getAttribute("id"))?a=x.escapeSelector(a):e.setAttribute("id",a=v)),s=(c=ct(t)).length;s--;)c[s]=(a?"#"+a:":scope")+" "+ut(c[s]);u=c.join(",")}try{return m.apply(i,g.querySelectorAll(u)),i}catch(e){I(t,!0)}finally{a===v&&e.removeAttribute("id")}}}return yt(t.replace(N,"$1"),e,i,n)}function tt(){var t=[];return function e(i,r){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=r}}function et(t){return t[v]=!0,t}function it(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function nt(t){return function(e){return E(e,"input")&&e.type===t}}function rt(t){return function(e){return(E(e,"input")||E(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Q(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(i,n){for(var r,s=t([],i.length,e),o=s.length;o--;)i[r=s[o]]&&(i[r]=!(n[r]=i[r]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function lt(t){var e,i=t?t.ownerDocument||t:A;return i!=h&&9===i.nodeType&&i.documentElement?(u=(h=i).documentElement,d=!x.isXMLDoc(h),g=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&A!=h&&(e=h.defaultView)&&e.top!==e&&e.addEventListener("unload",K),f.getById=it((function(t){return u.appendChild(t).id=x.expando,!h.getElementsByName||!h.getElementsByName(x.expando).length})),f.disconnectedMatch=it((function(t){return g.call(t,"*")})),f.scope=it((function(){return h.querySelectorAll(":scope")})),f.cssHas=it((function(){try{return h.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),f.getById?(n.filter.ID=function(t){var e=t.replace(Z,G);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(Z,G);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var i,n,r,s=e.getElementById(t);if(s){if((i=s.getAttributeNode("id"))&&i.value===t)return[s];for(r=e.getElementsByName(t),n=0;s=r[n++];)if((i=s.getAttributeNode("id"))&&i.value===t)return[s]}return[]}}),n.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},n.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(t)},p=[],it((function(t){var e;u.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+C+"*(?:value|"+j+")"),t.querySelectorAll("[id~="+v+"-]").length||p.push("~="),t.querySelectorAll("a#"+v+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=h.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),u.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+C+"*name"+C+"*="+C+"*(?:''|\"\")")})),f.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),D=function(t,e){if(t===e)return l=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===i?t===h||t.ownerDocument==A&&J.contains(A,t)?-1:e===h||e.ownerDocument==A&&J.contains(A,e)?1:o?a.call(o,t)-a.call(o,e):0:4&i?-1:1)},h):h}for(e in J.matches=function(t,e){return J(t,null,null,e)},J.matchesSelector=function(t,e){if(lt(t),d&&!I[e+" "]&&(!p||!p.test(e)))try{var i=g.call(t,e);if(i||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){I(e,!0)}return J(e,h,null,[t]).length>0},J.contains=function(t,e){return(t.ownerDocument||t)!=h&<(t),x.contains(t,e)},J.attr=function(t,e){(t.ownerDocument||t)!=h&<(t);var i=n.attrHandle[e.toLowerCase()],r=i&&c.call(n.attrHandle,e.toLowerCase())?i(t,e,!d):void 0;return void 0!==r?r:t.getAttribute(e)},J.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},x.uniqueSort=function(t){var e,i=[],n=0,s=0;if(l=!f.sortStable,o=!f.sortStable&&r.call(t,0),T.call(t,D),l){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)S.call(t,i[n],1)}return o=null,t},x.fn.uniqueSort=function(){return this.pushStack(x.uniqueSort(r.apply(this)))},(n=x.expr={cacheLength:50,createPseudo:et,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,G),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,G),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||J.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&J.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return $.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&U.test(i)&&(e=ct(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Z,G).toLowerCase();return"*"===t?function(){return!0}:function(t){return E(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+C+")"+t+"("+C+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var r=J.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r.replace(B," ")+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,f,p=s!==o?"nextSibling":"previousSibling",g=e.parentNode,m=a&&e.nodeName.toLowerCase(),b=!l&&!a,w=!1;if(g){if(s){for(;p;){for(u=e;u=u[p];)if(a?E(u,m):1===u.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&b){for(w=(d=(h=(c=g[v]||(g[v]={}))[t]||[])[0]===y&&h[1])&&h[2],u=d&&g.childNodes[d];u=++d&&u&&u[p]||(w=d=0)||f.pop();)if(1===u.nodeType&&++w&&u===e){c[t]=[y,d,w];break}}else if(b&&(w=d=(h=(c=e[v]||(e[v]={}))[t]||[])[0]===y&&h[1]),!1===w)for(;(u=++d&&u&&u[p]||(w=d=0)||f.pop())&&(!(a?E(u,m):1===u.nodeType)||!++w||(b&&((c=u[v]||(u[v]={}))[t]=[y,w]),u!==e)););return(w-=r)===n||w%n==0&&w/n>=0}}},PSEUDO:function(t,e){var i,r=n.pseudos[t]||n.setFilters[t.toLowerCase()]||J.error("unsupported pseudo: "+t);return r[v]?r(e):r.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,i){for(var n,s=r(t,e),o=s.length;o--;)t[n=a.call(t,s[o])]=!(i[n]=s[o])})):function(t){return r(t,0,i)}):r}},pseudos:{not:et((function(t){var e=[],i=[],n=vt(t.replace(N,"$1"));return n[v]?et((function(t,e,i,r){for(var s,o=n(t,null,r,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))})):function(t,r,s){return e[0]=t,n(e,null,s,i),e[0]=null,!i.pop()}})),has:et((function(t){return function(e){return J(t,e).length>0}})),contains:et((function(t){return t=t.replace(Z,G),function(e){return(e.textContent||x.text(e)).indexOf(t)>-1}})),lang:et((function(t){return W.test(t||"")||J.error("unsupported lang: "+t),t=t.replace(Z,G).toLowerCase(),function(e){var i;do{if(i=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===u},focus:function(t){return t===function(){try{return h.activeElement}catch(t){}}()&&h.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return E(t,"input")&&!!t.checked||E(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return X.test(t.nodeName)},input:function(t){return H.test(t.nodeName)},button:function(t){return E(t,"input")&&"button"===t.type||E(t,"button")},text:function(t){var e;return E(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,i){return[i<0?i+e:i]})),even:ot((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:ot((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:ot((function(t,e,i){var n;for(n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t})),gt:ot((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=nt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=rt(e);function ht(){}function ct(t,e){var i,r,s,o,a,l,h,c=_[t+" "];if(c)return e?0:c.slice(0);for(a=t,l=[],h=n.preFilter;a;){for(o in i&&!(r=M.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(s=[])),i=!1,(r=F.exec(a))&&(i=r.shift(),s.push({value:i,type:r[0].replace(N," ")}),a=a.slice(i.length)),n.filter)!(r=$[o].exec(a))||h[o]&&!(r=h[o](r))||(i=r.shift(),s.push({value:i,type:o,matches:r}),a=a.slice(i.length));if(!i)break}return e?a.length:a?J.error(t):_(t,l).slice(0)}function ut(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function dt(t,e,i){var n=e.dir,r=e.next,s=r||n,o=i&&"parentNode"===s,a=b++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,r);return!1}:function(e,i,l){var h,c,u=[y,a];if(l){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||o)if(c=e[v]||(e[v]={}),r&&E(e,r))e=e[n]||e;else{if((h=c[s])&&h[0]===y&&h[1]===a)return u[2]=h[2];if(c[s]=u,u[2]=t(e,i,l))return!0}return!1}}function ft(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function pt(t,e,i,n,r){for(var s,o=[],a=0,l=t.length,h=null!=e;a<l;a++)(s=t[a])&&(i&&!i(s,n,r)||(o.push(s),h&&e.push(a)));return o}function gt(t,e,i,n,r,s){return n&&!n[v]&&(n=gt(n)),r&&!r[v]&&(r=gt(r,s)),et((function(s,o,l,h){var c,u,d,f,p=[],g=[],v=o.length,y=s||function(t,e,i){for(var n=0,r=e.length;n<r;n++)J(t,e[n],i);return i}(e||"*",l.nodeType?[l]:l,[]),b=!t||!s&&e?y:pt(y,p,t,l,h);if(i?i(b,f=r||(s?t:v||n)?[]:o,l,h):f=b,n)for(c=pt(f,g),n(c,[],l,h),u=c.length;u--;)(d=c[u])&&(f[g[u]]=!(b[g[u]]=d));if(s){if(r||t){if(r){for(c=[],u=f.length;u--;)(d=f[u])&&c.push(b[u]=d);r(null,f=[],c,h)}for(u=f.length;u--;)(d=f[u])&&(c=r?a.call(s,d):p[u])>-1&&(s[c]=!(o[c]=d))}}else f=pt(f===o?f.splice(v,f.length):f),r?r(null,o,f,h):m.apply(o,f)}))}function mt(t){for(var e,i,r,o=t.length,l=n.relative[t[0].type],h=l||n.relative[" "],c=l?1:0,u=dt((function(t){return t===e}),h,!0),d=dt((function(t){return a.call(e,t)>-1}),h,!0),f=[function(t,i,n){var r=!l&&(n||i!=s)||((e=i).nodeType?u(t,i,n):d(t,i,n));return e=null,r}];c<o;c++)if(i=n.relative[t[c].type])f=[dt(ft(f),i)];else{if((i=n.filter[t[c].type].apply(null,t[c].matches))[v]){for(r=++c;r<o&&!n.relative[t[r].type];r++);return gt(c>1&&ft(f),c>1&&ut(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(N,"$1"),i,c<r&&mt(t.slice(c,r)),r<o&&mt(t=t.slice(r)),r<o&&ut(t))}f.push(i)}return ft(f)}function vt(t,e){var i,r=[],o=[],a=O[t+" "];if(!a){for(e||(e=ct(t)),i=e.length;i--;)(a=mt(e[i]))[v]?r.push(a):o.push(a);(a=O(t,function(t,e){var i=e.length>0,r=t.length>0,o=function(o,a,l,c,u){var f,p,g,v=0,b="0",w=o&&[],_=[],E=s,T=o||r&&n.find.TAG("*",u),S=y+=null==E?1:Math.random()||.1,C=T.length;for(u&&(s=a==h||a||u);b!==C&&null!=(f=T[b]);b++){if(r&&f){for(p=0,a||f.ownerDocument==h||(lt(f),l=!d);g=t[p++];)if(g(f,a||h,l)){m.call(c,f);break}u&&(y=S)}i&&((f=!g&&f)&&v--,o&&w.push(f))}if(v+=b,i&&b!==v){for(p=0;g=e[p++];)g(w,_,a,l);if(o){if(v>0)for(;b--;)w[b]||_[b]||(_[b]=k.call(c));_=pt(_)}m.apply(c,_),u&&!o&&_.length>0&&v+e.length>1&&x.uniqueSort(c)}return u&&(y=S,s=E),w};return i?et(o):o}(o,r))).selector=t}return a}function yt(t,e,i,r){var s,o,a,l,h,c="function"==typeof t&&t,u=!r&&ct(t=c.selector||t);if(i=i||[],1===u.length){if((o=u[0]=u[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===e.nodeType&&d&&n.relative[o[1].type]){if(!(e=(n.find.ID(a.matches[0].replace(Z,G),e)||[])[0]))return i;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(s=$.needsContext.test(t)?0:o.length;s--&&(a=o[s],!n.relative[l=a.type]);)if((h=n.find[l])&&(r=h(a.matches[0].replace(Z,G),V.test(o[0].type)&&at(e.parentNode)||e))){if(o.splice(s,1),!(t=r.length&&ut(o)))return m.apply(i,r),i;break}}return(c||vt(t,u))(r,e,!d,i,!e||V.test(t)&&at(e.parentNode)||e),i}ht.prototype=n.filters=n.pseudos,n.setFilters=new ht,f.sortStable=v.split("").sort(D).join("")===v,lt(),f.sortDetached=it((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),x.find=J,x.expr[":"]=x.expr.pseudos,x.unique=x.uniqueSort,J.compile=vt,J.select=yt,J.setDocument=lt,J.tokenize=ct,J.escape=x.escapeSelector,J.getText=x.text,J.isXML=x.isXMLDoc,J.selectors=x.expr,J.support=x.support,J.uniqueSort=x.uniqueSort}();var D=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&x(t).is(i))break;n.push(t)}return n},j=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},z=x.expr.match.needsContext,L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,i){return p(e)?x.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?x.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?x.grep(t,(function(t){return a.call(e,t)>-1!==i})):x.filter(e,t,i)}x.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?x.find.matchesSelector(n,t)?[n]:[]:x.find.matches(t,x.grep(e,(function(t){return 1===t.nodeType})))},x.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(x(t).filter((function(){for(e=0;e<n;e++)if(x.contains(r[e],this))return!0})));for(i=this.pushStack([]),e=0;e<n;e++)x.find(t,r[e],i);return n>1?x.uniqueSort(i):i},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&z.test(t)?x(t):t||[],!1).length}});var B,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||B,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:M.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),L.test(n[1])&&x.isPlainObject(e))for(n in e)p(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(r=m.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):p(t)?void 0!==i.ready?i.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,B=x(m);var F=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function U(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),i=e.length;return this.filter((function(){for(var t=0;t<i;t++)if(x.contains(this,e[t]))return!0}))},closest:function(t,e){var i,n=0,r=this.length,s=[],o="string"!=typeof t&&x(t);if(!z.test(t))for(;n<r;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(o?o.index(i)>-1:1===i.nodeType&&x.find.matchesSelector(i,t))){s.push(i);break}return this.pushStack(s.length>1?x.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?a.call(x(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return D(t,"parentNode")},parentsUntil:function(t,e,i){return D(t,"parentNode",i)},next:function(t){return U(t,"nextSibling")},prev:function(t){return U(t,"previousSibling")},nextAll:function(t){return D(t,"nextSibling")},prevAll:function(t){return D(t,"previousSibling")},nextUntil:function(t,e,i){return D(t,"nextSibling",i)},prevUntil:function(t,e,i){return D(t,"previousSibling",i)},siblings:function(t){return j((t.parentNode||{}).firstChild,t)},children:function(t){return j(t.firstChild)},contents:function(t){return null!=t.contentDocument&&n(t.contentDocument)?t.contentDocument:(E(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},(function(t,e){x.fn[t]=function(i,n){var r=x.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=x.filter(n,r)),this.length>1&&(q[t]||x.uniqueSort(r),F.test(t)&&r.reverse()),this.pushStack(r)}}));var W=/[^\x20\t\r\n\f]+/g;function $(t){return t}function H(t){throw t}function X(t,e,i,n){var r;try{t&&p(r=t.promise)?r.call(t).done(e).fail(i):t&&p(r=t.then)?r.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(W)||[],(function(t,i){e[i]=!0})),e}(t):x.extend({},t);var e,i,n,r,s=[],o=[],a=-1,l=function(){for(r=r||t.once,n=e=!0;o.length;a=-1)for(i=o.shift();++a<s.length;)!1===s[a].apply(i[0],i[1])&&t.stopOnFalse&&(a=s.length,i=!1);t.memory||(i=!1),e=!1,r&&(s=i?[]:"")},h={add:function(){return s&&(i&&!e&&(a=s.length-1,o.push(i)),function e(i){x.each(i,(function(i,n){p(n)?t.unique&&h.has(n)||s.push(n):n&&n.length&&"string"!==b(n)&&e(n)}))}(arguments),i&&!e&&l()),this},remove:function(){return x.each(arguments,(function(t,e){for(var i;(i=x.inArray(e,s,i))>-1;)s.splice(i,1),i<=a&&a--})),this},has:function(t){return t?x.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=o=[],s=i="",this},disabled:function(){return!s},lock:function(){return r=o=[],i||e||(s=i=""),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=[t,(i=i||[]).slice?i.slice():i],o.push(i),e||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},x.extend({Deferred:function(e){var i=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return x.Deferred((function(e){x.each(i,(function(i,n){var r=p(t[n[4]])&&t[n[4]];s[n[1]]((function(){var t=r&&r.apply(this,arguments);t&&p(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(e,n,r){var s=0;function o(e,i,n,r){return function(){var a=this,l=arguments,h=function(){var t,h;if(!(e<s)){if((t=n.apply(a,l))===i.promise())throw new TypeError("Thenable self-resolution");h=t&&("object"==typeof t||"function"==typeof t)&&t.then,p(h)?r?h.call(t,o(s,i,$,r),o(s,i,H,r)):(s++,h.call(t,o(s,i,$,r),o(s,i,H,r),o(s,i,$,i.notifyWith))):(n!==$&&(a=void 0,l=[t]),(r||i.resolveWith)(a,l))}},c=r?h:function(){try{h()}catch(t){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(t,c.error),e+1>=s&&(n!==H&&(a=void 0,l=[t]),i.rejectWith(a,l))}};e?c():(x.Deferred.getErrorHook?c.error=x.Deferred.getErrorHook():x.Deferred.getStackHook&&(c.error=x.Deferred.getStackHook()),t.setTimeout(c))}}return x.Deferred((function(t){i[0][3].add(o(0,t,p(r)?r:$,t.notifyWith)),i[1][3].add(o(0,t,p(e)?e:$)),i[2][3].add(o(0,t,p(n)?n:H))})).promise()},promise:function(t){return null!=t?x.extend(t,r):r}},s={};return x.each(i,(function(t,e){var o=e[2],a=e[5];r[e[1]]=o.add,a&&o.add((function(){n=a}),i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),o.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?void 0:this,arguments),this},s[e[0]+"With"]=o.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(t){var e=arguments.length,i=e,n=Array(i),s=r.call(arguments),o=x.Deferred(),a=function(t){return function(i){n[t]=this,s[t]=arguments.length>1?r.call(arguments):i,--e||o.resolveWith(n,s)}};if(e<=1&&(X(t,o.done(a(i)).resolve,o.reject,!e),"pending"===o.state()||p(s[i]&&s[i].then)))return o.then();for(;i--;)X(s[i],a(i),o.reject);return o.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&Y.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},x.readyException=function(e){t.setTimeout((function(){throw e}))};var V=x.Deferred();function Z(){m.removeEventListener("DOMContentLoaded",Z),t.removeEventListener("load",Z),x.ready()}x.fn.ready=function(t){return V.then(t).catch((function(t){x.readyException(t)})),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||V.resolveWith(m,[x]))}}),x.ready.then=V.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(x.ready):(m.addEventListener("DOMContentLoaded",Z),t.addEventListener("load",Z));var G=function(t,e,i,n,r,s,o){var a=0,l=t.length,h=null==i;if("object"===b(i))for(a in r=!0,i)G(t,e,a,i[a],!0,s,o);else if(void 0!==n&&(r=!0,p(n)||(o=!0),h&&(o?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(x(t),i)})),e))for(;a<l;a++)e(t[a],i,o?n:n.call(t[a],a,e(t[a],i)));return r?t:h?e.call(t):l?e(t[0],i):s},K=/^-ms-/,Q=/-([a-z])/g;function J(t,e){return e.toUpperCase()}function tt(t){return t.replace(K,"ms-").replace(Q,J)}var et=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function it(){this.expando=x.expando+it.uid++}it.uid=1,it.prototype={cache:function(t){var e=t[this.expando];return e||(e={},et(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,r=this.cache(t);if("string"==typeof e)r[tt(e)]=i;else for(n in e)r[tt(n)]=e[n];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][tt(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(tt):(e=tt(e))in n?[e]:e.match(W)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||x.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!x.isEmptyObject(e)}};var nt=new it,rt=new it,st=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ot=/[A-Z]/g;function at(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(ot,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:st.test(t)?JSON.parse(t):t)}(i)}catch(t){}rt.set(t,e,i)}else i=void 0;return i}x.extend({hasData:function(t){return rt.hasData(t)||nt.hasData(t)},data:function(t,e,i){return rt.access(t,e,i)},removeData:function(t,e){rt.remove(t,e)},_data:function(t,e,i){return nt.access(t,e,i)},_removeData:function(t,e){nt.remove(t,e)}}),x.fn.extend({data:function(t,e){var i,n,r,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(r=rt.get(s),1===s.nodeType&&!nt.get(s,"hasDataAttrs"))){for(i=o.length;i--;)o[i]&&0===(n=o[i].name).indexOf("data-")&&(n=tt(n.slice(5)),at(s,n,r[n]));nt.set(s,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){rt.set(this,t)})):G(this,(function(e){var i;if(s&&void 0===e)return void 0!==(i=rt.get(s,t))||void 0!==(i=at(s,t))?i:void 0;this.each((function(){rt.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){rt.remove(this,t)}))}}),x.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=nt.get(t,e),i&&(!n||Array.isArray(i)?n=nt.access(t,e,x.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=x.queue(t,e),n=i.length,r=i.shift(),s=x._queueHooks(t,e);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete s.stop,r.call(t,(function(){x.dequeue(t,e)}),s)),!n&&s&&s.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return nt.get(t,i)||nt.access(t,i,{empty:x.Callbacks("once memory").add((function(){nt.remove(t,[e+"queue",i])}))})}}),x.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?x.queue(this[0],t):void 0===e?this:this.each((function(){var i=x.queue(this,t,e);x._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&x.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){x.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=x.Deferred(),s=this,o=this.length,a=function(){--n||r.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(i=nt.get(s[o],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}});var lt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=new RegExp("^(?:([+-])=|)("+lt+")([a-z%]*)$","i"),ct=["Top","Right","Bottom","Left"],ut=m.documentElement,dt=function(t){return x.contains(t.ownerDocument,t)},ft={composed:!0};ut.getRootNode&&(dt=function(t){return x.contains(t.ownerDocument,t)||t.getRootNode(ft)===t.ownerDocument});var pt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&dt(t)&&"none"===x.css(t,"display")};function gt(t,e,i,n){var r,s,o=20,a=n?function(){return n.cur()}:function(){return x.css(t,e,"")},l=a(),h=i&&i[3]||(x.cssNumber[e]?"":"px"),c=t.nodeType&&(x.cssNumber[e]||"px"!==h&&+l)&&ht.exec(x.css(t,e));if(c&&c[3]!==h){for(l/=2,h=h||c[3],c=+l||1;o--;)x.style(t,e,c+h),(1-s)*(1-(s=a()/l||.5))<=0&&(o=0),c/=s;c*=2,x.style(t,e,c+h),i=i||[]}return i&&(c=+c||+l||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=h,n.start=c,n.end=r)),r}var mt={};function vt(t){var e,i=t.ownerDocument,n=t.nodeName,r=mt[n];return r||(e=i.body.appendChild(i.createElement(n)),r=x.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),mt[n]=r,r)}function yt(t,e){for(var i,n,r=[],s=0,o=t.length;s<o;s++)(n=t[s]).style&&(i=n.style.display,e?("none"===i&&(r[s]=nt.get(n,"display")||null,r[s]||(n.style.display="")),""===n.style.display&&pt(n)&&(r[s]=vt(n))):"none"!==i&&(r[s]="none",nt.set(n,"display",i)));for(s=0;s<o;s++)null!=r[s]&&(t[s].style.display=r[s]);return t}x.fn.extend({show:function(){return yt(this,!0)},hide:function(){return yt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){pt(this)?x(this).show():x(this).hide()}))}});var bt,wt,xt=/^(?:checkbox|radio)$/i,_t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Et=/^$|^module$|\/(?:java|ecma)script/i;bt=m.createDocumentFragment().appendChild(m.createElement("div")),(wt=m.createElement("input")).setAttribute("type","radio"),wt.setAttribute("checked","checked"),wt.setAttribute("name","t"),bt.appendChild(wt),f.checkClone=bt.cloneNode(!0).cloneNode(!0).lastChild.checked,bt.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!bt.cloneNode(!0).lastChild.defaultValue,bt.innerHTML="<option></option>",f.option=!!bt.lastChild;var kt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Tt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?x.merge([t],i):i}function St(t,e){for(var i=0,n=t.length;i<n;i++)nt.set(t[i],"globalEval",!e||nt.get(e[i],"globalEval"))}kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,f.option||(kt.optgroup=kt.option=[1,"<select multiple='multiple'>","</select>"]);var Ct=/<|&#?\w+;/;function Nt(t,e,i,n,r){for(var s,o,a,l,h,c,u=e.createDocumentFragment(),d=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===b(s))x.merge(d,s.nodeType?[s]:s);else if(Ct.test(s)){for(o=o||u.appendChild(e.createElement("div")),a=(_t.exec(s)||["",""])[1].toLowerCase(),l=kt[a]||kt._default,o.innerHTML=l[1]+x.htmlPrefilter(s)+l[2],c=l[0];c--;)o=o.lastChild;x.merge(d,o.childNodes),(o=u.firstChild).textContent=""}else d.push(e.createTextNode(s));for(u.textContent="",f=0;s=d[f++];)if(n&&x.inArray(s,n)>-1)r&&r.push(s);else if(h=dt(s),o=Tt(u.appendChild(s),"script"),h&&St(o),i)for(c=0;s=o[c++];)Et.test(s.type||"")&&i.push(s);return u}var Ot=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function At(){return!1}function Rt(t,e,i,n,r,s){var o,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Rt(t,a,i,n,e[a],s);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=At;else if(!r)return t;return 1===s&&(o=r,(r=function(t){return x().off(t),o.apply(this,arguments)}).guid=o.guid||(o.guid=x.guid++)),t.each((function(){x.event.add(this,e,r,n,i)}))}function Dt(t,e,i){i?(nt.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var i,n=nt.get(this,e);if(1&t.isTrigger&&this[e]){if(n)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(n=r.call(arguments),nt.set(this,e,n),this[e](),i=nt.get(this,e),nt.set(this,e,!1),n!==i)return t.stopImmediatePropagation(),t.preventDefault(),i}else n&&(nt.set(this,e,x.event.trigger(n[0],n.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===nt.get(t,e)&&x.event.add(t,e,It)}x.event={global:{},add:function(t,e,i,n,r){var s,o,a,l,h,c,u,d,f,p,g,m=nt.get(t);if(et(t))for(i.handler&&(i=(s=i).handler,r=s.selector),r&&x.find.matchesSelector(ut,r),i.guid||(i.guid=x.guid++),(l=m.events)||(l=m.events=Object.create(null)),(o=m.handle)||(o=m.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),h=(e=(e||"").match(W)||[""]).length;h--;)f=g=(a=Ot.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f&&(u=x.event.special[f]||{},f=(r?u.delegateType:u.bindType)||f,u=x.event.special[f]||{},c=x.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&x.expr.match.needsContext.test(r),namespace:p.join(".")},s),(d=l[f])||((d=l[f]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,p,o)||t.addEventListener&&t.addEventListener(f,o)),u.add&&(u.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),x.event.global[f]=!0)},remove:function(t,e,i,n,r){var s,o,a,l,h,c,u,d,f,p,g,m=nt.hasData(t)&&nt.get(t);if(m&&(l=m.events)){for(h=(e=(e||"").match(W)||[""]).length;h--;)if(f=g=(a=Ot.exec(e[h])||[])[1],p=(a[2]||"").split(".").sort(),f){for(u=x.event.special[f]||{},d=l[f=(n?u.delegateType:u.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)c=d[s],!r&&g!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(s,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(t,c));o&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,p,m.handle)||x.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)x.event.remove(t,f+e[h],i,n,!0);x.isEmptyObject(l)&&nt.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,s,o,a=new Array(arguments.length),l=x.event.fix(t),h=(nt.get(this,"events")||Object.create(null))[l.type]||[],c=x.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(o=x.event.handlers.call(this,l,h),e=0;(r=o[e++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,i=0;(s=r.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(n=((x.event.special[s.origType]||{}).handle||s.handler).apply(r.elem,a))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var i,n,r,s,o,a=[],l=e.delegateCount,h=t.target;if(l&&h.nodeType&&!("click"===t.type&&t.button>=1))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==t.type||!0!==h.disabled)){for(s=[],o={},i=0;i<l;i++)void 0===o[r=(n=e[i]).selector+" "]&&(o[r]=n.needsContext?x(r,this).index(h)>-1:x.find(r,this,null,[h]).length),o[r]&&s.push(n);s.length&&a.push({elem:h,handlers:s})}return h=this,l<e.length&&a.push({elem:h,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(x.Event.prototype,t,{enumerable:!0,configurable:!0,get:p(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[x.expando]?t:new x.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return xt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click",!0),!1},trigger:function(t){var e=this||t;return xt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click"),!0},_default:function(t){var e=t.target;return xt.test(e.type)&&e.click&&E(e,"input")&&nt.get(e,"click")||E(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},x.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},x.Event=function(t,e){if(!(this instanceof x.Event))return new x.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:At,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&x.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:At,isPropagationStopped:At,isImmediatePropagationStopped:At,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},(function(t,e){function i(t){if(m.documentMode){var i=nt.get(this,"handle"),n=x.event.fix(t);n.type="focusin"===t.type?"focus":"blur",n.isSimulated=!0,i(t),n.target===n.currentTarget&&i(n)}else x.event.simulate(e,t.target,x.event.fix(t))}x.event.special[t]={setup:function(){var n;if(Dt(this,t,!0),!m.documentMode)return!1;(n=nt.get(this,e))||this.addEventListener(e,i),nt.set(this,e,(n||0)+1)},trigger:function(){return Dt(this,t),!0},teardown:function(){var t;if(!m.documentMode)return!1;(t=nt.get(this,e)-1)?nt.set(this,e,t):(this.removeEventListener(e,i),nt.remove(this,e))},_default:function(e){return nt.get(e.target,t)},delegateType:e},x.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,r=m.documentMode?this:n,s=nt.get(r,e);s||(m.documentMode?this.addEventListener(e,i):n.addEventListener(t,i,!0)),nt.set(r,e,(s||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=m.documentMode?this:n,s=nt.get(r,e)-1;s?nt.set(r,e,s):(m.documentMode?this.removeEventListener(e,i):n.removeEventListener(t,i,!0),nt.remove(r,e))}}})),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){x.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,s=t.handleObj;return r&&(r===n||x.contains(n,r))||(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=e),i}}})),x.fn.extend({on:function(t,e,i,n){return Rt(this,t,e,i,n)},one:function(t,e,i,n){return Rt(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,x(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=At),this.each((function(){x.event.remove(this,t,i,e)}))}});var jt=/<script|<style|<link/i,zt=/checked\s*(?:[^=]|=\s*.checked.)/i,Lt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Pt(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function Bt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var i,n,r,s,o,a;if(1===e.nodeType){if(nt.hasData(t)&&(a=nt.get(t).events))for(r in nt.remove(e,"handle events"),a)for(i=0,n=a[r].length;i<n;i++)x.event.add(e,r,a[r][i]);rt.hasData(t)&&(s=rt.access(t),o=x.extend({},s),rt.set(e,o))}}function qt(t,e){var i=e.nodeName.toLowerCase();"input"===i&&xt.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function Ut(t,e,i,n){e=s(e);var r,o,a,l,h,c,u=0,d=t.length,g=d-1,m=e[0],v=p(m);if(v||d>1&&"string"==typeof m&&!f.checkClone&&zt.test(m))return t.each((function(r){var s=t.eq(r);v&&(e[0]=m.call(this,r,s.html())),Ut(s,e,i,n)}));if(d&&(o=(r=Nt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===r.childNodes.length&&(r=o),o||n)){for(l=(a=x.map(Tt(r,"script"),Bt)).length;u<d;u++)h=r,u!==g&&(h=x.clone(h,!0,!0),l&&x.merge(a,Tt(h,"script"))),i.call(t[u],h,u);if(l)for(c=a[a.length-1].ownerDocument,x.map(a,Mt),u=0;u<l;u++)h=a[u],Et.test(h.type||"")&&!nt.access(h,"globalEval")&&x.contains(c,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?x._evalUrl&&!h.noModule&&x._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},c):y(h.textContent.replace(Lt,""),h,c))}return t}function Wt(t,e,i){for(var n,r=e?x.filter(e,t):t,s=0;null!=(n=r[s]);s++)i||1!==n.nodeType||x.cleanData(Tt(n)),n.parentNode&&(i&&dt(n)&&St(Tt(n,"script")),n.parentNode.removeChild(n));return t}x.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,r,s,o,a=t.cloneNode(!0),l=dt(t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(o=Tt(a),n=0,r=(s=Tt(t)).length;n<r;n++)qt(s[n],o[n]);if(e)if(i)for(s=s||Tt(t),o=o||Tt(a),n=0,r=s.length;n<r;n++)Ft(s[n],o[n]);else Ft(t,a);return(o=Tt(a,"script")).length>0&&St(o,!l&&Tt(t,"script")),a},cleanData:function(t){for(var e,i,n,r=x.event.special,s=0;void 0!==(i=t[s]);s++)if(et(i)){if(e=i[nt.expando]){if(e.events)for(n in e.events)r[n]?x.event.remove(i,n):x.removeEvent(i,n,e.handle);i[nt.expando]=void 0}i[rt.expando]&&(i[rt.expando]=void 0)}}}),x.fn.extend({detach:function(t){return Wt(this,t,!0)},remove:function(t){return Wt(this,t)},text:function(t){return G(this,(function(t){return void 0===t?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ut(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pt(this,t).appendChild(t)}))},prepend:function(){return Ut(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Pt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ut(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ut(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(Tt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return x.clone(this,t,e)}))},html:function(t){return G(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!jt.test(t)&&!kt[(_t.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(x.cleanData(Tt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ut(this,arguments,(function(e){var i=this.parentNode;x.inArray(this,t)<0&&(x.cleanData(Tt(this)),i&&i.replaceChild(e,this))}),t)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){x.fn[t]=function(t){for(var i,n=[],r=x(t),s=r.length-1,a=0;a<=s;a++)i=a===s?this:this.clone(!0),x(r[a])[e](i),o.apply(n,i.get());return this.pushStack(n)}}));var $t=new RegExp("^("+lt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Xt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Yt=function(t,e,i){var n,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in n=i.call(t),e)t.style[r]=s[r];return n},Vt=new RegExp(ct.join("|"),"i");function Zt(t,e,i){var n,r,s,o,a=Ht.test(e),l=t.style;return(i=i||Xt(t))&&(o=i.getPropertyValue(e)||i[e],a&&o&&(o=o.replace(N,"$1")||void 0),""!==o||dt(t)||(o=x.style(t,e)),!f.pixelBoxStyles()&&$t.test(o)&&Vt.test(e)&&(n=l.width,r=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=o,o=i.width,l.width=n,l.minWidth=r,l.maxWidth=s)),void 0!==o?o+"":o}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ut.appendChild(h).appendChild(c);var e=t.getComputedStyle(c);n="1%"!==e.top,l=12===i(e.marginLeft),c.style.right="60%",o=36===i(e.right),r=36===i(e.width),c.style.position="absolute",s=12===i(c.offsetWidth/3),ut.removeChild(h),c=null}}function i(t){return Math.round(parseFloat(t))}var n,r,s,o,a,l,h=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===c.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,i,n,r;return null==a&&(e=m.createElement("table"),i=m.createElement("tr"),n=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",ut.appendChild(e).appendChild(i).appendChild(n),r=t.getComputedStyle(i),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===i.offsetHeight,ut.removeChild(e)),a}}))}();var Kt=["Webkit","Moz","ms"],Qt=m.createElement("div").style,Jt={};function te(t){var e=x.cssProps[t]||Jt[t];return e||(t in Qt?t:Jt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Kt.length;i--;)if((t=Kt[i]+e)in Qt)return t}(t)||t)}var ee=/^(none|table(?!-c[ea]).+)/,ie={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function re(t,e,i){var n=ht.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function se(t,e,i,n,r,s){var o="width"===e?1:0,a=0,l=0,h=0;if(i===(n?"border":"content"))return 0;for(;o<4;o+=2)"margin"===i&&(h+=x.css(t,i+ct[o],!0,r)),n?("content"===i&&(l-=x.css(t,"padding"+ct[o],!0,r)),"margin"!==i&&(l-=x.css(t,"border"+ct[o]+"Width",!0,r))):(l+=x.css(t,"padding"+ct[o],!0,r),"padding"!==i?l+=x.css(t,"border"+ct[o]+"Width",!0,r):a+=x.css(t,"border"+ct[o]+"Width",!0,r));return!n&&s>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-l-a-.5))||0),l+h}function oe(t,e,i){var n=Xt(t),r=(!f.boxSizingReliable()||i)&&"border-box"===x.css(t,"boxSizing",!1,n),s=r,o=Zt(t,e,n),a="offset"+e[0].toUpperCase()+e.slice(1);if($t.test(o)){if(!i)return o;o="auto"}return(!f.boxSizingReliable()&&r||!f.reliableTrDimensions()&&E(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===x.css(t,"display",!1,n))&&t.getClientRects().length&&(r="border-box"===x.css(t,"boxSizing",!1,n),(s=a in t)&&(o=t[a])),(o=parseFloat(o)||0)+se(t,e,i||(r?"border":"content"),s,n,o)+"px"}function ae(t,e,i,n,r){return new ae.prototype.init(t,e,i,n,r)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Zt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,s,o,a=tt(e),l=Ht.test(e),h=t.style;if(l||(e=te(a)),o=x.cssHooks[e]||x.cssHooks[a],void 0===i)return o&&"get"in o&&void 0!==(r=o.get(t,!1,n))?r:h[e];"string"===(s=typeof i)&&(r=ht.exec(i))&&r[1]&&(i=gt(t,e,r),s="number"),null!=i&&i==i&&("number"!==s||l||(i+=r&&r[3]||(x.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==i||0!==e.indexOf("background")||(h[e]="inherit"),o&&"set"in o&&void 0===(i=o.set(t,i,n))||(l?h.setProperty(e,i):h[e]=i))}},css:function(t,e,i,n){var r,s,o,a=tt(e);return Ht.test(e)||(e=te(a)),(o=x.cssHooks[e]||x.cssHooks[a])&&"get"in o&&(r=o.get(t,!0,i)),void 0===r&&(r=Zt(t,e,n)),"normal"===r&&e in ne&&(r=ne[e]),""===i||i?(s=parseFloat(r),!0===i||isFinite(s)?s||0:r):r}}),x.each(["height","width"],(function(t,e){x.cssHooks[e]={get:function(t,i,n){if(i)return!ee.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?oe(t,e,n):Yt(t,ie,(function(){return oe(t,e,n)}))},set:function(t,i,n){var r,s=Xt(t),o=!f.scrollboxSize()&&"absolute"===s.position,a=(o||n)&&"border-box"===x.css(t,"boxSizing",!1,s),l=n?se(t,e,n,a,s):0;return a&&o&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-se(t,e,"border",!1,s)-.5)),l&&(r=ht.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=x.css(t,e)),re(0,i,l)}}})),x.cssHooks.marginLeft=Gt(f.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Yt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(t,e){x.cssHooks[t+e]={expand:function(i){for(var n=0,r={},s="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+ct[n]+e]=s[n]||s[n-2]||s[0];return r}},"margin"!==t&&(x.cssHooks[t+e].set=re)})),x.fn.extend({css:function(t,e){return G(this,(function(t,e,i){var n,r,s={},o=0;if(Array.isArray(e)){for(n=Xt(t),r=e.length;o<r;o++)s[e[o]]=x.css(t,e[o],!1,n);return s}return void 0!==i?x.style(t,e,i):x.css(t,e)}),t,e,arguments.length>1)}}),x.Tween=ae,ae.prototype={constructor:ae,init:function(t,e,i,n,r,s){this.elem=t,this.prop=i,this.easing=r||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=s||(x.cssNumber[i]?"":"px")},cur:function(){var t=ae.propHooks[this.prop];return t&&t.get?t.get(this):ae.propHooks._default.get(this)},run:function(t){var e,i=ae.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ae.propHooks._default.set(this),this}},ae.prototype.init.prototype=ae.prototype,ae.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[te(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},ae.propHooks.scrollTop=ae.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=ae.prototype.init,x.fx.step={};var le,he,ce=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function de(){he&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(de):t.setTimeout(de,x.fx.interval),x.fx.tick())}function fe(){return t.setTimeout((function(){le=void 0})),le=Date.now()}function pe(t,e){var i,n=0,r={height:t};for(e=e?1:0;n<4;n+=2-e)r["margin"+(i=ct[n])]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function ge(t,e,i){for(var n,r=(me.tweeners[e]||[]).concat(me.tweeners["*"]),s=0,o=r.length;s<o;s++)if(n=r[s].call(i,e,t))return n}function me(t,e,i){var n,r,s=0,o=me.prefilters.length,a=x.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=le||fe(),i=Math.max(0,h.startTime+h.duration-e),n=1-(i/h.duration||0),s=0,o=h.tweens.length;s<o;s++)h.tweens[s].run(n);return a.notifyWith(t,[h,n,i]),n<1&&o?i:(o||a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:x.extend({},e),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},i),originalProperties:e,originalOptions:i,startTime:le||fe(),duration:i.duration,tweens:[],createTween:function(e,i){var n=x.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),c=h.props;for(!function(t,e){var i,n,r,s,o;for(i in t)if(r=e[n=tt(i)],s=t[i],Array.isArray(s)&&(r=s[1],s=t[i]=s[0]),i!==n&&(t[n]=s,delete t[i]),(o=x.cssHooks[n])&&"expand"in o)for(i in s=o.expand(s),delete t[n],s)i in t||(t[i]=s[i],e[i]=r);else e[n]=r}(c,h.opts.specialEasing);s<o;s++)if(n=me.prefilters[s].call(h,t,c,h.opts))return p(n.stop)&&(x._queueHooks(h.elem,h.opts.queue).stop=n.stop.bind(n)),n;return x.map(c,ge,h),p(h.opts.start)&&h.opts.start.call(t,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),x.fx.timer(x.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h}x.Animation=x.extend(me,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return gt(i.elem,t,ht.exec(e),i),i}]},tweener:function(t,e){p(t)?(e=t,t=["*"]):t=t.match(W);for(var i,n=0,r=t.length;n<r;n++)i=t[n],me.tweeners[i]=me.tweeners[i]||[],me.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,r,s,o,a,l,h,c,u="width"in e||"height"in e,d=this,f={},p=t.style,g=t.nodeType&&pt(t),m=nt.get(t,"fxshow");for(n in i.queue||(null==(o=x._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,x.queue(t,"fx").length||o.empty.fire()}))}))),e)if(r=e[n],ce.test(r)){if(delete e[n],s=s||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[n])continue;g=!0}f[n]=m&&m[n]||x.style(t,n)}if((l=!x.isEmptyObject(e))||!x.isEmptyObject(f))for(n in u&&1===t.nodeType&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],null==(h=m&&m.display)&&(h=nt.get(t,"display")),"none"===(c=x.css(t,"display"))&&(h?c=h:(yt([t],!0),h=t.style.display||h,c=x.css(t,"display"),yt([t]))),("inline"===c||"inline-block"===c&&null!=h)&&"none"===x.css(t,"float")&&(l||(d.done((function(){p.display=h})),null==h&&(c=p.display,h="none"===c?"":c)),p.display="inline-block")),i.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}))),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=nt.access(t,"fxshow",{display:h}),s&&(m.hidden=!g),g&&yt([t],!0),d.done((function(){for(n in g||yt([t]),nt.remove(t,"fxshow"),f)x.style(t,n,f[n])}))),l=ge(g?m[n]:0,n,d),n in m||(m[n]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?me.prefilters.unshift(t):me.prefilters.push(t)}}),x.speed=function(t,e,i){var n=t&&"object"==typeof t?x.extend({},t):{complete:i||!i&&e||p(t)&&t,duration:t,easing:i&&e||e&&!p(e)&&e};return x.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in x.fx.speeds?n.duration=x.fx.speeds[n.duration]:n.duration=x.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){p(n.old)&&n.old.call(this),n.queue&&x.dequeue(this,n.queue)},n},x.fn.extend({fadeTo:function(t,e,i,n){return this.filter(pt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=x.isEmptyObject(t),s=x.speed(e,i,n),o=function(){var e=me(this,x.extend({},t),s);(r||nt.get(this,"finish"))&&e.stop(!0)};return o.finish=o,r||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",s=x.timers,o=nt.get(this);if(r)o[r]&&o[r].stop&&n(o[r]);else for(r in o)o[r]&&o[r].stop&&ue.test(r)&&n(o[r]);for(r=s.length;r--;)s[r].elem!==this||null!=t&&s[r].queue!==t||(s[r].anim.stop(i),e=!1,s.splice(r,1));!e&&i||x.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=nt.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],s=x.timers,o=n?n.length:0;for(i.finish=!0,x.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),x.each(["toggle","show","hide"],(function(t,e){var i=x.fn[e];x.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(pe(e,!0),t,n,r)}})),x.each({slideDown:pe("show"),slideUp:pe("hide"),slideToggle:pe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){x.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),x.timers=[],x.fx.tick=function(){var t,e=0,i=x.timers;for(le=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||x.fx.stop(),le=void 0},x.fx.timer=function(t){x.timers.push(t),x.fx.start()},x.fx.interval=13,x.fx.start=function(){he||(he=!0,de())},x.fx.stop=function(){he=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,i){return e=x.fx&&x.fx.speeds[e]||e,i=i||"fx",this.queue(i,(function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",f.checkOn=""!==t.value,f.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",f.radioValue="t"===t.value}();var ve,ye=x.expr.attrHandle;x.fn.extend({attr:function(t,e){return G(this,x.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){x.removeAttr(this,t)}))}}),x.extend({attr:function(t,e,i){var n,r,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?x.prop(t,e,i):(1===s&&x.isXMLDoc(t)||(r=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?ve:void 0)),void 0!==i?null===i?void x.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:null==(n=x.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&E(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,r=e&&e.match(W);if(r&&1===t.nodeType)for(;i=r[n++];)t.removeAttribute(i)}}),ve={set:function(t,e,i){return!1===e?x.removeAttr(t,i):t.setAttribute(i,i),i}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(t,e){var i=ye[e]||x.find.attr;ye[e]=function(t,e,n){var r,s,o=e.toLowerCase();return n||(s=ye[o],ye[o]=r,r=null!=i(t,e,n)?o:null,ye[o]=s),r}}));var be=/^(?:input|select|textarea|button)$/i,we=/^(?:a|area)$/i;function xe(t){return(t.match(W)||[]).join(" ")}function _e(t){return t.getAttribute&&t.getAttribute("class")||""}function Ee(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(W)||[]}x.fn.extend({prop:function(t,e){return G(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[x.propFix[t]||t]}))}}),x.extend({prop:function(t,e,i){var n,r,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&x.isXMLDoc(t)||(e=x.propFix[e]||e,r=x.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):be.test(t.nodeName)||we.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(t){var e,i,n,r,s,o;return p(t)?this.each((function(e){x(this).addClass(t.call(this,e,_e(this)))})):(e=Ee(t)).length?this.each((function(){if(n=_e(this),i=1===this.nodeType&&" "+xe(n)+" "){for(s=0;s<e.length;s++)r=e[s],i.indexOf(" "+r+" ")<0&&(i+=r+" ");o=xe(i),n!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,i,n,r,s,o;return p(t)?this.each((function(e){x(this).removeClass(t.call(this,e,_e(this)))})):arguments.length?(e=Ee(t)).length?this.each((function(){if(n=_e(this),i=1===this.nodeType&&" "+xe(n)+" "){for(s=0;s<e.length;s++)for(r=e[s];i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o=xe(i),n!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var i,n,r,s,o=typeof t,a="string"===o||Array.isArray(t);return p(t)?this.each((function(i){x(this).toggleClass(t.call(this,i,_e(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(i=Ee(t),this.each((function(){if(a)for(s=x(this),r=0;r<i.length;r++)n=i[r],s.hasClass(n)?s.removeClass(n):s.addClass(n);else void 0!==t&&"boolean"!==o||((n=_e(this))&&nt.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":nt.get(this,"__className__")||""))})))},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+xe(_e(i))+" ").indexOf(e)>-1)return!0;return!1}});var ke=/\r/g;x.fn.extend({val:function(t){var e,i,n,r=this[0];return arguments.length?(n=p(t),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?t.call(this,i,x(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=x.map(r,(function(t){return null==t?"":t+""}))),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=x.valHooks[r.type]||x.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(ke,""):null==i?"":i:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:xe(x.text(t))}},select:{get:function(t){var e,i,n,r=t.options,s=t.selectedIndex,o="select-one"===t.type,a=o?null:[],l=o?s+1:r.length;for(n=s<0?l:o?s:0;n<l;n++)if(((i=r[n]).selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!E(i.parentNode,"optgroup"))){if(e=x(i).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var i,n,r=t.options,s=x.makeArray(e),o=r.length;o--;)((n=r[o]).selected=x.inArray(x.valHooks.option.get(n),s)>-1)&&(i=!0);return i||(t.selectedIndex=-1),s}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},f.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Te=t.location,Se={guid:Date.now()},Ce=/\?/;x.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||x.error("Invalid XML: "+(n?x.map(n.childNodes,(function(t){return t.textContent})).join("\n"):e)),i};var Ne=/^(?:focusinfocus|focusoutblur)$/,Oe=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,i,n,r){var s,o,a,l,h,u,d,f,v=[n||m],y=c.call(e,"type")?e.type:e,b=c.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!Ne.test(y+x.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),h=y.indexOf(":")<0&&"on"+y,(e=e[x.expando]?e:new x.Event(y,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:x.makeArray(i,[e]),d=x.event.special[y]||{},r||!d.trigger||!1!==d.trigger.apply(n,i))){if(!r&&!d.noBubble&&!g(n)){for(l=d.delegateType||y,Ne.test(l+y)||(o=o.parentNode);o;o=o.parentNode)v.push(o),a=o;a===(n.ownerDocument||m)&&v.push(a.defaultView||a.parentWindow||t)}for(s=0;(o=v[s++])&&!e.isPropagationStopped();)f=o,e.type=s>1?l:d.bindType||y,(u=(nt.get(o,"events")||Object.create(null))[e.type]&&nt.get(o,"handle"))&&u.apply(o,i),(u=h&&o[h])&&u.apply&&et(o)&&(e.result=u.apply(o,i),!1===e.result&&e.preventDefault());return e.type=y,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),i)||!et(n)||h&&p(n[y])&&!g(n)&&((a=n[h])&&(n[h]=null),x.event.triggered=y,e.isPropagationStopped()&&f.addEventListener(y,Oe),n[y](),e.isPropagationStopped()&&f.removeEventListener(y,Oe),x.event.triggered=void 0,a&&(n[h]=a)),e.result}},simulate:function(t,e,i){var n=x.extend(new x.Event,i,{type:t,isSimulated:!0});x.event.trigger(n,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each((function(){x.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var i=this[0];if(i)return x.event.trigger(t,e,i,!0)}});var Ie=/\[\]$/,Ae=/\r?\n/g,Re=/^(?:submit|button|image|reset|file)$/i,De=/^(?:input|select|textarea|keygen)/i;function je(t,e,i,n){var r;if(Array.isArray(e))x.each(e,(function(e,r){i||Ie.test(t)?n(t,r):je(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)}));else if(i||"object"!==b(e))n(t,e);else for(r in e)je(t+"["+r+"]",e[r],i,n)}x.param=function(t,e){var i,n=[],r=function(t,e){var i=p(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,(function(){r(this.name,this.value)}));else for(i in t)je(i,t[i],e,r);return n.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&De.test(this.nodeName)&&!Re.test(t)&&(this.checked||!xt.test(t))})).map((function(t,e){var i=x(this).val();return null==i?null:Array.isArray(i)?x.map(i,(function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}})):{name:e.name,value:i.replace(Ae,"\r\n")}})).get()}});var ze=/%20/g,Le=/#.*$/,Pe=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)$/gm,Me=/^(?:GET|HEAD)$/,Fe=/^\/\//,qe={},Ue={},We="*/".concat("*"),$e=m.createElement("a");function He(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,s=e.toLowerCase().match(W)||[];if(p(i))for(;n=s[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Xe(t,e,i,n){var r={},s=t===Ue;function o(a){var l;return r[a]=!0,x.each(t[a]||[],(function(t,a){var h=a(e,i,n);return"string"!=typeof h||s||r[h]?s?!(l=h):void 0:(e.dataTypes.unshift(h),o(h),!1)})),l}return o(e.dataTypes[0])||!r["*"]&&o("*")}function Ye(t,e){var i,n,r=x.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&x.extend(!0,t,n),t}$e.href=Te.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Te.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Te.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":We,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ye(Ye(t,x.ajaxSettings),e):Ye(x.ajaxSettings,t)},ajaxPrefilter:He(qe),ajaxTransport:He(Ue),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,r,s,o,a,l,h,c,u,d,f=x.ajaxSetup({},i),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?x(p):x.event,v=x.Deferred(),y=x.Callbacks("once memory"),b=f.statusCode||{},w={},_={},E="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(h){if(!o)for(o={};e=Be.exec(s);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return h?s:null},setRequestHeader:function(t,e){return null==h&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)k.always(t[k.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||E;return n&&n.abort(e),T(0,e),this}};if(v.promise(k),f.url=((e||f.url||Te.href)+"").replace(Fe,Te.protocol+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(W)||[""],null==f.crossDomain){l=m.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=$e.protocol+"//"+$e.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Xe(qe,f,i,k),h)return k;for(u in(c=x.event&&f.global)&&0==x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Me.test(f.type),r=f.url.replace(Le,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(ze,"+")):(d=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Ce.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Pe,"$1"),d=(Ce.test(r)?"&":"?")+"_="+Se.guid+++d),f.url=r+d),f.ifModified&&(x.lastModified[r]&&k.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&k.setRequestHeader("If-None-Match",x.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||i.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+We+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(u,f.headers[u]);if(f.beforeSend&&(!1===f.beforeSend.call(p,k,f)||h))return k.abort();if(E="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),n=Xe(Ue,f,i,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,f]),h)return k;f.async&&f.timeout>0&&(a=t.setTimeout((function(){k.abort("timeout")}),f.timeout));try{h=!1,n.send(w,T)}catch(t){if(h)throw t;T(-1,t)}}else T(-1,"No Transport");function T(e,i,o,l){var u,d,m,w,_,E=i;h||(h=!0,a&&t.clearTimeout(a),n=void 0,s=l||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,o&&(w=function(t,e,i){for(var n,r,s,o,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)s=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){s=r;break}o||(o=r)}s=s||o}if(s)return s!==l[0]&&l.unshift(s),i[s]}(f,k,o)),!u&&x.inArray("script",f.dataTypes)>-1&&x.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,i,n){var r,s,o,a,l,h={},c=t.dataTypes.slice();if(c[1])for(o in t.converters)h[o.toLowerCase()]=t.converters[o];for(s=c.shift();s;)if(t.responseFields[s]&&(i[t.responseFields[s]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=c.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(o=h[l+" "+s]||h["* "+s]))for(r in h)if((a=r.split(" "))[1]===s&&(o=h[l+" "+a[0]]||h["* "+a[0]])){!0===o?o=h[r]:!0!==h[r]&&(s=a[0],c.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(f,w,k,u),u?(f.ifModified&&((_=k.getResponseHeader("Last-Modified"))&&(x.lastModified[r]=_),(_=k.getResponseHeader("etag"))&&(x.etag[r]=_)),204===e||"HEAD"===f.type?E="nocontent":304===e?E="notmodified":(E=w.state,d=w.data,u=!(m=w.error))):(m=E,!e&&E||(E="error",e<0&&(e=0))),k.status=e,k.statusText=(i||E)+"",u?v.resolveWith(p,[d,E,k]):v.rejectWith(p,[k,E,m]),k.statusCode(b),b=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[k,f,u?d:m]),y.fireWith(p,[k,E]),c&&(g.trigger("ajaxComplete",[k,f]),--x.active||x.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,i){return x.get(t,e,i,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],(function(t,e){x[e]=function(t,i,n,r){return p(i)&&(r=r||n,n=i,i=void 0),x.ajax(x.extend({url:t,type:e,dataType:r,data:i,success:n},x.isPlainObject(t)&&t))}})),x.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),x._evalUrl=function(t,e,i){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e,i)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(p(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return p(t)?this.each((function(e){x(this).wrapInner(t.call(this,e))})):this.each((function(){var e=x(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=p(t);return this.each((function(i){x(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},Ze=x.ajaxSettings.xhr();f.cors=!!Ze&&"withCredentials"in Ze,f.ajax=Ze=!!Ze,x.ajaxTransport((function(e){var i,n;if(f.cors||Ze&&!e.crossDomain)return{send:function(r,s){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(o,r[o]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Ve[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){i&&n()}))},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}})),x.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),x.ajaxTransport("script",(function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,r){e=x("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){i&&i()}}}));var Ge,Ke=[],Qe=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ke.pop()||x.expando+"_"+Se.guid++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",(function(e,i,n){var r,s,o,a=!1!==e.jsonp&&(Qe.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qe,"$1"+r):!1!==e.jsonp&&(e.url+=(Ce.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||x.error(r+" was not called"),o[0]},e.dataTypes[0]="json",s=t[r],t[r]=function(){o=arguments},n.always((function(){void 0===s?x(t).removeProp(r):t[r]=s,e[r]&&(e.jsonpCallback=i.jsonpCallback,Ke.push(r)),o&&p(s)&&s(o[0]),o=s=void 0})),"script"})),f.createHTMLDocument=((Ge=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),x.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(f.createHTMLDocument?((n=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(n)):e=m),s=!i&&[],(r=L.exec(t))?[e.createElement(r[1])]:(r=Nt([t],e,s),s&&s.length&&x(s).remove(),x.merge([],r.childNodes)));var n,r,s},x.fn.load=function(t,e,i){var n,r,s,o=this,a=t.indexOf(" ");return a>-1&&(n=xe(t.slice(a)),t=t.slice(0,a)),p(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),o.length>0&&x.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){s=arguments,o.html(n?x("<div>").append(x.parseHTML(t)).find(n):t)})).always(i&&function(t,e){o.each((function(){i.apply(this,s||[t.responseText,e,t])}))}),this},x.expr.pseudos.animated=function(t){return x.grep(x.timers,(function(e){return t===e.elem})).length},x.offset={setOffset:function(t,e,i){var n,r,s,o,a,l,h=x.css(t,"position"),c=x(t),u={};"static"===h&&(t.style.position="relative"),a=c.offset(),s=x.css(t,"top"),l=x.css(t,"left"),("absolute"===h||"fixed"===h)&&(s+l).indexOf("auto")>-1?(o=(n=c.position()).top,r=n.left):(o=parseFloat(s)||0,r=parseFloat(l)||0),p(e)&&(e=e.call(t,i,x.extend({},a))),null!=e.top&&(u.top=e.top-a.top+o),null!=e.left&&(u.left=e.left-a.left+r),"using"in e?e.using.call(t,u):c.css(u)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){x.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],r={top:0,left:0};if("fixed"===x.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===x.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((r=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),r.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-x.css(n,"marginTop",!0),left:e.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||ut}))}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;x.fn[t]=function(n){return G(this,(function(t,n,r){var s;if(g(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===r)return s?s[e]:t[n];s?s.scrollTo(i?s.pageXOffset:r,i?r:s.pageYOffset):t[n]=r}),t,n,arguments.length)}})),x.each(["top","left"],(function(t,e){x.cssHooks[e]=Gt(f.pixelPosition,(function(t,i){if(i)return i=Zt(t,e),$t.test(i)?x(t).position()[e]+"px":i}))})),x.each({Height:"height",Width:"width"},(function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){x.fn[n]=function(r,s){var o=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===s?"margin":"border");return G(this,(function(e,i,r){var s;return g(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===r?x.css(e,i,a):x.style(e,i,r,a)}),e,o?r:void 0,o)}}))})),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){x.fn[e]=function(t){return this.on(e,t)}})),x.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){x.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}));var Je=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;x.proxy=function(t,e){var i,n,s;if("string"==typeof e&&(i=t[e],e=t,t=i),p(t))return n=r.call(arguments,2),(s=function(){return t.apply(e||this,n.concat(r.call(arguments)))}).guid=t.guid=t.guid||x.guid++,s},x.holdReady=function(t){t?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=E,x.isFunction=p,x.isWindow=g,x.camelCase=tt,x.type=b,x.now=Date.now,x.isNumeric=function(t){var e=x.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},x.trim=function(t){return null==t?"":(t+"").replace(Je,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return x}));var ti=t.jQuery,ei=t.$;return x.noConflict=function(e){return t.$===x&&(t.$=ei),e&&t.jQuery===x&&(t.jQuery=ti),x},void 0===e&&(t.jQuery=t.$=x),x})),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",(function(){i=!0}));return setTimeout((function(){i||t(n).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})}))}(jQuery),function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){o.detach().trigger("closed.bs.alert").remove()}var r=t(this),s=r.attr("data-target");s||(s=(s=r.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,""));var o=t(s);e&&e.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var n=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)}))},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.button"),s="object"==typeof e&&e;r||n.data("bs.button",r=new i(this,s)),"toggle"==e?r.toggle():e&&r.setState(e)}))}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.5",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",s=n.data();e+="Text",null==s.resetText&&n.data("resetText",n[r]()),setTimeout(t.proxy((function(){n[r](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))}),this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.carousel"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),o="string"==typeof e?e:s.slide;r||n.data("bs.carousel",r=new i(this,s)),"number"==typeof e?r.to(e):o?r[o]():s.interval&&r.pause().cycle()}))}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var n=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(n)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var r=this.$element.find(".item.active"),s=n||this.getItemForDirection(e,r),o=this.interval,a="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],c=t.Event("slide.bs.carousel",{relatedTarget:h,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(s)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:h,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,r.addClass(a),s.addClass(a),r.one("bsTransitionEnd",(function(){s.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(d)),o&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var r=function(i){var n,r=t(this),s=t(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var o=t.extend({},s.data(),r.data()),a=r.attr("data-slide-to");a&&(o.interval=!1),e.call(s,o),a&&s.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var i=t(this);e.call(i,i.data())}))}))}(jQuery),function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each((function(){var i=t(this),r=i.data("bs.collapse"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!r&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),r||i.data("bs.collapse",r=new n(this,s)),"string"==typeof e&&r[e]()}))}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.5",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),e||r.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[o](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)}),this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(n){var r=t(this);r.attr("data-target")||n.preventDefault();var s=e(r),o=s.data("bs.collapse")?"toggle":r.data();i.call(s,o)}))}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(r).each((function(){var n=t(this),r=e(n),s={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(r[0],i.target)||(r.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",s))))})))}var n=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.5",s.prototype.toggle=function(n){var r=t(this);if(!r.is(".disabled, :disabled")){var s=e(r),o=s.hasClass("open");if(i(),!o){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(s.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var s=e(n),o=s.hasClass("open");if(!o&&27!=i.which||o&&27==i.which)return 27==i.which&&s.find(r).trigger("focus"),n.trigger("click");var a=s.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(i.target);38==i.which&&l>0&&l--,40==i.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)}))},t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",r,s.prototype.toggle).on("keydown.bs.dropdown.data-api",r,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,n){return this.each((function(){var r=t(this),s=r.data("bs.modal"),o=t.extend({},i.DEFAULTS,r.data(),"object"==typeof e&&e);s||r.data("bs.modal",s=new i(this,o)),"string"==typeof e?s[e](n):o.show&&s.show(n)}))}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){n.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});r?n.$dialog.one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(s)})).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)})))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))}),this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):o()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(i){var n=t(this),r=n.attr("href"),s=t(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),o=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),n.data());n.is("a")&&i.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){n.is(":visible")&&n.trigger("focus")}))})),e.call(s,o,this)}))}(jQuery),function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.5",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),s=r.length;s--;){var o=r[s];if("click"==o)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",l="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,(function(t,n){i[t]!=n&&(e[t]=n)})),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout((function(){"in"==i.hoverState&&i.show()}),i.options.delay.show)):i.show())},e.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout((function(){"out"==i.hoverState&&i.hide()}),i.options.delay.hide)):i.hide())},e.prototype.show=function(){var i=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!n)return;var r=this,s=this.tip(),o=this.getUID(this.type);this.setContent(),s.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(a);h&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=s[0].offsetWidth,d=s[0].offsetHeight;if(h){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+d>p.bottom?"top":"top"==a&&c.top-d<p.top?"bottom":"right"==a&&c.right+u>p.width?"left":"left"==a&&c.left-u<p.left?"right":a,s.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,c,u,d);this.applyPlacement(g,a);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(e.TRANSITION_DURATION):m()}},e.prototype.applyPlacement=function(e,i){var n=this.tip(),r=n[0].offsetWidth,s=n[0].offsetHeight,o=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),e.top+=o,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,h=n[0].offsetHeight;"top"==i&&h!=s&&(e.top=e.top+s-h);var c=this.getViewportAdjustedDelta(i,e,l,h);c.left?e.left+=c.left:e.top+=c.top;var u=/top|bottom/.test(i),d=u?2*c.left-r+l:2*c.top-s+h,f=u?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(d,n[0][f],u)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(i){function n(){"in"!=r.hoverState&&s.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),i&&i()}var r=this,s=t(this.$tip),o=t.Event("hide.bs."+this.type);return this.$element.trigger(o),o.isDefaultPrevented()?void 0:(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(e.TRANSITION_DURATION):n(),this.hoverState=null,this)},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var i=(e=e||this.$element)[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var s=n?{top:0,left:0}:e.offset(),o={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,o,a,s)},e.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var s=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-o.scroll,l=e.top+s-o.scroll+n;a<o.top?r.top=o.top-a:l>o.top+o.height&&(r.top=o.top+o.height-l)}else{var h=e.left-s,c=e.left+s+i;h<o.left?r.left=o.left-h:c>o.right&&(r.left=o.left+o.width-c)}return r},e.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null}))};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),s="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.tooltip",r=new e(this,s)),"string"==typeof i&&r[i]())}))},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.3.5",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=function(i){return this.each((function(){var n=t(this),r=n.data("bs.popover"),s="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||n.data("bs.popover",r=new e(this,s)),"string"==typeof i&&r[i]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each((function(){var n=t(this),r=n.data("bs.scrollspy"),s="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,s)),"string"==typeof i&&r[i]()}))}e.VERSION="3.3.5",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),r=e.data("target")||e.attr("href"),s=/^#./.test(r)&&t(r);return s&&s.length&&s.is(":visible")&&[[s[i]().top+n,r]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,s=this.targets,o=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return o!=(t=s[s.length-1])&&this.activate(t);if(o&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)o!=s[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);i.call(e,e.data())}))}))}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof e&&r[e]()}))}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),o=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(s),e.trigger(o),!o.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),(function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}}},i.prototype.activate=function(e,n,r){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var o=n.find("> .active"),a=r&&t.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),o.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var r=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),function(t){"use strict";function e(e){return this.each((function(){var n=t(this),r=n.data("bs.affix"),s="object"==typeof e&&e;r||n.data("bs.affix",r=new i(this,s)),"string"==typeof e&&r[e]()}))}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.5",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),s=this.$element.offset(),o=this.$target.height();if(null!=i&&"top"==this.affixed)return i>r&&"top";if("bottom"==this.affixed)return null!=i?!(r+this.unpin<=s.top)&&"bottom":!(t-n>=r+o)&&"bottom";var a=null==this.affixed,l=a?r:s.top;return null!=i&&i>=r?"top":null!=n&&l+(a?o:e)>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,s=n.bottom,o=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(s=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof s&&(s=n.bottom(this.$element));var a=this.getState(o,e,r,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:o-e-s})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)}))}))}(jQuery),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function t(e,i,n){function r(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[o]={exports:{}};e[o][0].call(c.exports,(function(t){return r(e[o][1][t]||t)}),c,c.exports,t,e,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){for(var e,i,r,o,a,l,h,c=[],u=0,d=t.length,f=d,p="string"!==n.getTypeOf(t);u<t.length;)f=d-u,r=p?(e=t[u++],i=u<d?t[u++]:0,u<d?t[u++]:0):(e=t.charCodeAt(u++),i=u<d?t.charCodeAt(u++):0,u<d?t.charCodeAt(u++):0),o=e>>2,a=(3&e)<<4|i>>4,l=1<f?(15&i)<<2|r>>6:64,h=2<f?63&r:64,c.push(s.charAt(o)+s.charAt(a)+s.charAt(l)+s.charAt(h));return c.join("")},i.decode=function(t){var e,i,n,o,a,l,h=0,c=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&f--,t.charAt(t.length-2)===s.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=r.uint8array?new Uint8Array(0|f):new Array(0|f);h<t.length;)e=s.indexOf(t.charAt(h++))<<2|(o=s.indexOf(t.charAt(h++)))>>4,i=(15&o)<<4|(a=s.indexOf(t.charAt(h++)))>>2,n=(3&a)<<6|(l=s.indexOf(t.charAt(h++))),d[c++]=e,64!==a&&(d[c++]=i),64!==l&&(d[c++]=n);return d}},{"./support":30,"./utils":32}],2:[function(t,e,i){"use strict";var n=t("./external"),r=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function a(t,e,i,n,r){this.compressedSize=t,this.uncompressedSize=e,this.crc32=i,this.compression=n,this.compressedContent=r}a.prototype={getContentWorker:function(){var t=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,i){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,i){"use strict";var n=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,i){"use strict";var n=t("./utils"),r=function(){for(var t,e=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,i,n){var s=r,o=0+i;t^=-1;for(var a=0;a<o;a++)t=t>>>8^s[255&(t^e[a])];return-1^t}(0|e,t,t.length):function(t,e,i,n){var s=r,o=0+i;t^=-1;for(var a=0;a<o;a++)t=t>>>8^s[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,i){"use strict";i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,e,i){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=n?"uint8array":"array";function l(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}i.magic="\b\0",s.inherits(l,o),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},i.compressWorker=function(t){return new l("Deflate",t)},i.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,i){"use strict";function n(t,e){var i,n="";for(i=0;i<e;i++)n+=String.fromCharCode(255&t),t>>>=8;return n}function r(t,e,i,r,o,c){var u,d,f=t.file,p=t.compression,g=c!==a.utf8encode,m=s.transformTo("string",c(f.name)),v=s.transformTo("string",a.utf8encode(f.name)),y=f.comment,b=s.transformTo("string",c(y)),w=s.transformTo("string",a.utf8encode(y)),x=v.length!==f.name.length,_=w.length!==y.length,E="",k="",T="",S=f.dir,C=f.date,N={crc32:0,compressedSize:0,uncompressedSize:0};e&&!i||(N.crc32=t.crc32,N.compressedSize=t.compressedSize,N.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),g||!x&&!_||(O|=2048);var I=0,A=0;S&&(I|=16),"UNIX"===o?(A=798,I|=function(t,e){var i=t;return t||(i=e?16893:33204),(65535&i)<<16}(f.unixPermissions,S)):(A=20,I|=function(t){return 63&(t||0)}(f.dosPermissions)),u=C.getUTCHours(),u<<=6,u|=C.getUTCMinutes(),u<<=5,u|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),x&&(k=n(1,1)+n(l(m),4)+v,E+="up"+n(k.length,2)+k),_&&(T=n(1,1)+n(l(b),4)+w,E+="uc"+n(T.length,2)+T);var R="";return R+="\n\0",R+=n(O,2),R+=p.magic,R+=n(u,2),R+=n(d,2),R+=n(N.crc32,4),R+=n(N.compressedSize,4),R+=n(N.uncompressedSize,4),R+=n(m.length,2),R+=n(E.length,2),{fileRecord:h.LOCAL_FILE_HEADER+R+m+E,dirRecord:h.CENTRAL_FILE_HEADER+n(A,2)+R+n(b.length,2)+"\0\0\0\0"+n(I,4)+n(r,4)+m+E+b}}var s=t("../utils"),o=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),h=t("../signature");function c(t,e,i,n){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(c,o),c.prototype.push=function(t){var e=t.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(e+100*(i-n-1))/i:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var i=r(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,i=r(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),e)this.push({data:function(t){return h.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var i=this.bytesWritten-t,r=function(t,e,i,r,o){var a=s.transformTo("string",o(r));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(t,2)+n(t,2)+n(e,4)+n(i,4)+n(a.length,2)+a}(this.dirRecords.length,i,t,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},c.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(t){var e=this._sources;if(!o.prototype.error.call(this,t))return!1;for(var i=0;i<e.length;i++)try{e[i].error(t)}catch(t){}return!0},c.prototype.lock=function(){o.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,i){"use strict";var n=t("../compressions"),r=t("./ZipFileWorker");i.generateWorker=function(t,e,i){var s=new r(e.streamFiles,i,e.platform,e.encodeFileName),o=0;try{t.forEach((function(t,i){o++;var r=function(t,e){var i=t||e,r=n[i];if(!r)throw new Error(i+" is not a valid compression method !");return r}(i.options.compression,e.compression),a=i.options.compressionOptions||e.compressionOptions||{},l=i.dir,h=i.date;i._compressWorker(r,a).withStreamInfo("file",{name:t,dir:l,date:h,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,i){"use strict";function n(){if(!(this instanceof n))return new n;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 t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(n.prototype=t("./object")).loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.version="3.7.1",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,i){"use strict";var n=t("./utils"),r=t("./external"),s=t("./utf8"),o=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function h(t){return new r.Promise((function(e,i){var n=t.decompressed.getContentWorker().pipe(new a);n.on("error",(function(t){i(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var i=this;return e=n.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(t)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var i=new o(e);return i.load(t),i})).then((function(t){var i=[r.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var s=0;s<n.length;s++)i.push(h(n[s]));return r.Promise.all(i)})).then((function(t){for(var n=t.shift(),r=n.files,s=0;s<r.length;s++){var o=r[s];i.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(i.comment=n.zipComment),i}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../stream/GenericWorker");function s(t,e){r.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(s,r),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},s.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,i){"use strict";var n=t("readable-stream").Readable;function r(t,e,i){n.call(this,e),this._helper=t;var r=this;t.on("data",(function(t,e){r.push(t)||r._helper.pause(),i&&i(e)})).on("error",(function(t){r.emit("error",t)})).on("end",(function(){r.push(null)}))}t("../utils").inherits(r,n),r.prototype._read=function(){this._helper.resume()},e.exports=r},{"../utils":32,"readable-stream":16}],14:[function(t,e,i){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,i){"use strict";function n(t,e,i){var n,r=s.getTypeOf(e),a=s.extend(i||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(t=g(t)),a.createFolders&&(n=p(t))&&m.call(this,n,!0);var u="string"===r&&!1===a.binary&&!1===a.base64;i&&void 0!==i.binary||(a.binary=!u),(e instanceof h&&0===e.uncompressedSize||a.dir||!e||0===e.length)&&(a.base64=!1,a.binary=!0,e="",a.compression="STORE",r="string");var v;v=e instanceof h||e instanceof o?e:d.isNode&&d.isStream(e)?new f(t,e):s.prepareContent(t,e,a.binary,a.optimizedBinaryString,a.base64);var y=new c(t,v,a);this.files[t]=y}var r=t("./utf8"),s=t("./utils"),o=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),h=t("./compressedObject"),c=t("./zipObject"),u=t("./generate"),d=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,e){return e=void 0!==e?e:l.createFolders,t=g(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,i,n;for(e in this.files)n=this.files[e],(i=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(i,n)},filter:function(t){var e=[];return this.forEach((function(i,n){t(i,n)&&e.push(n)})),e},file:function(t,e,i){if(1!==arguments.length)return t=this.root+t,n.call(this,t,e,i),this;if(v(t)){var r=t;return this.filter((function(t,e){return!e.dir&&r.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(v(t))return this.filter((function(e,i){return i.dir&&t.test(e)}));var e=this.root+t,i=m.call(this,e),n=this.clone();return n.root=i.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var i=this.filter((function(e,i){return i.name.slice(0,t.length)===t})),n=0;n<i.length;n++)delete this.files[i[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,i={};try{if((i=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");s.checkSupport(i.type),"darwin"!==i.platform&&"freebsd"!==i.platform&&"linux"!==i.platform&&"sunos"!==i.platform||(i.platform="UNIX"),"win32"===i.platform&&(i.platform="DOS");var n=i.comment||this.comment||"";e=u.generateWorker(this,i,n)}catch(t){(e=new o("error")).error(t)}return new a(e,i.type||"string",i.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=y},{"./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(t,e,i){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,i){"use strict";var n=t("./DataReader");function r(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data[this.zero+t]},r.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===i&&this.data[s+2]===n&&this.data[s+3]===r)return s-this.zero;return-1},r.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),r=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&i===s[1]&&n===s[2]&&r===s[3]},r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=r},{"../utils":32,"./DataReader":18}],18:[function(t,e,i){"use strict";var n=t("../utils");function r(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,i=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)i=(i<<8)+this.byteAt(e);return this.index+=t,i},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=r},{"../utils":32}],19:[function(t,e,i){"use strict";var n=t("./Uint8ArrayReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,i){"use strict";var n=t("./DataReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},r.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},r.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},r.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,e,i){"use strict";var n=t("./ArrayReader");function r(t){n.call(this,t)}t("../utils").inherits(r,n),r.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,i){"use strict";var n=t("../utils"),r=t("../support"),s=t("./ArrayReader"),o=t("./StringReader"),a=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||r.uint8array?"nodebuffer"===e?new a(t):r.uint8array?new l(n.transformTo("uint8array",t)):new s(n.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,i){"use strict";i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../utils");function s(t){n.call(this,"ConvertWorker to "+t),this.destType=t}r.inherits(s,n),s.prototype.processChunk=function(t){this.push({data:r.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,i){"use strict";var n=t("./GenericWorker"),r=t("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,n),s.prototype.processChunk=function(t){this.streamInfo.crc32=r(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker");function s(t){r.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(s,r),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}r.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./GenericWorker");function s(t){r.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(s,r),s.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,i){"use strict";function n(t){this.name=t||"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}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var i=0;i<this._listeners[t].length;i++)this._listeners[t][i].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),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 t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},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 t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],29:[function(t,e,i){"use strict";var n=t("../utils"),r=t("./ConvertWorker"),s=t("./GenericWorker"),o=t("../base64"),a=t("../support"),l=t("../external"),h=null;if(a.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function c(t,e,i){var o=e;switch(e){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=e,this._mimeType=i,n.checkSupport(o),this._worker=t.pipe(new r(o)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}c.prototype={accumulate:function(t){return function(t,e){return new l.Promise((function(i,r){var s=[],a=t._internalType,l=t._outputType,h=t._mimeType;t.on("data",(function(t,i){s.push(t),e&&e(i)})).on("error",(function(t){s=[],r(t)})).on("end",(function(){try{var t=function(t,e,i){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),i);case"base64":return o.encode(e);default:return n.transformTo(t,e)}}(l,function(t,e){var i,n=0,r=null,s=0;for(i=0;i<e.length;i++)s+=e[i].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(r=new Uint8Array(s),i=0;i<e.length;i++)r.set(e[i],n),n+=e[i].length;return r;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,s),h);i(t)}catch(t){r(t)}s=[]})).resume()}))}(this,t)},on:function(t,e){var i=this;return"data"===t?this._worker.on(t,(function(t){e.call(i,t.data,t.meta)})):this._worker.on(t,(function(){n.delay(e,arguments,i)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),i.blob=0===r.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,i){"use strict";for(var n=t("./utils"),r=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function h(){o.call(this,"utf-8 decode"),this.leftOver=null}function c(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(t){return r.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var e,i,n,s,o,a=t.length,l=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=r.uint8array?new Uint8Array(l):new Array(l),s=o=0;o<l;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),i<128?e[o++]=i:(i<2048?e[o++]=192|i>>>6:(i<65536?e[o++]=224|i>>>12:(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63),e[o++]=128|i>>>6&63),e[o++]=128|63&i);return e}(t)},i.utf8decode=function(t){return r.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,i,r,s,o=t.length,l=new Array(2*o);for(e=i=0;e<o;)if((r=t[e++])<128)l[i++]=r;else if(4<(s=a[r]))l[i++]=65533,e+=s-1;else{for(r&=2===s?31:3===s?15:7;1<s&&e<o;)r=r<<6|63&t[e++],s--;1<s?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return l.length!==i&&(l.subarray?l=l.subarray(0,i):l.length=i),n.applyFromCharCode(l)}(t=n.transformTo(r.uint8array?"uint8array":"array",t))},n.inherits(h,o),h.prototype.processChunk=function(t){var e=n.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var s=e;(e=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+a[t[i]]>e?i:e}(e),l=e;o!==e.length&&(r.uint8array?(l=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(l=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:i.utf8decode(l),meta:t.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,n.inherits(c,o),c.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,i){"use strict";var n=t("./support"),r=t("./base64"),s=t("./nodejsUtils"),o=t("set-immediate-shim"),a=t("./external");function l(t){return t}function h(t,e){for(var i=0;i<t.length;++i)e[i]=255&t.charCodeAt(i);return e}i.newBlob=function(t,e){i.checkSupport("blob");try{return new Blob([t],{type:e})}catch(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(t,e,i){var n=[],r=0,s=t.length;if(s<=i)return String.fromCharCode.apply(null,t);for(;r<s;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(r,Math.min(r+i,s)))):n.push(String.fromCharCode.apply(null,t.subarray(r,Math.min(r+i,s)))),r+=i;return n.join("")},stringifyByChar:function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function u(t){var e=65536,n=i.getTypeOf(t),r=!0;if("uint8array"===n?r=c.applyCanBeUsed.uint8array:"nodebuffer"===n&&(r=c.applyCanBeUsed.nodebuffer),r)for(;1<e;)try{return c.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return c.stringifyByChar(t)}function d(t,e){for(var i=0;i<t.length;i++)e[i]=t[i];return e}i.applyFromCharCode=u;var f={};f.string={string:l,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return f.string.uint8array(t).buffer},uint8array:function(t){return h(t,new Uint8Array(t.length))},nodebuffer:function(t){return h(t,s.allocBuffer(t.length))}},f.array={string:u,array:l,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},f.arraybuffer={string:function(t){return u(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:l,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},f.uint8array={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:l,nodebuffer:function(t){return s.newBufferFrom(t)}},f.nodebuffer={string:u,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return f.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:l},i.transformTo=function(t,e){if(e=e||"",!t)return e;i.checkSupport(t);var n=i.getTypeOf(e);return f[n][t](e)},i.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&s.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(t){var e,i,n="";for(i=0;i<(t||"").length;i++)n+="\\x"+((e=t.charCodeAt(i))<16?"0":"")+e.toString(16).toUpperCase();return n},i.delay=function(t,e,i){o((function(){t.apply(i||null,e||[])}))},i.inherits=function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i},i.extend=function(){var t,e,i={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===i[e]&&(i[e]=arguments[t][e]);return i},i.prepareContent=function(t,e,s,o,l){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise((function(e,i){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){i(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(e){var c=i.getTypeOf(e);return c?("arraybuffer"===c?e=i.transformTo("uint8array",e):"string"===c&&(l?e=r.decode(e):s&&!0!==o&&(e=function(t){return h(t,n.uint8array?new Uint8Array(t.length):new Array(t.length))}(e))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,i){"use strict";var n=t("./reader/readerFor"),r=t("./utils"),s=t("./signature"),o=t("./zipEntry"),a=(t("./utf8"),t("./support"));function l(t){this.files=[],this.loadOptions=t}l.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(e)+", expected "+r.pretty(t)+")")}},isSignature:function(t,e){var i=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===e;return this.reader.setIndex(i),n},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 t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",i=r.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(i)},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 t,e,i,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),e=this.reader.readInt(4),i=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:i}},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 t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,s.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(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=e-i;if(0<n)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,i){"use strict";var n=t("./reader/readerFor"),r=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),a=t("./utf8"),l=t("./compressions"),h=t("./support");function c(t,e){this.options=t,this.loadOptions=e}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,i;if(t.skip(22),this.fileNameLength=t.readInt(2),i=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(i),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in l)if(l.hasOwnProperty(e)&&l[e].magic===t)return l[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,i,n,r=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<r;)e=t.readInt(2),i=t.readInt(2),n=t.readData(i),this.extraFields[e]={id:e,length:i,value:n};t.setIndex(r)},handleUTF8:function(){var t=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var i=r.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var s=r.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||o(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=n(t.value);return 1!==e.readInt(1)||o(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,i){"use strict";function n(t,e,i){this.name=t,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=e,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}}var r=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),o=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,i="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(i=t.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),e=this._decompressWorker();var s=!this._dataBinary;s&&!n&&(e=e.pipe(new o.Utf8EncodeWorker)),!s&&n&&(e=e.pipe(new o.Utf8DecodeWorker))}catch(t){(e=new l("error")).error(t)}return new r(e,i,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(i,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<h.length;u++)n.prototype[h[u]]=c;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,i){(function(t){"use strict";var i,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var s=0,o=new r(c),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var l=new t.MessageChannel;l.port1.onmessage=c,i=function(){l.port2.postMessage(0)}}var h=[];function c(){var t,e;n=!0;for(var i=h.length;i;){for(e=h,h=[],t=-1;++t<i;)e[t]();i=h.length}n=!1}e.exports=function(t){1!==h.push(t)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,i){"use strict";var n=t("immediate");function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function h(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,i){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(t,e,i){n((function(){var n;try{n=e(i)}catch(n){return s.reject(t,n)}n===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var i=!1;function n(e){i||(i=!0,s.reject(t,e))}function r(e){i||(i=!0,s.resolve(t,e))}var o=p((function(){e(r,n)}));"error"===o.status&&n(o.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}(e.exports=h).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))},h.prototype.catch=function(t){return this.then(null,t)},h.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===o)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new c(i,t,e)),i},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},s.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return s.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,o=t.queue.length;++r<o;)t.queue[r].callFulfilled(e)}return t},s.reject=function(t,e){t.state=o,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},h.resolve=function(t){return t instanceof this?t:s.resolve(new this(r),t)},h.reject=function(t){var e=new this(r);return s.reject(e,t)},h.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,h=new this(r);++l<i;)c(t[l],l);return h;function c(t,r){e.resolve(t).then((function(t){o[r]=t,++a!==i||n||(n=!0,s.resolve(h,o))}),(function(t){n||(n=!0,s.reject(h,t))}))}},h.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=!1;if(!e)return this.resolve([]);for(var n,o=-1,a=new this(r);++o<e;)n=t[o],this.resolve(n).then((function(t){i||(i=!0,s.resolve(a,t))}),(function(t){i||(i=!0,s.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,i){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,i){"use strict";var n=t("./zlib/deflate"),r=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==i)throw new Error(o[i]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var c;if(c="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(i=n.deflateSetDictionary(this.strm,c)))throw new Error(o[i]);this._dict_set=!0}}function c(t,e){var i=new h(e);if(i.push(t,!0),i.err)throw i.msg||o[i.err];return i.result}h.prototype.push=function(t,e){var i,o,a=this.strm,h=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===l.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(h),a.next_out=0,a.avail_out=h),1!==(i=n.deflate(a,o))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===o?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==o||(this.onEnd(0),!(a.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Deflate=h,i.deflate=c,i.deflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},i.gzip=function(t,e){return(e=e||{}).gzip=!0,c(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,i){"use strict";var n=t("./zlib/inflate"),r=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),h=t("./zlib/gzheader"),c=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,e.windowBits);if(i!==o.Z_OK)throw new Error(a[i]);this.header=new h,n.inflateGetHeader(this.strm,this.header)}function d(t,e){var i=new u(e);if(i.push(t,!0),i.err)throw i.msg||a[i.err];return i.result}u.prototype.push=function(t,e){var i,a,l,h,u,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?f.input=s.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(i=n.inflate(f,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&g&&(d="string"==typeof g?s.string2buf(g):"[object ArrayBuffer]"===c.call(g)?new Uint8Array(g):g,i=n.inflateSetDictionary(this.strm,d)),i===o.Z_BUF_ERROR&&!0===m&&(i=o.Z_OK,m=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&i!==o.Z_STREAM_END&&(0!==f.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(f.output,f.next_out),h=f.next_out-l,u=s.buf2string(f.output,l),f.next_out=h,f.avail_out=p-h,h&&r.arraySet(f.output,f.output,l,h,0),this.onData(u)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((0<f.avail_in||0===f.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(f.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Inflate=u,i.inflate=d,i.inflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},i.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var i=e.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}}return t},i.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,i,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(i,i+n),r);else for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){var e,i,n,r,s,o;for(e=n=0,i=t.length;e<i;e++)n+=t[e].length;for(o=new Uint8Array(n),e=r=0,i=t.length;e<i;e++)s=t[e],o.set(s,r),r+=s.length;return o}},s={arraySet:function(t,e,i,n,r){for(var s=0;s<n;s++)t[r+s]=e[i+s]},flattenChunks:function(t){return[].concat.apply([],t)}};i.setTyped=function(t){t?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,r)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(n)},{}],42:[function(t,e,i){"use strict";var n=t("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var i="",o=0;o<e;o++)i+=String.fromCharCode(t[o]);return i}o[254]=o[254]=1,i.string2buf=function(t){var e,i,r,s,o,a=t.length,l=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),l+=i<128?1:i<2048?2:i<65536?3:4;for(e=new n.Buf8(l),s=o=0;o<l;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(r-56320),s++),i<128?e[o++]=i:(i<2048?e[o++]=192|i>>>6:(i<65536?e[o++]=224|i>>>12:(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63),e[o++]=128|i>>>6&63),e[o++]=128|63&i);return e},i.buf2binstring=function(t){return l(t,t.length)},i.binstring2buf=function(t){for(var e=new n.Buf8(t.length),i=0,r=e.length;i<r;i++)e[i]=t.charCodeAt(i);return e},i.buf2string=function(t,e){var i,n,r,s,a=e||t.length,h=new Array(2*a);for(i=n=0;i<a;)if((r=t[i++])<128)h[n++]=r;else if(4<(s=o[r]))h[n++]=65533,i+=s-1;else{for(r&=2===s?31:3===s?15:7;1<s&&i<a;)r=r<<6|63&t[i++],s--;1<s?h[n++]=65533:r<65536?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return l(h,n)},i.utf8border=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+o[t[i]]>e?i:e}},{"./common":41}],43:[function(t,e,i){"use strict";e.exports=function(t,e,i,n){for(var r=65535&t|0,s=t>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;s=s+(r=r+e[n++]|0)|0,--o;);r%=65521,s%=65521}return r|s<<16|0}},{}],44:[function(t,e,i){"use strict";e.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(t,e,i){"use strict";var n=function(){for(var t,e=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}();e.exports=function(t,e,i,r){var s=n,o=r+i;t^=-1;for(var a=r;a<o;a++)t=t>>>8^s[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,i){"use strict";var n,r=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),l=t("./messages"),h=-2,c=258,u=262,d=113;function f(t,e){return t.msg=l[e],e}function p(t){return(t<<1)-(4<t?9:0)}function g(t){for(var e=t.length;0<=--e;)t[e]=0}function m(t){var e=t.state,i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(r.arraySet(t.output,e.pending_buf,e.pending_out,i,t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))}function v(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var i,n,r=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,l=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,h=t.window,d=t.w_mask,f=t.prev,p=t.strstart+c,g=h[s+o-1],m=h[s+o];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(h[(i=e)+o]===m&&h[i+o-1]===g&&h[i]===h[s]&&h[++i]===h[s+1]){s+=2,i++;do{}while(h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&s<p);if(n=c-(p-s),s=p-c,o<n){if(t.match_start=e,a<=(o=n))break;g=h[s+o-1],m=h[s+o]}}}while((e=f[e&d])>l&&0!=--r);return o<=t.lookahead?o:t.lookahead}function x(t){var e,i,n,s,l,h,c,d,f,p,g=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-u)){for(r.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=i=t.hash_size;n=t.head[--e],t.head[e]=g<=n?n-g:0,--i;);for(e=i=g;n=t.prev[--e],t.prev[e]=g<=n?n-g:0,--i;);s+=g}if(0===t.strm.avail_in)break;if(h=t.strm,c=t.window,d=t.strstart+t.lookahead,p=void 0,(f=s)<(p=h.avail_in)&&(p=f),i=0===p?0:(h.avail_in-=p,r.arraySet(c,h.input,h.next_in,p,d),1===h.state.wrap?h.adler=o(h.adler,c,p,d):2===h.state.wrap&&(h.adler=a(h.adler,c,p,d)),h.next_in+=p,h.total_in+=p,p),t.lookahead+=i,t.lookahead+t.insert>=3)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+3-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<u&&0!==t.strm.avail_in)}function _(t,e){for(var i,n;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-u&&(t.match_length=w(t,i)),t.match_length>=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function E(t,e){for(var i,n,r;;){if(t.lookahead<u){if(x(t),t.lookahead<u&&0===e)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-u&&(t.match_length=w(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(r=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&v(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function k(t,e,i,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=n,this.func=r}function T(){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=8,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 r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),g(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 S(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,s._tr_init(e),0):f(t,h)}function C(t){var e=S(t);return 0===e&&function(t){t.window_size=2*t.w_size,g(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),e}function N(t,e,i,n,s,o){if(!t)return h;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||9<s||8!==i||n<8||15<n||e<0||9<e||o<0||4<o)return f(t,h);8===n&&(n=9);var l=new T;return(t.state=l).strm=t,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new r.Buf8(2*l.w_size),l.head=new r.Buf16(l.hash_size),l.prev=new r.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new r.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=o,l.method=i,C(t)}n=[new k(0,0,0,0,(function(t,e){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new k(4,4,8,4,_),new k(4,5,16,8,_),new k(4,6,32,32,_),new k(4,4,16,16,E),new k(8,16,32,32,E),new k(8,16,128,128,E),new k(8,32,128,256,E),new k(32,128,258,1024,E),new k(32,258,258,4096,E)],i.deflateInit=function(t,e){return N(t,e,8,15,8,0)},i.deflateInit2=N,i.deflateReset=C,i.deflateResetKeep=S,i.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,0):h},i.deflate=function(t,e){var i,r,o,l;if(!t||!t.state||5<e||e<0)return t?f(t,h):h;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return f(t,0===t.avail_out?-5:h);if(r.strm=t,i=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,y(r,31),y(r,139),y(r,8),r.gzhead?(y(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),y(r,255&r.gzhead.time),y(r,r.gzhead.time>>8&255),y(r,r.gzhead.time>>16&255),y(r,r.gzhead.time>>24&255),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(y(r,255&r.gzhead.extra.length),y(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=a(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(y(r,0),y(r,0),y(r,0),y(r,0),y(r,0),y(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),y(r,3),r.status=d);else{var u=8+(r.w_bits-8<<4)<<8;u|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=d,b(r,u),0!==r.strstart&&(b(r,t.adler>>>16),b(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(o=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),m(t),o=r.pending,r.pending!==r.pending_buf_size));)y(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),m(t),o=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),m(t),o=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,y(r,l)}while(0!==l);r.gzhead.hcrc&&r.pending>o&&(t.adler=a(t.adler,r.pending_buf,r.pending-o,o)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&m(t),r.pending+2<=r.pending_buf_size&&(y(r,255&t.adler),y(r,t.adler>>8&255),t.adler=0,r.status=d)):r.status=d),0!==r.pending){if(m(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(i)&&4!==e)return f(t,-5);if(666===r.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var w=2===r.strategy?function(t,e){for(var i;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var i,n,r,o,a=t.window;;){if(t.lookahead<=c){if(x(t),t.lookahead<=c&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[r=t.strstart-1])===a[++r]&&n===a[++r]&&n===a[++r]){o=t.strstart+c;do{}while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);t.match_length=c-(o-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===e?s._tr_align(r):5!==e&&(s._tr_stored_block(r,0,0,!1),3===e&&(g(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),m(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(y(r,255&t.adler),y(r,t.adler>>8&255),y(r,t.adler>>16&255),y(r,t.adler>>24&255),y(r,255&t.total_in),y(r,t.total_in>>8&255),y(r,t.total_in>>16&255),y(r,t.total_in>>24&255)):(b(r,t.adler>>>16),b(r,65535&t.adler)),m(t),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?0:1)},i.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==d&&666!==e?f(t,h):(t.state=null,e===d?f(t,-3):0):h},i.deflateSetDictionary=function(t,e){var i,n,s,a,l,c,u,d,f=e.length;if(!t||!t.state)return h;if(2===(a=(i=t.state).wrap)||1===a&&42!==i.status||i.lookahead)return h;for(1===a&&(t.adler=o(t.adler,e,f,0)),i.wrap=0,f>=i.w_size&&(0===a&&(g(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new r.Buf8(i.w_size),r.arraySet(d,e,f-i.w_size,i.w_size,0),e=d,f=i.w_size),l=t.avail_in,c=t.next_in,u=t.input,t.avail_in=f,t.next_in=0,t.input=e,x(i);i.lookahead>=3;){for(n=i.strstart,s=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--s;);i.strstart=n,i.lookahead=2,x(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=c,t.input=u,t.avail_in=l,i.wrap=a,0},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,i){"use strict";e.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(t,e,i){"use strict";e.exports=function(t,e){var i,n,r,s,o,a,l,h,c,u,d,f,p,g,m,v,y,b,w,x,_,E,k,T,S;i=t.state,n=t.next_in,T=t.input,r=n+(t.avail_in-5),s=t.next_out,S=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),l=i.dmax,h=i.wsize,c=i.whave,u=i.wnext,d=i.window,f=i.hold,p=i.bits,g=i.lencode,m=i.distcode,v=(1<<i.lenbits)-1,y=(1<<i.distbits)-1;t:do{p<15&&(f+=T[n++]<<p,p+=8,f+=T[n++]<<p,p+=8),b=g[f&v];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))S[s++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(f&(1<<w)-1)];continue e}if(32&w){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}x=65535&b,(w&=15)&&(p<w&&(f+=T[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=T[n++]<<p,p+=8,f+=T[n++]<<p,p+=8),b=m[f&y];i:for(;;){if(f>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(f&(1<<w)-1)];continue i}t.msg="invalid distance code",i.mode=30;break t}if(_=65535&b,p<(w&=15)&&(f+=T[n++]<<p,(p+=8)<w&&(f+=T[n++]<<p,p+=8)),l<(_+=f&(1<<w)-1)){t.msg="invalid distance too far back",i.mode=30;break t}if(f>>>=w,p-=w,(w=s-o)<_){if(c<(w=_-w)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(k=d,(E=0)===u){if(E+=h-w,w<x){for(x-=w;S[s++]=d[E++],--w;);E=s-_,k=S}}else if(u<w){if(E+=h+u-w,(w-=u)<x){for(x-=w;S[s++]=d[E++],--w;);if(E=0,u<x){for(x-=w=u;S[s++]=d[E++],--w;);E=s-_,k=S}}}else if(E+=u-w,w<x){for(x-=w;S[s++]=d[E++],--w;);E=s-_,k=S}for(;2<x;)S[s++]=k[E++],S[s++]=k[E++],S[s++]=k[E++],x-=3;x&&(S[s++]=k[E++],1<x&&(S[s++]=k[E++]))}else{for(E=s-_;S[s++]=S[E++],S[s++]=S[E++],S[s++]=S[E++],2<(x-=3););x&&(S[s++]=S[E++],1<x&&(S[s++]=S[E++]))}break}}break}}while(n<r&&s<a);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=s<a?a-s+257:257-(s-a),i.hold=f,i.bits=p}},{}],49:[function(t,e,i){"use strict";var n=t("../utils/common"),r=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),l=-2;function h(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):l}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,u(t)):l}function f(t,e){var i,n;return t&&t.state?(n=t.state,e<0?(i=0,e=-e):(i=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?l:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,d(t))):l}function p(t,e){var i,n;return t?(n=new c,(t.state=n).window=null,0!==(i=f(t,e))&&(t.state=null),i):l}var g,m,v=!0;function y(t){if(v){var e;for(g=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),v=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function b(t,e,i,r){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),r>=o.wsize?(n.arraySet(o.window,e,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r<(s=o.wsize-o.wnext)&&(s=r),n.arraySet(o.window,e,i-r,s,o.wnext),(r-=s)?(n.arraySet(o.window,e,i-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}i.inflateReset=d,i.inflateReset2=f,i.inflateResetKeep=u,i.inflateInit=function(t){return p(t,15)},i.inflateInit2=p,i.inflate=function(t,e){var i,c,u,d,f,p,g,m,v,w,x,_,E,k,T,S,C,N,O,I,A,R,D,j,z=0,L=new n.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return l;12===(i=t.state).mode&&(i.mode=13),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,c=t.input,p=t.avail_in,m=i.hold,v=i.bits,w=p,x=g,R=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;v<16;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(2&i.wrap&&35615===m){L[i.check=0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0),v=m=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",i.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===i.wbits)i.wbits=A;else if(A>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<A,t.adler=i.check=1,i.mode=512&m?10:12,v=m=0;break;case 2:for(;v<16;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(i.flags=m,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=m>>8&1),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0,i.mode=3;case 3:for(;v<32;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.head&&(i.head.time=m),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,L[2]=m>>>16&255,L[3]=m>>>24&255,i.check=s(i.check,L,4,0)),v=m=0,i.mode=4;case 4:for(;v<16;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.head&&(i.head.xflags=255&m,i.head.os=m>>8),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0,i.mode=5;case 5:if(1024&i.flags){for(;v<16;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.length=m,i.head&&(i.head.extra_len=m),512&i.flags&&(L[0]=255&m,L[1]=m>>>8&255,i.check=s(i.check,L,2,0)),v=m=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p<(_=i.length)&&(_=p),_&&(i.head&&(A=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,c,d,_,A)),512&i.flags&&(i.check=s(i.check,c,_,d)),p-=_,d+=_,i.length-=_),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===p)break t;for(_=0;A=c[d+_++],i.head&&A&&i.length<65536&&(i.head.name+=String.fromCharCode(A)),A&&_<p;);if(512&i.flags&&(i.check=s(i.check,c,_,d)),p-=_,d+=_,A)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===p)break t;for(_=0;A=c[d+_++],i.head&&A&&i.length<65536&&(i.head.comment+=String.fromCharCode(A)),A&&_<p;);if(512&i.flags&&(i.check=s(i.check,c,_,d)),p-=_,d+=_,A)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;v<16;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(m!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}v=m=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;v<32;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}t.adler=i.check=h(m),v=m=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,2;t.adler=i.check=1,i.mode=12;case 12:if(5===e||6===e)break t;case 13:if(i.last){m>>>=7&v,v-=7&v,i.mode=27;break}for(;v<3;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}switch(i.last=1&m,v-=1,3&(m>>>=1)){case 0:i.mode=14;break;case 1:if(y(i),i.mode=20,6!==e)break;m>>>=2,v-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&m,v=m=0,i.mode=15,6===e)break t;case 15:i.mode=16;case 16:if(_=i.length){if(p<_&&(_=p),g<_&&(_=g),0===_)break t;n.arraySet(u,c,d,_,f),p-=_,d+=_,g-=_,f+=_,i.length-=_;break}i.mode=12;break;case 17:for(;v<14;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(i.nlen=257+(31&m),m>>>=5,v-=5,i.ndist=1+(31&m),m>>>=5,v-=5,i.ncode=4+(15&m),m>>>=4,v-=4,286<i.nlen||30<i.ndist){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;v<3;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.lens[P[i.have++]]=7&m,m>>>=3,v-=3}for(;i.have<19;)i.lens[P[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,D={bits:i.lenbits},R=a(0,i.lens,0,19,i.lencode,0,i.work,D),i.lenbits=D.bits,R){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;S=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(C<16)m>>>=T,v-=T,i.lens[i.have++]=C;else{if(16===C){for(j=T+2;v<j;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(m>>>=T,v-=T,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}A=i.lens[i.have-1],_=3+(3&m),m>>>=2,v-=2}else if(17===C){for(j=T+3;v<j;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}v-=T,A=0,_=3+(7&(m>>>=T)),m>>>=3,v-=3}else{for(j=T+7;v<j;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}v-=T,A=0,_=11+(127&(m>>>=T)),m>>>=7,v-=7}if(i.have+_>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;_--;)i.lens[i.have++]=A}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,D={bits:i.lenbits},R=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,D),i.lenbits=D.bits,R){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,D={bits:i.distbits},R=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,D),i.distbits=D.bits,R){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===e)break t;case 20:i.mode=21;case 21:if(6<=p&&258<=g){t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,o(t,x),f=t.next_out,u=t.output,g=t.avail_out,d=t.next_in,c=t.input,p=t.avail_in,m=i.hold,v=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;S=(z=i.lencode[m&(1<<i.lenbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(S&&0==(240&S)){for(N=T,O=S,I=C;S=(z=i.lencode[I+((m&(1<<N+O)-1)>>N)])>>>16&255,C=65535&z,!(N+(T=z>>>24)<=v);){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}m>>>=N,v-=N,i.back+=N}if(m>>>=T,v-=T,i.back+=T,i.length=C,0===S){i.mode=26;break}if(32&S){i.back=-1,i.mode=12;break}if(64&S){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&S,i.mode=22;case 22:if(i.extra){for(j=i.extra;v<j;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.length+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;S=(z=i.distcode[m&(1<<i.distbits)-1])>>>16&255,C=65535&z,!((T=z>>>24)<=v);){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(0==(240&S)){for(N=T,O=S,I=C;S=(z=i.distcode[I+((m&(1<<N+O)-1)>>N)])>>>16&255,C=65535&z,!(N+(T=z>>>24)<=v);){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}m>>>=N,v-=N,i.back+=N}if(m>>>=T,v-=T,i.back+=T,64&S){t.msg="invalid distance code",i.mode=30;break}i.offset=C,i.extra=15&S,i.mode=24;case 24:if(i.extra){for(j=i.extra;v<j;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}i.offset+=m&(1<<i.extra)-1,m>>>=i.extra,v-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===g)break t;if(_=x-g,i.offset>_){if((_=i.offset-_)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}E=_>i.wnext?(_-=i.wnext,i.wsize-_):i.wnext-_,_>i.length&&(_=i.length),k=i.window}else k=u,E=f-i.offset,_=i.length;for(g<_&&(_=g),g-=_,i.length-=_;u[f++]=k[E++],--_;);0===i.length&&(i.mode=21);break;case 26:if(0===g)break t;u[f++]=i.length,g--,i.mode=21;break;case 27:if(i.wrap){for(;v<32;){if(0===p)break t;p--,m|=c[d++]<<v,v+=8}if(x-=g,t.total_out+=x,i.total+=x,x&&(t.adler=i.check=i.flags?s(i.check,u,x,f-x):r(i.check,u,x,f-x)),x=g,(i.flags?m:h(m))!==i.check){t.msg="incorrect data check",i.mode=30;break}v=m=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;v<32;){if(0===p)break t;p--,m+=c[d++]<<v,v+=8}if(m!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}v=m=0}i.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;case 32:default:return l}return t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=p,i.hold=m,i.bits=v,(i.wsize||x!==t.avail_out&&i.mode<30&&(i.mode<27||4!==e))&&b(t,t.output,t.next_out,x-t.avail_out)?(i.mode=31,-4):(w-=t.avail_in,x-=t.avail_out,t.total_in+=w,t.total_out+=x,i.total+=x,i.wrap&&x&&(t.adler=i.check=i.flags?s(i.check,u,x,t.next_out-x):r(i.check,u,x,t.next_out-x)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==w&&0===x||4===e)&&0===R&&(R=-5),R)},i.inflateEnd=function(t){if(!t||!t.state)return l;var e=t.state;return e.window&&(e.window=null),t.state=null,0},i.inflateGetHeader=function(t,e){var i;return t&&t.state?0==(2&(i=t.state).wrap)?l:((i.head=e).done=!1,0):l},i.inflateSetDictionary=function(t,e){var i,n=e.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?l:11===i.mode&&r(1,e,n,0)!==i.check?-3:b(t,e,n,n)?(i.mode=31,-4):(i.havedict=1,0):l},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,i){"use strict";var n=t("../utils/common"),r=[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],s=[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],o=[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],a=[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];e.exports=function(t,e,i,l,h,c,u,d){var f,p,g,m,v,y,b,w,x,_=d.bits,E=0,k=0,T=0,S=0,C=0,N=0,O=0,I=0,A=0,R=0,D=null,j=0,z=new n.Buf16(16),L=new n.Buf16(16),P=null,B=0;for(E=0;E<=15;E++)z[E]=0;for(k=0;k<l;k++)z[e[i+k]]++;for(C=_,S=15;1<=S&&0===z[S];S--);if(S<C&&(C=S),0===S)return h[c++]=20971520,h[c++]=20971520,d.bits=1,0;for(T=1;T<S&&0===z[T];T++);for(C<T&&(C=T),E=I=1;E<=15;E++)if(I<<=1,(I-=z[E])<0)return-1;if(0<I&&(0===t||1!==S))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+z[E];for(k=0;k<l;k++)0!==e[i+k]&&(u[L[e[i+k]]++]=k);if(y=0===t?(D=P=u,19):1===t?(D=r,j-=257,P=s,B-=257,256):(D=o,P=a,-1),E=T,v=c,O=k=R=0,g=-1,m=(A=1<<(N=C))-1,1===t&&852<A||2===t&&592<A)return 1;for(;;){for(b=E-O,x=u[k]<y?(w=0,u[k]):u[k]>y?(w=P[B+u[k]],D[j+u[k]]):(w=96,0),f=1<<E-O,T=p=1<<N;h[v+(R>>O)+(p-=f)]=b<<24|w<<16|x|0,0!==p;);for(f=1<<E-1;R&f;)f>>=1;if(0!==f?(R&=f-1,R+=f):R=0,k++,0==--z[E]){if(E===S)break;E=e[i+u[k]]}if(C<E&&(R&m)!==g){for(0===O&&(O=C),v+=T,I=1<<(N=E-O);N+O<S&&!((I-=z[N+O])<=0);)N++,I<<=1;if(A+=1<<N,1===t&&852<A||2===t&&592<A)return 1;h[g=R&m]=C<<24|N<<16|v-c|0}}return 0!==R&&(h[v+R]=E-O<<24|64<<16|0),d.bits=C,0}},{"../utils/common":41}],51:[function(t,e,i){"use strict";e.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(t,e,i){"use strict";var n=t("../utils/common");function r(t){for(var e=t.length;0<=--e;)t[e]=0}var s=256,o=286,a=30,l=15,h=[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],c=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);r(f);var p=new Array(60);r(p);var g=new Array(512);r(g);var m=new Array(256);r(m);var v=new Array(29);r(v);var y,b,w,x=new Array(a);function _(t,e,i,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function E(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function k(t){return t<256?g[t]:g[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,i){t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,T(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)}function C(t,e,i){S(t,i[2*e],i[2*e+1])}function N(t,e){for(var i=0;i|=1&t,t>>>=1,i<<=1,0<--e;);return i>>>1}function O(t,e,i){var n,r,s=new Array(16),o=0;for(n=1;n<=l;n++)s[n]=o=o+i[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=N(s[a]++,a))}}function I(t){var e;for(e=0;e<o;e++)t.dyn_ltree[2*e]=0;for(e=0;e<a;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){8<t.bi_valid?T(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function R(t,e,i,n){var r=2*e,s=2*i;return t[r]<t[s]||t[r]===t[s]&&n[e]<=n[i]}function D(t,e,i){for(var n=t.heap[i],r=i<<1;r<=t.heap_len&&(r<t.heap_len&&R(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!R(e,n,t.heap[r],t.depth));)t.heap[i]=t.heap[r],i=r,r<<=1;t.heap[i]=n}function j(t,e,i){var n,r,o,a,l=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?C(t,r,e):(C(t,(o=m[r])+s+1,e),0!==(a=h[o])&&S(t,r-=v[o],a),C(t,o=k(--n),i),0!==(a=c[o])&&S(t,n-=x[o],a)),l<t.last_lit;);C(t,256,e)}function z(t,e){var i,n,r,s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,h=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<h;i++)0!==s[2*i]?(t.heap[++t.heap_len]=c=i,t.depth[i]=0):s[2*i+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=o[2*r+1]);for(e.max_code=c,i=t.heap_len>>1;1<=i;i--)D(t,s,i);for(r=h;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,s[2*r]=s[2*i]+s[2*n],t.depth[r]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,s[2*i+1]=s[2*n+1]=r,t.heap[1]=r++,D(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var i,n,r,s,o,a,h=e.dyn_tree,c=e.max_code,u=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(s=0;s<=l;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)g<(s=h[2*h[2*(n=t.heap[i])+1]+1]+1)&&(s=g,m++),h[2*n+1]=s,c<n||(t.bl_count[s]++,o=0,p<=n&&(o=f[n-p]),a=h[2*n],t.opt_len+=a*(s+o),d&&(t.static_len+=a*(u[2*n+1]+o)));if(0!==m){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,m-=2}while(0<m);for(s=g;0!==s;s--)for(n=t.bl_count[s];0!==n;)c<(r=t.heap[--i])||(h[2*r+1]!==s&&(t.opt_len+=(s-h[2*r+1])*h[2*r],h[2*r+1]=s),n--)}}(t,e),O(s,c,t.bl_count)}function L(t,e,i){var n,r,s=-1,o=e[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=e[2*(n+1)+1],++a<l&&r===o||(a<h?t.bl_tree[2*r]+=a:0!==r?(r!==s&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=r,h=(a=0)===o?(l=138,3):r===o?(l=6,3):(l=7,4))}function P(t,e,i){var n,r,s=-1,o=e[1],a=0,l=7,h=4;for(0===o&&(l=138,h=3),n=0;n<=i;n++)if(r=o,o=e[2*(n+1)+1],!(++a<l&&r===o)){if(a<h)for(;C(t,r,t.bl_tree),0!=--a;);else 0!==r?(r!==s&&(C(t,r,t.bl_tree),a--),C(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(C(t,17,t.bl_tree),S(t,a-3,3)):(C(t,18,t.bl_tree),S(t,a-11,7));s=r,h=(a=0)===o?(l=138,3):r===o?(l=6,3):(l=7,4)}}r(x);var B=!1;function M(t,e,i,r){S(t,0+(r?1:0),3),function(t,e,i,r){A(t),T(t,i),T(t,~i),n.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}(t,e,i)}i._tr_init=function(t){B||(function(){var t,e,i,n,r,s=new Array(16);for(n=i=0;n<28;n++)for(v[n]=i,t=0;t<1<<h[n];t++)m[i++]=n;for(m[i-1]=n,n=r=0;n<16;n++)for(x[n]=r,t=0;t<1<<c[n];t++)g[r++]=n;for(r>>=7;n<a;n++)for(x[n]=r<<7,t=0;t<1<<c[n]-7;t++)g[256+r++]=n;for(e=0;e<=l;e++)s[e]=0;for(t=0;t<=143;)f[2*t+1]=8,t++,s[8]++;for(;t<=255;)f[2*t+1]=9,t++,s[9]++;for(;t<=279;)f[2*t+1]=7,t++,s[7]++;for(;t<=287;)f[2*t+1]=8,t++,s[8]++;for(O(f,287,s),t=0;t<a;t++)p[2*t+1]=5,p[2*t]=N(t,5);y=new _(f,h,257,o,l),b=new _(p,c,0,a,l),w=new _(new Array(0),u,0,19,7)}(),B=!0),t.l_desc=new E(t.dyn_ltree,y),t.d_desc=new E(t.dyn_dtree,b),t.bl_desc=new E(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,I(t)},i._tr_stored_block=M,i._tr_flush_block=function(t,e,i,n){var r,o,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<s;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),z(t,t.l_desc),z(t,t.d_desc),a=function(t){var e;for(L(t,t.dyn_ltree,t.l_desc.max_code),L(t,t.dyn_dtree,t.d_desc.max_code),z(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=r&&(r=o)):r=o=i+5,i+4<=r&&-1!==e?M(t,e,i,n):4===t.strategy||o===r?(S(t,2+(n?1:0),3),j(t,f,p)):(S(t,4+(n?1:0),3),function(t,e,i,n){var r;for(S(t,e-257,5),S(t,i-1,5),S(t,n-4,4),r=0;r<n;r++)S(t,t.bl_tree[2*d[r]+1],3);P(t,t.dyn_ltree,e-1),P(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),j(t,t.dyn_ltree,t.dyn_dtree)),I(t),n&&A(t)},i._tr_tally=function(t,e,i){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(m[i]+s+1)]++,t.dyn_dtree[2*k(e)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){S(t,2,3),C(t,256,f),function(t){16===t.bi_valid?(T(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,i){"use strict";e.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(t,e,i){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("JSZip")):"function"==typeof define&&define.amd?define(["JSZip"],e):"object"==typeof exports?exports.ePub=e(require("JSZip")):t.ePub=e(t.JSZip)}(window,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=30)}([function(t,e,i){"use strict";i.r(e),i.d(e,"requestAnimationFrame",(function(){return r})),i.d(e,"uuid",(function(){return o})),i.d(e,"documentHeight",(function(){return a})),i.d(e,"isElement",(function(){return l})),i.d(e,"isNumber",(function(){return h})),i.d(e,"isFloat",(function(){return c})),i.d(e,"prefixed",(function(){return u})),i.d(e,"defaults",(function(){return d})),i.d(e,"extend",(function(){return f})),i.d(e,"insert",(function(){return p})),i.d(e,"locationOf",(function(){return g})),i.d(e,"indexOfSorted",(function(){return m})),i.d(e,"bounds",(function(){return v})),i.d(e,"borders",(function(){return y})),i.d(e,"nodeBounds",(function(){return b})),i.d(e,"windowBounds",(function(){return w})),i.d(e,"indexOfNode",(function(){return x})),i.d(e,"indexOfTextNode",(function(){return _})),i.d(e,"indexOfElementNode",(function(){return E})),i.d(e,"isXml",(function(){return k})),i.d(e,"createBlob",(function(){return T})),i.d(e,"createBlobUrl",(function(){return S})),i.d(e,"revokeBlobUrl",(function(){return C})),i.d(e,"createBase64Url",(function(){return N})),i.d(e,"type",(function(){return O})),i.d(e,"parse",(function(){return I})),i.d(e,"qs",(function(){return A})),i.d(e,"qsa",(function(){return R})),i.d(e,"qsp",(function(){return D})),i.d(e,"sprint",(function(){return j})),i.d(e,"treeWalker",(function(){return z})),i.d(e,"walk",(function(){return L})),i.d(e,"blob2base64",(function(){return P})),i.d(e,"defer",(function(){return B})),i.d(e,"querySelectorByType",(function(){return M})),i.d(e,"findChildren",(function(){return F})),i.d(e,"parents",(function(){return q})),i.d(e,"filterChildren",(function(){return U})),i.d(e,"getParentByTagName",(function(){return W})),i.d(e,"RangeObject",(function(){return $}));var n=i(15);const r="undefined"!=typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),s="undefined"!=typeof URL?URL:"undefined"!=typeof window?window.URL||window.webkitURL||window.mozURL:void 0;function o(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:7&i|8).toString(16)}))}function a(){return Math.max(document.documentElement.clientHeight,document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight)}function l(t){return!(!t||1!=t.nodeType)}function h(t){return!isNaN(parseFloat(t))&&isFinite(t)}function c(t){let e=parseFloat(t);return!1!==h(t)&&("string"==typeof t&&t.indexOf(".")>-1||Math.floor(e)!==e)}function u(t){var e=["-webkit-","-webkit-","-moz-","-o-","-ms-"],i=t.toLowerCase(),n=["Webkit","webkit","Moz","O","ms"].length;if("undefined"==typeof document||void 0!==document.body.style[i])return t;for(var r=0;r<n;r++)if(void 0!==document.body.style[e[r]+i])return e[r]+i;return t}function d(t){for(var e=1,i=arguments.length;e<i;e++){var n=arguments[e];for(var r in n)void 0===t[r]&&(t[r]=n[r])}return t}function f(t){var e=[].slice.call(arguments,1);return e.forEach((function(e){e&&Object.getOwnPropertyNames(e).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))})),t}function p(t,e,i){var n=g(t,e,i);return e.splice(n,0,t),n}function g(t,e,i,n,r){var s,o=n||0,a=r||e.length,l=parseInt(o+(a-o)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0?l:(s=i(e[l],t),a-o==1?s>=0?l:l+1:0===s?l:-1===s?g(t,e,i,l,a):g(t,e,i,o,l))}function m(t,e,i,n,r){var s,o=n||0,a=r||e.length,l=parseInt(o+(a-o)/2);return i||(i=function(t,e){return t>e?1:t<e?-1:t==e?0:void 0}),a-o<=0?-1:(s=i(e[l],t),a-o==1?0===s?l:-1:0===s?l:-1===s?m(t,e,i,l,a):m(t,e,i,o,l))}function v(t){var e=window.getComputedStyle(t),i=0,n=0;return["width","paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["height","paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function y(t){var e=window.getComputedStyle(t),i=0,n=0;return["paddingRight","paddingLeft","marginRight","marginLeft","borderRightWidth","borderLeftWidth"].forEach((function(t){i+=parseFloat(e[t])||0})),["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"].forEach((function(t){n+=parseFloat(e[t])||0})),{height:n,width:i}}function b(t){let e,i=t.ownerDocument;if(t.nodeType==Node.TEXT_NODE){let n=i.createRange();n.selectNodeContents(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();return e}function w(){var t=window.innerWidth,e=window.innerHeight;return{top:0,left:0,right:t,bottom:e,width:t,height:e}}function x(t,e){for(var i,n=t.parentNode.childNodes,r=-1,s=0;s<n.length&&((i=n[s]).nodeType===e&&r++,i!=t);s++);return r}function _(t){return x(t,3)}function E(t){return x(t,1)}function k(t){return["xml","opf","ncx"].indexOf(t)>-1}function T(t,e){return new Blob([t],{type:e})}function S(t,e){var i=T(t,e);return s.createObjectURL(i)}function C(t){return s.revokeObjectURL(t)}function N(t,e){if("string"==typeof t)return"data:"+e+";base64,"+btoa(t)}function O(t){return Object.prototype.toString.call(t).slice(8,-1)}function I(t,e,i){var r;return r="undefined"==typeof DOMParser||i?n.DOMParser:DOMParser,65279===t.charCodeAt(0)&&(t=t.slice(1)),(new r).parseFromString(t,e)}function A(t,e){var i;if(!t)throw new Error("No Element Provided");return void 0!==t.querySelector?t.querySelector(e):(i=t.getElementsByTagName(e)).length?i[0]:void 0}function R(t,e){return void 0!==t.querySelector?t.querySelectorAll(e):t.getElementsByTagName(e)}function D(t,e,i){var n,r;if(void 0!==t.querySelector){for(var s in e+="[",i)e+=s+"~='"+i[s]+"'";return e+="]",t.querySelector(e)}if(n=t.getElementsByTagName(e),r=Array.prototype.slice.call(n,0).filter((function(t){for(var e in i)if(t.getAttribute(e)===i[e])return!0;return!1})))return r[0]}function j(t,e){void 0!==(t.ownerDocument||t).createTreeWalker?z(t,e,NodeFilter.SHOW_TEXT):L(t,(function(t){t&&3===t.nodeType&&e(t)}))}function z(t,e,i){var n=document.createTreeWalker(t,i,null,!1);let r;for(;r=n.nextNode();)e(r)}function L(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(L(t,e))return!0;t=t.nextSibling}while(t)}function P(t){return new Promise((function(e,i){var n=new FileReader;n.readAsDataURL(t),n.onloadend=function(){e(n.result)}}))}function B(){this.resolve=null,this.reject=null,this.id=o(),this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e}),Object.freeze(this)}function M(t,e,i){var n;if(void 0!==t.querySelector&&(n=t.querySelector(`${e}[*|type="${i}"]`)),n&&0!==n.length)return n;n=R(t,e);for(var r=0;r<n.length;r++)if(n[r].getAttributeNS("http://www.idpf.org/2007/ops","type")===i||n[r].getAttribute("epub:type")===i)return n[r]}function F(t){for(var e=[],i=t.childNodes,n=0;n<i.length;n++){let t=i[n];1===t.nodeType&&e.push(t)}return e}function q(t){for(var e=[t];t;t=t.parentNode)e.unshift(t);return e}function U(t,e,i){for(var n=[],r=t.childNodes,s=0;s<r.length;s++){let t=r[s];if(1===t.nodeType&&t.nodeName.toLowerCase()===e){if(i)return t;n.push(t)}}if(!i)return n}function W(t,e){let i;if(null!==t&&""!==e)for(i=t.parentNode;1===i.nodeType;){if(i.tagName.toLowerCase()===e)return i;i=i.parentNode}}class ${constructor(){this.collapsed=!1,this.commonAncestorContainer=void 0,this.endContainer=void 0,this.endOffset=void 0,this.startContainer=void 0,this.startOffset=void 0}setStart(t,e){this.startContainer=t,this.startOffset=e,this.endContainer?this.commonAncestorContainer=this._commonAncestorContainer():this.collapse(!0),this._checkCollapsed()}setEnd(t,e){this.endContainer=t,this.endOffset=e,this.startContainer?(this.collapsed=!1,this.commonAncestorContainer=this._commonAncestorContainer()):this.collapse(!1),this._checkCollapsed()}collapse(t){this.collapsed=!0,t?(this.endContainer=this.startContainer,this.endOffset=this.startOffset,this.commonAncestorContainer=this.startContainer.parentNode):(this.startContainer=this.endContainer,this.startOffset=this.endOffset,this.commonAncestorContainer=this.endOffset.parentNode)}selectNode(t){let e=t.parentNode,i=Array.prototype.indexOf.call(e.childNodes,t);this.setStart(e,i),this.setEnd(e,i+1)}selectNodeContents(t){t.childNodes[t.childNodes-1];let e=3===t.nodeType?t.textContent.length:parent.childNodes.length;this.setStart(t,0),this.setEnd(t,e)}_commonAncestorContainer(t,e){var i=q(t||this.startContainer),n=q(e||this.endContainer);if(i[0]==n[0])for(var r=0;r<i.length;r++)if(i[r]!=n[r])return i[r-1]}_checkCollapsed(){this.startContainer===this.endContainer&&this.startOffset===this.endOffset?this.collapsed=!0:this.collapsed=!1}toString(){}}},function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return r})),i.d(e,"c",(function(){return s}));const n="0.3",r=["keydown","keyup","keypressed","mouseup","mousedown","mousemove","click","touchend","touchstart","touchmove"],s={BOOK:{OPEN_FAILED:"openFailed"},CONTENTS:{EXPAND:"expand",RESIZE:"resize",SELECTED:"selected",SELECTED_RANGE:"selectedRange",LINK_CLICKED:"linkClicked"},LOCATIONS:{CHANGED:"changed"},MANAGERS:{RESIZE:"resize",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",ADDED:"added",SCROLL:"scroll",SCROLLED:"scrolled",REMOVED:"removed"},VIEWS:{AXIS:"axis",WRITING_MODE:"writingMode",LOAD_ERROR:"loaderror",RENDERED:"rendered",RESIZED:"resized",DISPLAYED:"displayed",SHOWN:"shown",HIDDEN:"hidden",MARK_CLICKED:"markClicked"},RENDITION:{STARTED:"started",ATTACHED:"attached",DISPLAYED:"displayed",DISPLAY_ERROR:"displayerror",RENDERED:"rendered",REMOVED:"removed",RESIZED:"resized",ORIENTATION_CHANGE:"orientationchange",LOCATION_CHANGED:"locationChanged",RELOCATED:"relocated",MARK_CLICKED:"markClicked",SELECTED:"selected",LAYOUT:"layout"},LAYOUT:{UPDATED:"updated"},ANNOTATION:{ATTACH:"attach",DETACH:"detach"}}},function(t,e,i){"use strict";var n=i(0);class r{constructor(t,e,i){var s;if(this.str="",this.base={},this.spinePos=0,this.range=!1,this.path={},this.start=null,this.end=null,!(this instanceof r))return new r(t,e,i);if("string"==typeof e?this.base=this.parseComponent(e):"object"==typeof e&&e.steps&&(this.base=e),"string"===(s=this.checkType(t)))return this.str=t,Object(n.extend)(this,this.parse(t));if("range"===s)return Object(n.extend)(this,this.fromRange(t,this.base,i));if("node"===s)return Object(n.extend)(this,this.fromNode(t,this.base,i));if("EpubCFI"===s&&t.path)return t;if(t)throw new TypeError("not a valid argument for EpubCFI");return this}checkType(t){return this.isCfiString(t)?"string":!t||"object"!=typeof t||"Range"!==Object(n.type)(t)&&void 0===t.startContainer?t&&"object"==typeof t&&void 0!==t.nodeType?"node":!!(t&&"object"==typeof t&&t instanceof r)&&"EpubCFI":"range"}parse(t){var e,i,n,r={spinePos:-1,range:!1,base:{},path:{},start:null,end:null};return"string"!=typeof t?{spinePos:-1}:(0===t.indexOf("epubcfi(")&&")"===t[t.length-1]&&(t=t.slice(8,t.length-1)),(e=this.getChapterComponent(t))?(r.base=this.parseComponent(e),i=this.getPathComponent(t),r.path=this.parseComponent(i),(n=this.getRange(t))&&(r.range=!0,r.start=this.parseComponent(n[0]),r.end=this.parseComponent(n[1])),r.spinePos=r.base.steps[1].index,r):{spinePos:-1})}parseComponent(t){var e,i={steps:[],terminal:{offset:null,assertion:null}},n=t.split(":"),r=n[0].split("/");return n.length>1&&(e=n[1],i.terminal=this.parseTerminal(e)),""===r[0]&&r.shift(),i.steps=r.map(function(t){return this.parseStep(t)}.bind(this)),i}parseStep(t){var e,i,n,r,s;if((r=t.match(/\[(.*)\]/))&&r[1]&&(s=r[1]),i=parseInt(t),!isNaN(i))return i%2==0?(e="element",n=i/2-1):(e="text",n=(i-1)/2),{type:e,index:n,id:s||null}}parseTerminal(t){var e,i,r=t.match(/\[(.*)\]/);return r&&r[1]?(e=parseInt(t.split("[")[0]),i=r[1]):e=parseInt(t),Object(n.isNumber)(e)||(e=null),{offset:e,assertion:i}}getChapterComponent(t){return t.split("!")[0]}getPathComponent(t){var e=t.split("!");if(e[1]){return e[1].split(",")[0]}}getRange(t){var e=t.split(",");return 3===e.length&&[e[1],e[2]]}getCharecterOffsetComponent(t){return t.split(":")[1]||""}joinSteps(t){return t?t.map((function(t){var e="";return"element"===t.type&&(e+=2*(t.index+1)),"text"===t.type&&(e+=1+2*t.index),t.id&&(e+="["+t.id+"]"),e})).join("/"):""}segmentString(t){var e="/";return e+=this.joinSteps(t.steps),t.terminal&&null!=t.terminal.offset&&(e+=":"+t.terminal.offset),t.terminal&&null!=t.terminal.assertion&&(e+="["+t.terminal.assertion+"]"),e}toString(){var t="epubcfi(";return t+=this.segmentString(this.base),t+="!",t+=this.segmentString(this.path),this.range&&this.start&&(t+=",",t+=this.segmentString(this.start)),this.range&&this.end&&(t+=",",t+=this.segmentString(this.end)),t+=")"}compare(t,e){var i,n,s,o;if("string"==typeof t&&(t=new r(t)),"string"==typeof e&&(e=new r(e)),t.spinePos>e.spinePos)return 1;if(t.spinePos<e.spinePos)return-1;t.range?(i=t.path.steps.concat(t.start.steps),s=t.start.terminal):(i=t.path.steps,s=t.path.terminal),e.range?(n=e.path.steps.concat(e.start.steps),o=e.start.terminal):(n=e.path.steps,o=e.path.terminal);for(var a=0;a<i.length;a++){if(!i[a])return-1;if(!n[a])return 1;if(i[a].index>n[a].index)return 1;if(i[a].index<n[a].index)return-1}return i.length<n.length?-1:s.offset>o.offset?1:s.offset<o.offset?-1:0}step(t){var e=3===t.nodeType?"text":"element";return{id:t.id,tagName:t.tagName,type:e,index:this.position(t)}}filteredStep(t,e){var i,n=this.filter(t,e);if(n)return i=3===n.nodeType?"text":"element",{id:n.id,tagName:n.tagName,type:i,index:this.filteredPosition(n,e)}}pathTo(t,e,i){for(var n,r={steps:[],terminal:{offset:null,assertion:null}},s=t;s&&s.parentNode&&9!=s.parentNode.nodeType;)(n=i?this.filteredStep(s,i):this.step(s))&&r.steps.unshift(n),s=s.parentNode;return null!=e&&e>=0&&(r.terminal.offset=e,"text"!=r.steps[r.steps.length-1].type&&r.steps.push({type:"text",index:0})),r}equalStep(t,e){return!(!t||!e)&&(t.index===e.index&&t.id===e.id&&t.type===e.type)}fromRange(t,e,i){var n={range:!1,base:{},path:{},start:null,end:null},r=t.startContainer,s=t.endContainer,o=t.startOffset,a=t.endOffset,l=!1;if(i&&(l=null!=r.ownerDocument.querySelector("."+i)),"string"==typeof e?(n.base=this.parseComponent(e),n.spinePos=n.base.steps[1].index):"object"==typeof e&&(n.base=e),t.collapsed)l&&(o=this.patchOffset(r,o,i)),n.path=this.pathTo(r,o,i);else{n.range=!0,l&&(o=this.patchOffset(r,o,i)),n.start=this.pathTo(r,o,i),l&&(a=this.patchOffset(s,a,i)),n.end=this.pathTo(s,a,i),n.path={steps:[],terminal:null};var h,c=n.start.steps.length;for(h=0;h<c&&this.equalStep(n.start.steps[h],n.end.steps[h]);h++)h===c-1?n.start.terminal===n.end.terminal&&(n.path.steps.push(n.start.steps[h]),n.range=!1):n.path.steps.push(n.start.steps[h]);n.start.steps=n.start.steps.slice(n.path.steps.length),n.end.steps=n.end.steps.slice(n.path.steps.length)}return n}fromNode(t,e,i){var n={range:!1,base:{},path:{},start:null,end:null};return"string"==typeof e?(n.base=this.parseComponent(e),n.spinePos=n.base.steps[1].index):"object"==typeof e&&(n.base=e),n.path=this.pathTo(t,null,i),n}filter(t,e){var i,n,r,s,o,a=!1;return 3===t.nodeType?(a=!0,r=t.parentNode,i=t.parentNode.classList.contains(e)):(a=!1,i=t.classList.contains(e)),i&&a?(s=r.previousSibling,o=r.nextSibling,s&&3===s.nodeType?n=s:o&&3===o.nodeType&&(n=o),n||t):!(i&&!a)&&t}patchOffset(t,e,i){if(3!=t.nodeType)throw new Error("Anchor must be a text node");var n=t,r=e;for(t.parentNode.classList.contains(i)&&(n=t.parentNode);n.previousSibling;){if(1===n.previousSibling.nodeType){if(!n.previousSibling.classList.contains(i))break;r+=n.previousSibling.textContent.length}else r+=n.previousSibling.textContent.length;n=n.previousSibling}return r}normalizedMap(t,e,i){var n,r,s,o={},a=-1,l=t.length;for(n=0;n<l;n++)1===(r=t[n].nodeType)&&t[n].classList.contains(i)&&(r=3),n>0&&3===r&&3===s?o[n]=a:e===r&&(a+=1,o[n]=a),s=r;return o}position(t){var e,i;return 1===t.nodeType?((e=t.parentNode.children)||(e=Object(n.findChildren)(t.parentNode)),i=Array.prototype.indexOf.call(e,t)):i=(e=this.textNodes(t.parentNode)).indexOf(t),i}filteredPosition(t,e){var i,n;return 1===t.nodeType?(i=t.parentNode.children,n=this.normalizedMap(i,1,e)):(i=t.parentNode.childNodes,t.parentNode.classList.contains(e)&&(i=(t=t.parentNode).parentNode.childNodes),n=this.normalizedMap(i,3,e)),n[Array.prototype.indexOf.call(i,t)]}stepsToXpath(t){var e=[".","*"];return t.forEach((function(t){var i=t.index+1;t.id?e.push("*[position()="+i+" and @id='"+t.id+"']"):"text"===t.type?e.push("text()["+i+"]"):e.push("*["+i+"]")})),e.join("/")}stepsToQuerySelector(t){var e=["html"];return t.forEach((function(t){var i=t.index+1;t.id?e.push("#"+t.id):"text"===t.type||e.push("*:nth-child("+i+")")})),e.join(">")}textNodes(t,e){return Array.prototype.slice.call(t.childNodes).filter((function(t){return 3===t.nodeType||!(!e||!t.classList.contains(e))}))}walkToNode(t,e,i){var r,s,o=e||document,a=o.documentElement,l=t.length;for(s=0;s<l&&("element"===(r=t[s]).type?a=r.id?o.getElementById(r.id):(a.children||Object(n.findChildren)(a))[r.index]:"text"===r.type&&(a=this.textNodes(a,i)[r.index]),a);s++);return a}findNode(t,e,i){var n,r,s=e||document;return i||void 0===s.evaluate?n=i?this.walkToNode(t,s,i):this.walkToNode(t,s):(r=this.stepsToXpath(t),n=s.evaluate(r,s,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),n}fixMiss(t,e,i,n){var r,s,o=this.findNode(t.slice(0,-1),i,n),a=o.childNodes,l=this.normalizedMap(a,3,n),h=t[t.length-1].index;for(let t in l){if(!l.hasOwnProperty(t))return;if(l[t]===h){if(!(e>(s=(r=a[t]).textContent.length))){o=1===r.nodeType?r.childNodes[0]:r;break}e-=s}}return{container:o,offset:e}}toRange(t,e){var i,r,s,o,a,l,h,c,u=t||document,d=!!e&&null!=u.querySelector("."+e);if(i=void 0!==u.createRange?u.createRange():new n.RangeObject,this.range?(r=this.start,l=this.path.steps.concat(r.steps),o=this.findNode(l,u,d?e:null),s=this.end,h=this.path.steps.concat(s.steps),a=this.findNode(h,u,d?e:null)):(r=this.path,l=this.path.steps,o=this.findNode(this.path.steps,u,d?e:null)),!o)return console.log("No startContainer found for",this.toString()),null;try{null!=r.terminal.offset?i.setStart(o,r.terminal.offset):i.setStart(o,0)}catch(t){c=this.fixMiss(l,r.terminal.offset,u,d?e:null),i.setStart(c.container,c.offset)}if(a)try{null!=s.terminal.offset?i.setEnd(a,s.terminal.offset):i.setEnd(a,0)}catch(t){c=this.fixMiss(h,this.end.terminal.offset,u,d?e:null),i.setEnd(c.container,c.offset)}return i}isCfiString(t){return"string"==typeof t&&0===t.indexOf("epubcfi(")&&")"===t[t.length-1]}generateChapterComponent(t,e,i){var n="/"+2*(t+1)+"/";return n+=2*(parseInt(e)+1),i&&(n+="["+i+"]"),n}collapse(t){this.range&&(this.range=!1,t?(this.path.steps=this.path.steps.concat(this.start.steps),this.path.terminal=this.start.terminal):(this.path.steps=this.path.steps.concat(this.end.steps),this.path.terminal=this.end.terminal))}}e.a=r},function(t,e,i){"use strict";var n,r,s,o,a,l,h,c=i(31),u=i(45),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var i,r;return u(e),r=this,n.call(this,t,i=function(){s.call(r,t,i),d.call(e,this,arguments)}),i.__eeOnceListener__=e,this},a={on:n=function(t,e){var i;return u(e),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[t]?"object"==typeof i[t]?i[t].push(e):i[t]=[i[t],e]:i[t]=e,this},once:r,off:s=function(t,e){var i,n,r,s;if(u(e),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[t])return this;if("object"==typeof(n=i[t]))for(s=0;r=n[s];++s)r!==e&&r.__eeOnceListener__!==e||(2===n.length?i[t]=n[s?0:1]:n.splice(s,1));else n!==e&&n.__eeOnceListener__!==e||delete i[t];return this},emit:o=function(t){var e,i,n,r,s;if(v.call(this,"__ee__")&&(r=this.__ee__[t]))if("object"==typeof r){for(i=arguments.length,s=new Array(i-1),e=1;e<i;++e)s[e-1]=arguments[e];for(r=r.slice(),e=0;n=r[e];++e)d.call(n,this,s)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),e=1;e<i;++e)s[e-1]=arguments[e];d.call(r,this,s)}}},l={on:c(n),once:c(r),off:c(s),emit:c(o)},h=m({},l),t.exports=e=function(t){return null==t?p(h):m(Object(t),l)},e.methods=a},function(t,e,i){"use strict";var n=i(7),r=i.n(n);e.a=class{constructor(t){var e;t.indexOf("://")>-1&&(t=new URL(t).pathname),e=this.parse(t),this.path=t,this.isDirectory(t)?this.directory=t:this.directory=e.dir+"/",this.filename=e.base,this.extension=e.ext.slice(1)}parse(t){return r.a.parse(t)}isAbsolute(t){return r.a.isAbsolute(t||this.path)}isDirectory(t){return"/"===t.charAt(t.length-1)}resolve(t){return r.a.resolve(this.directory,t)}relative(t){return t&&t.indexOf("://")>-1?t:r.a.relative(this.directory,t)}splitPath(t){return this.splitPathRe.exec(t).slice(1)}toString(){return this.path}}},function(t,e,i){"use strict";var n=i(4),r=i(7),s=i.n(r);e.a=class{constructor(t,e){var i=t.indexOf("://")>-1,r=t;if(this.Url=void 0,this.href=t,this.protocol="",this.origin="",this.hash="",this.hash="",this.search="",this.base=e,!i&&!1!==e&&"string"!=typeof e&&window&&window.location&&(this.base=window.location.href),i||this.base)try{this.base?this.Url=new URL(t,this.base):this.Url=new URL(t),this.href=this.Url.href,this.protocol=this.Url.protocol,this.origin=this.Url.origin,this.hash=this.Url.hash,this.search=this.Url.search,r=this.Url.pathname+(this.Url.search?this.Url.search:"")}catch(t){this.Url=void 0,this.base&&(r=new n.a(this.base).resolve(r))}this.Path=new n.a(r),this.directory=this.Path.directory,this.filename=this.Path.filename,this.extension=this.Path.extension}path(){return this.Path}resolve(t){var e;return t.indexOf("://")>-1?t:(e=s.a.resolve(this.directory,t),this.origin+e)}relative(t){return s.a.relative(t,this.directory)}toString(){return this.href}}},function(t,e,i){"use strict";e.a=class{constructor(t){this.context=t||this,this.hooks=[]}register(){for(var t=0;t<arguments.length;++t)if("function"==typeof arguments[t])this.hooks.push(arguments[t]);else for(var e=0;e<arguments[t].length;++e)this.hooks.push(arguments[t][e])}deregister(t){let e;for(let i=0;i<this.hooks.length;i++)if(e=this.hooks[i],e===t){this.hooks.splice(i,1);break}}trigger(){var t=arguments,e=this.context,i=[];return this.hooks.forEach((function(n){try{var r=n.apply(e,t)}catch(t){console.log(t)}r&&"function"==typeof r.then&&i.push(r)})),Promise.all(i)}list(){return this.hooks}clear(){return this.hooks=[]}}},function(t,e,i){"use strict";if(!n)var n={cwd:function(){return"/"}};function r(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+t)}function s(t,e){for(var i,n="",r=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)i=t.charCodeAt(o);else{if(47===i)break;i=47}if(47===i){if(r===o-1||1===s);else if(r!==o-1&&2===s){if(n.length<2||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){for(var a=n.length-1,l=a;l>=0&&47!==n.charCodeAt(l);--l);if(l!==a){n=-1===l?"":n.slice(0,l),r=o,s=0;continue}}else if(2===n.length||1===n.length){n="",r=o,s=0;continue}e&&(n.length>0?n+="/..":n="..")}else n.length>0?n+="/"+t.slice(r+1,o):n=t.slice(r+1,o);r=o,s=0}else 46===i&&-1!==s?++s:s=-1}return n}var o={resolve:function(){for(var t,e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=n.cwd()),a=t),r(a),0!==a.length&&(e=a+"/"+e,i=47===a.charCodeAt(0))}return e=s(e,!i),i?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=s(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];r(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":o.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=o.resolve(t))===(e=o.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var n=t.length,s=n-i,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length-a,h=s<l?s:l,c=-1,u=0;u<=h;++u){if(u===h){if(l>h){if(47===e.charCodeAt(a+u))return e.slice(a+u+1);if(0===u)return e.slice(a+u)}else s>h&&(47===t.charCodeAt(i+u)?c=u:0===u&&(c=0));break}var d=t.charCodeAt(i+u);if(d!==e.charCodeAt(a+u))break;47===d&&(c=u)}var f="";for(u=i+c+1;u<=n;++u)u!==n&&47!==t.charCodeAt(u)||(0===f.length?f+="..":f+="/..");return f.length>0?f+e.slice(a+c):(a+=c,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,n=-1,s=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!s){n=o;break}}else s=!1;return-1===n?i?"/":".":i&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var i,n=0,s=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,l=-1;for(i=t.length-1;i>=0;--i){var h=t.charCodeAt(i);if(47===h){if(!o){n=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(h===e.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return n===s?s=l:-1===s&&(s=t.length),t.slice(n,s)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":t.slice(n,s)},extname:function(t){r(t);for(var e=-1,i=0,n=-1,s=!0,o=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===n&&(s=!1,n=a+1),46===l?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!s){i=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===i+1?"":t.slice(e,n)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('Parameter "pathObject" must be an object, not '+typeof t);return function(t,e){var i=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return i?i===e.root?i+n:i+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var i,n=t.charCodeAt(0),s=47===n;s?(e.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,h=!0,c=t.length-1,u=0;c>=i;--c)if(47!==(n=t.charCodeAt(c)))-1===l&&(h=!1,l=c+1),46===n?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1);else if(!h){a=c+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(e.base=e.name=0===a&&s?t.slice(1,l):t.slice(a,l)):(0===a&&s?(e.name=t.slice(1,o),e.base=t.slice(1,l)):(e.name=t.slice(a,o),e.base=t.slice(a,l)),e.ext=t.slice(o,l)),a>0?e.dir=t.slice(0,a-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",posix:null};t.exports=o},function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return o})),i.d(e,"d",(function(){return a})),i.d(e,"c",(function(){return l})),i.d(e,"e",(function(){return h}));var n=i(0),r=i(5);i(4);function s(t,e){var i,r,s=e.url,o=s.indexOf("://")>-1;t&&(r=Object(n.qs)(t,"head"),(i=Object(n.qs)(r,"base"))||(i=t.createElement("base"),r.insertBefore(i,r.firstChild)),!o&&window&&window.location&&(s=window.location.origin+s),i.setAttribute("href",s))}function o(t,e){var i,r,s=e.canonical;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[rel='canonical']"))?r.setAttribute("href",s):((r=t.createElement("link")).setAttribute("rel","canonical"),r.setAttribute("href",s),i.appendChild(r)))}function a(t,e){var i,r,s=e.idref;t&&(i=Object(n.qs)(t,"head"),(r=Object(n.qs)(i,"link[property='dc.identifier']"))?r.setAttribute("content",s):((r=t.createElement("meta")).setAttribute("name","dc.identifier"),r.setAttribute("content",s),i.appendChild(r)))}function l(t,e){var i=t.querySelectorAll("a[href]");if(i.length)for(var s=Object(n.qs)(t.ownerDocument,"base"),o=s?s.getAttribute("href"):void 0,a=function(t){var i=t.getAttribute("href");if(0!==i.indexOf("mailto:"))if(i.indexOf("://")>-1)t.setAttribute("target","_blank");else{var n;try{n=new r.a(i,o)}catch(t){}t.onclick=function(){return n&&n.hash?e(n.Path.path+n.hash):e(n?n.Path.path:i),!1}}}.bind(this),l=0;l<i.length;l++)a(i[l])}function h(t,e,i){return e.forEach((function(e,n){e&&i[n]&&(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t=t.replace(new RegExp(e,"g"),i[n]))})),t}},function(t,e,i){"use strict";var n=i(0);e.a=class{constructor(t){this._q=[],this.context=t,this.tick=n.requestAnimationFrame,this.running=!1,this.paused=!1}enqueue(){var t,e,i=[].shift.call(arguments),r=arguments;if(!i)throw new Error("No Task Provided");return e="function"==typeof i?{task:i,args:r,deferred:t=new n.defer,promise:t.promise}:{promise:i},this._q.push(e),0!=this.paused||this.running||this.run(),e.promise}dequeue(){var t,e,i;return!this._q.length||this.paused?((t=new n.defer).deferred.resolve(),t.promise):(e=(t=this._q.shift()).task)?(i=e.apply(this.context,t.args))&&"function"==typeof i.then?i.then(function(){t.deferred.resolve.apply(this.context,arguments)}.bind(this),function(){t.deferred.reject.apply(this.context,arguments)}.bind(this)):(t.deferred.resolve.apply(this.context,i),t.promise):t.promise?t.promise:void 0}dump(){for(;this._q.length;)this.dequeue()}run(){return this.running||(this.running=!0,this.defered=new n.defer),this.tick.call(window,()=>{this._q.length?this.dequeue().then(function(){this.run()}.bind(this)):(this.defered.resolve(),this.running=void 0)}),1==this.paused&&(this.paused=!1),this.defered.promise}flush(){return this.running?this.running:this._q.length?(this.running=this.dequeue().then(function(){return this.running=void 0,this.flush()}.bind(this)),this.running):void 0}clear(){this._q=[]}length(){return this._q.length}pause(){this.paused=!0}stop(){this._q=[],this.running=!1,this.paused=!0}}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),s=i(0);function o(){var t="reverse",e=function(){var t=document.createElement("div");t.dir="rtl",t.style.position="fixed",t.style.width="1px",t.style.height="1px",t.style.top="0px",t.style.left="0px",t.style.overflow="hidden";var e=document.createElement("div");e.style.width="2px";var i=document.createElement("span");i.style.width="1px",i.style.display="inline-block";var n=document.createElement("span");return n.style.width="1px",n.style.display="inline-block",e.appendChild(i),e.appendChild(n),t.appendChild(e),t}();return document.body.appendChild(e),e.scrollLeft>0?t="default":"undefined"!=typeof Element&&Element.prototype.scrollIntoView?(e.children[0].children[1].scrollIntoView(),e.scrollLeft<0&&(t="negative")):(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),document.body.removeChild(e),t}var a=i(11),l=i(9),h=i(28),c=i.n(h);var u=class{constructor(t){this.settings=t||{},this.id="epubjs-container-"+Object(s.uuid)(),this.container=this.create(this.settings),this.settings.hidden&&(this.wrapper=this.wrap(this.container))}create(t){let e=t.height,i=t.width,n=t.overflow||!1,r=t.axis||"vertical",o=t.direction;Object(s.extend)(this.settings,t),t.height&&Object(s.isNumber)(t.height)&&(e=t.height+"px"),t.width&&Object(s.isNumber)(t.width)&&(i=t.width+"px");let a=document.createElement("div");return a.id=this.id,a.classList.add("epub-container"),a.style.wordSpacing="0",a.style.lineHeight="0",a.style.verticalAlign="top",a.style.position="relative","horizontal"===r&&(a.style.display="flex",a.style.flexDirection="row",a.style.flexWrap="nowrap"),i&&(a.style.width=i),e&&(a.style.height=e),n&&("scroll"===n&&"vertical"===r?(a.style["overflow-y"]=n,a.style["overflow-x"]="hidden"):"scroll"===n&&"horizontal"===r?(a.style["overflow-y"]="hidden",a.style["overflow-x"]=n):a.style.overflow=n),o&&(a.dir=o,a.style.direction=o),o&&this.settings.fullsize&&(document.body.style.direction=o),a}wrap(t){var e=document.createElement("div");return e.style.visibility="hidden",e.style.overflow="hidden",e.style.width="0",e.style.height="0",e.appendChild(t),e}getElement(t){var e;if(Object(s.isElement)(t)?e=t:"string"==typeof t&&(e=document.getElementById(t)),!e)throw new Error("Not an Element");return e}attachTo(t){var e,i=this.getElement(t);if(i)return e=this.settings.hidden?this.wrapper:this.container,i.appendChild(e),this.element=i,i}getContainer(){return this.container}onResize(t){Object(s.isNumber)(this.settings.width)&&Object(s.isNumber)(this.settings.height)||(this.resizeFunc=c()(t,50),window.addEventListener("resize",this.resizeFunc,!1))}onOrientationChange(t){this.orientationChangeFunc=t,window.addEventListener("orientationchange",this.orientationChangeFunc,!1)}size(t,e){var i;let n=t||this.settings.width,r=e||this.settings.height;null===t?(i=this.element.getBoundingClientRect()).width&&(t=Math.floor(i.width),this.container.style.width=t+"px"):Object(s.isNumber)(t)?this.container.style.width=t+"px":this.container.style.width=t,null===e?(i=i||this.element.getBoundingClientRect()).height&&(e=i.height,this.container.style.height=e+"px"):Object(s.isNumber)(e)?this.container.style.height=e+"px":this.container.style.height=e,Object(s.isNumber)(t)||(t=this.container.clientWidth),Object(s.isNumber)(e)||(e=this.container.clientHeight),this.containerStyles=window.getComputedStyle(this.container),this.containerPadding={left:parseFloat(this.containerStyles["padding-left"])||0,right:parseFloat(this.containerStyles["padding-right"])||0,top:parseFloat(this.containerStyles["padding-top"])||0,bottom:parseFloat(this.containerStyles["padding-bottom"])||0};let o=Object(s.windowBounds)(),a=window.getComputedStyle(document.body),l=parseFloat(a["padding-left"])||0,h=parseFloat(a["padding-right"])||0,c=parseFloat(a["padding-top"])||0,u=parseFloat(a["padding-bottom"])||0;return n||(t=o.width-l-h),(this.settings.fullsize&&!r||!r)&&(e=o.height-c-u),{width:t-this.containerPadding.left-this.containerPadding.right,height:e-this.containerPadding.top-this.containerPadding.bottom}}bounds(){let t;return"visible"!==this.container.style.overflow&&(t=this.container&&this.container.getBoundingClientRect()),t&&t.width&&t.height?t:Object(s.windowBounds)()}getSheet(){var t=document.createElement("style");return t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet}addStyleRules(t,e){var i="#"+this.id+" ",n="";this.sheet||(this.sheet=this.getSheet()),e.forEach((function(t){for(var e in t)t.hasOwnProperty(e)&&(n+=e+":"+t[e]+";")})),this.sheet.insertRule(i+t+" {"+n+"}",0)}axis(t){"horizontal"===t?(this.container.style.display="flex",this.container.style.flexDirection="row",this.container.style.flexWrap="nowrap"):this.container.style.display="block",this.settings.axis=t}direction(t){this.container&&(this.container.dir=t,this.container.style.direction=t),this.settings.fullsize&&(document.body.style.direction=t),this.settings.dir=t}overflow(t){this.container&&("scroll"===t&&"vertical"===this.settings.axis?(this.container.style["overflow-y"]=t,this.container.style["overflow-x"]="hidden"):"scroll"===t&&"horizontal"===this.settings.axis?(this.container.style["overflow-y"]="hidden",this.container.style["overflow-x"]=t):this.container.style.overflow=t),this.settings.overflow=t}destroy(){this.element&&(this.settings.hidden?this.wrapper:this.container,this.element.contains(this.container)&&this.element.removeChild(this.container),window.removeEventListener("resize",this.resizeFunc),window.removeEventListener("orientationChange",this.orientationChangeFunc))}};var d=class{constructor(t){this.container=t,this._views=[],this.length=0,this.hidden=!1}all(){return this._views}first(){return this._views[0]}last(){return this._views[this._views.length-1]}indexOf(t){return this._views.indexOf(t)}slice(){return this._views.slice.apply(this._views,arguments)}get(t){return this._views[t]}append(t){return this._views.push(t),this.container&&this.container.appendChild(t.element),this.length++,t}prepend(t){return this._views.unshift(t),this.container&&this.container.insertBefore(t.element,this.container.firstChild),this.length++,t}insert(t,e){return this._views.splice(e,0,t),this.container&&(e<this.container.children.length?this.container.insertBefore(t.element,this.container.children[e]):this.container.appendChild(t.element)),this.length++,t}remove(t){var e=this._views.indexOf(t);e>-1&&this._views.splice(e,1),this.destroy(t),this.length--}destroy(t){t.displayed&&t.destroy(),this.container&&this.container.removeChild(t.element),t=null}forEach(){return this._views.forEach.apply(this._views,arguments)}clear(){var t,e=this.length;if(this.length){for(var i=0;i<e;i++)t=this._views[i],this.destroy(t);this._views=[],this.length=0}}find(t){for(var e,i=this.length,n=0;n<i;n++)if((e=this._views[n]).displayed&&e.section.index==t.index)return e}displayed(){for(var t,e=[],i=this.length,n=0;n<i;n++)(t=this._views[n]).displayed&&e.push(t);return e}show(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.show();this.hidden=!1}hide(){for(var t,e=this.length,i=0;i<e;i++)(t=this._views[i]).displayed&&t.hide();this.hidden=!0}},f=i(1);class p{constructor(t){this.name="default",this.optsSettings=t.settings,this.View=t.view,this.request=t.request,this.renditionQueue=t.queue,this.q=new l.a(this),this.settings=Object(s.extend)(this.settings||{},{infinite:!0,hidden:!1,width:void 0,height:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",ignoreClass:"",fullsize:void 0,allowScriptedContent:!1,allowPopups:!1}),Object(s.extend)(this.settings,t.settings||{}),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,method:this.settings.method,width:0,height:0,forceEvenPages:!0,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.rendered=!1}render(t,e){let i=t.tagName;void 0!==this.settings.fullsize||!i||"body"!=i.toLowerCase()&&"html"!=i.toLowerCase()||(this.settings.fullsize=!0),this.settings.fullsize&&(this.settings.overflow="visible",this.overflow=this.settings.overflow),this.settings.size=e,this.settings.rtlScrollType=o(),this.stage=new u({width:e.width,height:e.height,overflow:this.overflow,hidden:this.settings.hidden,axis:this.settings.axis,fullsize:this.settings.fullsize,direction:this.settings.direction}),this.stage.attachTo(t),this.container=this.stage.getContainer(),this.views=new d(this.container),this._bounds=this.bounds(),this._stageSize=this.stage.size(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.stage.onResize(this.onResized.bind(this)),this.stage.onOrientationChange(this.onOrientationChange.bind(this)),this.addEventListeners(),this.layout&&this.updateLayout(),this.rendered=!0}addEventListeners(){var t;window.addEventListener("unload",function(t){this.destroy()}.bind(this)),t=this.settings.fullsize?window:this.container,this._onScroll=this.onScroll.bind(this),t.addEventListener("scroll",this._onScroll)}removeEventListeners(){(this.settings.fullsize?window:this.container).removeEventListener("scroll",this._onScroll),this._onScroll=void 0}destroy(){clearTimeout(this.orientationTimeout),clearTimeout(this.resizeTimeout),clearTimeout(this.afterScrolled),this.clear(),this.removeEventListeners(),this.stage.destroy(),this.rendered=!1}onOrientationChange(t){let{orientation:e}=window;this.optsSettings.resizeOnOrientationChange&&this.resize(),clearTimeout(this.orientationTimeout),this.orientationTimeout=setTimeout(function(){this.orientationTimeout=void 0,this.optsSettings.resizeOnOrientationChange&&this.resize(),this.emit(f.c.MANAGERS.ORIENTATION_CHANGE,e)}.bind(this),500)}onResized(t){this.resize()}resize(t,e,i){let n=this.stage.size(t,e);this.winBounds=Object(s.windowBounds)(),this.orientationTimeout&&this.winBounds.width===this.winBounds.height?this._stageSize=void 0:this._stageSize&&this._stageSize.width===n.width&&this._stageSize.height===n.height||(this._stageSize=n,this._bounds=this.bounds(),this.clear(),this.viewSettings.width=this._stageSize.width,this.viewSettings.height=this._stageSize.height,this.updateLayout(),this.emit(f.c.MANAGERS.RESIZED,{width:this._stageSize.width,height:this._stageSize.height},i))}createView(t,e){return new this.View(t,Object(s.extend)(this.viewSettings,{forceRight:e}))}handleNextPrePaginated(t,e,i){let n;if("pre-paginated"===this.layout.name&&this.layout.divisor>1){if(t||0===e.index)return;if(n=e.next(),n&&!n.properties.includes("page-spread-left"))return i.call(this,n)}}display(t,e){var i=new s.defer,n=i.promise;(e===t.href||Object(s.isNumber)(e))&&(e=void 0);var r=this.views.find(t);if(r&&t&&"pre-paginated"!==this.layout.name){let t=r.offset();if("ltr"===this.settings.direction)this.scrollTo(t.left,t.top,!0);else{let e=r.width();this.scrollTo(t.left+e,t.top,!0)}if(e){let t=r.locationOf(e),i=r.width();this.moveTo(t,i)}return i.resolve(),n}this.clear();let o=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(o=!0),this.add(t,o).then(function(t){if(e){let i=t.locationOf(e),n=t.width();this.moveTo(i,n)}}.bind(this),t=>{i.reject(t)}).then(function(){return this.handleNextPrePaginated(o,t,this.add)}.bind(this)).then(function(){this.views.show(),i.resolve()}.bind(this)),n}afterDisplayed(t){this.emit(f.c.MANAGERS.ADDED,t)}afterResized(t){this.emit(f.c.MANAGERS.RESIZE,t.section)}moveTo(t,e){var i=0,n=0;this.isPaginated?((i=Math.floor(t.left/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollWidth&&(i=this.container.scrollWidth-this.layout.delta),(n=Math.floor(t.top/this.layout.delta)*this.layout.delta)+this.layout.delta>this.container.scrollHeight&&(n=this.container.scrollHeight-this.layout.delta)):n=t.top,"rtl"===this.settings.direction&&(i+=this.layout.delta,i-=e),this.scrollTo(i,n,!0)}add(t,e){var i=this.createView(t,e);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}append(t,e){var i=this.createView(t,e);return this.views.append(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}prepend(t,e){var i=this.createView(t,e);return i.on(f.c.VIEWS.RESIZED,t=>{this.counter(t)}),this.views.prepend(i),i.onDisplayed=this.afterDisplayed.bind(this),i.onResize=this.afterResized.bind(this),i.on(f.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),i.on(f.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),i.display(this.request)}counter(t){"vertical"===this.settings.axis?this.scrollBy(0,t.heightDelta,!0):this.scrollBy(t.widthDelta,0,!0)}next(){var t;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft>0?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next():this.container.scrollLeft+-1*this.layout.delta>-1*this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next();else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop,this.container.scrollTop+this.container.offsetHeight<this.container.scrollHeight?this.scrollBy(0,this.layout.height,!0):t=this.views.last().section.next()}else t=this.views.last().section.next();else this.scrollLeft=this.container.scrollLeft,this.container.scrollLeft+this.container.offsetWidth+this.layout.delta<=this.container.scrollWidth?this.scrollBy(this.layout.delta,0,!0):t=this.views.last().section.next();if(t){this.clear(),this.updateLayout();let e=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&t.properties.includes("page-spread-right")&&(e=!0),this.append(t,e).then(function(){return this.handleNextPrePaginated(e,t,this.append)}.bind(this),t=>t).then(function(){this.isPaginated||"horizontal"!==this.settings.axis||"rtl"!==this.settings.direction||"default"!==this.settings.rtlScrollType||this.scrollTo(this.container.scrollWidth,0,!0),this.views.show()}.bind(this))}}}prev(){var t;let e=this.settings.direction;if(this.views.length){if(!this.isPaginated||"horizontal"!==this.settings.axis||e&&"ltr"!==e)if(this.isPaginated&&"horizontal"===this.settings.axis&&"rtl"===e)this.scrollLeft=this.container.scrollLeft,"default"===this.settings.rtlScrollType?this.container.scrollLeft+this.container.offsetWidth<this.container.scrollWidth?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev():this.container.scrollLeft<0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev();else if(this.isPaginated&&"vertical"===this.settings.axis){this.scrollTop=this.container.scrollTop,this.container.scrollTop>0?this.scrollBy(0,-this.layout.height,!0):t=this.views.first().section.prev()}else t=this.views.first().section.prev();else this.scrollLeft=this.container.scrollLeft,this.container.scrollLeft>0?this.scrollBy(-this.layout.delta,0,!0):t=this.views.first().section.prev();if(t){this.clear(),this.updateLayout();let e=!1;return"pre-paginated"===this.layout.name&&2===this.layout.divisor&&"object"!=typeof t.prev()&&(e=!0),this.prepend(t,e).then(function(){var e;if("pre-paginated"===this.layout.name&&this.layout.divisor>1&&(e=t.prev()))return this.prepend(e)}.bind(this),t=>t).then(function(){this.isPaginated&&"horizontal"===this.settings.axis&&("rtl"===this.settings.direction?"default"===this.settings.rtlScrollType?this.scrollTo(0,0,!0):this.scrollTo(-1*this.container.scrollWidth+this.layout.delta,0,!0):this.scrollTo(this.container.scrollWidth-this.layout.delta,0,!0)),this.views.show()}.bind(this))}}}current(){var t=this.visible();return t.length?t[t.length-1]:null}clear(){this.views&&(this.views.hide(),this.scrollTo(0,0,!0),this.views.clear())}currentLocation(){return this.updateLayout(),this.isPaginated&&"horizontal"===this.settings.axis?this.location=this.paginatedLocation():this.location=this.scrolledLocation(),this.location}scrolledLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=e.height<window.innerHeight?e.height:window.innerHeight,n=e.width<window.innerWidth?e.width:window.innerWidth,r="vertical"===this.settings.axis,s=(this.settings.direction,0);return this.settings.fullsize&&(s=r?window.scrollY:window.scrollX),t.map(t=>{let o,a,l,h,{index:c,href:u}=t.section,d=t.position(),f=t.width(),p=t.height();r?(o=s+e.top-d.top+0,a=o+i-0,h=this.layout.count(p,i).pages,l=i):(o=s+e.left-d.left+0,a=o+n-0,h=this.layout.count(f,n).pages,l=n);let g=Math.ceil(o/l),m=[],v=Math.ceil(a/l);if("rtl"===this.settings.direction&&!r){let t=g;g=h-v,v=h-t}m=[];for(var y=g;y<=v;y++){let t=y+1;m.push(t)}return{index:c,href:u,pages:m,totalPages:h,mapping:this.mapping.page(t.contents,t.section.cfiBase,o,a)}})}paginatedLocation(){let t=this.visible(),e=this.container.getBoundingClientRect(),i=0,n=0;return this.settings.fullsize&&(i=window.scrollX),t.map(t=>{let r,s,o,a,{index:l,href:h}=t.section,c=t.position(),u=t.width();"rtl"===this.settings.direction?(r=e.right-i,a=Math.min(Math.abs(r-c.left),this.layout.width)-n,o=c.width-(c.right-r)-n,s=o-a):(r=e.left+i,a=Math.min(c.right-r,this.layout.width)-n,s=r-c.left+n,o=s+a),n+=a;let d=this.mapping.page(t.contents,t.section.cfiBase,s,o),f=this.layout.count(u).pages,p=Math.floor(s/this.layout.pageWidth),g=[],m=Math.floor(o/this.layout.pageWidth);if(p<0&&(p=0,m+=1),"rtl"===this.settings.direction){let t=p;p=f-m,m=f-t}for(var v=p+1;v<=m;v++){let t=v;g.push(t)}return{index:l,href:h,pages:g,totalPages:f,mapping:d}})}isVisible(t,e,i,n){var r=t.position(),s=n||this.bounds();return"horizontal"===this.settings.axis&&r.right>s.left-e&&r.left<s.right+i||"vertical"===this.settings.axis&&r.bottom>s.top-e&&r.top<s.bottom+i}visible(){for(var t,e=this.bounds(),i=this.views.displayed(),n=i.length,r=[],s=0;s<n;s++)t=i[s],!0===this.isVisible(t,0,0,e)&&r.push(t);return r}scrollBy(t,e,i){let n="rtl"===this.settings.direction?-1:1;i&&(this.ignore=!0),this.settings.fullsize?window.scrollBy(t*n,e*n):(t&&(this.container.scrollLeft+=t*n),e&&(this.container.scrollTop+=e)),this.scrolled=!0}scrollTo(t,e,i){i&&(this.ignore=!0),this.settings.fullsize?window.scrollTo(t,e):(this.container.scrollLeft=t,this.container.scrollTop=e),this.scrolled=!0}onScroll(){let t,e;this.settings.fullsize?(t=window.scrollY,e=window.scrollX):(t=this.container.scrollTop,e=this.container.scrollLeft),this.scrollTop=t,this.scrollLeft=e,this.ignore?this.ignore=!1:(this.emit(f.c.MANAGERS.SCROLL,{top:t,left:e}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.emit(f.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),20))}bounds(){return this.stage.bounds()}applyLayout(t){this.layout=t,this.updateLayout(),this.views&&this.views.length>0&&"pre-paginated"===this.layout.name&&this.display(this.views.first().section)}updateLayout(){this.stage&&(this._stageSize=this.stage.size(),this.isPaginated?(this.layout.calculate(this._stageSize.width,this._stageSize.height,this.settings.gap),this.settings.offset=this.layout.delta/this.layout.divisor):this.layout.calculate(this._stageSize.width,this._stageSize.height),this.viewSettings.width=this.layout.width,this.viewSettings.height=this.layout.height,this.setLayout(this.layout))}setLayout(t){this.viewSettings.layout=t,this.mapping=new a.a(t.props,this.settings.direction,this.settings.axis),this.views&&this.views.forEach((function(e){e&&e.setLayout(t)}))}updateWritingMode(t){this.writingMode=t}updateAxis(t,e){(e||t!==this.settings.axis)&&(this.settings.axis=t,this.stage&&this.stage.axis(t),this.viewSettings.axis=t,this.mapping&&(this.mapping=new a.a(this.layout.props,this.settings.direction,this.settings.axis)),this.layout&&("vertical"===t?this.layout.spread("none"):this.layout.spread(this.layout.settings.spread)))}updateFlow(t,e="auto"){let i="paginated"===t||"auto"===t;this.isPaginated=i,"scrolled-doc"===t||"scrolled-continuous"===t||"scrolled"===t?this.updateAxis("vertical"):this.updateAxis("horizontal"),this.viewSettings.flow=t,this.settings.overflow?this.overflow=this.settings.overflow:this.overflow=i?"hidden":e,this.stage&&this.stage.overflow(this.overflow),this.updateLayout()}getContents(){var t=[];return this.views?(this.views.forEach((function(e){const i=e&&e.contents;i&&t.push(i)})),t):t}direction(t="ltr"){this.settings.direction=t,this.stage&&this.stage.direction(t),this.viewSettings.direction=t,this.updateLayout()}isRendered(){return this.rendered}}r()(p.prototype);e.a=p},function(t,e,i){"use strict";var n=i(2),r=i(0);e.a=class{constructor(t,e,i,n=!1){this.layout=t,this.horizontal="horizontal"===i,this.direction=e||"ltr",this._dev=n}section(t){var e=this.findRanges(t);return this.rangeListToCfiList(t.section.cfiBase,e)}page(t,e,i,r){var s,o=!(!t||!t.document)&&t.document.body;if(o){if(s=this.rangePairToCfiPair(e,{start:this.findStart(o,i,r),end:this.findEnd(o,i,r)}),!0===this._dev){let e=t.document,i=new n.a(s.start).toRange(e),r=new n.a(s.end).toRange(e),o=e.defaultView.getSelection(),a=e.createRange();o.removeAllRanges(),a.setStart(i.startContainer,i.startOffset),a.setEnd(r.endContainer,r.endOffset),o.addRange(a)}return s}}walk(t,e){if(!t||t.nodeType!==Node.TEXT_NODE){var i=function(t){return t.data.trim().length>0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},n=i;n.acceptNode=i;for(var r,s,o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,n,!1);(r=o.nextNode())&&!(s=e(r)););return s}}findRanges(t){for(var e,i,n=[],r=t.contents.scrollWidth(),s=Math.ceil(r/this.layout.spreadWidth)*this.layout.divisor,o=this.layout.columnWidth,a=this.layout.gap,l=0;l<s.pages;l++)e=(o+a)*l,i=o*(l+1)+a*l,n.push({start:this.findStart(t.document.body,e,i),end:this.findEnd(t.document.body,e,i)});return n}findStart(t,e,i){for(var n,s,o=[t],a=t;o.length;)if(n=o.shift(),s=this.walk(n,t=>{var n,s,l,h,c;if(c=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=this.horizontal?c.left:c.top,s=this.horizontal?c.right:c.bottom,n>=e&&n<=i)return t;if(s>e)return t;a=t,o.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=c.left,(s=c.right)<=i&&s>=e)return t;if(n<i)return t;a=t,o.push(t)}else{if(l=c.top,h=c.bottom,l>=e&&l<=i)return t;if(h>e)return t;a=t,o.push(t)}}))return this.findTextStartRange(s,e,i);return this.findTextStartRange(a,e,i)}findEnd(t,e,i){for(var n,s,o=[t],a=t;o.length;)if(n=o.shift(),s=this.walk(n,t=>{var n,s,l,h,c;if(c=Object(r.nodeBounds)(t),this.horizontal&&"ltr"===this.direction){if(n=Math.round(c.left),s=Math.round(c.right),n>i&&a)return a;if(s>i)return t;a=t,o.push(t)}else if(this.horizontal&&"rtl"===this.direction){if(n=Math.round(this.horizontal?c.left:c.top),(s=Math.round(this.horizontal?c.right:c.bottom))<e&&a)return a;if(n<e)return t;a=t,o.push(t)}else{if(l=Math.round(c.top),h=Math.round(c.bottom),l>i&&a)return a;if(h>i)return t;a=t,o.push(t)}}))return this.findTextEndRange(s,e,i);return this.findTextEndRange(a,e,i)}findTextStartRange(t,e,i){for(var n,r,s=this.splitTextNodeIntoRanges(t),o=0;o<s.length;o++)if(r=(n=s[o]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(r.left>=e)return n}else if(this.horizontal&&"rtl"===this.direction){if(r.right<=i)return n}else if(r.top>=e)return n;return s[0]}findTextEndRange(t,e,i){for(var n,r,s,o,a,l,h,c=this.splitTextNodeIntoRanges(t),u=0;u<c.length;u++){if(s=(r=c[u]).getBoundingClientRect(),this.horizontal&&"ltr"===this.direction){if(o=s.left,a=s.right,o>i&&n)return n;if(a>i)return r}else if(this.horizontal&&"rtl"===this.direction){if(o=s.left,(a=s.right)<e&&n)return n;if(o<e)return r}else{if(l=s.top,h=s.bottom,l>i&&n)return n;if(h>i)return r}n=r}return c[c.length-1]}splitTextNodeIntoRanges(t,e){var i,n=[],r=(t.textContent||"").trim(),s=t.ownerDocument,o=e||" ",a=r.indexOf(o);if(-1===a||t.nodeType!=Node.TEXT_NODE)return(i=s.createRange()).selectNodeContents(t),[i];for((i=s.createRange()).setStart(t,0),i.setEnd(t,a),n.push(i),i=!1;-1!=a;)(a=r.indexOf(o,a+1))>0&&(i&&(i.setEnd(t,a),n.push(i)),(i=s.createRange()).setStart(t,a+1));return i&&(i.setEnd(t,r.length),n.push(i)),n}rangePairToCfiPair(t,e){var i=e.start,r=e.end;return i.collapse(!0),r.collapse(!1),{start:new n.a(i,t).toString(),end:new n.a(r,t).toString()}}rangeListToCfiList(t,e){for(var i,n=[],r=0;r<e.length;r++)i=this.rangePairToCfiPair(t,e[r]),n.push(i);return n}axis(t){return t&&(this.horizontal="horizontal"===t),this.horizontal}}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(2),a=i(11),l=i(8),h=i(1);const c="undefined"!=typeof navigator,u=c&&/Chrome/.test(navigator.userAgent),d=c&&!u&&/AppleWebKit/.test(navigator.userAgent);class f{constructor(t,e,i,n){this.epubcfi=new o.a,this.document=t,this.documentElement=this.document.documentElement,this.content=e||this.document.body,this.window=this.document.defaultView,this._size={width:0,height:0},this.sectionIndex=n||0,this.cfiBase=i||"",this.epubReadingSystem("epub.js",h.b),this.called=0,this.active=!0,this.listeners()}static get listenedEvents(){return h.a}width(t){var e=this.content;return t&&Object(s.isNumber)(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e).width)}height(t){var e=this.content;return t&&Object(s.isNumber)(t)&&(t+="px"),t&&(e.style.height=t),parseInt(this.window.getComputedStyle(e).height)}contentWidth(t){var e=this.content||this.document.body;return t&&Object(s.isNumber)(t)&&(t+="px"),t&&(e.style.width=t),parseInt(this.window.getComputedStyle(e).width)}contentHeight(t){var e=this.content||this.document.body;return t&&Object(s.isNumber)(t)&&(t+="px"),t&&(e.style.height=t),parseInt(this.window.getComputedStyle(e).height)}textWidth(){let t,e,i=this.document.createRange(),n=this.content||this.document.body,r=Object(s.borders)(n);return i.selectNodeContents(n),t=i.getBoundingClientRect(),e=t.width,r&&r.width&&(e+=r.width),Math.round(e)}textHeight(){let t,e,i=this.document.createRange(),n=this.content||this.document.body;return i.selectNodeContents(n),t=i.getBoundingClientRect(),e=t.bottom,Math.round(e)}scrollWidth(){return this.documentElement.scrollWidth}scrollHeight(){return this.documentElement.scrollHeight}overflow(t){return t&&(this.documentElement.style.overflow=t),this.window.getComputedStyle(this.documentElement).overflow}overflowX(t){return t&&(this.documentElement.style.overflowX=t),this.window.getComputedStyle(this.documentElement).overflowX}overflowY(t){return t&&(this.documentElement.style.overflowY=t),this.window.getComputedStyle(this.documentElement).overflowY}css(t,e,i){var n=this.content||this.document.body;return e?n.style.setProperty(t,e,i?"important":""):n.style.removeProperty(t),this.window.getComputedStyle(n)[t]}viewport(t){var e,i=this.document.querySelector("meta[name='viewport']"),n={width:void 0,height:void 0,scale:void 0,minimum:void 0,maximum:void 0,scalable:void 0},r=[];if(i&&i.hasAttribute("content")){let t=i.getAttribute("content"),e=t.match(/width\s*=\s*([^,]*)/),r=t.match(/height\s*=\s*([^,]*)/),s=t.match(/initial-scale\s*=\s*([^,]*)/),o=t.match(/minimum-scale\s*=\s*([^,]*)/),a=t.match(/maximum-scale\s*=\s*([^,]*)/),l=t.match(/user-scalable\s*=\s*([^,]*)/);e&&e.length&&void 0!==e[1]&&(n.width=e[1]),r&&r.length&&void 0!==r[1]&&(n.height=r[1]),s&&s.length&&void 0!==s[1]&&(n.scale=s[1]),o&&o.length&&void 0!==o[1]&&(n.minimum=o[1]),a&&a.length&&void 0!==a[1]&&(n.maximum=a[1]),l&&l.length&&void 0!==l[1]&&(n.scalable=l[1])}return e=Object(s.defaults)(t||{},n),t&&(e.width&&r.push("width="+e.width),e.height&&r.push("height="+e.height),e.scale&&r.push("initial-scale="+e.scale),"no"===e.scalable?(r.push("minimum-scale="+e.scale),r.push("maximum-scale="+e.scale),r.push("user-scalable="+e.scalable)):(e.scalable&&r.push("user-scalable="+e.scalable),e.minimum&&r.push("minimum-scale="+e.minimum),e.maximum&&r.push("minimum-scale="+e.maximum)),i||((i=this.document.createElement("meta")).setAttribute("name","viewport"),this.document.querySelector("head").appendChild(i)),i.setAttribute("content",r.join(", ")),this.window.scrollTo(0,0)),e}expand(){this.emit(h.c.CONTENTS.EXPAND)}listeners(){this.imageLoadListeners(),this.mediaQueryListeners(),this.addEventListeners(),this.addSelectionListeners(),"undefined"==typeof ResizeObserver?(this.resizeListeners(),this.visibilityListeners()):this.resizeObservers(),this.linksHandler()}removeListeners(){this.removeEventListeners(),this.removeSelectionListeners(),this.observer&&this.observer.disconnect(),clearTimeout(this.expanding)}resizeCheck(){let t=this.textWidth(),e=this.textHeight();t==this._size.width&&e==this._size.height||(this._size={width:t,height:e},this.onResize&&this.onResize(this._size),this.emit(h.c.CONTENTS.RESIZE,this._size))}resizeListeners(){clearTimeout(this.expanding),requestAnimationFrame(this.resizeCheck.bind(this)),this.expanding=setTimeout(this.resizeListeners.bind(this),350)}visibilityListeners(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&!1===this.active?(this.active=!0,this.resizeListeners()):(this.active=!1,clearTimeout(this.expanding))})}transitionListeners(){let t=this.content;t.style.transitionProperty="font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height",t.style.transitionDuration="0.001ms",t.style.transitionTimingFunction="linear",t.style.transitionDelay="0",this._resizeCheck=this.resizeCheck.bind(this),this.document.addEventListener("transitionend",this._resizeCheck)}mediaQueryListeners(){for(var t=this.document.styleSheets,e=function(t){t.matches&&!this._expanding&&setTimeout(this.expand.bind(this),1)}.bind(this),i=0;i<t.length;i+=1){var n;try{n=t[i].cssRules}catch(t){return}if(!n)return;for(var r=0;r<n.length;r+=1){if(n[r].media)this.window.matchMedia(n[r].media.mediaText).addListener(e)}}}resizeObservers(){this.observer=new ResizeObserver(t=>{requestAnimationFrame(this.resizeCheck.bind(this))}),this.observer.observe(this.document.documentElement)}mutationObservers(){this.observer=new MutationObserver(t=>{this.resizeCheck()});this.observer.observe(this.document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}imageLoadListeners(){for(var t,e=this.document.querySelectorAll("img"),i=0;i<e.length;i++)void 0!==(t=e[i]).naturalWidth&&0===t.naturalWidth&&(t.onload=this.expand.bind(this))}fontLoadListeners(){this.document&&this.document.fonts&&this.document.fonts.ready.then(function(){this.resizeCheck()}.bind(this))}root(){return this.document?this.document.documentElement:null}locationOf(t,e){var i,n={left:0,top:0};if(!this.document)return n;if(this.epubcfi.isCfiString(t)){let r=new o.a(t).toRange(this.document,e);if(r){try{if(!r.endContainer||r.startContainer==r.endContainer&&r.startOffset==r.endOffset){let t=r.startContainer.textContent.indexOf(" ",r.startOffset);-1==t&&(t=r.startContainer.textContent.length),r.setEnd(r.startContainer,t)}}catch(t){console.error("setting end offset to start container length failed",t)}if(r.startContainer.nodeType===Node.ELEMENT_NODE)i=r.startContainer.getBoundingClientRect(),n.left=i.left,n.top=i.top;else if(d){let t=r.startContainer,e=new Range;try{1===t.nodeType?i=t.getBoundingClientRect():r.startOffset+2<t.length?(e.setStart(t,r.startOffset),e.setEnd(t,r.startOffset+2),i=e.getBoundingClientRect()):r.startOffset-2>0?(e.setStart(t,r.startOffset-2),e.setEnd(t,r.startOffset),i=e.getBoundingClientRect()):i=t.parentNode.getBoundingClientRect()}catch(t){console.error(t,t.stack)}}else i=r.getBoundingClientRect()}}else if("string"==typeof t&&t.indexOf("#")>-1){let e=t.substring(t.indexOf("#")+1),n=this.document.getElementById(e);if(n)if(d){let t=new Range;t.selectNode(n),i=t.getBoundingClientRect()}else i=n.getBoundingClientRect()}return i&&(n.left=i.left,n.top=i.top),n}addStylesheet(t){return new Promise(function(e,i){var n,r=!1;this.document?(n=this.document.querySelector("link[href='"+t+"']"))?e(!0):((n=this.document.createElement("link")).type="text/css",n.rel="stylesheet",n.href=t,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout(()=>{e(!0)},1))},this.document.head.appendChild(n)):e(!1)}.bind(this))}_getStylesheetNode(t){var e;return t="epubjs-inserted-css-"+(t||""),!!this.document&&((e=this.document.getElementById(t))||((e=this.document.createElement("style")).id=t,this.document.head.appendChild(e)),e)}addStylesheetCss(t,e){return!(!this.document||!t)&&(this._getStylesheetNode(e).innerHTML=t,!0)}addStylesheetRules(t,e){var i;if(this.document&&t&&0!==t.length)if(i=this._getStylesheetNode(e).sheet,"[object Array]"===Object.prototype.toString.call(t))for(var n=0,r=t.length;n<r;n++){var s=1,o=t[n],a=t[n][0],l="";"[object Array]"===Object.prototype.toString.call(o[1][0])&&(o=o[1],s=0);for(var h=o.length;s<h;s++){var c=o[s];l+=c[0]+":"+c[1]+(c[2]?" !important":"")+";\n"}i.insertRule(a+"{"+l+"}",i.cssRules.length)}else{Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n))n.forEach(t=>{const n=Object.keys(t).map(e=>`${e}:${t[e]}`).join(";");i.insertRule(`${e}{${n}}`,i.cssRules.length)});else{const t=Object.keys(n).map(t=>`${t}:${n[t]}`).join(";");i.insertRule(`${e}{${t}}`,i.cssRules.length)}})}}addScript(t){return new Promise(function(e,i){var n,r=!1;this.document?((n=this.document.createElement("script")).type="text/javascript",n.async=!0,n.src=t,n.onload=n.onreadystatechange=function(){r||this.readyState&&"complete"!=this.readyState||(r=!0,setTimeout((function(){e(!0)}),1))},this.document.head.appendChild(n)):e(!1)}.bind(this))}addClass(t){var e;this.document&&(e=this.content||this.document.body)&&e.classList.add(t)}removeClass(t){var e;this.document&&(e=this.content||this.document.body)&&e.classList.remove(t)}addEventListeners(){this.document&&(this._triggerEvent=this.triggerEvent.bind(this),h.a.forEach((function(t){this.document.addEventListener(t,this._triggerEvent,{passive:!0})}),this))}removeEventListeners(){this.document&&(h.a.forEach((function(t){this.document.removeEventListener(t,this._triggerEvent,{passive:!0})}),this),this._triggerEvent=void 0)}triggerEvent(t){this.emit(t.type,t)}addSelectionListeners(){this.document&&(this._onSelectionChange=this.onSelectionChange.bind(this),this.document.addEventListener("selectionchange",this._onSelectionChange,{passive:!0}))}removeSelectionListeners(){this.document&&(this.document.removeEventListener("selectionchange",this._onSelectionChange,{passive:!0}),this._onSelectionChange=void 0)}onSelectionChange(t){this.selectionEndTimeout&&clearTimeout(this.selectionEndTimeout),this.selectionEndTimeout=setTimeout(function(){var t=this.window.getSelection();this.triggerSelectedEvent(t)}.bind(this),250)}triggerSelectedEvent(t){var e,i;t&&t.rangeCount>0&&((e=t.getRangeAt(0)).collapsed||(i=new o.a(e,this.cfiBase).toString(),this.emit(h.c.CONTENTS.SELECTED,i),this.emit(h.c.CONTENTS.SELECTED_RANGE,e)))}range(t,e){return new o.a(t).toRange(this.document,e)}cfiFromRange(t,e){return new o.a(t,this.cfiBase,e).toString()}cfiFromNode(t,e){return new o.a(t,this.cfiBase,e).toString()}map(t){return new a.a(t).section()}size(t,e){var i={scale:1,scalable:"no"};this.layoutStyle("scrolling"),t>=0&&(this.width(t),i.width=t,this.css("padding","0 "+t/12+"px")),e>=0&&(this.height(e),i.height=e),this.css("margin","0"),this.css("box-sizing","border-box"),this.viewport(i)}columns(t,e,i,n,r){let o=Object(s.prefixed)("column-axis"),a=Object(s.prefixed)("column-gap"),l=Object(s.prefixed)("column-width"),h=Object(s.prefixed)("column-fill"),c=0===this.writingMode().indexOf("vertical")?"vertical":"horizontal";this.layoutStyle("paginated"),"rtl"===r&&"horizontal"===c&&this.direction(r),this.width(t),this.height(e),this.viewport({width:t,height:e,scale:1,scalable:"no"}),this.css("overflow-y","hidden"),this.css("margin","0",!0),"vertical"===c?(this.css("padding-top",n/2+"px",!0),this.css("padding-bottom",n/2+"px",!0),this.css("padding-left","20px"),this.css("padding-right","20px"),this.css(o,"vertical")):(this.css("padding-top","20px"),this.css("padding-bottom","20px"),this.css("padding-left",n/2+"px",!0),this.css("padding-right",n/2+"px",!0),this.css(o,"horizontal")),this.css("box-sizing","border-box"),this.css("max-width","inherit"),this.css(h,"auto"),this.css(a,n+"px"),this.css(l,i+"px"),this.css("-webkit-line-box-contain","block glyphs replaced")}scaler(t,e,i){var n="scale("+t+")",r="";this.css("transform-origin","top left"),(e>=0||i>=0)&&(r=" translate("+(e||0)+"px, "+(i||0)+"px )"),this.css("transform",n+r)}fit(t,e,i){var n=this.viewport(),r=parseInt(n.width),s=parseInt(n.height),o=t/r,a=e/s,l=o<a?o:a;if(this.layoutStyle("paginated"),this.width(r),this.height(s),this.overflow("hidden"),this.scaler(l,0,0),this.css("background-size",r*l+"px "+s*l+"px"),this.css("background-color","transparent"),i&&i.properties.includes("page-spread-left")){var h=t-r*l;this.css("margin-left",h+"px")}}direction(t){this.documentElement&&(this.documentElement.style.direction=t)}mapPage(t,e,i,n,r){return new a.a(e,r).page(this,t,i,n)}linksHandler(){Object(l.c)(this.content,t=>{this.emit(h.c.CONTENTS.LINK_CLICKED,t)})}writingMode(t){let e=Object(s.prefixed)("writing-mode");return t&&this.documentElement&&(this.documentElement.style[e]=t),this.window.getComputedStyle(this.documentElement)[e]||""}layoutStyle(t){return t&&(this._layoutStyle=t,navigator.epubReadingSystem.layoutStyle=this._layoutStyle),this._layoutStyle||"paginated"}epubReadingSystem(t,e){return navigator.epubReadingSystem={name:t,version:e,layoutStyle:this.layoutStyle(),hasFeature:function(t){switch(t){case"dom-manipulation":case"layout-changes":case"touch-events":case"mouse-events":case"keyboard-events":return!0;case"spine-scripting":default:return!1}}},navigator.epubReadingSystem}destroy(){this.removeListeners()}}r()(f.prototype),e.a=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Underline=e.Highlight=e.Mark=e.Pane=void 0;var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),r=o(i(49)),s=o(i(50));function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.Pane=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;h(this,t),this.target=e,this.element=r.default.createElement("svg"),this.marks=[],this.element.style.position="absolute",this.element.setAttribute("pointer-events","none"),s.default.proxyMouse(this.target,this.marks),this.container=i,this.container.appendChild(this.element),this.render()}return n(t,[{key:"addMark",value:function(t){var e=r.default.createElement("g");return this.element.appendChild(e),t.bind(e,this.container),this.marks.push(t),t.render(),t}},{key:"removeMark",value:function(t){var e=this.marks.indexOf(t);if(-1!==e){var i=t.unbind();this.element.removeChild(i),this.marks.splice(e,1)}}},{key:"render",value:function(){var t,e,i,n;!function(t,e){t.style.setProperty("top",e.top+"px","important"),t.style.setProperty("left",e.left+"px","important"),t.style.setProperty("height",e.height+"px","important"),t.style.setProperty("width",e.width+"px","important")}(this.element,(t=this.target,e=this.container,i=e.getBoundingClientRect(),n=t.getBoundingClientRect(),{top:n.top-i.top,left:n.left-i.left,height:t.scrollHeight,width:t.scrollWidth}));var r=!0,s=!1,o=void 0;try{for(var a,l=this.marks[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){a.value.render()}}catch(t){s=!0,o=t}finally{try{!r&&l.return&&l.return()}finally{if(s)throw o}}}}]),t}();var c=e.Mark=function(){function t(){h(this,t),this.element=null}return n(t,[{key:"bind",value:function(t,e){this.element=t,this.container=e}},{key:"unbind",value:function(){var t=this.element;return this.element=null,t}},{key:"render",value:function(){}},{key:"dispatchEvent",value:function(t){this.element&&this.element.dispatchEvent(t)}},{key:"getBoundingClientRect",value:function(){return this.element.getBoundingClientRect()}},{key:"getClientRects",value:function(){for(var t=[],e=this.element.firstChild;e;)t.push(e.getBoundingClientRect()),e=e.nextSibling;return t}},{key:"filteredRanges",value:function(){var t=Array.from(this.range.getClientRects());return t.filter((function(e){for(var i=0;i<t.length;i++){if(t[i]===e)return!0;if(n=t[i],(r=e).right<=n.right&&r.left>=n.left&&r.top>=n.top&&r.bottom<=n.bottom)return!1}var n,r;return!0}))}}]),t}(),u=e.Highlight=function(t){function e(t,i,n,r){h(this,e);var s=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.range=t,s.className=i,s.data=n||{},s.attributes=r||{},s}return l(e,t),n(e,[{key:"bind",value:function(t,i){for(var n in function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var s=Object.getPrototypeOf(e);return null===s?void 0:t(s,i,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"bind",this).call(this,t,i),this.data)this.data.hasOwnProperty(n)&&(this.element.dataset[n]=this.data[n]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&this.element.setAttribute(n,this.attributes[n]);this.className&&this.element.classList.add(this.className)}},{key:"render",value:function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(var t=this.element.ownerDocument.createDocumentFragment(),e=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),s=0,o=e.length;s<o;s++){var a=e[s],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),t.appendChild(l)}this.element.appendChild(t)}}]),e}(c);e.Underline=function(t){function e(t,i,n,r){return h(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,n,r))}return l(e,t),n(e,[{key:"render",value:function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(var t=this.element.ownerDocument.createDocumentFragment(),e=this.filteredRanges(),i=this.element.getBoundingClientRect(),n=this.container.getBoundingClientRect(),s=0,o=e.length;s<o;s++){var a=e[s],l=r.default.createElement("rect");l.setAttribute("x",a.left-i.left+n.left),l.setAttribute("y",a.top-i.top+n.top),l.setAttribute("height",a.height),l.setAttribute("width",a.width),l.setAttribute("fill","none");var h=r.default.createElement("line");h.setAttribute("x1",a.left-i.left+n.left),h.setAttribute("x2",a.left-i.left+n.left+a.width),h.setAttribute("y1",a.top-i.top+n.top+a.height-1),h.setAttribute("y2",a.top-i.top+n.top+a.height-1),h.setAttribute("stroke-width",1),h.setAttribute("stroke","black"),h.setAttribute("stroke-linecap","square"),t.appendChild(l),t.appendChild(h)}this.element.appendChild(t)}}]),e}(u)},function(t,e,i){"use strict";function n(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.freeze?e.freeze(t):t}var r=n({HTML:"text/html",isHTML:function(t){return t===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.freeze=n,e.MIME_TYPE=r,e.NAMESPACE=s},function(t,e,i){var n=i(25);e.DOMImplementation=n.DOMImplementation,e.XMLSerializer=n.XMLSerializer,e.DOMParser=i(46).DOMParser},function(t,e,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(6),a=i(2),l=i(9),h=i(1);class c{constructor(t){this.settings=t,this.name=t.layout||"reflowable",this._spread="none"!==t.spread,this._minSpreadWidth=t.minSpreadWidth||800,this._evenSpreads=t.evenSpreads||!1,"scrolled"===t.flow||"scrolled-continuous"===t.flow||"scrolled-doc"===t.flow?this._flow="scrolled":this._flow="paginated",this.width=0,this.height=0,this.spreadWidth=0,this.delta=0,this.columnWidth=0,this.gap=0,this.divisor=1,this.props={name:this.name,spread:this._spread,flow:this._flow,width:0,height:0,spreadWidth:0,delta:0,columnWidth:0,gap:0,divisor:1}}flow(t){return void 0!==t&&(this._flow="scrolled"===t||"scrolled-continuous"===t||"scrolled-doc"===t?"scrolled":"paginated",this.update({flow:this._flow})),this._flow}spread(t,e){return t&&(this._spread="none"!==t,this.update({spread:this._spread})),e>=0&&(this._minSpreadWidth=e),this._spread}calculate(t,e,i){var n,r,s,o,a=1,l=i||0,h=t,c=e,u=Math.floor(h/12);a=this._spread&&h>=this._minSpreadWidth?2:1,"reflowable"!==this.name||"paginated"!==this._flow||i>=0||(l=u%2==0?u:u-1),"pre-paginated"===this.name&&(l=0),a>1?s=(n=h/a-l)+l:(n=h,s=h),"pre-paginated"===this.name&&a>1&&(h=n),r=n*a+l,o=h,this.width=h,this.height=c,this.spreadWidth=r,this.pageWidth=s,this.delta=o,this.columnWidth=n,this.gap=l,this.divisor=a,this.update({width:h,height:c,spreadWidth:r,pageWidth:s,delta:o,columnWidth:n,gap:l,divisor:a})}format(t,e,i){return"pre-paginated"===this.name?t.fit(this.columnWidth,this.height,e):"paginated"===this._flow?t.columns(this.width,this.height,this.columnWidth,this.gap,this.settings.direction):i&&"horizontal"===i?t.size(null,this.height):t.size(this.width,null)}count(t,e){let i,n;return"pre-paginated"===this.name?(i=1,n=1):"paginated"===this._flow?(e=e||this.delta,i=Math.ceil(t/e),n=i*this.divisor):(e=e||this.height,i=Math.ceil(t/e),n=i),{spreads:i,pages:n}}update(t){if(Object.keys(t).forEach(e=>{this.props[e]===t[e]&&delete t[e]}),Object.keys(t).length>0){let e=Object(s.extend)(this.props,t);this.emit(h.c.LAYOUT.UPDATED,e,t)}}}r()(c.prototype);var u=c,d=i(5);var f=class{constructor(t){this.rendition=t,this._themes={default:{rules:{},url:"",serialized:""}},this._overrides={},this._current="default",this._injected=[],this.rendition.hooks.content.register(this.inject.bind(this)),this.rendition.hooks.content.register(this.overrides.bind(this))}register(){if(0!==arguments.length)return 1===arguments.length&&"object"==typeof arguments[0]?this.registerThemes(arguments[0]):1===arguments.length&&"string"==typeof arguments[0]?this.default(arguments[0]):2===arguments.length&&"string"==typeof arguments[1]?this.registerUrl(arguments[0],arguments[1]):2===arguments.length&&"object"==typeof arguments[1]?this.registerRules(arguments[0],arguments[1]):void 0}default(t){if(t)return"string"==typeof t?this.registerUrl("default",t):"object"==typeof t?this.registerRules("default",t):void 0}registerThemes(t){for(var e in t)t.hasOwnProperty(e)&&("string"==typeof t[e]?this.registerUrl(e,t[e]):this.registerRules(e,t[e]))}registerCss(t,e){this._themes[t]={serialized:e},(this._injected[t]||"default"==t)&&this.update(t)}registerUrl(t,e){var i=new d.a(e);this._themes[t]={url:i.toString()},(this._injected[t]||"default"==t)&&this.update(t)}registerRules(t,e){this._themes[t]={rules:e},(this._injected[t]||"default"==t)&&this.update(t)}select(t){var e=this._current;this._current=t,this.update(t),this.rendition.getContents().forEach(i=>{i.removeClass(e),i.addClass(t)})}update(t){this.rendition.getContents().forEach(e=>{this.add(t,e)})}inject(t){var e,i=[],n=this._themes;for(var r in n)!n.hasOwnProperty(r)||r!==this._current&&"default"!==r||(((e=n[r]).rules&&Object.keys(e.rules).length>0||e.url&&-1===i.indexOf(e.url))&&this.add(r,t),this._injected.push(r));"default"!=this._current&&t.addClass(this._current)}add(t,e){var i=this._themes[t];i&&e&&(i.url?e.addStylesheet(i.url):i.serialized?(e.addStylesheetCss(i.serialized,t),i.injected=!0):i.rules&&(e.addStylesheetRules(i.rules,t),i.injected=!0))}override(t,e,i){var n=this.rendition.getContents();this._overrides[t]={value:e,priority:!0===i},n.forEach(e=>{e.css(t,this._overrides[t].value,this._overrides[t].priority)})}removeOverride(t){var e=this.rendition.getContents();delete this._overrides[t],e.forEach(e=>{e.css(t)})}overrides(t){var e=this._overrides;for(var i in e)e.hasOwnProperty(i)&&t.css(i,e[i].value,e[i].priority)}fontSize(t){this.override("font-size",t)}font(t){this.override("font-family",t,!0)}destroy(){this.rendition=void 0,this._themes=void 0,this._overrides=void 0,this._current=void 0,this._injected=void 0}};i(12);class p{constructor({type:t,cfiRange:e,data:i,sectionIndex:n,cb:r,className:s,styles:o}){this.type=t,this.cfiRange=e,this.data=i,this.sectionIndex=n,this.mark=void 0,this.cb=r,this.className=s,this.styles=o}update(t){this.data=t}attach(t){let e,{cfiRange:i,data:n,type:r,mark:s,cb:o,className:a,styles:l}=this;return"highlight"===r?e=t.highlight(i,n,o,a,l):"underline"===r?e=t.underline(i,n,o,a,l):"mark"===r&&(e=t.mark(i,n,o)),this.mark=e,this.emit(h.c.ANNOTATION.ATTACH,e),e}detach(t){let e,{cfiRange:i,type:n}=this;return t&&("highlight"===n?e=t.unhighlight(i):"underline"===n?e=t.ununderline(i):"mark"===n&&(e=t.unmark(i))),this.mark=void 0,this.emit(h.c.ANNOTATION.DETACH,e),e}text(){}}r()(p.prototype);var g=class{constructor(t){this.rendition=t,this.highlights=[],this.underlines=[],this.marks=[],this._annotations={},this._annotationsBySectionIndex={},this.rendition.hooks.render.register(this.inject.bind(this)),this.rendition.hooks.unloaded.register(this.clear.bind(this))}add(t,e,i,n,r,s){let o=encodeURI(e+t),l=new a.a(e).spinePos,h=new p({type:t,cfiRange:e,data:i,sectionIndex:l,cb:n,className:r,styles:s});return this._annotations[o]=h,l in this._annotationsBySectionIndex?this._annotationsBySectionIndex[l].push(o):this._annotationsBySectionIndex[l]=[o],this.rendition.views().forEach(t=>{h.sectionIndex===t.index&&h.attach(t)}),h}remove(t,e){let i=encodeURI(t+e);if(i in this._annotations){let t=this._annotations[i];if(e&&t.type!==e)return;this.rendition.views().forEach(e=>{this._removeFromAnnotationBySectionIndex(t.sectionIndex,i),t.sectionIndex===e.index&&t.detach(e)}),delete this._annotations[i]}}_removeFromAnnotationBySectionIndex(t,e){this._annotationsBySectionIndex[t]=this._annotationsAt(t).filter(t=>t!==e)}_annotationsAt(t){return this._annotationsBySectionIndex[t]}highlight(t,e,i,n,r){return this.add("highlight",t,e,i,n,r)}underline(t,e,i,n,r){return this.add("underline",t,e,i,n,r)}mark(t,e,i){return this.add("mark",t,e,i)}each(){return this._annotations.forEach.apply(this._annotations,arguments)}inject(t){let e=t.index;if(e in this._annotationsBySectionIndex){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].attach(t)})}}clear(t){let e=t.index;if(e in this._annotationsBySectionIndex){this._annotationsBySectionIndex[e].forEach(e=>{this._annotations[e].detach(t)})}}show(){}hide(){}},m=i(20),v=i(10),y=i(22);class b{constructor(t,e){this.settings=Object(s.extend)(this.settings||{},{width:null,height:null,ignoreClass:"",manager:"default",view:"iframe",flow:null,layout:null,spread:null,minSpreadWidth:800,stylesheet:null,resizeOnOrientationChange:!0,script:null,snap:!1,defaultDirection:"ltr",allowScriptedContent:!1,allowPopups:!1}),Object(s.extend)(this.settings,e),"object"==typeof this.settings.manager&&(this.manager=this.settings.manager),this.book=t,this.hooks={},this.hooks.display=new o.a(this),this.hooks.serialize=new o.a(this),this.hooks.content=new o.a(this),this.hooks.unloaded=new o.a(this),this.hooks.layout=new o.a(this),this.hooks.render=new o.a(this),this.hooks.show=new o.a(this),this.hooks.content.register(this.handleLinks.bind(this)),this.hooks.content.register(this.passEvents.bind(this)),this.hooks.content.register(this.adjustImages.bind(this)),this.book.spine.hooks.content.register(this.injectIdentifier.bind(this)),this.settings.stylesheet&&this.book.spine.hooks.content.register(this.injectStylesheet.bind(this)),this.settings.script&&this.book.spine.hooks.content.register(this.injectScript.bind(this)),this.themes=new f(this),this.annotations=new g(this),this.epubcfi=new a.a,this.q=new l.a(this),this.location=void 0,this.q.enqueue(this.book.opened),this.starting=new s.defer,this.started=this.starting.promise,this.q.enqueue(this.start)}setManager(t){this.manager=t}requireManager(t){return"string"==typeof t&&"default"===t?v.a:"string"==typeof t&&"continuous"===t?y.a:t}requireView(t){return"string"==typeof t&&"iframe"===t?m.a:t}start(){switch(this.settings.layout||"pre-paginated"!==this.book.package.metadata.layout&&"true"!==this.book.displayOptions.fixedLayout||(this.settings.layout="pre-paginated"),this.book.package.metadata.spread){case"none":this.settings.spread="none";break;case"both":this.settings.spread=!0}this.manager||(this.ViewManager=this.requireManager(this.settings.manager),this.View=this.requireView(this.settings.view),this.manager=new this.ViewManager({view:this.View,queue:this.q,request:this.book.load.bind(this.book),settings:this.settings})),this.direction(this.book.package.metadata.direction||this.settings.defaultDirection),this.settings.globalLayoutProperties=this.determineLayoutProperties(this.book.package.metadata),this.flow(this.settings.globalLayoutProperties.flow),this.layout(this.settings.globalLayoutProperties),this.manager.on(h.c.MANAGERS.ADDED,this.afterDisplayed.bind(this)),this.manager.on(h.c.MANAGERS.REMOVED,this.afterRemoved.bind(this)),this.manager.on(h.c.MANAGERS.RESIZED,this.onResized.bind(this)),this.manager.on(h.c.MANAGERS.ORIENTATION_CHANGE,this.onOrientationChange.bind(this)),this.manager.on(h.c.MANAGERS.SCROLLED,this.reportLocation.bind(this)),this.emit(h.c.RENDITION.STARTED),this.starting.resolve()}attachTo(t){return this.q.enqueue(function(){this.manager.render(t,{width:this.settings.width,height:this.settings.height}),this.emit(h.c.RENDITION.ATTACHED)}.bind(this))}display(t){return this.displaying&&this.displaying.resolve(),this.q.enqueue(this._display,t)}_display(t){if(this.book){this.epubcfi.isCfiString(t);var e,i=new s.defer,n=i.promise;return this.displaying=i,this.book.locations.length()&&Object(s.isFloat)(t)&&(t=this.book.locations.cfiFromPercentage(parseFloat(t))),(e=this.book.spine.get(t))?(this.manager.display(e,t).then(()=>{i.resolve(e),this.displaying=void 0,this.emit(h.c.RENDITION.DISPLAYED,e),this.reportLocation()},t=>{this.emit(h.c.RENDITION.DISPLAY_ERROR,t)}),n):(i.reject(new Error("No Section Found")),n)}}afterDisplayed(t){t.on(h.c.VIEWS.MARK_CLICKED,(e,i)=>this.triggerMarkEvent(e,i,t.contents)),this.hooks.render.trigger(t,this).then(()=>{t.contents?this.hooks.content.trigger(t.contents,this).then(()=>{this.emit(h.c.RENDITION.RENDERED,t.section,t)}):this.emit(h.c.RENDITION.RENDERED,t.section,t)})}afterRemoved(t){this.hooks.unloaded.trigger(t,this).then(()=>{this.emit(h.c.RENDITION.REMOVED,t.section,t)})}onResized(t,e){this.emit(h.c.RENDITION.RESIZED,{width:t.width,height:t.height},e),this.location&&this.location.start&&this.display(e||this.location.start.cfi)}onOrientationChange(t){this.emit(h.c.RENDITION.ORIENTATION_CHANGE,t)}moveTo(t){this.manager.moveTo(t)}resize(t,e,i){t&&(this.settings.width=t),e&&(this.settings.height=e),this.manager.resize(t,e,i)}clear(){this.manager.clear()}next(){return this.q.enqueue(this.manager.next.bind(this.manager)).then(this.reportLocation.bind(this))}prev(){return this.q.enqueue(this.manager.prev.bind(this.manager)).then(this.reportLocation.bind(this))}determineLayoutProperties(t){var e=this.settings.layout||t.layout||"reflowable",i=this.settings.spread||t.spread||"auto",n=this.settings.orientation||t.orientation||"auto",r=this.settings.flow||t.flow||"auto",s=t.viewport||"",o=this.settings.minSpreadWidth||t.minSpreadWidth||800,a=this.settings.direction||t.direction||"ltr";return(0===this.settings.width||this.settings.width>0)&&(0===this.settings.height||this.settings.height),{layout:e,spread:i,orientation:n,flow:r,viewport:s,minSpreadWidth:o,direction:a}}flow(t){var e=t;"scrolled"!==t&&"scrolled-doc"!==t&&"scrolled-continuous"!==t||(e="scrolled"),"auto"!==t&&"paginated"!==t||(e="paginated"),this.settings.flow=t,this._layout&&this._layout.flow(e),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this.manager&&this.manager.updateFlow(e),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}layout(t){return t&&(this._layout=new u(t),this._layout.spread(t.spread,this.settings.minSpreadWidth),this._layout.on(h.c.LAYOUT.UPDATED,(t,e)=>{this.emit(h.c.RENDITION.LAYOUT,t,e)})),this.manager&&this._layout&&this.manager.applyLayout(this._layout),this._layout}spread(t,e){this.settings.spread=t,e&&(this.settings.minSpreadWidth=e),this._layout&&this._layout.spread(t,e),this.manager&&this.manager.isRendered()&&this.manager.updateLayout()}direction(t){this.settings.direction=t||"ltr",this.manager&&this.manager.direction(this.settings.direction),this.manager&&this.manager.isRendered()&&this.location&&(this.manager.clear(),this.display(this.location.start.cfi))}reportLocation(){return this.q.enqueue(function(){requestAnimationFrame(function(){var t=this.manager.currentLocation();if(t&&t.then&&"function"==typeof t.then)t.then(function(t){let e=this.located(t);e&&e.start&&e.end&&(this.location=e,this.emit(h.c.RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(h.c.RENDITION.RELOCATED,this.location))}.bind(this));else if(t){let e=this.located(t);if(!e||!e.start||!e.end)return;this.location=e,this.emit(h.c.RENDITION.LOCATION_CHANGED,{index:this.location.start.index,href:this.location.start.href,start:this.location.start.cfi,end:this.location.end.cfi,percentage:this.location.start.percentage}),this.emit(h.c.RENDITION.RELOCATED,this.location)}}.bind(this))}.bind(this))}currentLocation(){var t=this.manager.currentLocation();if(t&&t.then&&"function"==typeof t.then)t.then(function(t){return this.located(t)}.bind(this));else if(t){return this.located(t)}}located(t){if(!t.length)return{};let e=t[0],i=t[t.length-1],n={start:{index:e.index,href:e.href,cfi:e.mapping.start,displayed:{page:e.pages[0]||1,total:e.totalPages}},end:{index:i.index,href:i.href,cfi:i.mapping.end,displayed:{page:i.pages[i.pages.length-1]||1,total:i.totalPages}}},r=this.book.locations.locationFromCfi(e.mapping.start),s=this.book.locations.locationFromCfi(i.mapping.end);null!=r&&(n.start.location=r,n.start.percentage=this.book.locations.percentageFromLocation(r)),null!=s&&(n.end.location=s,n.end.percentage=this.book.locations.percentageFromLocation(s));let o=this.book.pageList.pageFromCfi(e.mapping.start),a=this.book.pageList.pageFromCfi(i.mapping.end);return-1!=o&&(n.start.page=o),-1!=a&&(n.end.page=a),i.index===this.book.spine.last().index&&n.end.displayed.page>=n.end.displayed.total&&(n.atEnd=!0),e.index===this.book.spine.first().index&&1===n.start.displayed.page&&(n.atStart=!0),n}destroy(){this.manager&&this.manager.destroy(),this.book=void 0}passEvents(t){h.a.forEach(e=>{t.on(e,e=>this.triggerViewEvent(e,t))}),t.on(h.c.CONTENTS.SELECTED,e=>this.triggerSelectedEvent(e,t))}triggerViewEvent(t,e){this.emit(t.type,t,e)}triggerSelectedEvent(t,e){this.emit(h.c.RENDITION.SELECTED,t,e)}triggerMarkEvent(t,e,i){this.emit(h.c.RENDITION.MARK_CLICKED,t,e,i)}getRange(t,e){var i=new a.a(t),n=this.manager.visible().filter((function(t){if(i.spinePos===t.index)return!0}));if(n.length)return n[0].contents.range(i,e)}adjustImages(t){if("pre-paginated"===this._layout.name)return new Promise((function(t){t()}));let e=t.window.getComputedStyle(t.content,null),i=.95*(t.content.offsetHeight-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom))),n=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.addStylesheetRules({img:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","object-fit":"contain","page-break-inside":"avoid","break-inside":"avoid","box-sizing":"border-box"},svg:{"max-width":(this._layout.columnWidth?this._layout.columnWidth-n+"px":"100%")+"!important","max-height":i+"px!important","page-break-inside":"avoid","break-inside":"avoid"}}),new Promise((function(t,e){setTimeout((function(){t()}),1)}))}getContents(){return this.manager?this.manager.getContents():[]}views(){return(this.manager?this.manager.views:void 0)||[]}handleLinks(t){t&&t.on(h.c.CONTENTS.LINK_CLICKED,t=>{let e=this.book.path.relative(t);this.display(e)})}injectStylesheet(t,e){let i=t.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",this.settings.stylesheet),t.getElementsByTagName("head")[0].appendChild(i)}injectScript(t,e){let i=t.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src",this.settings.script),i.textContent=" ",t.getElementsByTagName("head")[0].appendChild(i)}injectIdentifier(t,e){let i=this.book.packaging.metadata.identifier,n=t.createElement("meta");n.setAttribute("name","dc.relation.ispartof"),i&&n.setAttribute("content",i),t.getElementsByTagName("head")[0].appendChild(n)}}r()(b.prototype);e.a=b},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";var n=i(38)();t.exports=function(t){return t!==n&&null!==t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(2),a=i(12),l=i(1),h=i(13);class c{constructor(t,e){this.settings=Object(s.extend)({ignoreClass:"",axis:void 0,direction:void 0,width:0,height:0,layout:void 0,globalLayoutProperties:{},method:void 0,forceRight:!1,allowScriptedContent:!1,allowPopups:!1},e||{}),this.id="epubjs-view-"+Object(s.uuid)(),this.section=t,this.index=t.index,this.element=this.container(this.settings.axis),this.added=!1,this.displayed=!1,this.rendered=!1,this.fixedWidth=0,this.fixedHeight=0,this.epubcfi=new o.a,this.layout=this.settings.layout,this.pane=void 0,this.highlights={},this.underlines={},this.marks={}}container(t){var e=document.createElement("div");return e.classList.add("epub-view"),e.style.height="0px",e.style.width="0px",e.style.overflow="hidden",e.style.position="relative",e.style.display="block",e.style.flex=t&&"horizontal"==t?"none":"initial",e}create(){return this.iframe||(this.element||(this.element=this.createContainer()),this.iframe=document.createElement("iframe"),this.iframe.id=this.id,this.iframe.scrolling="no",this.iframe.style.overflow="hidden",this.iframe.seamless="seamless",this.iframe.style.border="none",this.iframe.sandbox="allow-same-origin",this.settings.allowScriptedContent&&(this.iframe.sandbox+=" allow-scripts"),this.settings.allowPopups&&(this.iframe.sandbox+=" allow-popups"),this.iframe.setAttribute("enable-annotation","true"),this.resizing=!0,this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this.element.setAttribute("ref",this.index),this.added=!0,this.elementBounds=Object(s.bounds)(this.element),"srcdoc"in this.iframe?this.supportsSrcdoc=!0:this.supportsSrcdoc=!1,this.settings.method||(this.settings.method=this.supportsSrcdoc?"srcdoc":"write")),this.iframe}render(t,e){return this.create(),this.size(),this.sectionRender||(this.sectionRender=this.section.render(t)),this.sectionRender.then(function(t){return this.load(t)}.bind(this)).then(function(){let t,e=this.contents.writingMode();return t="scrolled"===this.settings.flow?0===e.indexOf("vertical")?"horizontal":"vertical":0===e.indexOf("vertical")?"vertical":"horizontal",0===e.indexOf("vertical")&&"paginated"===this.settings.flow&&(this.layout.delta=this.layout.height),this.setAxis(t),this.emit(l.c.VIEWS.AXIS,t),this.setWritingMode(e),this.emit(l.c.VIEWS.WRITING_MODE,e),this.layout.format(this.contents,this.section,this.axis),this.addListeners(),new Promise((t,e)=>{this.expand(),this.settings.forceRight&&(this.element.style.marginLeft=this.width()+"px"),t()})}.bind(this),function(t){return this.emit(l.c.VIEWS.LOAD_ERROR,t),new Promise((e,i)=>{i(t)})}.bind(this)).then(function(){this.emit(l.c.VIEWS.RENDERED,this.section)}.bind(this))}reset(){this.iframe&&(this.iframe.style.width="0",this.iframe.style.height="0",this._width=0,this._height=0,this._textWidth=void 0,this._contentWidth=void 0,this._textHeight=void 0,this._contentHeight=void 0),this._needsReframe=!0}size(t,e){var i=t||this.settings.width,n=e||this.settings.height;"pre-paginated"===this.layout.name?this.lock("both",i,n):"horizontal"===this.settings.axis?this.lock("height",i,n):this.lock("width",i,n),this.settings.width=i,this.settings.height=n}lock(t,e,i){var n,r=Object(s.borders)(this.element);n=this.iframe?Object(s.borders)(this.iframe):{width:0,height:0},"width"==t&&Object(s.isNumber)(e)&&(this.lockedWidth=e-r.width-n.width),"height"==t&&Object(s.isNumber)(i)&&(this.lockedHeight=i-r.height-n.height),"both"===t&&Object(s.isNumber)(e)&&Object(s.isNumber)(i)&&(this.lockedWidth=e-r.width-n.width,this.lockedHeight=i-r.height-n.height),this.displayed&&this.iframe&&this.expand()}expand(t){var e,i=this.lockedWidth,n=this.lockedHeight;this.iframe&&!this._expanding&&(this._expanding=!0,"pre-paginated"===this.layout.name?(i=this.layout.columnWidth,n=this.layout.height):"horizontal"===this.settings.axis?((i=this.contents.textWidth())%this.layout.pageWidth>0&&(i=Math.ceil(i/this.layout.pageWidth)*this.layout.pageWidth),this.settings.forceEvenPages&&(e=i/this.layout.pageWidth,this.layout.divisor>1&&"reflowable"===this.layout.name&&e%2>0&&(i+=this.layout.pageWidth))):"vertical"===this.settings.axis&&(n=this.contents.textHeight(),"paginated"===this.settings.flow&&n%this.layout.height>0&&(n=Math.ceil(n/this.layout.height)*this.layout.height)),(this._needsReframe||i!=this._width||n!=this._height)&&this.reframe(i,n),this._expanding=!1)}reframe(t,e){var i;Object(s.isNumber)(t)&&(this.element.style.width=t+"px",this.iframe.style.width=t+"px",this._width=t),Object(s.isNumber)(e)&&(this.element.style.height=e+"px",this.iframe.style.height=e+"px",this._height=e),i={width:t,height:e,widthDelta:this.prevBounds?t-this.prevBounds.width:t,heightDelta:this.prevBounds?e-this.prevBounds.height:e},this.pane&&this.pane.render(),requestAnimationFrame(()=>{let t;for(let e in this.marks)this.marks.hasOwnProperty(e)&&(t=this.marks[e],this.placeMark(t.element,t.range))}),this.onResize(this,i),this.emit(l.c.VIEWS.RESIZED,i),this.prevBounds=i,this.elementBounds=Object(s.bounds)(this.element)}load(t){var e=new s.defer,i=e.promise;if(!this.iframe)return e.reject(new Error("No Iframe Available")),i;if(this.iframe.onload=function(t){this.onLoad(t,e)}.bind(this),"blobUrl"===this.settings.method)this.blobUrl=Object(s.createBlobUrl)(t,"application/xhtml+xml"),this.iframe.src=this.blobUrl,this.element.appendChild(this.iframe);else if("srcdoc"===this.settings.method)this.iframe.srcdoc=t,this.element.appendChild(this.iframe);else{if(this.element.appendChild(this.iframe),this.document=this.iframe.contentDocument,!this.document)return e.reject(new Error("No Document Available")),i;if(this.iframe.contentDocument.open(),window.MSApp&&MSApp.execUnsafeLocalFunction){var n=this;MSApp.execUnsafeLocalFunction((function(){n.iframe.contentDocument.write(t)}))}else this.iframe.contentDocument.write(t);this.iframe.contentDocument.close()}return i}onLoad(t,e){this.window=this.iframe.contentWindow,this.document=this.iframe.contentDocument,this.contents=new a.a(this.document,this.document.body,this.section.cfiBase,this.section.index),this.rendering=!1;var i=this.document.querySelector("link[rel='canonical']");i?i.setAttribute("href",this.section.canonical):((i=this.document.createElement("link")).setAttribute("rel","canonical"),i.setAttribute("href",this.section.canonical),this.document.querySelector("head").appendChild(i)),this.contents.on(l.c.CONTENTS.EXPAND,()=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),this.contents.on(l.c.CONTENTS.RESIZE,t=>{this.displayed&&this.iframe&&(this.expand(),this.contents&&this.layout.format(this.contents))}),e.resolve(this.contents)}setLayout(t){this.layout=t,this.contents&&(this.layout.format(this.contents),this.expand())}setAxis(t){this.settings.axis=t,this.element.style.flex="horizontal"==t?"none":"initial",this.size()}setWritingMode(t){this.writingMode=t}addListeners(){}removeListeners(t){}display(t){var e=new s.defer;return this.displayed?e.resolve(this):this.render(t).then(function(){this.emit(l.c.VIEWS.DISPLAYED,this),this.onDisplayed(this),this.displayed=!0,e.resolve(this)}.bind(this),(function(t){e.reject(t,this)})),e.promise}show(){this.element.style.visibility="visible",this.iframe&&(this.iframe.style.visibility="visible",this.iframe.style.transform="translateZ(0)",this.iframe.offsetWidth,this.iframe.style.transform=null),this.emit(l.c.VIEWS.SHOWN,this)}hide(){this.element.style.visibility="hidden",this.iframe.style.visibility="hidden",this.stopExpanding=!0,this.emit(l.c.VIEWS.HIDDEN,this)}offset(){return{top:this.element.offsetTop,left:this.element.offsetLeft}}width(){return this._width}height(){return this._height}position(){return this.element.getBoundingClientRect()}locationOf(t){this.iframe.getBoundingClientRect();var e=this.contents.locationOf(t,this.settings.ignoreClass);return{left:e.left,top:e.top}}onDisplayed(t){}onResize(t,e){}bounds(t){return!t&&this.elementBounds||(this.elementBounds=Object(s.bounds)(this.element)),this.elementBounds}highlight(t,e={},i,n="epubjs-hl",r={}){if(!this.contents)return;const s=Object.assign({fill:"yellow","fill-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new h.Pane(this.iframe,this.element));let c=new h.Highlight(o,n,e,s),u=this.pane.addMark(c);return this.highlights[t]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}underline(t,e={},i,n="epubjs-ul",r={}){if(!this.contents)return;const s=Object.assign({stroke:"black","stroke-opacity":"0.3","mix-blend-mode":"multiply"},r);let o=this.contents.range(t),a=()=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};e.epubcfi=t,this.pane||(this.pane=new h.Pane(this.iframe,this.element));let c=new h.Underline(o,n,e,s),u=this.pane.addMark(c);return this.underlines[t]={mark:u,element:u.element,listeners:[a,i]},u.element.setAttribute("ref",n),u.element.addEventListener("click",a),u.element.addEventListener("touchstart",a),i&&(u.element.addEventListener("click",i),u.element.addEventListener("touchstart",i)),u}mark(t,e={},i){if(!this.contents)return;if(t in this.marks){return this.marks[t]}let n=this.contents.range(t);if(!n)return;let r=n.commonAncestorContainer,s=1===r.nodeType?r:r.parentNode,o=i=>{this.emit(l.c.VIEWS.MARK_CLICKED,t,e)};n.collapsed&&1===r.nodeType?(n=new Range,n.selectNodeContents(r)):n.collapsed&&(n=new Range,n.selectNodeContents(s));let a=this.document.createElement("a");return a.setAttribute("ref","epubjs-mk"),a.style.position="absolute",a.dataset.epubcfi=t,e&&Object.keys(e).forEach(t=>{a.dataset[t]=e[t]}),i&&(a.addEventListener("click",i),a.addEventListener("touchstart",i)),a.addEventListener("click",o),a.addEventListener("touchstart",o),this.placeMark(a,n),this.element.appendChild(a),this.marks[t]={element:a,range:n,listeners:[o,i]},s}placeMark(t,e){let i,n,r;if("pre-paginated"===this.layout.name||"horizontal"!==this.settings.axis){let t=e.getBoundingClientRect();i=t.top,n=t.right}else{let t,o=e.getClientRects();for(var s=0;s!=o.length;s++)t=o[s],(!r||t.left<r)&&(r=t.left,n=Math.ceil(r/this.layout.props.pageWidth)*this.layout.props.pageWidth-this.layout.gap/2,i=t.top)}t.style.top=i+"px",t.style.left=n+"px"}unhighlight(t){let e;t in this.highlights&&(e=this.highlights[t],this.pane.removeMark(e.mark),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.highlights[t])}ununderline(t){let e;t in this.underlines&&(e=this.underlines[t],this.pane.removeMark(e.mark),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.underlines[t])}unmark(t){let e;t in this.marks&&(e=this.marks[t],this.element.removeChild(e.element),e.listeners.forEach(t=>{t&&(e.element.removeEventListener("click",t),e.element.removeEventListener("touchstart",t))}),delete this.marks[t])}destroy(){for(let t in this.highlights)this.unhighlight(t);for(let t in this.underlines)this.ununderline(t);for(let t in this.marks)this.unmark(t);this.blobUrl&&Object(s.revokeBlobUrl)(this.blobUrl),this.displayed&&(this.displayed=!1,this.removeListeners(),this.contents.destroy(),this.stopExpanding=!0,this.element.removeChild(this.iframe),this.pane&&(this.pane.element.remove(),this.pane=void 0),this.iframe=void 0,this.contents=void 0,this._textWidth=null,this._textHeight=null,this._width=null,this._height=null)}}r()(c.prototype),e.a=c},function(t,e,i){var n=i(19),r=i(51),s=i(53),o=Math.max,a=Math.min;t.exports=function(t,e,i){var l,h,c,u,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=l,n=h;return l=h=void 0,p=e,u=t.apply(n,i)}function b(t){return p=t,d=setTimeout(x,e),g?y(t):u}function w(t){var i=t-f;return void 0===f||i>=e||i<0||m&&t-p>=c}function x(){var t=r();if(w(t))return _(t);d=setTimeout(x,function(t){var i=e-(t-f);return m?a(i,c-(t-p)):i}(t))}function _(t){return d=void 0,v&&l?y(t):(l=h=void 0,u)}function E(){var t=r(),i=w(t);if(l=arguments,h=this,f=t,i){if(void 0===d)return b(f);if(m)return clearTimeout(d),d=setTimeout(x,e),y(f)}return void 0===d&&(d=setTimeout(x,e)),u}return e=s(e)||0,n(i)&&(g=!!i.leading,c=(m="maxWait"in i)?o(s(i.maxWait)||0,e):c,v="trailing"in i?!!i.trailing:v),E.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=f=h=d=void 0},E.flush=function(){return void 0===d?u:_(r())},E}},function(t,e,i){"use strict";var n=i(0),r=i(10),s=i(1),o=i(3),a=i.n(o);const l=Math.PI/2,h={easeOutSine:function(t){return Math.sin(t*l)},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInCubic:function(t){return Math.pow(t,3)}};class c{constructor(t,e){this.settings=Object(n.extend)({duration:80,minVelocity:.2,minDistance:10,easing:h.easeInCubic},e||{}),this.supportsTouch=this.supportsTouch(),this.supportsTouch&&this.setup(t)}setup(t){this.manager=t,this.layout=this.manager.layout,this.fullsize=this.manager.settings.fullsize,this.fullsize?(this.element=this.manager.stage.element,this.scroller=window,this.disableScroll()):(this.element=this.manager.stage.container,this.scroller=this.element,this.element.style.WebkitOverflowScrolling="touch"),this.manager.settings.offset=this.layout.width,this.manager.settings.afterScrolledTimeout=2*this.settings.duration,this.isVertical="vertical"===this.manager.settings.axis,this.manager.isPaginated&&!this.isVertical&&(this.touchCanceler=!1,this.resizeCanceler=!1,this.snapping=!1,this.scrollLeft,this.scrollTop,this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0,this.addListeners())}supportsTouch(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}disableScroll(){this.element.style.overflow="hidden"}enableScroll(){this.element.style.overflow=""}addListeners(){this._onResize=this.onResize.bind(this),window.addEventListener("resize",this._onResize),this._onScroll=this.onScroll.bind(this),this.scroller.addEventListener("scroll",this._onScroll),this._onTouchStart=this.onTouchStart.bind(this),this.scroller.addEventListener("touchstart",this._onTouchStart,{passive:!0}),this.on("touchstart",this._onTouchStart),this._onTouchMove=this.onTouchMove.bind(this),this.scroller.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.on("touchmove",this._onTouchMove),this._onTouchEnd=this.onTouchEnd.bind(this),this.scroller.addEventListener("touchend",this._onTouchEnd,{passive:!0}),this.on("touchend",this._onTouchEnd),this._afterDisplayed=this.afterDisplayed.bind(this),this.manager.on(s.c.MANAGERS.ADDED,this._afterDisplayed)}removeListeners(){window.removeEventListener("resize",this._onResize),this._onResize=void 0,this.scroller.removeEventListener("scroll",this._onScroll),this._onScroll=void 0,this.scroller.removeEventListener("touchstart",this._onTouchStart,{passive:!0}),this.off("touchstart",this._onTouchStart),this._onTouchStart=void 0,this.scroller.removeEventListener("touchmove",this._onTouchMove,{passive:!0}),this.off("touchmove",this._onTouchMove),this._onTouchMove=void 0,this.scroller.removeEventListener("touchend",this._onTouchEnd,{passive:!0}),this.off("touchend",this._onTouchEnd),this._onTouchEnd=void 0,this.manager.off(s.c.MANAGERS.ADDED,this._afterDisplayed),this._afterDisplayed=void 0}afterDisplayed(t){let e=t.contents;["touchstart","touchmove","touchend"].forEach(t=>{e.on(t,t=>this.triggerViewEvent(t,e))})}triggerViewEvent(t,e){this.emit(t.type,t,e)}onScroll(t){this.scrollLeft=this.fullsize?window.scrollX:this.scroller.scrollLeft,this.scrollTop=this.fullsize?window.scrollY:this.scroller.scrollTop}onResize(t){this.resizeCanceler=!0}onTouchStart(t){let{screenX:e,screenY:i}=t.touches[0];this.fullsize&&this.enableScroll(),this.touchCanceler=!0,this.startTouchX||(this.startTouchX=e,this.startTouchY=i,this.startTime=this.now()),this.endTouchX=e,this.endTouchY=i,this.endTime=this.now()}onTouchMove(t){let{screenX:e,screenY:i}=t.touches[0],n=Math.abs(i-this.endTouchY);this.touchCanceler=!0,!this.fullsize&&n<10&&(this.element.scrollLeft-=e-this.endTouchX),this.endTouchX=e,this.endTouchY=i,this.endTime=this.now()}onTouchEnd(t){this.fullsize&&this.disableScroll(),this.touchCanceler=!1;let e=this.wasSwiped();0!==e?this.snap(e):this.snap(),this.startTouchX=void 0,this.startTouchY=void 0,this.startTime=void 0,this.endTouchX=void 0,this.endTouchY=void 0,this.endTime=void 0}wasSwiped(){let t=this.layout.pageWidth*this.layout.divisor,e=this.endTouchX-this.startTouchX,i=Math.abs(e),n=e/(this.endTime-this.startTime),r=this.settings.minVelocity;return i<=this.settings.minDistance||i>=t?0:n>r?-1:n<-r?1:void 0}needsSnap(){return this.scrollLeft%(this.layout.pageWidth*this.layout.divisor)!=0}snap(t=0){let e=this.scrollLeft,i=this.layout.pageWidth*this.layout.divisor,n=Math.round(e/i)*i;return t&&(n+=t*i),this.smoothScrollTo(n)}smoothScrollTo(t){const e=new n.defer,i=this.scrollLeft,r=this.now(),s=this.settings.duration,o=this.settings.easing;return this.snapping=!0,function n(){const a=this.now(),l=Math.min(1,(a-r)/s);if(o(l),this.touchCanceler||this.resizeCanceler)return this.resizeCanceler=!1,this.snapping=!1,void e.resolve();l<1?(window.requestAnimationFrame(n.bind(this)),this.scrollTo(i+(t-i)*l,0)):(this.scrollTo(t,0),this.snapping=!1,e.resolve())}.call(this),e.promise}scrollTo(t=0,e=0){this.fullsize?window.scroll(t,e):(this.scroller.scrollLeft=t,this.scroller.scrollTop=e)}now(){return"now"in window.performance?performance.now():(new Date).getTime()}destroy(){this.scroller&&(this.fullsize&&this.enableScroll(),this.removeListeners(),this.scroller=void 0)}}a()(c.prototype);var u=c,d=i(21),f=i.n(d);class p extends r.a{constructor(t){super(t),this.name="continuous",this.settings=Object(n.extend)(this.settings||{},{infinite:!0,overflow:void 0,axis:void 0,writingMode:void 0,flow:"scrolled",offset:500,offsetDelta:250,width:void 0,height:void 0,snap:!1,afterScrolledTimeout:10,allowScriptedContent:!1,allowPopups:!1}),Object(n.extend)(this.settings,t.settings||{}),"undefined"!=t.settings.gap&&0===t.settings.gap&&(this.settings.gap=t.settings.gap),this.viewSettings={ignoreClass:this.settings.ignoreClass,axis:this.settings.axis,flow:this.settings.flow,layout:this.layout,width:0,height:0,forceEvenPages:!1,allowScriptedContent:this.settings.allowScriptedContent,allowPopups:this.settings.allowPopups},this.scrollTop=0,this.scrollLeft=0}display(t,e){return r.a.prototype.display.call(this,t,e).then(function(){return this.fill()}.bind(this))}fill(t){var e=t||new n.defer;return this.q.enqueue(()=>this.check()).then(t=>{t?this.fill(e):e.resolve()}),e.promise}moveTo(t){var e=0,i=0;this.isPaginated?(e=Math.floor(t.left/this.layout.delta)*this.layout.delta,this.settings.offsetDelta):(i=t.top,t.top,this.settings.offsetDelta),(e>0||i>0)&&this.scrollBy(e,i,!0)}afterResized(t){this.emit(s.c.MANAGERS.RESIZE,t.section)}removeShownListeners(t){t.onDisplayed=function(){}}add(t){var e=this.createView(t);return this.views.append(e),e.on(s.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(s.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),e.onDisplayed=this.afterDisplayed.bind(this),e.onResize=this.afterResized.bind(this),e.display(this.request)}append(t){var e=this.createView(t);return e.on(s.c.VIEWS.RESIZED,t=>{e.expanded=!0}),e.on(s.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),this.views.append(e),e.onDisplayed=this.afterDisplayed.bind(this),e}prepend(t){var e=this.createView(t);return e.on(s.c.VIEWS.RESIZED,t=>{this.counter(t),e.expanded=!0}),e.on(s.c.VIEWS.AXIS,t=>{this.updateAxis(t)}),e.on(s.c.VIEWS.WRITING_MODE,t=>{this.updateWritingMode(t)}),this.views.prepend(e),e.onDisplayed=this.afterDisplayed.bind(this),e}counter(t){"vertical"===this.settings.axis?this.scrollBy(0,t.heightDelta,!0):this.scrollBy(t.widthDelta,0,!0)}update(t){for(var e,i=this.bounds(),r=this.views.all(),s=r.length,o=[],a=void 0!==t?t:this.settings.offset||0,l=new n.defer,h=[],c=0;c<s;c++)if(e=r[c],!0===this.isVisible(e,a,a,i)){if(e.displayed)e.show();else{let t=e.display(this.request).then((function(t){t.show()}),t=>{e.hide()});h.push(t)}o.push(e)}else this.q.enqueue(e.destroy.bind(e)),clearTimeout(this.trimTimeout),this.trimTimeout=setTimeout(function(){this.q.enqueue(this.trim.bind(this))}.bind(this),250);return h.length?Promise.all(h).catch(t=>{l.reject(t)}):(l.resolve(),l.promise)}check(t,e){var i=new n.defer,r=[],s="horizontal"===this.settings.axis,o=this.settings.offset||0;t&&s&&(o=t),e&&!s&&(o=e);var a=this._bounds;let l=s?this.scrollLeft:this.scrollTop,h=s?Math.floor(a.width):a.height,c=s?this.container.scrollWidth:this.container.scrollHeight,u=this.writingMode&&0===this.writingMode.indexOf("vertical")?"vertical":"horizontal",d=this.settings.rtlScrollType,f="rtl"===this.settings.direction;this.settings.fullsize?(s&&f&&"negative"===d||!s&&f&&"default"===d)&&(l*=-1):(f&&"default"===d&&"horizontal"===u&&(l=c-h-l),f&&"negative"===d&&"horizontal"===u&&(l*=-1));let p=()=>{let t=this.views.first(),e=t&&t.section.prev();e&&r.push(this.prepend(e))},g=l-o;l+h+o>=c&&(()=>{let t=this.views.last(),e=t&&t.section.next();e&&r.push(this.append(e))})(),g<0&&p();let m=r.map(t=>t.display(this.request));return r.length?Promise.all(m).then(()=>this.check()).then(()=>this.update(o),t=>t):(this.q.enqueue(function(){this.update()}.bind(this)),i.resolve(!1),i.promise)}trim(){for(var t=new n.defer,e=this.views.displayed(),i=e[0],r=e[e.length-1],s=this.views.indexOf(i),o=this.views.indexOf(r),a=this.views.slice(0,s),l=this.views.slice(o+1),h=0;h<a.length-1;h++)this.erase(a[h],a);for(var c=1;c<l.length;c++)this.erase(l[c]);return t.resolve(),t.promise}erase(t,e){var i,n;this.settings.fullsize?(i=window.scrollY,n=window.scrollX):(i=this.container.scrollTop,n=this.container.scrollLeft);var r=t.bounds();this.views.remove(t),e&&("vertical"===this.settings.axis?this.scrollTo(0,i-r.height,!0):"rtl"===this.settings.direction?this.settings.fullsize?this.scrollTo(n+Math.floor(r.width),0,!0):this.scrollTo(n,0,!0):this.scrollTo(n-Math.floor(r.width),0,!0))}addEventListeners(t){window.addEventListener("unload",function(t){this.ignore=!0,this.destroy()}.bind(this)),this.addScrollListeners(),this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}addScrollListeners(){var t;this.tick=n.requestAnimationFrame;let e="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.scrollDeltaVert=0,this.scrollDeltaHorz=0,this.settings.fullsize?(t=window,this.scrollTop=window.scrollY*e,this.scrollLeft=window.scrollX*e):(t=this.container,this.scrollTop=this.container.scrollTop,this.scrollLeft=this.container.scrollLeft),this._onScroll=this.onScroll.bind(this),t.addEventListener("scroll",this._onScroll),this._scrolled=f()(this.scrolled.bind(this),30),this.didScroll=!1}removeEventListeners(){(this.settings.fullsize?window:this.container).removeEventListener("scroll",this._onScroll),this._onScroll=void 0}onScroll(){let t,e,i="rtl"===this.settings.direction&&"default"===this.settings.rtlScrollType?-1:1;this.settings.fullsize?(t=window.scrollY*i,e=window.scrollX*i):(t=this.container.scrollTop,e=this.container.scrollLeft),this.scrollTop=t,this.scrollLeft=e,this.ignore?this.ignore=!1:this._scrolled(),this.scrollDeltaVert+=Math.abs(t-this.prevScrollTop),this.scrollDeltaHorz+=Math.abs(e-this.prevScrollLeft),this.prevScrollTop=t,this.prevScrollLeft=e,clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(function(){this.scrollDeltaVert=0,this.scrollDeltaHorz=0}.bind(this),150),clearTimeout(this.afterScrolled),this.didScroll=!1}scrolled(){this.q.enqueue(function(){return this.check()}.bind(this)),this.emit(s.c.MANAGERS.SCROLL,{top:this.scrollTop,left:this.scrollLeft}),clearTimeout(this.afterScrolled),this.afterScrolled=setTimeout(function(){this.snapper&&this.snapper.supportsTouch&&this.snapper.needsSnap()||this.emit(s.c.MANAGERS.SCROLLED,{top:this.scrollTop,left:this.scrollLeft})}.bind(this),this.settings.afterScrolledTimeout)}next(){let t="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(t,0,!0):this.scrollBy(0,this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}prev(){let t="pre-paginated"===this.layout.props.name&&this.layout.props.spread?2*this.layout.props.delta:this.layout.props.delta;this.views.length&&(this.isPaginated&&"horizontal"===this.settings.axis?this.scrollBy(-t,0,!0):this.scrollBy(0,-this.layout.height,!0),this.q.enqueue(function(){return this.check()}.bind(this)))}updateFlow(t){this.rendered&&this.snapper&&(this.snapper.destroy(),this.snapper=void 0),super.updateFlow(t,"scroll"),this.rendered&&this.isPaginated&&this.settings.snap&&(this.snapper=new u(this,this.settings.snap&&"object"==typeof this.settings.snap&&this.settings.snap))}destroy(){super.destroy(),this.snapper&&this.snapper.destroy()}}e.a=p},function(t,e,i){(function(e){t.exports=function t(e,i,n){function r(o,a){if(!i[o]){if(!e[o]){if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[o]={exports:{}};e[o][0].call(h.exports,(function(t){var i=e[o][1][t];return r(i||t)}),h,h.exports,t,e,i,n)}return i[o].exports}for(var s=!1,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,i,n){(function(t){"use strict";var e,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var s=0,o=new r(c),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),e=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var l=new t.MessageChannel;l.port1.onmessage=c,e=function(){l.port2.postMessage(0)}}var h=[];function c(){var t,e;n=!0;for(var i=h.length;i;){for(e=h,h=[],t=-1;++t<i;)e[t]();i=h.length}n=!1}i.exports=function(t){1!==h.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){"use strict";var n=t(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function h(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,i){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(t,e,i){n((function(){var n;try{n=e(i)}catch(e){return s.reject(t,e)}n===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var i=!1;function n(e){i||(i=!0,s.reject(t,e))}function r(e){i||(i=!0,s.resolve(t,e))}var o=p((function(){e(r,n)}));"error"===o.status&&n(o.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}e.exports=h,h.prototype.catch=function(t){return this.then(null,t)},h.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===o)return this;var i=new this.constructor(r);return this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new c(i,t,e)),i},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},s.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return s.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,o=t.queue.length;++r<o;)t.queue[r].callFulfilled(e)}return t},s.reject=function(t,e){t.state=o,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},h.resolve=function(t){return t instanceof this?t:s.resolve(new this(r),t)},h.reject=function(t){var e=new this(r);return s.reject(e,t)},h.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,l=-1,h=new this(r);++l<i;)c(t[l],l);return h;function c(t,r){e.resolve(t).then((function(t){o[r]=t,++a!==i||n||(n=!0,s.resolve(h,o))}),(function(t){n||(n=!0,s.reject(h,t))}))}},h.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);for(var o,a=-1,l=new this(r);++a<i;)o=t[a],e.resolve(o).then((function(t){n||(n=!0,s.resolve(l,t))}),(function(t){n||(n=!0,s.reject(l,t))}));return l}},{1:1}],3:[function(t,i,n){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function s(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)i.append(t[n]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var o=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function h(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function c(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(t){return"boolean"==typeof u?o.resolve(u):function(t){return new o((function(e){var i=t.transaction("local-forage-detect-blob-support","readwrite"),n=s([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);e(i||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return u=t}))}function g(t){var e=d[t.name],i={};i.promise=new o((function(t,e){i.resolve=t,i.reject=e})),e.deferredOperations.push(i),e.dbReady?e.dbReady=e.dbReady.then((function(){return i.promise})):e.dbReady=i.promise}function m(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var i=d[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function y(t,e){return new o((function(i,n){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return i(t.db);g(t),t.db.close()}var s=[t.name];e&&s.push(t.version);var o=r.open.apply(r,s);e&&(o.onupgradeneeded=function(e){var i=o.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),o.onerror=function(t){t.preventDefault(),n(o.error)},o.onsuccess=function(){var e=o.result;e.onversionchange=function(t){t.target.close()},i(e),m(t)}}))}function b(t){return y(t,!1)}function w(t){return y(t,!0)}function x(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,r=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||i){if(i){var s=t.db.version+1;s>t.version&&(t.version=s)}return!0}return!1}function _(t){return s([function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i),r=0;r<e;r++)n[r]=t.charCodeAt(r);return i}(atob(t.data))],{type:t.type})}function E(t){return t&&t.__local_forage_encoded_blob}function k(t){var e=this,i=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(i,t,t),i}function T(t,e,i,n){void 0===n&&(n=1);try{var r=t.db.transaction(t.storeName,e);i(null,r)}catch(r){if(n>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return o.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),w(t)})).then((function(){return function(t){g(t);for(var e=d[t.name],i=e.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,b(t).then((function(e){return t.db=e,x(t)?w(t):e})).then((function(n){t.db=e.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(e){throw v(t,e),e}))}(t).then((function(){T(t,e,i,n-1)}))})).catch(i);i(r)}}var S={_driver:"asyncStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]=t[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=k);var s=[];function a(){return o.resolve()}for(var l=0;l<r.forages.length;l++){var h=r.forages[l];h!==e&&s.push(h._initReady().catch(a))}var c=r.forages.slice(0);return o.all(s).then((function(){return i.db=r.db,b(i)})).then((function(t){return i.db=t,x(i,e._defaultConfig.version)?w(i):t})).then((function(t){i.db=r.db=t,e._dbInfo=i;for(var n=0;n<c.length;n++){var s=c[n];s!==e&&(s._dbInfo.db=i.db,s._dbInfo.version=i.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var i=o.result;if(i){var n=i.value;E(n)&&(n=_(n));var r=t(n,i.key,a++);void 0!==r?e(r):i.continue()}else e()},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).get(t);o.onsuccess=function(){var t=o.result;void 0===t&&(t=null),E(t)&&(t=_(t)),e(t)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=h(t);var r=new o((function(i,r){var s;n.ready().then((function(){return s=n._dbInfo,"[object Blob]"===f.call(e)?p(s.db).then((function(t){return t?e:(i=e,new o((function(t,e){var n=new FileReader;n.onerror=e,n.onloadend=function(e){var n=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):e})).then((function(e){T(n._dbInfo,"readwrite",(function(s,o){if(s)return r(s);try{var a=o.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);o.oncomplete=function(){void 0===e&&(e=null),i(e)},o.onabort=o.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,i),r},removeItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readwrite",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).delete(t);s.oncomplete=function(){e()},s.onerror=function(){n(o.error)},s.onabort=function(){var t=o.error?o.error:o.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=s.error?s.error:s.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).count();s.onsuccess=function(){t(s.result)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new o((function(e,n){t<0?e(null):i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var i=l.result;i?0===t||a?e(i.key):(a=!0,i.advance(t)):e(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var e=s.result;e?(o.push(e.key),e.continue()):t(o)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,s=this;if(t.name){var l=t.name===i.name&&s._dbInfo.db,h=l?o.resolve(s._dbInfo.db):b(t).then((function(e){var i=d[t.name],n=i.forages;i.db=e;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=e;return e}));n=t.storeName?h.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;g(t);var n=d[t.name],s=n.forages;e.close();for(var a=0;a<s.length;a++){var l=s[a];l._dbInfo.db=null,l._dbInfo.version=i}return new o((function(e,n){var s=r.open(t.name,i);s.onerror=function(t){s.result.close(),n(t)},s.onupgradeneeded=function(){s.result.deleteObjectStore(t.storeName)},s.onsuccess=function(){var t=s.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<s.length;e++){var i=s[e];i._dbInfo.db=t,m(i._dbInfo)}})).catch((function(e){throw(v(t,e)||o.resolve()).catch((function(){})),e}))}})):h.then((function(e){g(t);var i=d[t.name],n=i.forages;e.close();for(var s=0;s<n.length;s++)n[s]._dbInfo.db=null;return new o((function(e,i){var n=r.deleteDatabase(t.name);n.onerror=function(){var t=n.result;t&&t.close(),i(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<n.length;e++)m(n[e]._dbInfo)})).catch((function(e){throw(v(t,e)||o.resolve()).catch((function(){})),e}))}))}else n=o.reject("Invalid arguments");return a(n,e),n}},C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=/^~~local_forage_type~([^~]+)~/,O="__lfsc__:".length,I=O+"arbf".length,A=Object.prototype.toString;function R(t){var e,i,n,r,s,o=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var h=new ArrayBuffer(o),c=new Uint8Array(h);for(e=0;e<a;e+=4)i=C.indexOf(t[e]),n=C.indexOf(t[e+1]),r=C.indexOf(t[e+2]),s=C.indexOf(t[e+3]),c[l++]=i<<2|n>>4,c[l++]=(15&n)<<4|r>>2,c[l++]=(3&r)<<6|63&s;return h}function D(t){var e,i=new Uint8Array(t),n="";for(e=0;e<i.length;e+=3)n+=C[i[e]>>2],n+=C[(3&i[e])<<4|i[e+1]>>4],n+=C[(15&i[e+1])<<2|i[e+2]>>6],n+=C[63&i[e+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var j={serialize:function(t,e){var i="";if(t&&(i=A.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===A.call(t.buffer))){var n,r="__lfsc__:";t instanceof ArrayBuffer?(n=t,r+="arbf"):(n=t.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+D(n))}else if("[object Blob]"===i){var s=new FileReader;s.onload=function(){var i="~~local_forage_type~"+t.type+"~"+D(this.result);e("__lfsc__:blob"+i)},s.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(i){console.error("Couldn't convert value into a JSON string: ",t),e(null,i)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,O))return JSON.parse(t);var e,i=t.substring(I),n=t.substring(O,I);if("blob"===n&&N.test(i)){var r=i.match(N);e=r[1],i=i.substring(r[0].length)}var o=R(i);switch(n){case"arbf":return o;case"blob":return s([o],{type:e});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:D};function z(t,e,i,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function L(t,e,i,n,r,s){t.executeSql(i,n,r,(function(t,o){o.code===o.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?s(t,o):z(t,e,(function(){t.executeSql(i,n,r,s)}),s)}),s):s(t,o)}),s)}function P(t,e,i,n){var r=this;t=h(t);var s=new o((function(s,o){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,h){h?o(h):l.db.transaction((function(i){L(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){s(a)}),(function(t,e){o(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void s(P.apply(r,[t,a,i,n-1]));o(e)}}))}))})).catch(o)}));return a(s,i),s}function B(t){return new o((function(e,i){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],s=0;s<n.rows.length;s++)r.push(n.rows.item(s).name);e({db:t,storeNames:r})}),(function(t,e){i(e)}))}),(function(t){i(t)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]="string"!=typeof t[n]?t[n].toString():t[n];var r=new o((function(t,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(t){return n(t)}i.db.transaction((function(r){z(r,i,(function(){e._dbInfo=i,t()}),(function(t,e){n(e)}))}),n)}));return i.serializer=j,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var s=n.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),h=l.value;if(h&&(h=r.serializer.deserialize(h)),void 0!==(h=t(h,l.key,a+1)))return void e(h)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){return P.apply(this,[t,e,i,1])},removeItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,i){var n=i.rows.item(0).c;t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,i){var n=i.rows.length?i.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"SELECT key FROM "+n.storeName,[],(function(e,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,r=this;return a(n=t.name?new o((function(e){var n;n=t.name===i.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(B(n))})).then((function(t){return new o((function(e,i){t.db.transaction((function(n){function r(t){return new o((function(e,i){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){i(e)}))}))}for(var s=[],a=0,l=t.storeNames.length;a<l;a++)s.push(r(t.storeNames[a]));o.all(s).then((function(){e()})).catch((function(t){i(t)}))}),(function(t){i(t)}))}))})):o.reject("Invalid arguments"),e),n}};function F(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var i in t)e[i]=t[i];return e.keyPrefix=F(t,this._defaultConfig),q()?(this._dbInfo=e,e.serializer=j,o.resolve()):o.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=i.ready().then((function(){for(var e=i._dbInfo,n=e.keyPrefix,r=n.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var h=localStorage.getItem(l);if(h&&(h=e.serializer.deserialize(h)),void 0!==(h=t(h,l.substring(r),o++)))return h}}}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=i.ready().then((function(){var e=i._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=h(t);var r=n.ready().then((function(){void 0===e&&(e=null);var i=e;return new o((function(r,s){var o=n._dbInfo;o.serializer.serialize(e,(function(e,n){if(n)s(n);else try{localStorage.setItem(o.keyPrefix+t,e),r(i)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||s(t),s(t)}}))}))}));return a(r,i),r},removeItem:function(t,e){var i=this;t=h(t);var n=i.ready().then((function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(n,e),n},clear:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return a(i,t),i},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var i=this,n=i.ready().then((function(){var e,n=i._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return a(n,e),n},keys:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var s=localStorage.key(r);0===s.indexOf(t.keyPrefix)&&n.push(s.substring(t.keyPrefix.length))}return n}));return a(i,t),i},dropInstance:function(t,e){if(e=c.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i=this.config();t.name=t.name||i.name,t.storeName=t.storeName||i.storeName}var n,r=this;return a(n=t.name?new o((function(e){t.storeName?e(F(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var i=localStorage.key(e);0===i.indexOf(t)&&localStorage.removeItem(i)}})):o.reject("Invalid arguments"),e),n}},W=function(t,e){for(var i,n,r=t.length,s=0;s<r;){if((i=t[s])===(n=e)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;s++}return!1},$=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},H={},X={},Y={INDEXEDDB:S,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Q(t,e){t[e]=function(){var i=arguments;return t.ready().then((function(){return t[e].apply(t,i)}))}}function J(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&($(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}var tt=new(function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,H[r]||this.defineDriver(n)}this._defaultConfig=J({},K),this._config=J({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,i){var n=new o((function(e,i){try{var n=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(r);for(var s=G.concat("_initStorage"),l=0,h=s.length;l<h;l++){var c=s[l];if((!W(Z,c)||t[c])&&"function"!=typeof t[c])return void i(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),i=o.reject(e);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];t[r]||(t[r]=e(r))}}();var u=function(i){H[n]&&console.info("Redefining LocalForage driver: "+n),H[n]=t,X[n]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(u,i):u(!!t._support):u(!0)}catch(t){i(t)}}));return l(n,e,i),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,i){var n=H[t]?o.resolve(H[t]):o.reject(new Error("Driver not found."));return l(n,e,i),n},t.prototype.getSerializer=function(t){var e=o.resolve(j);return l(e,t),e},t.prototype.ready=function(t){var e=this,i=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(i,t,t),i},t.prototype.setDriver=function(t,e,i){var n=this;$(t)||(t=[t]);var r=this._getSupportedDrivers(t);function s(){n._config.driver=n.driver()}function a(t){return n._extend(t),s(),n._ready=n._initStorage(n._config),n._ready}var h=null!==this._driverSet?this._driverSet.catch((function(){return o.resolve()})):o.resolve();return this._driverSet=h.then((function(){var t=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,s(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(t){return function(){var e=0;return function i(){for(;e<t.length;){var r=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}s();var l=new Error("No available storage method found.");return n._driverSet=o.reject(l),n._driverSet}()}}(r)}))})).catch((function(){s();var t=new Error("No available storage method found.");return n._driverSet=o.reject(t),n._driverSet})),l(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){J(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=G.length;t<e;t++)Q(this,G[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)}).call(this,i(17))},function(t,e,i){"use strict";var n=i(3),r=i.n(n),s=i(0),o=i(5),a=i(4),l=i(2),h=i(6),c=i(8);var u=function(t,e,i,n){var r,o="undefined"!=typeof window&&window.URL,l=o?"blob":"arraybuffer",h=new s.defer,c=new XMLHttpRequest,u=XMLHttpRequest.prototype;for(r in"overrideMimeType"in u||Object.defineProperty(u,"overrideMimeType",{value:function(){}}),i&&(c.withCredentials=!0),c.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE){var t=!1;if(""!==this.responseType&&"document"!==this.responseType||(t=this.responseXML),200===this.status||0===this.status||t){var i;if(!this.response&&!t)return h.reject({status:this.status,message:"Empty Response",stack:(new Error).stack}),h.promise;if(403===this.status)return h.reject({status:this.status,response:this.response,message:"Forbidden",stack:(new Error).stack}),h.promise;i=t?this.responseXML:Object(s.isXml)(e)?Object(s.parse)(this.response,"text/xml"):"xhtml"==e?Object(s.parse)(this.response,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s.parse)(this.response,"text/html"):"json"==e?JSON.parse(this.response):"blob"==e?o?this.response:new Blob([this.response]):this.response,h.resolve(i)}else h.reject({status:this.status,message:this.response,stack:(new Error).stack})}},c.onerror=function(t){h.reject(t)},c.open("GET",t,!0),n)c.setRequestHeader(r,n[r]);return"json"==e&&c.setRequestHeader("Accept","application/json"),e||(e=new a.a(t).extension),"blob"==e&&(c.responseType=l),Object(s.isXml)(e)&&c.overrideMimeType("text/xml"),"binary"==e&&(c.responseType="arraybuffer"),c.send(),h.promise},d=i(15);var f=class{constructor(t,e){this.idref=t.idref,this.linear="yes"===t.linear,this.properties=t.properties,this.index=t.index,this.href=t.href,this.url=t.url,this.canonical=t.canonical,this.next=t.next,this.prev=t.prev,this.cfiBase=t.cfiBase,e?this.hooks=e:(this.hooks={},this.hooks.serialize=new h.a(this),this.hooks.content=new h.a(this)),this.document=void 0,this.contents=void 0,this.output=void 0}load(t){var e=t||this.request||u,i=new s.defer,n=i.promise;return this.contents?i.resolve(this.contents):e(this.url).then(function(t){return this.document=t,this.contents=t.documentElement,this.hooks.content.trigger(this.document,this)}.bind(this)).then(function(){i.resolve(this.contents)}.bind(this)).catch((function(t){i.reject(t)})),n}base(){return Object(c.a)(this.document,this)}render(t){var e=new s.defer,i=e.promise;return this.output,this.load(t).then(function(t){var e=("undefined"!=typeof navigator&&navigator.userAgent||"").indexOf("Trident")>=0,i=new("undefined"==typeof XMLSerializer||e?d.DOMParser:XMLSerializer);return this.output=i.serializeToString(t),this.output}.bind(this)).then(function(){return this.hooks.serialize.trigger(this.output,this)}.bind(this)).then(function(){e.resolve(this.output)}.bind(this)).catch((function(t){e.reject(t)})),i}find(t){var e=this,i=[],n=t.toLowerCase();return Object(s.sprint)(e.document,(function(t){!function(t){for(var r,s,o,a=t.textContent.toLowerCase(),l=e.document.createRange(),h=-1;-1!=s;)-1!=(s=a.indexOf(n,h+1))&&((l=e.document.createRange()).setStart(t,s),l.setEnd(t,s+n.length),r=e.cfiFromRange(l),o=t.textContent.length<150?t.textContent:"..."+(o=t.textContent.substring(s-75,s+75))+"...",i.push({cfi:r,excerpt:o})),h=s}(t)})),i}search(t,e=5){if(void 0===document.createTreeWalker)return this.find(t);let i=[];const n=this,r=t.toLowerCase(),s=function(t){const e=t.reduce((t,e)=>t+e.textContent,"").toLowerCase().indexOf(r);if(-1!=e){const s=0,o=e+r.length;let a=0,l=0;if(e<t[s].length){let r;for(;a<t.length-1&&(l+=t[a].length,!(o<=l));)a+=1;let h=t[s],c=t[a],u=n.document.createRange();u.setStart(h,e);let d=t.slice(0,a).reduce((t,e)=>t+e.textContent.length,0);u.setEnd(c,d>o?o:o-d),r=n.cfiFromRange(u);let f=t.slice(0,a+1).reduce((t,e)=>t+e.textContent,"");f.length>150&&(f=f.substring(e-75,e+75),f="..."+f+"..."),i.push({cfi:r,excerpt:f})}}},o=document.createTreeWalker(n.document,NodeFilter.SHOW_TEXT,null,!1);let a,l=[];for(;a=o.nextNode();)l.push(a),l.length==e&&(s(l.slice(0,e)),l=l.slice(1,e));return l.length>0&&s(l),i}reconcileLayoutSettings(t){var e={layout:t.layout,spread:t.spread,orientation:t.orientation};return this.properties.forEach((function(t){var i,n,r=t.replace("rendition:",""),s=r.indexOf("-");-1!=s&&(i=r.slice(0,s),n=r.slice(s+1),e[i]=n)})),e}cfiFromRange(t){return new l.a(t,this.cfiBase).toString()}cfiFromElement(t){return new l.a(t,this.cfiBase).toString()}unload(){this.document=void 0,this.contents=void 0,this.output=void 0}destroy(){this.unload(),this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.idref=void 0,this.linear=void 0,this.properties=void 0,this.index=void 0,this.href=void 0,this.url=void 0,this.next=void 0,this.prev=void 0,this.cfiBase=void 0}};var p=class{constructor(){this.spineItems=[],this.spineByHref={},this.spineById={},this.hooks={},this.hooks.serialize=new h.a,this.hooks.content=new h.a,this.hooks.content.register(c.a),this.hooks.content.register(c.b),this.hooks.content.register(c.d),this.epubcfi=new l.a,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}unpack(t,e,i){this.items=t.spine,this.manifest=t.manifest,this.spineNodeIndex=t.spineNodeIndex,this.baseUrl=t.baseUrl||t.basePath||"",this.length=this.items.length,this.items.forEach((t,n)=>{var r,s=this.manifest[t.idref];t.index=n,t.cfiBase=this.epubcfi.generateChapterComponent(this.spineNodeIndex,t.index,t.id),t.href&&(t.url=e(t.href,!0),t.canonical=i(t.href)),s&&(t.href=s.href,t.url=e(t.href,!0),t.canonical=i(t.href),s.properties.length&&t.properties.push.apply(t.properties,s.properties)),"yes"===t.linear?(t.prev=function(){let e=t.index;for(;e>0;){let t=this.get(e-1);if(t&&t.linear)return t;e-=1}}.bind(this),t.next=function(){let e=t.index;for(;e<this.spineItems.length-1;){let t=this.get(e+1);if(t&&t.linear)return t;e+=1}}.bind(this)):(t.prev=function(){},t.next=function(){}),r=new f(t,this.hooks),this.append(r)}),this.loaded=!0}get(t){var e=0;if(void 0===t)for(;e<this.spineItems.length;){let t=this.spineItems[e];if(t&&t.linear)break;e+=1}else if(this.epubcfi.isCfiString(t)){e=new l.a(t).spinePos}else"number"==typeof t||!1===isNaN(t)?e=t:"string"==typeof t&&0===t.indexOf("#")?e=this.spineById[t.substring(1)]:"string"==typeof t&&(t=t.split("#")[0],e=this.spineByHref[t]||this.spineByHref[encodeURI(t)]);return this.spineItems[e]||null}append(t){var e=this.spineItems.length;return t.index=e,this.spineItems.push(t),this.spineByHref[decodeURI(t.href)]=e,this.spineByHref[encodeURI(t.href)]=e,this.spineByHref[t.href]=e,this.spineById[t.idref]=e,e}prepend(t){return this.spineByHref[t.href]=0,this.spineById[t.idref]=0,this.spineItems.forEach((function(t,e){t.index=e})),0}remove(t){var e=this.spineItems.indexOf(t);if(e>-1)return delete this.spineByHref[t.href],delete this.spineById[t.idref],this.spineItems.splice(e,1)}each(){return this.spineItems.forEach.apply(this.spineItems,arguments)}first(){let t=0;do{let e=this.get(t);if(e&&e.linear)return e;t+=1}while(t<this.spineItems.length)}last(){let t=this.spineItems.length-1;do{let e=this.get(t);if(e&&e.linear)return e;t-=1}while(t>=0)}destroy(){this.each(t=>t.destroy()),this.spineItems=void 0,this.spineByHref=void 0,this.spineById=void 0,this.hooks.serialize.clear(),this.hooks.content.clear(),this.hooks=void 0,this.epubcfi=void 0,this.loaded=!1,this.items=void 0,this.manifest=void 0,this.spineNodeIndex=void 0,this.baseUrl=void 0,this.length=void 0}},g=i(9),m=i(1);class v{constructor(t,e,i){this.spine=t,this.request=e,this.pause=i||100,this.q=new g.a(this),this.epubcfi=new l.a,this._locations=[],this._locationsWords=[],this.total=0,this.break=150,this._current=0,this._wordCounter=0,this.currentLocation="",this._currentCfi="",this.processingTimeout=void 0}generate(t){return t&&(this.break=t),this.q.pause(),this.spine.each(function(t){t.linear&&this.q.enqueue(this.process.bind(this),t)}.bind(this)),this.q.run().then(function(){return this.total=this._locations.length-1,this._currentCfi&&(this.currentLocation=this._currentCfi),this._locations}.bind(this))}createRange(){return{startContainer:void 0,startOffset:void 0,endContainer:void 0,endOffset:void 0}}process(t){return t.load(this.request).then(function(e){var i=new s.defer,n=this.parse(e,t.cfiBase);return this._locations=this._locations.concat(n),t.unload(),this.processingTimeout=setTimeout(()=>i.resolve(n),this.pause),i.promise}.bind(this))}parse(t,e,i){var n,r,o=[],a=t.ownerDocument,h=Object(s.qs)(a,"body"),c=0,u=i||this.break;if(Object(s.sprint)(h,function(t){var i,s=t.length,a=0;if(0===t.textContent.trim().length)return!1;for(0==c&&((n=this.createRange()).startContainer=t,n.startOffset=0),(i=u-c)>s&&(c+=s,a=s);a<s;)if(i=u-c,0===c&&(a+=1,(n=this.createRange()).startContainer=t,n.startOffset=a),a+i>=s)c+=s-a,a=s;else{a+=i,n.endContainer=t,n.endOffset=a;let r=new l.a(n,e).toString();o.push(r),c=0}r=t}.bind(this)),n&&n.startContainer&&r){n.endContainer=r,n.endOffset=r.length;let t=new l.a(n,e).toString();o.push(t),c=0}return o}generateFromWords(t,e,i){var n=t?new l.a(t):void 0;return this.q.pause(),this._locationsWords=[],this._wordCounter=0,this.spine.each(function(t){t.linear&&(n?t.index>=n.spinePos&&this.q.enqueue(this.processWords.bind(this),t,e,n,i):this.q.enqueue(this.processWords.bind(this),t,e,n,i))}.bind(this)),this.q.run().then(function(){return this._currentCfi&&(this.currentLocation=this._currentCfi),this._locationsWords}.bind(this))}processWords(t,e,i,n){return n&&this._locationsWords.length>=n?Promise.resolve():t.load(this.request).then(function(r){var o=new s.defer,a=this.parseWords(r,t,e,i),l=n-this._locationsWords.length;return this._locationsWords=this._locationsWords.concat(a.length>=n?a.slice(0,l):a),t.unload(),this.processingTimeout=setTimeout(()=>o.resolve(a),this.pause),o.promise}.bind(this))}countWords(t){return(t=(t=(t=t.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).split(" ").length}parseWords(t,e,i,n){var r,o=e.cfiBase,a=[],h=t.ownerDocument,c=Object(s.qs)(h,"body"),u=i,d=!n||n.spinePos!==e.index;n&&e.index===n.spinePos&&(r=n.findNode(n.range?n.path.steps.concat(n.start.steps):n.path.steps,t.ownerDocument));return Object(s.sprint)(c,function(t){if(!d){if(t!==r)return!1;d=!0}if(t.textContent.length<10&&0===t.textContent.trim().length)return!1;var e,i=this.countWords(t.textContent),n=0;if(0===i)return!1;for((e=u-this._wordCounter)>i&&(this._wordCounter+=i,n=i);n<i;)if(n+(e=u-this._wordCounter)>=i)this._wordCounter+=i-n,n=i;else{n+=e;let i=new l.a(t,o);a.push({cfi:i.toString(),wordCount:this._wordCounter}),this._wordCounter=0}t}.bind(this)),a}locationFromCfi(t){let e;return l.a.prototype.isCfiString(t)&&(t=new l.a(t)),0===this._locations.length?-1:(e=Object(s.locationOf)(t,this._locations,this.epubcfi.compare),e>this.total?this.total:e)}percentageFromCfi(t){if(0===this._locations.length)return null;var e=this.locationFromCfi(t);return this.percentageFromLocation(e)}percentageFromLocation(t){return t&&this.total?t/this.total:0}cfiFromLocation(t){var e=-1;return"number"!=typeof t&&(t=parseInt(t)),t>=0&&t<this._locations.length&&(e=this._locations[t]),e}cfiFromPercentage(t){let e;if(t>1&&console.warn("Normalize cfiFromPercentage value to between 0 - 1"),t>=1){let t=new l.a(this._locations[this.total]);return t.collapse(),t.toString()}return e=Math.ceil(this.total*t),this.cfiFromLocation(e)}load(t){return this._locations="string"==typeof t?JSON.parse(t):t,this.total=this._locations.length-1,this._locations}save(){return JSON.stringify(this._locations)}getCurrent(){return this._current}setCurrent(t){var e;if("string"==typeof t)this._currentCfi=t;else{if("number"!=typeof t)return;this._current=t}0!==this._locations.length&&("string"==typeof t?(e=this.locationFromCfi(t),this._current=e):e=t,this.emit(m.c.LOCATIONS.CHANGED,{percentage:this.percentageFromLocation(e)}))}get currentLocation(){return this._current}set currentLocation(t){this.setCurrent(t)}length(){return this._locations.length}destroy(){this.spine=void 0,this.request=void 0,this.pause=void 0,this.q.stop(),this.q=void 0,this.epubcfi=void 0,this._locations=void 0,this.total=void 0,this.break=void 0,this._current=void 0,this.currentLocation=void 0,this._currentCfi=void 0,clearTimeout(this.processingTimeout)}}r()(v.prototype);var y=v,b=i(7),w=i.n(b);var x=class{constructor(t){this.packagePath="",this.directory="",this.encoding="",t&&this.parse(t)}parse(t){var e;if(!t)throw new Error("Container File Not Found");if(!(e=Object(s.qs)(t,"rootfile")))throw new Error("No RootFile Found");this.packagePath=e.getAttribute("full-path"),this.directory=w.a.dirname(this.packagePath),this.encoding=t.xmlEncoding}destroy(){this.packagePath=void 0,this.directory=void 0,this.encoding=void 0}};var _=class{constructor(t){this.manifest={},this.navPath="",this.ncxPath="",this.coverPath="",this.spineNodeIndex=0,this.spine=[],this.metadata={},t&&this.parse(t)}parse(t){var e,i,n;if(!t)throw new Error("Package File Not Found");if(!(e=Object(s.qs)(t,"metadata")))throw new Error("No Metadata Found");if(!(i=Object(s.qs)(t,"manifest")))throw new Error("No Manifest Found");if(!(n=Object(s.qs)(t,"spine")))throw new Error("No Spine Found");return this.manifest=this.parseManifest(i),this.navPath=this.findNavPath(i),this.ncxPath=this.findNcxPath(i,n),this.coverPath=this.findCoverPath(t),this.spineNodeIndex=Object(s.indexOfElementNode)(n),this.spine=this.parseSpine(n,this.manifest),this.uniqueIdentifier=this.findUniqueIdentifier(t),this.metadata=this.parseMetadata(e),this.metadata.direction=n.getAttribute("page-progression-direction"),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex}}parseMetadata(t){var e={};return e.title=this.getElementText(t,"title"),e.creator=this.getElementText(t,"creator"),e.description=this.getElementText(t,"description"),e.pubdate=this.getElementText(t,"date"),e.publisher=this.getElementText(t,"publisher"),e.identifier=this.getElementText(t,"identifier"),e.language=this.getElementText(t,"language"),e.rights=this.getElementText(t,"rights"),e.modified_date=this.getPropertyText(t,"dcterms:modified"),e.layout=this.getPropertyText(t,"rendition:layout"),e.orientation=this.getPropertyText(t,"rendition:orientation"),e.flow=this.getPropertyText(t,"rendition:flow"),e.viewport=this.getPropertyText(t,"rendition:viewport"),e.media_active_class=this.getPropertyText(t,"media:active-class"),e.spread=this.getPropertyText(t,"rendition:spread"),e}parseManifest(t){var e={},i=Object(s.qsa)(t,"item");return Array.prototype.slice.call(i).forEach((function(t){var i=t.getAttribute("id"),n=t.getAttribute("href")||"",r=t.getAttribute("media-type")||"",s=t.getAttribute("media-overlay")||"",o=t.getAttribute("properties")||"";e[i]={href:n,type:r,overlay:s,properties:o.length?o.split(" "):[]}})),e}parseSpine(t,e){var i=[],n=Object(s.qsa)(t,"itemref");return Array.prototype.slice.call(n).forEach((function(t,e){var n=t.getAttribute("idref"),r=t.getAttribute("properties")||"",s=r.length?r.split(" "):[],o={id:t.getAttribute("id"),idref:n,linear:t.getAttribute("linear")||"yes",properties:s,index:e};i.push(o)})),i}findUniqueIdentifier(t){var e=t.documentElement.getAttribute("unique-identifier");if(!e)return"";var i=t.getElementById(e);return i&&"identifier"===i.localName&&"http://purl.org/dc/elements/1.1/"===i.namespaceURI&&i.childNodes.length>0?i.childNodes[0].nodeValue.trim():""}findNavPath(t){var e=Object(s.qsp)(t,"item",{properties:"nav"});return!!e&&e.getAttribute("href")}findNcxPath(t,e){var i,n=Object(s.qsp)(t,"item",{"media-type":"application/x-dtbncx+xml"});return n||(i=e.getAttribute("toc"))&&(n=t.querySelector("#"+i)),!!n&&n.getAttribute("href")}findCoverPath(t){Object(s.qs)(t,"package").getAttribute("version");var e=Object(s.qsp)(t,"item",{properties:"cover-image"});if(e)return e.getAttribute("href");var i=Object(s.qsp)(t,"meta",{name:"cover"});if(i){var n=i.getAttribute("content"),r=t.getElementById(n);return r?r.getAttribute("href"):""}return!1}getElementText(t,e){var i,n=t.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",e);return n&&0!==n.length&&(i=n[0]).childNodes.length?i.childNodes[0].nodeValue:""}getPropertyText(t,e){var i=Object(s.qsp)(t,"meta",{property:e});return i&&i.childNodes.length?i.childNodes[0].nodeValue:""}load(t){this.metadata=t.metadata;let e=t.readingOrder||t.spine;return this.spine=e.map((t,e)=>(t.index=e,t.linear=t.linear||"yes",t)),t.resources.forEach((t,e)=>{this.manifest[e]=t,t.rel&&"cover"===t.rel[0]&&(this.coverPath=t.href)}),this.spineNodeIndex=0,this.toc=t.toc.map((t,e)=>(t.label=t.title,t)),{metadata:this.metadata,spine:this.spine,manifest:this.manifest,navPath:this.navPath,ncxPath:this.ncxPath,coverPath:this.coverPath,spineNodeIndex:this.spineNodeIndex,toc:this.toc}}destroy(){this.manifest=void 0,this.navPath=void 0,this.ncxPath=void 0,this.coverPath=void 0,this.spineNodeIndex=void 0,this.spine=void 0,this.metadata=void 0}};var E=class{constructor(t){this.toc=[],this.tocByHref={},this.tocById={},this.landmarks=[],this.landmarksByType={},this.length=0,t&&this.parse(t)}parse(t){let e,i,n=t.nodeType;n&&(e=Object(s.qs)(t,"html"),i=Object(s.qs)(t,"ncx")),n?e?(this.toc=this.parseNav(t),this.landmarks=this.parseLandmarks(t)):i&&(this.toc=this.parseNcx(t)):this.toc=this.load(t),this.length=0,this.unpack(this.toc)}unpack(t){for(var e,i=0;i<t.length;i++)(e=t[i]).href&&(this.tocByHref[e.href]=i),e.id&&(this.tocById[e.id]=i),this.length++,e.subitems.length&&this.unpack(e.subitems)}get(t){var e;return t?(0===t.indexOf("#")?e=this.tocById[t.substring(1)]:t in this.tocByHref&&(e=this.tocByHref[t]),this.getByIndex(t,e,this.toc)):this.toc}getByIndex(t,e,i){if(0===i.length)return;const n=i[e];if(!n||t!==n.id&&t!==n.href){let n;for(let r=0;r<i.length&&(n=this.getByIndex(t,e,i[r].subitems),!n);++r);return n}return n}landmark(t){var e;return t?(e=this.landmarksByType[t],this.landmarks[e]):this.landmarks}parseNav(t){var e=Object(s.querySelectorByType)(t,"nav","toc"),i=[];if(!e)return i;let n=Object(s.filterChildren)(e,"ol",!0);return n?i=this.parseNavList(n):i}parseNavList(t,e){const i=[];if(!t)return i;if(!t.children)return i;for(let n=0;n<t.children.length;n++){const r=this.navItem(t.children[n],e);r&&i.push(r)}return i}navItem(t,e){let i=t.getAttribute("id")||void 0,n=Object(s.filterChildren)(t,"a",!0)||Object(s.filterChildren)(t,"span",!0);if(!n)return;let r=n.getAttribute("href")||"";i||(i=r);let o=n.textContent||"",a=[],l=Object(s.filterChildren)(t,"ol",!0);return l&&(a=this.parseNavList(l,i)),{id:i,href:r,label:o,subitems:a,parent:e}}parseLandmarks(t){var e,i,n=Object(s.querySelectorByType)(t,"nav","landmarks"),r=n?Object(s.qsa)(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(e=0;e<o;++e)(i=this.landmarkItem(r[e]))&&(a.push(i),this.landmarksByType[i.type]=e);return a}landmarkItem(t){let e=Object(s.filterChildren)(t,"a",!0);if(!e)return;let i=e.getAttributeNS("http://www.idpf.org/2007/ops","type")||void 0;return{href:e.getAttribute("href")||"",label:e.textContent||"",type:i}}parseNcx(t){var e,i,n=Object(s.qsa)(t,"navPoint"),r=n.length,o={},a=[];if(!n||0===r)return a;for(e=0;e<r;++e)o[(i=this.ncxItem(n[e])).id]=i,i.parent?o[i.parent].subitems.push(i):a.push(i);return a}ncxItem(t){var e,i=t.getAttribute("id")||!1,n=Object(s.qs)(t,"content").getAttribute("src"),r=Object(s.qs)(t,"navLabel"),o=r.textContent?r.textContent:"",a=t.parentNode;return!a||"navPoint"!==a.nodeName&&"navPoint"!==a.nodeName.split(":").slice(-1)[0]||(e=a.getAttribute("id")),{id:i,href:n,label:o,subitems:[],parent:e}}load(t){return t.map(t=>(t.label=t.title,t.subitems=t.children?this.load(t.children):[],t))}forEach(t){return this.toc.forEach(t)}},k={application:{ecmascript:["es","ecma"],javascript:"js",ogg:"ogx",pdf:"pdf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],"rdf+xml":"rdf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","opf","ncx"],zip:"zip","x-httpd-eruby":"rhtml","x-latex":"latex","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-object":"o","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","epub+zip":"epub","font-tdpfr":"pfr","inkml+xml":["ink","inkml"],json:"json","jsonml+json":"jsonml","mathml+xml":"mathml","metalink+xml":"metalink",mp4:"mp4s","omdoc+xml":"omdoc",oxps:"oxps","vnd.amazon.ebook":"azw",widget:"wgt","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-mobipocket-ebook":["prc","mobi"],"x-mspublisher":"pub","x-nzb":"nzb","x-tgif":"obj","xaml+xml":"xaml","xml-dtd":"dtd","xproc+xml":"xpl","xslt+xml":"xslt","internet-property-stream":"acx","x-compress":"z","x-compressed":"tgz","x-gzip":"gz"},audio:{flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"x-aiff":["aif","aiff","aifc"],"x-ms-wma":"wma","x-wav":"wav",adpcm:"adp",mp4:"mp4a",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"x-icon":"ico",bmp:"bmp",webp:"webp","x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod"},text:{"cache-manifest":["manifest","appcache"],css:"css",csv:"csv",html:["html","htm","shtml","stm"],mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx","tab-separated-values":"tsv","x-bibtex":"bib"},video:{mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"}},T=function(){var t,e,i,n,r={};for(t in k)if(k.hasOwnProperty(t))for(e in k[t])if(k[t].hasOwnProperty(e))if("string"==typeof(i=k[t][e]))r[i]=t+"/"+e;else for(n=0;n<i.length;n++)r[i[n]]=t+"/"+e;return r}();var S={lookup:function(t){return t&&T[t.split(".").pop().toLowerCase()]||"text/plain"}};var C=class{constructor(t,e){this.settings={replacements:e&&e.replacements||"base64",archive:e&&e.archive,resolver:e&&e.resolver,request:e&&e.request},this.process(t)}process(t){this.manifest=t,this.resources=Object.keys(t).map((function(e){return t[e]})),this.replacementUrls=[],this.html=[],this.assets=[],this.css=[],this.urls=[],this.cssUrls=[],this.split(),this.splitUrls()}split(){this.html=this.resources.filter((function(t){if("application/xhtml+xml"===t.type||"text/html"===t.type)return!0})),this.assets=this.resources.filter((function(t){if("application/xhtml+xml"!==t.type&&"text/html"!==t.type)return!0})),this.css=this.resources.filter((function(t){if("text/css"===t.type)return!0}))}splitUrls(){this.urls=this.assets.map(function(t){return t.href}.bind(this)),this.cssUrls=this.css.map((function(t){return t.href}))}createUrl(t){var e=new o.a(t),i=S.lookup(e.filename);return this.settings.archive?this.settings.archive.createUrl(t,{base64:"base64"===this.settings.replacements}):"base64"===this.settings.replacements?this.settings.request(t,"blob").then(t=>Object(s.blob2base64)(t)).then(t=>Object(s.createBase64Url)(t,i)):this.settings.request(t,"blob").then(t=>Object(s.createBlobUrl)(t,i))}replacements(){if("none"===this.settings.replacements)return new Promise(function(t){t(this.urls)}.bind(this));var t=this.urls.map(t=>{var e=this.settings.resolver(t);return this.createUrl(e).catch(t=>(console.error(t),null))});return Promise.all(t).then(t=>(this.replacementUrls=t.filter(t=>"string"==typeof t),t))}replaceCss(t,e){var i=[];return t=t||this.settings.archive,e=e||this.settings.resolver,this.cssUrls.forEach(function(n){var r=this.createCssFile(n,t,e).then(function(t){var e=this.urls.indexOf(n);e>-1&&(this.replacementUrls[e]=t)}.bind(this));i.push(r)}.bind(this)),Promise.all(i)}createCssFile(t){if(w.a.isAbsolute(t))return new Promise((function(t){t()}));var e,i=this.settings.resolver(t);e=this.settings.archive?this.settings.archive.getText(i):this.settings.request(i,"text");var n=this.urls.map(t=>{var e=this.settings.resolver(t);return new a.a(i).relative(e)});return e?e.then(t=>(t=Object(c.e)(t,n,this.replacementUrls),"base64"===this.settings.replacements?Object(s.createBase64Url)(t,"text/css"):Object(s.createBlobUrl)(t,"text/css")),t=>new Promise((function(t){t()}))):new Promise((function(t){t()}))}relativeTo(t,e){return e=e||this.settings.resolver,this.urls.map(function(i){var n=e(i);return new a.a(t).relative(n)}.bind(this))}get(t){var e=this.urls.indexOf(t);if(-1!==e)return this.replacementUrls.length?new Promise(function(t,i){t(this.replacementUrls[e])}.bind(this)):this.createUrl(t)}substitute(t,e){var i;return i=e?this.relativeTo(e):this.urls,Object(c.e)(t,i,this.replacementUrls)}destroy(){this.settings=void 0,this.manifest=void 0,this.resources=void 0,this.replacementUrls=void 0,this.html=void 0,this.assets=void 0,this.css=void 0,this.urls=void 0,this.cssUrls=void 0}};var N=class{constructor(t){this.pages=[],this.locations=[],this.epubcfi=new l.a,this.firstPage=0,this.lastPage=0,this.totalPages=0,this.toc=void 0,this.ncx=void 0,t&&(this.pageList=this.parse(t)),this.pageList&&this.pageList.length&&this.process(this.pageList)}parse(t){var e=Object(s.qs)(t,"html"),i=Object(s.qs)(t,"ncx");return e?this.parseNav(t):i?this.parseNcx(t):void 0}parseNav(t){var e,i,n=Object(s.querySelectorByType)(t,"nav","page-list"),r=n?Object(s.qsa)(n,"li"):[],o=r.length,a=[];if(!r||0===o)return a;for(e=0;e<o;++e)i=this.item(r[e]),a.push(i);return a}parseNcx(t){var e,i,n,r,o=[],a=0;if(!(i=Object(s.qs)(t,"pageList")))return o;if(r=(n=Object(s.qsa)(i,"pageTarget")).length,!n||0===n.length)return o;for(a=0;a<r;++a)e=this.ncxItem(n[a]),o.push(e);return o}ncxItem(t){var e=Object(s.qs)(t,"navLabel"),i=Object(s.qs)(e,"text").textContent;return{href:Object(s.qs)(t,"content").getAttribute("src"),page:parseInt(i,10)}}item(t){var e,i,n=Object(s.qs)(t,"a"),r=n.getAttribute("href")||"",o=n.textContent||"",a=parseInt(o);return-1!=r.indexOf("epubcfi")?(i=(e=r.split("#"))[0],{cfi:e.length>1&&e[1],href:r,packageUrl:i,page:a}):{href:r,page:a}}process(t){t.forEach((function(t){this.pages.push(t.page),t.cfi&&this.locations.push(t.cfi)}),this),this.firstPage=parseInt(this.pages[0]),this.lastPage=parseInt(this.pages[this.pages.length-1]),this.totalPages=this.lastPage-this.firstPage}pageFromCfi(t){var e=-1;if(0===this.locations.length)return-1;var i=Object(s.indexOfSorted)(t,this.locations,this.epubcfi.compare);return-1!=i?e=this.pages[i]:void 0!==(e=(i=Object(s.locationOf)(t,this.locations,this.epubcfi.compare))-1>=0?this.pages[i-1]:this.pages[0])||(e=-1),e}cfiFromPage(t){var e=-1;"number"!=typeof t&&(t=parseInt(t));var i=this.pages.indexOf(t);return-1!=i&&(e=this.locations[i]),e}pageFromPercentage(t){return Math.round(this.totalPages*t)}percentageFromPage(t){var e=(t-this.firstPage)/this.totalPages;return Math.round(1e3*e)/1e3}percentageFromCfi(t){var e=this.pageFromCfi(t);return this.percentageFromPage(e)}destroy(){this.pages=void 0,this.locations=void 0,this.epubcfi=void 0,this.pageList=void 0,this.toc=void 0,this.ncx=void 0}},O=i(16),I=i(29),A=i.n(I);var R=class{constructor(){this.zip=void 0,this.urlCache={},this.checkRequirements()}checkRequirements(){try{this.zip=new A.a}catch(t){throw new Error("JSZip lib not loaded")}}open(t,e){return this.zip.loadAsync(t,{base64:e})}openUrl(t,e){return u(t,"binary").then(function(t){return this.zip.loadAsync(t,{base64:e})}.bind(this))}request(t,e){var i,n=new s.defer,r=new a.a(t);return e||(e=r.extension),(i="blob"==e?this.getBlob(t):this.getText(t))?i.then(function(t){let i=this.handleResponse(t,e);n.resolve(i)}.bind(this)):n.reject({message:"File not found in the epub: "+t,stack:(new Error).stack}),n.promise}handleResponse(t,e){return"json"==e?JSON.parse(t):Object(s.isXml)(e)?Object(s.parse)(t,"text/xml"):"xhtml"==e?Object(s.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s.parse)(t,"text/html"):t}getBlob(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||S.lookup(n.name),n.async("uint8array").then((function(t){return new Blob([t],{type:e})}))}getText(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return n.async("string").then((function(t){return t}))}getBase64(t,e){var i=window.decodeURIComponent(t.substr(1)),n=this.zip.file(i);if(n)return e=e||S.lookup(n.name),n.async("base64").then((function(t){return"data:"+e+";base64,"+t}))}createUrl(t,e){var i,n,r=new s.defer,o=window.URL||window.webkitURL||window.mozURL,a=e&&e.base64;return t in this.urlCache?(r.resolve(this.urlCache[t]),r.promise):(a?(n=this.getBase64(t))&&n.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=o.createObjectURL(e),this.urlCache[t]=i,r.resolve(i)}.bind(this)),n||r.reject({message:"File not found in the epub: "+t,stack:(new Error).stack}),r.promise)}revokeUrl(t){var e=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[t];i&&e.revokeObjectURL(i)}destroy(){var t=window.URL||window.webkitURL||window.mozURL;for(let e in this.urlCache)t.revokeObjectURL(e);this.zip=void 0,this.urlCache={}}},D=i(23),j=i.n(D);class z{constructor(t,e,i){this.urlCache={},this.storage=void 0,this.name=t,this.requester=e||u,this.resolver=i,this.online=!0,this.checkRequirements(),this.addListeners()}checkRequirements(){try{let t;void 0===j.a&&(t=j.a),this.storage=t.createInstance({name:this.name})}catch(t){throw new Error("localForage lib not loaded")}}addListeners(){this._status=this.status.bind(this),window.addEventListener("online",this._status),window.addEventListener("offline",this._status)}removeListeners(){window.removeEventListener("online",this._status),window.removeEventListener("offline",this._status),this._status=void 0}status(t){let e=navigator.onLine;this.online=e,e?this.emit("online",this):this.emit("offline",this)}add(t,e){let i=t.resources.map(t=>{let{href:i}=t,n=this.resolver(i),r=window.encodeURIComponent(n);return this.storage.getItem(r).then(t=>!t||e?this.requester(n,"binary").then(t=>this.storage.setItem(r,t)):t)});return Promise.all(i)}put(t,e,i){let n=window.encodeURIComponent(t);return this.storage.getItem(n).then(r=>r||this.requester(t,"binary",e,i).then(t=>this.storage.setItem(n,t)))}request(t,e,i,n){return this.online?this.requester(t,e,i,n).then(e=>(this.put(t),e)):this.retrieve(t,e)}retrieve(t,e){new s.defer;var i=new a.a(t);return e||(e=i.extension),("blob"==e?this.getBlob(t):this.getText(t)).then(i=>{var n,r=new s.defer;return i?(n=this.handleResponse(i,e),r.resolve(n)):r.reject({message:"File not found in storage: "+t,stack:(new Error).stack}),r.promise})}handleResponse(t,e){return"json"==e?JSON.parse(t):Object(s.isXml)(e)?Object(s.parse)(t,"text/xml"):"xhtml"==e?Object(s.parse)(t,"application/xhtml+xml"):"html"==e||"htm"==e?Object(s.parse)(t,"text/html"):t}getBlob(t,e){let i=window.encodeURIComponent(t);return this.storage.getItem(i).then((function(i){if(i)return e=e||S.lookup(t),new Blob([i],{type:e})}))}getText(t,e){let i=window.encodeURIComponent(t);return e=e||S.lookup(t),this.storage.getItem(i).then((function(t){var i,n=new s.defer,r=new FileReader;if(t)return i=new Blob([t],{type:e}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsText(i,e),n.promise}))}getBase64(t,e){let i=window.encodeURIComponent(t);return e=e||S.lookup(t),this.storage.getItem(i).then(t=>{var i,n=new s.defer,r=new FileReader;if(t)return i=new Blob([t],{type:e}),r.addEventListener("loadend",()=>{n.resolve(r.result)}),r.readAsDataURL(i,e),n.promise})}createUrl(t,e){var i,n,r=new s.defer,o=window.URL||window.webkitURL||window.mozURL,a=e&&e.base64;return t in this.urlCache?(r.resolve(this.urlCache[t]),r.promise):(a?(n=this.getBase64(t))&&n.then(function(e){this.urlCache[t]=e,r.resolve(e)}.bind(this)):(n=this.getBlob(t))&&n.then(function(e){i=o.createObjectURL(e),this.urlCache[t]=i,r.resolve(i)}.bind(this)),n||r.reject({message:"File not found in storage: "+t,stack:(new Error).stack}),r.promise)}revokeUrl(t){var e=window.URL||window.webkitURL||window.mozURL,i=this.urlCache[t];i&&e.revokeObjectURL(i)}destroy(){var t=window.URL||window.webkitURL||window.mozURL;for(let e in this.urlCache)t.revokeObjectURL(e);this.urlCache={},this.removeListeners()}}r()(z.prototype);var L=z;var P=class{constructor(t){this.interactive="",this.fixedLayout="",this.openToSpread="",this.orientationLock="",t&&this.parse(t)}parse(t){if(!t)return this;const e=Object(s.qs)(t,"display_options");if(!e)return this;return Object(s.qsa)(e,"option").forEach(t=>{let e="";switch(t.childNodes.length&&(e=t.childNodes[0].nodeValue),t.attributes.name.value){case"interactive":this.interactive=e;break;case"fixed-layout":this.fixedLayout=e;break;case"open-to-spread":this.openToSpread=e;break;case"orientation-lock":this.orientationLock=e}}),this}destroy(){this.interactive=void 0,this.fixedLayout=void 0,this.openToSpread=void 0,this.orientationLock=void 0}};const B="binary",M="base64",F="epub",q="opf",U="json",W="directory";class ${constructor(t,e){void 0===e&&"string"!=typeof t&&t instanceof Blob==!1&&t instanceof ArrayBuffer==!1&&(e=t,t=void 0),this.settings=Object(s.extend)(this.settings||{},{requestMethod:void 0,requestCredentials:void 0,requestHeaders:void 0,encoding:void 0,replacements:void 0,canonical:void 0,openAs:void 0,store:void 0}),Object(s.extend)(this.settings,e),this.opening=new s.defer,this.opened=this.opening.promise,this.isOpen=!1,this.loading={manifest:new s.defer,spine:new s.defer,metadata:new s.defer,cover:new s.defer,navigation:new s.defer,pageList:new s.defer,resources:new s.defer,displayOptions:new s.defer},this.loaded={manifest:this.loading.manifest.promise,spine:this.loading.spine.promise,metadata:this.loading.metadata.promise,cover:this.loading.cover.promise,navigation:this.loading.navigation.promise,pageList:this.loading.pageList.promise,resources:this.loading.resources.promise,displayOptions:this.loading.displayOptions.promise},this.ready=Promise.all([this.loaded.manifest,this.loaded.spine,this.loaded.metadata,this.loaded.cover,this.loaded.navigation,this.loaded.resources,this.loaded.displayOptions]),this.isRendered=!1,this.request=this.settings.requestMethod||u,this.spine=new p,this.locations=new y(this.spine,this.load.bind(this)),this.navigation=void 0,this.pageList=void 0,this.url=void 0,this.path=void 0,this.archived=!1,this.archive=void 0,this.storage=void 0,this.resources=void 0,this.rendition=void 0,this.container=void 0,this.packaging=void 0,this.displayOptions=void 0,this.settings.store&&this.store(this.settings.store),t&&this.open(t,this.settings.openAs).catch(e=>{var i=new Error("Cannot load book at "+t);this.emit(m.c.BOOK.OPEN_FAILED,i)})}open(t,e){var i,n=e||this.determineType(t);return n===B?(this.archived=!0,this.url=new o.a("/",""),i=this.openEpub(t)):n===M?(this.archived=!0,this.url=new o.a("/",""),i=this.openEpub(t,n)):n===F?(this.archived=!0,this.url=new o.a("/",""),i=this.request(t,"binary",this.settings.requestCredentials,this.settings.requestHeaders).then(this.openEpub.bind(this))):n==q?(this.url=new o.a(t),i=this.openPackaging(this.url.Path.toString())):n==U?(this.url=new o.a(t),i=this.openManifest(this.url.Path.toString())):(this.url=new o.a(t),i=this.openContainer("META-INF/container.xml").then(this.openPackaging.bind(this))),i}openEpub(t,e){return this.unarchive(t,e||this.settings.encoding).then(()=>this.openContainer("META-INF/container.xml")).then(t=>this.openPackaging(t))}openContainer(t){return this.load(t).then(t=>(this.container=new x(t),this.resolve(this.container.packagePath)))}openPackaging(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _(t),this.unpack(this.packaging)))}openManifest(t){return this.path=new a.a(t),this.load(t).then(t=>(this.packaging=new _,this.packaging.load(t),this.unpack(this.packaging)))}load(t){var e=this.resolve(t);return this.archived?this.archive.request(e):this.request(e,null,this.settings.requestCredentials,this.settings.requestHeaders)}resolve(t,e){if(t){var i=t;return t.indexOf("://")>-1?t:(this.path&&(i=this.path.resolve(t)),0!=e&&this.url&&(i=this.url.resolve(i)),i)}}canonical(t){return t?this.settings.canonical?this.settings.canonical(t):this.resolve(t,!0):""}determineType(t){var e;return"base64"===this.settings.encoding?M:"string"!=typeof t?B:((e=new o.a(t).path().extension)&&(e=e.replace(/\?.*$/,"")),e?"epub"===e?F:"opf"===e?q:"json"===e?U:void 0:W)}unpack(t){this.package=t,""===this.packaging.metadata.layout?this.load(this.url.resolve("META-INF/com.apple.ibooks.display-options.xml")).then(t=>{this.displayOptions=new P(t),this.loading.displayOptions.resolve(this.displayOptions)}).catch(t=>{this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)}):(this.displayOptions=new P,this.loading.displayOptions.resolve(this.displayOptions)),this.spine.unpack(this.packaging,this.resolve.bind(this),this.canonical.bind(this)),this.resources=new C(this.packaging.manifest,{archive:this.archive,resolver:this.resolve.bind(this),request:this.request.bind(this),replacements:this.settings.replacements||(this.archived?"blobUrl":"base64")}),this.loadNavigation(this.packaging).then(()=>{this.loading.navigation.resolve(this.navigation)}),this.packaging.coverPath&&(this.cover=this.resolve(this.packaging.coverPath)),this.loading.manifest.resolve(this.packaging.manifest),this.loading.metadata.resolve(this.packaging.metadata),this.loading.spine.resolve(this.spine),this.loading.cover.resolve(this.cover),this.loading.resources.resolve(this.resources),this.loading.pageList.resolve(this.pageList),this.isOpen=!0,this.archived||this.settings.replacements&&"none"!=this.settings.replacements?this.replacements().then(()=>{this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}).catch(t=>{console.error(t)}):this.loaded.displayOptions.then(()=>{this.opening.resolve(this)})}loadNavigation(t){let e=t.navPath||t.ncxPath,i=t.toc;return i?new Promise((e,n)=>{this.navigation=new E(i),t.pageList&&(this.pageList=new N(t.pageList)),e(this.navigation)}):e?this.load(e,"xml").then(t=>(this.navigation=new E(t),this.pageList=new N(t),this.navigation)):new Promise((t,e)=>{this.navigation=new E,this.pageList=new N,t(this.navigation)})}section(t){return this.spine.get(t)}renderTo(t,e){return this.rendition=new O.a(this,e),this.rendition.attachTo(t),this.rendition}setRequestCredentials(t){this.settings.requestCredentials=t}setRequestHeaders(t){this.settings.requestHeaders=t}unarchive(t,e){return this.archive=new R,this.archive.open(t,e)}store(t){let e=this.settings.replacements&&"none"!==this.settings.replacements,i=this.url,n=this.settings.requestMethod||u.bind(this);return this.storage=new L(t,n,this.resolve.bind(this)),this.request=this.storage.request.bind(this.storage),this.opened.then(()=>{this.archived&&(this.storage.requester=this.archive.request.bind(this.archive));let t=(t,e)=>{e.output=this.resources.substitute(t,e.url)};this.resources.settings.replacements=e||"blobUrl",this.resources.replacements().then(()=>this.resources.replaceCss()),this.storage.on("offline",()=>{this.url=new o.a("/",""),this.spine.hooks.serialize.register(t)}),this.storage.on("online",()=>{this.url=i,this.spine.hooks.serialize.deregister(t)})}),this.storage}coverUrl(){return this.loaded.cover.then(()=>this.cover?this.archived?this.archive.createUrl(this.cover):this.cover:null)}replacements(){return this.spine.hooks.serialize.register((t,e)=>{e.output=this.resources.substitute(t,e.url)}),this.resources.replacements().then(()=>this.resources.replaceCss())}getRange(t){var e=new l.a(t),i=this.spine.get(e.spinePos),n=this.load.bind(this);return i?i.load(n).then((function(t){return e.toRange(i.document)})):new Promise((t,e)=>{e("CFI could not be found")})}key(t){var e=t||this.packaging.metadata.identifier||this.url.filename;return`epubjs:${m.b}:${e}`}destroy(){this.opened=void 0,this.loading=void 0,this.loaded=void 0,this.ready=void 0,this.isOpen=!1,this.isRendered=!1,this.spine&&this.spine.destroy(),this.locations&&this.locations.destroy(),this.pageList&&this.pageList.destroy(),this.archive&&this.archive.destroy(),this.resources&&this.resources.destroy(),this.container&&this.container.destroy(),this.packaging&&this.packaging.destroy(),this.rendition&&this.rendition.destroy(),this.displayOptions&&this.displayOptions.destroy(),this.spine=void 0,this.locations=void 0,this.pageList=void 0,this.archive=void 0,this.resources=void 0,this.container=void 0,this.packaging=void 0,this.rendition=void 0,this.navigation=void 0,this.url=void 0,this.path=void 0,this.archived=!1}}r()($.prototype);e.a=$},function(t,e,i){var n=i(14).NAMESPACE;function r(t){return""!==t}function s(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function o(t){if(!t)return[];var e=function(t){return t?t.split(/[\t\n\f\r ]+/).filter(r):[]}(t);return Object.keys(e.reduce(s,{}))}function a(t,e){for(var i in t)e[i]=t[i]}function l(t,e){var i=t.prototype;if(!(i instanceof e)){function n(){}n.prototype=e.prototype,a(i,n=new n),t.prototype=i=n}i.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),i.constructor=t)}var h={},c=h.ELEMENT_NODE=1,u=h.ATTRIBUTE_NODE=2,d=h.TEXT_NODE=3,f=h.CDATA_SECTION_NODE=4,p=h.ENTITY_REFERENCE_NODE=5,g=h.ENTITY_NODE=6,m=h.PROCESSING_INSTRUCTION_NODE=7,v=h.COMMENT_NODE=8,y=h.DOCUMENT_NODE=9,b=h.DOCUMENT_TYPE_NODE=10,w=h.DOCUMENT_FRAGMENT_NODE=11,x=h.NOTATION_NODE=12,_={},E={},k=(_.INDEX_SIZE_ERR=(E[1]="Index size error",1),_.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),_.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),T=(_.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),_.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),_.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),_.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),_.NOT_FOUND_ERR=(E[8]="Not found",8)),S=(_.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),_.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));_.INVALID_STATE_ERR=(E[11]="Invalid state",11),_.SYNTAX_ERR=(E[12]="Syntax error",12),_.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),_.NAMESPACE_ERR=(E[14]="Invalid namespace",14),_.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function C(t,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,E[t]),this.message=E[t],Error.captureStackTrace&&Error.captureStackTrace(this,C);return i.code=t,e&&(this.message=this.message+": "+e),i}function N(){}function O(t,e){this._node=t,this._refresh=e,I(this)}function I(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var i=t._refresh(t._node);at(t,"length",i.length),a(i,t),t._inc=e}}function A(){}function R(t,e){for(var i=t.length;i--;)if(t[i]===e)return i}function D(t,e,i,r){if(r?e[R(e,r)]=i:e[e.length++]=i,t){i.ownerElement=t;var s=t.ownerDocument;s&&(r&&F(s,t,r),function(t,e,i){t&&t._inc++,i.namespaceURI===n.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}(s,t,i))}}function j(t,e,i){var n=R(e,i);if(!(n>=0))throw C(T,new Error(t.tagName+"@"+i));for(var r=e.length-1;n<r;)e[n]=e[++n];if(e.length=r,t){var s=t.ownerDocument;s&&(F(s,t,i),i.ownerElement=null)}}function z(){}function L(){}function P(t){return("<"==t?"<":">"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function B(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(B(t,e))return!0}while(t=t.nextSibling)}function M(){}function F(t,e,i,r){t&&t._inc++,i.namespaceURI===n.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function q(t,e,i){if(t&&t._inc){t._inc++;var n=e.childNodes;if(i)n[n.length++]=i;else{for(var r=e.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s}}}function U(t,e){var i=e.previousSibling,n=e.nextSibling;return i?i.nextSibling=n:t.firstChild=n,n?n.previousSibling=i:t.lastChild=i,q(t.ownerDocument,t),e}function W(t,e,i){var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===w){var r=e.firstChild;if(null==r)return e;var s=e.lastChild}else r=s=e;var o=i?i.previousSibling:t.lastChild;r.previousSibling=o,s.nextSibling=i,o?o.nextSibling=r:t.firstChild=r,null==i?t.lastChild=s:i.previousSibling=s;do{r.parentNode=t}while(r!==s&&(r=r.nextSibling));return q(t.ownerDocument||t,t),e.nodeType==w&&(e.firstChild=e.lastChild=null),e}function $(){this._nsMap={}}function H(){}function X(){}function Y(){}function V(){}function Z(){}function G(){}function K(){}function Q(){}function J(){}function tt(){}function et(){}function it(){}function nt(t,e){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var o=[{namespace:s,prefix:null}];return ot(this,i,t,e,o),i.join("")}function rt(t,e,i){var r=t.prefix||"",s=t.namespaceURI;if(!s)return!1;if("xml"===r&&s===n.XML||s===n.XMLNS)return!1;for(var o=i.length;o--;){var a=i[o];if(a.prefix===r)return a.namespace!==s}return!0}function st(t,e,i){t.push(" ",e,'="',i.replace(/[<&"]/g,P),'"')}function ot(t,e,i,r,s){if(s||(s=[]),r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case c:var o=t.attributes,a=o.length,l=t.firstChild,h=t.tagName,g=h;if(!(i=n.isHTML(t.namespaceURI)||i)&&!t.prefix&&t.namespaceURI){for(var x,_=0;_<o.length;_++)if("xmlns"===o.item(_).name){x=o.item(_).value;break}if(!x)for(var E=s.length-1;E>=0;E--){if(""===(k=s[E]).prefix&&k.namespace===t.namespaceURI){x=k.namespace;break}}if(x!==t.namespaceURI)for(E=s.length-1;E>=0;E--){var k;if((k=s[E]).namespace===t.namespaceURI){k.prefix&&(g=k.prefix+":"+h);break}}}e.push("<",g);for(var T=0;T<a;T++){"xmlns"==(S=o.item(T)).prefix?s.push({prefix:S.localName,namespace:S.value}):"xmlns"==S.nodeName&&s.push({prefix:"",namespace:S.value})}for(T=0;T<a;T++){var S,C,N;if(rt(S=o.item(T),0,s))st(e,(C=S.prefix||"")?"xmlns:"+C:"xmlns",N=S.namespaceURI),s.push({prefix:C,namespace:N});ot(S,e,i,r,s)}if(h===g&&rt(t,0,s))st(e,(C=t.prefix||"")?"xmlns:"+C:"xmlns",N=t.namespaceURI),s.push({prefix:C,namespace:N});if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(h)){if(e.push(">"),i&&/^script$/i.test(h))for(;l;)l.data?e.push(l.data):ot(l,e,i,r,s.slice()),l=l.nextSibling;else for(;l;)ot(l,e,i,r,s.slice()),l=l.nextSibling;e.push("</",g,">")}else e.push("/>");return;case y:case w:for(l=t.firstChild;l;)ot(l,e,i,r,s.slice()),l=l.nextSibling;return;case u:return st(e,t.name,t.value);case d:return e.push(t.data.replace(/[<&]/g,P).replace(/]]>/g,"]]>"));case f:return e.push("<![CDATA[",t.data,"]]>");case v:return e.push("\x3c!--",t.data,"--\x3e");case b:var O=t.publicId,I=t.systemId;if(e.push("<!DOCTYPE ",t.name),O)e.push(" PUBLIC ",O),I&&"."!=I&&e.push(" ",I),e.push(">");else if(I&&"."!=I)e.push(" SYSTEM ",I,">");else{var A=t.internalSubset;A&&e.push(" [",A,"]"),e.push(">")}return;case m:return e.push("<?",t.target," ",t.data,"?>");case p:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function at(t,e,i){t[e]=i}C.prototype=Error.prototype,a(_,C),N.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var i=[],n=0;n<this.length;n++)ot(this[n],i,t,e);return i.join("")}},O.prototype.item=function(t){return I(this),this[t]},l(O,N),A.prototype={length:0,item:N.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==t)return i}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new C(S);var i=this.getNamedItem(t.nodeName);return D(this._ownerElement,this,t,i),i},setNamedItemNS:function(t){var e,i=t.ownerElement;if(i&&i!=this._ownerElement)throw new C(S);return e=this.getNamedItemNS(t.namespaceURI,t.localName),D(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return j(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);return j(this._ownerElement,this,i),i},getNamedItemNS:function(t,e){for(var i=this.length;i--;){var n=this[i];if(n.localName==e&&n.namespaceURI==t)return n}return null}},z.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,i){var n=new M;if(n.implementation=this,n.childNodes=new N,n.doctype=i||null,i&&n.appendChild(i),e){var r=n.createElementNS(t,e);n.appendChild(r)}return n},createDocumentType:function(t,e,i){var n=new G;return n.name=t,n.nodeName=t,n.publicId=e||"",n.systemId=i||"",n}},L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return W(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return U(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,i,n){var r=new i.constructor;for(var s in i){var o=i[s];"object"!=typeof o&&o!=r[s]&&(r[s]=o)}i.childNodes&&(r.childNodes=new N);switch(r.ownerDocument=e,r.nodeType){case c:var a=i.attributes,l=r.attributes=new A,h=a.length;l._ownerElement=r;for(var d=0;d<h;d++)r.setAttributeNode(t(e,a.item(d),!0));break;case u:n=!0}if(n)for(var f=i.firstChild;f;)r.appendChild(t(e,f,n)),f=f.nextSibling;return r}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==d&&t.nodeType==d?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var i=e._nsMap;if(i)for(var n in i)if(i[n]==t)return n;e=e.nodeType==u?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var i=e._nsMap;if(i&&t in i)return i[t];e=e.nodeType==u?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},a(h,L),a(h,L.prototype),M.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==w){for(var i=t.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,e),i=n}return t}return null==this.documentElement&&t.nodeType==c&&(this.documentElement=t),W(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),U(this,t)},importNode:function(t,e){return function t(e,i,n){var r;switch(i.nodeType){case c:(r=i.cloneNode(!1)).ownerDocument=e;case w:break;case u:n=!0}r||(r=i.cloneNode(!1));if(r.ownerDocument=e,r.parentNode=null,n)for(var s=i.firstChild;s;)r.appendChild(t(e,s,n)),s=s.nextSibling;return r}(this,t,e)},getElementById:function(t){var e=null;return B(this.documentElement,(function(i){if(i.nodeType==c&&i.getAttribute("id")==t)return e=i,!0})),e},getElementsByClassName:function(t){var e=o(t);return new O(this,(function(i){var n=[];return e.length>0&&B(i.documentElement,(function(r){if(r!==i&&r.nodeType===c){var s=r.getAttribute("class");if(s){var a=t===s;if(!a){var l=o(s);a=e.every((h=l,function(t){return h&&-1!==h.indexOf(t)}))}a&&n.push(r)}}var h})),n}))},createElement:function(t){var e=new $;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new N,(e.attributes=new A)._ownerElement=e,e},createDocumentFragment:function(){var t=new tt;return t.ownerDocument=this,t.childNodes=new N,t},createTextNode:function(t){var e=new Y;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new V;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new Z;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var i=new et;return i.ownerDocument=this,i.tagName=i.target=t,i.nodeValue=i.data=e,i},createAttribute:function(t){var e=new H;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new J;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var i=new $,n=e.split(":"),r=i.attributes=new A;return i.childNodes=new N,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=t,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,r._ownerElement=i,i},createAttributeNS:function(t,e){var i=new H,n=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=t,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,i}},l(M,L),$.prototype={nodeType:c,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var i=this.ownerDocument.createAttribute(t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===w?this.insertBefore(t,null):function(t,e){var i=e.parentNode;if(i){var n=t.lastChild;i.removeChild(e);n=t.lastChild}return n=t.lastChild,e.parentNode=t,e.previousSibling=n,e.nextSibling=null,n?n.nextSibling=e:t.firstChild=e,t.lastChild=e,q(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i&&i.value||""},setAttributeNS:function(t,e,i){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new O(this,(function(e){var i=[];return B(e,(function(n){n===e||n.nodeType!=c||"*"!==t&&n.tagName!=t||i.push(n)})),i}))},getElementsByTagNameNS:function(t,e){return new O(this,(function(i){var n=[];return B(i,(function(r){r===i||r.nodeType!==c||"*"!==t&&r.namespaceURI!==t||"*"!==e&&r.localName!=e||n.push(r)})),n}))}},M.prototype.getElementsByTagName=$.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=$.prototype.getElementsByTagNameNS,l($,L),H.prototype.nodeType=u,l(H,L),X.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(E[k])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,i){i=this.data.substring(0,t)+i+this.data.substring(t+e),this.nodeValue=this.data=i,this.length=i.length}},l(X,L),Y.prototype={nodeName:"#text",nodeType:d,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(Y,X),V.prototype={nodeName:"#comment",nodeType:v},l(V,X),Z.prototype={nodeName:"#cdata-section",nodeType:f},l(Z,X),G.prototype.nodeType=b,l(G,L),K.prototype.nodeType=x,l(K,L),Q.prototype.nodeType=g,l(Q,L),J.prototype.nodeType=p,l(J,L),tt.prototype.nodeName="#document-fragment",tt.prototype.nodeType=w,l(tt,L),et.prototype.nodeType=m,l(et,L),it.prototype.serializeToString=function(t,e,i){return nt.call(t,e,i)},L.prototype.toString=nt;try{if(Object.defineProperty){Object.defineProperty(O.prototype,"length",{get:function(){return I(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case c:case w:var i=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&i.push(t(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case c:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),at=function(t,e,i){t["$$"+e]=i}}}catch(t){}e.DocumentType=G,e.DOMException=C,e.DOMImplementation=z,e.Element=$,e.Node=L,e.NodeList=N,e.XMLSerializer=it},function(t,e,i){var n=i(52),r="object"==typeof self&&self&&self.Object===Object&&self,s=n||r||Function("return this")();t.exports=s},function(t,e,i){var n=i(26).Symbol;t.exports=n},function(t,e,i){var n=i(21),r=i(19);t.exports=function(t,e,i){var s=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return r(i)&&(s="leading"in i?!!i.leading:s,o="trailing"in i?!!i.trailing:o),n(t,e,{leading:s,maxWait:e,trailing:o})}},function(e,i){e.exports=t},function(t,e,i){"use strict";i.r(e),function(t){var n=i(24),r=i(16),s=i(2),o=i(12),a=i(0),l=i(1);i(20),i(10),i(22);function h(t,e){return new n.a(t,e)}h.VERSION=l.b,void 0!==t&&(t.EPUBJS_VERSION=l.b),h.Book=n.a,h.Rendition=r.a,h.Contents=o.a,h.CFI=s.a,h.utils=a,e.default=h}.call(this,i(17))},function(t,e,i){"use strict";var n=i(32),r=i(40),s=i(41),o=i(42);(t.exports=function(t,e){var i,s,a,l,h;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=a=!0,s=!1):(i=o.call(t,"c"),s=o.call(t,"e"),a=o.call(t,"w")),h={value:e,configurable:i,enumerable:s,writable:a},l?n(r(l),h):h}).gs=function(t,e,i){var a,l,h,c;return"string"!=typeof t?(h=i,i=e,e=t,t=null):h=arguments[3],null==e?e=void 0:s(e)?null==i?i=void 0:s(i)||(h=i,i=void 0):(h=e,e=i=void 0),null==t?(a=!0,l=!1):(a=o.call(t,"c"),l=o.call(t,"e")),c={get:e,set:i,configurable:a,enumerable:l},h?n(r(h),c):c}},function(t,e,i){"use strict";t.exports=i(33)()?Object.assign:i(34)},function(t,e,i){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,i){"use strict";var n=i(35),r=i(39),s=Math.max;t.exports=function(t,e){var i,o,a,l=s(arguments.length,2);for(t=Object(r(t)),a=function(n){try{t[n]=e[n]}catch(t){i||(i=t)}},o=1;o<l;++o)n(e=arguments[o]).forEach(a);if(void 0!==i)throw i;return t}},function(t,e,i){"use strict";t.exports=i(36)()?Object.keys:i(37)},function(t,e,i){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,i){"use strict";var n=i(18),r=Object.keys;t.exports=function(t){return r(n(t)?Object(t):t)}},function(t,e,i){"use strict";t.exports=function(){}},function(t,e,i){"use strict";var n=i(18);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,i){"use strict";var n=i(18),r=Array.prototype.forEach,s=Object.create,o=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=s(null);return r.call(arguments,(function(t){n(t)&&o(Object(t),e)})),e}},function(t,e,i){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,i){"use strict";t.exports=i(43)()?String.prototype.contains:i(44)},function(t,e,i){"use strict";var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(t,e,i){"use strict";var n=String.prototype.indexOf;t.exports=function(t){return n.call(this,t,arguments[1])>-1}},function(t,e,i){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,i){var n=i(14),r=i(25),s=i(47),o=i(48),a=r.DOMImplementation,l=n.NAMESPACE,h=o.ParseError,c=o.XMLReader;function u(t){this.options=t||{locator:{}}}function d(){this.cdata=!1}function f(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function p(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function g(t,e,i){return"string"==typeof t?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t}function m(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}u.prototype.parseFromString=function(t,e){var i=this.options,n=new c,r=i.domBuilder||new d,o=i.errorHandler,a=i.locator,h=i.xmlns||{},u=/\/x?html?$/.test(e),f=u?s.HTML_ENTITIES:s.XML_ENTITIES;return a&&r.setDocumentLocator(a),n.errorHandler=function(t,e,i){if(!t){if(e instanceof d)return e;t=e}var n={},r=t instanceof Function;function s(e){var s=t[e];!s&&r&&(s=2==t.length?function(i){t(e,i)}:t),n[e]=s&&function(t){s("[xmldom "+e+"]\t"+t+p(i))}||function(){}}return i=i||{},s("warning"),s("error"),s("fatalError"),n}(o,r,a),n.domBuilder=i.domBuilder||r,u&&(h[""]=l.HTML),h.xml=h.xml||l.XML,t&&"string"==typeof t?n.parse(t,h,f):n.errorHandler.error("invalid doc source"),r.doc},d.prototype={startDocument:function(){this.doc=(new a).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,i,n){var r=this.doc,s=r.createElementNS(t,i||e),o=n.length;m(this,s),this.currentElement=s,this.locator&&f(this.locator,s);for(var a=0;a<o;a++){t=n.getURI(a);var l=n.getValue(a),h=(i=n.getQName(a),r.createAttributeNS(t,i));this.locator&&f(n.getLocator(a),h),h.value=h.nodeValue=l,s.setAttributeNode(h)}},endElement:function(t,e,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&f(this.locator,i),m(this,i)},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&f(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,i){t=g.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&f(this.locator,n),m(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(t,e,i);this.locator&&f(this.locator,r),m(this,r),this.doc.doctype=r}},warning:function(t){console.warn("[xmldom warning]\t"+t,p(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,p(this.locator))},fatalError:function(t){throw new h(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){d.prototype[t]=function(){return null}})),e.__DOMHandler=d,e.DOMParser=u,e.DOMImplementation=r.DOMImplementation,e.XMLSerializer=r.XMLSerializer},function(t,e,i){var n=i(14).freeze;e.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=n({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES},function(t,e,i){var n=i(14).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function a(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function l(){}function h(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function c(t,e,i,r,s,o){function a(t,e,n){i.attributeNames.hasOwnProperty(t)&&o.fatalError("Attribute "+t+" redefined"),i.addValue(t,e,n)}for(var l,h=++e,c=0;;){var u=t.charAt(h);switch(u){case"=":if(1===c)l=t.slice(e,h),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),l=t.slice(e,h)),e=h+1,!((h=t.indexOf(u,e))>0))throw new Error("attribute value no end '"+u+"' match");a(l,d=t.slice(e,h).replace(/&#?\w+;/g,s),e-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');a(l,d=t.slice(e,h).replace(/&#?\w+;/g,s),e),o.warning('attribute "'+l+'" missed start quot('+u+")!!"),e=h+1,c=5}break;case"/":switch(c){case 0:i.setTagName(t.slice(e,h));case 5:case 6:case 7:c=7,i.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&i.setTagName(t.slice(e,h)),h;case">":switch(c){case 0:i.setTagName(t.slice(e,h));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=t.slice(e,h)).slice(-1)&&(i.closed=!0,d=d.slice(0,-1));case 2:2===c&&(d=l),4==c?(o.warning('attribute "'+d+'" missed quot(")!'),a(l,d.replace(/&#?\w+;/g,s),e)):(n.isHTML(r[""])&&d.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),a(d,d,e));break;case 3:throw new Error("attribute value missed!!")}return h;case"":u=" ";default:if(u<=" ")switch(c){case 0:i.setTagName(t.slice(e,h)),c=6;break;case 1:l=t.slice(e,h),c=2;break;case 4:var d=t.slice(e,h).replace(/&#?\w+;/g,s);o.warning('attribute "'+d+'" missed quot(")!!'),a(l,d,e);case 5:c=6}else switch(c){case 2:i.tagName;n.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),a(l,l,e),e=h,c=1;break;case 5:o.warning('attribute space is required"'+l+'"!!');case 6:c=1,e=h;break;case 3:c=4,e=h;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}h++}}function u(t,e,i){for(var r=t.tagName,s=null,o=t.length;o--;){var a=t[o],l=a.qName,h=a.value;if((f=l.indexOf(":"))>0)var c=a.prefix=l.slice(0,f),u=l.slice(f+1),d="xmlns"===c&&u;else u=l,c=null,d="xmlns"===l&&"";a.localName=u,!1!==d&&(null==s&&(s={},p(i,i={})),i[d]=s[d]=h,a.uri=n.XMLNS,e.startPrefixMapping(d,h))}for(o=t.length;o--;){(c=(a=t[o]).prefix)&&("xml"===c&&(a.uri=n.XML),"xmlns"!==c&&(a.uri=i[c||""]))}var f;(f=r.indexOf(":"))>0?(c=t.prefix=r.slice(0,f),u=t.localName=r.slice(f+1)):(c=null,u=t.localName=r);var g=t.uri=i[c||""];if(e.startElement(g,u,r,t),!t.closed)return t.currentNSMap=i,t.localNSMap=s,!0;if(e.endElement(g,u,r),s)for(c in s)e.endPrefixMapping(c)}function d(t,e,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=t.indexOf("</"+i+">",e),o=t.substring(e+1,s);if(/[&<]/.test(o))return/^script$/i.test(i)?(r.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,n),r.characters(o,0,o.length),s)}return e+1}function f(t,e,i,n){var r=n[i];return null==r&&((r=t.lastIndexOf("</"+i+">"))<e&&(r=t.lastIndexOf("</"+i)),n[i]=r),r<e}function p(t,e){for(var i in t)e[i]=t[i]}function g(t,e,i,n){switch(t.charAt(e+2)){case"-":return"-"===t.charAt(e+3)?(r=t.indexOf("--\x3e",e+4))>e?(i.comment(t,e+4,r-e-4),r+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var r=t.indexOf("]]>",e+9);return i.startCDATA(),i.characters(t,e+9,r-e-9),i.endCDATA(),r+3}var s=function(t,e){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=e,r.exec(t);for(;i=r.exec(t);)if(n.push(i),i[1])return n}(t,e),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var a=s[1][0],l=!1,h=!1;o>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],h=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(h=s[3][0]));var c=s[o-1];return i.startDTD(a,l,h),i.endDTD(),c.index+c[0].length}}return-1}function m(t,e,i){var n=t.indexOf("?>",e);if(n){var r=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function v(){this.attributeNames={}}a.prototype=new Error,a.prototype.name=a.name,l.prototype={parse:function(t,e,i){var r=this.domBuilder;r.startDocument(),p(e,e={}),function(t,e,i,r,s){function o(t){var e=t.slice(1,-1);return e in i?i[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),i=56320+(1023&t);return String.fromCharCode(e,i)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(s.error("entity not found:"+t),t)}function l(e){if(e>k){var i=t.substring(k,e).replace(/&#?\w+;/g,o);x&&p(k),r.characters(i,0,e-k),k=e}}function p(e,i){for(;e>=b&&(i=w.exec(t));)y=i.index,b=y+i[0].length,x.lineNumber++;x.columnNumber=e-y+1}var y=0,b=0,w=/.*(?:\r\n?|\n)|.*$/g,x=r.locator,_=[{currentNSMap:e}],E={},k=0;for(;;){try{var T=t.indexOf("<",k);if(T<0){if(!t.substr(k).match(/^\s*$/)){var S=r.doc,C=S.createTextNode(t.substr(k));S.appendChild(C),r.currentElement=C}return}switch(T>k&&l(T),t.charAt(T+1)){case"/":var N=t.indexOf(">",T+3),O=t.substring(T+2,N).replace(/[ \t\n\r]+$/g,""),I=_.pop();N<0?(O=t.substring(T+2).replace(/[\s<].*/,""),s.error("end tag name: "+O+" is not complete:"+I.tagName),N=T+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),s.error("end tag name: "+O+" maybe not complete"),N=T+1+O.length);var A=I.localNSMap,R=I.tagName==O;if(R||I.tagName&&I.tagName.toLowerCase()==O.toLowerCase()){if(r.endElement(I.uri,I.localName,O),A)for(var D in A)r.endPrefixMapping(D);R||s.fatalError("end tag name: "+O+" is not match the current start tagName:"+I.tagName)}else _.push(I);N++;break;case"?":x&&p(T),N=m(t,T,r);break;case"!":x&&p(T),N=g(t,T,r,s);break;default:x&&p(T);var j=new v,z=_[_.length-1].currentNSMap,L=(N=c(t,T,j,z,o,s),j.length);if(!j.closed&&f(t,N,j.tagName,E)&&(j.closed=!0,i.nbsp||s.warning("unclosed xml attribute")),x&&L){for(var P=h(x,{}),B=0;B<L;B++){var M=j[B];p(M.offset),M.locator=h(x,{})}r.locator=P,u(j,r,z)&&_.push(j),r.locator=x}else u(j,r,z)&&_.push(j);n.isHTML(j.uri)&&!j.closed?N=d(t,N,j.tagName,o,r):N++}}catch(t){if(t instanceof a)throw t;s.error("element parse error: "+t),N=-1}N>k?k=N:l(Math.max(T,k)+1)}}(t,e,i,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(t){if(!o.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,i){if(!o.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:i}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=l,e.ParseError=a},function(t,e,i){"use strict";function n(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=n,e.default={createElement:n}},function(t,e,i){"use strict";function n(t,e){function i(i){for(var n=e.length-1;n>=0;n--){var o=e[n],a=i.clientX,l=i.clientY;if(i.touches&&i.touches.length&&(a=i.touches[0].clientX,l=i.touches[0].clientY),s(o,t,a,l)){o.dispatchEvent(r(i));break}}}if("iframe"===t.nodeName||"IFRAME"===t.nodeName)try{this.target=t.contentDocument}catch(e){this.target=t}else this.target=t;for(var n=["mouseup","mousedown","click","touchstart"],o=0;o<n.length;o++){var a=n[o];this.target.addEventListener(a,(function(t){return i(t)}),!1)}}function r(t){var e=Object.assign({},t,{bubbles:!1});try{return new MouseEvent(t.type,e)}catch(n){var i=document.createEvent("MouseEvents");return i.initMouseEvent(t.type,!1,e.cancelable,e.view,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),i}}function s(t,e,i,n){var r=e.getBoundingClientRect();function s(t,e,i){var n=t.top-r.top,s=t.left-r.left,o=n+t.height,a=s+t.width;return n<=i&&s<=e&&o>i&&a>e}if(!s(t.getBoundingClientRect(),i,n))return!1;for(var o=t.getClientRects(),a=0,l=o.length;a<l;a++)if(s(o[a],i,n))return!0;return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.proxyMouse=n,e.clone=r,e.default={proxyMouse:n}},function(t,e,i){var n=i(26);t.exports=function(){return n.Date.now()}},function(t,e,i){(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.exports=i}).call(this,i(17))},function(t,e,i){var n=i(54),r=i(19),s=i(56),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,h=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var i=a.test(t);return i||l.test(t)?h(t.slice(2),i?2:8):o.test(t)?NaN:+t}},function(t,e,i){var n=i(55),r=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(r,""):t}},function(t,e){var i=/\s/;t.exports=function(t){for(var e=t.length;e--&&i.test(t.charAt(e)););return e}},function(t,e,i){var n=i(57),r=i(60);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==n(t)}},function(t,e,i){var n=i(27),r=i(58),s=i(59),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?r(t):s(t)}},function(t,e,i){var n=i(27),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch(t){}var r=o.call(t);return n&&(e?t[a]=i:delete t[a]),r}},function(t,e){var i=Object.prototype.toString;t.exports=function(t){return i.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}}]).default})), /*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 */ -function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).localforage=e()}}((function(){return function e(t,i,n){function r(o,a){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[o]={exports:{}};t[o][0].call(h.exports,(function(e){var i=t[o][1][e];return r(i||e)}),h,h.exports,e,t,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,i){(function(e){"use strict";var i,n,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var s=0,o=new r(h),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)i="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var l=new e.MessageChannel;l.port1.onmessage=h,i=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;n=!0;for(var i=c.length;i;){for(t=c,c=[],e=-1;++e<i;)t[e]();i=c.length}n=!1}t.exports=function(e){1!==c.push(e)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,i){"use strict";var n=e(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function h(e,t,i){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(e,t,i){n((function(){var n;try{n=t(i)}catch(t){return s.reject(e,t)}n===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,n)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var i=!1;function n(t){i||(i=!0,s.reject(e,t))}function r(t){i||(i=!0,s.resolve(e,t))}var o=p((function(){t(r,n)}));"error"===o.status&&n(o.value)}function p(e,t){var i={};try{i.value=e(t),i.status="success"}catch(e){i.status="error",i.value=e}return i}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var i=new this.constructor(r);this.state!==l?u(i,this.state===a?e:t,this.outcome):this.queue.push(new h(i,e,t));return i},h.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){s.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},s.resolve=function(e,t){var i=p(d,t);if("error"===i.status)return s.reject(e,i.value);var n=i.value;if(n)f(e,n);else{e.state=a,e.outcome=t;for(var r=-1,o=e.queue.length;++r<o;)e.queue[r].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var i=-1,n=e.queue.length;++i<n;)e.queue[i].callRejected(t);return e},c.resolve=function(e){if(e instanceof this)return e;return s.resolve(new this(r),e)},c.reject=function(e){var t=new this(r);return s.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);var o=new Array(i),a=0,l=-1,c=new this(r);for(;++l<i;)h(e[l],l);return c;function h(e,r){t.resolve(e).then((function(e){o[r]=e,++a!==i||n||(n=!0,s.resolve(c,o))}),(function(e){n||(n=!0,s.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var i=e.length,n=!1;if(!i)return this.resolve([]);var o=-1,a=new this(r);for(;++o<i;)l=e[o],t.resolve(l).then((function(e){n||(n=!0,s.resolve(a,e))}),(function(e){n||(n=!0,s.reject(a,e))}));var l;return a}},{1:1}],3:[function(e,t,i){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function s(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)i.append(e[n]);return i.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var o=Promise;function a(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function l(e,t,i){"function"==typeof t&&e.then(t),"function"==typeof i&&e.catch(i)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(e){return"boolean"==typeof u?o.resolve(u):function(e){return new o((function(t){var i=e.transaction("local-forage-detect-blob-support","readwrite"),n=s([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},i.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);t(i||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return u=e}))}function g(e){var t=d[e.name],i={};i.promise=new o((function(e,t){i.resolve=e,i.reject=t})),t.deferredOperations.push(i),t.dbReady?t.dbReady=t.dbReady.then((function(){return i.promise})):t.dbReady=i.promise}function m(e){var t=d[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function v(e,t){var i=d[e.name].deferredOperations.pop();if(i)return i.reject(t),i.promise}function y(e,t){return new o((function(i,n){if(d[e.name]=d[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return i(e.db);g(e),e.db.close()}var s=[e.name];t&&s.push(e.version);var o=r.open.apply(r,s);t&&(o.onupgradeneeded=function(t){var i=o.result;try{i.createObjectStore(e.storeName),t.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),n(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},i(t),m(e)}}))}function b(e){return y(e,!1)}function w(e){return y(e,!0)}function x(e,t){if(!e.db)return!0;var i=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,r=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||i){if(i){var s=e.db.version+1;s>e.version&&(e.version=s)}return!0}return!1}function _(e){return s([function(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),r=0;r<t;r++)n[r]=e.charCodeAt(r);return i}(atob(e.data))],{type:e.type})}function E(e){return e&&e.__local_forage_encoded_blob}function k(e){var t=this,i=t._initReady().then((function(){var e=d[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return l(i,e,e),i}function T(e,t,i,n){void 0===n&&(n=1);try{var r=e.db.transaction(e.storeName,t);i(null,r)}catch(r){if(n>0&&(!e.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return o.resolve().then((function(){if(!e.db||"NotFoundError"===r.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),w(e)})).then((function(){return function(e){g(e);for(var t=d[e.name],i=t.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,b(e).then((function(t){return e.db=t,x(e)?w(e):t})).then((function(n){e.db=t.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(t){throw v(e,t),t}))}(e).then((function(){T(e,t,i,n-1)}))})).catch(i);i(r)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,i={db:null};if(e)for(var n in e)i[n]=e[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=k);var s=[];function a(){return o.resolve()}for(var l=0;l<r.forages.length;l++){var c=r.forages[l];c!==t&&s.push(c._initReady().catch(a))}var h=r.forages.slice(0);return o.all(s).then((function(){return i.db=r.db,b(i)})).then((function(e){return i.db=e,x(i,t._defaultConfig.version)?w(i):e})).then((function(e){i.db=r.db=e,t._dbInfo=i;for(var n=0;n<h.length;n++){var s=h[n];s!==t&&(s._dbInfo.db=i.db,s._dbInfo.version=i.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var i=o.result;if(i){var n=i.value;E(n)&&(n=_(n));var r=e(n,i.key,a++);void 0!==r?t(r):i.continue()}else t()},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),E(e)&&(e=_(e)),t(e)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},setItem:function(e,t,i){var n=this;e=c(e);var r=new o((function(i,r){var s;n.ready().then((function(){return s=n._dbInfo,"[object Blob]"===f.call(t)?p(s.db).then((function(e){return e?t:(i=t,new o((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):t})).then((function(t){T(n._dbInfo,"readwrite",(function(s,o){if(s)return r(s);try{var a=o.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),i(t)},o.onabort=o.onerror=function(){var e=l.error?l.error:l.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return a(r,i),r},removeItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){T(i._dbInfo,"readwrite",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).delete(e);s.oncomplete=function(){t()},s.onerror=function(){n(o.error)},s.onabort=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},clear:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},length:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).count();s.onsuccess=function(){e(s.result)},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},key:function(e,t){var i=this,n=new o((function(t,n){e<0?t(null):i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var i=l.result;i?0===e||a?t(i.key):(a=!0,i.advance(e)):t(null)},l.onerror=function(){n(l.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,t),n},keys:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){T(t._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(t._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var t=s.result;t?(o.push(t.key),t.continue()):e(o)},s.onerror=function(){i(s.error)}}catch(e){i(e)}}))})).catch(i)}));return a(i,e),i},dropInstance:function(e,t){t=h.apply(this,arguments);var i=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||i.name,e.storeName=e.storeName||i.storeName);var n,s=this;if(e.name){var l=e.name===i.name&&s._dbInfo.db,c=l?o.resolve(s._dbInfo.db):b(e).then((function(t){var i=d[e.name],n=i.forages;i.db=t;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=t;return t}));n=e.storeName?c.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var i=t.version+1;g(e);var n=d[e.name],s=n.forages;t.close();for(var a=0;a<s.length;a++){var l=s[a];l._dbInfo.db=null,l._dbInfo.version=i}return new o((function(t,n){var s=r.open(e.name,i);s.onerror=function(e){s.result.close(),n(e)},s.onupgradeneeded=function(){s.result.deleteObjectStore(e.storeName)},s.onsuccess=function(){var e=s.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<s.length;t++){var i=s[t];i._dbInfo.db=e,m(i._dbInfo)}})).catch((function(t){throw(v(e,t)||o.resolve()).catch((function(){})),t}))}})):c.then((function(t){g(e);var i=d[e.name],n=i.forages;t.close();for(var s=0;s<n.length;s++){n[s]._dbInfo.db=null}return new o((function(t,i){var n=r.deleteDatabase(e.name);n.onerror=function(){var e=n.result;e&&e.close(),i(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){i.db=e;for(var t=0;t<n.length;t++){m(n[t]._dbInfo)}})).catch((function(t){throw(v(e,t)||o.resolve()).catch((function(){})),t}))}))}else n=o.reject("Invalid arguments");return a(n,t),n}};var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=/^~~local_forage_type~([^~]+)~/,O="__lfsc__:".length,A=O+"arbf".length,I=Object.prototype.toString;function R(e){var t,i,n,r,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)i=C.indexOf(e[t]),n=C.indexOf(e[t+1]),r=C.indexOf(e[t+2]),s=C.indexOf(e[t+3]),h[l++]=i<<2|n>>4,h[l++]=(15&n)<<4|r>>2,h[l++]=(3&r)<<6|63&s;return c}function D(e){var t,i=new Uint8Array(e),n="";for(t=0;t<i.length;t+=3)n+=C[i[t]>>2],n+=C[(3&i[t])<<4|i[t+1]>>4],n+=C[(15&i[t+1])<<2|i[t+2]>>6],n+=C[63&i[t+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var j={serialize:function(e,t){var i="";if(e&&(i=I.call(e)),e&&("[object ArrayBuffer]"===i||e.buffer&&"[object ArrayBuffer]"===I.call(e.buffer))){var n,r="__lfsc__:";e instanceof ArrayBuffer?(n=e,r+="arbf"):(n=e.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(r+D(n))}else if("[object Blob]"===i){var s=new FileReader;s.onload=function(){var i="~~local_forage_type~"+e.type+"~"+D(this.result);t("__lfsc__:blob"+i)},s.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(i){console.error("Couldn't convert value into a JSON string: ",e),t(null,i)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,O))return JSON.parse(e);var t,i=e.substring(A),n=e.substring(O,A);if("blob"===n&&N.test(i)){var r=i.match(N);t=r[1],i=i.substring(r[0].length)}var o=R(i);switch(n){case"arbf":return o;case"blob":return s([o],{type:t});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:D};function z(e,t,i,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function L(e,t,i,n,r,s){e.executeSql(i,n,r,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?s(e,o):z(e,t,(function(){e.executeSql(i,n,r,s)}),s)}),s):s(e,o)}),s)}function B(e,t,i,n){var r=this;e=c(e);var s=new o((function(s,o){r.ready().then((function(){void 0===t&&(t=null);var a=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?o(c):l.db.transaction((function(i){L(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){s(a)}),(function(e,t){o(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void s(B.apply(r,[e,a,i,n-1]));o(t)}}))}))})).catch(o)}));return a(s,i),s}function P(e){return new o((function(t,i){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],s=0;s<n.rows.length;s++)r.push(n.rows.item(s).name);t({db:e,storeNames:r})}),(function(e,t){i(t)}))}),(function(e){i(e)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(e){var t=this,i={db:null};if(e)for(var n in e)i[n]="string"!=typeof e[n]?e[n].toString():e[n];var r=new o((function(e,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(e){return n(e)}i.db.transaction((function(r){z(r,i,(function(){t._dbInfo=i,e()}),(function(e,t){n(t)}))}),n)}));return i.serializer=j,r},_support:"function"==typeof openDatabase,iterate:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var s=n.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},setItem:function(e,t,i){return B.apply(this,[e,t,i,1])},removeItem:function(e,t){var i=this;e=c(e);var n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},clear:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},length:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,i){var n=i.rows.item(0).c;e(n)}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},key:function(e,t){var i=this,n=new o((function(t,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,i){var n=i.rows.length?i.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,t),n},keys:function(e){var t=this,i=new o((function(e,i){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);e(n)}),(function(e,t){i(t)}))}))})).catch(i)}));return a(i,e),i},dropInstance:function(e,t){t=h.apply(this,arguments);var i=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||i.name,e.storeName=e.storeName||i.storeName);var n,r=this;return a(n=e.name?new o((function(t){var n;n=e.name===i.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(P(n))})).then((function(e){return new o((function(t,i){e.db.transaction((function(n){function r(e){return new o((function(t,i){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){i(t)}))}))}for(var s=[],a=0,l=e.storeNames.length;a<l;a++)s.push(r(e.storeNames[a]));o.all(s).then((function(){t()})).catch((function(e){i(e)}))}),(function(e){i(e)}))}))})):o.reject("Invalid arguments"),t),n}};function F(e,t){var i=e.name+"/";return e.storeName!==t.storeName&&(i+=e.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var i in e)t[i]=e[i];return t.keyPrefix=F(e,this._defaultConfig),q()?(this._dbInfo=t,t.serializer=j,o.resolve()):o.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var i=this,n=i.ready().then((function(){for(var t=i._dbInfo,n=t.keyPrefix,r=n.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),o++)))return c}}}));return a(n,t),n},getItem:function(e,t){var i=this;e=c(e);var n=i.ready().then((function(){var t=i._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return a(n,t),n},setItem:function(e,t,i){var n=this;e=c(e);var r=n.ready().then((function(){void 0===t&&(t=null);var i=t;return new o((function(r,s){var o=n._dbInfo;o.serializer.serialize(t,(function(t,n){if(n)s(n);else try{localStorage.setItem(o.keyPrefix+e,t),r(i)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||s(e),s(e)}}))}))}));return a(r,i),r},removeItem:function(e,t){var i=this;e=c(e);var n=i.ready().then((function(){var t=i._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return a(n,t),n},clear:function(e){var t=this,i=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return a(i,e),i},length:function(e){var t=this.keys().then((function(e){return e.length}));return a(t,e),t},key:function(e,t){var i=this,n=i.ready().then((function(){var t,n=i._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return a(n,t),n},keys:function(e){var t=this,i=t.ready().then((function(){for(var e=t._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var s=localStorage.key(r);0===s.indexOf(e.keyPrefix)&&n.push(s.substring(e.keyPrefix.length))}return n}));return a(i,e),i},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var i=this.config();e.name=e.name||i.name,e.storeName=e.storeName||i.storeName}var n,r=this;return a(n=e.name?new o((function(t){e.storeName?t(F(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var i=localStorage.key(t);0===i.indexOf(e)&&localStorage.removeItem(i)}})):o.reject("Invalid arguments"),t),n}},W=function(e,t){for(var i,n,r=e.length,s=0;s<r;){if((i=e[s])===(n=t)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;s++}return!1},H=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},$={},X={},Y={INDEXEDDB:S,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Q(e,t){e[t]=function(){var i=arguments;return e.ready().then((function(){return e[t].apply(e,i)}))}}function J(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var i in t)t.hasOwnProperty(i)&&(H(t[i])?arguments[0][i]=t[i].slice():arguments[0][i]=t[i])}return arguments[0]}var ee=new(function(){function e(t){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,$[r]||this.defineDriver(n)}this._defaultConfig=J({},K),this._config=J({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,i){var n=new o((function(t,i){try{var n=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void i(r);for(var s=G.concat("_initStorage"),l=0,c=s.length;l<c;l++){var h=s[l];if((!W(Z,h)||e[h])&&"function"!=typeof e[h])return void i(r)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),i=o.reject(t);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];e[r]||(e[r]=t(r))}}();var u=function(i){$[n]&&console.info("Redefining LocalForage driver: "+n),$[n]=e,X[n]=i,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(u,i):u(!!e._support):u(!0)}catch(e){i(e)}}));return l(n,t,i),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,i){var n=$[e]?o.resolve($[e]):o.reject(new Error("Driver not found."));return l(n,t,i),n},e.prototype.getSerializer=function(e){var t=o.resolve(j);return l(t,e),t},e.prototype.ready=function(e){var t=this,i=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return l(i,e,e),i},e.prototype.setDriver=function(e,t,i){var n=this;H(e)||(e=[e]);var r=this._getSupportedDrivers(e);function s(){n._config.driver=n.driver()}function a(e){return n._extend(e),s(),n._ready=n._initStorage(n._config),n._ready}var c=null!==this._driverSet?this._driverSet.catch((function(){return o.resolve()})):o.resolve();return this._driverSet=c.then((function(){var e=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,s(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function i(){for(;t<e.length;){var r=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}s();var l=new Error("No available storage method found.");return n._driverSet=o.reject(l),n._driverSet}()}}(r)}))})).catch((function(){s();var e=new Error("No available storage method found.");return n._driverSet=o.reject(e),n._driverSet})),l(this._driverSet,t,i),this._driverSet},e.prototype.supports=function(e){return!!X[e]},e.prototype._extend=function(e){J(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=G.length;e<t;e++)Q(this,G[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=ee},{3:3}]},{},[4])(4)})),function(e){e.attrFn=e.attrFn||{};var t="ontouchstart"in window,i={tap_pixel_range:5,swipe_h_threshold:50,swipe_v_threshold:50,taphold_threshold:750,doubletap_int:500,shake_threshold:15,touch_capable:t,orientation_support:"orientation"in window&&"onorientationchange"in window,startevent:t?"touchstart":"mousedown",endevent:t?"touchend":"mouseup",moveevent:t?"touchmove":"mousemove",tapevent:t?"tap":"click",scrollevent:t?"touchmove":"scroll",hold_timer:null,tap_timer:null};e.touch={},e.isTouchCapable=function(){return i.touch_capable},e.getStartEvent=function(){return i.startevent},e.getEndEvent=function(){return i.endevent},e.getMoveEvent=function(){return i.moveevent},e.getTapEvent=function(){return i.tapevent},e.getScrollEvent=function(){return i.scrollevent},e.touch.setSwipeThresholdX=function(e){if("number"!=typeof e)throw new Error("Threshold parameter must be a type of number");i.swipe_h_threshold=e},e.touch.setSwipeThresholdY=function(e){if("number"!=typeof e)throw new Error("Threshold parameter must be a type of number");i.swipe_v_threshold=e},e.touch.setDoubleTapInt=function(e){if("number"!=typeof e)throw new Error("Interval parameter must be a type of number");i.doubletap_int=e},e.touch.setTapHoldThreshold=function(e){if("number"!=typeof e)throw new Error("Threshold parameter must be a type of number");i.taphold_threshold=e},e.touch.setTapRange=function(e){if("number"!=typeof e)throw new Error("Ranger parameter must be a type of number");i.tap_pixel_range=threshold},e.each(["tapstart","tapend","tapmove","tap","singletap","doubletap","taphold","swipe","swipeup","swiperight","swipedown","swipeleft","swipeend","scrollstart","scrollend","orientationchange","tap2","taphold2"],(function(t,i){e.fn[i]=function(e){return e?this.on(i,e):this.trigger(i)},e.attrFn[i]=!0})),e.event.special.tapstart={setup:function(){var t=this,n=e(t);n.on(i.startevent,(function e(r){if(n.data("callee",e),r.which&&1!==r.which)return!1;var s=r.originalEvent,o={position:{x:i.touch_capable?s.touches[0].pageX:r.pageX,y:i.touch_capable?s.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(t,"tapstart",r,o),!0}))},remove:function(){e(this).off(i.startevent,e(this).data.callee)}},e.event.special.tapmove={setup:function(){var t=this,n=e(t);n.on(i.moveevent,(function e(r){n.data("callee",e);var s=r.originalEvent,o={position:{x:i.touch_capable?s.touches[0].pageX:r.pageX,y:i.touch_capable?s.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(t,"tapmove",r,o),!0}))},remove:function(){e(this).off(i.moveevent,e(this).data.callee)}},e.event.special.tapend={setup:function(){var t=this,n=e(t);n.on(i.endevent,(function e(r){n.data("callee",e);var s=r.originalEvent,o={position:{x:i.touch_capable?s.changedTouches[0].pageX:r.pageX,y:i.touch_capable?s.changedTouches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(t,"tapend",r,o),!0}))},remove:function(){e(this).off(i.endevent,e(this).data.callee)}},e.event.special.taphold={setup:function(){var t,n=this,r=e(n),s={x:0,y:0},o=0,a=0;r.on(i.startevent,(function e(l){if(l.which&&1!==l.which)return!1;r.data("tapheld",!1),t=l.target;var c=l.originalEvent,h=Date.now();i.touch_capable?c.touches[0].pageX:l.pageX,i.touch_capable?c.touches[0].pageY:l.pageY,i.touch_capable?(c.touches[0].pageX,c.touches[0].target.offsetLeft):l.offsetX,i.touch_capable?(c.touches[0].pageY,c.touches[0].target.offsetTop):l.offsetY,s.x=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageX:l.pageX,s.y=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageY:l.pageY,o=s.x,a=s.y;var u=r.parent().data("threshold")?r.parent().data("threshold"):r.data("threshold"),d=void 0!==u&&!1!==u&&parseInt(u)?parseInt(u):i.taphold_threshold;return i.hold_timer=window.setTimeout((function(){var u=s.x-o,d=s.y-a;if(l.target==t&&(s.x==o&&s.y==a||u>=-i.tap_pixel_range&&u<=i.tap_pixel_range&&d>=-i.tap_pixel_range&&d<=i.tap_pixel_range)){r.data("tapheld",!0);for(var f=Date.now()-h,p=l.originalEvent.targetTouches?l.originalEvent.targetTouches:[l],g=[],m=0;m<p.length;m++){var y={position:{x:i.touch_capable?c.changedTouches[m].pageX:l.pageX,y:i.touch_capable?c.changedTouches[m].pageY:l.pageY},offset:{x:i.touch_capable?Math.round(c.changedTouches[m].pageX-(r.offset()?r.offset().left:0)):Math.round(l.pageX-(r.offset()?r.offset().left:0)),y:i.touch_capable?Math.round(c.changedTouches[m].pageY-(r.offset()?r.offset().top:0)):Math.round(l.pageY-(r.offset()?r.offset().top:0))},time:Date.now(),target:l.target,duration:f};g.push(y)}var b=2==p.length?"taphold2":"taphold";r.data("callee1",e),v(n,b,l,g)}}),d),!0})).on(i.endevent,(function e(){r.data("callee2",e),r.data("tapheld",!1),window.clearTimeout(i.hold_timer)})).on(i.moveevent,(function e(t){r.data("callee3",e),o=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageX:t.pageX,a=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageY:t.pageY}))},remove:function(){e(this).off(i.startevent,e(this).data.callee1).off(i.endevent,e(this).data.callee2).off(i.moveevent,e(this).data.callee3)}},e.event.special.doubletap={setup:function(){var t,n,r=this,s=e(r),o=null,a=!1;s.on(i.startevent,(function t(r){return!(r.which&&1!==r.which||(s.data("doubletapped",!1),r.target,s.data("callee1",t),n=r.originalEvent,o||(o={position:{x:i.touch_capable?n.touches[0].pageX:r.pageX,y:i.touch_capable?n.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(n.changedTouches[0].pageX-(s.offset()?s.offset().left:0)):Math.round(r.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(n.changedTouches[0].pageY-(s.offset()?s.offset().top:0)):Math.round(r.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:r.target,element:r.originalEvent.srcElement,index:e(r.target).index()}),0))})).on(i.endevent,(function l(c){var h=Date.now(),u=h-(s.data("lastTouch")||h+1);if(window.clearTimeout(t),s.data("callee2",l),u<i.doubletap_int&&e(c.target).index()==o.index&&u>100){s.data("doubletapped",!0),window.clearTimeout(i.tap_timer);var d={position:{x:i.touch_capable?c.originalEvent.changedTouches[0].pageX:c.pageX,y:i.touch_capable?c.originalEvent.changedTouches[0].pageY:c.pageY},offset:{x:i.touch_capable?Math.round(n.changedTouches[0].pageX-(s.offset()?s.offset().left:0)):Math.round(c.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(n.changedTouches[0].pageY-(s.offset()?s.offset().top:0)):Math.round(c.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:c.target,element:c.originalEvent.srcElement,index:e(c.target).index()},f={firstTap:o,secondTap:d,interval:d.time-o.time};a||(v(r,"doubletap",c,f),o=null),a=!0,window.setTimeout((function(){a=!1}),i.doubletap_int)}else s.data("lastTouch",h),t=window.setTimeout((function(){o=null,window.clearTimeout(t)}),i.doubletap_int,[c]);s.data("lastTouch",h)}))},remove:function(){e(this).off(i.startevent,e(this).data.callee1).off(i.endevent,e(this).data.callee2)}},e.event.special.singletap={setup:function(){var t=this,n=e(t),r=null,s=null,o={x:0,y:0};n.on(i.startevent,(function e(t){return!(t.which&&1!==t.which||(s=Date.now(),r=t.target,n.data("callee1",e),o.x=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageX:t.pageX,o.y=t.originalEvent.targetTouches?t.originalEvent.targetTouches[0].pageY:t.pageY,0))})).on(i.endevent,(function e(a){if(n.data("callee2",e),a.target==r){var l=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.pageX,c=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageY:a.pageY;i.tap_timer=window.setTimeout((function(){var e=o.x-l,r=o.y-c;if(!n.data("doubletapped")&&!n.data("tapheld")&&(o.x==l&&o.y==c||e>=-i.tap_pixel_range&&e<=i.tap_pixel_range&&r>=-i.tap_pixel_range&&r<=i.tap_pixel_range)){var h=a.originalEvent,u={position:{x:i.touch_capable?h.changedTouches[0].pageX:a.pageX,y:i.touch_capable?h.changedTouches[0].pageY:a.pageY},offset:{x:i.touch_capable?Math.round(h.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(a.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(h.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(a.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:a.target};u.time-s<i.taphold_threshold&&v(t,"singletap",a,u)}}),i.doubletap_int)}}))},remove:function(){e(this).off(i.startevent,e(this).data.callee1).off(i.endevent,e(this).data.callee2)}},e.event.special.tap={setup:function(){var t,n,r=this,s=e(r),o=!1,a=null,l={x:0,y:0};s.on(i.startevent,(function e(i){return s.data("callee1",e),!(i.which&&1!==i.which||(o=!0,l.x=i.originalEvent.targetTouches?i.originalEvent.targetTouches[0].pageX:i.pageX,l.y=i.originalEvent.targetTouches?i.originalEvent.targetTouches[0].pageY:i.pageY,t=Date.now(),a=i.target,n=i.originalEvent.targetTouches?i.originalEvent.targetTouches:[i],0))})).on(i.endevent,(function e(c){s.data("callee2",e);var h=c.originalEvent.targetTouches?c.originalEvent.changedTouches[0].pageX:c.pageX,u=c.originalEvent.targetTouches?c.originalEvent.changedTouches[0].pageY:c.pageY,d=l.x-h,f=l.y-u;if(a==c.target&&o&&Date.now()-t<i.taphold_threshold&&(l.x==h&&l.y==u||d>=-i.tap_pixel_range&&d<=i.tap_pixel_range&&f>=-i.tap_pixel_range&&f<=i.tap_pixel_range)){for(var p=c.originalEvent,g=[],m=0;m<n.length;m++){var y={position:{x:i.touch_capable?p.changedTouches[m].pageX:c.pageX,y:i.touch_capable?p.changedTouches[m].pageY:c.pageY},offset:{x:i.touch_capable?Math.round(p.changedTouches[m].pageX-(s.offset()?s.offset().left:0)):Math.round(c.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(p.changedTouches[m].pageY-(s.offset()?s.offset().top:0)):Math.round(c.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:c.target};g.push(y)}var b=2==n.length?"tap2":"tap";v(r,b,c,g)}}))},remove:function(){e(this).off(i.startevent,e(this).data.callee1).off(i.endevent,e(this).data.callee2)}},e.event.special.swipe={setup:function(){var t,n=e(this),r=!1,s=!1,o={x:0,y:0},a={x:0,y:0};n.on(i.startevent,(function s(l){(n=e(l.currentTarget)).data("callee1",s),o.x=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageX:l.pageX,o.y=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageY:l.pageY,a.x=o.x,a.y=o.y,r=!0;var c=l.originalEvent;t={position:{x:i.touch_capable?c.touches[0].pageX:l.pageX,y:i.touch_capable?c.touches[0].pageY:l.pageY},offset:{x:i.touch_capable?Math.round(c.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(l.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(c.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(l.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:l.target}})),n.on(i.moveevent,(function l(c){var h;(n=e(c.currentTarget)).data("callee2",l),a.x=c.originalEvent.targetTouches?c.originalEvent.targetTouches[0].pageX:c.pageX,a.y=c.originalEvent.targetTouches?c.originalEvent.targetTouches[0].pageY:c.pageY;var u=n.parent().data("xthreshold")?n.parent().data("xthreshold"):n.data("xthreshold"),d=n.parent().data("ythreshold")?n.parent().data("ythreshold"):n.data("ythreshold"),f=void 0!==u&&!1!==u&&parseInt(u)?parseInt(u):i.swipe_h_threshold,p=void 0!==d&&!1!==d&&parseInt(d)?parseInt(d):i.swipe_v_threshold;if(o.y>a.y&&o.y-a.y>p&&(h="swipeup"),o.x<a.x&&a.x-o.x>f&&(h="swiperight"),o.y<a.y&&a.y-o.y>p&&(h="swipedown"),o.x>a.x&&o.x-a.x>f&&(h="swipeleft"),null!=h&&r){o.x=0,o.y=0,a.x=0,a.y=0,r=!1;var g=c.originalEvent,m={position:{x:i.touch_capable?g.touches[0].pageX:c.pageX,y:i.touch_capable?g.touches[0].pageY:c.pageY},offset:{x:i.touch_capable?Math.round(g.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(c.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(g.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(c.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:c.target},v=Math.abs(t.position.x-m.position.x),y=Math.abs(t.position.y-m.position.y),b={startEvnt:t,endEvnt:m,direction:h.replace("swipe",""),xAmount:v,yAmount:y,duration:m.time-t.time};s=!0,n.trigger("swipe",b).trigger(h,b)}})),n.on(i.endevent,(function o(a){var l="";if((n=e(a.currentTarget)).data("callee3",o),s){var c=n.data("xthreshold"),h=n.data("ythreshold"),u=void 0!==c&&!1!==c&&parseInt(c)?parseInt(c):i.swipe_h_threshold,d=void 0!==h&&!1!==h&&parseInt(h)?parseInt(h):i.swipe_v_threshold,f=a.originalEvent,p={position:{x:i.touch_capable?f.changedTouches[0].pageX:a.pageX,y:i.touch_capable?f.changedTouches[0].pageY:a.pageY},offset:{x:i.touch_capable?Math.round(f.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(a.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(f.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(a.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:a.target};t.position.y>p.position.y&&t.position.y-p.position.y>d&&(l="swipeup"),t.position.x<p.position.x&&p.position.x-t.position.x>u&&(l="swiperight"),t.position.y<p.position.y&&p.position.y-t.position.y>d&&(l="swipedown"),t.position.x>p.position.x&&t.position.x-p.position.x>u&&(l="swipeleft");var g=Math.abs(t.position.x-p.position.x),m=Math.abs(t.position.y-p.position.y),v={startEvnt:t,endEvnt:p,direction:l.replace("swipe",""),xAmount:g,yAmount:m,duration:p.time-t.time};n.trigger("swipeend",v)}r=!1,s=!1}))},remove:function(){e(this).off(i.startevent,e(this).data.callee1).off(i.moveevent,e(this).data.callee2).off(i.endevent,e(this).data.callee3)}},e.event.special.scrollstart={setup:function(){var t,n,r=this,s=e(r);function o(e,i){v(r,(t=i)?"scrollstart":"scrollend",e)}s.on(i.scrollevent,(function e(i){s.data("callee",e),t||o(i,!0),clearTimeout(n),n=setTimeout((function(){o(i,!1)}),50)}))},remove:function(){e(this).off(i.scrollevent,e(this).data.callee)}};var n,r,s,o,a=e(window),l={0:!0,180:!0};if(i.orientation_support){var c=window.innerWidth||a.width(),h=window.innerHeight||a.height();s=c>h&&c-h>50,o=l[window.orientation],(s&&o||!s&&!o)&&(l={"-90":!0,90:!0})}function u(){var e=n();e!==r&&(r=e,a.trigger("orientationchange"))}e.event.special.orientationchange={setup:function(){return!i.orientation_support&&(r=n(),a.on("throttledresize",u),!0)},teardown:function(){return!i.orientation_support&&(a.off("throttledresize",u),!0)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=n(),t.apply(this,arguments)}}},e.event.special.orientationchange.orientation=n=function(){var e=document.documentElement;return(i.orientation_support?l[window.orientation]:e&&e.clientWidth/e.clientHeight<1.1)?"portrait":"landscape"},e.event.special.throttledresize={setup:function(){e(this).on("resize",g)},teardown:function(){e(this).off("resize",g)}};var d,f,p,g=function(){f=Date.now(),(p=f-m)>=250?(m=f,e(this).trigger("throttledresize")):(d&&window.clearTimeout(d),d=window.setTimeout(u,250-p))},m=0;function v(t,i,n,r){var s=n.type;n.type=i,e.event.dispatch.call(t,n,r),n.type=s}e.each({scrollend:"scrollstart",swipeup:"swipe",swiperight:"swipe",swipedown:"swipe",swipeleft:"swipe",swipeend:"swipe",tap2:"tap",taphold2:"taphold"},(function(t,i){e.event.special[t]={setup:function(){e(this).on(i,e.noop)}}}))}(jQuery),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():e.hyphenationPatternsEnUs=t()}(this,(function(){return{patterns:[" ",".ach4",".ad4der",".af1t",".al3t",".am5at",".an5c",".ang4",".ani5m",".ant4",".an3te",".anti5s",".ar5s",".ar4tie",".ar4ty",".as3c",".as1p",".as1s",".aster5",".atom5",".au1d",".av4i",".awn4",".ba4g",".ba5na",".bas4e",".ber4",".be5ra",".be3sm",".be5sto",".bri2",".but4ti",".cam4pe",".can5c",".capa5b",".car5ol",".ca4t",".ce4la",".ch4",".chill5i",".ci2",".cit5r",".co3e",".co4r",".cor5ner",".de4moi",".de3o",".de3ra",".de3ri",".des4c",".dictio5",".do4t",".du4c",".dumb5",".earth5",".eas3i",".eb4",".eer4",".eg2",".el5d",".el3em",".enam3",".en3g",".en3s",".eq5ui5t",".er4ri",".es3",".eu3",".eye5",".fes3",".for5mer",".ga2",".ge2",".gen3t4",".ge5og",".gi5a",".gi4b",".go4r",".hand5i",".han5k",".he2",".hero5i",".hes3",".het3",".hi3b",".hi3er",".hon5ey",".hon3o",".hov5",".id4l",".idol3",".im3m",".im5pin",".in1",".in3ci",".ine2",".in2k",".in3s",".ir5r",".is4i",".ju3r",".la4cy",".la4m",".lat5er",".lath5",".le2",".leg5e",".len4",".lep5",".lev1",".li4g",".lig5a",".li2n",".li3o",".li4t",".mag5a5",".mal5o",".man5a",".mar5ti",".me2",".mer3c",".me5ter",".mis1",".mist5i",".mon3e",".mo3ro",".mu5ta",".muta5b",".ni4c",".od2",".odd5",".of5te",".or5ato",".or3c",".or1d",".or3t",".os3",".os4tl",".oth3",".out3",".ped5al",".pe5te",".pe5tit",".pi4e",".pio5n",".pi2t",".pre3m",".ra4c",".ran4t",".ratio5na",".ree2",".re5mit",".res2",".re5stat",".ri4g",".rit5u",".ro4q",".ros5t",".row5d",".ru4d",".sci3e",".self5",".sell5",".se2n",".se5rie",".sh2",".si2",".sing4",".st4",".sta5bl",".sy2",".ta4",".te4",".ten5an",".th2",".ti2",".til4",".tim5o5",".ting4",".tin5k",".ton4a",".to4p",".top5i",".tou5s",".trib5ut",".un1a",".un3ce",".under5",".un1e",".un5k",".un5o",".un3u",".up3",".ure3",".us5a",".ven4de",".ve5ra",".wil5i",".ye4","4ab.","a5bal","a5ban","abe2","ab5erd","abi5a","ab5it5ab","ab5lat","ab5o5liz","4abr","ab5rog","ab3ul","a4car","ac5ard","ac5aro","a5ceou","ac1er","a5chet","4a2ci","a3cie","ac1in","a3cio","ac5rob","act5if","ac3ul","ac4um","a2d","ad4din","ad5er.","2adi","a3dia","ad3ica","adi4er","a3dio","a3dit","a5diu","ad4le","ad3ow","ad5ran","ad4su","4adu","a3duc","ad5um","ae4r","aeri4e","a2f","aff4","a4gab","aga4n","ag5ell","age4o","4ageu","ag1i","4ag4l","ag1n","a2go","3agog","ag3oni","a5guer","ag5ul","a4gy","a3ha","a3he","ah4l","a3ho","ai2","a5ia","a3ic.","ai5ly","a4i4n","ain5in","ain5o","ait5en","a1j","ak1en","al5ab","al3ad","a4lar","4aldi","2ale","al3end","a4lenti","a5le5o","al1i","al4ia.","ali4e","al5lev","4allic","4alm","a5log.","a4ly.","4alys","5a5lyst","5alyt","3alyz","4ama","am5ab","am3ag","ama5ra","am5asc","a4matis","a4m5ato","am5era","am3ic","am5if","am5ily","am1in","ami4no","a2mo","a5mon","amor5i","amp5en","a2n","an3age","3analy","a3nar","an3arc","anar4i","a3nati","4and","ande4s","an3dis","an1dl","an4dow","a5nee","a3nen","an5est.","a3neu","2ang","ang5ie","an1gl","a4n1ic","a3nies","an3i3f","an4ime","a5nimi","a5nine","an3io","a3nip","an3ish","an3it","a3niu","an4kli","5anniz","ano4","an5ot","anoth5","an2sa","an4sco","an4sn","an2sp","ans3po","an4st","an4sur","antal4","an4tie","4anto","an2tr","an4tw","an3ua","an3ul","a5nur","4ao","apar4","ap5at","ap5ero","a3pher","4aphi","a4pilla","ap5illar","ap3in","ap3ita","a3pitu","a2pl","apoc5","ap5ola","apor5i","apos3t","aps5es","a3pu","aque5","2a2r","ar3act","a5rade","ar5adis","ar3al","a5ramete","aran4g","ara3p","ar4at","a5ratio","ar5ativ","a5rau","ar5av4","araw4","arbal4","ar4chan","ar5dine","ar4dr","ar5eas","a3ree","ar3ent","a5ress","ar4fi","ar4fl","ar1i","ar5ial","ar3ian","a3riet","ar4im","ar5inat","ar3io","ar2iz","ar2mi","ar5o5d","a5roni","a3roo","ar2p","ar3q","arre4","ar4sa","ar2sh","4as.","as4ab","as3ant","ashi4","a5sia.","a3sib","a3sic","5a5si4t","ask3i","as4l","a4soc","as5ph","as4sh","as3ten","as1tr","asur5a","a2ta","at3abl","at5ac","at3alo","at5ap","ate5c","at5ech","at3ego","at3en.","at3era","ater5n","a5terna","at3est","at5ev","4ath","ath5em","a5then","at4ho","ath5om","4ati.","a5tia","at5i5b","at1ic","at3if","ation5ar","at3itu","a4tog","a2tom","at5omiz","a4top","a4tos","a1tr","at5rop","at4sk","at4tag","at5te","at4th","a2tu","at5ua","at5ue","at3ul","at3ura","a2ty","au4b","augh3","au3gu","au4l2","aun5d","au3r","au5sib","aut5en","au1th","a2va","av3ag","a5van","ave4no","av3era","av5ern","av5ery","av1i","avi4er","av3ig","av5oc","a1vor","3away","aw3i","aw4ly","aws4","ax4ic","ax4id","ay5al","aye4","ays4","azi4er","azz5i","5ba.","bad5ger","ba4ge","bal1a","ban5dag","ban4e","ban3i","barbi5","bari4a","bas4si","1bat","ba4z","2b1b","b2be","b3ber","bbi4na","4b1d","4be.","beak4","beat3","4be2d","be3da","be3de","be3di","be3gi","be5gu","1bel","be1li","be3lo","4be5m","be5nig","be5nu","4bes4","be3sp","be5str","3bet","bet5iz","be5tr","be3tw","be3w","be5yo","2bf","4b3h","bi2b","bi4d","3bie","bi5en","bi4er","2b3if","1bil","bi3liz","bina5r4","bin4d","bi5net","bi3ogr","bi5ou","bi2t","3bi3tio","bi3tr","3bit5ua","b5itz","b1j","bk4","b2l2","blath5","b4le.","blen4","5blesp","b3lis","b4lo","blun4t","4b1m","4b3n","bne5g","3bod","bod3i","bo4e","bol3ic","bom4bi","bon4a","bon5at","3boo","5bor.","4b1ora","bor5d","5bore","5bori","5bos4","b5ota","both5","bo4to","bound3","4bp","4brit","broth3","2b5s2","bsor4","2bt","bt4l","b4to","b3tr","buf4fer","bu4ga","bu3li","bumi4","bu4n","bunt4i","bu3re","bus5ie","buss4e","5bust","4buta","3butio","b5uto","b1v","4b5w","5by.","bys4","1ca","cab3in","ca1bl","cach4","ca5den","4cag4","2c5ah","ca3lat","cal4la","call5in","4calo","can5d","can4e","can4ic","can5is","can3iz","can4ty","cany4","ca5per","car5om","cast5er","cas5tig","4casy","ca4th","4cativ","cav5al","c3c","ccha5","cci4a","ccompa5","ccon4","ccou3t","2ce.","4ced.","4ceden","3cei","5cel.","3cell","1cen","3cenc","2cen4e","4ceni","3cent","3cep","ce5ram","4cesa","3cessi","ces5si5b","ces5t","cet4","c5e4ta","cew4","2ch","4ch.","4ch3ab","5chanic","ch5a5nis","che2","cheap3","4ched","che5lo","3chemi","ch5ene","ch3er.","ch3ers","4ch1in","5chine.","ch5iness","5chini","5chio","3chit","chi2z","3cho2","ch4ti","1ci","3cia","ci2a5b","cia5r","ci5c","4cier","5cific.","4cii","ci4la","3cili","2cim","2cin","c4ina","3cinat","cin3em","c1ing","c5ing.","5cino","cion4","4cipe","ci3ph","4cipic","4cista","4cisti","2c1it","cit3iz","5ciz","ck1","ck3i","1c4l4","4clar","c5laratio","5clare","cle4m","4clic","clim4","cly4","c5n","1co","co5ag","coe2","2cog","co4gr","coi4","co3inc","col5i","5colo","col3or","com5er","con4a","c4one","con3g","con5t","co3pa","cop3ic","co4pl","4corb","coro3n","cos4e","cov1","cove4","cow5a","coz5e","co5zi","c1q","cras5t","5crat.","5cratic","cre3at","5cred","4c3reta","cre4v","cri2","cri5f","c4rin","cris4","5criti","cro4pl","crop5o","cros4e","cru4d","4c3s2","2c1t","cta4b","ct5ang","c5tant","c2te","c3ter","c4ticu","ctim3i","ctu4r","c4tw","cud5","c4uf","c4ui","cu5ity","5culi","cul4tis","3cultu","cu2ma","c3ume","cu4mi","3cun","cu3pi","cu5py","cur5a4b","cu5ria","1cus","cuss4i","3c4ut","cu4tie","4c5utiv","4cutr","1cy","cze4","1d2a","5da.","2d3a4b","dach4","4daf","2dag","da2m2","dan3g","dard5","dark5","4dary","3dat","4dativ","4dato","5dav4","dav5e","5day","d1b","d5c","d1d4","2de.","deaf5","deb5it","de4bon","decan4","de4cil","de5com","2d1ed","4dee.","de5if","deli4e","del5i5q","de5lo","d4em","5dem.","3demic","dem5ic.","de5mil","de4mons","demor5","1den","de4nar","de3no","denti5f","de3nu","de1p","de3pa","depi4","de2pu","d3eq","d4erh","5derm","dern5iz","der5s","des2","d2es.","de1sc","de2s5o","des3ti","de3str","de4su","de1t","de2to","de1v","dev3il","4dey","4d1f","d4ga","d3ge4t","dg1i","d2gy","d1h2","5di.","1d4i3a","dia5b","di4cam","d4ice","3dict","3did","5di3en","d1if","di3ge","di4lato","d1in","1dina","3dine.","5dini","di5niz","1dio","dio5g","di4pl","dir2","di1re","dirt5i","dis1","5disi","d4is3t","d2iti","1di1v","d1j","d5k2","4d5la","3dle.","3dled","3dles.","4dless","2d3lo","4d5lu","2dly","d1m","4d1n4","1do","3do.","do5de","5doe","2d5of","d4og","do4la","doli4","do5lor","dom5iz","do3nat","doni4","doo3d","dop4p","d4or","3dos","4d5out","do4v","3dox","d1p","1dr","drag5on","4drai","dre4","drea5r","5dren","dri4b","dril4","dro4p","4drow","5drupli","4dry","2d1s2","ds4p","d4sw","d4sy","d2th","1du","d1u1a","du2c","d1uca","duc5er","4duct.","4ducts","du5el","du4g","d3ule","dum4be","du4n","4dup","du4pe","d1v","d1w","d2y","5dyn","dy4se","dys5p","e1a4b","e3act","ead1","ead5ie","ea4ge","ea5ger","ea4l","eal5er","eal3ou","eam3er","e5and","ear3a","ear4c","ear5es","ear4ic","ear4il","ear5k","ear2t","eart3e","ea5sp","e3ass","east3","ea2t","eat5en","eath3i","e5atif","e4a3tu","ea2v","eav3en","eav5i","eav5o","2e1b","e4bel.","e4bels","e4ben","e4bit","e3br","e4cad","ecan5c","ecca5","e1ce","ec5essa","ec2i","e4cib","ec5ificat","ec5ifie","ec5ify","ec3im","eci4t","e5cite","e4clam","e4clus","e2col","e4comm","e4compe","e4conc","e2cor","ec3ora","eco5ro","e1cr","e4crem","ec4tan","ec4te","e1cu","e4cul","ec3ula","2e2da","4ed3d","e4d1er","ede4s","4edi","e3dia","ed3ib","ed3ica","ed3im","ed1it","edi5z","4edo","e4dol","edon2","e4dri","e4dul","ed5ulo","ee2c","eed3i","ee2f","eel3i","ee4ly","ee2m","ee4na","ee4p1","ee2s4","eest4","ee4ty","e5ex","e1f","e4f3ere","1eff","e4fic","5efici","efil4","e3fine","ef5i5nite","3efit","efor5es","e4fuse.","4egal","eger4","eg5ib","eg4ic","eg5ing","e5git5","eg5n","e4go.","e4gos","eg1ul","e5gur","5egy","e1h4","eher4","ei2","e5ic","ei5d","eig2","ei5gl","e3imb","e3inf","e1ing","e5inst","eir4d","eit3e","ei3th","e5ity","e1j","e4jud","ej5udi","eki4n","ek4la","e1la","e4la.","e4lac","elan4d","el5ativ","e4law","elaxa4","e3lea","el5ebra","5elec","e4led","el3ega","e5len","e4l1er","e1les","el2f","el2i","e3libe","e4l5ic.","el3ica","e3lier","el5igib","e5lim","e4l3ing","e3lio","e2lis","el5ish","e3liv3","4ella","el4lab","ello4","e5loc","el5og","el3op.","el2sh","el4ta","e5lud","el5ug","e4mac","e4mag","e5man","em5ana","em5b","e1me","e2mel","e4met","em3ica","emi4e","em5igra","em1in2","em5ine","em3i3ni","e4mis","em5ish","e5miss","em3iz","5emniz","emo4g","emoni5o","em3pi","e4mul","em5ula","emu3n","e3my","en5amo","e4nant","ench4er","en3dic","e5nea","e5nee","en3em","en5ero","en5esi","en5est","en3etr","e3new","en5ics","e5nie","e5nil","e3nio","en3ish","en3it","e5niu","5eniz","4enn","4eno","eno4g","e4nos","en3ov","en4sw","ent5age","4enthes","en3ua","en5uf","e3ny.","4en3z","e5of","eo2g","e4oi4","e3ol","eop3ar","e1or","eo3re","eo5rol","eos4","e4ot","eo4to","e5out","e5ow","e2pa","e3pai","ep5anc","e5pel","e3pent","ep5etitio","ephe4","e4pli","e1po","e4prec","ep5reca","e4pred","ep3reh","e3pro","e4prob","ep4sh","ep5ti5b","e4put","ep5uta","e1q","equi3l","e4q3ui3s","er1a","era4b","4erand","er3ar","4erati.","2erb","er4bl","er3ch","er4che","2ere.","e3real","ere5co","ere3in","er5el.","er3emo","er5ena","er5ence","4erene","er3ent","ere4q","er5ess","er3est","eret4","er1h","er1i","e1ria4","5erick","e3rien","eri4er","er3ine","e1rio","4erit","er4iu","eri4v","e4riva","er3m4","er4nis","4ernit","5erniz","er3no","2ero","er5ob","e5roc","ero4r","er1ou","er1s","er3set","ert3er","4ertl","er3tw","4eru","eru4t","5erwau","e1s4a","e4sage.","e4sages","es2c","e2sca","es5can","e3scr","es5cu","e1s2e","e2sec","es5ecr","es5enc","e4sert.","e4serts","e4serva","4esh","e3sha","esh5en","e1si","e2sic","e2sid","es5iden","es5igna","e2s5im","es4i4n","esis4te","esi4u","e5skin","es4mi","e2sol","es3olu","e2son","es5ona","e1sp","es3per","es5pira","es4pre","2ess","es4si4b","estan4","es3tig","es5tim","4es2to","e3ston","2estr","e5stro","estruc5","e2sur","es5urr","es4w","eta4b","eten4d","e3teo","ethod3","et1ic","e5tide","etin4","eti4no","e5tir","e5titio","et5itiv","4etn","et5ona","e3tra","e3tre","et3ric","et5rif","et3rog","et5ros","et3ua","et5ym","et5z","4eu","e5un","e3up","eu3ro","eus4","eute4","euti5l","eu5tr","eva2p5","e2vas","ev5ast","e5vea","ev3ell","evel3o","e5veng","even4i","ev1er","e5verb","e1vi","ev3id","evi4l","e4vin","evi4v","e5voc","e5vu","e1wa","e4wag","e5wee","e3wh","ewil5","ew3ing","e3wit","1exp","5eyc","5eye.","eys4","1fa","fa3bl","fab3r","fa4ce","4fag","fain4","fall5e","4fa4ma","fam5is","5far","far5th","fa3ta","fa3the","4fato","fault5","4f5b","4fd","4fe.","feas4","feath3","fe4b","4feca","5fect","2fed","fe3li","fe4mo","fen2d","fend5e","fer1","5ferr","fev4","4f1f","f4fes","f4fie","f5fin.","f2f5is","f4fly","f2fy","4fh","1fi","fi3a","2f3ic.","4f3ical","f3ican","4ficate","f3icen","fi3cer","fic4i","5ficia","5ficie","4fics","fi3cu","fi5del","fight5","fil5i","fill5in","4fily","2fin","5fina","fin2d5","fi2ne","f1in3g","fin4n","fis4ti","f4l2","f5less","flin4","flo3re","f2ly5","4fm","4fn","1fo","5fon","fon4de","fon4t","fo2r","fo5rat","for5ay","fore5t","for4i","fort5a","fos5","4f5p","fra4t","f5rea","fres5c","fri2","fril4","frol5","2f3s","2ft","f4to","f2ty","3fu","fu5el","4fug","fu4min","fu5ne","fu3ri","fusi4","fus4s","4futa","1fy","1ga","gaf4","5gal.","3gali","ga3lo","2gam","ga5met","g5amo","gan5is","ga3niz","gani5za","4gano","gar5n4","gass4","gath3","4gativ","4gaz","g3b","gd4","2ge.","2ged","geez4","gel4in","ge5lis","ge5liz","4gely","1gen","ge4nat","ge5niz","4geno","4geny","1geo","ge3om","g4ery","5gesi","geth5","4geto","ge4ty","ge4v","4g1g2","g2ge","g3ger","gglu5","ggo4","gh3in","gh5out","gh4to","5gi.","1gi4a","gia5r","g1ic","5gicia","g4ico","gien5","5gies.","gil4","g3imen","3g4in.","gin5ge","5g4ins","5gio","3gir","gir4l","g3isl","gi4u","5giv","3giz","gl2","gla4","glad5i","5glas","1gle","gli4b","g3lig","3glo","glo3r","g1m","g4my","gn4a","g4na.","gnet4t","g1ni","g2nin","g4nio","g1no","g4non","1go","3go.","gob5","5goe","3g4o4g","go3is","gon2","4g3o3na","gondo5","go3ni","5goo","go5riz","gor5ou","5gos.","gov1","g3p","1gr","4grada","g4rai","gran2","5graph.","g5rapher","5graphic","4graphy","4gray","gre4n","4gress.","4grit","g4ro","gruf4","gs2","g5ste","gth3","gu4a","3guard","2gue","5gui5t","3gun","3gus","4gu4t","g3w","1gy","2g5y3n","gy5ra","h3ab4l","hach4","hae4m","hae4t","h5agu","ha3la","hala3m","ha4m","han4ci","han4cy","5hand.","han4g","hang5er","hang5o","h5a5niz","han4k","han4te","hap3l","hap5t","ha3ran","ha5ras","har2d","hard3e","har4le","harp5en","har5ter","has5s","haun4","5haz","haz3a","h1b","1head","3hear","he4can","h5ecat","h4ed","he5do5","he3l4i","hel4lis","hel4ly","h5elo","hem4p","he2n","hena4","hen5at","heo5r","hep5","h4era","hera3p","her4ba","here5a","h3ern","h5erou","h3ery","h1es","he2s5p","he4t","het4ed","heu4","h1f","h1h","hi5an","hi4co","high5","h4il2","himer4","h4ina","hion4e","hi4p","hir4l","hi3ro","hir4p","hir4r","his3el","his4s","hith5er","hi2v","4hk","4h1l4","hlan4","h2lo","hlo3ri","4h1m","hmet4","2h1n","h5odiz","h5ods","ho4g","hoge4","hol5ar","3hol4e","ho4ma","home3","hon4a","ho5ny","3hood","hoon4","hor5at","ho5ris","hort3e","ho5ru","hos4e","ho5sen","hos1p","1hous","house3","hov5el","4h5p","4hr4","hree5","hro5niz","hro3po","4h1s2","h4sh","h4tar","ht1en","ht5es","h4ty","hu4g","hu4min","hun5ke","hun4t","hus3t4","hu4t","h1w","h4wart","hy3pe","hy3ph","hy2s","2i1a","i2al","iam4","iam5ete","i2an","4ianc","ian3i","4ian4t","ia5pe","iass4","i4ativ","ia4tric","i4atu","ibe4","ib3era","ib5ert","ib5ia","ib3in","ib5it.","ib5ite","i1bl","ib3li","i5bo","i1br","i2b5ri","i5bun","4icam","5icap","4icar","i4car.","i4cara","icas5","i4cay","iccu4","4iceo","4ich","2ici","i5cid","ic5ina","i2cip","ic3ipa","i4cly","i2c5oc","4i1cr","5icra","i4cry","ic4te","ictu2","ic4t3ua","ic3ula","ic4um","ic5uo","i3cur","2id","i4dai","id5anc","id5d","ide3al","ide4s","i2di","id5ian","idi4ar","i5die","id3io","idi5ou","id1it","id5iu","i3dle","i4dom","id3ow","i4dr","i2du","id5uo","2ie4","ied4e","5ie5ga","ield3","ien5a4","ien4e","i5enn","i3enti","i1er.","i3esc","i1est","i3et","4if.","if5ero","iff5en","if4fr","4ific.","i3fie","i3fl","4ift","2ig","iga5b","ig3era","ight3i","4igi","i3gib","ig3il","ig3in","ig3it","i4g4l","i2go","ig3or","ig5ot","i5gre","igu5i","ig1ur","i3h","4i5i4","i3j","4ik","i1la","il3a4b","i4lade","i2l5am","ila5ra","i3leg","il1er","ilev4","il5f","il1i","il3ia","il2ib","il3io","il4ist","2ilit","il2iz","ill5ab","4iln","il3oq","il4ty","il5ur","il3v","i4mag","im3age","ima5ry","imenta5r","4imet","im1i","im5ida","imi5le","i5mini","4imit","im4ni","i3mon","i2mu","im3ula","2in.","i4n3au","4inav","incel4","in3cer","4ind","in5dling","2ine","i3nee","iner4ar","i5ness","4inga","4inge","in5gen","4ingi","in5gling","4ingo","4ingu","2ini","i5ni.","i4nia","in3io","in1is","i5nite.","5initio","in3ity","4ink","4inl","2inn","2i1no","i4no4c","ino4s","i4not","2ins","in3se","insur5a","2int.","2in4th","in1u","i5nus","4iny","2io","4io.","ioge4","io2gr","i1ol","io4m","ion3at","ion4ery","ion3i","io5ph","ior3i","i4os","io5th","i5oti","io4to","i4our","2ip","ipe4","iphras4","ip3i","ip4ic","ip4re4","ip3ul","i3qua","iq5uef","iq3uid","iq3ui3t","4ir","i1ra","ira4b","i4rac","ird5e","ire4de","i4ref","i4rel4","i4res","ir5gi","ir1i","iri5de","ir4is","iri3tu","5i5r2iz","ir4min","iro4g","5iron.","ir5ul","2is.","is5ag","is3ar","isas5","2is1c","is3ch","4ise","is3er","3isf","is5han","is3hon","ish5op","is3ib","isi4d","i5sis","is5itiv","4is4k","islan4","4isms","i2so","iso5mer","is1p","is2pi","is4py","4is1s","is4sal","issen4","is4ses","is4ta.","is1te","is1ti","ist4ly","4istral","i2su","is5us","4ita.","ita4bi","i4tag","4ita5m","i3tan","i3tat","2ite","it3era","i5teri","it4es","2ith","i1ti","4itia","4i2tic","it3ica","5i5tick","it3ig","it5ill","i2tim","2itio","4itis","i4tism","i2t5o5m","4iton","i4tram","it5ry","4itt","it3uat","i5tud","it3ul","4itz.","i1u","2iv","iv3ell","iv3en.","i4v3er.","i4vers.","iv5il.","iv5io","iv1it","i5vore","iv3o3ro","i4v3ot","4i5w","ix4o","4iy","4izar","izi4","5izont","5ja","jac4q","ja4p","1je","jer5s","4jestie","4jesty","jew3","jo4p","5judg","3ka.","k3ab","k5ag","kais4","kal4","k1b","k2ed","1kee","ke4g","ke5li","k3en4d","k1er","kes4","k3est.","ke4ty","k3f","kh4","k1i","5ki.","5k2ic","k4ill","kilo5","k4im","k4in.","kin4de","k5iness","kin4g","ki4p","kis4","k5ish","kk4","k1l","4kley","4kly","k1m","k5nes","1k2no","ko5r","kosh4","k3ou","kro5n","4k1s2","k4sc","ks4l","k4sy","k5t","k1w","lab3ic","l4abo","laci4","l4ade","la3dy","lag4n","lam3o","3land","lan4dl","lan5et","lan4te","lar4g","lar3i","las4e","la5tan","4lateli","4lativ","4lav","la4v4a","2l1b","lbin4","4l1c2","lce4","l3ci","2ld","l2de","ld4ere","ld4eri","ldi4","ld5is","l3dr","l4dri","le2a","le4bi","left5","5leg.","5legg","le4mat","lem5atic","4len.","3lenc","5lene.","1lent","le3ph","le4pr","lera5b","ler4e","3lerg","3l4eri","l4ero","les2","le5sco","5lesq","3less","5less.","l3eva","lev4er.","lev4era","lev4ers","3ley","4leye","2lf","l5fr","4l1g4","l5ga","lgar3","l4ges","lgo3","2l3h","li4ag","li2am","liar5iz","li4as","li4ato","li5bi","5licio","li4cor","4lics","4lict.","l4icu","l3icy","l3ida","lid5er","3lidi","lif3er","l4iff","li4fl","5ligate","3ligh","li4gra","3lik","4l4i4l","lim4bl","lim3i","li4mo","l4im4p","l4ina","1l4ine","lin3ea","lin3i","link5er","li5og","4l4iq","lis4p","l1it","l2it.","5litica","l5i5tics","liv3er","l1iz","4lj","lka3","l3kal","lka4t","l1l","l4law","l2le","l5lea","l3lec","l3leg","l3lel","l3le4n","l3le4t","ll2i","l2lin4","l5lina","ll4o","lloqui5","ll5out","l5low","2lm","l5met","lm3ing","l4mod","lmon4","2l1n2","3lo.","lob5al","lo4ci","4lof","3logic","l5ogo","3logu","lom3er","5long","lon4i","l3o3niz","lood5","5lope.","lop3i","l3opm","lora4","lo4rato","lo5rie","lor5ou","5los.","los5et","5losophiz","5losophy","los4t","lo4ta","loun5d","2lout","4lov","2lp","lpa5b","l3pha","l5phi","lp5ing","l3pit","l4pl","l5pr","4l1r","2l1s2","l4sc","l2se","l4sie","4lt","lt5ag","ltane5","l1te","lten4","ltera4","lth3i","l5ties.","ltis4","l1tr","ltu2","ltur3a","lu5a","lu3br","luch4","lu3ci","lu3en","luf4","lu5id","lu4ma","5lumi","l5umn.","5lumnia","lu3o","luo3r","4lup","luss4","lus3te","1lut","l5ven","l5vet4","2l1w","1ly","4lya","4lyb","ly5me","ly3no","2lys4","l5yse","1ma","2mab","ma2ca","ma5chine","ma4cl","mag5in","5magn","2mah","maid5","4mald","ma3lig","ma5lin","mal4li","mal4ty","5mania","man5is","man3iz","4map","ma5rine.","ma5riz","mar4ly","mar3v","ma5sce","mas4e","mas1t","5mate","math3","ma3tis","4matiza","4m1b","mba4t5","m5bil","m4b3ing","mbi4v","4m5c","4me.","2med","4med.","5media","me3die","m5e5dy","me2g","mel5on","mel4t","me2m","mem1o3","1men","men4a","men5ac","men4de","4mene","men4i","mens4","mensu5","3ment","men4te","me5on","m5ersa","2mes","3mesti","me4ta","met3al","me1te","me5thi","m4etr","5metric","me5trie","me3try","me4v","4m1f","2mh","5mi.","mi3a","mid4a","mid4g","mig4","3milia","m5i5lie","m4ill","min4a","3mind","m5inee","m4ingl","min5gli","m5ingly","min4t","m4inu","miot4","m2is","mis4er.","mis5l","mis4ti","m5istry","4mith","m2iz","4mk","4m1l","m1m","mma5ry","4m1n","mn4a","m4nin","mn4o","1mo","4mocr","5mocratiz","mo2d1","mo4go","mois2","moi5se","4mok","mo5lest","mo3me","mon5et","mon5ge","moni3a","mon4ism","mon4ist","mo3niz","monol4","mo3ny.","mo2r","4mora.","mos2","mo5sey","mo3sp","moth3","m5ouf","3mous","mo2v","4m1p","mpara5","mpa5rab","mpar5i","m3pet","mphas4","m2pi","mpi4a","mp5ies","m4p1in","m5pir","mp5is","mpo3ri","mpos5ite","m4pous","mpov5","mp4tr","m2py","4m3r","4m1s2","m4sh","m5si","4mt","1mu","mula5r4","5mult","multi3","3mum","mun2","4mup","mu4u","4mw","1na","2n1a2b","n4abu","4nac.","na4ca","n5act","nag5er.","nak4","na4li","na5lia","4nalt","na5mit","n2an","nanci4","nan4it","nank4","nar3c","4nare","nar3i","nar4l","n5arm","n4as","nas4c","nas5ti","n2at","na3tal","nato5miz","n2au","nau3se","3naut","nav4e","4n1b4","ncar5","n4ces.","n3cha","n5cheo","n5chil","n3chis","nc1in","nc4it","ncour5a","n1cr","n1cu","n4dai","n5dan","n1de","nd5est.","ndi4b","n5d2if","n1dit","n3diz","n5duc","ndu4r","nd2we","2ne.","n3ear","ne2b","neb3u","ne2c","5neck","2ned","ne4gat","neg5ativ","5nege","ne4la","nel5iz","ne5mi","ne4mo","1nen","4nene","3neo","ne4po","ne2q","n1er","nera5b","n4erar","n2ere","n4er5i","ner4r","1nes","2nes.","4nesp","2nest","4nesw","3netic","ne4v","n5eve","ne4w","n3f","n4gab","n3gel","nge4n4e","n5gere","n3geri","ng5ha","n3gib","ng1in","n5git","n4gla","ngov4","ng5sh","n1gu","n4gum","n2gy","4n1h4","nha4","nhab3","nhe4","3n4ia","ni3an","ni4ap","ni3ba","ni4bl","ni4d","ni5di","ni4er","ni2fi","ni5ficat","n5igr","nik4","n1im","ni3miz","n1in","5nine.","nin4g","ni4o","5nis.","nis4ta","n2it","n4ith","3nitio","n3itor","ni3tr","n1j","4nk2","n5kero","n3ket","nk3in","n1kl","4n1l","n5m","nme4","nmet4","4n1n2","nne4","nni3al","nni4v","nob4l","no3ble","n5ocl","4n3o2d","3noe","4nog","noge4","nois5i","no5l4i","5nologis","3nomic","n5o5miz","no4mo","no3my","no4n","non4ag","non5i","n5oniz","4nop","5nop5o5li","nor5ab","no4rary","4nosc","nos4e","nos5t","no5ta","1nou","3noun","nov3el3","nowl3","n1p4","npi4","npre4c","n1q","n1r","nru4","2n1s2","ns5ab","nsati4","ns4c","n2se","n4s3es","nsid1","nsig4","n2sl","ns3m","n4soc","ns4pe","n5spi","nsta5bl","n1t","nta4b","nter3s","nt2i","n5tib","nti4er","nti2f","n3tine","n4t3ing","nti4p","ntrol5li","nt4s","ntu3me","nu1a","nu4d","nu5en","nuf4fe","n3uin","3nu3it","n4um","nu1me","n5umi","3nu4n","n3uo","nu3tr","n1v2","n1w4","nym4","nyp4","4nz","n3za","4oa","oad3","o5a5les","oard3","oas4e","oast5e","oat5i","ob3a3b","o5bar","obe4l","o1bi","o2bin","ob5ing","o3br","ob3ul","o1ce","och4","o3chet","ocif3","o4cil","o4clam","o4cod","oc3rac","oc5ratiz","ocre3","5ocrit","octor5a","oc3ula","o5cure","od5ded","od3ic","odi3o","o2do4","odor3","od5uct.","od5ucts","o4el","o5eng","o3er","oe4ta","o3ev","o2fi","of5ite","ofit4t","o2g5a5r","og5ativ","o4gato","o1ge","o5gene","o5geo","o4ger","o3gie","1o1gis","og3it","o4gl","o5g2ly","3ogniz","o4gro","ogu5i","1ogy","2ogyn","o1h2","ohab5","oi2","oic3es","oi3der","oiff4","oig4","oi5let","o3ing","oint5er","o5ism","oi5son","oist5en","oi3ter","o5j","2ok","o3ken","ok5ie","o1la","o4lan","olass4","ol2d","old1e","ol3er","o3lesc","o3let","ol4fi","ol2i","o3lia","o3lice","ol5id.","o3li4f","o5lil","ol3ing","o5lio","o5lis.","ol3ish","o5lite","o5litio","o5liv","olli4e","ol5ogiz","olo4r","ol5pl","ol2t","ol3ub","ol3ume","ol3un","o5lus","ol2v","o2ly","om5ah","oma5l","om5atiz","om2be","om4bl","o2me","om3ena","om5erse","o4met","om5etry","o3mia","om3ic.","om3ica","o5mid","om1in","o5mini","5ommend","omo4ge","o4mon","om3pi","ompro5","o2n","on1a","on4ac","o3nan","on1c","3oncil","2ond","on5do","o3nen","on5est","on4gu","on1ic","o3nio","on1is","o5niu","on3key","on4odi","on3omy","on3s","onspi4","onspir5a","onsu4","onten4","on3t4i","ontif5","on5um","onva5","oo2","ood5e","ood5i","oo4k","oop3i","o3ord","oost5","o2pa","ope5d","op1er","3opera","4operag","2oph","o5phan","o5pher","op3ing","o3pit","o5pon","o4posi","o1pr","op1u","opy5","o1q","o1ra","o5ra.","o4r3ag","or5aliz","or5ange","ore5a","o5real","or3ei","ore5sh","or5est.","orew4","or4gu","4o5ria","or3ica","o5ril","or1in","o1rio","or3ity","o3riu","or2mi","orn2e","o5rof","or3oug","or5pe","3orrh","or4se","ors5en","orst4","or3thi","or3thy","or4ty","o5rum","o1ry","os3al","os2c","os4ce","o3scop","4oscopi","o5scr","os4i4e","os5itiv","os3ito","os3ity","osi4u","os4l","o2so","os4pa","os4po","os2ta","o5stati","os5til","os5tit","o4tan","otele4g","ot3er.","ot5ers","o4tes","4oth","oth5esi","oth3i4","ot3ic.","ot5ica","o3tice","o3tif","o3tis","oto5s","ou2","ou3bl","ouch5i","ou5et","ou4l","ounc5er","oun2d","ou5v","ov4en","over4ne","over3s","ov4ert","o3vis","oviti4","o5v4ol","ow3der","ow3el","ow5est","ow1i","own5i","o4wo","oy1a","1pa","pa4ca","pa4ce","pac4t","p4ad","5pagan","p3agat","p4ai","pain4","p4al","pan4a","pan3el","pan4ty","pa3ny","pa1p","pa4pu","para5bl","par5age","par5di","3pare","par5el","p4a4ri","par4is","pa2te","pa5ter","5pathic","pa5thy","pa4tric","pav4","3pay","4p1b","pd4","4pe.","3pe4a","pear4l","pe2c","2p2ed","3pede","3pedi","pedia4","ped4ic","p4ee","pee4d","pek4","pe4la","peli4e","pe4nan","p4enc","pen4th","pe5on","p4era.","pera5bl","p4erag","p4eri","peri5st","per4mal","perme5","p4ern","per3o","per3ti","pe5ru","per1v","pe2t","pe5ten","pe5tiz","4pf","4pg","4ph.","phar5i","phe3no","ph4er","ph4es.","ph1ic","5phie","ph5ing","5phisti","3phiz","ph2l","3phob","3phone","5phoni","pho4r","4phs","ph3t","5phu","1phy","pi3a","pian4","pi4cie","pi4cy","p4id","p5ida","pi3de","5pidi","3piec","pi3en","pi4grap","pi3lo","pi2n","p4in.","pind4","p4ino","3pi1o","pion4","p3ith","pi5tha","pi2tu","2p3k2","1p2l2","3plan","plas5t","pli3a","pli5er","4plig","pli4n","ploi4","plu4m","plum4b","4p1m","2p3n","po4c","5pod.","po5em","po3et5","5po4g","poin2","5point","poly5t","po4ni","po4p","1p4or","po4ry","1pos","pos1s","p4ot","po4ta","5poun","4p1p","ppa5ra","p2pe","p4ped","p5pel","p3pen","p3per","p3pet","ppo5site","pr2","pray4e","5preci","pre5co","pre3em","pref5ac","pre4la","pre3r","p3rese","3press","pre5ten","pre3v","5pri4e","prin4t3","pri4s","pris3o","p3roca","prof5it","pro3l","pros3e","pro1t","2p1s2","p2se","ps4h","p4sib","2p1t","pt5a4b","p2te","p2th","pti3m","ptu4r","p4tw","pub3","pue4","puf4","pul3c","pu4m","pu2n","pur4r","5pus","pu2t","5pute","put3er","pu3tr","put4ted","put4tin","p3w","qu2","qua5v","2que.","3quer","3quet","2rab","ra3bi","rach4e","r5acl","raf5fi","raf4t","r2ai","ra4lo","ram3et","r2ami","rane5o","ran4ge","r4ani","ra5no","rap3er","3raphy","rar5c","rare4","rar5ef","4raril","r2as","ration4","rau4t","ra5vai","rav3el","ra5zie","r1b","r4bab","r4bag","rbi2","rbi4f","r2bin","r5bine","rb5ing.","rb4o","r1c","r2ce","rcen4","r3cha","rch4er","r4ci4b","rc4it","rcum3","r4dal","rd2i","rdi4a","rdi4er","rdin4","rd3ing","2re.","re1al","re3an","re5arr","5reav","re4aw","r5ebrat","rec5oll","rec5ompe","re4cre","2r2ed","re1de","re3dis","red5it","re4fac","re2fe","re5fer.","re3fi","re4fy","reg3is","re5it","re1li","re5lu","r4en4ta","ren4te","re1o","re5pin","re4posi","re1pu","r1er4","r4eri","rero4","re5ru","r4es.","re4spi","ress5ib","res2t","re5stal","re3str","re4ter","re4ti4z","re3tri","reu2","re5uti","rev2","re4val","rev3el","r5ev5er.","re5vers","re5vert","re5vil","rev5olu","re4wh","r1f","rfu4","r4fy","rg2","rg3er","r3get","r3gic","rgi4n","rg3ing","r5gis","r5git","r1gl","rgo4n","r3gu","rh4","4rh.","4rhal","ri3a","ria4b","ri4ag","r4ib","rib3a","ric5as","r4ice","4rici","5ricid","ri4cie","r4ico","rid5er","ri3enc","ri3ent","ri1er","ri5et","rig5an","5rigi","ril3iz","5riman","rim5i","3rimo","rim4pe","r2ina","5rina.","rin4d","rin4e","rin4g","ri1o","5riph","riph5e","ri2pl","rip5lic","r4iq","r2is","r4is.","ris4c","r3ish","ris4p","ri3ta3b","r5ited.","rit5er.","rit5ers","rit3ic","ri2tu","rit5ur","riv5el","riv3et","riv3i","r3j","r3ket","rk4le","rk4lin","r1l","rle4","r2led","r4lig","r4lis","rl5ish","r3lo4","r1m","rma5c","r2me","r3men","rm5ers","rm3ing","r4ming.","r4mio","r3mit","r4my","r4nar","r3nel","r4ner","r5net","r3ney","r5nic","r1nis4","r3nit","r3niv","rno4","r4nou","r3nu","rob3l","r2oc","ro3cr","ro4e","ro1fe","ro5fil","rok2","ro5ker","5role.","rom5ete","rom4i","rom4p","ron4al","ron4e","ro5n4is","ron4ta","1room","5root","ro3pel","rop3ic","ror3i","ro5ro","ros5per","ros4s","ro4the","ro4ty","ro4va","rov5el","rox5","r1p","r4pea","r5pent","rp5er.","r3pet","rp4h4","rp3ing","r3po","r1r4","rre4c","rre4f","r4reo","rre4st","rri4o","rri4v","rron4","rros4","rrys4","4rs2","r1sa","rsa5ti","rs4c","r2se","r3sec","rse4cr","rs5er.","rs3es","rse5v2","r1sh","r5sha","r1si","r4si4b","rson3","r1sp","r5sw","rtach4","r4tag","r3teb","rten4d","rte5o","r1ti","rt5ib","rti4d","r4tier","r3tig","rtil3i","rtil4l","r4tily","r4tist","r4tiv","r3tri","rtroph4","rt4sh","ru3a","ru3e4l","ru3en","ru4gl","ru3in","rum3pl","ru2n","runk5","run4ty","r5usc","ruti5n","rv4e","rvel4i","r3ven","rv5er.","r5vest","r3vey","r3vic","rvi4v","r3vo","r1w","ry4c","5rynge","ry3t","sa2","2s1ab","5sack","sac3ri","s3act","5sai","salar4","sal4m","sa5lo","sal4t","3sanc","san4de","s1ap","sa5ta","5sa3tio","sat3u","sau4","sa5vor","5saw","4s5b","scan4t5","sca4p","scav5","s4ced","4scei","s4ces","sch2","s4cho","3s4cie","5scin4d","scle5","s4cli","scof4","4scopy","scour5a","s1cu","4s5d","4se.","se4a","seas4","sea5w","se2c3o","3sect","4s4ed","se4d4e","s5edl","se2g","seg3r","5sei","se1le","5self","5selv","4seme","se4mol","sen5at","4senc","sen4d","s5ened","sen5g","s5enin","4sentd","4sentl","sep3a3","4s1er.","s4erl","ser4o","4servo","s1e4s","se5sh","ses5t","5se5um","5sev","sev3en","sew4i","5sex","4s3f","2s3g","s2h","2sh.","sh1er","5shev","sh1in","sh3io","3ship","shiv5","sho4","sh5old","shon3","shor4","short5","4shw","si1b","s5icc","3side.","5sides","5sidi","si5diz","4signa","sil4e","4sily","2s1in","s2ina","5sine.","s3ing","1sio","5sion","sion5a","si2r","sir5a","1sis","3sitio","5siu","1siv","5siz","sk2","4ske","s3ket","sk5ine","sk5ing","s1l2","s3lat","s2le","slith5","2s1m","s3ma","small3","sman3","smel4","s5men","5smith","smol5d4","s1n4","1so","so4ce","soft3","so4lab","sol3d2","so3lic","5solv","3som","3s4on.","sona4","son4g","s4op","5sophic","s5ophiz","s5ophy","sor5c","sor5d","4sov","so5vi","2spa","5spai","spa4n","spen4d","2s5peo","2sper","s2phe","3spher","spho5","spil4","sp5ing","4spio","s4ply","s4pon","spor4","4spot","squal4l","s1r","2ss","s1sa","ssas3","s2s5c","s3sel","s5seng","s4ses.","s5set","s1si","s4sie","ssi4er","ss5ily","s4sl","ss4li","s4sn","sspend4","ss2t","ssur5a","ss5w","2st.","s2tag","s2tal","stam4i","5stand","s4ta4p","5stat.","s4ted","stern5i","s5tero","ste2w","stew5a","s3the","st2i","s4ti.","s5tia","s1tic","5stick","s4tie","s3tif","st3ing","5stir","s1tle","5stock","stom3a","5stone","s4top","3store","st4r","s4trad","5stratu","s4tray","s4trid","4stry","4st3w","s2ty","1su","su1al","su4b3","su2g3","su5is","suit3","s4ul","su2m","sum3i","su2n","su2r","4sv","sw2","4swo","s4y","4syc","3syl","syn5o","sy5rin","1ta","3ta.","2tab","ta5bles","5taboliz","4taci","ta5do","4taf4","tai5lo","ta2l","ta5la","tal5en","tal3i","4talk","tal4lis","ta5log","ta5mo","tan4de","tanta3","ta5per","ta5pl","tar4a","4tarc","4tare","ta3riz","tas4e","ta5sy","4tatic","ta4tur","taun4","tav4","2taw","tax4is","2t1b","4tc","t4ch","tch5et","4t1d","4te.","tead4i","4teat","tece4","5tect","2t1ed","te5di","1tee","teg4","te5ger","te5gi","3tel.","teli4","5tels","te2ma2","tem3at","3tenan","3tenc","3tend","4tenes","1tent","ten4tag","1teo","te4p","te5pe","ter3c","5ter3d","1teri","ter5ies","ter3is","teri5za","5ternit","ter5v","4tes.","4tess","t3ess.","teth5e","3teu","3tex","4tey","2t1f","4t1g","2th.","than4","th2e","4thea","th3eas","the5at","the3is","3thet","th5ic.","th5ica","4thil","5think","4thl","th5ode","5thodic","4thoo","thor5it","tho5riz","2ths","1tia","ti4ab","ti4ato","2ti2b","4tick","t4ico","t4ic1u","5tidi","3tien","tif2","ti5fy","2tig","5tigu","till5in","1tim","4timp","tim5ul","2t1in","t2ina","3tine.","3tini","1tio","ti5oc","tion5ee","5tiq","ti3sa","3tise","tis4m","ti5so","tis4p","5tistica","ti3tl","ti4u","1tiv","tiv4a","1tiz","ti3za","ti3zen","2tl","t5la","tlan4","3tle.","3tled","3tles.","t5let.","t5lo","4t1m","tme4","2t1n2","1to","to3b","to5crat","4todo","2tof","to2gr","to5ic","to2ma","tom4b","to3my","ton4ali","to3nat","4tono","4tony","to2ra","to3rie","tor5iz","tos2","5tour","4tout","to3war","4t1p","1tra","tra3b","tra5ch","traci4","trac4it","trac4te","tras4","tra5ven","trav5es5","tre5f","tre4m","trem5i","5tria","tri5ces","5tricia","4trics","2trim","tri4v","tro5mi","tron5i","4trony","tro5phe","tro3sp","tro3v","tru5i","trus4","4t1s2","t4sc","tsh4","t4sw","4t3t2","t4tes","t5to","ttu4","1tu","tu1a","tu3ar","tu4bi","tud2","4tue","4tuf4","5tu3i","3tum","tu4nis","2t3up.","3ture","5turi","tur3is","tur5o","tu5ry","3tus","4tv","tw4","4t1wa","twis4","4two","1ty","4tya","2tyl","type3","ty5ph","4tz","tz4e","4uab","uac4","ua5na","uan4i","uar5ant","uar2d","uar3i","uar3t","u1at","uav4","ub4e","u4bel","u3ber","u4bero","u1b4i","u4b5ing","u3ble.","u3ca","uci4b","uc4it","ucle3","u3cr","u3cu","u4cy","ud5d","ud3er","ud5est","udev4","u1dic","ud3ied","ud3ies","ud5is","u5dit","u4don","ud4si","u4du","u4ene","uens4","uen4te","uer4il","3ufa","u3fl","ugh3en","ug5in","2ui2","uil5iz","ui4n","u1ing","uir4m","uita4","uiv3","uiv4er.","u5j","4uk","u1la","ula5b","u5lati","ulch4","5ulche","ul3der","ul4e","u1len","ul4gi","ul2i","u5lia","ul3ing","ul5ish","ul4lar","ul4li4b","ul4lis","4ul3m","u1l4o","4uls","uls5es","ul1ti","ultra3","4ultu","u3lu","ul5ul","ul5v","um5ab","um4bi","um4bly","u1mi","u4m3ing","umor5o","um2p","unat4","u2ne","un4er","u1ni","un4im","u2nin","un5ish","uni3v","un3s4","un4sw","unt3ab","un4ter.","un4tes","unu4","un5y","un5z","u4ors","u5os","u1ou","u1pe","uper5s","u5pia","up3ing","u3pl","up3p","upport5","upt5ib","uptu4","u1ra","4ura.","u4rag","u4ras","ur4be","urc4","ur1d","ure5at","ur4fer","ur4fr","u3rif","uri4fic","ur1in","u3rio","u1rit","ur3iz","ur2l","url5ing.","ur4no","uros4","ur4pe","ur4pi","urs5er","ur5tes","ur3the","urti4","ur4tie","u3ru","2us","u5sad","u5san","us4ap","usc2","us3ci","use5a","u5sia","u3sic","us4lin","us1p","us5sl","us5tere","us1tr","u2su","usur4","uta4b","u3tat","4ute.","4utel","4uten","uten4i","4u1t2i","uti5liz","u3tine","ut3ing","ution5a","u4tis","5u5tiz","u4t1l","ut5of","uto5g","uto5matic","u5ton","u4tou","uts4","u3u","uu4m","u1v2","uxu3","uz4e","1va","5va.","2v1a4b","vac5il","vac3u","vag4","va4ge","va5lie","val5o","val1u","va5mo","va5niz","va5pi","var5ied","3vat","4ve.","4ved","veg3","v3el.","vel3li","ve4lo","v4ely","ven3om","v5enue","v4erd","5vere.","v4erel","v3eren","ver5enc","v4eres","ver3ie","vermi4n","3verse","ver3th","v4e2s","4ves.","ves4te","ve4te","vet3er","ve4ty","vi5ali","5vian","5vide.","5vided","4v3iden","5vides","5vidi","v3if","vi5gn","vik4","2vil","5vilit","v3i3liz","v1in","4vi4na","v2inc","vin5d","4ving","vio3l","v3io4r","vi1ou","vi4p","vi5ro","vis3it","vi3so","vi3su","4viti","vit3r","4vity","3viv","5vo.","voi4","3vok","vo4la","v5ole","5volt","3volv","vom5i","vor5ab","vori4","vo4ry","vo4ta","4votee","4vv4","v4y","w5abl","2wac","wa5ger","wag5o","wait5","w5al.","wam4","war4t","was4t","wa1te","wa5ver","w1b","wea5rie","weath3","wed4n","weet3","wee5v","wel4l","w1er","west3","w3ev","whi4","wi2","wil2","will5in","win4de","win4g","wir4","3wise","with3","wiz5","w4k","wl4es","wl3in","w4no","1wo2","wom1","wo5ven","w5p","wra4","wri4","writa4","w3sh","ws4l","ws4pe","w5s4t","4wt","wy4","x1a","xac5e","x4ago","xam3","x4ap","xas5","x3c2","x1e","xe4cuto","x2ed","xer4i","xe5ro","x1h","xhi2","xhil5","xhu4","x3i","xi5a","xi5c","xi5di","x4ime","xi5miz","x3o","x4ob","x3p","xpan4d","xpecto5","xpe3d","x1t2","x3ti","x1u","xu3a","xx4","y5ac","3yar4","y5at","y1b","y1c","y2ce","yc5er","y3ch","ych4e","ycom4","ycot4","y1d","y5ee","y1er","y4erf","yes4","ye4t","y5gi","4y3h","y1i","y3la","ylla5bl","y3lo","y5lu","ymbol5","yme4","ympa3","yn3chr","yn5d","yn5g","yn5ic","5ynx","y1o4","yo5d","y4o5g","yom4","yo5net","y4ons","y4os","y4ped","yper5","yp3i","y3po","y4poc","yp2ta","y5pu","yra5m","yr5ia","y3ro","yr4r","ys4c","y3s2e","ys3ica","ys3io","3ysis","y4so","yss4","ys1t","ys3ta","ysur4","y3thin","yt3ic","y1w","za1","z5a2b","zar2","4zb","2ze","ze4n","ze4p","z1er","ze3ro","zet4","2z1i","z4il","z4is","5zl","4zm","1zo","zo4m","zo5ol","zte4","4z1z2","z4zy",".con5gr",".de5riva",".dri5v4",".eth1y6l1",".eu4ler",".ev2",".ever5si5b",".ga4s1om1",".ge4ome",".ge5ot1",".he3mo1",".he3p6a",".he3roe",".in5u2t",".kil2n3i",".ko6r1te1",".le6ices",".me4ga1l",".met4ala",".mim5i2c1",".mi1s4ers",".ne6o3f",".noe1th",".non1e2m",".poly1s",".post1am",".pre1am",".rav5en1o",".semi5",".sem4ic",".semid6",".semip4",".semir4",".sem6is4",".semiv4",".sph6in1",".spin1o",".ta5pes1tr",".te3legr",".to6pog",".to2q",".un3at5t",".un5err5",".vi2c3ar",".we2b1l",".re1e4c","a5bolic","a2cabl","af6fish","am1en3ta5b","anal6ys","ano5a2c","ans5gr","ans3v","anti1d","an3ti1n2","anti1re","a4pe5able","ar3che5t","ar2range","as5ymptot","ath3er1o1s","at6tes.","augh4tl","au5li5f","av3iou","back2er.","ba6r1onie","ba1thy","bbi4t","be2vie","bi5d2if","bil2lab","bio5m","bi1orb","bio1rh","b1i3tive","blan2d1","blin2d1","blon2d2","bor1no5","bo2t1u1l","brus4q","bus6i2er","bus6i2es","buss4ing","but2ed.","but4ted","cad5e1m","cat1a1s2","4chs.","chs3hu","chie5vo","cig3a3r","cin2q","cle4ar","co6ph1o3n","cous2ti","cri3tie","croc1o1d","cro5e2co","c2tro3me6c","1cu2r1ance","2d3alone","data1b","dd5a5b","d2d5ib","de4als.","de5clar1","de2c5lina","de3fin3iti","de2mos","des3ic","de2tic","dic1aid","dif5fra","3di1methy","di2ren","di2rer","2d1lead","2d1li2e","3do5word","dren1a5l","drif2t1a","d1ri3pleg5","drom3e5d","d3tab","du2al.","du1op1o1l","ea4n3ies","e3chas","edg1l","ed1uling","eli2t1is","e1loa","en1dix","eo3grap","1e6p3i3neph1","e2r3i4an.","e3spac6i","eth1y6l1ene","5eu2clid1","feb1rua","fermi1o","3fich","fit5ted.","fla1g6el","flow2er.","3fluor","gen2cy.","ge3o1d","ght1we","g1lead","get2ic.","4g1lish","5glo5bin","1g2nac","gnet1ism","gno5mo","g2n1or.","g2noresp","2g1o4n3i1za","graph5er.","griev1","g1utan","hair1s","ha2p3ar5r","hatch1","hex2a3","hite3sid","h3i5pel1a4","hnau3z","ho6r1ic.","h2t1eou","hypo1tha","id4ios","ifac1et","ign4it","ignit1er","i4jk","im3ped3a","infra1s2","i5nitely.","irre6v3oc","i1tesima","ith5i2l","itin5er5ar","janu3a","japan1e2s","je1re1m","1ke6ling","1ki5netic","1kovian","k3sha","la4c3i5e","lai6n3ess","lar5ce1n","l3chai","l3chil6d1","lead6er.","lea4s1a","1lec3ta6b","le3g6en2dre","1le1noid","lith1o5g","ll1fl","l2l3ish","l5mo3nell","lo1bot1o1","lo2ges.","load4ed.","load6er.","l3tea","lth5i2ly","lue1p","1lunk3er","1lum5bia.","3lyg1a1mi","ly5styr","ma1la1p","m2an.","man3u1sc","mar1gin1","medi2c","med3i3cin","medio6c1","me3gran3","m2en.","3mi3da5b","3milita","mil2l1ag","mil5li5li","mi6n3is.","mi1n2ut1er","mi1n2ut1est","m3ma1b","5maph1ro1","5moc1ra1t","mo5e2las","mol1e5c","mon4ey1l","mono3ch","mo4no1en","moro6n5is","mono1s6","moth4et2","m1ou3sin","m5shack2","mu2dro","mul2ti5u","n3ar4chs.","n3ch2es1t","ne3back","2ne1ski","n1dieck","nd3thr","nfi6n3ites","4n5i4an.","nge5nes","ng1ho","ng1spr","nk3rup","n5less","5noc3er1os","nom1a6l","nom5e1no","n1o1mist","non1eq","non1i4so","5nop1oly.","no1vemb","ns5ceiv","ns4moo","ntre1p","obli2g1","o3chas","odel3li","odit1ic","oerst2","oke1st","o3les3ter","oli3gop1o1","o1lo3n4om","o3mecha6","onom1ic","o3norma","o3no2t1o3n","o3nou","op1ism.","or4tho3ni4t","orth1ri","or5tively","o4s3pher","o5test1er","o5tes3tor","oth3e1o1s","ou3ba3do","o6v3i4an.","oxi6d1ic","pal6mat","parag6ra4","par4a1le","param4","para3me","pee2v1","phi2l3ant","phi5lat1e3l","pi2c1a3d","pli2c1ab","pli5nar","poin3ca","1pole.","poly1e","po3lyph1ono","1prema3c","pre1neu","pres2pli","pro2cess","proc3i3ty.","pro2g1e","3pseu2d","pseu3d6o3d2","pseu3d6o3f2","pto3mat4","p5trol3","pu5bes5c","quain2t1e","qu6a3si3","quasir6","quasis6","quin5tes5s","qui3v4ar","r1abolic","3rab1o1loi","ra3chu","r3a3dig","radi1o6g","r2amen","3ra4m5e1triz","ra3mou","ra5n2has","ra1or","r3bin1ge","re2c3i1pr","rec5t6ang","re4t1ribu","r3ial.","riv1o1l","6rk.","rk1ho","r1krau","6rks.","r5le5qu","ro1bot1","ro5e2las","ro5epide1","ro3mesh","ro1tron","r3pau5li","rse1rad1i","r1thou","r1treu","r1veil","rz1sc","sales3c","sales5w","5sa3par5il","sca6p1er","sca2t1ol","s4chitz","schro1ding1","1sci2utt","scrap4er.","scy4th1","sem1a1ph","se3mes1t","se1mi6t5ic","sep3temb","shoe1st","sid2ed.","side5st","side5sw","si5resid","sky1sc","3slova1kia","3s2og1a1my","so2lute","3s2pace","1s2pacin","spe3cio","spher1o","spi2c1il","spokes5w","sports3c","sports3w","s3qui3to","s2s1a3chu1","ss3hat","s2s3i4an.","s5sign5a3b","1s2tamp","s2t1ant5shi","star3tli","sta1ti","st5b","1stor1ab","strat1a1g","strib5ut","st5scr","stu1pi4d1","styl1is","su2per1e6","1sync","1syth3i2","swimm6","5tab1o1lism","ta3gon.","talk1a5","t1a1min","t6ap6ath","5tar2rh","tch1c","tch3i1er","t1cr","teach4er.","tele2g","tele1r6o","3ter1gei","ter2ic.","t3ess2es","tha4l1am","tho3don","th1o5gen1i","tho1k2er","thy4l1an","thy3sc","2t3i4an.","ti2n3o1m","t1li2er","tolo2gy","tot3ic","trai3tor1","tra1vers","travers3a3b","treach1e","tr4ial.","3tro1le1um","trof4ic.","tro3fit","tro1p2is","3trop1o5les","3trop1o5lis","t1ro1pol3it","tsch3ie","ttrib1ut1","turn3ar","t1wh","ty2p5al","ua3drati","uad1ratu","u5do3ny","uea1m","u2r1al.","uri4al.","us2er.","v1ativ","v1oir5du1","va6guer","vaude3v","1verely.","v1er1eig","ves1tite","vi1vip3a3r","voice1p","waste3w6a2","wave1g4","w3c","week1n","wide5sp","wo4k1en","wrap3aro","writ6er.","x1q","xquis3","y5che3d","ym5e5try","y1stro","yes5ter1y","z3ian.","z3o1phr","z2z3w",""],exceptions:["as-so-ciate","as-so-ciates","dec-li-na-tion","oblig-a-tory","phil-an-thropic","present","presents","project","projects","reci-procity","re-cog-ni-zance","ref-or-ma-tion","ret-ri-bu-tion","ta-ble",""]}})),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():e.createHyphenator=t()}(this,(function(){var e="object"==typeof global?global:"object"==typeof window?window:"object"==typeof this?this:{};function t(e){var t={};for(var i in e)t[i]=e[i];return t}function i(e,t,i){return t in e?e[t]:i}function n(e,t){return e.exceptions.reduce((function(e,i){return e[i.replace(/\-/g,"")]=i.replace(/\-/g,t),e}),{})}function r(e,t,i,n){for(var r,s=new Array(e.length+1),o=e.toLocaleLowerCase(),a=[],l=0,c=s.length;c--;)s[c]=0;for(;r=t[l++];)for(var h=0,u=!1;!u;){var d=o.indexOf(r.text,h);if(d>-1&&(!r.stickToLeft||0===d)&&(!r.stickToRight||d+r.text.length===e.length)){a.push(r.pattern+">"+r.levels.join(""));for(c=0;c<r.levels.length;c++)s[d+c]=Math.max(r.levels[c],s[d+c])}d>-1&&r.text.length>0?h=d+r.text.length+1:u=!0}s[0]=s[1]=s[s.length-1]=s[s.length-2]=0;var f="",p="",g="";for(c=0;c<s.length;c++)f+=(s[c]%2==1?n:"")+e.charAt(c),g+=(s[c]%2==1?"-":"")+e.charAt(c),p+=(s[c]>0?s[c]:"")+e.charAt(c);return i&&console.log.apply(console,[e,"->"].concat(a).concat(["->"]).concat(s).concat(["->",p]).concat(["->",g])),f}function s(e){for(var t,i=0,n={pattern:e,text:"",levels:[],stickToLeft:0,stickToRight:0},r=1,s=2,o=3,a=4;t=e.charAt(i++);){var l="."===t,c=!l&&/\d/.test(t);switch(l?i-1==0?o:a:c?s:r){case r:!h&&n.levels.push(0),n.text+=t;break;case s:n.levels.push(parseInt(t));break;case o:n.stickToLeft=!0;break;case a:n.stickToRight=!0}var h=c}return n}return function(o,a){var l=i(a=a||{},"async",!1),c={},h=i(a,"debug",!1),u={},d=i(a,"hyphenChar",""),f=o.patterns.map(s),p=Math.max(a.minWordLength>>0,5),g=i(a,"html",!1),m=d+p;if(u[m]=n(o,d),c[m]=t(u[m]),l&&!("Promise"in e))throw new Error("Failed to create hyphenator: Could not find global Promise object, needed for hyphenator to work in async mode");return function(e,s){var a=i(s=s||{},"debug",h),m=i(s,"hyphenChar",d),v=Math.max(s.minWordLength>>0,p),y=m+v;return u[y]||(u[y]=n(o,m)),c[y]||(c[y]=t(u[y])),function(e,t,i,n,s,o,a,l){var c,h="",u=function(e,t,i,n){var r,s,o=RegExp.prototype.test.bind(/\s/),a=0,l=1,c=2,h=1,u=2,d=3,f=4;return[function(){var p="";r=void 0;e:for(;a<=e.length;){var g=e.charAt(a++),m=!!g&&!/\s|[\!-\@\[-\`\{-\~\u2013-\u203C]/.test(g),v="<"===g,y=">"===g,b=g===t;do{if(s===h){y&&(s=d);break}if(b){r=c,s=u;break}if(m){s=u;break}if(s===u){s=f,r=r||p.length>=n&&l;break}r=c,s=d}while(0);switch(v&&s!==f&&i&&!o(e.charAt(a))&&(r=c,s=h),s){case h:case u:p+=g;break;case d:p+=g;break e;case f:a--;break e}}return p||void 0},function(){return r===l}]}(e,s,o,a),d=u[0],f=u[1],p={hyphenateWord:1,concatenate:2},g=0,m=0,v=new Date,y=0,b=function(){};function w(){for(var e=new Date;(!l||new Date-e<10)&&(c=d());){switch(f()?p.hyphenateWord:p.concatenate){case p.hyphenateWord:i[c]||(i[c]=r(c,t,n,s)),c!==i[c]&&m++,c=i[c];case p.concatenate:h+=c}g++}y+=new Date-e,c?setTimeout(w):(v=new Date-v,b(h),n&&(console.log("----------------\nHyphenation stats: "+g+" text chunks processed, "+m+" words hyphenated"),console.log("Work time: "+y/1e3),console.log("Wait time: "+(v-y)/1e3),console.log("All time: "+v/1e3)))}return l?(setTimeout(w),new Promise((function(e){b=e}))):(w(),h)}(e,f,c[y],a,m,g,v,l)}}})),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():e.hyphenationPatternsRu=t()}(this,(function(){return{patterns:[".аб1р",".аг1ро",".ади2",".аи2",".ак1р",".аль3я",".ар2т1о2",".ас1то",".аст1р",".ау2",".би2о",".во2б3л",".во3ж2д",".го2ф",".дек2",".де1кв",".ди2ак",".ди1о",".до3п",".до3т2",".епи3",".зав2р",".за3м2н",".за3п",".иг1р",".изг2",".из3н",".ии2",".ик1р",".ио2",".ио4на",".ис3",".ле2о",".ле2п3р",".лес1к",".ль2",".люст1",".ме2ж1у2",".ми1ом",".мо2к1",".му2шт1",".на1в",".на3т",".на3ш2",".не3вн",".не1др",".не1з2",".не1сл",".не1с2ц",".не3т",".нос1к",".нук1л",".обо3ж2",".ово1",".ог3н",".оз4",".ос2ка",".ос2п",".ос3пи",".от1в",".от1ро",".от1ру",".от1уж",".по3в2",".по3ж2",".поз2н",".прос2",".ра2с3т",".ре2бр",".ре2з3в",".ри2ск",".ри2ч",".ро2з3в",".ро2с3л",".ро2х",".септ2",".ск2",".ст2",".су2ж",".те2о3",".тиа3",".ти2г",".тиг1р",".ти2о",".уб2",".уд2",".уе2",".уз2на",".ук2",".ум2ч",".уо3",".уп2",".ур2в",".ус2",".ут2р",".ую2",".хо2р3в",".че2с1к",".юс1","4а3а","аа2п","аа2р","аа2ц","а1б","абе3ст","а3бла","аб2лю","аб1ри","а3бу","ав1в","а1ве","ав3зо","а1ви","ави2а","а1во","аво1с","а2вот","ав1ра","ав2се","а2вт","а1ву","а2вх","а3в2че","2ага","ага1с2","а2гд","а2гити","а2гле","аг2ли","а2глос","аг2лот","2аго","а3гу","а1д","2адв","а2две","ад2жи","ади2од","а2дл","а2д1обл","ад1ро","а2д1ру","аду3ч","ад2ц","а2дын","а1е","ае2го","ае2ди","ае2л","а2еп","ае2ре","ае2с","аза4ш3","азв2","аз3вез","аз1вл","азг2","аз1др","аз1об","аз2о1бр","а2зовь","а2золь","а1зори","аз2о1с","аз1р","а1и","аи2г1","аи3гл","а2их","а1к","ак1в","1акк","ак2л","ак3лем","ако1б2","2аконс","ако3т","2акри","ак1с","а1ла","а3лаг","а1ле","2алек","а3ли","ало1з","а1лу","алу2ш","алуш1т","а1лы","а2льщ","а1лю","2ама","амб4","2амет","а2минт","ам2нет","2амо","амо1з2","амои2","а2мч","ана2дц","а2н1а2ме","а2наф","ан2дра","а2н1о2б","ан1о2хр","ан1р","ан2сп","анс1у","ан2сур","а2н1уз","а1нь","2а1о","ао2д","ао2к","ао2р","ао2с","аост1","а3пла","ап2лом","2апо","апо4вс","апо3ч2т","ап2ра","ап1рел","а1ра","ара2ст","ар2бок","ар2вал","1аргу","а1ре","аре1дв","аре1ол","ар2жа","а1ри","а1ро","ар2тор","ар2т1р","а1ру","ар1х","а1ры","а1рю","а1ря","2ас1к","ас3ми","ас3но","1ассиг","аст1ву","ас3тем","ас2тин","ас2тия","ас1тоо","ас1тух","а1стье","ас2шед","ас2шес","а1сьи","а1та","1атак","ат3ва","ат1ви","ат1ву","2атез","а1ти","а1то","ат1обе","а2томн","ато2ш","ат1рах","ат1ри","а1ту","ат2х","а1ты","а1тье","а3тью","а3тья","а1тю","а1тя","а1у","а2уб","ау2д","ау3до","а2уле","аут1р","ау2х","ау2ч","ау3чь","ауэ1","а2ф1л","ах2а","ахми2","ах3с","а1ч","2ача","а2чл","ач1т","а2шл","аэ2ли","а2эр","аю1та","а1я","ая2б","ая2в","ая2з","1ба","ба2бв","ба2г1р","ба2др","ба1з","ба3зу","балю1","ба2о","бас3м","ба1ст","ба1тр","2б1б","б1в","бвы2","бг2","2б1д","1бе","3бев","бе2гл","бе2гн","бе2д1р","3бее","3бе2з","без1а2","без5д4","бе3зи","без3н","без1о2","без1р","бе2с1к","бес3п","бе2с1т","бес3те","бес3ти","3бец","2бещ","2бж","б1з2","1б2и","3биа","би2б","2биж","3бик","били3т2","3био","би2об","би2од","би2он","би2ор","би2тв","би1х","2б3к","б1л","1благ","1б2лаз","б3лази","б2лан","1б2лее","б3лен","б2лес1к","1б2лея","б2луд","1б2луж","2блы","2б2ль","2б3лю.","б2люд","б2люе","б2люл","2б3люсь","2бля","2б3н","1бо","бо1бра","бо3вш","бо2гд","бо1дра","бо1з2","бо1л2ж","бо1льс","бо3м2л","бо2мч","бо3мш","бону1","бо1ру","бо2са","бо1ск","бо3ско","бо3сти","3бот","бо2тв","бот2р","боя2р","2бр.","б3раб","б2рав","бра1зо","1б2рал","2б1рам","б2ран","1брас","б2рать","б1рах","1б2рач","2б3рая","1б2ред","б1рей","б1рек","б2рем","б2рех","б2рид","б2рито","б2риты","1б2роди","б1рол","б1ром.","1б2роси","бро2с1к","2брс","б1ру","3брукс","2брь","1б2рю","2б3рю.","б1ря","2б1с2","б3ск","бс4л","б1т","1б2у","бу2г1р","бук1л","бу1с","2бф","2б1х","2бц","2б1ч","2бш","2бщ","1бы","бы2г1","бы2с","быс1к","быст1","1бь","2бь.","2бьс","2бьт","бэ1р","3б2ю","бю1та","1бя","1ва","ва2бр","3ваг","ва2д1р","вадь2","ва3ж2д","ва1з","ванс2","ва1ст","ва2стр","ва1тр","вах1","3вац","3вая","2в1б","в1ви","в1вр","2вг2","в1д","в2дох","1вев","3вег","вед1р","ве3ду","1вее","1вез","3везе","3везл","вез2у","1вей.","ве2п1","2верд","1вес","ве2с1к","ве2ст1в","вет3р","1вец","1вею","1вея","1в2з2","взг2","взд2","взо1б","взъ2","взъе3д","ви2аз","ви2ак","ви2ар","ви2а1с2","виа1т","ви3аф","ви2гв","ви2гл","1виз","1винт","1винч","ви1о","ви1с2ни","виу3","ви2ф","2в1к","вк2л","3в2кус","в1л","в2ла","2в3лаб","в2лев","в2лек","в2лет","в2леч","2вли","в2лия","2влю","в2люб","2вля","2вм","1вме","2в1н","4в3на","в2нес","вно1","в3ну.","3в2нук","3в2нуч","в3ны","во1б2","во2б3ла","вов2","во3вк","1вод","во1дв","во1др","во2ер","во2жж","вои2с1","1вок","во3м2","воп2","во1ру","2ворц","2ворь","вос1к","во1см","во1сн","вос3пе","во2стр","вот2р","1вох","во1хл","во3х2т","1вою","2вп2","2вр.","2вра.","в2рав","2в1рам","в1рас","2в1рах","2врац","2вре.","2в1рен","1врид","1в2риз","в1рии","в1рик","в1рил","в1рис","в1рит","2в1ро","вро3т2","2в1ры","1врю","в1ря","2в1с2","3все3","в3ская","4в3ски","4в3ску","3в2сп","3в2сю","в1т2","вто1б2","вто3ш","1вуа","ву3г","1ву1з","2вуи","2ву1к","ву3п","ву1с2","ву2х1а","вух3в","ву1чл","вф2","1вхо","2вц","2в1ч","2вш","3в2шив","2вщ","въ2","1вы","вы3г2","вы3зн","вып2","вы3т2","вых2","вы3ш2л","2вь.","1вье","1вьин","2вьс","2вьт","1вью","1вья","1в2э1","1в2ю","1вя","1г","г2а","га1з","га1ст2","га2у","2г3б","гба2","г1ви","2гг","г3дан","2г3ди","3ге.","ге2б1","гено1","ге2об","ге2од","ге1ор","2г3ж","2г1з","г2и","ги2бл","ги3бр","ги2гр","ги1сл","гист2","2г1к","2гла.","г2лав","г1лай","г1лами","2глась","2глая","г1ле","г2лет","2гли.","г2лин","3г2лиф","2гло.","г3лобл","2глов","2глог","2глое","2глой","2глою","2глую","2г1лы","г2ляж","2гляк","2г3м","г2нав","г2нан","г3не.","г2нев","г3нен","г3неп","г3нес","г2нир","гнит2р","г2ное","г2нои","г2нос","г3ня","го1б2","го2вл","го3ж2д","го1з","го2зл","гоз2н","гоиг2","3гой","г2ол","гоми2","го2с1а","го2сд","го1скл","го1сн","го1спа","2готд","гоу3т","го1чл","3гою","2гп","2гр.","г1рае","г1рай","г1рар","г1рег","г1рек","г1рец","гри4в3н","г1рик","г1рил","г1рин","г1рис","г1рич","г1ров","г2роз","г1рок","г1рон","г1роп","г1рот","г1роф","гру2п","г1рыв","2грю","г1ряе","г1рял","г1рят","2г3с2","г4са","г4сб","2г3т","гу1в","гу1с","гу2с1к","2гф","2г1ч","2г3ш","2г3э","1да","да2б1","да2ген","да2гр","да1з","да2о","даст1р","дат1р","2д1б","дв2","д1ве","1дви","2д1вид","2двиз","2двинт","2двинч","2д1вис","2д1вит","д3вк","д1вл","2двод","д1воз","1дворь","2двя","2дг2","2д1д2","1де","де1б2л","де1б2р","3девр","3дез","де2з1а2","де2зи","дез1о2","де2зу","деио2","де1кл","3деме","де2од","део3п","де3пл","дерас2","де2с3в","дес2к","де2ср","де1хл","2дж.","д2жам","д2ж3м","2джс","2д1з2","1ди","ди2ад","диа2з","ди2али","ди2ало","ди2ар","ди2ас","ди2об","дио3де","ди2ор","дио1с","ди1оти","дип2","ди2пи","ди3пт","ди2с1тр","диу3","ди3фр","ди3фто","ди1х","2д1к","д1л","д2лев","2д3м2","2д1н","д3на","днеа2","3дневн","4д3но1","дно3д2","днос2","4д3ны","3д2няш","1до","2д1о2бед","до2бл","2д1обла","до1б2ра","дов2л","до3в2м","до1д2","до3дн","до3ж2д","до1з","доз2н","дои2р","2докт","2долим","до2м1р","доп2","до3пл","2допле","до2пре","до2руб","до1с","д1о2сен","д1о2син","2д1осно","дос2п","2дотд","2дотл","дот2ри","2д1отря","2дотъ","до3ть","3дохл","до2ш3в","до3ш2к","до2шлы","до2щу","2дп","2др.","д1раб","1дравш","2дразв","1д2разн","д1ране","д1рар","д1ра2с3","д1рах","д1рач","д2раю","д1ре","д2реб","2д3реж","2дрез","д2рел","д2рем","1дрема","1дремл","дрем3н","1дремы","2д3рен","дре2ск","д2ресс","д1ри","д2рий","2дрин","д2рип","д2рих","дро2г3н","д1род","д1рое","1д2рож","2д3роз","д1рой","д1рол","д1рон","д1рос","д1рот","д1рою","д1руб","1друг","1друж","д1рум","д1рую","д1ры","2дрыв","1д2рыг","д1ря","д2ряб","1д2ряг","д2рях","2д1с2","дск2","дс3кн","2д1т","1ду","дуб3р","ду3г","2д1уд","ду2да","ду2о","дуп1л","дус1к","д1усл","ду1ст","ду2ста","2дут1р","ду1х","ду2чи","дуэ1т","2дф","д1х","2д3це","2дцу","2дцы","2д1ч","2д3ш2","2дщ","2дъ","дъе2м","1ды","2дыг","ды2г1р","2дыд","2дыме","2ды2с1","2дыт","2дыщ","2дь.","1дье","2дьк","2дьт","1дью","1дья","дь3яр","1д2ю","1дя","е1а","еа2д","еади3","еа3до","еа2з","еан2д1р","еат1р","2еб","еба2с","е1бра","еб1рен","еб1ри","е1бро","еб1ров","еб1ры","е2б3рю","е1ве","2евер","е1ви","е3в2ме","ев2ним","ев2нят","е1во","2евол","евра1с","2е1вре","ев1рее","ев1рей","ев1рея","ев1ри","е2вт","е1ву","е1вх","ев2хо","е1вь","ега1с2","ег2д","е2глан","е2гле","е2гли","е2гло","ег2на","ег2но","2ег2р","ед1во","ед2ж","е1дже","е1д2лин","едноу3","ед1опр","е2дотв","е2дох","е2д1ощ","е1дру","е2дру.","е2ду2б","ед1убо","е2дуве","е2дуг","е2дус","ед1уст","2е3душ","е2дын","е1е","е2евид","ее2в1р","ее2ги","ее1с2","ее2ст","еест1р","ее2х","е2жг","е4ждев","еж3ди","2еже","е2ж1р","еза2вр","езау3","е1з2ва","езд1р","е3зе","еззу3","е3зит","ез1об","ез1о2г","е1зом","ез1оп","ез1о2р","ез1от","ез1ош","ез2ря","ез1у2д","ез1у2к","ез1уп","ез1ус","езу2со","езу2сы","ез1у2х","ез1уча","е3зя","е1и","еи2г1","еи2д","еи2м","еи2о","еис1л","еис1тр","е1ка","ека2б","ек2з","е1ки","2е1ко","2е1кр","ек2ро","ек1ск","ек1сте","е1ку","е1ла","е1ле","еле3ск","еле1сц","е1лу","е1лы","е1лю","е3ля","еми3д2","еми3к","емо1с","2емуж","е2мч","2емыс","е3на","ен2д1р","2е1нр","енс2","ен3ш2","е1нэ","2ео","е1о2б","еоб2ро","е2о3гл","ео2гро","е1од","ео3да","ео2де","еоде3з","ео2до","е1о2ж","е2ои","ео3кл","е1ол.","е1ола","ео3ли","е1олк","е1олы","е1оль","е2ом","е1он.","е2она","е2они","ео3но","е1онс","еоп2","е1опе","ео2пр","ео4пу","е2о3ро","еос2","е1о2сви","ео1ск","е1осм","е1осн","еост1р","ео3сх","е1отл","еот2ру","е1о2ч","е1о2щ","епат2","епа1тр","2епе","епис2к","е2пл","е3пла","еп1леш","е3п2лод","еп1лу","е3плы","еп1лющ","е4пн","2епо","е4п3с","е4пт","е1ра","ер1акт","е2рв","ер1ве","е1ре","е3ре.","ере3до","ере1др","ере1к2","ере3м2н","ере3п","ере1х4","е1ри","ерио3з","е1ро","еро2б","ер1обл","2ерови","2ерокр","2ерол","еро3ф2","ер3ск","е1ру","е2р1у2п","е1ры","е1рю","е1ря","е3с2а","ес2ба","е1сг","е1ск","е2с1ка.","ес1кал","е2ске","е2сков","е4с1ку.","2есл","ес1лас","ес2лин","ес2лов","ес2лом","е1слу","е1слы","е1с4м","е3со","2есп","ес2пек","ес3пол","е2спу","е1ст","ес2тан","е2стл","е3сту","ес2чет","е1та","ет1ве","ет1ви","е1тво","2етеч","е1ти","е1то","ето1с","ет1р","ет2ря","е1ту","е1ты","е1тье","е3тью","е3тья","е1тю","е1тя","е1у2","2еуб","еуб3р","еуз2","еук2ло","ефи3б2","еф2л","еф1ре","еха2т","ех1ато","ех3вал","ех3лоп","ех1об","ех1опо","ех1ре","ех1ру","ех1у2ч","2ецв","е1чл","е2шл","еэ2","ею2г","е1я","ея2з","1ж","жа2бл","жа2бр","жа1з","жат1в","2ж1б2","2ж1в","жг2","2жга","ж2ги","3ж2гл","ж2гу","2ж1д","ж2дак","ж2дач","3ж2дел","4ждеме","ж2деп","ж2ди","4ж2дл","ждо3","жду1","4ждь","3ж2дя","3жев","же3д2","же1к2в","же1кл","же1о2","же3п2","же1с2","же3ск","2жжа","ж2же","2жжев","2ж1з2","жи1о","2жирр","2ж1к","2ж1л","ж2м","ж3ма","2ж3мо","2ж1н","жно1","2ж1об","2ж1о2т1","жоу3","жоу1с","2жп2","жпо1","ж2ру","2ж1с","2жф","2жц","2ж1ч","2жъ","2жь.","2жьс","2жьт","1за1","заа2","заб2","за2в1ри","за2вру","з1аву","заг4","з1адр","зае2д","зае2х","за3ж2д","за3з2","з1акт","за3мне","3з2ан","за3на","занс2","зап2","зар2в","за3р2д","зар2ж","зас2","заст2","зат2","за3тк","зау2","зах2","зач2т","за3ш2","зая2","з1б2","2з3ва.","з2вав","з3валь","з2ван","2звая","з1ве","з2вез","з1ви","з3в2к","з1вла","з1во","2звол","1з2вон","з1вр","1зву","2з1вую","з1вь","2зг","з3га","з2гли","зг2на","з2гну","з1д2в","з2деш","здож3","1зе","зе2б1","зе2ев","зе2од","2зж2","з3з2","1зи","3зи.","3зий.","з1инт","зи2оз","зи2оно","зи1оп","3зис","зи3т2р","зиу3м","3зич","2з1к","зко1","зко3п2","з1л","з2лащ","з2лоб","з2лоп","з2лор","з2лющ","2зм2","з3мн","з1н","2зна.","з2нав","з2нае","з2най","з2нак","з2нан","з2нат","з2наю","2зная","2зне","2з3ни","2зно","2зну","2з3ны","з2обе","зо2би","1зов","зо3в2м","зо2гл","зо1др","1зое","зо1з2","1зои","1зой.","1зок.","з1окс","1зол2","зо1лг","зо1лж","зо3м2","1зом.","2зомн","1зон","2зонр","1зоо","зо2о3п","зо2ос","зо2па","з2опл","з2опр","з1орг","1з2о3ре","зос2","з1осн","зо1сп","зо2тв","з2оте","з1отк","з2ото","зот2ре","зот2ри","1зох","зош2","зо2ши","1зоэ","1зою","з1ра","з2рак","зра2с","з2рач","з2рен","з1рес","з2риш","з1ро","зро2с3","з1ру","з2рю","з1ря","2з1с","2зт","з1ти","1зу","3зу.","2з1у2бе","зу2б3р","зу1в","2зуве","2зу2г","3зуе","2з1уз3","2зу1к","3зуме","з1у2мо","2зуп","зу2пр","з1урб","з1у2те","зу2час","2зц","з1ч","2зш","зъе2м","1зы","2зы2г1","зы2з","2зыме","2зымч","2зы2с1","2зыщ","1зье","1зьи","1зью","3зья","1з2ю","1зя","и1а","и2аб","и2ав","иаг2","и2агр","и2аде","и2ади","иа2зов","иа2му","и3ана","иа2нал","ианд2","иао2","и2ап","иа1с2к","иа1ста","иа1сто","иат1ро","и3ату","и2аф","и2а1х","иа2це","2и1б","и2б1р","2иваж","2и1ве","и2в3з","и1ви","2и1во","и1в2р","и3в2с","и1ву","ив2хо","2ивы","иг2д","и3ге","2игл","и2гле","и2гли","и2гн","игни3","иг1рен","иг1ро","иг1ру","иг1ры","и2г1ря","и1дв","и2дей","и1д2ж","иди1ом","иди1от","ид1р","и1дь","и1е","и2евод","ие2г","ие2д","ие3де","ие2зу","и3ени","ие1о2","иепи1","ие2р","и3ж2д","из1в2","из2гне","1из1д","из2нал","и1зо","изо2о","из1р","и1и","ийс2","и1к","и3к2а","ика1с2","ик2ва","и2кви","и2кля","и3ко","ик1ро","ик1ск","ик2с1т","и3ку","и1л","и2л1а2ц","ило1ск","илп2","и2л1у2п","и2ль","ильт2","2има","и2мено","и2мену","2имень","и3ми","имои2","им3пл","и2м1р","и2мч","им2ча","инд2","1инж","ино2к3л","ино3п2л","ино1с","инс2","1инсп","1инсти","1инсу","1инф","1инъ","и1об","ио2бо","ио2вр","и2ог","и1од","ио2де","и1оз","ио3зо","и1окс","и1оле","и1он","и3онов","и1опт","и1ор","и3ора","ио1ру","ио2са","ио3скл","ио1с2п","и1ота","ио2т1в","и1отк","и1отс","иоуг2","ио2хо","и1ош","2ип","ипат2","ипа1тр","ип2ля","ип3н","ипо3к2","и1р","ира2ст","и2р1ау","и2рв","и2рж","ири2ск","ириу3","иро1з2","1ирр","исан2д1","и2сб","и2сд","ис1к","ис3ка.","ис3кам","ис3ках","ис3ке","ис3ки","ис3ков","ис3ку.","и2слам","ис1лы","ис3ме","ис3му","ис3но","исо2ск","и2с3пр","и4сс","и1ст","и2ст1в","и2стл","ис1тяз","и1сьи","и1т","ита2в","ит3ва","и2т1ве","ит1ви","ит1ву","и2тм","и2т1р","ит2рес","ит3ром","и2т1уч","и3тью","и3тья","и1у2","иу3п","иф1л","иф2лю","и2фр","иха3д","и2х1ас","их2ло2","ихлор1","и3х2о","ихо3к","их1ре","их1ри","и1ху","и1ч","иш2ли","и2шлы","и2шт","ию4л","ию2н","ию2т","ию3та","и1я","ия2д","2й1","йд2","й2д3в","йно1","й2о1с","йо2тр","йп2л","й2сб","й3ска","йс2ке","йс4мо","й2с3му","й2сн","й2с3ф","й2сш","й2тм","й2хм","йх2с3","йя1","ка2бл","ка2бри","1кав","к2ад","ка3дне","ка2д1р","1кае","каз3н","ка1зо","1кай","1кал.","1кало","1калс","1кам","1кан","ка2п1л","ка2пре","кар3тр","3к2ас","ка1ст","1кат","ка1т2р","1ках","ка2ш1т","1каю","2к1б","к2вак","к2вас","к2ваш","к1ви","к2воз","к1ву","2кг","2к1д","кда2","1ке","2кеа","ке2гл","кед1р","ке2с1к","ке2ст1","2к1з","1кив","ки1о","киос1","ки2пл","ки1с2ни","1кит","2к1к2","кк3с","2к3ла.","2к3лась","2к3ле.","2клем","к3лем.","к3лен","к1лео","2к3ли.","2к3лив","к2лик","к2лин","2к3лис","к3лия","2к3ло.","к2лоз","к3лом","2к3лос","кло3т","1клук","к3лы","2кль","1клю","2к3лю.","2кля.","2клям","2клях","2км","2к1н","3к2ниж","к2ноп","3к2няж","к2о","ко1б2ри","1ков","3кова","1код","ко1др","1коз","1кольс","2комин","3конс","коп2р","ко2р3в","ко1ру","1кос","ко1ск","кос3м","ко1сп","1котн","ко2фр","кохо2р3","1кош","2кп","2кр.","к1рел","кре1о","кре2сл","к1реч","1криб","к1рид","к2риз","кри2о3","к2рит","к1рих","к1роа","к1роб","к2рое","к1рок","к1роо","к1рор","к1рос","к1роф","к1рох","к1роэ","кру1с","к1ряд","2кс","ксанд2","к2с3в","кс3г","к2с3д","к2сиб","к1ски","кс1кл","к1ско","кс3м","к3со","к1стам","к1стан","кс3те","к1сто","кс1тр","к1сту","к3су","2к1т","кта2к","3к2то.","кто1с","кт2р","к2у","ку1ве","3куе","1куй","1куля","3кум","куп1л","ку2п1р","1кур","ку3ро","кус1к","ку1ст","1кут","ку3ть","1куче","1куют","3кующ","2кф","2к1х2","2кц","2к1ч","2кш","1кь","к2ю","1ла.","2лабе","ла2бл","2лаго","ла2гр","ла2д1аг","1лае","ла3ж2д","ла1зо","л2ак","лак2р","1лам.","1лами.","лан2д1р","ла1ста","ласт1в","ла1сте","ла1сто","ла2ст1р","ла1сту","ла1стя","ла1т2р","лау1","ла2ус","ла2фр","1ла1х","1лая","2лб","л1бр","л1ве","л1ви","л1во","л1ву","1л2гал","л2гл","лго1","2л3д2","1ле.","ле1вл","лев1ра","ле2г1л","ле1дж","ле3до","ле1з2о3","ле1зр","лек1л","2лемн","1лен","ле1онт","ле1о2с","ле2сб","ле2ск","ле4ска","ле1с2л","ле1спе","ле1тв","ле1т2р","1лех","ле1хр","л1зо","1ли","лиа2м","3ливо","3ливы","лиг2л","ли2гро","лие3р","ли2кв","2лимп","лио1с","ли2пл","лис3м","2л1исп","ли2тв","лиу3м","ли2х3в","ли1хл","ли1хр","2л1к","лк2в","л2к1л","2л1л","л2ль","ллю1","2лм","2л1н","лни2е","1ло","ло2бл","ло1б2р","2ловия","ло2вл","3ловод","ло2г3д","лого1с","ло1др","2лоен","ло1зв","ло2к1а2у","ло2кл","лок3ла","3лопас","ло2рв","2л1орг","ло1ру","лос1к","ло1с2п","2лотд","лот2р","ло2шл","2лп","2л1с2","лс3б","л1т","1лу.","лу1бр","лу1в","лу3г","лу1д4р","1луе","лу1зн","лу1кр","1лун","луо2д","лу3п2ло","лу1с","лу3ть","1лую","2л3ф2","2л1х2","л2х3в","2лц","л1ч","1лы.","1лые","1лыж","1лый","1лым","1лых.","4ль.","2льд","3лье","3льи","2льк","2льм","2льн","3льо","2льск","1льсти","1льстя","2льт","2льц","2льч","1льща","1льще","1льщу","3лью","3лья","л2ю","1лю.","1люж","1люсь","лю1та","1ля","3ля.","ля1ви","3ляво","3лявы","2ляд","3лям","ля1ре","ля1ру","3лях","1м","ма2вз","3маг","ма2гн","ма2др","ма2дь","ма1зо","ма2к1р","2м1алл","ман2д1р","мас3л","ма1с4т","ма2тоб","ма2т1р","ма2у","маф2","3мач","ма2чт","4м1б","м3би","мб2л","м3бля","2м3в2","2мг2","3м2гл","2м1д","меан2","ме2ег","ме2ел","ме2ж1ат","ме1зо","ме2с1к","ме2ст1р","меч1т","2мж","2м1з2","ми2гре","ми1зв","2мизд","ми1зн","ми2кр","мик1ри","ми2оз","ми1опи","ми2ор","ми1с2л","2м1к2","3мкн","2м1л","м2лее","м2лел","2мм","2м1н","4м3на","мне1д","3м2неш","4мное","м2нож","4мной","4мном","м2нор","4мною","м2нут","4м3ны","мо1б2","мо3вл","3мод","мо1др","мо2жж","мо1зв","мо1зр","моис1т","мо2к3в","мо3м2","3мон","3моп","мо1ру","мос1ка","мо1см","мо1сн","мо1с2п","3моти","мо2т1р","3моф","2мп","мп2л","м1раб","2мри","2м1ро","м1ры","2м1с","мс2к","мс2н","м2с1ор","3м2сти","2м1т","му1с2к","му1с4л","му1ст","мут1р","му3ть","2мф","мфи3","2м1х","2мц","м2чав","м2чал","м2чит","м2чиш","2мш2","2мщ","3м2ще","мым1","мы2мр","мы2с","2мь.","2мьс","мью1","2мэ","мэ1р","м2ю","мя1р","мя1ст","1на","наби1о","наб2р","на1в2р","наг2н","на3жд","на1з2","на2ил","на2ин","на2и1с2","4накк","на3м2н","нап2л","на1рва","на1р2ви","на1с2","на1тв","на1т2р","н1а2фр","на1х2","2нач","на3ш2л","2нащ","наэ1р","3ная","2н1б2","2н1в","2нг","н2г1в","нги2о","нг4л","нго1с","нг2р","2н1д","н2дак","н2д1в","нде3з","нде2с","нд2ж","н3д2з","н2дл","нд1раг","нд1раж","нд2ре","нд2риа","н2дря","нд2сп","н2дц","1не","не1б2","не1в2д","2невн","не3вня","нег2","3нед","не1д2л","нед2о","не2дра","не1дро","не3ду","не3е","нее2д","не3ж2д","не1зв","не1з2л","не1зн","не1зо","не1зр","неи2","не1к2в","не1кл","не3м2н","3не1о2","не2ода","не2ол","не3п2","не1р2ж","не2р1от","нес2к","не3с2н","не1с2п","нест2","не1с2х","не1с2ч","не1т2в","не3т2л","не1т2р","3неу","не2фр","не1хр","не3шк","нея2","2н1з2","нзо1с","1ни","ни3б2","ни2ен","3ний","ни2кл","нила2","ни2л1ал","ни2л1ам","2нинсп","2н1инст","ни1сл","нис3п","нист2р","ниу3","ни1х","3ниц","3нищ","2н1к","нк2в","нк2л","нкоб2","нко3п2","н2к1ро","нк1с","н1л","2н1н","нно3п2","1но","ноб2","но1бр","но2вл","но1дв","но1др","но2ер","но1зв","но2зд","но3з2о","но1зр","но3кн","3номе","ном3ш","но2рв","но1ру","но1скл","но2сли","но1с2п","но2сч","2нотд","но3ф2","ноэ2","н3п2","2н1ре","2н1ри","н1ро","2н1с","н2с3в","н2сг","нс2ке","н2скон","н2сл","н3сла","н2с3м","н2сн","н2с1ок","н3с2пе","нст2р","нсу2р","н2с3ф","н2съ3","2н1т","н2т1в","нти1о2к","н2тм","нт2ра","н2тр1а2г","нтр1аж","н2трар","нтрас2","нт2ре","н2трив","н2трок","нт2ру","нтр1уд","нт2ры","н2т1ря","1ну","нут1р","ну1х","3ную","2нф2","н1х","нхо1","2нц","2н1ч","н2чл","2нш","нш2т","2нщ","1ны","3ны.","2нь.","1нье","1ньи","2ньк","1ньо","2ньс","2ньт","2ньч","1нью","1нья","н2э","1н2ю","2н3ю2р","1ня","ня1ви","2о1а2","о3ав","оап1","2оба","2обио","об2лев","об2лем","о1блю","1обм","обо1л2г","обо3м2","обо2с","2обот","об1р","о2бра.","о1брав","о1бран","1объ","2обь","о1в","о3вла","о3в2ло","ов3но","о3в2нуш","о2в1ри","ов2се","ов3ско","ов2т","о2вх","ог2","2о3ге","ог3ла.","ог3ли.","ог3ло.","о3гря","2одан","од1вое","о3де.","1о2деял","2оди3а","2о3дим","од2лит","о2д1о2пе","одо3пр","о2д1о2пы","о2доси","о2д1отч","о1драг","од1раж","од1раз","од1рак","о1драл","од3реб","о1дроб","од1ров","о2д1у2ч","о2дыма","о2дыму","о2дын","о1дь","о2дьб","о1е","ое1б","о2е1вл","ое2д","о3ежек","ое2жи","ое1о","ое1с2","ое2ст","о2ето","ое2ц","о3жди","о3ж2ду","оза2б3в","2озав","о1з2ва","оз2вен","оз2ви","о1з2вя","оз2гло","оз2дор","о1здр","озе1о","оз3но","о1зо","о2з1об","2озон","о2зоп","озо1ру","оз1уг","о2зым","о3зыс","о3и","ои2г1","оиг2н","оие3","ои2з","ои2м","ои3мо","ои2о","2ой","ойс2","о1к","2о3кан","ок2в","2ок2л","о3клю","око1б","2о3кол","око3п2л","ок1ск","1окт","2окти","2окум","о3ла","ол2ган","о1ле","1олимп","о3ло","о1лу","олу3д2","о1лы","о1лю","о3ля","о3ма","ом2бл","2оме","о3м2нем","о3м2нет","о3множ","ом1ри","ом2ч","ом2ше","о2мь","о3мья","о3на","онд2","оне3ф2","оно1б","о1нр","онс2","он2тру","о1о2","о2ол","оо3пс","оос3м","оост1р","о2оти","о2оф","о3пак","о3пар","о2пле.","о2п1лей","о2пли","оп2лит","оп2ло","оп3лю.","о2пля","о3пляс","опо4вс","опоз2н","опо2ш3л","оп2ри","о3п2те","оп2то","о1ра","ора2с3","ор2б3л","о1р2в","о1ре","2о3рег","оре2ск","о1ри","ор1исп","о1ро","оро2с3л","ор2тр","о1руе","о1рук","ор1укс","о1рус","2орц","о1ры","о1рю","о1ря","о3сад","оса3ж2","ос2б","о2с3ба","о2с1ка.","ос3кар","оск1во","о2ске","ос1ки","о2ски.","о2сков","ос1кой","ос1ком","о1с2коп","ос1кою","о2с1ку.","ос1кую","о1с2л","ос3лей","ос3лог","ос3лых","ос3ми","ос3мос","о1с2ним","ос2нял","ос2пас","о1с2пу","ос2пя","ос2св","ос2с3м","о1ст","ос2та","о3стра","о2суч","2осх","ос2цен","о1с2ч","о1с2шив","о1т","отв2","от3ва","от1ве","от1ви","от1вл","1отг","1отд","2о3тек","о3тер","2о3тех","о3ти","о3ткал","о2тм","от1раб","от1рад","от1раз","отра2с","от1реж","от1рек","от1реч","от1реш","от1ри","от1род","от1рое","от1рок","от1рос","от1роч","от1руг","от3см","оту2а","от1у2ч","1отх","о3тью","о3тья","о1у2","оуп2","оус2к","оу3та","оу3то","2офаш","о3фе","2офит","2офон","о2фори","2офот","о2фри","2охи","ох1лы","о2хля","ох2ме","2охор","о1хр","о1ху","о2цо","оча1с","оч2л","оч1ле","о3чли","о1чт","о2ч1то","ош3ва","ош2ла","ошпа2к3","ош2т","оэ1ти","2ою","о1я","оя2в","оя2д","оя2з","оя2ри","1п","пави3","пав3л","па2вь","па2др","па2ен","па1зо","пас1л","пас1та","па1сте","пас1то","пас1ту","па2с1ты","па1тро","па2ун","па3ф","па1ху","па2шт","2п1в2","2п1д","пе1","пе2дв","пе2д1ин","пе2з","пе3за","пе3зо","пе2к1ла","пе2ль","пе4пл","пери1о","пе2с1к","пе2сн","пе2ст1р","пе2сц","пе2сч","пе2тр","пе2шт","пиаст1","пи2ж3м","пи2к1р","3пинк","3пися","4п3к","2пл.","4пла.","пла1с","п1лем.","п1лемс","2плен","п2ленк","п1ле2о","плес1к","п1лею","2плив","3п2лик","2пло.","2плов","2плог","2плый","2плым","п1лын","п1лых","2плю.","п1лют","п2ляс","п2ляш","2п1н","п3на","п3но1","п3ны","по1б2","по3вл","по3в2с","под1во","по2д1о2к","подо3м2","пое2л","пое2х","по1зве","по1здо","по1з2л","по1зн","пои2щ","3пой","3полк","по3мно","по3мну","3по3п2","п1орг","пор2ж","по1ру","по1с4","3посл","по3сс","пот2в","пот2р","по1х2","по2шло","по2шлы","по2шля","поэ3м","2пп2","ппо1д","2пр.","3прев","пре1з","прей2","пре1л","пре1ог","3прет","при1","при3в","приг2","при3д2","при3к","при3л","приль2","прип2","п2риц","про1бл","прод2л","про3ж2","про1з2","п1розо","3прои","про3п","профо2","2прс","п2ру","2п1с2","3п2сал","п3син","3п2сих","п3со","2п1т","п2т3в","3п2тих","п3ту","3пуб","пуг3н","пус1ку","пу1ст","пу3ть","2пф2","пх2","2пц","4п3ч","2пш","2пщ","2пь.","2пьт","пэ1ра","п2ю1","1ра.","раа2","ра2бл","1рабо","ра2б1р","1равня","ра2гв","ра2гл","рад2ж","радо1б2","ра2дц","ра2жур","ра2зий","ра2зуб","рак2в","1ракиз","ра2к3л","1ралг","1рамк","1рамн","ра2нох","ран2сц","ра2п1л","рас3к2","1расл","рас3п","рас1т","1раста","рас3т2л","ра2так","рат1в","ра1т2р","2рахи","1ращи","1раю","1рая","2раят","2р1б","рб2ла","р2бле","рб2ло","рб2лю","рбо3с","1р2вав","р3вак","р3вар","р3вата","р3веж","р2вео","1рвет","р1ви","р3вин","р2вит","р1во","рво1з2д","р1вь","2рг","р2гв","р2г1л","р2гн","рг2р","2р1д","рда1с","р2д1в","рд2ж","рди2а","р2дл","рдос2","р2дц","1ре.","ре1вр","рег2ля","рег2н","ре2д1о2п","ре2дос","рее2в","рее2д","рее2л","ре3ж2д","1резк","ре1з2л","ре1зна","1ре1зо","ре1зр","рез2у","1рейш","ре1к2л","1рекш","ре3мно","3ремо","ремо2г3","1ренк","1рень","ре1он","ре1оп","ре1о2р","ре1о2ф","ре1ох","ре1о2ц","1репь","ре3р2","рес1ки","ре1сл","ре1с2п","рес2с3м","ре3ста","ре3сто","ре1сч","ре1тв","ре1т2р","реуч3т","ре1чт","ре3шл","р3жа.","р3жам","р3жан","р3ж2д","2рз","р1з2в","р1зо","ри3а","риб2","ри3бр","ри3в2н","2риги","ри2гло","ри3г2н","2ридж","ри1д2р","рие2л","рие3р","риз2в","рик2р","ри3м2н","ри3м2ч","р2ин","1ринс","рио2з","рио2с","ри1от","ри3р2","ри1с2","ри3сб","2рисп","ри3ств","ри3т2р","1риу","ри2фл","ри3фр","ри1хл","1риц","1риш","риэти2","2р1к","р2кв","р2к1л","рк1с","2р1л2","р2ль","рлю1","р3ля","2рм","р2мч","2р1н","рнас4","рне3о","рне1с2","рно3сл","1ро.","ро2блю","ро1б2р","ро2вл","1рогол","1рогру","ро1дв","ро3д2з","ро1дл","род2ле","ро2д1от","ро1др","1родь","рое2л","рое2м","рое2х","1розар","ро1з2в","ро1зр","3розыс","рои2с3","1рокон","1рокр","1ролис","1ролиц","1ромор","1ронаж","1ронап","1ронос","рооп1р","ро2плю","ро3пс","2р1орг","ро1р2ж","ро1ру","ро1ск","ро2ски","ро2ску","1росл","ро1см","ро1с2п","рос2ф","1росш","1росю","1рот2в","1ротк","рот2ри","1роу","роуг2","ро2ф1ак","ро2фр","ро1хл","рош2л","ро3шн","1рояз","2рп","рп2ло","р2плю","2р1р","4р1с","рс2к","р2сн","рс2п","рств2","р3ствл","2р1т","р2такк","р2т1акт","р2т1в","рт3ва","рт2вл","р2тм","р2т1об","рт1орг","рт1ра","рт2ран","рт1ре","рт1ри","ртус1","р2т1у2чи","р3тью","рт1яч","1ру.","1руба","руг3н","ру2дар","1ружей","2рукс","1рул","рус1к","рус3л","ру1ста","руст1р","ру3ть","1руха","1рухо","1ручн","2рф","рф2л","2рх","р2хв","р2х1ин","рх1л","р1х2ло","р2х1оп","рх1р","2рц","р2цв","2р1ч","р2чл","р2чм","2рш","р3ш2м","рш2т","2рщ","2ръ","1ры.","1рыб","ры2дв","2рыз","ры2кл","1рым","ры2с1к","ры2х1","2рь.","1рье","1рьи","2рьк","2рьс","2рьт","1рью","1рья","рэ1л","р2ю","1рю.","1рюс","ря1ви","1ряю","1са","са2бл","са2дь","са2кв","са2кл","2с1альп","с1апп","2с1арк","2с1атл","са1тр","са2ун","са2ф1р","са1х2","1сб2","2сбе3з2","сбезо3","сбе3с2","2с3бу","с2бы","2сбю","1с2в","2с3вен","сг2","с2ги","с2гн","с2го","1сд2","с2да","с2де","с3ди","с2до","1с2е","сег2н","се1з2","се1кв","сек1л","се2к1р","секс4","семи1","сере2б","се2ск","се2ст","се3ста","се3сте","сест1р","1с2ж","с1з","1с2и","3сиз","си1ом","си1оп","си2пл","си1х","4ск.","2скам","с2канд","1с2каф","2сках","ск2ва","с2кви","3скино","ск2л","с2кля","ск3ляв","2скн","с1кон","2скона","с2копс","2скош","ск2р","с1кра","2скриб","ск1с","2скуе","2с3ла.","1слав","1слад","с1лам","2с3лая","с3лев","с3лее","с1лей","слео2","с1лет","с3лею","2с3ли.","2слиц","2с3ло.","с2лож","с3лому","2с3лос","2с3лую","2с3лые","2с3лый","2с3лым","2сль","с1люс","2с3ля","с2м","1смес","с4мея","с3мур","с1н","1с2наб","с2нас","2сная","1с2неж","2с3ник","2сно","сно1з2","2сную","2с3ны","1со","со1б2р","с2ов","сов2р","со1д","со1з2","со1л2г","со3м2","со2рие","со1ру","со1ск","со1с2п","со2сь","сот2р","со1чл","сош2л","сп2","с2пав","с2пее","с2пел","с2пен","с2пех","1с2пец","с2пеш","с2пею","с2пим","2спися","с3пн","спо1з2","2спол","с2пос","2спь","1ср","2ср.","с2раб","сра2с","с1рат","сре2б1","сре3до","2с1с","ссанд2","с2сб","сс3во","4с5си","с3с2к","сс2л","с2сн","с3с2не","с2сори","сс2п","сст2","сс2ч","2ст.","1ста.","2стб","4ств.","ст1вер","2ствл","ст2вол","ст2вя","с2те","1с4те.","1стей","1стел","1стен.","с3тет.","с3тете","сте3х","с3теш","1сти","с2тие","с2тии","2стимп","2стинд","2стинф","2стинъ","с2тич","с2тишк","с2тию","2стк","ст2ла","с3т2ле","2стли","ст2лил","ст2лит","2стля","2стм","2стн","1сто.","с2то1б","1стов","1стог","сто2г3н","1стод","1стое","3с2тои","1сток","1стом","1стон","2сторг","2сторж","2сторс","1стос","1стот","с2тоц","1стою","2стп","2стр.","страс2","4страя","2стред","ст1рей","2стрив","ст1риз","2стрил","2стрищ","ст1роа","с4т1ров","ст1род","ст1рох","ст2руб","ст1руш","2стс","с1тут","1стую","2стф","2стц","1сты","с2тыв","с4ть","2сть.","2стьс","3стью","1стья","1стям","1стях","1су","су2б","суб1а2","суб1о","су1в","су3гл","су2ев","су2з","су1кр","сума1","супе2","сус3л","сус3п","су1ст","сут1р","су2ф3","су1х","1с2фе","с1х2","1с2хе","2сца","с2цена","2с3ци","2сцо","сч2","1сча","с2час","сче2с1к","с3чив","2счик","с2чит","с1чл","2счо","сш2","с3шн","1съ2","съе3д","съе3л","1сы","сы2г1","сы2з","сы2п1л","сы2с","сыс1ка","2сь.","1сье","2ськ","2сьт","1сью","1сья","сэ1р","с2эс","1с2ю","сю1с","1ся","2сяз","ся3ть","та2бл","таб2р","та1ври","1таг","та2гн","та1з2","так3ле","т2ан","та2пл","1тас","та1ст","та1тр","1тащ","2т1б2","2тв.","2т2ва","т1вей","т1вел","т1вет","2тви","т1вое","т1во1з","2т1вой","т1вос","2твою","2т1вр","2тву","2твы","2твя","2тг","2т1д","1т2е","те2гн","те1д","те1зо","3тека","тек1л","3текш","теле1о","тем2б1","те2о3д","те1ох","те4п1л","те2рак","тере2о","3терз","тер3к","3теря","те2ска","те2с1ки","те2с1ко","те2ску","тест2","те2хо","2тж","2т1з","тиа2м","ти2бл","ти3д2","ти1зна","тии2","тиис1","тик2","тила2м","т1имп","2т1инв","т1инд","2тинж","2тинф","ти1с2л","ти3ств","ти3ф2р","ти1хр","2т1к2","3т2кав","3т2кан","3т2кет","3ткн","2т1л","тло2б","т2ль","тм2","тми2с","тмист1","т3мщ","2т1н","то2бес","то1б2л","2тобъ","то2вл","то1д","то3д2р","то1з2","ток2р","2т1омм","2томс","2тонг","1торг","1торж","1торс","то1ру","1торш","то1с2н","то1с2п","то1с2ц","2тотд","то3тк","1тощ","2тп2","тпа1т","т1рага","2т1раж","2трб","2трв","2трг","2трд","трдо2","т1реа","1требо","1требу","т1ребь","т1реве","т1ревш","т1рег","т1ред","т1рее","т1реза","т1резн","треп1л","3тре2с","трес1к","т1рест","т1рету","3т2ре2х","т1рец","т2решь","т1рею","1триб","т1рив","три2г1л","т1рил","т1рим","4тринс","три1о","т1рит","три3ф","т1рищ","2трм","2трн","т1рогл","т1роид","2трой","тро3пл","т1рор","т1росо","тро3т","4т3роц","2трою","2трп","2трр","1труб","т2руд","2трук","т2рум","т2рут","2трф","2трщ","2тръ","т1ры","т1ря.","т1ряв","2т1ряд","т1ряе","т1ряж","т1ряй","т3ряк","т1рят","т1рящ","т1ряя","4т1с2","т2сб","т2с3д","тсеп2","т2с3м","т2с3п","2т1т","т2тм","ту2гр","ту2жин","2т1у2пр","ту1сл","ту1ст","ту2фл","1туша","1тушо","1тушь","1тущ","2тф","2т1х","4тц","2т1ч","2тш2","2тщ","2тъ","ты2г1","ты2с1к","2ть","4ть.","3тье","3тьи","ть2м","4тьт","тью1","2тэ","т2ю","тю1т","1тяг","1тяж","1тяп","2тя2ч","у1а","у2але","у2ас","у3бел","убо1д","убос2","уб1р","1убра","уб3рю","1у2быт","у1ве.","у1ви","ув2л","у1во","у1ву","у2гв","у2гл","у2гн","уг2на","уг2не","уг1ре","уг1ря","уда1с","уд2в","уд1рам","уд1ро","у3ду","у1е","уе2д","уе2л","уе1с","уе2с1к","уес2л","уе2х","у2жж","у1з2в","у1зо","узо3п","у1и","у1ка","ук1в","у1ки","у1ко","уко1б","у1ку1","у1ла","у1ле","у1лу","у1лых","у1лю","у2мч","у3на","ун2д1р","у1нь","у1о","уо2б","уо2в","у2оза","уо2к","уо2п","уо2с","уост1","уо2т1","уо2ф","у2пл","уп1лю","у3про","у1ра","у1ре","уре2т3р","у1ри","урке3","у1ро","у2род","уро2дл","урт2р","у3ру","у1ры","у1рю","у1ря","у2сад","у1сг","ус1ка","ус1ки","уск3л","ус1ком","у1скр","ус1ку.","ус2л","усла4ж3","ус3ли","у1см","у2сн","ус2п","ус3с","у1сте","у1стя","у1сф","2усц","у2сч","у2сь","у3сья","у1та","у3тер","у1ти","ут2ля","у1то","уто3п2с","ут1ри","у1ту","у1ты","у1тье","у3тью","1утю","у1тя","у1у","ууг2","уу2с","у3фи","уф1л","уф2ля","у2фр","ух1ад","уха2т","у2хв","у3х4во","ух1л","ух3ля","ух1р","у2чеб","1учр","у1чь","у3ше","у3ши","у2шл","уш1ла","у2шп","2уэ","у1я","уя2з","1ф","фа2б1","фа2гн","фа1зо","фан2д","фанд1р","фа1тр","фа2х","3фаш","фаэ1","2ф1б","2ф1в","2фг","2ф1д","фев1р","фед1р","фе1о3","фе2с1к","ф4и","фиа2к1","фи2гл","фи2ж","фи2зо","фи2нин","фи1о","3фит","2ф1к","ф2ла","ф2ли","ф2ло","2фм","2ф1н","2фобъ","3фон","фо2рв","2ф1орг","фор3тр","фо1ру","фос1к","3фот","фото3п","ф1раб","фра1з","фра1с","ф1рат","ф2рен","фре2с","ф1ри","ф2риж","ф2риз","ф1ро","ф2рон","ф1ру","2ф3с","2ф1т","ф2тм","ф2тор","2ф1у2п","фу3тл","2фуф","2фф","2ф1ч","2фш2","2фь.","ф2ю1","1ха","ха2бл","ха2д","2х1ак","хан2д","хао3","х1арш","2х1б","1х2в","2х3ве","2х3ви","х3вы","2хг","х3д2","1хе","хео3","х1з2","1хи","хиат1","хие2","2х1изы","хи1с2","х1к2","х1лав","х1лас","х1лат","х1лац","1хлеб","х2лес","х1лет","х3ло.","х2лоп","1х2лор","х1лу","1х2му","2х1н","3х2ны","1хо","2х1о2к","хоп2","хо2пе","хо2пор","хо1ру","х1осм","2х1осн","хоф2","хох1л","хоя2","хп2","х1раз","1хран","х1ра1с2","х1рей","хри2пл","х2рис","х1ров","1хром","хро2мч","х1ры","х1ря","2х1с2","2х1т","1ху.","х1у2г","2хуе","2хуй","1хун","х1у2р","ху3ра","1хус","1хуш","2хую","х1х2","2х1ч2","2хш","хью1","1ц","ца1","3ца.","3цам","ца2пл","3цах","2ц1б","ц2ве","2цвы","2цг","2ц1д","це1з","це1к","це1от","цеп1л","цес2л","це1т","2цетат","2ц1з","ци1","ци2к1","цик3л","ци2ол","цип2","ци2ск","циу3","циф1р","2ц1к2","2ц1л","2цм","2ц1н","ц1о2б","2ц1о2д","2ц1от","2цп2","2ц1р","2ц1с","2ц1т","3цу","2цц","2ц3ш2","3цы","цы2п","цып3л","цю1","1ча","ча2др","ча2дц","ча2ево","ча2евы","ча2ер","част1в","ча1сте","ча1сту","ча1стя","3чато","3чаты","2ч1б","ч1в","2ч1д","1че","че1вл","че2гл","че1о","чер2с","черст1","че1сл","ч2ж","чжо2","1чи","3чик","3чиц","2ч1к","1ч2ла","ч2ле","ч3лег","ч3леж","2чли","ч2ли.","1ч2ло","1чм","2чма","2чме","ч2мо","2ч1н","3чо","2ч1с","2ч1та","ч2те","2чтм","1чу","3чук","ч2х","2ч1ч","2чь.","1чье","1чьи","2чьс","2чьт","1чью","1чья","1ш","ша2бл","ша2гн","ша2г1р","ша2др","шан2кр","шар3т2","ша1ст","ша1тро","2ш1б","ш2в","ш3вен","ше2гл","ше1к","ше1о2","ше3пл","ше1с2","ши2бл","ши2пл","шиф1р","2ш1к2","3ш2кол","2ш1лей","2шлен","ш2ли.","2шлив","2шлил","ш2лин","ш2лис","ш2лите","ш2лиф","ш2ло.","2шлов","ш2лог","ш1лы","ш2лю","2шляе","2шляк","ш2ляп","2шлят","2шляч","2шляю","2шм","3ш2мы","4ш3мы.","2ш1н","4шни","ш2нур","ш2п2","ш3пр","2ш1р","2ш1с","ш1ти","2штс","шу2ев","шуст1","2шф","ш1х","2шц","2ш1ч","2шь","4шь.","3шье","3шьи","3шью","3шья","ш2ю1","1щ","2щ3в2","ще1б2л","ще2гл","щед1р","щеи2","щеис1","ще1с","ще1х","щеш2","ще3шк","щи2п1л","2щм","2щ1н","2щ1р","2щь.","ъ1","ъе2г","ъе2д","ъе3до","ъе2л","ъ2е2р","ъе2с","ъе2хи","ъю2","ъя2","ъя3н","ы1","ы2бл","ы3га","ы3ги","ыг2л","ы2гн","ы2дл","ыд2ре","ы2д1ро","ы2дря","ые2","ы3ж2д","ыз2ва","ыз2д","ы2зл","ы2зн","ыз2на","ыи2","ыиг1","ы2к1в","ык2л","ы2к3ло","ыко1з","ык1с","ы2ль","ы2мч","ынос3л","ы3по","ыра2с3","ыр2в","ыре2х","ы3са","ы3се","ыс1ки","ыс1ку","ы2сн","ы3со","ыс2п","ы2сх","ыс2ч","ы2сш","ыт1ви","ыт2р","ы3тью","ы3тья","ыу2","ы2ш1л","ы3шь","ь1","ьб2","ь2вя","ь2дц","ь2е","ье1зо","ье1к","ье2с1к","ь2зн","ь2и1","ь2кл","ьми3д","ьми3к","ьмо1","ьне2о","ь2о","ь2п1л","ь3п2то","ьс2к","ь2сн","ь2сти","ь2стя","ь2т1амп","ьти3м","ь2тм","ь2тот","ь2траб","ьт2ре","ьт2ру","ьт2ры","ьхо2","ьхоз1","ь2ща","ь2ще","ь2щу","ь2ю","ь2я","ья1в","ь3ягс","1э","э1в","эв1р","2эг","эд1р","эк1л","экс1","эк2ст","эле1о","э2м","э3ма","э2н","э3нь","эо2з","э2п","эпи3к","э1ре","э1ри","эри4тр","эро1с2","э1ру","э1ры","эс1","эск2","эс3м","э2со","эс3те","эс2т1р","э2те","этил1а","эт1ра","э2ф","эх2","эхо3","э2ц","эя2","1ю","ю1а","ю1б","ю2бв","ю2бл","ю2б1ре","ю1в","ю1дь","ю1е","юз2г","юзи2к","ю1зо","ю1и","ю2идал","ю1к","ю2к1в","ю1ла","ю1ле","ю2ли","ю1лю","2юм","ю2мч","ю2нь","ю1о1","ю1ра","ю1ре","юре4м","ю1ри","юри2ск","ю1ро","ю1ру","ю1ры","ю2с1к","ю1ста","ю1сте","ю1сто","ю1стя","ю1ти","ю1то","ю1ту","ю1ты","ю1х","юха1с","ю1ч","ю2щь","ю1я","я2бр","яб1ра","яб3ре","яб1ри","яб3рю","3явикс","я1во","я1ву","я1в2х","я2г1л","я2гн","яд1в","яд1р","я1е","яз2гн","я1зо","я1и","я1к","я2к1в","я2к1л","як1с","я1л","я2ль","ям2б3л","я2мь","я3на","янс2","я1ра","я1ри","я1ро","я1рь","яс1к","яс1л","яс2т","яст3в","я1сто","яст1р","я1та","ят3в","я3ти","яти1з","я1то","я1ту","я1ты","я3тью","я3тья","я1тя","я1у","ях1л","я1ху","яце1","я2шл","2яю.","2я1я",".бо2дра",".вст2р",".доб2рел",".до1б2ри",".об2люю",".об2рее",".об2рей",".об2рею",".об2рив",".об2рил",".об2рит",".па2н1ис",".пом2ну",".реа2н",".ро2с3пи",".со2пла","а2ньш","атро2ск","безу2с","бино2ск","виз2гн","выб2ре","гст4р","ди1с2лов","дос2ня","дро2ж3ж","2дружей","е2мьд","е2о3плато","е2о3пози","ере3с2со","4ж3дик","4ж3дич","заи2л","зао2з","2з1а2хав","заю2л","з2рят","зу2мь","6зь.","и2л1а2мин","илло3к2","й2кь","ла2б1р","лу3с4н","ме2динс","ме2д1о2см","мети2л1ам","мис4с3н","нар2ват","не2о3ре","ни1с2кол","ни4сь.","но4л1а2мин","н2трасс","о2д1о2бол","о4ж3дев","о1и2с1тр","ойс4ков","о2м3че.","они3л2ам","он2трат","о2плюс","осо4м3н","оти4дн","пере1с2н","по2доде","по2д1у2ро","пое2ж","по2стин","прем2но","приче2с1к","пти4дн","редо4пл","реж4ди","рни3л2а3м","роб2лею","2сбрук1","со2стрит","со3т2кал","2стче.","2стьт","сы2мит","2сься.","6тр.","тро2етес","6хуя.","ы2рьм","ыя2вя","ьбат2","а1вё","а2двё","а1ё","аз3вёз","а1лё","2алёк","2амёт","ам2нёт","а1рё","ас3тём","а1тьё","1бё","бё2д1р","б3лён","б2лёс1к","б2люё","б1рёк","б2рём","б2рёх","1веё","3везё","вёд1р","1вёз","2вёрд","1вёс","в2лёк","в2лёт","1вмё","в2нёс","2в1рён","3всё3","1вьё","г1лё","г2лёт","г2нёв","г3нён","г2ноё","д1вё","1дё",".доб2рёл","2доплё","до2прё","д1рё","д2рёб","2д3рёж","д2рём","1дрёма","1дрёмы","2д3рён","дъё2м","1дьё","еб1рён","е1вё","2евёр","2е1врё","е2глё","е1ё","2ежё","е3зё","е1лё","2епё","ер1вё","е1рё","ерё3до","ерё1к2","ес2чёт","ет1вё","е1тьё","2ёб","ё1бра","ёб1ры","ё1ве","ё1во","2ё1вре","ё1ву","ё1дру","2ё3душ","2ёже","ё3зе","ёз1о2г","ё1зом","ё1ка","ё1ки","2ё1ко","2ё1кр","ёк2ро","ё1ку","ё1ла","ё1ле","ё1лу","ё1лы","2ёмуж","ё2мч","ё3на","ён2д1р","ёнс2","ёпат2","2ёпе","ё2пл","ё3пла","ёп1лу","ё3плы","ё4пн","2ёпо","ё4пт","ё1ра","ё1ре","ё3ре.","ё1ри","ё1ро","ёр3ск","ё1ру","ё1ры","ё3с2а","ё1ск","ё2с1ка.","ё2ске","ё4с1ку.","2ёсл","ё3со","ё1ст","ёс2тан","ё3сту","ё1та","2ётеч","ё1ти","ё1то","ёто1с","ёт1р","ё1ту","ё1ты","ё1тю","ё1тя","ёха2т","ёх1ато","ёх3вал","ёх3лоп","ёх1опо","ёх1ру","3жёв","жё1с2","ж2жё","за3мнё","з1вё","з2вёз","1зё","з2наё","2знё","1з2о3рё","з2отё","зот2рё","3зуё","зъё2м","2зымё","2и1вё","иг1рён","и1ё","их1рё","1каё","1кё","к3лён","к2роё","3куё","ла1стё","лё3до","лё1з2о3","лёк1л","1лён","лё2ск","лё4ска","1лёх","2лоён","1луё","3льё","1льщё","3м2нёш","3м2щё","нд2рё","не3ё","1нё","нё1б2","3номё","1ньё","од3рёб","о1ё","оё2жи","о1лё","2омё","о3м2нём","о3м2нёт","о2п1лёй","о1рё","о2скё","от1вё","2о3тёк","о3тёр","от1рёк","от1рёш","о3фё","пё1","пё2ст1р","пё2тр","2плён","п2лёнк","плёс1к","п1лёю","поё2ж","3прёт","причё2с1к","р2блё","1рвёт",".рё2бр","1рёзк","рё1зна","1рё1зо","рёз2у","1рёкш","3рёмо","1рёнк","рё3ста","рё3сто","род2лё","роё2м","1рьё","с2дё","се3стё","1с2ё","сёкс4","сё2ст","сёст1р","2скуё","с1лёт","с2тё","1стёл","1стён.","с3тёт.","с3тёте","стё3х","с3тёш","с3т2лё","счё2с1к","1сьё","т1вёл","т1воё","1т2ё","тё2гн","тё1зо","3тёка","тёк1л","3тёкш","тё4п1л","тёр3к","тё2ска","тё2с1ки","тё2с1ко","тё2ску","тё2хо","3т2кёт","т1ревё","3т2рё2х","т2рёшь","тро2етёс","3тьё","уг2нё","уг1рё",".уё2","у1ё","у1лё","у1рё","у1стё","у3тёр","у1тьё","у2чёб","у3шё","2х3вё","1хлёб","х2лёс","ц2вё","1чё","чёр2с","чёрст1",".чё2с1к","ч2тё","1чьё","2шлён","3шьё","ъ2ё2р","ыд2рё","ырё2х","ы3сё","ь2ё","ьё1зо","ь2щё","ю1ё","яб3рё",".не8","8не.","8бъ.","8въ.","8гъ.","8дъ.","8жъ.","8зъ.","8къ.","8лъ.","8мъ.","8нъ.","8пъ.","8ръ.","8съ.","8тъ.","8фъ.","8хъ.","8цъ.","8чъ.","8шъ.","8щъ.","8-7","--8",".а-8",".б-8",".в-8",".г-8",".д-8",".е-8",".ё-8",".ж-8",".з-8",".и-8",".й-8",".к-8",".л-8",".м-8",".н-8",".о-8",".п-8",".р-8",".с-8",".т-8",".у-8",".ф-8",".х-8",".ц-8",".ч-8",".ш-8",".щ-8",".ъ-8",".ы-8",".ь-8",".э-8",".ю-8",".я-8","-а8а8","8а8а-","-а8б8","8а8б-","-а8в8","8а8в-","-а8г8","8а8г-","-а8д8","8а8д-","-а8е8","8а8е-","-а8ё8","8а8ё-","-а8ж8","8а8ж-","-а8з8","8а8з-","-а8и8","8а8и-","-а8й8","8а8й-","-а8к8","8а8к-","-а8л8","8а8л-","-а8м8","8а8м-","-а8н8","8а8н-","-а8о8","8а8о-","-а8п8","8а8п-","-а8р8","8а8р-","-а8с8","8а8с-","-а8т8","8а8т-","-а8у8","8а8у-","-а8ф8","8а8ф-","-а8х8","8а8х-","-а8ц8","8а8ц-","-а8ч8","8а8ч-","-а8ш8","8а8ш-","-а8щ8","8а8щ-","-а8ъ8","8а8ъ-","-а8ы8","8а8ы-","-а8ь8","8а8ь-","-а8э8","8а8э-","-а8ю8","8а8ю-","-а8я8","8а8я-","-б8а8","8б8а-","-б8б8","8б8б-","-б8в8","8б8в-","-б8г8","8б8г-","-б8д8","8б8д-","-б8е8","8б8е-","-б8ё8","8б8ё-","-б8ж8","8б8ж-","-б8з8","8б8з-","-б8и8","8б8и-","-б8й8","8б8й-","-б8к8","8б8к-","-б8л8","8б8л-","-б8м8","8б8м-","-б8н8","8б8н-","-б8о8","8б8о-","-б8п8","8б8п-","-б8р8","8б8р-","-б8с8","8б8с-","-б8т8","8б8т-","-б8у8","8б8у-","-б8ф8","8б8ф-","-б8х8","8б8х-","-б8ц8","8б8ц-","-б8ч8","8б8ч-","-б8ш8","8б8ш-","-б8щ8","8б8щ-","-б8ъ8","8б8ъ-","-б8ы8","8б8ы-","-б8ь8","8б8ь-","-б8э8","8б8э-","-б8ю8","8б8ю-","-б8я8","8б8я-","-в8а8","8в8а-","-в8б8","8в8б-","-в8в8","8в8в-","-в8г8","8в8г-","-в8д8","8в8д-","-в8е8","8в8е-","-в8ё8","8в8ё-","-в8ж8","8в8ж-","-в8з8","8в8з-","-в8и8","8в8и-","-в8й8","8в8й-","-в8к8","8в8к-","-в8л8","8в8л-","-в8м8","8в8м-","-в8н8","8в8н-","-в8о8","8в8о-","-в8п8","8в8п-","-в8р8","8в8р-","-в8с8","8в8с-","-в8т8","8в8т-","-в8у8","8в8у-","-в8ф8","8в8ф-","-в8х8","8в8х-","-в8ц8","8в8ц-","-в8ч8","8в8ч-","-в8ш8","8в8ш-","-в8щ8","8в8щ-","-в8ъ8","8в8ъ-","-в8ы8","8в8ы-","-в8ь8","8в8ь-","-в8э8","8в8э-","-в8ю8","8в8ю-","-в8я8","8в8я-","-г8а8","8г8а-","-г8б8","8г8б-","-г8в8","8г8в-","-г8г8","8г8г-","-г8д8","8г8д-","-г8е8","8г8е-","-г8ё8","8г8ё-","-г8ж8","8г8ж-","-г8з8","8г8з-","-г8и8","8г8и-","-г8й8","8г8й-","-г8к8","8г8к-","-г8л8","8г8л-","-г8м8","8г8м-","-г8н8","8г8н-","-г8о8","8г8о-","-г8п8","8г8п-","-г8р8","8г8р-","-г8с8","8г8с-","-г8т8","8г8т-","-г8у8","8г8у-","-г8ф8","8г8ф-","-г8х8","8г8х-","-г8ц8","8г8ц-","-г8ч8","8г8ч-","-г8ш8","8г8ш-","-г8щ8","8г8щ-","-г8ъ8","8г8ъ-","-г8ы8","8г8ы-","-г8ь8","8г8ь-","-г8э8","8г8э-","-г8ю8","8г8ю-","-г8я8","8г8я-","-д8а8","8д8а-","-д8б8","8д8б-","-д8в8","8д8в-","-д8г8","8д8г-","-д8д8","8д8д-","-д8е8","8д8е-","-д8ё8","8д8ё-","-д8ж8","8д8ж-","-д8з8","8д8з-","-д8и8","8д8и-","-д8й8","8д8й-","-д8к8","8д8к-","-д8л8","8д8л-","-д8м8","8д8м-","-д8н8","8д8н-","-д8о8","8д8о-","-д8п8","8д8п-","-д8р8","8д8р-","-д8с8","8д8с-","-д8т8","8д8т-","-д8у8","8д8у-","-д8ф8","8д8ф-","-д8х8","8д8х-","-д8ц8","8д8ц-","-д8ч8","8д8ч-","-д8ш8","8д8ш-","-д8щ8","8д8щ-","-д8ъ8","8д8ъ-","-д8ы8","8д8ы-","-д8ь8","8д8ь-","-д8э8","8д8э-","-д8ю8","8д8ю-","-д8я8","8д8я-","-е8а8","8е8а-","-е8б8","8е8б-","-е8в8","8е8в-","-е8г8","8е8г-","-е8д8","8е8д-","-е8е8","8е8е-","-е8ё8","8е8ё-","-е8ж8","8е8ж-","-е8з8","8е8з-","-е8и8","8е8и-","-е8й8","8е8й-","-е8к8","8е8к-","-е8л8","8е8л-","-е8м8","8е8м-","-е8н8","8е8н-","-е8о8","8е8о-","-е8п8","8е8п-","-е8р8","8е8р-","-е8с8","8е8с-","-е8т8","8е8т-","-е8у8","8е8у-","-е8ф8","8е8ф-","-е8х8","8е8х-","-е8ц8","8е8ц-","-е8ч8","8е8ч-","-е8ш8","8е8ш-","-е8щ8","8е8щ-","-е8ъ8","8е8ъ-","-е8ы8","8е8ы-","-е8ь8","8е8ь-","-е8э8","8е8э-","-е8ю8","8е8ю-","-е8я8","8е8я-","-ё8а8","8ё8а-","-ё8б8","8ё8б-","-ё8в8","8ё8в-","-ё8г8","8ё8г-","-ё8д8","8ё8д-","-ё8е8","8ё8е-","-ё8ё8","8ё8ё-","-ё8ж8","8ё8ж-","-ё8з8","8ё8з-","-ё8и8","8ё8и-","-ё8й8","8ё8й-","-ё8к8","8ё8к-","-ё8л8","8ё8л-","-ё8м8","8ё8м-","-ё8н8","8ё8н-","-ё8о8","8ё8о-","-ё8п8","8ё8п-","-ё8р8","8ё8р-","-ё8с8","8ё8с-","-ё8т8","8ё8т-","-ё8у8","8ё8у-","-ё8ф8","8ё8ф-","-ё8х8","8ё8х-","-ё8ц8","8ё8ц-","-ё8ч8","8ё8ч-","-ё8ш8","8ё8ш-","-ё8щ8","8ё8щ-","-ё8ъ8","8ё8ъ-","-ё8ы8","8ё8ы-","-ё8ь8","8ё8ь-","-ё8э8","8ё8э-","-ё8ю8","8ё8ю-","-ё8я8","8ё8я-","-ж8а8","8ж8а-","-ж8б8","8ж8б-","-ж8в8","8ж8в-","-ж8г8","8ж8г-","-ж8д8","8ж8д-","-ж8е8","8ж8е-","-ж8ё8","8ж8ё-","-ж8ж8","8ж8ж-","-ж8з8","8ж8з-","-ж8и8","8ж8и-","-ж8й8","8ж8й-","-ж8к8","8ж8к-","-ж8л8","8ж8л-","-ж8м8","8ж8м-","-ж8н8","8ж8н-","-ж8о8","8ж8о-","-ж8п8","8ж8п-","-ж8р8","8ж8р-","-ж8с8","8ж8с-","-ж8т8","8ж8т-","-ж8у8","8ж8у-","-ж8ф8","8ж8ф-","-ж8х8","8ж8х-","-ж8ц8","8ж8ц-","-ж8ч8","8ж8ч-","-ж8ш8","8ж8ш-","-ж8щ8","8ж8щ-","-ж8ъ8","8ж8ъ-","-ж8ы8","8ж8ы-","-ж8ь8","8ж8ь-","-ж8э8","8ж8э-","-ж8ю8","8ж8ю-","-ж8я8","8ж8я-","-з8а8","8з8а-","-з8б8","8з8б-","-з8в8","8з8в-","-з8г8","8з8г-","-з8д8","8з8д-","-з8е8","8з8е-","-з8ё8","8з8ё-","-з8ж8","8з8ж-","-з8з8","8з8з-","-з8и8","8з8и-","-з8й8","8з8й-","-з8к8","8з8к-","-з8л8","8з8л-","-з8м8","8з8м-","-з8н8","8з8н-","-з8о8","8з8о-","-з8п8","8з8п-","-з8р8","8з8р-","-з8с8","8з8с-","-з8т8","8з8т-","-з8у8","8з8у-","-з8ф8","8з8ф-","-з8х8","8з8х-","-з8ц8","8з8ц-","-з8ч8","8з8ч-","-з8ш8","8з8ш-","-з8щ8","8з8щ-","-з8ъ8","8з8ъ-","-з8ы8","8з8ы-","-з8ь8","8з8ь-","-з8э8","8з8э-","-з8ю8","8з8ю-","-з8я8","8з8я-","-и8а8","8и8а-","-и8б8","8и8б-","-и8в8","8и8в-","-и8г8","8и8г-","-и8д8","8и8д-","-и8е8","8и8е-","-и8ё8","8и8ё-","-и8ж8","8и8ж-","-и8з8","8и8з-","-и8и8","8и8и-","-и8й8","8и8й-","-и8к8","8и8к-","-и8л8","8и8л-","-и8м8","8и8м-","-и8н8","8и8н-","-и8о8","8и8о-","-и8п8","8и8п-","-и8р8","8и8р-","-и8с8","8и8с-","-и8т8","8и8т-","-и8у8","8и8у-","-и8ф8","8и8ф-","-и8х8","8и8х-","-и8ц8","8и8ц-","-и8ч8","8и8ч-","-и8ш8","8и8ш-","-и8щ8","8и8щ-","-и8ъ8","8и8ъ-","-и8ы8","8и8ы-","-и8ь8","8и8ь-","-и8э8","8и8э-","-и8ю8","8и8ю-","-и8я8","8и8я-","-й8а8","8й8а-","-й8б8","8й8б-","-й8в8","8й8в-","-й8г8","8й8г-","-й8д8","8й8д-","-й8е8","8й8е-","-й8ё8","8й8ё-","-й8ж8","8й8ж-","-й8з8","8й8з-","-й8и8","8й8и-","-й8й8","8й8й-","-й8к8","8й8к-","-й8л8","8й8л-","-й8м8","8й8м-","-й8н8","8й8н-","-й8о8","8й8о-","-й8п8","8й8п-","-й8р8","8й8р-","-й8с8","8й8с-","-й8т8","8й8т-","-й8у8","8й8у-","-й8ф8","8й8ф-","-й8х8","8й8х-","-й8ц8","8й8ц-","-й8ч8","8й8ч-","-й8ш8","8й8ш-","-й8щ8","8й8щ-","-й8ъ8","8й8ъ-","-й8ы8","8й8ы-","-й8ь8","8й8ь-","-й8э8","8й8э-","-й8ю8","8й8ю-","-й8я8","8й8я-","-к8а8","8к8а-","-к8б8","8к8б-","-к8в8","8к8в-","-к8г8","8к8г-","-к8д8","8к8д-","-к8е8","8к8е-","-к8ё8","8к8ё-","-к8ж8","8к8ж-","-к8з8","8к8з-","-к8и8","8к8и-","-к8й8","8к8й-","-к8к8","8к8к-","-к8л8","8к8л-","-к8м8","8к8м-","-к8н8","8к8н-","-к8о8","8к8о-","-к8п8","8к8п-","-к8р8","8к8р-","-к8с8","8к8с-","-к8т8","8к8т-","-к8у8","8к8у-","-к8ф8","8к8ф-","-к8х8","8к8х-","-к8ц8","8к8ц-","-к8ч8","8к8ч-","-к8ш8","8к8ш-","-к8щ8","8к8щ-","-к8ъ8","8к8ъ-","-к8ы8","8к8ы-","-к8ь8","8к8ь-","-к8э8","8к8э-","-к8ю8","8к8ю-","-к8я8","8к8я-","-л8а8","8л8а-","-л8б8","8л8б-","-л8в8","8л8в-","-л8г8","8л8г-","-л8д8","8л8д-","-л8е8","8л8е-","-л8ё8","8л8ё-","-л8ж8","8л8ж-","-л8з8","8л8з-","-л8и8","8л8и-","-л8й8","8л8й-","-л8к8","8л8к-","-л8л8","8л8л-","-л8м8","8л8м-","-л8н8","8л8н-","-л8о8","8л8о-","-л8п8","8л8п-","-л8р8","8л8р-","-л8с8","8л8с-","-л8т8","8л8т-","-л8у8","8л8у-","-л8ф8","8л8ф-","-л8х8","8л8х-","-л8ц8","8л8ц-","-л8ч8","8л8ч-","-л8ш8","8л8ш-","-л8щ8","8л8щ-","-л8ъ8","8л8ъ-","-л8ы8","8л8ы-","-л8ь8","8л8ь-","-л8э8","8л8э-","-л8ю8","8л8ю-","-л8я8","8л8я-","-м8а8","8м8а-","-м8б8","8м8б-","-м8в8","8м8в-","-м8г8","8м8г-","-м8д8","8м8д-","-м8е8","8м8е-","-м8ё8","8м8ё-","-м8ж8","8м8ж-","-м8з8","8м8з-","-м8и8","8м8и-","-м8й8","8м8й-","-м8к8","8м8к-","-м8л8","8м8л-","-м8м8","8м8м-","-м8н8","8м8н-","-м8о8","8м8о-","-м8п8","8м8п-","-м8р8","8м8р-","-м8с8","8м8с-","-м8т8","8м8т-","-м8у8","8м8у-","-м8ф8","8м8ф-","-м8х8","8м8х-","-м8ц8","8м8ц-","-м8ч8","8м8ч-","-м8ш8","8м8ш-","-м8щ8","8м8щ-","-м8ъ8","8м8ъ-","-м8ы8","8м8ы-","-м8ь8","8м8ь-","-м8э8","8м8э-","-м8ю8","8м8ю-","-м8я8","8м8я-","-н8а8","8н8а-","-н8б8","8н8б-","-н8в8","8н8в-","-н8г8","8н8г-","-н8д8","8н8д-","-н8е8","8н8е-","-н8ё8","8н8ё-","-н8ж8","8н8ж-","-н8з8","8н8з-","-н8и8","8н8и-","-н8й8","8н8й-","-н8к8","8н8к-","-н8л8","8н8л-","-н8м8","8н8м-","-н8н8","8н8н-","-н8о8","8н8о-","-н8п8","8н8п-","-н8р8","8н8р-","-н8с8","8н8с-","-н8т8","8н8т-","-н8у8","8н8у-","-н8ф8","8н8ф-","-н8х8","8н8х-","-н8ц8","8н8ц-","-н8ч8","8н8ч-","-н8ш8","8н8ш-","-н8щ8","8н8щ-","-н8ъ8","8н8ъ-","-н8ы8","8н8ы-","-н8ь8","8н8ь-","-н8э8","8н8э-","-н8ю8","8н8ю-","-н8я8","8н8я-","-о8а8","8о8а-","-о8б8","8о8б-","-о8в8","8о8в-","-о8г8","8о8г-","-о8д8","8о8д-","-о8е8","8о8е-","-о8ё8","8о8ё-","-о8ж8","8о8ж-","-о8з8","8о8з-","-о8и8","8о8и-","-о8й8","8о8й-","-о8к8","8о8к-","-о8л8","8о8л-","-о8м8","8о8м-","-о8н8","8о8н-","-о8о8","8о8о-","-о8п8","8о8п-","-о8р8","8о8р-","-о8с8","8о8с-","-о8т8","8о8т-","-о8у8","8о8у-","-о8ф8","8о8ф-","-о8х8","8о8х-","-о8ц8","8о8ц-","-о8ч8","8о8ч-","-о8ш8","8о8ш-","-о8щ8","8о8щ-","-о8ъ8","8о8ъ-","-о8ы8","8о8ы-","-о8ь8","8о8ь-","-о8э8","8о8э-","-о8ю8","8о8ю-","-о8я8","8о8я-","-п8а8","8п8а-","-п8б8","8п8б-","-п8в8","8п8в-","-п8г8","8п8г-","-п8д8","8п8д-","-п8е8","8п8е-","-п8ё8","8п8ё-","-п8ж8","8п8ж-","-п8з8","8п8з-","-п8и8","8п8и-","-п8й8","8п8й-","-п8к8","8п8к-","-п8л8","8п8л-","-п8м8","8п8м-","-п8н8","8п8н-","-п8о8","8п8о-","-п8п8","8п8п-","-п8р8","8п8р-","-п8с8","8п8с-","-п8т8","8п8т-","-п8у8","8п8у-","-п8ф8","8п8ф-","-п8х8","8п8х-","-п8ц8","8п8ц-","-п8ч8","8п8ч-","-п8ш8","8п8ш-","-п8щ8","8п8щ-","-п8ъ8","8п8ъ-","-п8ы8","8п8ы-","-п8ь8","8п8ь-","-п8э8","8п8э-","-п8ю8","8п8ю-","-п8я8","8п8я-","-р8а8","8р8а-","-р8б8","8р8б-","-р8в8","8р8в-","-р8г8","8р8г-","-р8д8","8р8д-","-р8е8","8р8е-","-р8ё8","8р8ё-","-р8ж8","8р8ж-","-р8з8","8р8з-","-р8и8","8р8и-","-р8й8","8р8й-","-р8к8","8р8к-","-р8л8","8р8л-","-р8м8","8р8м-","-р8н8","8р8н-","-р8о8","8р8о-","-р8п8","8р8п-","-р8р8","8р8р-","-р8с8","8р8с-","-р8т8","8р8т-","-р8у8","8р8у-","-р8ф8","8р8ф-","-р8х8","8р8х-","-р8ц8","8р8ц-","-р8ч8","8р8ч-","-р8ш8","8р8ш-","-р8щ8","8р8щ-","-р8ъ8","8р8ъ-","-р8ы8","8р8ы-","-р8ь8","8р8ь-","-р8э8","8р8э-","-р8ю8","8р8ю-","-р8я8","8р8я-","-с8а8","8с8а-","-с8б8","8с8б-","-с8в8","8с8в-","-с8г8","8с8г-","-с8д8","8с8д-","-с8е8","8с8е-","-с8ё8","8с8ё-","-с8ж8","8с8ж-","-с8з8","8с8з-","-с8и8","8с8и-","-с8й8","8с8й-","-с8к8","8с8к-","-с8л8","8с8л-","-с8м8","8с8м-","-с8н8","8с8н-","-с8о8","8с8о-","-с8п8","8с8п-","-с8р8","8с8р-","-с8с8","8с8с-","-с8т8","8с8т-","-с8у8","8с8у-","-с8ф8","8с8ф-","-с8х8","8с8х-","-с8ц8","8с8ц-","-с8ч8","8с8ч-","-с8ш8","8с8ш-","-с8щ8","8с8щ-","-с8ъ8","8с8ъ-","-с8ы8","8с8ы-","-с8ь8","8с8ь-","-с8э8","8с8э-","-с8ю8","8с8ю-","-с8я8","8с8я-","-т8а8","8т8а-","-т8б8","8т8б-","-т8в8","8т8в-","-т8г8","8т8г-","-т8д8","8т8д-","-т8е8","8т8е-","-т8ё8","8т8ё-","-т8ж8","8т8ж-","-т8з8","8т8з-","-т8и8","8т8и-","-т8й8","8т8й-","-т8к8","8т8к-","-т8л8","8т8л-","-т8м8","8т8м-","-т8н8","8т8н-","-т8о8","8т8о-","-т8п8","8т8п-","-т8р8","8т8р-","-т8с8","8т8с-","-т8т8","8т8т-","-т8у8","8т8у-","-т8ф8","8т8ф-","-т8х8","8т8х-","-т8ц8","8т8ц-","-т8ч8","8т8ч-","-т8ш8","8т8ш-","-т8щ8","8т8щ-","-т8ъ8","8т8ъ-","-т8ы8","8т8ы-","-т8ь8","8т8ь-","-т8э8","8т8э-","-т8ю8","8т8ю-","-т8я8","8т8я-","-у8а8","8у8а-","-у8б8","8у8б-","-у8в8","8у8в-","-у8г8","8у8г-","-у8д8","8у8д-","-у8е8","8у8е-","-у8ё8","8у8ё-","-у8ж8","8у8ж-","-у8з8","8у8з-","-у8и8","8у8и-","-у8й8","8у8й-","-у8к8","8у8к-","-у8л8","8у8л-","-у8м8","8у8м-","-у8н8","8у8н-","-у8о8","8у8о-","-у8п8","8у8п-","-у8р8","8у8р-","-у8с8","8у8с-","-у8т8","8у8т-","-у8у8","8у8у-","-у8ф8","8у8ф-","-у8х8","8у8х-","-у8ц8","8у8ц-","-у8ч8","8у8ч-","-у8ш8","8у8ш-","-у8щ8","8у8щ-","-у8ъ8","8у8ъ-","-у8ы8","8у8ы-","-у8ь8","8у8ь-","-у8э8","8у8э-","-у8ю8","8у8ю-","-у8я8","8у8я-","-ф8а8","8ф8а-","-ф8б8","8ф8б-","-ф8в8","8ф8в-","-ф8г8","8ф8г-","-ф8д8","8ф8д-","-ф8е8","8ф8е-","-ф8ё8","8ф8ё-","-ф8ж8","8ф8ж-","-ф8з8","8ф8з-","-ф8и8","8ф8и-","-ф8й8","8ф8й-","-ф8к8","8ф8к-","-ф8л8","8ф8л-","-ф8м8","8ф8м-","-ф8н8","8ф8н-","-ф8о8","8ф8о-","-ф8п8","8ф8п-","-ф8р8","8ф8р-","-ф8с8","8ф8с-","-ф8т8","8ф8т-","-ф8у8","8ф8у-","-ф8ф8","8ф8ф-","-ф8х8","8ф8х-","-ф8ц8","8ф8ц-","-ф8ч8","8ф8ч-","-ф8ш8","8ф8ш-","-ф8щ8","8ф8щ-","-ф8ъ8","8ф8ъ-","-ф8ы8","8ф8ы-","-ф8ь8","8ф8ь-","-ф8э8","8ф8э-","-ф8ю8","8ф8ю-","-ф8я8","8ф8я-","-х8а8","8х8а-","-х8б8","8х8б-","-х8в8","8х8в-","-х8г8","8х8г-","-х8д8","8х8д-","-х8е8","8х8е-","-х8ё8","8х8ё-","-х8ж8","8х8ж-","-х8з8","8х8з-","-х8и8","8х8и-","-х8й8","8х8й-","-х8к8","8х8к-","-х8л8","8х8л-","-х8м8","8х8м-","-х8н8","8х8н-","-х8о8","8х8о-","-х8п8","8х8п-","-х8р8","8х8р-","-х8с8","8х8с-","-х8т8","8х8т-","-х8у8","8х8у-","-х8ф8","8х8ф-","-х8х8","8х8х-","-х8ц8","8х8ц-","-х8ч8","8х8ч-","-х8ш8","8х8ш-","-х8щ8","8х8щ-","-х8ъ8","8х8ъ-","-х8ы8","8х8ы-","-х8ь8","8х8ь-","-х8э8","8х8э-","-х8ю8","8х8ю-","-х8я8","8х8я-","-ц8а8","8ц8а-","-ц8б8","8ц8б-","-ц8в8","8ц8в-","-ц8г8","8ц8г-","-ц8д8","8ц8д-","-ц8е8","8ц8е-","-ц8ё8","8ц8ё-","-ц8ж8","8ц8ж-","-ц8з8","8ц8з-","-ц8и8","8ц8и-","-ц8й8","8ц8й-","-ц8к8","8ц8к-","-ц8л8","8ц8л-","-ц8м8","8ц8м-","-ц8н8","8ц8н-","-ц8о8","8ц8о-","-ц8п8","8ц8п-","-ц8р8","8ц8р-","-ц8с8","8ц8с-","-ц8т8","8ц8т-","-ц8у8","8ц8у-","-ц8ф8","8ц8ф-","-ц8х8","8ц8х-","-ц8ц8","8ц8ц-","-ц8ч8","8ц8ч-","-ц8ш8","8ц8ш-","-ц8щ8","8ц8щ-","-ц8ъ8","8ц8ъ-","-ц8ы8","8ц8ы-","-ц8ь8","8ц8ь-","-ц8э8","8ц8э-","-ц8ю8","8ц8ю-","-ц8я8","8ц8я-","-ч8а8","8ч8а-","-ч8б8","8ч8б-","-ч8в8","8ч8в-","-ч8г8","8ч8г-","-ч8д8","8ч8д-","-ч8е8","8ч8е-","-ч8ё8","8ч8ё-","-ч8ж8","8ч8ж-","-ч8з8","8ч8з-","-ч8и8","8ч8и-","-ч8й8","8ч8й-","-ч8к8","8ч8к-","-ч8л8","8ч8л-","-ч8м8","8ч8м-","-ч8н8","8ч8н-","-ч8о8","8ч8о-","-ч8п8","8ч8п-","-ч8р8","8ч8р-","-ч8с8","8ч8с-","-ч8т8","8ч8т-","-ч8у8","8ч8у-","-ч8ф8","8ч8ф-","-ч8х8","8ч8х-","-ч8ц8","8ч8ц-","-ч8ч8","8ч8ч-","-ч8ш8","8ч8ш-","-ч8щ8","8ч8щ-","-ч8ъ8","8ч8ъ-","-ч8ы8","8ч8ы-","-ч8ь8","8ч8ь-","-ч8э8","8ч8э-","-ч8ю8","8ч8ю-","-ч8я8","8ч8я-","-ш8а8","8ш8а-","-ш8б8","8ш8б-","-ш8в8","8ш8в-","-ш8г8","8ш8г-","-ш8д8","8ш8д-","-ш8е8","8ш8е-","-ш8ё8","8ш8ё-","-ш8ж8","8ш8ж-","-ш8з8","8ш8з-","-ш8и8","8ш8и-","-ш8й8","8ш8й-","-ш8к8","8ш8к-","-ш8л8","8ш8л-","-ш8м8","8ш8м-","-ш8н8","8ш8н-","-ш8о8","8ш8о-","-ш8п8","8ш8п-","-ш8р8","8ш8р-","-ш8с8","8ш8с-","-ш8т8","8ш8т-","-ш8у8","8ш8у-","-ш8ф8","8ш8ф-","-ш8х8","8ш8х-","-ш8ц8","8ш8ц-","-ш8ч8","8ш8ч-","-ш8ш8","8ш8ш-","-ш8щ8","8ш8щ-","-ш8ъ8","8ш8ъ-","-ш8ы8","8ш8ы-","-ш8ь8","8ш8ь-","-ш8э8","8ш8э-","-ш8ю8","8ш8ю-","-ш8я8","8ш8я-","-щ8а8","8щ8а-","-щ8б8","8щ8б-","-щ8в8","8щ8в-","-щ8г8","8щ8г-","-щ8д8","8щ8д-","-щ8е8","8щ8е-","-щ8ё8","8щ8ё-","-щ8ж8","8щ8ж-","-щ8з8","8щ8з-","-щ8и8","8щ8и-","-щ8й8","8щ8й-","-щ8к8","8щ8к-","-щ8л8","8щ8л-","-щ8м8","8щ8м-","-щ8н8","8щ8н-","-щ8о8","8щ8о-","-щ8п8","8щ8п-","-щ8р8","8щ8р-","-щ8с8","8щ8с-","-щ8т8","8щ8т-","-щ8у8","8щ8у-","-щ8ф8","8щ8ф-","-щ8х8","8щ8х-","-щ8ц8","8щ8ц-","-щ8ч8","8щ8ч-","-щ8ш8","8щ8ш-","-щ8щ8","8щ8щ-","-щ8ъ8","8щ8ъ-","-щ8ы8","8щ8ы-","-щ8ь8","8щ8ь-","-щ8э8","8щ8э-","-щ8ю8","8щ8ю-","-щ8я8","8щ8я-","-ъ8а8","8ъ8а-","-ъ8б8","8ъ8б-","-ъ8в8","8ъ8в-","-ъ8г8","8ъ8г-","-ъ8д8","8ъ8д-","-ъ8е8","8ъ8е-","-ъ8ё8","8ъ8ё-","-ъ8ж8","8ъ8ж-","-ъ8з8","8ъ8з-","-ъ8и8","8ъ8и-","-ъ8й8","8ъ8й-","-ъ8к8","8ъ8к-","-ъ8л8","8ъ8л-","-ъ8м8","8ъ8м-","-ъ8н8","8ъ8н-","-ъ8о8","8ъ8о-","-ъ8п8","8ъ8п-","-ъ8р8","8ъ8р-","-ъ8с8","8ъ8с-","-ъ8т8","8ъ8т-","-ъ8у8","8ъ8у-","-ъ8ф8","8ъ8ф-","-ъ8х8","8ъ8х-","-ъ8ц8","8ъ8ц-","-ъ8ч8","8ъ8ч-","-ъ8ш8","8ъ8ш-","-ъ8щ8","8ъ8щ-","-ъ8ъ8","8ъ8ъ-","-ъ8ы8","8ъ8ы-","-ъ8ь8","8ъ8ь-","-ъ8э8","8ъ8э-","-ъ8ю8","8ъ8ю-","-ъ8я8","8ъ8я-","-ы8а8","8ы8а-","-ы8б8","8ы8б-","-ы8в8","8ы8в-","-ы8г8","8ы8г-","-ы8д8","8ы8д-","-ы8е8","8ы8е-","-ы8ё8","8ы8ё-","-ы8ж8","8ы8ж-","-ы8з8","8ы8з-","-ы8и8","8ы8и-","-ы8й8","8ы8й-","-ы8к8","8ы8к-","-ы8л8","8ы8л-","-ы8м8","8ы8м-","-ы8н8","8ы8н-","-ы8о8","8ы8о-","-ы8п8","8ы8п-","-ы8р8","8ы8р-","-ы8с8","8ы8с-","-ы8т8","8ы8т-","-ы8у8","8ы8у-","-ы8ф8","8ы8ф-","-ы8х8","8ы8х-","-ы8ц8","8ы8ц-","-ы8ч8","8ы8ч-","-ы8ш8","8ы8ш-","-ы8щ8","8ы8щ-","-ы8ъ8","8ы8ъ-","-ы8ы8","8ы8ы-","-ы8ь8","8ы8ь-","-ы8э8","8ы8э-","-ы8ю8","8ы8ю-","-ы8я8","8ы8я-","-ь8а8","8ь8а-","-ь8б8","8ь8б-","-ь8в8","8ь8в-","-ь8г8","8ь8г-","-ь8д8","8ь8д-","-ь8е8","8ь8е-","-ь8ё8","8ь8ё-","-ь8ж8","8ь8ж-","-ь8з8","8ь8з-","-ь8и8","8ь8и-","-ь8й8","8ь8й-","-ь8к8","8ь8к-","-ь8л8","8ь8л-","-ь8м8","8ь8м-","-ь8н8","8ь8н-","-ь8о8","8ь8о-","-ь8п8","8ь8п-","-ь8р8","8ь8р-","-ь8с8","8ь8с-","-ь8т8","8ь8т-","-ь8у8","8ь8у-","-ь8ф8","8ь8ф-","-ь8х8","8ь8х-","-ь8ц8","8ь8ц-","-ь8ч8","8ь8ч-","-ь8ш8","8ь8ш-","-ь8щ8","8ь8щ-","-ь8ъ8","8ь8ъ-","-ь8ы8","8ь8ы-","-ь8ь8","8ь8ь-","-ь8э8","8ь8э-","-ь8ю8","8ь8ю-","-ь8я8","8ь8я-","-э8а8","8э8а-","-э8б8","8э8б-","-э8в8","8э8в-","-э8г8","8э8г-","-э8д8","8э8д-","-э8е8","8э8е-","-э8ё8","8э8ё-","-э8ж8","8э8ж-","-э8з8","8э8з-","-э8и8","8э8и-","-э8й8","8э8й-","-э8к8","8э8к-","-э8л8","8э8л-","-э8м8","8э8м-","-э8н8","8э8н-","-э8о8","8э8о-","-э8п8","8э8п-","-э8р8","8э8р-","-э8с8","8э8с-","-э8т8","8э8т-","-э8у8","8э8у-","-э8ф8","8э8ф-","-э8х8","8э8х-","-э8ц8","8э8ц-","-э8ч8","8э8ч-","-э8ш8","8э8ш-","-э8щ8","8э8щ-","-э8ъ8","8э8ъ-","-э8ы8","8э8ы-","-э8ь8","8э8ь-","-э8э8","8э8э-","-э8ю8","8э8ю-","-э8я8","8э8я-","-ю8а8","8ю8а-","-ю8б8","8ю8б-","-ю8в8","8ю8в-","-ю8г8","8ю8г-","-ю8д8","8ю8д-","-ю8е8","8ю8е-","-ю8ё8","8ю8ё-","-ю8ж8","8ю8ж-","-ю8з8","8ю8з-","-ю8и8","8ю8и-","-ю8й8","8ю8й-","-ю8к8","8ю8к-","-ю8л8","8ю8л-","-ю8м8","8ю8м-","-ю8н8","8ю8н-","-ю8о8","8ю8о-","-ю8п8","8ю8п-","-ю8р8","8ю8р-","-ю8с8","8ю8с-","-ю8т8","8ю8т-","-ю8у8","8ю8у-","-ю8ф8","8ю8ф-","-ю8х8","8ю8х-","-ю8ц8","8ю8ц-","-ю8ч8","8ю8ч-","-ю8ш8","8ю8ш-","-ю8щ8","8ю8щ-","-ю8ъ8","8ю8ъ-","-ю8ы8","8ю8ы-","-ю8ь8","8ю8ь-","-ю8э8","8ю8э-","-ю8ю8","8ю8ю-","-ю8я8","8ю8я-","-я8а8","8я8а-","-я8б8","8я8б-","-я8в8","8я8в-","-я8г8","8я8г-","-я8д8","8я8д-","-я8е8","8я8е-","-я8ё8","8я8ё-","-я8ж8","8я8ж-","-я8з8","8я8з-","-я8и8","8я8и-","-я8й8","8я8й-","-я8к8","8я8к-","-я8л8","8я8л-","-я8м8","8я8м-","-я8н8","8я8н-","-я8о8","8я8о-","-я8п8","8я8п-","-я8р8","8я8р-","-я8с8","8я8с-","-я8т8","8я8т-","-я8у8","8я8у-","-я8ф8","8я8ф-","-я8х8","8я8х-","-я8ц8","8я8ц-","-я8ч8","8я8ч-","-я8ш8","8я8ш-","-я8щ8","8я8щ-","-я8ъ8","8я8ъ-","-я8ы8","8я8ы-","-я8ь8","8я8ь-","-я8э8","8я8э-","-я8ю8","8я8ю-","-я8я8","8я8я-",""],exceptions:["ас-бест","бездн","биз-нес-мен","буй-нак-ске","вбли-зи","взба-ла-муть-ся","вздрем-нешь","во-до-сли-вом","волж-ске","воп-лем","вопль","вост-ра","во-ткать","во-ткем","во-ткешь","во-тку","во-ткут","впол-обо-ро-та","впол-уха","все-во-лож-ске","вцспс","га-рем-но-го","го-ло-дра-нец","грэс","дву-зу-бец","днепр","добре-ем","до-бре-ем-ся","добре-ет","добре-е-те","до-бре-е-тесь","до-бре-ет-ся","добре-ешь","до-бре-ешь-ся","добрею","до-бре-юсь","добре-ют","до-бре-ют-ся","до-бре-сти","до-бро-дят","до-брось","до-брось-те","до-бро-сят","до-бро-шу","домну","доп-пель","драх-му","дрейф-лю","дрейфь-те","еди-но-жды","зав-сек-то-ром","за-мру","за-члись","из-древ-ле","изо-тру","ин-ког-ни-то","искр","ка-за-шек","казнь","кольд-кре-мом","корн-па-пир","ксендз","лик-бе-зом","ло-шадь-ми","людь-ми","лю-э-сом","ма-зу-те","ме-ти-лам","ме-ти-ла-ми","мно-га-жды","морщь-те","на-бе-крень","навз-ничь","на-вскид-ку","на-встре-чу","нагл","на-изусть","на-ис-ко-сок","наи-ме-нее","на-ис-кось","на-обо-рот","на-от-рез","на-супь-ся","на-угад","на-уголь-ник","не-ост-ра","нес-лась","нес-лись","нет-то","не-уду","обидь-ся","обо-шлось","об-ра-сти","од-на-жды","ослаб-ла","ото-мстят","ото-мщу","ото-тру","отру","отрусь","паб-ли-си-ти","па-на-ме","па-на-мец","па-ра-так-сис","пе-ре-вру","пе-ре-ме-жать","пе-ре-ме-жать-ся","пе-ре-шла","пис-чая","по-все-дне-вен","по-гре-мок","по-до-тру","по-ис-ти-не","по-лу-то-ра-ста","по-лу-явью","по-млад-ше","помни","по-мнись","помни-те","по-мни-тесь","по-мно-гу","по-мру","пол-вто-ро-го","пол-шка-фа","по-на-доб-люсь","по-трафь-те","преж-де","прид-ти","при-шла","при-шлось","про-тру","про-хлад-ца","пско-ва","пыл-че","раз-орем-ся","раз-оре-тесь","раз-орет-ся","раз-орешь-ся","разо-тру","ра-зу-мом","резв-люсь","рсфср","сан-узел","сдрейф-лю","се-го-дня","сме-жат","со-блю-сти","со-лжешь","сост-рим","сост-ришь","сост-рю","сост-рят","со-ткать","со-ткем","со-ткешь","сотку","со-ткут","срос-лась","срос-лись","стрем-глав","так-же","тве-ре-зо-го","те-ле-ате-лье","тер-но-сли-вом","троп-лю","тьфу","узу-фрукт","умнем","умнет","умнете","умну","умру","услышь-те","ушла","фо-то-пле-нок","ца-ре-дво-рец","че-рес-чур","чер-но-сли-вом","чресл","чуж-дость","шесть-де-сят","юсом","ядо-зу-бе","ярем-но-го",""]}}));
\ No newline at end of file +function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).localforage=t()}}((function(){return function t(e,i,n){function r(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[o]={exports:{}};e[o][0].call(c.exports,(function(t){var i=e[o][1][t];return r(i||t)}),c,c.exports,t,e,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,i){(function(t){"use strict";var i,n,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var s=0,o=new r(c),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),i=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var l=new t.MessageChannel;l.port1.onmessage=c,i=function(){l.port2.postMessage(0)}}var h=[];function c(){var t,e;n=!0;for(var i=h.length;i;){for(e=h,h=[],t=-1;++t<i;)e[t]();i=h.length}n=!1}e.exports=function(t){1!==h.push(t)||n||i()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){"use strict";var n=t(1);function r(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function h(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,i){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function u(t,e,i){n((function(){var n;try{n=e(i)}catch(e){return s.reject(t,e)}n===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,n)}))}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var i=!1;function n(e){i||(i=!0,s.reject(t,e))}function r(e){i||(i=!0,s.resolve(t,e))}var o=p((function(){e(r,n)}));"error"===o.status&&n(o.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(t){i.status="error",i.value=t}return i}e.exports=h,h.prototype.catch=function(t){return this.then(null,t)},h.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===o)return this;var i=new this.constructor(r);this.state!==l?u(i,this.state===a?t:e,this.outcome):this.queue.push(new c(i,t,e));return i},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){u(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){u(this.promise,this.onRejected,t)},s.resolve=function(t,e){var i=p(d,e);if("error"===i.status)return s.reject(t,i.value);var n=i.value;if(n)f(t,n);else{t.state=a,t.outcome=e;for(var r=-1,o=t.queue.length;++r<o;)t.queue[r].callFulfilled(e)}return t},s.reject=function(t,e){t.state=o,t.outcome=e;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(e);return t},h.resolve=function(t){if(t instanceof this)return t;return s.resolve(new this(r),t)},h.reject=function(t){var e=new this(r);return s.reject(e,t)},h.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var o=new Array(i),a=0,l=-1,h=new this(r);for(;++l<i;)c(t[l],l);return h;function c(t,r){e.resolve(t).then((function(t){o[r]=t,++a!==i||n||(n=!0,s.resolve(h,o))}),(function(t){n||(n=!0,s.reject(h,t))}))}},h.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var o=-1,a=new this(r);for(;++o<i;)l=t[o],e.resolve(l).then((function(t){n||(n=!0,s.resolve(a,t))}),(function(t){n||(n=!0,s.reject(a,t))}));var l;return a}},{1:1}],3:[function(t,e,i){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}();function s(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(r){if("TypeError"!==r.name)throw r;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)i.append(t[n]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var o=Promise;function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function l(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function h(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function c(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var u=void 0,d={},f=Object.prototype.toString;function p(t){return"boolean"==typeof u?o.resolve(u):function(t){return new o((function(e){var i=t.transaction("local-forage-detect-blob-support","readwrite"),n=s([""]);i.objectStore("local-forage-detect-blob-support").put(n,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);e(i||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}(t).then((function(t){return u=t}))}function g(t){var e=d[t.name],i={};i.promise=new o((function(t,e){i.resolve=t,i.reject=e})),e.deferredOperations.push(i),e.dbReady?e.dbReady=e.dbReady.then((function(){return i.promise})):e.dbReady=i.promise}function m(t){var e=d[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var i=d[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function y(t,e){return new o((function(i,n){if(d[t.name]=d[t.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},t.db){if(!e)return i(t.db);g(t),t.db.close()}var s=[t.name];e&&s.push(t.version);var o=r.open.apply(r,s);e&&(o.onupgradeneeded=function(e){var i=o.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),o.onerror=function(t){t.preventDefault(),n(o.error)},o.onsuccess=function(){var e=o.result;e.onversionchange=function(t){t.target.close()},i(e),m(t)}}))}function b(t){return y(t,!1)}function w(t){return y(t,!0)}function x(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),n=t.version<t.db.version,r=t.version>t.db.version;if(n&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||i){if(i){var s=t.db.version+1;s>t.version&&(t.version=s)}return!0}return!1}function _(t){return s([function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i),r=0;r<e;r++)n[r]=t.charCodeAt(r);return i}(atob(t.data))],{type:t.type})}function E(t){return t&&t.__local_forage_encoded_blob}function k(t){var e=this,i=e._initReady().then((function(){var t=d[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return l(i,t,t),i}function T(t,e,i,n){void 0===n&&(n=1);try{var r=t.db.transaction(t.storeName,e);i(null,r)}catch(r){if(n>0&&(!t.db||"InvalidStateError"===r.name||"NotFoundError"===r.name))return o.resolve().then((function(){if(!t.db||"NotFoundError"===r.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),w(t)})).then((function(){return function(t){g(t);for(var e=d[t.name],i=e.forages,n=0;n<i.length;n++){var r=i[n];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,b(t).then((function(e){return t.db=e,x(t)?w(t):e})).then((function(n){t.db=e.db=n;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=n})).catch((function(e){throw v(t,e),e}))}(t).then((function(){T(t,e,i,n-1)}))})).catch(i);i(r)}}var S={_driver:"asyncStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]=t[n];var r=d[i.name];r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},d[i.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=k);var s=[];function a(){return o.resolve()}for(var l=0;l<r.forages.length;l++){var h=r.forages[l];h!==e&&s.push(h._initReady().catch(a))}var c=r.forages.slice(0);return o.all(s).then((function(){return i.db=r.db,b(i)})).then((function(t){return i.db=t,x(i,e._defaultConfig.version)?w(i):t})).then((function(t){i.db=r.db=t,e._dbInfo=i;for(var n=0;n<c.length;n++){var s=c[n];s!==e&&(s._dbInfo.db=i.db,s._dbInfo.version=i.version)}}))},_support:function(){try{if(!r||!r.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).openCursor(),a=1;o.onsuccess=function(){var i=o.result;if(i){var n=i.value;E(n)&&(n=_(n));var r=t(n,i.key,a++);void 0!==r?e(r):i.continue()}else e()},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).get(t);o.onsuccess=function(){var t=o.result;void 0===t&&(t=null),E(t)&&(t=_(t)),e(t)},o.onerror=function(){n(o.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=h(t);var r=new o((function(i,r){var s;n.ready().then((function(){return s=n._dbInfo,"[object Blob]"===f.call(e)?p(s.db).then((function(t){return t?e:(i=e,new o((function(t,e){var n=new FileReader;n.onerror=e,n.onloadend=function(e){var n=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:n,type:i.type})},n.readAsBinaryString(i)})));var i})):e})).then((function(e){T(n._dbInfo,"readwrite",(function(s,o){if(s)return r(s);try{var a=o.objectStore(n._dbInfo.storeName);null===e&&(e=void 0);var l=a.put(e,t);o.oncomplete=function(){void 0===e&&(e=null),i(e)},o.onabort=o.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(t){r(t)}}))})).catch(r)}));return a(r,i),r},removeItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){T(i._dbInfo,"readwrite",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName).delete(t);s.oncomplete=function(){e()},s.onerror=function(){n(o.error)},s.onabort=function(){var t=o.error?o.error:o.transaction.error;n(t)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readwrite",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=s.error?s.error:s.transaction.error;i(t)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).count();s.onsuccess=function(){t(s.result)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new o((function(e,n){t<0?e(null):i.ready().then((function(){T(i._dbInfo,"readonly",(function(r,s){if(r)return n(r);try{var o=s.objectStore(i._dbInfo.storeName),a=!1,l=o.openKeyCursor();l.onsuccess=function(){var i=l.result;i?0===t||a?e(i.key):(a=!0,i.advance(t)):e(null)},l.onerror=function(){n(l.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){T(e._dbInfo,"readonly",(function(n,r){if(n)return i(n);try{var s=r.objectStore(e._dbInfo.storeName).openKeyCursor(),o=[];s.onsuccess=function(){var e=s.result;e?(o.push(e.key),e.continue()):t(o)},s.onerror=function(){i(s.error)}}catch(t){i(t)}}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,s=this;if(t.name){var l=t.name===i.name&&s._dbInfo.db,h=l?o.resolve(s._dbInfo.db):b(t).then((function(e){var i=d[t.name],n=i.forages;i.db=e;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=e;return e}));n=t.storeName?h.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;g(t);var n=d[t.name],s=n.forages;e.close();for(var a=0;a<s.length;a++){var l=s[a];l._dbInfo.db=null,l._dbInfo.version=i}return new o((function(e,n){var s=r.open(t.name,i);s.onerror=function(t){s.result.close(),n(t)},s.onupgradeneeded=function(){s.result.deleteObjectStore(t.storeName)},s.onsuccess=function(){var t=s.result;t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<s.length;e++){var i=s[e];i._dbInfo.db=t,m(i._dbInfo)}})).catch((function(e){throw(v(t,e)||o.resolve()).catch((function(){})),e}))}})):h.then((function(e){g(t);var i=d[t.name],n=i.forages;e.close();for(var s=0;s<n.length;s++){n[s]._dbInfo.db=null}return new o((function(e,i){var n=r.deleteDatabase(t.name);n.onerror=function(){var t=n.result;t&&t.close(),i(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},n.onsuccess=function(){var t=n.result;t&&t.close(),e(t)}})).then((function(t){i.db=t;for(var e=0;e<n.length;e++){m(n[e]._dbInfo)}})).catch((function(e){throw(v(t,e)||o.resolve()).catch((function(){})),e}))}))}else n=o.reject("Invalid arguments");return a(n,e),n}};var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=/^~~local_forage_type~([^~]+)~/,O="__lfsc__:".length,I=O+"arbf".length,A=Object.prototype.toString;function R(t){var e,i,n,r,s,o=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var h=new ArrayBuffer(o),c=new Uint8Array(h);for(e=0;e<a;e+=4)i=C.indexOf(t[e]),n=C.indexOf(t[e+1]),r=C.indexOf(t[e+2]),s=C.indexOf(t[e+3]),c[l++]=i<<2|n>>4,c[l++]=(15&n)<<4|r>>2,c[l++]=(3&r)<<6|63&s;return h}function D(t){var e,i=new Uint8Array(t),n="";for(e=0;e<i.length;e+=3)n+=C[i[e]>>2],n+=C[(3&i[e])<<4|i[e+1]>>4],n+=C[(15&i[e+1])<<2|i[e+2]>>6],n+=C[63&i[e+2]];return i.length%3==2?n=n.substring(0,n.length-1)+"=":i.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var j={serialize:function(t,e){var i="";if(t&&(i=A.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===A.call(t.buffer))){var n,r="__lfsc__:";t instanceof ArrayBuffer?(n=t,r+="arbf"):(n=t.buffer,"[object Int8Array]"===i?r+="si08":"[object Uint8Array]"===i?r+="ui08":"[object Uint8ClampedArray]"===i?r+="uic8":"[object Int16Array]"===i?r+="si16":"[object Uint16Array]"===i?r+="ur16":"[object Int32Array]"===i?r+="si32":"[object Uint32Array]"===i?r+="ui32":"[object Float32Array]"===i?r+="fl32":"[object Float64Array]"===i?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+D(n))}else if("[object Blob]"===i){var s=new FileReader;s.onload=function(){var i="~~local_forage_type~"+t.type+"~"+D(this.result);e("__lfsc__:blob"+i)},s.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(i){console.error("Couldn't convert value into a JSON string: ",t),e(null,i)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,O))return JSON.parse(t);var e,i=t.substring(I),n=t.substring(O,I);if("blob"===n&&N.test(i)){var r=i.match(N);e=r[1],i=i.substring(r[0].length)}var o=R(i);switch(n){case"arbf":return o;case"blob":return s([o],{type:e});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+n)}},stringToBuffer:R,bufferToString:D};function z(t,e,i,n){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,n)}function L(t,e,i,n,r,s){t.executeSql(i,n,r,(function(t,o){o.code===o.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,a){a.rows.length?s(t,o):z(t,e,(function(){t.executeSql(i,n,r,s)}),s)}),s):s(t,o)}),s)}function P(t,e,i,n){var r=this;t=h(t);var s=new o((function(s,o){r.ready().then((function(){void 0===e&&(e=null);var a=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,h){h?o(h):l.db.transaction((function(i){L(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){s(a)}),(function(t,e){o(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(n>0)return void s(P.apply(r,[t,a,i,n-1]));o(e)}}))}))})).catch(o)}));return a(s,i),s}function B(t){return new o((function(e,i){t.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,n){for(var r=[],s=0;s<n.rows.length;s++)r.push(n.rows.item(s).name);e({db:t,storeNames:r})}),(function(t,e){i(e)}))}),(function(t){i(t)}))}))}var M={_driver:"webSQLStorage",_initStorage:function(t){var e=this,i={db:null};if(t)for(var n in t)i[n]="string"!=typeof t[n]?t[n].toString():t[n];var r=new o((function(t,n){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(t){return n(t)}i.db.transaction((function(r){z(r,i,(function(){e._dbInfo=i,t()}),(function(t,e){n(e)}))}),n)}));return i.serializer=j,r},_support:"function"==typeof openDatabase,iterate:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName,[],(function(i,n){for(var s=n.rows,o=s.length,a=0;a<o;a++){var l=s.item(a),h=l.value;if(h&&(h=r.serializer.deserialize(h)),void 0!==(h=t(h,l.key,a+1)))return void e(h)}e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,i){var n=i.rows.length?i.rows.item(0).value:null;n&&(n=r.serializer.deserialize(n)),e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},setItem:function(t,e,i){return P.apply(this,[t,e,i,1])},removeItem:function(t,e){var i=this;t=h(t);var n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},clear:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"DELETE FROM "+n.storeName,[],(function(){t()}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},length:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(e,i){var n=i.rows.item(0).c;t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},key:function(t,e){var i=this,n=new o((function(e,n){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){L(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,i){var n=i.rows.length?i.rows.item(0).key:null;e(n)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,e),n},keys:function(t){var e=this,i=new o((function(t,i){e.ready().then((function(){var n=e._dbInfo;n.db.transaction((function(e){L(e,n,"SELECT key FROM "+n.storeName,[],(function(e,i){for(var n=[],r=0;r<i.rows.length;r++)n.push(i.rows.item(r).key);t(n)}),(function(t,e){i(e)}))}))})).catch(i)}));return a(i,t),i},dropInstance:function(t,e){e=c.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var n,r=this;return a(n=t.name?new o((function(e){var n;n=t.name===i.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:n,storeNames:[t.storeName]}):e(B(n))})).then((function(t){return new o((function(e,i){t.db.transaction((function(n){function r(t){return new o((function(e,i){n.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){i(e)}))}))}for(var s=[],a=0,l=t.storeNames.length;a<l;a++)s.push(r(t.storeNames[a]));o.all(s).then((function(){e()})).catch((function(t){i(t)}))}),(function(t){i(t)}))}))})):o.reject("Invalid arguments"),e),n}};function F(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(t){return!0}}()||localStorage.length>0}var U={_driver:"localStorageWrapper",_initStorage:function(t){var e={};if(t)for(var i in t)e[i]=t[i];return e.keyPrefix=F(t,this._defaultConfig),q()?(this._dbInfo=e,e.serializer=j,o.resolve()):o.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var i=this,n=i.ready().then((function(){for(var e=i._dbInfo,n=e.keyPrefix,r=n.length,s=localStorage.length,o=1,a=0;a<s;a++){var l=localStorage.key(a);if(0===l.indexOf(n)){var h=localStorage.getItem(l);if(h&&(h=e.serializer.deserialize(h)),void 0!==(h=t(h,l.substring(r),o++)))return h}}}));return a(n,e),n},getItem:function(t,e){var i=this;t=h(t);var n=i.ready().then((function(){var e=i._dbInfo,n=localStorage.getItem(e.keyPrefix+t);return n&&(n=e.serializer.deserialize(n)),n}));return a(n,e),n},setItem:function(t,e,i){var n=this;t=h(t);var r=n.ready().then((function(){void 0===e&&(e=null);var i=e;return new o((function(r,s){var o=n._dbInfo;o.serializer.serialize(e,(function(e,n){if(n)s(n);else try{localStorage.setItem(o.keyPrefix+t,e),r(i)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||s(t),s(t)}}))}))}));return a(r,i),r},removeItem:function(t,e){var i=this;t=h(t);var n=i.ready().then((function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return a(n,e),n},clear:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var n=localStorage.key(i);0===n.indexOf(t)&&localStorage.removeItem(n)}}));return a(i,t),i},length:function(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e},key:function(t,e){var i=this,n=i.ready().then((function(){var e,n=i._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(n.keyPrefix.length)),e}));return a(n,e),n},keys:function(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo,i=localStorage.length,n=[],r=0;r<i;r++){var s=localStorage.key(r);0===s.indexOf(t.keyPrefix)&&n.push(s.substring(t.keyPrefix.length))}return n}));return a(i,t),i},dropInstance:function(t,e){if(e=c.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i=this.config();t.name=t.name||i.name,t.storeName=t.storeName||i.storeName}var n,r=this;return a(n=t.name?new o((function(e){t.storeName?e(F(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var i=localStorage.key(e);0===i.indexOf(t)&&localStorage.removeItem(i)}})):o.reject("Invalid arguments"),e),n}},W=function(t,e){for(var i,n,r=t.length,s=0;s<r;){if((i=t[s])===(n=e)||"number"==typeof i&&"number"==typeof n&&isNaN(i)&&isNaN(n))return!0;s++}return!1},$=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},H={},X={},Y={INDEXEDDB:S,WEBSQL:M,LOCALSTORAGE:U},V=[Y.INDEXEDDB._driver,Y.WEBSQL._driver,Y.LOCALSTORAGE._driver],Z=["dropInstance"],G=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Z),K={description:"",driver:V.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Q(t,e){t[e]=function(){var i=arguments;return t.ready().then((function(){return t[e].apply(t,i)}))}}function J(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&($(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}var tt=new(function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Y)if(Y.hasOwnProperty(i)){var n=Y[i],r=n._driver;this[i]=r,H[r]||this.defineDriver(n)}this._defaultConfig=J({},K),this._config=J({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":n(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,i){var n=new o((function(e,i){try{var n=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(r);for(var s=G.concat("_initStorage"),l=0,h=s.length;l<h;l++){var c=s[l];if((!W(Z,c)||t[c])&&"function"!=typeof t[c])return void i(r)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),i=o.reject(e);return a(i,arguments[arguments.length-1]),i}},i=0,n=Z.length;i<n;i++){var r=Z[i];t[r]||(t[r]=e(r))}}();var u=function(i){H[n]&&console.info("Redefining LocalForage driver: "+n),H[n]=t,X[n]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(u,i):u(!!t._support):u(!0)}catch(t){i(t)}}));return l(n,e,i),n},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,i){var n=H[t]?o.resolve(H[t]):o.reject(new Error("Driver not found."));return l(n,e,i),n},t.prototype.getSerializer=function(t){var e=o.resolve(j);return l(e,t),e},t.prototype.ready=function(t){var e=this,i=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return l(i,t,t),i},t.prototype.setDriver=function(t,e,i){var n=this;$(t)||(t=[t]);var r=this._getSupportedDrivers(t);function s(){n._config.driver=n.driver()}function a(t){return n._extend(t),s(),n._ready=n._initStorage(n._config),n._ready}var h=null!==this._driverSet?this._driverSet.catch((function(){return o.resolve()})):o.resolve();return this._driverSet=h.then((function(){var t=r[0];return n._dbInfo=null,n._ready=null,n.getDriver(t).then((function(t){n._driver=t._driver,s(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(t){return function(){var e=0;return function i(){for(;e<t.length;){var r=t[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(a).catch(i)}s();var l=new Error("No available storage method found.");return n._driverSet=o.reject(l),n._driverSet}()}}(r)}))})).catch((function(){s();var t=new Error("No available storage method found.");return n._driverSet=o.reject(t),n._driverSet})),l(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!X[t]},t.prototype._extend=function(t){J(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=G.length;t<e;t++)Q(this,G[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=tt},{3:3}]},{},[4])(4)})),function(t){t.attrFn=t.attrFn||{};var e="ontouchstart"in window,i={tap_pixel_range:5,swipe_h_threshold:50,swipe_v_threshold:50,taphold_threshold:750,doubletap_int:500,shake_threshold:15,touch_capable:e,orientation_support:"orientation"in window&&"onorientationchange"in window,startevent:e?"touchstart":"mousedown",endevent:e?"touchend":"mouseup",moveevent:e?"touchmove":"mousemove",tapevent:e?"tap":"click",scrollevent:e?"touchmove":"scroll",hold_timer:null,tap_timer:null};t.touch={},t.isTouchCapable=function(){return i.touch_capable},t.getStartEvent=function(){return i.startevent},t.getEndEvent=function(){return i.endevent},t.getMoveEvent=function(){return i.moveevent},t.getTapEvent=function(){return i.tapevent},t.getScrollEvent=function(){return i.scrollevent},t.touch.setSwipeThresholdX=function(t){if("number"!=typeof t)throw new Error("Threshold parameter must be a type of number");i.swipe_h_threshold=t},t.touch.setSwipeThresholdY=function(t){if("number"!=typeof t)throw new Error("Threshold parameter must be a type of number");i.swipe_v_threshold=t},t.touch.setDoubleTapInt=function(t){if("number"!=typeof t)throw new Error("Interval parameter must be a type of number");i.doubletap_int=t},t.touch.setTapHoldThreshold=function(t){if("number"!=typeof t)throw new Error("Threshold parameter must be a type of number");i.taphold_threshold=t},t.touch.setTapRange=function(t){if("number"!=typeof t)throw new Error("Ranger parameter must be a type of number");i.tap_pixel_range=threshold},t.each(["tapstart","tapend","tapmove","tap","singletap","doubletap","taphold","swipe","swipeup","swiperight","swipedown","swipeleft","swipeend","scrollstart","scrollend","orientationchange","tap2","taphold2"],(function(e,i){t.fn[i]=function(t){return t?this.on(i,t):this.trigger(i)},t.attrFn[i]=!0})),t.event.special.tapstart={setup:function(){var e=this,n=t(e);n.on(i.startevent,(function t(r){if(n.data("callee",t),r.which&&1!==r.which)return!1;var s=r.originalEvent,o={position:{x:i.touch_capable?s.touches[0].pageX:r.pageX,y:i.touch_capable?s.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(e,"tapstart",r,o),!0}))},remove:function(){t(this).off(i.startevent,t(this).data.callee)}},t.event.special.tapmove={setup:function(){var e=this,n=t(e);n.on(i.moveevent,(function t(r){n.data("callee",t);var s=r.originalEvent,o={position:{x:i.touch_capable?s.touches[0].pageX:r.pageX,y:i.touch_capable?s.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(e,"tapmove",r,o),!0}))},remove:function(){t(this).off(i.moveevent,t(this).data.callee)}},t.event.special.tapend={setup:function(){var e=this,n=t(e);n.on(i.endevent,(function t(r){n.data("callee",t);var s=r.originalEvent,o={position:{x:i.touch_capable?s.changedTouches[0].pageX:r.pageX,y:i.touch_capable?s.changedTouches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(s.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(r.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(s.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(r.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:r.target};return v(e,"tapend",r,o),!0}))},remove:function(){t(this).off(i.endevent,t(this).data.callee)}},t.event.special.taphold={setup:function(){var e,n=this,r=t(n),s={x:0,y:0},o=0,a=0;r.on(i.startevent,(function t(l){if(l.which&&1!==l.which)return!1;r.data("tapheld",!1),e=l.target;var h=l.originalEvent,c=Date.now();i.touch_capable?h.touches[0].pageX:l.pageX,i.touch_capable?h.touches[0].pageY:l.pageY,i.touch_capable?(h.touches[0].pageX,h.touches[0].target.offsetLeft):l.offsetX,i.touch_capable?(h.touches[0].pageY,h.touches[0].target.offsetTop):l.offsetY,s.x=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageX:l.pageX,s.y=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageY:l.pageY,o=s.x,a=s.y;var u=r.parent().data("threshold")?r.parent().data("threshold"):r.data("threshold"),d=void 0!==u&&!1!==u&&parseInt(u)?parseInt(u):i.taphold_threshold;return i.hold_timer=window.setTimeout((function(){var u=s.x-o,d=s.y-a;if(l.target==e&&(s.x==o&&s.y==a||u>=-i.tap_pixel_range&&u<=i.tap_pixel_range&&d>=-i.tap_pixel_range&&d<=i.tap_pixel_range)){r.data("tapheld",!0);for(var f=Date.now()-c,p=l.originalEvent.targetTouches?l.originalEvent.targetTouches:[l],g=[],m=0;m<p.length;m++){var y={position:{x:i.touch_capable?h.changedTouches[m].pageX:l.pageX,y:i.touch_capable?h.changedTouches[m].pageY:l.pageY},offset:{x:i.touch_capable?Math.round(h.changedTouches[m].pageX-(r.offset()?r.offset().left:0)):Math.round(l.pageX-(r.offset()?r.offset().left:0)),y:i.touch_capable?Math.round(h.changedTouches[m].pageY-(r.offset()?r.offset().top:0)):Math.round(l.pageY-(r.offset()?r.offset().top:0))},time:Date.now(),target:l.target,duration:f};g.push(y)}var b=2==p.length?"taphold2":"taphold";r.data("callee1",t),v(n,b,l,g)}}),d),!0})).on(i.endevent,(function t(){r.data("callee2",t),r.data("tapheld",!1),window.clearTimeout(i.hold_timer)})).on(i.moveevent,(function t(e){r.data("callee3",t),o=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX,a=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY}))},remove:function(){t(this).off(i.startevent,t(this).data.callee1).off(i.endevent,t(this).data.callee2).off(i.moveevent,t(this).data.callee3)}},t.event.special.doubletap={setup:function(){var e,n,r=this,s=t(r),o=null,a=!1;s.on(i.startevent,(function e(r){return!(r.which&&1!==r.which||(s.data("doubletapped",!1),r.target,s.data("callee1",e),n=r.originalEvent,o||(o={position:{x:i.touch_capable?n.touches[0].pageX:r.pageX,y:i.touch_capable?n.touches[0].pageY:r.pageY},offset:{x:i.touch_capable?Math.round(n.changedTouches[0].pageX-(s.offset()?s.offset().left:0)):Math.round(r.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(n.changedTouches[0].pageY-(s.offset()?s.offset().top:0)):Math.round(r.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:r.target,element:r.originalEvent.srcElement,index:t(r.target).index()}),0))})).on(i.endevent,(function l(h){var c=Date.now(),u=c-(s.data("lastTouch")||c+1);if(window.clearTimeout(e),s.data("callee2",l),u<i.doubletap_int&&t(h.target).index()==o.index&&u>100){s.data("doubletapped",!0),window.clearTimeout(i.tap_timer);var d={position:{x:i.touch_capable?h.originalEvent.changedTouches[0].pageX:h.pageX,y:i.touch_capable?h.originalEvent.changedTouches[0].pageY:h.pageY},offset:{x:i.touch_capable?Math.round(n.changedTouches[0].pageX-(s.offset()?s.offset().left:0)):Math.round(h.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(n.changedTouches[0].pageY-(s.offset()?s.offset().top:0)):Math.round(h.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:h.target,element:h.originalEvent.srcElement,index:t(h.target).index()},f={firstTap:o,secondTap:d,interval:d.time-o.time};a||(v(r,"doubletap",h,f),o=null),a=!0,window.setTimeout((function(){a=!1}),i.doubletap_int)}else s.data("lastTouch",c),e=window.setTimeout((function(){o=null,window.clearTimeout(e)}),i.doubletap_int,[h]);s.data("lastTouch",c)}))},remove:function(){t(this).off(i.startevent,t(this).data.callee1).off(i.endevent,t(this).data.callee2)}},t.event.special.singletap={setup:function(){var e=this,n=t(e),r=null,s=null,o={x:0,y:0};n.on(i.startevent,(function t(e){return!(e.which&&1!==e.which||(s=Date.now(),r=e.target,n.data("callee1",t),o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX,o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY,0))})).on(i.endevent,(function t(a){if(n.data("callee2",t),a.target==r){var l=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.pageX,h=a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageY:a.pageY;i.tap_timer=window.setTimeout((function(){var t=o.x-l,r=o.y-h;if(!n.data("doubletapped")&&!n.data("tapheld")&&(o.x==l&&o.y==h||t>=-i.tap_pixel_range&&t<=i.tap_pixel_range&&r>=-i.tap_pixel_range&&r<=i.tap_pixel_range)){var c=a.originalEvent,u={position:{x:i.touch_capable?c.changedTouches[0].pageX:a.pageX,y:i.touch_capable?c.changedTouches[0].pageY:a.pageY},offset:{x:i.touch_capable?Math.round(c.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(a.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(c.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(a.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:a.target};u.time-s<i.taphold_threshold&&v(e,"singletap",a,u)}}),i.doubletap_int)}}))},remove:function(){t(this).off(i.startevent,t(this).data.callee1).off(i.endevent,t(this).data.callee2)}},t.event.special.tap={setup:function(){var e,n,r=this,s=t(r),o=!1,a=null,l={x:0,y:0};s.on(i.startevent,(function t(i){return s.data("callee1",t),!(i.which&&1!==i.which||(o=!0,l.x=i.originalEvent.targetTouches?i.originalEvent.targetTouches[0].pageX:i.pageX,l.y=i.originalEvent.targetTouches?i.originalEvent.targetTouches[0].pageY:i.pageY,e=Date.now(),a=i.target,n=i.originalEvent.targetTouches?i.originalEvent.targetTouches:[i],0))})).on(i.endevent,(function t(h){s.data("callee2",t);var c=h.originalEvent.targetTouches?h.originalEvent.changedTouches[0].pageX:h.pageX,u=h.originalEvent.targetTouches?h.originalEvent.changedTouches[0].pageY:h.pageY,d=l.x-c,f=l.y-u;if(a==h.target&&o&&Date.now()-e<i.taphold_threshold&&(l.x==c&&l.y==u||d>=-i.tap_pixel_range&&d<=i.tap_pixel_range&&f>=-i.tap_pixel_range&&f<=i.tap_pixel_range)){for(var p=h.originalEvent,g=[],m=0;m<n.length;m++){var y={position:{x:i.touch_capable?p.changedTouches[m].pageX:h.pageX,y:i.touch_capable?p.changedTouches[m].pageY:h.pageY},offset:{x:i.touch_capable?Math.round(p.changedTouches[m].pageX-(s.offset()?s.offset().left:0)):Math.round(h.pageX-(s.offset()?s.offset().left:0)),y:i.touch_capable?Math.round(p.changedTouches[m].pageY-(s.offset()?s.offset().top:0)):Math.round(h.pageY-(s.offset()?s.offset().top:0))},time:Date.now(),target:h.target};g.push(y)}var b=2==n.length?"tap2":"tap";v(r,b,h,g)}}))},remove:function(){t(this).off(i.startevent,t(this).data.callee1).off(i.endevent,t(this).data.callee2)}},t.event.special.swipe={setup:function(){var e,n=t(this),r=!1,s=!1,o={x:0,y:0},a={x:0,y:0};n.on(i.startevent,(function s(l){(n=t(l.currentTarget)).data("callee1",s),o.x=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageX:l.pageX,o.y=l.originalEvent.targetTouches?l.originalEvent.targetTouches[0].pageY:l.pageY,a.x=o.x,a.y=o.y,r=!0;var h=l.originalEvent;e={position:{x:i.touch_capable?h.touches[0].pageX:l.pageX,y:i.touch_capable?h.touches[0].pageY:l.pageY},offset:{x:i.touch_capable?Math.round(h.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(l.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(h.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(l.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:l.target}})),n.on(i.moveevent,(function l(h){var c;(n=t(h.currentTarget)).data("callee2",l),a.x=h.originalEvent.targetTouches?h.originalEvent.targetTouches[0].pageX:h.pageX,a.y=h.originalEvent.targetTouches?h.originalEvent.targetTouches[0].pageY:h.pageY;var u=n.parent().data("xthreshold")?n.parent().data("xthreshold"):n.data("xthreshold"),d=n.parent().data("ythreshold")?n.parent().data("ythreshold"):n.data("ythreshold"),f=void 0!==u&&!1!==u&&parseInt(u)?parseInt(u):i.swipe_h_threshold,p=void 0!==d&&!1!==d&&parseInt(d)?parseInt(d):i.swipe_v_threshold;if(o.y>a.y&&o.y-a.y>p&&(c="swipeup"),o.x<a.x&&a.x-o.x>f&&(c="swiperight"),o.y<a.y&&a.y-o.y>p&&(c="swipedown"),o.x>a.x&&o.x-a.x>f&&(c="swipeleft"),null!=c&&r){o.x=0,o.y=0,a.x=0,a.y=0,r=!1;var g=h.originalEvent,m={position:{x:i.touch_capable?g.touches[0].pageX:h.pageX,y:i.touch_capable?g.touches[0].pageY:h.pageY},offset:{x:i.touch_capable?Math.round(g.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(h.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(g.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(h.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:h.target},v=Math.abs(e.position.x-m.position.x),y=Math.abs(e.position.y-m.position.y),b={startEvnt:e,endEvnt:m,direction:c.replace("swipe",""),xAmount:v,yAmount:y,duration:m.time-e.time};s=!0,n.trigger("swipe",b).trigger(c,b)}})),n.on(i.endevent,(function o(a){var l="";if((n=t(a.currentTarget)).data("callee3",o),s){var h=n.data("xthreshold"),c=n.data("ythreshold"),u=void 0!==h&&!1!==h&&parseInt(h)?parseInt(h):i.swipe_h_threshold,d=void 0!==c&&!1!==c&&parseInt(c)?parseInt(c):i.swipe_v_threshold,f=a.originalEvent,p={position:{x:i.touch_capable?f.changedTouches[0].pageX:a.pageX,y:i.touch_capable?f.changedTouches[0].pageY:a.pageY},offset:{x:i.touch_capable?Math.round(f.changedTouches[0].pageX-(n.offset()?n.offset().left:0)):Math.round(a.pageX-(n.offset()?n.offset().left:0)),y:i.touch_capable?Math.round(f.changedTouches[0].pageY-(n.offset()?n.offset().top:0)):Math.round(a.pageY-(n.offset()?n.offset().top:0))},time:Date.now(),target:a.target};e.position.y>p.position.y&&e.position.y-p.position.y>d&&(l="swipeup"),e.position.x<p.position.x&&p.position.x-e.position.x>u&&(l="swiperight"),e.position.y<p.position.y&&p.position.y-e.position.y>d&&(l="swipedown"),e.position.x>p.position.x&&e.position.x-p.position.x>u&&(l="swipeleft");var g=Math.abs(e.position.x-p.position.x),m=Math.abs(e.position.y-p.position.y),v={startEvnt:e,endEvnt:p,direction:l.replace("swipe",""),xAmount:g,yAmount:m,duration:p.time-e.time};n.trigger("swipeend",v)}r=!1,s=!1}))},remove:function(){t(this).off(i.startevent,t(this).data.callee1).off(i.moveevent,t(this).data.callee2).off(i.endevent,t(this).data.callee3)}},t.event.special.scrollstart={setup:function(){var e,n,r=this,s=t(r);function o(t,i){v(r,(e=i)?"scrollstart":"scrollend",t)}s.on(i.scrollevent,(function t(i){s.data("callee",t),e||o(i,!0),clearTimeout(n),n=setTimeout((function(){o(i,!1)}),50)}))},remove:function(){t(this).off(i.scrollevent,t(this).data.callee)}};var n,r,s,o,a=t(window),l={0:!0,180:!0};if(i.orientation_support){var h=window.innerWidth||a.width(),c=window.innerHeight||a.height();s=h>c&&h-c>50,o=l[window.orientation],(s&&o||!s&&!o)&&(l={"-90":!0,90:!0})}function u(){var t=n();t!==r&&(r=t,a.trigger("orientationchange"))}t.event.special.orientationchange={setup:function(){return!i.orientation_support&&(r=n(),a.on("throttledresize",u),!0)},teardown:function(){return!i.orientation_support&&(a.off("throttledresize",u),!0)},add:function(t){var e=t.handler;t.handler=function(t){return t.orientation=n(),e.apply(this,arguments)}}},t.event.special.orientationchange.orientation=n=function(){var t=document.documentElement;return(i.orientation_support?l[window.orientation]:t&&t.clientWidth/t.clientHeight<1.1)?"portrait":"landscape"},t.event.special.throttledresize={setup:function(){t(this).on("resize",g)},teardown:function(){t(this).off("resize",g)}};var d,f,p,g=function(){f=Date.now(),(p=f-m)>=250?(m=f,t(this).trigger("throttledresize")):(d&&window.clearTimeout(d),d=window.setTimeout(u,250-p))},m=0;function v(e,i,n,r){var s=n.type;n.type=i,t.event.dispatch.call(e,n,r),n.type=s}t.each({scrollend:"scrollstart",swipeup:"swipe",swiperight:"swipe",swipedown:"swipe",swipeleft:"swipe",swipeend:"swipe",tap2:"tap",taphold2:"taphold"},(function(e,i){t.event.special[e]={setup:function(){t(this).on(i,t.noop)}}}))}(jQuery),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.hyphenationPatternsEnUs=e()}(this,(function(){return{patterns:[" ",".ach4",".ad4der",".af1t",".al3t",".am5at",".an5c",".ang4",".ani5m",".ant4",".an3te",".anti5s",".ar5s",".ar4tie",".ar4ty",".as3c",".as1p",".as1s",".aster5",".atom5",".au1d",".av4i",".awn4",".ba4g",".ba5na",".bas4e",".ber4",".be5ra",".be3sm",".be5sto",".bri2",".but4ti",".cam4pe",".can5c",".capa5b",".car5ol",".ca4t",".ce4la",".ch4",".chill5i",".ci2",".cit5r",".co3e",".co4r",".cor5ner",".de4moi",".de3o",".de3ra",".de3ri",".des4c",".dictio5",".do4t",".du4c",".dumb5",".earth5",".eas3i",".eb4",".eer4",".eg2",".el5d",".el3em",".enam3",".en3g",".en3s",".eq5ui5t",".er4ri",".es3",".eu3",".eye5",".fes3",".for5mer",".ga2",".ge2",".gen3t4",".ge5og",".gi5a",".gi4b",".go4r",".hand5i",".han5k",".he2",".hero5i",".hes3",".het3",".hi3b",".hi3er",".hon5ey",".hon3o",".hov5",".id4l",".idol3",".im3m",".im5pin",".in1",".in3ci",".ine2",".in2k",".in3s",".ir5r",".is4i",".ju3r",".la4cy",".la4m",".lat5er",".lath5",".le2",".leg5e",".len4",".lep5",".lev1",".li4g",".lig5a",".li2n",".li3o",".li4t",".mag5a5",".mal5o",".man5a",".mar5ti",".me2",".mer3c",".me5ter",".mis1",".mist5i",".mon3e",".mo3ro",".mu5ta",".muta5b",".ni4c",".od2",".odd5",".of5te",".or5ato",".or3c",".or1d",".or3t",".os3",".os4tl",".oth3",".out3",".ped5al",".pe5te",".pe5tit",".pi4e",".pio5n",".pi2t",".pre3m",".ra4c",".ran4t",".ratio5na",".ree2",".re5mit",".res2",".re5stat",".ri4g",".rit5u",".ro4q",".ros5t",".row5d",".ru4d",".sci3e",".self5",".sell5",".se2n",".se5rie",".sh2",".si2",".sing4",".st4",".sta5bl",".sy2",".ta4",".te4",".ten5an",".th2",".ti2",".til4",".tim5o5",".ting4",".tin5k",".ton4a",".to4p",".top5i",".tou5s",".trib5ut",".un1a",".un3ce",".under5",".un1e",".un5k",".un5o",".un3u",".up3",".ure3",".us5a",".ven4de",".ve5ra",".wil5i",".ye4","4ab.","a5bal","a5ban","abe2","ab5erd","abi5a","ab5it5ab","ab5lat","ab5o5liz","4abr","ab5rog","ab3ul","a4car","ac5ard","ac5aro","a5ceou","ac1er","a5chet","4a2ci","a3cie","ac1in","a3cio","ac5rob","act5if","ac3ul","ac4um","a2d","ad4din","ad5er.","2adi","a3dia","ad3ica","adi4er","a3dio","a3dit","a5diu","ad4le","ad3ow","ad5ran","ad4su","4adu","a3duc","ad5um","ae4r","aeri4e","a2f","aff4","a4gab","aga4n","ag5ell","age4o","4ageu","ag1i","4ag4l","ag1n","a2go","3agog","ag3oni","a5guer","ag5ul","a4gy","a3ha","a3he","ah4l","a3ho","ai2","a5ia","a3ic.","ai5ly","a4i4n","ain5in","ain5o","ait5en","a1j","ak1en","al5ab","al3ad","a4lar","4aldi","2ale","al3end","a4lenti","a5le5o","al1i","al4ia.","ali4e","al5lev","4allic","4alm","a5log.","a4ly.","4alys","5a5lyst","5alyt","3alyz","4ama","am5ab","am3ag","ama5ra","am5asc","a4matis","a4m5ato","am5era","am3ic","am5if","am5ily","am1in","ami4no","a2mo","a5mon","amor5i","amp5en","a2n","an3age","3analy","a3nar","an3arc","anar4i","a3nati","4and","ande4s","an3dis","an1dl","an4dow","a5nee","a3nen","an5est.","a3neu","2ang","ang5ie","an1gl","a4n1ic","a3nies","an3i3f","an4ime","a5nimi","a5nine","an3io","a3nip","an3ish","an3it","a3niu","an4kli","5anniz","ano4","an5ot","anoth5","an2sa","an4sco","an4sn","an2sp","ans3po","an4st","an4sur","antal4","an4tie","4anto","an2tr","an4tw","an3ua","an3ul","a5nur","4ao","apar4","ap5at","ap5ero","a3pher","4aphi","a4pilla","ap5illar","ap3in","ap3ita","a3pitu","a2pl","apoc5","ap5ola","apor5i","apos3t","aps5es","a3pu","aque5","2a2r","ar3act","a5rade","ar5adis","ar3al","a5ramete","aran4g","ara3p","ar4at","a5ratio","ar5ativ","a5rau","ar5av4","araw4","arbal4","ar4chan","ar5dine","ar4dr","ar5eas","a3ree","ar3ent","a5ress","ar4fi","ar4fl","ar1i","ar5ial","ar3ian","a3riet","ar4im","ar5inat","ar3io","ar2iz","ar2mi","ar5o5d","a5roni","a3roo","ar2p","ar3q","arre4","ar4sa","ar2sh","4as.","as4ab","as3ant","ashi4","a5sia.","a3sib","a3sic","5a5si4t","ask3i","as4l","a4soc","as5ph","as4sh","as3ten","as1tr","asur5a","a2ta","at3abl","at5ac","at3alo","at5ap","ate5c","at5ech","at3ego","at3en.","at3era","ater5n","a5terna","at3est","at5ev","4ath","ath5em","a5then","at4ho","ath5om","4ati.","a5tia","at5i5b","at1ic","at3if","ation5ar","at3itu","a4tog","a2tom","at5omiz","a4top","a4tos","a1tr","at5rop","at4sk","at4tag","at5te","at4th","a2tu","at5ua","at5ue","at3ul","at3ura","a2ty","au4b","augh3","au3gu","au4l2","aun5d","au3r","au5sib","aut5en","au1th","a2va","av3ag","a5van","ave4no","av3era","av5ern","av5ery","av1i","avi4er","av3ig","av5oc","a1vor","3away","aw3i","aw4ly","aws4","ax4ic","ax4id","ay5al","aye4","ays4","azi4er","azz5i","5ba.","bad5ger","ba4ge","bal1a","ban5dag","ban4e","ban3i","barbi5","bari4a","bas4si","1bat","ba4z","2b1b","b2be","b3ber","bbi4na","4b1d","4be.","beak4","beat3","4be2d","be3da","be3de","be3di","be3gi","be5gu","1bel","be1li","be3lo","4be5m","be5nig","be5nu","4bes4","be3sp","be5str","3bet","bet5iz","be5tr","be3tw","be3w","be5yo","2bf","4b3h","bi2b","bi4d","3bie","bi5en","bi4er","2b3if","1bil","bi3liz","bina5r4","bin4d","bi5net","bi3ogr","bi5ou","bi2t","3bi3tio","bi3tr","3bit5ua","b5itz","b1j","bk4","b2l2","blath5","b4le.","blen4","5blesp","b3lis","b4lo","blun4t","4b1m","4b3n","bne5g","3bod","bod3i","bo4e","bol3ic","bom4bi","bon4a","bon5at","3boo","5bor.","4b1ora","bor5d","5bore","5bori","5bos4","b5ota","both5","bo4to","bound3","4bp","4brit","broth3","2b5s2","bsor4","2bt","bt4l","b4to","b3tr","buf4fer","bu4ga","bu3li","bumi4","bu4n","bunt4i","bu3re","bus5ie","buss4e","5bust","4buta","3butio","b5uto","b1v","4b5w","5by.","bys4","1ca","cab3in","ca1bl","cach4","ca5den","4cag4","2c5ah","ca3lat","cal4la","call5in","4calo","can5d","can4e","can4ic","can5is","can3iz","can4ty","cany4","ca5per","car5om","cast5er","cas5tig","4casy","ca4th","4cativ","cav5al","c3c","ccha5","cci4a","ccompa5","ccon4","ccou3t","2ce.","4ced.","4ceden","3cei","5cel.","3cell","1cen","3cenc","2cen4e","4ceni","3cent","3cep","ce5ram","4cesa","3cessi","ces5si5b","ces5t","cet4","c5e4ta","cew4","2ch","4ch.","4ch3ab","5chanic","ch5a5nis","che2","cheap3","4ched","che5lo","3chemi","ch5ene","ch3er.","ch3ers","4ch1in","5chine.","ch5iness","5chini","5chio","3chit","chi2z","3cho2","ch4ti","1ci","3cia","ci2a5b","cia5r","ci5c","4cier","5cific.","4cii","ci4la","3cili","2cim","2cin","c4ina","3cinat","cin3em","c1ing","c5ing.","5cino","cion4","4cipe","ci3ph","4cipic","4cista","4cisti","2c1it","cit3iz","5ciz","ck1","ck3i","1c4l4","4clar","c5laratio","5clare","cle4m","4clic","clim4","cly4","c5n","1co","co5ag","coe2","2cog","co4gr","coi4","co3inc","col5i","5colo","col3or","com5er","con4a","c4one","con3g","con5t","co3pa","cop3ic","co4pl","4corb","coro3n","cos4e","cov1","cove4","cow5a","coz5e","co5zi","c1q","cras5t","5crat.","5cratic","cre3at","5cred","4c3reta","cre4v","cri2","cri5f","c4rin","cris4","5criti","cro4pl","crop5o","cros4e","cru4d","4c3s2","2c1t","cta4b","ct5ang","c5tant","c2te","c3ter","c4ticu","ctim3i","ctu4r","c4tw","cud5","c4uf","c4ui","cu5ity","5culi","cul4tis","3cultu","cu2ma","c3ume","cu4mi","3cun","cu3pi","cu5py","cur5a4b","cu5ria","1cus","cuss4i","3c4ut","cu4tie","4c5utiv","4cutr","1cy","cze4","1d2a","5da.","2d3a4b","dach4","4daf","2dag","da2m2","dan3g","dard5","dark5","4dary","3dat","4dativ","4dato","5dav4","dav5e","5day","d1b","d5c","d1d4","2de.","deaf5","deb5it","de4bon","decan4","de4cil","de5com","2d1ed","4dee.","de5if","deli4e","del5i5q","de5lo","d4em","5dem.","3demic","dem5ic.","de5mil","de4mons","demor5","1den","de4nar","de3no","denti5f","de3nu","de1p","de3pa","depi4","de2pu","d3eq","d4erh","5derm","dern5iz","der5s","des2","d2es.","de1sc","de2s5o","des3ti","de3str","de4su","de1t","de2to","de1v","dev3il","4dey","4d1f","d4ga","d3ge4t","dg1i","d2gy","d1h2","5di.","1d4i3a","dia5b","di4cam","d4ice","3dict","3did","5di3en","d1if","di3ge","di4lato","d1in","1dina","3dine.","5dini","di5niz","1dio","dio5g","di4pl","dir2","di1re","dirt5i","dis1","5disi","d4is3t","d2iti","1di1v","d1j","d5k2","4d5la","3dle.","3dled","3dles.","4dless","2d3lo","4d5lu","2dly","d1m","4d1n4","1do","3do.","do5de","5doe","2d5of","d4og","do4la","doli4","do5lor","dom5iz","do3nat","doni4","doo3d","dop4p","d4or","3dos","4d5out","do4v","3dox","d1p","1dr","drag5on","4drai","dre4","drea5r","5dren","dri4b","dril4","dro4p","4drow","5drupli","4dry","2d1s2","ds4p","d4sw","d4sy","d2th","1du","d1u1a","du2c","d1uca","duc5er","4duct.","4ducts","du5el","du4g","d3ule","dum4be","du4n","4dup","du4pe","d1v","d1w","d2y","5dyn","dy4se","dys5p","e1a4b","e3act","ead1","ead5ie","ea4ge","ea5ger","ea4l","eal5er","eal3ou","eam3er","e5and","ear3a","ear4c","ear5es","ear4ic","ear4il","ear5k","ear2t","eart3e","ea5sp","e3ass","east3","ea2t","eat5en","eath3i","e5atif","e4a3tu","ea2v","eav3en","eav5i","eav5o","2e1b","e4bel.","e4bels","e4ben","e4bit","e3br","e4cad","ecan5c","ecca5","e1ce","ec5essa","ec2i","e4cib","ec5ificat","ec5ifie","ec5ify","ec3im","eci4t","e5cite","e4clam","e4clus","e2col","e4comm","e4compe","e4conc","e2cor","ec3ora","eco5ro","e1cr","e4crem","ec4tan","ec4te","e1cu","e4cul","ec3ula","2e2da","4ed3d","e4d1er","ede4s","4edi","e3dia","ed3ib","ed3ica","ed3im","ed1it","edi5z","4edo","e4dol","edon2","e4dri","e4dul","ed5ulo","ee2c","eed3i","ee2f","eel3i","ee4ly","ee2m","ee4na","ee4p1","ee2s4","eest4","ee4ty","e5ex","e1f","e4f3ere","1eff","e4fic","5efici","efil4","e3fine","ef5i5nite","3efit","efor5es","e4fuse.","4egal","eger4","eg5ib","eg4ic","eg5ing","e5git5","eg5n","e4go.","e4gos","eg1ul","e5gur","5egy","e1h4","eher4","ei2","e5ic","ei5d","eig2","ei5gl","e3imb","e3inf","e1ing","e5inst","eir4d","eit3e","ei3th","e5ity","e1j","e4jud","ej5udi","eki4n","ek4la","e1la","e4la.","e4lac","elan4d","el5ativ","e4law","elaxa4","e3lea","el5ebra","5elec","e4led","el3ega","e5len","e4l1er","e1les","el2f","el2i","e3libe","e4l5ic.","el3ica","e3lier","el5igib","e5lim","e4l3ing","e3lio","e2lis","el5ish","e3liv3","4ella","el4lab","ello4","e5loc","el5og","el3op.","el2sh","el4ta","e5lud","el5ug","e4mac","e4mag","e5man","em5ana","em5b","e1me","e2mel","e4met","em3ica","emi4e","em5igra","em1in2","em5ine","em3i3ni","e4mis","em5ish","e5miss","em3iz","5emniz","emo4g","emoni5o","em3pi","e4mul","em5ula","emu3n","e3my","en5amo","e4nant","ench4er","en3dic","e5nea","e5nee","en3em","en5ero","en5esi","en5est","en3etr","e3new","en5ics","e5nie","e5nil","e3nio","en3ish","en3it","e5niu","5eniz","4enn","4eno","eno4g","e4nos","en3ov","en4sw","ent5age","4enthes","en3ua","en5uf","e3ny.","4en3z","e5of","eo2g","e4oi4","e3ol","eop3ar","e1or","eo3re","eo5rol","eos4","e4ot","eo4to","e5out","e5ow","e2pa","e3pai","ep5anc","e5pel","e3pent","ep5etitio","ephe4","e4pli","e1po","e4prec","ep5reca","e4pred","ep3reh","e3pro","e4prob","ep4sh","ep5ti5b","e4put","ep5uta","e1q","equi3l","e4q3ui3s","er1a","era4b","4erand","er3ar","4erati.","2erb","er4bl","er3ch","er4che","2ere.","e3real","ere5co","ere3in","er5el.","er3emo","er5ena","er5ence","4erene","er3ent","ere4q","er5ess","er3est","eret4","er1h","er1i","e1ria4","5erick","e3rien","eri4er","er3ine","e1rio","4erit","er4iu","eri4v","e4riva","er3m4","er4nis","4ernit","5erniz","er3no","2ero","er5ob","e5roc","ero4r","er1ou","er1s","er3set","ert3er","4ertl","er3tw","4eru","eru4t","5erwau","e1s4a","e4sage.","e4sages","es2c","e2sca","es5can","e3scr","es5cu","e1s2e","e2sec","es5ecr","es5enc","e4sert.","e4serts","e4serva","4esh","e3sha","esh5en","e1si","e2sic","e2sid","es5iden","es5igna","e2s5im","es4i4n","esis4te","esi4u","e5skin","es4mi","e2sol","es3olu","e2son","es5ona","e1sp","es3per","es5pira","es4pre","2ess","es4si4b","estan4","es3tig","es5tim","4es2to","e3ston","2estr","e5stro","estruc5","e2sur","es5urr","es4w","eta4b","eten4d","e3teo","ethod3","et1ic","e5tide","etin4","eti4no","e5tir","e5titio","et5itiv","4etn","et5ona","e3tra","e3tre","et3ric","et5rif","et3rog","et5ros","et3ua","et5ym","et5z","4eu","e5un","e3up","eu3ro","eus4","eute4","euti5l","eu5tr","eva2p5","e2vas","ev5ast","e5vea","ev3ell","evel3o","e5veng","even4i","ev1er","e5verb","e1vi","ev3id","evi4l","e4vin","evi4v","e5voc","e5vu","e1wa","e4wag","e5wee","e3wh","ewil5","ew3ing","e3wit","1exp","5eyc","5eye.","eys4","1fa","fa3bl","fab3r","fa4ce","4fag","fain4","fall5e","4fa4ma","fam5is","5far","far5th","fa3ta","fa3the","4fato","fault5","4f5b","4fd","4fe.","feas4","feath3","fe4b","4feca","5fect","2fed","fe3li","fe4mo","fen2d","fend5e","fer1","5ferr","fev4","4f1f","f4fes","f4fie","f5fin.","f2f5is","f4fly","f2fy","4fh","1fi","fi3a","2f3ic.","4f3ical","f3ican","4ficate","f3icen","fi3cer","fic4i","5ficia","5ficie","4fics","fi3cu","fi5del","fight5","fil5i","fill5in","4fily","2fin","5fina","fin2d5","fi2ne","f1in3g","fin4n","fis4ti","f4l2","f5less","flin4","flo3re","f2ly5","4fm","4fn","1fo","5fon","fon4de","fon4t","fo2r","fo5rat","for5ay","fore5t","for4i","fort5a","fos5","4f5p","fra4t","f5rea","fres5c","fri2","fril4","frol5","2f3s","2ft","f4to","f2ty","3fu","fu5el","4fug","fu4min","fu5ne","fu3ri","fusi4","fus4s","4futa","1fy","1ga","gaf4","5gal.","3gali","ga3lo","2gam","ga5met","g5amo","gan5is","ga3niz","gani5za","4gano","gar5n4","gass4","gath3","4gativ","4gaz","g3b","gd4","2ge.","2ged","geez4","gel4in","ge5lis","ge5liz","4gely","1gen","ge4nat","ge5niz","4geno","4geny","1geo","ge3om","g4ery","5gesi","geth5","4geto","ge4ty","ge4v","4g1g2","g2ge","g3ger","gglu5","ggo4","gh3in","gh5out","gh4to","5gi.","1gi4a","gia5r","g1ic","5gicia","g4ico","gien5","5gies.","gil4","g3imen","3g4in.","gin5ge","5g4ins","5gio","3gir","gir4l","g3isl","gi4u","5giv","3giz","gl2","gla4","glad5i","5glas","1gle","gli4b","g3lig","3glo","glo3r","g1m","g4my","gn4a","g4na.","gnet4t","g1ni","g2nin","g4nio","g1no","g4non","1go","3go.","gob5","5goe","3g4o4g","go3is","gon2","4g3o3na","gondo5","go3ni","5goo","go5riz","gor5ou","5gos.","gov1","g3p","1gr","4grada","g4rai","gran2","5graph.","g5rapher","5graphic","4graphy","4gray","gre4n","4gress.","4grit","g4ro","gruf4","gs2","g5ste","gth3","gu4a","3guard","2gue","5gui5t","3gun","3gus","4gu4t","g3w","1gy","2g5y3n","gy5ra","h3ab4l","hach4","hae4m","hae4t","h5agu","ha3la","hala3m","ha4m","han4ci","han4cy","5hand.","han4g","hang5er","hang5o","h5a5niz","han4k","han4te","hap3l","hap5t","ha3ran","ha5ras","har2d","hard3e","har4le","harp5en","har5ter","has5s","haun4","5haz","haz3a","h1b","1head","3hear","he4can","h5ecat","h4ed","he5do5","he3l4i","hel4lis","hel4ly","h5elo","hem4p","he2n","hena4","hen5at","heo5r","hep5","h4era","hera3p","her4ba","here5a","h3ern","h5erou","h3ery","h1es","he2s5p","he4t","het4ed","heu4","h1f","h1h","hi5an","hi4co","high5","h4il2","himer4","h4ina","hion4e","hi4p","hir4l","hi3ro","hir4p","hir4r","his3el","his4s","hith5er","hi2v","4hk","4h1l4","hlan4","h2lo","hlo3ri","4h1m","hmet4","2h1n","h5odiz","h5ods","ho4g","hoge4","hol5ar","3hol4e","ho4ma","home3","hon4a","ho5ny","3hood","hoon4","hor5at","ho5ris","hort3e","ho5ru","hos4e","ho5sen","hos1p","1hous","house3","hov5el","4h5p","4hr4","hree5","hro5niz","hro3po","4h1s2","h4sh","h4tar","ht1en","ht5es","h4ty","hu4g","hu4min","hun5ke","hun4t","hus3t4","hu4t","h1w","h4wart","hy3pe","hy3ph","hy2s","2i1a","i2al","iam4","iam5ete","i2an","4ianc","ian3i","4ian4t","ia5pe","iass4","i4ativ","ia4tric","i4atu","ibe4","ib3era","ib5ert","ib5ia","ib3in","ib5it.","ib5ite","i1bl","ib3li","i5bo","i1br","i2b5ri","i5bun","4icam","5icap","4icar","i4car.","i4cara","icas5","i4cay","iccu4","4iceo","4ich","2ici","i5cid","ic5ina","i2cip","ic3ipa","i4cly","i2c5oc","4i1cr","5icra","i4cry","ic4te","ictu2","ic4t3ua","ic3ula","ic4um","ic5uo","i3cur","2id","i4dai","id5anc","id5d","ide3al","ide4s","i2di","id5ian","idi4ar","i5die","id3io","idi5ou","id1it","id5iu","i3dle","i4dom","id3ow","i4dr","i2du","id5uo","2ie4","ied4e","5ie5ga","ield3","ien5a4","ien4e","i5enn","i3enti","i1er.","i3esc","i1est","i3et","4if.","if5ero","iff5en","if4fr","4ific.","i3fie","i3fl","4ift","2ig","iga5b","ig3era","ight3i","4igi","i3gib","ig3il","ig3in","ig3it","i4g4l","i2go","ig3or","ig5ot","i5gre","igu5i","ig1ur","i3h","4i5i4","i3j","4ik","i1la","il3a4b","i4lade","i2l5am","ila5ra","i3leg","il1er","ilev4","il5f","il1i","il3ia","il2ib","il3io","il4ist","2ilit","il2iz","ill5ab","4iln","il3oq","il4ty","il5ur","il3v","i4mag","im3age","ima5ry","imenta5r","4imet","im1i","im5ida","imi5le","i5mini","4imit","im4ni","i3mon","i2mu","im3ula","2in.","i4n3au","4inav","incel4","in3cer","4ind","in5dling","2ine","i3nee","iner4ar","i5ness","4inga","4inge","in5gen","4ingi","in5gling","4ingo","4ingu","2ini","i5ni.","i4nia","in3io","in1is","i5nite.","5initio","in3ity","4ink","4inl","2inn","2i1no","i4no4c","ino4s","i4not","2ins","in3se","insur5a","2int.","2in4th","in1u","i5nus","4iny","2io","4io.","ioge4","io2gr","i1ol","io4m","ion3at","ion4ery","ion3i","io5ph","ior3i","i4os","io5th","i5oti","io4to","i4our","2ip","ipe4","iphras4","ip3i","ip4ic","ip4re4","ip3ul","i3qua","iq5uef","iq3uid","iq3ui3t","4ir","i1ra","ira4b","i4rac","ird5e","ire4de","i4ref","i4rel4","i4res","ir5gi","ir1i","iri5de","ir4is","iri3tu","5i5r2iz","ir4min","iro4g","5iron.","ir5ul","2is.","is5ag","is3ar","isas5","2is1c","is3ch","4ise","is3er","3isf","is5han","is3hon","ish5op","is3ib","isi4d","i5sis","is5itiv","4is4k","islan4","4isms","i2so","iso5mer","is1p","is2pi","is4py","4is1s","is4sal","issen4","is4ses","is4ta.","is1te","is1ti","ist4ly","4istral","i2su","is5us","4ita.","ita4bi","i4tag","4ita5m","i3tan","i3tat","2ite","it3era","i5teri","it4es","2ith","i1ti","4itia","4i2tic","it3ica","5i5tick","it3ig","it5ill","i2tim","2itio","4itis","i4tism","i2t5o5m","4iton","i4tram","it5ry","4itt","it3uat","i5tud","it3ul","4itz.","i1u","2iv","iv3ell","iv3en.","i4v3er.","i4vers.","iv5il.","iv5io","iv1it","i5vore","iv3o3ro","i4v3ot","4i5w","ix4o","4iy","4izar","izi4","5izont","5ja","jac4q","ja4p","1je","jer5s","4jestie","4jesty","jew3","jo4p","5judg","3ka.","k3ab","k5ag","kais4","kal4","k1b","k2ed","1kee","ke4g","ke5li","k3en4d","k1er","kes4","k3est.","ke4ty","k3f","kh4","k1i","5ki.","5k2ic","k4ill","kilo5","k4im","k4in.","kin4de","k5iness","kin4g","ki4p","kis4","k5ish","kk4","k1l","4kley","4kly","k1m","k5nes","1k2no","ko5r","kosh4","k3ou","kro5n","4k1s2","k4sc","ks4l","k4sy","k5t","k1w","lab3ic","l4abo","laci4","l4ade","la3dy","lag4n","lam3o","3land","lan4dl","lan5et","lan4te","lar4g","lar3i","las4e","la5tan","4lateli","4lativ","4lav","la4v4a","2l1b","lbin4","4l1c2","lce4","l3ci","2ld","l2de","ld4ere","ld4eri","ldi4","ld5is","l3dr","l4dri","le2a","le4bi","left5","5leg.","5legg","le4mat","lem5atic","4len.","3lenc","5lene.","1lent","le3ph","le4pr","lera5b","ler4e","3lerg","3l4eri","l4ero","les2","le5sco","5lesq","3less","5less.","l3eva","lev4er.","lev4era","lev4ers","3ley","4leye","2lf","l5fr","4l1g4","l5ga","lgar3","l4ges","lgo3","2l3h","li4ag","li2am","liar5iz","li4as","li4ato","li5bi","5licio","li4cor","4lics","4lict.","l4icu","l3icy","l3ida","lid5er","3lidi","lif3er","l4iff","li4fl","5ligate","3ligh","li4gra","3lik","4l4i4l","lim4bl","lim3i","li4mo","l4im4p","l4ina","1l4ine","lin3ea","lin3i","link5er","li5og","4l4iq","lis4p","l1it","l2it.","5litica","l5i5tics","liv3er","l1iz","4lj","lka3","l3kal","lka4t","l1l","l4law","l2le","l5lea","l3lec","l3leg","l3lel","l3le4n","l3le4t","ll2i","l2lin4","l5lina","ll4o","lloqui5","ll5out","l5low","2lm","l5met","lm3ing","l4mod","lmon4","2l1n2","3lo.","lob5al","lo4ci","4lof","3logic","l5ogo","3logu","lom3er","5long","lon4i","l3o3niz","lood5","5lope.","lop3i","l3opm","lora4","lo4rato","lo5rie","lor5ou","5los.","los5et","5losophiz","5losophy","los4t","lo4ta","loun5d","2lout","4lov","2lp","lpa5b","l3pha","l5phi","lp5ing","l3pit","l4pl","l5pr","4l1r","2l1s2","l4sc","l2se","l4sie","4lt","lt5ag","ltane5","l1te","lten4","ltera4","lth3i","l5ties.","ltis4","l1tr","ltu2","ltur3a","lu5a","lu3br","luch4","lu3ci","lu3en","luf4","lu5id","lu4ma","5lumi","l5umn.","5lumnia","lu3o","luo3r","4lup","luss4","lus3te","1lut","l5ven","l5vet4","2l1w","1ly","4lya","4lyb","ly5me","ly3no","2lys4","l5yse","1ma","2mab","ma2ca","ma5chine","ma4cl","mag5in","5magn","2mah","maid5","4mald","ma3lig","ma5lin","mal4li","mal4ty","5mania","man5is","man3iz","4map","ma5rine.","ma5riz","mar4ly","mar3v","ma5sce","mas4e","mas1t","5mate","math3","ma3tis","4matiza","4m1b","mba4t5","m5bil","m4b3ing","mbi4v","4m5c","4me.","2med","4med.","5media","me3die","m5e5dy","me2g","mel5on","mel4t","me2m","mem1o3","1men","men4a","men5ac","men4de","4mene","men4i","mens4","mensu5","3ment","men4te","me5on","m5ersa","2mes","3mesti","me4ta","met3al","me1te","me5thi","m4etr","5metric","me5trie","me3try","me4v","4m1f","2mh","5mi.","mi3a","mid4a","mid4g","mig4","3milia","m5i5lie","m4ill","min4a","3mind","m5inee","m4ingl","min5gli","m5ingly","min4t","m4inu","miot4","m2is","mis4er.","mis5l","mis4ti","m5istry","4mith","m2iz","4mk","4m1l","m1m","mma5ry","4m1n","mn4a","m4nin","mn4o","1mo","4mocr","5mocratiz","mo2d1","mo4go","mois2","moi5se","4mok","mo5lest","mo3me","mon5et","mon5ge","moni3a","mon4ism","mon4ist","mo3niz","monol4","mo3ny.","mo2r","4mora.","mos2","mo5sey","mo3sp","moth3","m5ouf","3mous","mo2v","4m1p","mpara5","mpa5rab","mpar5i","m3pet","mphas4","m2pi","mpi4a","mp5ies","m4p1in","m5pir","mp5is","mpo3ri","mpos5ite","m4pous","mpov5","mp4tr","m2py","4m3r","4m1s2","m4sh","m5si","4mt","1mu","mula5r4","5mult","multi3","3mum","mun2","4mup","mu4u","4mw","1na","2n1a2b","n4abu","4nac.","na4ca","n5act","nag5er.","nak4","na4li","na5lia","4nalt","na5mit","n2an","nanci4","nan4it","nank4","nar3c","4nare","nar3i","nar4l","n5arm","n4as","nas4c","nas5ti","n2at","na3tal","nato5miz","n2au","nau3se","3naut","nav4e","4n1b4","ncar5","n4ces.","n3cha","n5cheo","n5chil","n3chis","nc1in","nc4it","ncour5a","n1cr","n1cu","n4dai","n5dan","n1de","nd5est.","ndi4b","n5d2if","n1dit","n3diz","n5duc","ndu4r","nd2we","2ne.","n3ear","ne2b","neb3u","ne2c","5neck","2ned","ne4gat","neg5ativ","5nege","ne4la","nel5iz","ne5mi","ne4mo","1nen","4nene","3neo","ne4po","ne2q","n1er","nera5b","n4erar","n2ere","n4er5i","ner4r","1nes","2nes.","4nesp","2nest","4nesw","3netic","ne4v","n5eve","ne4w","n3f","n4gab","n3gel","nge4n4e","n5gere","n3geri","ng5ha","n3gib","ng1in","n5git","n4gla","ngov4","ng5sh","n1gu","n4gum","n2gy","4n1h4","nha4","nhab3","nhe4","3n4ia","ni3an","ni4ap","ni3ba","ni4bl","ni4d","ni5di","ni4er","ni2fi","ni5ficat","n5igr","nik4","n1im","ni3miz","n1in","5nine.","nin4g","ni4o","5nis.","nis4ta","n2it","n4ith","3nitio","n3itor","ni3tr","n1j","4nk2","n5kero","n3ket","nk3in","n1kl","4n1l","n5m","nme4","nmet4","4n1n2","nne4","nni3al","nni4v","nob4l","no3ble","n5ocl","4n3o2d","3noe","4nog","noge4","nois5i","no5l4i","5nologis","3nomic","n5o5miz","no4mo","no3my","no4n","non4ag","non5i","n5oniz","4nop","5nop5o5li","nor5ab","no4rary","4nosc","nos4e","nos5t","no5ta","1nou","3noun","nov3el3","nowl3","n1p4","npi4","npre4c","n1q","n1r","nru4","2n1s2","ns5ab","nsati4","ns4c","n2se","n4s3es","nsid1","nsig4","n2sl","ns3m","n4soc","ns4pe","n5spi","nsta5bl","n1t","nta4b","nter3s","nt2i","n5tib","nti4er","nti2f","n3tine","n4t3ing","nti4p","ntrol5li","nt4s","ntu3me","nu1a","nu4d","nu5en","nuf4fe","n3uin","3nu3it","n4um","nu1me","n5umi","3nu4n","n3uo","nu3tr","n1v2","n1w4","nym4","nyp4","4nz","n3za","4oa","oad3","o5a5les","oard3","oas4e","oast5e","oat5i","ob3a3b","o5bar","obe4l","o1bi","o2bin","ob5ing","o3br","ob3ul","o1ce","och4","o3chet","ocif3","o4cil","o4clam","o4cod","oc3rac","oc5ratiz","ocre3","5ocrit","octor5a","oc3ula","o5cure","od5ded","od3ic","odi3o","o2do4","odor3","od5uct.","od5ucts","o4el","o5eng","o3er","oe4ta","o3ev","o2fi","of5ite","ofit4t","o2g5a5r","og5ativ","o4gato","o1ge","o5gene","o5geo","o4ger","o3gie","1o1gis","og3it","o4gl","o5g2ly","3ogniz","o4gro","ogu5i","1ogy","2ogyn","o1h2","ohab5","oi2","oic3es","oi3der","oiff4","oig4","oi5let","o3ing","oint5er","o5ism","oi5son","oist5en","oi3ter","o5j","2ok","o3ken","ok5ie","o1la","o4lan","olass4","ol2d","old1e","ol3er","o3lesc","o3let","ol4fi","ol2i","o3lia","o3lice","ol5id.","o3li4f","o5lil","ol3ing","o5lio","o5lis.","ol3ish","o5lite","o5litio","o5liv","olli4e","ol5ogiz","olo4r","ol5pl","ol2t","ol3ub","ol3ume","ol3un","o5lus","ol2v","o2ly","om5ah","oma5l","om5atiz","om2be","om4bl","o2me","om3ena","om5erse","o4met","om5etry","o3mia","om3ic.","om3ica","o5mid","om1in","o5mini","5ommend","omo4ge","o4mon","om3pi","ompro5","o2n","on1a","on4ac","o3nan","on1c","3oncil","2ond","on5do","o3nen","on5est","on4gu","on1ic","o3nio","on1is","o5niu","on3key","on4odi","on3omy","on3s","onspi4","onspir5a","onsu4","onten4","on3t4i","ontif5","on5um","onva5","oo2","ood5e","ood5i","oo4k","oop3i","o3ord","oost5","o2pa","ope5d","op1er","3opera","4operag","2oph","o5phan","o5pher","op3ing","o3pit","o5pon","o4posi","o1pr","op1u","opy5","o1q","o1ra","o5ra.","o4r3ag","or5aliz","or5ange","ore5a","o5real","or3ei","ore5sh","or5est.","orew4","or4gu","4o5ria","or3ica","o5ril","or1in","o1rio","or3ity","o3riu","or2mi","orn2e","o5rof","or3oug","or5pe","3orrh","or4se","ors5en","orst4","or3thi","or3thy","or4ty","o5rum","o1ry","os3al","os2c","os4ce","o3scop","4oscopi","o5scr","os4i4e","os5itiv","os3ito","os3ity","osi4u","os4l","o2so","os4pa","os4po","os2ta","o5stati","os5til","os5tit","o4tan","otele4g","ot3er.","ot5ers","o4tes","4oth","oth5esi","oth3i4","ot3ic.","ot5ica","o3tice","o3tif","o3tis","oto5s","ou2","ou3bl","ouch5i","ou5et","ou4l","ounc5er","oun2d","ou5v","ov4en","over4ne","over3s","ov4ert","o3vis","oviti4","o5v4ol","ow3der","ow3el","ow5est","ow1i","own5i","o4wo","oy1a","1pa","pa4ca","pa4ce","pac4t","p4ad","5pagan","p3agat","p4ai","pain4","p4al","pan4a","pan3el","pan4ty","pa3ny","pa1p","pa4pu","para5bl","par5age","par5di","3pare","par5el","p4a4ri","par4is","pa2te","pa5ter","5pathic","pa5thy","pa4tric","pav4","3pay","4p1b","pd4","4pe.","3pe4a","pear4l","pe2c","2p2ed","3pede","3pedi","pedia4","ped4ic","p4ee","pee4d","pek4","pe4la","peli4e","pe4nan","p4enc","pen4th","pe5on","p4era.","pera5bl","p4erag","p4eri","peri5st","per4mal","perme5","p4ern","per3o","per3ti","pe5ru","per1v","pe2t","pe5ten","pe5tiz","4pf","4pg","4ph.","phar5i","phe3no","ph4er","ph4es.","ph1ic","5phie","ph5ing","5phisti","3phiz","ph2l","3phob","3phone","5phoni","pho4r","4phs","ph3t","5phu","1phy","pi3a","pian4","pi4cie","pi4cy","p4id","p5ida","pi3de","5pidi","3piec","pi3en","pi4grap","pi3lo","pi2n","p4in.","pind4","p4ino","3pi1o","pion4","p3ith","pi5tha","pi2tu","2p3k2","1p2l2","3plan","plas5t","pli3a","pli5er","4plig","pli4n","ploi4","plu4m","plum4b","4p1m","2p3n","po4c","5pod.","po5em","po3et5","5po4g","poin2","5point","poly5t","po4ni","po4p","1p4or","po4ry","1pos","pos1s","p4ot","po4ta","5poun","4p1p","ppa5ra","p2pe","p4ped","p5pel","p3pen","p3per","p3pet","ppo5site","pr2","pray4e","5preci","pre5co","pre3em","pref5ac","pre4la","pre3r","p3rese","3press","pre5ten","pre3v","5pri4e","prin4t3","pri4s","pris3o","p3roca","prof5it","pro3l","pros3e","pro1t","2p1s2","p2se","ps4h","p4sib","2p1t","pt5a4b","p2te","p2th","pti3m","ptu4r","p4tw","pub3","pue4","puf4","pul3c","pu4m","pu2n","pur4r","5pus","pu2t","5pute","put3er","pu3tr","put4ted","put4tin","p3w","qu2","qua5v","2que.","3quer","3quet","2rab","ra3bi","rach4e","r5acl","raf5fi","raf4t","r2ai","ra4lo","ram3et","r2ami","rane5o","ran4ge","r4ani","ra5no","rap3er","3raphy","rar5c","rare4","rar5ef","4raril","r2as","ration4","rau4t","ra5vai","rav3el","ra5zie","r1b","r4bab","r4bag","rbi2","rbi4f","r2bin","r5bine","rb5ing.","rb4o","r1c","r2ce","rcen4","r3cha","rch4er","r4ci4b","rc4it","rcum3","r4dal","rd2i","rdi4a","rdi4er","rdin4","rd3ing","2re.","re1al","re3an","re5arr","5reav","re4aw","r5ebrat","rec5oll","rec5ompe","re4cre","2r2ed","re1de","re3dis","red5it","re4fac","re2fe","re5fer.","re3fi","re4fy","reg3is","re5it","re1li","re5lu","r4en4ta","ren4te","re1o","re5pin","re4posi","re1pu","r1er4","r4eri","rero4","re5ru","r4es.","re4spi","ress5ib","res2t","re5stal","re3str","re4ter","re4ti4z","re3tri","reu2","re5uti","rev2","re4val","rev3el","r5ev5er.","re5vers","re5vert","re5vil","rev5olu","re4wh","r1f","rfu4","r4fy","rg2","rg3er","r3get","r3gic","rgi4n","rg3ing","r5gis","r5git","r1gl","rgo4n","r3gu","rh4","4rh.","4rhal","ri3a","ria4b","ri4ag","r4ib","rib3a","ric5as","r4ice","4rici","5ricid","ri4cie","r4ico","rid5er","ri3enc","ri3ent","ri1er","ri5et","rig5an","5rigi","ril3iz","5riman","rim5i","3rimo","rim4pe","r2ina","5rina.","rin4d","rin4e","rin4g","ri1o","5riph","riph5e","ri2pl","rip5lic","r4iq","r2is","r4is.","ris4c","r3ish","ris4p","ri3ta3b","r5ited.","rit5er.","rit5ers","rit3ic","ri2tu","rit5ur","riv5el","riv3et","riv3i","r3j","r3ket","rk4le","rk4lin","r1l","rle4","r2led","r4lig","r4lis","rl5ish","r3lo4","r1m","rma5c","r2me","r3men","rm5ers","rm3ing","r4ming.","r4mio","r3mit","r4my","r4nar","r3nel","r4ner","r5net","r3ney","r5nic","r1nis4","r3nit","r3niv","rno4","r4nou","r3nu","rob3l","r2oc","ro3cr","ro4e","ro1fe","ro5fil","rok2","ro5ker","5role.","rom5ete","rom4i","rom4p","ron4al","ron4e","ro5n4is","ron4ta","1room","5root","ro3pel","rop3ic","ror3i","ro5ro","ros5per","ros4s","ro4the","ro4ty","ro4va","rov5el","rox5","r1p","r4pea","r5pent","rp5er.","r3pet","rp4h4","rp3ing","r3po","r1r4","rre4c","rre4f","r4reo","rre4st","rri4o","rri4v","rron4","rros4","rrys4","4rs2","r1sa","rsa5ti","rs4c","r2se","r3sec","rse4cr","rs5er.","rs3es","rse5v2","r1sh","r5sha","r1si","r4si4b","rson3","r1sp","r5sw","rtach4","r4tag","r3teb","rten4d","rte5o","r1ti","rt5ib","rti4d","r4tier","r3tig","rtil3i","rtil4l","r4tily","r4tist","r4tiv","r3tri","rtroph4","rt4sh","ru3a","ru3e4l","ru3en","ru4gl","ru3in","rum3pl","ru2n","runk5","run4ty","r5usc","ruti5n","rv4e","rvel4i","r3ven","rv5er.","r5vest","r3vey","r3vic","rvi4v","r3vo","r1w","ry4c","5rynge","ry3t","sa2","2s1ab","5sack","sac3ri","s3act","5sai","salar4","sal4m","sa5lo","sal4t","3sanc","san4de","s1ap","sa5ta","5sa3tio","sat3u","sau4","sa5vor","5saw","4s5b","scan4t5","sca4p","scav5","s4ced","4scei","s4ces","sch2","s4cho","3s4cie","5scin4d","scle5","s4cli","scof4","4scopy","scour5a","s1cu","4s5d","4se.","se4a","seas4","sea5w","se2c3o","3sect","4s4ed","se4d4e","s5edl","se2g","seg3r","5sei","se1le","5self","5selv","4seme","se4mol","sen5at","4senc","sen4d","s5ened","sen5g","s5enin","4sentd","4sentl","sep3a3","4s1er.","s4erl","ser4o","4servo","s1e4s","se5sh","ses5t","5se5um","5sev","sev3en","sew4i","5sex","4s3f","2s3g","s2h","2sh.","sh1er","5shev","sh1in","sh3io","3ship","shiv5","sho4","sh5old","shon3","shor4","short5","4shw","si1b","s5icc","3side.","5sides","5sidi","si5diz","4signa","sil4e","4sily","2s1in","s2ina","5sine.","s3ing","1sio","5sion","sion5a","si2r","sir5a","1sis","3sitio","5siu","1siv","5siz","sk2","4ske","s3ket","sk5ine","sk5ing","s1l2","s3lat","s2le","slith5","2s1m","s3ma","small3","sman3","smel4","s5men","5smith","smol5d4","s1n4","1so","so4ce","soft3","so4lab","sol3d2","so3lic","5solv","3som","3s4on.","sona4","son4g","s4op","5sophic","s5ophiz","s5ophy","sor5c","sor5d","4sov","so5vi","2spa","5spai","spa4n","spen4d","2s5peo","2sper","s2phe","3spher","spho5","spil4","sp5ing","4spio","s4ply","s4pon","spor4","4spot","squal4l","s1r","2ss","s1sa","ssas3","s2s5c","s3sel","s5seng","s4ses.","s5set","s1si","s4sie","ssi4er","ss5ily","s4sl","ss4li","s4sn","sspend4","ss2t","ssur5a","ss5w","2st.","s2tag","s2tal","stam4i","5stand","s4ta4p","5stat.","s4ted","stern5i","s5tero","ste2w","stew5a","s3the","st2i","s4ti.","s5tia","s1tic","5stick","s4tie","s3tif","st3ing","5stir","s1tle","5stock","stom3a","5stone","s4top","3store","st4r","s4trad","5stratu","s4tray","s4trid","4stry","4st3w","s2ty","1su","su1al","su4b3","su2g3","su5is","suit3","s4ul","su2m","sum3i","su2n","su2r","4sv","sw2","4swo","s4y","4syc","3syl","syn5o","sy5rin","1ta","3ta.","2tab","ta5bles","5taboliz","4taci","ta5do","4taf4","tai5lo","ta2l","ta5la","tal5en","tal3i","4talk","tal4lis","ta5log","ta5mo","tan4de","tanta3","ta5per","ta5pl","tar4a","4tarc","4tare","ta3riz","tas4e","ta5sy","4tatic","ta4tur","taun4","tav4","2taw","tax4is","2t1b","4tc","t4ch","tch5et","4t1d","4te.","tead4i","4teat","tece4","5tect","2t1ed","te5di","1tee","teg4","te5ger","te5gi","3tel.","teli4","5tels","te2ma2","tem3at","3tenan","3tenc","3tend","4tenes","1tent","ten4tag","1teo","te4p","te5pe","ter3c","5ter3d","1teri","ter5ies","ter3is","teri5za","5ternit","ter5v","4tes.","4tess","t3ess.","teth5e","3teu","3tex","4tey","2t1f","4t1g","2th.","than4","th2e","4thea","th3eas","the5at","the3is","3thet","th5ic.","th5ica","4thil","5think","4thl","th5ode","5thodic","4thoo","thor5it","tho5riz","2ths","1tia","ti4ab","ti4ato","2ti2b","4tick","t4ico","t4ic1u","5tidi","3tien","tif2","ti5fy","2tig","5tigu","till5in","1tim","4timp","tim5ul","2t1in","t2ina","3tine.","3tini","1tio","ti5oc","tion5ee","5tiq","ti3sa","3tise","tis4m","ti5so","tis4p","5tistica","ti3tl","ti4u","1tiv","tiv4a","1tiz","ti3za","ti3zen","2tl","t5la","tlan4","3tle.","3tled","3tles.","t5let.","t5lo","4t1m","tme4","2t1n2","1to","to3b","to5crat","4todo","2tof","to2gr","to5ic","to2ma","tom4b","to3my","ton4ali","to3nat","4tono","4tony","to2ra","to3rie","tor5iz","tos2","5tour","4tout","to3war","4t1p","1tra","tra3b","tra5ch","traci4","trac4it","trac4te","tras4","tra5ven","trav5es5","tre5f","tre4m","trem5i","5tria","tri5ces","5tricia","4trics","2trim","tri4v","tro5mi","tron5i","4trony","tro5phe","tro3sp","tro3v","tru5i","trus4","4t1s2","t4sc","tsh4","t4sw","4t3t2","t4tes","t5to","ttu4","1tu","tu1a","tu3ar","tu4bi","tud2","4tue","4tuf4","5tu3i","3tum","tu4nis","2t3up.","3ture","5turi","tur3is","tur5o","tu5ry","3tus","4tv","tw4","4t1wa","twis4","4two","1ty","4tya","2tyl","type3","ty5ph","4tz","tz4e","4uab","uac4","ua5na","uan4i","uar5ant","uar2d","uar3i","uar3t","u1at","uav4","ub4e","u4bel","u3ber","u4bero","u1b4i","u4b5ing","u3ble.","u3ca","uci4b","uc4it","ucle3","u3cr","u3cu","u4cy","ud5d","ud3er","ud5est","udev4","u1dic","ud3ied","ud3ies","ud5is","u5dit","u4don","ud4si","u4du","u4ene","uens4","uen4te","uer4il","3ufa","u3fl","ugh3en","ug5in","2ui2","uil5iz","ui4n","u1ing","uir4m","uita4","uiv3","uiv4er.","u5j","4uk","u1la","ula5b","u5lati","ulch4","5ulche","ul3der","ul4e","u1len","ul4gi","ul2i","u5lia","ul3ing","ul5ish","ul4lar","ul4li4b","ul4lis","4ul3m","u1l4o","4uls","uls5es","ul1ti","ultra3","4ultu","u3lu","ul5ul","ul5v","um5ab","um4bi","um4bly","u1mi","u4m3ing","umor5o","um2p","unat4","u2ne","un4er","u1ni","un4im","u2nin","un5ish","uni3v","un3s4","un4sw","unt3ab","un4ter.","un4tes","unu4","un5y","un5z","u4ors","u5os","u1ou","u1pe","uper5s","u5pia","up3ing","u3pl","up3p","upport5","upt5ib","uptu4","u1ra","4ura.","u4rag","u4ras","ur4be","urc4","ur1d","ure5at","ur4fer","ur4fr","u3rif","uri4fic","ur1in","u3rio","u1rit","ur3iz","ur2l","url5ing.","ur4no","uros4","ur4pe","ur4pi","urs5er","ur5tes","ur3the","urti4","ur4tie","u3ru","2us","u5sad","u5san","us4ap","usc2","us3ci","use5a","u5sia","u3sic","us4lin","us1p","us5sl","us5tere","us1tr","u2su","usur4","uta4b","u3tat","4ute.","4utel","4uten","uten4i","4u1t2i","uti5liz","u3tine","ut3ing","ution5a","u4tis","5u5tiz","u4t1l","ut5of","uto5g","uto5matic","u5ton","u4tou","uts4","u3u","uu4m","u1v2","uxu3","uz4e","1va","5va.","2v1a4b","vac5il","vac3u","vag4","va4ge","va5lie","val5o","val1u","va5mo","va5niz","va5pi","var5ied","3vat","4ve.","4ved","veg3","v3el.","vel3li","ve4lo","v4ely","ven3om","v5enue","v4erd","5vere.","v4erel","v3eren","ver5enc","v4eres","ver3ie","vermi4n","3verse","ver3th","v4e2s","4ves.","ves4te","ve4te","vet3er","ve4ty","vi5ali","5vian","5vide.","5vided","4v3iden","5vides","5vidi","v3if","vi5gn","vik4","2vil","5vilit","v3i3liz","v1in","4vi4na","v2inc","vin5d","4ving","vio3l","v3io4r","vi1ou","vi4p","vi5ro","vis3it","vi3so","vi3su","4viti","vit3r","4vity","3viv","5vo.","voi4","3vok","vo4la","v5ole","5volt","3volv","vom5i","vor5ab","vori4","vo4ry","vo4ta","4votee","4vv4","v4y","w5abl","2wac","wa5ger","wag5o","wait5","w5al.","wam4","war4t","was4t","wa1te","wa5ver","w1b","wea5rie","weath3","wed4n","weet3","wee5v","wel4l","w1er","west3","w3ev","whi4","wi2","wil2","will5in","win4de","win4g","wir4","3wise","with3","wiz5","w4k","wl4es","wl3in","w4no","1wo2","wom1","wo5ven","w5p","wra4","wri4","writa4","w3sh","ws4l","ws4pe","w5s4t","4wt","wy4","x1a","xac5e","x4ago","xam3","x4ap","xas5","x3c2","x1e","xe4cuto","x2ed","xer4i","xe5ro","x1h","xhi2","xhil5","xhu4","x3i","xi5a","xi5c","xi5di","x4ime","xi5miz","x3o","x4ob","x3p","xpan4d","xpecto5","xpe3d","x1t2","x3ti","x1u","xu3a","xx4","y5ac","3yar4","y5at","y1b","y1c","y2ce","yc5er","y3ch","ych4e","ycom4","ycot4","y1d","y5ee","y1er","y4erf","yes4","ye4t","y5gi","4y3h","y1i","y3la","ylla5bl","y3lo","y5lu","ymbol5","yme4","ympa3","yn3chr","yn5d","yn5g","yn5ic","5ynx","y1o4","yo5d","y4o5g","yom4","yo5net","y4ons","y4os","y4ped","yper5","yp3i","y3po","y4poc","yp2ta","y5pu","yra5m","yr5ia","y3ro","yr4r","ys4c","y3s2e","ys3ica","ys3io","3ysis","y4so","yss4","ys1t","ys3ta","ysur4","y3thin","yt3ic","y1w","za1","z5a2b","zar2","4zb","2ze","ze4n","ze4p","z1er","ze3ro","zet4","2z1i","z4il","z4is","5zl","4zm","1zo","zo4m","zo5ol","zte4","4z1z2","z4zy",".con5gr",".de5riva",".dri5v4",".eth1y6l1",".eu4ler",".ev2",".ever5si5b",".ga4s1om1",".ge4ome",".ge5ot1",".he3mo1",".he3p6a",".he3roe",".in5u2t",".kil2n3i",".ko6r1te1",".le6ices",".me4ga1l",".met4ala",".mim5i2c1",".mi1s4ers",".ne6o3f",".noe1th",".non1e2m",".poly1s",".post1am",".pre1am",".rav5en1o",".semi5",".sem4ic",".semid6",".semip4",".semir4",".sem6is4",".semiv4",".sph6in1",".spin1o",".ta5pes1tr",".te3legr",".to6pog",".to2q",".un3at5t",".un5err5",".vi2c3ar",".we2b1l",".re1e4c","a5bolic","a2cabl","af6fish","am1en3ta5b","anal6ys","ano5a2c","ans5gr","ans3v","anti1d","an3ti1n2","anti1re","a4pe5able","ar3che5t","ar2range","as5ymptot","ath3er1o1s","at6tes.","augh4tl","au5li5f","av3iou","back2er.","ba6r1onie","ba1thy","bbi4t","be2vie","bi5d2if","bil2lab","bio5m","bi1orb","bio1rh","b1i3tive","blan2d1","blin2d1","blon2d2","bor1no5","bo2t1u1l","brus4q","bus6i2er","bus6i2es","buss4ing","but2ed.","but4ted","cad5e1m","cat1a1s2","4chs.","chs3hu","chie5vo","cig3a3r","cin2q","cle4ar","co6ph1o3n","cous2ti","cri3tie","croc1o1d","cro5e2co","c2tro3me6c","1cu2r1ance","2d3alone","data1b","dd5a5b","d2d5ib","de4als.","de5clar1","de2c5lina","de3fin3iti","de2mos","des3ic","de2tic","dic1aid","dif5fra","3di1methy","di2ren","di2rer","2d1lead","2d1li2e","3do5word","dren1a5l","drif2t1a","d1ri3pleg5","drom3e5d","d3tab","du2al.","du1op1o1l","ea4n3ies","e3chas","edg1l","ed1uling","eli2t1is","e1loa","en1dix","eo3grap","1e6p3i3neph1","e2r3i4an.","e3spac6i","eth1y6l1ene","5eu2clid1","feb1rua","fermi1o","3fich","fit5ted.","fla1g6el","flow2er.","3fluor","gen2cy.","ge3o1d","ght1we","g1lead","get2ic.","4g1lish","5glo5bin","1g2nac","gnet1ism","gno5mo","g2n1or.","g2noresp","2g1o4n3i1za","graph5er.","griev1","g1utan","hair1s","ha2p3ar5r","hatch1","hex2a3","hite3sid","h3i5pel1a4","hnau3z","ho6r1ic.","h2t1eou","hypo1tha","id4ios","ifac1et","ign4it","ignit1er","i4jk","im3ped3a","infra1s2","i5nitely.","irre6v3oc","i1tesima","ith5i2l","itin5er5ar","janu3a","japan1e2s","je1re1m","1ke6ling","1ki5netic","1kovian","k3sha","la4c3i5e","lai6n3ess","lar5ce1n","l3chai","l3chil6d1","lead6er.","lea4s1a","1lec3ta6b","le3g6en2dre","1le1noid","lith1o5g","ll1fl","l2l3ish","l5mo3nell","lo1bot1o1","lo2ges.","load4ed.","load6er.","l3tea","lth5i2ly","lue1p","1lunk3er","1lum5bia.","3lyg1a1mi","ly5styr","ma1la1p","m2an.","man3u1sc","mar1gin1","medi2c","med3i3cin","medio6c1","me3gran3","m2en.","3mi3da5b","3milita","mil2l1ag","mil5li5li","mi6n3is.","mi1n2ut1er","mi1n2ut1est","m3ma1b","5maph1ro1","5moc1ra1t","mo5e2las","mol1e5c","mon4ey1l","mono3ch","mo4no1en","moro6n5is","mono1s6","moth4et2","m1ou3sin","m5shack2","mu2dro","mul2ti5u","n3ar4chs.","n3ch2es1t","ne3back","2ne1ski","n1dieck","nd3thr","nfi6n3ites","4n5i4an.","nge5nes","ng1ho","ng1spr","nk3rup","n5less","5noc3er1os","nom1a6l","nom5e1no","n1o1mist","non1eq","non1i4so","5nop1oly.","no1vemb","ns5ceiv","ns4moo","ntre1p","obli2g1","o3chas","odel3li","odit1ic","oerst2","oke1st","o3les3ter","oli3gop1o1","o1lo3n4om","o3mecha6","onom1ic","o3norma","o3no2t1o3n","o3nou","op1ism.","or4tho3ni4t","orth1ri","or5tively","o4s3pher","o5test1er","o5tes3tor","oth3e1o1s","ou3ba3do","o6v3i4an.","oxi6d1ic","pal6mat","parag6ra4","par4a1le","param4","para3me","pee2v1","phi2l3ant","phi5lat1e3l","pi2c1a3d","pli2c1ab","pli5nar","poin3ca","1pole.","poly1e","po3lyph1ono","1prema3c","pre1neu","pres2pli","pro2cess","proc3i3ty.","pro2g1e","3pseu2d","pseu3d6o3d2","pseu3d6o3f2","pto3mat4","p5trol3","pu5bes5c","quain2t1e","qu6a3si3","quasir6","quasis6","quin5tes5s","qui3v4ar","r1abolic","3rab1o1loi","ra3chu","r3a3dig","radi1o6g","r2amen","3ra4m5e1triz","ra3mou","ra5n2has","ra1or","r3bin1ge","re2c3i1pr","rec5t6ang","re4t1ribu","r3ial.","riv1o1l","6rk.","rk1ho","r1krau","6rks.","r5le5qu","ro1bot1","ro5e2las","ro5epide1","ro3mesh","ro1tron","r3pau5li","rse1rad1i","r1thou","r1treu","r1veil","rz1sc","sales3c","sales5w","5sa3par5il","sca6p1er","sca2t1ol","s4chitz","schro1ding1","1sci2utt","scrap4er.","scy4th1","sem1a1ph","se3mes1t","se1mi6t5ic","sep3temb","shoe1st","sid2ed.","side5st","side5sw","si5resid","sky1sc","3slova1kia","3s2og1a1my","so2lute","3s2pace","1s2pacin","spe3cio","spher1o","spi2c1il","spokes5w","sports3c","sports3w","s3qui3to","s2s1a3chu1","ss3hat","s2s3i4an.","s5sign5a3b","1s2tamp","s2t1ant5shi","star3tli","sta1ti","st5b","1stor1ab","strat1a1g","strib5ut","st5scr","stu1pi4d1","styl1is","su2per1e6","1sync","1syth3i2","swimm6","5tab1o1lism","ta3gon.","talk1a5","t1a1min","t6ap6ath","5tar2rh","tch1c","tch3i1er","t1cr","teach4er.","tele2g","tele1r6o","3ter1gei","ter2ic.","t3ess2es","tha4l1am","tho3don","th1o5gen1i","tho1k2er","thy4l1an","thy3sc","2t3i4an.","ti2n3o1m","t1li2er","tolo2gy","tot3ic","trai3tor1","tra1vers","travers3a3b","treach1e","tr4ial.","3tro1le1um","trof4ic.","tro3fit","tro1p2is","3trop1o5les","3trop1o5lis","t1ro1pol3it","tsch3ie","ttrib1ut1","turn3ar","t1wh","ty2p5al","ua3drati","uad1ratu","u5do3ny","uea1m","u2r1al.","uri4al.","us2er.","v1ativ","v1oir5du1","va6guer","vaude3v","1verely.","v1er1eig","ves1tite","vi1vip3a3r","voice1p","waste3w6a2","wave1g4","w3c","week1n","wide5sp","wo4k1en","wrap3aro","writ6er.","x1q","xquis3","y5che3d","ym5e5try","y1stro","yes5ter1y","z3ian.","z3o1phr","z2z3w",""],exceptions:["as-so-ciate","as-so-ciates","dec-li-na-tion","oblig-a-tory","phil-an-thropic","present","presents","project","projects","reci-procity","re-cog-ni-zance","ref-or-ma-tion","ret-ri-bu-tion","ta-ble",""]}})),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.createHyphenator=e()}(this,(function(){var t="object"==typeof global?global:"object"==typeof window?window:"object"==typeof this?this:{};function e(t){var e={};for(var i in t)e[i]=t[i];return e}function i(t,e,i){return e in t?t[e]:i}function n(t,e){return t.exceptions.reduce((function(t,i){return t[i.replace(/\-/g,"")]=i.replace(/\-/g,e),t}),{})}function r(t,e,i,n){for(var r,s=new Array(t.length+1),o=t.toLocaleLowerCase(),a=[],l=0,h=s.length;h--;)s[h]=0;for(;r=e[l++];)for(var c=0,u=!1;!u;){var d=o.indexOf(r.text,c);if(d>-1&&(!r.stickToLeft||0===d)&&(!r.stickToRight||d+r.text.length===t.length)){a.push(r.pattern+">"+r.levels.join(""));for(h=0;h<r.levels.length;h++)s[d+h]=Math.max(r.levels[h],s[d+h])}d>-1&&r.text.length>0?c=d+r.text.length+1:u=!0}s[0]=s[1]=s[s.length-1]=s[s.length-2]=0;var f="",p="",g="";for(h=0;h<s.length;h++)f+=(s[h]%2==1?n:"")+t.charAt(h),g+=(s[h]%2==1?"-":"")+t.charAt(h),p+=(s[h]>0?s[h]:"")+t.charAt(h);return i&&console.log.apply(console,[t,"->"].concat(a).concat(["->"]).concat(s).concat(["->",p]).concat(["->",g])),f}function s(t){for(var e,i=0,n={pattern:t,text:"",levels:[],stickToLeft:0,stickToRight:0},r=1,s=2,o=3,a=4;e=t.charAt(i++);){var l="."===e,h=!l&&/\d/.test(e);switch(l?i-1==0?o:a:h?s:r){case r:!c&&n.levels.push(0),n.text+=e;break;case s:n.levels.push(parseInt(e));break;case o:n.stickToLeft=!0;break;case a:n.stickToRight=!0}var c=h}return n}return function(o,a){var l=i(a=a||{},"async",!1),h={},c=i(a,"debug",!1),u={},d=i(a,"hyphenChar",""),f=o.patterns.map(s),p=Math.max(a.minWordLength>>0,5),g=i(a,"html",!1),m=d+p;if(u[m]=n(o,d),h[m]=e(u[m]),l&&!("Promise"in t))throw new Error("Failed to create hyphenator: Could not find global Promise object, needed for hyphenator to work in async mode");return function(t,s){var a=i(s=s||{},"debug",c),m=i(s,"hyphenChar",d),v=Math.max(s.minWordLength>>0,p),y=m+v;return u[y]||(u[y]=n(o,m)),h[y]||(h[y]=e(u[y])),function(t,e,i,n,s,o,a,l){var h,c="",u=function(t,e,i,n){var r,s,o=RegExp.prototype.test.bind(/\s/),a=0,l=1,h=2,c=1,u=2,d=3,f=4;return[function(){var p="";r=void 0;t:for(;a<=t.length;){var g=t.charAt(a++),m=!!g&&!/\s|[\!-\@\[-\`\{-\~\u2013-\u203C]/.test(g),v="<"===g,y=">"===g,b=g===e;do{if(s===c){y&&(s=d);break}if(b){r=h,s=u;break}if(m){s=u;break}if(s===u){s=f,r=r||p.length>=n&&l;break}r=h,s=d}while(0);switch(v&&s!==f&&i&&!o(t.charAt(a))&&(r=h,s=c),s){case c:case u:p+=g;break;case d:p+=g;break t;case f:a--;break t}}return p||void 0},function(){return r===l}]}(t,s,o,a),d=u[0],f=u[1],p={hyphenateWord:1,concatenate:2},g=0,m=0,v=new Date,y=0,b=function(){};function w(){for(var t=new Date;(!l||new Date-t<10)&&(h=d());){switch(f()?p.hyphenateWord:p.concatenate){case p.hyphenateWord:i[h]||(i[h]=r(h,e,n,s)),h!==i[h]&&m++,h=i[h];case p.concatenate:c+=h}g++}y+=new Date-t,h?setTimeout(w):(v=new Date-v,b(c),n&&(console.log("----------------\nHyphenation stats: "+g+" text chunks processed, "+m+" words hyphenated"),console.log("Work time: "+y/1e3),console.log("Wait time: "+(v-y)/1e3),console.log("All time: "+v/1e3)))}return l?(setTimeout(w),new Promise((function(t){b=t}))):(w(),c)}(t,f,h[y],a,m,g,v,l)}}})),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.hyphenationPatternsRu=e()}(this,(function(){return{patterns:[".аб1р",".аг1ро",".ади2",".аи2",".ак1р",".аль3я",".ар2т1о2",".ас1то",".аст1р",".ау2",".би2о",".во2б3л",".во3ж2д",".го2ф",".дек2",".де1кв",".ди2ак",".ди1о",".до3п",".до3т2",".епи3",".зав2р",".за3м2н",".за3п",".иг1р",".изг2",".из3н",".ии2",".ик1р",".ио2",".ио4на",".ис3",".ле2о",".ле2п3р",".лес1к",".ль2",".люст1",".ме2ж1у2",".ми1ом",".мо2к1",".му2шт1",".на1в",".на3т",".на3ш2",".не3вн",".не1др",".не1з2",".не1сл",".не1с2ц",".не3т",".нос1к",".нук1л",".обо3ж2",".ово1",".ог3н",".оз4",".ос2ка",".ос2п",".ос3пи",".от1в",".от1ро",".от1ру",".от1уж",".по3в2",".по3ж2",".поз2н",".прос2",".ра2с3т",".ре2бр",".ре2з3в",".ри2ск",".ри2ч",".ро2з3в",".ро2с3л",".ро2х",".септ2",".ск2",".ст2",".су2ж",".те2о3",".тиа3",".ти2г",".тиг1р",".ти2о",".уб2",".уд2",".уе2",".уз2на",".ук2",".ум2ч",".уо3",".уп2",".ур2в",".ус2",".ут2р",".ую2",".хо2р3в",".че2с1к",".юс1","4а3а","аа2п","аа2р","аа2ц","а1б","абе3ст","а3бла","аб2лю","аб1ри","а3бу","ав1в","а1ве","ав3зо","а1ви","ави2а","а1во","аво1с","а2вот","ав1ра","ав2се","а2вт","а1ву","а2вх","а3в2че","2ага","ага1с2","а2гд","а2гити","а2гле","аг2ли","а2глос","аг2лот","2аго","а3гу","а1д","2адв","а2две","ад2жи","ади2од","а2дл","а2д1обл","ад1ро","а2д1ру","аду3ч","ад2ц","а2дын","а1е","ае2го","ае2ди","ае2л","а2еп","ае2ре","ае2с","аза4ш3","азв2","аз3вез","аз1вл","азг2","аз1др","аз1об","аз2о1бр","а2зовь","а2золь","а1зори","аз2о1с","аз1р","а1и","аи2г1","аи3гл","а2их","а1к","ак1в","1акк","ак2л","ак3лем","ако1б2","2аконс","ако3т","2акри","ак1с","а1ла","а3лаг","а1ле","2алек","а3ли","ало1з","а1лу","алу2ш","алуш1т","а1лы","а2льщ","а1лю","2ама","амб4","2амет","а2минт","ам2нет","2амо","амо1з2","амои2","а2мч","ана2дц","а2н1а2ме","а2наф","ан2дра","а2н1о2б","ан1о2хр","ан1р","ан2сп","анс1у","ан2сур","а2н1уз","а1нь","2а1о","ао2д","ао2к","ао2р","ао2с","аост1","а3пла","ап2лом","2апо","апо4вс","апо3ч2т","ап2ра","ап1рел","а1ра","ара2ст","ар2бок","ар2вал","1аргу","а1ре","аре1дв","аре1ол","ар2жа","а1ри","а1ро","ар2тор","ар2т1р","а1ру","ар1х","а1ры","а1рю","а1ря","2ас1к","ас3ми","ас3но","1ассиг","аст1ву","ас3тем","ас2тин","ас2тия","ас1тоо","ас1тух","а1стье","ас2шед","ас2шес","а1сьи","а1та","1атак","ат3ва","ат1ви","ат1ву","2атез","а1ти","а1то","ат1обе","а2томн","ато2ш","ат1рах","ат1ри","а1ту","ат2х","а1ты","а1тье","а3тью","а3тья","а1тю","а1тя","а1у","а2уб","ау2д","ау3до","а2уле","аут1р","ау2х","ау2ч","ау3чь","ауэ1","а2ф1л","ах2а","ахми2","ах3с","а1ч","2ача","а2чл","ач1т","а2шл","аэ2ли","а2эр","аю1та","а1я","ая2б","ая2в","ая2з","1ба","ба2бв","ба2г1р","ба2др","ба1з","ба3зу","балю1","ба2о","бас3м","ба1ст","ба1тр","2б1б","б1в","бвы2","бг2","2б1д","1бе","3бев","бе2гл","бе2гн","бе2д1р","3бее","3бе2з","без1а2","без5д4","бе3зи","без3н","без1о2","без1р","бе2с1к","бес3п","бе2с1т","бес3те","бес3ти","3бец","2бещ","2бж","б1з2","1б2и","3биа","би2б","2биж","3бик","били3т2","3био","би2об","би2од","би2он","би2ор","би2тв","би1х","2б3к","б1л","1благ","1б2лаз","б3лази","б2лан","1б2лее","б3лен","б2лес1к","1б2лея","б2луд","1б2луж","2блы","2б2ль","2б3лю.","б2люд","б2люе","б2люл","2б3люсь","2бля","2б3н","1бо","бо1бра","бо3вш","бо2гд","бо1дра","бо1з2","бо1л2ж","бо1льс","бо3м2л","бо2мч","бо3мш","бону1","бо1ру","бо2са","бо1ск","бо3ско","бо3сти","3бот","бо2тв","бот2р","боя2р","2бр.","б3раб","б2рав","бра1зо","1б2рал","2б1рам","б2ран","1брас","б2рать","б1рах","1б2рач","2б3рая","1б2ред","б1рей","б1рек","б2рем","б2рех","б2рид","б2рито","б2риты","1б2роди","б1рол","б1ром.","1б2роси","бро2с1к","2брс","б1ру","3брукс","2брь","1б2рю","2б3рю.","б1ря","2б1с2","б3ск","бс4л","б1т","1б2у","бу2г1р","бук1л","бу1с","2бф","2б1х","2бц","2б1ч","2бш","2бщ","1бы","бы2г1","бы2с","быс1к","быст1","1бь","2бь.","2бьс","2бьт","бэ1р","3б2ю","бю1та","1бя","1ва","ва2бр","3ваг","ва2д1р","вадь2","ва3ж2д","ва1з","ванс2","ва1ст","ва2стр","ва1тр","вах1","3вац","3вая","2в1б","в1ви","в1вр","2вг2","в1д","в2дох","1вев","3вег","вед1р","ве3ду","1вее","1вез","3везе","3везл","вез2у","1вей.","ве2п1","2верд","1вес","ве2с1к","ве2ст1в","вет3р","1вец","1вею","1вея","1в2з2","взг2","взд2","взо1б","взъ2","взъе3д","ви2аз","ви2ак","ви2ар","ви2а1с2","виа1т","ви3аф","ви2гв","ви2гл","1виз","1винт","1винч","ви1о","ви1с2ни","виу3","ви2ф","2в1к","вк2л","3в2кус","в1л","в2ла","2в3лаб","в2лев","в2лек","в2лет","в2леч","2вли","в2лия","2влю","в2люб","2вля","2вм","1вме","2в1н","4в3на","в2нес","вно1","в3ну.","3в2нук","3в2нуч","в3ны","во1б2","во2б3ла","вов2","во3вк","1вод","во1дв","во1др","во2ер","во2жж","вои2с1","1вок","во3м2","воп2","во1ру","2ворц","2ворь","вос1к","во1см","во1сн","вос3пе","во2стр","вот2р","1вох","во1хл","во3х2т","1вою","2вп2","2вр.","2вра.","в2рав","2в1рам","в1рас","2в1рах","2врац","2вре.","2в1рен","1врид","1в2риз","в1рии","в1рик","в1рил","в1рис","в1рит","2в1ро","вро3т2","2в1ры","1врю","в1ря","2в1с2","3все3","в3ская","4в3ски","4в3ску","3в2сп","3в2сю","в1т2","вто1б2","вто3ш","1вуа","ву3г","1ву1з","2вуи","2ву1к","ву3п","ву1с2","ву2х1а","вух3в","ву1чл","вф2","1вхо","2вц","2в1ч","2вш","3в2шив","2вщ","въ2","1вы","вы3г2","вы3зн","вып2","вы3т2","вых2","вы3ш2л","2вь.","1вье","1вьин","2вьс","2вьт","1вью","1вья","1в2э1","1в2ю","1вя","1г","г2а","га1з","га1ст2","га2у","2г3б","гба2","г1ви","2гг","г3дан","2г3ди","3ге.","ге2б1","гено1","ге2об","ге2од","ге1ор","2г3ж","2г1з","г2и","ги2бл","ги3бр","ги2гр","ги1сл","гист2","2г1к","2гла.","г2лав","г1лай","г1лами","2глась","2глая","г1ле","г2лет","2гли.","г2лин","3г2лиф","2гло.","г3лобл","2глов","2глог","2глое","2глой","2глою","2глую","2г1лы","г2ляж","2гляк","2г3м","г2нав","г2нан","г3не.","г2нев","г3нен","г3неп","г3нес","г2нир","гнит2р","г2ное","г2нои","г2нос","г3ня","го1б2","го2вл","го3ж2д","го1з","го2зл","гоз2н","гоиг2","3гой","г2ол","гоми2","го2с1а","го2сд","го1скл","го1сн","го1спа","2готд","гоу3т","го1чл","3гою","2гп","2гр.","г1рае","г1рай","г1рар","г1рег","г1рек","г1рец","гри4в3н","г1рик","г1рил","г1рин","г1рис","г1рич","г1ров","г2роз","г1рок","г1рон","г1роп","г1рот","г1роф","гру2п","г1рыв","2грю","г1ряе","г1рял","г1рят","2г3с2","г4са","г4сб","2г3т","гу1в","гу1с","гу2с1к","2гф","2г1ч","2г3ш","2г3э","1да","да2б1","да2ген","да2гр","да1з","да2о","даст1р","дат1р","2д1б","дв2","д1ве","1дви","2д1вид","2двиз","2двинт","2двинч","2д1вис","2д1вит","д3вк","д1вл","2двод","д1воз","1дворь","2двя","2дг2","2д1д2","1де","де1б2л","де1б2р","3девр","3дез","де2з1а2","де2зи","дез1о2","де2зу","деио2","де1кл","3деме","де2од","део3п","де3пл","дерас2","де2с3в","дес2к","де2ср","де1хл","2дж.","д2жам","д2ж3м","2джс","2д1з2","1ди","ди2ад","диа2з","ди2али","ди2ало","ди2ар","ди2ас","ди2об","дио3де","ди2ор","дио1с","ди1оти","дип2","ди2пи","ди3пт","ди2с1тр","диу3","ди3фр","ди3фто","ди1х","2д1к","д1л","д2лев","2д3м2","2д1н","д3на","днеа2","3дневн","4д3но1","дно3д2","днос2","4д3ны","3д2няш","1до","2д1о2бед","до2бл","2д1обла","до1б2ра","дов2л","до3в2м","до1д2","до3дн","до3ж2д","до1з","доз2н","дои2р","2докт","2долим","до2м1р","доп2","до3пл","2допле","до2пре","до2руб","до1с","д1о2сен","д1о2син","2д1осно","дос2п","2дотд","2дотл","дот2ри","2д1отря","2дотъ","до3ть","3дохл","до2ш3в","до3ш2к","до2шлы","до2щу","2дп","2др.","д1раб","1дравш","2дразв","1д2разн","д1ране","д1рар","д1ра2с3","д1рах","д1рач","д2раю","д1ре","д2реб","2д3реж","2дрез","д2рел","д2рем","1дрема","1дремл","дрем3н","1дремы","2д3рен","дре2ск","д2ресс","д1ри","д2рий","2дрин","д2рип","д2рих","дро2г3н","д1род","д1рое","1д2рож","2д3роз","д1рой","д1рол","д1рон","д1рос","д1рот","д1рою","д1руб","1друг","1друж","д1рум","д1рую","д1ры","2дрыв","1д2рыг","д1ря","д2ряб","1д2ряг","д2рях","2д1с2","дск2","дс3кн","2д1т","1ду","дуб3р","ду3г","2д1уд","ду2да","ду2о","дуп1л","дус1к","д1усл","ду1ст","ду2ста","2дут1р","ду1х","ду2чи","дуэ1т","2дф","д1х","2д3це","2дцу","2дцы","2д1ч","2д3ш2","2дщ","2дъ","дъе2м","1ды","2дыг","ды2г1р","2дыд","2дыме","2ды2с1","2дыт","2дыщ","2дь.","1дье","2дьк","2дьт","1дью","1дья","дь3яр","1д2ю","1дя","е1а","еа2д","еади3","еа3до","еа2з","еан2д1р","еат1р","2еб","еба2с","е1бра","еб1рен","еб1ри","е1бро","еб1ров","еб1ры","е2б3рю","е1ве","2евер","е1ви","е3в2ме","ев2ним","ев2нят","е1во","2евол","евра1с","2е1вре","ев1рее","ев1рей","ев1рея","ев1ри","е2вт","е1ву","е1вх","ев2хо","е1вь","ега1с2","ег2д","е2глан","е2гле","е2гли","е2гло","ег2на","ег2но","2ег2р","ед1во","ед2ж","е1дже","е1д2лин","едноу3","ед1опр","е2дотв","е2дох","е2д1ощ","е1дру","е2дру.","е2ду2б","ед1убо","е2дуве","е2дуг","е2дус","ед1уст","2е3душ","е2дын","е1е","е2евид","ее2в1р","ее2ги","ее1с2","ее2ст","еест1р","ее2х","е2жг","е4ждев","еж3ди","2еже","е2ж1р","еза2вр","езау3","е1з2ва","езд1р","е3зе","еззу3","е3зит","ез1об","ез1о2г","е1зом","ез1оп","ез1о2р","ез1от","ез1ош","ез2ря","ез1у2д","ез1у2к","ез1уп","ез1ус","езу2со","езу2сы","ез1у2х","ез1уча","е3зя","е1и","еи2г1","еи2д","еи2м","еи2о","еис1л","еис1тр","е1ка","ека2б","ек2з","е1ки","2е1ко","2е1кр","ек2ро","ек1ск","ек1сте","е1ку","е1ла","е1ле","еле3ск","еле1сц","е1лу","е1лы","е1лю","е3ля","еми3д2","еми3к","емо1с","2емуж","е2мч","2емыс","е3на","ен2д1р","2е1нр","енс2","ен3ш2","е1нэ","2ео","е1о2б","еоб2ро","е2о3гл","ео2гро","е1од","ео3да","ео2де","еоде3з","ео2до","е1о2ж","е2ои","ео3кл","е1ол.","е1ола","ео3ли","е1олк","е1олы","е1оль","е2ом","е1он.","е2она","е2они","ео3но","е1онс","еоп2","е1опе","ео2пр","ео4пу","е2о3ро","еос2","е1о2сви","ео1ск","е1осм","е1осн","еост1р","ео3сх","е1отл","еот2ру","е1о2ч","е1о2щ","епат2","епа1тр","2епе","епис2к","е2пл","е3пла","еп1леш","е3п2лод","еп1лу","е3плы","еп1лющ","е4пн","2епо","е4п3с","е4пт","е1ра","ер1акт","е2рв","ер1ве","е1ре","е3ре.","ере3до","ере1др","ере1к2","ере3м2н","ере3п","ере1х4","е1ри","ерио3з","е1ро","еро2б","ер1обл","2ерови","2ерокр","2ерол","еро3ф2","ер3ск","е1ру","е2р1у2п","е1ры","е1рю","е1ря","е3с2а","ес2ба","е1сг","е1ск","е2с1ка.","ес1кал","е2ске","е2сков","е4с1ку.","2есл","ес1лас","ес2лин","ес2лов","ес2лом","е1слу","е1слы","е1с4м","е3со","2есп","ес2пек","ес3пол","е2спу","е1ст","ес2тан","е2стл","е3сту","ес2чет","е1та","ет1ве","ет1ви","е1тво","2етеч","е1ти","е1то","ето1с","ет1р","ет2ря","е1ту","е1ты","е1тье","е3тью","е3тья","е1тю","е1тя","е1у2","2еуб","еуб3р","еуз2","еук2ло","ефи3б2","еф2л","еф1ре","еха2т","ех1ато","ех3вал","ех3лоп","ех1об","ех1опо","ех1ре","ех1ру","ех1у2ч","2ецв","е1чл","е2шл","еэ2","ею2г","е1я","ея2з","1ж","жа2бл","жа2бр","жа1з","жат1в","2ж1б2","2ж1в","жг2","2жга","ж2ги","3ж2гл","ж2гу","2ж1д","ж2дак","ж2дач","3ж2дел","4ждеме","ж2деп","ж2ди","4ж2дл","ждо3","жду1","4ждь","3ж2дя","3жев","же3д2","же1к2в","же1кл","же1о2","же3п2","же1с2","же3ск","2жжа","ж2же","2жжев","2ж1з2","жи1о","2жирр","2ж1к","2ж1л","ж2м","ж3ма","2ж3мо","2ж1н","жно1","2ж1об","2ж1о2т1","жоу3","жоу1с","2жп2","жпо1","ж2ру","2ж1с","2жф","2жц","2ж1ч","2жъ","2жь.","2жьс","2жьт","1за1","заа2","заб2","за2в1ри","за2вру","з1аву","заг4","з1адр","зае2д","зае2х","за3ж2д","за3з2","з1акт","за3мне","3з2ан","за3на","занс2","зап2","зар2в","за3р2д","зар2ж","зас2","заст2","зат2","за3тк","зау2","зах2","зач2т","за3ш2","зая2","з1б2","2з3ва.","з2вав","з3валь","з2ван","2звая","з1ве","з2вез","з1ви","з3в2к","з1вла","з1во","2звол","1з2вон","з1вр","1зву","2з1вую","з1вь","2зг","з3га","з2гли","зг2на","з2гну","з1д2в","з2деш","здож3","1зе","зе2б1","зе2ев","зе2од","2зж2","з3з2","1зи","3зи.","3зий.","з1инт","зи2оз","зи2оно","зи1оп","3зис","зи3т2р","зиу3м","3зич","2з1к","зко1","зко3п2","з1л","з2лащ","з2лоб","з2лоп","з2лор","з2лющ","2зм2","з3мн","з1н","2зна.","з2нав","з2нае","з2най","з2нак","з2нан","з2нат","з2наю","2зная","2зне","2з3ни","2зно","2зну","2з3ны","з2обе","зо2би","1зов","зо3в2м","зо2гл","зо1др","1зое","зо1з2","1зои","1зой.","1зок.","з1окс","1зол2","зо1лг","зо1лж","зо3м2","1зом.","2зомн","1зон","2зонр","1зоо","зо2о3п","зо2ос","зо2па","з2опл","з2опр","з1орг","1з2о3ре","зос2","з1осн","зо1сп","зо2тв","з2оте","з1отк","з2ото","зот2ре","зот2ри","1зох","зош2","зо2ши","1зоэ","1зою","з1ра","з2рак","зра2с","з2рач","з2рен","з1рес","з2риш","з1ро","зро2с3","з1ру","з2рю","з1ря","2з1с","2зт","з1ти","1зу","3зу.","2з1у2бе","зу2б3р","зу1в","2зуве","2зу2г","3зуе","2з1уз3","2зу1к","3зуме","з1у2мо","2зуп","зу2пр","з1урб","з1у2те","зу2час","2зц","з1ч","2зш","зъе2м","1зы","2зы2г1","зы2з","2зыме","2зымч","2зы2с1","2зыщ","1зье","1зьи","1зью","3зья","1з2ю","1зя","и1а","и2аб","и2ав","иаг2","и2агр","и2аде","и2ади","иа2зов","иа2му","и3ана","иа2нал","ианд2","иао2","и2ап","иа1с2к","иа1ста","иа1сто","иат1ро","и3ату","и2аф","и2а1х","иа2це","2и1б","и2б1р","2иваж","2и1ве","и2в3з","и1ви","2и1во","и1в2р","и3в2с","и1ву","ив2хо","2ивы","иг2д","и3ге","2игл","и2гле","и2гли","и2гн","игни3","иг1рен","иг1ро","иг1ру","иг1ры","и2г1ря","и1дв","и2дей","и1д2ж","иди1ом","иди1от","ид1р","и1дь","и1е","и2евод","ие2г","ие2д","ие3де","ие2зу","и3ени","ие1о2","иепи1","ие2р","и3ж2д","из1в2","из2гне","1из1д","из2нал","и1зо","изо2о","из1р","и1и","ийс2","и1к","и3к2а","ика1с2","ик2ва","и2кви","и2кля","и3ко","ик1ро","ик1ск","ик2с1т","и3ку","и1л","и2л1а2ц","ило1ск","илп2","и2л1у2п","и2ль","ильт2","2има","и2мено","и2мену","2имень","и3ми","имои2","им3пл","и2м1р","и2мч","им2ча","инд2","1инж","ино2к3л","ино3п2л","ино1с","инс2","1инсп","1инсти","1инсу","1инф","1инъ","и1об","ио2бо","ио2вр","и2ог","и1од","ио2де","и1оз","ио3зо","и1окс","и1оле","и1он","и3онов","и1опт","и1ор","и3ора","ио1ру","ио2са","ио3скл","ио1с2п","и1ота","ио2т1в","и1отк","и1отс","иоуг2","ио2хо","и1ош","2ип","ипат2","ипа1тр","ип2ля","ип3н","ипо3к2","и1р","ира2ст","и2р1ау","и2рв","и2рж","ири2ск","ириу3","иро1з2","1ирр","исан2д1","и2сб","и2сд","ис1к","ис3ка.","ис3кам","ис3ках","ис3ке","ис3ки","ис3ков","ис3ку.","и2слам","ис1лы","ис3ме","ис3му","ис3но","исо2ск","и2с3пр","и4сс","и1ст","и2ст1в","и2стл","ис1тяз","и1сьи","и1т","ита2в","ит3ва","и2т1ве","ит1ви","ит1ву","и2тм","и2т1р","ит2рес","ит3ром","и2т1уч","и3тью","и3тья","и1у2","иу3п","иф1л","иф2лю","и2фр","иха3д","и2х1ас","их2ло2","ихлор1","и3х2о","ихо3к","их1ре","их1ри","и1ху","и1ч","иш2ли","и2шлы","и2шт","ию4л","ию2н","ию2т","ию3та","и1я","ия2д","2й1","йд2","й2д3в","йно1","й2о1с","йо2тр","йп2л","й2сб","й3ска","йс2ке","йс4мо","й2с3му","й2сн","й2с3ф","й2сш","й2тм","й2хм","йх2с3","йя1","ка2бл","ка2бри","1кав","к2ад","ка3дне","ка2д1р","1кае","каз3н","ка1зо","1кай","1кал.","1кало","1калс","1кам","1кан","ка2п1л","ка2пре","кар3тр","3к2ас","ка1ст","1кат","ка1т2р","1ках","ка2ш1т","1каю","2к1б","к2вак","к2вас","к2ваш","к1ви","к2воз","к1ву","2кг","2к1д","кда2","1ке","2кеа","ке2гл","кед1р","ке2с1к","ке2ст1","2к1з","1кив","ки1о","киос1","ки2пл","ки1с2ни","1кит","2к1к2","кк3с","2к3ла.","2к3лась","2к3ле.","2клем","к3лем.","к3лен","к1лео","2к3ли.","2к3лив","к2лик","к2лин","2к3лис","к3лия","2к3ло.","к2лоз","к3лом","2к3лос","кло3т","1клук","к3лы","2кль","1клю","2к3лю.","2кля.","2клям","2клях","2км","2к1н","3к2ниж","к2ноп","3к2няж","к2о","ко1б2ри","1ков","3кова","1код","ко1др","1коз","1кольс","2комин","3конс","коп2р","ко2р3в","ко1ру","1кос","ко1ск","кос3м","ко1сп","1котн","ко2фр","кохо2р3","1кош","2кп","2кр.","к1рел","кре1о","кре2сл","к1реч","1криб","к1рид","к2риз","кри2о3","к2рит","к1рих","к1роа","к1роб","к2рое","к1рок","к1роо","к1рор","к1рос","к1роф","к1рох","к1роэ","кру1с","к1ряд","2кс","ксанд2","к2с3в","кс3г","к2с3д","к2сиб","к1ски","кс1кл","к1ско","кс3м","к3со","к1стам","к1стан","кс3те","к1сто","кс1тр","к1сту","к3су","2к1т","кта2к","3к2то.","кто1с","кт2р","к2у","ку1ве","3куе","1куй","1куля","3кум","куп1л","ку2п1р","1кур","ку3ро","кус1к","ку1ст","1кут","ку3ть","1куче","1куют","3кующ","2кф","2к1х2","2кц","2к1ч","2кш","1кь","к2ю","1ла.","2лабе","ла2бл","2лаго","ла2гр","ла2д1аг","1лае","ла3ж2д","ла1зо","л2ак","лак2р","1лам.","1лами.","лан2д1р","ла1ста","ласт1в","ла1сте","ла1сто","ла2ст1р","ла1сту","ла1стя","ла1т2р","лау1","ла2ус","ла2фр","1ла1х","1лая","2лб","л1бр","л1ве","л1ви","л1во","л1ву","1л2гал","л2гл","лго1","2л3д2","1ле.","ле1вл","лев1ра","ле2г1л","ле1дж","ле3до","ле1з2о3","ле1зр","лек1л","2лемн","1лен","ле1онт","ле1о2с","ле2сб","ле2ск","ле4ска","ле1с2л","ле1спе","ле1тв","ле1т2р","1лех","ле1хр","л1зо","1ли","лиа2м","3ливо","3ливы","лиг2л","ли2гро","лие3р","ли2кв","2лимп","лио1с","ли2пл","лис3м","2л1исп","ли2тв","лиу3м","ли2х3в","ли1хл","ли1хр","2л1к","лк2в","л2к1л","2л1л","л2ль","ллю1","2лм","2л1н","лни2е","1ло","ло2бл","ло1б2р","2ловия","ло2вл","3ловод","ло2г3д","лого1с","ло1др","2лоен","ло1зв","ло2к1а2у","ло2кл","лок3ла","3лопас","ло2рв","2л1орг","ло1ру","лос1к","ло1с2п","2лотд","лот2р","ло2шл","2лп","2л1с2","лс3б","л1т","1лу.","лу1бр","лу1в","лу3г","лу1д4р","1луе","лу1зн","лу1кр","1лун","луо2д","лу3п2ло","лу1с","лу3ть","1лую","2л3ф2","2л1х2","л2х3в","2лц","л1ч","1лы.","1лые","1лыж","1лый","1лым","1лых.","4ль.","2льд","3лье","3льи","2льк","2льм","2льн","3льо","2льск","1льсти","1льстя","2льт","2льц","2льч","1льща","1льще","1льщу","3лью","3лья","л2ю","1лю.","1люж","1люсь","лю1та","1ля","3ля.","ля1ви","3ляво","3лявы","2ляд","3лям","ля1ре","ля1ру","3лях","1м","ма2вз","3маг","ма2гн","ма2др","ма2дь","ма1зо","ма2к1р","2м1алл","ман2д1р","мас3л","ма1с4т","ма2тоб","ма2т1р","ма2у","маф2","3мач","ма2чт","4м1б","м3би","мб2л","м3бля","2м3в2","2мг2","3м2гл","2м1д","меан2","ме2ег","ме2ел","ме2ж1ат","ме1зо","ме2с1к","ме2ст1р","меч1т","2мж","2м1з2","ми2гре","ми1зв","2мизд","ми1зн","ми2кр","мик1ри","ми2оз","ми1опи","ми2ор","ми1с2л","2м1к2","3мкн","2м1л","м2лее","м2лел","2мм","2м1н","4м3на","мне1д","3м2неш","4мное","м2нож","4мной","4мном","м2нор","4мною","м2нут","4м3ны","мо1б2","мо3вл","3мод","мо1др","мо2жж","мо1зв","мо1зр","моис1т","мо2к3в","мо3м2","3мон","3моп","мо1ру","мос1ка","мо1см","мо1сн","мо1с2п","3моти","мо2т1р","3моф","2мп","мп2л","м1раб","2мри","2м1ро","м1ры","2м1с","мс2к","мс2н","м2с1ор","3м2сти","2м1т","му1с2к","му1с4л","му1ст","мут1р","му3ть","2мф","мфи3","2м1х","2мц","м2чав","м2чал","м2чит","м2чиш","2мш2","2мщ","3м2ще","мым1","мы2мр","мы2с","2мь.","2мьс","мью1","2мэ","мэ1р","м2ю","мя1р","мя1ст","1на","наби1о","наб2р","на1в2р","наг2н","на3жд","на1з2","на2ил","на2ин","на2и1с2","4накк","на3м2н","нап2л","на1рва","на1р2ви","на1с2","на1тв","на1т2р","н1а2фр","на1х2","2нач","на3ш2л","2нащ","наэ1р","3ная","2н1б2","2н1в","2нг","н2г1в","нги2о","нг4л","нго1с","нг2р","2н1д","н2дак","н2д1в","нде3з","нде2с","нд2ж","н3д2з","н2дл","нд1раг","нд1раж","нд2ре","нд2риа","н2дря","нд2сп","н2дц","1не","не1б2","не1в2д","2невн","не3вня","нег2","3нед","не1д2л","нед2о","не2дра","не1дро","не3ду","не3е","нее2д","не3ж2д","не1зв","не1з2л","не1зн","не1зо","не1зр","неи2","не1к2в","не1кл","не3м2н","3не1о2","не2ода","не2ол","не3п2","не1р2ж","не2р1от","нес2к","не3с2н","не1с2п","нест2","не1с2х","не1с2ч","не1т2в","не3т2л","не1т2р","3неу","не2фр","не1хр","не3шк","нея2","2н1з2","нзо1с","1ни","ни3б2","ни2ен","3ний","ни2кл","нила2","ни2л1ал","ни2л1ам","2нинсп","2н1инст","ни1сл","нис3п","нист2р","ниу3","ни1х","3ниц","3нищ","2н1к","нк2в","нк2л","нкоб2","нко3п2","н2к1ро","нк1с","н1л","2н1н","нно3п2","1но","ноб2","но1бр","но2вл","но1дв","но1др","но2ер","но1зв","но2зд","но3з2о","но1зр","но3кн","3номе","ном3ш","но2рв","но1ру","но1скл","но2сли","но1с2п","но2сч","2нотд","но3ф2","ноэ2","н3п2","2н1ре","2н1ри","н1ро","2н1с","н2с3в","н2сг","нс2ке","н2скон","н2сл","н3сла","н2с3м","н2сн","н2с1ок","н3с2пе","нст2р","нсу2р","н2с3ф","н2съ3","2н1т","н2т1в","нти1о2к","н2тм","нт2ра","н2тр1а2г","нтр1аж","н2трар","нтрас2","нт2ре","н2трив","н2трок","нт2ру","нтр1уд","нт2ры","н2т1ря","1ну","нут1р","ну1х","3ную","2нф2","н1х","нхо1","2нц","2н1ч","н2чл","2нш","нш2т","2нщ","1ны","3ны.","2нь.","1нье","1ньи","2ньк","1ньо","2ньс","2ньт","2ньч","1нью","1нья","н2э","1н2ю","2н3ю2р","1ня","ня1ви","2о1а2","о3ав","оап1","2оба","2обио","об2лев","об2лем","о1блю","1обм","обо1л2г","обо3м2","обо2с","2обот","об1р","о2бра.","о1брав","о1бран","1объ","2обь","о1в","о3вла","о3в2ло","ов3но","о3в2нуш","о2в1ри","ов2се","ов3ско","ов2т","о2вх","ог2","2о3ге","ог3ла.","ог3ли.","ог3ло.","о3гря","2одан","од1вое","о3де.","1о2деял","2оди3а","2о3дим","од2лит","о2д1о2пе","одо3пр","о2д1о2пы","о2доси","о2д1отч","о1драг","од1раж","од1раз","од1рак","о1драл","од3реб","о1дроб","од1ров","о2д1у2ч","о2дыма","о2дыму","о2дын","о1дь","о2дьб","о1е","ое1б","о2е1вл","ое2д","о3ежек","ое2жи","ое1о","ое1с2","ое2ст","о2ето","ое2ц","о3жди","о3ж2ду","оза2б3в","2озав","о1з2ва","оз2вен","оз2ви","о1з2вя","оз2гло","оз2дор","о1здр","озе1о","оз3но","о1зо","о2з1об","2озон","о2зоп","озо1ру","оз1уг","о2зым","о3зыс","о3и","ои2г1","оиг2н","оие3","ои2з","ои2м","ои3мо","ои2о","2ой","ойс2","о1к","2о3кан","ок2в","2ок2л","о3клю","око1б","2о3кол","око3п2л","ок1ск","1окт","2окти","2окум","о3ла","ол2ган","о1ле","1олимп","о3ло","о1лу","олу3д2","о1лы","о1лю","о3ля","о3ма","ом2бл","2оме","о3м2нем","о3м2нет","о3множ","ом1ри","ом2ч","ом2ше","о2мь","о3мья","о3на","онд2","оне3ф2","оно1б","о1нр","онс2","он2тру","о1о2","о2ол","оо3пс","оос3м","оост1р","о2оти","о2оф","о3пак","о3пар","о2пле.","о2п1лей","о2пли","оп2лит","оп2ло","оп3лю.","о2пля","о3пляс","опо4вс","опоз2н","опо2ш3л","оп2ри","о3п2те","оп2то","о1ра","ора2с3","ор2б3л","о1р2в","о1ре","2о3рег","оре2ск","о1ри","ор1исп","о1ро","оро2с3л","ор2тр","о1руе","о1рук","ор1укс","о1рус","2орц","о1ры","о1рю","о1ря","о3сад","оса3ж2","ос2б","о2с3ба","о2с1ка.","ос3кар","оск1во","о2ске","ос1ки","о2ски.","о2сков","ос1кой","ос1ком","о1с2коп","ос1кою","о2с1ку.","ос1кую","о1с2л","ос3лей","ос3лог","ос3лых","ос3ми","ос3мос","о1с2ним","ос2нял","ос2пас","о1с2пу","ос2пя","ос2св","ос2с3м","о1ст","ос2та","о3стра","о2суч","2осх","ос2цен","о1с2ч","о1с2шив","о1т","отв2","от3ва","от1ве","от1ви","от1вл","1отг","1отд","2о3тек","о3тер","2о3тех","о3ти","о3ткал","о2тм","от1раб","от1рад","от1раз","отра2с","от1реж","от1рек","от1реч","от1реш","от1ри","от1род","от1рое","от1рок","от1рос","от1роч","от1руг","от3см","оту2а","от1у2ч","1отх","о3тью","о3тья","о1у2","оуп2","оус2к","оу3та","оу3то","2офаш","о3фе","2офит","2офон","о2фори","2офот","о2фри","2охи","ох1лы","о2хля","ох2ме","2охор","о1хр","о1ху","о2цо","оча1с","оч2л","оч1ле","о3чли","о1чт","о2ч1то","ош3ва","ош2ла","ошпа2к3","ош2т","оэ1ти","2ою","о1я","оя2в","оя2д","оя2з","оя2ри","1п","пави3","пав3л","па2вь","па2др","па2ен","па1зо","пас1л","пас1та","па1сте","пас1то","пас1ту","па2с1ты","па1тро","па2ун","па3ф","па1ху","па2шт","2п1в2","2п1д","пе1","пе2дв","пе2д1ин","пе2з","пе3за","пе3зо","пе2к1ла","пе2ль","пе4пл","пери1о","пе2с1к","пе2сн","пе2ст1р","пе2сц","пе2сч","пе2тр","пе2шт","пиаст1","пи2ж3м","пи2к1р","3пинк","3пися","4п3к","2пл.","4пла.","пла1с","п1лем.","п1лемс","2плен","п2ленк","п1ле2о","плес1к","п1лею","2плив","3п2лик","2пло.","2плов","2плог","2плый","2плым","п1лын","п1лых","2плю.","п1лют","п2ляс","п2ляш","2п1н","п3на","п3но1","п3ны","по1б2","по3вл","по3в2с","под1во","по2д1о2к","подо3м2","пое2л","пое2х","по1зве","по1здо","по1з2л","по1зн","пои2щ","3пой","3полк","по3мно","по3мну","3по3п2","п1орг","пор2ж","по1ру","по1с4","3посл","по3сс","пот2в","пот2р","по1х2","по2шло","по2шлы","по2шля","поэ3м","2пп2","ппо1д","2пр.","3прев","пре1з","прей2","пре1л","пре1ог","3прет","при1","при3в","приг2","при3д2","при3к","при3л","приль2","прип2","п2риц","про1бл","прод2л","про3ж2","про1з2","п1розо","3прои","про3п","профо2","2прс","п2ру","2п1с2","3п2сал","п3син","3п2сих","п3со","2п1т","п2т3в","3п2тих","п3ту","3пуб","пуг3н","пус1ку","пу1ст","пу3ть","2пф2","пх2","2пц","4п3ч","2пш","2пщ","2пь.","2пьт","пэ1ра","п2ю1","1ра.","раа2","ра2бл","1рабо","ра2б1р","1равня","ра2гв","ра2гл","рад2ж","радо1б2","ра2дц","ра2жур","ра2зий","ра2зуб","рак2в","1ракиз","ра2к3л","1ралг","1рамк","1рамн","ра2нох","ран2сц","ра2п1л","рас3к2","1расл","рас3п","рас1т","1раста","рас3т2л","ра2так","рат1в","ра1т2р","2рахи","1ращи","1раю","1рая","2раят","2р1б","рб2ла","р2бле","рб2ло","рб2лю","рбо3с","1р2вав","р3вак","р3вар","р3вата","р3веж","р2вео","1рвет","р1ви","р3вин","р2вит","р1во","рво1з2д","р1вь","2рг","р2гв","р2г1л","р2гн","рг2р","2р1д","рда1с","р2д1в","рд2ж","рди2а","р2дл","рдос2","р2дц","1ре.","ре1вр","рег2ля","рег2н","ре2д1о2п","ре2дос","рее2в","рее2д","рее2л","ре3ж2д","1резк","ре1з2л","ре1зна","1ре1зо","ре1зр","рез2у","1рейш","ре1к2л","1рекш","ре3мно","3ремо","ремо2г3","1ренк","1рень","ре1он","ре1оп","ре1о2р","ре1о2ф","ре1ох","ре1о2ц","1репь","ре3р2","рес1ки","ре1сл","ре1с2п","рес2с3м","ре3ста","ре3сто","ре1сч","ре1тв","ре1т2р","реуч3т","ре1чт","ре3шл","р3жа.","р3жам","р3жан","р3ж2д","2рз","р1з2в","р1зо","ри3а","риб2","ри3бр","ри3в2н","2риги","ри2гло","ри3г2н","2ридж","ри1д2р","рие2л","рие3р","риз2в","рик2р","ри3м2н","ри3м2ч","р2ин","1ринс","рио2з","рио2с","ри1от","ри3р2","ри1с2","ри3сб","2рисп","ри3ств","ри3т2р","1риу","ри2фл","ри3фр","ри1хл","1риц","1риш","риэти2","2р1к","р2кв","р2к1л","рк1с","2р1л2","р2ль","рлю1","р3ля","2рм","р2мч","2р1н","рнас4","рне3о","рне1с2","рно3сл","1ро.","ро2блю","ро1б2р","ро2вл","1рогол","1рогру","ро1дв","ро3д2з","ро1дл","род2ле","ро2д1от","ро1др","1родь","рое2л","рое2м","рое2х","1розар","ро1з2в","ро1зр","3розыс","рои2с3","1рокон","1рокр","1ролис","1ролиц","1ромор","1ронаж","1ронап","1ронос","рооп1р","ро2плю","ро3пс","2р1орг","ро1р2ж","ро1ру","ро1ск","ро2ски","ро2ску","1росл","ро1см","ро1с2п","рос2ф","1росш","1росю","1рот2в","1ротк","рот2ри","1роу","роуг2","ро2ф1ак","ро2фр","ро1хл","рош2л","ро3шн","1рояз","2рп","рп2ло","р2плю","2р1р","4р1с","рс2к","р2сн","рс2п","рств2","р3ствл","2р1т","р2такк","р2т1акт","р2т1в","рт3ва","рт2вл","р2тм","р2т1об","рт1орг","рт1ра","рт2ран","рт1ре","рт1ри","ртус1","р2т1у2чи","р3тью","рт1яч","1ру.","1руба","руг3н","ру2дар","1ружей","2рукс","1рул","рус1к","рус3л","ру1ста","руст1р","ру3ть","1руха","1рухо","1ручн","2рф","рф2л","2рх","р2хв","р2х1ин","рх1л","р1х2ло","р2х1оп","рх1р","2рц","р2цв","2р1ч","р2чл","р2чм","2рш","р3ш2м","рш2т","2рщ","2ръ","1ры.","1рыб","ры2дв","2рыз","ры2кл","1рым","ры2с1к","ры2х1","2рь.","1рье","1рьи","2рьк","2рьс","2рьт","1рью","1рья","рэ1л","р2ю","1рю.","1рюс","ря1ви","1ряю","1са","са2бл","са2дь","са2кв","са2кл","2с1альп","с1апп","2с1арк","2с1атл","са1тр","са2ун","са2ф1р","са1х2","1сб2","2сбе3з2","сбезо3","сбе3с2","2с3бу","с2бы","2сбю","1с2в","2с3вен","сг2","с2ги","с2гн","с2го","1сд2","с2да","с2де","с3ди","с2до","1с2е","сег2н","се1з2","се1кв","сек1л","се2к1р","секс4","семи1","сере2б","се2ск","се2ст","се3ста","се3сте","сест1р","1с2ж","с1з","1с2и","3сиз","си1ом","си1оп","си2пл","си1х","4ск.","2скам","с2канд","1с2каф","2сках","ск2ва","с2кви","3скино","ск2л","с2кля","ск3ляв","2скн","с1кон","2скона","с2копс","2скош","ск2р","с1кра","2скриб","ск1с","2скуе","2с3ла.","1слав","1слад","с1лам","2с3лая","с3лев","с3лее","с1лей","слео2","с1лет","с3лею","2с3ли.","2слиц","2с3ло.","с2лож","с3лому","2с3лос","2с3лую","2с3лые","2с3лый","2с3лым","2сль","с1люс","2с3ля","с2м","1смес","с4мея","с3мур","с1н","1с2наб","с2нас","2сная","1с2неж","2с3ник","2сно","сно1з2","2сную","2с3ны","1со","со1б2р","с2ов","сов2р","со1д","со1з2","со1л2г","со3м2","со2рие","со1ру","со1ск","со1с2п","со2сь","сот2р","со1чл","сош2л","сп2","с2пав","с2пее","с2пел","с2пен","с2пех","1с2пец","с2пеш","с2пею","с2пим","2спися","с3пн","спо1з2","2спол","с2пос","2спь","1ср","2ср.","с2раб","сра2с","с1рат","сре2б1","сре3до","2с1с","ссанд2","с2сб","сс3во","4с5си","с3с2к","сс2л","с2сн","с3с2не","с2сори","сс2п","сст2","сс2ч","2ст.","1ста.","2стб","4ств.","ст1вер","2ствл","ст2вол","ст2вя","с2те","1с4те.","1стей","1стел","1стен.","с3тет.","с3тете","сте3х","с3теш","1сти","с2тие","с2тии","2стимп","2стинд","2стинф","2стинъ","с2тич","с2тишк","с2тию","2стк","ст2ла","с3т2ле","2стли","ст2лил","ст2лит","2стля","2стм","2стн","1сто.","с2то1б","1стов","1стог","сто2г3н","1стод","1стое","3с2тои","1сток","1стом","1стон","2сторг","2сторж","2сторс","1стос","1стот","с2тоц","1стою","2стп","2стр.","страс2","4страя","2стред","ст1рей","2стрив","ст1риз","2стрил","2стрищ","ст1роа","с4т1ров","ст1род","ст1рох","ст2руб","ст1руш","2стс","с1тут","1стую","2стф","2стц","1сты","с2тыв","с4ть","2сть.","2стьс","3стью","1стья","1стям","1стях","1су","су2б","суб1а2","суб1о","су1в","су3гл","су2ев","су2з","су1кр","сума1","супе2","сус3л","сус3п","су1ст","сут1р","су2ф3","су1х","1с2фе","с1х2","1с2хе","2сца","с2цена","2с3ци","2сцо","сч2","1сча","с2час","сче2с1к","с3чив","2счик","с2чит","с1чл","2счо","сш2","с3шн","1съ2","съе3д","съе3л","1сы","сы2г1","сы2з","сы2п1л","сы2с","сыс1ка","2сь.","1сье","2ськ","2сьт","1сью","1сья","сэ1р","с2эс","1с2ю","сю1с","1ся","2сяз","ся3ть","та2бл","таб2р","та1ври","1таг","та2гн","та1з2","так3ле","т2ан","та2пл","1тас","та1ст","та1тр","1тащ","2т1б2","2тв.","2т2ва","т1вей","т1вел","т1вет","2тви","т1вое","т1во1з","2т1вой","т1вос","2твою","2т1вр","2тву","2твы","2твя","2тг","2т1д","1т2е","те2гн","те1д","те1зо","3тека","тек1л","3текш","теле1о","тем2б1","те2о3д","те1ох","те4п1л","те2рак","тере2о","3терз","тер3к","3теря","те2ска","те2с1ки","те2с1ко","те2ску","тест2","те2хо","2тж","2т1з","тиа2м","ти2бл","ти3д2","ти1зна","тии2","тиис1","тик2","тила2м","т1имп","2т1инв","т1инд","2тинж","2тинф","ти1с2л","ти3ств","ти3ф2р","ти1хр","2т1к2","3т2кав","3т2кан","3т2кет","3ткн","2т1л","тло2б","т2ль","тм2","тми2с","тмист1","т3мщ","2т1н","то2бес","то1б2л","2тобъ","то2вл","то1д","то3д2р","то1з2","ток2р","2т1омм","2томс","2тонг","1торг","1торж","1торс","то1ру","1торш","то1с2н","то1с2п","то1с2ц","2тотд","то3тк","1тощ","2тп2","тпа1т","т1рага","2т1раж","2трб","2трв","2трг","2трд","трдо2","т1реа","1требо","1требу","т1ребь","т1реве","т1ревш","т1рег","т1ред","т1рее","т1реза","т1резн","треп1л","3тре2с","трес1к","т1рест","т1рету","3т2ре2х","т1рец","т2решь","т1рею","1триб","т1рив","три2г1л","т1рил","т1рим","4тринс","три1о","т1рит","три3ф","т1рищ","2трм","2трн","т1рогл","т1роид","2трой","тро3пл","т1рор","т1росо","тро3т","4т3роц","2трою","2трп","2трр","1труб","т2руд","2трук","т2рум","т2рут","2трф","2трщ","2тръ","т1ры","т1ря.","т1ряв","2т1ряд","т1ряе","т1ряж","т1ряй","т3ряк","т1рят","т1рящ","т1ряя","4т1с2","т2сб","т2с3д","тсеп2","т2с3м","т2с3п","2т1т","т2тм","ту2гр","ту2жин","2т1у2пр","ту1сл","ту1ст","ту2фл","1туша","1тушо","1тушь","1тущ","2тф","2т1х","4тц","2т1ч","2тш2","2тщ","2тъ","ты2г1","ты2с1к","2ть","4ть.","3тье","3тьи","ть2м","4тьт","тью1","2тэ","т2ю","тю1т","1тяг","1тяж","1тяп","2тя2ч","у1а","у2але","у2ас","у3бел","убо1д","убос2","уб1р","1убра","уб3рю","1у2быт","у1ве.","у1ви","ув2л","у1во","у1ву","у2гв","у2гл","у2гн","уг2на","уг2не","уг1ре","уг1ря","уда1с","уд2в","уд1рам","уд1ро","у3ду","у1е","уе2д","уе2л","уе1с","уе2с1к","уес2л","уе2х","у2жж","у1з2в","у1зо","узо3п","у1и","у1ка","ук1в","у1ки","у1ко","уко1б","у1ку1","у1ла","у1ле","у1лу","у1лых","у1лю","у2мч","у3на","ун2д1р","у1нь","у1о","уо2б","уо2в","у2оза","уо2к","уо2п","уо2с","уост1","уо2т1","уо2ф","у2пл","уп1лю","у3про","у1ра","у1ре","уре2т3р","у1ри","урке3","у1ро","у2род","уро2дл","урт2р","у3ру","у1ры","у1рю","у1ря","у2сад","у1сг","ус1ка","ус1ки","уск3л","ус1ком","у1скр","ус1ку.","ус2л","усла4ж3","ус3ли","у1см","у2сн","ус2п","ус3с","у1сте","у1стя","у1сф","2усц","у2сч","у2сь","у3сья","у1та","у3тер","у1ти","ут2ля","у1то","уто3п2с","ут1ри","у1ту","у1ты","у1тье","у3тью","1утю","у1тя","у1у","ууг2","уу2с","у3фи","уф1л","уф2ля","у2фр","ух1ад","уха2т","у2хв","у3х4во","ух1л","ух3ля","ух1р","у2чеб","1учр","у1чь","у3ше","у3ши","у2шл","уш1ла","у2шп","2уэ","у1я","уя2з","1ф","фа2б1","фа2гн","фа1зо","фан2д","фанд1р","фа1тр","фа2х","3фаш","фаэ1","2ф1б","2ф1в","2фг","2ф1д","фев1р","фед1р","фе1о3","фе2с1к","ф4и","фиа2к1","фи2гл","фи2ж","фи2зо","фи2нин","фи1о","3фит","2ф1к","ф2ла","ф2ли","ф2ло","2фм","2ф1н","2фобъ","3фон","фо2рв","2ф1орг","фор3тр","фо1ру","фос1к","3фот","фото3п","ф1раб","фра1з","фра1с","ф1рат","ф2рен","фре2с","ф1ри","ф2риж","ф2риз","ф1ро","ф2рон","ф1ру","2ф3с","2ф1т","ф2тм","ф2тор","2ф1у2п","фу3тл","2фуф","2фф","2ф1ч","2фш2","2фь.","ф2ю1","1ха","ха2бл","ха2д","2х1ак","хан2д","хао3","х1арш","2х1б","1х2в","2х3ве","2х3ви","х3вы","2хг","х3д2","1хе","хео3","х1з2","1хи","хиат1","хие2","2х1изы","хи1с2","х1к2","х1лав","х1лас","х1лат","х1лац","1хлеб","х2лес","х1лет","х3ло.","х2лоп","1х2лор","х1лу","1х2му","2х1н","3х2ны","1хо","2х1о2к","хоп2","хо2пе","хо2пор","хо1ру","х1осм","2х1осн","хоф2","хох1л","хоя2","хп2","х1раз","1хран","х1ра1с2","х1рей","хри2пл","х2рис","х1ров","1хром","хро2мч","х1ры","х1ря","2х1с2","2х1т","1ху.","х1у2г","2хуе","2хуй","1хун","х1у2р","ху3ра","1хус","1хуш","2хую","х1х2","2х1ч2","2хш","хью1","1ц","ца1","3ца.","3цам","ца2пл","3цах","2ц1б","ц2ве","2цвы","2цг","2ц1д","це1з","це1к","це1от","цеп1л","цес2л","це1т","2цетат","2ц1з","ци1","ци2к1","цик3л","ци2ол","цип2","ци2ск","циу3","циф1р","2ц1к2","2ц1л","2цм","2ц1н","ц1о2б","2ц1о2д","2ц1от","2цп2","2ц1р","2ц1с","2ц1т","3цу","2цц","2ц3ш2","3цы","цы2п","цып3л","цю1","1ча","ча2др","ча2дц","ча2ево","ча2евы","ча2ер","част1в","ча1сте","ча1сту","ча1стя","3чато","3чаты","2ч1б","ч1в","2ч1д","1че","че1вл","че2гл","че1о","чер2с","черст1","че1сл","ч2ж","чжо2","1чи","3чик","3чиц","2ч1к","1ч2ла","ч2ле","ч3лег","ч3леж","2чли","ч2ли.","1ч2ло","1чм","2чма","2чме","ч2мо","2ч1н","3чо","2ч1с","2ч1та","ч2те","2чтм","1чу","3чук","ч2х","2ч1ч","2чь.","1чье","1чьи","2чьс","2чьт","1чью","1чья","1ш","ша2бл","ша2гн","ша2г1р","ша2др","шан2кр","шар3т2","ша1ст","ша1тро","2ш1б","ш2в","ш3вен","ше2гл","ше1к","ше1о2","ше3пл","ше1с2","ши2бл","ши2пл","шиф1р","2ш1к2","3ш2кол","2ш1лей","2шлен","ш2ли.","2шлив","2шлил","ш2лин","ш2лис","ш2лите","ш2лиф","ш2ло.","2шлов","ш2лог","ш1лы","ш2лю","2шляе","2шляк","ш2ляп","2шлят","2шляч","2шляю","2шм","3ш2мы","4ш3мы.","2ш1н","4шни","ш2нур","ш2п2","ш3пр","2ш1р","2ш1с","ш1ти","2штс","шу2ев","шуст1","2шф","ш1х","2шц","2ш1ч","2шь","4шь.","3шье","3шьи","3шью","3шья","ш2ю1","1щ","2щ3в2","ще1б2л","ще2гл","щед1р","щеи2","щеис1","ще1с","ще1х","щеш2","ще3шк","щи2п1л","2щм","2щ1н","2щ1р","2щь.","ъ1","ъе2г","ъе2д","ъе3до","ъе2л","ъ2е2р","ъе2с","ъе2хи","ъю2","ъя2","ъя3н","ы1","ы2бл","ы3га","ы3ги","ыг2л","ы2гн","ы2дл","ыд2ре","ы2д1ро","ы2дря","ые2","ы3ж2д","ыз2ва","ыз2д","ы2зл","ы2зн","ыз2на","ыи2","ыиг1","ы2к1в","ык2л","ы2к3ло","ыко1з","ык1с","ы2ль","ы2мч","ынос3л","ы3по","ыра2с3","ыр2в","ыре2х","ы3са","ы3се","ыс1ки","ыс1ку","ы2сн","ы3со","ыс2п","ы2сх","ыс2ч","ы2сш","ыт1ви","ыт2р","ы3тью","ы3тья","ыу2","ы2ш1л","ы3шь","ь1","ьб2","ь2вя","ь2дц","ь2е","ье1зо","ье1к","ье2с1к","ь2зн","ь2и1","ь2кл","ьми3д","ьми3к","ьмо1","ьне2о","ь2о","ь2п1л","ь3п2то","ьс2к","ь2сн","ь2сти","ь2стя","ь2т1амп","ьти3м","ь2тм","ь2тот","ь2траб","ьт2ре","ьт2ру","ьт2ры","ьхо2","ьхоз1","ь2ща","ь2ще","ь2щу","ь2ю","ь2я","ья1в","ь3ягс","1э","э1в","эв1р","2эг","эд1р","эк1л","экс1","эк2ст","эле1о","э2м","э3ма","э2н","э3нь","эо2з","э2п","эпи3к","э1ре","э1ри","эри4тр","эро1с2","э1ру","э1ры","эс1","эск2","эс3м","э2со","эс3те","эс2т1р","э2те","этил1а","эт1ра","э2ф","эх2","эхо3","э2ц","эя2","1ю","ю1а","ю1б","ю2бв","ю2бл","ю2б1ре","ю1в","ю1дь","ю1е","юз2г","юзи2к","ю1зо","ю1и","ю2идал","ю1к","ю2к1в","ю1ла","ю1ле","ю2ли","ю1лю","2юм","ю2мч","ю2нь","ю1о1","ю1ра","ю1ре","юре4м","ю1ри","юри2ск","ю1ро","ю1ру","ю1ры","ю2с1к","ю1ста","ю1сте","ю1сто","ю1стя","ю1ти","ю1то","ю1ту","ю1ты","ю1х","юха1с","ю1ч","ю2щь","ю1я","я2бр","яб1ра","яб3ре","яб1ри","яб3рю","3явикс","я1во","я1ву","я1в2х","я2г1л","я2гн","яд1в","яд1р","я1е","яз2гн","я1зо","я1и","я1к","я2к1в","я2к1л","як1с","я1л","я2ль","ям2б3л","я2мь","я3на","янс2","я1ра","я1ри","я1ро","я1рь","яс1к","яс1л","яс2т","яст3в","я1сто","яст1р","я1та","ят3в","я3ти","яти1з","я1то","я1ту","я1ты","я3тью","я3тья","я1тя","я1у","ях1л","я1ху","яце1","я2шл","2яю.","2я1я",".бо2дра",".вст2р",".доб2рел",".до1б2ри",".об2люю",".об2рее",".об2рей",".об2рею",".об2рив",".об2рил",".об2рит",".па2н1ис",".пом2ну",".реа2н",".ро2с3пи",".со2пла","а2ньш","атро2ск","безу2с","бино2ск","виз2гн","выб2ре","гст4р","ди1с2лов","дос2ня","дро2ж3ж","2дружей","е2мьд","е2о3плато","е2о3пози","ере3с2со","4ж3дик","4ж3дич","заи2л","зао2з","2з1а2хав","заю2л","з2рят","зу2мь","6зь.","и2л1а2мин","илло3к2","й2кь","ла2б1р","лу3с4н","ме2динс","ме2д1о2см","мети2л1ам","мис4с3н","нар2ват","не2о3ре","ни1с2кол","ни4сь.","но4л1а2мин","н2трасс","о2д1о2бол","о4ж3дев","о1и2с1тр","ойс4ков","о2м3че.","они3л2ам","он2трат","о2плюс","осо4м3н","оти4дн","пере1с2н","по2доде","по2д1у2ро","пое2ж","по2стин","прем2но","приче2с1к","пти4дн","редо4пл","реж4ди","рни3л2а3м","роб2лею","2сбрук1","со2стрит","со3т2кал","2стче.","2стьт","сы2мит","2сься.","6тр.","тро2етес","6хуя.","ы2рьм","ыя2вя","ьбат2","а1вё","а2двё","а1ё","аз3вёз","а1лё","2алёк","2амёт","ам2нёт","а1рё","ас3тём","а1тьё","1бё","бё2д1р","б3лён","б2лёс1к","б2люё","б1рёк","б2рём","б2рёх","1веё","3везё","вёд1р","1вёз","2вёрд","1вёс","в2лёк","в2лёт","1вмё","в2нёс","2в1рён","3всё3","1вьё","г1лё","г2лёт","г2нёв","г3нён","г2ноё","д1вё","1дё",".доб2рёл","2доплё","до2прё","д1рё","д2рёб","2д3рёж","д2рём","1дрёма","1дрёмы","2д3рён","дъё2м","1дьё","еб1рён","е1вё","2евёр","2е1врё","е2глё","е1ё","2ежё","е3зё","е1лё","2епё","ер1вё","е1рё","ерё3до","ерё1к2","ес2чёт","ет1вё","е1тьё","2ёб","ё1бра","ёб1ры","ё1ве","ё1во","2ё1вре","ё1ву","ё1дру","2ё3душ","2ёже","ё3зе","ёз1о2г","ё1зом","ё1ка","ё1ки","2ё1ко","2ё1кр","ёк2ро","ё1ку","ё1ла","ё1ле","ё1лу","ё1лы","2ёмуж","ё2мч","ё3на","ён2д1р","ёнс2","ёпат2","2ёпе","ё2пл","ё3пла","ёп1лу","ё3плы","ё4пн","2ёпо","ё4пт","ё1ра","ё1ре","ё3ре.","ё1ри","ё1ро","ёр3ск","ё1ру","ё1ры","ё3с2а","ё1ск","ё2с1ка.","ё2ске","ё4с1ку.","2ёсл","ё3со","ё1ст","ёс2тан","ё3сту","ё1та","2ётеч","ё1ти","ё1то","ёто1с","ёт1р","ё1ту","ё1ты","ё1тю","ё1тя","ёха2т","ёх1ато","ёх3вал","ёх3лоп","ёх1опо","ёх1ру","3жёв","жё1с2","ж2жё","за3мнё","з1вё","з2вёз","1зё","з2наё","2знё","1з2о3рё","з2отё","зот2рё","3зуё","зъё2м","2зымё","2и1вё","иг1рён","и1ё","их1рё","1каё","1кё","к3лён","к2роё","3куё","ла1стё","лё3до","лё1з2о3","лёк1л","1лён","лё2ск","лё4ска","1лёх","2лоён","1луё","3льё","1льщё","3м2нёш","3м2щё","нд2рё","не3ё","1нё","нё1б2","3номё","1ньё","од3рёб","о1ё","оё2жи","о1лё","2омё","о3м2нём","о3м2нёт","о2п1лёй","о1рё","о2скё","от1вё","2о3тёк","о3тёр","от1рёк","от1рёш","о3фё","пё1","пё2ст1р","пё2тр","2плён","п2лёнк","плёс1к","п1лёю","поё2ж","3прёт","причё2с1к","р2блё","1рвёт",".рё2бр","1рёзк","рё1зна","1рё1зо","рёз2у","1рёкш","3рёмо","1рёнк","рё3ста","рё3сто","род2лё","роё2м","1рьё","с2дё","се3стё","1с2ё","сёкс4","сё2ст","сёст1р","2скуё","с1лёт","с2тё","1стёл","1стён.","с3тёт.","с3тёте","стё3х","с3тёш","с3т2лё","счё2с1к","1сьё","т1вёл","т1воё","1т2ё","тё2гн","тё1зо","3тёка","тёк1л","3тёкш","тё4п1л","тёр3к","тё2ска","тё2с1ки","тё2с1ко","тё2ску","тё2хо","3т2кёт","т1ревё","3т2рё2х","т2рёшь","тро2етёс","3тьё","уг2нё","уг1рё",".уё2","у1ё","у1лё","у1рё","у1стё","у3тёр","у1тьё","у2чёб","у3шё","2х3вё","1хлёб","х2лёс","ц2вё","1чё","чёр2с","чёрст1",".чё2с1к","ч2тё","1чьё","2шлён","3шьё","ъ2ё2р","ыд2рё","ырё2х","ы3сё","ь2ё","ьё1зо","ь2щё","ю1ё","яб3рё",".не8","8не.","8бъ.","8въ.","8гъ.","8дъ.","8жъ.","8зъ.","8къ.","8лъ.","8мъ.","8нъ.","8пъ.","8ръ.","8съ.","8тъ.","8фъ.","8хъ.","8цъ.","8чъ.","8шъ.","8щъ.","8-7","--8",".а-8",".б-8",".в-8",".г-8",".д-8",".е-8",".ё-8",".ж-8",".з-8",".и-8",".й-8",".к-8",".л-8",".м-8",".н-8",".о-8",".п-8",".р-8",".с-8",".т-8",".у-8",".ф-8",".х-8",".ц-8",".ч-8",".ш-8",".щ-8",".ъ-8",".ы-8",".ь-8",".э-8",".ю-8",".я-8","-а8а8","8а8а-","-а8б8","8а8б-","-а8в8","8а8в-","-а8г8","8а8г-","-а8д8","8а8д-","-а8е8","8а8е-","-а8ё8","8а8ё-","-а8ж8","8а8ж-","-а8з8","8а8з-","-а8и8","8а8и-","-а8й8","8а8й-","-а8к8","8а8к-","-а8л8","8а8л-","-а8м8","8а8м-","-а8н8","8а8н-","-а8о8","8а8о-","-а8п8","8а8п-","-а8р8","8а8р-","-а8с8","8а8с-","-а8т8","8а8т-","-а8у8","8а8у-","-а8ф8","8а8ф-","-а8х8","8а8х-","-а8ц8","8а8ц-","-а8ч8","8а8ч-","-а8ш8","8а8ш-","-а8щ8","8а8щ-","-а8ъ8","8а8ъ-","-а8ы8","8а8ы-","-а8ь8","8а8ь-","-а8э8","8а8э-","-а8ю8","8а8ю-","-а8я8","8а8я-","-б8а8","8б8а-","-б8б8","8б8б-","-б8в8","8б8в-","-б8г8","8б8г-","-б8д8","8б8д-","-б8е8","8б8е-","-б8ё8","8б8ё-","-б8ж8","8б8ж-","-б8з8","8б8з-","-б8и8","8б8и-","-б8й8","8б8й-","-б8к8","8б8к-","-б8л8","8б8л-","-б8м8","8б8м-","-б8н8","8б8н-","-б8о8","8б8о-","-б8п8","8б8п-","-б8р8","8б8р-","-б8с8","8б8с-","-б8т8","8б8т-","-б8у8","8б8у-","-б8ф8","8б8ф-","-б8х8","8б8х-","-б8ц8","8б8ц-","-б8ч8","8б8ч-","-б8ш8","8б8ш-","-б8щ8","8б8щ-","-б8ъ8","8б8ъ-","-б8ы8","8б8ы-","-б8ь8","8б8ь-","-б8э8","8б8э-","-б8ю8","8б8ю-","-б8я8","8б8я-","-в8а8","8в8а-","-в8б8","8в8б-","-в8в8","8в8в-","-в8г8","8в8г-","-в8д8","8в8д-","-в8е8","8в8е-","-в8ё8","8в8ё-","-в8ж8","8в8ж-","-в8з8","8в8з-","-в8и8","8в8и-","-в8й8","8в8й-","-в8к8","8в8к-","-в8л8","8в8л-","-в8м8","8в8м-","-в8н8","8в8н-","-в8о8","8в8о-","-в8п8","8в8п-","-в8р8","8в8р-","-в8с8","8в8с-","-в8т8","8в8т-","-в8у8","8в8у-","-в8ф8","8в8ф-","-в8х8","8в8х-","-в8ц8","8в8ц-","-в8ч8","8в8ч-","-в8ш8","8в8ш-","-в8щ8","8в8щ-","-в8ъ8","8в8ъ-","-в8ы8","8в8ы-","-в8ь8","8в8ь-","-в8э8","8в8э-","-в8ю8","8в8ю-","-в8я8","8в8я-","-г8а8","8г8а-","-г8б8","8г8б-","-г8в8","8г8в-","-г8г8","8г8г-","-г8д8","8г8д-","-г8е8","8г8е-","-г8ё8","8г8ё-","-г8ж8","8г8ж-","-г8з8","8г8з-","-г8и8","8г8и-","-г8й8","8г8й-","-г8к8","8г8к-","-г8л8","8г8л-","-г8м8","8г8м-","-г8н8","8г8н-","-г8о8","8г8о-","-г8п8","8г8п-","-г8р8","8г8р-","-г8с8","8г8с-","-г8т8","8г8т-","-г8у8","8г8у-","-г8ф8","8г8ф-","-г8х8","8г8х-","-г8ц8","8г8ц-","-г8ч8","8г8ч-","-г8ш8","8г8ш-","-г8щ8","8г8щ-","-г8ъ8","8г8ъ-","-г8ы8","8г8ы-","-г8ь8","8г8ь-","-г8э8","8г8э-","-г8ю8","8г8ю-","-г8я8","8г8я-","-д8а8","8д8а-","-д8б8","8д8б-","-д8в8","8д8в-","-д8г8","8д8г-","-д8д8","8д8д-","-д8е8","8д8е-","-д8ё8","8д8ё-","-д8ж8","8д8ж-","-д8з8","8д8з-","-д8и8","8д8и-","-д8й8","8д8й-","-д8к8","8д8к-","-д8л8","8д8л-","-д8м8","8д8м-","-д8н8","8д8н-","-д8о8","8д8о-","-д8п8","8д8п-","-д8р8","8д8р-","-д8с8","8д8с-","-д8т8","8д8т-","-д8у8","8д8у-","-д8ф8","8д8ф-","-д8х8","8д8х-","-д8ц8","8д8ц-","-д8ч8","8д8ч-","-д8ш8","8д8ш-","-д8щ8","8д8щ-","-д8ъ8","8д8ъ-","-д8ы8","8д8ы-","-д8ь8","8д8ь-","-д8э8","8д8э-","-д8ю8","8д8ю-","-д8я8","8д8я-","-е8а8","8е8а-","-е8б8","8е8б-","-е8в8","8е8в-","-е8г8","8е8г-","-е8д8","8е8д-","-е8е8","8е8е-","-е8ё8","8е8ё-","-е8ж8","8е8ж-","-е8з8","8е8з-","-е8и8","8е8и-","-е8й8","8е8й-","-е8к8","8е8к-","-е8л8","8е8л-","-е8м8","8е8м-","-е8н8","8е8н-","-е8о8","8е8о-","-е8п8","8е8п-","-е8р8","8е8р-","-е8с8","8е8с-","-е8т8","8е8т-","-е8у8","8е8у-","-е8ф8","8е8ф-","-е8х8","8е8х-","-е8ц8","8е8ц-","-е8ч8","8е8ч-","-е8ш8","8е8ш-","-е8щ8","8е8щ-","-е8ъ8","8е8ъ-","-е8ы8","8е8ы-","-е8ь8","8е8ь-","-е8э8","8е8э-","-е8ю8","8е8ю-","-е8я8","8е8я-","-ё8а8","8ё8а-","-ё8б8","8ё8б-","-ё8в8","8ё8в-","-ё8г8","8ё8г-","-ё8д8","8ё8д-","-ё8е8","8ё8е-","-ё8ё8","8ё8ё-","-ё8ж8","8ё8ж-","-ё8з8","8ё8з-","-ё8и8","8ё8и-","-ё8й8","8ё8й-","-ё8к8","8ё8к-","-ё8л8","8ё8л-","-ё8м8","8ё8м-","-ё8н8","8ё8н-","-ё8о8","8ё8о-","-ё8п8","8ё8п-","-ё8р8","8ё8р-","-ё8с8","8ё8с-","-ё8т8","8ё8т-","-ё8у8","8ё8у-","-ё8ф8","8ё8ф-","-ё8х8","8ё8х-","-ё8ц8","8ё8ц-","-ё8ч8","8ё8ч-","-ё8ш8","8ё8ш-","-ё8щ8","8ё8щ-","-ё8ъ8","8ё8ъ-","-ё8ы8","8ё8ы-","-ё8ь8","8ё8ь-","-ё8э8","8ё8э-","-ё8ю8","8ё8ю-","-ё8я8","8ё8я-","-ж8а8","8ж8а-","-ж8б8","8ж8б-","-ж8в8","8ж8в-","-ж8г8","8ж8г-","-ж8д8","8ж8д-","-ж8е8","8ж8е-","-ж8ё8","8ж8ё-","-ж8ж8","8ж8ж-","-ж8з8","8ж8з-","-ж8и8","8ж8и-","-ж8й8","8ж8й-","-ж8к8","8ж8к-","-ж8л8","8ж8л-","-ж8м8","8ж8м-","-ж8н8","8ж8н-","-ж8о8","8ж8о-","-ж8п8","8ж8п-","-ж8р8","8ж8р-","-ж8с8","8ж8с-","-ж8т8","8ж8т-","-ж8у8","8ж8у-","-ж8ф8","8ж8ф-","-ж8х8","8ж8х-","-ж8ц8","8ж8ц-","-ж8ч8","8ж8ч-","-ж8ш8","8ж8ш-","-ж8щ8","8ж8щ-","-ж8ъ8","8ж8ъ-","-ж8ы8","8ж8ы-","-ж8ь8","8ж8ь-","-ж8э8","8ж8э-","-ж8ю8","8ж8ю-","-ж8я8","8ж8я-","-з8а8","8з8а-","-з8б8","8з8б-","-з8в8","8з8в-","-з8г8","8з8г-","-з8д8","8з8д-","-з8е8","8з8е-","-з8ё8","8з8ё-","-з8ж8","8з8ж-","-з8з8","8з8з-","-з8и8","8з8и-","-з8й8","8з8й-","-з8к8","8з8к-","-з8л8","8з8л-","-з8м8","8з8м-","-з8н8","8з8н-","-з8о8","8з8о-","-з8п8","8з8п-","-з8р8","8з8р-","-з8с8","8з8с-","-з8т8","8з8т-","-з8у8","8з8у-","-з8ф8","8з8ф-","-з8х8","8з8х-","-з8ц8","8з8ц-","-з8ч8","8з8ч-","-з8ш8","8з8ш-","-з8щ8","8з8щ-","-з8ъ8","8з8ъ-","-з8ы8","8з8ы-","-з8ь8","8з8ь-","-з8э8","8з8э-","-з8ю8","8з8ю-","-з8я8","8з8я-","-и8а8","8и8а-","-и8б8","8и8б-","-и8в8","8и8в-","-и8г8","8и8г-","-и8д8","8и8д-","-и8е8","8и8е-","-и8ё8","8и8ё-","-и8ж8","8и8ж-","-и8з8","8и8з-","-и8и8","8и8и-","-и8й8","8и8й-","-и8к8","8и8к-","-и8л8","8и8л-","-и8м8","8и8м-","-и8н8","8и8н-","-и8о8","8и8о-","-и8п8","8и8п-","-и8р8","8и8р-","-и8с8","8и8с-","-и8т8","8и8т-","-и8у8","8и8у-","-и8ф8","8и8ф-","-и8х8","8и8х-","-и8ц8","8и8ц-","-и8ч8","8и8ч-","-и8ш8","8и8ш-","-и8щ8","8и8щ-","-и8ъ8","8и8ъ-","-и8ы8","8и8ы-","-и8ь8","8и8ь-","-и8э8","8и8э-","-и8ю8","8и8ю-","-и8я8","8и8я-","-й8а8","8й8а-","-й8б8","8й8б-","-й8в8","8й8в-","-й8г8","8й8г-","-й8д8","8й8д-","-й8е8","8й8е-","-й8ё8","8й8ё-","-й8ж8","8й8ж-","-й8з8","8й8з-","-й8и8","8й8и-","-й8й8","8й8й-","-й8к8","8й8к-","-й8л8","8й8л-","-й8м8","8й8м-","-й8н8","8й8н-","-й8о8","8й8о-","-й8п8","8й8п-","-й8р8","8й8р-","-й8с8","8й8с-","-й8т8","8й8т-","-й8у8","8й8у-","-й8ф8","8й8ф-","-й8х8","8й8х-","-й8ц8","8й8ц-","-й8ч8","8й8ч-","-й8ш8","8й8ш-","-й8щ8","8й8щ-","-й8ъ8","8й8ъ-","-й8ы8","8й8ы-","-й8ь8","8й8ь-","-й8э8","8й8э-","-й8ю8","8й8ю-","-й8я8","8й8я-","-к8а8","8к8а-","-к8б8","8к8б-","-к8в8","8к8в-","-к8г8","8к8г-","-к8д8","8к8д-","-к8е8","8к8е-","-к8ё8","8к8ё-","-к8ж8","8к8ж-","-к8з8","8к8з-","-к8и8","8к8и-","-к8й8","8к8й-","-к8к8","8к8к-","-к8л8","8к8л-","-к8м8","8к8м-","-к8н8","8к8н-","-к8о8","8к8о-","-к8п8","8к8п-","-к8р8","8к8р-","-к8с8","8к8с-","-к8т8","8к8т-","-к8у8","8к8у-","-к8ф8","8к8ф-","-к8х8","8к8х-","-к8ц8","8к8ц-","-к8ч8","8к8ч-","-к8ш8","8к8ш-","-к8щ8","8к8щ-","-к8ъ8","8к8ъ-","-к8ы8","8к8ы-","-к8ь8","8к8ь-","-к8э8","8к8э-","-к8ю8","8к8ю-","-к8я8","8к8я-","-л8а8","8л8а-","-л8б8","8л8б-","-л8в8","8л8в-","-л8г8","8л8г-","-л8д8","8л8д-","-л8е8","8л8е-","-л8ё8","8л8ё-","-л8ж8","8л8ж-","-л8з8","8л8з-","-л8и8","8л8и-","-л8й8","8л8й-","-л8к8","8л8к-","-л8л8","8л8л-","-л8м8","8л8м-","-л8н8","8л8н-","-л8о8","8л8о-","-л8п8","8л8п-","-л8р8","8л8р-","-л8с8","8л8с-","-л8т8","8л8т-","-л8у8","8л8у-","-л8ф8","8л8ф-","-л8х8","8л8х-","-л8ц8","8л8ц-","-л8ч8","8л8ч-","-л8ш8","8л8ш-","-л8щ8","8л8щ-","-л8ъ8","8л8ъ-","-л8ы8","8л8ы-","-л8ь8","8л8ь-","-л8э8","8л8э-","-л8ю8","8л8ю-","-л8я8","8л8я-","-м8а8","8м8а-","-м8б8","8м8б-","-м8в8","8м8в-","-м8г8","8м8г-","-м8д8","8м8д-","-м8е8","8м8е-","-м8ё8","8м8ё-","-м8ж8","8м8ж-","-м8з8","8м8з-","-м8и8","8м8и-","-м8й8","8м8й-","-м8к8","8м8к-","-м8л8","8м8л-","-м8м8","8м8м-","-м8н8","8м8н-","-м8о8","8м8о-","-м8п8","8м8п-","-м8р8","8м8р-","-м8с8","8м8с-","-м8т8","8м8т-","-м8у8","8м8у-","-м8ф8","8м8ф-","-м8х8","8м8х-","-м8ц8","8м8ц-","-м8ч8","8м8ч-","-м8ш8","8м8ш-","-м8щ8","8м8щ-","-м8ъ8","8м8ъ-","-м8ы8","8м8ы-","-м8ь8","8м8ь-","-м8э8","8м8э-","-м8ю8","8м8ю-","-м8я8","8м8я-","-н8а8","8н8а-","-н8б8","8н8б-","-н8в8","8н8в-","-н8г8","8н8г-","-н8д8","8н8д-","-н8е8","8н8е-","-н8ё8","8н8ё-","-н8ж8","8н8ж-","-н8з8","8н8з-","-н8и8","8н8и-","-н8й8","8н8й-","-н8к8","8н8к-","-н8л8","8н8л-","-н8м8","8н8м-","-н8н8","8н8н-","-н8о8","8н8о-","-н8п8","8н8п-","-н8р8","8н8р-","-н8с8","8н8с-","-н8т8","8н8т-","-н8у8","8н8у-","-н8ф8","8н8ф-","-н8х8","8н8х-","-н8ц8","8н8ц-","-н8ч8","8н8ч-","-н8ш8","8н8ш-","-н8щ8","8н8щ-","-н8ъ8","8н8ъ-","-н8ы8","8н8ы-","-н8ь8","8н8ь-","-н8э8","8н8э-","-н8ю8","8н8ю-","-н8я8","8н8я-","-о8а8","8о8а-","-о8б8","8о8б-","-о8в8","8о8в-","-о8г8","8о8г-","-о8д8","8о8д-","-о8е8","8о8е-","-о8ё8","8о8ё-","-о8ж8","8о8ж-","-о8з8","8о8з-","-о8и8","8о8и-","-о8й8","8о8й-","-о8к8","8о8к-","-о8л8","8о8л-","-о8м8","8о8м-","-о8н8","8о8н-","-о8о8","8о8о-","-о8п8","8о8п-","-о8р8","8о8р-","-о8с8","8о8с-","-о8т8","8о8т-","-о8у8","8о8у-","-о8ф8","8о8ф-","-о8х8","8о8х-","-о8ц8","8о8ц-","-о8ч8","8о8ч-","-о8ш8","8о8ш-","-о8щ8","8о8щ-","-о8ъ8","8о8ъ-","-о8ы8","8о8ы-","-о8ь8","8о8ь-","-о8э8","8о8э-","-о8ю8","8о8ю-","-о8я8","8о8я-","-п8а8","8п8а-","-п8б8","8п8б-","-п8в8","8п8в-","-п8г8","8п8г-","-п8д8","8п8д-","-п8е8","8п8е-","-п8ё8","8п8ё-","-п8ж8","8п8ж-","-п8з8","8п8з-","-п8и8","8п8и-","-п8й8","8п8й-","-п8к8","8п8к-","-п8л8","8п8л-","-п8м8","8п8м-","-п8н8","8п8н-","-п8о8","8п8о-","-п8п8","8п8п-","-п8р8","8п8р-","-п8с8","8п8с-","-п8т8","8п8т-","-п8у8","8п8у-","-п8ф8","8п8ф-","-п8х8","8п8х-","-п8ц8","8п8ц-","-п8ч8","8п8ч-","-п8ш8","8п8ш-","-п8щ8","8п8щ-","-п8ъ8","8п8ъ-","-п8ы8","8п8ы-","-п8ь8","8п8ь-","-п8э8","8п8э-","-п8ю8","8п8ю-","-п8я8","8п8я-","-р8а8","8р8а-","-р8б8","8р8б-","-р8в8","8р8в-","-р8г8","8р8г-","-р8д8","8р8д-","-р8е8","8р8е-","-р8ё8","8р8ё-","-р8ж8","8р8ж-","-р8з8","8р8з-","-р8и8","8р8и-","-р8й8","8р8й-","-р8к8","8р8к-","-р8л8","8р8л-","-р8м8","8р8м-","-р8н8","8р8н-","-р8о8","8р8о-","-р8п8","8р8п-","-р8р8","8р8р-","-р8с8","8р8с-","-р8т8","8р8т-","-р8у8","8р8у-","-р8ф8","8р8ф-","-р8х8","8р8х-","-р8ц8","8р8ц-","-р8ч8","8р8ч-","-р8ш8","8р8ш-","-р8щ8","8р8щ-","-р8ъ8","8р8ъ-","-р8ы8","8р8ы-","-р8ь8","8р8ь-","-р8э8","8р8э-","-р8ю8","8р8ю-","-р8я8","8р8я-","-с8а8","8с8а-","-с8б8","8с8б-","-с8в8","8с8в-","-с8г8","8с8г-","-с8д8","8с8д-","-с8е8","8с8е-","-с8ё8","8с8ё-","-с8ж8","8с8ж-","-с8з8","8с8з-","-с8и8","8с8и-","-с8й8","8с8й-","-с8к8","8с8к-","-с8л8","8с8л-","-с8м8","8с8м-","-с8н8","8с8н-","-с8о8","8с8о-","-с8п8","8с8п-","-с8р8","8с8р-","-с8с8","8с8с-","-с8т8","8с8т-","-с8у8","8с8у-","-с8ф8","8с8ф-","-с8х8","8с8х-","-с8ц8","8с8ц-","-с8ч8","8с8ч-","-с8ш8","8с8ш-","-с8щ8","8с8щ-","-с8ъ8","8с8ъ-","-с8ы8","8с8ы-","-с8ь8","8с8ь-","-с8э8","8с8э-","-с8ю8","8с8ю-","-с8я8","8с8я-","-т8а8","8т8а-","-т8б8","8т8б-","-т8в8","8т8в-","-т8г8","8т8г-","-т8д8","8т8д-","-т8е8","8т8е-","-т8ё8","8т8ё-","-т8ж8","8т8ж-","-т8з8","8т8з-","-т8и8","8т8и-","-т8й8","8т8й-","-т8к8","8т8к-","-т8л8","8т8л-","-т8м8","8т8м-","-т8н8","8т8н-","-т8о8","8т8о-","-т8п8","8т8п-","-т8р8","8т8р-","-т8с8","8т8с-","-т8т8","8т8т-","-т8у8","8т8у-","-т8ф8","8т8ф-","-т8х8","8т8х-","-т8ц8","8т8ц-","-т8ч8","8т8ч-","-т8ш8","8т8ш-","-т8щ8","8т8щ-","-т8ъ8","8т8ъ-","-т8ы8","8т8ы-","-т8ь8","8т8ь-","-т8э8","8т8э-","-т8ю8","8т8ю-","-т8я8","8т8я-","-у8а8","8у8а-","-у8б8","8у8б-","-у8в8","8у8в-","-у8г8","8у8г-","-у8д8","8у8д-","-у8е8","8у8е-","-у8ё8","8у8ё-","-у8ж8","8у8ж-","-у8з8","8у8з-","-у8и8","8у8и-","-у8й8","8у8й-","-у8к8","8у8к-","-у8л8","8у8л-","-у8м8","8у8м-","-у8н8","8у8н-","-у8о8","8у8о-","-у8п8","8у8п-","-у8р8","8у8р-","-у8с8","8у8с-","-у8т8","8у8т-","-у8у8","8у8у-","-у8ф8","8у8ф-","-у8х8","8у8х-","-у8ц8","8у8ц-","-у8ч8","8у8ч-","-у8ш8","8у8ш-","-у8щ8","8у8щ-","-у8ъ8","8у8ъ-","-у8ы8","8у8ы-","-у8ь8","8у8ь-","-у8э8","8у8э-","-у8ю8","8у8ю-","-у8я8","8у8я-","-ф8а8","8ф8а-","-ф8б8","8ф8б-","-ф8в8","8ф8в-","-ф8г8","8ф8г-","-ф8д8","8ф8д-","-ф8е8","8ф8е-","-ф8ё8","8ф8ё-","-ф8ж8","8ф8ж-","-ф8з8","8ф8з-","-ф8и8","8ф8и-","-ф8й8","8ф8й-","-ф8к8","8ф8к-","-ф8л8","8ф8л-","-ф8м8","8ф8м-","-ф8н8","8ф8н-","-ф8о8","8ф8о-","-ф8п8","8ф8п-","-ф8р8","8ф8р-","-ф8с8","8ф8с-","-ф8т8","8ф8т-","-ф8у8","8ф8у-","-ф8ф8","8ф8ф-","-ф8х8","8ф8х-","-ф8ц8","8ф8ц-","-ф8ч8","8ф8ч-","-ф8ш8","8ф8ш-","-ф8щ8","8ф8щ-","-ф8ъ8","8ф8ъ-","-ф8ы8","8ф8ы-","-ф8ь8","8ф8ь-","-ф8э8","8ф8э-","-ф8ю8","8ф8ю-","-ф8я8","8ф8я-","-х8а8","8х8а-","-х8б8","8х8б-","-х8в8","8х8в-","-х8г8","8х8г-","-х8д8","8х8д-","-х8е8","8х8е-","-х8ё8","8х8ё-","-х8ж8","8х8ж-","-х8з8","8х8з-","-х8и8","8х8и-","-х8й8","8х8й-","-х8к8","8х8к-","-х8л8","8х8л-","-х8м8","8х8м-","-х8н8","8х8н-","-х8о8","8х8о-","-х8п8","8х8п-","-х8р8","8х8р-","-х8с8","8х8с-","-х8т8","8х8т-","-х8у8","8х8у-","-х8ф8","8х8ф-","-х8х8","8х8х-","-х8ц8","8х8ц-","-х8ч8","8х8ч-","-х8ш8","8х8ш-","-х8щ8","8х8щ-","-х8ъ8","8х8ъ-","-х8ы8","8х8ы-","-х8ь8","8х8ь-","-х8э8","8х8э-","-х8ю8","8х8ю-","-х8я8","8х8я-","-ц8а8","8ц8а-","-ц8б8","8ц8б-","-ц8в8","8ц8в-","-ц8г8","8ц8г-","-ц8д8","8ц8д-","-ц8е8","8ц8е-","-ц8ё8","8ц8ё-","-ц8ж8","8ц8ж-","-ц8з8","8ц8з-","-ц8и8","8ц8и-","-ц8й8","8ц8й-","-ц8к8","8ц8к-","-ц8л8","8ц8л-","-ц8м8","8ц8м-","-ц8н8","8ц8н-","-ц8о8","8ц8о-","-ц8п8","8ц8п-","-ц8р8","8ц8р-","-ц8с8","8ц8с-","-ц8т8","8ц8т-","-ц8у8","8ц8у-","-ц8ф8","8ц8ф-","-ц8х8","8ц8х-","-ц8ц8","8ц8ц-","-ц8ч8","8ц8ч-","-ц8ш8","8ц8ш-","-ц8щ8","8ц8щ-","-ц8ъ8","8ц8ъ-","-ц8ы8","8ц8ы-","-ц8ь8","8ц8ь-","-ц8э8","8ц8э-","-ц8ю8","8ц8ю-","-ц8я8","8ц8я-","-ч8а8","8ч8а-","-ч8б8","8ч8б-","-ч8в8","8ч8в-","-ч8г8","8ч8г-","-ч8д8","8ч8д-","-ч8е8","8ч8е-","-ч8ё8","8ч8ё-","-ч8ж8","8ч8ж-","-ч8з8","8ч8з-","-ч8и8","8ч8и-","-ч8й8","8ч8й-","-ч8к8","8ч8к-","-ч8л8","8ч8л-","-ч8м8","8ч8м-","-ч8н8","8ч8н-","-ч8о8","8ч8о-","-ч8п8","8ч8п-","-ч8р8","8ч8р-","-ч8с8","8ч8с-","-ч8т8","8ч8т-","-ч8у8","8ч8у-","-ч8ф8","8ч8ф-","-ч8х8","8ч8х-","-ч8ц8","8ч8ц-","-ч8ч8","8ч8ч-","-ч8ш8","8ч8ш-","-ч8щ8","8ч8щ-","-ч8ъ8","8ч8ъ-","-ч8ы8","8ч8ы-","-ч8ь8","8ч8ь-","-ч8э8","8ч8э-","-ч8ю8","8ч8ю-","-ч8я8","8ч8я-","-ш8а8","8ш8а-","-ш8б8","8ш8б-","-ш8в8","8ш8в-","-ш8г8","8ш8г-","-ш8д8","8ш8д-","-ш8е8","8ш8е-","-ш8ё8","8ш8ё-","-ш8ж8","8ш8ж-","-ш8з8","8ш8з-","-ш8и8","8ш8и-","-ш8й8","8ш8й-","-ш8к8","8ш8к-","-ш8л8","8ш8л-","-ш8м8","8ш8м-","-ш8н8","8ш8н-","-ш8о8","8ш8о-","-ш8п8","8ш8п-","-ш8р8","8ш8р-","-ш8с8","8ш8с-","-ш8т8","8ш8т-","-ш8у8","8ш8у-","-ш8ф8","8ш8ф-","-ш8х8","8ш8х-","-ш8ц8","8ш8ц-","-ш8ч8","8ш8ч-","-ш8ш8","8ш8ш-","-ш8щ8","8ш8щ-","-ш8ъ8","8ш8ъ-","-ш8ы8","8ш8ы-","-ш8ь8","8ш8ь-","-ш8э8","8ш8э-","-ш8ю8","8ш8ю-","-ш8я8","8ш8я-","-щ8а8","8щ8а-","-щ8б8","8щ8б-","-щ8в8","8щ8в-","-щ8г8","8щ8г-","-щ8д8","8щ8д-","-щ8е8","8щ8е-","-щ8ё8","8щ8ё-","-щ8ж8","8щ8ж-","-щ8з8","8щ8з-","-щ8и8","8щ8и-","-щ8й8","8щ8й-","-щ8к8","8щ8к-","-щ8л8","8щ8л-","-щ8м8","8щ8м-","-щ8н8","8щ8н-","-щ8о8","8щ8о-","-щ8п8","8щ8п-","-щ8р8","8щ8р-","-щ8с8","8щ8с-","-щ8т8","8щ8т-","-щ8у8","8щ8у-","-щ8ф8","8щ8ф-","-щ8х8","8щ8х-","-щ8ц8","8щ8ц-","-щ8ч8","8щ8ч-","-щ8ш8","8щ8ш-","-щ8щ8","8щ8щ-","-щ8ъ8","8щ8ъ-","-щ8ы8","8щ8ы-","-щ8ь8","8щ8ь-","-щ8э8","8щ8э-","-щ8ю8","8щ8ю-","-щ8я8","8щ8я-","-ъ8а8","8ъ8а-","-ъ8б8","8ъ8б-","-ъ8в8","8ъ8в-","-ъ8г8","8ъ8г-","-ъ8д8","8ъ8д-","-ъ8е8","8ъ8е-","-ъ8ё8","8ъ8ё-","-ъ8ж8","8ъ8ж-","-ъ8з8","8ъ8з-","-ъ8и8","8ъ8и-","-ъ8й8","8ъ8й-","-ъ8к8","8ъ8к-","-ъ8л8","8ъ8л-","-ъ8м8","8ъ8м-","-ъ8н8","8ъ8н-","-ъ8о8","8ъ8о-","-ъ8п8","8ъ8п-","-ъ8р8","8ъ8р-","-ъ8с8","8ъ8с-","-ъ8т8","8ъ8т-","-ъ8у8","8ъ8у-","-ъ8ф8","8ъ8ф-","-ъ8х8","8ъ8х-","-ъ8ц8","8ъ8ц-","-ъ8ч8","8ъ8ч-","-ъ8ш8","8ъ8ш-","-ъ8щ8","8ъ8щ-","-ъ8ъ8","8ъ8ъ-","-ъ8ы8","8ъ8ы-","-ъ8ь8","8ъ8ь-","-ъ8э8","8ъ8э-","-ъ8ю8","8ъ8ю-","-ъ8я8","8ъ8я-","-ы8а8","8ы8а-","-ы8б8","8ы8б-","-ы8в8","8ы8в-","-ы8г8","8ы8г-","-ы8д8","8ы8д-","-ы8е8","8ы8е-","-ы8ё8","8ы8ё-","-ы8ж8","8ы8ж-","-ы8з8","8ы8з-","-ы8и8","8ы8и-","-ы8й8","8ы8й-","-ы8к8","8ы8к-","-ы8л8","8ы8л-","-ы8м8","8ы8м-","-ы8н8","8ы8н-","-ы8о8","8ы8о-","-ы8п8","8ы8п-","-ы8р8","8ы8р-","-ы8с8","8ы8с-","-ы8т8","8ы8т-","-ы8у8","8ы8у-","-ы8ф8","8ы8ф-","-ы8х8","8ы8х-","-ы8ц8","8ы8ц-","-ы8ч8","8ы8ч-","-ы8ш8","8ы8ш-","-ы8щ8","8ы8щ-","-ы8ъ8","8ы8ъ-","-ы8ы8","8ы8ы-","-ы8ь8","8ы8ь-","-ы8э8","8ы8э-","-ы8ю8","8ы8ю-","-ы8я8","8ы8я-","-ь8а8","8ь8а-","-ь8б8","8ь8б-","-ь8в8","8ь8в-","-ь8г8","8ь8г-","-ь8д8","8ь8д-","-ь8е8","8ь8е-","-ь8ё8","8ь8ё-","-ь8ж8","8ь8ж-","-ь8з8","8ь8з-","-ь8и8","8ь8и-","-ь8й8","8ь8й-","-ь8к8","8ь8к-","-ь8л8","8ь8л-","-ь8м8","8ь8м-","-ь8н8","8ь8н-","-ь8о8","8ь8о-","-ь8п8","8ь8п-","-ь8р8","8ь8р-","-ь8с8","8ь8с-","-ь8т8","8ь8т-","-ь8у8","8ь8у-","-ь8ф8","8ь8ф-","-ь8х8","8ь8х-","-ь8ц8","8ь8ц-","-ь8ч8","8ь8ч-","-ь8ш8","8ь8ш-","-ь8щ8","8ь8щ-","-ь8ъ8","8ь8ъ-","-ь8ы8","8ь8ы-","-ь8ь8","8ь8ь-","-ь8э8","8ь8э-","-ь8ю8","8ь8ю-","-ь8я8","8ь8я-","-э8а8","8э8а-","-э8б8","8э8б-","-э8в8","8э8в-","-э8г8","8э8г-","-э8д8","8э8д-","-э8е8","8э8е-","-э8ё8","8э8ё-","-э8ж8","8э8ж-","-э8з8","8э8з-","-э8и8","8э8и-","-э8й8","8э8й-","-э8к8","8э8к-","-э8л8","8э8л-","-э8м8","8э8м-","-э8н8","8э8н-","-э8о8","8э8о-","-э8п8","8э8п-","-э8р8","8э8р-","-э8с8","8э8с-","-э8т8","8э8т-","-э8у8","8э8у-","-э8ф8","8э8ф-","-э8х8","8э8х-","-э8ц8","8э8ц-","-э8ч8","8э8ч-","-э8ш8","8э8ш-","-э8щ8","8э8щ-","-э8ъ8","8э8ъ-","-э8ы8","8э8ы-","-э8ь8","8э8ь-","-э8э8","8э8э-","-э8ю8","8э8ю-","-э8я8","8э8я-","-ю8а8","8ю8а-","-ю8б8","8ю8б-","-ю8в8","8ю8в-","-ю8г8","8ю8г-","-ю8д8","8ю8д-","-ю8е8","8ю8е-","-ю8ё8","8ю8ё-","-ю8ж8","8ю8ж-","-ю8з8","8ю8з-","-ю8и8","8ю8и-","-ю8й8","8ю8й-","-ю8к8","8ю8к-","-ю8л8","8ю8л-","-ю8м8","8ю8м-","-ю8н8","8ю8н-","-ю8о8","8ю8о-","-ю8п8","8ю8п-","-ю8р8","8ю8р-","-ю8с8","8ю8с-","-ю8т8","8ю8т-","-ю8у8","8ю8у-","-ю8ф8","8ю8ф-","-ю8х8","8ю8х-","-ю8ц8","8ю8ц-","-ю8ч8","8ю8ч-","-ю8ш8","8ю8ш-","-ю8щ8","8ю8щ-","-ю8ъ8","8ю8ъ-","-ю8ы8","8ю8ы-","-ю8ь8","8ю8ь-","-ю8э8","8ю8э-","-ю8ю8","8ю8ю-","-ю8я8","8ю8я-","-я8а8","8я8а-","-я8б8","8я8б-","-я8в8","8я8в-","-я8г8","8я8г-","-я8д8","8я8д-","-я8е8","8я8е-","-я8ё8","8я8ё-","-я8ж8","8я8ж-","-я8з8","8я8з-","-я8и8","8я8и-","-я8й8","8я8й-","-я8к8","8я8к-","-я8л8","8я8л-","-я8м8","8я8м-","-я8н8","8я8н-","-я8о8","8я8о-","-я8п8","8я8п-","-я8р8","8я8р-","-я8с8","8я8с-","-я8т8","8я8т-","-я8у8","8я8у-","-я8ф8","8я8ф-","-я8х8","8я8х-","-я8ц8","8я8ц-","-я8ч8","8я8ч-","-я8ш8","8я8ш-","-я8щ8","8я8щ-","-я8ъ8","8я8ъ-","-я8ы8","8я8ы-","-я8ь8","8я8ь-","-я8э8","8я8э-","-я8ю8","8я8ю-","-я8я8","8я8я-",""],exceptions:["ас-бест","бездн","биз-нес-мен","буй-нак-ске","вбли-зи","взба-ла-муть-ся","вздрем-нешь","во-до-сли-вом","волж-ске","воп-лем","вопль","вост-ра","во-ткать","во-ткем","во-ткешь","во-тку","во-ткут","впол-обо-ро-та","впол-уха","все-во-лож-ске","вцспс","га-рем-но-го","го-ло-дра-нец","грэс","дву-зу-бец","днепр","добре-ем","до-бре-ем-ся","добре-ет","добре-е-те","до-бре-е-тесь","до-бре-ет-ся","добре-ешь","до-бре-ешь-ся","добрею","до-бре-юсь","добре-ют","до-бре-ют-ся","до-бре-сти","до-бро-дят","до-брось","до-брось-те","до-бро-сят","до-бро-шу","домну","доп-пель","драх-му","дрейф-лю","дрейфь-те","еди-но-жды","зав-сек-то-ром","за-мру","за-члись","из-древ-ле","изо-тру","ин-ког-ни-то","искр","ка-за-шек","казнь","кольд-кре-мом","корн-па-пир","ксендз","лик-бе-зом","ло-шадь-ми","людь-ми","лю-э-сом","ма-зу-те","ме-ти-лам","ме-ти-ла-ми","мно-га-жды","морщь-те","на-бе-крень","навз-ничь","на-вскид-ку","на-встре-чу","нагл","на-изусть","на-ис-ко-сок","наи-ме-нее","на-ис-кось","на-обо-рот","на-от-рез","на-супь-ся","на-угад","на-уголь-ник","не-ост-ра","нес-лась","нес-лись","нет-то","не-уду","обидь-ся","обо-шлось","об-ра-сти","од-на-жды","ослаб-ла","ото-мстят","ото-мщу","ото-тру","отру","отрусь","паб-ли-си-ти","па-на-ме","па-на-мец","па-ра-так-сис","пе-ре-вру","пе-ре-ме-жать","пе-ре-ме-жать-ся","пе-ре-шла","пис-чая","по-все-дне-вен","по-гре-мок","по-до-тру","по-ис-ти-не","по-лу-то-ра-ста","по-лу-явью","по-млад-ше","помни","по-мнись","помни-те","по-мни-тесь","по-мно-гу","по-мру","пол-вто-ро-го","пол-шка-фа","по-на-доб-люсь","по-трафь-те","преж-де","прид-ти","при-шла","при-шлось","про-тру","про-хлад-ца","пско-ва","пыл-че","раз-орем-ся","раз-оре-тесь","раз-орет-ся","раз-орешь-ся","разо-тру","ра-зу-мом","резв-люсь","рсфср","сан-узел","сдрейф-лю","се-го-дня","сме-жат","со-блю-сти","со-лжешь","сост-рим","сост-ришь","сост-рю","сост-рят","со-ткать","со-ткем","со-ткешь","сотку","со-ткут","срос-лась","срос-лись","стрем-глав","так-же","тве-ре-зо-го","те-ле-ате-лье","тер-но-сли-вом","троп-лю","тьфу","узу-фрукт","умнем","умнет","умнете","умну","умру","услышь-те","ушла","фо-то-пле-нок","ца-ре-дво-рец","че-рес-чур","чер-но-сли-вом","чресл","чуж-дость","шесть-де-сят","юсом","ядо-зу-бе","ярем-но-го",""]}}));
\ No newline at end of file diff --git a/dist/app.min.js b/dist/app.min.js index e05dc3e..e5b086b 100644 --- a/dist/app.min.js +++ b/dist/app.min.js @@ -1 +1 @@ -"use strict";$.urlParam=function(t){try{const e=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href);return decodeURIComponent(e[1].replace(/\+/g," "))||0}catch(t){return 0}};const Cookie={set:function(t,e,o){const n=new Date;n.setTime(n.getTime()+1e3*o);const a="expires="+n.toUTCString();document.cookie=t+"="+encodeURIComponent(e)+"; "+a},get:function(t){t+="=";const e=document.cookie.split(";");for(let o=0;o<e.length;o++){let n=e[o];for(;" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return""},delete:function(t){document.cookie=t+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT"}},App={_dl_progress_timeout:!1,index_mode:"",last_mtime:-1,cached_urls:[],version:"UNKNOWN",csrf_token:"",init:function(){let t=0;this.csrf_token=Cookie.get("epube_csrf_token"),console.log("setting prefilter for token",this.csrf_token),$.ajaxPrefilter((function(t,e,o){if("post"!==e.type||"post"!==t.type)return;const n=typeof e.data;"object"==n?t.data=$.param($.extend(e.data,{csrf_token:App.csrf_token})):"string"==n&&(t.data=e.data+"&csrf_token="+encodeURIComponent(App.srf_token)),console.log(">>>",t)})),"undefined"!=typeof EpubeApp&&($(".navbar").hide(),$(".epube-app-filler").show(),$(".separate-search").show(),"favorites"==$.urlParam("mode")?EpubeApp.setPage("PAGE_FAVORITES"):EpubeApp.setPage("PAGE_LIBRARY")),App.initNightMode(),"serviceWorker"in navigator?(navigator.serviceWorker.addEventListener("message",(function(e){"refresh-started"==e.data&&(console.log("cache refresh started"),t=0,$(".dl-progress").fadeIn().text("Loading, please wait...")),e.data&&0==e.data.indexOf("refreshed:")&&(++t,$(".dl-progress").fadeIn().text("Updated "+t+" files...")),"refresh-finished"==e.data&&(localforage.setItem("epube.cache-timestamp",App.last_mtime),localforage.setItem("epube.cache-version",App.version),window.location.reload())})),App.showCovers(),App.Offline.markBooks(),App.refreshCache()):$(".container-main").addClass("alert alert-danger").html("Service worker support missing in browser (are you using plain HTTP?).")},logout:function(){$.post("backend.php",{op:"logout"}).then(()=>{window.location.reload()})},showSummary:function(t){const e=t.getAttribute("data-book-id");return $.post("backend.php",{op:"getinfo",id:e},(function(t){const e=t.comment?t.comment:"No description available";$("#summary-modal .modal-title").html(t.title),$("#summary-modal .book-summary").html(e),$("#summary-modal").modal()})),!1},showCovers:function(){$("img[data-book-id]").each((t,e)=>{if((e=$(e)).attr("data-cover-link")){const t=$("<img>").on("load",(function(){e.css("background-image","url("+e.attr("data-cover-link")+")").fadeIn(),t.attr("src",null)})).attr("src",e.attr("data-cover-link"))}})},toggleFavorite:function(t){const e=t.getAttribute("data-book-id");return("0"==t.getAttribute("data-is-fav")||confirm("Remove favorite?"))&&$.post("backend.php",{op:"togglefav",id:e},(function(o){if(o){let n="[Error]";0==o.status?n="Add to favorites":1==o.status&&(n="Remove from favorites"),$(t).html(n).attr("data-is-fav",o.status),"favorites"==App.index_mode&&0==o.status&&$("#cell-"+e).remove()}})),!1},refreshCache:function(t){"serviceWorker"in navigator?localforage.getItem("epube.cache-timestamp").then((function(e){console.log("stamp",e,"last mtime",App.last_mtime,"version",App.version),(t||e!=App.last_mtime)&&(console.log("asking worker to refresh cache"),navigator.serviceWorker.controller?navigator.serviceWorker.controller.postMessage({msg:"refresh-cache",urls:App.cached_urls}):localforage.getItem("epube.initial-load-done").then((function(t){console.log("initial load done",t),t?$(".dl-progress").show().addClass("alert-danger").html("Could not communicate with service worker. Try reloading the page."):localforage.setItem("epube.initial-load-done",!0).then((function(){$(".dl-progress").show().addClass("alert-info").html("Page will reload to activate service worker..."),window.setTimeout((function(){window.location.reload()}),3e3)}))})))})):$(".dl-progress").show().addClass("alert-danger").html("Could not communicate with service worker. Try reloading the page.")},isOnline:function(){return"undefined"!=typeof EpubeApp&&void 0!==EpubeApp.isOnline?EpubeApp.isOnline():navigator.onLine},appCheckOffline:function(){EpubeApp.setOffline(!App.isOnline)},initNightMode:function(){if("undefined"==typeof EpubeApp){if(window.matchMedia){const t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",()=>{App.applyNightMode(t.matches)}),App.applyNightMode(t.matches)}}else App.applyNightMode(EpubeApp.isNightMode())},applyNightMode:function(t){console.log("night mode changed to",t),$("#theme_css").attr("href","lib/bootstrap/v3/css/"+(t?"theme-dark.min.css":"bootstrap-theme.min.css"))},Offline:{init:function(){"undefined"!=typeof EpubeApp&&($(".navbar").hide(),$(".epube-app-filler").show(),EpubeApp.setPage("PAGE_OFFLINE")),App.initNightMode();const t=$.urlParam("query");t&&$(".search_query").val(t),App.Offline.populateList()},get:function(t,e){console.log("offline cache: "+t),$.post("backend.php",{op:"getinfo",id:t},(function(o){if(o){const n="epube-book."+t;localforage.setItem(n,o).then((function(o){console.log(n+" got data");const a=[];a.push(fetch("backend.php?op=download&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got book"),e(),localforage.setItem(n+".book",t.blob()))}))),a.push(fetch("backend.php?op=getpagination&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got pagination"),t.text().then((function(t){localforage.setItem(n+".locations",JSON.parse(t))})))}))),a.push(fetch("backend.php?op=getlastread&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got lastread"),t.text().then((function(t){localforage.setItem(n+".lastread",JSON.parse(t))})))}))),o.has_cover&&a.push(fetch("backend.php?op=cover&id="+t,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got cover"),localforage.setItem(n+".cover",t.blob()))}))),Promise.all(a).then((function(){$(".dl-progress").show().html("Finished downloading <b>"+o.title+"</b>"),window.clearTimeout(App._dl_progress_timeout),App._dl_progress_timeout=window.setTimeout((function(){$(".dl-progress").fadeOut()}),5e3)}))}))}}))},getAll:function(){confirm("Download all books on this page?")&&$(".row > div").each((function(t,e){const o=$(e).attr("id").replace("cell-",""),n=$(e).find(".offline_dropitem")[0];if(o){const t="epube-book."+o;localforage.getItem(t).then((function(t){t||App.Offline.get(o,(function(){App.Offline.mark(n)}))}))}}))},markBooks:function(){const t=$(".offline_dropitem");$.each(t,(function(t,e){App.Offline.mark(e)}))},mark:function(t){const e=t.getAttribute("data-book-id"),o="epube-book."+e;localforage.getItem(o).then((function(o){o?(t.onclick=function(){return App.Offline.remove(e,(function(){App.Offline.mark(t)})),!1},t.innerHTML="Remove offline data"):(t.onclick=function(){return App.Offline.get(e,(function(){App.Offline.mark(t)})),!1},t.innerHTML="Make available offline")}))},removeFromList:function(t){const e=t.getAttribute("data-book-id");return App.Offline.remove(e,(function(){$("#cell-"+e).remove()}))},remove:function(t,e){if(confirm("Remove download?")){const o="epube-book."+t,n=[];console.log("offline remove: "+t),localforage.iterate((function(t,e){e.match(o)&&n.push(localforage.removeItem(e))})),Promise.all(n).then((function(){window.setTimeout((function(){e()}),500)}))}},search:function(){const t=$(".search_query").val();return localforage.setItem("epube.search-query",t).then((function(){App.Offline.populateList()})),!1},removeAll:function(){if(confirm("Remove all downloaded books?")){const t=[];localforage.iterate((function(e,o){o.match("epube-book")&&t.push(localforage.removeItem(o))})),Promise.all(t).then((function(){window.setTimeout((function(){App.Offline.populateList()}),500)}))}},showSummary:function(t){const e=t.getAttribute("data-book-id");return localforage.getItem("epube-book."+e).then((function(t){const e=t.comment?t.comment:"No description available";$("#summary-modal .modal-title").html(t.title),$("#summary-modal .book-summary").html(e),$("#summary-modal").modal()})),!1},populateList:function(){let t=$.urlParam("query");t&&(t=t.toLowerCase());const e=$("#books_container");e.html(""),localforage.iterate((function(o,n){n.match(/epube-book\.\d{1,}$/)&&Promise.all([localforage.getItem(n),localforage.getItem(n+".cover"),localforage.getItem(n+".lastread"),localforage.getItem(n+".book")]).then((function(o){if(o[0]&&o[3]){const n=o[0];if(t){if(!(n.series_name&&n.series_name.toLowerCase().match(t)||n.title&&n.title.toLowerCase().match(t)||n.author_sort&&n.author_sort.toLowerCase().match(t)))return}let a=!1;o&&o[1]&&(a=URL.createObjectURL(o[1]));let i=!1,r=!1;const l=o[2];l&&(i=l.page>0,r=l.total>0&&l.total-l.page<5);const s=r?"read":"",c=i?"in_progress":"",d=n.series_name?`<div><a class="series_link" href="#">${n.series_name+" ["+n.series_index+"]"}</a></div>`:"",f=$(`<div class="col-xxs-6 col-xs-4 col-sm-3 col-md-2" id="cell-${n.id}">\n\t\t\t\t\t\t\t<a class="thumbnail ${s}" href="read.html?id=${n.epub_id}&b=${n.id}">\n\t\t\t\t\t\t\t\t<img style="display : none">\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<div class="caption">\n\t\t\t\t\t\t\t\t<div><a class="${c}" href="read.html?id=${n.epub_id}&b=${n.id}">${n.title}</a></div>\n\t\t\t\t\t\t\t\t<div><a class="author_link" href="#">${n.author_sort}</a></div>\n\t\t\t\t\t\t\t\t${d}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="dropdown" style="white-space : nowrap">\n\t\t\t\t\t\t\t\t<a href="#" data-toggle="dropdown" role="button">More...<span class="caret"></span></a>\n\t\t\t\t\t\t\t\t<ul class="dropdown-menu">\n\t\t\t\t\t\t\t\t\t<li><a href="#" data-book-id="${n.id}" onclick="return App.Offline.showSummary(this)">Summary</a></li>\n\t\t\t\t\t\t\t\t\t<li><a href="#" data-book-id="${n.id}" onclick="App.Offline.removeFromList(this)">Remove offline data</a></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`);a?f.find("img").css("background-image","url("+a+")").fadeIn():f.fadeIn(),f.find(".series_link").attr("title",n.series_name+" ["+n.series_index+"]").attr("href","offline.html?query="+encodeURIComponent(n.series_name)),f.find(".author_link").attr("title",n.author_sort).attr("href","offline.html?query="+encodeURIComponent(n.author_sort)),e.append(f)}}))}))}}},DEFAULT_FONT_SIZE=16,DEFAULT_FONT_FAMILY="Arial",DEFAULT_LINE_HEIGHT=140,MIN_LENGTH_TO_JUSTIFY=32,LOCATION_DIVISOR=10,PAGE_RESET_PROGRESS=-1,CACHE_PREFIX="epube",CACHE_NAME="epube-v3";Promise.allSettled=Promise.allSettled||(t=>Promise.all(t.map(t=>t.then(t=>({status:"fulfilled",value:t})).catch(t=>({status:"rejected",reason:t})))));const Reader={csrf_token:"",last_stored_cfi:"",prevent_lastread_update:!1,hyphenate:{},init:function(){this.csrf_token=Cookie.get("epube_csrf_token"),console.log("setting prefilter for token",this.csrf_token),$.ajaxPrefilter((function(t,e){if("post"!==e.type||"post"!==t.type)return;const o=typeof e.data;"object"==o?t.data=$.param($.extend(e.data,{csrf_token:Reader.csrf_token})):"string"==o&&(t.data=e.data+"&csrf_token="+encodeURIComponent(Reader.srf_token)),console.log(">>>",t)})),$(document).on("keyup",(function(t){Reader.hotkeyHandler(t)})),$("#left").on("mouseup",(function(){Reader.Page.prev()})),$("#right").on("mouseup",(function(){Reader.Page.next()})),Reader.Loader.init()},onOfflineModeChanged:function(t){if(console.log("onOfflineModeChanged",t),!t&&window.book){const t=window.book;console.log("we're online, storing lastread");const e=t.rendition.currentLocation().start.cfi,o=parseInt(100*t.locations.percentageFromCfi(e));$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:o,cfi:e,timestamp:(new Date).getTime()},(function(){})).fail((function(t){t&&401==t.status&&(window.location="index.php")}))}},initSecondStage:function(){return"undefined"!=typeof EpubeApp?EpubeApp.setPage("PAGE_READER"):($(window).on("online",(function(){Reader.onOfflineModeChanged(!1)})),$(window).on("offline",(function(){Reader.onOfflineModeChanged(!0)}))),Reader.applyTheme(),localforage.getItem(Reader.cacheId()).then((function(t){if(!t)return console.log("requesting bookinfo..."),new Promise((t,e)=>{const o=$.urlParam("b");$.post("backend.php",{op:"getinfo",id:o}).success((function(n){if(n)return n.has_cover&&fetch("backend.php?op=cover&id="+o,{credentials:"same-origin"}).then((function(t){200==t.status&&localforage.setItem(Reader.cacheId("cover"),t.blob())})),localforage.setItem(Reader.cacheId(),n).then((function(){console.log("bookinfo saved"),t()}));e(new Error("unable to load book info: blank"))})).error((function(t){$(".loading-message").html("Unable to load book info.<br/><small>"+t.status+"</small>"),e(new Error("unable to load book info: "+t.status))}))});console.log("bookinfo already stored")})).then((function(){console.log("trying to load book..."),localforage.getItem(Reader.cacheId("book")).then((function(e){if(e)return console.log("loading from local storage"),new Promise((function(o,n){const a=new FileReader;a.onload=function(){try{return t.open(this.result).then((function(){o()}))}catch(t){$(".loading-message").html("Unable to load book (local)."),console.log(t),n(new Error("Unable to load book (local):"+t))}},a.readAsArrayBuffer(e)}));if(console.log("loading from network"),App.isOnline()){const e="backend.php?op=download&id="+$.urlParam("id");return $(".loading-message").html("Downloading…"),fetch(e,{credentials:"same-origin"}).then((function(e){if(200==e.status)return e.blob().then((function(e){return new Promise((function(o,n){const a=new FileReader;a.onload=function(){t.open(this.result).then((function(){localforage.setItem(Reader.cacheId("book"),e).then((function(){o()}))})).catch(t=>{$(".loading-message").html("Unable to open book.<br/><small>"+t+"</small>"),n(new Error("Unable to open book: "+t))})},a.onerror=function(t){console.log("filereader error",t),$(".loading-message").html("Unable to open book.<br/><small>"+t+"</small>"),n(new Error("Unable to open book: "+t))},a.readAsArrayBuffer(e)}))})).catch(t=>{console.log("blob error",t),$(".loading-message").html("Unable to download book.<br/><small>"+t+"</small>")});$(".loading-message").html("Unable to download book: "+e.status+".")})).catch((function(t){console.warn(t),$(".loading").is(":visible")&&$(".loading-message").html("Unable to load book (remote).<br/><small>"+t+"</small>")}))}$(".loading-message").html("This book is not available offline.")}));const t=ePub();window.book=t;const e=t.renderTo("reader",{width:"100%",height:"100%",allowScriptedContent:!0,minSpreadWidth:961});function o(e){try{const o=t.spine.get(e).cfiBase,n=t.locations._locations.find((function(t){return-1!=t.indexOf(o)}));return parseInt(window.book.locations.locationFromCfi(n)/10)}catch(t){console.warn(t)}return""}localforage.getItem("epube.enable-hyphens").then((function(t){t&&(Reader.hyphenate.en=createHyphenator(hyphenationPatternsEnUs,{html:!0}),Reader.hyphenate.ru=createHyphenator(hyphenationPatternsRu,{html:!0})),Reader.applyStyles(!0),e.display().then((function(){console.log("book displayed")}))})),e.hooks.content.register((async function(e){e.on("linkClicked",(function(e){console.log("linkClicked",e),Reader.prevent_lastread_update=!0,-1==e.indexOf("://")&&($(".prev_location_btn").attr("data-location-cfi",t.rendition.currentLocation().start.cfi).show(),window.setTimeout((function(){Reader.showUI(!0)}),50))}));const o=window.location.href.match(/^.*\//)[0];"undefined"!=typeof EpubeApp?$(e.document.head).append($('<link type="text/css" rel="stylesheet" media="screen" href="/assets/android.css" />')):$(e.document.head).append($("<style type='text/css'>").text(Reader.generateFontsCss(o)));const n=["dist/app-libs.min.js","dist/reader_iframe.min.js"];for(let t=0;t<n.length;t++){const a=e.document.createElement("script");a.type="text/javascript",a.text=Reader.Loader._res_data[o+n[t]],e.document.head.appendChild(a)}$(e.document.head).append($("<style type='text/css'>").text(Reader.Loader._res_data[o+"dist/reader_iframe.min.css"]));const a=await localforage.getItem("epube.theme")||"default";$(e.document).find("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("theme-"+a)})),$("#settings-modal").on("shown.bs.modal",(async function(){const t=await localforage.getItem(Reader.cacheId("lastread"));t&&t.cfi&&$(".lastread_input").val(t.page+"%").attr("title","[local] "+t.cfi),navigator.onLine&&$.post("backend.php",{op:"getlastread",id:$.urlParam("id")},t=>{$(".lastread_input").val(t.page+"%").attr("title","[remote] "+t.cfi)}),$(".enable_hyphens_checkbox").attr("checked",await localforage.getItem("epube.enable-hyphens")).off("click").on("click",(function(t){localforage.setItem("epube.enable-hyphens",t.target.checked),confirm("Toggling hyphens requires page reload. Reload now?")&&window.location.reload()})),"undefined"!=typeof EpubeApp?$(".keep_ui_checkbox").parent().parent().hide():$(".keep_ui_checkbox").attr("checked",await localforage.getItem("epube.keep-ui-visible")).off("click").on("click",(function(t){localforage.setItem("epube.keep-ui-visible",t.target.checked)}));const e=await localforage.getItem("epube.enable-column-hacks");$(".enable_column_hacks_checkbox").attr("checked",e).off("click").on("click",(function(t){localforage.setItem("epube.enable-column-hacks",t.target.checked)}));const o=await localforage.getItem("epube.cache-timestamp"),n=await localforage.getItem("epube.cache-version");$(".last-mod-timestamp").html(`${n}\n\t\t\t\t\t— ${parseInt(o)?new Date(1e3*o).toLocaleString("en-GB"):"Unknown"}\n\t\t\t\t\t(${App.isOnline()?"<span class='text-success'>Online</span>":"<span class='text-danger'>Offline</span>"})\n\t\t\t\t\t`),$(".font_family").val(await localforage.getItem("epube.fontFamily")||"Arial"),$(".theme_name").val(await localforage.getItem("epube.theme"));const a=$(".font_size").html("");for(let t=10;t<=32;t++){const e=$("<option>").val(t).html(t+" px");a.append(e)}a.val(await localforage.getItem("epube.fontSize")||16);const i=$(".line_height").html("");for(let t=100;t<=220;t+=10){const e=$("<option>").val(t).html(t+"%");i.append(e)}i.val(await localforage.getItem("epube.lineHeight")||140)})),$("#dict-modal").on("shown.bs.modal",(function(){$(".dict_result").scrollTop(0)})),$(".dict_search_btn").on("click",(function(){$("#dict-modal").modal("hide"),window.open("https://duckduckgo.com/?q="+$(".dict_query").val())})),$(".wiki_search_btn").on("click",(function(){$(".dict_result").html("Loading, please wait..."),$.post("backend.php",{op:"wikisearch",query:$(".dict_query").val()}).then(t=>{try{console.log("wikisearch resp",t);let e="";$.each(t.query.pages,(t,o)=>{e+=o.extract}),$(".dict_result").html(e&&"undefined"!=e?e:"No definition found for "+$(".dict_query").val()+".")}catch(t){console.error(t),$(".dict_result").text("Error while processing data: "+t)}}).fail(t=>{console.error(t),$(".dict_result").text("Error while retrieving data.")})})),$("#toc-modal").on("shown.bs.modal",(function(){const e=t.navigation.toc,n=$(".toc_list");n.html(""),$.each(e,(function(e,a){try{const e=$("<a>").attr("href","#").html("<b class='pull-right'>"+o(a.href)+"</b>"+a.label).attr("data-href",a.href).click((function(){t.rendition.display(e.attr("data-href"))}));n.append($("<li>").append(e)),function e(n,a,i){if(3==i)return!1;if(n.subitems){const r=$("<ul class='toc_sublist list-unstyled'>");$.each(n.subitems,(function(n,a){const l=$("<a>").attr("href","#").html("<b class='pull-right'>"+o(a.href)+"</b>"+a.label).attr("data-href",a.href).click((function(){t.rendition.display(l.attr("data-href"))}));r.append($("<li>").append(l)),e(a,r,i+1)})),a.append(r)}}(a,n,0)}catch(t){console.warn(t)}})),n.children().length<=1&&(n.html(""),$.each(t.spine.items,(function(e,o){const a=$("<a>").attr("href","#").attr("title",o.url).html("Section "+(e+1)).attr("data-href",o.href).click((function(){t.rendition.display(a.attr("data-href"))}));n.append($("<li>").append(a))})))})),t.spine.hooks.content.register((function(t){$(t).find("p").filter((t,e)=>$(e).text().length>=32?e:null).css("text-align","justify"),$(t).find("html").attr("class",""),$(t).find("pre").css("white-space","pre-wrap"),$(t).find("a, p, span, em, i, strong, b, body, header, section, div, big, small, table, tr, td, ul, ol, li").attr("class","").css("font-family","inherit").css("font-size","inherit").css("line-height","inherit").css("color","").css("border","none ! important").css("background","").css("background-color","").attr("width","").attr("height",""),$(t).find("h1, h2, h3, h4, h5").attr("class","").css("font-family","inherit").css("color","").css("border","none ! important").css("background","").css("background-color",""),void 0!==Reader.hyphenate.en&&$(t).find("p, div").each((t,e)=>{(e=$(e)).html(Reader.hyphenate.en(e.html())),e.html(Reader.hyphenate.ru(e.html()))})})),t.ready.then((function(){return localforage.getItem(Reader.cacheId()).then(e=>{let o,n;if(e)o=e.title,n=e.author_sort;else{const e=t.package.metadata;o=e.title,n=e.creator}return document.title=o+" – "+n+" – The Epube",$(".title").text(o).attr("title",o+" – "+n),"undefined"!=typeof EpubeApp&&(EpubeApp.setTitle(o),EpubeApp.showActionBar(!1)),localforage.getItem(Reader.cacheId("locations")).then((function(e){if(console.log("stored pagination",null!=e),e&&"string"==typeof e[0])return Reader.Page._pagination_stored=1,t.locations.load(e);{console.log("requesting pagination...");const e="backend.php?op=getpagination&id="+encodeURIComponent($.urlParam("id"));return fetch(e,{credentials:"same-origin"}).then((function(e){return e.ok?e.json().then((function(e){return e&&"string"==typeof e[0]?(Reader.Page._pagination_stored=1,t.locations.load(e)):($(".loading-message").html("Preparing locations…"),t.locations.generate(100))})):($(".loading-message").html("Preparing locations…"),t.locations.generate(100))})).catch((function(){return $(".loading-message").html("Preparing locations…"),t.locations.generate(100)}))}}))})})).then((function(e){console.log("locations ready, stored=",Reader.Page._pagination_stored),e?(App.isOnline()&&!Reader.Page._pagination_stored&&$.post("backend.php",{op:"storepagination",id:$.urlParam("id"),payload:JSON.stringify(e),total:100}),localforage.getItem(Reader.cacheId("locations")).then((function(t){t||localforage.setItem(Reader.cacheId("locations"),e)})),$(".location").click((function(){const e=Math.floor(t.rendition.currentLocation().start.location/10),o=Math.floor(t.locations.length()/10),n=prompt("Jump to location [1-"+o+"]",e);n&&t.rendition.display(t.locations._locations[10*n])})),Reader.Page.openLastRead(),window.setTimeout((function(){Reader.Page.openLastRead(),$(".loading").hide()}),250)):$(".loading-message").html("Could not generate locations.")})),e.on("keyup",t=>{Reader.hotkeyHandler(t)}),e.on("rendered",(function(){$(".chapter").html($("<span>").addClass("glyphicon glyphicon-th-list")),setTimeout(()=>{Reader.Page._moved_next=0},150),Reader.applyTheme(),Reader.resizeSideColumns();try{const e=t.rendition.currentLocation();if(e.start){const o=t.canonical(e.start.href);let n=!1;$.each(Reader.flattenToc(t),(function(e,a){t.spine.get(a.href).canonical!=o||(n=a)})),n&&n.label&&$(".chapter").append(" "+n.label.trim()+" | "),Reader.generateTocBar(t,Reader.flattenToc(t))}}catch(t){console.warn(t)}})),e.on("relocated",(function(e){if(0==t.locations.length())return;localforage.getItem("epube.enable-column-hacks").then(t=>{t&&Reader.Page._moved_next>=20&&(console.log("forcing re-render because of column hacks"),window.book.rendition.onResized($("#reader").width()),Reader.Page._moved_next=0)});const o=e.start.cfi,n=parseInt(100*t.locations.percentageFromCfi(o));$("#cur_page").text(Math.floor(e.start.location/10)),$("#total_pages").text(Math.floor(t.locations.length()/10)),$("#page_pct").text(parseInt(100*t.locations.percentageFromCfi(o))+"%"),Reader.updateTocBarPosition(t,e);const a=e.start.displayed;if(a&&($("#chapter_cur_page").text(a.page),$("#chapter_total_pages").text(a.total),a.total>0&&$("#chapter_pct").text(parseInt(a.page/a.total*100)+"%")),Reader.last_stored_cfi!=o&&!Reader.prevent_lastread_update){const t=(new Date).getTime();console.log("storing lastread",n,o,t),localforage.setItem(Reader.cacheId("lastread"),{cfi:o,page:n,total:100,timestamp:t}),App.isOnline()&&(console.log("updating remote lastread",o),Reader.last_stored_cfi=o,$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:n,cfi:o,timestamp:t}).then(()=>{}).fail((function(t){t&&401==t.status&&(window.location="index.php")})))}Reader.prevent_lastread_update=!1}))}))},generateFontsCss:function(t){return`\n\t\t\t/** Calibri */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibriz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibrib.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibrii.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibri.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Cambria */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriaz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambria.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Caecilia */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caecilia.ttf"]});\n\t\t\t\tfont-weight : normal;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caeciliab.ttf"]});\n\t\t\t\tfont-weight : bold;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caeciliai.ttf"]});\n\t\t\t\tfont-style : italic;\n\t\t\t}\n\n\t\t\t/** Palatino */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palabi.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/pala.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Consolas */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolaz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consola.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** IBM Plex Mono */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-Bold.otf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-BoldItalic.otf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-TextItalic.otf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-Text.otf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\t\t\t`},flattenTocSubItems:function(t,e){let o=[];return 3!=e&&(t.subitems&&$.each(t.subitems,(function(t,n){n._nest=e,o.push(n),o=o.concat(Reader.flattenTocSubItems(n,e+1))})),o)},flattenToc:function(t){if(this._flattened_toc)return this._flattened_toc;{let e=[];return $.each(t.navigation.toc,(function(t,o){o._nest=0,e.push(o),e=e.concat(Reader.flattenTocSubItems(o,1))})),this._flattened_toc=e,e}},generateTocBar:function(t,e){$(".spacer").html(""),$.each(e,(function(e,o){try{const e=t.spine.get(o.href).cfiBase,n=t.locations._locations.find((function(t){return-1!=t.indexOf(e)}));if(n){const e=Math.round(100*t.locations.percentageFromCfi(n));$(".spacer").append($("<div class='toc-bar-entry'>").attr("data-nest-level",o._nest).css("left",e+"%").css("_width",3-o._nest+"px").attr("title",o.label))}}catch(t){console.warn(t)}})),$(".spacer").append($("<div class='toc-bar-entry current-position'>")),Reader.updateTocBarPosition(t,t.rendition.currentLocation())},updateTocBarPosition:function(t,e){const o=Math.round(e.start.location/t.locations.length()*100);$(".toc-bar-entry.current-position").css("left",o+"%")},applyStyles:function(t){Promise.all([localforage.getItem("epube.fontSize"),localforage.getItem("epube.fontFamily"),localforage.getItem("epube.lineHeight"),localforage.getItem("epube.theme")]).then((function(e){const o=e[0]?e[0]+"px":"16px",n=e[1]?e[1]:"Arial",a=e[2]?e[2]+"%":"140%";console.log("style",n,o,a),console.log("applying default theme..."),window.book.rendition.themes.default({html:{"font-size":o,"font-family":"'"+n+"'","line-height":a,"text-align":"justify","text-indent":"1em"}}),t||(console.log("applying rendition themes..."),$.each(window.book.rendition.getContents(),(function(t,e){e.css("font-size",o),e.css("font-family","'"+n+"'"),e.css("line-height",a),e.css("text-align","justify")}))),Reader.applyTheme()}))},applyTheme:function(){localforage.getItem("epube.theme").then((function(t){t||(t="default"),console.log("called for theme",t),"default"==t&&"undefined"!=typeof EpubeApp&&EpubeApp.isNightMode()&&(t="night"),console.log("setting main UI theme",t),$("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("epube-reader theme-"+t).attr("data-is-loading","false"),"undefined"!=typeof EpubeApp&&window.setTimeout((function(){const t=window.getComputedStyle(document.querySelector("body"),null).getPropertyValue("background-color").match(/rgb\((\d{1,}), (\d{1,}), (\d{1,})\)/);t&&(console.log("sending bgcolor",t),EpubeApp.setStatusBarColor(parseInt(t[1]),parseInt(t[2]),parseInt(t[3])))}),250),window.book&&$.each(window.book.rendition.getContents(),(function(e,o){console.log("applying rendition theme",t,"to",o,o.document),$(o.document).find("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("theme-"+t)}))}))},hotkeyHandler:function(t){try{if($(".modal").is(":visible"))return;39!=t.which&&32!=t.which&&34!=t.which||(t.preventDefault(),Reader.Page.next()),37!=t.which&&33!=t.which||(t.preventDefault(),Reader.Page.prev()),27==t.which&&(t.preventDefault(),Reader.showUI(!0))}catch(t){console.warn(t)}},resizeSideColumns:function(){let t=$("#reader").position().left;const e=$("#reader iframe")[0];e&&e.contentWindow.$&&(t+=parseInt(e.contentWindow.$("body").css("padding-left"))),$("#left, #right").width(t)},markAsRead:function(){if(confirm("Mark book as read?")){const t=100,e=window.book.locations.cfiFromPercentage(1),o=(new Date).getTime();App.isOnline()&&$.post("backend.php",{op:"storelastread",page:t,cfi:e,id:$.urlParam("id"),timestamp:o},(function(t){$(".lastread_input").val(t.page+"%")})),localforage.setItem(Reader.cacheId("lastread"),{cfi:e,page:t,total:t,timestamp:o})}},close:function(){const t=window.book.rendition.currentLocation().start.cfi,e=parseInt(100*window.book.locations.percentageFromCfi(t)),o=(new Date).getTime();localforage.setItem(Reader.cacheId("lastread"),{cfi:t,page:e,total:100,timestamp:o}),App.isOnline()?$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:e,cfi:t,timestamp:o},(function(){window.location=$.urlParam("rt")?"index.php?mode="+$.urlParam("rt"):"index.php"})).fail((function(){window.location="index.php"})):window.location="index.php"},cacheId:function(t){return"epube-book."+$.urlParam("b")+(t?"."+t:"")},toggleFullscreen:function(){if("undefined"!=typeof EpubeApp);else{const t=document.documentElement,e=document.webkitIsFullScreen||document.mozFullScreen||!1;t.requestFullScreen=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},e?document.cancelFullScreen():t.requestFullScreen()}},showUI:function(t){t?$(".header,.footer").fadeIn():$(".header,.footer").fadeOut()},toggleUI:function(){$(".header").is(":visible")?$(".header,.footer").fadeOut():$(".header,.footer").fadeIn()},lookupWord:function(t,e){t=t.replace(//g,""),$(".dict_result").html("Loading, please wait..."),$("#dict-modal").modal("show"),$.post("backend.php",{op:"define",word:t},(function(o){o&&($(".dict_result").html(o.result.join("<br/>")),$(".dict_query").val(t),e&&e())})).fail((function(t){console.warn(t),$(".dict_result").html("Network error while looking up word: "+t.statusText)}))},search:function(){const t=$(".search_input").val(),e=$(".search_results");e.html(""),t&&Promise.all(window.book.spine.spineItems.map(e=>e.load(window.book.load.bind(window.book)).then(e.find.bind(e,t)).finally(e.unload.bind(e)))).then(t=>Promise.resolve([].concat.apply([],t))).then((function(t){$.each(t,(function(t,o){const n=$("<a>").attr("href","#").html("<b class='pull-right'>"+window.book.locations.locationFromCfi(o.cfi)+"</b>"+o.excerpt).attr("data-cfi",o.cfi).attr("data-id",o.id).click((function(){window.book.rendition.display(n.attr("data-cfi"))}));e.append($("<li>").append(n))}))}))},Loader:{_res_data:[],init:async function(){const t=[];let e=!1;const o=await caches.open("epube-v3");(await o.keys()).forEach(o=>{if(!o.url.match("backend.php")){console.log("[loader] loading resource",o.url);const n=fetch(o.url).then(async t=>{if(t.ok){const e=new URL(t.url);if(e.searchParams.delete("ts"),t.url.match("\\.ttf|\\.otf")){const o=await t.blob();console.log("[loader] storing blob",e.href),Reader.Loader._res_data[e.toString()]=URL.createObjectURL(o)}else{const o=await t.text();console.log("[loader] storing text",e.href),Reader.Loader._res_data[e.toString()]=o}}else console.warn("[loader] failed for resource",o.url,t),$(".loading-message").html(`Unable to load resource.<br/><small>${o.url}</small>`),e=!0});t.push(n)}}),await Promise.allSettled(t),console.log("[loader] resource load complete, failed: ",e),e?Reader.applyTheme():Reader.initSecondStage()}},Page:{_pagination_stored:0,_moved_next:0,next:function(){window.book.rendition.next(),Reader.Page._moved_next+=1,"undefined"!=typeof EpubeApp?EpubeApp.showActionBar(!1):localforage.getItem("epube.keep-ui-visible").then((function(t){t||Reader.showUI(!1)}))},prev:function(){window.book.rendition.prev(),"undefined"!=typeof EpubeApp?EpubeApp.showActionBar(!1):localforage.getItem("epube.keep-ui-visible").then((function(t){t||Reader.showUI(!1)}))},openPrevious:function(t){const e=$(t).attr("data-location-cfi");e&&window.book.rendition.display(e),$(t).fadeOut()},clearLastRead:function(){if(confirm("Clear stored last read location?")){const t=window.book.locations.length(),e=(new Date).getTime();App.isOnline()&&$.post("backend.php",{op:"storelastread",page:-1,cfi:"",id:$.urlParam("id"),timestamp:e},(function(t){$(".lastread_input").val(t.page+"%")})),localforage.setItem(Reader.cacheId("lastread"),{cfi:"",page:0,total:t,timestamp:e}),window.setTimeout((function(){window.book.rendition.display(window.book.locations.cfiFromPercentage(0))}),250)}},openLastRead:function(t){localforage.getItem(Reader.cacheId("lastread")).then((function(e){console.log("lr local",e),e=e||{};try{e.cfi&&window.book.rendition.display(e.cfi).then(()=>{$(".loading").hide(),e.cfi&&window.book.rendition.display(e.cfi)})}catch(t){console.warn(t)}App.isOnline()&&!t&&$.post("backend.php",{op:"getlastread",id:$.urlParam("id")},(function(t){if(console.log("lr remote",t),App.isOnline()&&t)try{t.cfi&&e.cfi!=t.cfi&&t.timestamp>e.timestamp&&console.log("using remote lastread (timestamp is newer)"),localforage.setItem(Reader.cacheId("lastread"),{cfi:t.cfi,page:t.page,total:t.total,timestamp:t.timestamp}),window.book.rendition.display(t.cfi).then(()=>{window.book.rendition.display(t.cfi)})}catch(t){console.warn(t)}})).fail((function(t){t&&401==t.status&&(window.location="index.php")}))}))}},Settings:{onThemeChanged:function(t){const e=$(t).val();localforage.setItem("epube.theme",e).then((function(){Reader.applyTheme()}))},onLineHeightChanged:function(t){const e=$(t).val();localforage.setItem("epube.lineHeight",e).then((function(){Reader.applyStyles()}))},onTextSizeChanged:function(t){const e=$(t).val();localforage.setItem("epube.fontSize",e).then((function(){Reader.applyStyles()}))},onFontChanged:function(t){const e=$(t).val();localforage.setItem("epube.fontFamily",e).then((function(){Reader.applyStyles()}))}}};function __get_reader(){return Reader}function __get_app(){return App}
\ No newline at end of file +"use strict";$.urlParam=function(t){try{const e=new RegExp("[?&]"+t+"=([^&#]*)").exec(window.location.href);return decodeURIComponent(e[1].replace(/\+/g," "))||0}catch(t){return 0}};const Cookie={set:function(t,e,o){const n=new Date;n.setTime(n.getTime()+1e3*o);const a="expires="+n.toUTCString();document.cookie=t+"="+encodeURIComponent(e)+"; "+a},get:function(t){t+="=";const e=document.cookie.split(";");for(let o=0;o<e.length;o++){let n=e[o];for(;" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return""},delete:function(t){document.cookie=t+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT"}},App={_dl_progress_timeout:!1,index_mode:"",last_mtime:-1,cached_urls:[],version:"UNKNOWN",csrf_token:"",init:function(){let t=0;this.csrf_token=Cookie.get("epube_csrf_token"),console.log("setting prefilter for token",this.csrf_token),$.ajaxPrefilter((function(t,e,o){if("post"!==e.type||"post"!==t.type)return;const n=typeof e.data;"object"==n?t.data=$.param($.extend(e.data,{csrf_token:App.csrf_token})):"string"==n&&(t.data=e.data+"&csrf_token="+encodeURIComponent(App.srf_token)),console.log(">>>",t)})),"undefined"!=typeof EpubeApp&&($(".navbar").hide(),$(".epube-app-filler").show(),$(".separate-search").show(),"favorites"==$.urlParam("mode")?EpubeApp.setPage("PAGE_FAVORITES"):EpubeApp.setPage("PAGE_LIBRARY")),App.initNightMode(),"serviceWorker"in navigator?(navigator.serviceWorker.addEventListener("message",(function(e){"refresh-started"==e.data&&(console.log("cache refresh started"),t=0,$(".dl-progress").fadeIn().text("Loading, please wait...")),e.data&&0==e.data.indexOf("refreshed:")&&(++t,$(".dl-progress").fadeIn().text("Updated "+t+" files...")),"refresh-finished"==e.data&&(localforage.setItem("epube.cache-timestamp",App.last_mtime),localforage.setItem("epube.cache-version",App.version),window.location.reload())})),App.showCovers(),App.Offline.markBooks(),App.refreshCache()):$(".container-main").addClass("alert alert-danger").html("Service worker support missing in browser (are you using plain HTTP?).")},logout:function(){$.post("backend.php",{op:"logout"}).then(()=>{window.location.reload()})},showSummary:function(t){const e=t.getAttribute("data-book-id");return $.post("backend.php",{op:"getinfo",id:e},(function(t){const e=t.comment?t.comment:"No description available";$("#summary-modal .modal-title").html(t.title),$("#summary-modal .book-summary").html(e),$("#summary-modal").modal()})),!1},showCovers:function(){$("img[data-book-id]").each((t,e)=>{if((e=$(e)).attr("data-cover-link")){const t=$("<img>").on("load",(function(){e.css("background-image","url("+e.attr("data-cover-link")+")").fadeIn(),t.attr("src",null)})).attr("src",e.attr("data-cover-link"))}})},toggleFavorite:function(t){const e=t.getAttribute("data-book-id");return("0"==t.getAttribute("data-is-fav")||confirm("Remove favorite?"))&&$.post("backend.php",{op:"togglefav",id:e},(function(o){if(o){let n="[Error]";0==o.status?n="Add to favorites":1==o.status&&(n="Remove from favorites"),$(t).html(n).attr("data-is-fav",o.status),"favorites"==App.index_mode&&0==o.status&&$("#cell-"+e).remove()}})),!1},refreshCache:function(t){"serviceWorker"in navigator?localforage.getItem("epube.cache-timestamp").then((function(e){console.log("stamp",e,"last mtime",App.last_mtime,"version",App.version),(t||e!=App.last_mtime)&&(console.log("asking worker to refresh cache"),navigator.serviceWorker.controller?navigator.serviceWorker.controller.postMessage({msg:"refresh-cache",urls:App.cached_urls}):localforage.getItem("epube.initial-load-done").then((function(t){console.log("initial load done",t),t?$(".dl-progress").show().addClass("alert-danger").html("Could not communicate with service worker. Try reloading the page."):localforage.setItem("epube.initial-load-done",!0).then((function(){$(".dl-progress").show().addClass("alert-info").html("Page will reload to activate service worker..."),window.setTimeout((function(){window.location.reload()}),3e3)}))})))})):$(".dl-progress").show().addClass("alert-danger").html("Could not communicate with service worker. Try reloading the page.")},isOnline:function(){return"undefined"!=typeof EpubeApp&&void 0!==EpubeApp.isOnline?EpubeApp.isOnline():navigator.onLine},appCheckOffline:function(){EpubeApp.setOffline(!App.isOnline)},initNightMode:function(){if("undefined"==typeof EpubeApp){if(window.matchMedia){const t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",()=>{App.applyNightMode(t.matches)}),App.applyNightMode(t.matches)}}else App.applyNightMode(EpubeApp.isNightMode())},applyNightMode:function(t){console.log("night mode changed to",t),$("#theme_css").attr("href","lib/bootstrap/v3/css/"+(t?"theme-dark.min.css":"bootstrap-theme.min.css"))},Offline:{init:function(){"undefined"!=typeof EpubeApp&&($(".navbar").hide(),$(".epube-app-filler").show(),EpubeApp.setPage("PAGE_OFFLINE")),App.initNightMode();const t=$.urlParam("query");t&&$(".search_query").val(t),App.Offline.populateList()},get:function(t,e){console.log("offline cache: "+t),$.post("backend.php",{op:"getinfo",id:t},(function(o){if(o){const n="epube-book."+t;localforage.setItem(n,o).then((function(o){console.log(n+" got data");const a=[];a.push(fetch("backend.php?op=download&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got book"),e(),localforage.setItem(n+".book",t.blob()))}))),a.push(fetch("backend.php?op=getpagination&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got pagination"),t.text().then((function(t){localforage.setItem(n+".locations",JSON.parse(t))})))}))),a.push(fetch("backend.php?op=getlastread&id="+o.epub_id,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got lastread"),t.text().then((function(t){localforage.setItem(n+".lastread",JSON.parse(t))})))}))),o.has_cover&&a.push(fetch("backend.php?op=cover&id="+t,{credentials:"same-origin"}).then((function(t){200==t.status&&(console.log(n+" got cover"),localforage.setItem(n+".cover",t.blob()))}))),Promise.all(a).then((function(){$(".dl-progress").show().html("Finished downloading <b>"+o.title+"</b>"),window.clearTimeout(App._dl_progress_timeout),App._dl_progress_timeout=window.setTimeout((function(){$(".dl-progress").fadeOut()}),5e3)}))}))}}))},getAll:function(){confirm("Download all books on this page?")&&$(".row > div").each((function(t,e){const o=$(e).attr("id").replace("cell-",""),n=$(e).find(".offline_dropitem")[0];if(o){const t="epube-book."+o;localforage.getItem(t).then((function(t){t||App.Offline.get(o,(function(){App.Offline.mark(n)}))}))}}))},markBooks:function(){const t=$(".offline_dropitem");$.each(t,(function(t,e){App.Offline.mark(e)}))},mark:function(t){const e=t.getAttribute("data-book-id"),o="epube-book."+e;localforage.getItem(o).then((function(o){o?(t.onclick=function(){return App.Offline.remove(e,(function(){App.Offline.mark(t)})),!1},t.innerHTML="Remove offline data"):(t.onclick=function(){return App.Offline.get(e,(function(){App.Offline.mark(t)})),!1},t.innerHTML="Make available offline")}))},removeFromList:function(t){const e=t.getAttribute("data-book-id");return App.Offline.remove(e,(function(){$("#cell-"+e).remove()}))},remove:function(t,e){if(confirm("Remove download?")){const o="epube-book."+t,n=[];console.log("offline remove: "+t),localforage.iterate((function(t,e){e.match(o)&&n.push(localforage.removeItem(e))})),Promise.all(n).then((function(){window.setTimeout((function(){e()}),500)}))}},search:function(){const t=$(".search_query").val();return localforage.setItem("epube.search-query",t).then((function(){App.Offline.populateList()})),!1},removeAll:function(){if(confirm("Remove all downloaded books?")){const t=[];localforage.iterate((function(e,o){o.match("epube-book")&&t.push(localforage.removeItem(o))})),Promise.all(t).then((function(){window.setTimeout((function(){App.Offline.populateList()}),500)}))}},showSummary:function(t){const e=t.getAttribute("data-book-id");return localforage.getItem("epube-book."+e).then((function(t){const e=t.comment?t.comment:"No description available";$("#summary-modal .modal-title").html(t.title),$("#summary-modal .book-summary").html(e),$("#summary-modal").modal()})),!1},populateList:function(){let t=$.urlParam("query");t&&(t=t.toLowerCase());const e=$("#books_container");e.html(""),localforage.iterate((function(o,n){n.match(/epube-book\.\d{1,}$/)&&Promise.all([localforage.getItem(n),localforage.getItem(n+".cover"),localforage.getItem(n+".lastread"),localforage.getItem(n+".book")]).then((function(o){if(o[0]&&o[3]){const n=o[0];if(t){if(!(n.series_name&&n.series_name.toLowerCase().match(t)||n.title&&n.title.toLowerCase().match(t)||n.author_sort&&n.author_sort.toLowerCase().match(t)))return}let a=!1;o&&o[1]&&(a=URL.createObjectURL(o[1]));let i=!1,l=!1;const r=o[2];r&&(i=r.page>0,l=r.total>0&&r.total-r.page<5);const s=l?"read":"",c=i?"in_progress":"",d=n.series_name?`<div><a class="series_link" href="#">${n.series_name+" ["+n.series_index+"]"}</a></div>`:"",f=$(`<div class="col-xxs-6 col-xs-4 col-sm-3 col-md-2" id="cell-${n.id}">\n\t\t\t\t\t\t\t<a class="thumbnail ${s}" href="read.html?id=${n.epub_id}&b=${n.id}">\n\t\t\t\t\t\t\t\t<img style="display : none">\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<div class="caption">\n\t\t\t\t\t\t\t\t<div><a class="${c}" href="read.html?id=${n.epub_id}&b=${n.id}">${n.title}</a></div>\n\t\t\t\t\t\t\t\t<div><a class="author_link" href="#">${n.author_sort}</a></div>\n\t\t\t\t\t\t\t\t${d}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="dropdown" style="white-space : nowrap">\n\t\t\t\t\t\t\t\t<a href="#" data-toggle="dropdown" role="button">More...<span class="caret"></span></a>\n\t\t\t\t\t\t\t\t<ul class="dropdown-menu">\n\t\t\t\t\t\t\t\t\t<li><a href="#" data-book-id="${n.id}" onclick="return App.Offline.showSummary(this)">Summary</a></li>\n\t\t\t\t\t\t\t\t\t<li><a href="#" data-book-id="${n.id}" onclick="App.Offline.removeFromList(this)">Remove offline data</a></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`);a?f.find("img").css("background-image","url("+a+")").fadeIn():f.fadeIn(),f.find(".series_link").attr("title",n.series_name+" ["+n.series_index+"]").attr("href","offline.html?query="+encodeURIComponent(n.series_name)),f.find(".author_link").attr("title",n.author_sort).attr("href","offline.html?query="+encodeURIComponent(n.author_sort)),e.append(f)}}))}))}}},DEFAULT_FONT_SIZE=16,DEFAULT_FONT_FAMILY="Arial",DEFAULT_LINE_HEIGHT=140,MIN_LENGTH_TO_JUSTIFY=32,LOCATION_DIVISOR=10,PAGE_RESET_PROGRESS=-1,CACHE_PREFIX="epube",CACHE_NAME="epube-v3";Promise.allSettled=Promise.allSettled||(t=>Promise.all(t.map(t=>t.then(t=>({status:"fulfilled",value:t})).catch(t=>({status:"rejected",reason:t})))));const Reader={csrf_token:"",last_stored_cfi:"",prevent_lastread_update:!1,hyphenate:{},init:function(){this.csrf_token=Cookie.get("epube_csrf_token"),console.log("setting prefilter for token",this.csrf_token),$.ajaxPrefilter((function(t,e){if("post"!==e.type||"post"!==t.type)return;const o=typeof e.data;"object"==o?t.data=$.param($.extend(e.data,{csrf_token:Reader.csrf_token})):"string"==o&&(t.data=e.data+"&csrf_token="+encodeURIComponent(Reader.srf_token)),console.log(">>>",t)})),$(document).on("keyup",(function(t){Reader.hotkeyHandler(t)})),$("#left").on("mouseup",(function(){Reader.Page.prev()})),$("#right").on("mouseup",(function(){Reader.Page.next()})),Reader.Loader.init()},onOfflineModeChanged:function(t){if(console.log("onOfflineModeChanged",t),!t&&window.book){const t=window.book;console.log("we're online, storing lastread");const e=t.rendition.currentLocation().start.cfi,o=parseInt(100*t.locations.percentageFromCfi(e));$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:o,cfi:e,timestamp:(new Date).getTime()},(function(){})).fail((function(t){t&&401==t.status&&(window.location="index.php")}))}},initSecondStage:async function(){"undefined"!=typeof EpubeApp?EpubeApp.setPage("PAGE_READER"):($(window).on("online",(function(){Reader.onOfflineModeChanged(!1)})),$(window).on("offline",(function(){Reader.onOfflineModeChanged(!0)}))),Reader.applyTheme();if(await localforage.getItem(Reader.cacheId()))console.log("bookinfo already stored");else{const t=$.urlParam("b");console.log("requesting bookinfo for book",t);try{const e=await $.post("backend.php",{op:"getinfo",id:t});if(e.has_cover){const e=await fetch("backend.php?op=cover&id="+t);e.ok&&await localforage.setItem(Reader.cacheId("cover"),e.blob())}await localforage.setItem(Reader.cacheId(),e),console.log("bookinfo saved")}catch(t){return void $(".loading-message").html(`Unable to load book info.<br/><small>${t.responseText}</small>`)}}console.log("trying to load book...");let t=await localforage.getItem(Reader.cacheId("book"));if(t)console.log("local data already present for book");else{console.log("local data not found, loading from network...");const e=await fetch("backend.php?op=download&id="+$.urlParam("id"));if(!e.ok)return void $(".loading-message").html("Unable to download book: "+e.status);if(t=await e.blob(),!t)return void $(".loading-message").html("Unable to get book blob data.");await localforage.setItem(Reader.cacheId("book"),t),console.log("saved local data for book")}const e=new FileReader;e.onload=function(){try{Reader.openBookData(this.result)}catch(t){console.error(t),$(".loading-message").html("Unable to load book blob: "+t)}},e.onerror=t=>{console.log("filereader error",t),$(".loading-message").html("Unable to open book.<br/><small>"+t+"</small>")},e.readAsArrayBuffer(t)},openBookData:async function(t){const e=ePub();window.book=e;try{await e.open(t)}catch(t){return console.error(t),void $(".loading-message").html("Unable to open book.<br/><small>"+t.message+"</small>")}await e.ready,console.log("book is ready"),await Reader.showBookInfo(e),await Reader.loadLocations(e);const o=e.renderTo("reader",{width:"100%",height:"100%",allowScriptedContent:!0,minSpreadWidth:961});$(".location").click((async function(){const t=Math.floor(o.currentLocation().start.location/10),n=Math.floor(e.locations.length()/10),a=prompt("Jump to location [1-"+n+"]",t);a&&await o.display(e.locations._locations[10*a])}));await localforage.getItem("epube.enable-hyphens")&&(Reader.hyphenate.en=createHyphenator(hyphenationPatternsEnUs,{html:!0}),Reader.hyphenate.ru=createHyphenator(hyphenationPatternsRu,{html:!0})),Reader.applyStyles(!0),console.log("book displayed"),Reader.initRenditionHooks(e,o),Reader.initModals(),Reader.initToc(e),Reader.initStyleHooks(e),Reader.Page.openLastRead(o)},showBookInfo:async function(t){const e=await localforage.getItem(Reader.cacheId());let o,n;if(e)o=e.title,n=e.author_sort;else{const e=t.package.metadata;o=e.title,n=e.creator}document.title=o+" – "+n+" – The Epube",$(".title").text(o).attr("title",o+" – "+n),"undefined"!=typeof EpubeApp&&(EpubeApp.setTitle(o),EpubeApp.showActionBar(!1))},loadLocations:async function(t){console.log("init locations...");let e=await localforage.getItem(Reader.cacheId("locations"));if(e&&"string"==typeof e[0])return console.log("loading local locations..."),t.locations.load(e);{console.log("requesting locations...");const o=await fetch("backend.php?op=getpagination&id="+$.urlParam("id"));if(o.ok&&(console.log("got locations from server"),e=await o.json(),e&&"string"==typeof e[0]))return console.log("saving locations locally..."),await localforage.setItem(Reader.cacheId("locations"),e),t.locations.load(e);$(".loading-message").html("Preparing locations…"),e=await t.locations.generate(100),$.post("backend.php",{op:"storepagination",id:$.urlParam("id"),payload:JSON.stringify(e),total:100}),await localforage.setItem(Reader.cacheId("locations"),e)}},initRenditionHooks:function(t,e){e.hooks.content.register(async t=>{t.on("linkClicked",t=>{console.log("linkClicked",t),Reader.prevent_lastread_update=!0,-1==t.indexOf("://")&&($(".prev_location_btn").attr("data-location-cfi",e.currentLocation().start.cfi).show(),window.setTimeout((function(){Reader.showUI(!0)}),50))});const o=window.location.href.match(/^.*\//)[0];"undefined"!=typeof EpubeApp?$(t.document.head).append($('<link type="text/css" rel="stylesheet" media="screen" href="/assets/android.css" />')):$(t.document.head).append($("<style type='text/css'>").text(Reader.generateFontsCss(o)));const n=["dist/app-libs.min.js","dist/reader_iframe.min.js"];for(let e=0;e<n.length;e++){const a=t.document.createElement("script");a.type="text/javascript",a.text=Reader.Loader._res_data[o+n[e]],t.document.head.appendChild(a)}$(t.document.head).append($("<style type='text/css'>").text(Reader.Loader._res_data[o+"dist/reader_iframe.min.css"]));const a=await localforage.getItem("epube.theme")||"default";$(t.document).find("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("theme-"+a)}),e.on("keyup",t=>{Reader.hotkeyHandler(t)}),e.on("rendered",(function(){$(".chapter").html($("<span>").addClass("glyphicon glyphicon-th-list")),setTimeout(()=>{Reader.Page._moved_next=0},150),Reader.applyTheme(),Reader.resizeSideColumns();try{const o=e.currentLocation();if(o.start){const e=t.canonical(o.start.href);let n=!1;$.each(Reader.flattenToc(t),(function(o,a){t.spine.get(a.href).canonical!=e||(n=a)})),n&&n.label&&$(".chapter").append(" "+n.label.trim()+" | "),Reader.generateTocBar(t,Reader.flattenToc(t))}}catch(t){console.warn(t)}})),e.on("relocated",async o=>{if(0==t.locations.length())return;localforage.getItem("epube.enable-column-hacks").then(t=>{t&&Reader.Page._moved_next>=20&&(console.log("forcing re-render because of column hacks"),e.onResized($("#reader").width()),Reader.Page._moved_next=0)});const n=o.start.cfi,a=parseInt(100*t.locations.percentageFromCfi(n));$("#cur_page").text(Math.floor(o.start.location/10)),$("#total_pages").text(Math.floor(t.locations.length()/10)),$("#page_pct").text(parseInt(100*t.locations.percentageFromCfi(n))+"%"),Reader.updateTocBarPosition(t,o);const i=o.start.displayed;if(i&&($("#chapter_cur_page").text(i.page),$("#chapter_total_pages").text(i.total),i.total>0&&$("#chapter_pct").text(parseInt(i.page/i.total*100)+"%")),Reader.last_stored_cfi!=n&&!Reader.prevent_lastread_update){const t=(new Date).getTime();console.log("storing lastread",a,n,t),await localforage.setItem(Reader.cacheId("lastread"),{cfi:n,page:a,total:100,timestamp:t}),App.isOnline()&&(console.log("updating remote lastread",n),Reader.last_stored_cfi=n,$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:a,cfi:n,timestamp:t}))}Reader.prevent_lastread_update=!1})},initModals:function(){console.log("initializing modals..."),$("#settings-modal").on("shown.bs.modal",(async function(){const t=await localforage.getItem(Reader.cacheId("lastread"));t&&t.cfi&&$(".lastread_input").val(t.page+"%").attr("title","[local] "+t.cfi),navigator.onLine&&$.post("backend.php",{op:"getlastread",id:$.urlParam("id")},t=>{$(".lastread_input").val(t.page+"%").attr("title","[remote] "+t.cfi)}),$(".enable_hyphens_checkbox").attr("checked",await localforage.getItem("epube.enable-hyphens")).off("click").on("click",(function(t){localforage.setItem("epube.enable-hyphens",t.target.checked),confirm("Toggling hyphens requires page reload. Reload now?")&&window.location.reload()})),"undefined"!=typeof EpubeApp?$(".keep_ui_checkbox").parent().parent().hide():$(".keep_ui_checkbox").attr("checked",await localforage.getItem("epube.keep-ui-visible")).off("click").on("click",(function(t){localforage.setItem("epube.keep-ui-visible",t.target.checked)}));const e=await localforage.getItem("epube.enable-column-hacks");$(".enable_column_hacks_checkbox").attr("checked",e).off("click").on("click",(function(t){localforage.setItem("epube.enable-column-hacks",t.target.checked)}));const o=await localforage.getItem("epube.cache-timestamp"),n=await localforage.getItem("epube.cache-version");$(".last-mod-timestamp").html(`${n}\n\t\t\t\t— ${parseInt(o)?new Date(1e3*o).toLocaleString("en-GB"):"Unknown"}\n\t\t\t\t(${App.isOnline()?"<span class='text-success'>Online</span>":"<span class='text-danger'>Offline</span>"})\n\t\t\t\t`),$(".font_family").val(await localforage.getItem("epube.fontFamily")||"Arial"),$(".theme_name").val(await localforage.getItem("epube.theme"));const a=$(".font_size").html("");for(let t=10;t<=32;t++){const e=$("<option>").val(t).html(t+" px");a.append(e)}a.val(await localforage.getItem("epube.fontSize")||16);const i=$(".line_height").html("");for(let t=100;t<=220;t+=10){const e=$("<option>").val(t).html(t+"%");i.append(e)}i.val(await localforage.getItem("epube.lineHeight")||140)})),$("#dict-modal").on("shown.bs.modal",(function(){$(".dict_result").scrollTop(0)})),$(".dict_search_btn").on("click",(function(){$("#dict-modal").modal("hide"),window.open("https://duckduckgo.com/?q="+$(".dict_query").val())})),$(".wiki_search_btn").on("click",(function(){$(".dict_result").html("Loading, please wait..."),$.post("backend.php",{op:"wikisearch",query:$(".dict_query").val()}).then(t=>{try{console.log("wikisearch resp",t);let e="";$.each(t.query.pages,(t,o)=>{e+=o.extract}),$(".dict_result").html(e&&"undefined"!=e?e:"No definition found for "+$(".dict_query").val()+".")}catch(t){console.error(t),$(".dict_result").text("Error while processing data: "+t)}}).fail(t=>{console.error(t),$(".dict_result").text("Error while retrieving data.")})}))},initToc:function(t){function e(e){try{const o=t.spine.get(e).cfiBase,n=t.locations._locations.find((function(t){return-1!=t.indexOf(o)}));return parseInt(window.book.locations.locationFromCfi(n)/10)}catch(t){console.warn(t)}return""}console.log("initializing toc modal..."),$("#toc-modal").on("shown.bs.modal",(function(){const o=t.navigation.toc,n=$(".toc_list");n.html(""),$.each(o,(function(o,a){try{const o=$("<a>").attr("href","#").html("<b class='pull-right'>"+e(a.href)+"</b>"+a.label).attr("data-href",a.href).click((function(){t.rendition.display(o.attr("data-href"))}));n.append($("<li>").append(o)),function o(n,a,i){if(3==i)return!1;if(n.subitems){const l=$("<ul class='toc_sublist list-unstyled'>");$.each(n.subitems,(function(n,a){const r=$("<a>").attr("href","#").html("<b class='pull-right'>"+e(a.href)+"</b>"+a.label).attr("data-href",a.href).click((function(){t.rendition.display(r.attr("data-href"))}));l.append($("<li>").append(r)),o(a,l,i+1)})),a.append(l)}}(a,n,0)}catch(t){console.warn(t)}})),n.children().length<=1&&(n.html(""),$.each(t.spine.items,(function(e,o){const a=$("<a>").attr("href","#").attr("title",o.url).html("Section "+(e+1)).attr("data-href",o.href).click((function(){t.rendition.display(a.attr("data-href"))}));n.append($("<li>").append(a))})))}))},initStyleHooks:function(t){console.log("registering style hooks..."),t.spine.hooks.content.register((function(t){$(t).find("p").filter((t,e)=>$(e).text().length>=32?e:null).css("text-align","justify"),$(t).find("html").attr("class",""),$(t).find("pre").css("white-space","pre-wrap"),$(t).find("a, p, span, em, i, strong, b, body, header, section, div, big, small, table, tr, td, ul, ol, li").attr("class","").css("font-family","inherit").css("font-size","inherit").css("line-height","inherit").css("color","").css("border","none ! important").css("background","").css("background-color","").attr("width","").attr("height",""),$(t).find("h1, h2, h3, h4, h5").attr("class","").css("font-family","inherit").css("color","").css("border","none ! important").css("background","").css("background-color",""),void 0!==Reader.hyphenate.en&&$(t).find("p, div").each((t,e)=>{(e=$(e)).html(Reader.hyphenate.en(e.html())),e.html(Reader.hyphenate.ru(e.html()))})}))},generateFontsCss:function(t){return`\n\t\t\t/** Calibri */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibriz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibrib.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibrii.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Calibri';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/calibri.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Cambria */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriaz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambriai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Cambria';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/cambria.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Caecilia */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caecilia.ttf"]});\n\t\t\t\tfont-weight : normal;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caeciliab.ttf"]});\n\t\t\t\tfont-weight : bold;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: Caecilia;\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/caeciliai.ttf"]});\n\t\t\t\tfont-style : italic;\n\t\t\t}\n\n\t\t\t/** Palatino */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palabi.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/palai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Palatino';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/pala.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** Consolas */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolab.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolaz.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consolai.ttf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'Consolas';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/consola.ttf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t/** IBM Plex Mono */\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-Bold.otf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-BoldItalic.otf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 700;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-TextItalic.otf"]});\n\t\t\t\tfont-style: italic;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\n\t\t\t@font-face {\n\t\t\t\tfont-family: 'IBM Plex Mono';\n\t\t\t\tsrc: url(${Reader.Loader._res_data[t+"lib/fonts/IBMPlexMono-Text.otf"]});\n\t\t\t\tfont-style: normal;\n\t\t\t\tfont-weight : 400;\n\t\t\t}\n\t\t\t`},flattenTocSubItems:function(t,e){let o=[];return 3!=e&&(t.subitems&&$.each(t.subitems,(function(t,n){n._nest=e,o.push(n),o=o.concat(Reader.flattenTocSubItems(n,e+1))})),o)},flattenToc:function(t){if(this._flattened_toc)return this._flattened_toc;{let e=[];return $.each(t.navigation.toc,(function(t,o){o._nest=0,e.push(o),e=e.concat(Reader.flattenTocSubItems(o,1))})),this._flattened_toc=e,e}},generateTocBar:function(t,e){$(".spacer").html(""),$.each(e,(function(e,o){try{const e=t.spine.get(o.href).cfiBase,n=t.locations._locations.find((function(t){return-1!=t.indexOf(e)}));if(n){const e=Math.round(100*t.locations.percentageFromCfi(n));$(".spacer").append($("<div class='toc-bar-entry'>").attr("data-nest-level",o._nest).css("left",e+"%").css("_width",3-o._nest+"px").attr("title",o.label))}}catch(t){console.warn(t)}})),$(".spacer").append($("<div class='toc-bar-entry current-position'>")),Reader.updateTocBarPosition(t,t.rendition.currentLocation())},updateTocBarPosition:function(t,e){const o=Math.round(e.start.location/t.locations.length()*100);$(".toc-bar-entry.current-position").css("left",o+"%")},applyStyles:function(t){Promise.all([localforage.getItem("epube.fontSize"),localforage.getItem("epube.fontFamily"),localforage.getItem("epube.lineHeight"),localforage.getItem("epube.theme")]).then((function(e){const o=e[0]?e[0]+"px":"16px",n=e[1]?e[1]:"Arial",a=e[2]?e[2]+"%":"140%";console.log("style",n,o,a),console.log("applying default theme..."),window.book.rendition.themes.default({html:{"font-size":o,"font-family":"'"+n+"'","line-height":a,"text-align":"justify","text-indent":"1em"}}),t||(console.log("applying rendition themes..."),$.each(window.book.rendition.getContents(),(function(t,e){e.css("font-size",o),e.css("font-family","'"+n+"'"),e.css("line-height",a),e.css("text-align","justify")}))),Reader.applyTheme()}))},applyTheme:function(){localforage.getItem("epube.theme").then((function(t){t||(t="default"),console.log("called for theme",t),"default"==t&&"undefined"!=typeof EpubeApp&&EpubeApp.isNightMode()&&(t="night"),console.log("setting main UI theme",t),$("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("epube-reader theme-"+t).attr("data-is-loading","false"),"undefined"!=typeof EpubeApp&&window.setTimeout((function(){const t=window.getComputedStyle(document.querySelector("body"),null).getPropertyValue("background-color").match(/rgb\((\d{1,}), (\d{1,}), (\d{1,})\)/);t&&(console.log("sending bgcolor",t),EpubeApp.setStatusBarColor(parseInt(t[1]),parseInt(t[2]),parseInt(t[3])))}),250),window.book&&$.each(window.book.rendition.getContents(),(function(e,o){console.log("applying rendition theme",t,"to",o,o.document),$(o.document).find("body").attr("class","undefined"!=typeof EpubeApp?"is-epube-app":"").addClass("theme-"+t)}))}))},hotkeyHandler:function(t){try{if($(".modal").is(":visible"))return;39!=t.which&&32!=t.which&&34!=t.which||(t.preventDefault(),Reader.Page.next()),37!=t.which&&33!=t.which||(t.preventDefault(),Reader.Page.prev()),27==t.which&&(t.preventDefault(),Reader.showUI(!0))}catch(t){console.warn(t)}},resizeSideColumns:function(){let t=$("#reader").position().left;const e=$("#reader iframe")[0];e&&e.contentWindow.$&&(t+=parseInt(e.contentWindow.$("body").css("padding-left"))),$("#left, #right").width(t)},markAsRead:function(){if(confirm("Mark book as read?")){const t=100,e=window.book.locations.cfiFromPercentage(1),o=(new Date).getTime();App.isOnline()&&$.post("backend.php",{op:"storelastread",page:t,cfi:e,id:$.urlParam("id"),timestamp:o},(function(t){$(".lastread_input").val(t.page+"%")})),localforage.setItem(Reader.cacheId("lastread"),{cfi:e,page:t,total:t,timestamp:o})}},close:function(){const t=window.book.rendition.currentLocation().start.cfi,e=parseInt(100*window.book.locations.percentageFromCfi(t)),o=(new Date).getTime();localforage.setItem(Reader.cacheId("lastread"),{cfi:t,page:e,total:100,timestamp:o}),App.isOnline()?$.post("backend.php",{op:"storelastread",id:$.urlParam("id"),page:e,cfi:t,timestamp:o},(function(){window.location=$.urlParam("rt")?"index.php?mode="+$.urlParam("rt"):"index.php"})).fail((function(){window.location="index.php"})):window.location="index.php"},cacheId:function(t){return"epube-book."+$.urlParam("b")+(t?"."+t:"")},toggleFullscreen:function(){if("undefined"!=typeof EpubeApp);else{const t=document.documentElement,e=document.webkitIsFullScreen||document.mozFullScreen||!1;t.requestFullScreen=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},e?document.cancelFullScreen():t.requestFullScreen()}},showUI:function(t){t?$(".header,.footer").fadeIn():$(".header,.footer").fadeOut()},toggleUI:function(){$(".header").is(":visible")?$(".header,.footer").fadeOut():$(".header,.footer").fadeIn()},lookupWord:function(t,e){t=t.replace(//g,""),$(".dict_result").html("Loading, please wait..."),$("#dict-modal").modal("show"),$.post("backend.php",{op:"define",word:t},(function(o){o&&($(".dict_result").html(o.result.join("<br/>")),$(".dict_query").val(t),e&&e())})).fail((function(t){console.warn(t),$(".dict_result").html("Network error while looking up word: "+t.statusText)}))},search:function(){const t=$(".search_input").val(),e=$(".search_results");e.html(""),t&&Promise.all(window.book.spine.spineItems.map(e=>e.load(window.book.load.bind(window.book)).then(e.find.bind(e,t)).finally(e.unload.bind(e)))).then(t=>Promise.resolve([].concat.apply([],t))).then((function(t){$.each(t,(function(t,o){const n=$("<a>").attr("href","#").html("<b class='pull-right'>"+window.book.locations.locationFromCfi(o.cfi)+"</b>"+o.excerpt).attr("data-cfi",o.cfi).attr("data-id",o.id).click((function(){window.book.rendition.display(n.attr("data-cfi"))}));e.append($("<li>").append(n))}))}))},Loader:{_res_data:[],init:async function(){const t=[];let e=!1;const o=await caches.open("epube-v3");(await o.keys()).forEach(o=>{if(!o.url.match("backend.php")){console.log("[loader] loading resource",o.url);const n=fetch(o.url).then(async t=>{if(t.ok){const e=new URL(t.url);if(e.searchParams.delete("ts"),t.url.match("\\.ttf|\\.otf")){const o=await t.blob();console.log("[loader] storing blob",e.href),Reader.Loader._res_data[e.toString()]=URL.createObjectURL(o)}else{const o=await t.text();console.log("[loader] storing text",e.href),Reader.Loader._res_data[e.toString()]=o}}else console.warn("[loader] failed for resource",o.url,t),$(".loading-message").html(`Unable to load resource.<br/><small>${o.url}</small>`),e=!0});t.push(n)}}),await Promise.allSettled(t),console.log("[loader] resource load complete, failed: ",e),e?Reader.applyTheme():Reader.initSecondStage()}},Page:{_moved_next:0,next:function(){window.book.rendition.next(),Reader.Page._moved_next+=1,"undefined"!=typeof EpubeApp?EpubeApp.showActionBar(!1):localforage.getItem("epube.keep-ui-visible").then((function(t){t||Reader.showUI(!1)}))},prev:function(){window.book.rendition.prev(),"undefined"!=typeof EpubeApp?EpubeApp.showActionBar(!1):localforage.getItem("epube.keep-ui-visible").then((function(t){t||Reader.showUI(!1)}))},openPrevious:async function(t){const e=$(t).attr("data-location-cfi");e&&await window.book.rendition.display(e),$(t).fadeOut()},clearLastRead:async function(){if(confirm("Clear stored last read location?")){const t=window.book.locations.length(),e=(new Date).getTime();if(App.isOnline()){const t=await $.post("backend.php",{op:"storelastread",page:-1,cfi:"",id:$.urlParam("id"),timestamp:e});$(".lastread_input").val(t.page+"%")}await localforage.setItem(Reader.cacheId("lastread"),{cfi:"",page:0,total:t,timestamp:e}),await window.book.rendition.display(window.book.locations.cfiFromPercentage(0))}},openLastRead:async function(t){const e=await localforage.getItem(Reader.cacheId("lastread"))||{};if(e&&e.cfi){console.log("using local lastread cfi",e.cfi);try{await t.display(e.cfi)}catch(t){console.warn(t)}}if(App.isOnline()){const o=await $.post("backend.php",{op:"getlastread",id:$.urlParam("id")});console.log("got remote lastread",o,e),o&&o.cfi&&e.cfi!=o.cfi&&(!e.timestamp||o.timestamp<=e.timestamp)&&(console.log("using remote lastread (timestamp is newer or local timestamp is missing)"),await localforage.setItem(Reader.cacheId("lastread"),{cfi:o.cfi,page:o.page,total:o.total,timestamp:o.timestamp}),await t.display(o.cfi))}$(".loading").hide()}},Settings:{onThemeChanged:function(t){const e=$(t).val();localforage.setItem("epube.theme",e).then((function(){Reader.applyTheme()}))},onLineHeightChanged:function(t){const e=$(t).val();localforage.setItem("epube.lineHeight",e).then((function(){Reader.applyStyles()}))},onTextSizeChanged:function(t){const e=$(t).val();localforage.setItem("epube.fontSize",e).then((function(){Reader.applyStyles()}))},onFontChanged:function(t){const e=$(t).val();localforage.setItem("epube.fontFamily",e).then((function(){Reader.applyStyles()}))}}};function __get_reader(){return Reader}function __get_app(){return App}
\ No newline at end of file diff --git a/js/reader.js b/js/reader.js index 8d65d8e..0981876 100644 --- a/js/reader.js +++ b/js/reader.js @@ -88,7 +88,7 @@ const Reader = { }); } }, - initSecondStage: function() { + initSecondStage: async function() { if (typeof EpubeApp != "undefined") { EpubeApp.setPage("PAGE_READER"); @@ -104,697 +104,617 @@ const Reader = { Reader.applyTheme(); - // TODO: rework promise chain to async/await - return localforage.getItem(Reader.cacheId()).then(function(item) { - if (!item) { - console.log('requesting bookinfo...') - - return new Promise((resolve, reject) => { - const bookId = $.urlParam("b"); - - $.post("backend.php", {op: "getinfo", id: bookId }).success(function(data) { - if (data) { - if (data.has_cover) { - fetch("backend.php?op=cover&id=" + bookId, {credentials: 'same-origin'}).then(function(resp) { - if (resp.status == 200) { - localforage.setItem(Reader.cacheId('cover'), resp.blob()); - } - }); - } - - return localforage.setItem(Reader.cacheId(), data).then(function() { - console.log('bookinfo saved'); - resolve(); - }) - } + const bookinfo = await localforage.getItem(Reader.cacheId()); - reject(new Error("unable to load book info: blank")); + if (!bookinfo) { + const bookId = $.urlParam("b"); - }).error(function(xhr) { - $(".loading-message").html("Unable to load book info.<br/><small>" + xhr.status + "</small>"); + console.log('requesting bookinfo for book', bookId) - reject(new Error("unable to load book info: " + xhr.status)); - }); + try { + const resp = await $.post("backend.php", {op: "getinfo", id: bookId }); - }); - } else { - console.log('bookinfo already stored'); - } - }).then(function() { + if (resp.has_cover) { + const cover = await fetch("backend.php?op=cover&id=" + bookId); - console.log('trying to load book...'); + if (cover.ok) + await localforage.setItem(Reader.cacheId('cover'), cover.blob()); + } - localforage.getItem(Reader.cacheId("book")).then(function(item) { + await localforage.setItem(Reader.cacheId(), resp); - if (item) { + console.log('bookinfo saved'); - console.log("loading from local storage"); + } catch (e) { + $(".loading-message").html(`Unable to load book info.<br/><small>${e.responseText}</small>`); + return; + } + } else { + console.log('bookinfo already stored'); + } - return new Promise(function (resolve, reject) { + console.log('trying to load book...'); - const fileReader = new FileReader(); + let book_data = await localforage.getItem(Reader.cacheId("book")); - fileReader.onload = function() { - try { - return book.open(this.result).then(function() { - resolve(); - }) - } catch (e) { - $(".loading-message").html("Unable to load book (local)."); - console.log(e); + if (!book_data) { + console.log("local data not found, loading from network..."); - reject(new Error("Unable to load book (local):" + e)); - } - }; + const book_resp = await fetch("backend.php?op=download&id=" + $.urlParam("id")); - fileReader.readAsArrayBuffer(item); - }); + if (book_resp.ok) { + book_data = await book_resp.blob(); + if (book_data) { + await localforage.setItem(Reader.cacheId('book'), book_data); + console.log('saved local data for book'); } else { + $(".loading-message").html("Unable to get book blob data."); + return; + } - console.log("loading from network"); - - if (App.isOnline()) { - const book_url = "backend.php?op=download&id=" + $.urlParam("id"); - - $(".loading-message").html("Downloading…"); + } else { + $(".loading-message").html(`Unable to download book: ${book_resp.status}`); + return; + } - return fetch(book_url, {credentials: 'same-origin'}).then(function(resp) { + } else { + console.log("local data already present for book"); + } - if (resp.status == 200) { - return resp.blob().then(function(blob) { + const fileReader = new FileReader(); - return new Promise(function(resolve, reject) { + fileReader.onload = function() { + try { + Reader.openBookData(this.result); + } catch (e) { + console.error(e); + $(".loading-message").html("Unable to load book blob: " + e); + } + }; - const fileReader = new FileReader(); + fileReader.onerror = (e) => { + console.log('filereader error', e); + $(".loading-message").html("Unable to open book.<br/><small>" + e + "</small>"); + }; - fileReader.onload = function() { - book.open(this.result).then(function() { + fileReader.readAsArrayBuffer(book_data); + }, + openBookData: async function(book_data) { + /* global ePub */ + const book = ePub(); + window.book = book; - // let's store this for later - localforage.setItem(Reader.cacheId('book'), blob).then(function() { - resolve(); - }) + try { + await book.open(book_data); + } catch (e) { + console.error(e); + $(".loading-message").html("Unable to open book.<br/><small>" + e.message + "</small>"); + return; + } - }).catch((e) => { - $(".loading-message").html("Unable to open book.<br/><small>" + e + "</small>"); + await book.ready; - reject(new Error("Unable to open book: " + e)); - }); - }; + console.log('book is ready'); - fileReader.onerror = function(e) { - console.log('filereader error', e); - $(".loading-message").html("Unable to open book.<br/><small>" + e + "</small>"); + await Reader.showBookInfo(book); + await Reader.loadLocations(book); - reject(new Error("Unable to open book: " + e)); - }; + const rendition = book.renderTo("reader", { + width: '100%', + height: '100%', + allowScriptedContent: true, + minSpreadWidth: 961 + }); - fileReader.readAsArrayBuffer(blob); - }); + $(".location").click(async function() { + const current = Math.floor(rendition.currentLocation().start.location / LOCATION_DIVISOR); + const total = Math.floor(book.locations.length() / LOCATION_DIVISOR); - }).catch((e) => { - console.log('blob error', e); - $(".loading-message").html("Unable to download book.<br/><small>" + e + "</small>"); - }); - } else { - $(".loading-message").html("Unable to download book: " + resp.status + "."); - } - }).catch(function(e) { - console.warn(e); + const page = prompt("Jump to location [1-" + total + "]", current); - if ($(".loading").is(":visible")) { - $(".loading-message").html("Unable to load book (remote).<br/><small>" + e + "</small>"); - } - }); + if (page) + await rendition.display(book.locations._locations[page * LOCATION_DIVISOR]); + }); - } else { - $(".loading-message").html("This book is not available offline."); - } - } - }); + const enable_hyphens = await localforage.getItem("epube.enable-hyphens"); - /* global ePub */ - const book = ePub(); - window.book = book; + if (enable_hyphens) { + /* global hyphenationPatternsEnUs, hyphenationPatternsRu, createHyphenator */ + Reader.hyphenate.en = createHyphenator(hyphenationPatternsEnUs, { html: true }); + Reader.hyphenate.ru = createHyphenator(hyphenationPatternsRu, { html: true }); + } - const rendition = book.renderTo("reader", { - width: '100%', - height: '100%', - allowScriptedContent: true, - minSpreadWidth: 961 - }); + Reader.applyStyles(true); - localforage.getItem("epube.enable-hyphens").then(function(enable_hyphens) { - if (enable_hyphens) { - /* global hyphenationPatternsEnUs, hyphenationPatternsRu, createHyphenator */ - Reader.hyphenate.en = createHyphenator(hyphenationPatternsEnUs, { html: true }); - Reader.hyphenate.ru = createHyphenator(hyphenationPatternsRu, { html: true }); - } + console.log('book displayed'); - Reader.applyStyles(true); + Reader.initRenditionHooks(book, rendition); + Reader.initModals(); + Reader.initToc(book); + Reader.initStyleHooks(book); + Reader.Page.openLastRead(rendition); + }, + showBookInfo: async function(book) { + const bookinfo = await localforage.getItem(Reader.cacheId()); - /* rendition.hooks.content.register(function() { - Reader.applyStyles(); - }); */ + let title; + let author; - rendition.display().then(function() { - console.log("book displayed"); - }); + if (bookinfo) { + title = bookinfo.title; + author = bookinfo.author_sort; + } else { + const metadata = book.package.metadata; - }); + title = metadata.title; + author = metadata.creator; + } - rendition.hooks.content.register(async function(contents) { + document.title = title + " – " + author + " – The Epube"; - contents.on("linkClicked", function(href) { - console.log('linkClicked', href); + $(".title") + .text(title) + .attr("title", title + " – " + author); - Reader.prevent_lastread_update = true; + if (typeof EpubeApp != "undefined") { + EpubeApp.setTitle(title); + EpubeApp.showActionBar(false); + } + }, + loadLocations: async function(book) { + console.log('init locations...'); - if (href.indexOf("://") == -1) { - $(".prev_location_btn") - .attr("data-location-cfi", book.rendition.currentLocation().start.cfi) - .show(); + let locations = await localforage.getItem(Reader.cacheId("locations")); - window.setTimeout(function() { - Reader.showUI(true); - }, 50); - } + // legacy format is array of objects {cfi: ..., page: ...} + if (locations && typeof locations[0] == "string") { + console.log('loading local locations...'); - }); + return book.locations.load(locations); + } else { + console.log("requesting locations..."); - const base_url = window.location.href.match(/^.*\//)[0]; + const resp = await fetch("backend.php?op=getpagination&id=" + $.urlParam("id")); - if (typeof EpubeApp != "undefined") { - $(contents.document.head).append($(`<link type="text/css" rel="stylesheet" media="screen" href="/assets/android.css" />`)); - } else { - $(contents.document.head) - .append($("<style type='text/css'>") - .text(Reader.generateFontsCss(base_url))); - } + if (resp.ok) { + console.log("got locations from server"); - const script_names = [ - "dist/app-libs.min.js", - "dist/reader_iframe.min.js" - ]; + locations = await resp.json(); - for (let i = 0; i < script_names.length; i++) { + if (locations && typeof locations[0] == "string") { + console.log('saving locations locally...'); - // we need to create script element with proper context, that is inside the iframe - const elem = contents.document.createElement("script"); - elem.type = 'text/javascript'; - elem.text = Reader.Loader._res_data[base_url + script_names[i]]; + await localforage.setItem(Reader.cacheId("locations"), locations); - contents.document.head.appendChild(elem); + return book.locations.load(locations); } + } - $(contents.document.head) - .append($("<style type='text/css'>") - .text(Reader.Loader._res_data[base_url + 'dist/reader_iframe.min.css'])); + $(".loading-message").html("Preparing locations…"); - const theme = await localforage.getItem("epube.theme") || 'default'; + locations = await book.locations.generate(100); - $(contents.document).find("body") - .attr("class", typeof EpubeApp != "undefined" ? "is-epube-app" : "") - .addClass("theme-" + theme); + $.post("backend.php", { op: "storepagination", id: $.urlParam("id"), + payload: JSON.stringify(locations), total: 100}); - }); + await localforage.setItem(Reader.cacheId("locations"), locations); + } + }, + initRenditionHooks: function(book, rendition) { + rendition.hooks.content.register(async (contents) => { + contents.on("linkClicked", (href) => { + console.log('linkClicked', href); - $('#settings-modal').on('shown.bs.modal', async function() { + Reader.prevent_lastread_update = true; - const last_read = await localforage.getItem(Reader.cacheId("lastread")); + if (href.indexOf("://") == -1) { + $(".prev_location_btn") + .attr("data-location-cfi", rendition.currentLocation().start.cfi) + .show(); - if (last_read && last_read.cfi) { - $(".lastread_input") - .val(last_read.page + '%') - .attr('title', `[local] ${last_read.cfi}`); + window.setTimeout(function() { + Reader.showUI(true); + }, 50); } + }); - if (navigator.onLine) - $.post("backend.php", { op: "getlastread", id: $.urlParam("id") }, (data) => { - $(".lastread_input") - .val(data.page + '%') - .attr('title', `[remote] ${data.cfi}`); - }); + const base_url = window.location.href.match(/^.*\//)[0]; - $(".enable_hyphens_checkbox") - .attr("checked", await localforage.getItem("epube.enable-hyphens")) - .off("click") - .on("click", function(evt) { - localforage.setItem("epube.enable-hyphens", evt.target.checked); + if (typeof EpubeApp != "undefined") { + $(contents.document.head).append($(`<link type="text/css" rel="stylesheet" media="screen" href="/assets/android.css" />`)); + } else { + $(contents.document.head) + .append($("<style type='text/css'>") + .text(Reader.generateFontsCss(base_url))); + } - if (confirm("Toggling hyphens requires page reload. Reload now?")) { - window.location.reload(); - } - }); + const script_names = [ + "dist/app-libs.min.js", + "dist/reader_iframe.min.js" + ]; - if (typeof EpubeApp != "undefined") { - $(".keep_ui_checkbox").parent().parent().hide(); - } else { - $(".keep_ui_checkbox") - .attr("checked", await localforage.getItem("epube.keep-ui-visible")) - .off("click") - .on("click", function(evt) { - localforage.setItem("epube.keep-ui-visible", evt.target.checked); - }); - } + for (let i = 0; i < script_names.length; i++) { - const enable_hacks = await localforage.getItem("epube.enable-column-hacks"); + // we need to create script element with proper context, that is inside the iframe + const elem = contents.document.createElement("script"); + elem.type = 'text/javascript'; + elem.text = Reader.Loader._res_data[base_url + script_names[i]]; - $(".enable_column_hacks_checkbox") - .attr("checked", enable_hacks) - .off("click") - .on("click", function(evt) { - localforage.setItem("epube.enable-column-hacks", evt.target.checked); - }); + contents.document.head.appendChild(elem); + } - const stamp = await localforage.getItem("epube.cache-timestamp"); - const version = await localforage.getItem("epube.cache-version"); + $(contents.document.head) + .append($("<style type='text/css'>") + .text(Reader.Loader._res_data[base_url + 'dist/reader_iframe.min.css'])); - $(".last-mod-timestamp").html(`${version} - — ${parseInt(stamp) ? new Date(stamp*1000).toLocaleString("en-GB") : "Unknown"} - (${App.isOnline() ? `<span class='text-success'>Online</span>` : `<span class='text-danger'>Offline</span>`}) - `); + const theme = await localforage.getItem("epube.theme") || 'default'; - $(".font_family").val(await localforage.getItem("epube.fontFamily") || DEFAULT_FONT_FAMILY); - $(".theme_name").val(await localforage.getItem("epube.theme")); + $(contents.document).find("body") + .attr("class", typeof EpubeApp != "undefined" ? "is-epube-app" : "") + .addClass("theme-" + theme); - const zoom = $(".font_size").html(""); + }); - for (let i = 10; i <= 32; i++) { - const opt = $("<option>").val(i).html(i + " px"); - zoom.append(opt); - } + rendition.on("keyup", (e) => { + Reader.hotkeyHandler(e); + }); - zoom.val(await localforage.getItem("epube.fontSize") || DEFAULT_FONT_SIZE); + rendition.on('rendered', function(/*chapter*/) { + $(".chapter").html($("<span>").addClass("glyphicon glyphicon-th-list")); - const line_height = $(".line_height").html(""); + // TODO: this needs a proper implementation instead of a timeout hack + setTimeout(() => { + Reader.Page._moved_next = 0; + }, 150); - for (let i = 100; i <= 220; i += 10) { - const opt = $("<option>").val(i).html(i + "%"); - line_height.append(opt); - } + Reader.applyTheme(); - line_height.val(await localforage.getItem("epube.lineHeight") || DEFAULT_LINE_HEIGHT); + Reader.resizeSideColumns(); - }); + try { + const location = rendition.currentLocation(); - $('#dict-modal').on('shown.bs.modal', function() { - $(".dict_result").scrollTop(0); - }); + if (location.start) { + const cur_href = book.canonical(location.start.href); + let toc_entry = false; - // TODO: make configurable - $(".dict_search_btn").on("click", function() { - $("#dict-modal").modal('hide'); - window.open("https://duckduckgo.com/?q=" + $(".dict_query").val()); - }); + $.each(Reader.flattenToc(book), function(i, r) { - $(".wiki_search_btn").on("click", function() { - $(".dict_result").html("Loading, please wait..."); + if (book.spine.get(r.href).canonical == cur_href) { + toc_entry = r; + return; + } + }); - $.post("backend.php", {op: "wikisearch", query: $(".dict_query").val()}) - .then((resp) => { - try { - console.log('wikisearch resp', resp); + if (toc_entry && toc_entry.label) + $(".chapter").append(" " + toc_entry.label.trim() + " | "); - let tmp = ""; + Reader.generateTocBar(book, Reader.flattenToc(book)); + } - $.each(resp.query.pages, (i,p) => { - tmp += p.extract; - }); + } catch (e) { + console.warn(e); + } + }); - $(".dict_result").html(tmp && tmp != "undefined" ? tmp : "No definition found for " + $(".dict_query").val() + "."); - } catch (e) { - console.error(e); - $(".dict_result").text("Error while processing data: " + e); - } - }) - .fail((e) => { - console.error(e); - $(".dict_result").text("Error while retrieving data."); - }) - }); + rendition.on('relocated', async (location) => { - function toc_loc_msg(href) { - try { - const cfiBase = book.spine.get(href).cfiBase; + // locations not generated yet + if (book.locations.length() == 0) + return; - const loc = book.locations._locations.find(function(k) { - return k.indexOf(cfiBase) != -1 - }); + localforage.getItem("epube.enable-column-hacks").then((enable) => { + if (enable && Reader.Page._moved_next >= 20) { + console.log('forcing re-render because of column hacks'); - return parseInt(window.book.locations.locationFromCfi(loc) / LOCATION_DIVISOR); + rendition.onResized($("#reader").width()); - } catch (e) { - console.warn(e); + Reader.Page._moved_next = 0; } + }); - return ""; - } + const currentCfi = location.start.cfi; + const currentPct = parseInt(book.locations.percentageFromCfi(currentCfi) * 100); - function process_toc_sublist(row, list, nest) { + $("#cur_page").text(Math.floor(location.start.location / LOCATION_DIVISOR)); + $("#total_pages").text(Math.floor(book.locations.length() / LOCATION_DIVISOR)); + $("#page_pct").text(parseInt(book.locations.percentageFromCfi(currentCfi)*100) + '%'); - if (nest == 3) return false; + Reader.updateTocBarPosition(book, location); - if (row.subitems) { + const displayed = location.start.displayed; - const sublist = $("<ul class='toc_sublist list-unstyled'>"); + if (displayed) { + $("#chapter_cur_page").text(displayed.page); + $("#chapter_total_pages").text(displayed.total); - $.each(row.subitems, function(i, row) { + if (displayed.total > 0) + $("#chapter_pct").text(parseInt(displayed.page / displayed.total * 100) + '%') + } - const a = $("<a>") - .attr('href', '#') - .html("<b class='pull-right'>" + toc_loc_msg(row.href) + "</b>" + row.label) - .attr('data-href', row.href) - .click(function() { - book.rendition.display(a.attr('data-href')); - }); + if (Reader.last_stored_cfi != currentCfi && !Reader.prevent_lastread_update) { + const lastread_timestamp = new Date().getTime(); - sublist.append($("<li>").append(a)); + console.log("storing lastread", currentPct, currentCfi, lastread_timestamp); - process_toc_sublist(row, sublist, nest + 1); + await localforage.setItem(Reader.cacheId("lastread"), + {cfi: currentCfi, page: currentPct, total: 100, timestamp: lastread_timestamp}); - }); + if (App.isOnline()) { + console.log("updating remote lastread", currentCfi); + Reader.last_stored_cfi = currentCfi; - list.append(sublist); + $.post("backend.php", { op: "storelastread", id: $.urlParam("id"), page: currentPct, + cfi: currentCfi, timestamp: lastread_timestamp }); } } - $('#toc-modal').on('shown.bs.modal', function() { + Reader.prevent_lastread_update = false; + }); + }, + initModals: function() { + console.log('initializing modals...'); - const toc = book.navigation.toc; + $('#settings-modal').on('shown.bs.modal', async function() { - const list = $(".toc_list"); - list.html(""); + const last_read = await localforage.getItem(Reader.cacheId("lastread")); - $.each(toc, function(i, row) { - - // if anything fails here the toc entry is likely useless anyway (i.e. no cfi) - try { - const a = $("<a>") - .attr('href', '#') - .html("<b class='pull-right'>" + toc_loc_msg(row.href) + "</b>" + row.label) - .attr('data-href', row.href) - .click(function() { - book.rendition.display(a.attr('data-href')); - }); + if (last_read && last_read.cfi) { + $(".lastread_input") + .val(last_read.page + '%') + .attr('title', `[local] ${last_read.cfi}`); + } - list.append($("<li>").append(a)); + if (navigator.onLine) + $.post("backend.php", { op: "getlastread", id: $.urlParam("id") }, (data) => { + $(".lastread_input") + .val(data.page + '%') + .attr('title', `[remote] ${data.cfi}`); + }); - process_toc_sublist(row, list, 0); + $(".enable_hyphens_checkbox") + .attr("checked", await localforage.getItem("epube.enable-hyphens")) + .off("click") + .on("click", function(evt) { + localforage.setItem("epube.enable-hyphens", evt.target.checked); - } catch (e) { - console.warn(e); + if (confirm("Toggling hyphens requires page reload. Reload now?")) { + window.location.reload(); } }); - // well the toc didn't work out, might as well generate one - if (list.children().length <= 1) { - - list.html(""); - - $.each(book.spine.items, function (i, row) { - - const a = $("<a>") - .attr('href', '#') - .attr('title', row.url) - .html("Section " + (i+1)) - .attr('data-href', row.href) - .click(function() { - book.rendition.display(a.attr('data-href')); - }); + if (typeof EpubeApp != "undefined") { + $(".keep_ui_checkbox").parent().parent().hide(); + } else { + $(".keep_ui_checkbox") + .attr("checked", await localforage.getItem("epube.keep-ui-visible")) + .off("click") + .on("click", function(evt) { + localforage.setItem("epube.keep-ui-visible", evt.target.checked); + }); + } - list.append($("<li>").append(a)); + const enable_hacks = await localforage.getItem("epube.enable-column-hacks"); - }); - } + $(".enable_column_hacks_checkbox") + .attr("checked", enable_hacks) + .off("click") + .on("click", function(evt) { + localforage.setItem("epube.enable-column-hacks", evt.target.checked); + }); - }); + const stamp = await localforage.getItem("epube.cache-timestamp"); + const version = await localforage.getItem("epube.cache-version"); - /* embedded styles may conflict with our font sizes, etc */ - book.spine.hooks.content.register(function(doc/*, section */) { - - $(doc).find("p") - .filter((i, e) => (($(e).text().length >= MIN_LENGTH_TO_JUSTIFY) ? e : null)) - .css("text-align", "justify"); - - $(doc).find("html") - .attr("class", ""); - - $(doc).find("pre") - .css("white-space", "pre-wrap"); - - $(doc).find("a, p, span, em, i, strong, b, body, header, section, div, big, small, table, tr, td, ul, ol, li") - .attr("class", "") - .css("font-family", "inherit") - .css("font-size", "inherit") - .css("line-height", "inherit") - .css("color", "") - .css("border", "none ! important") - .css("background", "") - .css("background-color", "") - .attr("width", "") - .attr("height", ""); - - // same as above except for allowed font-size - $(doc).find("h1, h2, h3, h4, h5") - .attr("class", "") - .css("font-family", "inherit") - .css("color", "") - .css("border", "none ! important") - .css("background", "") - .css("background-color", ""); + $(".last-mod-timestamp").html(`${version} + — ${parseInt(stamp) ? new Date(stamp*1000).toLocaleString("en-GB") : "Unknown"} + (${App.isOnline() ? `<span class='text-success'>Online</span>` : `<span class='text-danger'>Offline</span>`}) + `); - if (typeof Reader.hyphenate.en != "undefined") { - $(doc).find('p, div').each((i,p) => { - p = $(p); + $(".font_family").val(await localforage.getItem("epube.fontFamily") || DEFAULT_FONT_FAMILY); + $(".theme_name").val(await localforage.getItem("epube.theme")); - p.html(Reader.hyphenate.en(p.html())); - p.html(Reader.hyphenate.ru(p.html())); - }); - } - }); + const zoom = $(".font_size").html(""); - book.ready.then(function() { - return localforage.getItem(Reader.cacheId()).then((bookinfo) => { + for (let i = 10; i <= 32; i++) { + const opt = $("<option>").val(i).html(i + " px"); + zoom.append(opt); + } - let title; - let author; + zoom.val(await localforage.getItem("epube.fontSize") || DEFAULT_FONT_SIZE); - if (bookinfo) { - title = bookinfo.title; - author = bookinfo.author_sort; - } else { - const metadata = book.package.metadata; + const line_height = $(".line_height").html(""); - title = metadata.title; - author = metadata.creator; - } + for (let i = 100; i <= 220; i += 10) { + const opt = $("<option>").val(i).html(i + "%"); + line_height.append(opt); + } - document.title = title + " – " + author + " – The Epube"; - $(".title") - .text(title) - .attr("title", title + " – " + author); + line_height.val(await localforage.getItem("epube.lineHeight") || DEFAULT_LINE_HEIGHT); - if (typeof EpubeApp != "undefined") { - EpubeApp.setTitle(title); - EpubeApp.showActionBar(false); - } + }); - return localforage.getItem(Reader.cacheId("locations")).then(function(locations) { + $('#dict-modal').on('shown.bs.modal', function() { + $(".dict_result").scrollTop(0); + }); - console.log('stored pagination', locations != null); + // TODO: make configurable + $(".dict_search_btn").on("click", function() { + $("#dict-modal").modal('hide'); + window.open("https://duckduckgo.com/?q=" + $(".dict_query").val()); + }); - // legacy format is array of objects {cfi: ..., page: ...} - if (locations && typeof locations[0] == "string") { - Reader.Page._pagination_stored = 1; - return book.locations.load(locations); - } else { - console.log("requesting pagination..."); - - const url = "backend.php?op=getpagination&id=" + encodeURIComponent($.urlParam("id")); - - return fetch(url, {credentials:'same-origin'}).then(function(resp) { - - if (resp.ok) { - return resp.json().then(function(locations) { - if (locations && typeof locations[0] == "string") { - Reader.Page._pagination_stored = 1; - return book.locations.load(locations); - } else { - $(".loading-message").html("Preparing locations…"); - return book.locations.generate(100); - } - }); - } else { - $(".loading-message").html("Preparing locations…"); - return book.locations.generate(100); - } - }).catch(function() { - $(".loading-message").html("Preparing locations…"); - return book.locations.generate(100); - }); - } - }); + $(".wiki_search_btn").on("click", function() { + $(".dict_result").html("Loading, please wait..."); - }); + $.post("backend.php", {op: "wikisearch", query: $(".dict_query").val()}) + .then((resp) => { + try { + console.log('wikisearch resp', resp); - }).then(function(locations) { + let tmp = ""; - console.log("locations ready, stored=", Reader.Page._pagination_stored); + $.each(resp.query.pages, (i,p) => { + tmp += p.extract; + }); - if (locations) { - if (App.isOnline() && !Reader.Page._pagination_stored) { - $.post("backend.php", { op: "storepagination", id: $.urlParam("id"), - payload: JSON.stringify(locations), total: 100}); + $(".dict_result").html(tmp && tmp != "undefined" ? tmp : "No definition found for " + $(".dict_query").val() + "."); + } catch (e) { + console.error(e); + $(".dict_result").text("Error while processing data: " + e); } + }) + .fail((e) => { + console.error(e); + $(".dict_result").text("Error while retrieving data."); + }) + }); + }, + initToc: function(book) { + console.log('initializing toc modal...'); - // store if needed - localforage.getItem(Reader.cacheId("locations")).then(function(item) { - if (!item) localforage.setItem(Reader.cacheId("locations"), locations); - }); + function toc_loc_msg(href) { + try { + const cfiBase = book.spine.get(href).cfiBase; - } else { - $(".loading-message").html("Could not generate locations."); - return; - } + const loc = book.locations._locations.find(function(k) { + return k.indexOf(cfiBase) != -1 + }); - $(".location").click(function() { - const current = Math.floor(book.rendition.currentLocation().start.location / LOCATION_DIVISOR); - const total = Math.floor(book.locations.length() / LOCATION_DIVISOR); + return parseInt(window.book.locations.locationFromCfi(loc) / LOCATION_DIVISOR); - const page = prompt("Jump to location [1-" + total + "]", current); + } catch (e) { + console.warn(e); + } - if (page) { - book.rendition.display(book.locations._locations[page * LOCATION_DIVISOR]); - } - }); - Reader.Page.openLastRead(); + return ""; + } - window.setTimeout(function() { - Reader.Page.openLastRead(); + function process_toc_sublist(row, list, nest) { - $(".loading").hide(); - }, 250); - }); + if (nest == 3) return false; - rendition.on("keyup", (e) => { - Reader.hotkeyHandler(e); - }); + if (row.subitems) { - /*rendition.on('resized', function() { - console.log('resized'); + const sublist = $("<ul class='toc_sublist list-unstyled'>"); - $(".loading").show(); - $(".loading-message").html("Opening chapter…"); + $.each(row.subitems, function(i, row) { - window.setTimeout(function() { - Reader.resizeSideColumns(); - Reader.Page.openLastRead(); + const a = $("<a>") + .attr('href', '#') + .html("<b class='pull-right'>" + toc_loc_msg(row.href) + "</b>" + row.label) + .attr('data-href', row.href) + .click(function() { + book.rendition.display(a.attr('data-href')); + }); - $(".loading").hide(); - }, 250); - });*/ + sublist.append($("<li>").append(a)); - rendition.on('rendered', function(/*chapter*/) { - $(".chapter").html($("<span>").addClass("glyphicon glyphicon-th-list")); + process_toc_sublist(row, sublist, nest + 1); - // TODO: this needs a proper implementation instead of a timeout hack - setTimeout(() => { - Reader.Page._moved_next = 0; - }, 150); + }); - Reader.applyTheme(); + list.append(sublist); + } + } - Reader.resizeSideColumns(); + $('#toc-modal').on('shown.bs.modal', function() { - try { - const location = book.rendition.currentLocation(); + const toc = book.navigation.toc; - if (location.start) { - const cur_href = book.canonical(location.start.href); - let toc_entry = false; + const list = $(".toc_list"); + list.html(""); - $.each(Reader.flattenToc(book), function(i, r) { + $.each(toc, function(i, row) { - if (book.spine.get(r.href).canonical == cur_href) { - toc_entry = r; - return; - } + // if anything fails here the toc entry is likely useless anyway (i.e. no cfi) + try { + const a = $("<a>") + .attr('href', '#') + .html("<b class='pull-right'>" + toc_loc_msg(row.href) + "</b>" + row.label) + .attr('data-href', row.href) + .click(function() { + book.rendition.display(a.attr('data-href')); }); - if (toc_entry && toc_entry.label) - $(".chapter").append(" " + toc_entry.label.trim() + " | "); + list.append($("<li>").append(a)); - Reader.generateTocBar(book, Reader.flattenToc(book)); - } + process_toc_sublist(row, list, 0); } catch (e) { console.warn(e); } }); - rendition.on('relocated', function(location) { - - // locations not generated yet - if (book.locations.length() == 0) - return; - - localforage.getItem("epube.enable-column-hacks").then((enable) => { - if (enable && Reader.Page._moved_next >= 20) { - console.log('forcing re-render because of column hacks'); - - window.book.rendition.onResized($("#reader").width()); - - Reader.Page._moved_next = 0; - } - }); + // well the toc didn't work out, might as well generate one + if (list.children().length <= 1) { - const currentCfi = location.start.cfi; - const currentPct = parseInt(book.locations.percentageFromCfi(currentCfi) * 100); + list.html(""); - $("#cur_page").text(Math.floor(location.start.location / LOCATION_DIVISOR)); - $("#total_pages").text(Math.floor(book.locations.length() / LOCATION_DIVISOR)); - $("#page_pct").text(parseInt(book.locations.percentageFromCfi(currentCfi)*100) + '%'); + $.each(book.spine.items, function (i, row) { - Reader.updateTocBarPosition(book, location); + const a = $("<a>") + .attr('href', '#') + .attr('title', row.url) + .html("Section " + (i+1)) + .attr('data-href', row.href) + .click(function() { + book.rendition.display(a.attr('data-href')); + }); - const displayed = location.start.displayed; + list.append($("<li>").append(a)); - if (displayed) { - $("#chapter_cur_page").text(displayed.page); - $("#chapter_total_pages").text(displayed.total); + }); + } - if (displayed.total > 0) - $("#chapter_pct").text(parseInt(displayed.page / displayed.total * 100) + '%') - } + }); + }, + initStyleHooks: function(book) { + console.log('registering style hooks...'); - if (Reader.last_stored_cfi != currentCfi && !Reader.prevent_lastread_update) { - const lastread_timestamp = new Date().getTime(); + /* embedded styles may conflict with our font sizes, etc */ + book.spine.hooks.content.register(function(doc/*, section */) { - console.log("storing lastread", currentPct, currentCfi, lastread_timestamp); + $(doc).find("p") + .filter((i, e) => (($(e).text().length >= MIN_LENGTH_TO_JUSTIFY) ? e : null)) + .css("text-align", "justify"); - localforage.setItem(Reader.cacheId("lastread"), - {cfi: currentCfi, page: currentPct, total: 100, timestamp: lastread_timestamp}); + $(doc).find("html") + .attr("class", ""); - if (App.isOnline()) { - console.log("updating remote lastread", currentCfi); - Reader.last_stored_cfi = currentCfi; + $(doc).find("pre") + .css("white-space", "pre-wrap"); - $.post("backend.php", { op: "storelastread", id: $.urlParam("id"), page: currentPct, - cfi: currentCfi, timestamp: lastread_timestamp }).then(() => { - // - }) - .fail(function(e) { - if (e && e.status == 401) { - window.location = "index.php"; - } - }); - } - } - - Reader.prevent_lastread_update = false; - }); + $(doc).find("a, p, span, em, i, strong, b, body, header, section, div, big, small, table, tr, td, ul, ol, li") + .attr("class", "") + .css("font-family", "inherit") + .css("font-size", "inherit") + .css("line-height", "inherit") + .css("color", "") + .css("border", "none ! important") + .css("background", "") + .css("background-color", "") + .attr("width", "") + .attr("height", ""); + + // same as above except for allowed font-size + $(doc).find("h1, h2, h3, h4, h5") + .attr("class", "") + .css("font-family", "inherit") + .css("color", "") + .css("border", "none ! important") + .css("background", "") + .css("background-color", ""); + + if (typeof Reader.hyphenate.en != "undefined") { + $(doc).find('p, div').each((i,p) => { + p = $(p); + + p.html(Reader.hyphenate.en(p.html())); + p.html(Reader.hyphenate.ru(p.html())); + }); + } }); }, generateFontsCss: function(base_url) { @@ -1348,7 +1268,6 @@ const Reader = { }, }, Page: { - _pagination_stored: 0, _moved_next: 0, next: function() { window.book.rendition.next(); @@ -1372,83 +1291,61 @@ const Reader = { if (!keep) Reader.showUI(false); }); }, - openPrevious: function(elem) { + openPrevious: async function(elem) { const cfi = $(elem).attr("data-location-cfi"); - if (cfi) { - window.book.rendition.display(cfi); - } + if (cfi) + await window.book.rendition.display(cfi); $(elem).fadeOut(); }, - clearLastRead: function() { + clearLastRead: async function() { if (confirm("Clear stored last read location?")) { const total = window.book.locations.length(); const lastread_timestamp = new Date().getTime(); if (App.isOnline()) { - $.post("backend.php", { op: "storelastread", page: PAGE_RESET_PROGRESS, cfi: "", id: $.urlParam("id"), timestamp: lastread_timestamp }, function(data) { - $(".lastread_input").val(data.page + '%'); - }); + const data = await $.post("backend.php", { op: "storelastread", page: PAGE_RESET_PROGRESS, cfi: "", id: $.urlParam("id"), timestamp: lastread_timestamp }); + + $(".lastread_input").val(data.page + '%'); } - localforage.setItem(Reader.cacheId("lastread"), + await localforage.setItem(Reader.cacheId("lastread"), {cfi: "", page: 0, total: total, timestamp: lastread_timestamp}); - window.setTimeout(function() { - window.book.rendition.display(window.book.locations.cfiFromPercentage(0)); - }, 250); + await window.book.rendition.display(window.book.locations.cfiFromPercentage(0)); } }, - openLastRead: function(local_only) { - localforage.getItem(Reader.cacheId("lastread")).then(function(lr_local) { - console.log('lr local', lr_local); - - lr_local = lr_local || {}; + openLastRead: async function(rendition) { + const lr_local = await localforage.getItem(Reader.cacheId("lastread")) || {}; - // CFI missing or w/e + if (lr_local && lr_local.cfi) { + console.log('using local lastread cfi', lr_local.cfi); try { - - // this is ridiculous tbh - if (lr_local.cfi) window.book.rendition.display(lr_local.cfi).then(() => { - $(".loading").hide(); - - if (lr_local.cfi) - window.book.rendition.display(lr_local.cfi); - }); - + await rendition.display(lr_local.cfi); } catch (e) { console.warn(e); } + } - if (App.isOnline() && !local_only) { - $.post("backend.php", { op: "getlastread", id: $.urlParam("id") }, function(lr_remote) { - console.log('lr remote', lr_remote); - - if (App.isOnline() && lr_remote) { - try { - if (lr_remote.cfi && lr_local.cfi != lr_remote.cfi && lr_remote.timestamp > lr_local.timestamp) - console.log('using remote lastread (timestamp is newer)'); + if (App.isOnline()) { + const lr_remote = await $.post("backend.php", { op: "getlastread", id: $.urlParam("id") }); - localforage.setItem(Reader.cacheId("lastread"), - {cfi: lr_remote.cfi, page: lr_remote.page, total: lr_remote.total, timestamp: lr_remote.timestamp}); + console.log('got remote lastread', lr_remote, lr_local); - window.book.rendition.display(lr_remote.cfi).then(() => { - window.book.rendition.display(lr_remote.cfi); - }); + if (lr_remote) { + if (lr_remote.cfi && lr_local.cfi != lr_remote.cfi && (!lr_local.timestamp || lr_remote.timestamp <= lr_local.timestamp)) { + console.log('using remote lastread (timestamp is newer or local timestamp is missing)'); - } catch (e) { - console.warn(e); - } + await localforage.setItem(Reader.cacheId("lastread"), + {cfi: lr_remote.cfi, page: lr_remote.page, total: lr_remote.total, timestamp: lr_remote.timestamp}); - } - }).fail(function(e) { - if (e && e.status == 401) { - window.location = "index.php"; - } - }); + await rendition.display(lr_remote.cfi); + } } - }); + } + + $(".loading").hide(); }, }, Settings: { diff --git a/lib/bootstrap/v3/js/jquery.js b/lib/bootstrap/v3/js/jquery.js index e2c203f..1a86433 100644 --- a/lib/bootstrap/v3/js/jquery.js +++ b/lib/bootstrap/v3/js/jquery.js @@ -1,251 +1,189 @@ /*! - * jQuery JavaScript Library v1.9.1 - * http://jquery.com/ + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors + * Copyright OpenJS Foundation and other contributors * Released under the MIT license - * http://jquery.org/license + * https://jquery.org/license * - * Date: 2013-2-4 + * Date: 2023-08-28T13:37Z */ -(function( window, undefined ) { +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket trac-14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - // A central reference to the root jQuery(document) - rootjQuery, +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; - // Support: IE<9 - // For `typeof node.method` instead of `node.method !== undefined` - core_strundefined = typeof undefined, +var arr = []; - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, +var getProto = Object.getPrototypeOf; - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, +var slice = arr.slice; - // Map over the $ in case of overwrite - _$ = window.$, +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; - // [[Class]] -> type pairs - class2type = {}, - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], +var push = arr.push; - core_version = "1.9.1", +var indexOf = arr.indexOf; - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, +var class2type = {}; - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, +var toString = class2type.toString; - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, +var hasOwn = class2type.hasOwnProperty; - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, +var fnToString = hasOwn.toString; - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, +var ObjectFunctionString = fnToString.call( Object ); - // A simple way to check for HTML strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, +var support = {}; - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, +var isFunction = function isFunction( obj ) { - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML <object> elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; }; -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; +var document = window.document; - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - } else { - match = rquickExpr.exec( selector ); - } + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { + function DOMEval( code, node, doc ) { + doc = doc || document; - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; + var i, val, + script = doc.createElement( "script" ); - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - return this; +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - this.context = document; - this.selector = selector; - return this; - } - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); +var version = "3.7.1", - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } + rhtmlSuffix = /HTML$/i, - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; + // Define a local copy of jQuery + jQuery = function( selector, context ) { - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } +jQuery.fn = jQuery.prototype = { - return jQuery.makeArray( selector, this ); - }, + // The current version of jQuery being used + jquery: version, - // Start with an empty selector - selector: "", + constructor: jQuery, // The default length of a jQuery object is 0 length: 0, - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - toArray: function() { - return core_slice.call( this ); + return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { - return num == null ? - // Return a 'clean' array - this.toArray() : + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack @@ -257,28 +195,24 @@ jQuery.fn = jQuery.prototype = { // Add the old object onto the stack (as a reference) ret.prevObject = this; - ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); + each: function( callback ) { + return jQuery.each( this, callback ); }, - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); }, slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); + return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { @@ -289,35 +223,38 @@ jQuery.fn = jQuery.prototype = { return this.eq( -1 ); }, + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { - return this.prevObject || this.constructor(null); + return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice + push: push, + sort: arr.sort, + splice: arr.splice }; -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; @@ -325,44 +262,52 @@ jQuery.extend = jQuery.fn.extend = function() { // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; } // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } - // extend jQuery itself if only one argument is passed - if ( length === i ) { + // Extend jQuery itself if only one argument is passed + if ( i === length ) { target = this; - --i; + i--; } for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { + if ( ( options = arguments[ i ] ) != null ) { + // Extend the base object for ( name in options ) { - src = target[ name ]; copy = options[ name ]; + // Prevent Object.prototype pollution // Prevent never-ending loop - if ( target === copy ) { + if ( name === "__proto__" || target === copy ) { continue; } // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; + clone = src; } + copyIsArray = false; // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); @@ -379,603 +324,2834 @@ jQuery.extend = jQuery.fn.extend = function() { return target; }; -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; } - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; } - return jQuery; + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, + isEmptyObject: function( obj ) { + var name; - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, + for ( name in obj ) { + return false; + } + return true; + }, - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } } else { - jQuery.ready( true ); + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } } + + return obj; }, - // Handle when the DOM is ready - ready: function( wait ) { - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } + // Retrieve the text value of an array of DOM nodes + text: function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } + if ( !nodeType ) { - // Remember that the DOM is ready - jQuery.isReady = true; + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; + // Do not traverse comment nodes + ret += jQuery.text( node ); + } + } + if ( nodeType === 1 || nodeType === 11 ) { + return elem.textContent; + } + if ( nodeType === 9 ) { + return elem.documentElement.textContent; + } + if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; } - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); + // Do not include comment or processing instruction nodes + + return ret; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } } + + return ret; }, - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); }, - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; + isXMLDoc: function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Assume HTML when documentElement doesn't yet exist, such as inside + // document fragments. + return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" ); }, - isWindow: function( obj ) { - return obj != null && obj == obj.window; + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; }, - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; }, - type: function( obj ) { - if ( obj == null ) { - return String( obj ); + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; + + // Flatten any nested arrays + return flat( ret ); }, - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var pop = arr.pop; + + +var sort = arr.sort; + + +var splice = arr.splice; + + +var whitespace = "[\\x20\\t\\r\\n\\f]"; + + +var rtrimCSS = new RegExp( + "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", + "g" +); + + + + +// Note: an element does not contain itself +jQuery.contains = function( a, b ) { + var bup = b && b.parentNode; + + return a === bup || !!( bup && bup.nodeType === 1 && ( + + // Support: IE 9 - 11+ + // IE doesn't have `contains` on SVG. + a.contains ? + a.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); +}; + + + + +// CSS string/identifier serialization +// https://drafts.csswg.org/cssom/#common-serializing-idioms +var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; + +function fcssescape( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; } - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; +} + +jQuery.escapeSelector = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + + + + +var preferredDoc = document, + pushNative = push; + +( function() { + +var i, + Expr, + outermostContext, + sortInput, + hasDuplicate, + push = pushNative, + + // Local document vars + document, + documentElement, + documentIsHTML, + rbuggyQSA, + matches, + + // Instance-specific data + expando = jQuery.expando, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; } + return 0; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" + + "loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + - var key; - for ( key in obj ) {} + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), - return key === undefined || core_hasOwn.call( obj, key ); + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + + whitespace + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + ID: new RegExp( "^#(" + identifier + ")" ), + CLASS: new RegExp( "^\\.(" + identifier + ")" ), + TAG: new RegExp( "^(" + identifier + "|[*])" ), + ATTR: new RegExp( "^" + attributes ), + PSEUDO: new RegExp( "^" + pseudos ), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + bool: new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + needsContext: new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + if ( nonHex ) { + + // Strip the backslash prefix from a non-hex escape sequence + return nonHex; } - return true; + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + return high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, - error: function( msg ) { - throw new Error( msg ); + // Used for iframes; see `setDocument`. + // Support: IE 9 - 11+, Edge 12 - 18+ + // Removing the function wrapper causes a "Permission Denied" + // error in IE/Edge. + unloadHandler = function() { + setDocument(); }, - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && nodeName( elem, "fieldset" ); + }, + { dir: "parentNode", next: "legend" } + ); + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android <=4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { + apply: function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + }, + call: function( target ) { + pushNative.apply( target, slice.call( arguments, 1 ) ); } + }; +} + +function find( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); context = context || document; - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE 9 only + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + push.call( results, elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE 9 only + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + find.contains( context, elem ) && + elem.id === m ) { + + push.call( results, elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; + // Class selector + } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when + // strict-comparing two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( newContext != context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = jQuery.escapeSelector( nid ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } } + } - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); + // All others + return select( selector.replace( rtrimCSS, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties + // (see https://github.com/jquery/sizzle/issues/157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; } - return jQuery.merge( [], parsed.childNodes ); - }, + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by jQuery selector module + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); } - if ( data === null ) { - return data; + // release memory in IE + el = null; + } +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + return nodeName( elem, "input" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) && + elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11+ + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; } - if ( typeof data === "string" ) { + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { +/** + * Checks a node for validity as a jQuery selector context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} - return ( new Function( "return " + data ) )(); +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [node] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +function setDocument( node ) { + var subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + documentElement = document.documentElement; + documentIsHTML = !jQuery.isXMLDoc( document ); + + // Support: iOS 7 only, IE 9 - 11+ + // Older browsers didn't support unprefixed `matches`. + matches = documentElement.matches || + documentElement.webkitMatchesSelector || + documentElement.msMatchesSelector; + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors + // (see trac-13936). + // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`, + // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well. + if ( documentElement.msMatchesSelector && + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 9 - 11+, Edge 12 - 18+ + subWindow.addEventListener( "unload", unloadHandler ); + } + + // Support: IE <10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + documentElement.appendChild( el ).id = jQuery.expando; + return !document.getElementsByName || + !document.getElementsByName( jQuery.expando ).length; + } ); + + // Support: IE 9 only + // Check to see if it's possible to do matchesSelector + // on a disconnected node. + support.disconnectedMatch = assert( function( el ) { + return matches.call( el, "*" ); + } ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // IE/Edge don't support the :scope pseudo-class. + support.scope = assert( function() { + return document.querySelectorAll( ":scope" ); + } ); + + // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only + // Make sure the `:has()` argument is parsed unforgivingly. + // We include `*` in the test to detect buggy implementations that are + // _selectively_ forgiving (specifically when the list includes at least + // one valid selector). + // Note that we treat complete lack of support for `:has()` as if it were + // spec-compliant support, which is fine because use of `:has()` in such + // environments will fail in the qSA path and fall back to jQuery traversal + // anyway. + support.cssHas = assert( function() { + try { + document.querySelector( ":has(*,:jqfake)" ); + return false; + } catch ( e ) { + return true; + } + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter.ID = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find.ID = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter.ID = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find.ID = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } } + + return []; } + }; + } + + // Tag + Expr.find.TAG = function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else { + return context.querySelectorAll( tag ); } + }; - jQuery.error( "Invalid JSON: " + data ); - }, + // Class + Expr.find.CLASS = function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + rbuggyQSA = []; + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + documentElement.appendChild( el ).innerHTML = + "<a id='" + expando + "' href='' disabled='disabled'></a>" + + "<select id='" + expando + "-\r\\' disabled='disabled'>" + + "<option selected=''></option></select>"; + + // Support: iOS <=7 - 8 only + // Boolean attributes and "value" are not treated correctly in some XML documents + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: iOS <=7 - 8 only + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: iOS 8 only + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE 9 - 11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + documentElement.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + } ); + + if ( !support.cssHas ) { + + // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+ + // Our regular `try-catch` mechanism fails to detect natively-unsupported + // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`) + // in browsers that parse the `:has()` argument as a forgiving selector list. + // https://drafts.csswg.org/selectors/#relational now requires the argument + // to be parsed unforgivingly, but browsers have not yet fully adjusted. + rbuggyQSA.push( ":has" ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a === document || a.ownerDocument == preferredDoc && + find.contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b === document || b.ownerDocument == preferredDoc && + find.contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; } + + return compare & 4 ? -1 : 1; + }; + + return document; +} + +find.matches = function( expr, elements ) { + return find( expr, null, null, elements ); +}; + +find.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; } - } catch( e ) { - xml = undefined; + } catch ( e ) { + nonnativeSelectorCache( expr, true ); } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); + } + + return find( expr, document, null, [ elem ] ).length > 0; +}; + +find.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return jQuery.contains( context, elem ); +}; + + +find.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (see trac-13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + if ( val !== undefined ) { + return val; + } + + return elem.getAttribute( name ); +}; + +find.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +jQuery.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + // + // Support: Android <=4.0+ + // Testing for detecting duplicates is unpredictable so instead assume we can't + // depend on duplicate detection in all browsers without a stable sort. + hasDuplicate = !support.sortStable; + sortInput = !support.sortStable && slice.call( results, 0 ); + sort.call( results, sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + splice.call( results, duplicates[ j ], 1 ); } - return xml; + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +jQuery.fn.uniqueSort = function() { + return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) ); +}; + +Expr = jQuery.expr = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } }, - noop: function() {}, + preFilter: { + ATTR: function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" ) + .replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); + return match.slice( 0, 4 ); + }, + + CHILD: function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + find.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) + ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + find.error( match[ 0 ] ); + } + + return match; + }, + + PSEUDO: function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr.CHILD.test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); } }, - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, + filter: { + + TAG: function( nodeNameSelector ) { + var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return nodeName( elem, expectedNodeName ); + }; + }, + + CLASS: function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + ")" + className + + "(" + whitespace + "|$)" ) ) && + classCache( className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + ATTR: function( name, operator, check ) { + return function( elem ) { + var result = find.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + result += ""; + + if ( operator === "=" ) { + return result === check; + } + if ( operator === "!=" ) { + return result !== check; + } + if ( operator === "^=" ) { + return check && result.indexOf( check ) === 0; + } + if ( operator === "*=" ) { + return check && result.indexOf( check ) > -1; + } + if ( operator === "$=" ) { + return check && result.slice( -check.length ) === check; + } + if ( operator === "~=" ) { + return ( " " + result.replace( rwhitespace, " " ) + " " ) + .indexOf( check ) > -1; + } + if ( operator === "|=" ) { + return result === check || result.slice( 0, check.length + 1 ) === check + "-"; + } + + return false; + }; + }, + + CHILD: function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + nodeName( node, name ) : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || ( parent[ expando ] = {} ); + cache = outerCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + cache = outerCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + nodeName( node, name ) : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + outerCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + PSEUDO: function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // https://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + find.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as jQuery does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } }, - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); + pseudos: { - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); + // Potentially complex pseudos + not: markFunction( function( selector ) { - if ( value === false ) { - break; + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrimCSS, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element + // (see https://github.com/jquery/sizzle/issues/299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + has: markFunction( function( selector ) { + return function( elem ) { + return find( selector, elem ).length > 0; + }; + } ), + + contains: markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // https://www.w3.org/TR/selectors/#lang-pseudo + lang: markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + find.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + target: function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + root: function( elem ) { + return elem === documentElement; + }, + + focus: function( elem ) { + return elem === safeActiveElement() && + document.hasFocus() && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + enabled: createDisabledPseudo( false ), + disabled: createDisabledPseudo( true ), + + checked: function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + return ( nodeName( elem, "input" ) && !!elem.checked ) || + ( nodeName( elem, "option" ) && !!elem.selected ); + }, + + selected: function( elem ) { + + // Support: IE <=11+ + // Accessing the selectedIndex property + // forces the browser to treat the default option as + // selected when in an optgroup. + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + empty: function( elem ) { + + // https://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; } + } + return true; + }, + + parent: function( elem ) { + return !Expr.pseudos.empty( elem ); + }, + + // Element/input types + header: function( elem ) { + return rheader.test( elem.nodeName ); + }, + + input: function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + button: function( elem ) { + return nodeName( elem, "input" ) && elem.type === "button" || + nodeName( elem, "button" ); + }, + + text: function( elem ) { + var attr; + return nodeName( elem, "input" ) && elem.type === "text" && + + // Support: IE <10 only + // New HTML5 attribute values (e.g., "search") appear + // with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + first: createPositionalPseudo( function() { + return [ 0 ]; + } ), + + last: createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + eq: createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + even: createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + odd: createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + lt: createPositionalPseudo( function( matchIndexes, length, argument ) { + var i; + + if ( argument < 0 ) { + i = argument + length; + } else if ( argument > length ) { + i = length; } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); + i = argument; + } - if ( value === false ) { - break; - } + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + gt: createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos.nth = Expr.pseudos.eq; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rleadingCombinator.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrimCSS, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + if ( parseOnly ) { + return soFar.length; + } + + return soFar ? + find.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); } } + return false; + } : - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; - if ( value === false ) { - break; + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } } } } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - if ( value === false ) { - break; + if ( skip && nodeName( elem, skip ) ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = outerCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + outerCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } } } } - } - - return obj; - }, + return false; + }; +} - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; } : + matchers[ 0 ]; +} - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + find( selector, contexts[ i ], results ); + } + return results; +} - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } } } + } - return ret; - }, + return newUnmatched; +} - inArray: function( elem, arr, i ) { - var len; +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, matcherOut, + preMap = [], + postMap = [], + preexisting = results.length, - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } + // Get initial elements from seed or context + elems = seed || + multipleContexts( selector || "*", + context.nodeType ? [ context ] : context, [] ), - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems; - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; + if ( matcher ) { + + // If we have a postFinder, or filtered seed, or non-seed postFilter + // or preexisting results, + matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results; + + // Find primary matches + matcher( matcherIn, matcherOut, context, xml ); + } else { + matcherOut = matcherIn; + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); } } } - return -1; - }, + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) { - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; + seed[ temp ] = !( results[ temp ] = elem ); + } + } } + + // Add elements to results, through postFinder if defined } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); } } + } ); +} - first.length = i; +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, - return first; - }, + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); + // Avoid hanging onto element + // (see https://github.com/jquery/sizzle/issues/299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrimCSS, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); } + matchers.push( matcher ); } + } - return ret; - }, + return elementMatcher( matchers ); +} - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find.TAG( "*", outermost ), - if ( value != null ) { - ret[ ret.length ] = value; + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: iOS <=7 - 9 only + // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching + // elements by id. (see trac-14142) + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + push.call( results, elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } } } - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; - if ( value != null ) { - ret[ ret.length ] = value; + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + jQuery.uniqueSort( results ); } } - } - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } - // A global GUID counter for objects - guid: 1, + return unmatched; + }; - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } +function compile( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } } - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; + // Cache the compiled function + cached = compilerCache( selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; + // Save selector and tokenization + cached.selector = selector; + } + return cached; +} - return proxy; - }, +/** + * A low-level selection function that works with jQuery's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with jQuery selector compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find.ID( + token.matches[ 0 ].replace( runescape, funescape ), + context + ) || [] )[ 0 ]; + if ( !context ) { + return results; - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; } - // Sets one value - } else if ( value !== undefined ) { - chainable = true; + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; - if ( !jQuery.isFunction( value ) ) { - raw = true; + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; } + if ( ( find = Expr.find[ type ] ) ) { - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && + testContext( context.parentNode ) || context + ) ) ) { - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; } } + } + } - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +} + +// One-time assignments + +// Support: Android <=4.0 - 4.1+ +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Initialize against the default document +setDocument(); + +// Support: Android <=4.0 - 4.1+ +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +jQuery.find = find; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.unique = jQuery.uniqueSort; + +// These have always been private, but they used to be documented as part of +// Sizzle so let's maintain them for now for backwards compatibility purposes. +find.compile = compile; +find.select = select; +find.setDocument = setDocument; +find.tokenize = tokenize; + +find.escape = jQuery.escapeSelector; +find.getText = jQuery.text; +find.isXML = jQuery.isXMLDoc; +find.selectors = jQuery.expr; +find.support = jQuery.support; +find.uniqueSort = jQuery.uniqueSort; + + /* eslint-enable */ + +} )(); + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); } - return chainable ? - elems : + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, - now: function() { - return ( new Date() ).getTime(); + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; } -}); +} ); -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - readyList = jQuery.Deferred(); +// Initialize a jQuery object - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); +// A central reference to the root jQuery(document) +var rootjQuery, - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521) + // Strict HTML recognition (trac-11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } - // If IE and not a frame - // continually check to see if the document is ready - var top = false; + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } } + } + + return this; - // detach all dom ready events - detach(); + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { - // and execute any waiting functions - jQuery.ready(); + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; } - })(); + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); } - } - return readyList.promise( obj ); -}; -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); + return jQuery.makeArray( selector, this ); + }; -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; - if ( jQuery.isWindow( obj ) ) { - return false; - } +// Initialize central reference +rootjQuery = jQuery( document ); - if ( obj.nodeType === 1 && length ) { - return true; + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to jQuery#find + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); } +} ); - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; } -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // <object> elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } -// Convert String-formatted options into Object-formatted ones and store in cache + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; - }); + } ); return object; } @@ -1006,155 +3182,186 @@ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : + createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, - // Last fire value (for non-forgettable lists) + + // Last fire value for non-forgettable lists memory, + // Flag to know if list was already fired fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, + + // Flag to prevent firing + locked, + // Actual callback list list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } } } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { list = []; + + // Otherwise, this object is spent } else { - self.disable(); + list = ""; } } }, + // Actual Callbacks object self = { + // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { + if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } - } else if ( arg && arg.length && type !== "string" ) { + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + // Inspect recursively add( arg ); } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); } } return this; }, + // Remove a callback from the list remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; } - }); - } + } + } ); return this; }, + // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; }, + // Remove all callbacks from the list empty: function() { - list = []; + if ( list ) { + list = []; + } return this; }, - // Have the list do nothing anymore + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values disable: function() { - list = stack = memory = undefined; + locked = queue = []; + list = memory = ""; return this; }, - // Is it disabled? disabled: function() { return !list; }, - // Lock the list in its current state + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; } return this; }, - // Is it locked? locked: function() { - return !stack; + return !!locked; }, + // Call all callbacks with the given context and arguments fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); } } return this; }, + // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, + // To know if the callbacks have already been called at least once fired: function() { return !!fired; @@ -1163,14 +3370,61 @@ jQuery.Callbacks = function( options ) { return self; }; -jQuery.extend({ + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { Deferred: function( func ) { var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { @@ -1181,28 +3435,213 @@ jQuery.extend({ deferred.done( arguments ).fail( arguments ); return this; }, - then: function( /* fnDone, fnFail, fnProgress */ ) { + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { + if ( returned && isFunction( returned.promise ) ) { returned.promise() + .progress( newDefer.notify ) .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); + .fail( newDefer.reject ); } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); } - }); - }); + } ); + } ); fns = null; - }).promise(); + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.error ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the error, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getErrorHook ) { + process.error = jQuery.Deferred.getErrorHook(); + + // The deprecated alias of the above. While the name suggests + // returning the stack, not an error instance, jQuery just passes + // it directly to `console.warn` so both will work; an instance + // just better cooperates with source maps. + } else if ( jQuery.Deferred.getStackHook ) { + process.error = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); }, + // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { @@ -1211,34 +3650,60 @@ jQuery.extend({ }, deferred = {}; - // Keep pipe for back-compat - promise.pipe = promise.then; - // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], - stateString = tuple[ 3 ]; + stateString = tuple[ 5 ]; - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); } - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); // Make the deferred a promise promise.promise( deferred ); @@ -1253,558 +3718,522 @@ jQuery.extend({ }, // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + // count of unprocessed arguments + i = remaining, - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); } }; - }, + }; - progressValues, progressContexts, resolveContexts; + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); } } - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); } - return deferred.promise(); + return primary.promise(); } -}); -jQuery.support = (function() { +} ); + - var support, all, a, - input, select, fragment, - opt, eventName, isSupported, i, - div = document.createElement("div"); +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; +// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error +// captured before the async barrier to get the original error cause +// which may otherwise be hidden. +jQuery.Deferred.exceptionHook = function( error, asyncError ) { - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, + error.stack, asyncError ); } +}; - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, +jQuery.fn.ready = function( fn ) { - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, + readyList + .then( fn ) - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, + return this; +}; - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", +jQuery.extend( { - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; + // A counter to track how many items to wait for before + // the ready event fires. See trac-6781 + readyWait: 1, - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; + // Handle when the DOM is ready + ready: function( wait ) { - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } + // Remember that the DOM is ready + jQuery.isReady = true; - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); +jQuery.ready.then = readyList.then; - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); +} else { - div.cloneNode( true ).click(); - } + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - if ( !body ) { - // Return for frameset docs that don't have a body - return; +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); } - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + // Sets one value + } else if ( value !== undefined ) { + chainable = true; - body.appendChild( container ).appendChild( div ); + if ( !isFunction( value ) ) { + raw = true; + } - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); + if ( bulk ) { - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + if ( chainable ) { + return elems; + } - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; + // Gets + if ( bulk ) { + return fn.call( elems ); + } - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "<div></div>"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} - body.removeChild( container ); +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (trac-9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - return support; -})(); -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; +function Data() { + this.expando = jQuery.expando + Data.uid++; +} -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } +Data.uid = 1; - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", +Data.prototype = { - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, + cache: function( owner ) { - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, + // Check if the owner object already has a cache + var value = owner[ this.expando ]; - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + // If not, create one + if ( !value ) { + value = {}; - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } + // We can accept data for non-element nodes in modern browsers, + // but we should not, see trac-8335. + // Always return an empty object. + if ( acceptData( owner ) ) { - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } } - } - if ( !cache[ id ] ) { - cache[ id ] = {}; + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); + // Handle: [ owner, { properties } ] args } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : - thisCache = thisCache.data; - } + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { + return this.get( owner, key ); + } - // First Try to find as-is property data - ret = thisCache[ name ]; + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); - // Test for null|undefined property data - if ( ret == null ) { + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; + if ( cache === undefined ) { + return; } - } else { - ret = thisCache; - } - return ret; -} + if ( key !== undefined ) { -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { - var i, l, thisCache, - isNode = elem.nodeType, + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } + i = key.length; - if ( name ) { + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } - thisCache = pvt ? cache[ id ] : cache[ id ].data; + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - if ( thisCache ) { + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { +var dataUser = new Data(); - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; +function getData( data ) { + if ( data === "true" ) { + return true; + } - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } + if ( data === "false" ) { + return false; } - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); + if ( data === "null" ) { + return null; + } - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } - // When all else fails, null - } else { - cache[ id ] = null; + if ( rbrace.test( data ) ) { + return JSON.parse( data ); } + + return data; } -jQuery.extend({ - cache: {}, +function dataAttr( elem, key, data ) { + var name; - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} +jQuery.extend( { hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { - return internalData( elem, name, data ); + return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { - return internalRemoveData( elem, name ); + dataUser.remove( elem, name ); }, - // For internal use only. + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); + return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; + dataPriv.remove( elem, name ); } -}); +} ); -jQuery.fn.extend({ +jQuery.fn.extend( { data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { - data = jQuery.data( elem ); + data = dataUser.get( elem ); - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.slice(5) ); + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { - dataAttr( elem, name, data[ name ] ); + // Support: IE 11 only + // The attrs elements can be null (trac-14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } } } - jQuery._data( elem, "parsedAttrs", true ); + dataPriv.set( elem, "hasDataAttrs", true ); } } @@ -1813,90 +4242,68 @@ jQuery.fn.extend({ // Sets multiple values if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); + return this.each( function() { + dataUser.set( this, key ); + } ); } - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, + return access( this, function( value ) { + var data; - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } - data = elem.getAttribute( name ); + // We tried really hard, but the data doesn't exist. + return; + } - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} + // Set the data... + this.each( function() { - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, - } else { - data = undefined; - } + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); } +} ); - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ +jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); + queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } @@ -1922,7 +4329,6 @@ jQuery.extend({ startLength--; } - hooks.cur = fn; if ( fn ) { // Add a progress sentinel to prevent the fx queue from being @@ -1931,7 +4337,7 @@ jQuery.extend({ queue.unshift( "inprogress" ); } - // clear up the last queue stop function + // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } @@ -1941,19 +4347,18 @@ jQuery.extend({ } }, - // not intended for public consumption - generates a queueHooks object, or returns the current one + // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); } -}); +} ); -jQuery.fn.extend({ +jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; @@ -1964,43 +4369,31 @@ jQuery.fn.extend({ } if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); + return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : - this.each(function() { + this.each( function() { var queue = jQuery.queue( this, type, data ); - // ensure a hooks for this queue + // Ensure a hooks for this queue jQuery._queueHooks( this, type ); - if ( type === "fx" && queue[0] !== "inprogress" ) { + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } - }); + } ); }, dequeue: function( type ) { - return this.each(function() { + return this.each( function() { jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); + } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, + // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { @@ -2021,8 +4414,8 @@ jQuery.fn.extend({ } type = type || "fx"; - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); @@ -2031,680 +4424,478 @@ jQuery.fn.extend({ resolve(); return defer.promise( obj ); } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; +var documentElement = document.documentElement; - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; - } - } - } + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && - return this; - }, + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; + jQuery.css( elem, "display" ) === "none"; + }; - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - return this; - }, + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } + while ( maxIterations-- ) { - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; } - }); - }, + initialInUnit = initialInUnit / scale; - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } } - return false; - }, + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} - ret = elem.value; - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } +var defaultDisplayMap = {}; - return; - } +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; - isFunction = jQuery.isFunction( value ); + if ( display ) { + return display; + } - return this.each(function( i ) { - var val, - self = jQuery(this); + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); - if ( this.nodeType !== 1 ) { - return; - } + temp.parentNode.removeChild( temp ); - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } + return display; +} - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); } - }); + } } -}); -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - // Get the specific value for the option - value = jQuery( option ).val(); - // We don't need an array for one selects - if ( one ) { - return value; - } - // Multi-Selects return an array - values.push( value ); - } - } +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); - return values; - }, + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (trac-11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (trac-14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); - set: function( elem, value ) { - var values = jQuery.makeArray( value ); + div.appendChild( input ); - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = "<textarea>x</textarea>"; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - attr: function( elem, name, value ) { - var hooks, notxml, ret, - nType = elem.nodeType; + // Support: IE <=9 only + // IE <=9 replaces <option> tags with their contents when inserted outside of + // the select element. + div.innerHTML = "<option></option>"; + support.option = !!div.lastChild; +} )(); - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } +// We have to close these tags to support XHTML (trac-13200) +var wrapMap = { - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting <tbody> or other required elements. + thead: [ 1, "<table>", "</table>" ], + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } + _default: [ 0, "", "" ] +}; - if ( value !== undefined ) { +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; - if ( value === null ) { - jQuery.removeAttr( elem, name ); +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; +} - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - } else { - elem.setAttribute( name, value + "" ); - return value; - } +function getAll( context, tag ) { - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (trac-15151) + var ret; - } else { + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== core_strundefined ) { - ret = elem.getAttribute( name ); - } + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, + } else { + ret = []; + } - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } + return ret; +} - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; +var rhtml = /<|&#?\w+;/; - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + for ( ; i < l; i++ ) { + elem = elems[ i ]; - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } + if ( elem || elem === 0 ) { - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; + // Add nodes directly + if ( toType( elem ) === "object" ) { - } else { - return ( elem[ name ] = value ); - } + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + // Convert html into DOM nodes } else { - return elem[ name ]; - } - } - }, + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } + // Remember the top-level container + tmp = fragment.firstChild; - return name; + // Ensure the created nodes are orphaned (trac-12392) + tmp.textContent = ""; + } + } } -}; -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? + // Remove wrapper from fragment + fragment.textContent = ""; - // Ignore the value *property* by using defaultValue - elem.defaultValue : + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); } + continue; } - }; -} -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } + attached = isAttached( elem ); - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); } - }; - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); } } - }); - }); + } + } + + return fragment; } -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); +function returnTrue() { + return true; } -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; +function returnFalse() { + return false; } -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; +function on( elem, types, selector, data, fn, one ) { + var origFn, type; - if ( parent ) { - parent.selectedIndex; + // Types can be a map of types/handlers + if ( typeof types === "object" ) { - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; } - }); -} + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} + if ( data == null && fn == null ) { -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } -function returnTrue() { - return true; -} + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { -function returnFalse() { - return false; + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); } /* @@ -2716,13 +4907,14 @@ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { return; } @@ -2733,35 +4925,43 @@ jQuery.event = { selector = handleObjIn.selector; } + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); } - if ( !(eventHandle = elemData.handle) ) { + if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; } // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; @@ -2773,7 +4973,7 @@ jQuery.event = { special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers - handleObj = jQuery.extend({ + handleObj = jQuery.extend( { type: type, origType: origType, data: data, @@ -2781,22 +4981,20 @@ jQuery.event = { guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") + namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { + if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); } } } @@ -2820,29 +5018,27 @@ jQuery.event = { jQuery.event.global[ type ] = true; } - // Nullify elem to prevent memory leaks in IE - elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - if ( !elemData || !(events = elemData.events) ) { + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { @@ -2855,7 +5051,8 @@ jQuery.event = { special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; @@ -2865,7 +5062,8 @@ jQuery.event = { if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { @@ -2880,7 +5078,9 @@ jQuery.event = { // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); } @@ -2888,163 +5088,32 @@ jQuery.event = { } } - // Remove the expando if it's no longer used + // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); + dataPriv.remove( elem, "handle events" ); } }, - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + dispatch: function( nativeEvent ) { - cur = tmp = elem = elem || document; + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; } - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired @@ -3057,24 +5126,26 @@ jQuery.event = { // Run delegates first; they may want to stop propagation beneath us i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { + if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } @@ -3092,246 +5163,259 @@ jQuery.event = { }, handlers: function( event, handlers ) { - var sel, handleObj, matches, i, + var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers - // Black-hole SVG <use> instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG <use> instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (trac-13208) + // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; - // Don't conflict with Object.prototype properties (#13203) + // Don't conflict with Object.prototype properties (trac-13203) sel = handleObj.selector + " "; - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } - if ( matches[ sel ] ) { - matches.push( handleObj ); + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); } } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers + cur = this; if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); } - - return event; - } + } ); }, - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); }, special: { load: { + // Prevent triggered image.load events from bubbling to window.load noBubble: true }, click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", true ); } + + // Return false to allow normal processing in the caller + return false; }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); } + + // Return non-false to allow normal event-path propagation + return true; }, - delegateType: "focusout" + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } }, beforeunload: { postDispatch: function( event ) { - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } } }; -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, isSetup ) { + + // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add + if ( !isSetup ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); } - } : - function( elem, type, handle ) { - var name = "on" + type; + return; + } - if ( elem.detachEvent ) { + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var result, + saved = dataPriv.get( this, type ); - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } + if ( ( event.isTrigger & 1 ) && this[ type ] ) { - elem.detachEvent( name, handle ); - } - }; + // Interrupt processing of the outer synthetic .trigger()ed event + if ( !saved ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + this[ type ](); + result = dataPriv.get( this, type ); + dataPriv.set( this, type, false ); + + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + return result; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering + // the native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved ) { + + // ...and capture the result + dataPriv.set( this, type, jQuery.event.trigger( + saved[ 0 ], + saved.slice( 1 ), + this + ) ); + + // Abort handling of the native event by all jQuery handlers while allowing + // native handlers on the same element to run. On target, this is achieved + // by stopping immediate propagation just on the jQuery event. However, + // the native event is re-wrapped by a jQuery one on each level of the + // propagation so the only way to stop it for jQuery is to stop it for + // everyone via native `stopPropagation()`. This is not a problem for + // focus/blur which don't bubble, but it does also stop click on checkboxes + // and radios. We accept this limitation. + event.stopPropagation(); + event.isImmediatePropagationStopped = returnTrue; + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { + if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } @@ -3342,8 +5426,23 @@ jQuery.Event = function( src, props ) { // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (trac-504, trac-13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; // Event type } else { @@ -3356,288 +5455,306 @@ jQuery.Event = function( src, props ) { } // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); + this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { + constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, + isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { + if ( e && !this.isSimulated ) { e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { + + if ( e && !this.isSimulated ) { e.stopPropagation(); } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; }, stopImmediatePropagation: function() { + var e = this.originalEvent; + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + this.stopPropagation(); } }; -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + + function focusMappedHandler( nativeEvent ) { + if ( document.documentMode ) { + + // Support: IE 11+ + // Attach a single focusin/focusout handler on the document while someone wants + // focus/blur. This is because the former are synchronous in IE while the latter + // are async. In other browsers, all those handlers are invoked synchronously. + + // `handle` from private data would already wrap the event, but we need + // to change the `type` here. + var handle = dataPriv.get( this, "handle" ), + event = jQuery.event.fix( nativeEvent ); + event.type = nativeEvent.type === "focusin" ? "focus" : "blur"; + event.isSimulated = true; + + // First, handle focusin/focusout + handle( nativeEvent ); + + // ...then, handle focus/blur + // + // focus/blur don't bubble while focusin/focusout do; simulate the former by only + // invoking the handler at the lower level. + if ( event.target === event.currentTarget ) { + + // The setup part calls `leverageNative`, which, in turn, calls + // `jQuery.event.add`, so event handle will already have been set + // by this point. + handle( event ); } - return ret; + } else { + + // For non-IE browsers, attach a single capturing handler on the document + // while someone wants focusin/focusout. + jQuery.event.simulate( delegateType, nativeEvent.target, + jQuery.event.fix( nativeEvent ) ); } - }; -}); + } -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { + jQuery.event.special[ type ] = { - jQuery.event.special.submit = { + // Utilize native event if possible so blur/focus sequence is correct setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, + var attaches; + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, true ); + + if ( document.documentMode ) { - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); + // Support: IE 9 - 11+ + // We use the same native handler for focusin & focus (and focusout & blur) + // so we need to coordinate setup & teardown parts between those events. + // Use `delegateType` as the key as `type` is already used by `leverageNative`. + attaches = dataPriv.get( this, delegateType ); + if ( !attaches ) { + this.addEventListener( delegateType, focusMappedHandler ); } - } - }, + dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 ); + } else { - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { + // Return false to allow normal processing in the caller return false; } + }, + trigger: function() { - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { + // Force setup before trigger + leverageNative( this, type ); - jQuery.event.special.change = { + // Return non-false to allow normal event-path propagation + return true; + }, - setup: function() { + teardown: function() { + var attaches; - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); + if ( document.documentMode ) { + attaches = dataPriv.get( this, delegateType ) - 1; + if ( !attaches ) { + this.removeEventListener( delegateType, focusMappedHandler ); + dataPriv.remove( this, delegateType ); + } else { + dataPriv.set( this, delegateType, attaches ); } + } else { + + // Return false to indicate standard teardown should be applied return false; } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); }, - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } + // Suppress native focus or blur if we're currently inside + // a leveraged native-event stack + _default: function( event ) { + return dataPriv.get( event.target, type ); }, - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } + delegateType: delegateType }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; + // Support: Firefox <=44 + // Firefox doesn't have focus(in | out) events + // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 + // + // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 + // focus(in | out) events fire after focus & blur events, + // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order + // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 + // + // Support: IE 9 - 11+ + // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch, + // attach a single handler for both events in IE. + jQuery.event.special[ delegateType ] = { + setup: function() { - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + dataHolder = document.documentMode ? this : doc, + attaches = dataPriv.get( dataHolder, delegateType ); + + // Support: IE 9 - 11+ + // We use the same native handler for focusin & focus (and focusout & blur) + // so we need to coordinate setup & teardown parts between those events. + // Use `delegateType` as the key as `type` is already used by `leverageNative`. + if ( !attaches ) { + if ( document.documentMode ) { + this.addEventListener( delegateType, focusMappedHandler ); + } else { + doc.addEventListener( type, focusMappedHandler, true ); } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); + } + dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + dataHolder = document.documentMode ? this : doc, + attaches = dataPriv.get( dataHolder, delegateType ) - 1; + + if ( !attaches ) { + if ( document.documentMode ) { + this.removeEventListener( delegateType, focusMappedHandler ); + } else { + doc.removeEventListener( type, focusMappedHandler, true ); } + dataPriv.remove( dataHolder, delegateType ); + } else { + dataPriv.set( dataHolder, delegateType, attaches ); } - }; - }); -} + } + }; +} ); -jQuery.fn.extend({ +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; } - return this; + return ret; } + }; +} ); - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } +jQuery.fn.extend( { - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); + return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { + // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); @@ -3645,6 +5762,7 @@ jQuery.fn.extend({ return this; } if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) fn = selector; selector = undefined; @@ -3652,3708 +5770,3026 @@ jQuery.fn.extend({ if ( fn === false ) { fn = returnFalse; } - return this.each(function() { + return this.each( function() { jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } + } ); } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { +} ); -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, +var - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /<script|<style|<link/i, - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, + rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g; +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - // Regular expressions + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + return elem; +} - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), + return elem; +} - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; - rsibling = /[\x20\t\r\n\f]*[+~]/, + if ( dest.nodeType !== 1 ) { + return; + } - rnative = /^[^{]+\{\s*\[native code/, + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + if ( events ) { + dataPriv.remove( dest, "handle events" ); - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); -// Use a stripped-down slice if we can't use a native one -try { - slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - while ( (elem = this[i++]) ) { - results.push( elem ); - } - return results; - }; + dataUser.set( dest, udataCur ); + } } -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } } -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} +function domManip( collection, args, callback, ignored ) { -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); + // Flatten any nested arrays + args = flat( args ); - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); } -} -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } - context = context || document; - results = results || []; + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; - if ( !selector || typeof selector !== "string" ) { - return results; - } + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (trac-8070). + for ( ; i < l; i++ ) { + node = fragment; - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); } } - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; + callback.call( collection[ i ], node, i ); } - } - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); + // Re-enable scripts + jQuery.map( scripts, restoreScript ); - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + + // Unwrap a CDATA section containing script contents. This shouldn't be + // needed as in XML documents they're already not visible when + // inspecting element contents and in HTML documents they have no + // meaning but we're preserving that logic for backwards compatibility. + // This will be removed completely in 4.0. See gh-4904. + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } } } } } } - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); + return collection; } -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } } - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = "<select></select>"; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } + return elem; +} - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = "<a href='#'></a>"; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; + // We eschew jQuery#find here for performance reasons: + // https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } + } - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; } + if ( elem[ dataUser.expando ] ) { - return tmp; + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); } - }; + } +} ); - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, - // QSA and matchesSelector support + remove: function( selector ) { + return remove( this, selector ); + }, - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = "<select><option selected=''></option></select>"; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "<input type='hidden' i=''/>"; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; } - } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); } - return false; - }; + } ); + }, - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, - if ( a === b ) { - hasDuplicate = true; - return 0; - } + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); } - return compare & 4 ? -1 : 1; - } + } ); + }, - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; + empty: function() { + var elem, + i = 0; - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); + // Remove any remaining nodes + elem.textContent = ""; + } } - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } + return this; + }, - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } - return document; -}; + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; + value = jQuery.htmlPrefilter( value ); -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); + elem = 0; - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} } - } catch(e) {} - } - return Sizzle( expr, document, null, [elem] ).length > 0; -}; + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; + replaceWith: function() { + var ignored = []; -Sizzle.attr = function( elem, name ) { - var val; + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); + // Force callback invocation + }, ignored ); } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; +} ); -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - return results; -}; + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); +var rcustomProp = /^--/; - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } +var getStyles = function( elem ) { - return a ? 1 : -1; -} + // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} + if ( !view || !view.opener ) { + view = window; + } -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; + return view.getComputedStyle( elem ); }; -} -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; } - // Do not include comment or processing instruction nodes return ret; }; -Expr = Sizzle.selectors = { - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - match: matchExpr, - find: {}, - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, +( function() { - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); - return match.slice( 0, 4 ); - }, + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - return match; - }, + documentElement.removeChild( container ); - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (trac-8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, - filter: { + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "box-sizing:content-box;border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is `display: block` + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + isCustomProp = rcustomProp.test( name ), + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, trac-12537) + // .css('--customProperty) (gh-3144) + if ( computed ) { + + // Support: IE <=9 - 11+ + // IE only supports `"float"` in `getPropertyValue`; in computed styles + // it's only available as `"cssFloat"`. We no longer modify properties + // sent to `.css()` apart from camelCasing, so we need to check both. + // Normally, this would create difference in behavior: if + // `getPropertyValue` returns an empty string, the value returned + // by `.css()` would be `undefined`. This is usually the case for + // disconnected elements. However, in IE even disconnected elements + // with no styles return `"none"` for `getPropertyValue( "float" )` + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( isCustomProp && ret ) { + + // Support: Firefox 105+, Chrome <=105+ + // Spec requires trimming whitespace for custom properties (gh-4926). + // Firefox only trims leading whitespace. Chrome just collapses + // both leading & trailing whitespace to a single space. + // + // Fall back to `undefined` if empty string returned. + // This collapses a missing definition with property defined + // and set to an empty string but there's no standard API + // allowing us to differentiate them without a performance penalty + // and returning `undefined` aligns with older jQuery. + // + // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED + // as whitespace while CSS does not, but this is not a problem + // because CSS preprocessing replaces them with U+000A LINE FEED + // (which *is* CSS whitespace) + // https://www.w3.org/TR/css-syntax-3/#input-preprocessing + ret = ret.replace( rtrimCSS, "$1" ) || undefined; + } + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, + return ret !== undefined ? - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - result += ""; +function addGetHookIf( conditionFn, hookFn ) { - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } - return first === 1 && last === 0 ? + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; - if ( parent ) { +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; - start = [ forward ? parent.firstChild : parent.lastChild ]; + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - while ( (node = ++nodeIndex && node && node[ dir ] || + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } +var - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } +function setPositiveNumber( _elem, value, subtract ) { - if ( node === elem ) { - break; - } - } - } - } + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0, + marginDelta = 0; - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } + for ( ; i < 4; i += 2 ) { - return fn; + // Both box models exclude margin + // Count margin delta separately to only add it after scroll gutter adjustment. + // This is needed to make negative margins work with `outerHeight( true )` (gh-3982). + if ( box === "margin" ) { + marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } - }, - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } - "disabled": function( elem ) { - return elem.disabled === true; - }, + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } - return elem.selected === true; - }, + return delta + marginDelta; +} - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, +function getWidthOrHeight( elem, dimension, extra ) { - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, + // Start with computed style + var styles = getStyles( elem ), - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), + // Make sure the element is visible & connected + elem.getClientRects().length ) { - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } } -}; -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} + // Normalize "" and auto + val = parseFloat( val ) || 0; -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} - soFar = selector; - groups = []; - preFilters = Expr.preFilter; +jQuery.extend( { - while ( soFar ) { + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } } - groups.push( tokens = [] ); } + }, - matched = false; + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + animationIterationCount: true, + aspectRatio: true, + borderImageSlice: true, + columnCount: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + gridArea: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnStart: true, + gridRow: true, + gridRowEnd: true, + gridRowStart: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + scale: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeMiterlimit: true, + strokeOpacity: true + }, - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; } - if ( !matched ) { - break; + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); } - } - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; + // Convert "+=" or "-=" to relative numbers (trac-7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } + // Fixes bug trac-9237 + type = "number"; } - } : - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; + // Make sure that null and NaN values aren't set (trac-7116) + if ( value == null || value !== value ) { + return; + } - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } - }; -} -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; } - return true; - } : - matchers[0]; -} -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; } } - } - } - return newUnmatched; -} + } else { -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + return ret; + } - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, + // Otherwise just get the value from the style object + return style[ name ]; + } + }, - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); - // ...intermediate processing is necessary - [] : + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } - // ...otherwise use results directly - results : - matcherIn; + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); } - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; } - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + return val; + } +} ); - seed[temp] = !(results[temp] = elem); - } - } +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); } + }, - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); } - } - }); -} -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; } } +); - return elementMatcher( matchers ); -} +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } + return expanded; + } + }; - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } + return map; } - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); - return unmatched; - }; - return bySet ? - markFunction( superMatcher ) : - superMatcher; +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); } +jQuery.Tween = Tween; -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); } - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; } - return cached; }; -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { +Tween.prototype.init.prototype = Tween.prototype; - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; - selector = selector.slice( tokens.shift().value.length ); + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; } - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { - break; - } - } + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; } } } +}; - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self, - len = this.length; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, this[ i ], ret ); +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; } + } +}; - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); +jQuery.easing = { + linear: function( p ) { + return p; }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; }, + _default: "swing" +}; - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, +jQuery.fx = Tween.prototype.init; - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; +// Back compat <1.8 extension point +jQuery.fx.step = {}; - for ( ; i < l; i++ ) { - cur = this[i]; - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); } - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } + jQuery.fx.tick(); + } +} - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; - return this.pushStack( jQuery.unique(all) ); - }, + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); + if ( includeWidth ) { + attrs.opacity = attrs.width = type; } -}); -jQuery.fn.andSelf = jQuery.fn.addBack; + return attrs; +} -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - return cur; + // We're done with this property + return tween; + } + } } -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); - if ( !runtil.test( name ) ) { - selector = until; + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; } + hooks.unqueued++; - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } + anim.always( function() { - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { - return this.pushStack( ret ); - }; -}); + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } + } - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - sibling: function( n, elem ) { - var r = []; + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); } } - return r; - } -}); + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } } } - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); } - return safeFrag; -} -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - manipulation_rcheckableType = /^(?:checkbox|radio)$/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - area: [ 1, "<map>", "</map>" ], - param: [ 1, "<object>", "</object>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); } - wrap.map(function() { - var elem = this; + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } - return elem; - }).append( this ); + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } } + } +} - return this; - }, +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; } - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } - if ( contents.length ) { - contents.wrapAll( html ); + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; - } else { - self.append( html ); + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); + } else { + specialEasing[ name ] = easing; + } + } +} - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; } - }).end(); - }, + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); } - }); - }, - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; } - }); - }, - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); } - }); - }, - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); } - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); } + return result; } + } - return this; - }, + jQuery.map( props, createTween, animation ); - empty: function() { - var elem, - i = 0; + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } + return animation; +} - return this; +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] }, - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, + var prop, + index = 0, + length = props.length; - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } + prefilters: [ defaultPrefilter ], - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); - value = value.replace( rxhtmlTag, "<$1></$2>" ); +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; - elem = 0; + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} + } else { + opt.duration = jQuery.fx.speeds._default; } + } + } - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); + // Queueing + opt.old = opt.complete; - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); } - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; - if ( parent ) { - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - }); - }, + return opt; +}; - detach: function( selector ) { - return this.remove( selector, true ); - }, +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { - domManip: function( args, table, callback ) { + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - // Flatten any nested arrays - args = core_concat.apply( [], args ); + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; + }; - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } + doAnimation.finish = doAnimation; - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); } + } - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); } + } - // Fix #11809: Avoid leaking memory - fragment = first = null; + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; - return this; - } -}); + // Enable finishing flag on private data + data.finish = true; -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} + // Empty the queue first + jQuery.queue( this, type, [] ); -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } -function cloneCopyEvent( src, dest ) { + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; + // Turn off finishing flag + delete data.finish; + } ); } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); - if ( events ) { - delete curData.handle; - curData.events = {}; +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); } } - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); + if ( !timers.length ) { + jQuery.fx.stop(); } -} + fxNow = undefined; +}; -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { return; } - nodeName = dest.nodeName.toLowerCase(); + inProgress = true; + schedule(); +}; - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); +jQuery.fx.stop = function() { + inProgress = null; +}; - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } +jQuery.fx.speeds = { + slow: 600, + fast: 200, - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } + // Default speed + _default: 400 +}; - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } +// Based off of the plugin by Clint Helfers, with permission. +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - dest.defaultChecked = dest.checked = src.checked; +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } + input.type = "checkbox"; - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } +var boolHook, + attrHandle = jQuery.expr.attrHandle; - return this.pushStack( ret ); - }; -}); +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; } - } - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + elem.setAttribute( name, value + "" ); + return value; } - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); + ret = jQuery.find.attr( elem, name ); - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; } } } + }, - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); + removeAttr: function( elem, value ) { + var name, + i = 0, - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); } } + } +} ); - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); } + return name; + } +}; - destElements = srcElements = node = null; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; - // Return the cloned set - return clone; - }, + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, + if ( !isXML ) { - // Ensure a safe fragment - safe = createSafeFragment( context ), + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); - nodes = [], - i = 0; - for ( ; i < l; i++ ) { - elem = elems[ i ]; - if ( elem || elem === 0 ) { - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } - // String was a <table>, *may* have spurious <tbody> - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : + return ( elem[ name ] = value ); + } - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !rtbody.test( elem ) ? - tmp : - 0; + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } + return elem[ name ]; + }, - jQuery.merge( nodes, tmp.childNodes ); + propHooks: { + tabIndex: { + get: function( elem ) { - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // Use proper attribute retrieval (trac-12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; } - } - } - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); + return -1; + } } + }, - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { - i = 0; - while ( (elem = nodes[ i++ ]) ) { + /* eslint no-unused-expressions: "off" */ - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; } + return null; + }, + set: function( elem ) { - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); + /* eslint no-unused-expressions: "off" */ - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; } } } + }; +} - tmp = null; +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); - return safe; - }, - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - for ( ; (elem = elems[i]) != null; i++ ) { - if ( acceptData || jQuery.acceptData( elem ) ) { + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } - id = elem[ internalKey ]; - data = id && cache[ id ]; - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { +jQuery.fn.extend( { + addClass: function( value ) { + var classNames, cur, curValue, className, i, finalValue; - delete cache[ id ]; + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; + classNames = classesToArray( value ); - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); + if ( classNames.length ) { + return this.each( function() { + curValue = getClass( this ); + cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - } else { - elem[ internalKey ] = null; + if ( cur ) { + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; + if ( cur.indexOf( " " + className + " " ) < 0 ) { + cur += className + " "; } + } - core_deletedIds.push( id ); + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + this.setAttribute( "class", finalValue ); } } - } + } ); } - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 + return this; }, - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; + removeClass: function( value ) { + var classNames, cur, curValue, className, i, finalValue; - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); } - } - - return origName; -} -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} + if ( !arguments.length ) { + return this.attr( "class", "" ); + } -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; + classNames = classesToArray( value ); - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } + if ( classNames.length ) { + return this.each( function() { + curValue = getClass( this ); - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } + // This expression is here for better compressibility (see addClass) + cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { + if ( cur ) { + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; - if ( !values[ index ] ) { - hidden = isHidden( elem ); + // Remove *all* instances + while ( cur.indexOf( " " + className + " " ) > -1 ) { + cur = cur.replace( " " + className + " ", " " ); + } + } - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + this.setAttribute( "class", finalValue ); + } } - } + } ); } - } - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; + return this; + }, + + toggleClass: function( value, stateVal ) { + var classNames, className, i, self, + type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); } - } - return elements; -} + classNames = classesToArray( value ); -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; + return this.each( function() { + if ( isValidValue ) { - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; + // Toggle individual class names + self = jQuery( this ); - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } } - return map; - } + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; + // Store className if set + dataPriv.set( this, "__className__", className ); + } - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } } - }); - } -}); + } ); + }, -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; } } - }, - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, + return false; + } +} ); - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); +var rreturn = /\r/g; - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; } - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { return; } - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; } - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + } else if ( typeof val === "number" ) { + val += ""; - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); } - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; } + } ); + } +} ); - // Otherwise just get the value from the style object - return style[ name ]; - } - }, +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + // Support: IE <=10 - 11 only + // option.text throws exceptions (trac-14686, trac-14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + if ( index < 0 ) { + i = max; - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } + } else { + i = one ? index : 0; + } - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (trac-2551) + if ( ( option.selected || i === index ) && - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; + // Get the specific value for the option + value = jQuery( option ).val(); - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } + // We don't need an array for one selects + if ( one ) { + return value; + } - ret = callback.apply( elem, args || [] ); + // Multi-Selects return an array + values.push( value ); + } + } - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } + return values; + }, - return ret; - } -}); + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; + while ( i-- ) { + option = options[ i ]; - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), + /* eslint-disable no-cond-assign */ - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } - if ( computed ) { + /* eslint-enable no-cond-assign */ + } - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; } + } + } +} ); - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; +// Return jQuery for attributes-only inclusion +var location = window.location; - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; +var nonce = { guid: Date.now() }; - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } +var rquery = ( /\?/ ); - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - return ret === "" ? "auto" : ret; +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, +jQuery.extend( jQuery.event, { - val = 0; + trigger: function( event, data, elem, onlyHandlers ) { - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } + cur = lastElement = tmp = elem = elem || document; - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; } - } - return val; -} + if ( type.indexOf( "." ) > -1 ) { -function getWidthOrHeight( elem, name, extra ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; } - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} + // Determine event propagation path in advance, per W3C events spec (trac-9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } - if ( !display ) { - display = actualDisplay( nodeName, doc ); + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("<iframe frameborder='0' width='0' height='0'/>") - .css( "cssText", "display:block !important" ) - ).appendTo( doc.documentElement ); + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; - // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; - doc.write("<!doctype html><html><body>"); - doc.close(); + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } - display = actualDisplay( nodeName, doc ); - iframe.detach(); + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } } + event.type = type; - // Store the correct default display - elemdisplay[ nodeName ] = display; - } + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { - return display; -} + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { -// Called ONLY from within css_defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - display = jQuery.css( elem[0], "display" ); - elem.remove(); - return display; -} + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (trac-6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this - return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? - jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }) : - getWidthOrHeight( elem, name, extra ); - } - }, + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; - set: function( elem, value, extra ) { - var styles = extra && getStyles( elem ); - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, + if ( tmp ) { + elem[ ontype ] = null; + } - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - // if value === "", then remove inline opacity #12685 - if ( ( value >= 1 || value === "" ) && - jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { + elem[ type ](); - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } - // if there is no filter style applied in a css rule or unset inline opacity, we are done - if ( value === "" || currentStyle && !currentStyle.filter ) { - return; + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } } } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; } - }; -} -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - if ( computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, - curCSS, [ elem, "marginRight" ] ); - } + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true } - }; + ); + + jQuery.event.trigger( e, null, elem ); } - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - computed = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( computed ) ? - jQuery( elem ).position()[ prop ] + "px" : - computed; - } - } - }; - }); +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } } +} ); -}); -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - // Support: Opera <= 12.12 - // Opera reports offsetWidths and offsetHeights less than zero on some elements - return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || - (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); - }; +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} +function buildParams( prefix, obj, traditional, add ) { + var name; -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, + if ( Array.isArray( obj ) ) { - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ]; + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); } + } ); - return expanded; - } - }; + } else if ( !traditional && toType( obj ) === "object" ) { - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - }) - .filter(function(){ - var type = this.type; - // Use .is(":disabled") so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !manipulation_rcheckableType.test( type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); + } else { - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); + // Serialize scalar item. + add( prefix, obj ); } -}); +} -//Serialize an array of form elements or a set of -//key/values into a query string +// Serialize an array of form elements or a set of +// key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); }; - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + if ( a == null ) { + return ""; } // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); - }); + } ); } else { + // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { @@ -7362,69 +8798,55 @@ jQuery.param = function( a, traditional ) { } // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); + return s.join( "&" ); }; -function buildParams( prefix, obj, traditional, add ) { - var name; +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; - } else { - // Item is non-scalar (array or object), encode its numeric index. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; } - }); - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } - } else { - // Serialize scalar item. - add( prefix, obj ); + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); } -} -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { +} ); - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; -}); -jQuery.fn.hover = function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); -}; var - // Document location - ajaxLocParts, - ajaxLocation, - ajax_nonce = jQuery.now(), - - ajax_rquery = /\?/, + r20 = /%20/g, rhash = /#.*$/, - rts = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // trac-7653, trac-8125, trac-8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, - rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) @@ -7444,23 +8866,13 @@ var */ transports = {}, - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat("*"); + // Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; +originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -7475,19 +8887,21 @@ function addToPrefiltersOrTransports( structure ) { var dataType, i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { - if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression - while ( (dataType = dataTypes[i++]) ) { + while ( ( dataType = dataTypes[ i++ ] ) ) { + // Prepend if requested - if ( dataType[0] === "+" ) { + if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; - (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { - (structure[ dataType ] = structure[ dataType ] || []).push( func ); + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } @@ -7505,14 +8919,16 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } - }); + } ); return selected; } @@ -7521,14 +8937,14 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX // A special extend for ajax options // that takes "flat" options (not to be deep extended) -// Fixes #9887 +// Fixes trac-9887 function ajaxExtend( target, src ) { - var deep, key, + var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { @@ -7538,90 +8954,165 @@ function ajaxExtend( target, src ) { return target; } -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } } - var selector, response, type, - self = this, - off = url.indexOf(" "); + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; } - // If it's a function - if ( jQuery.isFunction( params ) ) { + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} - // We assume that it's the callback - callback = params; - params = undefined; +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, - // Otherwise, build a param string - } else if ( params && typeof params === "object" ) { - type = "POST"; + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } } - // If we have elements to modify, make the request - if ( self.length > 0 ) { - jQuery.ajax({ - url: url, + current = dataTypes.shift(); - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params - }).done(function( responseText ) { + // Convert to each sequential dataType + while ( current ) { - // Save response for use in complete callback - response = arguments; + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } - self.html( selector ? + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } - // If a selector was specified, locate the right elements in a dummy div - // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + prev = current; + current = dataTypes.shift(); - // Otherwise use the full result - responseText ); + if ( current ) { - }).complete( callback && function( jqXHR, status ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - }); - } + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { - return this; -}; + current = prev; -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ - jQuery.fn[ type ] = function( fn ){ - return this.on( type, fn ); - }; -}); + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } } + } - return jQuery.ajax({ - url: url, - type: method, - dataType: type, - data: data, - success: callback - }); - }; -}); + return { state: "success", data: response }; +} -jQuery.extend({ +jQuery.extend( { // Counter for holding the number of active queries active: 0, @@ -7631,13 +9122,14 @@ jQuery.extend({ etag: {}, ajaxSettings: { - url: ajaxLocation, + url: location.href, type: "GET", - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* timeout: 0, data: null, @@ -7659,14 +9151,15 @@ jQuery.extend({ }, contents: { - xml: /xml/, - html: /html/, - json: /json/ + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ }, responseFields: { xml: "responseXML", - text: "responseText" + text: "responseText", + json: "responseJSON" }, // Data converters @@ -7674,13 +9167,13 @@ jQuery.extend({ converters: { // Convert anything to text - "* text": window.String, + "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression - "text json": jQuery.parseJSON, + "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML @@ -7724,43 +9217,59 @@ jQuery.extend({ // Force options to be an object options = options || {}; - var // Cross-domain detection vars - parts, - // Loop variable - i, + var transport, + // URL without anti-cache param cacheURL, - // Response headers as string + + // Response headers responseHeadersString, + responseHeaders, + // timeout handle timeoutTimer, + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + // To know if global events are to be dispatched fireGlobals, - transport, - // Response headers - responseHeaders, + // Loop variable + i, + + // uncached part of the url + uncached, + // Create the final options object s = jQuery.ajaxSetup( {}, options ), + // Callbacks context callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, + // Deferreds deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks("once memory"), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks statusCode = s.statusCode || {}, + // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, - // The jqXHR state - state = 0, + // Default abort message strAbort = "canceled", + // Fake xhr jqXHR = { readyState: 0, @@ -7768,28 +9277,30 @@ jQuery.extend({ // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; - if ( state === 2 ) { + if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; - while ( (match = rheaders.exec( responseHeadersString )) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); } } - match = responseHeaders[ key.toLowerCase() ]; + match = responseHeaders[ key.toLowerCase() + " " ]; } - return match == null ? null : match; + return match == null ? null : match.join( ", " ); }, // Raw string getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; + return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { - var lname = name.toLowerCase(); - if ( !state ) { - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; @@ -7797,7 +9308,7 @@ jQuery.extend({ // Overrides response content-type header overrideMimeType: function( type ) { - if ( !state ) { + if ( completed == null ) { s.mimeType = type; } return this; @@ -7807,14 +9318,16 @@ jQuery.extend({ statusCode: function( map ) { var code; if ( map ) { - if ( state < 2 ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { - // Lazy-add the new callback in a way that preserves old ones statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } - } else { - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); } } return this; @@ -7832,30 +9345,41 @@ jQuery.extend({ }; // Attach deferreds - deferred.promise( jqXHR ).complete = completeDeferred.add; - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; + deferred.promise( jqXHR ); - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // Handle falsy url in the settings object (#10093: consistency with old signature) + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (trac-10093: consistency with old signature) // We also use the url parameter if available - s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); - // Alias method option to type as per ticket #12004 + // Alias method option to type as per ticket trac-12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - // A cross-domain request is in order when we have a protocol:host:port mismatch + // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } } // Convert data if not already a string @@ -7867,16 +9391,17 @@ jQuery.extend({ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { + if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to - fireGlobals = s.global; + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118) + fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger("ajaxStart"); + jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type @@ -7887,28 +9412,37 @@ jQuery.extend({ // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on - cacheURL = s.url; + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { - // If data is available, append data to url - if ( s.data ) { - cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); - // #9682: remove data so that it's not used in an eventual retry + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // trac-9682: remove data so that it's not used in an eventual retry delete s.data; } - // Add anti-cache in url if needed + // Add or update anti-cache param if needed if ( s.cache === false ) { - s.url = rts.test( cacheURL ) ? + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } - // If there is already a '_' parameter, set its value - cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; - // Otherwise add one to the end - cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; - } + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. @@ -7929,8 +9463,9 @@ jQuery.extend({ // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); @@ -7940,18 +9475,20 @@ jQuery.extend({ } // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + // Abort if not done already and return return jqXHR.abort(); } - // aborting is no longer a cancellation + // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); @@ -7966,24 +9503,31 @@ jQuery.extend({ if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + // Timeout if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout(function() { - jqXHR.abort("timeout"); + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); }, s.timeout ); } try { - state = 1; + completed = false; transport.send( requestHeaders, done ); } catch ( e ) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { + + // Rethrow post-completion exceptions + if ( completed ) { throw e; } + + // Propagate others as results + done( -1, e ); } } @@ -7992,17 +9536,16 @@ jQuery.extend({ var isSuccess, success, error, response, modified, statusText = nativeStatusText; - // Called once - if ( state === 2 ) { + // Ignore repeat invocations + if ( completed ) { return; } - // State is "done" now - state = 2; + completed = true; // Clear timeout if it exists if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); + window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection @@ -8015,47 +9558,57 @@ jQuery.extend({ // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { + if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { - modified = jqXHR.getResponseHeader("Last-Modified"); + modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } - modified = jqXHR.getResponseHeader("etag"); + modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content - if ( status === 204 ) { - isSuccess = true; + if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { - isSuccess = true; statusText = "notmodified"; // If we have data, let's convert it } else { - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; + statusText = response.state; + success = response.data; + error = response.error; isSuccess = !error; } } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts + + // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; @@ -8090,9 +9643,10 @@ jQuery.extend({ if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter if ( !( --jQuery.active ) ) { - jQuery.event.trigger("ajaxStop"); + jQuery.event.trigger( "ajaxStop" ); } } } @@ -8100,171 +9654,326 @@ jQuery.extend({ return jqXHR; }, - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); } -}); +} ); -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - var firstDataType, ct, finalDataType, type, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; } - } - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; } } +} ); - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (trac-11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); } - } + } ); +}; - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); } - if ( !firstDataType ) { - firstDataType = type; + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); } - return responses[ finalDataType ]; - } -} -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - var conv2, current, conv, tmp, - converters = {}, - i = 0, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ]; + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } + if ( contents.length ) { + contents.wrapAll( html ); - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; } +} ); - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; +var xhrSuccessStatus = { - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } + // File protocol always yields status code 0, assume 200 + 0: 200, - break; - } - } + // Support: IE <=9 only + // trac-1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; } } - // Apply converter (if not an equivalence) - if ( conv !== true ) { + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see trac-8605, trac-14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // trac-14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; } } + }, + + abort: function() { + if ( callback ) { + callback(); + } } + }; + } +} ); - // Update prev for next iteration - prev = current; - } + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; } +} ); - return { state: "success", data: response }; -} // Install script dataType -jQuery.ajaxSetup({ +jQuery.ajaxSetup( { accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" }, contents: { - script: /(?:java|ecma)script/ + script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { @@ -8272,90 +9981,64 @@ jQuery.ajaxSetup({ return text; } } -}); +} ); -// Handle cache's special case and global +// Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; - s.global = false; } -}); +} ); // Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || jQuery("head")[0] || document.documentElement; +jQuery.ajaxTransport( "script", function( s ) { + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; return { - - send: function( _, callback ) { - - script = document.createElement("script"); - - script.async = true; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( script.parentNode ) { - script.parentNode.removeChild( script ); - } - - // Dereference the script - script = null; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); + send: function( _, complete ) { + script = jQuery( "<script>" ) + .attr( s.scriptAttrs || {} ) + .prop( { charset: s.scriptCharset, src: s.url } ) + .on( "load error", callback = function( evt ) { + script.remove(); + callback = null; + if ( evt ) { + complete( evt.type === "error" ? 404 : 200, evt.type ); } - } - }; + } ); - // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending // Use native DOM manipulation to avoid our domManip AJAX trickery - head.insertBefore( script, head.firstChild ); + document.head.appendChild( script[ 0 ] ); }, - abort: function() { - if ( script ) { - script.onload( undefined, true ); + if ( callback ) { + callback(); } } }; } -}); +} ); + + + + var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings -jQuery.ajaxSetup({ +jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); this[ callback ] = true; return callback; } -}); +} ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { @@ -8363,14 +10046,17 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : - typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + typeof s.data === "string" && + ( s.contentType || "" ) + .indexOf( "application/x-www-form-urlencoded" ) === 0 && + rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; @@ -8378,18 +10064,18 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { - s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { + s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; - // force json dataType + // Force json dataType s.dataTypes[ 0 ] = "json"; // Install callback @@ -8399,1034 +10085,215 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { }; // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; + jqXHR.always( function() { + + // If previous value didn't exist - remove it + if ( overwritten === undefined ) { + jQuery( window ).removeProp( callbackName ); + + // Otherwise restore preexisting value + } else { + window[ callbackName ] = overwritten; + } // Save back as free if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around + + // Make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; - // save the callback name for future use + // Save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { + if ( responseContainer && isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; - }); + } ); // Delegate to script return "script"; } -}); -var xhrCallbacks, xhrSupported, - xhrId = 0, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject && function() { - // Abort all pending requests - var key; - for ( key in xhrCallbacks ) { - xhrCallbacks[ key ]( undefined, true ); - } - }; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject("Microsoft.XMLHTTP"); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -xhrSupported = jQuery.ajaxSettings.xhr(); -jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -xhrSupported = jQuery.support.ajax = !!xhrSupported; - -// Create transport if the browser can provide an xhr -if ( xhrSupported ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers["X-Requested-With"] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( err ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - var status, responseHeaders, statusText, responses; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - responses = {}; - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - if ( typeof xhr.responseText === "string" ) { - responses.text = xhr.responseText; - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback( undefined, true ); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1, - maxIterations = 20; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough - } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var value, name, index, easing, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} +} ); -jQuery.Animation = jQuery.extend( Animation, { - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - var prop, - index = 0, - length = props.length; - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); +// Support: Safari 8 only +// In Safari 8 documents created via document.implementation.createHTMLDocument +// collapse sibling forms: the second one becomes a child of the first one. +// Because of that, this security measure has to be disabled in Safari 8. +// https://bugs.webkit.org/show_bug.cgi?id=137337 +support.createHTMLDocument = ( function() { + var body = document.implementation.createHTMLDocument( "" ).body; + body.innerHTML = "<form></form><form></form>"; + return body.childNodes.length === 2; +} )(); -function defaultPrefilter( elem, props, opts ) { - /*jshint validthis:true */ - var prop, index, length, - value, dataShow, toggle, - tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - } else { - style.zoom = 1; - } - } +// Argument "data" should be string of html +// context (optional): If specified, the fragment will be created in this context, +// defaults to document +// keepScripts (optional): If true, will include scripts passed in the html string +jQuery.parseHTML = function( data, context, keepScripts ) { + if ( typeof data !== "string" ) { + return []; } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.always(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; } + var base, parsed, scripts; - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } + if ( !context ) { - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } + // Stop scripts or inline event handlers from being executed immediately + // by using document.implementation + if ( support.createHTMLDocument ) { + context = document.implementation.createHTMLDocument( "" ); - // store state if its toggle - enables .stop().toggle() to "reverse" - if ( toggle ) { - dataShow.hidden = !hidden; - } - if ( hidden ) { - jQuery( elem ).show(); + // Set the base href for the created document + // so any parsed elements with URLs + // are based on the document's URL (gh-2965) + base = context.createElement( "base" ); + base.href = document.location.href; + context.head.appendChild( base ); } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery._removeData( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } + context = document; } } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; + parsed = rsingleTag.exec( data ); + scripts = !keepScripts && []; - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[ 1 ] ) ]; } -}; -Tween.prototype.init.prototype = Tween.prototype; + parsed = buildFragment( [ data ], context, scripts ); -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } + if ( scripts && scripts.length ) { + jQuery( scripts ).remove(); } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } + return jQuery.merge( [], parsed.childNodes ); }; -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - doAnimation.finish = function() { - anim.stop( true ); - }; - // Empty animations, or finishing resolves immediately - if ( empty || jQuery._data( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each(function() { - var index, - data = jQuery._data( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // enable finishing flag on private data - data.finish = true; - - // empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.cur && hooks.cur.finish ) { - hooks.cur.finish.call( this ); - } - - // look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // turn off finishing flag - delete data.finish; - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - includeWidth = includeWidth? 1 : 0; - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } +/** + * Load a url into a page + */ +jQuery.fn.load = function( url, params, callback ) { + var selector, type, response, + self = this, + off = url.indexOf( " " ); - if ( includeWidth ) { - attrs.opacity = attrs.width = type; + if ( off > -1 ) { + selector = stripAndCollapse( url.slice( off ) ); + url = url.slice( 0, off ); } - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; + // If it's a function + if ( isFunction( params ) ) { - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + // We assume that it's the callback + callback = params; + params = undefined; - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; } - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax( { + url: url, - return opt; -}; + // If "type" variable is undefined, then "GET" method will be used. + // Make value of this field explicit since + // user can override it through ajaxSetup method + type: type || "GET", + dataType: "html", + data: params + } ).done( function( responseText ) { -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; + // Save response for use in complete callback + response = arguments; -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; + self.html( selector ? - fxNow = jQuery.now(); + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } + // Otherwise use the full result + responseText ); - if ( !timers.length ) { - jQuery.fx.stop(); + // If the request succeeds, this function gets "data", "status", "jqXHR" + // but they are ignored because response was set above. + // If it fails, this function gets "jqXHR", "status", "error" + } ).always( callback && function( jqXHR, status ) { + self.each( function() { + callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); + } ); + } ); } - fxNow = undefined; -}; -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) ) { - jQuery.fx.start(); - } + return this; }; -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 +jQuery.expr.pseudos.animated = function( elem ) { + return jQuery.grep( jQuery.timers, function( fn ) { + return elem === fn.elem; + } ).length; }; -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - var docElem, win, - box = { top: 0, left: 0 }, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - docElem = doc.documentElement; - - // Make sure it's not a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return box; - } - // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) - if ( typeof elem.getBoundingClientRect !== core_strundefined ) { - box = elem.getBoundingClientRect(); - } - win = getWindow( doc ); - return { - top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), - left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) - }; -}; jQuery.offset = { - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); + var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, + position = jQuery.css( elem, "position" ), + curElem = jQuery( elem ), + props = {}; - // set position first, in-case top/left are set even on static elem + // Set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; + curOffset = curElem.offset(); + curCSSTop = jQuery.css( elem, "top" ); + curCSSLeft = jQuery.css( elem, "left" ); + calculatePosition = ( position === "absolute" || position === "fixed" ) && + ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + // Need to be able to calculate position if either + // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; + } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); + if ( isFunction( options ) ) { + + // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) + options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { @@ -9438,122 +10305,204 @@ jQuery.offset = { if ( "using" in options ) { options.using.call( elem, props ); + } else { curElem.css( props ); } } }; +jQuery.fn.extend( { + + // offset() relates an element's border box to the document origin + offset: function( options ) { + + // Preserve chaining for setter + if ( arguments.length ) { + return options === undefined ? + this : + this.each( function( i ) { + jQuery.offset.setOffset( this, options, i ); + } ); + } + + var rect, win, + elem = this[ 0 ]; + + if ( !elem ) { + return; + } + + // Return zeros for disconnected and hidden (display: none) elements (gh-2310) + // Support: IE <=11 only + // Running getBoundingClientRect on a + // disconnected node in IE throws an error + if ( !elem.getClientRects().length ) { + return { top: 0, left: 0 }; + } -jQuery.fn.extend({ + // Get document-relative position by adding viewport scroll to viewport-relative gBCR + rect = elem.getBoundingClientRect(); + win = elem.ownerDocument.defaultView; + return { + top: rect.top + win.pageYOffset, + left: rect.left + win.pageXOffset + }; + }, + // position() relates an element's margin box to its offset parent's padding box + // This corresponds to the behavior of CSS absolute positioning position: function() { if ( !this[ 0 ] ) { return; } - var offsetParent, offset, - parentOffset = { top: 0, left: 0 }, - elem = this[ 0 ]; + var offsetParent, offset, doc, + elem = this[ 0 ], + parentOffset = { top: 0, left: 0 }; - // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + // position:fixed elements are offset from the viewport, which itself always has zero offset if ( jQuery.css( elem, "position" ) === "fixed" ) { - // we assume that getBoundingClientRect is available when computed position is fixed + + // Assume position:fixed implies availability of getBoundingClientRect offset = elem.getBoundingClientRect(); - } else { - // Get *real* offsetParent - offsetParent = this.offsetParent(); - // Get correct offsets + } else { offset = this.offset(); - if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { - parentOffset = offsetParent.offset(); + + // Account for the *real* offset parent, which can be the document or its root element + // when a statically positioned element is identified + doc = elem.ownerDocument; + offsetParent = elem.offsetParent || doc.documentElement; + while ( offsetParent && + ( offsetParent === doc.body || offsetParent === doc.documentElement ) && + jQuery.css( offsetParent, "position" ) === "static" ) { + + offsetParent = offsetParent.parentNode; } + if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { - // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + // Incorporate borders into its offset, since they are outside its content origin + parentOffset = jQuery( offsetParent ).offset(); + parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); + } } // Subtract parent offsets and element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 return { - top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), - left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) }; }, + // This method will return documentElement in the following cases: + // 1) For the element inside the iframe without offsetParent, this method will return + // documentElement of the parent window + // 2) For the hidden or detached element + // 3) For body or html element, i.e. in case of the html node - it will return itself + // + // but those exceptions were never presented as a real life use-cases + // and might be considered as more preferable results. + // + // This logic, however, is not guaranteed and can change at any point in the future offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.documentElement; - while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + return this.map( function() { + var offsetParent = this.offsetParent; + + while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.offsetParent; } - return offsetParent || document.documentElement; - }); - } -}); + return offsetParent || documentElement; + } ); + } +} ); // Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); +jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { + var top = "pageYOffset" === prop; jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); + return access( this, function( elem, method, val ) { + + // Coalesce documents and windows + var win; + if ( isWindow( elem ) ) { + win = elem; + } else if ( elem.nodeType === 9 ) { + win = elem.defaultView; + } if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; + return win ? win[ prop ] : elem[ method ]; } if ( win ) { win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() + !top ? val : win.pageXOffset, + top ? val : win.pageYOffset ); } else { elem[ method ] = val; } - }, method, val, arguments.length, null ); + }, method, val, arguments.length ); }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} +} ); + +// Support: Safari <=7 - 9.1, Chrome <=37 - 49 +// Add the top/left cssHooks using jQuery.fn.position +// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 +// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 +// getComputedStyle returns percent when specified for top/left/bottom/right; +// rather than make the css module depend on the offset module, just check for it here +jQuery.each( [ "top", "left" ], function( _i, prop ) { + jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, + function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + + // If curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + ); +} ); + + // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth + jQuery.each( { + padding: "inner" + name, + content: type, + "": "outer" + name + }, function( defaultExtra, funcName ) { + + // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - return jQuery.access( this, function( elem, type, value ) { + return access( this, function( elem, type, value ) { var doc; - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; + if ( isWindow( elem ) ) { + + // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) + return funcName.indexOf( "outer" ) === 0 ? + elem[ "inner" + name ] : + elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], + // whichever is greatest return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], @@ -9562,36 +10511,206 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { } return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable, null ); + }, type, chainable ? margin : undefined, chainable ); }; - }); -}); -// Limit scope pollution from any deprecated API -// (function() { - -// })(); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); + } ); +} ); + + +jQuery.each( [ + "ajaxStart", + "ajaxStop", + "ajaxComplete", + "ajaxError", + "ajaxSuccess", + "ajaxSend" +], function( _i, type ) { + jQuery.fn[ type ] = function( fn ) { + return this.on( type, fn ); + }; +} ); + + + + +jQuery.fn.extend( { + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? + this.off( selector, "**" ) : + this.off( types, selector || "**", fn ); + }, + + hover: function( fnOver, fnOut ) { + return this + .on( "mouseenter", fnOver ) + .on( "mouseleave", fnOut || fnOver ); + } +} ); + +jQuery.each( + ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( _i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + } +); + + + + +// Support: Android <=4.0 only +// Make sure we trim BOM and NBSP +// Require that the "whitespace run" starts from a non-whitespace +// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position. +var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; + +// Bind a function to a context, optionally partially applying any +// arguments. +// jQuery.proxy is deprecated to promote standards (specifically Function#bind) +// However, it is not slated for removal any time soon +jQuery.proxy = function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; +}; + +jQuery.holdReady = function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } +}; +jQuery.isArray = Array.isArray; +jQuery.parseJSON = JSON.parse; +jQuery.nodeName = nodeName; +jQuery.isFunction = isFunction; +jQuery.isWindow = isWindow; +jQuery.camelCase = camelCase; +jQuery.type = toType; + +jQuery.now = Date.now; + +jQuery.isNumeric = function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = jQuery.type( obj ); + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); +}; + +jQuery.trim = function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "$1" ); +}; + + + +// Register as a named AMD module, since jQuery can be concatenated with other +// files that may use define, but not via a proper concatenation script that +// understands anonymous AMD modules. A named AMD is safest and most robust +// way to register. Lowercase jquery is used because AMD module names are +// derived from file names, and jQuery is normally delivered in a lowercase +// file name. Do this after creating the global so that if an AMD module wants +// to call noConflict to hide this version of jQuery, it will work. + +// Note that for maximum portability, libraries that are not jQuery should +// declare themselves as anonymous modules, and avoid setting a global if an +// AMD loader is present. jQuery is a special case. For more information, see +// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon + +if ( typeof define === "function" && define.amd ) { + define( "jquery", [], function() { + return jQuery; + } ); +} + + + + +var + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$; + +jQuery.noConflict = function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; +}; + +// Expose jQuery and $ identifiers, even in AMD +// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557) +// and CommonJS for browser emulators (trac-13566) +if ( typeof noGlobal === "undefined" ) { + window.jQuery = window.$ = jQuery; } -})( window ); + + + +return jQuery; +} ); |