@d-i-t-a/reader 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +32 -27
- package/dist/esm/index.js.map +2 -2
- package/dist/reader.js +2 -2
- package/dist/reader.js.map +2 -2
- package/dist/types/navigator/IFrameNavigator.d.ts +4 -0
- package/package.json +1 -1
package/dist/reader.js
CHANGED
|
@@ -66,7 +66,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
66
66
|
`)+ge+`return __p
|
|
67
67
|
}`;var ot=dy(function(){return Et(k,De+"return "+ge).apply(i,H)});if(ot.source=ge,_f(ot))throw ot;return ot}function VL(u){return _t(u).toLowerCase()}function zL(u){return _t(u).toUpperCase()}function GL(u,d,g){if(u=_t(u),u&&(g||d===i))return wm(u);if(!u||!(d=ii(d)))return u;var b=Ni(u),x=Ni(d),k=Em(b,x),H=_m(b,x)+1;return Vr(b,k,H).join("")}function JL(u,d,g){if(u=_t(u),u&&(g||d===i))return u.slice(0,Cm(u)+1);if(!u||!(d=ii(d)))return u;var b=Ni(u),x=_m(b,Ni(d))+1;return Vr(b,0,x).join("")}function KL(u,d,g){if(u=_t(u),u&&(g||d===i))return u.replace(Eh,"");if(!u||!(d=ii(d)))return u;var b=Ni(u),x=Em(b,Ni(d));return Vr(b,x).join("")}function YL(u,d){var g=Z,b=te;if(zt(d)){var x="separator"in d?d.separator:x;g="length"in d?rt(d.length):g,b="omission"in d?ii(d.omission):b}u=_t(u);var k=u.length;if(us(u)){var H=Ni(u);k=H.length}if(g>=k)return u;var U=g-cs(b);if(U<1)return b;var J=H?Vr(H,0,U).join(""):u.slice(0,U);if(x===i)return J+b;if(H&&(U+=J.length-U),Sf(x)){if(u.slice(U).search(x)){var ce,de=J;for(x.global||(x=Dh(x.source,_t(U0.exec(x))+"g")),x.lastIndex=0;ce=x.exec(de);)var ge=ce.index;J=J.slice(0,ge===i?U:ge)}}else if(u.indexOf(ii(x),U)!=U){var Oe=J.lastIndexOf(x);Oe>-1&&(J=J.slice(0,Oe))}return J+b}function XL(u){return u=_t(u),u&&lT.test(u)?u.replace(j0,O2):u}var ZL=ms(function(u,d,g){return u+(g?" ":"")+d.toUpperCase()}),Of=hv("toUpperCase");function cy(u,d,g){return u=_t(u),d=g?i:d,d===i?E2(u)?A2(u):h2(u):u.match(d)||[]}var dy=st(function(u,d){try{return ti(u,i,d)}catch(g){return _f(g)?g:new tt(g)}}),QL=mr(function(u,d){return wi(d,function(g){g=Xi(g),pr(u,g,wf(u[g],u))}),u});function eP(u){var d=u==null?0:u.length,g=$e();return u=d?jt(u,function(b){if(typeof b[1]!="function")throw new Ei(o);return[g(b[0]),b[1]]}):[],st(function(b){for(var x=-1;++x<d;){var k=u[x];if(ti(k[0],this,b))return ti(k[1],this,b)}})}function tP(u){return OM(Si(u,h))}function Tf(u){return function(){return u}}function nP(u,d){return u==null||u!==u?d:u}var iP=pv(),rP=pv(!0);function Kn(u){return u}function Mf(u){return qm(typeof u=="function"?u:Si(u,h))}function oP(u){return zm(Si(u,h))}function sP(u,d){return Gm(u,Si(d,h))}var aP=st(function(u,d){return function(g){return Ca(g,u,d)}}),lP=st(function(u,d){return function(g){return Ca(u,g,d)}});function Af(u,d,g){var b=bn(d),x=Xl(d,b);g==null&&!(zt(d)&&(x.length||!b.length))&&(g=d,d=u,u=this,x=Xl(d,bn(d)));var k=!(zt(g)&&"chain"in g)||!!g.chain,H=yr(u);return wi(x,function(U){var J=d[U];u[U]=J,H&&(u.prototype[U]=function(){var ce=this.__chain__;if(k||ce){var de=u(this.__wrapped__),ge=de.__actions__=zn(this.__actions__);return ge.push({func:J,args:arguments,thisArg:u}),de.__chain__=ce,de}return J.apply(u,Dr([this.value()],arguments))})}),u}function uP(){return yn._===this&&(yn._=I2),this}function Rf(){}function cP(u){return u=rt(u),st(function(d){return Jm(d,u)})}var dP=af(jt),hP=af(gm),fP=af(kh);function hy(u){return pf(u)?Lh(Xi(u)):WM(u)}function pP(u){return function(d){return u==null?i:xo(u,d)}}var gP=mv(),mP=mv(!0);function kf(){return[]}function Lf(){return!1}function vP(){return{}}function yP(){return""}function bP(){return!0}function wP(u,d){if(u=rt(u),u<1||u>ie)return[];var g=me,b=Ln(u,me);d=$e(d),u-=me;for(var x=Ih(b,d);++g<u;)d(g);return x}function EP(u){return it(u)?jt(u,Xi):ri(u)?[u]:zn(Lv(_t(u)))}function _P(u){var d=++P2;return _t(u)+d}var SP=iu(function(u,d){return u+d},0),CP=lf("ceil"),xP=iu(function(u,d){return u/d},1),OP=lf("floor");function TP(u){return u&&u.length?Yl(u,Kn,zh):i}function MP(u,d){return u&&u.length?Yl(u,$e(d,2),zh):i}function AP(u){return ym(u,Kn)}function RP(u,d){return ym(u,$e(d,2))}function kP(u){return u&&u.length?Yl(u,Kn,Yh):i}function LP(u,d){return u&&u.length?Yl(u,$e(d,2),Yh):i}var PP=iu(function(u,d){return u*d},1),BP=lf("round"),IP=iu(function(u,d){return u-d},0);function NP(u){return u&&u.length?Bh(u,Kn):0}function HP(u,d){return u&&u.length?Bh(u,$e(d,2)):0}return R.after=ok,R.ary=Wv,R.assign=zk,R.assignIn=iy,R.assignInWith=mu,R.assignWith=Gk,R.at=Jk,R.before=qv,R.bind=wf,R.bindAll=QL,R.bindKey=Vv,R.castArray=vk,R.chain=Fv,R.chunk=OA,R.compact=TA,R.concat=MA,R.cond=eP,R.conforms=tP,R.constant=Tf,R.countBy=NR,R.create=Kk,R.curry=zv,R.curryRight=Gv,R.debounce=Jv,R.defaults=Yk,R.defaultsDeep=Xk,R.defer=sk,R.delay=ak,R.difference=AA,R.differenceBy=RA,R.differenceWith=kA,R.drop=LA,R.dropRight=PA,R.dropRightWhile=BA,R.dropWhile=IA,R.fill=NA,R.filter=DR,R.flatMap=$R,R.flatMapDeep=UR,R.flatMapDepth=WR,R.flatten=Nv,R.flattenDeep=HA,R.flattenDepth=DA,R.flip=lk,R.flow=iP,R.flowRight=rP,R.fromPairs=jA,R.functions=rL,R.functionsIn=oL,R.groupBy=qR,R.initial=$A,R.intersection=UA,R.intersectionBy=WA,R.intersectionWith=qA,R.invert=aL,R.invertBy=lL,R.invokeMap=zR,R.iteratee=Mf,R.keyBy=GR,R.keys=bn,R.keysIn=Jn,R.map=cu,R.mapKeys=cL,R.mapValues=dL,R.matches=oP,R.matchesProperty=sP,R.memoize=hu,R.merge=hL,R.mergeWith=ry,R.method=aP,R.methodOf=lP,R.mixin=Af,R.negate=fu,R.nthArg=cP,R.omit=fL,R.omitBy=pL,R.once=uk,R.orderBy=JR,R.over=dP,R.overArgs=ck,R.overEvery=hP,R.overSome=fP,R.partial=Ef,R.partialRight=Kv,R.partition=KR,R.pick=gL,R.pickBy=oy,R.property=hy,R.propertyOf=pP,R.pull=JA,R.pullAll=Dv,R.pullAllBy=KA,R.pullAllWith=YA,R.pullAt=XA,R.range=gP,R.rangeRight=mP,R.rearg=dk,R.reject=ZR,R.remove=ZA,R.rest=hk,R.reverse=yf,R.sampleSize=ek,R.set=vL,R.setWith=yL,R.shuffle=tk,R.slice=QA,R.sortBy=rk,R.sortedUniq=sR,R.sortedUniqBy=aR,R.split=$L,R.spread=fk,R.tail=lR,R.take=uR,R.takeRight=cR,R.takeRightWhile=dR,R.takeWhile=hR,R.tap=TR,R.throttle=pk,R.thru=uu,R.toArray=ey,R.toPairs=sy,R.toPairsIn=ay,R.toPath=EP,R.toPlainObject=ny,R.transform=bL,R.unary=gk,R.union=fR,R.unionBy=pR,R.unionWith=gR,R.uniq=mR,R.uniqBy=vR,R.uniqWith=yR,R.unset=wL,R.unzip=bf,R.unzipWith=jv,R.update=EL,R.updateWith=_L,R.values=bs,R.valuesIn=SL,R.without=bR,R.words=cy,R.wrap=mk,R.xor=wR,R.xorBy=ER,R.xorWith=_R,R.zip=SR,R.zipObject=CR,R.zipObjectDeep=xR,R.zipWith=OR,R.entries=sy,R.entriesIn=ay,R.extend=iy,R.extendWith=mu,Af(R,R),R.add=SP,R.attempt=dy,R.camelCase=TL,R.capitalize=ly,R.ceil=CP,R.clamp=CL,R.clone=yk,R.cloneDeep=wk,R.cloneDeepWith=Ek,R.cloneWith=bk,R.conformsTo=_k,R.deburr=uy,R.defaultTo=nP,R.divide=xP,R.endsWith=ML,R.eq=Di,R.escape=AL,R.escapeRegExp=RL,R.every=HR,R.find=jR,R.findIndex=Bv,R.findKey=Zk,R.findLast=FR,R.findLastIndex=Iv,R.findLastKey=Qk,R.floor=OP,R.forEach=$v,R.forEachRight=Uv,R.forIn=eL,R.forInRight=tL,R.forOwn=nL,R.forOwnRight=iL,R.get=Cf,R.gt=Sk,R.gte=Ck,R.has=sL,R.hasIn=xf,R.head=Hv,R.identity=Kn,R.includes=VR,R.indexOf=FA,R.inRange=xL,R.invoke=uL,R.isArguments=Mo,R.isArray=it,R.isArrayBuffer=xk,R.isArrayLike=Gn,R.isArrayLikeObject=en,R.isBoolean=Ok,R.isBuffer=zr,R.isDate=Tk,R.isElement=Mk,R.isEmpty=Ak,R.isEqual=Rk,R.isEqualWith=kk,R.isError=_f,R.isFinite=Lk,R.isFunction=yr,R.isInteger=Yv,R.isLength=pu,R.isMap=Xv,R.isMatch=Pk,R.isMatchWith=Bk,R.isNaN=Ik,R.isNative=Nk,R.isNil=Dk,R.isNull=Hk,R.isNumber=Zv,R.isObject=zt,R.isObjectLike=Kt,R.isPlainObject=Ra,R.isRegExp=Sf,R.isSafeInteger=jk,R.isSet=Qv,R.isString=gu,R.isSymbol=ri,R.isTypedArray=ys,R.isUndefined=Fk,R.isWeakMap=$k,R.isWeakSet=Uk,R.join=VA,R.kebabCase=kL,R.last=xi,R.lastIndexOf=zA,R.lowerCase=LL,R.lowerFirst=PL,R.lt=Wk,R.lte=qk,R.max=TP,R.maxBy=MP,R.mean=AP,R.meanBy=RP,R.min=kP,R.minBy=LP,R.stubArray=kf,R.stubFalse=Lf,R.stubObject=vP,R.stubString=yP,R.stubTrue=bP,R.multiply=PP,R.nth=GA,R.noConflict=uP,R.noop=Rf,R.now=du,R.pad=BL,R.padEnd=IL,R.padStart=NL,R.parseInt=HL,R.random=OL,R.reduce=YR,R.reduceRight=XR,R.repeat=DL,R.replace=jL,R.result=mL,R.round=BP,R.runInContext=z,R.sample=QR,R.size=nk,R.snakeCase=FL,R.some=ik,R.sortedIndex=eR,R.sortedIndexBy=tR,R.sortedIndexOf=nR,R.sortedLastIndex=iR,R.sortedLastIndexBy=rR,R.sortedLastIndexOf=oR,R.startCase=UL,R.startsWith=WL,R.subtract=IP,R.sum=NP,R.sumBy=HP,R.template=qL,R.times=wP,R.toFinite=br,R.toInteger=rt,R.toLength=ty,R.toLower=VL,R.toNumber=Oi,R.toSafeInteger=Vk,R.toString=_t,R.toUpper=zL,R.trim=GL,R.trimEnd=JL,R.trimStart=KL,R.truncate=YL,R.unescape=XL,R.uniqueId=_P,R.upperCase=ZL,R.upperFirst=Of,R.each=$v,R.eachRight=Uv,R.first=Hv,Af(R,function(){var u={};return Ki(R,function(d,g){xt.call(R.prototype,g)||(u[g]=d)}),u}(),{chain:!1}),R.VERSION=t,wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){R[u].placeholder=R}),wi(["drop","take"],function(u,d){ht.prototype[u]=function(g){g=g===i?1:gn(rt(g),0);var b=this.__filtered__&&!d?new ht(this):this.clone();return b.__filtered__?b.__takeCount__=Ln(g,b.__takeCount__):b.__views__.push({size:Ln(g,me),type:u+(b.__dir__<0?"Right":"")}),b},ht.prototype[u+"Right"]=function(g){return this.reverse()[u](g).reverse()}}),wi(["filter","map","takeWhile"],function(u,d){var g=d+1,b=g==se||g==ae;ht.prototype[u]=function(x){var k=this.clone();return k.__iteratees__.push({iteratee:$e(x,3),type:g}),k.__filtered__=k.__filtered__||b,k}}),wi(["head","last"],function(u,d){var g="take"+(d?"Right":"");ht.prototype[u]=function(){return this[g](1).value()[0]}}),wi(["initial","tail"],function(u,d){var g="drop"+(d?"":"Right");ht.prototype[u]=function(){return this.__filtered__?new ht(this):this[g](1)}}),ht.prototype.compact=function(){return this.filter(Kn)},ht.prototype.find=function(u){return this.filter(u).head()},ht.prototype.findLast=function(u){return this.reverse().find(u)},ht.prototype.invokeMap=st(function(u,d){return typeof u=="function"?new ht(this):this.map(function(g){return Ca(g,u,d)})}),ht.prototype.reject=function(u){return this.filter(fu($e(u)))},ht.prototype.slice=function(u,d){u=rt(u);var g=this;return g.__filtered__&&(u>0||d<0)?new ht(g):(u<0?g=g.takeRight(-u):u&&(g=g.drop(u)),d!==i&&(d=rt(d),g=d<0?g.dropRight(-d):g.take(d-u)),g)},ht.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ht.prototype.toArray=function(){return this.take(me)},Ki(ht.prototype,function(u,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),b=/^(?:head|last)$/.test(d),x=R[b?"take"+(d=="last"?"Right":""):d],k=b||/^find/.test(d);!x||(R.prototype[d]=function(){var H=this.__wrapped__,U=b?[1]:arguments,J=H instanceof ht,ce=U[0],de=J||it(H),ge=function(ut){var mt=x.apply(R,Dr([ut],U));return b&&Oe?mt[0]:mt};de&&g&&typeof ce=="function"&&ce.length!=1&&(J=de=!1);var Oe=this.__chain__,De=!!this.__actions__.length,ze=k&&!Oe,ot=J&&!De;if(!k&&de){H=ot?H:new ht(this);var Ge=u.apply(H,U);return Ge.__actions__.push({func:uu,args:[ge],thisArg:i}),new _i(Ge,Oe)}return ze&&ot?u.apply(this,U):(Ge=this.thru(ge),ze?b?Ge.value()[0]:Ge.value():Ge)})}),wi(["pop","push","shift","sort","splice","unshift"],function(u){var d=Il[u],g=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",b=/^(?:pop|shift)$/.test(u);R.prototype[u]=function(){var x=arguments;if(b&&!this.__chain__){var k=this.value();return d.apply(it(k)?k:[],x)}return this[g](function(H){return d.apply(it(H)?H:[],x)})}}),Ki(ht.prototype,function(u,d){var g=R[d];if(g){var b=g.name+"";xt.call(fs,b)||(fs[b]=[]),fs[b].push({name:d,func:g})}}),fs[nu(i,_).name]=[{name:"wrapper",func:i}],ht.prototype.clone=X2,ht.prototype.reverse=Z2,ht.prototype.value=Q2,R.prototype.at=MR,R.prototype.chain=AR,R.prototype.commit=RR,R.prototype.next=kR,R.prototype.plant=PR,R.prototype.reverse=BR,R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=IR,R.prototype.first=R.prototype.head,va&&(R.prototype[va]=LR),R},Fr=R2();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yn._=Fr,define(function(){return Fr})):wo?((wo.exports=Fr)._=Fr,Th._=Fr):yn._=Fr}).call(ia)});var Ld=G((Xo,ml)=>{S();var sn=function i(t,n,r){t===null&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(o===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:i(a,n,r)}else{if("value"in o)return o.value;var s=o.get;return s===void 0?void 0:s.call(r)}},Gt=function(){function i(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&i(t.prototype,n),r&&i(t,r),t}}();function Zt(i,t){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:i}function an(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(i,t):i.__proto__=t)}function Jt(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}(function(i){window.cash=i()})(function(){var i=document,t=window,n=Array.prototype,r=n.slice,o=n.filter,a=n.push,s=function(){},l=function(w){return typeof w==typeof s&&w.call},c=function(w){return typeof w=="string"},h=/^#[\w-]*$/,f=/^\.[\w-]*$/,v=/<.+>/,m=/^\w+$/;function y(w,O){O=O||i;var B=f.test(w)?O.getElementsByClassName(w.slice(1)):m.test(w)?O.getElementsByTagName(w):O.querySelectorAll(w);return B}var E;function _(w){if(!E){E=i.implementation.createHTMLDocument(null);var O=E.createElement("base");O.href=i.location.href,E.head.appendChild(O)}return E.body.innerHTML=w,E.body.childNodes}function C(w){i.readyState!=="loading"?w():i.addEventListener("DOMContentLoaded",w)}function A(w,O){if(!w)return this;if(w.cash&&w!==t)return w;var B=w,Y=0,he;if(c(w))B=h.test(w)?i.getElementById(w.slice(1)):v.test(w)?_(w):y(w,O);else if(l(w))return C(w),this;if(!B)return this;if(B.nodeType||B===t)this[0]=B,this.length=1;else for(he=this.length=B.length;Y<he;Y++)this[Y]=B[Y];return this}function T(w,O){return new A(w,O)}var L=T.fn=T.prototype=A.prototype={cash:!0,length:0,push:a,splice:n.splice,map:n.map,init:A};Object.defineProperty(L,"constructor",{value:T}),T.parseHTML=_,T.noop=s,T.isFunction=l,T.isString=c,T.extend=L.extend=function(w){w=w||{};var O=r.call(arguments),B=O.length,Y=1;for(O.length===1&&(w=this,Y=0);Y<B;Y++)if(!!O[Y])for(var he in O[Y])O[Y].hasOwnProperty(he)&&(w[he]=O[Y][he]);return w};function j(w,O){for(var B=w.length,Y=0;Y<B&&O.call(w[Y],w[Y],Y,w)!==!1;Y++);}function N(w,O){var B=w&&(w.matches||w.webkitMatchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector);return!!B&&B.call(w,O)}function q(w){return c(w)?N:w.cash?function(O){return w.is(O)}:function(O,B){return O===B}}function ye(w){return T(r.call(w).filter(function(O,B,Y){return Y.indexOf(O)===B}))}T.extend({merge:function(w,O){for(var B=+O.length,Y=w.length,he=0;he<B;Y++,he++)w[Y]=O[he];return w.length=Y,w},each:j,matches:N,unique:ye,isArray:Array.isArray,isNumeric:function(w){return!isNaN(parseFloat(w))&&isFinite(w)}});var Z=T.uid="_cash"+Date.now();function te(w){return w[Z]=w[Z]||{}}function le(w,O,B){return te(w)[O]=B}function X(w,O){var B=te(w);return B[O]===void 0&&(B[O]=w.dataset?w.dataset[O]:T(w).attr("data-"+O)),B[O]}function se(w,O){var B=te(w);B?delete B[O]:w.dataset?delete w.dataset[O]:T(w).removeAttr("data-"+name)}L.extend({data:function(w,O){if(c(w))return O===void 0?X(this[0],w):this.each(function(Y){return le(Y,w,O)});for(var B in w)this.data(B,w[B]);return this},removeData:function(w){return this.each(function(O){return se(O,w)})}});var pe=/\S+/g;function ae(w){return c(w)&&w.match(pe)}function Ae(w,O){return w.classList?w.classList.contains(O):new RegExp("(^| )"+O+"( |$)","gi").test(w.className)}function ie(w,O,B){w.classList?w.classList.add(O):B.indexOf(" "+O+" ")&&(w.className+=" "+O)}function Se(w,O){w.classList?w.classList.remove(O):w.className=w.className.replace(O,"")}L.extend({addClass:function(w){var O=ae(w);return O?this.each(function(B){var Y=" "+B.className+" ";j(O,function(he){ie(B,he,Y)})}):this},attr:function(w,O){if(!!w){if(c(w))return O===void 0?this[0]?this[0].getAttribute?this[0].getAttribute(w):this[0][w]:void 0:this.each(function(Y){Y.setAttribute?Y.setAttribute(w,O):Y[w]=O});for(var B in w)this.attr(B,w[B]);return this}},hasClass:function(w){var O=!1,B=ae(w);return B&&B.length&&this.each(function(Y){return O=Ae(Y,B[0]),!O}),O},prop:function(w,O){if(c(w))return O===void 0?this[0][w]:this.each(function(Y){Y[w]=O});for(var B in w)this.prop(B,w[B]);return this},removeAttr:function(w){return this.each(function(O){O.removeAttribute?O.removeAttribute(w):delete O[w]})},removeClass:function(w){if(!arguments.length)return this.attr("class","");var O=ae(w);return O?this.each(function(B){j(O,function(Y){Se(B,Y)})}):this},removeProp:function(w){return this.each(function(O){delete O[w]})},toggleClass:function(w,O){if(O!==void 0)return this[O?"addClass":"removeClass"](w);var B=ae(w);return B?this.each(function(Y){var he=" "+Y.className+" ";j(B,function(Te){Ae(Y,Te)?Se(Y,Te):ie(Y,Te,he)})}):this}}),L.extend({add:function(w,O){return ye(T.merge(this,T(w,O)))},each:function(w){return j(this,w),this},eq:function(w){return T(this.get(w))},filter:function(w){if(!w)return this;var O=l(w)?w:q(w);return T(o.call(this,function(B){return O(B,w)}))},first:function(){return this.eq(0)},get:function(w){return w===void 0?r.call(this):w<0?this[w+this.length]:this[w]},index:function(w){var O=w?T(w)[0]:this[0],B=w?this:T(O).parent().children();return r.call(B).indexOf(O)},last:function(){return this.eq(-1)}});var Q=function(){var w=/(?:^\w|[A-Z]|\b\w)/g,O=/[\s-_]+/g;return function(B){return B.replace(w,function(Y,he){return Y[he===0?"toLowerCase":"toUpperCase"]()}).replace(O,"")}}(),me=function(){var w={},O=document,B=O.createElement("div"),Y=B.style;return function(he){if(he=Q(he),w[he])return w[he];var Te=he.charAt(0).toUpperCase()+he.slice(1),nt=["webkit","moz","ms","o"],je=(he+" "+nt.join(Te+" ")+Te).split(" ");return j(je,function(Vt){if(Vt in Y)return w[Vt]=he=w[he]=Vt,!1}),w[he]}}();T.prefixedProp=me,T.camelCase=Q,L.extend({css:function(w,O){if(c(w))return w=me(w),arguments.length>1?this.each(function(Y){return Y.style[w]=O}):t.getComputedStyle(this[0])[w];for(var B in w)this.css(B,w[B]);return this}});function Ne(w,O){return parseInt(t.getComputedStyle(w[0],null)[O],10)||0}j(["Width","Height"],function(w){var O=w.toLowerCase();L[O]=function(){return this[0].getBoundingClientRect()[O]},L["inner"+w]=function(){return this[0]["client"+w]},L["outer"+w]=function(B){return this[0]["offset"+w]+(B?Ne(this,"margin"+(w==="Width"?"Left":"Top"))+Ne(this,"margin"+(w==="Width"?"Right":"Bottom")):0)}});function re(w,O,B){var Y=X(w,"_cashEvents")||le(w,"_cashEvents",{});Y[O]=Y[O]||[],Y[O].push(B),w.addEventListener(O,B)}function Be(w,O,B){var Y=X(w,"_cashEvents"),he=Y&&Y[O],Te;!he||(B?(w.removeEventListener(O,B),Te=he.indexOf(B),Te>=0&&he.splice(Te,1)):(j(he,function(nt){w.removeEventListener(O,nt)}),he=[]))}L.extend({off:function(w,O){return this.each(function(B){return Be(B,w,O)})},on:function(w,O,B,Y){var he;if(!c(w)){for(var Te in w)this.on(Te,O,w[Te]);return this}return l(O)&&(B=O,O=null),w==="ready"?(C(B),this):(O&&(he=B,B=function(nt){for(var je=nt.target;!N(je,O);){if(je===this||je===null)return je=!1;je=je.parentNode}je&&he.call(je,nt)}),this.each(function(nt){var je=B;Y&&(je=function(){B.apply(this,arguments),Be(nt,w,je)}),re(nt,w,je)}))},one:function(w,O,B){return this.on(w,O,B,!0)},ready:C,trigger:function(w,O){if(document.createEvent){var B=document.createEvent("HTMLEvents");return B.initEvent(w,!0,!1),B=this.extend(B,O),this.each(function(Y){return Y.dispatchEvent(B)})}}});function qe(w,O){return"&"+encodeURIComponent(w)+"="+encodeURIComponent(O).replace(/%20/g,"+")}function He(w){var O=[];return j(w.options,function(B){B.selected&&O.push(B.value)}),O.length?O:null}function Je(w){var O=w.selectedIndex;return O>=0?w.options[O].value:null}function lt(w){var O=w.type;if(!O)return null;switch(O.toLowerCase()){case"select-one":return Je(w);case"select-multiple":return He(w);case"radio":return w.checked?w.value:null;case"checkbox":return w.checked?w.value:null;default:return w.value?w.value:null}}L.extend({serialize:function(){var w="";return j(this[0].elements||this,function(O){if(!(O.disabled||O.tagName==="FIELDSET")){var B=O.name;switch(O.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var Y=lt(O);Y!==null&&j(Y,function(Te){w+=qe(B,Te)});break;default:var he=lt(O);he!==null&&(w+=qe(B,he))}}}),w.substr(1)},val:function(w){return w===void 0?lt(this[0]):this.each(function(O){return O.value=w})}});function pt(w,O,B){if(B){var Y=w.childNodes[0];w.insertBefore(O,Y)}else w.appendChild(O)}function P(w,O,B){var Y=c(O);if(!Y&&O.length){j(O,function(he){return P(w,he,B)});return}j(w,Y?function(he){return he.insertAdjacentHTML(B?"afterbegin":"beforeend",O)}:function(he,Te){return pt(he,Te===0?O:O.cloneNode(!0),B)})}L.extend({after:function(w){return T(w).insertAfter(this),this},append:function(w){return P(this,w),this},appendTo:function(w){return P(T(w),this),this},before:function(w){return T(w).insertBefore(this),this},clone:function(){return T(this.map(function(w){return w.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(w){if(w===void 0)return this[0].innerHTML;var O=w.nodeType?w[0].outerHTML:w;return this.each(function(B){return B.innerHTML=O})},insertAfter:function(w){var O=this;return T(w).each(function(B,Y){var he=B.parentNode,Te=B.nextSibling;O.each(function(nt){he.insertBefore(Y===0?nt:nt.cloneNode(!0),Te)})}),this},insertBefore:function(w){var O=this;return T(w).each(function(B,Y){var he=B.parentNode;O.each(function(Te){he.insertBefore(Y===0?Te:Te.cloneNode(!0),B)})}),this},prepend:function(w){return P(this,w,!0),this},prependTo:function(w){return P(T(w),this,!0),this},remove:function(){return this.each(function(w){if(w.parentNode)return w.parentNode.removeChild(w)})},text:function(w){return w===void 0?this[0].textContent:this.each(function(O){return O.textContent=w})}});var F=i.documentElement;return L.extend({position:function(){var w=this[0];return{left:w.offsetLeft,top:w.offsetTop}},offset:function(){var w=this[0].getBoundingClientRect();return{top:w.top+t.pageYOffset-F.clientTop,left:w.left+t.pageXOffset-F.clientLeft}},offsetParent:function(){return T(this[0].offsetParent)}}),L.extend({children:function(w){var O=[];return this.each(function(B){a.apply(O,B.children)}),O=ye(O),w?O.filter(function(B){return N(B,w)}):O},closest:function(w){return!w||this.length<1?T():this.is(w)?this.filter(w):this.parent().closest(w)},is:function(w){if(!w)return!1;var O=!1,B=q(w);return this.each(function(Y){return O=B(Y,w),!O}),O},find:function(w){if(!w||w.nodeType)return T(w&&this.has(w).length?w:null);var O=[];return this.each(function(B){a.apply(O,y(w,B))}),ye(O)},has:function(w){var O=c(w)?function(B){return y(w,B).length!==0}:function(B){return B.contains(w)};return this.filter(O)},next:function(){return T(this[0].nextElementSibling)},not:function(w){if(!w)return this;var O=q(w);return this.filter(function(B){return!O(B,w)})},parent:function(){var w=[];return this.each(function(O){O&&O.parentNode&&w.push(O.parentNode)}),ye(w)},parents:function(w){var O,B=[];return this.each(function(Y){for(O=Y;O&&O.parentNode&&O!==i.body.parentNode;)O=O.parentNode,(!w||w&&N(O,w))&&B.push(O)}),ye(B)},prev:function(){return T(this[0].previousElementSibling)},siblings:function(w){var O=this.parent().children(w),B=this[0];return O.filter(function(Y){return Y!==B})}}),T});var ln=function(){function i(t,n,r){Jt(this,i),n instanceof Element||console.error(Error(n+" is not an HTML Element"));var o=t.getInstance(n);o&&o.destroy(),this.el=n,this.$el=cash(n)}return Gt(i,null,[{key:"init",value:function(n,r,o){var a=null;if(r instanceof Element)a=new n(r,o);else if(!!r&&(r.jquery||r.cash||r instanceof NodeList)){for(var s=[],l=0;l<r.length;l++)s.push(new n(r[l],o));a=s}return a}}]),i}();(function(i){i.Package?M={}:i.M={},M.jQueryLoaded=!!i.jQuery})(window);typeof define=="function"&&define.amd?define("M",[],function(){return M}):typeof Xo!="undefined"&&!Xo.nodeType&&(typeof ml!="undefined"&&!ml.nodeType&&ml.exports&&(Xo=ml.exports=M),Xo.default=M);M.version="1.0.0";M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40};M.tabPressed=!1;M.keyDown=!1;var _5=function(i){M.keyDown=!0,(i.which===M.keys.TAB||i.which===M.keys.ARROW_DOWN||i.which===M.keys.ARROW_UP)&&(M.tabPressed=!0)},S5=function(i){M.keyDown=!1,(i.which===M.keys.TAB||i.which===M.keys.ARROW_DOWN||i.which===M.keys.ARROW_UP)&&(M.tabPressed=!1)},C5=function(i){M.keyDown&&document.body.classList.add("keyboard-focused")},x5=function(i){document.body.classList.remove("keyboard-focused")};document.addEventListener("keydown",_5,!0);document.addEventListener("keyup",S5,!0);document.addEventListener("focus",C5,!0);document.addEventListener("blur",x5,!0);M.initializeJqueryWrapper=function(i,t,n){jQuery.fn[t]=function(r){if(i.prototype[r]){var o=Array.prototype.slice.call(arguments,1);if(r.slice(0,3)==="get"){var a=this.first()[0][n];return a[r].apply(a,o)}return this.each(function(){var s=this[n];s[r].apply(s,o)})}else if(typeof r=="object"||!r)return i.init(this,arguments[0]),this;jQuery.error("Method "+r+" does not exist on jQuery."+t)}};M.AutoInit=function(i){var t=i||document.body,n={Autocomplete:t.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:t.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:t.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:t.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:t.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:t.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:t.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:t.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:t.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:t.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:t.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:t.querySelectorAll("select:not(.no-autoinit)"),Sidenav:t.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:t.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:t.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:t.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:t.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:t.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var r in n){var o=M[r];o.init(n[r])}};M.objectSelectorString=function(i){var t=i.prop("tagName")||"",n=i.attr("id")||"",r=i.attr("class")||"";return(t+n+r).replace(/\s/g,"")};M.guid=function(){function i(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return function(){return i()+i()+"-"+i()+"-"+i()+"-"+i()+"-"+i()+i()+i()}}();M.escapeHash=function(i){return i.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")};M.elementOrParentIsFixed=function(i){var t=$(i),n=t.add(t.parents()),r=!1;return n.each(function(){if($(this).css("position")==="fixed")return r=!0,!1}),r};M.checkWithinContainer=function(i,t,n){var r={top:!1,right:!1,bottom:!1,left:!1},o=i.getBoundingClientRect(),a=i===document.body?Math.max(o.bottom,window.innerHeight):o.bottom,s=i.scrollLeft,l=i.scrollTop,c=t.left-s,h=t.top-l;return(c<o.left+n||c<n)&&(r.left=!0),(c+t.width>o.right-n||c+t.width>window.innerWidth-n)&&(r.right=!0),(h<o.top+n||h<n)&&(r.top=!0),(h+t.height>a-n||h+t.height>window.innerHeight-n)&&(r.bottom=!0),r};M.checkPossibleAlignments=function(i,t,n,r){var o={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},a=getComputedStyle(t).overflow==="visible",s=t.getBoundingClientRect(),l=Math.min(s.height,window.innerHeight),c=Math.min(s.width,window.innerWidth),h=i.getBoundingClientRect(),f=t.scrollLeft,v=t.scrollTop,m=n.left-f,y=n.top-v,E=n.top+h.height-v;return o.spaceOnRight=a?window.innerWidth-(h.left+n.width):c-(m+n.width),o.spaceOnRight<0&&(o.left=!1),o.spaceOnLeft=a?h.right-n.width:m-n.width+h.width,o.spaceOnLeft<0&&(o.right=!1),o.spaceOnBottom=a?window.innerHeight-(h.top+n.height+r):l-(y+n.height+r),o.spaceOnBottom<0&&(o.top=!1),o.spaceOnTop=a?h.bottom-(n.height+r):E-(n.height-r),o.spaceOnTop<0&&(o.bottom=!1),o};M.getOverflowParent=function(i){return i==null?null:i===document.body||getComputedStyle(i).overflow!=="visible"?i:M.getOverflowParent(i.parentElement)};M.getIdFromTrigger=function(i){var t=i.getAttribute("data-target");return t||(t=i.getAttribute("href"),t?t=t.slice(1):t=""),t};M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0};M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var MC=Date.now||function(){return new Date().getTime()};M.throttle=function(i,t,n){var r=void 0,o=void 0,a=void 0,s=null,l=0;n||(n={});var c=function(){l=n.leading===!1?0:MC(),s=null,a=i.apply(r,o),r=o=null};return function(){var h=MC();!l&&n.leading===!1&&(l=h);var f=t-(h-l);return r=this,o=arguments,f<=0?(clearTimeout(s),s=null,l=h,a=i.apply(r,o),r=o=null):!s&&n.trailing!==!1&&(s=setTimeout(c,f)),a}};var ft={scope:{}};ft.defineProperty=typeof Object.defineProperties=="function"?Object.defineProperty:function(i,t,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");i!=Array.prototype&&i!=Object.prototype&&(i[t]=n.value)};ft.getGlobal=function(i){return typeof window!="undefined"&&window===i?i:typeof window!="undefined"&&window!=null?window:i};ft.global=ft.getGlobal(Xo);ft.SYMBOL_PREFIX="jscomp_symbol_";ft.initSymbol=function(){ft.initSymbol=function(){},ft.global.Symbol||(ft.global.Symbol=ft.Symbol)};ft.symbolCounter_=0;ft.Symbol=function(i){return ft.SYMBOL_PREFIX+(i||"")+ft.symbolCounter_++};ft.initSymbolIterator=function(){ft.initSymbol();var i=ft.global.Symbol.iterator;i||(i=ft.global.Symbol.iterator=ft.global.Symbol("iterator")),typeof Array.prototype[i]!="function"&&ft.defineProperty(Array.prototype,i,{configurable:!0,writable:!0,value:function(){return ft.arrayIterator(this)}}),ft.initSymbolIterator=function(){}};ft.arrayIterator=function(i){var t=0;return ft.iteratorPrototype(function(){return t<i.length?{done:!1,value:i[t++]}:{done:!0}})};ft.iteratorPrototype=function(i){return ft.initSymbolIterator(),i={next:i},i[ft.global.Symbol.iterator]=function(){return this},i};ft.array=ft.array||{};ft.iteratorFromArray=function(i,t){ft.initSymbolIterator(),i instanceof String&&(i+="");var n=0,r={next:function(){if(n<i.length){var o=n++;return{value:t(o,i[o]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r};ft.polyfill=function(i,t,n,r){if(t){for(n=ft.global,i=i.split("."),r=0;r<i.length-1;r++){var o=i[r];o in n||(n[o]={}),n=n[o]}i=i[i.length-1],r=n[i],t=t(r),t!=r&&t!=null&&ft.defineProperty(n,i,{configurable:!0,writable:!0,value:t})}};ft.polyfill("Array.prototype.keys",function(i){return i||function(){return ft.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var O5=Xo;(function(i){M.anime=i()})(function(){function i(P){if(!re.col(P))try{return document.querySelectorAll(P)}catch(F){}}function t(P,F){for(var w=P.length,O=2<=arguments.length?arguments[1]:void 0,B=[],Y=0;Y<w;Y++)if(Y in P){var he=P[Y];F.call(O,he,Y,P)&&B.push(he)}return B}function n(P){return P.reduce(function(F,w){return F.concat(re.arr(w)?n(w):w)},[])}function r(P){return re.arr(P)?P:(re.str(P)&&(P=i(P)||P),P instanceof NodeList||P instanceof HTMLCollection?[].slice.call(P):[P])}function o(P,F){return P.some(function(w){return w===F})}function a(P){var F={},w;for(w in P)F[w]=P[w];return F}function s(P,F){var w=a(P),O;for(O in P)w[O]=F.hasOwnProperty(O)?F[O]:P[O];return w}function l(P,F){var w=a(P),O;for(O in F)w[O]=re.und(P[O])?F[O]:P[O];return w}function c(P){P=P.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(O,B,Y,he){return B+B+Y+Y+he+he});var F=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(P);P=parseInt(F[1],16);var w=parseInt(F[2],16),F=parseInt(F[3],16);return"rgba("+P+","+w+","+F+",1)"}function h(P){function F(Te,nt,je){return 0>je&&(je+=1),1<je&&--je,je<1/6?Te+6*(nt-Te)*je:.5>je?nt:je<2/3?Te+(nt-Te)*(2/3-je)*6:Te}var w=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(P)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(P);P=parseInt(w[1])/360;var O=parseInt(w[2])/100,B=parseInt(w[3])/100,w=w[4]||1;if(O==0)B=O=P=B;else{var Y=.5>B?B*(1+O):B+O-B*O,he=2*B-Y,B=F(he,Y,P+1/3),O=F(he,Y,P);P=F(he,Y,P-1/3)}return"rgba("+255*B+","+255*O+","+255*P+","+w+")"}function f(P){if(P=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(P))return P[2]}function v(P){if(-1<P.indexOf("translate")||P==="perspective")return"px";if(-1<P.indexOf("rotate")||-1<P.indexOf("skew"))return"deg"}function m(P,F){return re.fnc(P)?P(F.target,F.id,F.total):P}function y(P,F){if(F in P.style)return getComputedStyle(P).getPropertyValue(F.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function E(P,F){if(re.dom(P)&&o(me,F))return"transform";if(re.dom(P)&&(P.getAttribute(F)||re.svg(P)&&P[F]))return"attribute";if(re.dom(P)&&F!=="transform"&&y(P,F))return"css";if(P[F]!=null)return"object"}function _(P,F){var w=v(F),w=-1<F.indexOf("scale")?1:0+w;if(P=P.style.transform,!P)return w;for(var O=[],B=[],Y=[],he=/(\w+)\((.+?)\)/g;O=he.exec(P);)B.push(O[1]),Y.push(O[2]);return P=t(Y,function(Te,nt){return B[nt]===F}),P.length?P[0]:w}function C(P,F){switch(E(P,F)){case"transform":return _(P,F);case"css":return y(P,F);case"attribute":return P.getAttribute(F)}return P[F]||0}function A(P,F){var w=/^(\*=|\+=|-=)/.exec(P);if(!w)return P;var O=f(P)||0;switch(F=parseFloat(F),P=parseFloat(P.replace(w[0],"")),w[0][0]){case"+":return F+P+O;case"-":return F-P+O;case"*":return F*P+O}}function T(P,F){return Math.sqrt(Math.pow(F.x-P.x,2)+Math.pow(F.y-P.y,2))}function L(P){P=P.points;for(var F=0,w,O=0;O<P.numberOfItems;O++){var B=P.getItem(O);0<O&&(F+=T(w,B)),w=B}return F}function j(P){if(P.getTotalLength)return P.getTotalLength();switch(P.tagName.toLowerCase()){case"circle":return 2*Math.PI*P.getAttribute("r");case"rect":return 2*P.getAttribute("width")+2*P.getAttribute("height");case"line":return T({x:P.getAttribute("x1"),y:P.getAttribute("y1")},{x:P.getAttribute("x2"),y:P.getAttribute("y2")});case"polyline":return L(P);case"polygon":var F=P.points;return L(P)+T(F.getItem(F.numberOfItems-1),F.getItem(0))}}function N(P,F){function w(he){return he=he===void 0?0:he,P.el.getPointAtLength(1<=F+he?F+he:0)}var O=w(),B=w(-1),Y=w(1);switch(P.property){case"x":return O.x;case"y":return O.y;case"angle":return 180*Math.atan2(Y.y-B.y,Y.x-B.x)/Math.PI}}function q(P,F){var w=/-?\d*\.?\d+/g,O;if(O=re.pth(P)?P.totalLength:P,re.col(O))if(re.rgb(O)){var B=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(O);O=B?"rgba("+B[1]+",1)":O}else O=re.hex(O)?c(O):re.hsl(O)?h(O):void 0;else B=(B=f(O))?O.substr(0,O.length-B.length):O,O=F&&!/\s/g.test(O)?B+F:B;return O+="",{original:O,numbers:O.match(w)?O.match(w).map(Number):[0],strings:re.str(P)||F?O.split(w):[]}}function ye(P){return P=P?n(re.arr(P)?P.map(r):r(P)):[],t(P,function(F,w,O){return O.indexOf(F)===w})}function Z(P){var F=ye(P);return F.map(function(w,O){return{target:w,id:O,total:F.length}})}function te(P,F){var w=a(F);if(re.arr(P)){var O=P.length;O!==2||re.obj(P[0])?re.fnc(F.duration)||(w.duration=F.duration/O):P={value:P}}return r(P).map(function(B,Y){return Y=Y?0:F.delay,B=re.obj(B)&&!re.pth(B)?B:{value:B},re.und(B.delay)&&(B.delay=Y),B}).map(function(B){return l(B,w)})}function le(P,F){var w={},O;for(O in P){var B=m(P[O],F);re.arr(B)&&(B=B.map(function(Y){return m(Y,F)}),B.length===1&&(B=B[0])),w[O]=B}return w.duration=parseFloat(w.duration),w.delay=parseFloat(w.delay),w}function X(P){return re.arr(P)?Be.apply(this,P):qe[P]}function se(P,F){var w;return P.tweens.map(function(O){O=le(O,F);var B=O.value,Y=C(F.target,P.name),he=w?w.to.original:Y,he=re.arr(B)?B[0]:he,Te=A(re.arr(B)?B[1]:B,he),Y=f(Te)||f(he)||f(Y);return O.from=q(he,Y),O.to=q(Te,Y),O.start=w?w.end:P.offset,O.end=O.start+O.delay+O.duration,O.easing=X(O.easing),O.elasticity=(1e3-Math.min(Math.max(O.elasticity,1),999))/1e3,O.isPath=re.pth(B),O.isColor=re.col(O.from.original),O.isColor&&(O.round=1),w=O})}function pe(P,F){return t(n(P.map(function(w){return F.map(function(O){var B=E(w.target,O.name);if(B){var Y=se(O,w);O={type:B,property:O.name,animatable:w,tweens:Y,duration:Y[Y.length-1].end,delay:Y[0].delay}}else O=void 0;return O})})),function(w){return!re.und(w)})}function ae(P,F,w,O){var B=P==="delay";return F.length?(B?Math.min:Math.max).apply(Math,F.map(function(Y){return Y[P]})):B?O.delay:w.offset+O.delay+O.duration}function Ae(P){var F=s(Se,P),w=s(Q,P),O=Z(P.targets),B=[],Y=l(F,w),he;for(he in P)Y.hasOwnProperty(he)||he==="targets"||B.push({name:he,offset:Y.offset,tweens:te(P[he],w)});return P=pe(O,B),l(F,{children:[],animatables:O,animations:P,duration:ae("duration",P,F,w),delay:ae("delay",P,F,w)})}function ie(P){function F(){return window.Promise&&new Promise(function(gt){return Vt=gt})}function w(gt){return xe.reversed?xe.duration-gt:gt}function O(gt){for(var un=0,xn={},K=xe.animations,ne=K.length;un<ne;){var fe=K[un],Ee=fe.animatable,Me=fe.tweens,wt=Me.length-1,Re=Me[wt];wt&&(Re=t(Me,function(bh){return gt<bh.end})[0]||Re);for(var Me=Math.min(Math.max(gt-Re.start-Re.delay,0),Re.duration)/Re.duration,Ve=isNaN(Me)?1:Re.easing(Me,Re.elasticity),Me=Re.to.strings,Ie=Re.round,wt=[],Ye=void 0,Ye=Re.to.numbers.length,Xe=0;Xe<Ye;Xe++){var cn=void 0,cn=Re.to.numbers[Xe],bo=Re.from.numbers[Xe],cn=Re.isPath?N(Re.value,Ve*cn):bo+Ve*(cn-bo);Ie&&(Re.isColor&&2<Xe||(cn=Math.round(cn*Ie)/Ie)),wt.push(cn)}if(Re=Me.length)for(Ye=Me[0],Ve=0;Ve<Re;Ve++)Ie=Me[Ve+1],Xe=wt[Ve],isNaN(Xe)||(Ye=Ie?Ye+(Xe+Ie):Ye+(Xe+" "));else Ye=wt[0];He[fe.type](Ee.target,fe.property,Ye,xn,Ee.id),fe.currentValue=Ye,un++}if(un=Object.keys(xn).length)for(K=0;K<un;K++)Ne||(Ne=y(document.body,"transform")?"transform":"-webkit-transform"),xe.animatables[K].target.style[Ne]=xn[K].join(" ");xe.currentTime=gt,xe.progress=gt/xe.duration*100}function B(gt){xe[gt]&&xe[gt](xe)}function Y(){xe.remaining&&xe.remaining!==!0&&xe.remaining--}function he(gt){var un=xe.duration,xn=xe.offset,K=xn+xe.delay,ne=xe.currentTime,fe=xe.reversed,Ee=w(gt);if(xe.children.length){var Me=xe.children,wt=Me.length;if(Ee>=xe.currentTime)for(var Re=0;Re<wt;Re++)Me[Re].seek(Ee);else for(;wt--;)Me[wt].seek(Ee)}(Ee>=K||!un)&&(xe.began||(xe.began=!0,B("begin")),B("run")),Ee>xn&&Ee<un?O(Ee):(Ee<=xn&&ne!==0&&(O(0),fe&&Y()),(Ee>=un&&ne!==un||!un)&&(O(un),fe||Y())),B("update"),gt>=un&&(xe.remaining?(nt=Te,xe.direction==="alternate"&&(xe.reversed=!xe.reversed)):(xe.pause(),xe.completed||(xe.completed=!0,B("complete"),"Promise"in window&&(Vt(),Nt=F()))),je=0)}P=P===void 0?{}:P;var Te,nt,je=0,Vt=null,Nt=F(),xe=Ae(P);return xe.reset=function(){var gt=xe.direction,un=xe.loop;for(xe.currentTime=0,xe.progress=0,xe.paused=!0,xe.began=!1,xe.completed=!1,xe.reversed=gt==="reverse",xe.remaining=gt==="alternate"&&un===1?2:un,O(0),gt=xe.children.length;gt--;)xe.children[gt].reset()},xe.tick=function(gt){Te=gt,nt||(nt=Te),he((je+Te-nt)*ie.speed)},xe.seek=function(gt){he(w(gt))},xe.pause=function(){var gt=Je.indexOf(xe);-1<gt&&Je.splice(gt,1),xe.paused=!0},xe.play=function(){xe.paused&&(xe.paused=!1,nt=0,je=w(xe.currentTime),Je.push(xe),lt||pt())},xe.reverse=function(){xe.reversed=!xe.reversed,nt=0,je=w(xe.currentTime)},xe.restart=function(){xe.pause(),xe.reset(),xe.play()},xe.finished=Nt,xe.reset(),xe.autoplay&&xe.play(),xe}var Se={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},Q={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},me="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),Ne,re={arr:function(P){return Array.isArray(P)},obj:function(P){return-1<Object.prototype.toString.call(P).indexOf("Object")},pth:function(P){return re.obj(P)&&P.hasOwnProperty("totalLength")},svg:function(P){return P instanceof SVGElement},dom:function(P){return P.nodeType||re.svg(P)},str:function(P){return typeof P=="string"},fnc:function(P){return typeof P=="function"},und:function(P){return typeof P=="undefined"},hex:function(P){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(P)},rgb:function(P){return/^rgb/.test(P)},hsl:function(P){return/^hsl/.test(P)},col:function(P){return re.hex(P)||re.rgb(P)||re.hsl(P)}},Be=function(){function P(F,w,O){return(((1-3*O+3*w)*F+(3*O-6*w))*F+3*w)*F}return function(F,w,O,B){if(0<=F&&1>=F&&0<=O&&1>=O){var Y=new Float32Array(11);if(F!==w||O!==B)for(var he=0;11>he;++he)Y[he]=P(.1*he,F,O);return function(Te){if(F===w&&O===B)return Te;if(Te===0)return 0;if(Te===1)return 1;for(var nt=0,je=1;je!==10&&Y[je]<=Te;++je)nt+=.1;--je;var je=nt+(Te-Y[je])/(Y[je+1]-Y[je])*.1,Vt=3*(1-3*O+3*F)*je*je+2*(3*O-6*F)*je+3*F;if(.001<=Vt){for(nt=0;4>nt&&(Vt=3*(1-3*O+3*F)*je*je+2*(3*O-6*F)*je+3*F,Vt!==0);++nt)var Nt=P(je,F,O)-Te,je=je-Nt/Vt;Te=je}else if(Vt===0)Te=je;else{var je=nt,nt=nt+.1,xe=0;do Nt=je+(nt-je)/2,Vt=P(Nt,F,O)-Te,0<Vt?nt=Nt:je=Nt;while(1e-7<Math.abs(Vt)&&10>++xe);Te=Nt}return P(Te,w,B)}}}}(),qe=function(){function P(he,Te){return he===0||he===1?he:-Math.pow(2,10*(he-1))*Math.sin(2*(he-1-Te/(2*Math.PI)*Math.asin(1))*Math.PI/Te)}var F="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),w={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],P],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(he,Te){return 1-P(1-he,Te)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(he,Te){return .5>he?P(2*he,Te)/2:1-P(-2*he+2,Te)/2}]},O={linear:Be(.25,.25,.75,.75)},B={},Y;for(Y in w)B.type=Y,w[B.type].forEach(function(he){return function(Te,nt){O["ease"+he.type+F[nt]]=re.fnc(Te)?Te:Be.apply(O5,Te)}}(B)),B={type:B.type};return O}(),He={css:function(P,F,w){return P.style[F]=w},attribute:function(P,F,w){return P.setAttribute(F,w)},object:function(P,F,w){return P[F]=w},transform:function(P,F,w,O,B){O[B]||(O[B]=[]),O[B].push(F+"("+w+")")}},Je=[],lt=0,pt=function(){function P(){lt=requestAnimationFrame(F)}function F(w){var O=Je.length;if(O){for(var B=0;B<O;)Je[B]&&Je[B].tick(w),B++;P()}else cancelAnimationFrame(lt),lt=0}return P}();return ie.version="2.2.0",ie.speed=1,ie.running=Je,ie.remove=function(P){P=ye(P);for(var F=Je.length;F--;)for(var w=Je[F],O=w.animations,B=O.length;B--;)o(P,O[B].animatable.target)&&(O.splice(B,1),O.length||w.pause())},ie.getValue=C,ie.path=function(P,F){var w=re.str(P)?i(P)[0]:P,O=F||100;return function(B){return{el:w,property:B,totalLength:j(w)*(O/100)}}},ie.setDashoffset=function(P){var F=j(P);return P.setAttribute("stroke-dasharray",F),F},ie.bezier=Be,ie.easings=qe,ie.timeline=function(P){var F=ie(P);return F.pause(),F.duration=0,F.add=function(w){return F.children.forEach(function(O){O.began=!0,O.completed=!0}),r(w).forEach(function(O){var B=l(O,s(Q,P||{}));B.targets=B.targets||P.targets,O=F.duration;var Y=B.offset;B.autoplay=!1,B.direction=F.direction,B.offset=re.und(Y)?O:A(Y,O),F.began=!0,F.completed=!0,F.seek(B.offset),B=ie(B),B.began=!0,B.completed=!0,B.duration>O&&(F.duration=B.duration),F.children.push(B)}),F.seek(0),F.reset(),F.autoplay&&F.restart(),F},F},ie.random=function(P,F){return Math.floor(Math.random()*(F-P+1))+P},ie});(function(i,t){"use strict";var n={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));c.el.M_Collapsible=c,c.options=i.extend({},a.defaults,l),c.$headers=c.$el.children("li").children(".collapsible-header"),c.$headers.attr("tabindex",0),c._setupEventHandlers();var h=c.$el.children("li.active").children(".collapsible-body");return c.options.accordion?h.first().css("display","block"):h.css("display","block"),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var l=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(c){c.addEventListener("keydown",l._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var l=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(c){c.removeEventListener("keydown",l._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(l){var c=i(l.target).closest(".collapsible-header");if(l.target&&c.length){var h=c.closest(".collapsible");if(h[0]===this.el){var f=c.closest("li"),v=h.children("li"),m=f[0].classList.contains("active"),y=v.index(f);m?this.close(y):this.open(y)}}}},{key:"_handleCollapsibleKeydown",value:function(l){l.keyCode===13&&this._handleCollapsibleClickBound(l)}},{key:"_animateIn",value:function(l){var c=this,h=this.$el.children("li").eq(l);if(h.length){var f=h.children(".collapsible-body");t.remove(f[0]),f.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var v=f.css("padding-top"),m=f.css("padding-bottom"),y=f[0].scrollHeight;f.css({paddingTop:0,paddingBottom:0}),t({targets:f[0],height:y,paddingTop:v,paddingBottom:m,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(E){f.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),typeof c.options.onOpenEnd=="function"&&c.options.onOpenEnd.call(c,h[0])}})}}},{key:"_animateOut",value:function(l){var c=this,h=this.$el.children("li").eq(l);if(h.length){var f=h.children(".collapsible-body");t.remove(f[0]),f.css("overflow","hidden"),t({targets:f[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){f.css({height:"",overflow:"",padding:"",display:""}),typeof c.options.onCloseEnd=="function"&&c.options.onCloseEnd.call(c,h[0])}})}}},{key:"open",value:function(l){var c=this,h=this.$el.children("li").eq(l);if(h.length&&!h[0].classList.contains("active")){if(typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,h[0]),this.options.accordion){var f=this.$el.children("li"),v=this.$el.children("li.active");v.each(function(m){var y=f.index(i(m));c.close(y)})}h[0].classList.add("active"),this._animateIn(l)}}},{key:"close",value:function(l){var c=this.$el.children("li").eq(l);c.length&&c[0].classList.contains("active")&&(typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,c[0]),c[0].classList.remove("active"),this._animateOut(l))}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Collapsible}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Collapsible=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"collapsible","M_Collapsible")})(cash,M.anime);(function(i,t){"use strict";var n={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Dropdown=c,a._dropdowns.push(c),c.id=M.getIdFromTrigger(s),c.dropdownEl=document.getElementById(c.id),c.$dropdownEl=i(c.dropdownEl),c.options=i.extend({},a.defaults,l),c.isOpen=!1,c.isScrollable=!1,c.isTouchMoving=!1,c.focusedIndex=-1,c.filterQuery=[],c.options.container?i(c.options.container).append(c.dropdownEl):c.$el.after(c.dropdownEl),c._makeDropdownFocusable(),c._resetFilterQueryBound=c._resetFilterQuery.bind(c),c._handleDocumentClickBound=c._handleDocumentClick.bind(c),c._handleDocumentTouchmoveBound=c._handleDocumentTouchmove.bind(c),c._handleDropdownClickBound=c._handleDropdownClick.bind(c),c._handleDropdownKeydownBound=c._handleDropdownKeydown.bind(c),c._handleTriggerKeydownBound=c._handleTriggerKeydown.bind(c),c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),a._dropdowns.splice(a._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(l){l.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(l){var c=l.toElement||l.relatedTarget,h=!!i(c).closest(".dropdown-content").length,f=!1,v=i(c).closest(".dropdown-trigger");v.length&&!!v[0].M_Dropdown&&v[0].M_Dropdown.isOpen&&(f=!0),!f&&!h&&this.close()}},{key:"_handleDocumentClick",value:function(l){var c=this,h=i(l.target);this.options.closeOnClick&&h.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){c.close()},0):(h.closest(".dropdown-trigger").length||!h.closest(".dropdown-content").length)&&setTimeout(function(){c.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(l){(l.which===M.keys.ARROW_DOWN||l.which===M.keys.ENTER)&&!this.isOpen&&(l.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(l){var c=i(l.target);c.closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(l){if(typeof this.options.onItemClick=="function"){var c=i(l.target).closest("li")[0];this.options.onItemClick.call(this,c)}}},{key:"_handleDropdownKeydown",value:function(l){if(l.which===M.keys.TAB)l.preventDefault(),this.close();else if((l.which===M.keys.ARROW_DOWN||l.which===M.keys.ARROW_UP)&&this.isOpen){l.preventDefault();var c=l.which===M.keys.ARROW_DOWN?1:-1,h=this.focusedIndex,f=!1;do if(h=h+c,!!this.dropdownEl.children[h]&&this.dropdownEl.children[h].tabIndex!==-1){f=!0;break}while(h<this.dropdownEl.children.length&&h>=0);f&&(this.focusedIndex=h,this._focusFocusedItem())}else if(l.which===M.keys.ENTER&&this.isOpen){var v=this.dropdownEl.children[this.focusedIndex],m=i(v).find("a, button").first();m.length?m[0].click():v&&v.click()}else l.which===M.keys.ESC&&this.isOpen&&(l.preventDefault(),this.close());var y=String.fromCharCode(l.which).toLowerCase(),E=[9,13,27,38,40];if(y&&E.indexOf(l.which)===-1){this.filterQuery.push(y);var _=this.filterQuery.join(""),C=i(this.dropdownEl).find("li").filter(function(A){return i(A).text().toLowerCase().indexOf(_)===0})[0];C&&(this.focusedIndex=i(C).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,i(this.dropdownEl).children().each(function(l){l.getAttribute("tabindex")||l.setAttribute("tabindex",0)})}},{key:"_focusFocusedItem",value:function(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){var l=this.el.offsetParent.getBoundingClientRect(),c=this.el.getBoundingClientRect(),h=this.dropdownEl.getBoundingClientRect(),f=h.height,v=h.width,m=c.left-h.left,y=c.top-h.top,E={left:m,top:y,height:f,width:v},_=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,C=M.checkPossibleAlignments(this.el,_,E,this.options.coverTrigger?0:c.height),A="top",T=this.options.alignment;if(y+=this.options.coverTrigger?0:c.height,this.isScrollable=!1,C.top||(C.bottom?A="bottom":(this.isScrollable=!0,C.spaceOnTop>C.spaceOnBottom?(A="bottom",f+=C.spaceOnTop,y-=C.spaceOnTop):f+=C.spaceOnBottom)),!C[T]){var L=T==="left"?"right":"left";C[L]?T=L:C.spaceOnLeft>C.spaceOnRight?(T="right",v+=C.spaceOnLeft,m-=C.spaceOnLeft):(T="left",v+=C.spaceOnRight)}return A==="bottom"&&(y=y-h.height+(this.options.coverTrigger?c.height:0)),T==="right"&&(m=m-h.width+c.width),{x:m,y,verticalAlignment:A,horizontalAlignment:T,height:f,width:v}}},{key:"_animateIn",value:function(){var l=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(c){l.options.autoFocus&&l.dropdownEl.focus(),typeof l.options.onOpenEnd=="function"&&l.options.onOpenEnd.call(l,l.el)}})}},{key:"_animateOut",value:function(){var l=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(c){l._resetDropdownStyles(),typeof l.options.onCloseEnd=="function"&&l.options.onCloseEnd.call(l,l.el)}})}},{key:"_placeDropdown",value:function(){var l=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=l+"px";var c=this._getDropdownPosition();this.dropdownEl.style.left=c.x+"px",this.dropdownEl.style.top=c.y+"px",this.dropdownEl.style.height=c.height+"px",this.dropdownEl.style.width=c.width+"px",this.dropdownEl.style.transformOrigin=(c.horizontalAlignment==="left"?"0":"100%")+" "+(c.verticalAlignment==="top"?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){!this.isOpen||(this.isOpen=!1,this.focusedIndex=-1,typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Dropdown}},{key:"defaults",get:function(){return n}}]),a}(ln);r._dropdowns=[],M.Dropdown=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"dropdown","M_Dropdown")})(cash,M.anime);(function(i,t){"use strict";var n={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Modal=c,c.options=i.extend({},a.defaults,l),c.isOpen=!1,c.id=c.$el.attr("id"),c._openingTrigger=void 0,c.$overlay=i('<div class="modal-overlay"></div>'),c.el.tabIndex=0,c._nthModalOpened=0,a._count++,c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){a._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),a._count===1&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){a._count===0&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(l){var c=i(l.target).closest(".modal-trigger");if(c.length){var h=M.getIdFromTrigger(c[0]),f=document.getElementById(h).M_Modal;f&&f.open(c),l.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(l){var c=i(l.target).closest(".modal-close");c.length&&this.close()}},{key:"_handleKeydown",value:function(l){l.keyCode===27&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(l){!this.el.contains(l.target)&&this._nthModalOpened===a._modalsOpen&&this.el.focus()}},{key:"_animateIn",value:function(){var l=this;i.extend(this.el.style,{display:"block",opacity:0}),i.extend(this.$overlay[0].style,{display:"block",opacity:0}),t({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var c={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){typeof l.options.onOpenEnd=="function"&&l.options.onOpenEnd.call(l,l.el,l._openingTrigger)}};this.el.classList.contains("bottom-sheet")?(i.extend(c,{bottom:0,opacity:1}),t(c)):(i.extend(c,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),t(c))}},{key:"_animateOut",value:function(){var l=this;t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var c={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){l.el.style.display="none",l.$overlay.remove(),typeof l.options.onCloseEnd=="function"&&l.options.onCloseEnd.call(l,l.el)}};this.el.classList.contains("bottom-sheet")?(i.extend(c,{bottom:"-100%",opacity:0}),t(c)):(i.extend(c,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),t(c))}},{key:"open",value:function(l){if(!this.isOpen)return this.isOpen=!0,a._modalsOpen++,this._nthModalOpened=a._modalsOpen,this.$overlay[0].style.zIndex=1e3+a._modalsOpen*2,this.el.style.zIndex=1e3+a._modalsOpen*2+1,this._openingTrigger=l?l[0]:void 0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(!!this.isOpen)return this.isOpen=!1,a._modalsOpen--,this._nthModalOpened=0,typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),a._modalsOpen===0&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Modal}},{key:"defaults",get:function(){return n}}]),a}(ln);r._modalsOpen=0,r._count=0,M.Modal=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"modal","M_Modal")})(cash,M.anime);(function(i,t){"use strict";var n={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Materialbox=c,c.options=i.extend({},a.defaults,l),c.overlayActive=!1,c.doneAnimating=!0,c.placeholder=i("<div></div>").addClass("material-placeholder"),c.originalWidth=0,c.originalHeight=0,c.originInlineStyles=c.$el.attr("style"),c.caption=c.el.getAttribute("data-caption")||"",c.$el.before(c.placeholder),c.placeholder.append(c.$el),c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,i(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(l){this.doneAnimating===!1||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(l){l.keyCode===27&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=i();for(var l=this.placeholder[0].parentNode;l!==null&&!i(l).is(document);){var c=i(l);c.css("overflow")!=="visible"&&(c.css("overflow","visible"),this.ancestorsChanged===void 0?this.ancestorsChanged=c:this.ancestorsChanged=this.ancestorsChanged.add(c)),l=l.parentNode}}},{key:"_animateImageIn",value:function(){var l=this,c={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){l.doneAnimating=!0,typeof l.options.onOpenEnd=="function"&&l.options.onOpenEnd.call(l,l.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),this.maxWidth!=="none"&&(c.maxWidth=this.newWidth),this.maxHeight!=="none"&&(c.maxHeight=this.newHeight),t(c)}},{key:"_animateImageOut",value:function(){var l=this,c={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){l.placeholder.css({height:"",width:"",position:"",top:"",left:""}),l.attrWidth&&l.$el.attr("width",l.attrWidth),l.attrHeight&&l.$el.attr("height",l.attrHeight),l.$el.removeAttr("style"),l.originInlineStyles&&l.$el.attr("style",l.originInlineStyles),l.$el.removeClass("active"),l.doneAnimating=!0,l.ancestorsChanged.length&&l.ancestorsChanged.css("overflow",""),typeof l.options.onCloseEnd=="function"&&l.options.onCloseEnd.call(l,l.el)}};t(c)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var l=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=i('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",function(){l.doneAnimating&&l.close()}),this.$el.before(this.$overlay);var c=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*c.left+"px",top:-1*c.top+"px"}),t.remove(this.el),t.remove(this.$overlay[0]),t({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),this.caption!==""&&(this.$photocaption&&t.remove(this.$photoCaption[0]),this.$photoCaption=i('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),i("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),t({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var h=0,f=this.originalWidth/this.windowWidth,v=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,f>v?(h=this.originalHeight/this.originalWidth,this.newWidth=this.windowWidth*.9,this.newHeight=this.windowWidth*.9*h):(h=this.originalWidth/this.originalHeight,this.newWidth=this.windowHeight*.9*h,this.newHeight=this.windowHeight*.9),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var l=this;this._updateVars(),this.doneAnimating=!1,typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),t.remove(this.el),t.remove(this.$overlay[0]),this.caption!==""&&t.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){l.overlayActive=!1,l.$overlay.remove()}}),this._animateImageOut(),this.caption!==""&&t({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){l.$photoCaption.remove()}})}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Materialbox}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Materialbox=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"materialbox","M_Materialbox")})(cash,M.anime);(function(i){"use strict";var t={responsiveThreshold:0},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Parallax=l,l.options=i.extend({},o.defaults,s),l._enabled=window.innerWidth>l.options.responsiveThreshold,l.$img=l.$el.find("img").first(),l.$img.each(function(){var c=this;c.complete&&i(c).trigger("load")}),l._updateParallax(),l._setupEventHandlers(),l._setupStyles(),o._parallaxes.push(l),l}return Gt(o,[{key:"destroy",value:function(){o._parallaxes.splice(o._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),o._parallaxes.length===0&&(o._handleScrollThrottled=M.throttle(o._handleScroll,5),window.addEventListener("scroll",o._handleScrollThrottled),o._handleWindowResizeThrottled=M.throttle(o._handleWindowResize,5),window.addEventListener("resize",o._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),o._parallaxes.length===0&&(window.removeEventListener("scroll",o._handleScrollThrottled),window.removeEventListener("resize",o._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var s=this.$el.height()>0?this.el.parentNode.offsetHeight:500,l=this.$img[0].offsetHeight,c=l-s,h=this.$el.offset().top+s,f=this.$el.offset().top,v=M.getDocumentScrollTop(),m=window.innerHeight,y=v+m,E=(y-f)/(s+m),_=c*E;this._enabled?h>v&&f<v+m&&(this.$img[0].style.transform="translate3D(-50%, "+_+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Parallax}},{key:"_handleScroll",value:function(){for(var s=0;s<o._parallaxes.length;s++){var l=o._parallaxes[s];l._updateParallax.call(l)}}},{key:"_handleWindowResize",value:function(){for(var s=0;s<o._parallaxes.length;s++){var l=o._parallaxes[s];l._enabled=window.innerWidth>l.options.responsiveThreshold}}},{key:"defaults",get:function(){return t}}]),o}(ln);n._parallaxes=[],M.Parallax=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"parallax","M_Parallax")})(cash);(function(i,t){"use strict";var n={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Tabs=c,c.options=i.extend({},a.defaults,l),c.$tabLinks=c.$el.children("li.tab").children("a"),c.index=0,c._setupActiveTabLink(),c.options.swipeable?c._setupSwipeableTabs():c._setupNormalTabs(),c._setTabsAndTabWidth(),c._createIndicator(),c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),this.tabWidth!==0&&this.tabsWidth!==0&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(l){var c=this,h=i(l.target).closest("li.tab"),f=i(l.target).closest("a");if(!(!f.length||!f.parent().hasClass("tab"))){if(h.hasClass("disabled")){l.preventDefault();return}if(!f.attr("target")){this.$activeTabLink.removeClass("active");var v=this.$content;this.$activeTabLink=f,this.$content=i(M.escapeHash(f[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var m=this.index;this.index=Math.max(this.$tabLinks.index(f),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){typeof c.options.onShow=="function"&&c.options.onShow.call(c,c.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),typeof this.options.onShow=="function"&&this.options.onShow.call(this,this.$content[0]),v.length&&!v.is(this.$content)&&(v[0].style.display="none",v.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(m),l.preventDefault()}}}},{key:"_createIndicator",value:function(){var l=this,c=document.createElement("li");c.classList.add("indicator"),this.el.appendChild(c),this._indicator=c,setTimeout(function(){l._indicator.style.left=l._calcLeftPos(l.$activeTabLink)+"px",l._indicator.style.right=l._calcRightPos(l.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=i(this.$tabLinks.filter('[href="'+location.hash+'"]')),this.$activeTabLink.length===0&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),this.$activeTabLink.length===0&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=i(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var l=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var c=i();this.$tabLinks.each(function(v){var m=i(M.escapeHash(v.hash));m.addClass("carousel-item"),c=c.add(m)});var h=i('<div class="tabs-content carousel carousel-slider"></div>');c.first().before(h),h.append(c),c[0].style.display="";var f=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(h[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(v){var m=l.index;l.index=i(v).index(),l.$activeTabLink.removeClass("active"),l.$activeTabLink=l.$tabLinks.eq(l.index),l.$activeTabLink.addClass("active"),l._animateIndicator(m),typeof l.options.onShow=="function"&&l.options.onShow.call(l,l.$content[0])}}),this._tabsCarousel.set(f)}},{key:"_teardownSwipeableTabs",value:function(){var l=this._tabsCarousel.$el;this._tabsCarousel.destroy(),l.after(l.children()),l.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(l){if(l.hash){var c=i(M.escapeHash(l.hash));c.length&&(c[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(l){if(l.hash){var c=i(M.escapeHash(l.hash));c.length&&(c[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(l){return Math.ceil(this.tabsWidth-l.position().left-l[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(l){return Math.floor(l.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(l){var c=0,h=0;this.index-l>=0?c=90:h=90;var f={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:c},right:{value:this._calcRightPos(this.$activeTabLink),delay:h},duration:this.options.duration,easing:"easeOutQuad"};t.remove(this._indicator),t(f)}},{key:"select",value:function(l){var c=this.$tabLinks.filter('[href="#'+l+'"]');c.length&&c.trigger("click")}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Tabs}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Tabs=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"tabs","M_Tabs")})(cash,M.anime);(function(i,t){"use strict";var n={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Tooltip=c,c.options=i.extend({},a.defaults,l),c.isOpen=!1,c.isHovered=!1,c.isFocused=!1,c._appendTooltipEl(),c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){i(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var l=document.createElement("div");l.classList.add("material-tooltip"),this.tooltipEl=l;var c=document.createElement("div");c.classList.add("tooltip-content"),c.innerHTML=this.options.html,l.appendChild(c),document.body.appendChild(l)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(l){this.isOpen||(l=l===void 0?!0:void 0,this.isOpen=!0,this.options=i.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(l))}},{key:"close",value:function(){!this.isOpen||(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var l=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){l.isHovered||l.isFocused||l._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(l){var c=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){!c.isHovered&&!c.isFocused&&!l||c._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var l=this.el,c=this.tooltipEl,h=l.offsetHeight,f=l.offsetWidth,v=c.offsetHeight,m=c.offsetWidth,y=void 0,E=this.options.margin,_=void 0,C=void 0;this.xMovement=0,this.yMovement=0,_=l.getBoundingClientRect().top+M.getDocumentScrollTop(),C=l.getBoundingClientRect().left+M.getDocumentScrollLeft(),this.options.position==="top"?(_+=-v-E,C+=f/2-m/2,this.yMovement=-this.options.transitionMovement):this.options.position==="right"?(_+=h/2-v/2,C+=f+E,this.xMovement=this.options.transitionMovement):this.options.position==="left"?(_+=h/2-v/2,C+=-m-E,this.xMovement=-this.options.transitionMovement):(_+=h+E,C+=f/2-m/2,this.yMovement=this.options.transitionMovement),y=this._repositionWithinScreen(C,_,m,v),i(c).css({top:y.y+"px",left:y.x+"px"})}},{key:"_repositionWithinScreen",value:function(l,c,h,f){var v=M.getDocumentScrollLeft(),m=M.getDocumentScrollTop(),y=l-v,E=c-m,_={left:y,top:E,width:h,height:f},C=this.options.margin+this.options.transitionMovement,A=M.checkWithinContainer(document.body,_,C);return A.left?y=C:A.right&&(y-=y+h-window.innerWidth),A.top?E=C:A.bottom&&(E-=E+f-window.innerHeight),{x:y+v,y:E+m}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var l={},c=this.el.getAttribute("data-tooltip"),h=this.el.getAttribute("data-position");return c&&(l.html=c),h&&(l.position=h),l}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Tooltip}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Tooltip=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"tooltip","M_Tooltip")})(cash,M.anime);(function(i){"use strict";var t=t||{},n=document.querySelectorAll.bind(document);function r(v){return v!==null&&v===v.window}function o(v){return r(v)?v:v.nodeType===9&&v.defaultView}function a(v){var m,y,E={top:0,left:0},_=v&&v.ownerDocument;return m=_.documentElement,typeof v.getBoundingClientRect!="undefined"&&(E=v.getBoundingClientRect()),y=o(_),{top:E.top+y.pageYOffset-m.clientTop,left:E.left+y.pageXOffset-m.clientLeft}}function s(v){var m="";for(var y in v)v.hasOwnProperty(y)&&(m+=y+":"+v[y]+";");return m}var l={duration:750,show:function(v,m){if(v.button===2)return!1;var y=m||this,E=document.createElement("div");E.className="waves-ripple",y.appendChild(E);var _=a(y),C=v.pageY-_.top,A=v.pageX-_.left,T="scale("+y.clientWidth/100*10+")";"touches"in v&&(C=v.touches[0].pageY-_.top,A=v.touches[0].pageX-_.left),E.setAttribute("data-hold",Date.now()),E.setAttribute("data-scale",T),E.setAttribute("data-x",A),E.setAttribute("data-y",C);var L={top:C+"px",left:A+"px"};E.className=E.className+" waves-notransition",E.setAttribute("style",s(L)),E.className=E.className.replace("waves-notransition",""),L["-webkit-transform"]=T,L["-moz-transform"]=T,L["-ms-transform"]=T,L["-o-transform"]=T,L.transform=T,L.opacity="1",L["-webkit-transition-duration"]=l.duration+"ms",L["-moz-transition-duration"]=l.duration+"ms",L["-o-transition-duration"]=l.duration+"ms",L["transition-duration"]=l.duration+"ms",L["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",L["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",L["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",L["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",E.setAttribute("style",s(L))},hide:function(v){c.touchup(v);var m=this,y=m.clientWidth*1.4,E=null,_=m.getElementsByClassName("waves-ripple");if(_.length>0)E=_[_.length-1];else return!1;var C=E.getAttribute("data-x"),A=E.getAttribute("data-y"),T=E.getAttribute("data-scale"),L=Date.now()-Number(E.getAttribute("data-hold")),j=350-L;j<0&&(j=0),setTimeout(function(){var N={top:A+"px",left:C+"px",opacity:"0","-webkit-transition-duration":l.duration+"ms","-moz-transition-duration":l.duration+"ms","-o-transition-duration":l.duration+"ms","transition-duration":l.duration+"ms","-webkit-transform":T,"-moz-transform":T,"-ms-transform":T,"-o-transform":T,transform:T};E.setAttribute("style",s(N)),setTimeout(function(){try{m.removeChild(E)}catch(q){return!1}},l.duration)},j)},wrapInput:function(v){for(var m=0;m<v.length;m++){var y=v[m];if(y.tagName.toLowerCase()==="input"){var E=y.parentNode;if(E.tagName.toLowerCase()==="i"&&E.className.indexOf("waves-effect")!==-1)continue;var _=document.createElement("i");_.className=y.className+" waves-input-wrapper";var C=y.getAttribute("style");C||(C=""),_.setAttribute("style",C),y.className="waves-button-input",y.removeAttribute("style"),E.replaceChild(_,y),_.appendChild(y)}}}},c={touches:0,allowEvent:function(v){var m=!0;return v.type==="touchstart"?c.touches+=1:v.type==="touchend"||v.type==="touchcancel"?setTimeout(function(){c.touches>0&&(c.touches-=1)},500):v.type==="mousedown"&&c.touches>0&&(m=!1),m},touchup:function(v){c.allowEvent(v)}};function h(v){if(c.allowEvent(v)===!1)return null;for(var m=null,y=v.target||v.srcElement;y.parentNode!==null;){if(!(y instanceof SVGElement)&&y.className.indexOf("waves-effect")!==-1){m=y;break}y=y.parentNode}return m}function f(v){var m=h(v);m!==null&&(l.show(v,m),"ontouchstart"in i&&(m.addEventListener("touchend",l.hide,!1),m.addEventListener("touchcancel",l.hide,!1)),m.addEventListener("mouseup",l.hide,!1),m.addEventListener("mouseleave",l.hide,!1),m.addEventListener("dragend",l.hide,!1))}t.displayEffect=function(v){v=v||{},"duration"in v&&(l.duration=v.duration),l.wrapInput(n(".waves-effect")),"ontouchstart"in i&&document.body.addEventListener("touchstart",f,!1),document.body.addEventListener("mousedown",f,!1)},t.attach=function(v){v.tagName.toLowerCase()==="input"&&(l.wrapInput([v]),v=v.parentNode),"ontouchstart"in i&&v.addEventListener("touchstart",f,!1),v.addEventListener("mousedown",f,!1)},i.Waves=t,document.addEventListener("DOMContentLoaded",function(){t.displayEffect()},!1)})(window);(function(i,t){"use strict";var n={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},r=function(){function o(a){Jt(this,o),this.options=i.extend({},o.defaults,a),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,o._toasts.length===0&&o._createContainer(),o._toasts.push(this);var s=this._createToast();s.M_Toast=this,this.el=s,this.$el=i(s),this._animateIn(),this._setTimer()}return Gt(o,[{key:"_createToast",value:function(){var s=document.createElement("div");return s.classList.add("toast"),this.options.classes.length&&i(s).addClass(this.options.classes),(typeof HTMLElement=="object"?this.message instanceof HTMLElement:this.message&&typeof this.message=="object"&&this.message!==null&&this.message.nodeType===1&&typeof this.message.nodeName=="string")?s.appendChild(this.message):this.message.jquery?i(s).append(this.message[0]):s.innerHTML=this.message,o._container.appendChild(s),s}},{key:"_animateIn",value:function(){t({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var s=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval(function(){s.panning||(s.timeRemaining-=20),s.timeRemaining<=0&&s.dismiss()},20))}},{key:"dismiss",value:function(){var s=this;window.clearInterval(this.counterInterval);var l=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+l+"px)",this.el.style.opacity=0),t({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){typeof s.options.completeCallback=="function"&&s.options.completeCallback(),s.$el.remove(),o._toasts.splice(o._toasts.indexOf(s),1),o._toasts.length===0&&o._removeContainer()}})}}],[{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Toast}},{key:"_createContainer",value:function(){var s=document.createElement("div");s.setAttribute("id","toast-container"),s.addEventListener("touchstart",o._onDragStart),s.addEventListener("touchmove",o._onDragMove),s.addEventListener("touchend",o._onDragEnd),s.addEventListener("mousedown",o._onDragStart),document.addEventListener("mousemove",o._onDragMove),document.addEventListener("mouseup",o._onDragEnd),document.body.appendChild(s),o._container=s}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",o._onDragMove),document.removeEventListener("mouseup",o._onDragEnd),i(o._container).remove(),o._container=null}},{key:"_onDragStart",value:function(s){if(s.target&&i(s.target).closest(".toast").length){var l=i(s.target).closest(".toast"),c=l[0].M_Toast;c.panning=!0,o._draggedToast=c,c.el.classList.add("panning"),c.el.style.transition="",c.startingXPos=o._xPos(s),c.time=Date.now(),c.xPos=o._xPos(s)}}},{key:"_onDragMove",value:function(s){if(o._draggedToast){s.preventDefault();var l=o._draggedToast;l.deltaX=Math.abs(l.xPos-o._xPos(s)),l.xPos=o._xPos(s),l.velocityX=l.deltaX/(Date.now()-l.time),l.time=Date.now();var c=l.xPos-l.startingXPos,h=l.el.offsetWidth*l.options.activationPercent;l.el.style.transform="translateX("+c+"px)",l.el.style.opacity=1-Math.abs(c/h)}}},{key:"_onDragEnd",value:function(){if(o._draggedToast){var s=o._draggedToast;s.panning=!1,s.el.classList.remove("panning");var l=s.xPos-s.startingXPos,c=s.el.offsetWidth*s.options.activationPercent,h=Math.abs(l)>c||s.velocityX>1;h?(s.wasSwiped=!0,s.dismiss()):(s.el.style.transition="transform .2s, opacity .2s",s.el.style.transform="",s.el.style.opacity=""),o._draggedToast=null}}},{key:"_xPos",value:function(s){return s.targetTouches&&s.targetTouches.length>=1?s.targetTouches[0].clientX:s.clientX}},{key:"dismissAll",value:function(){for(var s in o._toasts)o._toasts[s].dismiss()}},{key:"defaults",get:function(){return n}}]),o}();r._toasts=[],r._container=null,r._draggedToast=null,M.Toast=r,M.toast=function(o){return new r(o)}})(cash,M.anime);(function(i,t){"use strict";var n={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Sidenav=c,c.id=c.$el.attr("id"),c.options=i.extend({},a.defaults,l),c.isOpen=!1,c.isFixed=c.el.classList.contains("sidenav-fixed"),c.isDragged=!1,c.lastWindowWidth=window.innerWidth,c.lastWindowHeight=window.innerHeight,c._createOverlay(),c._createDragTarget(),c._setupEventHandlers(),c._setupClasses(),c._setupFixed(),a._sidenavs.push(c),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var l=a._sidenavs.indexOf(this);l>=0&&a._sidenavs.splice(l,1)}},{key:"_createOverlay",value:function(){var l=document.createElement("div");this._closeBound=this.close.bind(this),l.classList.add("sidenav-overlay"),l.addEventListener("click",this._closeBound),document.body.appendChild(l),this._overlay=l}},{key:"_setupEventHandlers",value:function(){a._sidenavs.length===0&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){a._sidenavs.length===1&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(l){var c=i(l.target).closest(".sidenav-trigger");if(l.target&&c.length){var h=M.getIdFromTrigger(c[0]),f=document.getElementById(h).M_Sidenav;f&&f.open(c),l.preventDefault()}}},{key:"_startDrag",value:function(l){var c=l.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=c,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,t.remove(this.el),t.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(l){var c=l.targetTouches[0].clientX,h=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-c),this._xPos=c,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==h&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(l){if(!(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)){this.isDragged||this._startDrag(l),this._dragMoveUpdate(l);var c=this._xPos-this._startingXpos,h=c>0?"right":"left";c=Math.min(this._width,Math.abs(c)),this.options.edge===h&&(c=0);var f=c,v="translateX(-100%)";this.options.edge==="right"&&(v="translateX(100%)",f=-f),this.percentOpen=Math.min(1,c/this._width),this.el.style.transform=v+" translateX("+f+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(this.percentOpen>.2?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(l){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(l),this._dragMoveUpdate(l);var c=this._xPos-this._startingXpos,h=c>0?"right":"left";c=Math.min(this._width,Math.abs(c)),this.options.edge!==h&&(c=0);var f=-c;this.options.edge==="right"&&(f=-f),this.percentOpen=Math.min(1,1-c/this._width),this.el.style.transform="translateX("+f+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(this.percentOpen>.8?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(l){var c=i(l.target).closest(".sidenav-close");c.length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(window.innerWidth>992?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){this.options.edge==="right"&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&window.innerWidth>992}},{key:"_createDragTarget",value:function(){var l=document.createElement("div");l.classList.add("drag-target"),document.body.appendChild(l),this.dragTarget=l}},{key:"_preventBodyScrolling",value:function(){var l=document.body;l.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){var l=document.body;l.style.overflow=""}},{key:"open",value:function(){this.isOpen!==!0&&(this.isOpen=!0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(t.remove(this.el),t({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),(!this.isDragged||this.percentOpen!=1)&&this._animateIn()))}},{key:"close",value:function(){if(this.isOpen!==!1)if(this.isOpen=!1,typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var l=this.options.edge==="left"?"-105%":"105%";this.el.style.transform="translateX("+l+")"}else this._enableBodyScrolling(),!this.isDragged||this.percentOpen!=0?this._animateOut():this._overlay.style.display="none"}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var l=this,c=this.options.edge==="left"?-1:1;this.isDragged&&(c=this.options.edge==="left"?c+this.percentOpen:c-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[c*100+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){typeof l.options.onOpenEnd=="function"&&l.options.onOpenEnd.call(l,l.el)}})}},{key:"_animateOverlayIn",value:function(){var l=0;this.isDragged?l=this.percentOpen:i(this._overlay).css({display:"block"}),t.remove(this._overlay),t({targets:this._overlay,opacity:[l,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var l=this,c=this.options.edge==="left"?-1:1,h=0;this.isDragged&&(h=this.options.edge==="left"?c+this.percentOpen:c-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[h*100+"%",c*105+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){typeof l.options.onCloseEnd=="function"&&l.options.onCloseEnd.call(l,l.el)}})}},{key:"_animateOverlayOut",value:function(){var l=this;t.remove(this._overlay),t({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){i(l._overlay).css("display","none")}})}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Sidenav}},{key:"defaults",get:function(){return n}}]),a}(ln);r._sidenavs=[],M.Sidenav=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"sidenav","M_Sidenav")})(cash,M.anime);(function(i,t){"use strict";var n={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(o){return'a[href="#'+o+'"]'}},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_ScrollSpy=c,c.options=i.extend({},a.defaults,l),a._elements.push(c),a._count++,a._increment++,c.tickId=-1,c.id=a._increment,c._setupEventHandlers(),c._handleWindowScroll(),c}return Gt(a,[{key:"destroy",value:function(){a._elements.splice(a._elements.indexOf(this),1),a._elementsInView.splice(a._elementsInView.indexOf(this),1),a._visibleElements.splice(a._visibleElements.indexOf(this.$el),1),a._count--,this._removeEventHandlers(),i(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var l=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=l.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),a._count===1&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){a._count===0&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(l){for(var c=i(l.target),h=a._elements.length-1;h>=0;h--){var f=a._elements[h];if(c.is('a[href="#'+f.$el.attr("id")+'"]')){l.preventDefault();var v=f.$el.offset().top+1;t({targets:[document.documentElement,document.body],scrollTop:v-f.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){a._ticks++;for(var l=M.getDocumentScrollTop(),c=M.getDocumentScrollLeft(),h=c+window.innerWidth,f=l+window.innerHeight,v=a._findElements(l,h,f,c),m=0;m<v.length;m++){var y=v[m],E=y.tickId;E<0&&y._enter(),y.tickId=a._ticks}for(var _=0;_<a._elementsInView.length;_++){var C=a._elementsInView[_],A=C.tickId;A>=0&&A!==a._ticks&&(C._exit(),C.tickId=-1)}a._elementsInView=v}},{key:"_enter",value:function(){a._visibleElements=a._visibleElements.filter(function(l){return l.height()!=0}),a._visibleElements[0]?(i(this.options.getActiveElement(a._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),a._visibleElements[0][0].M_ScrollSpy&&this.id<a._visibleElements[0][0].M_ScrollSpy.id?a._visibleElements.unshift(this.$el):a._visibleElements.push(this.$el)):a._visibleElements.push(this.$el),i(this.options.getActiveElement(a._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var l=this;a._visibleElements=a._visibleElements.filter(function(c){return c.height()!=0}),a._visibleElements[0]&&(i(this.options.getActiveElement(a._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),a._visibleElements=a._visibleElements.filter(function(c){return c.attr("id")!=l.$el.attr("id")}),a._visibleElements[0]&&i(this.options.getActiveElement(a._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_ScrollSpy}},{key:"_findElements",value:function(l,c,h,f){for(var v=[],m=0;m<a._elements.length;m++){var y=a._elements[m],E=l+y.options.scrollOffset||200;if(y.$el.height()>0){var _=y.$el.offset().top,C=y.$el.offset().left,A=C+y.$el.width(),T=_+y.$el.height(),L=!(C>c||A<f||_>h||T<E);L&&v.push(y)}}return v}},{key:"defaults",get:function(){return n}}]),a}(ln);r._elements=[],r._elementsInView=[],r._visibleElements=[],r._count=0,r._increment=0,r._ticks=0,M.ScrollSpy=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"scrollSpy","M_ScrollSpy")})(cash,M.anime);(function(i){"use strict";var t={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(r,o,a){return r.indexOf(a)-o.indexOf(a)}},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Autocomplete=l,l.options=i.extend({},o.defaults,s),l.isOpen=!1,l.count=0,l.activeIndex=-1,l.oldVal,l.$inputField=l.$el.closest(".input-field"),l.$active=i(),l._mousedown=!1,l._setupDropdown(),l._setupEventHandlers(),l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),typeof window.ontouchstart!="undefined"&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),typeof window.ontouchstart!="undefined"&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var s=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),i(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(l){s.selectOption(i(l))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(s){s.type==="keyup"&&(o._keydown=!1),this.count=0;var l=this.el.value.toLowerCase();s.keyCode===13||s.keyCode===38||s.keyCode===40||(this.oldVal!==l&&(M.tabPressed||s.type!=="focus")&&this.open(),this.oldVal=l)}},{key:"_handleInputKeydown",value:function(s){o._keydown=!0;var l=s.keyCode,c=void 0,h=i(this.container).children("li").length;if(l===M.keys.ENTER&&this.activeIndex>=0){c=i(this.container).children("li").eq(this.activeIndex),c.length&&(this.selectOption(c),s.preventDefault());return}(l===M.keys.ARROW_UP||l===M.keys.ARROW_DOWN)&&(s.preventDefault(),l===M.keys.ARROW_UP&&this.activeIndex>0&&this.activeIndex--,l===M.keys.ARROW_DOWN&&this.activeIndex<h-1&&this.activeIndex++,this.$active.removeClass("active"),this.activeIndex>=0&&(this.$active=i(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(s){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(s){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(s){this._mousedown=!1}},{key:"_highlight",value:function(s,l){var c=l.find("img"),h=l.text().toLowerCase().indexOf(""+s.toLowerCase()+""),f=h+s.length-1,v=l.text().slice(0,h),m=l.text().slice(h,f+1),y=l.text().slice(f+1);l.html("<span>"+v+"<span class='highlight'>"+m+"</span>"+y+"</span>"),c.length&&l.prepend(c)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){i(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(s){var l=s.text().trim();this.el.value=l,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),typeof this.options.onAutocomplete=="function"&&this.options.onAutocomplete.call(this,l)}},{key:"_renderDropdown",value:function(s,l){var c=this;this._resetAutocomplete();var h=[];for(var f in s)if(s.hasOwnProperty(f)&&f.toLowerCase().indexOf(l)!==-1){if(this.count>=this.options.limit)break;var v={data:s[f],key:f};h.push(v),this.count++}if(this.options.sortFunction){var m=function(C,A){return c.options.sortFunction(C.key.toLowerCase(),A.key.toLowerCase(),l.toLowerCase())};h.sort(m)}for(var y=0;y<h.length;y++){var E=h[y],_=i("<li></li>");E.data?_.append('<img src="'+E.data+'" class="right circle"><span>'+E.key+"</span>"):_.append("<span>"+E.key+"</span>"),i(this.container).append(_),this._highlight(l,_)}}},{key:"open",value:function(){var s=this.el.value.toLowerCase();this._resetAutocomplete(),s.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,s)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(s){var l=this.el.value.toLowerCase();this.options.data=s,this.isOpen&&this._renderDropdown(s,l)}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Autocomplete}},{key:"defaults",get:function(){return t}}]),o}(ln);n._keydown=!1,M.Autocomplete=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"autocomplete","M_Autocomplete")})(cash);(function(i){M.updateTextFields=function(){var t="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";i(t).each(function(n,r){var o=i(this);n.value.length>0||i(n).is(":focus")||n.autofocus||o.attr("placeholder")!==null?o.siblings("label").addClass("active"):n.validity?o.siblings("label").toggleClass("active",n.validity.badInput===!0):o.siblings("label").removeClass("active")})},M.validate_field=function(t){var n=t.attr("data-length")!==null,r=parseInt(t.attr("data-length")),o=t[0].value.length;o===0&&t[0].validity.badInput===!1&&!t.is(":required")?t.hasClass("validate")&&(t.removeClass("valid"),t.removeClass("invalid")):t.hasClass("validate")&&(t.is(":valid")&&n&&o<=r||t.is(":valid")&&!n?(t.removeClass("invalid"),t.addClass("valid")):(t.removeClass("valid"),t.addClass("invalid")))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=i(t)),!t.length){console.error("No textarea element found");return}var n=i(".hiddendiv").first();n.length||(n=i('<div class="hiddendiv common"></div>'),i("body").append(n));var r=t.css("font-family"),o=t.css("font-size"),a=t.css("line-height"),s=t.css("padding-top"),l=t.css("padding-right"),c=t.css("padding-bottom"),h=t.css("padding-left");o&&n.css("font-size",o),r&&n.css("font-family",r),a&&n.css("line-height",a),s&&n.css("padding-top",s),l&&n.css("padding-right",l),c&&n.css("padding-bottom",c),h&&n.css("padding-left",h),t.data("original-height")||t.data("original-height",t.height()),t.attr("wrap")==="off"&&n.css("overflow-wrap","normal").css("white-space","pre"),n.text(t[0].value+`
|
|
68
68
|
`);var f=n.html().replace(/\n/g,"<br>");n.html(f),t[0].offsetWidth>0&&t[0].offsetHeight>0?n.css("width",t.width()+"px"):n.css("width",window.innerWidth/2+"px"),t.data("original-height")<=n.innerHeight()?t.css("height",n.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)},i(document).ready(function(){var t="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";i(document).on("change",t,function(){(this.value.length!==0||i(this).attr("placeholder")!==null)&&i(this).siblings("label").addClass("active"),M.validate_field(i(this))}),i(document).ready(function(){M.updateTextFields()}),i(document).on("reset",function(o){var a=i(o.target);a.is("form")&&(a.find(t).removeClass("valid").removeClass("invalid"),a.find(t).each(function(s){this.value.length&&i(this).siblings("label").removeClass("active")}),setTimeout(function(){a.find("select").each(function(){this.M_FormSelect&&i(this).trigger("change")})},0))}),document.addEventListener("focus",function(o){i(o.target).is(t)&&i(o.target).siblings("label, .prefix").addClass("active")},!0),document.addEventListener("blur",function(o){var a=i(o.target);if(a.is(t)){var s=".prefix";a[0].value.length===0&&a[0].validity.badInput!==!0&&a.attr("placeholder")===null&&(s+=", label"),a.siblings(s).removeClass("active"),M.validate_field(a)}},!0);var n="input[type=radio], input[type=checkbox]";i(document).on("keyup",n,function(o){if(o.which===M.keys.TAB){i(this).addClass("tabbed");var a=i(this);a.one("blur",function(s){i(this).removeClass("tabbed")});return}});var r=".materialize-textarea";i(r).each(function(){var o=i(this);o.data("original-height",o.height()),o.data("previous-length",this.value.length),M.textareaAutoResize(o)}),i(document).on("keyup",r,function(){M.textareaAutoResize(i(this))}),i(document).on("keydown",r,function(){M.textareaAutoResize(i(this))}),i(document).on("change",'.file-field input[type="file"]',function(){for(var o=i(this).closest(".file-field"),a=o.find("input.file-path"),s=i(this)[0].files,l=[],c=0;c<s.length;c++)l.push(s[c].name);a[0].value=l.join(", "),a.trigger("change")})})})(cash);(function(i,t){"use strict";var n={indicators:!0,height:400,duration:500,interval:6e3},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Slider=c,c.options=i.extend({},a.defaults,l),c.$slider=c.$el.find(".slides"),c.$slides=c.$slider.children("li"),c.activeIndex=c.$slides.filter(function(h){return i(h).hasClass("active")}).first().index(),c.activeIndex!=-1&&(c.$active=c.$slides.eq(c.activeIndex)),c._setSliderHeight(),c.$slides.find(".caption").each(function(h){c._animateCaptionIn(h,0)}),c.$slides.find("img").each(function(h){var f="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";i(h).attr("src")!==f&&(i(h).css("background-image",'url("'+i(h).attr("src")+'")'),i(h).attr("src",f))}),c._setupIndicators(),c.$active?c.$active.css("display","block"):(c.$slides.first().addClass("active"),t({targets:c.$slides.first()[0],opacity:1,duration:c.options.duration,easing:"easeOutQuad"}),c.activeIndex=0,c.$active=c.$slides.eq(c.activeIndex),c.options.indicators&&c.$indicators.eq(c.activeIndex).addClass("active")),c.$active.find("img").each(function(h){t({targets:c.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:c.options.duration,easing:"easeOutQuad"})}),c._setupEventHandlers(),c.start(),c}return Gt(a,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var l=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each(function(c){c.addEventListener("click",l._handleIndicatorClickBound)})}},{key:"_removeEventHandlers",value:function(){var l=this;this.options.indicators&&this.$indicators.each(function(c){c.removeEventListener("click",l._handleIndicatorClickBound)})}},{key:"_handleIndicatorClick",value:function(l){var c=i(l.target).index();this.set(c)}},{key:"_handleInterval",value:function(){var l=this.$slider.find(".active").index();this.$slides.length===l+1?l=0:l+=1,this.set(l)}},{key:"_animateCaptionIn",value:function(l,c){var h={targets:l,opacity:0,duration:c,easing:"easeOutQuad"};i(l).hasClass("center-align")?h.translateY=-100:i(l).hasClass("right-align")?h.translateX=100:i(l).hasClass("left-align")&&(h.translateX=-100),t(h)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var l=this;this.options.indicators&&(this.$indicators=i('<ul class="indicators"></ul>'),this.$slides.each(function(c,h){var f=i('<li class="indicator-item"></li>');l.$indicators.append(f[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(l){var c=this;if(l>=this.$slides.length?l=0:l<0&&(l=this.$slides.length-1),this.activeIndex!=l){this.$active=this.$slides.eq(this.activeIndex);var h=this.$active.find(".caption");this.$active.removeClass("active"),t({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){c.$slides.not(".active").each(function(f){t({targets:f,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(h[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(l).addClass("active")),t({targets:this.$slides.eq(l)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),t({targets:this.$slides.eq(l).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(l).addClass("active"),this.activeIndex=l,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var l=this.activeIndex+1;l>=this.$slides.length?l=0:l<0&&(l=this.$slides.length-1),this.set(l)}},{key:"prev",value:function(){var l=this.activeIndex-1;l>=this.$slides.length?l=0:l<0&&(l=this.$slides.length-1),this.set(l)}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Slider}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Slider=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"slider","M_Slider")})(cash,M.anime);(function(i,t){i(document).on("click",".card",function(n){if(i(this).children(".card-reveal").length){var r=i(n.target).closest(".card");r.data("initialOverflow")===void 0&&r.data("initialOverflow",r.css("overflow")===void 0?"":r.css("overflow"));var o=i(this).find(".card-reveal");i(n.target).is(i(".card-reveal .card-title"))||i(n.target).is(i(".card-reveal .card-title i"))?t({targets:o[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(a){var s=a.animatables[0].target;i(s).css({display:"none"}),r.css("overflow",r.data("initialOverflow"))}}):(i(n.target).is(i(".card .activator"))||i(n.target).is(i(".card .activator i")))&&(r.css("overflow","hidden"),o.css({display:"block"}),t({targets:o[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})})(cash,M.anime);(function(i){"use strict";var t={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Chips=l,l.options=i.extend({},o.defaults,s),l.$el.addClass("chips input-field"),l.chipsData=[],l.$chips=i(),l._setupInput(),l.hasAutocomplete=Object.keys(l.options.autocompleteOptions).length>0,l.$input.attr("id")||l.$input.attr("id",M.guid()),l.options.data.length&&(l.chipsData=l.options.data,l._renderChips(l.chipsData)),l.hasAutocomplete&&l._setupAutocomplete(),l._setPlaceholder(),l._setupLabel(),l._setupEventHandlers(),l}return Gt(o,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",o._handleChipsKeydown),document.addEventListener("keyup",o._handleChipsKeyup),this.el.addEventListener("blur",o._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",o._handleChipsKeydown),document.removeEventListener("keyup",o._handleChipsKeyup),this.el.removeEventListener("blur",o._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(s){var l=i(s.target).closest(".chip"),c=i(s.target).is(".close");if(l.length){var h=l.index();c?(this.deleteChip(h),this.$input[0].focus()):this.selectChip(h)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(s){if(o._keydown=!0,s.keyCode===13){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;s.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else(s.keyCode===8||s.keyCode===37)&&this.$input[0].value===""&&this.chipsData.length&&(s.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(s){if(!!s.tag){var l=document.createElement("div"),c=document.createElement("i");if(l.classList.add("chip"),l.textContent=s.tag,l.setAttribute("tabindex",0),i(c).addClass("material-icons close"),c.textContent="close",s.image){var h=document.createElement("img");h.setAttribute("src",s.image),l.insertBefore(h,l.firstChild)}return l.appendChild(c),l}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var s=0;s<this.chipsData.length;s++){var l=this._renderChip(this.chipsData[s]);this.$el.append(l),this.$chips.add(l)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var s=this;this.options.autocompleteOptions.onAutocomplete=function(l){s.addChip({tag:l}),s.$input[0].value="",s.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=i("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){this.chipsData!==void 0&&!this.chipsData.length&&this.options.placeholder?i(this.$input).prop("placeholder",this.options.placeholder):(this.chipsData===void 0||!!this.chipsData.length)&&this.options.secondaryPlaceholder&&i(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(s){if(s.hasOwnProperty("tag")&&s.tag!==""){for(var l=!1,c=0;c<this.chipsData.length;c++)if(this.chipsData[c].tag===s.tag){l=!0;break}return!l}return!1}},{key:"addChip",value:function(s){if(!(!this._isValid(s)||this.chipsData.length>=this.options.limit)){var l=this._renderChip(s);this.$chips.add(l),this.chipsData.push(s),i(this.$input).before(l),this._setPlaceholder(),typeof this.options.onChipAdd=="function"&&this.options.onChipAdd.call(this,this.$el,l)}}},{key:"deleteChip",value:function(s){var l=this.$chips.eq(s);this.$chips.eq(s).remove(),this.$chips=this.$chips.filter(function(c){return i(c).index()>=0}),this.chipsData.splice(s,1),this._setPlaceholder(),typeof this.options.onChipDelete=="function"&&this.options.onChipDelete.call(this,this.$el,l[0])}},{key:"selectChip",value:function(s){var l=this.$chips.eq(s);this._selectedChip=l,l[0].focus(),typeof this.options.onChipSelect=="function"&&this.options.onChipSelect.call(this,this.$el,l[0])}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Chips}},{key:"_handleChipsKeydown",value:function(s){o._keydown=!0;var l=i(s.target).closest(".chips"),c=s.target&&l.length;if(!(i(s.target).is("input, textarea")||!c)){var h=l[0].M_Chips;if(s.keyCode===8||s.keyCode===46){s.preventDefault();var f=h.chipsData.length;if(h._selectedChip){var v=h._selectedChip.index();h.deleteChip(v),h._selectedChip=null,f=Math.max(v-1,0)}h.chipsData.length&&h.selectChip(f)}else if(s.keyCode===37){if(h._selectedChip){var m=h._selectedChip.index()-1;if(m<0)return;h.selectChip(m)}}else if(s.keyCode===39&&h._selectedChip){var y=h._selectedChip.index()+1;y>=h.chipsData.length?h.$input[0].focus():h.selectChip(y)}}}},{key:"_handleChipsKeyup",value:function(s){o._keydown=!1}},{key:"_handleChipsBlur",value:function(s){if(!o._keydown){var l=i(s.target).closest(".chips"),c=l[0].M_Chips;c._selectedChip=null}}},{key:"defaults",get:function(){return t}}]),o}(ln);n._keydown=!1,M.Chips=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"chips","M_Chips"),i(document).ready(function(){i(document.body).on("click",".chip .close",function(){var r=i(this).closest(".chips");r.length&&r[0].M_Chips||i(this).closest(".chip").remove()})})})(cash);(function(i){"use strict";var t={top:0,bottom:1/0,offset:0,onPositionChange:null},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Pushpin=l,l.options=i.extend({},o.defaults,s),l.originalOffset=l.el.offsetTop,o._pushpins.push(l),l._setupEventHandlers(),l._updatePosition(),l}return Gt(o,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var s=o._pushpins.indexOf(this);o._pushpins.splice(s,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",o._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",o._updateElements)}},{key:"_updatePosition",value:function(){var s=M.getDocumentScrollTop()+this.options.offset;this.options.top<=s&&this.options.bottom>=s&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),typeof this.options.onPositionChange=="function"&&this.options.onPositionChange.call(this,"pinned")),s<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),typeof this.options.onPositionChange=="function"&&this.options.onPositionChange.call(this,"pin-top")),s>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px",typeof this.options.onPositionChange=="function"&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Pushpin}},{key:"_updateElements",value:function(){for(var s in o._pushpins){var l=o._pushpins[s];l._updatePosition()}}},{key:"defaults",get:function(){return t}}]),o}(ln);n._pushpins=[],M.Pushpin=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"pushpin","M_Pushpin")})(cash);(function(i,t){"use strict";var n={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};i.fn.reverse=[].reverse;var r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_FloatingActionButton=c,c.options=i.extend({},a.defaults,l),c.isOpen=!1,c.$anchor=c.$el.children("a").first(),c.$menu=c.$el.children("ul").first(),c.$floatingBtns=c.$el.find("ul .btn-floating"),c.$floatingBtnsReverse=c.$el.find("ul .btn-floating").reverse(),c.offsetY=0,c.offsetX=0,c.$el.addClass("direction-"+c.options.direction),c.options.direction==="top"?c.offsetY=40:c.options.direction==="right"?c.offsetX=-40:c.options.direction==="bottom"?c.offsetY=-40:c.offsetX=40,c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(l){i(l.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){!this.isOpen||(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var l=this;this.$el.addClass("active");var c=0;this.$floatingBtnsReverse.each(function(h){t({targets:h,opacity:1,scale:[.4,1],translateY:[l.offsetY,0],translateX:[l.offsetX,0],duration:275,delay:c,easing:"easeInOutQuad"}),c+=40})}},{key:"_animateOutFAB",value:function(){var l=this;this.$floatingBtnsReverse.each(function(c){t.remove(c),t({targets:c,opacity:0,scale:.4,translateY:l.offsetY,translateX:l.offsetX,duration:175,easing:"easeOutQuad",complete:function(){l.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var l=this,c=void 0,h=window.innerWidth,f=window.innerHeight,v=this.el.getBoundingClientRect(),m=i('<div class="fab-backdrop"></div>'),y=this.$anchor.css("background-color");this.$anchor.append(m),this.offsetX=v.left-h/2+v.width/2,this.offsetY=f-v.bottom,c=h/m[0].clientWidth,this.btnBottom=v.bottom,this.btnLeft=v.left,this.btnWidth=v.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),m.css({"background-color":y}),setTimeout(function(){l.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),l.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){l.$el.css({overflow:"hidden","background-color":y}),m.css({transform:"scale("+c+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),l.$menu.children("li").children("a").css({opacity:1}),l._handleDocumentClickBound=l._handleDocumentClick.bind(l),window.addEventListener("scroll",l._handleCloseBound,!0),document.body.addEventListener("click",l._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var l=this,c=window.innerWidth,h=window.innerHeight,f=this.$el.find(".fab-backdrop"),v=this.$anchor.css("background-color");this.offsetX=this.btnLeft-c/2+this.btnWidth/2,this.offsetY=h-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),f.css({transform:"scale(0)","background-color":v}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){f.remove(),l.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-l.offsetX+"px,0,0)"}),l.$anchor.css({overflow:"",transform:"translate3d(0,"+l.offsetY+"px,0)"}),setTimeout(function(){l.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),l.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_FloatingActionButton}},{key:"defaults",get:function(){return n}}]),a}(ln);M.FloatingActionButton=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"floatingActionButton","M_FloatingActionButton")})(cash,M.anime);(function(i){"use strict";var t={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"\u2039",nextMonth:"\u203A",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));l.el.M_Datepicker=l,l.options=i.extend({},o.defaults,s),!!s&&s.hasOwnProperty("i18n")&&typeof s.i18n=="object"&&(l.options.i18n=i.extend({},o.defaults.i18n,s.i18n)),l.options.minDate&&l.options.minDate.setHours(0,0,0,0),l.options.maxDate&&l.options.maxDate.setHours(0,0,0,0),l.id=M.guid(),l._setupVariables(),l._insertHTMLIntoDOM(),l._setupModal(),l._setupEventHandlers(),l.options.defaultDate||(l.options.defaultDate=new Date(Date.parse(l.el.value)));var c=l.options.defaultDate;return o._isDate(c)?l.options.setDefaultDate?(l.setDate(c,!0),l.setInputValue()):l.gotoDate(c):l.gotoDate(new Date),l.isOpen=!1,l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),i(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var s=this.calendarEl.querySelector(".orig-select-year");s&&M.FormSelect.getInstance(s).destroy();var l=this.calendarEl.querySelector(".orig-select-month");l&&M.FormSelect.getInstance(l).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(i(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var s=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){s.isOpen=!1}})}},{key:"toString",value:function(s){var l=this;if(s=s||this.options.format,!o._isDate(this.date))return"";var c=s.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g),h=c.map(function(f){return l.formats[f]?l.formats[f]():f}).join("");return h}},{key:"setDate",value:function(s,l){if(!s)return this.date=null,this._renderDateDisplay(),this.draw();if(typeof s=="string"&&(s=new Date(Date.parse(s))),!!o._isDate(s)){var c=this.options.minDate,h=this.options.maxDate;o._isDate(c)&&s<c?s=c:o._isDate(h)&&s>h&&(s=h),this.date=new Date(s.getTime()),this._renderDateDisplay(),o._setToStartOfDay(this.date),this.gotoDate(this.date),!l&&typeof this.options.onSelect=="function"&&this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var s=o._isDate(this.date)?this.date:new Date,l=this.options.i18n,c=l.weekdaysShort[s.getDay()],h=l.monthsShort[s.getMonth()],f=s.getDate();this.yearTextEl.innerHTML=s.getFullYear(),this.dateTextEl.innerHTML=c+", "+h+" "+f}},{key:"gotoDate",value:function(s){var l=!0;if(!!o._isDate(s)){if(this.calendars){var c=new Date(this.calendars[0].year,this.calendars[0].month,1),h=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),f=s.getTime();h.setMonth(h.getMonth()+1),h.setDate(h.getDate()-1),l=f<c.getTime()||h.getTime()<f}l&&(this.calendars=[{month:s.getMonth(),year:s.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(s){return s.month<0&&(s.year-=Math.ceil(Math.abs(s.month)/12),s.month+=12),s.month>11&&(s.year+=Math.floor(Math.abs(s.month)/12),s.month-=12),s}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(s,l,c){var h=this.options,f=new Date,v=o._getDaysInMonth(s,l),m=new Date(s,l,1).getDay(),y=[],E=[];o._setToStartOfDay(f),h.firstDay>0&&(m-=h.firstDay,m<0&&(m+=7));for(var _=l===0?11:l-1,C=l===11?0:l+1,A=l===0?s-1:s,T=l===11?s+1:s,L=o._getDaysInMonth(A,_),j=v+m,N=j;N>7;)N-=7;j+=7-N;for(var q=!1,ye=0,Z=0;ye<j;ye++){var te=new Date(s,l,1+(ye-m)),le=o._isDate(this.date)?o._compareDates(te,this.date):!1,X=o._compareDates(te,f),se=h.events.indexOf(te.toDateString())!==-1,pe=ye<m||ye>=v+m,ae=1+(ye-m),Ae=l,ie=s,Se=h.startRange&&o._compareDates(h.startRange,te),Q=h.endRange&&o._compareDates(h.endRange,te),me=h.startRange&&h.endRange&&h.startRange<te&&te<h.endRange,Ne=h.minDate&&te<h.minDate||h.maxDate&&te>h.maxDate||h.disableWeekends&&o._isWeekend(te)||h.disableDayFn&&h.disableDayFn(te);pe&&(ye<m?(ae=L+ae,Ae=_,ie=A):(ae=ae-v,Ae=C,ie=T));var re={day:ae,month:Ae,year:ie,hasEvent:se,isSelected:le,isToday:X,isDisabled:Ne,isEmpty:pe,isStartRange:Se,isEndRange:Q,isInRange:me,showDaysInNextAndPreviousMonths:h.showDaysInNextAndPreviousMonths};E.push(this.renderDay(re)),++Z==7&&(y.push(this.renderRow(E,h.isRTL,q)),E=[],Z=0,q=!1)}return this.renderTable(h,y,c)}},{key:"renderDay",value:function(s){var l=[],c="false";if(s.isEmpty)if(s.showDaysInNextAndPreviousMonths)l.push("is-outside-current-month"),l.push("is-selection-disabled");else return'<td class="is-empty"></td>';return s.isDisabled&&l.push("is-disabled"),s.isToday&&l.push("is-today"),s.isSelected&&(l.push("is-selected"),c="true"),s.hasEvent&&l.push("has-event"),s.isInRange&&l.push("is-inrange"),s.isStartRange&&l.push("is-startrange"),s.isEndRange&&l.push("is-endrange"),'<td data-day="'+s.day+'" class="'+l.join(" ")+'" aria-selected="'+c+'">'+('<button class="datepicker-day-button" type="button" data-year="'+s.year+'" data-month="'+s.month+'" data-day="'+s.day+'">'+s.day+"</button>")+"</td>"}},{key:"renderRow",value:function(s,l,c){return'<tr class="datepicker-row'+(c?" is-selected":"")+'">'+(l?s.reverse():s).join("")+"</tr>"}},{key:"renderTable",value:function(s,l,c){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+c+'">'+this.renderHead(s)+this.renderBody(l)+"</table></div>"}},{key:"renderHead",value:function(s){var l=void 0,c=[];for(l=0;l<7;l++)c.push('<th scope="col"><abbr title="'+this.renderDayName(s,l)+'">'+this.renderDayName(s,l,!0)+"</abbr></th>");return"<thead><tr>"+(s.isRTL?c.reverse():c).join("")+"</tr></thead>"}},{key:"renderBody",value:function(s){return"<tbody>"+s.join("")+"</tbody>"}},{key:"renderTitle",value:function(s,l,c,h,f,v){var m=void 0,y=void 0,E=void 0,_=this.options,C=c===_.minYear,A=c===_.maxYear,T='<div id="'+v+'" class="datepicker-controls" role="heading" aria-live="assertive">',L=void 0,j=void 0,N=!0,q=!0;for(E=[],m=0;m<12;m++)E.push('<option value="'+(c===f?m-l:12+m-l)+'"'+(m===h?' selected="selected"':"")+(C&&m<_.minMonth||A&&m>_.maxMonth?'disabled="disabled"':"")+">"+_.i18n.months[m]+"</option>");for(L='<select class="datepicker-select orig-select-month" tabindex="-1">'+E.join("")+"</select>",i.isArray(_.yearRange)?(m=_.yearRange[0],y=_.yearRange[1]+1):(m=c-_.yearRange,y=1+c+_.yearRange),E=[];m<y&&m<=_.maxYear;m++)m>=_.minYear&&E.push('<option value="'+m+'" '+(m===c?'selected="selected"':"")+">"+m+"</option>");j='<select class="datepicker-select orig-select-year" tabindex="-1">'+E.join("")+"</select>";var ye='<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg>';T+='<button class="month-prev'+(N?"":" is-disabled")+'" type="button">'+ye+"</button>",T+='<div class="selects-container">',_.showMonthAfterYear?T+=j+L:T+=L+j,T+="</div>",C&&(h===0||_.minMonth>=h)&&(N=!1),A&&(h===11||_.maxMonth<=h)&&(q=!1);var Z='<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg>';return T+='<button class="month-next'+(q?"":" is-disabled")+'" type="button">'+Z+"</button>",T+="</div>"}},{key:"draw",value:function(s){if(!(!this.isOpen&&!s)){var l=this.options,c=l.minYear,h=l.maxYear,f=l.minMonth,v=l.maxMonth,m="",y=void 0;this._y<=c&&(this._y=c,!isNaN(f)&&this._m<f&&(this._m=f)),this._y>=h&&(this._y=h,!isNaN(v)&&this._m>v&&(this._m=v)),y="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var E=0;E<1;E++)this._renderDateDisplay(),m+=this.renderTitle(this,E,this.calendars[E].year,this.calendars[E].month,this.calendars[0].year,y)+this.render(this.calendars[E].year,this.calendars[E].month,y);this.destroySelects(),this.calendarEl.innerHTML=m;var _=this.calendarEl.querySelector(".orig-select-year"),C=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(_,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(C,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),_.addEventListener("change",this._handleYearChange.bind(this)),C.addEventListener("change",this._handleMonthChange.bind(this)),typeof this.options.onDraw=="function"&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var s=this;this.$modalEl=i(o._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return s.date.getDate()},dd:function(){var l=s.date.getDate();return(l<10?"0":"")+l},ddd:function(){return s.options.i18n.weekdaysShort[s.date.getDay()]},dddd:function(){return s.options.i18n.weekdays[s.date.getDay()]},m:function(){return s.date.getMonth()+1},mm:function(){var l=s.date.getMonth()+1;return(l<10?"0":"")+l},mmm:function(){return s.options.i18n.monthsShort[s.date.getMonth()]},mmmm:function(){return s.options.i18n.months[s.date.getMonth()]},yy:function(){return(""+s.date.getFullYear()).slice(2)},yyyy:function(){return s.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(s){s.which===M.keys.ENTER&&(s.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(s){if(!!this.isOpen){var l=i(s.target);l.hasClass("is-disabled")||(l.hasClass("datepicker-day-button")&&!l.hasClass("is-empty")&&!l.parent().hasClass("is-disabled")?(this.setDate(new Date(s.target.getAttribute("data-year"),s.target.getAttribute("data-month"),s.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()):l.closest(".month-prev").length?this.prevMonth():l.closest(".month-next").length&&this.nextMonth())}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(s){this.gotoMonth(s.target.value)}},{key:"_handleYearChange",value:function(s){this.gotoYear(s.target.value)}},{key:"gotoMonth",value:function(s){isNaN(s)||(this.calendars[0].month=parseInt(s,10),this.adjustCalendars())}},{key:"gotoYear",value:function(s){isNaN(s)||(this.calendars[0].year=parseInt(s,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(s){var l=void 0;s.firedBy!==this&&(this.options.parse?l=this.options.parse(this.el.value,this.options.format):l=new Date(Date.parse(this.el.value)),o._isDate(l)&&this.setDate(l))}},{key:"renderDayName",value:function(s,l,c){for(l+=s.firstDay;l>=7;)l-=7;return c?s.i18n.weekdaysAbbrev[l]:s.i18n.weekdays[l]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,typeof this.options.onOpen=="function"&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(!!this.isOpen)return this.isOpen=!1,typeof this.options.onClose=="function"&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"_isDate",value:function(s){return/Date/.test(Object.prototype.toString.call(s))&&!isNaN(s.getTime())}},{key:"_isWeekend",value:function(s){var l=s.getDay();return l===0||l===6}},{key:"_setToStartOfDay",value:function(s){o._isDate(s)&&s.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(s,l){return[31,o._isLeapYear(s)?29:28,31,30,31,30,31,31,30,31,30,31][l]}},{key:"_isLeapYear",value:function(s){return s%4==0&&s%100!=0||s%400==0}},{key:"_compareDates",value:function(s,l){return s.getTime()===l.getTime()}},{key:"_setToStartOfDay",value:function(s){o._isDate(s)&&s.setHours(0,0,0,0)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Datepicker}},{key:"defaults",get:function(){return t}}]),o}(ln);n._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"datepicker","M_Datepicker")})(cash);(function(i){"use strict";var t={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Timepicker=l,l.options=i.extend({},o.defaults,s),l.id=M.guid(),l._insertHTMLIntoDOM(),l._setupModal(),l._setupVariables(),l._setupEventHandlers(),l._clockSetup(),l._pickerSetup(),l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),i(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),i(this.spanHours).on("click",this.showView.bind(this,"hours")),i(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(s){s.which===M.keys.ENTER&&(s.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(s){s.preventDefault();var l=this.plate.getBoundingClientRect(),c={x:l.left,y:l.top};this.x0=c.x+this.options.dialRadius,this.y0=c.y+this.options.dialRadius,this.moved=!1;var h=o._Pos(s);this.dx=h.x-this.x0,this.dy=h.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(s){s.preventDefault();var l=o._Pos(s),c=l.x-this.x0,h=l.y-this.y0;this.moved=!0,this.setHand(c,h,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(s){var l=this;s.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var c=o._Pos(s),h=c.x-this.x0,f=c.y-this.y0;this.moved&&h===this.dx&&f===this.dy&&this.setHand(h,f),this.currentView==="hours"?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(i(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){l.done()},this.options.duration/2)),typeof this.options.onSelect=="function"&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=i(o._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var s=document.querySelector(this.options.container);this.options.container&&!!s?this.$modalEl.appendTo(s):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var s=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){typeof s.options.onCloseEnd=="function"&&s.options.onCloseEnd.call(s),s.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var s=i('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&s.css({visibility:""});var l=i('<div class="confirmation-btns"></div>');i('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(l).on("click",this.close.bind(this)),i('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(l).on("click",this.done.bind(this)),l.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=i('<div class="am-btn">AM</div>'),this.$pmBtn=i('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var s=this.options.dialRadius,l=this.options.tickRadius,c=s*2,h=o._createSVGEl("svg");h.setAttribute("class","timepicker-svg"),h.setAttribute("width",c),h.setAttribute("height",c);var f=o._createSVGEl("g");f.setAttribute("transform","translate("+s+","+s+")");var v=o._createSVGEl("circle");v.setAttribute("class","timepicker-canvas-bearing"),v.setAttribute("cx",0),v.setAttribute("cy",0),v.setAttribute("r",4);var m=o._createSVGEl("line");m.setAttribute("x1",0),m.setAttribute("y1",0);var y=o._createSVGEl("circle");y.setAttribute("class","timepicker-canvas-bg"),y.setAttribute("r",l),f.appendChild(m),f.appendChild(y),f.appendChild(v),h.appendChild(f),this._canvas.appendChild(h),this.hand=m,this.bg=y,this.bearing=v,this.g=f}},{key:"_buildHoursView",value:function(){var s=i('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var l=1;l<13;l+=1){var c=s.clone(),h=l/6*Math.PI,f=this.options.outerRadius;c.css({left:this.options.dialRadius+Math.sin(h)*f-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(h)*f-this.options.tickRadius+"px"}),c.html(l===0?"00":l),this.hoursView.appendChild(c[0])}else for(var v=0;v<24;v+=1){var m=s.clone(),y=v/6*Math.PI,E=v>0&&v<13,_=E?this.options.innerRadius:this.options.outerRadius;m.css({left:this.options.dialRadius+Math.sin(y)*_-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(y)*_-this.options.tickRadius+"px"}),m.html(v===0?"00":v),this.hoursView.appendChild(m[0])}}},{key:"_buildMinutesView",value:function(){for(var s=i('<div class="timepicker-tick"></div>'),l=0;l<60;l+=5){var c=s.clone(),h=l/30*Math.PI;c.css({left:this.options.dialRadius+Math.sin(h)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(h)*this.options.outerRadius-this.options.tickRadius+"px"}),c.html(o._addLeadingZero(l)),this.minutesView.appendChild(c[0])}}},{key:"_handleAmPmClick",value:function(s){var l=i(s.target);this.amOrPm=l.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary",this.amOrPm==="AM"),this.$pmBtn.toggleClass("text-primary",this.amOrPm==="PM"))}},{key:"_updateTimeFromInput",value:function(){var s=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&typeof s[1]!="undefined"&&(s[1].toUpperCase().indexOf("AM")>0?this.amOrPm="AM":this.amOrPm="PM",s[1]=s[1].replace("AM","").replace("PM","")),s[0]==="now"){var l=new Date(+new Date+this.options.fromNow);s=[l.getHours(),l.getMinutes()],this.options.twelveHour&&(this.amOrPm=s[0]>=12&&s[0]<24?"PM":"AM")}this.hours=+s[0]||0,this.minutes=+s[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=o._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(s,l){s==="minutes"&&i(this.hoursView).css("visibility")==="visible";var c=s==="hours",h=c?this.hoursView:this.minutesView,f=c?this.minutesView:this.hoursView;this.currentView=s,i(this.spanHours).toggleClass("text-primary",c),i(this.spanMinutes).toggleClass("text-primary",!c),f.classList.add("timepicker-dial-out"),i(h).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(l),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){i(f).css("visibility","hidden")},this.options.duration)}},{key:"resetClock",value:function(s){var l=this.currentView,c=this[l],h=l==="hours",f=Math.PI/(h?6:30),v=c*f,m=h&&c>0&&c<13?this.options.innerRadius:this.options.outerRadius,y=Math.sin(v)*m,E=-Math.cos(v)*m,_=this;s?(i(this.canvas).addClass("timepicker-canvas-out"),setTimeout(function(){i(_.canvas).removeClass("timepicker-canvas-out"),_.setHand(y,E)},s)):this.setHand(y,E)}},{key:"setHand",value:function(s,l,c){var h=this,f=Math.atan2(s,-l),v=this.currentView==="hours",m=Math.PI/(v||c?6:30),y=Math.sqrt(s*s+l*l),E=v&&y<(this.options.outerRadius+this.options.innerRadius)/2,_=E?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(_=this.options.outerRadius),f<0&&(f=Math.PI*2+f);var C=Math.round(f/m);f=C*m,this.options.twelveHour?v?C===0&&(C=12):(c&&(C*=5),C===60&&(C=0)):v?(C===12&&(C=0),C=E?C===0?12:C:C===0?0:C+12):(c&&(C*=5),C===60&&(C=0)),this[this.currentView]!==C&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout(function(){h.vibrateTimer=null},100))),this[this.currentView]=C,v?this.spanHours.innerHTML=C:this.spanMinutes.innerHTML=o._addLeadingZero(C);var A=Math.sin(f)*(_-this.options.tickRadius),T=-Math.cos(f)*(_-this.options.tickRadius),L=Math.sin(f)*_,j=-Math.cos(f)*_;this.hand.setAttribute("x2",A),this.hand.setAttribute("y2",T),this.bg.setAttribute("cx",L),this.bg.setAttribute("cy",j)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){!this.isOpen||(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(s,l){var c=this.el.value,h=l?"":o._addLeadingZero(this.hours)+":"+o._addLeadingZero(this.minutes);this.time=h,!l&&this.options.twelveHour&&(h=h+" "+this.amOrPm),this.el.value=h,h!==c&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"_addLeadingZero",value:function(s){return(s<10?"0":"")+s}},{key:"_createSVGEl",value:function(s){var l="http://www.w3.org/2000/svg";return document.createElementNS(l,s)}},{key:"_Pos",value:function(s){return s.targetTouches&&s.targetTouches.length>=1?{x:s.targetTouches[0].clientX,y:s.targetTouches[0].clientY}:{x:s.clientX,y:s.clientY}}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Timepicker}},{key:"defaults",get:function(){return t}}]),o}(ln);n._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"timepicker","M_Timepicker")})(cash);(function(i){"use strict";var t={},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_CharacterCounter=l,l.options=i.extend({},o.defaults,s),l.isInvalid=!1,l.isValidLength=!1,l._setupCounter(),l._setupEventHandlers(),l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),i(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){i(this.counterEl).remove()}},{key:"updateCounter",value:function(){var s=+this.$el.attr("data-length"),l=this.el.value.length;this.isValidLength=l<=s;var c=l;s&&(c+="/"+s,this._validateInput()),i(this.counterEl).html(c)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):!this.isValidLength&&!this.isInvalid&&(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_CharacterCounter}},{key:"defaults",get:function(){return t}}]),o}(ln);M.CharacterCounter=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"characterCounter","M_CharacterCounter")})(cash);(function(i){"use strict";var t={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_Carousel=l,l.options=i.extend({},o.defaults,s),l.hasMultipleSlides=l.$el.find(".carousel-item").length>1,l.showIndicators=l.options.indicators&&l.hasMultipleSlides,l.noWrap=l.options.noWrap||!l.hasMultipleSlides,l.pressed=!1,l.dragged=!1,l.offset=l.target=0,l.images=[],l.itemWidth=l.$el.find(".carousel-item").first().innerWidth(),l.itemHeight=l.$el.find(".carousel-item").first().innerHeight(),l.dim=l.itemWidth*2+l.options.padding||1,l._autoScrollBound=l._autoScroll.bind(l),l._trackBound=l._track.bind(l),l.options.fullWidth&&(l.options.dist=0,l._setCarouselHeight(),l.showIndicators&&l.$el.find(".carousel-fixed-item").addClass("with-indicators")),l.$indicators=i('<ul class="indicators"></ul>'),l.$el.find(".carousel-item").each(function(c,h){if(l.images.push(c),l.showIndicators){var f=i('<li class="indicator-item"></li>');h===0&&f[0].classList.add("active"),l.$indicators.append(f)}}),l.showIndicators&&l.$el.append(l.$indicators),l.count=l.images.length,l.options.numVisible=Math.min(l.count,l.options.numVisible),l.xform="transform",["webkit","Moz","O","ms"].every(function(c){var h=c+"Transform";return typeof document.body.style[h]!="undefined"?(l.xform=h,!1):!0}),l._setupEventHandlers(),l._scroll(l.offset),l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var s=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),typeof window.ontouchstart!="undefined"&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(c,h){c.addEventListener("click",s._handleIndicatorClickBound)}));var l=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=l.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var s=this;typeof window.ontouchstart!="undefined"&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(l,c){l.removeEventListener("click",s._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(s){s.type==="mousedown"&&i(s.target).is("img")&&s.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(s),this.referenceY=this._ypos(s),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(s){var l=void 0,c=void 0,h=void 0,f=void 0;if(this.pressed)if(l=this._xpos(s),c=this._ypos(s),h=this.reference-l,f=Math.abs(this.referenceY-c),f<30&&!this.verticalDragged)(h>2||h<-2)&&(this.dragged=!0,this.reference=l,this._scroll(this.offset+h));else{if(this.dragged)return s.preventDefault(),s.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return s.preventDefault(),s.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(s){if(this.pressed)this.pressed=!1;else return;return clearInterval(this.ticker),this.target=this.offset,(this.velocity>10||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(s.preventDefault(),s.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(s){if(this.dragged)return s.preventDefault(),s.stopPropagation(),!1;if(!this.options.fullWidth){var l=i(s.target).closest(".carousel-item").index(),c=this._wrap(this.center)-l;c!==0&&(s.preventDefault(),s.stopPropagation()),this._cycleTo(l)}}},{key:"_handleIndicatorClick",value:function(s){s.stopPropagation();var l=i(s.target).closest(".indicator-item");l.length&&this._cycleTo(l.index())}},{key:"_handleResize",value:function(s){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=this.itemWidth*2+this.options.padding,this.offset=this.center*2*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(s){var l=this,c=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),h=c.find("img").first();if(h.length)if(h[0].complete){var f=h.height();if(f>0)this.$el.css("height",f+"px");else{var v=h[0].naturalWidth,m=h[0].naturalHeight,y=this.$el.width()/v*m;this.$el.css("height",y+"px")}}else h.one("load",function(_,C){l.$el.css("height",_.offsetHeight+"px")});else if(!s){var E=c.height();this.$el.css("height",E+"px")}}},{key:"_xpos",value:function(s){return s.targetTouches&&s.targetTouches.length>=1?s.targetTouches[0].clientX:s.clientX}},{key:"_ypos",value:function(s){return s.targetTouches&&s.targetTouches.length>=1?s.targetTouches[0].clientY:s.clientY}},{key:"_wrap",value:function(s){return s>=this.count?s%this.count:s<0?this._wrap(this.count+s%this.count):s}},{key:"_track",value:function(){var s=void 0,l=void 0,c=void 0,h=void 0;s=Date.now(),l=s-this.timestamp,this.timestamp=s,c=this.offset-this.frame,this.frame=this.offset,h=1e3*c/(1+l),this.velocity=.8*h+.2*this.velocity}},{key:"_autoScroll",value:function(){var s=void 0,l=void 0;this.amplitude&&(s=Date.now()-this.timestamp,l=this.amplitude*Math.exp(-s/this.options.duration),l>2||l<-2?(this._scroll(this.target-l),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(s){var l=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),this.scrollingTimeout!=null&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){l.$el.removeClass("scrolling")},this.options.duration);var c=void 0,h=void 0,f=void 0,v=void 0,m=void 0,y=void 0,E=void 0,_=void 0,C=void 0,A=void 0,T=this.center,L=1/this.options.numVisible;if(this.offset=typeof s=="number"?s:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),f=this.offset-this.center*this.dim,v=f<0?1:-1,m=-v*f*2/this.dim,h=this.count>>1,this.options.fullWidth?(E="translateX(0)",A=1):(E="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",E+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",A=1-L*m),this.showIndicators){var j=this.center%this.count,N=this.$indicators.find(".indicator-item.active");N.index()!==j&&(N.removeClass("active"),this.$indicators.find(".indicator-item").eq(j)[0].classList.add("active"))}if(!this.noWrap||this.center>=0&&this.center<this.count){y=this.images[this._wrap(this.center)],i(y).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),y.classList.add("active"));var q=E+" translateX("+-f/2+"px) translateX("+v*this.options.shift*m*c+"px) translateZ("+this.options.dist*m+"px)";this._updateItemStyle(y,A,0,q)}for(c=1;c<=h;++c){if(this.options.fullWidth?(_=this.options.dist,C=c===h&&f<0?1-m:1):(_=this.options.dist*(c*2+m*v),C=1-L*(c*2+m*v)),!this.noWrap||this.center+c<this.count){y=this.images[this._wrap(this.center+c)];var ye=E+" translateX("+(this.options.shift+(this.dim*c-f)/2)+"px) translateZ("+_+"px)";this._updateItemStyle(y,C,-c,ye)}if(this.options.fullWidth?(_=this.options.dist,C=c===h&&f>0?1-m:1):(_=this.options.dist*(c*2-m*v),C=1-L*(c*2-m*v)),!this.noWrap||this.center-c>=0){y=this.images[this._wrap(this.center-c)];var Z=E+" translateX("+(-this.options.shift+(-this.dim*c-f)/2)+"px) translateZ("+_+"px)";this._updateItemStyle(y,C,-c,Z)}}if(!this.noWrap||this.center>=0&&this.center<this.count){y=this.images[this._wrap(this.center)];var te=E+" translateX("+-f/2+"px) translateX("+v*this.options.shift*m+"px) translateZ("+this.options.dist*m+"px)";this._updateItemStyle(y,A,0,te)}var le=this.$el.find(".carousel-item").eq(this._wrap(this.center));T!==this.center&&typeof this.options.onCycleTo=="function"&&this.options.onCycleTo.call(this,le[0],this.dragged),typeof this.oneTimeCallback=="function"&&(this.oneTimeCallback.call(this,le[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(s,l,c,h){s.style[this.xform]=h,s.style.zIndex=c,s.style.opacity=l,s.style.visibility="visible"}},{key:"_cycleTo",value:function(s,l){var c=this.center%this.count-s;this.noWrap||(c<0?Math.abs(c+this.count)<Math.abs(c)&&(c+=this.count):c>0&&Math.abs(c-this.count)<c&&(c-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),c<0?this.target+=this.dim*Math.abs(c):c>0&&(this.target-=this.dim*c),typeof l=="function"&&(this.oneTimeCallback=l),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(s){(s===void 0||isNaN(s))&&(s=1);var l=this.center+s;if(l>=this.count||l<0){if(this.noWrap)return;l=this._wrap(l)}this._cycleTo(l)}},{key:"prev",value:function(s){(s===void 0||isNaN(s))&&(s=1);var l=this.center-s;if(l>=this.count||l<0){if(this.noWrap)return;l=this._wrap(l)}this._cycleTo(l)}},{key:"set",value:function(s,l){if((s===void 0||isNaN(s))&&(s=0),s>this.count||s<0){if(this.noWrap)return;s=this._wrap(s)}this._cycleTo(s,l)}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_Carousel}},{key:"defaults",get:function(){return t}}]),o}(ln);M.Carousel=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"carousel","M_Carousel")})(cash);(function(i){"use strict";var t={onOpen:void 0,onClose:void 0},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.el.M_TapTarget=l,l.options=i.extend({},o.defaults,s),l.isOpen=!1,l.$origin=i("#"+l.$el.attr("data-target")),l._setup(),l._calculatePositioning(),l._setupEventHandlers(),l}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var s=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=s.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(s){this.open()}},{key:"_handleOriginClick",value:function(s){this.close()}},{key:"_handleResize",value:function(s){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(s){i(s.target).closest(".tap-target-wrapper").length||(this.close(),s.preventDefault(),s.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=i(this.wrapper).find(".tap-target-wave")[0],this.originEl=i(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],i(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(i(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var s=this.$origin.css("position")==="fixed";if(!s)for(var l=this.$origin.parents(),c=0;c<l.length&&(s=i(l[c]).css("position")=="fixed",!s);c++);var h=this.$origin.outerWidth(),f=this.$origin.outerHeight(),v=s?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,m=s?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,y=window.innerWidth,E=window.innerHeight,_=y/2,C=E/2,A=m<=_,T=m>_,L=v<=C,j=v>C,N=m>=y*.25&&m<=y*.75,q=this.$el.outerWidth(),ye=this.$el.outerHeight(),Z=v+f/2-ye/2,te=m+h/2-q/2,le=s?"fixed":"absolute",X=N?q:q/2+h,se=ye/2,pe=L?ye/2:0,ae=0,Ae=A&&!N?q/2-h:0,ie=0,Se=h,Q=j?"bottom":"top",me=(h>f,h*2),Ne=me,re=ye/2-Ne/2,Be=q/2-me/2,qe={};qe.top=L?Z+"px":"",qe.right=T?y-te-q+"px":"",qe.bottom=j?E-Z-ye+"px":"",qe.left=A?te+"px":"",qe.position=le,i(this.wrapper).css(qe),i(this.contentEl).css({width:X+"px",height:se+"px",top:pe+"px",right:ie+"px",bottom:ae+"px",left:Ae+"px",padding:Se+"px",verticalAlign:Q}),i(this.waveEl).css({top:re+"px",left:Be+"px",width:me+"px",height:Ne+"px"})}},{key:"open",value:function(){this.isOpen||(typeof this.options.onOpen=="function"&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){!this.isOpen||(typeof this.options.onClose=="function"&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_TapTarget}},{key:"defaults",get:function(){return t}}]),o}(ln);M.TapTarget=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tapTarget","M_TapTarget")})(cash);(function(i){"use strict";var t={classes:"",dropdownOptions:{}},n=function(r){an(o,r);function o(a,s){Jt(this,o);var l=Zt(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,o,a,s));return l.$el.hasClass("browser-default")?Zt(l):(l.el.M_FormSelect=l,l.options=i.extend({},o.defaults,s),l.isMultiple=l.$el.prop("multiple"),l.el.tabIndex=-1,l._keysSelected={},l._valueDict={},l._setupDropdown(),l._setupEventHandlers(),l)}return Gt(o,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var s=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),i(this.dropdownOptions).find("li:not(.optgroup)").each(function(l){l.addEventListener("click",s._handleOptionClickBound)}),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var s=this;i(this.dropdownOptions).find("li:not(.optgroup)").each(function(l){l.removeEventListener("click",s._handleOptionClickBound)}),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(s){this._setValueToInput()}},{key:"_handleOptionClick",value:function(s){s.preventDefault();var l=i(s.target).closest("li")[0],c=l.id;if(!i(l).hasClass("disabled")&&!i(l).hasClass("optgroup")&&c.length){var h=!0;if(this.isMultiple){var f=i(this.dropdownOptions).find("li.disabled.selected");f.length&&(f.removeClass("selected"),f.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(f[0].id)),h=this._toggleEntryFromArray(c)}else i(this.dropdownOptions).find("li").removeClass("selected"),i(l).toggleClass("selected",h);var v=i(this._valueDict[c].el).prop("selected");v!==h&&(i(this._valueDict[c].el).prop("selected",h),this.$el.trigger("change"))}s.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var s=this;this.wrapper=document.createElement("div"),i(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(i(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),i(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each(function(h){if(i(h).is("option")){var f=void 0;s.isMultiple?f=s._appendOptionWithIcon(s.$el,h,"multiple"):f=s._appendOptionWithIcon(s.$el,h),s._addOptionToValueDict(h,f)}else if(i(h).is("optgroup")){var v=i(h).children("option");i(s.dropdownOptions).append(i('<li class="optgroup"><span>'+h.getAttribute("label")+"</span></li>")[0]),v.each(function(m){var y=s._appendOptionWithIcon(s.$el,m,"optgroup-option");s._addOptionToValueDict(m,y)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),i(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&i(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var l=i('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(l[0]),!this.el.disabled){var c=i.extend({},this.options.dropdownOptions);c.onOpenEnd=function(h){var f=i(s.dropdownOptions).find(".selected").first();if(f.length&&(M.keyDown=!0,s.dropdown.focusedIndex=f.index(),s.dropdown._focusFocusedItem(),M.keyDown=!1,s.dropdown.isScrollable)){var v=f[0].getBoundingClientRect().top-s.dropdownOptions.getBoundingClientRect().top;v-=s.dropdownOptions.clientHeight/2,s.dropdownOptions.scrollTop=v}},this.isMultiple&&(c.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,c)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(s,l){var c=Object.keys(this._valueDict).length,h=this.dropdownOptions.id+c,f={};l.id=h,f.el=s,f.optionEl=l,this._valueDict[h]=f}},{key:"_removeDropdown",value:function(){i(this.wrapper).find(".caret").remove(),i(this.input).remove(),i(this.dropdownOptions).remove(),i(this.wrapper).before(this.$el),i(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(s,l,c){var h=l.disabled?"disabled ":"",f=c==="optgroup-option"?"optgroup-option ":"",v=this.isMultiple?'<label><input type="checkbox"'+h+'"/><span>'+l.innerHTML+"</span></label>":l.innerHTML,m=i("<li></li>"),y=i("<span></span>");y.html(v),m.addClass(h+" "+f),m.append(y);var E=l.getAttribute("data-icon");if(E){var _=i('<img alt="" src="'+E+'">');m.prepend(_)}return i(this.dropdownOptions).append(m[0]),m[0]}},{key:"_toggleEntryFromArray",value:function(s){var l=!this._keysSelected.hasOwnProperty(s),c=i(this._valueDict[s].optionEl);return l?this._keysSelected[s]=!0:delete this._keysSelected[s],c.toggleClass("selected",l),c.find('input[type="checkbox"]').prop("checked",l),c.prop("selected",l),l}},{key:"_setValueToInput",value:function(){var s=[],l=this.$el.find("option");if(l.each(function(h){if(i(h).prop("selected")){var f=i(h).text();s.push(f)}}),!s.length){var c=this.$el.find("option:disabled").eq(0);c.length&&c[0].value===""&&s.push(c.text())}this.input.value=s.join(", ")}},{key:"_setSelectedStates",value:function(){this._keysSelected={};for(var s in this._valueDict){var l=this._valueDict[s],c=i(l.el).prop("selected");i(l.optionEl).find('input[type="checkbox"]').prop("checked",c),c?(this._activateOption(i(this.dropdownOptions),i(l.optionEl)),this._keysSelected[s]=!0):i(l.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(s,l){if(l){this.isMultiple||s.find("li.selected").removeClass("selected");var c=i(l);c.addClass("selected")}}},{key:"getSelectedValues",value:function(){var s=[];for(var l in this._keysSelected)s.push(this._valueDict[l].el.value);return s}}],[{key:"init",value:function(s,l){return sn(o.__proto__||Object.getPrototypeOf(o),"init",this).call(this,this,s,l)}},{key:"getInstance",value:function(s){var l=s.jquery?s[0]:s;return l.M_FormSelect}},{key:"defaults",get:function(){return t}}]),o}(ln);M.FormSelect=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"formSelect","M_FormSelect")})(cash);(function(i,t){"use strict";var n={},r=function(o){an(a,o);function a(s,l){Jt(this,a);var c=Zt(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a,s,l));return c.el.M_Range=c,c.options=i.extend({},a.defaults,l),c._mousedown=!1,c._setupThumb(),c._setupEventHandlers(),c}return Gt(a,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){i(this.value).html(this.$el.val()),i(this.thumb).hasClass("active")||this._showRangeBubble();var l=this._calcRangeOffset();i(this.thumb).addClass("active").css("left",l+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(l){if(i(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),i(this.thumb).hasClass("active")||this._showRangeBubble(),l.type!=="input"){var c=this._calcRangeOffset();i(this.thumb).addClass("active").css("left",c+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){i(this.thumb).hasClass("active")||this._showRangeBubble();var l=this._calcRangeOffset();i(this.thumb).addClass("active").css("left",l+"px"),i(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var l=parseInt(this.$el.css("padding-left")),c=7+l+"px";i(this.thumb).hasClass("active")&&(t.remove(this.thumb),t({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:c,duration:100})),i(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),i(this.thumb).addClass("thumb"),i(this.value).addClass("value"),i(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){i(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var l=parseInt(i(this.thumb).parent().css("padding-left")),c=-7+l+"px";t.remove(this.thumb),t({targets:this.thumb,height:30,width:30,top:-30,marginLeft:c,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var l=this.$el.width()-15,c=parseFloat(this.$el.attr("max"))||100,h=parseFloat(this.$el.attr("min"))||0,f=(parseFloat(this.$el.val())-h)/(c-h);return f*l}}],[{key:"init",value:function(l,c){return sn(a.__proto__||Object.getPrototypeOf(a),"init",this).call(this,this,l,c)}},{key:"getInstance",value:function(l){var c=l.jquery?l[0]:l;return c.M_Range}},{key:"defaults",get:function(){return n}}]),a}(ln);M.Range=r,M.jQueryLoaded&&M.initializeJqueryWrapper(r,"range","M_Range"),r.init(i("input[type=range]"))})(cash,M.anime)});var Qg=G((l9,Zg)=>{S();var AC=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);AC?(Yg=new Uint8Array(16),Zg.exports=function(){return AC(Yg),Yg}):(Xg=new Array(16),Zg.exports=function(){for(var t=0,n;t<16;t++)(t&3)==0&&(n=Math.random()*4294967296),Xg[t]=n>>>((t&3)<<3)&255;return Xg});var Yg,Xg});var e0=G((u9,kC)=>{S();var RC=[];for(vl=0;vl<256;++vl)RC[vl]=(vl+256).toString(16).substr(1);var vl;function T5(i,t){var n=t||0,r=RC;return[r[i[n++]],r[i[n++]],r[i[n++]],r[i[n++]],"-",r[i[n++]],r[i[n++]],"-",r[i[n++]],r[i[n++]],"-",r[i[n++]],r[i[n++]],"-",r[i[n++]],r[i[n++]],r[i[n++]],r[i[n++]],r[i[n++]],r[i[n++]]].join("")}kC.exports=T5});var BC=G((c9,PC)=>{S();var M5=Qg(),A5=e0(),LC,t0,n0=0,i0=0;function R5(i,t,n){var r=t&&n||0,o=t||[];i=i||{};var a=i.node||LC,s=i.clockseq!==void 0?i.clockseq:t0;if(a==null||s==null){var l=M5();a==null&&(a=LC=[l[0]|1,l[1],l[2],l[3],l[4],l[5]]),s==null&&(s=t0=(l[6]<<8|l[7])&16383)}var c=i.msecs!==void 0?i.msecs:new Date().getTime(),h=i.nsecs!==void 0?i.nsecs:i0+1,f=c-n0+(h-i0)/1e4;if(f<0&&i.clockseq===void 0&&(s=s+1&16383),(f<0||c>n0)&&i.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n0=c,i0=h,t0=s,c+=122192928e5;var v=((c&268435455)*1e4+h)%4294967296;o[r++]=v>>>24&255,o[r++]=v>>>16&255,o[r++]=v>>>8&255,o[r++]=v&255;var m=c/4294967296*1e4&268435455;o[r++]=m>>>8&255,o[r++]=m&255,o[r++]=m>>>24&15|16,o[r++]=m>>>16&255,o[r++]=s>>>8|128,o[r++]=s&255;for(var y=0;y<6;++y)o[r+y]=a[y];return t||A5(o)}PC.exports=R5});var NC=G((d9,IC)=>{S();var k5=Qg(),L5=e0();function P5(i,t,n){var r=t&&n||0;typeof i=="string"&&(t=i==="binary"?new Array(16):null,i=null),i=i||{};var o=i.random||(i.rng||k5)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t)for(var a=0;a<16;++a)t[r+a]=o[a];return t||L5(o)}IC.exports=P5});var o0=G((h9,DC)=>{S();var B5=BC(),HC=NC(),r0=HC;r0.v1=B5;r0.v4=HC;DC.exports=r0});var $C=G(sa=>{S();"use strict";var l0;Object.defineProperty(sa,"__esModule",{value:!0});sa.MediaOverlayNode=sa.timeStrToSeconds=void 0;var Pr=er(),fo=$n(),I5=Bs();function N5(i){if(!i)return 0;let t=0,n=0,r=0;try{let o=i.indexOf("min");if(o>0){let a=i.substr(0,o);n=parseFloat(a)}else{let a=i.indexOf("ms");if(a>0){let s=i.substr(0,a);r=parseFloat(s)/1e3}else{let s=i.indexOf("s");if(s>0){let l=i.substr(0,s);r=parseFloat(l)}else{let l=i.indexOf("h");if(l>0){let c=i.substr(0,l);t=parseFloat(c)}else{let c=i.split(":");c.length===1?r=parseFloat(c[0]):c.length===2?(n=parseFloat(c[0]),r=parseFloat(c[1])):c.length===3?(t=parseFloat(c[0]),n=parseFloat(c[1]),r=parseFloat(c[2])):(console.log("SMIL TIME CLOCK SYNTAX PARSING ERROR ??"),console.log(i))}}}}}catch(o){return console.log(o),console.log("SMIL TIME CLOCK SYNTAX PARSING ERROR!"),console.log(i),0}return t*3600+n*60+r}sa.timeStrToSeconds=N5;var Qo=l0=class{constructor(){this.initialized=!1}};Pr.__decorate([fo.JsonProperty("text"),Pr.__metadata("design:type",String)],Qo.prototype,"Text",void 0);Pr.__decorate([fo.JsonProperty("audio"),Pr.__metadata("design:type",String)],Qo.prototype,"Audio",void 0);Pr.__decorate([fo.JsonProperty("role"),fo.JsonConverter(I5.JsonStringConverter),fo.JsonElementType(String),Pr.__metadata("design:type",Array)],Qo.prototype,"Role",void 0);Pr.__decorate([fo.JsonProperty("narration"),fo.JsonElementType(l0),Pr.__metadata("design:type",Array)],Qo.prototype,"Children",void 0);Qo=l0=Pr.__decorate([fo.JsonObject()],Qo);sa.MediaOverlayNode=Qo});var WC=G((yl,d0)=>{S();(function(i,t){typeof yl=="object"&&typeof d0=="object"?d0.exports=t():typeof define=="function"&&define.amd?define([],t):typeof yl=="object"?yl.devtoolsDetector=t():i.devtoolsDetector=t()})(typeof self!="undefined"?self:yl,function(){return function(i){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return i[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=i,n.c=t,n.d=function(r,o,a){n.o(r,o)||Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:a})},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=6)}([function(i,t,n){"use strict";(function(r){t.b=function(s){s===void 0&&(s={});for(var l=s.includes,c=l===void 0?[]:l,h=s.excludes,f=h===void 0?[]:h,v=!1,m=!1,y=0,E=c;y<E.length;y++){var _=E[y];if(_===!0){v=!0;break}}for(var C=0,A=f;C<A.length;C++){var _=A[C];if(_===!0){m=!0;break}}return v&&!m},t.c=function(s,l,c){var h=a.a[s];return h===void 0?!1:Object(o.compare)(h,l,c)},t.a=function(){return typeof self!="undefined"?self:typeof window!="undefined"?window:r!==void 0?r:this};var o=n(11),a=(n.n(o),n(4))}).call(t,n(10))},function(i,t,n){"use strict";n.d(t,"c",function(){return h}),n.d(t,"d",function(){return f}),n.d(t,"b",function(){return v}),n.d(t,"f",function(){return m}),n.d(t,"a",function(){return y}),n.d(t,"e",function(){return E});var r,o,a,s=n(2),l=n(0),c=Object(l.a)(),h="InstallTrigger"in((c==null?void 0:c.window)||{})||/firefox/i.test(s.b),f=/trident/i.test(s.b)||/msie/i.test(s.b),v=/edge/i.test(s.b),m=/webkit/i.test(s.b)&&!v,y=((r=c==null?void 0:c.window)===null||r===void 0?void 0:r.chrome)!==void 0||/chrome/i.test(s.b),E=(((a=(o=c==null?void 0:c.window)===null||o===void 0?void 0:o.safari)===null||a===void 0?void 0:a.pushNotification)||!1).toString()==="[object SafariRemoteNotification]"||/safari/i.test(s.b)&&!y},function(i,t,n){"use strict";t.a=function(){for(var l,c=[],h=0;h<arguments.length;h++)c[h]=arguments[h];return(a==null?void 0:a.document)?(l=a.document).createElement.apply(l,c):{}},n.d(t,"b",function(){return s});var r,o=n(0),a=Object(o.a)(),s=((r=a==null?void 0:a.navigator)===null||r===void 0?void 0:r.userAgent)||"xxxxx"},function(i,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l});var r=n(1);function o(c){if(console){if(!r.d&&!r.b)return console[c];if(c==="log"||c==="clear")return function(){for(var h=[],f=0;f<arguments.length;f++)h[f]=arguments[f];console[c].apply(console,h)}}return function(){for(var h=[],f=0;f<arguments.length;f++)h[f]=arguments[f]}}var a=o("log"),s=o("table"),l=o("clear")},function(i,t,n){"use strict";n.d(t,"a",function(){return r});for(var r={},o=0,a=(n(2).b||"").match(/\w+\/(\d|\.)+(\s|$)/gi)||[];o<a.length;o++){var s=a[o].split("/"),l=s[0],c=s[1];r[l]=c}},function(i,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"e",function(){return c});var r=n(2),o=/ipad/i.test(r.b),a=/macintosh/i.test(r.b),s=/iphone/i.test(r.b),l=/android/i.test(r.b),c=/windows/i.test(r.b)},function(i,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addListener=function(m){v.addListener(m)},t.removeListener=function(m){v.removeListener(m)},t.isLaunch=function(){return v.isLaunch()},t.launch=function(){v.launch()},t.stop=function(){v.stop()},t.setDetectDelay=function(m){v.setDetectDelay(m)};var r=n(7),o=n(8);n.d(t,"DevtoolsDetector",function(){return r.a}),n.d(t,"checkers",function(){return o});var a=n(0);n.d(t,"match",function(){return a.b}),n.d(t,"specificVersionMatch",function(){return a.c});var s=n(1);n.d(t,"isFirefox",function(){return s.c}),n.d(t,"isIE",function(){return s.d}),n.d(t,"isEdge",function(){return s.b}),n.d(t,"isWebkit",function(){return s.f}),n.d(t,"isChrome",function(){return s.a}),n.d(t,"isSafari",function(){return s.e});var l=n(3);n.d(t,"log",function(){return l.b}),n.d(t,"table",function(){return l.c}),n.d(t,"clear",function(){return l.a});var c=n(16);n.d(t,"isMobile",function(){return c.a});var h=n(4);n.d(t,"versionMap",function(){return h.a});var f=n(5);n.d(t,"isIpad",function(){return f.b}),n.d(t,"isMac",function(){return f.d}),n.d(t,"isIphone",function(){return f.c}),n.d(t,"isAndroid",function(){return f.a}),n.d(t,"isWindows",function(){return f.e});var v=new r.a({checkers:[o.elementIdChecker,o.regToStringChecker,o.functionToStringChecker,o.depRegToStringChecker,o.debuggerChecker]});t.default=v},function(i,t,n){"use strict";n.d(t,"a",function(){return a});var r=this&&this.__awaiter||function(s,l,c,h){return new(c||(c=Promise))(function(f,v){function m(_){try{E(h.next(_))}catch(C){v(C)}}function y(_){try{E(h.throw(_))}catch(C){v(C)}}function E(_){_.done?f(_.value):function(C){return C instanceof c?C:new c(function(A){A(C)})}(_.value).then(m,y)}E((h=h.apply(s,l||[])).next())})},o=this&&this.__generator||function(s,l){var c,h,f,v,m={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return v={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(E){return function(_){return function(C){if(c)throw new TypeError("Generator is already executing.");for(;m;)try{if(c=1,h&&(f=2&C[0]?h.return:C[0]?h.throw||((f=h.return)&&f.call(h),0):h.next)&&!(f=f.call(h,C[1])).done)return f;switch(h=0,f&&(C=[2&C[0],f.value]),C[0]){case 0:case 1:f=C;break;case 4:return m.label++,{value:C[1],done:!1};case 5:m.label++,h=C[1],C=[0];continue;case 7:C=m.ops.pop(),m.trys.pop();continue;default:if(!(f=(f=m.trys).length>0&&f[f.length-1])&&(C[0]===6||C[0]===2)){m=0;continue}if(C[0]===3&&(!f||C[1]>f[0]&&C[1]<f[3])){m.label=C[1];break}if(C[0]===6&&m.label<f[1]){m.label=f[1],f=C;break}if(f&&m.label<f[2]){m.label=f[2],m.ops.push(C);break}f[2]&&m.ops.pop(),m.trys.pop();continue}C=l.call(s,m)}catch(A){C=[6,A],h=0}finally{c=f=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([E,_])}}},a=function(){function s(l){var c=l.checkers;this._listeners=[],this._isOpen=!1,this._detectLoopStopped=!0,this._detectLoopDelay=500,this._checkers=c.slice()}return s.prototype.launch=function(){this._detectLoopDelay<=0&&this.setDetectDelay(500),this._detectLoopStopped&&(this._detectLoopStopped=!1,this._detectLoop())},s.prototype.stop=function(){this._detectLoopStopped||(this._detectLoopStopped=!0,clearTimeout(this._timer))},s.prototype.isLaunch=function(){return!this._detectLoopStopped},s.prototype.setDetectDelay=function(l){this._detectLoopDelay=l},s.prototype.addListener=function(l){this._listeners.push(l)},s.prototype.removeListener=function(l){this._listeners=this._listeners.filter(function(c){return c!==l})},s.prototype._broadcast=function(l){for(var c=0,h=this._listeners;c<h.length;c++){var f=h[c];try{f(l.isOpen,l)}catch(v){}}},s.prototype._detectLoop=function(){return r(this,void 0,void 0,function(){var l,c,h,f,v,m=this;return o(this,function(y){switch(y.label){case 0:l=!1,c="",h=0,f=this._checkers,y.label=1;case 1:return h<f.length?[4,(v=f[h]).isEnable()]:[3,6];case 2:return y.sent()?(c=v.name,[4,v.isOpen()]):[3,4];case 3:l=y.sent(),y.label=4;case 4:if(l)return[3,6];y.label=5;case 5:return h++,[3,1];case 6:return l!=this._isOpen&&(this._isOpen=l,this._broadcast({isOpen:l,checkerName:c})),this._detectLoopDelay>0?this._timer=setTimeout(function(){return m._detectLoop()},this._detectLoopDelay):this.stop(),[2]}})})},s}()},function(i,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9);n.d(t,"depRegToStringChecker",function(){return r.a});var o=n(12);n.d(t,"elementIdChecker",function(){return o.a});var a=n(13);n.d(t,"functionToStringChecker",function(){return a.a});var s=n(14);n.d(t,"regToStringChecker",function(){return s.a});var l=n(15);n.d(t,"debuggerChecker",function(){return l.a})},function(i,t,n){"use strict";n.d(t,"a",function(){return f});var r=n(1),o=n(3),a=n(0),s=this&&this.__awaiter||function(v,m,y,E){return new(y||(y=Promise))(function(_,C){function A(j){try{L(E.next(j))}catch(N){C(N)}}function T(j){try{L(E.throw(j))}catch(N){C(N)}}function L(j){j.done?_(j.value):function(N){return N instanceof y?N:new y(function(q){q(N)})}(j.value).then(A,T)}L((E=E.apply(v,m||[])).next())})},l=this&&this.__generator||function(v,m){var y,E,_,C,A={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return C={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function T(L){return function(j){return function(N){if(y)throw new TypeError("Generator is already executing.");for(;A;)try{if(y=1,E&&(_=2&N[0]?E.return:N[0]?E.throw||((_=E.return)&&_.call(E),0):E.next)&&!(_=_.call(E,N[1])).done)return _;switch(E=0,_&&(N=[2&N[0],_.value]),N[0]){case 0:case 1:_=N;break;case 4:return A.label++,{value:N[1],done:!1};case 5:A.label++,E=N[1],N=[0];continue;case 7:N=A.ops.pop(),A.trys.pop();continue;default:if(!(_=(_=A.trys).length>0&&_[_.length-1])&&(N[0]===6||N[0]===2)){A=0;continue}if(N[0]===3&&(!_||N[1]>_[0]&&N[1]<_[3])){A.label=N[1];break}if(N[0]===6&&A.label<_[1]){A.label=_[1],_=N;break}if(_&&A.label<_[2]){A.label=_[2],A.ops.push(N);break}_[2]&&A.ops.pop(),A.trys.pop();continue}N=m.call(v,A)}catch(q){N=[6,q],E=0}finally{y=_=0}if(5&N[0])throw N[1];return{value:N[0]?N[1]:void 0,done:!0}}([L,j])}}},c=/ /,h=!1;c.toString=function(){return h=!0,f.name};var f={name:"dep-reg-to-string",isOpen:function(){return s(this,void 0,void 0,function(){return l(this,function(v){return h=!1,Object(o.c)({dep:c}),Object(o.a)(),[2,h]})})},isEnable:function(){return s(this,void 0,void 0,function(){return l(this,function(v){return[2,Object(a.b)({includes:[!0],excludes:[r.c,r.d]})]})})}}},function(i,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(r){typeof window=="object"&&(n=window)}i.exports=n},function(i,t,n){var r,o,a;(function(s,l){o=[],(a=typeof(r=l)=="function"?r.apply(t,o):r)===void 0||(i.exports=a)})(0,function(){var s=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function l(y){var E=y.replace(/^v/,"").replace(/\+.*$/,""),_=function(A,T){return A.indexOf(T)===-1?A.length:A.indexOf(T)}(E,"-"),C=E.substring(0,_).split(".");return C.push(E.substring(_+1)),C}function c(y){return isNaN(Number(y))?y:Number(y)}function h(y){if(typeof y!="string")throw new TypeError("Invalid argument expected string");if(!s.test(y))throw new Error("Invalid argument not valid semver ('"+y+"' received)")}function f(y,E){[y,E].forEach(h);for(var _=l(y),C=l(E),A=0;A<Math.max(_.length-1,C.length-1);A++){var T=parseInt(_[A]||0,10),L=parseInt(C[A]||0,10);if(T>L)return 1;if(L>T)return-1}var j=_[_.length-1],N=C[C.length-1];if(j&&N){var q=j.split(".").map(c),ye=N.split(".").map(c);for(A=0;A<Math.max(q.length,ye.length);A++){if(q[A]===void 0||typeof ye[A]=="string"&&typeof q[A]=="number")return-1;if(ye[A]===void 0||typeof q[A]=="string"&&typeof ye[A]=="number"||q[A]>ye[A])return 1;if(ye[A]>q[A])return-1}}else if(j||N)return j?-1:1;return 0}var v=[">",">=","=","<","<="],m={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return f.validate=function(y){return typeof y=="string"&&s.test(y)},f.compare=function(y,E,_){(function(A){if(typeof A!="string")throw new TypeError("Invalid operator type, expected string but got "+typeof A);if(v.indexOf(A)===-1)throw new TypeError("Invalid operator, expected one of "+v.join("|"))})(_);var C=f(y,E);return m[_].indexOf(C)>-1},f})},function(i,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(1),o=n(3),a=n(0),s=n(2),l=this&&this.__awaiter||function(m,y,E,_){return new(E||(E=Promise))(function(C,A){function T(N){try{j(_.next(N))}catch(q){A(q)}}function L(N){try{j(_.throw(N))}catch(q){A(q)}}function j(N){N.done?C(N.value):function(q){return q instanceof E?q:new E(function(ye){ye(q)})}(N.value).then(T,L)}j((_=_.apply(m,y||[])).next())})},c=this&&this.__generator||function(m,y){var E,_,C,A,T={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return A={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function L(j){return function(N){return function(q){if(E)throw new TypeError("Generator is already executing.");for(;T;)try{if(E=1,_&&(C=2&q[0]?_.return:q[0]?_.throw||((C=_.return)&&C.call(_),0):_.next)&&!(C=C.call(_,q[1])).done)return C;switch(_=0,C&&(q=[2&q[0],C.value]),q[0]){case 0:case 1:C=q;break;case 4:return T.label++,{value:q[1],done:!1};case 5:T.label++,_=q[1],q=[0];continue;case 7:q=T.ops.pop(),T.trys.pop();continue;default:if(!(C=(C=T.trys).length>0&&C[C.length-1])&&(q[0]===6||q[0]===2)){T=0;continue}if(q[0]===3&&(!C||q[1]>C[0]&&q[1]<C[3])){T.label=q[1];break}if(q[0]===6&&T.label<C[1]){T.label=C[1],C=q;break}if(C&&T.label<C[2]){T.label=C[2],T.ops.push(q);break}C[2]&&T.ops.pop(),T.trys.pop();continue}q=y.call(m,T)}catch(ye){q=[6,ye],_=0}finally{E=C=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}([j,N])}}},h=Object(s.a)("div"),f=!1;Object.defineProperty(h,"id",{get:function(){return f=!0,v.name},configurable:!0});var v={name:"element-id",isOpen:function(){return l(this,void 0,void 0,function(){return c(this,function(m){return f=!1,Object(o.b)(h),Object(o.a)(),[2,f]})})},isEnable:function(){return l(this,void 0,void 0,function(){return c(this,function(m){return[2,Object(a.b)({includes:[!0],excludes:[r.d,r.b,r.c]})]})})}}},function(i,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(1),o=n(3),a=n(5),s=n(0),l=this&&this.__awaiter||function(m,y,E,_){return new(E||(E=Promise))(function(C,A){function T(N){try{j(_.next(N))}catch(q){A(q)}}function L(N){try{j(_.throw(N))}catch(q){A(q)}}function j(N){N.done?C(N.value):function(q){return q instanceof E?q:new E(function(ye){ye(q)})}(N.value).then(T,L)}j((_=_.apply(m,y||[])).next())})},c=this&&this.__generator||function(m,y){var E,_,C,A,T={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return A={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(A[Symbol.iterator]=function(){return this}),A;function L(j){return function(N){return function(q){if(E)throw new TypeError("Generator is already executing.");for(;T;)try{if(E=1,_&&(C=2&q[0]?_.return:q[0]?_.throw||((C=_.return)&&C.call(_),0):_.next)&&!(C=C.call(_,q[1])).done)return C;switch(_=0,C&&(q=[2&q[0],C.value]),q[0]){case 0:case 1:C=q;break;case 4:return T.label++,{value:q[1],done:!1};case 5:T.label++,_=q[1],q=[0];continue;case 7:q=T.ops.pop(),T.trys.pop();continue;default:if(!(C=(C=T.trys).length>0&&C[C.length-1])&&(q[0]===6||q[0]===2)){T=0;continue}if(q[0]===3&&(!C||q[1]>C[0]&&q[1]<C[3])){T.label=q[1];break}if(q[0]===6&&T.label<C[1]){T.label=C[1],C=q;break}if(C&&T.label<C[2]){T.label=C[2],T.ops.push(q);break}C[2]&&T.ops.pop(),T.trys.pop();continue}q=y.call(m,T)}catch(ye){q=[6,ye],_=0}finally{E=C=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}([j,N])}}};function h(){}var f=0;h.toString=function(){return f++,""};var v={name:"function-to-string",isOpen:function(){return l(this,void 0,void 0,function(){return c(this,function(m){return f=0,Object(o.b)(h),Object(o.a)(),[2,f===2]})})},isEnable:function(){return l(this,void 0,void 0,function(){return c(this,function(m){return[2,Object(s.b)({includes:[!0],excludes:[r.c,(a.b||a.c)&&r.a]})]})})}}},function(i,t,n){"use strict";n.d(t,"a",function(){return f});var r=n(3),o=n(1),a=n(0),s=this&&this.__awaiter||function(v,m,y,E){return new(y||(y=Promise))(function(_,C){function A(j){try{L(E.next(j))}catch(N){C(N)}}function T(j){try{L(E.throw(j))}catch(N){C(N)}}function L(j){j.done?_(j.value):function(N){return N instanceof y?N:new y(function(q){q(N)})}(j.value).then(A,T)}L((E=E.apply(v,m||[])).next())})},l=this&&this.__generator||function(v,m){var y,E,_,C,A={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return C={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function T(L){return function(j){return function(N){if(y)throw new TypeError("Generator is already executing.");for(;A;)try{if(y=1,E&&(_=2&N[0]?E.return:N[0]?E.throw||((_=E.return)&&_.call(E),0):E.next)&&!(_=_.call(E,N[1])).done)return _;switch(E=0,_&&(N=[2&N[0],_.value]),N[0]){case 0:case 1:_=N;break;case 4:return A.label++,{value:N[1],done:!1};case 5:A.label++,E=N[1],N=[0];continue;case 7:N=A.ops.pop(),A.trys.pop();continue;default:if(!(_=(_=A.trys).length>0&&_[_.length-1])&&(N[0]===6||N[0]===2)){A=0;continue}if(N[0]===3&&(!_||N[1]>_[0]&&N[1]<_[3])){A.label=N[1];break}if(N[0]===6&&A.label<_[1]){A.label=_[1],_=N;break}if(_&&A.label<_[2]){A.label=_[2],A.ops.push(N);break}_[2]&&A.ops.pop(),A.trys.pop();continue}N=m.call(v,A)}catch(q){N=[6,q],E=0}finally{y=_=0}if(5&N[0])throw N[1];return{value:N[0]?N[1]:void 0,done:!0}}([L,j])}}},c=/ /,h=!1;c.toString=function(){return h=!0,f.name};var f={name:"reg-to-string",isOpen:function(){return s(this,void 0,void 0,function(){return l(this,function(v){return h=!1,Object(r.b)(c),Object(r.a)(),[2,h]})})},isEnable:function(){return s(this,void 0,void 0,function(){return l(this,function(v){return[2,Object(a.b)({includes:[!0],excludes:[o.f]})]})})}}},function(i,t,n){"use strict";n.d(t,"a",function(){return s});var r=this&&this.__awaiter||function(l,c,h,f){return new(h||(h=Promise))(function(v,m){function y(C){try{_(f.next(C))}catch(A){m(A)}}function E(C){try{_(f.throw(C))}catch(A){m(A)}}function _(C){C.done?v(C.value):function(A){return A instanceof h?A:new h(function(T){T(A)})}(C.value).then(y,E)}_((f=f.apply(l,c||[])).next())})},o=this&&this.__generator||function(l,c){var h,f,v,m,y={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return m={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function E(_){return function(C){return function(A){if(h)throw new TypeError("Generator is already executing.");for(;y;)try{if(h=1,f&&(v=2&A[0]?f.return:A[0]?f.throw||((v=f.return)&&v.call(f),0):f.next)&&!(v=v.call(f,A[1])).done)return v;switch(f=0,v&&(A=[2&A[0],v.value]),A[0]){case 0:case 1:v=A;break;case 4:return y.label++,{value:A[1],done:!1};case 5:y.label++,f=A[1],A=[0];continue;case 7:A=y.ops.pop(),y.trys.pop();continue;default:if(!(v=(v=y.trys).length>0&&v[v.length-1])&&(A[0]===6||A[0]===2)){y=0;continue}if(A[0]===3&&(!v||A[1]>v[0]&&A[1]<v[3])){y.label=A[1];break}if(A[0]===6&&y.label<v[1]){y.label=v[1],v=A;break}if(v&&y.label<v[2]){y.label=v[2],y.ops.push(A);break}v[2]&&y.ops.pop(),y.trys.pop();continue}A=c.call(l,y)}catch(T){A=[6,T],f=0}finally{h=v=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([_,C])}}};function a(){return performance?performance.now():Date.now()}var s={name:"debugger-checker",isOpen:function(){return r(this,void 0,void 0,function(){var l;return o(this,function(c){return l=a(),function(){}.constructor("debugger")(),[2,a()-l>100]})})},isEnable:function(){return r(this,void 0,void 0,function(){return o(this,function(l){return[2,!0]})})}}},function(i,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(2),o=/mobile/i.test(r.b)}])})});var qC=G(p=>{S();"use strict";var e;p.browser=Object.create(null);e=Object.create(null);e[0]=new RegExp("(Rival IQ, rivaliq.com)");e[1]="Rival IQ";e[2]=0;e[3]=0;e[4]=0;p.browser[0]=e;e=Object.create(null);e[0]=new RegExp("(ESPN)[%20| ]+Radio/(\\d+)\\.(\\d+)\\.(\\d+) CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[1]=e;e=Object.create(null);e[0]=new RegExp("(Antenna)/(\\d+) CFNetwork");e[1]="AntennaPod";e[2]=0;e[3]=0;e[4]=0;p.browser[2]=e;e=Object.create(null);e[0]=new RegExp("(TopPodcasts)Pro/(\\d+) CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[3]=e;e=Object.create(null);e[0]=new RegExp("(MusicDownloader)Lite/(\\d+)\\.(\\d+)\\.(\\d+) CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[4]=e;e=Object.create(null);e[0]=new RegExp("^(.*)-iPad/(\\d+)\\.?(\\d+)?.?(\\d+)?.?(\\d+)? CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[5]=e;e=Object.create(null);e[0]=new RegExp("^(.*)-iPhone/(\\d+)\\.?(\\d+)?.?(\\d+)?.?(\\d+)? CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[6]=e;e=Object.create(null);e[0]=new RegExp("^(.*)/(\\d+)\\.?(\\d+)?.?(\\d+)?.?(\\d+)? CFNetwork");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[7]=e;e=Object.create(null);e[0]=new RegExp("(espn\\.go)");e[1]="ESPN";e[2]=0;e[3]=0;e[4]=0;p.browser[8]=e;e=Object.create(null);e[0]=new RegExp("(espnradio\\.com)");e[1]="ESPN";e[2]=0;e[3]=0;e[4]=0;p.browser[9]=e;e=Object.create(null);e[0]=new RegExp("ESPN APP$");e[1]="ESPN";e[2]=0;e[3]=0;e[4]=0;p.browser[10]=e;e=Object.create(null);e[0]=new RegExp("(audioboom\\.com)");e[1]="AudioBoom";e[2]=0;e[3]=0;e[4]=0;p.browser[11]=e;e=Object.create(null);e[0]=new RegExp(" (Rivo) RHYTHM");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[12]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)(?:/(\\d+)\\.(\\d+)\\.?(\\d+)?)?");e[1]="CFNetwork";e[2]=0;e[3]=0;e[4]=0;p.browser[13]=e;e=Object.create(null);e[0]=new RegExp("(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)");e[1]="PingdomBot";e[2]=0;e[3]=0;e[4]=0;p.browser[14]=e;e=Object.create(null);e[0]=new RegExp("(PingdomTMS)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="PingdomBot";e[2]=0;e[3]=0;e[4]=0;p.browser[15]=e;e=Object.create(null);e[0]=new RegExp("(NewRelicPinger)/(\\d+)\\.(\\d+)");e[1]="NewRelicPingerBot";e[2]=0;e[3]=0;e[4]=0;p.browser[16]=e;e=Object.create(null);e[0]=new RegExp("(\\(StatusCake\\))");e[1]="StatusCakeBot";e[2]=0;e[3]=0;e[4]=0;p.browser[17]=e;e=Object.create(null);e[0]=new RegExp("(facebookexternalhit)/(\\d+)\\.(\\d+)");e[1]="FacebookBot";e[2]=0;e[3]=0;e[4]=0;p.browser[18]=e;e=Object.create(null);e[0]=new RegExp("Google.*/\\+/web/snippet");e[1]="GooglePlusBot";e[2]=0;e[3]=0;e[4]=0;p.browser[19]=e;e=Object.create(null);e[0]=new RegExp("via ggpht.com GoogleImageProxy");e[1]="GmailImageProxy";e[2]=0;e[3]=0;e[4]=0;p.browser[20]=e;e=Object.create(null);e[0]=new RegExp("(Twitterbot)/(\\d+)\\.(\\d+)");e[1]="TwitterBot";e[2]=0;e[3]=0;e[4]=0;p.browser[21]=e;e=Object.create(null);e[0]=new RegExp("/((?:Ant-)?Nutch|[A-z]+[Bb]ot|[A-z]+[Ss]pider|Axtaris|fetchurl|Isara|ShopSalad|Tailsweep)[ \\-](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[22]=e;e=Object.create(null);e[0]=new RegExp("\\b(008|Altresium|Argus|BaiduMobaider|BoardReader|DNSGroup|DataparkSearch|EDI|Goodzer|Grub|INGRID|Infohelfer|LinkedInBot|LOOQ|Nutch|PathDefender|Peew|PostPost|Steeler|Twitterbot|VSE|WebCrunch|WebZIP|Y!J-BR[A-Z]|YahooSeeker|envolk|sproose|wminer)/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[23]=e;e=Object.create(null);e[0]=new RegExp("(MSIE) (\\d+)\\.(\\d+)([a-z]\\d?)?;.* MSIECrawler");e[1]="MSIECrawler";e[2]=0;e[3]=0;e[4]=0;p.browser[24]=e;e=Object.create(null);e[0]=new RegExp("(DAVdroid)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[25]=e;e=Object.create(null);e[0]=new RegExp("(Google-HTTP-Java-Client|Apache-HttpClient|http%20client|Python-urllib|HttpMonitor|TLSProber|WinHTTP|JNLP|okhttp)(?:[ /](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[26]=e;e=Object.create(null);e[0]=new RegExp("(Pinterest(?:bot)?)/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?[;\\s\\(]+\\+https://www.pinterest.com/bot.html");e[1]="Pinterestbot";e[2]=0;e[3]=0;e[4]=0;p.browser[27]=e;e=Object.create(null);e[0]=new RegExp("(1470\\.net crawler|50\\.nu|8bo Crawler Bot|Aboundex|Accoona-[A-z]+-Agent|AdsBot-Google(?:-[a-z]+)?|altavista|AppEngine-Google|archive.*?\\.org_bot|archiver|Ask Jeeves|[Bb]ai[Dd]u[Ss]pider(?:-[A-Za-z]+)*|bingbot|BingPreview|blitzbot|BlogBridge|Bloglovin|BoardReader(?: [A-Za-z]+)*|boitho.com-dc|BotSeer|\\b\\w*favicon\\w*\\b|\\bYeti(?:-[a-z]+)?|Catchpoint(?: bot)?|[Cc]harlotte|Checklinks|clumboot|Comodo HTTP\\(S\\) Crawler|Comodo-Webinspector-Crawler|ConveraCrawler|CRAWL-E|CrawlConvera|Daumoa(?:-feedfetcher)?|Feed Seeker Bot|Feedbin|findlinks|Flamingo_SearchEngine|FollowSite Bot|furlbot|Genieo|gigabot|GomezAgent|gonzo1|(?:[a-zA-Z]+-)?Googlebot(?:-[a-zA-Z]+)?|Google SketchUp|grub-client|gsa-crawler|heritrix|HiddenMarket|holmes|HooWWWer|htdig|ia_archiver|ICC-Crawler|Icarus6j|ichiro(?:/mobile)?|IconSurf|IlTrovatore(?:-Setaccio)?|InfuzApp|Innovazion Crawler|InternetArchive|IP2[a-z]+Bot|jbot\\b|KaloogaBot|Kraken|Kurzor|larbin|LEIA|LesnikBot|Linguee Bot|LinkAider|LinkedInBot|Lite Bot|Llaut|lycos|Mail\\.RU_Bot|masscan|masidani_bot|Mediapartners-Google|Microsoft .*? Bot|mogimogi|mozDex|MJ12bot|msnbot(?:-media *)?|msrbot|Mtps Feed Aggregation System|netresearch|Netvibes|NewsGator[^/]*|^NING|Nutch[^/]*|Nymesis|ObjectsSearch|Orbiter|OOZBOT|PagePeeker|PagesInventory|PaxleFramework|Peeplo Screenshot Bot|PlantyNet_WebRobot|Pompos|Qwantify|Read%20Later|Reaper|RedCarpet|Retreiver|Riddler|Rival IQ|scooter|Scrapy|Scrubby|searchsight|seekbot|semanticdiscovery|Simpy|SimplePie|SEOstats|SimpleRSS|SiteCon|Slackbot-LinkExpanding|Slack-ImgProxy|Slurp|snappy|Speedy Spider|Squrl Java|Stringer|TheUsefulbot|ThumbShotsBot|Thumbshots\\.ru|Tiny Tiny RSS|TwitterBot|WhatsApp|URL2PNG|Vagabondo|VoilaBot|^vortex|Votay bot|^voyager|WASALive.Bot|Web-sniffer|WebThumb|WeSEE:[A-z]+|WhatWeb|WIRE|WordPress|Wotbox|www\\.almaden\\.ibm\\.com|Xenu(?:.s)? Link Sleuth|Xerka [A-z]+Bot|yacy(?:bot)?|Yahoo[a-z]*Seeker|Yahoo! Slurp|Yandex\\w+|YodaoBot(?:-[A-z]+)?|YottaaMonitor|Yowedo|^Zao|^Zao-Crawler|ZeBot_www\\.ze\\.bz|ZooShot|ZyBorg)(?:[ /]v?(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[28]=e;e=Object.create(null);e[0]=new RegExp("(?:\\/[A-Za-z0-9\\.]+)? *([A-Za-z0-9 \\-_\\!\\[\\]:]*(?:[Aa]rchiver|[Ii]ndexer|[Ss]craper|[Bb]ot|[Ss]pider|[Cc]rawl[a-z]*))/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[29]=e;e=Object.create(null);e[0]=new RegExp("(?:\\/[A-Za-z0-9\\.]+)? *([A-Za-z0-9 _\\!\\[\\]:]*(?:[Aa]rchiver|[Ii]ndexer|[Ss]craper|[Bb]ot|[Ss]pider|[Cc]rawl[a-z]*)) (\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[30]=e;e=Object.create(null);e[0]=new RegExp("((?:[A-z0-9]+|[A-z\\-]+ ?)?(?: the )?(?:[Ss][Pp][Ii][Dd][Ee][Rr]|[Ss]crape|[A-Za-z0-9-]*(?:[^C][^Uu])[Bb]ot|[Cc][Rr][Aa][Ww][Ll])[A-z0-9]*)(?:(?:[ /]| v)(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[31]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/(\\d+)\\.(\\d+)\\.(\\d+) \\(");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[32]=e;e=Object.create(null);e[0]=new RegExp("(Chimera|SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[33]=e;e=Object.create(null);e[0]=new RegExp("\\[FB.*;(FBAV)/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]="Facebook";e[2]=0;e[3]=0;e[4]=0;p.browser[34]=e;e=Object.create(null);e[0]=new RegExp("\\[(Pinterest)/[^\\]]+\\]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[35]=e;e=Object.create(null);e[0]=new RegExp("(Pinterest)(?: for Android(?: Tablet)?)?/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[36]=e;e=Object.create(null);e[0]=new RegExp("(PaleMoon)/(\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]="Pale Moon";e[2]=0;e[3]=0;e[4]=0;p.browser[37]=e;e=Object.create(null);e[0]=new RegExp("(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)");e[1]="Firefox Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[38]=e;e=Object.create(null);e[0]=new RegExp("(Fennec)/(\\d+)\\.(\\d+)(pre)");e[1]="Firefox Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[39]=e;e=Object.create(null);e[0]=new RegExp("(Fennec)/(\\d+)\\.(\\d+)");e[1]="Firefox Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[40]=e;e=Object.create(null);e[0]=new RegExp("(?:Mobile|Tablet);.*(Firefox)/(\\d+)\\.(\\d+)");e[1]="Firefox Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[41]=e;e=Object.create(null);e[0]=new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)");e[1]="Firefox ($1)";e[2]=0;e[3]=0;e[4]=0;p.browser[42]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)");e[1]="Firefox Alpha";e[2]=0;e[3]=0;e[4]=0;p.browser[43]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)");e[1]="Firefox Beta";e[2]=0;e[3]=0;e[4]=0;p.browser[44]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)");e[1]="Firefox Alpha";e[2]=0;e[3]=0;e[4]=0;p.browser[45]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)");e[1]="Firefox Beta";e[2]=0;e[3]=0;e[4]=0;p.browser[46]=e;e=Object.create(null);e[0]=new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?");e[1]="Firefox ($1)";e[2]=0;e[3]=0;e[4]=0;p.browser[47]=e;e=Object.create(null);e[0]=new RegExp("(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)");e[1]="MicroB";e[2]=0;e[3]=0;e[4]=0;p.browser[48]=e;e=Object.create(null);e[0]=new RegExp("(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[49]=e;e=Object.create(null);e[0]=new RegExp("(FxiOS)/(\\d+)\\.(\\d+)(\\.(\\d+))?(\\.(\\d+))?");e[1]="Firefox iOS";e[2]=0;e[3]=0;e[4]=0;p.browser[50]=e;e=Object.create(null);e[0]=new RegExp("(Flock)/(\\d+)\\.(\\d+)(b\\d+?)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[51]=e;e=Object.create(null);e[0]=new RegExp("(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[52]=e;e=Object.create(null);e[0]=new RegExp("(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Netscape";e[2]=0;e[3]=0;e[4]=0;p.browser[53]=e;e=Object.create(null);e[0]=new RegExp("(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)");e[1]="Netscape";e[2]=0;e[3]=0;e[4]=0;p.browser[54]=e;e=Object.create(null);e[0]=new RegExp("(Netscape6)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+)?");e[1]="Netscape";e[2]=0;e[3]=0;e[4]=0;p.browser[55]=e;e=Object.create(null);e[0]=new RegExp("(MyIBrow)/(\\d+)\\.(\\d+)");e[1]="My Internet Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[56]=e;e=Object.create(null);e[0]=new RegExp("(UC? ?Browser|UCWEB|U3)[ /]?(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="UC Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[57]=e;e=Object.create(null);e[0]=new RegExp("(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[58]=e;e=Object.create(null);e[0]=new RegExp("(Opera Mini)(?:/att)?/?(\\d+)?(?:\\.(\\d+))?(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[59]=e;e=Object.create(null);e[0]=new RegExp("(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)");e[1]="Opera Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[60]=e;e=Object.create(null);e[0]=new RegExp("(Opera)/(\\d+)\\.(\\d+).+Opera Mobi");e[1]="Opera Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[61]=e;e=Object.create(null);e[0]=new RegExp("Opera Mobi.+(Opera)(?:/|\\s+)(\\d+)\\.(\\d+)");e[1]="Opera Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[62]=e;e=Object.create(null);e[0]=new RegExp("Opera Mobi");e[1]="Opera Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[63]=e;e=Object.create(null);e[0]=new RegExp("(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[64]=e;e=Object.create(null);e[0]=new RegExp("(?:Mobile Safari).*(OPR)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Opera Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[65]=e;e=Object.create(null);e[0]=new RegExp("(?:Chrome).*(OPR)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Opera";e[2]=0;e[3]=0;e[4]=0;p.browser[66]=e;e=Object.create(null);e[0]=new RegExp("(Coast)/(\\d+).(\\d+).(\\d+)");e[1]="Opera Coast";e[2]=0;e[3]=0;e[4]=0;p.browser[67]=e;e=Object.create(null);e[0]=new RegExp("(OPiOS)/(\\d+).(\\d+).(\\d+)");e[1]="Opera Mini";e[2]=0;e[3]=0;e[4]=0;p.browser[68]=e;e=Object.create(null);e[0]=new RegExp("Chrome/.+( MMS)/(\\d+).(\\d+).(\\d+)");e[1]="Opera Neon";e[2]=0;e[3]=0;e[4]=0;p.browser[69]=e;e=Object.create(null);e[0]=new RegExp("(hpw|web)OS/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="webOS Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[70]=e;e=Object.create(null);e[0]=new RegExp("(luakit)");e[1]="LuaKit";e[2]=0;e[3]=0;e[4]=0;p.browser[71]=e;e=Object.create(null);e[0]=new RegExp("(Snowshoe)/(\\d+)\\.(\\d+).(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[72]=e;e=Object.create(null);e[0]=new RegExp("Gecko/\\d+ (Lightning)/(\\d+)\\.(\\d+)\\.?((?:[ab]?\\d+[a-z]*)|(?:\\d*))");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[73]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)");e[1]="Swiftfox";e[2]=0;e[3]=0;e[4]=0;p.browser[74]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)");e[1]="Swiftfox";e[2]=0;e[3]=0;e[4]=0;p.browser[75]=e;e=Object.create(null);e[0]=new RegExp("(rekonq)/(\\d+)\\.(\\d+)\\.?(\\d+)? Safari");e[1]="Rekonq";e[2]=0;e[3]=0;e[4]=0;p.browser[76]=e;e=Object.create(null);e[0]=new RegExp("rekonq");e[1]="Rekonq";e[2]=0;e[3]=0;e[4]=0;p.browser[77]=e;e=Object.create(null);e[0]=new RegExp("(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]="Conkeror";e[2]=0;e[3]=0;e[4]=0;p.browser[78]=e;e=Object.create(null);e[0]=new RegExp("(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Konqueror";e[2]=0;e[3]=0;e[4]=0;p.browser[79]=e;e=Object.create(null);e[0]=new RegExp("(WeTab)-Browser");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[80]=e;e=Object.create(null);e[0]=new RegExp("(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Comodo Dragon";e[2]=0;e[3]=0;e[4]=0;p.browser[81]=e;e=Object.create(null);e[0]=new RegExp("(Symphony) (\\d+).(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[82]=e;e=Object.create(null);e[0]=new RegExp("PLAYSTATION 3.+WebKit");e[1]="NetFront NX";e[2]=0;e[3]=0;e[4]=0;p.browser[83]=e;e=Object.create(null);e[0]=new RegExp("PLAYSTATION 3");e[1]="NetFront";e[2]=0;e[3]=0;e[4]=0;p.browser[84]=e;e=Object.create(null);e[0]=new RegExp("(PlayStation Portable)");e[1]="NetFront";e[2]=0;e[3]=0;e[4]=0;p.browser[85]=e;e=Object.create(null);e[0]=new RegExp("(PlayStation Vita)");e[1]="NetFront NX";e[2]=0;e[3]=0;e[4]=0;p.browser[86]=e;e=Object.create(null);e[0]=new RegExp("AppleWebKit.+ (NX)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="NetFront NX";e[2]=0;e[3]=0;e[4]=0;p.browser[87]=e;e=Object.create(null);e[0]=new RegExp("(Nintendo 3DS)");e[1]="NetFront NX";e[2]=0;e[3]=0;e[4]=0;p.browser[88]=e;e=Object.create(null);e[0]=new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?");e[1]="Amazon Silk";e[2]=0;e[3]=0;e[4]=0;p.browser[89]=e;e=Object.create(null);e[0]=new RegExp("(Puffin)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[90]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone .*(Edge)/(\\d+)\\.(\\d+)");e[1]="Edge Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[91]=e;e=Object.create(null);e[0]=new RegExp("(SamsungBrowser)/(\\d+)\\.(\\d+)");e[1]="Samsung Internet";e[2]=0;e[3]=0;e[4]=0;p.browser[92]=e;e=Object.create(null);e[0]=new RegExp("(SznProhlizec)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Seznam.cz";e[2]=0;e[3]=0;e[4]=0;p.browser[93]=e;e=Object.create(null);e[0]=new RegExp("(coc_coc_browser)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Coc Coc";e[2]=0;e[3]=0;e[4]=0;p.browser[94]=e;e=Object.create(null);e[0]=new RegExp("(baidubrowser)[/\\s](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]="Baidu Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[95]=e;e=Object.create(null);e[0]=new RegExp("(FlyFlow)/(\\d+)\\.(\\d+)");e[1]="Baidu Explorer";e[2]=0;e[3]=0;e[4]=0;p.browser[96]=e;e=Object.create(null);e[0]=new RegExp("(MxBrowser)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Maxthon";e[2]=0;e[3]=0;e[4]=0;p.browser[97]=e;e=Object.create(null);e[0]=new RegExp("(Crosswalk)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[98]=e;e=Object.create(null);e[0]=new RegExp("; wv\\).+(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Chrome Mobile WebView";e[2]=0;e[3]=0;e[4]=0;p.browser[99]=e;e=Object.create(null);e[0]=new RegExp("(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Chrome Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[100]=e;e=Object.create(null);e[0]=new RegExp("(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Chrome Mobile iOS";e[2]=0;e[3]=0;e[4]=0;p.browser[101]=e;e=Object.create(null);e[0]=new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile(?:[ /]|$)");e[1]="Chrome Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[102]=e;e=Object.create(null);e[0]=new RegExp(" Mobile .*(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Chrome Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[103]=e;e=Object.create(null);e[0]=new RegExp("(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Chrome Frame";e[2]=0;e[3]=0;e[4]=0;p.browser[104]=e;e=Object.create(null);e[0]=new RegExp("(SLP Browser)/(\\d+)\\.(\\d+)");e[1]="Tizen Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[105]=e;e=Object.create(null);e[0]=new RegExp("(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)");e[1]="Sogou Explorer";e[2]=0;e[3]=0;e[4]=0;p.browser[106]=e;e=Object.create(null);e[0]=new RegExp("(MQQBrowser/Mini)(?:(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]="QQ Browser Mini";e[2]=0;e[3]=0;e[4]=0;p.browser[107]=e;e=Object.create(null);e[0]=new RegExp("(MQQBrowser)(?:/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]="QQ Browser Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[108]=e;e=Object.create(null);e[0]=new RegExp("(QQBrowser)(?:/(\\d+)(?:\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]="QQ Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[109]=e;e=Object.create(null);e[0]=new RegExp("(Rackspace Monitoring)/(\\d+)\\.(\\d+)");e[1]="RackspaceBot";e[2]=0;e[3]=0;e[4]=0;p.browser[110]=e;e=Object.create(null);e[0]=new RegExp("(PyAMF)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[111]=e;e=Object.create(null);e[0]=new RegExp("(YaBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Yandex Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[112]=e;e=Object.create(null);e[0]=new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+).* MRCHROME");e[1]="Mail.ru Chromium Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[113]=e;e=Object.create(null);e[0]=new RegExp("(AOL) (\\d+)\\.(\\d+); AOLBuild (\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[114]=e;e=Object.create(null);e[0]=new RegExp("(PodCruncher|Downcast)[ /]?(\\d+)\\.?(\\d+)?\\.?(\\d+)?\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[115]=e;e=Object.create(null);e[0]=new RegExp(" (BoxNotes)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[116]=e;e=Object.create(null);e[0]=new RegExp("(Slack_SSB)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Slack Desktop Client";e[2]=0;e[3]=0;e[4]=0;p.browser[117]=e;e=Object.create(null);e[0]=new RegExp("(HipChat)/?(\\d+)?");e[1]="HipChat Desktop Client";e[2]=0;e[3]=0;e[4]=0;p.browser[118]=e;e=Object.create(null);e[0]=new RegExp("\\b(MobileIron|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Epiphany|Shiira|Sunrise|Spotify|Flock|Netscape|Lunascape|WebPilot|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iris|UP\\.Browser|Bunjalloo|Google Earth|Raven for Mac|Openwave|MacOutlook|Electron)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[119]=e;e=Object.create(null);e[0]=new RegExp("Microsoft Office Outlook 12\\.\\d+\\.\\d+|MSOffice 12");e[1]="Outlook";e[2]="2007";e[3]=0;e[4]=0;p.browser[120]=e;e=Object.create(null);e[0]=new RegExp("Microsoft Outlook 14\\.\\d+\\.\\d+|MSOffice 14");e[1]="Outlook";e[2]="2010";e[3]=0;e[4]=0;p.browser[121]=e;e=Object.create(null);e[0]=new RegExp("Microsoft Outlook 15\\.\\d+\\.\\d+");e[1]="Outlook";e[2]="2013";e[3]=0;e[4]=0;p.browser[122]=e;e=Object.create(null);e[0]=new RegExp("Microsoft Outlook (?:Mail )?16\\.\\d+\\.\\d+");e[1]="Outlook";e[2]="2016";e[3]=0;e[4]=0;p.browser[123]=e;e=Object.create(null);e[0]=new RegExp("Outlook-Express\\/7\\.0.*");e[1]="Windows Live Mail";e[2]=0;e[3]=0;e[4]=0;p.browser[124]=e;e=Object.create(null);e[0]=new RegExp("(Airmail) (\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[125]=e;e=Object.create(null);e[0]=new RegExp("(Thunderbird)/(\\d+)\\.(\\d+)(?:\\.(\\d+(?:pre)?))?");e[1]="Thunderbird";e[2]=0;e[3]=0;e[4]=0;p.browser[126]=e;e=Object.create(null);e[0]=new RegExp("(Postbox)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Postbox";e[2]=0;e[3]=0;e[4]=0;p.browser[127]=e;e=Object.create(null);e[0]=new RegExp("(Barca(?:Pro)?)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Barca";e[2]=0;e[3]=0;e[4]=0;p.browser[128]=e;e=Object.create(null);e[0]=new RegExp("(Lotus-Notes)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Lotus Notes";e[2]=0;e[3]=0;e[4]=0;p.browser[129]=e;e=Object.create(null);e[0]=new RegExp("(Vivaldi)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[130]=e;e=Object.create(null);e[0]=new RegExp("(Edge)/(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[131]=e;e=Object.create(null);e[0]=new RegExp("(brave)/(\\d+)\\.(\\d+)\\.(\\d+) Chrome");e[1]="Brave";e[2]=0;e[3]=0;e[4]=0;p.browser[132]=e;e=Object.create(null);e[0]=new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)[\\d.]* Iron[^/]");e[1]="Iron";e[2]=0;e[3]=0;e[4]=0;p.browser[133]=e;e=Object.create(null);e[0]=new RegExp("\\b(Dolphin)(?: |HDCN/|/INT\\-)(\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[134]=e;e=Object.create(null);e[0]=new RegExp("(HeadlessChrome)(?:/(\\d+)\\.(\\d+)\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[135]=e;e=Object.create(null);e[0]=new RegExp("(Evolution)/(\\d+)\\.(\\d+)\\.(\\d+\\.\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[136]=e;e=Object.create(null);e[0]=new RegExp("(RCM CardDAV plugin)/(\\d+)\\.(\\d+)\\.(\\d+(?:-dev)?)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[137]=e;e=Object.create(null);e[0]=new RegExp("(bingbot|Bolt|AdobeAIR|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|iTunes|MacAppStore|NetNewsWire|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris|Abrowser|Planetweb|ICE Browser|mDolphin|qutebrowser|Otter|QupZilla|MailBar|kmail2|YahooMobileMail|ExchangeWebServices|ExchangeServicesClient|Dragon|Outlook-iOS-Android)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[138]=e;e=Object.create(null);e[0]=new RegExp("(Chromium|Chrome)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[139]=e;e=Object.create(null);e[0]=new RegExp("(IEMobile)[ /](\\d+)\\.(\\d+)");e[1]="IE Mobile";e[2]=0;e[3]=0;e[4]=0;p.browser[140]=e;e=Object.create(null);e[0]=new RegExp("(BacaBerita App)\\/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[141]=e;e=Object.create(null);e[0]=new RegExp("^(bPod|Pocket Casts|Player FM)$");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[142]=e;e=Object.create(null);e[0]=new RegExp("^(AlexaMediaPlayer|VLC)/(\\d+)\\.(\\d+)\\.([^.\\s]+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[143]=e;e=Object.create(null);e[0]=new RegExp("^(AntennaPod|WMPlayer|Zune|Podkicker|Radio|ExoPlayerDemo|Overcast|PocketTunes|NSPlayer|okhttp|DoggCatcher|QuickNews|QuickTime|Peapod|Podcasts|GoldenPod|VLC|Spotify|Miro|MediaGo|Juice|iPodder|gPodder|Banshee)/(\\d+)\\.(\\d+)\\.?(\\d+)?\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[144]=e;e=Object.create(null);e[0]=new RegExp("^(Peapod|Liferea)/([^.\\s]+)\\.([^.\\s]+)?\\.?([^.\\s]+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[145]=e;e=Object.create(null);e[0]=new RegExp("^(bPod|Player FM) BMID/(\\S+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[146]=e;e=Object.create(null);e[0]=new RegExp("^(Podcast ?Addict)/v(\\d+) ");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[147]=e;e=Object.create(null);e[0]=new RegExp("^(Podcast ?Addict) ");e[1]="PodcastAddict";e[2]=0;e[3]=0;e[4]=0;p.browser[148]=e;e=Object.create(null);e[0]=new RegExp("(Replay) AV");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[149]=e;e=Object.create(null);e[0]=new RegExp("(VOX) Music Player");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[150]=e;e=Object.create(null);e[0]=new RegExp("(CITA) RSS Aggregator/(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[151]=e;e=Object.create(null);e[0]=new RegExp("(Pocket Casts)$");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[152]=e;e=Object.create(null);e[0]=new RegExp("(Player FM)$");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[153]=e;e=Object.create(null);e[0]=new RegExp("(LG Player|Doppler|FancyMusic|MediaMonkey|Clementine) (\\d+)\\.(\\d+)\\.?([^.\\s]+)?\\.?([^.\\s]+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[154]=e;e=Object.create(null);e[0]=new RegExp("(philpodder)/(\\d+)\\.(\\d+)\\.?([^.\\s]+)?\\.?([^.\\s]+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[155]=e;e=Object.create(null);e[0]=new RegExp("(Player FM|Pocket Casts|DoggCatcher|Spotify|MediaMonkey|MediaGo|BashPodder)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[156]=e;e=Object.create(null);e[0]=new RegExp("(QuickTime)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[157]=e;e=Object.create(null);e[0]=new RegExp("(Kinoma)(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[158]=e;e=Object.create(null);e[0]=new RegExp("(Fancy) Cloud Music (\\d+)\\.(\\d+)");e[1]="FancyMusic";e[2]=0;e[3]=0;e[4]=0;p.browser[159]=e;e=Object.create(null);e[0]=new RegExp("EspnDownloadManager");e[1]="ESPN";e[2]=0;e[3]=0;e[4]=0;p.browser[160]=e;e=Object.create(null);e[0]=new RegExp("(ESPN) Radio (\\d+)\\.(\\d+)\\.?(\\d+)? ?[rv:]?(\\d+)? ");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[161]=e;e=Object.create(null);e[0]=new RegExp("(podracer|jPodder) v ?(\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[162]=e;e=Object.create(null);e[0]=new RegExp("(ZDM)/(\\d+)\\.(\\d+)[; ]?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[163]=e;e=Object.create(null);e[0]=new RegExp("(Zune|BeyondPod) (\\d+)\\.?(\\d+)?[\\);]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[164]=e;e=Object.create(null);e[0]=new RegExp("(WMPlayer)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[165]=e;e=Object.create(null);e[0]=new RegExp("^(Lavf)");e[1]="WMPlayer";e[2]=0;e[3]=0;e[4]=0;p.browser[166]=e;e=Object.create(null);e[0]=new RegExp("^(RSSRadio)[ /]?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[167]=e;e=Object.create(null);e[0]=new RegExp("(RSS_Radio) (\\d+)\\.(\\d+)");e[1]="RSSRadio";e[2]=0;e[3]=0;e[4]=0;p.browser[168]=e;e=Object.create(null);e[0]=new RegExp("(Podkicker) \\S+/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Podkicker";e[2]=0;e[3]=0;e[4]=0;p.browser[169]=e;e=Object.create(null);e[0]=new RegExp("^(HTC) Streaming Player \\S+ / \\S+ / \\S+ / (\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[170]=e;e=Object.create(null);e[0]=new RegExp("^(Stitcher)/iOS");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[171]=e;e=Object.create(null);e[0]=new RegExp("^(Stitcher)/Android");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[172]=e;e=Object.create(null);e[0]=new RegExp("^(VLC) .*version (\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[173]=e;e=Object.create(null);e[0]=new RegExp(" (VLC) for");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[174]=e;e=Object.create(null);e[0]=new RegExp("(vlc)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="VLC";e[2]=0;e[3]=0;e[4]=0;p.browser[175]=e;e=Object.create(null);e[0]=new RegExp("^(foobar)\\S+/([^.\\s]+)\\.([^.\\s]+)?\\.?([^.\\s]+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[176]=e;e=Object.create(null);e[0]=new RegExp("^(Clementine)\\S+ ([^.\\s]+)\\.([^.\\s]+)?\\.?([^.\\s]+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[177]=e;e=Object.create(null);e[0]=new RegExp("(amarok)/([^.\\s]+)\\.([^.\\s]+)?\\.?([^.\\s]+)?");e[1]="Amarok";e[2]=0;e[3]=0;e[4]=0;p.browser[178]=e;e=Object.create(null);e[0]=new RegExp("(Custom)-Feed Reader");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[179]=e;e=Object.create(null);e[0]=new RegExp("(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[180]=e;e=Object.create(null);e[0]=new RegExp("(iCab|Lunascape|Opera|Android|Jasmine|Polaris|Microsoft SkyDriveSync|The Bat!) (\\d+)\\.(\\d+)\\.?(\\d+)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[181]=e;e=Object.create(null);e[0]=new RegExp("(Kindle)/(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[182]=e;e=Object.create(null);e[0]=new RegExp("(Android) Donut");e[1]=0;e[2]="1";e[3]="2";e[4]=0;p.browser[183]=e;e=Object.create(null);e[0]=new RegExp("(Android) Eclair");e[1]=0;e[2]="2";e[3]="1";e[4]=0;p.browser[184]=e;e=Object.create(null);e[0]=new RegExp("(Android) Froyo");e[1]=0;e[2]="2";e[3]="2";e[4]=0;p.browser[185]=e;e=Object.create(null);e[0]=new RegExp("(Android) Gingerbread");e[1]=0;e[2]="2";e[3]="3";e[4]=0;p.browser[186]=e;e=Object.create(null);e[0]=new RegExp("(Android) Honeycomb");e[1]=0;e[2]="3";e[3]=0;e[4]=0;p.browser[187]=e;e=Object.create(null);e[0]=new RegExp("(MSIE) (\\d+)\\.(\\d+).*XBLWP7");e[1]="IE Large Screen";e[2]=0;e[3]=0;e[4]=0;p.browser[188]=e;e=Object.create(null);e[0]=new RegExp("(Nextcloud)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[189]=e;e=Object.create(null);e[0]=new RegExp("(mirall)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[190]=e;e=Object.create(null);e[0]=new RegExp("(ownCloud-android)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Owncloud";e[2]=0;e[3]=0;e[4]=0;p.browser[191]=e;e=Object.create(null);e[0]=new RegExp("(Obigo)InternetBrowser");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[192]=e;e=Object.create(null);e[0]=new RegExp("(Obigo)\\-Browser");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[193]=e;e=Object.create(null);e[0]=new RegExp("(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?");e[1]="Obigo";e[2]=0;e[3]=0;e[4]=0;p.browser[194]=e;e=Object.create(null);e[0]=new RegExp("(MAXTHON|Maxthon) (\\d+)\\.(\\d+)");e[1]="Maxthon";e[2]=0;e[3]=0;e[4]=0;p.browser[195]=e;e=Object.create(null);e[0]=new RegExp("(Maxthon|MyIE2|Uzbl|Shiira)");e[1]=0;e[2]="0";e[3]=0;e[4]=0;p.browser[196]=e;e=Object.create(null);e[0]=new RegExp("(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[197]=e;e=Object.create(null);e[0]=new RegExp("(NCSA_Mosaic)/(\\d+)\\.(\\d+)");e[1]="NCSA Mosaic";e[2]=0;e[3]=0;e[4]=0;p.browser[198]=e;e=Object.create(null);e[0]=new RegExp("(POLARIS)/(\\d+)\\.(\\d+)");e[1]="Polaris";e[2]=0;e[3]=0;e[4]=0;p.browser[199]=e;e=Object.create(null);e[0]=new RegExp("(Embider)/(\\d+)\\.(\\d+)");e[1]="Polaris";e[2]=0;e[3]=0;e[4]=0;p.browser[200]=e;e=Object.create(null);e[0]=new RegExp("(BonEcho)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+)?");e[1]="Bon Echo";e[2]=0;e[3]=0;e[4]=0;p.browser[201]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPhone|iPad).+Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*[ +]Safari");e[1]="Mobile Safari";e[2]=0;e[3]=0;e[4]=0;p.browser[202]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\\d+)_(\\d+)(?:_(\\d+))?.* AppleNews\\/\\d+\\.\\d+\\.\\d+?");e[1]="Mobile Safari UI/WKWebView";e[2]=0;e[3]=0;e[4]=0;p.browser[203]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPhone|iPad).+Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Mobile Safari UI/WKWebView";e[2]=0;e[3]=0;e[4]=0;p.browser[204]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\\d+)_(\\d+)(?:_(\\d+))?.*Mobile.*[ +]Safari");e[1]="Mobile Safari";e[2]=0;e[3]=0;e[4]=0;p.browser[205]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\\d+)_(\\d+)(?:_(\\d+))?.*Mobile");e[1]="Mobile Safari UI/WKWebView";e[2]=0;e[3]=0;e[4]=0;p.browser[206]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPhone|iPad).* Safari");e[1]="Mobile Safari";e[2]=0;e[3]=0;e[4]=0;p.browser[207]=e;e=Object.create(null);e[0]=new RegExp("(iPod|iPhone|iPad)");e[1]="Mobile Safari UI/WKWebView";e[2]=0;e[3]=0;e[4]=0;p.browser[208]=e;e=Object.create(null);e[0]=new RegExp("(AvantGo) (\\d+).(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[209]=e;e=Object.create(null);e[0]=new RegExp("(OneBrowser)/(\\d+).(\\d+)");e[1]="ONE Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[210]=e;e=Object.create(null);e[0]=new RegExp("(Avant)");e[1]=0;e[2]="1";e[3]=0;e[4]=0;p.browser[211]=e;e=Object.create(null);e[0]=new RegExp("(QtCarBrowser)");e[1]=0;e[2]="1";e[3]=0;e[4]=0;p.browser[212]=e;e=Object.create(null);e[0]=new RegExp("^(iBrowser/Mini)(\\d+).(\\d+)");e[1]="iBrowser Mini";e[2]=0;e[3]=0;e[4]=0;p.browser[213]=e;e=Object.create(null);e[0]=new RegExp("^(iBrowser|iRAPP)/(\\d+).(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[214]=e;e=Object.create(null);e[0]=new RegExp("^(Nokia)");e[1]="Nokia Services (WAP) Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[215]=e;e=Object.create(null);e[0]=new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)");e[1]="Nokia Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[216]=e;e=Object.create(null);e[0]=new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)");e[1]="Nokia Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[217]=e;e=Object.create(null);e[0]=new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+)");e[1]="Nokia Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[218]=e;e=Object.create(null);e[0]=new RegExp("(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)");e[1]="Nokia Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[219]=e;e=Object.create(null);e[0]=new RegExp("(Series60)/5\\.0");e[1]="Nokia Browser";e[2]="7";e[3]="0";e[4]=0;p.browser[220]=e;e=Object.create(null);e[0]=new RegExp("(Series60)/(\\d+)\\.(\\d+)");e[1]="Nokia OSS Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[221]=e;e=Object.create(null);e[0]=new RegExp("(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Ovi Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[222]=e;e=Object.create(null);e[0]=new RegExp("(Nokia)[EN]?(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[223]=e;e=Object.create(null);e[0]=new RegExp("(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)");e[1]="BlackBerry WebKit";e[2]=0;e[3]=0;e[4]=0;p.browser[224]=e;e=Object.create(null);e[0]=new RegExp("(Black[bB]erry|BB10).+Version/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="BlackBerry WebKit";e[2]=0;e[3]=0;e[4]=0;p.browser[225]=e;e=Object.create(null);e[0]=new RegExp("(Black[bB]erry)\\s?(\\d+)");e[1]="BlackBerry";e[2]=0;e[3]=0;e[4]=0;p.browser[226]=e;e=Object.create(null);e[0]=new RegExp("(OmniWeb)/v(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[227]=e;e=Object.create(null);e[0]=new RegExp("(Blazer)/(\\d+)\\.(\\d+)");e[1]="Palm Blazer";e[2]=0;e[3]=0;e[4]=0;p.browser[228]=e;e=Object.create(null);e[0]=new RegExp("(Pre)/(\\d+)\\.(\\d+)");e[1]="Palm Pre";e[2]=0;e[3]=0;e[4]=0;p.browser[229]=e;e=Object.create(null);e[0]=new RegExp("(ELinks)/(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[230]=e;e=Object.create(null);e[0]=new RegExp("(ELinks) \\((\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[231]=e;e=Object.create(null);e[0]=new RegExp("(Links) \\((\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[232]=e;e=Object.create(null);e[0]=new RegExp("(QtWeb) Internet Browser/(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[233]=e;e=Object.create(null);e[0]=new RegExp("(PhantomJS)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[234]=e;e=Object.create(null);e[0]=new RegExp("(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Safari");e[1]="WebKit Nightly";e[2]=0;e[3]=0;e[4]=0;p.browser[235]=e;e=Object.create(null);e[0]=new RegExp("(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/");e[1]="Safari";e[2]=0;e[3]=0;e[4]=0;p.browser[236]=e;e=Object.create(null);e[0]=new RegExp("(Safari)/\\d+");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[237]=e;e=Object.create(null);e[0]=new RegExp("(OLPC)/Update(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[238]=e;e=Object.create(null);e[0]=new RegExp("(OLPC)/Update()\\.(\\d+)");e[1]=0;e[2]="0";e[3]=0;e[4]=0;p.browser[239]=e;e=Object.create(null);e[0]=new RegExp("(SEMC\\-Browser)/(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[240]=e;e=Object.create(null);e[0]=new RegExp("(Teleca)");e[1]="Teleca Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[241]=e;e=Object.create(null);e[0]=new RegExp("(Phantom)/V(\\d+)\\.(\\d+)");e[1]="Phantom Browser";e[2]=0;e[3]=0;e[4]=0;p.browser[242]=e;e=Object.create(null);e[0]=new RegExp("(Trident)/(7)\\.(0)");e[1]="IE";e[2]="11";e[3]=0;e[4]=0;p.browser[243]=e;e=Object.create(null);e[0]=new RegExp("(Trident)/(6)\\.(0)");e[1]="IE";e[2]="10";e[3]=0;e[4]=0;p.browser[244]=e;e=Object.create(null);e[0]=new RegExp("(Trident)/(5)\\.(0)");e[1]="IE";e[2]="9";e[3]=0;e[4]=0;p.browser[245]=e;e=Object.create(null);e[0]=new RegExp("(Trident)/(4)\\.(0)");e[1]="IE";e[2]="8";e[3]=0;e[4]=0;p.browser[246]=e;e=Object.create(null);e[0]=new RegExp("(Espial)/(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[247]=e;e=Object.create(null);e[0]=new RegExp("(AppleWebKit)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Apple Mail";e[2]=0;e[3]=0;e[4]=0;p.browser[248]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[249]=e;e=Object.create(null);e[0]=new RegExp("(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[250]=e;e=Object.create(null);e[0]=new RegExp("([MS]?IE) (\\d+)\\.(\\d+)");e[1]="IE";e[2]=0;e[3]=0;e[4]=0;p.browser[251]=e;e=Object.create(null);e[0]=new RegExp("(python-requests)/(\\d+)\\.(\\d+)");e[1]="Python Requests";e[2]=0;e[3]=0;e[4]=0;p.browser[252]=e;e=Object.create(null);e[0]=new RegExp("\\b(Windows-Update-Agent|Microsoft-CryptoAPI|SophosUpdateManager|SophosAgent|Debian APT-HTTP|Ubuntu APT-HTTP|libcurl-agent|libwww-perl|urlgrabber|curl|Wget|OpenBSD ftp|jupdate)(?:[ /](\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[253]=e;e=Object.create(null);e[0]=new RegExp("(Java)[/ ]{0,1}\\d+\\.(\\d+)\\.(\\d+)[_-]*([a-zA-Z0-9]+)*");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[254]=e;e=Object.create(null);e[0]=new RegExp("^(Roku)/DVP-(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[255]=e;e=Object.create(null);e[0]=new RegExp("(Kurio)\\/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Kurio App";e[2]=0;e[3]=0;e[4]=0;p.browser[256]=e;e=Object.create(null);e[0]=new RegExp("^(Box(?: Sync)?)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[257]=e;e=Object.create(null);e[0]=new RegExp("(Wget)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.browser[258]=e;e=Object.create(null);e[0]=new RegExp("(curl)/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="cURL";e[2]=0;e[3]=0;e[4]=0;p.browser[259]=e;p.browser.length=260;p.device=Object.create(null);e=Object.create(null);e[0]=new RegExp("(Rival IQ, rivaliq.com)");e[1]="Spider";e[2]=0;e[3]=0;e[4]=0;p.device[0]=e;e=Object.create(null);e[0]=new RegExp("(?:(?:iPhone|Windows CE|Windows Phone|Android).*(?:(?:Bot|Yeti)-Mobile|YRSpider|BingPreview|bots?/\\d|(?:bot|spider)\\.html)|AdsBot-Google-Mobile.*iPhone)");e[1]="Spider";e[2]=0;e[3]=0;e[4]=0;p.device[1]=e;e=Object.create(null);e[0]=new RegExp("(?:DoCoMo|\\bMOT\\b|\\bLG\\b|Nokia|Samsung|SonyEricsson).*(?:(?:Bot|Yeti)-Mobile|bots?/\\d|(?:bot|crawler)\\.html|(?:jump|google|Wukong)bot|ichiro/mobile|/spider|YahooSeeker)");e[1]="Spider";e[2]=0;e[3]=0;e[4]=0;p.device[2]=e;e=Object.create(null);e[0]=new RegExp("\\bSmartWatch *\\( *([^;]+) *; *([^;]+) *;");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[3]=e;e=Object.create(null);e[0]=new RegExp("Android Application[^\\-]+ - (Sony) ?(Ericsson)? (.+) \\w+ - ");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[4]=e;e=Object.create(null);e[0]=new RegExp("Android Application[^\\-]+ - (?:HTC|HUAWEI|LGE|LENOVO|MEDION|TCT) (HTC|HUAWEI|LG|LENOVO|MEDION|ALCATEL)[ _\\-](.+) \\w+ - ");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[5]=e;e=Object.create(null);e[0]=new RegExp("Android Application[^\\-]+ - ([^ ]+) (.+) \\w+ - ");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[6]=e;e=Object.create(null);e[0]=new RegExp("; *([BLRQ]C\\d{4}[A-Z]+) +Build/");e[1]="3Q $1";e[2]=0;e[3]=0;e[4]=0;p.device[7]=e;e=Object.create(null);e[0]=new RegExp("; *(?:3Q_)([^;/]+) +Build");e[1]="3Q $1";e[2]=0;e[3]=0;e[4]=0;p.device[8]=e;e=Object.create(null);e[0]=new RegExp("Android [34].*; *(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700(?: Lite| 3G)?|A701|B1-A71|A1-\\d{3}|B1-\\d{3}|V360|V370|W500|W500P|W501|W501P|W510|W511|W700|Slider SL101|DA22[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[9]=e;e=Object.create(null);e[0]=new RegExp("; *Acer Iconia Tab ([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[10]=e;e=Object.create(null);e[0]=new RegExp("; *(Z1[1235]0|E320[^/]*|S500|S510|Liquid[^;/]*|Iconia A\\d+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[11]=e;e=Object.create(null);e[0]=new RegExp("; *(Acer |ACER )([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[12]=e;e=Object.create(null);e[0]=new RegExp("; *(Advent )?(Vega(?:Bean|Comb)?).* Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[13]=e;e=Object.create(null);e[0]=new RegExp("; *(Ainol )?((?:NOVO|[Nn]ovo)[^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[14]=e;e=Object.create(null);e[0]=new RegExp("; *AIRIS[ _\\-]?([^/;\\)]+) *(?:;|\\)|Build)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[15]=e;e=Object.create(null);e[0]=new RegExp("; *(OnePAD[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[16]=e;e=Object.create(null);e[0]=new RegExp("; *Airpad[ \\-]([^;/]+) Build");e[1]="Airpad $1";e[2]=0;e[3]=0;e[4]=0;p.device[17]=e;e=Object.create(null);e[0]=new RegExp("; *(one ?touch) (EVO7|T10|T20) Build");e[1]="Alcatel One Touch $2";e[2]=0;e[3]=0;e[4]=0;p.device[18]=e;e=Object.create(null);e[0]=new RegExp("; *(?:alcatel[ _])?(?:(?:one[ _]?touch[ _])|ot[ \\-])([^;/]+);? Build");e[1]="Alcatel One Touch $1";e[2]=0;e[3]=0;e[4]=0;p.device[19]=e;e=Object.create(null);e[0]=new RegExp("; *(TCL)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[20]=e;e=Object.create(null);e[0]=new RegExp("; *(Vodafone Smart II|Optimus_Madrid) Build");e[1]="Alcatel $1";e[2]=0;e[3]=0;e[4]=0;p.device[21]=e;e=Object.create(null);e[0]=new RegExp("; *BASE_Lutea_3 Build");e[1]="Alcatel One Touch 998";e[2]=0;e[3]=0;e[4]=0;p.device[22]=e;e=Object.create(null);e[0]=new RegExp("; *BASE_Varia Build");e[1]="Alcatel One Touch 918D";e[2]=0;e[3]=0;e[4]=0;p.device[23]=e;e=Object.create(null);e[0]=new RegExp("; *((?:FINE|Fine)\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[24]=e;e=Object.create(null);e[0]=new RegExp("; *(ALLVIEW[ _]?|Allview[ _]?)((?:Speed|SPEED).*) Build/");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[25]=e;e=Object.create(null);e[0]=new RegExp("; *(ALLVIEW[ _]?|Allview[ _]?)?(AX1_Shine|AX2_Frenzy) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[26]=e;e=Object.create(null);e[0]=new RegExp("; *(ALLVIEW[ _]?|Allview[ _]?)([^;/]*) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[27]=e;e=Object.create(null);e[0]=new RegExp("; *(A13-MID) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[28]=e;e=Object.create(null);e[0]=new RegExp("; *(Allwinner)[ _\\-]?([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[29]=e;e=Object.create(null);e[0]=new RegExp("; *(A651|A701B?|A702|A703|A705|A706|A707|A711|A712|A713|A717|A722|A785|A801|A802|A803|A901|A902|A1002|A1003|A1006|A1007|A9701|A9703|Q710|Q80) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[30]=e;e=Object.create(null);e[0]=new RegExp("; *(?:AMOI|Amoi)[ _]([^;/]+) Build");e[1]="Amoi $1";e[2]=0;e[3]=0;e[4]=0;p.device[31]=e;e=Object.create(null);e[0]=new RegExp("^(?:AMOI|Amoi)[ _]([^;/]+) Linux");e[1]="Amoi $1";e[2]=0;e[3]=0;e[4]=0;p.device[32]=e;e=Object.create(null);e[0]=new RegExp("; *(MW(?:0[789]|10)[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[33]=e;e=Object.create(null);e[0]=new RegExp("; *(G7|M1013|M1015G|M11[CG]?|M-?12[B]?|M15|M19[G]?|M30[ACQ]?|M31[GQ]|M32|M33[GQ]|M36|M37|M38|M701T|M710|M712B|M713|M715G|M716G|M71(?:G|GS|T)?|M72[T]?|M73[T]?|M75[GT]?|M77G|M79T|M7L|M7LN|M81|M810|M81T|M82|M92|M92KS|M92S|M717G|M721|M722G|M723|M725G|M739|M785|M791|M92SK|M93D) Build");e[1]="Aoson $1";e[2]=0;e[3]=0;e[4]=0;p.device[34]=e;e=Object.create(null);e[0]=new RegExp("; *Aoson ([^;/]+) Build");e[1]="Aoson $1";e[2]=0;e[3]=0;e[4]=0;p.device[35]=e;e=Object.create(null);e[0]=new RegExp("; *[Aa]panda[ _\\-]([^;/]+) Build");e[1]="Apanda $1";e[2]=0;e[3]=0;e[4]=0;p.device[36]=e;e=Object.create(null);e[0]=new RegExp("; *(?:ARCHOS|Archos) ?(GAMEPAD.*?)(?: Build|[;/\\(\\)\\-])");e[1]="Archos $1";e[2]=0;e[3]=0;e[4]=0;p.device[37]=e;e=Object.create(null);e[0]=new RegExp("ARCHOS; GOGI; ([^;]+);");e[1]="Archos $1";e[2]=0;e[3]=0;e[4]=0;p.device[38]=e;e=Object.create(null);e[0]=new RegExp("(?:ARCHOS|Archos)[ _]?(.*?)(?: Build|[;/\\(\\)\\-]|$)");e[1]="Archos $1";e[2]=0;e[3]=0;e[4]=0;p.device[39]=e;e=Object.create(null);e[0]=new RegExp("; *(AN(?:7|8|9|10|13)[A-Z0-9]{1,4}) Build");e[1]="Archos $1";e[2]=0;e[3]=0;e[4]=0;p.device[40]=e;e=Object.create(null);e[0]=new RegExp("; *(A28|A32|A43|A70(?:BHT|CHT|HB|S|X)|A101(?:B|C|IT)|A7EB|A7EB-WK|101G9|80G9) Build");e[1]="Archos $1";e[2]=0;e[3]=0;e[4]=0;p.device[41]=e;e=Object.create(null);e[0]=new RegExp("; *(PAD-FMD[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[42]=e;e=Object.create(null);e[0]=new RegExp("; *(BioniQ) ?([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[43]=e;e=Object.create(null);e[0]=new RegExp("; *(AN\\d[^;/]+|ARCHM\\d+) Build");e[1]="Arnova $1";e[2]=0;e[3]=0;e[4]=0;p.device[44]=e;e=Object.create(null);e[0]=new RegExp("; *(?:ARNOVA|Arnova) ?([^;/]+) Build");e[1]="Arnova $1";e[2]=0;e[3]=0;e[4]=0;p.device[45]=e;e=Object.create(null);e[0]=new RegExp("; *(?:ASSISTANT )?(AP)-?([1789]\\d{2}[A-Z]{0,2}|80104) Build");e[1]="Assistant $1-$2";e[2]=0;e[3]=0;e[4]=0;p.device[46]=e;e=Object.create(null);e[0]=new RegExp("; *(ME17\\d[^;/]*|ME3\\d{2}[^;/]+|K00[A-Z]|Nexus 10|Nexus 7(?: 2013)?|PadFone[^;/]*|Transformer[^;/]*|TF\\d{3}[^;/]*|eeepc) Build");e[1]="Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[47]=e;e=Object.create(null);e[0]=new RegExp("; *ASUS[ _]*([^;/]+) Build");e[1]="Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[48]=e;e=Object.create(null);e[0]=new RegExp("; *Garmin-Asus ([^;/]+) Build");e[1]="Garmin-Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[49]=e;e=Object.create(null);e[0]=new RegExp("; *(Garminfone) Build");e[1]="Garmin $1";e[2]=0;e[3]=0;e[4]=0;p.device[50]=e;e=Object.create(null);e[0]=new RegExp("; (@TAB-[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[51]=e;e=Object.create(null);e[0]=new RegExp("; *(T-(?:07|[^0]\\d)[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[52]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Axioo[ _\\-]([^;/]+)|(picopad)[ _\\-]([^;/]+)) Build");e[1]="Axioo $1$2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[53]=e;e=Object.create(null);e[0]=new RegExp("; *(V(?:100|700|800)[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[54]=e;e=Object.create(null);e[0]=new RegExp("; *(IBAK\\-[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[55]=e;e=Object.create(null);e[0]=new RegExp("; *(HY5001|HY6501|X12|X21|I5) Build");e[1]="Bedove $1";e[2]=0;e[3]=0;e[4]=0;p.device[56]=e;e=Object.create(null);e[0]=new RegExp("; *(JC-[^;/]*) Build");e[1]="Benss $1";e[2]=0;e[3]=0;e[4]=0;p.device[57]=e;e=Object.create(null);e[0]=new RegExp("; *(BB) ([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[58]=e;e=Object.create(null);e[0]=new RegExp("; *(BlackBird)[ _](I8.*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[59]=e;e=Object.create(null);e[0]=new RegExp("; *(BlackBird)[ _](.*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[60]=e;e=Object.create(null);e[0]=new RegExp("; *([0-9]+BP[EM][^;/]*|Endeavour[^;/]+) Build");e[1]="Blaupunkt $1";e[2]=0;e[3]=0;e[4]=0;p.device[61]=e;e=Object.create(null);e[0]=new RegExp("; *((?:BLU|Blu)[ _\\-])([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[62]=e;e=Object.create(null);e[0]=new RegExp("; *(?:BMOBILE )?(Blu|BLU|DASH [^;/]+|VIVO 4\\.3|TANK 4\\.5) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[63]=e;e=Object.create(null);e[0]=new RegExp("; *(TOUCH\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[64]=e;e=Object.create(null);e[0]=new RegExp("; *(AX5\\d+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[65]=e;e=Object.create(null);e[0]=new RegExp("; *([Bb]q) ([^;/]+);? Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[66]=e;e=Object.create(null);e[0]=new RegExp("; *(Maxwell [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[67]=e;e=Object.create(null);e[0]=new RegExp("; *((?:B-Tab|B-TAB) ?\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[68]=e;e=Object.create(null);e[0]=new RegExp("; *(Broncho) ([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[69]=e;e=Object.create(null);e[0]=new RegExp("; *CAPTIVA ([^;/]+) Build");e[1]="Captiva $1";e[2]=0;e[3]=0;e[4]=0;p.device[70]=e;e=Object.create(null);e[0]=new RegExp("; *(C771|CAL21|IS11CA) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[71]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Cat|CAT) ([^;/]+) Build");e[1]="Cat $1";e[2]=0;e[3]=0;e[4]=0;p.device[72]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Cat)(Nova.*) Build");e[1]="Cat $1";e[2]=0;e[3]=0;e[4]=0;p.device[73]=e;e=Object.create(null);e[0]=new RegExp("; *(INM8002KP|ADM8000KP_[AB]) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[74]=e;e=Object.create(null);e[0]=new RegExp("; *(?:[Cc]elkon[ _\\*]|CELKON[ _\\*])([^;/\\)]+) ?(?:Build|;|\\))");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[75]=e;e=Object.create(null);e[0]=new RegExp("Build/(?:[Cc]elkon)+_?([^;/_\\)]+)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[76]=e;e=Object.create(null);e[0]=new RegExp("; *(CT)-?(\\d+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[77]=e;e=Object.create(null);e[0]=new RegExp("; *(A19|A19Q|A105|A107[^;/\\)]*) ?(?:Build|;|\\))");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[78]=e;e=Object.create(null);e[0]=new RegExp("; *(TPC[0-9]{4,5}) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[79]=e;e=Object.create(null);e[0]=new RegExp("; *(Cloudfone)[ _](Excite)([^ ][^;/]+) Build");e[1]="$1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[80]=e;e=Object.create(null);e[0]=new RegExp("; *(Excite|ICE)[ _](\\d+[^;/]+) Build");e[1]="Cloudfone $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[81]=e;e=Object.create(null);e[0]=new RegExp("; *(Cloudfone|CloudPad)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[82]=e;e=Object.create(null);e[0]=new RegExp("; *((?:Aquila|Clanga|Rapax)[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[83]=e;e=Object.create(null);e[0]=new RegExp("; *(?:CFW-|Kyros )?(MID[0-9]{4}(?:[ABC]|SR|TV)?)(\\(3G\\)-4G| GB 8K| 3G| 8K| GB)? *(?:Build|[;\\)])");e[1]="CobyKyros $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[84]=e;e=Object.create(null);e[0]=new RegExp("; *([^;/]*)Coolpad[ _]([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[85]=e;e=Object.create(null);e[0]=new RegExp("; *(CUBE[ _])?([KU][0-9]+ ?GT.*|A5300) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[86]=e;e=Object.create(null);e[0]=new RegExp("; *CUBOT ([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[87]=e;e=Object.create(null);e[0]=new RegExp("; *(BOBBY) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[88]=e;e=Object.create(null);e[0]=new RegExp("; *(Dslide [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[89]=e;e=Object.create(null);e[0]=new RegExp("; *(XCD)[ _]?(28|35) Build");e[1]="Dell $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[90]=e;e=Object.create(null);e[0]=new RegExp("; *(001DL) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[91]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Dell|DELL) (Streak) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[92]=e;e=Object.create(null);e[0]=new RegExp("; *(101DL|GS01|Streak Pro[^;/]*) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[93]=e;e=Object.create(null);e[0]=new RegExp("; *([Ss]treak ?7) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[94]=e;e=Object.create(null);e[0]=new RegExp("; *(Mini-3iX) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[95]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Dell|DELL)[ _](Aero|Venue|Thunder|Mini.*|Streak[ _]Pro) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[96]=e;e=Object.create(null);e[0]=new RegExp("; *Dell[ _]([^;/]+) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[97]=e;e=Object.create(null);e[0]=new RegExp("; *Dell ([^;/]+) Build");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[98]=e;e=Object.create(null);e[0]=new RegExp("; *(TA[CD]-\\d+[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[99]=e;e=Object.create(null);e[0]=new RegExp("; *(iP[789]\\d{2}(?:-3G)?|IP10\\d{2}(?:-8GB)?) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[100]=e;e=Object.create(null);e[0]=new RegExp("; *(AirTab)[ _\\-]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[101]=e;e=Object.create(null);e[0]=new RegExp("; *(F\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[102]=e;e=Object.create(null);e[0]=new RegExp("; *(HT-03A) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[103]=e;e=Object.create(null);e[0]=new RegExp("; *(HT\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[104]=e;e=Object.create(null);e[0]=new RegExp("; *(L\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[105]=e;e=Object.create(null);e[0]=new RegExp("; *(N\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[106]=e;e=Object.create(null);e[0]=new RegExp("; *(P\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[107]=e;e=Object.create(null);e[0]=new RegExp("; *(SC\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[108]=e;e=Object.create(null);e[0]=new RegExp("; *(SH\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[109]=e;e=Object.create(null);e[0]=new RegExp("; *(SO\\-\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[110]=e;e=Object.create(null);e[0]=new RegExp("; *(T\\-0[12][^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[111]=e;e=Object.create(null);e[0]=new RegExp("; *(DOOV)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[112]=e;e=Object.create(null);e[0]=new RegExp("; *(Enot|ENOT)[ -]?([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[113]=e;e=Object.create(null);e[0]=new RegExp("; *[^;/]+ Build/(?:CROSS|Cross)+[ _\\-]([^\\)]+)");e[1]="CROSS $1";e[2]=0;e[3]=0;e[4]=0;p.device[114]=e;e=Object.create(null);e[0]=new RegExp("; *(CROSS|Cross)[ _\\-]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[115]=e;e=Object.create(null);e[0]=new RegExp("; *Explay[_ ](.+?)(?:[\\)]| Build)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[116]=e;e=Object.create(null);e[0]=new RegExp("; *(IQ.*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[117]=e;e=Object.create(null);e[0]=new RegExp("; *(Fly|FLY)[ _](IQ[^;]+|F[34]\\d+[^;]*);? Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[118]=e;e=Object.create(null);e[0]=new RegExp("; *(M532|Q572|FJL21) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[119]=e;e=Object.create(null);e[0]=new RegExp("; *(G1) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[120]=e;e=Object.create(null);e[0]=new RegExp("; *(Geeksphone) ([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[121]=e;e=Object.create(null);e[0]=new RegExp("; *(G[^F]?FIVE) ([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[122]=e;e=Object.create(null);e[0]=new RegExp("; *(Gionee)[ _\\-]([^;/]+)(?:/[^;/]+)? Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[123]=e;e=Object.create(null);e[0]=new RegExp("; *(GN\\d+[A-Z]?|INFINITY_PASSION|Ctrl_V1) Build");e[1]="Gionee $1";e[2]=0;e[3]=0;e[4]=0;p.device[124]=e;e=Object.create(null);e[0]=new RegExp("; *(E3) Build/JOP40D");e[1]="Gionee $1";e[2]=0;e[3]=0;e[4]=0;p.device[125]=e;e=Object.create(null);e[0]=new RegExp("\\sGIONEE[-\\s_](\\w*)");e[1]="Gionee $1";e[2]=0;e[3]=0;e[4]=0;p.device[126]=e;e=Object.create(null);e[0]=new RegExp("; *((?:FONE|QUANTUM|INSIGNIA) \\d+[^;/]*|PLAYTAB) Build");e[1]="GoClever $1";e[2]=0;e[3]=0;e[4]=0;p.device[127]=e;e=Object.create(null);e[0]=new RegExp("; *GOCLEVER ([^;/]+) Build");e[1]="GoClever $1";e[2]=0;e[3]=0;e[4]=0;p.device[128]=e;e=Object.create(null);e[0]=new RegExp("; *(Glass \\d+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[129]=e;e=Object.create(null);e[0]=new RegExp("; *(Pixel \\w+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[130]=e;e=Object.create(null);e[0]=new RegExp("; *(GSmart)[ -]([^/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[131]=e;e=Object.create(null);e[0]=new RegExp("; *(imx5[13]_[^/]+) Build");e[1]="Freescale $1";e[2]=0;e[3]=0;e[4]=0;p.device[132]=e;e=Object.create(null);e[0]=new RegExp("; *Haier[ _\\-]([^/]+) Build");e[1]="Haier $1";e[2]=0;e[3]=0;e[4]=0;p.device[133]=e;e=Object.create(null);e[0]=new RegExp("; *(PAD1016) Build");e[1]="Haipad $1";e[2]=0;e[3]=0;e[4]=0;p.device[134]=e;e=Object.create(null);e[0]=new RegExp("; *(M701|M7|M8|M9) Build");e[1]="Haipad $1";e[2]=0;e[3]=0;e[4]=0;p.device[135]=e;e=Object.create(null);e[0]=new RegExp("; *(SN\\d+T[^;\\)/]*)(?: Build|[;\\)])");e[1]="Hannspree $1";e[2]=0;e[3]=0;e[4]=0;p.device[136]=e;e=Object.create(null);e[0]=new RegExp("Build/HCL ME Tablet ([^;\\)]+)[\\);]");e[1]="HCLme $1";e[2]=0;e[3]=0;e[4]=0;p.device[137]=e;e=Object.create(null);e[0]=new RegExp("; *([^;\\/]+) Build/HCL");e[1]="HCLme $1";e[2]=0;e[3]=0;e[4]=0;p.device[138]=e;e=Object.create(null);e[0]=new RegExp("; *(MID-?\\d{4}C[EM]) Build");e[1]="Hena $1";e[2]=0;e[3]=0;e[4]=0;p.device[139]=e;e=Object.create(null);e[0]=new RegExp("; *(EG\\d{2,}|HS-[^;/]+|MIRA[^;/]+) Build");e[1]="Hisense $1";e[2]=0;e[3]=0;e[4]=0;p.device[140]=e;e=Object.create(null);e[0]=new RegExp("; *(andromax[^;/]+) Build");e[1]="Hisense $1";e[2]=0;e[3]=0;e[4]=0;p.device[141]=e;e=Object.create(null);e[0]=new RegExp("; *(?:AMAZE[ _](S\\d+)|(S\\d+)[ _]AMAZE) Build");e[1]="AMAZE $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[142]=e;e=Object.create(null);e[0]=new RegExp("; *(PlayBook) Build");e[1]="HP $1";e[2]=0;e[3]=0;e[4]=0;p.device[143]=e;e=Object.create(null);e[0]=new RegExp("; *HP ([^/]+) Build");e[1]="HP $1";e[2]=0;e[3]=0;e[4]=0;p.device[144]=e;e=Object.create(null);e[0]=new RegExp("; *([^/]+_tenderloin) Build");e[1]="HP TouchPad";e[2]=0;e[3]=0;e[4]=0;p.device[145]=e;e=Object.create(null);e[0]=new RegExp("; *(HUAWEI |Huawei-)?([UY][^;/]+) Build/(?:Huawei|HUAWEI)([UY][^\\);]+)\\)");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[146]=e;e=Object.create(null);e[0]=new RegExp("; *([^;/]+) Build[/ ]Huawei(MT1-U06|[A-Z]+\\d+[^\\);]+)[^\\);]*\\)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[147]=e;e=Object.create(null);e[0]=new RegExp("; *(S7|M860) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[148]=e;e=Object.create(null);e[0]=new RegExp("; *((?:HUAWEI|Huawei)[ \\-]?)(MediaPad) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[149]=e;e=Object.create(null);e[0]=new RegExp("; *((?:HUAWEI[ _]?|Huawei[ _])?Ascend[ _])([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[150]=e;e=Object.create(null);e[0]=new RegExp("; *((?:HUAWEI|Huawei)[ _\\-]?)((?:G700-|MT-)[^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[151]=e;e=Object.create(null);e[0]=new RegExp("; *((?:HUAWEI|Huawei)[ _\\-]?)([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[152]=e;e=Object.create(null);e[0]=new RegExp("; *(MediaPad[^;]+|SpringBoard) Build/Huawei");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[153]=e;e=Object.create(null);e[0]=new RegExp("; *([^;]+) Build/(?:Huawei|HUAWEI)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[154]=e;e=Object.create(null);e[0]=new RegExp("; *([Uu])([89]\\d{3}) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[155]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Ideos |IDEOS )(S7) Build");e[1]="Huawei Ideos$1";e[2]=0;e[3]=0;e[4]=0;p.device[156]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Ideos |IDEOS )([^;/]+\\s*|\\s*)Build");e[1]="Huawei Ideos$1";e[2]=0;e[3]=0;e[4]=0;p.device[157]=e;e=Object.create(null);e[0]=new RegExp("; *(Orange Daytona|Pulse|Pulse Mini|Vodafone 858|C8500|C8600|C8650|C8660|Nexus 6P|ATH-.+?) Build[/ ]");e[1]="Huawei $1";e[2]=0;e[3]=0;e[4]=0;p.device[158]=e;e=Object.create(null);e[0]=new RegExp("; *HTC[ _]([^;]+); Windows Phone");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[159]=e;e=Object.create(null);e[0]=new RegExp("; *(?:HTC[ _/])+([^ _/]+)(?:[/\\\\]1\\.0 | V|/| +)\\d+\\.\\d[\\d\\.]*(?: *Build|\\))");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[160]=e;e=Object.create(null);e[0]=new RegExp("; *(?:HTC[ _/])+([^ _/]+)(?:[ _/]([^ _/]+))?(?:[/\\\\]1\\.0 | V|/| +)\\d+\\.\\d[\\d\\.]*(?: *Build|\\))");e[1]="HTC $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[161]=e;e=Object.create(null);e[0]=new RegExp("; *(?:HTC[ _/])+([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ _/]+))?)?(?:[/\\\\]1\\.0 | V|/| +)\\d+\\.\\d[\\d\\.]*(?: *Build|\\))");e[1]="HTC $1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[162]=e;e=Object.create(null);e[0]=new RegExp("; *(?:HTC[ _/])+([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ _/]+))?)?)?(?:[/\\\\]1\\.0 | V|/| +)\\d+\\.\\d[\\d\\.]*(?: *Build|\\))");e[1]="HTC $1 $2 $3 $4";e[2]=0;e[3]=0;e[4]=0;p.device[163]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(?:HTC|htc)(?:_blocked)*[ _/])+([^ _/;]+)(?: *Build|[;\\)]| - )");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[164]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(?:HTC|htc)(?:_blocked)*[ _/])+([^ _/]+)(?:[ _/]([^ _/;\\)]+))?(?: *Build|[;\\)]| - )");e[1]="HTC $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[165]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(?:HTC|htc)(?:_blocked)*[ _/])+([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ _/;\\)]+))?)?(?: *Build|[;\\)]| - )");e[1]="HTC $1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[166]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(?:HTC|htc)(?:_blocked)*[ _/])+([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ _/]+)(?:[ _/]([^ /;]+))?)?)?(?: *Build|[;\\)]| - )");e[1]="HTC $1 $2 $3 $4";e[2]=0;e[3]=0;e[4]=0;p.device[167]=e;e=Object.create(null);e[0]=new RegExp("HTC Streaming Player [^\\/]*/[^\\/]*/ htc_([^/]+) /");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[168]=e;e=Object.create(null);e[0]=new RegExp("(?:[;,] *|^)(?:htccn_chs-)?HTC[ _-]?([^;]+?)(?: *Build|clay|Android|-?Mozilla| Opera| Profile| UNTRUSTED|[;/\\(\\)]|$)");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[169]=e;e=Object.create(null);e[0]=new RegExp("; *(A6277|ADR6200|ADR6300|ADR6350|ADR6400[A-Z]*|ADR6425[A-Z]*|APX515CKT|ARIA|Desire[^_ ]*|Dream|EndeavorU|Eris|Evo|Flyer|HD2|Hero|HERO200|Hero CDMA|HTL21|Incredible|Inspire[A-Z0-9]*|Legend|Liberty|Nexus ?(?:One|HD2)|One|One S C2|One[ _]?(?:S|V|X\\+?)\\w*|PC36100|PG06100|PG86100|S31HT|Sensation|Wildfire)(?: Build|[/;\\(\\)])");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[170]=e;e=Object.create(null);e[0]=new RegExp("; *(ADR6200|ADR6400L|ADR6425LVW|Amaze|DesireS?|EndeavorU|Eris|EVO|Evo\\d[A-Z]+|HD2|IncredibleS?|Inspire[A-Z0-9]*|Inspire[A-Z0-9]*|Sensation[A-Z0-9]*|Wildfire)[ _-](.+?)(?:[/;\\)]|Build|MIUI|1\\.0)");e[1]="HTC $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[171]=e;e=Object.create(null);e[0]=new RegExp("; *HYUNDAI (T\\d[^/]*) Build");e[1]="Hyundai $1";e[2]=0;e[3]=0;e[4]=0;p.device[172]=e;e=Object.create(null);e[0]=new RegExp("; *HYUNDAI ([^;/]+) Build");e[1]="Hyundai $1";e[2]=0;e[3]=0;e[4]=0;p.device[173]=e;e=Object.create(null);e[0]=new RegExp("; *(X700|Hold X|MB-6900) Build");e[1]="Hyundai $1";e[2]=0;e[3]=0;e[4]=0;p.device[174]=e;e=Object.create(null);e[0]=new RegExp("; *(?:iBall[ _\\-])?(Andi)[ _]?(\\d[^;/]*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[175]=e;e=Object.create(null);e[0]=new RegExp("; *(IBall)(?:[ _]([^;/]+)|) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[176]=e;e=Object.create(null);e[0]=new RegExp("; *(NT-\\d+[^ ;/]*|Net[Tt]AB [^;/]+|Mercury [A-Z]+|iconBIT)(?: S/N:[^;/]+)? Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[177]=e;e=Object.create(null);e[0]=new RegExp("; *(IMO)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[178]=e;e=Object.create(null);e[0]=new RegExp("; *i-?mobile[ _]([^/]+) Build/");e[1]="i-mobile $1";e[2]=0;e[3]=0;e[4]=0;p.device[179]=e;e=Object.create(null);e[0]=new RegExp("; *(i-(?:style|note)[^/]*) Build/");e[1]="i-mobile $1";e[2]=0;e[3]=0;e[4]=0;p.device[180]=e;e=Object.create(null);e[0]=new RegExp("; *(ImPAD) ?(\\d+(?:.)*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[181]=e;e=Object.create(null);e[0]=new RegExp("; *(Infinix)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[182]=e;e=Object.create(null);e[0]=new RegExp("; *(Informer)[ \\-]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[183]=e;e=Object.create(null);e[0]=new RegExp("; *(TAB) ?([78][12]4) Build");e[1]="Intenso $1";e[2]=0;e[3]=0;e[4]=0;p.device[184]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Intex[ _])?(AQUA|Aqua)([ _\\.\\-])([^;/]+) *(?:Build|;)");e[1]="$1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[185]=e;e=Object.create(null);e[0]=new RegExp("; *(?:INTEX|Intex)(?:[_ ]([^\\ _;/]+))(?:[_ ]([^\\ _;/]+))? *(?:Build|;)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[186]=e;e=Object.create(null);e[0]=new RegExp("; *([iI]Buddy)[ _]?(Connect)(?:_|\\?_| )?([^;/]*) *(?:Build|;)");e[1]="$1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[187]=e;e=Object.create(null);e[0]=new RegExp("; *(I-Buddy)[ _]([^;/]+) *(?:Build|;)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[188]=e;e=Object.create(null);e[0]=new RegExp("; *(iOCEAN) ([^/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[189]=e;e=Object.create(null);e[0]=new RegExp("; *(TP\\d+(?:\\.\\d+)?\\-\\d[^;/]+) Build");e[1]="ionik $1";e[2]=0;e[3]=0;e[4]=0;p.device[190]=e;e=Object.create(null);e[0]=new RegExp("; *(M702pro) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[191]=e;e=Object.create(null);e[0]=new RegExp("; *(DE88Plus|MD70) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[192]=e;e=Object.create(null);e[0]=new RegExp("; *IVIO[_\\-]([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[193]=e;e=Object.create(null);e[0]=new RegExp("; *(TPC-\\d+|JAY-TECH) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[194]=e;e=Object.create(null);e[0]=new RegExp("; *(JY-[^;/]+|G[234]S?) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[195]=e;e=Object.create(null);e[0]=new RegExp("; *(JXD)[ _\\-]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[196]=e;e=Object.create(null);e[0]=new RegExp("; *Karbonn[ _]?([^;/]+) *(?:Build|;)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[197]=e;e=Object.create(null);e[0]=new RegExp("; *([^;]+) Build/Karbonn");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[198]=e;e=Object.create(null);e[0]=new RegExp("; *(A11|A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2|Titanium S\\d) +Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[199]=e;e=Object.create(null);e[0]=new RegExp("; *(IS01|IS03|IS05|IS\\d{2}SH) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[200]=e;e=Object.create(null);e[0]=new RegExp("; *(IS04) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[201]=e;e=Object.create(null);e[0]=new RegExp("; *(IS06|IS\\d{2}PT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[202]=e;e=Object.create(null);e[0]=new RegExp("; *(IS11S) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[203]=e;e=Object.create(null);e[0]=new RegExp("; *(IS11CA) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[204]=e;e=Object.create(null);e[0]=new RegExp("; *(IS11LG) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[205]=e;e=Object.create(null);e[0]=new RegExp("; *(IS11N) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[206]=e;e=Object.create(null);e[0]=new RegExp("; *(IS11PT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[207]=e;e=Object.create(null);e[0]=new RegExp("; *(IS12F) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[208]=e;e=Object.create(null);e[0]=new RegExp("; *(IS12M) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[209]=e;e=Object.create(null);e[0]=new RegExp("; *(IS12S) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[210]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW11F) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[211]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW11HT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[212]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW11K) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[213]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW11M) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[214]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW11SC) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[215]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW12HT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[216]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW13HT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[217]=e;e=Object.create(null);e[0]=new RegExp("; *(ISW?[0-9]{2}[A-Z]{0,2}) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[218]=e;e=Object.create(null);e[0]=new RegExp("; *(INFOBAR [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[219]=e;e=Object.create(null);e[0]=new RegExp("; *(JOYPAD|Joypad)[ _]([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[220]=e;e=Object.create(null);e[0]=new RegExp("; *(Vox|VOX|Arc|K080) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[221]=e;e=Object.create(null);e[0]=new RegExp("\\b(Kobo Touch)\\b");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[222]=e;e=Object.create(null);e[0]=new RegExp("; *(K-Touch)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[223]=e;e=Object.create(null);e[0]=new RegExp("; *((?:EV|KM)-S\\d+[A-Z]?) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[224]=e;e=Object.create(null);e[0]=new RegExp("; *(Zio|Hydro|Torque|Event|EVENT|Echo|Milano|Rise|URBANO PROGRESSO|WX04K|WX06K|WX10K|KYL21|101K|C5[12]\\d{2}) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[225]=e;e=Object.create(null);e[0]=new RegExp("; *(?:LAVA[ _])?IRIS[ _\\-]?([^/;\\)]+) *(?:;|\\)|Build)");e[1]="Iris $1";e[2]=0;e[3]=0;e[4]=0;p.device[226]=e;e=Object.create(null);e[0]=new RegExp("; *LAVA[ _]([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[227]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(Aspire A1)|(?:LEMON|Lemon)[ _]([^;/]+))_? Build");e[1]="Lemon $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[228]=e;e=Object.create(null);e[0]=new RegExp("; *(TAB-1012) Build/");e[1]="Lenco $1";e[2]=0;e[3]=0;e[4]=0;p.device[229]=e;e=Object.create(null);e[0]=new RegExp("; Lenco ([^;/]+) Build/");e[1]="Lenco $1";e[2]=0;e[3]=0;e[4]=0;p.device[230]=e;e=Object.create(null);e[0]=new RegExp("; *(A1_07|A2107A-H|S2005A-H|S1-37AH0) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[231]=e;e=Object.create(null);e[0]=new RegExp("; *(Idea[Tp]ab)[ _]([^;/]+);? Build");e[1]="Lenovo $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[232]=e;e=Object.create(null);e[0]=new RegExp("; *(Idea(?:Tab|pad)) ?([^;/]+) Build");e[1]="Lenovo $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[233]=e;e=Object.create(null);e[0]=new RegExp("; *(ThinkPad) ?(Tablet) Build/");e[1]="Lenovo $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[234]=e;e=Object.create(null);e[0]=new RegExp("; *(?:LNV-)?(?:=?[Ll]enovo[ _\\-]?|LENOVO[ _])+(.+?)(?:Build|[;/\\)])");e[1]="Lenovo $1";e[2]=0;e[3]=0;e[4]=0;p.device[235]=e;e=Object.create(null);e[0]=new RegExp("[;,] (?:Vodafone )?(SmartTab) ?(II) ?(\\d+) Build/");e[1]="Lenovo $1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[236]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Ideapad )?K1 Build/");e[1]="Lenovo Ideapad K1";e[2]=0;e[3]=0;e[4]=0;p.device[237]=e;e=Object.create(null);e[0]=new RegExp("; *(3GC101|3GW10[01]|A390) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[238]=e;e=Object.create(null);e[0]=new RegExp("\\b(?:Lenovo|LENOVO)+[ _\\-]?([^,;:/ ]+)");e[1]="Lenovo $1";e[2]=0;e[3]=0;e[4]=0;p.device[239]=e;e=Object.create(null);e[0]=new RegExp("; *(MFC\\d+)[A-Z]{2}([^;,/]*),? Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[240]=e;e=Object.create(null);e[0]=new RegExp("; *(E[34][0-9]{2}|LS[6-8][0-9]{2}|VS[6-9][0-9]+[^;/]+|Nexus 4|Nexus 5X?|GT540f?|Optimus (?:2X|G|4X HD)|OptimusX4HD) *(?:Build|;)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[241]=e;e=Object.create(null);e[0]=new RegExp("[;:] *(L-\\d+[A-Z]|LGL\\d+[A-Z]?)(?:/V\\d+)? *(?:Build|[;\\)])");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[242]=e;e=Object.create(null);e[0]=new RegExp("; *(LG-)([A-Z]{1,2}\\d{2,}[^,;/\\)\\(]*?)(?:Build| V\\d+|[,;/\\)\\(]|$)");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[243]=e;e=Object.create(null);e[0]=new RegExp("; *(LG[ \\-]|LG)([^;/]+)[;/]? Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[244]=e;e=Object.create(null);e[0]=new RegExp("^(LG)-([^;/]+)/ Mozilla/.*; Android");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[245]=e;e=Object.create(null);e[0]=new RegExp("(Web0S); Linux/(SmartTV)");e[1]="LG $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[246]=e;e=Object.create(null);e[0]=new RegExp("; *((?:SMB|smb)[^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[247]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Malata|MALATA) ([^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[248]=e;e=Object.create(null);e[0]=new RegExp("; *(MS[45][0-9]{3}|MID0[568][NS]?|MID[1-9]|MID[78]0[1-9]|MID970[1-9]|MID100[1-9]) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[249]=e;e=Object.create(null);e[0]=new RegExp("; *(M1052|M806|M9000|M9100|M9701|MID100|MID120|MID125|MID130|MID135|MID140|MID701|MID710|MID713|MID727|MID728|MID731|MID732|MID733|MID735|MID736|MID737|MID760|MID800|MID810|MID820|MID830|MID833|MID835|MID860|MID900|MID930|MID933|MID960|MID980) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[250]=e;e=Object.create(null);e[0]=new RegExp("; *(GenxDroid7|MSD7.*|AX\\d.*|Tab 701|Tab 722) Build/");e[1]="Maxx $1";e[2]=0;e[3]=0;e[4]=0;p.device[251]=e;e=Object.create(null);e[0]=new RegExp("; *(M-PP[^;/]+|PhonePad ?\\d{2,}[^;/]+) Build");e[1]="Mediacom $1";e[2]=0;e[3]=0;e[4]=0;p.device[252]=e;e=Object.create(null);e[0]=new RegExp("; *(M-MP[^;/]+|SmartPad ?\\d{2,}[^;/]+) Build");e[1]="Mediacom $1";e[2]=0;e[3]=0;e[4]=0;p.device[253]=e;e=Object.create(null);e[0]=new RegExp("; *(?:MD_)?LIFETAB[ _]([^;/]+) Build");e[1]="Medion Lifetab $1";e[2]=0;e[3]=0;e[4]=0;p.device[254]=e;e=Object.create(null);e[0]=new RegExp("; *MEDION ([^;/]+) Build");e[1]="Medion $1";e[2]=0;e[3]=0;e[4]=0;p.device[255]=e;e=Object.create(null);e[0]=new RegExp("; *(M030|M031|M035|M040|M065|m9) Build");e[1]="Meizu $1";e[2]=0;e[3]=0;e[4]=0;p.device[256]=e;e=Object.create(null);e[0]=new RegExp("; *(?:meizu_|MEIZU )(.+?) *(?:Build|[;\\)])");e[1]="Meizu $1";e[2]=0;e[3]=0;e[4]=0;p.device[257]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Micromax[ _](A111|A240)|(A111|A240)) Build");e[1]="Micromax $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[258]=e;e=Object.create(null);e[0]=new RegExp("; *Micromax[ _](A\\d{2,3}[^;/]*) Build");e[1]="Micromax $1";e[2]=0;e[3]=0;e[4]=0;p.device[259]=e;e=Object.create(null);e[0]=new RegExp("; *(A\\d{2}|A[12]\\d{2}|A90S|A110Q) Build");e[1]="Micromax $1";e[2]=0;e[3]=0;e[4]=0;p.device[260]=e;e=Object.create(null);e[0]=new RegExp("; *Micromax[ _](P\\d{3}[^;/]*) Build");e[1]="Micromax $1";e[2]=0;e[3]=0;e[4]=0;p.device[261]=e;e=Object.create(null);e[0]=new RegExp("; *(P\\d{3}|P\\d{3}\\(Funbook\\)) Build");e[1]="Micromax $1";e[2]=0;e[3]=0;e[4]=0;p.device[262]=e;e=Object.create(null);e[0]=new RegExp("; *(MITO)[ _\\-]?([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[263]=e;e=Object.create(null);e[0]=new RegExp("; *(Cynus)[ _](F5|T\\d|.+?) *(?:Build|[;/\\)])");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[264]=e;e=Object.create(null);e[0]=new RegExp("; *(MODECOM )?(FreeTab) ?([^;/]+) Build");e[1]="$1$2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[265]=e;e=Object.create(null);e[0]=new RegExp("; *(MODECOM )([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[266]=e;e=Object.create(null);e[0]=new RegExp("; *(MZ\\d{3}\\+?|MZ\\d{3} 4G|Xoom|XOOM[^;/]*) Build");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[267]=e;e=Object.create(null);e[0]=new RegExp("; *(Milestone )(XT[^;/]*) Build");e[1]="Motorola $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[268]=e;e=Object.create(null);e[0]=new RegExp("; *(Motoroi ?x|Droid X|DROIDX) Build");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[269]=e;e=Object.create(null);e[0]=new RegExp("; *(Droid[^;/]*|DROID[^;/]*|Milestone[^;/]*|Photon|Triumph|Devour|Titanium) Build");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[270]=e;e=Object.create(null);e[0]=new RegExp("; *(A555|A85[34][^;/]*|A95[356]|ME[58]\\d{2}\\+?|ME600|ME632|ME722|MB\\d{3}\\+?|MT680|MT710|MT870|MT887|MT917|WX435|WX453|WX44[25]|XT\\d{3,4}[A-Z\\+]*|CL[iI]Q|CL[iI]Q XT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[271]=e;e=Object.create(null);e[0]=new RegExp("; *(Motorola MOT-|Motorola[ _\\-]|MOT\\-?)([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[272]=e;e=Object.create(null);e[0]=new RegExp("; *(Moto[_ ]?|MOT\\-)([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[273]=e;e=Object.create(null);e[0]=new RegExp("; *((?:MP[DQ]C|MPG\\d{1,4}|MP\\d{3,4}|MID(?:(?:10[234]|114|43|7[247]|8[24]|7)C|8[01]1))[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[274]=e;e=Object.create(null);e[0]=new RegExp("; *(?:MSI[ _])?(Primo\\d+|Enjoy[ _\\-][^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[275]=e;e=Object.create(null);e[0]=new RegExp("; *Multilaser[ _]([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[276]=e;e=Object.create(null);e[0]=new RegExp("; *(My)[_]?(Pad)[ _]([^;/]+) Build");e[1]="$1$2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[277]=e;e=Object.create(null);e[0]=new RegExp("; *(My)\\|?(Phone)[ _]([^;/]+) Build");e[1]="$1$2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[278]=e;e=Object.create(null);e[0]=new RegExp("; *(A\\d+)[ _](Duo)? Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[279]=e;e=Object.create(null);e[0]=new RegExp("; *(myTab[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[280]=e;e=Object.create(null);e[0]=new RegExp("; *(NABI2?-)([^;/]+) Build/");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[281]=e;e=Object.create(null);e[0]=new RegExp("; *(N-\\d+[CDE]) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[282]=e;e=Object.create(null);e[0]=new RegExp("; ?(NEC-)(.*) Build/");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[283]=e;e=Object.create(null);e[0]=new RegExp("; *(LT-NA7) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[284]=e;e=Object.create(null);e[0]=new RegExp("; *(NXM\\d+[A-z0-9_]*|Next\\d[A-z0-9_ \\-]*|NEXT\\d[A-z0-9_ \\-]*|Nextbook [A-z0-9_ ]*|DATAM803HC|M805)(?: Build|[\\);])");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[285]=e;e=Object.create(null);e[0]=new RegExp("; *(Nokia)([ _\\-]*)([^;/]*) Build");e[1]="$1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[286]=e;e=Object.create(null);e[0]=new RegExp("; *(Nook ?|Barnes & Noble Nook |BN )([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[287]=e;e=Object.create(null);e[0]=new RegExp("; *(NOOK )?(BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[288]=e;e=Object.create(null);e[0]=new RegExp("; Build/(Nook)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[289]=e;e=Object.create(null);e[0]=new RegExp("; *(OP110|OliPad[^;/]+) Build");e[1]="Olivetti $1";e[2]=0;e[3]=0;e[4]=0;p.device[290]=e;e=Object.create(null);e[0]=new RegExp("; *OMEGA[ _\\-](MID[^;/]+) Build");e[1]="Omega $1";e[2]=0;e[3]=0;e[4]=0;p.device[291]=e;e=Object.create(null);e[0]=new RegExp("^(MID7500|MID\\d+) Mozilla/5\\.0 \\(iPad;");e[1]="Omega $1";e[2]=0;e[3]=0;e[4]=0;p.device[292]=e;e=Object.create(null);e[0]=new RegExp("; *((?:CIUS|cius)[^;/]*) Build");e[1]="Openpeak $1";e[2]=0;e[3]=0;e[4]=0;p.device[293]=e;e=Object.create(null);e[0]=new RegExp("; *(Find ?(?:5|7a)|R8[012]\\d{1,2}|T703\\d{0,1}|U70\\d{1,2}T?|X90\\d{1,2}) Build");e[1]="Oppo $1";e[2]=0;e[3]=0;e[4]=0;p.device[294]=e;e=Object.create(null);e[0]=new RegExp("; *OPPO ?([^;/]+) Build/");e[1]="Oppo $1";e[2]=0;e[3]=0;e[4]=0;p.device[295]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Odys\\-|ODYS\\-|ODYS )([^;/]+) Build");e[1]="Odys $1";e[2]=0;e[3]=0;e[4]=0;p.device[296]=e;e=Object.create(null);e[0]=new RegExp("; *(SELECT) ?(7) Build");e[1]="Odys $1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[297]=e;e=Object.create(null);e[0]=new RegExp("; *(PEDI)_(PLUS)_(W) Build");e[1]="Odys $1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[298]=e;e=Object.create(null);e[0]=new RegExp("; *(AEON|BRAVIO|FUSION|FUSION2IN1|Genio|EOS10|IEOS[^;/]*|IRON|Loox|LOOX|LOOX Plus|Motion|NOON|NOON_PRO|NEXT|OPOS|PEDI[^;/]*|PRIME[^;/]*|STUDYTAB|TABLO|Tablet-PC-4|UNO_X8|XELIO[^;/]*|Xelio ?\\d+ ?[Pp]ro|XENO10|XPRESS PRO) Build");e[1]="Odys $1";e[2]=0;e[3]=0;e[4]=0;p.device[299]=e;e=Object.create(null);e[0]=new RegExp("; (ONE [a-zA-Z]\\d+) Build/");e[1]="OnePlus $1";e[2]=0;e[3]=0;e[4]=0;p.device[300]=e;e=Object.create(null);e[0]=new RegExp("; (ONEPLUS [a-zA-Z]\\d+) Build/");e[1]="OnePlus $1";e[2]=0;e[3]=0;e[4]=0;p.device[301]=e;e=Object.create(null);e[0]=new RegExp("; *(TP-\\d+) Build/");e[1]="Orion $1";e[2]=0;e[3]=0;e[4]=0;p.device[302]=e;e=Object.create(null);e[0]=new RegExp("; *(G100W?) Build/");e[1]="PackardBell $1";e[2]=0;e[3]=0;e[4]=0;p.device[303]=e;e=Object.create(null);e[0]=new RegExp("; *(Panasonic)[_ ]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[304]=e;e=Object.create(null);e[0]=new RegExp("; *(FZ-A1B|JT-B1) Build");e[1]="Panasonic $1";e[2]=0;e[3]=0;e[4]=0;p.device[305]=e;e=Object.create(null);e[0]=new RegExp("; *(dL1|DL1) Build");e[1]="Panasonic $1";e[2]=0;e[3]=0;e[4]=0;p.device[306]=e;e=Object.create(null);e[0]=new RegExp("; *(SKY[ _])?(IM\\-[AT]\\d{3}[^;/]+).* Build/");e[1]="Pantech $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[307]=e;e=Object.create(null);e[0]=new RegExp("; *((?:ADR8995|ADR910L|ADR930L|ADR930VW|PTL21|P8000)(?: 4G)?) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[308]=e;e=Object.create(null);e[0]=new RegExp("; *Pantech([^;/]+).* Build/");e[1]="Pantech $1";e[2]=0;e[3]=0;e[4]=0;p.device[309]=e;e=Object.create(null);e[0]=new RegExp("; *(papyre)[ _\\-]([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[310]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Touchlet )?(X10\\.[^;/]+) Build/");e[1]="Pearl $1";e[2]=0;e[3]=0;e[4]=0;p.device[311]=e;e=Object.create(null);e[0]=new RegExp("; PHICOMM (i800) Build/");e[1]="Phicomm $1";e[2]=0;e[3]=0;e[4]=0;p.device[312]=e;e=Object.create(null);e[0]=new RegExp("; PHICOMM ([^;/]+) Build/");e[1]="Phicomm $1";e[2]=0;e[3]=0;e[4]=0;p.device[313]=e;e=Object.create(null);e[0]=new RegExp("; *(FWS\\d{3}[^;/]+) Build/");e[1]="Phicomm $1";e[2]=0;e[3]=0;e[4]=0;p.device[314]=e;e=Object.create(null);e[0]=new RegExp("; *(D633|D822|D833|T539|T939|V726|W335|W336|W337|W3568|W536|W5510|W626|W632|W6350|W6360|W6500|W732|W736|W737|W7376|W820|W832|W8355|W8500|W8510|W930) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[315]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Philips|PHILIPS)[ _]([^;/]+) Build");e[1]="Philips $1";e[2]=0;e[3]=0;e[4]=0;p.device[316]=e;e=Object.create(null);e[0]=new RegExp("Android 4\\..*; *(M[12356789]|U[12368]|S[123])\\ ?(pro)? Build");e[1]="Pipo $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[317]=e;e=Object.create(null);e[0]=new RegExp("; *(MOMO[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[318]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Polaroid[ _])?((?:MIDC\\d{3,}|PMID\\d{2,}|PTAB\\d{3,})[^;/]*)(\\/[^;/]*)? Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[319]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Polaroid )(Tablet) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[320]=e;e=Object.create(null);e[0]=new RegExp("; *(POMP)[ _\\-](.+?) *(?:Build|[;/\\)])");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[321]=e;e=Object.create(null);e[0]=new RegExp("; *(TB07STA|TB10STA|TB07FTA|TB10FTA) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[322]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Positivo )?((?:YPY|Ypy)[^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[323]=e;e=Object.create(null);e[0]=new RegExp("; *(MOB-[^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[324]=e;e=Object.create(null);e[0]=new RegExp("; *POV[ _\\-]([^;/]+) Build/");e[1]="POV $1";e[2]=0;e[3]=0;e[4]=0;p.device[325]=e;e=Object.create(null);e[0]=new RegExp("; *((?:TAB-PLAYTAB|TAB-PROTAB|PROTAB|PlayTabPro|Mobii[ _\\-]|TAB-P)[^;/]*) Build/");e[1]="POV $1";e[2]=0;e[3]=0;e[4]=0;p.device[326]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Prestigio )?((?:PAP|PMP)\\d[^;/]+) Build/");e[1]="Prestigio $1";e[2]=0;e[3]=0;e[4]=0;p.device[327]=e;e=Object.create(null);e[0]=new RegExp("; *(PLT[0-9]{4}.*) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[328]=e;e=Object.create(null);e[0]=new RegExp("; *(A2|A5|A8|A900)_?(Classic)? Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[329]=e;e=Object.create(null);e[0]=new RegExp("; *(Q[Mm]obile)_([^_]+)_([^_]+) Build");e[1]="Qmobile $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[330]=e;e=Object.create(null);e[0]=new RegExp("; *(Q\\-?[Mm]obile)[_ ](A[^;/]+) Build");e[1]="Qmobile $2";e[2]=0;e[3]=0;e[4]=0;p.device[331]=e;e=Object.create(null);e[0]=new RegExp("; *(Q\\-Smart)[ _]([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[332]=e;e=Object.create(null);e[0]=new RegExp("; *(Q\\-?[Mm]obile)[ _\\-](S[^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[333]=e;e=Object.create(null);e[0]=new RegExp("; *(TA1013) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[334]=e;e=Object.create(null);e[0]=new RegExp("; (RCT\\w+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[335]=e;e=Object.create(null);e[0]=new RegExp("; *(RK\\d+),? Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[336]=e;e=Object.create(null);e[0]=new RegExp(" Build/(RK\\d+)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[337]=e;e=Object.create(null);e[0]=new RegExp("; *(SAMSUNG |Samsung )?((?:Galaxy (?:Note II|S\\d)|GT-I9082|GT-I9205|GT-N7\\d{3}|SM-N9005)[^;/]*)\\/?[^;/]* Build/");e[1]="Samsung $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[338]=e;e=Object.create(null);e[0]=new RegExp("; *(Google )?(Nexus [Ss](?: 4G)?) Build/");e[1]="Samsung $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[339]=e;e=Object.create(null);e[0]=new RegExp("; *(SAMSUNG |Samsung )([^\\/]*)\\/[^ ]* Build/");e[1]="Samsung $2";e[2]=0;e[3]=0;e[4]=0;p.device[340]=e;e=Object.create(null);e[0]=new RegExp("; *(Galaxy(?: Ace| Nexus| S ?II+|Nexus S| with MCR 1.2| Mini Plus 4G)?) Build/");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[341]=e;e=Object.create(null);e[0]=new RegExp("; *(SAMSUNG[ _\\-] *)+([^;/]+) Build");e[1]="Samsung $2";e[2]=0;e[3]=0;e[4]=0;p.device[342]=e;e=Object.create(null);e[0]=new RegExp("; *(SAMSUNG-)?(GT\\-[BINPS]\\d{4}[^\\/]*)(\\/[^ ]*) Build");e[1]="Samsung $1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[343]=e;e=Object.create(null);e[0]=new RegExp("(?:; *|^)((?:GT\\-[BIiNPS]\\d{4}|I9\\d{2}0[A-Za-z\\+]?\\b)[^;/\\)]*?)(?:Build|Linux|MIUI|[;/\\)])");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[344]=e;e=Object.create(null);e[0]=new RegExp("; (SAMSUNG-)([A-Za-z0-9\\-]+).* Build/");e[1]="Samsung $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[345]=e;e=Object.create(null);e[0]=new RegExp("; *((?:SCH|SGH|SHV|SHW|SPH|SC|SM)\\-[A-Za-z0-9 ]+)(/?[^ ]*)? Build");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[346]=e;e=Object.create(null);e[0]=new RegExp(" ((?:SCH)\\-[A-Za-z0-9 ]+)(/?[^ ]*)? Build");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[347]=e;e=Object.create(null);e[0]=new RegExp("; *(Behold ?(?:2|II)|YP\\-G[^;/]+|EK-GC100|SCL21|I9300) Build");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[348]=e;e=Object.create(null);e[0]=new RegExp("; *(SH\\-?\\d\\d[^;/]+|SBM\\d[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[349]=e;e=Object.create(null);e[0]=new RegExp("; *(SHARP[ -])([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[350]=e;e=Object.create(null);e[0]=new RegExp("; *(SPX[_\\-]\\d[^;/]*) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[351]=e;e=Object.create(null);e[0]=new RegExp("; *(SX7\\-PEARL\\.GmbH) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[352]=e;e=Object.create(null);e[0]=new RegExp("; *(SP[T]?\\-\\d{2}[^;/]*) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[353]=e;e=Object.create(null);e[0]=new RegExp("; *(SK\\-.*) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[354]=e;e=Object.create(null);e[0]=new RegExp("; *(?:SKYTEX|SX)-([^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[355]=e;e=Object.create(null);e[0]=new RegExp("; *(IMAGINE [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[356]=e;e=Object.create(null);e[0]=new RegExp("; *(SmartQ) ?([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[357]=e;e=Object.create(null);e[0]=new RegExp("; *(WF7C|WF10C|SBT[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[358]=e;e=Object.create(null);e[0]=new RegExp("; *(SBM(?:003SH|005SH|006SH|007SH|102SH)) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[359]=e;e=Object.create(null);e[0]=new RegExp("; *(003P|101P|101P11C|102P) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[360]=e;e=Object.create(null);e[0]=new RegExp("; *(00\\dZ) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[361]=e;e=Object.create(null);e[0]=new RegExp("; HTC(X06HT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[362]=e;e=Object.create(null);e[0]=new RegExp("; *(001HT|X06HT) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[363]=e;e=Object.create(null);e[0]=new RegExp("; *(201M) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[364]=e;e=Object.create(null);e[0]=new RegExp("; *(ST\\d{4}.*)Build/ST");e[1]="Trekstor $1";e[2]=0;e[3]=0;e[4]=0;p.device[365]=e;e=Object.create(null);e[0]=new RegExp("; *(ST\\d{4}.*) Build/");e[1]="Trekstor $1";e[2]=0;e[3]=0;e[4]=0;p.device[366]=e;e=Object.create(null);e[0]=new RegExp("; *(Sony ?Ericsson ?)([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[367]=e;e=Object.create(null);e[0]=new RegExp("; *((?:SK|ST|E|X|LT|MK|MT|WT)\\d{2}[a-z0-9]*(?:-o)?|R800i|U20i) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[368]=e;e=Object.create(null);e[0]=new RegExp("; *(Xperia (?:A8|Arc|Acro|Active|Live with Walkman|Mini|Neo|Play|Pro|Ray|X\\d+)[^;/]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[369]=e;e=Object.create(null);e[0]=new RegExp("; Sony (Tablet[^;/]+) Build");e[1]="Sony $1";e[2]=0;e[3]=0;e[4]=0;p.device[370]=e;e=Object.create(null);e[0]=new RegExp("; Sony ([^;/]+) Build");e[1]="Sony $1";e[2]=0;e[3]=0;e[4]=0;p.device[371]=e;e=Object.create(null);e[0]=new RegExp("; *(Sony)([A-Za-z0-9\\-]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[372]=e;e=Object.create(null);e[0]=new RegExp("; *(Xperia [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[373]=e;e=Object.create(null);e[0]=new RegExp("; *(C(?:1[0-9]|2[0-9]|53|55|6[0-9])[0-9]{2}|D[25]\\d{3}|D6[56]\\d{2}) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[374]=e;e=Object.create(null);e[0]=new RegExp("; *(SGP\\d{3}|SGPT\\d{2}) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[375]=e;e=Object.create(null);e[0]=new RegExp("; *(NW-Z1000Series) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[376]=e;e=Object.create(null);e[0]=new RegExp("PLAYSTATION 3");e[1]="PlayStation 3";e[2]=0;e[3]=0;e[4]=0;p.device[377]=e;e=Object.create(null);e[0]=new RegExp("(PlayStation (?:Portable|Vita|\\d+))");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[378]=e;e=Object.create(null);e[0]=new RegExp("; *((?:CSL_Spice|Spice|SPICE|CSL)[ _\\-]?)?([Mm][Ii])([ _\\-])?(\\d{3}[^;/]*) Build/");e[1]="$1$2$3$4";e[2]=0;e[3]=0;e[4]=0;p.device[379]=e;e=Object.create(null);e[0]=new RegExp("; *(Sprint )(.+?) *(?:Build|[;/])");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[380]=e;e=Object.create(null);e[0]=new RegExp("\\b(Sprint)[: ]([^;,/ ]+)");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[381]=e;e=Object.create(null);e[0]=new RegExp("; *(TAGI[ ]?)(MID) ?([^;/]+) Build/");e[1]="$1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[382]=e;e=Object.create(null);e[0]=new RegExp("; *(Oyster500|Opal 800) Build");e[1]="Tecmobile $1";e[2]=0;e[3]=0;e[4]=0;p.device[383]=e;e=Object.create(null);e[0]=new RegExp("; *(TECNO[ _])([^;/]+) Build/");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[384]=e;e=Object.create(null);e[0]=new RegExp("; *Android for (Telechips|Techvision) ([^ ]+) ");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[385]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Hub2) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[386]=e;e=Object.create(null);e[0]=new RegExp("; *(PAD) ?(100[12]) Build/");e[1]="Terra $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[387]=e;e=Object.create(null);e[0]=new RegExp("; *(T[BM]-\\d{3}[^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[388]=e;e=Object.create(null);e[0]=new RegExp("; *(tolino [^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[389]=e;e=Object.create(null);e[0]=new RegExp("; *Build/.* (TOLINO_BROWSER)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[390]=e;e=Object.create(null);e[0]=new RegExp("; *(?:CJ[ -])?(ThL|THL)[ -]([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[391]=e;e=Object.create(null);e[0]=new RegExp("; *(T100|T200|T5|W100|W200|W8s) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[392]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile[ _]G2[ _]Touch) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[393]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile[ _]G2) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[394]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile myTouch Q) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[395]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile myTouch) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[396]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile_Espresso) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[397]=e;e=Object.create(null);e[0]=new RegExp("; *(T-Mobile G1) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[398]=e;e=Object.create(null);e[0]=new RegExp("\\b(T-Mobile ?)?(myTouch)[ _]?([34]G)[ _]?([^\\/]*) (?:Mozilla|Build)");e[1]="$1$2 $3 $4";e[2]=0;e[3]=0;e[4]=0;p.device[399]=e;e=Object.create(null);e[0]=new RegExp("\\b(T-Mobile)_([^_]+)_(.*) Build");e[1]="$1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[400]=e;e=Object.create(null);e[0]=new RegExp("\\b(T-Mobile)[_ ]?(.*?)Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[401]=e;e=Object.create(null);e[0]=new RegExp(" (ATP[0-9]{4}) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[402]=e;e=Object.create(null);e[0]=new RegExp(" *(TOOKY)[ _\\-]([^;/]+) ?(?:Build|;)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[403]=e;e=Object.create(null);e[0]=new RegExp("\\b(TOSHIBA_AC_AND_AZ|TOSHIBA_FOLIO_AND_A|FOLIO_AND_A)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[404]=e;e=Object.create(null);e[0]=new RegExp("; *([Ff]olio ?100) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[405]=e;e=Object.create(null);e[0]=new RegExp("; *(AT[0-9]{2,3}(?:\\-A|LE\\-A|PE\\-A|SE|a)?|AT7-A|AT1S0|Hikari-iFrame/WDPF-[^;/]+|THRiVE|Thrive) Build/");e[1]="Toshiba $1";e[2]=0;e[3]=0;e[4]=0;p.device[406]=e;e=Object.create(null);e[0]=new RegExp("; *(TM-MID\\d+[^;/]+|TOUCHMATE|MID-750) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[407]=e;e=Object.create(null);e[0]=new RegExp("; *(TM-SM\\d+[^;/]+) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[408]=e;e=Object.create(null);e[0]=new RegExp("; *(A10 [Bb]asic2?) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[409]=e;e=Object.create(null);e[0]=new RegExp("; *(TREQ[ _\\-])([^;/]+) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[410]=e;e=Object.create(null);e[0]=new RegExp("; *(X-?5|X-?3) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[411]=e;e=Object.create(null);e[0]=new RegExp("; *(A502\\+?|A936|A603|X1|X2) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[412]=e;e=Object.create(null);e[0]=new RegExp("(TOUCH(?:TAB|PAD).+?) Build/");e[1]="Versus $1";e[2]=0;e[3]=0;e[4]=0;p.device[413]=e;e=Object.create(null);e[0]=new RegExp("(VERTU) ([^;/]+) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[414]=e;e=Object.create(null);e[0]=new RegExp("; *(Videocon)[ _\\-]([^;/]+) *(?:Build|;)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[415]=e;e=Object.create(null);e[0]=new RegExp(" (VT\\d{2}[A-Za-z]*) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[416]=e;e=Object.create(null);e[0]=new RegExp("; *((?:ViewPad|ViewPhone|VSD)[^;/]+) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[417]=e;e=Object.create(null);e[0]=new RegExp("; *(ViewSonic-)([^;/]+) Build/");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[418]=e;e=Object.create(null);e[0]=new RegExp("; *(GTablet.*) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[419]=e;e=Object.create(null);e[0]=new RegExp("; *([Vv]ivo)[ _]([^;/]+) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[420]=e;e=Object.create(null);e[0]=new RegExp("(Vodafone) (.*) Build/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[421]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Walton[ _\\-])?(Primo[ _\\-][^;/]+) Build");e[1]="Walton $1";e[2]=0;e[3]=0;e[4]=0;p.device[422]=e;e=Object.create(null);e[0]=new RegExp("; *(?:WIKO[ \\-])?(CINK\\+?|BARRY|BLOOM|DARKFULL|DARKMOON|DARKNIGHT|DARKSIDE|FIZZ|HIGHWAY|IGGY|OZZY|RAINBOW|STAIRWAY|SUBLIM|WAX|CINK [^;/]+) Build/");e[1]="Wiko $1";e[2]=0;e[3]=0;e[4]=0;p.device[423]=e;e=Object.create(null);e[0]=new RegExp("; *WellcoM-([^;/]+) Build");e[1]="Wellcom $1";e[2]=0;e[3]=0;e[4]=0;p.device[424]=e;e=Object.create(null);e[0]=new RegExp("(?:(WeTab)-Browser|; (wetab) Build)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[425]=e;e=Object.create(null);e[0]=new RegExp("; *(AT-AS[^;/]+) Build");e[1]="Wolfgang $1";e[2]=0;e[3]=0;e[4]=0;p.device[426]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Woxter|Wxt) ([^;/]+) Build");e[1]="Woxter $1";e[2]=0;e[3]=0;e[4]=0;p.device[427]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Xenta |Luna )?(TAB[234][0-9]{2}|TAB0[78]-\\d{3}|TAB0?9-\\d{3}|TAB1[03]-\\d{3}|SMP\\d{2}-\\d{3}) Build/");e[1]="Yarvik $1";e[2]=0;e[3]=0;e[4]=0;p.device[428]=e;e=Object.create(null);e[0]=new RegExp("; *([A-Z]{2,4})(M\\d{3,}[A-Z]{2})([^;\\)\\/]*)(?: Build|[;\\)])");e[1]="Yifang $1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[429]=e;e=Object.create(null);e[0]=new RegExp("; *((MI|HM|MI-ONE|Redmi)[ -](NOTE |Note )?[^;/]*) (Build|MIUI)/");e[1]="XiaoMi $1";e[2]=0;e[3]=0;e[4]=0;p.device[430]=e;e=Object.create(null);e[0]=new RegExp("; *XOLO[ _]([^;/]*tab.*) Build");e[1]="Xolo $1";e[2]=0;e[3]=0;e[4]=0;p.device[431]=e;e=Object.create(null);e[0]=new RegExp("; *XOLO[ _]([^;/]+) Build");e[1]="Xolo $1";e[2]=0;e[3]=0;e[4]=0;p.device[432]=e;e=Object.create(null);e[0]=new RegExp("; *(q\\d0{2,3}[a-z]?) Build");e[1]="Xolo $1";e[2]=0;e[3]=0;e[4]=0;p.device[433]=e;e=Object.create(null);e[0]=new RegExp("; *(PAD ?[79]\\d+[^;/]*|TelePAD\\d+[^;/]) Build");e[1]="Xoro $1";e[2]=0;e[3]=0;e[4]=0;p.device[434]=e;e=Object.create(null);e[0]=new RegExp("; *(?:(?:ZOPO|Zopo)[ _]([^;/]+)|(ZP ?(?:\\d{2}[^;/]+|C2))|(C[2379])) Build");e[1]="$1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[435]=e;e=Object.create(null);e[0]=new RegExp("; *(ZiiLABS) (Zii[^;/]*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[436]=e;e=Object.create(null);e[0]=new RegExp("; *(Zii)_([^;/]*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[437]=e;e=Object.create(null);e[0]=new RegExp("; *(ARIZONA|(?:ATLAS|Atlas) W|D930|Grand (?:[SX][^;]*|Era|Memo[^;]*)|JOE|(?:Kis|KIS)\\b[^;]*|Libra|Light [^;]*|N8[056][01]|N850L|N8000|N9[15]\\d{2}|N9810|NX501|Optik|(?:Vip )Racer[^;]*|RacerII|RACERII|San Francisco[^;]*|V9[AC]|V55|V881|Z[679][0-9]{2}[A-z]?) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[438]=e;e=Object.create(null);e[0]=new RegExp("; *([A-Z]\\d+)_USA_[^;]* Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[439]=e;e=Object.create(null);e[0]=new RegExp("; *(SmartTab\\d+)[^;]* Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[440]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Blade|BLADE|ZTE-BLADE)([^;/]*) Build");e[1]="ZTE Blade$1";e[2]=0;e[3]=0;e[4]=0;p.device[441]=e;e=Object.create(null);e[0]=new RegExp("; *(?:Skate|SKATE|ZTE-SKATE)([^;/]*) Build");e[1]="ZTE Skate$1";e[2]=0;e[3]=0;e[4]=0;p.device[442]=e;e=Object.create(null);e[0]=new RegExp("; *(Orange |Optimus )(Monte Carlo|San Francisco) Build");e[1]="$1$2";e[2]=0;e[3]=0;e[4]=0;p.device[443]=e;e=Object.create(null);e[0]=new RegExp("; *(?:ZXY-ZTE_|ZTE\\-U |ZTE[\\- _]|ZTE-C[_ ])([^;/]+) Build");e[1]="ZTE $1";e[2]=0;e[3]=0;e[4]=0;p.device[444]=e;e=Object.create(null);e[0]=new RegExp("; (BASE) (lutea|Lutea 2|Tab[^;]*) Build");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[445]=e;e=Object.create(null);e[0]=new RegExp("; (Avea inTouch 2|soft stone|tmn smart a7|Movistar[ _]Link) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[446]=e;e=Object.create(null);e[0]=new RegExp("; *(vp9plus)\\)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[447]=e;e=Object.create(null);e[0]=new RegExp("; ?(Cloud[ _]Z5|z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900) Build/");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[448]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFOT|Kindle Fire) Build\\b");e[1]="Kindle Fire";e[2]=0;e[3]=0;e[4]=0;p.device[449]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFOTE|Amazon Kindle Fire2) Build\\b");e[1]="Kindle Fire 2";e[2]=0;e[3]=0;e[4]=0;p.device[450]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFTT) Build\\b");e[1]="Kindle Fire HD";e[2]=0;e[3]=0;e[4]=0;p.device[451]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFJWI) Build\\b");e[1]='Kindle Fire HD 8.9" WiFi';e[2]=0;e[3]=0;e[4]=0;p.device[452]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFJWA) Build\\b");e[1]='Kindle Fire HD 8.9" 4G';e[2]=0;e[3]=0;e[4]=0;p.device[453]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFSOWI) Build\\b");e[1]='Kindle Fire HD 7" WiFi';e[2]=0;e[3]=0;e[4]=0;p.device[454]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFTHWI) Build\\b");e[1]='Kindle Fire HDX 7" WiFi';e[2]=0;e[3]=0;e[4]=0;p.device[455]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFTHWA) Build\\b");e[1]='Kindle Fire HDX 7" 4G';e[2]=0;e[3]=0;e[4]=0;p.device[456]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFAPWI) Build\\b");e[1]='Kindle Fire HDX 8.9" WiFi';e[2]=0;e[3]=0;e[4]=0;p.device[457]=e;e=Object.create(null);e[0]=new RegExp("; ?(KFAPWA) Build\\b");e[1]='Kindle Fire HDX 8.9" 4G';e[2]=0;e[3]=0;e[4]=0;p.device[458]=e;e=Object.create(null);e[0]=new RegExp("; ?Amazon ([^;/]+) Build\\b");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[459]=e;e=Object.create(null);e[0]=new RegExp("; ?(Kindle) Build\\b");e[1]="Kindle";e[2]=0;e[3]=0;e[4]=0;p.device[460]=e;e=Object.create(null);e[0]=new RegExp("; ?(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))? Build\\b");e[1]="Kindle Fire";e[2]=0;e[3]=0;e[4]=0;p.device[461]=e;e=Object.create(null);e[0]=new RegExp(" (Kindle)/(\\d+\\.\\d+)");e[1]="Kindle";e[2]=0;e[3]=0;e[4]=0;p.device[462]=e;e=Object.create(null);e[0]=new RegExp(" (Silk|Kindle)/(\\d+)\\.");e[1]="Kindle";e[2]=0;e[3]=0;e[4]=0;p.device[463]=e;e=Object.create(null);e[0]=new RegExp("(sprd)\\-([^/]+)/");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[464]=e;e=Object.create(null);e[0]=new RegExp("; *(H\\d{2}00\\+?) Build");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[465]=e;e=Object.create(null);e[0]=new RegExp("; *(iphone|iPhone5) Build/");e[1]="Xianghe $1";e[2]=0;e[3]=0;e[4]=0;p.device[466]=e;e=Object.create(null);e[0]=new RegExp("; *(e\\d{4}[a-z]?_?v\\d+|v89_[^;/]+)[^;/]+ Build/");e[1]="Xianghe $1";e[2]=0;e[3]=0;e[4]=0;p.device[467]=e;e=Object.create(null);e[0]=new RegExp("\\bUSCC[_\\-]?([^ ;/\\)]+)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[468]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:ALCATEL)[^;]*; *([^;,\\)]+)");e[1]="Alcatel $1";e[2]=0;e[3]=0;e[4]=0;p.device[469]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?|WpsLondonTest; ?)?(?:ASUS|Asus)[^;]*; *([^;,\\)]+)");e[1]="Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[470]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:DELL|Dell)[^;]*; *([^;,\\)]+)");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[471]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?|WpsLondonTest; ?)?(?:HTC|Htc|HTC_blocked[^;]*)[^;]*; *(?:HTC)?([^;,\\)]+)");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[472]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:HUAWEI)[^;]*; *(?:HUAWEI )?([^;,\\)]+)");e[1]="Huawei $1";e[2]=0;e[3]=0;e[4]=0;p.device[473]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:LG|Lg)[^;]*; *(?:LG[ \\-])?([^;,\\)]+)");e[1]="LG $1";e[2]=0;e[3]=0;e[4]=0;p.device[474]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:rv:11; )?(?:NOKIA|Nokia)[^;]*; *(?:NOKIA ?|Nokia ?|LUMIA ?|[Ll]umia ?)*(\\d{3,}[^;\\)]*)");e[1]="Lumia $1";e[2]=0;e[3]=0;e[4]=0;p.device[475]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:NOKIA|Nokia)[^;]*; *(RM-\\d{3,})");e[1]="Nokia $1";e[2]=0;e[3]=0;e[4]=0;p.device[476]=e;e=Object.create(null);e[0]=new RegExp("(?:Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)]|WPDesktop;) ?(?:ARM; ?Touch; ?|Touch; ?)?(?:NOKIA|Nokia)[^;]*; *(?:NOKIA ?|Nokia ?|LUMIA ?|[Ll]umia ?)*([^;\\)]+)");e[1]="Nokia $1";e[2]=0;e[3]=0;e[4]=0;p.device[477]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?)?(?:Microsoft(?: Corporation)?)[^;]*; *([^;,\\)]+)");e[1]="Microsoft $1";e[2]=0;e[3]=0;e[4]=0;p.device[478]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?|WpsLondonTest; ?)?(?:SAMSUNG)[^;]*; *(?:SAMSUNG )?([^;,\\.\\)]+)");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[479]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?|WpsLondonTest; ?)?(?:TOSHIBA|FujitsuToshibaMobileCommun)[^;]*; *([^;,\\)]+)");e[1]="Toshiba $1";e[2]=0;e[3]=0;e[4]=0;p.device[480]=e;e=Object.create(null);e[0]=new RegExp("Windows Phone [^;]+; .*?IEMobile/[^;\\)]+[;\\)] ?(?:ARM; ?Touch; ?|Touch; ?|WpsLondonTest; ?)?([^;]+); *([^;,\\)]+)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[481]=e;e=Object.create(null);e[0]=new RegExp("(?:^|; )SAMSUNG\\-([A-Za-z0-9\\-]+).* Bada/");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[482]=e;e=Object.create(null);e[0]=new RegExp("\\(Mobile; ALCATEL ?(One|ONE) ?(Touch|TOUCH) ?([^;/]+)(?:/[^;]+)?; rv:[^\\)]+\\) Gecko/[^\\/]+ Firefox/");e[1]="Alcatel $1 $2 $3";e[2]=0;e[3]=0;e[4]=0;p.device[483]=e;e=Object.create(null);e[0]=new RegExp("\\(Mobile; (?:ZTE([^;]+)|(OpenC)); rv:[^\\)]+\\) Gecko/[^\\/]+ Firefox/");e[1]="ZTE $1$2";e[2]=0;e[3]=0;e[4]=0;p.device[484]=e;e=Object.create(null);e[0]=new RegExp("Nokia(N[0-9]+)([A-z_\\-][A-z0-9_\\-]*)");e[1]="Nokia $1";e[2]=0;e[3]=0;e[4]=0;p.device[485]=e;e=Object.create(null);e[0]=new RegExp("(?:NOKIA|Nokia)(?:\\-| *)(?:([A-Za-z0-9]+)\\-[0-9a-f]{32}|([A-Za-z0-9\\-]+)(?:UCBrowser)|([A-Za-z0-9\\-]+))");e[1]="Nokia $1$2$3";e[2]=0;e[3]=0;e[4]=0;p.device[486]=e;e=Object.create(null);e[0]=new RegExp("Lumia ([A-Za-z0-9\\-]+)");e[1]="Lumia $1";e[2]=0;e[3]=0;e[4]=0;p.device[487]=e;e=Object.create(null);e[0]=new RegExp("\\(Symbian; U; S60 V5; [A-z]{2}\\-[A-z]{2}; (SonyEricsson|Samsung|Nokia|LG)([^;/]+)\\)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[488]=e;e=Object.create(null);e[0]=new RegExp("\\(Symbian(?:/3)?; U; ([^;]+);");e[1]="Nokia $1";e[2]=0;e[3]=0;e[4]=0;p.device[489]=e;e=Object.create(null);e[0]=new RegExp("BB10; ([A-Za-z0-9\\- ]+)\\)");e[1]="BlackBerry $1";e[2]=0;e[3]=0;e[4]=0;p.device[490]=e;e=Object.create(null);e[0]=new RegExp("Play[Bb]ook.+RIM Tablet OS");e[1]="BlackBerry Playbook";e[2]=0;e[3]=0;e[4]=0;p.device[491]=e;e=Object.create(null);e[0]=new RegExp("Black[Bb]erry ([0-9]+);");e[1]="BlackBerry $1";e[2]=0;e[3]=0;e[4]=0;p.device[492]=e;e=Object.create(null);e[0]=new RegExp("Black[Bb]erry([0-9]+)");e[1]="BlackBerry $1";e[2]=0;e[3]=0;e[4]=0;p.device[493]=e;e=Object.create(null);e[0]=new RegExp("Black[Bb]erry;");e[1]="BlackBerry";e[2]=0;e[3]=0;e[4]=0;p.device[494]=e;e=Object.create(null);e[0]=new RegExp("(Pre|Pixi)/\\d+\\.\\d+");e[1]="Palm $1";e[2]=0;e[3]=0;e[4]=0;p.device[495]=e;e=Object.create(null);e[0]=new RegExp("Palm([0-9]+)");e[1]="Palm $1";e[2]=0;e[3]=0;e[4]=0;p.device[496]=e;e=Object.create(null);e[0]=new RegExp("Treo([A-Za-z0-9]+)");e[1]="Palm Treo $1";e[2]=0;e[3]=0;e[4]=0;p.device[497]=e;e=Object.create(null);e[0]=new RegExp("webOS.*(P160U(?:NA)?)/(\\d+).(\\d+)");e[1]="HP Veer";e[2]=0;e[3]=0;e[4]=0;p.device[498]=e;e=Object.create(null);e[0]=new RegExp("(Touch[Pp]ad)/\\d+\\.\\d+");e[1]="HP TouchPad";e[2]=0;e[3]=0;e[4]=0;p.device[499]=e;e=Object.create(null);e[0]=new RegExp("HPiPAQ([A-Za-z0-9]+)/\\d+.\\d+");e[1]="HP iPAQ $1";e[2]=0;e[3]=0;e[4]=0;p.device[500]=e;e=Object.create(null);e[0]=new RegExp("PDA; (PalmOS)/sony/model ([a-z]+)/Revision");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[501]=e;e=Object.create(null);e[0]=new RegExp("(Apple\\s?TV)");e[1]="AppleTV";e[2]=0;e[3]=0;e[4]=0;p.device[502]=e;e=Object.create(null);e[0]=new RegExp("(QtCarBrowser)");e[1]="Tesla Model S";e[2]=0;e[3]=0;e[4]=0;p.device[503]=e;e=Object.create(null);e[0]=new RegExp("(iPhone|iPad|iPod)(\\d+,\\d+)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[504]=e;e=Object.create(null);e[0]=new RegExp("(iPad)(?:;| Simulator;)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[505]=e;e=Object.create(null);e[0]=new RegExp("(iPod)(?:;| touch;| Simulator;)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[506]=e;e=Object.create(null);e[0]=new RegExp("(iPhone)(?:;| Simulator;)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[507]=e;e=Object.create(null);e[0]=new RegExp("iPhone");e[1]="iPhone";e[2]=0;e[3]=0;e[4]=0;p.device[508]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/\\d.*\\(((?:Mac|iMac|PowerMac|PowerBook)[^\\d]*)(\\d+)(?:,|%2C)(\\d+)");e[1]="$1$2,$3";e[2]=0;e[3]=0;e[4]=0;p.device[509]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/\\d+\\.\\d+\\.\\d+ \\(x86_64\\)");e[1]="Mac";e[2]=0;e[3]=0;e[4]=0;p.device[510]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/\\d");e[1]="iOS-Device";e[2]=0;e[3]=0;e[4]=0;p.device[511]=e;e=Object.create(null);e[0]=new RegExp("acer_([A-Za-z0-9]+)_");e[1]="Acer $1";e[2]=0;e[3]=0;e[4]=0;p.device[512]=e;e=Object.create(null);e[0]=new RegExp("(?:ALCATEL|Alcatel)-([A-Za-z0-9\\-]+)");e[1]="Alcatel $1";e[2]=0;e[3]=0;e[4]=0;p.device[513]=e;e=Object.create(null);e[0]=new RegExp("(?:Amoi|AMOI)\\-([A-Za-z0-9]+)");e[1]="Amoi $1";e[2]=0;e[3]=0;e[4]=0;p.device[514]=e;e=Object.create(null);e[0]=new RegExp("(?:; |\\/|^)((?:Transformer (?:Pad|Prime) |Transformer |PadFone[ _]?)[A-Za-z0-9]*)");e[1]="Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[515]=e;e=Object.create(null);e[0]=new RegExp("(?:asus.*?ASUS|Asus|ASUS|asus)[\\- ;]*((?:Transformer (?:Pad|Prime) |Transformer |Padfone |Nexus[ _])?[A-Za-z0-9]+)");e[1]="Asus $1";e[2]=0;e[3]=0;e[4]=0;p.device[516]=e;e=Object.create(null);e[0]=new RegExp("\\bBIRD[ \\-\\.]([A-Za-z0-9]+)");e[1]="Bird $1";e[2]=0;e[3]=0;e[4]=0;p.device[517]=e;e=Object.create(null);e[0]=new RegExp("\\bDell ([A-Za-z0-9]+)");e[1]="Dell $1";e[2]=0;e[3]=0;e[4]=0;p.device[518]=e;e=Object.create(null);e[0]=new RegExp("DoCoMo/2\\.0 ([A-Za-z0-9]+)");e[1]="DoCoMo $1";e[2]=0;e[3]=0;e[4]=0;p.device[519]=e;e=Object.create(null);e[0]=new RegExp("([A-Za-z0-9]+)_W;FOMA");e[1]="DoCoMo $1";e[2]=0;e[3]=0;e[4]=0;p.device[520]=e;e=Object.create(null);e[0]=new RegExp("([A-Za-z0-9]+);FOMA");e[1]="DoCoMo $1";e[2]=0;e[3]=0;e[4]=0;p.device[521]=e;e=Object.create(null);e[0]=new RegExp("\\b(?:HTC/|HTC/[a-z0-9]+/)?HTC[ _\\-;]? *(.*?)(?:-?Mozilla|fingerPrint|[;/\\(\\)]|$)");e[1]="HTC $1";e[2]=0;e[3]=0;e[4]=0;p.device[522]=e;e=Object.create(null);e[0]=new RegExp("Huawei([A-Za-z0-9]+)");e[1]="Huawei $1";e[2]=0;e[3]=0;e[4]=0;p.device[523]=e;e=Object.create(null);e[0]=new RegExp("HUAWEI-([A-Za-z0-9]+)");e[1]="Huawei $1";e[2]=0;e[3]=0;e[4]=0;p.device[524]=e;e=Object.create(null);e[0]=new RegExp("vodafone([A-Za-z0-9]+)");e[1]="Huawei Vodafone $1";e[2]=0;e[3]=0;e[4]=0;p.device[525]=e;e=Object.create(null);e[0]=new RegExp("i\\-mate ([A-Za-z0-9]+)");e[1]="i-mate $1";e[2]=0;e[3]=0;e[4]=0;p.device[526]=e;e=Object.create(null);e[0]=new RegExp("Kyocera\\-([A-Za-z0-9]+)");e[1]="Kyocera $1";e[2]=0;e[3]=0;e[4]=0;p.device[527]=e;e=Object.create(null);e[0]=new RegExp("KWC\\-([A-Za-z0-9]+)");e[1]="Kyocera $1";e[2]=0;e[3]=0;e[4]=0;p.device[528]=e;e=Object.create(null);e[0]=new RegExp("Lenovo[_\\-]([A-Za-z0-9]+)");e[1]="Lenovo $1";e[2]=0;e[3]=0;e[4]=0;p.device[529]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/[0-9]+\\.[0-9]+\\.[0-9]+ \\([^;]*; *(LG)E *; *([^;]*) *;[^;]*;[^;]*;\\)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[530]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/1\\.1\\.1.*CE-HTML/1\\.\\d;(Vendor/)*(THOM[^;]*?)[;\\s](?:.*SW-Version/.*)*(LF[^;]+);?");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[531]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)(?:/1\\.1\\.1)?(?: ?\\(;;;;;\\))?; *CE-HTML(?:/1\\.\\d)?; *([^ ]+) ([^;]+);");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[532]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/1\\.1\\.1 \\(;;;;;\\) Maple_2011");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[533]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/[0-9]+\\.[0-9]+\\.[0-9]+ \\([^;]*; *(?:CUS:([^;]*)|([^;]+)) *; *([^;]*) *;.*;");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[534]=e;e=Object.create(null);e[0]=new RegExp("(HbbTV)/[0-9]+\\.[0-9]+\\.[0-9]+");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[535]=e;e=Object.create(null);e[0]=new RegExp('LGE; (?:Media\\/)?([^;]*);[^;]*;[^;]*;?\\); "?LG NetCast(\\.TV|\\.Media|)-\\d+');e[1]="NetCast$2";e[2]=0;e[3]=0;e[4]=0;p.device[536]=e;e=Object.create(null);e[0]=new RegExp("InettvBrowser/[0-9]+\\.[0-9A-Z]+ \\([^;]*;(Sony)([^;]*);[^;]*;[^\\)]*\\)");e[1]="Inettv";e[2]=0;e[3]=0;e[4]=0;p.device[537]=e;e=Object.create(null);e[0]=new RegExp("InettvBrowser/[0-9]+\\.[0-9A-Z]+ \\([^;]*;([^;]*);[^;]*;[^\\)]*\\)");e[1]="Inettv";e[2]=0;e[3]=0;e[4]=0;p.device[538]=e;e=Object.create(null);e[0]=new RegExp("(?:InettvBrowser|TSBNetTV|NETTV|HBBTV)");e[1]="Inettv";e[2]=0;e[3]=0;e[4]=0;p.device[539]=e;e=Object.create(null);e[0]=new RegExp("Series60/\\d\\.\\d (LG)[\\-]?([A-Za-z0-9 \\-]+)");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[540]=e;e=Object.create(null);e[0]=new RegExp("\\b(?:LGE[ \\-]LG\\-(?:AX)?|LGE |LGE?-LG|LGE?[ \\-]|LG[ /\\-]|lg[\\-])([A-Za-z0-9]+)\\b");e[1]="LG $1";e[2]=0;e[3]=0;e[4]=0;p.device[541]=e;e=Object.create(null);e[0]=new RegExp("(?:^LG[\\-]?|^LGE[\\-/]?)([A-Za-z]+[0-9]+[A-Za-z]*)");e[1]="LG $1";e[2]=0;e[3]=0;e[4]=0;p.device[542]=e;e=Object.create(null);e[0]=new RegExp("^LG([0-9]+[A-Za-z]*)");e[1]="LG $1";e[2]=0;e[3]=0;e[4]=0;p.device[543]=e;e=Object.create(null);e[0]=new RegExp("(KIN\\.[^ ]+) (\\d+)\\.(\\d+)");e[1]="Microsoft $1";e[2]=0;e[3]=0;e[4]=0;p.device[544]=e;e=Object.create(null);e[0]=new RegExp("(?:MSIE|XBMC).*\\b(Xbox)\\b");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[545]=e;e=Object.create(null);e[0]=new RegExp("; ARM; Trident/6\\.0; Touch[\\);]");e[1]="Microsoft Surface RT";e[2]=0;e[3]=0;e[4]=0;p.device[546]=e;e=Object.create(null);e[0]=new RegExp("Motorola\\-([A-Za-z0-9]+)");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[547]=e;e=Object.create(null);e[0]=new RegExp("MOTO\\-([A-Za-z0-9]+)");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[548]=e;e=Object.create(null);e[0]=new RegExp("MOT\\-([A-z0-9][A-z0-9\\-]*)");e[1]="Motorola $1";e[2]=0;e[3]=0;e[4]=0;p.device[549]=e;e=Object.create(null);e[0]=new RegExp("Nintendo WiiU");e[1]="Nintendo Wii U";e[2]=0;e[3]=0;e[4]=0;p.device[550]=e;e=Object.create(null);e[0]=new RegExp("Nintendo (DS|3DS|DSi|Wii);");e[1]="Nintendo $1";e[2]=0;e[3]=0;e[4]=0;p.device[551]=e;e=Object.create(null);e[0]=new RegExp("(?:Pantech|PANTECH)[ _-]?([A-Za-z0-9\\-]+)");e[1]="Pantech $1";e[2]=0;e[3]=0;e[4]=0;p.device[552]=e;e=Object.create(null);e[0]=new RegExp("Philips([A-Za-z0-9]+)");e[1]="Philips $1";e[2]=0;e[3]=0;e[4]=0;p.device[553]=e;e=Object.create(null);e[0]=new RegExp("Philips ([A-Za-z0-9]+)");e[1]="Philips $1";e[2]=0;e[3]=0;e[4]=0;p.device[554]=e;e=Object.create(null);e[0]=new RegExp("(SMART-TV); .* Tizen ");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[555]=e;e=Object.create(null);e[0]=new RegExp("SymbianOS/9\\.\\d.* Samsung[/\\-]([A-Za-z0-9 \\-]+)");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[556]=e;e=Object.create(null);e[0]=new RegExp("(Samsung)(SGH)(i[0-9]+)");e[1]="$1 $2$3";e[2]=0;e[3]=0;e[4]=0;p.device[557]=e;e=Object.create(null);e[0]=new RegExp("SAMSUNG-ANDROID-MMS/([^;/]+)");e[1]="$1";e[2]=0;e[3]=0;e[4]=0;p.device[558]=e;e=Object.create(null);e[0]=new RegExp("SAMSUNG(?:; |[ -/])([A-Za-z0-9\\-]+)");e[1]="Samsung $1";e[2]=0;e[3]=0;e[4]=0;p.device[559]=e;e=Object.create(null);e[0]=new RegExp("(Dreamcast)");e[1]="Sega $1";e[2]=0;e[3]=0;e[4]=0;p.device[560]=e;e=Object.create(null);e[0]=new RegExp("^SIE-([A-Za-z0-9]+)");e[1]="Siemens $1";e[2]=0;e[3]=0;e[4]=0;p.device[561]=e;e=Object.create(null);e[0]=new RegExp("Softbank/[12]\\.0/([A-Za-z0-9]+)");e[1]="Softbank $1";e[2]=0;e[3]=0;e[4]=0;p.device[562]=e;e=Object.create(null);e[0]=new RegExp("SonyEricsson ?([A-Za-z0-9\\-]+)");e[1]="Ericsson $1";e[2]=0;e[3]=0;e[4]=0;p.device[563]=e;e=Object.create(null);e[0]=new RegExp("Android [^;]+; ([^ ]+) (Sony)/");e[1]="$2 $1";e[2]=0;e[3]=0;e[4]=0;p.device[564]=e;e=Object.create(null);e[0]=new RegExp("(Sony)(?:BDP\\/|\\/)?([^ /;\\)]+)[ /;\\)]");e[1]="$1 $2";e[2]=0;e[3]=0;e[4]=0;p.device[565]=e;e=Object.create(null);e[0]=new RegExp("Puffin/[\\d\\.]+IT");e[1]="iPad";e[2]=0;e[3]=0;e[4]=0;p.device[566]=e;e=Object.create(null);e[0]=new RegExp("Puffin/[\\d\\.]+IP");e[1]="iPhone";e[2]=0;e[3]=0;e[4]=0;p.device[567]=e;e=Object.create(null);e[0]=new RegExp("Puffin/[\\d\\.]+AT");e[1]="Generic Tablet";e[2]=0;e[3]=0;e[4]=0;p.device[568]=e;e=Object.create(null);e[0]=new RegExp("Puffin/[\\d\\.]+AP");e[1]="Generic Smartphone";e[2]=0;e[3]=0;e[4]=0;p.device[569]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{0,2}; WOWMobile (.+) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[570]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\-update1; [A-Za-z]{2}\\-[A-Za-z]{0,2} *; *(.+?) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[571]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+(?:\\.[\\d]+){1,2}; *[A-Za-z]{2}[_\\-][A-Za-z]{0,2}\\-? *; *(.+?) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[572]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+(?:\\.[\\d]+){1,2}; *[A-Za-z]{0,2}\\- *; *(.+?) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[573]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+(?:\\.[\\d]+){1,2}; *[a-z]{0,2}[_\\-]?[A-Za-z]{0,2};? Build[/ ]");e[1]="Generic Smartphone";e[2]=0;e[3]=0;e[4]=0;p.device[574]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+(?:\\.[\\d]+){1,2}; *\\-?[A-Za-z]{2}; *(.+?) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[575]=e;e=Object.create(null);e[0]=new RegExp("Android[\\- ][\\d]+(?:\\.[\\d]+){1,2}(?:;.*)?; *(.+?) Build[/ ]");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[576]=e;e=Object.create(null);e[0]=new RegExp("(GoogleTV)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[577]=e;e=Object.create(null);e[0]=new RegExp("(WebTV)/\\d+.\\d+");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[578]=e;e=Object.create(null);e[0]=new RegExp("^(Roku)/DVP-\\d+\\.\\d+");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.device[579]=e;e=Object.create(null);e[0]=new RegExp("(Android 3\\.\\d|Opera Tablet|Tablet; .+Firefox/|Android.*(?:Tab|Pad))");e[1]="Generic Tablet";e[2]=0;e[3]=0;e[4]=0;p.device[580]=e;e=Object.create(null);e[0]=new RegExp("(Symbian|\\bS60(Version|V\\d)|\\bS60\\b|\\((Series 60|Windows Mobile|Palm OS|Bada); Opera Mini|Windows CE|Opera Mobi|BREW|Brew|Mobile; .+Firefox/|iPhone OS|Android|MobileSafari|Windows *Phone|\\(webOS/|PalmOS)");e[1]="Generic Smartphone";e[2]=0;e[3]=0;e[4]=0;p.device[581]=e;e=Object.create(null);e[0]=new RegExp("(hiptop|avantgo|plucker|xiino|blazer|elaine)");e[1]="Generic Smartphone";e[2]=0;e[3]=0;e[4]=0;p.device[582]=e;e=Object.create(null);e[0]=new RegExp("(bot|zao|borg|DBot|oegp|silk|Xenu|zeal|^NING|CCBot|crawl|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|^Java/|^JNLP/|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|spider|msnbot|msrbot|vortex|^vortex|crawler|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|bingbot|BingPreview|openbot|gigabot|furlbot|polybot|seekbot|^voyager|archiver|Icarus6j|mogimogi|Netvibes|blitzbot|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|SeznamBot|ProoXiBot|wsr\\-agent|Squrl Java|EtaoSpider|PaperLiBot|SputnikBot|A6\\-Indexer|netresearch|searchsight|baiduspider|YisouSpider|ICC\\-Crawler|http%20client|Python-urllib|dataparksearch|converacrawler|Screaming Frog|AppEngine-Google|YahooCacheSystem|fast\\-webcrawler|Sogou Pic Spider|semanticdiscovery|Innovazion Crawler|facebookexternalhit|Google.*/\\+/web/snippet|Google-HTTP-Java-Client|BlogBridge|IlTrovatore-Setaccio|InternetArchive|GomezAgent|WebThumbnail|heritrix|NewsGator|PagePeeker|Reaper|ZooShot|holmes|NL-Crawler|Pingdom|StatusCake|WhatsApp|masscan|Google Web Preview|Qwantify)");e[1]="Spider";e[2]=0;e[3]=0;e[4]=0;p.device[583]=e;e=Object.create(null);e[0]=new RegExp("^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\\-|airn|alav|asus|attw|au\\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bmobile|bell|bird|bw\\-n|bw\\-u|beck|benq|bilb|blac|c55/|cdm\\-|chtm|capi|comp|cond|dall|dbte|dc\\-s|dica|ds\\-d|ds12|dait|devi|dmob|doco|dopo|dorado|el(?:38|39|48|49|50|55|58|68)|el[3456]\\d{2}dual|erk0|esl8|ex300|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\\-|fly_|g\\-mo|g1 u|g560|gf\\-5|grun|gene|go.w|good|grad|hcit|hd\\-m|hd\\-p|hd\\-t|hei\\-|hp i|hpip|hs\\-c|htc |htc\\-|htca|htcg)");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[584]=e;e=Object.create(null);e[0]=new RegExp("^(htcp|htcs|htct|htc_|haie|hita|huaw|hutc|i\\-20|i\\-go|i\\-ma|i\\-mobile|i230|iac|iac\\-|iac/|ig01|im1k|inno|iris|jata|kddi|kgt|kgt/|kpt |kwc\\-|klon|lexi|lg g|lg\\-a|lg\\-b|lg\\-c|lg\\-d|lg\\-f|lg\\-g|lg\\-k|lg\\-l|lg\\-m|lg\\-o|lg\\-p|lg\\-s|lg\\-t|lg\\-u|lg\\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\\-|lge/|leno|m1\\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot |mot\\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\\-|nem\\-|newg|neon)");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[585]=e;e=Object.create(null);e[0]=new RegExp("^(netf|noki|nzph|o2 x|o2\\-x|opwv|owg1|opti|oran|ot\\-s|p800|pand|pg\\-1|pg\\-2|pg\\-3|pg\\-6|pg\\-8|pg\\-c|pg13|phil|pn\\-2|pt\\-g|palm|pana|pire|pock|pose|psio|qa\\-a|qc\\-2|qc\\-3|qc\\-5|qc\\-7|qc07|qc12|qc21|qc32|qc60|qci\\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\\-|scp\\-|sdk/|se47|sec\\-|sec0|sec1|semc|sgh\\-|shar|sie\\-|sk\\-0|sl45|slid|smb3|smt5|sp01|sph\\-|spv |spv\\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\\-mo|t218|t250|t600|t610|t618|tcl\\-|tdg\\-|telm|tim\\-|ts70|tsm\\-|tsm3|tsm5|tx\\-9|tagt)");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[586]=e;e=Object.create(null);e[0]=new RegExp("^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vertu|vite|voda|vulc|w3c |w3c\\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\\-|your|zte\\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\\-|webc|whit|wmlb|xda\\-|xda_)");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[587]=e;e=Object.create(null);e[0]=new RegExp("^(Ice)$");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[588]=e;e=Object.create(null);e[0]=new RegExp("(wap[\\-\\ ]browser|maui|netfront|obigo|teleca|up\\.browser|midp|Opera Mini)");e[1]="Generic Feature Phone";e[2]=0;e[3]=0;e[4]=0;p.device[589]=e;p.device.length=590;p.os=Object.create(null);e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+ \\( ;(LG)E ;NetCast 4.0");e[1]=0;e[2]="2013";e[3]=0;e[4]=0;p.os[0]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+ \\( ;(LG)E ;NetCast 3.0");e[1]=0;e[2]="2012";e[3]=0;e[4]=0;p.os[1]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/1.1.1 \\(;;;;;\\) Maple_2011");e[1]="Samsung";e[2]="2011";e[3]=0;e[4]=0;p.os[2]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+ \\(;(Samsung);SmartTV([0-9]{4});.*FXPDEUC");e[1]=0;e[2]=0;e[3]="UE40F7000";e[4]=0;p.os[3]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+ \\(;(Samsung);SmartTV([0-9]{4});.*MST12DEUC");e[1]=0;e[2]=0;e[3]="UE32F4500";e[4]=0;p.os[4]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/1.1.1 \\(; (Philips);.*NETTV/4");e[1]=0;e[2]="2013";e[3]=0;e[4]=0;p.os[5]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/1.1.1 \\(; (Philips);.*NETTV/3");e[1]=0;e[2]="2012";e[3]=0;e[4]=0;p.os[6]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/1.1.1 \\(; (Philips);.*NETTV/2");e[1]=0;e[2]="2011";e[3]=0;e[4]=0;p.os[7]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+.*(firetv)-firefox-plugin (\\d+).(\\d+).(\\d+)");e[1]="FireHbbTV";e[2]=0;e[3]=0;e[4]=0;p.os[8]=e;e=Object.create(null);e[0]=new RegExp("HbbTV/\\d+\\.\\d+\\.\\d+ \\(.*; ?([a-zA-Z]+) ?;.*(201[1-9]).*\\)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[9]=e;e=Object.create(null);e[0]=new RegExp("(Windows Phone) (?:OS[ /])?(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[10]=e;e=Object.create(null);e[0]=new RegExp("(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone)[ +]+(\\d+)[_\\.](\\d+)(?:[_\\.](\\d+))?.*Outlook-iOS-Android");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[11]=e;e=Object.create(null);e[0]=new RegExp("(Android)[ \\-/](\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[12]=e;e=Object.create(null);e[0]=new RegExp("(Android) Donut");e[1]=0;e[2]="1";e[3]="2";e[4]=0;p.os[13]=e;e=Object.create(null);e[0]=new RegExp("(Android) Eclair");e[1]=0;e[2]="2";e[3]="1";e[4]=0;p.os[14]=e;e=Object.create(null);e[0]=new RegExp("(Android) Froyo");e[1]=0;e[2]="2";e[3]="2";e[4]=0;p.os[15]=e;e=Object.create(null);e[0]=new RegExp("(Android) Gingerbread");e[1]=0;e[2]="2";e[3]="3";e[4]=0;p.os[16]=e;e=Object.create(null);e[0]=new RegExp("(Android) Honeycomb");e[1]=0;e[2]="3";e[3]=0;e[4]=0;p.os[17]=e;e=Object.create(null);e[0]=new RegExp("^UCWEB.*; (Adr) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?;");e[1]="Android";e[2]=0;e[3]=0;e[4]=0;p.os[18]=e;e=Object.create(null);e[0]=new RegExp("^UCWEB.*; (iPad|iPh|iPd) OS (\\d+)_(\\d+)(?:_(\\d+))?;");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[19]=e;e=Object.create(null);e[0]=new RegExp("^UCWEB.*; (wds) (\\d+)\\.(\\d+)(?:\\.(\\d+))?;");e[1]="Windows Phone";e[2]=0;e[3]=0;e[4]=0;p.os[20]=e;e=Object.create(null);e[0]=new RegExp("^(JUC).*; ?U; ?(?:Android)?(\\d+)\\.(\\d+)(?:[\\.\\-]([a-z0-9]+))?");e[1]="Android";e[2]=0;e[3]=0;e[4]=0;p.os[21]=e;e=Object.create(null);e[0]=new RegExp("(Silk-Accelerated=[a-z]{4,5})");e[1]="Android";e[2]=0;e[3]=0;e[4]=0;p.os[22]=e;e=Object.create(null);e[0]=new RegExp("(XBLWP7)");e[1]="Windows Phone";e[2]=0;e[3]=0;e[4]=0;p.os[23]=e;e=Object.create(null);e[0]=new RegExp("(Windows ?Mobile)");e[1]="Windows Mobile";e[2]=0;e[3]=0;e[4]=0;p.os[24]=e;e=Object.create(null);e[0]=new RegExp("(Windows (?:NT 5\\.2|NT 5\\.1))");e[1]="Windows";e[2]="XP";e[3]=0;e[4]=0;p.os[25]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.1)");e[1]="Windows";e[2]="7";e[3]=0;e[4]=0;p.os[26]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.0)");e[1]="Windows";e[2]="Vista";e[3]=0;e[4]=0;p.os[27]=e;e=Object.create(null);e[0]=new RegExp("(Win 9x 4\\.90)");e[1]="Windows";e[2]="ME";e[3]=0;e[4]=0;p.os[28]=e;e=Object.create(null);e[0]=new RegExp("(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000|Windows 3.1)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[29]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.2; ARM;)");e[1]="Windows";e[2]="RT";e[3]=0;e[4]=0;p.os[30]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.2)");e[1]="Windows";e[2]="8";e[3]=0;e[4]=0;p.os[31]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.3; ARM;)");e[1]="Windows";e[2]="RT 8.1";e[3]=0;e[4]=0;p.os[32]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.3)");e[1]="Windows";e[2]="8.1";e[3]=0;e[4]=0;p.os[33]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 6\\.4)");e[1]="Windows";e[2]="10";e[3]=0;e[4]=0;p.os[34]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 10\\.0)");e[1]="Windows";e[2]="10";e[3]=0;e[4]=0;p.os[35]=e;e=Object.create(null);e[0]=new RegExp("(Windows NT 5\\.0)");e[1]="Windows";e[2]="2000";e[3]=0;e[4]=0;p.os[36]=e;e=Object.create(null);e[0]=new RegExp("(WinNT4.0)");e[1]="Windows";e[2]="NT 4.0";e[3]=0;e[4]=0;p.os[37]=e;e=Object.create(null);e[0]=new RegExp("(Windows ?CE)");e[1]="Windows";e[2]="CE";e[3]=0;e[4]=0;p.os[38]=e;e=Object.create(null);e[0]=new RegExp("Win ?(95|98|3.1|NT|ME|2000)");e[1]="Windows";e[2]="$1";e[3]=0;e[4]=0;p.os[39]=e;e=Object.create(null);e[0]=new RegExp("Win16");e[1]="Windows";e[2]="3.1";e[3]=0;e[4]=0;p.os[40]=e;e=Object.create(null);e[0]=new RegExp("Win32");e[1]="Windows";e[2]="95";e[3]=0;e[4]=0;p.os[41]=e;e=Object.create(null);e[0]=new RegExp("^Box.*Windows/([\\d.]+);");e[1]="Windows";e[2]="$1";e[3]=0;e[4]=0;p.os[42]=e;e=Object.create(null);e[0]=new RegExp("(Tizen)[/ ](\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[43]=e;e=Object.create(null);e[0]=new RegExp("((?:Mac[ +]?|; )OS[ +]X)[\\s+/](?:(\\d+)[_.](\\d+)(?:[_.](\\d+))?|Mach-O)");e[1]="Mac OS X";e[2]=0;e[3]=0;e[4]=0;p.os[44]=e;e=Object.create(null);e[0]=new RegExp(" (Dar)(win)/(9).(\\d+).*\\((?:i386|x86_64|Power Macintosh)\\)");e[1]="Mac OS X";e[2]="10";e[3]="5";e[4]=0;p.os[45]=e;e=Object.create(null);e[0]=new RegExp(" (Dar)(win)/(10).(\\d+).*\\((?:i386|x86_64)\\)");e[1]="Mac OS X";e[2]="10";e[3]="6";e[4]=0;p.os[46]=e;e=Object.create(null);e[0]=new RegExp(" (Dar)(win)/(11).(\\d+).*\\((?:i386|x86_64)\\)");e[1]="Mac OS X";e[2]="10";e[3]="7";e[4]=0;p.os[47]=e;e=Object.create(null);e[0]=new RegExp(" (Dar)(win)/(12).(\\d+).*\\((?:i386|x86_64)\\)");e[1]="Mac OS X";e[2]="10";e[3]="8";e[4]=0;p.os[48]=e;e=Object.create(null);e[0]=new RegExp(" (Dar)(win)/(13).(\\d+).*\\((?:i386|x86_64)\\)");e[1]="Mac OS X";e[2]="10";e[3]="9";e[4]=0;p.os[49]=e;e=Object.create(null);e[0]=new RegExp("Mac_PowerPC");e[1]="Mac OS";e[2]=0;e[3]=0;e[4]=0;p.os[50]=e;e=Object.create(null);e[0]=new RegExp("(?:PPC|Intel) (Mac OS X)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[51]=e;e=Object.create(null);e[0]=new RegExp("^Box.*;(Darwin)/(10)\\.(1\\d)(?:\\.(\\d+))?");e[1]="Mac OS X";e[2]=0;e[3]=0;e[4]=0;p.os[52]=e;e=Object.create(null);e[0]=new RegExp("(Apple\\s?TV)(?:/(\\d+)\\.(\\d+))?");e[1]="ATV OS X";e[2]=0;e[3]=0;e[4]=0;p.os[53]=e;e=Object.create(null);e[0]=new RegExp("(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(\\d+)[_\\.](\\d+)(?:[_\\.](\\d+))?");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[54]=e;e=Object.create(null);e[0]=new RegExp("(iPhone|iPad|iPod); Opera");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[55]=e;e=Object.create(null);e[0]=new RegExp("(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[56]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(5)48\\.0\\.3.* Darwin/11\\.0\\.0");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[57]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(5)48\\.(0)\\.4.* Darwin/(1)1\\.0\\.0");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[58]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(5)48\\.(1)\\.4");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[59]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(4)85\\.1(3)\\.9");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[60]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(6)09\\.(1)\\.4");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[61]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/(6)(0)9");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[62]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/6(7)2\\.(1)\\.13");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[63]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/6(7)2\\.(1)\\.(1)4");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[64]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/6(7)(2)\\.1\\.15");e[1]="iOS";e[2]="7";e[3]="1";e[4]=0;p.os[65]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/6(7)2\\.(0)\\.(?:2|8)");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[66]=e;e=Object.create(null);e[0]=new RegExp("(CFNetwork)/709\\.1");e[1]="iOS";e[2]="8";e[3]="0.b5";e[4]=0;p.os[67]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/711\\.(\\d)");e[1]="iOS";e[2]="8";e[3]=0;e[4]=0;p.os[68]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/(720)\\.(\\d)");e[1]="Mac OS X";e[2]="10";e[3]="10";e[4]=0;p.os[69]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/(760)\\.(\\d)");e[1]="Mac OS X";e[2]="10";e[3]="11";e[4]=0;p.os[70]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/758\\.(\\d)");e[1]="iOS";e[2]="9";e[3]=0;e[4]=0;p.os[71]=e;e=Object.create(null);e[0]=new RegExp("(CF)(Network)/808\\.(\\d)");e[1]="iOS";e[2]="10";e[3]=0;e[4]=0;p.os[72]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/16\\.\\d+.*\\(x86_64\\)");e[1]="Mac OS X";e[2]="10";e[3]="12";e[4]=0;p.os[73]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/15\\.\\d+.*\\(x86_64\\)");e[1]="Mac OS X";e[2]="10";e[3]="11";e[4]=0;p.os[74]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/(9)\\.\\d+");e[1]="iOS";e[2]="1";e[3]=0;e[4]=0;p.os[75]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/(10)\\.\\d+");e[1]="iOS";e[2]="4";e[3]=0;e[4]=0;p.os[76]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/(11)\\.\\d+");e[1]="iOS";e[2]="5";e[3]=0;e[4]=0;p.os[77]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/.* Darwin/(13)\\.\\d+");e[1]="iOS";e[2]="6";e[3]=0;e[4]=0;p.os[78]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/6.* Darwin/(14)\\.\\d+");e[1]="iOS";e[2]="7";e[3]=0;e[4]=0;p.os[79]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/7.* Darwin/(14)\\.\\d+");e[1]="iOS";e[2]="8";e[3]="0";e[4]=0;p.os[80]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/7.* Darwin/(15)\\.\\d+");e[1]="iOS";e[2]="9";e[3]="0";e[4]=0;p.os[81]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/16\\.5\\.\\d+");e[1]="iOS";e[2]="10";e[3]="3";e[4]=0;p.os[82]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/16\\.6\\.\\d+");e[1]="iOS";e[2]="10";e[3]="3";e[4]="2";p.os[83]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/16\\.7\\.\\d+");e[1]="iOS";e[2]="10";e[3]="3";e[4]="3";p.os[84]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/(16)\\.\\d+");e[1]="iOS";e[2]="10";e[3]=0;e[4]=0;p.os[85]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/17\\.0\\.\\d+");e[1]="iOS";e[2]="11";e[3]="0";e[4]=0;p.os[86]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/17\\.2\\.\\d+");e[1]="iOS";e[2]="11";e[3]="1";e[4]=0;p.os[87]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/17\\.3\\.\\d+");e[1]="iOS";e[2]="11";e[3]="2";e[4]=0;p.os[88]=e;e=Object.create(null);e[0]=new RegExp("CFNetwork/8.* Darwin/(17)\\.\\d+");e[1]="iOS";e[2]="11";e[3]=0;e[4]=0;p.os[89]=e;e=Object.create(null);e[0]=new RegExp("\\b(iOS[ /]|iOS; |iPhone(?:/| v|[ _]OS[/,]|; | OS : |\\d,\\d/|\\d,\\d; )|iPad/)(\\d{1,2})[_\\.](\\d{1,2})(?:[_\\.](\\d+))?");e[1]="iOS";e[2]=0;e[3]=0;e[4]=0;p.os[90]=e;e=Object.create(null);e[0]=new RegExp("\\((iOS);");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[91]=e;e=Object.create(null);e[0]=new RegExp("(tvOS)/(\\d+).(\\d+)");e[1]="tvOS";e[2]=0;e[3]=0;e[4]=0;p.os[92]=e;e=Object.create(null);e[0]=new RegExp("(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="Chrome OS";e[2]=0;e[3]=0;e[4]=0;p.os[93]=e;e=Object.create(null);e[0]=new RegExp("([Dd]ebian)");e[1]="Debian";e[2]=0;e[3]=0;e[4]=0;p.os[94]=e;e=Object.create(null);e[0]=new RegExp("(Linux Mint)(?:/(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[95]=e;e=Object.create(null);e[0]=new RegExp("(Mandriva)(?: Linux)?/(?:[\\d.-]+m[a-z]{2}(\\d+).(\\d))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[96]=e;e=Object.create(null);e[0]=new RegExp("(Symbian[Oo][Ss])[/ ](\\d+)\\.(\\d+)");e[1]="Symbian OS";e[2]=0;e[3]=0;e[4]=0;p.os[97]=e;e=Object.create(null);e[0]=new RegExp("(Symbian/3).+NokiaBrowser/7\\.3");e[1]="Symbian^3 Anna";e[2]=0;e[3]=0;e[4]=0;p.os[98]=e;e=Object.create(null);e[0]=new RegExp("(Symbian/3).+NokiaBrowser/7\\.4");e[1]="Symbian^3 Belle";e[2]=0;e[3]=0;e[4]=0;p.os[99]=e;e=Object.create(null);e[0]=new RegExp("(Symbian/3)");e[1]="Symbian^3";e[2]=0;e[3]=0;e[4]=0;p.os[100]=e;e=Object.create(null);e[0]=new RegExp("\\b(Series 60|SymbOS|S60Version|S60V\\d|S60\\b)");e[1]="Symbian OS";e[2]=0;e[3]=0;e[4]=0;p.os[101]=e;e=Object.create(null);e[0]=new RegExp("(MeeGo)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[102]=e;e=Object.create(null);e[0]=new RegExp("Symbian [Oo][Ss]");e[1]="Symbian OS";e[2]=0;e[3]=0;e[4]=0;p.os[103]=e;e=Object.create(null);e[0]=new RegExp("Series40;");e[1]="Nokia Series 40";e[2]=0;e[3]=0;e[4]=0;p.os[104]=e;e=Object.create(null);e[0]=new RegExp("Series30Plus;");e[1]="Nokia Series 30 Plus";e[2]=0;e[3]=0;e[4]=0;p.os[105]=e;e=Object.create(null);e[0]=new RegExp("(BB10);.+Version/(\\d+)\\.(\\d+)\\.(\\d+)");e[1]="BlackBerry OS";e[2]=0;e[3]=0;e[4]=0;p.os[106]=e;e=Object.create(null);e[0]=new RegExp("(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="BlackBerry OS";e[2]=0;e[3]=0;e[4]=0;p.os[107]=e;e=Object.create(null);e[0]=new RegExp("(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="BlackBerry OS";e[2]=0;e[3]=0;e[4]=0;p.os[108]=e;e=Object.create(null);e[0]=new RegExp("(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)");e[1]="BlackBerry Tablet OS";e[2]=0;e[3]=0;e[4]=0;p.os[109]=e;e=Object.create(null);e[0]=new RegExp("(Play[Bb]ook)");e[1]="BlackBerry Tablet OS";e[2]=0;e[3]=0;e[4]=0;p.os[110]=e;e=Object.create(null);e[0]=new RegExp("(Black[Bb]erry)");e[1]="BlackBerry OS";e[2]=0;e[3]=0;e[4]=0;p.os[111]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/18.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="1";e[3]="0";e[4]="1";p.os[112]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/18.1 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="1";e[3]="1";e[4]=0;p.os[113]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/26.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="1";e[3]="2";e[4]=0;p.os[114]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/28.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="1";e[3]="3";e[4]=0;p.os[115]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/30.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="1";e[3]="4";e[4]=0;p.os[116]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/32.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="2";e[3]="0";e[4]=0;p.os[117]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Gecko/34.0 Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]="2";e[3]="1";e[4]=0;p.os[118]=e;e=Object.create(null);e[0]=new RegExp("\\((?:Mobile|Tablet);.+Firefox/\\d+\\.\\d+");e[1]="Firefox OS";e[2]=0;e[3]=0;e[4]=0;p.os[119]=e;e=Object.create(null);e[0]=new RegExp("(BREW)[ /](\\d+)\\.(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[120]=e;e=Object.create(null);e[0]=new RegExp("(BREW);");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[121]=e;e=Object.create(null);e[0]=new RegExp("(Brew MP|BMP)[ /](\\d+)\\.(\\d+)\\.(\\d+)");e[1]="Brew MP";e[2]=0;e[3]=0;e[4]=0;p.os[122]=e;e=Object.create(null);e[0]=new RegExp("BMP;");e[1]="Brew MP";e[2]=0;e[3]=0;e[4]=0;p.os[123]=e;e=Object.create(null);e[0]=new RegExp("(GoogleTV)(?: (\\d+)\\.(\\d+)(?:\\.(\\d+))?|/[\\da-z]+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[124]=e;e=Object.create(null);e[0]=new RegExp("(WebTV)/(\\d+).(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[125]=e;e=Object.create(null);e[0]=new RegExp("(CrKey)(?:[/](\\d+)\\.(\\d+)(?:\\.(\\d+))?)?");e[1]="Chromecast";e[2]=0;e[3]=0;e[4]=0;p.os[126]=e;e=Object.create(null);e[0]=new RegExp("(hpw|web)OS/(\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]="webOS";e[2]=0;e[3]=0;e[4]=0;p.os[127]=e;e=Object.create(null);e[0]=new RegExp("(VRE);");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[128]=e;e=Object.create(null);e[0]=new RegExp("(Fedora|Red Hat|PCLinuxOS|Puppy|Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Slackware|(?:Free|Open|Net|\\b)BSD)[/ ](\\d+)\\.(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[129]=e;e=Object.create(null);e[0]=new RegExp("(Linux)[ /](\\d+)\\.(\\d+)(?:\\.(\\d+))?.*gentoo");e[1]="Gentoo";e[2]=0;e[3]=0;e[4]=0;p.os[130]=e;e=Object.create(null);e[0]=new RegExp("\\((Bada);");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[131]=e;e=Object.create(null);e[0]=new RegExp("(Windows|Android|WeTab|Maemo|Web0S)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[132]=e;e=Object.create(null);e[0]=new RegExp("(Ubuntu|Kubuntu|Arch Linux|CentOS|Slackware|Gentoo|openSUSE|SUSE|Red Hat|Fedora|PCLinuxOS|Mageia|(?:Free|Open|Net|\\b)BSD)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[133]=e;e=Object.create(null);e[0]=new RegExp("(Linux)(?:[ /](\\d+)\\.(\\d+)(?:\\.(\\d+))?)?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[134]=e;e=Object.create(null);e[0]=new RegExp("SunOS");e[1]="Solaris";e[2]=0;e[3]=0;e[4]=0;p.os[135]=e;e=Object.create(null);e[0]=new RegExp("^(Roku)/DVP-(\\d+)\\.(\\d+)");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[136]=e;e=Object.create(null);e[0]=new RegExp("(iOS) (\\d+)\\.(\\d+)(?:\\.(\\d+))?");e[1]=0;e[2]=0;e[3]=0;e[4]=0;p.os[137]=e;p.os.length=138});var VC=G((y7,H5)=>{H5.exports=[{name:"nodejs",version:"0.2.0",date:"2011-08-26",lts:!1,security:!1},{name:"nodejs",version:"0.3.0",date:"2011-08-26",lts:!1,security:!1},{name:"nodejs",version:"0.4.0",date:"2011-08-26",lts:!1,security:!1},{name:"nodejs",version:"0.5.0",date:"2011-08-26",lts:!1,security:!1},{name:"nodejs",version:"0.6.0",date:"2011-11-04",lts:!1,security:!1},{name:"nodejs",version:"0.7.0",date:"2012-01-17",lts:!1,security:!1},{name:"nodejs",version:"0.8.0",date:"2012-06-22",lts:!1,security:!1},{name:"nodejs",version:"0.9.0",date:"2012-07-20",lts:!1,security:!1},{name:"nodejs",version:"0.10.0",date:"2013-03-11",lts:!1,security:!1},{name:"nodejs",version:"0.11.0",date:"2013-03-28",lts:!1,security:!1},{name:"nodejs",version:"0.12.0",date:"2015-02-06",lts:!1,security:!1},{name:"iojs",version:"1.0.0",date:"2015-01-14"},{name:"iojs",version:"1.1.0",date:"2015-02-03"},{name:"iojs",version:"1.2.0",date:"2015-02-11"},{name:"iojs",version:"1.3.0",date:"2015-02-20"},{name:"iojs",version:"1.5.0",date:"2015-03-06"},{name:"iojs",version:"1.6.0",date:"2015-03-20"},{name:"iojs",version:"2.0.0",date:"2015-05-04"},{name:"iojs",version:"2.1.0",date:"2015-05-24"},{name:"iojs",version:"2.2.0",date:"2015-06-01"},{name:"iojs",version:"2.3.0",date:"2015-06-13"},{name:"iojs",version:"2.4.0",date:"2015-07-17"},{name:"iojs",version:"2.5.0",date:"2015-07-28"},{name:"iojs",version:"3.0.0",date:"2015-08-04"},{name:"iojs",version:"3.1.0",date:"2015-08-19"},{name:"iojs",version:"3.2.0",date:"2015-08-25"},{name:"iojs",version:"3.3.0",date:"2015-09-02"},{name:"nodejs",version:"4.0.0",date:"2015-09-08",lts:!1,security:!1},{name:"nodejs",version:"4.1.0",date:"2015-09-17",lts:!1,security:!1},{name:"nodejs",version:"4.2.0",date:"2015-10-12",lts:"Argon",security:!1},{name:"nodejs",version:"4.3.0",date:"2016-02-09",lts:"Argon",security:!1},{name:"nodejs",version:"4.4.0",date:"2016-03-08",lts:"Argon",security:!1},{name:"nodejs",version:"4.5.0",date:"2016-08-16",lts:"Argon",security:!1},{name:"nodejs",version:"4.6.0",date:"2016-09-27",lts:"Argon",security:!0},{name:"nodejs",version:"4.7.0",date:"2016-12-06",lts:"Argon",security:!1},{name:"nodejs",version:"4.8.0",date:"2017-02-21",lts:"Argon",security:!1},{name:"nodejs",version:"4.9.0",date:"2018-03-28",lts:"Argon",security:!0},{name:"nodejs",version:"5.0.0",date:"2015-10-29",lts:!1,security:!1},{name:"nodejs",version:"5.1.0",date:"2015-11-17",lts:!1,security:!1},{name:"nodejs",version:"5.2.0",date:"2015-12-09",lts:!1,security:!1},{name:"nodejs",version:"5.3.0",date:"2015-12-15",lts:!1,security:!1},{name:"nodejs",version:"5.4.0",date:"2016-01-06",lts:!1,security:!1},{name:"nodejs",version:"5.5.0",date:"2016-01-21",lts:!1,security:!1},{name:"nodejs",version:"5.6.0",date:"2016-02-09",lts:!1,security:!1},{name:"nodejs",version:"5.7.0",date:"2016-02-23",lts:!1,security:!1},{name:"nodejs",version:"5.8.0",date:"2016-03-09",lts:!1,security:!1},{name:"nodejs",version:"5.9.0",date:"2016-03-16",lts:!1,security:!1},{name:"nodejs",version:"5.10.0",date:"2016-04-01",lts:!1,security:!1},{name:"nodejs",version:"5.11.0",date:"2016-04-21",lts:!1,security:!1},{name:"nodejs",version:"5.12.0",date:"2016-06-23",lts:!1,security:!1},{name:"nodejs",version:"6.0.0",date:"2016-04-26",lts:!1,security:!1},{name:"nodejs",version:"6.1.0",date:"2016-05-05",lts:!1,security:!1},{name:"nodejs",version:"6.2.0",date:"2016-05-17",lts:!1,security:!1},{name:"nodejs",version:"6.3.0",date:"2016-07-06",lts:!1,security:!1},{name:"nodejs",version:"6.4.0",date:"2016-08-12",lts:!1,security:!1},{name:"nodejs",version:"6.5.0",date:"2016-08-26",lts:!1,security:!1},{name:"nodejs",version:"6.6.0",date:"2016-09-14",lts:!1,security:!1},{name:"nodejs",version:"6.7.0",date:"2016-09-27",lts:!1,security:!0},{name:"nodejs",version:"6.8.0",date:"2016-10-12",lts:!1,security:!1},{name:"nodejs",version:"6.9.0",date:"2016-10-18",lts:"Boron",security:!1},{name:"nodejs",version:"6.10.0",date:"2017-02-21",lts:"Boron",security:!1},{name:"nodejs",version:"6.11.0",date:"2017-06-06",lts:"Boron",security:!1},{name:"nodejs",version:"6.12.0",date:"2017-11-06",lts:"Boron",security:!1},{name:"nodejs",version:"6.13.0",date:"2018-02-10",lts:"Boron",security:!1},{name:"nodejs",version:"6.14.0",date:"2018-03-28",lts:"Boron",security:!0},{name:"nodejs",version:"6.15.0",date:"2018-11-27",lts:"Boron",security:!0},{name:"nodejs",version:"6.16.0",date:"2018-12-26",lts:"Boron",security:!1},{name:"nodejs",version:"6.17.0",date:"2019-02-28",lts:"Boron",security:!0},{name:"nodejs",version:"7.0.0",date:"2016-10-25",lts:!1,security:!1},{name:"nodejs",version:"7.1.0",date:"2016-11-08",lts:!1,security:!1},{name:"nodejs",version:"7.2.0",date:"2016-11-22",lts:!1,security:!1},{name:"nodejs",version:"7.3.0",date:"2016-12-20",lts:!1,security:!1},{name:"nodejs",version:"7.4.0",date:"2017-01-04",lts:!1,security:!1},{name:"nodejs",version:"7.5.0",date:"2017-01-31",lts:!1,security:!1},{name:"nodejs",version:"7.6.0",date:"2017-02-21",lts:!1,security:!1},{name:"nodejs",version:"7.7.0",date:"2017-02-28",lts:!1,security:!1},{name:"nodejs",version:"7.8.0",date:"2017-03-29",lts:!1,security:!1},{name:"nodejs",version:"7.9.0",date:"2017-04-11",lts:!1,security:!1},{name:"nodejs",version:"7.10.0",date:"2017-05-02",lts:!1,security:!1},{name:"nodejs",version:"8.0.0",date:"2017-05-30",lts:!1,security:!1},{name:"nodejs",version:"8.1.0",date:"2017-06-08",lts:!1,security:!1},{name:"nodejs",version:"8.2.0",date:"2017-07-19",lts:!1,security:!1},{name:"nodejs",version:"8.3.0",date:"2017-08-08",lts:!1,security:!1},{name:"nodejs",version:"8.4.0",date:"2017-08-15",lts:!1,security:!1},{name:"nodejs",version:"8.5.0",date:"2017-09-12",lts:!1,security:!1},{name:"nodejs",version:"8.6.0",date:"2017-09-26",lts:!1,security:!1},{name:"nodejs",version:"8.7.0",date:"2017-10-11",lts:!1,security:!1},{name:"nodejs",version:"8.8.0",date:"2017-10-24",lts:!1,security:!1},{name:"nodejs",version:"8.9.0",date:"2017-10-31",lts:"Carbon",security:!1},{name:"nodejs",version:"8.10.0",date:"2018-03-06",lts:"Carbon",security:!1},{name:"nodejs",version:"8.11.0",date:"2018-03-28",lts:"Carbon",security:!0},{name:"nodejs",version:"8.12.0",date:"2018-09-10",lts:"Carbon",security:!1},{name:"nodejs",version:"8.13.0",date:"2018-11-20",lts:"Carbon",security:!1},{name:"nodejs",version:"8.14.0",date:"2018-11-27",lts:"Carbon",security:!0},{name:"nodejs",version:"8.15.0",date:"2018-12-26",lts:"Carbon",security:!1},{name:"nodejs",version:"8.16.0",date:"2019-04-16",lts:"Carbon",security:!1},{name:"nodejs",version:"8.17.0",date:"2019-12-17",lts:"Carbon",security:!0},{name:"nodejs",version:"9.0.0",date:"2017-10-31",lts:!1,security:!1},{name:"nodejs",version:"9.1.0",date:"2017-11-07",lts:!1,security:!1},{name:"nodejs",version:"9.2.0",date:"2017-11-14",lts:!1,security:!1},{name:"nodejs",version:"9.3.0",date:"2017-12-12",lts:!1,security:!1},{name:"nodejs",version:"9.4.0",date:"2018-01-10",lts:!1,security:!1},{name:"nodejs",version:"9.5.0",date:"2018-01-31",lts:!1,security:!1},{name:"nodejs",version:"9.6.0",date:"2018-02-21",lts:!1,security:!1},{name:"nodejs",version:"9.7.0",date:"2018-03-01",lts:!1,security:!1},{name:"nodejs",version:"9.8.0",date:"2018-03-07",lts:!1,security:!1},{name:"nodejs",version:"9.9.0",date:"2018-03-21",lts:!1,security:!1},{name:"nodejs",version:"9.10.0",date:"2018-03-28",lts:!1,security:!0},{name:"nodejs",version:"9.11.0",date:"2018-04-04",lts:!1,security:!1},{name:"nodejs",version:"10.0.0",date:"2018-04-24",lts:!1,security:!1},{name:"nodejs",version:"10.1.0",date:"2018-05-08",lts:!1,security:!1},{name:"nodejs",version:"10.2.0",date:"2018-05-23",lts:!1,security:!1},{name:"nodejs",version:"10.3.0",date:"2018-05-29",lts:!1,security:!1},{name:"nodejs",version:"10.4.0",date:"2018-06-06",lts:!1,security:!1},{name:"nodejs",version:"10.5.0",date:"2018-06-20",lts:!1,security:!1},{name:"nodejs",version:"10.6.0",date:"2018-07-04",lts:!1,security:!1},{name:"nodejs",version:"10.7.0",date:"2018-07-18",lts:!1,security:!1},{name:"nodejs",version:"10.8.0",date:"2018-08-01",lts:!1,security:!1},{name:"nodejs",version:"10.9.0",date:"2018-08-15",lts:!1,security:!1},{name:"nodejs",version:"10.10.0",date:"2018-09-06",lts:!1,security:!1},{name:"nodejs",version:"10.11.0",date:"2018-09-19",lts:!1,security:!1},{name:"nodejs",version:"10.12.0",date:"2018-10-10",lts:!1,security:!1},{name:"nodejs",version:"10.13.0",date:"2018-10-30",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.14.0",date:"2018-11-27",lts:"Dubnium",security:!0},{name:"nodejs",version:"10.15.0",date:"2018-12-26",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.16.0",date:"2019-05-28",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.17.0",date:"2019-10-22",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.18.0",date:"2019-12-17",lts:"Dubnium",security:!0},{name:"nodejs",version:"10.19.0",date:"2020-02-05",lts:"Dubnium",security:!0},{name:"nodejs",version:"10.20.0",date:"2020-03-26",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.21.0",date:"2020-06-02",lts:"Dubnium",security:!0},{name:"nodejs",version:"10.22.0",date:"2020-07-21",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.23.0",date:"2020-10-27",lts:"Dubnium",security:!1},{name:"nodejs",version:"10.24.0",date:"2021-02-23",lts:"Dubnium",security:!0},{name:"nodejs",version:"11.0.0",date:"2018-10-23",lts:!1,security:!1},{name:"nodejs",version:"11.1.0",date:"2018-10-30",lts:!1,security:!1},{name:"nodejs",version:"11.2.0",date:"2018-11-15",lts:!1,security:!1},{name:"nodejs",version:"11.3.0",date:"2018-11-27",lts:!1,security:!0},{name:"nodejs",version:"11.4.0",date:"2018-12-07",lts:!1,security:!1},{name:"nodejs",version:"11.5.0",date:"2018-12-18",lts:!1,security:!1},{name:"nodejs",version:"11.6.0",date:"2018-12-26",lts:!1,security:!1},{name:"nodejs",version:"11.7.0",date:"2019-01-17",lts:!1,security:!1},{name:"nodejs",version:"11.8.0",date:"2019-01-24",lts:!1,security:!1},{name:"nodejs",version:"11.9.0",date:"2019-01-30",lts:!1,security:!1},{name:"nodejs",version:"11.10.0",date:"2019-02-14",lts:!1,security:!1},{name:"nodejs",version:"11.11.0",date:"2019-03-05",lts:!1,security:!1},{name:"nodejs",version:"11.12.0",date:"2019-03-14",lts:!1,security:!1},{name:"nodejs",version:"11.13.0",date:"2019-03-28",lts:!1,security:!1},{name:"nodejs",version:"11.14.0",date:"2019-04-10",lts:!1,security:!1},{name:"nodejs",version:"11.15.0",date:"2019-04-30",lts:!1,security:!1},{name:"nodejs",version:"12.0.0",date:"2019-04-23",lts:!1,security:!1},{name:"nodejs",version:"12.1.0",date:"2019-04-29",lts:!1,security:!1},{name:"nodejs",version:"12.2.0",date:"2019-05-07",lts:!1,security:!1},{name:"nodejs",version:"12.3.0",date:"2019-05-21",lts:!1,security:!1},{name:"nodejs",version:"12.4.0",date:"2019-06-04",lts:!1,security:!1},{name:"nodejs",version:"12.5.0",date:"2019-06-26",lts:!1,security:!1},{name:"nodejs",version:"12.6.0",date:"2019-07-03",lts:!1,security:!1},{name:"nodejs",version:"12.7.0",date:"2019-07-23",lts:!1,security:!1},{name:"nodejs",version:"12.8.0",date:"2019-08-06",lts:!1,security:!1},{name:"nodejs",version:"12.9.0",date:"2019-08-20",lts:!1,security:!1},{name:"nodejs",version:"12.10.0",date:"2019-09-04",lts:!1,security:!1},{name:"nodejs",version:"12.11.0",date:"2019-09-25",lts:!1,security:!1},{name:"nodejs",version:"12.12.0",date:"2019-10-11",lts:!1,security:!1},{name:"nodejs",version:"12.13.0",date:"2019-10-21",lts:"Erbium",security:!1},{name:"nodejs",version:"12.14.0",date:"2019-12-17",lts:"Erbium",security:!0},{name:"nodejs",version:"12.15.0",date:"2020-02-05",lts:"Erbium",security:!0},{name:"nodejs",version:"12.16.0",date:"2020-02-11",lts:"Erbium",security:!1},{name:"nodejs",version:"12.17.0",date:"2020-05-26",lts:"Erbium",security:!1},{name:"nodejs",version:"12.18.0",date:"2020-06-02",lts:"Erbium",security:!0},{name:"nodejs",version:"12.19.0",date:"2020-10-06",lts:"Erbium",security:!1},{name:"nodejs",version:"12.20.0",date:"2020-11-24",lts:"Erbium",security:!1},{name:"nodejs",version:"12.21.0",date:"2021-02-23",lts:"Erbium",security:!0},{name:"nodejs",version:"13.0.0",date:"2019-10-22",lts:!1,security:!1},{name:"nodejs",version:"13.1.0",date:"2019-11-05",lts:!1,security:!1},{name:"nodejs",version:"13.2.0",date:"2019-11-21",lts:!1,security:!1},{name:"nodejs",version:"13.3.0",date:"2019-12-03",lts:!1,security:!1},{name:"nodejs",version:"13.4.0",date:"2019-12-17",lts:!1,security:!0},{name:"nodejs",version:"13.5.0",date:"2019-12-18",lts:!1,security:!1},{name:"nodejs",version:"13.6.0",date:"2020-01-07",lts:!1,security:!1},{name:"nodejs",version:"13.7.0",date:"2020-01-21",lts:!1,security:!1},{name:"nodejs",version:"13.8.0",date:"2020-02-05",lts:!1,security:!0},{name:"nodejs",version:"13.9.0",date:"2020-02-18",lts:!1,security:!1},{name:"nodejs",version:"13.10.0",date:"2020-03-04",lts:!1,security:!1},{name:"nodejs",version:"13.11.0",date:"2020-03-12",lts:!1,security:!1},{name:"nodejs",version:"13.12.0",date:"2020-03-26",lts:!1,security:!1},{name:"nodejs",version:"13.13.0",date:"2020-04-14",lts:!1,security:!1},{name:"nodejs",version:"13.14.0",date:"2020-04-29",lts:!1,security:!1},{name:"nodejs",version:"14.0.0",date:"2020-04-21",lts:!1,security:!1},{name:"nodejs",version:"14.1.0",date:"2020-04-29",lts:!1,security:!1},{name:"nodejs",version:"14.2.0",date:"2020-05-05",lts:!1,security:!1},{name:"nodejs",version:"14.3.0",date:"2020-05-19",lts:!1,security:!1},{name:"nodejs",version:"14.4.0",date:"2020-06-02",lts:!1,security:!0},{name:"nodejs",version:"14.5.0",date:"2020-06-30",lts:!1,security:!1},{name:"nodejs",version:"14.6.0",date:"2020-07-20",lts:!1,security:!1},{name:"nodejs",version:"14.7.0",date:"2020-07-29",lts:!1,security:!1},{name:"nodejs",version:"14.8.0",date:"2020-08-11",lts:!1,security:!1},{name:"nodejs",version:"14.9.0",date:"2020-08-27",lts:!1,security:!1},{name:"nodejs",version:"14.10.0",date:"2020-09-08",lts:!1,security:!1},{name:"nodejs",version:"14.11.0",date:"2020-09-15",lts:!1,security:!0},{name:"nodejs",version:"14.12.0",date:"2020-09-22",lts:!1,security:!1},{name:"nodejs",version:"14.13.0",date:"2020-09-29",lts:!1,security:!1},{name:"nodejs",version:"14.14.0",date:"2020-10-15",lts:!1,security:!1},{name:"nodejs",version:"14.15.0",date:"2020-10-27",lts:"Fermium",security:!1},{name:"nodejs",version:"14.16.0",date:"2021-02-23",lts:"Fermium",security:!0},{name:"nodejs",version:"15.0.0",date:"2020-10-20",lts:!1,security:!1},{name:"nodejs",version:"15.1.0",date:"2020-11-04",lts:!1,security:!1},{name:"nodejs",version:"15.2.0",date:"2020-11-10",lts:!1,security:!1},{name:"nodejs",version:"15.3.0",date:"2020-11-24",lts:!1,security:!1},{name:"nodejs",version:"15.4.0",date:"2020-12-09",lts:!1,security:!1},{name:"nodejs",version:"15.5.0",date:"2020-12-22",lts:!1,security:!1},{name:"nodejs",version:"15.6.0",date:"2021-01-14",lts:!1,security:!1},{name:"nodejs",version:"15.7.0",date:"2021-01-25",lts:!1,security:!1},{name:"nodejs",version:"15.8.0",date:"2021-02-02",lts:!1,security:!1},{name:"nodejs",version:"15.9.0",date:"2021-02-18",lts:!1,security:!1},{name:"nodejs",version:"15.10.0",date:"2021-02-23",lts:!1,security:!0}]});var GC=G((b7,zC)=>{S();zC.exports={A:"ie",B:"edge",C:"firefox",D:"chrome",E:"safari",F:"opera",G:"ios_saf",H:"op_mini",I:"android",J:"bb",K:"op_mob",L:"and_chr",M:"and_ff",N:"ie_mob",O:"and_uc",P:"samsung",Q:"and_qq",R:"baidu",S:"kaios"}});var KC=G((w7,JC)=>{S();JC.exports.browsers=GC()});var XC=G((E7,YC)=>{S();YC.exports={"0":"43","1":"44","2":"45","3":"46","4":"47","5":"48","6":"49","7":"50","8":"51","9":"52",A:"10",B:"11",C:"12",D:"7",E:"8",F:"9",G:"15",H:"91",I:"4",J:"6",K:"13",L:"14",M:"16",N:"17",O:"18",P:"89",Q:"62",R:"79",S:"80",T:"81",U:"83",V:"84",W:"85",X:"86",Y:"87",Z:"88",a:"90",b:"5",c:"19",d:"20",e:"21",f:"22",g:"23",h:"24",i:"25",j:"26",k:"27",l:"28",m:"29",n:"30",o:"31",p:"32",q:"33",r:"34",s:"35",t:"36",u:"37",v:"38",w:"39",x:"40",y:"41",z:"42",AB:"53",BB:"54",CB:"55",DB:"56",EB:"57",FB:"58",GB:"60",HB:"63",IB:"64",JB:"65",KB:"66",LB:"67",MB:"68",NB:"69",OB:"70",PB:"71",QB:"72",RB:"73",SB:"74",TB:"75",UB:"76",VB:"11.1",WB:"12.1",XB:"3",YB:"59",ZB:"61",aB:"77",bB:"78",cB:"3.2",dB:"10.1",eB:"11.5",fB:"4.2-4.3",gB:"5.5",hB:"2",iB:"82",jB:"3.5",kB:"3.6",lB:"92",mB:"93",nB:"94",oB:"3.1",pB:"5.1",qB:"6.1",rB:"7.1",sB:"9.1",tB:"13.1",uB:"14.1",vB:"TP",wB:"9.5-9.6",xB:"10.0-10.1",yB:"10.5",zB:"10.6","0B":"11.6","1B":"4.0-4.1","2B":"5.0-5.1","3B":"6.0-6.1","4B":"7.0-7.1","5B":"8.1-8.4","6B":"9.0-9.2","7B":"9.3","8B":"10.0-10.2","9B":"10.3",AC:"11.0-11.2",BC:"11.3-11.4",CC:"12.0-12.1",DC:"12.2-12.4",EC:"13.0-13.1",FC:"13.2",GC:"13.3",HC:"13.4-13.7",IC:"14.0-14.4",JC:"14.5-14.6",KC:"all",LC:"2.1",MC:"2.2",NC:"2.3",OC:"4.1",PC:"4.4",QC:"4.4.3-4.4.4",RC:"12.12",SC:"5.0-5.4",TC:"6.2-6.4",UC:"7.2-7.4",VC:"8.2",WC:"9.2",XC:"11.1-11.2",YC:"12.0",ZC:"13.0",aC:"14.0",bC:"10.4",cC:"7.12",dC:"2.5"}});var QC=G((_7,ZC)=>{S();ZC.exports.browserVersions=XC()});var tx=G((S7,ex)=>{S();ex.exports={A:{A:{J:.0131217,D:.00621152,E:.0199047,F:.0928884,A:.0132698,B:.849265,gB:.009298},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","gB","J","D","E","F","A","B","","",""],E:"IE",F:{gB:962323200,J:998870400,D:1161129600,E:1237420800,F:1300060800,A:1346716800,B:1381968e3}},B:{A:{C:.008408,K:.004267,L:.004204,G:.004204,M:.008408,N:.033632,O:.092488,R:0,S:.004298,T:.00944,U:.00415,V:.008408,W:.008408,X:.012612,Y:.012612,Z:.016816,P:.079876,a:3.01006,H:.2102},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","C","K","L","G","M","N","O","R","S","T","U","V","W","X","Y","Z","P","a","H","","",""],E:"Edge",F:{C:1438128e3,K:1447286400,L:1470096e3,G:1491868800,M:1508198400,N:1525046400,O:1542067200,R:1579046400,S:1581033600,T:1586736e3,U:1590019200,V:1594857600,W:1598486400,X:1602201600,Y:1605830400,Z:161136e4,P:1614816e3,a:1618358400,H:1622073600},D:{C:"ms",K:"ms",L:"ms",G:"ms",M:"ms",N:"ms",O:"ms"}},C:{A:{"0":.058856,"1":.004204,"2":.004204,"3":.004525,"4":.004271,"5":.008408,"6":.004538,"7":.004267,"8":.004204,"9":.071468,hB:.012813,XB:.004271,I:.02102,b:.004879,J:.020136,D:.005725,E:.004525,F:.00533,A:.004283,B:.008408,C:.004471,K:.004486,L:.00453,G:.008542,M:.004417,N:.004425,O:.008542,c:.004443,d:.004283,e:.008542,f:.013698,g:.008542,h:.008786,i:.017084,j:.004317,k:.004393,l:.004418,m:.008834,n:.008542,o:.008928,p:.004471,q:.009284,r:.004707,s:.009076,t:.004425,u:.004783,v:.004271,w:.004783,x:.00487,y:.005029,z:.0047,AB:.004335,BB:.004204,CB:.004204,DB:.012612,EB:.004425,FB:.004204,YB:.004204,GB:.008408,ZB:.00472,Q:.004425,HB:.02102,IB:.00415,JB:.004267,KB:.008408,LB:.004267,MB:.012612,NB:.00415,OB:.004204,PB:.004425,QB:.008408,RB:.00415,SB:.00415,TB:.008542,UB:.004298,aB:.004204,bB:.14714,R:.008408,S:.008408,T:.012612,iB:.016816,U:.012612,V:.025224,W:.02102,X:.033632,Y:.071468,Z:2.3122,P:.029428,a:0,H:0,jB:.008786,kB:.00487},B:"moz",C:["hB","XB","jB","kB","I","b","J","D","E","F","A","B","C","K","L","G","M","N","O","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","AB","BB","CB","DB","EB","FB","YB","GB","ZB","Q","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","aB","bB","R","S","T","iB","U","V","W","X","Y","Z","P","a","H",""],E:"Firefox",F:{"0":1450137600,"1":1453852800,"2":1457395200,"3":1461628800,"4":1465257600,"5":1470096e3,"6":1474329600,"7":1479168e3,"8":1485216e3,"9":1488844800,hB:1161648e3,XB:1213660800,jB:124632e4,kB:1264032e3,I:1300752e3,b:1308614400,J:1313452800,D:1317081600,E:1317081600,F:1320710400,A:1324339200,B:1327968e3,C:1331596800,K:1335225600,L:1338854400,G:1342483200,M:1346112e3,N:1349740800,O:1353628800,c:1357603200,d:1361232e3,e:1364860800,f:1368489600,g:1372118400,h:1375747200,i:1379376e3,j:1386633600,k:1391472e3,l:1395100800,m:1398729600,n:1402358400,o:1405987200,p:1409616e3,q:1413244800,r:1417392e3,s:1421107200,t:1424736e3,u:1428278400,v:1431475200,w:1435881600,x:1439251200,y:144288e4,z:1446508800,AB:149256e4,BB:1497312e3,CB:1502150400,DB:1506556800,EB:1510617600,FB:1516665600,YB:1520985600,GB:1525824e3,ZB:1529971200,Q:1536105600,HB:1540252800,IB:1544486400,JB:154872e4,KB:1552953600,LB:1558396800,MB:1562630400,NB:1567468800,OB:1571788800,PB:1575331200,QB:1578355200,RB:1581379200,SB:1583798400,TB:1586304e3,UB:1588636800,aB:1591056e3,bB:1593475200,R:1595894400,S:1598313600,T:1600732800,iB:1603152e3,U:1605571200,V:1607990400,W:1611619200,X:1614038400,Y:1616457600,Z:1618790400,P:1622505600,a:null,H:null}},D:{A:{"0":.008408,"1":.004465,"2":.004642,"3":.004891,"4":.008408,"5":.02102,"6":.214404,"7":.004204,"8":.016816,"9":.004204,I:.004706,b:.004879,J:.004879,D:.005591,E:.005591,F:.005591,A:.004534,B:.004464,C:.010424,K:.0083,L:.004706,G:.015087,M:.004393,N:.004393,O:.008652,c:.008542,d:.004393,e:.004317,f:.012612,g:.008786,h:.008408,i:.004461,j:.004298,k:.004326,l:.0047,m:.004538,n:.008542,o:.008596,p:.004566,q:.004204,r:.008408,s:.012612,t:.004335,u:.004464,v:.025224,w:.004464,x:.012612,y:.0236,z:.004403,AB:.058856,BB:.008408,CB:.012612,DB:.04204,EB:.008408,FB:.008408,YB:.008408,GB:.016816,ZB:.121916,Q:.008408,HB:.02102,IB:.025224,JB:.02102,KB:.02102,LB:.033632,MB:.029428,NB:.067264,OB:.071468,PB:.025224,QB:.058856,RB:.02102,SB:.113508,TB:.092488,UB:.067264,aB:.029428,bB:.075672,R:.18918,S:.1051,T:.079876,U:.130324,V:.100896,W:.243832,X:.16816,Y:.311096,Z:.344728,P:1.0468,a:21.4866,H:.790352,lB:.025224,mB:.004204,nB:0},B:"webkit",C:["","","","I","b","J","D","E","F","A","B","C","K","L","G","M","N","O","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","AB","BB","CB","DB","EB","FB","YB","GB","ZB","Q","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","aB","bB","R","S","T","U","V","W","X","Y","Z","P","a","H","lB","mB","nB"],E:"Chrome",F:{"0":143208e4,"1":1437523200,"2":1441152e3,"3":1444780800,"4":1449014400,"5":1453248e3,"6":1456963200,"7":1460592e3,"8":1464134400,"9":1469059200,I:1264377600,b:1274745600,J:1283385600,D:1287619200,E:1291248e3,F:1296777600,A:1299542400,B:1303862400,C:1307404800,K:1312243200,L:1316131200,G:1316131200,M:1319500800,N:1323734400,O:1328659200,c:1332892800,d:133704e4,e:1340668800,f:1343692800,g:1348531200,h:1352246400,i:1357862400,j:1361404800,k:1364428800,l:1369094400,m:1374105600,n:1376956800,o:1384214400,p:1389657600,q:1392940800,r:1397001600,s:1400544e3,t:1405468800,u:1409011200,v:141264e4,w:1416268800,x:1421798400,y:1425513600,z:1429401600,AB:1472601600,BB:1476230400,CB:1480550400,DB:1485302400,EB:1489017600,FB:149256e4,YB:1496707200,GB:1500940800,ZB:1504569600,Q:1508198400,HB:1512518400,IB:1516752e3,JB:1520294400,KB:1523923200,LB:1527552e3,MB:1532390400,NB:1536019200,OB:1539648e3,PB:1543968e3,QB:154872e4,RB:1552348800,SB:1555977600,TB:1559606400,UB:1564444800,aB:1568073600,bB:1571702400,R:1575936e3,S:1580860800,T:1586304e3,U:1589846400,V:1594684800,W:1598313600,X:1601942400,Y:1605571200,Z:1611014400,P:1614556800,a:1618272e3,H:1621987200,lB:null,mB:null,nB:null}},E:{A:{I:0,b:.008542,J:.004656,D:.004465,E:.218608,F:.004891,A:.004425,B:.008408,C:.012612,K:.088284,L:2.26175,G:0,oB:0,cB:.008692,pB:.109304,qB:.00456,rB:.004283,sB:.02102,dB:.02102,VB:.058856,WB:.088284,tB:.395176,uB:.748312,vB:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","oB","cB","I","b","pB","J","qB","D","rB","E","F","sB","A","dB","B","VB","C","WB","K","tB","L","uB","G","vB",""],E:"Safari",F:{oB:1205798400,cB:1226534400,I:1244419200,b:1275868800,pB:131112e4,J:1343174400,qB:13824e5,D:13824e5,rB:1410998400,E:1413417600,F:1443657600,sB:1458518400,A:1474329600,dB:1490572800,B:1505779200,VB:1522281600,C:1537142400,WB:1553472e3,K:1568851200,tB:1585008e3,L:1600214400,uB:1619395200,G:null,vB:null}},F:{A:{"0":.008542,"1":.004227,"2":.004725,"3":.008408,"4":.008942,"5":.004707,"6":.004827,"7":.004707,"8":.004707,"9":.004326,F:.0082,B:.016581,C:.004317,G:.00685,M:.00685,N:.00685,O:.005014,c:.006015,d:.004879,e:.006597,f:.006597,g:.013434,h:.006702,i:.006015,j:.005595,k:.004393,l:.008652,m:.004879,n:.004879,o:.004711,p:.005152,q:.005014,r:.009758,s:.004879,t:.008408,u:.004283,v:.004367,w:.004534,x:.008408,y:.004227,z:.004418,AB:.008922,BB:.014349,CB:.004425,DB:.00472,EB:.004425,FB:.004425,GB:.00472,Q:.004532,HB:.004566,IB:.02283,JB:.00867,KB:.004656,LB:.004642,MB:.004298,NB:.00944,OB:.00415,PB:.004271,QB:.004298,RB:.096692,SB:.008408,TB:.433012,UB:.437216,wB:.00685,xB:0,yB:.008392,zB:.004706,VB:.006229,eB:.004879,"0B":.008786,WB:.00472},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","F","wB","xB","yB","zB","B","VB","eB","0B","C","WB","G","M","N","O","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","AB","BB","CB","DB","EB","FB","GB","Q","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","","",""],E:"Opera",F:{"0":1486425600,"1":1490054400,"2":1494374400,"3":1498003200,"4":1502236800,"5":1506470400,"6":1510099200,"7":1515024e3,"8":1517961600,"9":1521676800,F:1150761600,wB:1223424e3,xB:1251763200,yB:1267488e3,zB:1277942400,B:1292457600,VB:1302566400,eB:1309219200,"0B":1323129600,C:1323129600,WB:1352073600,G:1372723200,M:1377561600,N:1381104e3,O:1386288e3,c:1390867200,d:1393891200,e:1399334400,f:1401753600,g:1405987200,h:1409616e3,i:1413331200,j:1417132800,k:1422316800,l:1425945600,m:1430179200,n:1433808e3,o:1438646400,p:1442448e3,q:1445904e3,r:1449100800,s:1454371200,t:1457308800,u:146232e4,v:1465344e3,w:1470096e3,x:1474329600,y:1477267200,z:1481587200,AB:1525910400,BB:1530144e3,CB:1534982400,DB:1537833600,EB:1543363200,FB:1548201600,GB:1554768e3,Q:1561593600,HB:1566259200,IB:1570406400,JB:1573689600,KB:1578441600,LB:1583971200,MB:1587513600,NB:1592956800,OB:1595894400,PB:1600128e3,QB:1603238400,RB:161352e4,SB:1612224e3,TB:1616544e3,UB:1619568e3},D:{F:"o",B:"o",C:"o",wB:"o",xB:"o",yB:"o",zB:"o",VB:"o",eB:"o","0B":"o",WB:"o"}},G:{A:{E:.00144955,cB:0,"1B":0,fB:.00289911,"2B":.00869732,"3B":.0449361,"4B":.0304406,"5B":.0202937,"6B":.0217433,"7B":.147854,"8B":.0347893,"9B":.149304,AC:.0855236,BC:.0739272,CC:.0768263,DC:.246424,EC:.0666794,FC:.0333397,GC:.172497,HC:.572573,IC:10.1498,JC:1.93225},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","cB","1B","fB","2B","3B","4B","E","5B","6B","7B","8B","9B","AC","BC","CC","DC","EC","FC","GC","HC","IC","JC","","",""],E:"Safari on iOS",F:{cB:1270252800,"1B":1283904e3,fB:1299628800,"2B":1331078400,"3B":1359331200,"4B":1394409600,E:1410912e3,"5B":1413763200,"6B":1442361600,"7B":1458518400,"8B":1473724800,"9B":1490572800,AC:1505779200,BC:1522281600,CC:1537142400,DC:1553472e3,EC:1568851200,FC:1572220800,GC:1580169600,HC:1585008e3,IC:1600214400,JC:1619395200}},H:{A:{KC:1.18546},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","KC","","",""],E:"Opera Mini",F:{KC:1426464e3}},I:{A:{XB:0,I:.0263634,H:0,LC:0,MC:0,NC:0,OC:.0301296,fB:.0979213,PC:0,QC:.43688},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","LC","MC","NC","XB","I","OC","fB","PC","QC","H","","",""],E:"Android Browser",F:{LC:1256515200,MC:1274313600,NC:1291593600,XB:1298332800,I:1318896e3,OC:1341792e3,fB:1374624e3,PC:1386547200,QC:1401667200,H:1621987200}},J:{A:{D:0,A:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","D","A","","",""],E:"Blackberry Browser",F:{D:1325376e3,A:1359504e3}},K:{A:{A:0,B:0,C:0,Q:.0111391,VB:0,eB:0,WB:0},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","VB","eB","C","WB","Q","","",""],E:"Opera Mobile",F:{A:1287100800,B:1300752e3,VB:1314835200,eB:1318291200,C:1330300800,WB:1349740800,Q:1613433600},D:{Q:"webkit"}},L:{A:{H:38.7167},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","H","","",""],E:"Chrome for Android",F:{H:1621987200}},M:{A:{P:.278256},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","P","","",""],E:"Firefox for Android",F:{P:1622505600}},N:{A:{A:.0115934,B:.022664},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","","",""],E:"IE Mobile",F:{A:1340150400,B:1353456e3}},O:{A:{RC:1.36809},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","RC","","",""],E:"UC Browser for Android",F:{RC:1471392e3},D:{RC:"webkit"}},P:{A:{I:.309232,SC:.0103543,TC:.010304,UC:.0824619,VC:.0103584,WC:.0721541,dB:.0412309,XC:.164924,YC:.113385,ZC:.412309,aC:2.19555},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","I","SC","TC","UC","VC","WC","dB","XC","YC","ZC","aC","","",""],E:"Samsung Internet",F:{I:1461024e3,SC:1481846400,TC:1509408e3,UC:1528329600,VC:1546128e3,WC:1554163200,dB:1567900800,XC:1582588800,YC:1593475200,ZC:1605657600,aC:1618531200}},Q:{A:{bC:.185504},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","bC","","",""],E:"QQ Browser",F:{bC:1589846400}},R:{A:{cC:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","cC","","",""],E:"Baidu Browser",F:{cC:1491004800}},S:{A:{dC:.098549},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","dC","","",""],E:"KaiOS Browser",F:{dC:1527811200}}}});var ox=G((C7,rx)=>{S();var{browsers:D5}=KC(),h0=QC().browserVersions,nx=tx();function ix(i){return Object.keys(i).reduce((t,n)=>(t[h0[n]]=i[n],t),{})}rx.exports.agents=Object.keys(nx).reduce((i,t)=>{let n=nx[t];return i[D5[t]]=Object.keys(n).reduce((r,o)=>(o==="A"?r.usage_global=ix(n[o]):o==="C"?r.versions=n[o].reduce((a,s)=>(s===""?a.push(null):a.push(h0[s]),a),[]):o==="D"?r.prefix_exceptions=ix(n[o]):o==="E"?r.browser=n[o]:o==="F"?r.release_date=Object.keys(n[o]).reduce((a,s)=>(a[h0[s]]=n[o][s],a),{}):r.prefix=n[o],r),{}),i},{})});var sx=G((x7,j5)=>{j5.exports={"v0.8":{start:"2012-06-25",end:"2014-07-31"},"v0.10":{start:"2013-03-11",end:"2016-10-31"},"v0.12":{start:"2015-02-06",end:"2016-12-31"},v4:{start:"2015-09-08",lts:"2015-10-12",maintenance:"2017-04-01",end:"2018-04-30",codename:"Argon"},v5:{start:"2015-10-29",maintenance:"2016-04-30",end:"2016-06-30"},v6:{start:"2016-04-26",lts:"2016-10-18",maintenance:"2018-04-30",end:"2019-04-30",codename:"Boron"},v7:{start:"2016-10-25",maintenance:"2017-04-30",end:"2017-06-30"},v8:{start:"2017-05-30",lts:"2017-10-31",maintenance:"2019-01-01",end:"2019-12-31",codename:"Carbon"},v9:{start:"2017-10-01",maintenance:"2018-04-01",end:"2018-06-30"},v10:{start:"2018-04-24",lts:"2018-10-30",maintenance:"2020-05-19",end:"2021-04-30",codename:"Dubnium"},v11:{start:"2018-10-23",maintenance:"2019-04-22",end:"2019-06-01"},v12:{start:"2019-04-23",lts:"2019-10-21",maintenance:"2020-11-30",end:"2022-04-30",codename:"Erbium"},v13:{start:"2019-10-22",maintenance:"2020-04-01",end:"2020-06-01"},v14:{start:"2020-04-21",lts:"2020-10-27",maintenance:"2021-10-19",end:"2023-04-30",codename:"Fermium"},v15:{start:"2020-10-20",maintenance:"2021-04-01",end:"2021-06-01"},v16:{start:"2021-04-20",lts:"2021-10-26",maintenance:"2022-10-18",end:"2024-04-30",codename:""}}});var lx=G((O7,ax)=>{S();ax.exports={"0.20":"39","0.21":"41","0.22":"41","0.23":"41","0.24":"41","0.25":"42","0.26":"42","0.27":"43","0.28":"43","0.29":"43","0.30":"44","0.31":"45","0.32":"45","0.33":"45","0.34":"45","0.35":"45","0.36":"47","0.37":"49","1.0":"49","1.1":"50","1.2":"51","1.3":"52","1.4":"53","1.5":"54","1.6":"56","1.7":"58","1.8":"59","2.0":"61","2.1":"61","3.0":"66","3.1":"66","4.0":"69","4.1":"69","4.2":"69","5.0":"73","6.0":"76","6.1":"76","7.0":"78","7.1":"78","7.2":"78","7.3":"78","8.0":"80","8.1":"80","8.2":"80","8.3":"80","8.4":"80","8.5":"80","9.0":"83","9.1":"83","9.2":"83","9.3":"83","9.4":"83","10.0":"85","10.1":"85","10.2":"85","10.3":"85","10.4":"85","11.0":"87","11.1":"87","11.2":"87","11.3":"87","11.4":"87","12.0":"89","13.0":"91","13.1":"91","14.0":"92"}});var p0=G((T7,ux)=>{S();function f0(i){this.name="BrowserslistError",this.message=i,this.browserslist=!0,Error.captureStackTrace&&Error.captureStackTrace(this,f0)}f0.prototype=Error.prototype;ux.exports=f0});var dx=G((M7,cx)=>{S();var Id=p0();function bl(){}cx.exports={loadQueries:function(){throw new Id("Sharable configs are not supported in client-side build of Browserslist")},getStat:function(t){return t.stats},loadConfig:function(t){if(t.config)throw new Id("Browserslist config are not supported in client-side build")},loadCountry:function(){throw new Id("Country statistics are not supported in client-side build of Browserslist")},loadFeature:function(){throw new Id("Supports queries are not available in client-side build of Browserslist")},currentNode:function(t,n){return t(["maintained node versions"],n)[0]},parseConfig:bl,readConfig:bl,findConfig:bl,clearCaches:bl,oldDataWarning:bl}});var Rx=G((A7,Ax)=>{S();var Nd=VC(),Br=ox().agents,g0=sx(),Hd=Ka(),Ji=lx(),ei=p0(),Vn=dx(),F5=365.259641*24*60*60*1e3,hx=37,m0=1,fx=2;function px(i,t){return(i+".").indexOf(t+".")===0}function $5(i){var t=i.slice(1);return Nd.some(function(n){return px(n.version,t)})}function gx(i){return i.filter(function(t){return typeof t=="string"})}function Dd(i){var t=i;return i.split(".").length===3&&(t=i.split(".").slice(0,-1).join(".")),t}function po(i){return function(n){return i+" "+n}}function mx(i){return parseInt(i.split(".")[0])}function v0(i,t){if(i.length===0)return[];var n=vx(i.map(mx)),r=n[n.length-t];if(!r)return i;for(var o=[],a=i.length-1;a>=0&&!(r>mx(i[a]));a--)o.unshift(i[a]);return o}function vx(i){for(var t=[],n=0;n<i.length;n++)t.indexOf(i[n])===-1&&t.push(i[n]);return t}function jd(i,t,n){for(var r in n)i[t+" "+r]=n[r]}function yx(i,t){return t=parseFloat(t),i===">"?function(n){return parseFloat(n)>t}:i===">="?function(n){return parseFloat(n)>=t}:i==="<"?function(n){return parseFloat(n)<t}:function(n){return parseFloat(n)<=t}}function U5(i,t){return t=t.split(".").map(go),t[1]=t[1]||0,t[2]=t[2]||0,i===">"?function(n){return n=n.split(".").map(go),wl(n,t)>0}:i===">="?function(n){return n=n.split(".").map(go),wl(n,t)>=0}:i==="<"?function(n){return n=n.split(".").map(go),wl(t,n)>0}:function(n){return n=n.split(".").map(go),wl(t,n)>=0}}function go(i){return parseInt(i)}function Fd(i,t){return i<t?-1:i>t?1:0}function wl(i,t){return Fd(parseInt(i[0]),parseInt(t[0]))||Fd(parseInt(i[1]||"0"),parseInt(t[1]||"0"))||Fd(parseInt(i[2]||"0"),parseInt(t[2]||"0"))}function bx(i,t){switch(t=t.split(".").map(go),typeof t[1]=="undefined"&&(t[1]="x"),i){case"<=":return function(n){return n=n.split(".").map(go),wx(n,t)<=0};default:case">=":return function(n){return n=n.split(".").map(go),wx(n,t)>=0}}}function wx(i,t){return i[0]!==t[0]?i[0]<t[0]?-1:1:t[1]==="x"?0:i[1]!==t[1]?i[1]<t[1]?-1:1:0}function W5(i,t){return i.versions.indexOf(t)!==-1?t:We.versionAliases[i.name][t]?We.versionAliases[i.name][t]:!1}function $d(i,t){var n=W5(i,t);return n||(i.versions.length===1?i.versions[0]:!1)}function Ex(i,t){return i=i/1e3,Object.keys(Br).reduce(function(n,r){var o=es(r,t);if(!o)return n;var a=Object.keys(o.releaseDate).filter(function(s){return o.releaseDate[s]>=i});return n.concat(a.map(po(o.name)))},[])}function _x(i){return{name:i.name,versions:i.versions,released:i.released,releaseDate:i.releaseDate}}function q5(i,t){i.versions=i.versions.map(function(o){return t[o]||o}),i.released=i.versions.map(function(o){return t[o]||o});var n={};for(var r in i.releaseDate)n[t[r]||r]=i.releaseDate[r];return i.releaseDate=n,i}function es(i,t){if(i=i.toLowerCase(),i=We.aliases[i]||i,t.mobileToDesktop&&We.desktopNames[i]){var n=We.data[We.desktopNames[i]];if(i==="android")return V5(_x(We.data[i]),n);var r=_x(n);return r.name=i,i==="op_mob"&&(r=q5(r,{"10.0-10.1":"10"})),r}return We.data[i]}function Sx(i,t){var n=hx,r=t[t.length-1];return i.filter(function(o){return/^(?:[2-4]\.|[34]$)/.test(o)}).concat(t.slice(n-r-1))}function V5(i,t){return i.released=Sx(i.released,t.released),i.versions=Sx(i.versions,t.versions),i}function la(i,t){var n=es(i,t);if(!n)throw new ei("Unknown browser "+i);return n}function Cx(i){return new ei("Unknown browser query `"+i+"`. Maybe you are using old Browserslist or made typo in query.")}function Ud(i,t,n){if(n.mobileToDesktop)return i;var r=We.data.android.released,o=r[r.length-1],a=o-hx-t;return a>0?i.slice(-1):i.slice(a-1)}function ua(i,t){return Array.isArray(i)?i=Ox(i.map(xx)):i=xx(i),i.reduce(function(n,r,o){var a=r.queryString,s=a.indexOf("not ")===0;if(s){if(o===0)throw new ei("Write any browsers query (for instance, `defaults`) before `"+a+"`");a=a.slice(4)}for(var l=0;l<Mx.length;l++){var c=Mx[l],h=a.match(c.regexp);if(h){var f=[t].concat(h.slice(1)),v=c.select.apply(We,f).map(function(y){var E=y.split(" ");return E[1]==="0"?E[0]+" "+es(E[0],t).versions[0]:y});switch(r.type){case fx:return s?n.filter(function(y){return v.indexOf(y)===-1}):n.filter(function(y){return v.indexOf(y)!==-1});case m0:default:if(s){var m={};return v.forEach(function(y){m[y]=!0}),n.filter(function(y){return!m[y]})}return n.concat(v)}}}throw Cx(a)},[])}var y0={};function We(i,t){if(typeof t=="undefined"&&(t={}),typeof t.path=="undefined"&&(t.path=Hd.resolve?Hd.resolve("."):"."),typeof i=="undefined"||i===null){var n=We.loadConfig(t);n?i=n:i=We.defaults}if(!(typeof i=="string"||Array.isArray(i)))throw new ei("Browser queries must be an array or string. Got "+typeof i+".");var r={ignoreUnknownVersions:t.ignoreUnknownVersions,dangerousExtend:t.dangerousExtend,mobileToDesktop:t.mobileToDesktop,path:t.path,env:t.env};Vn.oldDataWarning(We.data);var o=Vn.getStat(t,We.data);if(o){r.customUsage={};for(var a in o)jd(r.customUsage,a,o[a])}var s=JSON.stringify([i,r]);if(y0[s])return y0[s];var l=vx(ua(i,r)).sort(function(c,h){if(c=c.split(" "),h=h.split(" "),c[0]===h[0]){var f=c[1].split("-")[0],v=h[1].split("-")[0];return wl(v.split("."),f.split("."))}else return Fd(c[0],h[0])});return I.env.BROWSERSLIST_DISABLE_CACHE||(y0[s]=l),l}function xx(i){var t=[];do i=z5(i,t);while(i);return t}function z5(i,t){var n=/^(?:,\s*|\s+or\s+)(.*)/i,r=/^\s+and\s+(.*)/i;return G5(i,function(o,a,s){return r.test(o)?(t.unshift({type:fx,queryString:o.match(r)[1]}),!0):n.test(o)?(t.unshift({type:m0,queryString:o.match(n)[1]}),!0):a===s?(t.unshift({type:m0,queryString:o.trim()}),!0):!1})}function G5(i,t){for(var n=1,r=i.length;n<=r;n++){var o=i.substr(-n,n);if(t(o,n,r))return i.slice(0,-n)}return""}function Ox(i){return Array.isArray(i)?i.reduce(function(t,n){return t.concat(Ox(n))},[]):[i]}We.cache={};We.data={};We.usage={global:{},custom:null};We.defaults=["> 0.5%","last 2 versions","Firefox ESR","not dead"];We.aliases={fx:"firefox",ff:"firefox",ios:"ios_saf",explorer:"ie",blackberry:"bb",explorermobile:"ie_mob",operamini:"op_mini",operamobile:"op_mob",chromeandroid:"and_chr",firefoxandroid:"and_ff",ucandroid:"and_uc",qqandroid:"and_qq"};We.desktopNames={and_chr:"chrome",and_ff:"firefox",ie_mob:"ie",op_mob:"opera",android:"chrome"};We.versionAliases={};We.clearCaches=Vn.clearCaches;We.parseConfig=Vn.parseConfig;We.readConfig=Vn.readConfig;We.findConfig=Vn.findConfig;We.loadConfig=Vn.loadConfig;We.coverage=function(i,t){var n;if(typeof t=="undefined")n=We.usage.global;else if(t==="my stats"){var r={};r.path=Hd.resolve?Hd.resolve("."):".";var o=Vn.getStat(r);if(!o)throw new ei("Custom usage statistics was not provided");n={};for(var a in o)jd(n,a,o[a])}else if(typeof t=="string")t.length>2?t=t.toLowerCase():t=t.toUpperCase(),Vn.loadCountry(We.usage,t,We.data),n=We.usage[t];else{"dataByBrowser"in t&&(t=t.dataByBrowser),n={};for(var s in t)for(var l in t[s])n[s+" "+l]=t[s][l]}return i.reduce(function(c,h){var f=n[h];return f===void 0&&(f=n[h.replace(/ \S+$/," 0")]),c+(f||0)},0)};function b0(i,t){var n=Nd.filter(function(o){return o.name==="nodejs"}),r=n.filter(function(o){return px(o.version,t)});if(r.length===0){if(i.ignoreUnknownVersions)return[];throw new ei("Unknown version "+t+" of Node.js")}return["node "+r[r.length-1].version]}function w0(i,t,n,r){return t=parseInt(t),n=parseInt(n||"01")-1,r=parseInt(r||"01"),Ex(Date.UTC(t,n,r,0,0,0),i)}function Tx(i,t,n){t=parseFloat(t);var r=We.usage.global;if(n)if(n.match(/^my\s+stats$/)){if(!i.customUsage)throw new ei("Custom usage statistics was not provided");r=i.customUsage}else{var o;n.length===2?o=n.toUpperCase():o=n.toLowerCase(),Vn.loadCountry(We.usage,o,We.data),r=We.usage[o]}for(var a=Object.keys(r).sort(function(f,v){return r[v]-r[f]}),s=0,l=[],c,h=0;h<=a.length&&(c=a[h],!(r[c]===0||(s+=r[c],l.push(c),s>=t)));h++);return l}var Mx=[{regexp:/^last\s+(\d+)\s+major\s+versions?$/i,select:function(i,t){return Object.keys(Br).reduce(function(n,r){var o=es(r,i);if(!o)return n;var a=v0(o.released,t);return a=a.map(po(o.name)),o.name==="android"&&(a=Ud(a,t,i)),n.concat(a)},[])}},{regexp:/^last\s+(\d+)\s+versions?$/i,select:function(i,t){return Object.keys(Br).reduce(function(n,r){var o=es(r,i);if(!o)return n;var a=o.released.slice(-t);return a=a.map(po(o.name)),o.name==="android"&&(a=Ud(a,t,i)),n.concat(a)},[])}},{regexp:/^last\s+(\d+)\s+electron\s+major\s+versions?$/i,select:function(i,t){var n=v0(Object.keys(Ji),t);return n.map(function(r){return"chrome "+Ji[r]})}},{regexp:/^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,select:function(i,t,n){var r=la(n,i),o=v0(r.released,t),a=o.map(po(r.name));return r.name==="android"&&(a=Ud(a,t,i)),a}},{regexp:/^last\s+(\d+)\s+electron\s+versions?$/i,select:function(i,t){return Object.keys(Ji).slice(-t).map(function(n){return"chrome "+Ji[n]})}},{regexp:/^last\s+(\d+)\s+(\w+)\s+versions?$/i,select:function(i,t,n){var r=la(n,i),o=r.released.slice(-t).map(po(r.name));return r.name==="android"&&(o=Ud(o,t,i)),o}},{regexp:/^unreleased\s+versions$/i,select:function(i){return Object.keys(Br).reduce(function(t,n){var r=es(n,i);if(!r)return t;var o=r.versions.filter(function(a){return r.released.indexOf(a)===-1});return o=o.map(po(r.name)),t.concat(o)},[])}},{regexp:/^unreleased\s+electron\s+versions?$/i,select:function(){return[]}},{regexp:/^unreleased\s+(\w+)\s+versions?$/i,select:function(i,t){var n=la(t,i);return n.versions.filter(function(r){return n.released.indexOf(r)===-1}).map(po(n.name))}},{regexp:/^last\s+(\d*.?\d+)\s+years?$/i,select:function(i,t){return Ex(Date.now()-F5*t,i)}},{regexp:/^since (\d+)$/i,select:w0},{regexp:/^since (\d+)-(\d+)$/i,select:w0},{regexp:/^since (\d+)-(\d+)-(\d+)$/i,select:w0},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,select:function(i,t,n){n=parseFloat(n);var r=We.usage.global;return Object.keys(r).reduce(function(o,a){return t===">"?r[a]>n&&o.push(a):t==="<"?r[a]<n&&o.push(a):t==="<="?r[a]<=n&&o.push(a):r[a]>=n&&o.push(a),o},[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,select:function(i,t,n){if(n=parseFloat(n),!i.customUsage)throw new ei("Custom usage statistics was not provided");var r=i.customUsage;return Object.keys(r).reduce(function(o,a){return t===">"?r[a]>n&&o.push(a):t==="<"?r[a]<n&&o.push(a):t==="<="?r[a]<=n&&o.push(a):r[a]>=n&&o.push(a),o},[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,select:function(i,t,n,r){n=parseFloat(n);var o=Vn.loadStat(i,r,We.data);if(o){i.customUsage={};for(var a in o)jd(i.customUsage,a,o[a])}if(!i.customUsage)throw new ei("Custom usage statistics was not provided");var s=i.customUsage;return Object.keys(s).reduce(function(l,c){return t===">"?s[c]>n&&l.push(c):t==="<"?s[c]<n&&l.push(c):t==="<="?s[c]<=n&&l.push(c):s[c]>=n&&l.push(c),l},[])}},{regexp:/^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,select:function(i,t,n,r){n=parseFloat(n),r.length===2?r=r.toUpperCase():r=r.toLowerCase(),Vn.loadCountry(We.usage,r,We.data);var o=We.usage[r];return Object.keys(o).reduce(function(a,s){return t===">"?o[s]>n&&a.push(s):t==="<"?o[s]<n&&a.push(s):t==="<="?o[s]<=n&&a.push(s):o[s]>=n&&a.push(s),a},[])}},{regexp:/^cover\s+(\d+|\d+\.\d+|\.\d+)%$/,select:Tx},{regexp:/^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/,select:Tx},{regexp:/^supports\s+([\w-]+)$/,select:function(i,t){Vn.loadFeature(We.cache,t);var n=We.cache[t];return Object.keys(n).reduce(function(r,o){var a=n[o];return(a.indexOf("y")>=0||a.indexOf("a")>=0)&&r.push(o),r},[])}},{regexp:/^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(i,t,n){var r=Dd(t),o=Dd(n);if(!Ji[r])throw new ei("Unknown version "+t+" of electron");if(!Ji[o])throw new ei("Unknown version "+n+" of electron");return t=parseFloat(t),n=parseFloat(n),Object.keys(Ji).filter(function(a){var s=parseFloat(a);return s>=t&&s<=n}).map(function(a){return"chrome "+Ji[a]})}},{regexp:/^node\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(i,t,n){var r=Nd.filter(function(o){return o.name==="nodejs"}).map(function(o){return o.version});return r.filter(bx(">=",t)).filter(bx("<=",n)).map(function(o){return"node "+o})}},{regexp:/^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,select:function(i,t,n,r){var o=la(t,i);n=parseFloat($d(o,n)||n),r=parseFloat($d(o,r)||r);function a(s){var l=parseFloat(s);return l>=n&&l<=r}return o.released.filter(a).map(po(o.name))}},{regexp:/^electron\s*(>=?|<=?)\s*([\d.]+)$/i,select:function(i,t,n){var r=Dd(n);return Object.keys(Ji).filter(yx(t,r)).map(function(o){return"chrome "+Ji[o]})}},{regexp:/^node\s*(>=?|<=?)\s*([\d.]+)$/i,select:function(i,t,n){var r=Nd.filter(function(o){return o.name==="nodejs"}).map(function(o){return o.version});return r.filter(U5(t,n)).map(function(o){return"node "+o})}},{regexp:/^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,select:function(i,t,n,r){var o=la(t,i),a=We.versionAliases[o.name][r];return a&&(r=a),o.released.filter(yx(n,r)).map(function(s){return o.name+" "+s})}},{regexp:/^(firefox|ff|fx)\s+esr$/i,select:function(){return["firefox 78"]}},{regexp:/(operamini|op_mini)\s+all/i,select:function(){return["op_mini all"]}},{regexp:/^electron\s+([\d.]+)$/i,select:function(i,t){var n=Dd(t),r=Ji[n];if(!r)throw new ei("Unknown version "+t+" of electron");return["chrome "+r]}},{regexp:/^node\s+(\d+)$/i,select:b0},{regexp:/^node\s+(\d+\.\d+)$/i,select:b0},{regexp:/^node\s+(\d+\.\d+\.\d+)$/i,select:b0},{regexp:/^current\s+node$/i,select:function(i){return[Vn.currentNode(ua,i)]}},{regexp:/^maintained\s+node\s+versions$/i,select:function(i){var t=Date.now(),n=Object.keys(g0).filter(function(r){return t<Date.parse(g0[r].end)&&t>Date.parse(g0[r].start)&&$5(r)}).map(function(r){return"node "+r.slice(1)});return ua(n,i)}},{regexp:/^phantomjs\s+1.9$/i,select:function(){return["safari 5"]}},{regexp:/^phantomjs\s+2.1$/i,select:function(){return["safari 6"]}},{regexp:/^(\w+)\s+(tp|[\d.]+)$/i,select:function(i,t,n){/^tp$/i.test(n)&&(n="TP");var r=la(t,i),o=$d(r,n);if(o)n=o;else if(n.indexOf(".")===-1?o=n+".0":o=n.replace(/\.0$/,""),o=$d(r,o),o)n=o;else{if(i.ignoreUnknownVersions)return[];throw new ei("Unknown version "+n+" of "+t)}return[r.name+" "+n]}},{regexp:/^browserslist config$/i,select:function(i){return We(void 0,i)}},{regexp:/^extends (.+)$/i,select:function(i,t){return ua(Vn.loadQueries(i,t),i)}},{regexp:/^defaults$/i,select:function(i){return ua(We.defaults,i)}},{regexp:/^dead$/i,select:function(i){var t=["ie <= 10","ie_mob <= 11","bb <= 10","op_mob <= 12.1","samsung 4"];return ua(t,i)}},{regexp:/^(\w+)$/i,select:function(i,t){throw es(t,i)?new ei("Specify versions in Browserslist query for browser "+t):Cx(t)}}];(function(){for(var i in Br){var t=Br[i];We.data[i]={name:i,versions:gx(Br[i].versions),released:gx(Br[i].versions.slice(0,-3)),releaseDate:Br[i].release_date},jd(We.usage.global,i,t.usage_global),We.versionAliases[i]={};for(var n=0;n<t.versions.length;n++){var r=t.versions[n];if(!!r&&r.indexOf("-")!==-1)for(var o=r.split("-"),a=0;a<o.length;a++)We.versionAliases[i][o[a]]=r}}We.versionAliases.op_mob["59"]="58"})();Ax.exports=We});var vO=G(_e=>{S();"use strict";Object.defineProperty(_e,"__esModule",{value:!0});var J5=qC(),K5=Rx();function kx(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var Lx=kx(J5),Y5=kx(K5);(function(i){i[i.RegExp=0]="RegExp",i[i.Family=1]="Family",i[i.Major=2]="Major",i[i.Minor=3]="Minor",i[i.Patch=4]="Patch"})(_e.BrowserRegExpSourceProp||(_e.BrowserRegExpSourceProp={}));var Ir="\\d",Wd=`${Ir}+`,Nr=`(${Wd})`,dr="\\";function qd(i,t=!1){let n=i.join("|");return t||i.length>1?`(${n})`:n}function Px(i){return i.map(t=>`(${t.regExpString})`).join("|")}function Bx(i){return i.toString().includes(Nr)}function E0(i){return i.toString().split(Nr).length-1}function ts(i){return i.toString().replace(/^\/|\/$/g,"")}function Ix(i,t,n){let r=typeof i=="string"?i:ts(i);return(typeof n=="number"&&n<t.length?t.slice(0,n):t).reduce((s,l)=>s.replace(Nr,l),r)}function Vd(i){return Array.from(i.toString()).map(Number)}function zd(i,t,n){return n==="["&&t!==dr?!0:n==="]"&&t!==dr?!1:i}function _0(i,t){let n=i[t];switch(n){case"+":case"*":case"?":return n;case"(":{let c=i[t+1],h=i[t+2];if(c!=="?"||h!=="="&&h!=="!")return"";break}case"{":break;default:return""}let r=i.length,o="",a=0,s=!1,l="";for(let c=t;c<r&&(n=i[c],o=i[c-1],s=zd(s,o,n),!s&&o!==dr&&(n==="("||n==="{")&&a++,a>0&&(l+=n),!(!s&&o!==dr&&a>0&&(n===")"||n==="}")&&(a--,a===0)));c++);return l}(function(i){i[i.Major=0]="Major",i[i.Minor=1]="Minor",i[i.Patch=2]="Patch"})(_e.SemverPart||(_e.SemverPart={}));var Gd={bb:"BlackBerry",and_chr:"Chrome",ChromeAndroid:"Chrome",FirefoxAndroid:"Firefox",ff:"Firefox",ie_mob:"ExplorerMobile",ie:"Explorer",and_ff:"Firefox",ios_saf:"iOS",op_mini:"OperaMini",op_mob:"OperaMobile",and_qq:"QQAndroid",and_uc:"UCAndroid"},Nx=new RegExp(`(${Object.keys(Gd).join("|")})`);function Hx(i){let t=Nx.exec(i);if(Array.isArray(t)){let[n]=t;return i.replace(n,Gd[n])}return i}function S0(i,t,n=0){let r=i.length;for(let o=n;o<r;o++)if(i[o]!==t[o])return!1;return!0}function Jd(i){return typeof i=="number"?i:i.length===1?i[0]:[i[0],i[i.length-1]]}function ca(i){return(Array.isArray(i)?i[0]:i)==="all"}function Dx(i){return i.filter(Boolean).filter((t,n,r)=>r&&!r.some((o,a)=>a>n&&S0(t,o)))}function C0(i,t){let n=i+Number(!t);return n===0?Ir:n===9?"9":n>9?"":`[${n}-9]`}function jx(i){return i===Ir}function Fx(i){let t=[],n=0,r=0;return i.filter((o,a)=>a>0&&(n=o.filter(jx).length,r=t.filter(jx).length,n<=r)?!1:(t=o,!0))}function $x(i){if(i===0)return[Wd];let t=Vd(i),n=t.length,r=`${Ir}{${n+1},}`,o=n-1;if(i/Math.pow(10,o)===t[0])return[`${C0(t[0],!0)}${Ir.repeat(o)}`,r];let s=Fx(t.map((l,c)=>{let h=n-c-1,f=c<=0,v=" ";return t.map((m,y)=>y<h?m.toString():v?y>h?Ir:(v=C0(m,f),v):"")})).map(l=>l.join(""));return s.push(r),s}function ns(i,t,n){if(t<i)return"";let r=typeof n=="number"&&n>0?"0".repeat(n):"";return i===t?`${r}${i}`:i===0&&t===9?`${r}${Ir}`:`${r}[${i}-${t}]`}function Ux(i,t){let n=[],r=i,o=1;do o*=10,r<o&&(n.push([r,Math.min(o-1,t)]),r=o);while(o<=t);return n}function Wx(i,t){let n=i.length;if(n!==t.length||i[0]!==t[0])return null;let r=i[0].toString(),o=0,a=0,s="",l="";for(let c=1;c<n;c++)o=i[c],a=t[c],o===a?r+=o:(s+=o,l+=a);return[r,parseInt(s,10),parseInt(l,10)]}function qx(i,t,n){let r=n.length,o=[],a=0,s=0,l=0;for(let c=i;c<=t;c++)for(o.push(c.toString()),l+=Math.floor(Math.log10(c)+1)+1;l>s;){if(a>=r)return n;s+=n[a++].length+1}return o}function Kd(i,t,n=0){let r=Vd(i),o=r.length;if(i<10&&t<10||i===t){let f=n-o;return[ns(i,t,f)]}let a=Vd(t);if(o!==a.length){let f=Ux(i,t);return[].concat(...f.map(([m,y])=>Kd(m,y,n)))}let s=Wx(r,a);if(Array.isArray(s)){let[f,v,m]=s,y=o-f.length,E=Kd(v,m,y);return[`${f}${qd(E)}`]}let l=Array.from({length:o-1}),c=ns(r[0]+1,a[0]-1);return[...l.map((f,v)=>{let m=o-v-1,y=Number(v>0);return r.map((E,_)=>_<m?E:_>m?ns(0,9):ns(E+y,9)).join("")}),...c?[`${c}${Ir.repeat(o-1)}`]:[],...l.map((f,v)=>{let m=o-v-1,y=Number(v>0);return a.map((E,_)=>_<m?E:_>m?ns(0,9):ns(0,E-y)).join("")})]}function Vx(i,t){return qx(i,t,Kd(i,t))}function x0(i,t=1/0){if(ca(i))return Wd;let n=t===1/0?$x(i):Vx(i,t);return qd(n)}function O0(i){let t=Array.isArray(i)?i:i.toString().split(".");if(ca(t[0]))return[t[0],0,0];for(;t.length<3;)t.push("0");return t.map(n=>{let r=typeof n=="number"?n:parseInt(n,10);return isNaN(r)?0:r})}function T0(i,t,n){let[r,o,a]=i,[s,l,c]=t,{ignoreMinor:h,ignorePatch:f,allowHigherVersions:v}=n;if(ca(s))return!0;let m=!h,y=m&&!f;return v?y&&a<c||m&&o<l?!1:r>=s:y&&a!==c||m&&o!==l?!1:r===s}function zx(i,t){let{ignoreMinor:n,ignorePatch:r,allowZeroSubversions:o}=t,a=n?1:r?2:3;if(o)for(let s=a-1;s>0&&!(i[s]!==0||a===1);s--)a--;return a}function Gx(i,t){let{ignoreMinor:n,ignorePatch:r,allowHigherVersions:o}=t,a=ca(i[0])?0:n?1:r?2:1/0;return o?Dx(i.map((c,h)=>{let f=2-h,v=Number(h>0),m=0;return i.map((y,E)=>E>=a?Nr:(m=Array.isArray(y)?y[0]:y,E<f?m.toString():E>f?Nr:x0(m+v)))})):[i.map((l,c)=>c>=a?Nr:Array.isArray(l)?x0(l[0],l[1]):l.toString())]}function M0(i){return i.filter((t,n)=>!i.includes(t,n+1))}function Jx(i,t,n,r){let o=dn(Ze({},r),{allowHigherVersions:!0});return(!i||n.some(a=>T0(a,i,o)))&&(!t||n.some(a=>T0(t,a,o)))}function Kx(i,t){return Boolean(i||Bx(t))}function mo(i,t,n){let r=t instanceof RegExp,o=null;switch(!0){case r:{let a=t.toString();o=s=>new RegExp(`(^|[^\\w])${s.replace(/ /g,"\\s*")}([^\\w]|$)`).test(a);break}case i:o=a=>a===t;break;default:o=a=>t.includes(a)}return n.some(o)}function Yx(i){let t=ts(i);switch(!0){case t.includes("Fennec"):return[null,[31,0,0]];case t.includes("Minefield"):return[[3,0,0],[4,0,0]];case t.includes("Namoroka"):return[[3,6,0],[3,6,0]];case t.includes("Shiretoko"):return[[3,0,0],[3,5,0]];case t.includes("CrMo"):return[[16,0,0],[16,0,0]];case t.includes("Opera)\\/9.8"):return[null,[12,15,0]];default:return[null,null]}}var Xx=[...tO(Lx.default.os),...eO(Lx.default.browser)];function Zx(i,t){let n=[];return Xx.forEach(({family:r,regExp:o,fixedVersion:a,minVersion:s,maxVersion:l})=>{let c=i.get(r);c&&Jx(s,l,c,t)&&Kx(a,o)&&n.push({family:r,regExp:o,requestVersions:c,resultFixedVersion:a,resultMinVersion:s,resultMaxVersion:l})}),n}function Qx(i,t){let n=i||t,r=ts(t);switch(!0){case/[^\w]?([A-Z]\w+iOS)[^\w]?/.test(r):case/iPhone.*Outlook-iOS-Android|UCWEB.*iPad\|iPh/.test(r):case r.includes("(iPhone|iPad|iPod).*Mac OS X.*Version"):case/YaBrowser|MRCHROME|Chrome.*\(OPR\)/.test(r):case/\(Chrome\).* Mobile|Mobile \.\*\(Chrome\)|; wv\\\)\.\+\(Chrome\)/.test(r):case r.includes("(?:Mobile|Tablet);.*(Firefox)"):case r.includes("(?:Mobile Safari).*(OPR)"):case/Opera.*\) \(\\d/.test(r):case/bingbot|^\\b\(/.test(r):return[];case mo(!1,n,["Chrome Mobile","Chromium"]):return[{family:"chrome"}];case mo(!0,n,["Samsung Internet"]):return[{family:"samsung"}];case mo(!0,n,["Firefox Mobile","Firefox ($1)"]):return[{family:"firefox"}];case mo(!0,n,["IE"]):return[{family:"explorer"}];case mo(!0,n,["IE Mobile"]):return[{family:"explorermobile"}];case mo(!0,n,["BlackBerry WebKit"]):return[{family:"blackberry"}];case mo(!0,n,["Opera Mobile"]):return[{family:"operamobile"}];case n===t:{let o=/\(([\s\w\d_\-/!|]+)\)/i.exec(r);if(Array.isArray(o)){let a=o[1],s=a.split("|"),l=new Map;return M0(s.map(h=>{let f=h.replace(/[^\d\w]/g,"").toLowerCase();return l.has(f)?l.get(f).push(h):l.set(f,[h]),f})).map(h=>({family:h,regExp:new RegExp(r.replace(a,l.get(h).join("|")))}))}return[]}case typeof i=="string":return[{family:i.toLowerCase()}];default:return[]}}function A0(i){let{[_e.BrowserRegExpSourceProp.RegExp]:t,[_e.BrowserRegExpSourceProp.Family]:n,[_e.BrowserRegExpSourceProp.Major]:r,[_e.BrowserRegExpSourceProp.Minor]:o,[_e.BrowserRegExpSourceProp.Patch]:a}=i,s=Qx(n,t),l=r===0?null:O0([r,o,a]),c=l,h=l;return s.map(m=>{var y=m,{regExp:f=t}=y,v=Gr(y,["regExp"]);return l||([c,h]=Yx(f)),Ze({regExp:f,fixedVersion:l,minVersion:c,maxVersion:h},v)})}function eO(i){let t=i.length,n=[];for(let r=0;r<t;r++)n.push(...A0(i[r]));return n}function tO(i){let t=i.length,n=[];for(let r=0;r<t;r++)i[r][_e.BrowserRegExpSourceProp.Family]==="iOS"&&n.push(...A0(i[r]));return n}function nO(i){return[].concat(...i.map(t=>{let[n,...r]=t.split(/ |-/),o=(Gd[n]||n).toLowerCase();return r.map(a=>({family:o,version:O0(a)}))}))}function iO(i={}){let{browsers:t,env:n,path:r}=i,o=Array.isArray(t)?t.map(Hx):t,a=Y5.default(o,{env:n,path:r});return nO(a)}function rO(i){let t=new Map;return i.forEach(({family:n,version:r})=>{let o=t.get(n);if(o){let a=r.join(".");o.every(s=>s.join(".")!==a)&&o.push(r);return}t.set(n,[r])}),t.forEach(n=>{n.sort((r,o)=>{for(let a in r)if(r[a]!==o[a])return r[a]-o[a];return 0})}),t}function oO(i){if(i.length<2)return i;let t=i.length+1,n=[],r=null,o=i[0],a=[o[_e.SemverPart.Major]],s=[o[_e.SemverPart.Minor]],l=[o[_e.SemverPart.Patch]],c=null;for(let h=1;h<t;h++){r=i[h-1],o=i[h]||[];for(let f=_e.SemverPart.Major;f<=_e.SemverPart.Patch;f++){if((f===c||c===null)&&r[f]+1===o[f]&&S0(r,o,f+1)){c=f,f===_e.SemverPart.Major?a.push(o[_e.SemverPart.Major]):a=o[_e.SemverPart.Major],f===_e.SemverPart.Minor?s.push(o[_e.SemverPart.Minor]):s=o[_e.SemverPart.Minor],f===_e.SemverPart.Patch?l.push(o[_e.SemverPart.Patch]):l=o[_e.SemverPart.Patch];break}if(c===f||r[f]!==o[f]){n.push([Jd(a),Jd(s),Jd(l)]),a=[o[_e.SemverPart.Major]],s=[o[_e.SemverPart.Minor]],l=[o[_e.SemverPart.Patch]],c=null;break}}}return n}function sO(i){let t=new Map;return i.forEach((n,r)=>{t.set(r,oO(n))}),t}var aO=/^\([\s\w\d_\-/!]+\)$/,lO=/[/.$*+?[{}|()]/;function uO(i){let t=i.length,n=!1,r=!1,o="",a="",s="",l="",c="",h="";for(let f=0;f<t;f++)o=i[f],a=i[f-1],s=i[f+1],r=zd(r,a,o),!r&&a!==dr&&o==="("&&(n&&(h+=c),n=!0,c=""),r&&o===dr&&lO.test(s)&&(f++,o=s),n?c+=o:h+=o,!r&&a!==dr&&o===")"&&n&&(n=!1,l=_0(i,f+1),c+=l,(c===Nr||aO.test(c))&&(c=c.substr(1,c.length-2)),h+=c,f+=l.length);return h}function cO(i,t){let n=typeof i=="string"?i:ts(i),r=n.length,o=typeof t=="number"?t:E0(n),a=0,s=!1,l=0,c="",h="",f="",v="";for(let m=0;m<r;m++)if(c=n[m],h=n[m-1],s=zd(s,h,c),!s&&h!==dr&&c==="("&&(a++,f=""),(a>0||l>0)&&(v+=c,f+=c),!s&&h!==dr&&c===")"&&a>0&&(a--,f===Nr&&l++,a===0&&l===0&&(v=""),a===0&&l>=o)){v+=_0(n,++m);break}return v}function dO(i,t,n){let r=1,o=typeof i=="string"?i:ts(i),a=E0(o),s=t.map(f=>{let v=zx(f,n);return r=Math.max(r,v),a>=v?f:null}).filter(Boolean);if(!s.length)return null;let l=cO(o,r),c=qd(M0([].concat(...s.map(f=>Gx(f,n).map(v=>Ix(l,v,r))))));return o.replace(l,c)}function hO(i,t,n){let r=[];return i.forEach(h=>{var f=h,{family:o,regExp:a,resultFixedVersion:s,requestVersions:l}=f,c=Gr(f,["family","regExp","resultFixedVersion","requestVersions"]);let v=ts(a),m=null,y="";s?(m=a,y=v):(y=dO(v,t.get(o),n),m=new RegExp(y)),y&&m&&r.push(Ze({family:o,sourceRegExp:a,sourceRegExpString:v,regExp:m,regExpString:y,resultFixedVersion:s,requestVersions:l,requestVersionsStrings:l.map(E=>ca(E)?String(E[0]):E.join("."))},c))}),r}function fO(i){return i.map(r=>{var o=r,{regExpString:t}=o,n=Gr(o,["regExpString"]);let a=uO(t),s=new RegExp(a);return dn(Ze({},n),{regExp:s,regExpString:a})})}var X5=[{test(i){let t=i.get("chrome"),n=i.get("edge");if(!(t&&n))return!1;let o=t[0][0],a=n[0][0];return o<74&&a<=18},patch(i){let{family:t,regExpString:n,resultMinVersion:r}=i;if(t!=="chrome"||r&&r[0]>=74||n.includes("HeadlessChrome"))return i;let o=`${n}([\\d.]+$|.*Safari\\/(?![\\d.]+ Edge\\/[\\d.]+$))`,a=new RegExp(o);return dn(Ze({},i),{regExp:a,regExpString:o})}},{test(i){return i.has("safari")},patch(i){let{family:t,regExpString:n}=i;if(t!=="safari")return i;let r=n.replace(/\.\*(Safari\\\/)/," $1"),o=new RegExp(r);return dn(Ze({},i),{regExp:o,regExpString:r})}}];function pO(i,t){let n=new Map;return i.map(r=>X5.reduce((o,a)=>(n.has(a)||n.set(a,a.test(t)),n.get(a)?a.patch(o):o),r))}var gO={ignoreMinor:!1,ignorePatch:!0,allowZeroSubversions:!1,allowHigherVersions:!1};function mO(i={}){let y=i,{browsers:t,env:n,path:r}=y,o=Gr(y,["browsers","env","path"]),a=Ze(Ze({},gO),o),s=iO({browsers:t,env:n,path:r}),l=rO(s),c=sO(l),h=Zx(l,a),f=hO(h,c,a),v=pO(f,l);return fO(v)}function Z5(i={}){let t=mO(i),n=Px(t);return new RegExp(n)}_e.BRACED_NUMBER_PATTERN=Nr;_e.BROWSERS_REGEXPS=Xx;_e.BROWSERS_SHIRTNAMES=Gd;_e.BROWSERS_SHIRTNAMES_REGEXP=Nx;_e.CHARCLASS_UNESCAPES=lO;_e.DIGIT_PATTERN=Ir;_e.ESCAPE_SYMBOL=dr;_e.NUMBER_PATTERN=Wd;_e.OPTIMIZABLE_GROUP=aO;_e.applyVersionsToRegExp=dO;_e.applyVersionsToRegExps=hO;_e.browserVersionsToRanges=sO;_e.capturePostfix=_0;_e.compareArrays=S0;_e.compareSemvers=T0;_e.defaultOptions=gO;_e.enumOrRange=qx;_e.extractIOSRegExp=tO;_e.familyMatched=mo;_e.fixBrowserFamily=Qx;_e.fixBrowserRegExp=A0;_e.fixBrowsersRegExps=eO;_e.getBrowsersList=iO;_e.getMinMaxVersions=Yx;_e.getNumberPatternsCount=E0;_e.getNumberPatternsPart=cO;_e.getRegExpsForBrowsers=Zx;_e.getRequiredSemverPartsCount=zx;_e.getUserAgentRegExp=Z5;_e.getUserAgentRegExps=mO;_e.hasNumberPattern=Bx;_e.hasVersion=Kx;_e.isAllVersion=ca;_e.joinParts=qd;_e.joinVersionedBrowsersRegExps=Px;_e.mergeBrowserVersions=rO;_e.normalizeBrowserFamily=Hx;_e.numberToDigits=Vd;_e.numbersToRanges=Jd;_e.optimize=uO;_e.optimizeAll=fO;_e.optimizeRaysNumberPatterns=Fx;_e.parseBrowsersList=nO;_e.patchRegExps=pO;_e.rangeToRegExp=x0;_e.rangedSemverToRegExp=Gx;_e.rayRangeDigitPattern=C0;_e.rayToNumberPatterns=$x;_e.regExpToString=ts;_e.replaceNumberPatterns=Ix;_e.segmentRangeNumberPattern=ns;_e.segmentToNumberPatterns=Kd;_e.segmentToNumberPatternsOrEnum=Vx;_e.semverify=O0;_e.skipSquareBraces=zd;_e.someSemverMatched=Jx;_e.splitCommonDiff=Wx;_e.splitToDecadeRanges=Ux;_e.uniq=M0;_e.uniqItems=Dx;_e.versionsListToRanges=oO});var CO=G((L0,P0)=>{S();(function(i,t){typeof L0=="object"&&typeof P0!="undefined"?P0.exports=t():typeof define=="function"&&define.amd?define(t):i.Splitting=t()})(L0,function(){"use strict";var i=document,t=i.createTextNode.bind(i);function n(Z,te,le,X){X!==void 0?Z.setAttribute("data-"+X+"-index",le):Z.style.setProperty(te,le)}function r(Z,te){return Z.appendChild(te)}function o(Z,te,le,X){var se=i.createElement("span");return le&&(X?se.setAttribute("data-"+te,""):le.replace(/[^a-zA-Z0-9 ]/g,"").length>0?se.setAttribute("data-"+te,le.replace(/[^a-zA-Z0-9 ]/g,"")):se.setAttribute("data-"+te,""),se.textContent=le),Z&&r(Z,se)||se}function a(Z,te){return Z.getAttribute("data-"+te)}function s(Z,te){return!Z||Z.length===0?[]:Z.nodeName?[Z]:[].slice.call(Z[0].nodeName?Z:(te||i).querySelectorAll(Z))}function l(Z,te){Z&&Z.some(te)}function c(Z){return function(te){return Z[te]}}function h(Z,te,le){var X="--"+te,se=X+"-index";l(le,function(pe,ae){Array.isArray(pe)?l(pe,function(Ae){n(Ae,se,ae,te)}):n(pe,se,ae,te)}),n(Z,X+"-total",le.length)}var f={};function v(Z,te,le){var X=le.indexOf(Z);if(X===-1)le.unshift(Z),l(f[Z].depends,function(pe){v(pe,Z,le)});else{var se=le.indexOf(te);le.splice(X,1),le.splice(se,0,Z)}return le}function m(Z,te,le,X){return{by:Z,depends:te,key:le,split:X}}function y(Z){return v(Z,0,[]).map(c(f))}function E(Z){f[Z.by]=Z}function _(Z,te,le,X,se){Z.normalize();var pe=[],ae=document.createDocumentFragment();X&&pe.push(Z.previousSibling);var Ae=[];return s(Z.childNodes).some(function(ie){if(ie.tagName&&!ie.hasChildNodes()){Ae.push(ie);return}if(ie.tagName==="select"||ie.tagName==="input"||ie.tagName==="option"||ie.tagName==="textarea"||ie.tagName==="script"||ie.tagName==="maction"||ie.tagName==="math"||ie.tagName==="menclose"||ie.tagName==="merror"||ie.tagName==="mfenced"||ie.tagName==="mfrac"||ie.tagName==="mi"||ie.tagName==="mmultiscripts"||ie.tagName==="mn"||ie.tagName==="mo"||ie.tagName==="mover"||ie.tagName==="mpadded"||ie.tagName==="mphantom"||ie.tagName==="mroot"||ie.tagName==="mrow"||ie.tagName==="ms"||ie.tagName==="mspace"||ie.tagName==="msqrt"||ie.tagName==="mstyle"||ie.tagName==="msub"||ie.tagName==="msubsup"||ie.tagName==="msup"||ie.tagName==="mtable"||ie.tagName==="mtd"||ie.tagName==="mtext"||ie.tagName==="mtr"||ie.tagName==="munder"||ie.tagName==="munderover"||ie.tagName==="semantics"){Ae.push(ie);return}if(ie.childNodes&&ie.childNodes.length){Ae.push(ie),pe.push.apply(pe,_(ie,te,le,X,se));return}var Se=ie.wholeText||"";Se=Se.replace(/\s+/g," ");var Q=Se.trim();Q.length?(Se[0]===" "&&Ae.push(t(" ")),l(Q.split(le),function(me,Ne){Ne&&se&&Ae.push(o(ae,"whitespace"," ",se));var re=o(ae,te,me);pe.push(re),Ae.push(re)}),Se[Se.length-1]===" "&&Ae.push(t(" "))):Se.length&&!Q.length&&Ae.push(t(" "))}),l(Ae,function(ie){r(ae,ie)}),Z.innerHTML="",r(Z,ae),pe}var C=0;function A(Z,te){for(var le in te)Z[le]=te[le];return Z}var T="words",L=m(T,C,"word",function(Z){return _(Z,"word",/\s+/,0,1)});function j(Z){Z=Z||{};var te=Z.key;return s(Z.target||"[data-splitting]").map(function(le){var X=le["\u{1F34C}"];if(!Z.force&&X)return X;X=le["\u{1F34C}"]={el:le};var se=y(Z.by||a(le,"splitting")||CHARS),pe=A({},Z);return l(se,function(ae){if(ae.split){var Ae=ae.by,ie=(te?"-"+te:"")+ae.key,Se=ae.split(le,pe,X);ie&&h(le,ie,Se),X[Ae]=Se,le.classList.add(Ae)}}),le.classList.add("splitting"),X})}function N(Z,te,le){var X=s(te.matching||Z.children,Z),se={};return l(X,function(pe){var ae=Math.round(pe[le]);(se[ae]||(se[ae]=[])).push(pe)}),Object.keys(se).map(Number).sort(q).map(c(se))}function q(Z,te){return Z-te}var ye=m("lines",[T],"line",function(Z,te,le){return N(Z,{matching:le[T]},"offsetTop")});return E(L),E(ye),j})});var RO=G(xl=>{S();"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.ASTNodeTypes=void 0;var oF;(function(i){i.Document="Document",i.DocumentExit="Document:exit",i.Paragraph="Paragraph",i.ParagraphExit="Paragraph:exit",i.BlockQuote="BlockQuote",i.BlockQuoteExit="BlockQuote:exit",i.ListItem="ListItem",i.ListItemExit="ListItem:exit",i.List="List",i.ListExit="List:exit",i.Header="Header",i.HeaderExit="Header:exit",i.CodeBlock="CodeBlock",i.CodeBlockExit="CodeBlock:exit",i.HtmlBlock="HtmlBlock",i.HtmlBlockExit="HtmlBlock:exit",i.HorizontalRule="HorizontalRule",i.HorizontalRuleExit="HorizontalRule:exit",i.Comment="Comment",i.CommentExit="Comment:exit",i.ReferenceDef="ReferenceDef",i.ReferenceDefExit="ReferenceDef:exit",i.Str="Str",i.StrExit="Str:exit",i.Break="Break",i.BreakExit="Break:exit",i.Emphasis="Emphasis",i.EmphasisExit="Emphasis:exit",i.Strong="Strong",i.StrongExit="Strong:exit",i.Html="Html",i.HtmlExit="Html:exit",i.Link="Link",i.LinkExit="Link:exit",i.Image="Image",i.ImageExit="Image:exit",i.Code="Code",i.CodeExit="Code:exit",i.Delete="Delete",i.DeleteExit="Delete:exit"})(oF=xl.ASTNodeTypes||(xl.ASTNodeTypes={}))});var LO=G(Ol=>{S();"use strict";function sh(i,t){return i<t}function sF(i,t,n){return n===void 0&&(n=sh),function(){for(var r=i.length,o=0;r;){var a=r>>>1,s=o+a;n(t,i[s])?r=a:(o=s+1,r-=a+1)}return o}()}function kO(i,t,n){return n===void 0&&(n=sh),function(){for(var r=i.length,o=0;r;){var a=r>>>1,s=o+a;n(i[s],t)?(o=s+1,r-=a+1):r=a}return o}()}function aF(i,t,n){return n===void 0&&(n=sh),function(){var r=kO(i,t,n);return r!==i.length&&!n(t,i[r])}()}Ol.compare=sh;Ol.lowerBound=kO;Ol.upperBound=sF;Ol.binarySearch=aF});var IO=G(ah=>{S();"use strict";var lF=function(i,t,n){t&&Object.defineProperties(i,t),n&&Object.defineProperties(i.prototype,n)},uF=LO().upperBound,PO=function(t,n){this.line=t,this.column=n};ah.Position=PO;var BO=function(t,n){this.start=t,this.end=n};ah.SourceLocation=BO;var cF=function(){var i=function(n){this.indice=[0];var r=/[\r\n\u2028\u2029]/g,o=n.length;for(r.lastIndex=0;;){var a=r.exec(n);if(!a)break;var s=a.index;n.charCodeAt(s)===13&&n.charCodeAt(s+1)===10&&(s+=1);var l=s+1;if(o<l)break;this.indice.push(l),r.lastIndex=l}};return i.prototype.locationToRange=function(t){return[this.positionToIndex(t.start),this.positionToIndex(t.end)]},i.prototype.rangeToLocation=function(t){return new BO(this.indexToPosition(t[0]),this.indexToPosition(t[1]))},i.prototype.positionToIndex=function(t){var n=this.indice[t.line-1];return n+t.column},i.prototype.indexToPosition=function(t){var n=uF(this.indice,t);return new PO(n,t-this.indice[n-1])},lF(i,null,{line:{get:function(){return this.indice.length}}}),i}();ah.default=cF});var HO=G((UW,NO)=>{S();"use strict";var dF=IO().default;NO.exports=dF});var jO=G(fa=>{S();"use strict";var hF=fa&&fa.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(fa,"__esModule",{value:!0});fa.SourceCode=void 0;var DO=hF(HO()),fF=function(){function i(t){if(this.index=0,this.contexts=[],this.contextRanges=[],typeof t=="string")this.textCharacters=t.split(""),this.source=new DO.default(t),this.startOffset=0,this.firstChildPadding=0;else{this.sourceNode=t,this.startOffset=this.sourceNode.range[0],this.index=this.startOffset;var n=Array.from(new Array(this.sourceNode.loc.start.line-1)).fill(`
|
|
69
|
-
`),r=Array.from(new Array(this.startOffset-n.length)).fill("\u222F");this.textCharacters=r.concat(n,t.raw.split("")),this.source=new DO.default(this.textCharacters.join("")),this.sourceNode.children[0]?this.firstChildPadding=this.sourceNode.children[0].range[0]-this.startOffset:this.firstChildPadding=0}}return i.prototype.markContextRange=function(t){this.contextRanges.push(t)},i.prototype.isInContextRange=function(){var t=this.offset;return this.contextRanges.some(function(n){return n[0]<=t&&t<n[1]})},i.prototype.enterContext=function(t){this.contexts.push(t)},i.prototype.isInContext=function(t){return t?this.contexts.some(function(n){return n===t}):this.contexts.length>0},i.prototype.leaveContext=function(t){var n=this.contexts.lastIndexOf(t);n!==-1&&this.contexts.splice(n,1)},Object.defineProperty(i.prototype,"offset",{get:function(){return this.index+this.firstChildPadding},enumerable:!1,configurable:!0}),i.prototype.now=function(){var t=this.offset,n=this.source.indexToPosition(t);return{line:n.line,column:n.column,offset:t}},Object.defineProperty(i.prototype,"hasEnd",{get:function(){return this.read()===!1},enumerable:!1,configurable:!0}),i.prototype.read=function(t){t===void 0&&(t=0);var n=this.offset+t;return n<this.startOffset?!1:0<=n&&n<this.textCharacters.length?this.textCharacters[n]:!1},i.prototype.readNode=function(t){if(t===void 0&&(t=0),!this.sourceNode)return!1;var n=this.offset+t;if(n<this.startOffset)return!1;var r=this.sourceNode.children.filter(function(o){return o.range[0]<=n&&n<o.range[1]});return r.length>0?r[r.length-1]:!1},i.prototype.peek=function(){this.index+=1},i.prototype.peekNode=function(t){this.index+=t.range[1]-t.range[0]},i.prototype.seekNext=function(t){var n=this.now();t.seek(this);var r=this.now(),o=this.sliceRange(n.offset,r.offset);return{value:o,startPosition:n,endPosition:r}},i.prototype.sliceRange=function(t,n){return this.textCharacters.slice(t,n).join("")},i}();fa.SourceCode=fF});var FO=G(lh=>{S();"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.NewLineParser=void 0;var pF=function(){function i(){}return i.prototype.test=function(t){var n=t.read();return n?/[\r\n]/.test(n):!1},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();lh.NewLineParser=pF});var $O=G(uh=>{S();"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.SpaceParser=void 0;var gF=function(){function i(){}return i.prototype.test=function(t){var n=t.read();return n?/\s/.test(n):!1},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();uh.SpaceParser=gF});var UO=G(os=>{S();"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.SeparatorParser=os.DefaultOptions=void 0;os.DefaultOptions={separatorCharacters:[".","\uFF0E","\u3002","?","!","\uFF1F","\uFF01"]};var mF=function(){function i(t){this.options=t,this.separatorCharacters=t&&t.separatorCharacters?t.separatorCharacters:os.DefaultOptions.separatorCharacters}return i.prototype.test=function(t){if(t.isInContext()||t.isInContextRange())return!1;var n=t.read(),r=t.read(1);return!n||!this.separatorCharacters.includes(n)?!1:n==="."&&r?/[\s\t\r\n]/.test(r):!0},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();os.SeparatorParser=mF});var WO=G(ch=>{S();"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.AnyValueParser=void 0;var vF=function(){function i(t){this.parsers=t.parsers,this.markers=t.markers}return i.prototype.test=function(t){return t.hasEnd?!1:this.parsers.every(function(n){return!n.test(t)})},i.prototype.seek=function(t){var n=t.readNode();if(!n){for(;this.test(t);)this.markers.forEach(function(o){return o.mark(t)}),t.peek();return}for(var r=function(){var o=t.offset;return n.range[0]<=o&&o<n.range[1]};r()&&this.test(t);)this.markers.forEach(function(o){return o.mark(t)}),t.peek()},i}();ch.AnyValueParser=vF});var qO=G(dh=>{S();"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.English=void 0;dh.English={ABBREVIATIONS:["Adj.","Adm.","Adv.","Al.","Ala.","Alta.","Apr.","Arc.","Ariz.","Ark.","Art.","Assn.","Asst.","Attys.","Aug.","Ave.","Bart.","Bld.","Bldg.","Blvd.","Brig.","Bros.","Btw.","Cal.","Calif.","Capt.","Cl.","Cmdr.","Co.","Col.","Colo.","Comdr.","Con.","Conn.","Corp.","Cpl.","Cres.","Ct.","D.phil.","Dak.","Dec.","Del.","Dept.","Det.","Dist.","Dr.","Dr.phil.","Dr.philos.","Drs.","E.g.","Ens.","Esp.","Esq.","Etc.","Exp.","Expy.","Ext.","Feb.","Fed.","Fla.","Ft.","Fwy.","Fy.","Ga.","Gen.","Gov.","Hon.","Hosp.","Hr.","Hway.","Hwy.","I.e.","Ia.","Id.","Ida.","Ill.","Inc.","Ind.","Ing.","Insp.","Is.","Jan.","Jr.","Jul.","Jun.","Kan.","Kans.","Ken.","Ky.","La.","Lt.","Ltd.","Maj.","Man.","Mar.","Mass.","May.","Md.","Me.","Med.","Messrs.","Mex.","Mfg.","Mich.","Min.","Minn.","Miss.","Mlle.","Mm.","Mme.","Mo.","Mont.","Mr.","Mrs.","Ms.","Msgr.","Mssrs.","Mt.","Mtn.","Neb.","Nebr.","Nev.","No.","Nos.","Nov.","Nr.","Oct.","Ok.","Okla.","Ont.","Op.","Ord.","Ore.","P.","Pa.","Pd.","Pde.","Penn.","Penna.","Pfc.","Ph.","Ph.d.","Pl.","Plz.","Pp.","Prof.","Pvt.","Que.","Rd.","Rs.","Ref.","Rep.","Reps.","Res.","Rev.","Rt.","Sask.","Sec.","Sen.","Sens.","Sep.","Sept.","Sfc.","Sgt.","Sr.","St.","Supt.","Surg.","Tce.","Tenn.","Tex.","Univ.","Usafa.","U.S.","Ut.","Va.","V.","Ver.","Vs.","Vt.","Wash.","Wis.","Wisc.","Wy.","Wyo.","Yuk."],PREPOSITIVE_ABBREVIATIONS:["Adm.","Attys.","Brig.","Capt.","Cmdr.","Col.","Cpl.","Det.","Dr.","Gen.","Gov.","Ing.","Lt.","Maj.","Mr.","Mrs.","Ms.","Mt.","Messrs.","Mssrs.","Prof.","Ph.","Rep.","Reps.","Rev.","Sen.","Sens.","Sgt.","St.","Supt.","V.","Vs."],EXCALAMATION_WORDS:["!X\u0169","!Kung","\u01C3\u02BCO\u01C3Kung","!Xuun","!Kung-Ekoka","\u01C3Hu","\u01C3Khung","\u01C3Ku","\u01C3ung","\u01C3Xo","\u01C3X\xFB","\u01C3Xung","\u01C3X\u0169","!Xun","Yahoo!","Y!J","Yum!"]}});var VO=G(hh=>{S();"use strict";Object.defineProperty(hh,"__esModule",{value:!0});hh.AbbrMarker=void 0;var yF=qO(),B0=function(i){return!i||i.length===0?!1:/^[A-Z]/.test(i)},I0=function(i,t){return i.toLowerCase()===t.toLowerCase()},bF=function(){function i(t){t===void 0&&(t=yF.English),this.lang=t}return i.prototype.getWord=function(t,n){n===void 0&&(n=0);var r=/\s/,o=t.read(-1);if(o&&!r.test(o))return"";for(var a="",s=n,l="";(l=t.read(s))&&!r.test(l);)a+=l,s++;return a},i.prototype.getPrevWord=function(t){for(var n=/\s/,r=-1,o="";(o=t.read(r))&&n.test(o);)r--;for(;(o=t.read(r))&&!n.test(o);)r--;return this.getWord(t,r+1)},i.prototype.mark=function(t){if(!t.isInContextRange()){var n=this.getWord(t);if(n.length!==0){if(/^([a-zA-Z]\.){3,}$/.test(n))return t.markContextRange([t.offset,t.offset+n.length]);var r=this.lang.EXCALAMATION_WORDS.some(function(c){return I0(c,n)});if(r)return t.markContextRange([t.offset,t.offset+n.length]);var o=this.lang.PREPOSITIVE_ABBREVIATIONS.some(function(c){return I0(c,n)});if(o)return t.markContextRange([t.offset,t.offset+n.length]);var a=this.lang.ABBREVIATIONS.some(function(c){return I0(c,n)}),s=this.getPrevWord(t),l=this.getWord(t,n.length+1);B0(s)&&/[A-Z]\./.test(n)&&B0(l)?t.markContextRange([t.offset,t.offset+n.length]):a&&!B0(l)&&t.markContextRange([t.offset,t.offset+n.length])}}},i}();hh.AbbrMarker=bF});var N0=G(pa=>{S();"use strict";var wF=pa&&pa.__spreadArray||function(i,t){for(var n=0,r=t.length,o=i.length;n<r;n++,o++)i[o]=t[n];return i};Object.defineProperty(pa,"__esModule",{value:!0});pa.debugLog=void 0;function EF(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];I.env.DEBUG==="sentence-splitter"&&console.log.apply(console,wF(["sentence-splitter: "],i))}pa.debugLog=EF});var zO=G((XW,fh)=>{S();Object.values=Object.values?Object.values:function(i){var t=["[object String]","[object Object]","[object Array]","[object Function]"],n=Object.prototype.toString.call(i);if(i===null||typeof i=="undefined")throw new TypeError("Cannot convert undefined or null to object");if(~t.indexOf(n)){if(Object.keys)return Object.keys(i).map(function(a){return i[a]});var r=[];for(var o in i)i.hasOwnProperty(o)&&r.push(i[o]);return r}else return[]};typeof fh!="undefined"&&fh.exports&&(fh.exports=Object.values)});var JO=G(ga=>{S();"use strict";var _F=ga&&ga.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ga,"__esModule",{value:!0});ga.PairMaker=void 0;var GO=N0(),SF=_F(zO()),CF=function(){function i(){var t;this.pairs=(t={},t['"']='"',t["\u300C"]="\u300D",t["\uFF08"]="\uFF09",t["("]=")",t["\u300E"]="\u300F",t["\u3010"]="\u3011",t["\u300A"]="\u300B",t),this.pairKeys=Object.keys(this.pairs),this.pairValues=SF.default(this.pairs)}return i.prototype.mark=function(t){var n=t.read();if(!!n)if(t.isInContext()){var a=this.pairValues.indexOf(n);if(a!==-1){var o=this.pairKeys[a];GO.debugLog("PairMaker -> leaveContext: "+this.pairValues[a]),t.leaveContext(o)}}else{var r=this.pairKeys.indexOf(n);if(r!==-1){var o=this.pairKeys[r];GO.debugLog("PairMaker -> enterContext: "+o),t.enterContext(o)}}},i}();ga.PairMaker=CF});var eT=G(Qt=>{S();"use strict";var ph=Qt&&Qt.__assign||function(){return ph=Object.assign||function(i){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},ph.apply(this,arguments)};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.createNode=Qt.createEmptySentenceNode=Qt.createTextNode=Qt.createPunctuationNode=Qt.createWhiteSpaceNode=Qt.splitAST=Qt.split=Qt.SplitParser=Qt.Syntax=void 0;var KO=RO(),xF=jO(),OF=FO(),TF=$O(),MF=UO(),AF=WO(),RF=VO(),kF=JO(),gh=N0();Qt.Syntax={WhiteSpace:"WhiteSpace",Punctuation:"Punctuation",Sentence:"Sentence",Str:"Str"};var H0=function(){function i(t){this.nodeList=[],this.results=[],this.source=new xF.SourceCode(t)}return Object.defineProperty(i.prototype,"current",{get:function(){return this.nodeList[this.nodeList.length-1]},enumerable:!1,configurable:!0}),i.prototype.pushNodeToCurrent=function(t){var n=this.current;n?n.children.push(t):this.results.push(t)},i.prototype.open=function(t){this.nodeList.push(t)},i.prototype.isOpened=function(){return this.nodeList.length>0},i.prototype.nextLine=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;return this.pushNodeToCurrent(XO(r,o,a)),a},i.prototype.nextSpace=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;this.pushNodeToCurrent(Tl("WhiteSpace",r,o,a))},i.prototype.nextValue=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;this.pushNodeToCurrent(QO(r,o,a))},i.prototype.close=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;o.offset!==a.offset&&this.pushNodeToCurrent(ZO(r,o,a));var s=this.nodeList.pop();if(!!s&&s.children.length!==0){var l=s.children[0],c=this.source.now();s.loc={start:l.loc.start,end:D0(c)};var h=this.source.sliceRange(l.range[0],c.offset);s.range=[l.range[0],c.offset],s.raw=h,this.results.push(s)}},i.prototype.toList=function(){return this.results},i}();Qt.SplitParser=H0;var YO=function(i){i===void 0&&(i={});var t=new OF.NewLineParser,n=new TF.SpaceParser,r=new MF.SeparatorParser(i.SeparatorParser),o=new RF.AbbrMarker,a=new kF.PairMaker,s=new AF.AnyValueParser({parsers:[t,r],markers:[o,a]});return{newLine:t,space:n,separator:r,abbrMarker:o,anyValueParser:s}};function LF(i,t){for(var n=YO(t),r=n.newLine,o=n.space,a=n.separator,s=n.anyValueParser,l=new H0(i),c=l.source;!c.hasEnd;)r.test(c)?l.nextLine(r):o.test(c)?l.nextSpace(o):a.test(c)?l.close(a):(l.isOpened()||l.open(mh()),l.nextValue(s));return l.close(o),l.toList()}Qt.split=LF;function PF(i,t){for(var n=YO(t),r=n.newLine,o=n.space,a=n.separator,s=n.anyValueParser,l=new H0(i),c=l.source;!c.hasEnd;){var h=c.readNode();if(!h)break;h.type===KO.ASTNodeTypes.Str?o.test(c)?(gh.debugLog("space"),l.nextSpace(o)):a.test(c)?(gh.debugLog("separator"),l.close(a)):r.test(c)?(gh.debugLog("newline"),l.nextLine(r)):(l.isOpened()||(gh.debugLog("open -> createEmptySentenceNode()"),l.open(mh())),l.nextValue(s)):h.type===KO.ASTNodeTypes.Break?(l.pushNodeToCurrent(h),c.peekNode(h)):(l.isOpened()||l.open(mh()),l.pushNodeToCurrent(h),c.peekNode(h))}return l.close(o),ph(ph({},i),{children:l.toList()})}Qt.splitAST=PF;function XO(i,t,n){return Tl("WhiteSpace",i,t,n)}Qt.createWhiteSpaceNode=XO;function ZO(i,t,n){return Tl("Punctuation",i,t,n)}Qt.createPunctuationNode=ZO;function QO(i,t,n){return Tl("Str",i,t,n)}Qt.createTextNode=QO;function mh(){return{type:"Sentence",raw:"",loc:{start:{column:NaN,line:NaN},end:{column:NaN,line:NaN}},range:[NaN,NaN],children:[]}}Qt.createEmptySentenceNode=mh;function Tl(i,t,n,r){return{type:i,raw:t,value:t,loc:{start:D0(n),end:D0(r)},range:[n.offset,r.offset]}}Qt.createNode=Tl;function D0(i){return{line:i.line,column:i.column}}});var $F={};qP($F,{Link:()=>Sl,build:()=>FF,default:()=>jF});S();S();S();var Mw=Tt(Ow()),Aw=Tt($n());S();var Tw=Tt($n());function kc(i,t){return Tw.TaJson.deserialize(i,t)}var Yr=class extends Mw.Publication{static async fromUrl(t){let r=await(await fetch(t.href,{credentials:"same-origin"})).json(),o=kc(r,Yr);return o.manifestUrl=t,o}get readingOrder(){return this.Spine}get tableOfContents(){return this.sample?.isSampleRead&&this.positions?.length>0?this.limitedTOC():this.TOC}limitedTOC(){function t(r){for(let o=0;o<r.Children.length;o++){let a=r.Children[o];a.Href=void 0,a.Children&&t(a)}}return this.TOC.map(r=>{if(r.Href){let o=this.positionsByHref(this.getRelativeHref(r.Href));if(o?.length>0){let a=o[0];Math.round(a.locations.totalProgression*100)<=this.sample?.limit||(r.Href=void 0,r.Children&&t(r))}}return r})}get landmarks(){return this.Landmarks}get pageList(){return this.PageList}get isFixedLayout(){return this.Metadata.Rendition?.Layout==="fixed"}get isReflowable(){return!this.isFixedLayout}get layout(){return this.isFixedLayout?"fixed":"reflowable"}get hasMediaOverlays(){return this.readingOrder?this.readingOrder.filter(t=>t.Properties?.MediaOverlay).length>0:!1}getStartLink(){return this.readingOrder.length>0?this.readingOrder[0]:null}getPreviousSpineItem(t){let n=this.getSpineIndex(t);return n!==null&&n>0?this.readingOrder[n-1]:null}getNextSpineItem(t){let n=this.getSpineIndex(t);return n!==null&&n<this.readingOrder.length-1?this.readingOrder[n+1]:null}getSpineItem(t){let n=this.getSpineIndex(t);return n!==null?this.readingOrder[n]:null}getSpineIndex(t){return this.readingOrder.findIndex(n=>n.Href&&this.getAbsoluteHref(n.Href)===t)}getAbsoluteHref(t){return new URL(t,this.manifestUrl.href).href}getRelativeHref(t){let n=this.manifestUrl.href.replace("/manifest.json",""),r=t.replace(n,"");return r.indexOf("#")>0&&(r=r.slice(0,r.indexOf("#"))),r.charAt(0)==="/"&&(r=r.substring(1)),r}getTOCItemAbsolute(t){let n=this.getAbsoluteHref(t),r=(a,s)=>{for(let l=0;l<s.length;l++){let c=s[l];if(c.Href){let h=c.Href.indexOf("#")!==-1?c.Href.slice(0,c.Href.indexOf("#")):c.Href;if(this.getAbsoluteHref(h)===a)return c}if(c.Children){let h=r(a,c.Children);if(h!==null)return h}}return null},o=r(n,this.tableOfContents);return o===null&&(o=r(n,this.readingOrder)),o}getTOCItem(t){let n=(o,a)=>{for(let s=0;s<a.length;s++){let l=a[s];if(l.Href&&this.getAbsoluteHref(l.Href)===o)return l;if(l.Children){let c=n(o,l.Children);if(c!==null)return c}}return null},r=n(t,this.tableOfContents);if(r===null&&(r=n(t,this.readingOrder)),r===null&&t.indexOf("#")!==-1){let o=t.slice(0,t.indexOf("#"));r=n(o,this.tableOfContents),r===null&&(r=n(o,this.readingOrder))}return r}positionsByHref(t){let n=decodeURI(t)??"";return this.positions?.filter(r=>n.includes(r.href))}async autoGeneratePositions(t=a4){let n=0,r=0,o=[];for(let s of this.readingOrder)if(this.isFixedLayout){let l={href:s.Href,locations:{progression:0,position:n+1},type:s.TypeLink};o.push(l),n=n+1}else{let l=this.getAbsoluteHref(s.Href),c=await t(l);s.contentLength=c,r+=c;let f=Math.max(1,Math.ceil(c/1024));for(let v=0;v<f;v++){let m={href:s.Href,locations:{progression:v/f,position:n+(v+1)},type:s.TypeLink};o.push(m)}n=n+f}var a=0;if(this.isReflowable)for(let s of this.readingOrder){if(!s.contentLength){console.error("Link is missing contentLength",s);return}s.contentWeight=100/r*s.contentLength,a=a+s.contentWeight}for(let s of o){let l=o.filter(h=>h.href===decodeURI(s.href)),c=Math.ceil(s.locations.progression*(l.length-1));s.locations.totalProgression=(s.locations.position-1)/o.length,s.locations.remainingPositions=Math.abs(c-(l.length-1)),s.locations.totalRemainingPositions=Math.abs(s.locations.position-1-(o.length-1))}this.positions=o}async fetchPositionsFromService(t){let r=await(await fetch(t)).json();this.positions=r.positions}async fetchWeightsFromService(t){if(this.isFixedLayout){console.warn("Not fetching weights from service for fixed layout publication.");return}let r=await(await fetch(t)).json();this.readingOrder.forEach(o=>{o.contentWeight=r[o.Href]})}};Yr=yu([(0,Aw.JsonObject)()],Yr);var a4=async i=>(await(await fetch(i)).blob()).size;S();S();var Ns=class{json(){return JSON.stringify(this)}},Rw=class extends Ns{constructor(t,n,r){super();this.value=t,this.ref=n,this.name=r}toString(){return this.value}},kw=class extends Ns{constructor(t,n,r){super();this.value=t,this.ref=n,this.name=r}toString(){return this.value}toJson(){return JSON.parse(this.value)}},Lw=class extends Ns{constructor(t,n,r,o){super();this.value=t,this.values=n,this.ref=r,this.name=o}toString(){return this.values[this.value]}},Pw=class extends Ns{constructor(t,n,r,o,a,s,l){super();this.value=t,this.min=n,this.max=r,this.step=o,this.suffix=a,this.ref=s,this.name=l}toString(){return this.value.toString()+this.suffix}increment(){this.value<=this.max&&(this.value+=this.step)}decrement(){this.value>=this.min&&(this.value-=this.step)}},Bw=class extends Ns{constructor(t,n,r,o,a){super();this.value=r,this.onValue=t,this.offValue=n,this.ref=o,this.name=a}toString(){return this.value?this.onValue:this.offValue}switch(){this.value=!this.value}},Ho=class{constructor(){this.properties=[]}addIncremental(t,n,r,o,a,s,l){this.properties.push(new Pw(t,n,r,o,a,s,l))}addStringable(t,n,r){this.properties.push(new Rw(t,n,r))}addJSONable(t,n,r){this.properties.push(new kw(t,n,r))}addSwitchable(t,n,r,o,a){this.properties.push(new Bw(t,n,r,o,a))}addEnumerable(t,n,r,o){this.properties.push(new Lw(t,n,r,o))}getByRef(t){let n=this.properties.filter(r=>r.ref===t);return n.length>0?n[0]:null}getByKey(t){let n=this.properties.filter(r=>r.key===t);return n.length>0?n[0]:null}};S();var fi=class{},V=fi;V.FONT_SIZE_REF="fontSize",V.FONT_FAMILY_REF="fontFamily",V.FONT_OVERRIDE_REF="fontOverride",V.APPEARANCE_REF="appearance",V.SCROLL_REF="scroll",V.TEXT_ALIGNMENT_REF="textAlign",V.COLUMN_COUNT_REF="colCount",V.WORD_SPACING_REF="wordSpacing",V.LETTER_SPACING_REF="letterSpacing",V.PAGE_MARGINS_REF="pageMargins",V.LINE_HEIGHT_REF="lineHeight",V.FONT_SIZE_KEY="--USER__"+fi.FONT_SIZE_REF,V.FONT_FAMILY_KEY="--USER__"+fi.FONT_FAMILY_REF,V.FONT_OVERRIDE_KEY="--USER__"+fi.FONT_OVERRIDE_REF,V.APPEARANCE_KEY="--USER__"+fi.APPEARANCE_REF,V.SCROLL_KEY="--USER__"+fi.SCROLL_REF,V.TEXT_ALIGNMENT_KEY="--USER__"+fi.TEXT_ALIGNMENT_REF,V.COLUMN_COUNT_KEY="--USER__"+fi.COLUMN_COUNT_REF,V.WORD_SPACING_KEY="--USER__"+fi.WORD_SPACING_REF,V.LETTER_SPACING_KEY="--USER__"+fi.LETTER_SPACING_REF,V.PAGE_MARGINS_KEY="--USER__"+fi.PAGE_MARGINS_REF,V.LINE_HEIGHT_KEY="--USER__"+fi.LINE_HEIGHT_REF;S();function ve(i,t){return i.querySelector(t)}function Bt(i,t){let n=ve(i,t);if(n)return n;throw"required element "+t+" not found"}function l4(i,t){if(i===null)throw"parent element is null";return i.querySelector(t)}function Ft(i,t){let n=l4(i,t);if(n)return n;throw"required element "+t+" not found in iframe"}function Rn(i,t,n){i.setAttribute(t,n)}S();function Iw(i,t){return new Promise(function(n){setTimeout(n.bind(null,t),i)})}var W=!1;S();S();var XS=Tt(Cd()),ta=class{constructor(t){this.getScrollingElement=t=>t.scrollingElement?t.scrollingElement:t.body;this.navigator=t}async handleFootnote(t,n){let r=t.getAttribute("href");if(r.indexOf("#")>0){let a=function(l){let c=document.location.href;return new URL(l,c).href},o=r.substring(r.indexOf("#")+1),s=a(r);s=s.substring(0,s.indexOf("#")),n.preventDefault(),n.stopPropagation(),await fetch(s).then(l=>l.text()).then(async l=>{let f=new DOMParser().parseFromString(l,"text/html").querySelector("#"+o);f&&(n.preventDefault(),n.stopPropagation(),this.showPopup(f,n))})}}showPopup(t,n){let r=this.navigator.iframes[0].contentDocument.getElementById("d2-popup");r&&r.parentElement.removeChild(r);let o=document.createElement("aside");o.id="d2-popup",o.className="d2-popup is-active";let a=document.createElement("div");a.className="d2-popup-wrapper",o.appendChild(a);let s=document.createElement("div");s.className="d2-popup-content",a.appendChild(s);let l=document.createElement("p");s.appendChild(l),typeof t=="string"?l.innerHTML=t:l.innerHTML=(0,XS.default)(t.innerHTML,{allowedTags:[],allowedAttributes:{}});let c=this.navigator.view.isPaginated(),h=this.getScrollingElement(this.navigator.iframes[0].contentDocument),f=c?h.scrollLeft:0,v=c?h.scrollTop:0,m=n.x+f,y=n.y+v;o.style.top=y+"px",c&&(o.style.left=m+"px"),this.navigator.iframes[0].contentDocument.body.appendChild(o);let E=this;this.navigator.iframes[0].contentWindow.onclick=function(_){n.target!==_.target&&o.parentElement&&(o.style.display="none",o.parentElement.removeChild(o),E.navigator.iframes[0].contentWindow.onclick=void 0)}}};function ue(i,t,n){i&&i.addEventListener(t,n,!0)}function Le(i,t,n){i&&i.removeEventListener(t,n,!0)}var xd=class{constructor(t){this.onInternalLink=()=>{};this.onClickThrough=()=>{};this.checkForLink=t=>{let n=t.target;for(;n&&n.tagName.toLowerCase()!=="body";){if(n.tagName.toLowerCase()==="a"&&n.href)return n;n=n.parentElement}return null};this.handleLinks=async t=>{W&&console.log("R2 Click Handler");let n=this.checkForLink(t);if(n){let r=window.location.protocol===n.protocol&&window.location.port===n.port&&window.location.hostname===n.hostname,o=this.navigator.publication.manifestUrl,a=o.protocol===n.protocol&&o.port===n.port&&o.hostname===n.hostname,s=n.href.indexOf("#");if(!r&&!a)window.open(n.href,"_blank"),t.preventDefault(),t.stopPropagation();else if(t.target.href=n.href,r&&s!==-1){let l=t.target;l?l.getAttribute("epub:type")==="noteref"?await this.popup.handleFootnote(l,t):this.onInternalLink(t):this.onInternalLink(t)}else r&&s===-1&&this.onInternalLink(t)}else this.onClickThrough(t)};this.navigator=t,this.popup=new ta(this.navigator)}setupEvents(t){if(t!==null)t.addEventListener("click",this.handleLinks.bind(this));else throw"cannot setup events for null"}};S();S();function ZS(){return Bt(document,"#iframe-wrapper").clientWidth}function to(){return Bt(document,"#iframe-wrapper").clientHeight}var eC=Tt(Go()),Od=class{constructor(t){this.layout="reflowable";this.USERSETTINGS="userSetting";this.sideMargin=20;this.height=0;this.attributes={margin:0};this.hasFixedScrollWidth=!1;this.store=t,this.isScrollMode()?(this.name="readium-scroll-on",this.label="Scrolling"):(this.name="readium-scroll-off",this.label="Paginated")}setMode(t){if(this.scrollMode=t,t===!0){this.name="readium-scroll-on",this.label="Scrolling";let n=Ft(this.iframe.contentDocument,"head");if(n){let o=ve(n,"meta[name=viewport]");o&&o.remove()}Ft(this.iframe.contentDocument,"html").style.setProperty("--USER__scroll","readium-scroll-on"),this.setSize(),this.setIframeHeight(this.iframe)}else this.height=to()-40-this.attributes.margin,this.name="readium-scroll-off",this.label="Paginated",this.checkForFixedScrollWidth(),Ft(this.iframe.contentDocument,"html").style.setProperty("--USER__scroll","readium-scroll-off"),this.setSize();this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}start(){if(this.isScrollMode()){let t=Ft(this.iframe.contentDocument,"head");if(t){let n=ve(t,"meta[name=viewport]");n&&n.remove()}this.setSize()}else{this.iframe.height="0",this.iframe.width="0",this.setSize();let t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1, maximum-scale=1",this.checkForFixedScrollWidth()}}stop(){this.iframe.height="0",this.iframe.width="0";let t=Ft(this.iframe.contentDocument,"body"),n=Array.prototype.slice.call(t.querySelectorAll("img"));for(let r of n)r.style.maxWidth=""}getCurrentPosition(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode())return t.scrollTop/this.scrollingElement.scrollHeight;{let n=this.getColumnWidth(),r=this.getLeftColumnsWidth(),o=this.getRightColumnsWidth(),a=r+n+o;return r/a}}goToProgression(t){let n=Bt(document,"#iframe-wrapper");if(this.isScrollMode())n.scrollTop=this.scrollingElement.scrollHeight*t;else{let r=this.getColumnWidth(),o=this.getLeftColumnsWidth(),a=this.getRightColumnsWidth(),s=o+r+a,l=t*s,c=Math.round(l/r)*r;c>=s&&(c=c-r),this.setLeftColumnsWidth(c)}}goToCssSelector(t,n){var r=this.iframe.contentDocument.querySelector(t);this.goToElement(r,n)}goToFragment(t,n){let r=this.iframe.contentDocument.getElementById(t);this.goToElement(r,n)}snap(t,n){if(t&&!this.isScrollMode()){let r=t.style.height;t.style.height="0";let o=this.getColumnWidth(),a=this.getLeftColumnsWidth()+t.getBoundingClientRect().left,s=Math.floor(a/o)*o;t.style.height=r,this.setLeftColumnsWidth(s),this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate(0)}}goToElement(t,n){let r=Bt(document,"#iframe-wrapper");if(this.isScrollMode())t&&(r.scrollTop=t.offsetTop);else if(t){let o=t.style.height;t.style.height="0";let a=t.getBoundingClientRect().left,s=this.getColumnWidth(),l=this.scrollingElement.scrollLeft-s,c=Math.ceil(a/s)*s+l;if(n){let h=this.getLeftColumnsWidth();c=Math.ceil(a/s)*s+h}t.style.height=o,this.setLeftColumnsWidth(c),this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate(200)}}atStart(){return this.isScrollMode()?Bt(document,"#iframe-wrapper").scrollTop===0:this.getLeftColumnsWidth()<=0}atEnd(){if(this.isScrollMode()){let t=Bt(document,"#iframe-wrapper");return Math.ceil(this.scrollingElement.scrollHeight-t.scrollTop)-1<=to()}else return Math.floor(this.getRightColumnsWidth())<=0}goToPreviousPage(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode()){let n=t.scrollTop,r=this.getScreenHeight(),o=n-r;o>=0?t.scrollTop=o:t.scrollTop=0}else{let n=this.getLeftColumnsWidth(),r=this.getColumnWidth(),o=n-r;o>=0?this.setLeftColumnsWidth(o):this.setLeftColumnsWidth(0),this.delegate.checkResourcePosition()}this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}goToNextPage(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode()){let n=t.scrollTop,r=this.getScreenHeight(),o=this.scrollingElement.scrollHeight,a=n+r;a<o?t.scrollTop=a:t.scrollTop=o}else{let n=this.getLeftColumnsWidth(),r=this.getColumnWidth(),o=this.scrollWidth,a=n+r;a<o?this.setLeftColumnsWidth(a):this.setLeftColumnsWidth(o),this.delegate.checkResourcePosition()}this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}getCurrentPage(){return this.isScrollMode()?0:this.getCurrentPosition()*this.getPageCount()+1}getPageCount(){if(this.isScrollMode())return 0;{let t=this.getColumnWidth();return this.scrollWidth/t}}isPaginated(){return this.iframe?Ft(this.iframe.contentDocument,"html").style.getPropertyValue("--USER__scroll")==="readium-scroll-on"===!1:this.scrollMode===!1}isScrollMode(){return this.iframe?Ft(this.iframe.contentDocument,"html").style.getPropertyValue("--USER__scroll")==="readium-scroll-on"===!0:this.scrollMode===!0}async getProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);return r=r.filter(o=>o.name===t),r.length===0?null:r[0]}return null}getScreenHeight(){return Bt(document,"#iframe-wrapper").clientHeight}setIframeHeight(t){(0,eC.debounce)(r=>{if(r){let o=r.contentWindow||r.contentDocument.parentWindow;if(o.document.body){let a=to()-this.attributes.margin,s=o.document.documentElement.scrollHeight||o.document.body.scrollHeight;r.height=Math.max(a,s)}}},200)(t)}checkForFixedScrollWidth(){let t=Ft(this.iframe.contentDocument,"body"),n=t.scrollWidth;this.hasFixedScrollWidth=t.scrollWidth===n}setSize(){if(this.iframe.width=ZS()+"px",!this.scrollMode)this.iframe.contentDocument.documentElement.style.height=this.height+"px",this.iframe.height=this.height+"px";else{let t=this.iframe.contentWindow.document.body;t&&(this.iframe.height=parseInt(getComputedStyle(t).height)+"px")}}getLeftColumnsWidth(){return Math.ceil(this.scrollingElement.scrollLeft)}getRightColumnsWidth(){let t=this.getColumnWidth(),n=this.scrollWidth-t;if(this.hasFixedScrollWidth){let r=this.getLeftColumnsWidth();n=Math.max(0,n-r)}return n}getColumnWidth(){return this.scrollingElement.clientWidth}setLeftColumnsWidth(t){this.scrollingElement.scrollLeft=t}get scrollingElement(){return this.iframe.contentDocument.scrollingElement?this.iframe.contentDocument.scrollingElement:this.iframe.contentDocument.body}get scrollWidth(){let t=this.scrollingElement.scrollWidth,n=this.getColumnWidth();return Math.floor(t/n)*n}};S();var Td=class{constructor(t){this.layout="fixed";this.sideMargin=20;this.height=0;this.attributes={margin:0}}start(){}stop(){}getCurrentPosition(){return 0}getScreenHeight(){return Bt(document,"#iframe-wrapper").clientHeight}goToProgression(t){}goToCssSelector(t,n){}goToFragment(t,n){}snap(t,n){}getCurrentPage(){return 0}getPageCount(){return 1}setSize(){}isPaginated(){return!0}isScrollMode(){return!1}};var Ct=class{constructor(t,n,r,o,a){this.USERSETTINGS="userSetting";this.fontSize=100;this.fontOverride=!1;this.fontFamily=0;this.appearance=0;this.verticalScroll=!0;this.textAlignment=0;this.columnCount=0;this.wordSpacing=0;this.letterSpacing=0;this.pageMargins=2;this.lineHeight=1;this.settingsChangeCallback=()=>{};this.settingsColumnsChangeCallback=()=>{};this.viewChangeCallback=()=>{};this.store=t,this.view=a==="fixed"?new Td(this.store):new Od(this.store),this.headerMenu=n,this.api=r,this.injectables=o,this.injectables.forEach(s=>{s.type==="style"&&(s.fontFamily&&this.addFont(s.fontFamily),s.appearance&&this.addAppearance(s.appearance))})}async isPaginated(){return await this.getPropertyAndFallback("verticalScroll",V.SCROLL_KEY)===!1}async isScrollMode(){return!await this.isPaginated()}static async create(t){let n=new this(t.store,t.headerMenu,t.api,t.injectables,t.layout);if(await n.initialise(),t.initialUserSettings){n.userProperties||(n.userProperties=n.getUserSettings());let r=t.initialUserSettings;r.verticalScroll!==void 0&&(n.verticalScroll=this.parseScrollSetting(r.verticalScroll),n.userProperties.getByRef(V.SCROLL_REF).value=n.verticalScroll,await n.saveProperty(n.userProperties.getByRef(V.SCROLL_REF)),W&&console.log(n.verticalScroll)),r.appearance&&(n.appearance=Ct.appearanceValues.findIndex(o=>o===r.appearance),n.userProperties.getByRef(V.APPEARANCE_REF).value=n.appearance,await n.saveProperty(n.userProperties.getByRef(V.APPEARANCE_REF)),W&&console.log(n.appearance)),r.fontSize&&(n.fontSize=r.fontSize,n.userProperties.getByRef(V.FONT_SIZE_REF).value=n.fontSize,await n.saveProperty(n.userProperties.getByRef(V.FONT_SIZE_REF)),W&&console.log(n.fontSize)),r.fontFamily&&(n.fontFamily=Ct.fontFamilyValues.findIndex(o=>o===r.fontFamily),n.userProperties.getByRef(V.FONT_FAMILY_REF).value=n.fontFamily,await n.saveProperty(n.userProperties.getByRef(V.FONT_FAMILY_REF)),W&&console.log(n.fontFamily),n.fontFamily!==0&&(n.fontOverride=!0)),r.textAlignment&&(n.textAlignment=Ct.textAlignmentValues.findIndex(o=>o===r.textAlignment),n.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value=n.textAlignment,await n.saveProperty(n.userProperties.getByRef(V.TEXT_ALIGNMENT_REF)),W&&console.log(n.textAlignment)),r.columnCount&&(n.columnCount=Ct.columnCountValues.findIndex(o=>o===r.columnCount),n.userProperties.getByRef(V.COLUMN_COUNT_REF).value=n.columnCount,await n.saveProperty(n.userProperties.getByRef(V.COLUMN_COUNT_REF)),W&&console.log(n.columnCount)),r.wordSpacing&&(n.wordSpacing=r.wordSpacing,n.userProperties.getByRef(V.WORD_SPACING_REF).value=n.wordSpacing,await n.saveProperty(n.userProperties.getByRef(V.WORD_SPACING_REF)),W&&console.log(n.wordSpacing)),r.letterSpacing&&(n.letterSpacing=r.letterSpacing,n.userProperties.getByRef(V.LETTER_SPACING_REF).value=n.letterSpacing,await n.saveProperty(n.userProperties.getByRef(V.LETTER_SPACING_REF)),W&&console.log(n.letterSpacing)),r.pageMargins&&(n.pageMargins=r.pageMargins,n.userProperties.getByRef(V.PAGE_MARGINS_REF).value=n.pageMargins,await n.saveProperty(n.userProperties.getByRef(V.PAGE_MARGINS_REF)),W&&console.log(n.pageMargins)),r.lineHeight&&(n.lineHeight=r.lineHeight,n.userProperties.getByRef(V.LINE_HEIGHT_REF).value=n.lineHeight,await n.saveProperty(n.userProperties.getByRef(V.LINE_HEIGHT_REF)),W&&console.log(n.lineHeight)),n.userProperties=n.getUserSettings(),await n.initialise()}return await n.initializeSelections(),new Promise(r=>r(n))}stop(){W&&console.log("book settings stop")}async initialise(){this.appearance=await this.getPropertyAndFallback("appearance",V.APPEARANCE_KEY),this.verticalScroll=await this.getPropertyAndFallback("verticalScroll",V.SCROLL_KEY),this.fontFamily=await this.getPropertyAndFallback("fontFamily",V.FONT_FAMILY_KEY),this.fontFamily!==0&&(this.fontOverride=!0),this.textAlignment=await this.getPropertyAndFallback("textAlignment",V.TEXT_ALIGNMENT_KEY),this.columnCount=await this.getPropertyAndFallback("columnCount",V.COLUMN_COUNT_KEY),this.fontSize=await this.getPropertyAndFallback("fontSize",V.FONT_SIZE_KEY),this.wordSpacing=await this.getPropertyAndFallback("wordSpacing",V.WORD_SPACING_KEY),this.letterSpacing=await this.getPropertyAndFallback("letterSpacing",V.LETTER_SPACING_KEY),this.pageMargins=await this.getPropertyAndFallback("pageMargins",V.PAGE_MARGINS_KEY),this.lineHeight=await this.getPropertyAndFallback("lineHeight",V.LINE_HEIGHT_KEY),this.userProperties=this.getUserSettings()}async reset(){this.appearance=0,this.verticalScroll=!0,this.fontSize=100,this.fontOverride=!1,this.fontFamily=0,this.textAlignment=0,this.columnCount=0,this.wordSpacing=0,this.letterSpacing=0,this.pageMargins=2,this.lineHeight=1,this.userProperties=this.getUserSettings();let t=Ft(this.iframe.contentDocument,"html"),n=document.documentElement,r=Bt(n,"body");t.style.removeProperty(V.FONT_SIZE_KEY),t.style.removeProperty(V.WORD_SPACING_KEY),t.style.removeProperty(V.LETTER_SPACING_KEY),t.style.removeProperty(V.COLUMN_COUNT_KEY),t.style.removeProperty(V.TEXT_ALIGNMENT_KEY),t.style.removeProperty(V.LINE_HEIGHT_KEY),t.style.removeProperty(V.PAGE_MARGINS_KEY),t.style.removeProperty(V.APPEARANCE_KEY),Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day"),t.style.removeProperty(V.FONT_FAMILY_KEY),Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")}async initializeSelections(){this.headerMenu&&(this.settingsView=ve(this.headerMenu,"#container-view-settings"))}async applyProperties(){this.userProperties=this.getUserSettings();let t=Ft(this.iframe.contentDocument,"html"),n=document.documentElement,r=Bt(n,"body");this.view.delegate.publication.isReflowable&&(await this.getProperty(V.FONT_SIZE_KEY)&&t.style.setProperty(V.FONT_SIZE_KEY,this.userProperties.getByRef(V.FONT_SIZE_REF).toString()),await this.getProperty(V.WORD_SPACING_KEY)&&t.style.setProperty(V.WORD_SPACING_KEY,this.userProperties.getByRef(V.WORD_SPACING_REF).toString()),await this.getProperty(V.LETTER_SPACING_KEY)&&t.style.setProperty(V.LETTER_SPACING_KEY,this.userProperties.getByRef(V.LETTER_SPACING_REF).toString())),await this.getProperty(V.COLUMN_COUNT_KEY)&&t.style.setProperty(V.COLUMN_COUNT_KEY,this.userProperties.getByRef(V.COLUMN_COUNT_REF).toString()),this.view.delegate.publication.isReflowable&&(await this.getProperty(V.TEXT_ALIGNMENT_KEY)&&(this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).toString()==="auto"?t.style.removeProperty(V.TEXT_ALIGNMENT_KEY):t.style.setProperty(V.TEXT_ALIGNMENT_KEY,this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).toString())),await this.getProperty(V.LINE_HEIGHT_KEY)&&t.style.setProperty(V.LINE_HEIGHT_KEY,this.userProperties.getByRef(V.LINE_HEIGHT_REF).toString()),await this.getProperty(V.PAGE_MARGINS_KEY)&&t.style.setProperty(V.PAGE_MARGINS_KEY,this.userProperties.getByRef(V.PAGE_MARGINS_REF).toString())),await this.getProperty(V.APPEARANCE_KEY)?(t.style.setProperty(V.APPEARANCE_KEY,this.userProperties.getByRef(V.APPEARANCE_REF).toString()),this.userProperties.getByRef(V.APPEARANCE_REF).value===0?(Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day")):this.userProperties.getByRef(V.APPEARANCE_REF).value===1?(Rn(n,"data-viewer-theme","sepia"),Rn(r,"data-viewer-theme","sepia")):this.userProperties.getByRef(V.APPEARANCE_REF).value===2&&(Rn(n,"data-viewer-theme","night"),Rn(r,"data-viewer-theme","night"))):(t.style.setProperty(V.APPEARANCE_KEY,this.userProperties.getByRef(V.APPEARANCE_REF).toString()),Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day")),this.view.delegate.publication.isReflowable&&(await this.getProperty(V.FONT_FAMILY_KEY)?(t.style.setProperty(V.FONT_FAMILY_KEY,this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),this.userProperties.getByRef(V.FONT_FAMILY_REF).value===0?(Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")):this.userProperties.getByRef(V.FONT_FAMILY_REF).value===1?(Rn(t,"data-viewer-font","serif"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on")):this.userProperties.getByRef(V.FONT_FAMILY_REF).value===2?(Rn(t,"data-viewer-font","sans"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on")):(Rn(t,"data-viewer-font",this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on"))):(t.style.setProperty(V.FONT_FAMILY_KEY,this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")),await this.getProperty(V.SCROLL_KEY)?this.userProperties.getByRef(V.SCROLL_REF).value===!0?t.style.setProperty("--USER__scroll","readium-scroll-on"):t.style.setProperty("--USER__scroll","readium-scroll-off"):t.style.setProperty("--USER__scroll","readium-scroll-on"),t.style.setProperty("--USER__advancedSettings","readium-advanced-on"),this.isScrollMode().then(o=>{this.view.setMode(o)}))}setIframe(t){this.iframe=t,this.view.iframe=t,this.settingsView&&this.renderControls(this.settingsView)}renderControls(t){ue(ve(t,"ul"),"click",n=>{n.stopPropagation()})}onSettingsChange(t){this.settingsChangeCallback=t}onColumnSettingsChange(t){this.settingsColumnsChangeCallback=t}onViewChange(t){this.viewChangeCallback=t}async storeProperty(t){await this.updateUserSettings(),await this.saveProperty(t)}addAppearance(t){Ct.appearanceValues.includes(t)||Ct.appearanceValues.push(t)}initAddedAppearance(){this.applyProperties()}addFont(t){Ct.fontFamilyValues.includes(t)||Ct.fontFamilyValues.push(t)}initAddedFont(){this.applyProperties()}async updateUserSettings(){let t={fontFamily:Ct.fontFamilyValues[await this.userProperties.getByRef(V.FONT_FAMILY_REF).value],fontSize:this.userProperties.getByRef(V.FONT_SIZE_REF).value,appearance:Ct.appearanceValues[await this.userProperties.getByRef(V.APPEARANCE_REF).value],textAlignment:Ct.textAlignmentValues[await this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value],columnCount:Ct.columnCountValues[await this.userProperties.getByRef(V.COLUMN_COUNT_REF).value],wordSpacing:this.userProperties.getByRef(V.WORD_SPACING_REF).value,letterSpacing:this.userProperties.getByRef(V.LETTER_SPACING_REF).value,verticalScroll:this.userProperties.getByRef(V.SCROLL_REF).value};this.api?.updateSettings&&this.api?.updateSettings(t).then(n=>{W&&console.log("api updated user settings",t)})}getUserSettings(){let t=new Ho;return t.addSwitchable("readium-font-on","readium-font-off",this.fontOverride,V.FONT_OVERRIDE_REF,V.FONT_OVERRIDE_KEY),t.addEnumerable(this.columnCount,Ct.columnCountValues,V.COLUMN_COUNT_REF,V.COLUMN_COUNT_KEY),t.addEnumerable(this.appearance,Ct.appearanceValues,V.APPEARANCE_REF,V.APPEARANCE_KEY),t.addIncremental(this.pageMargins,.5,4,.25,"",V.PAGE_MARGINS_REF,V.PAGE_MARGINS_KEY),t.addEnumerable(this.textAlignment,Ct.textAlignmentValues,V.TEXT_ALIGNMENT_REF,V.TEXT_ALIGNMENT_KEY),t.addEnumerable(this.fontFamily,Ct.fontFamilyValues,V.FONT_FAMILY_REF,V.FONT_FAMILY_KEY),t.addIncremental(this.fontSize,100,300,25,"%",V.FONT_SIZE_REF,V.FONT_SIZE_KEY),t.addIncremental(this.lineHeight,1,2,.25,"em",V.LINE_HEIGHT_REF,V.LINE_HEIGHT_KEY),t.addIncremental(this.wordSpacing,0,1,.25,"rem",V.WORD_SPACING_REF,V.WORD_SPACING_KEY),t.addIncremental(this.letterSpacing,0,.5,.0625,"em",V.LETTER_SPACING_REF,V.LETTER_SPACING_KEY),t.addSwitchable("readium-scroll-on","readium-scroll-off",this.verticalScroll,V.SCROLL_REF,V.SCROLL_KEY),t}async saveProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.name!==t.name),t.value!==void 0&&r.push(t),await this.store.set(this.USERSETTINGS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(this.USERSETTINGS,JSON.stringify(r))}return new Promise(r=>r(t))}async getProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);return r=r.filter(o=>o.name===t),r.length===0?null:r[0]}return null}async getPropertyAndFallback(t,n){return(await this.getProperty(n))?.value??this[t]}async resetUserSettings(){await this.store.remove(this.USERSETTINGS),await this.reset(),this.settingsChangeCallback()}get currentSettings(){return{appearance:Ct.appearanceValues[this.userProperties.getByRef(V.APPEARANCE_REF).value],fontFamily:Ct.fontFamilyValues[this.userProperties.getByRef(V.FONT_FAMILY_REF).value],textAlignment:Ct.textAlignmentValues[this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value],columnCount:Ct.columnCountValues[this.userProperties.getByRef(V.COLUMN_COUNT_REF).value],verticalScroll:this.verticalScroll,fontSize:this.fontSize,wordSpacing:this.wordSpacing,letterSpacing:this.letterSpacing,pageMargins:this.pageMargins,lineHeight:this.lineHeight}}async applyUserSettings(t){if(t.appearance){let n;t.appearance==="day"||t.appearance==="readium-default-on"?n=Ct.appearanceValues[0]:t.appearance==="sepia"||t.appearance==="readium-sepia-on"?n=Ct.appearanceValues[1]:t.appearance==="night"||t.appearance==="readium-night-on"?n=Ct.appearanceValues[2]:n=t.appearance,this.appearance=Ct.appearanceValues.findIndex(r=>r===n),this.userProperties.getByRef(V.APPEARANCE_REF).value=this.appearance,await this.storeProperty(this.userProperties.getByRef(V.APPEARANCE_REF))}t.fontSize&&(this.fontSize=t.fontSize,this.userProperties.getByRef(V.FONT_SIZE_REF).value=this.fontSize,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))),t.fontFamily&&(this.fontFamily=Ct.fontFamilyValues.findIndex(n=>n===t.fontFamily),this.userProperties.getByRef(V.FONT_FAMILY_REF).value=this.fontFamily,await this.storeProperty(this.userProperties.getByRef(V.FONT_FAMILY_REF))),t.letterSpacing&&(this.letterSpacing=t.letterSpacing,this.userProperties.getByRef(V.LETTER_SPACING_REF).value=this.letterSpacing,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))),t.wordSpacing&&(this.wordSpacing=t.wordSpacing,this.userProperties.getByRef(V.WORD_SPACING_REF).value=this.wordSpacing,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))),t.columnCount&&(this.columnCount=Ct.columnCountValues.findIndex(n=>n===t.columnCount),this.userProperties.getByRef(V.COLUMN_COUNT_REF).value=this.columnCount,await this.storeProperty(this.userProperties.getByRef(V.COLUMN_COUNT_REF)),this.settingsColumnsChangeCallback()),t.textAlignment&&(this.textAlignment=Ct.textAlignmentValues.findIndex(n=>n===t.textAlignment),this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value=this.textAlignment,await this.storeProperty(this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF))),t.lineHeight&&(this.lineHeight=t.lineHeight,this.userProperties.getByRef(V.LINE_HEIGHT_REF).value=this.lineHeight,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),t.pageMargins&&(this.pageMargins=t.pageMargins,this.userProperties.getByRef(V.PAGE_MARGINS_REF).value=this.pageMargins,await this.storeProperty(this.userProperties.getByRef(V.PAGE_MARGINS_REF))),await this.applyProperties(),this.settingsChangeCallback(),setTimeout(async()=>{if(t.verticalScroll!==void 0){let n=this.view.getCurrentPosition();this.verticalScroll=Ct.parseScrollSetting(t.verticalScroll),this.userProperties.getByRef(V.SCROLL_REF).value=this.verticalScroll,await this.saveProperty(this.userProperties.getByRef(V.SCROLL_REF)),await this.applyProperties(),this.view.setMode(this.verticalScroll),this.view.goToProgression(n),this.viewChangeCallback()}},10)}static parseScrollSetting(t){switch(t){case!0:case"scroll":case"readium-scroll-on":return!0;case!1:case"paginated":case"readium-scroll-off":return!1}}async scroll(t){let n=this.view.getCurrentPosition();this.verticalScroll=t,this.userProperties.getByRef(V.SCROLL_REF).value=this.verticalScroll,await this.saveProperty(this.userProperties.getByRef(V.SCROLL_REF)),await this.applyProperties(),this.view.setMode(this.verticalScroll),this.view.goToProgression(n),this.viewChangeCallback()}async increase(t){t==="fontSize"?(this.userProperties.getByRef(V.FONT_SIZE_REF).increment(),this.fontSize=this.userProperties.getByRef(V.FONT_SIZE_REF).value,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))):t==="letterSpacing"?(this.userProperties.getByRef(V.LETTER_SPACING_REF).increment(),this.letterSpacing=this.userProperties.getByRef(V.LETTER_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))):t==="wordSpacing"?(this.userProperties.getByRef(V.WORD_SPACING_REF).increment(),this.wordSpacing=this.userProperties.getByRef(V.WORD_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))):t==="lineHeight"&&(this.userProperties.getByRef(V.LINE_HEIGHT_REF).increment(),this.lineHeight=this.userProperties.getByRef(V.LINE_HEIGHT_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),await this.applyProperties(),this.settingsChangeCallback()}async decrease(t){t==="fontSize"?(this.userProperties.getByRef(V.FONT_SIZE_REF).decrement(),this.fontSize=this.userProperties.getByRef(V.FONT_SIZE_REF).value,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))):t==="letterSpacing"?(this.userProperties.getByRef(V.LETTER_SPACING_REF).decrement(),this.letterSpacing=this.userProperties.getByRef(V.LETTER_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))):t==="wordSpacing"?(this.userProperties.getByRef(V.WORD_SPACING_REF).decrement(),this.wordSpacing=this.userProperties.getByRef(V.WORD_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))):t==="lineHeight"&&(this.userProperties.getByRef(V.LINE_HEIGHT_REF).decrement(),this.wordSpacing=this.userProperties.getByRef(V.LINE_HEIGHT_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),await this.applyProperties(),this.settingsChangeCallback()}},Jo=Ct;Jo.appearanceValues=["readium-default-on","readium-sepia-on","readium-night-on"],Jo.fontFamilyValues=["Original","serif","sans-serif"],Jo.textAlignmentValues=["auto","justify","start"],Jo.columnCountValues=["auto","1","2"];S();S();var mi;(function(n){n[n.Bookmark=0]="Bookmark",n[n.Annotation=1]="Annotation"})(mi||(mi={}));S();S();S();S();S();S();var tC={stringify(i){let t=i.nSigBytes,n=i.words,r=[];for(let o=0;o<t;o++){let a=n[o>>>2]>>>24-o%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join("")},parse(i){let t=i.length;if(t%2!=0)throw new Error("Hex string count must be even");let n=[];for(let r=0;r<t;r+=2)n[r>>>3]|=parseInt(i.substr(r,2),16)<<24-r%8*4;return new Un(n,t/2)}};S();S();var nC=typeof navigator!="undefined"&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Ko=(()=>{let i=parseInt((/msie (\d+)/.exec(nC)||[])[1],10);return isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(nC)||[])[1],10),isNaN(i)?!1:i):i})();function iC(i,t){return Ko===!1?!1:t?i==="<"?Ko<t:i==="<="?Ko<=t:i===">"?Ko>t:i===">="?Ko>=t:Ko===t:!0}function Jj(){if(typeof window!="undefined"){let i=window.crypto||window.msCrypto;if(!i){if(iC("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(Math.random()*512)%256};throw new Error("Crypto module not found")}return function(){return i.getRandomValues(new Uint32Array(1))[0]}}else{if(typeof window!="undefined"&&window.crypto)return function(){return window.crypto.randomBytes(4).readInt32LE()};if(typeof yy=="function")return function(){let t="crypt";return t+=String.fromCharCode(111),__non_webpack_require__(t).randomBytes(4).readInt32LE()}}throw new Error("Unable to find crypto module")}var rC=Jj();var Un=class{constructor(t,n){if(Array.isArray(t)||!t){this._words=Array.isArray(t)?t:[],this._nSignificantBytes=typeof n=="number"?n:this._words.length*4;return}let r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else if(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else throw new Error("Invalid argument");if(!r){this._words=[],this._nSignificantBytes=0;return}let o=r.byteLength,a=[];for(let s=0;s<o;s++)a[s>>>2]|=r[s]<<24-s%4*8;this._words=a,this._nSignificantBytes=o}get nSigBytes(){return this._nSignificantBytes}set nSigBytes(t){this._nSignificantBytes=t}get words(){return this._words}toString(t){return t?t.stringify(this):tC.stringify(this)}toUint8Array(){let t=this._words,n=this._nSignificantBytes,r=new Uint8Array(n);for(let o=0;o<n;o++)r[o]=t[o>>>2]>>>24-o%4*8&255;return r}concat(t){let n=t.words.slice(),r=t.nSigBytes;if(this.clamp(),this._nSignificantBytes%4)for(let o=0;o<r;o++){let a=n[o>>>2]>>>24-o%4*8&255;this._words[this._nSignificantBytes+o>>>2]|=a<<24-(this._nSignificantBytes+o)%4*8}else for(let o=0;o<r;o+=4)this._words[this._nSignificantBytes+o>>>2]=n[o>>>2];return this._nSignificantBytes+=r,this}clamp(){let t=this._nSignificantBytes;this._words[t>>>2]&=4294967295<<32-t%4*8,this._words.length=Math.ceil(t/4)}clone(){return new Un(this._words.slice(),this._nSignificantBytes)}static random(t){let n=[];for(let r=0;r<t;r+=4)n.push(rC());return new Un(n,t)}};S();S();var kg={stringify(i){let t=i.nSigBytes,n=i.words,r=[];for(let o=0;o<t;o++){let a=n[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse(i){let t=i.length,n=[];for(let r=0;r<t;r++)n[r>>>2]|=(i.charCodeAt(r)&255)<<24-r%4*8;return new Un(n,t)}};var oC={stringify(i){try{return decodeURIComponent(escape(kg.stringify(i)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse(i){return kg.parse(unescape(encodeURIComponent(i)))}};var Lg=class{constructor(t){this._minBufferSize=0,this._blockSize=0,this._props=t,this._data=t&&typeof t.data!="undefined"?t.data.clone():new Un,this._nBytes=t&&typeof t.nBytes=="number"?t.nBytes:0}get blockSize(){return this._blockSize}reset(t,n){this._data=typeof t!="undefined"?t.clone():new Un,this._nBytes=typeof n=="number"?n:0}_append(t){let n=typeof t=="string"?oC.parse(t):t;this._data.concat(n),this._nBytes+=n.nSigBytes}_process(t){let n,r=this._data.words,o=this._data.nSigBytes,a=this._blockSize,s=this._blockSize*4,l=o/s;t?l=Math.ceil(l):l=Math.max((l|0)-this._minBufferSize,0);let c=l*a,h=Math.min(c*4,o);if(c){for(let f=0;f<c;f+=a)this._doProcessBlock(r,f);n=r.splice(0,c),this._data.nSigBytes-=h}return new Un(n,h)}_doProcessBlock(t,n){throw new Error("Not implemented")}};var Pg=class extends Lg{constructor(t){super(t);this._blockSize=512/32,this._props=t,t&&typeof t.blockSize=="number"&&(this._blockSize=t.blockSize),this.reset(t?t.data:void 0,t?t.nBytes:void 0)}get blockSize(){return this._blockSize}reset(t,n){super.reset.call(this,t,n),this._doReset()}update(t){return this._append(t),this._process(),this}finalize(t){return t&&this._append(t),this._doFinalize()}_doReset(){throw new Error("Not implemented")}_doFinalize(){throw new Error("Not implemented")}};var Bg=[],sC=[];function Kj(i){let t=Math.sqrt(i);for(let n=2;n<=t;n++)if(!(i%n))return!1;return!0}function aC(i){return(i-(i|0))*4294967296|0}(function(){let t=2,n=0;for(;n<64;)Kj(t)&&(n<8&&(Bg[n]=aC(Math.pow(t,1/2))),sC[n]=aC(Math.pow(t,1/3)),n++),t++})();var Yo=[],zi=class extends Pg{constructor(t){super(t);this._hash=new Un(Bg.slice(0)),this._props=t,t&&typeof t.hash!="undefined"&&(this._hash=t.hash.clone())}_doReset(){this._hash=new Un(Bg.slice(0))}_doProcessBlock(t,n){let r=this._hash.words,o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],h=r[5],f=r[6],v=r[7];for(let m=0;m<64;m++){if(m<16)Yo[m]=t[n+m]|0;else{let L=Yo[m-15],j=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,N=Yo[m-2],q=(N<<15|N>>>17)^(N<<13|N>>>19)^N>>>10;Yo[m]=j+Yo[m-7]+q+Yo[m-16]}let y=c&h^~c&f,E=o&a^o&s^a&s,_=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),C=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),A=v+C+y+sC[m]+Yo[m],T=_+E;v=f,f=h,h=c,c=l+A|0,l=s,s=a,a=o,o=A+T|0}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+s|0,r[3]=r[3]+l|0,r[4]=r[4]+c|0,r[5]=r[5]+h|0,r[6]=r[6]+f|0,r[7]=r[7]+v|0}_doFinalize(){let t=this._data.words,n=this._nBytes*8,r=this._data.nSigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,this._data.nSigBytes=t.length*4,this._process(),this._hash}clone(){let t={hash:this._hash,blockSize:this._blockSize,data:this._data,nBytes:this._nBytes};return new zi(t)}static hash(t,n){return new zi(n).finalize(t)}};var kd=Tt(Go());S();var Qe;(function(a){a[a.Annotation=0]="Annotation",a[a.Search=1]="Search",a[a.ReadAloud=2]="ReadAloud",a[a.PageBreak=3]="PageBreak",a[a.Popup=4]="Popup"})(Qe||(Qe={}));S();var vi=!1;function na(i,t){let n=i.getClientRects();return Yj(n,t)}function Yj(i,t){let n=1,r=[];for(let c of i)r.push({bottom:c.bottom,height:c.height,left:c.left,right:c.right,top:c.top,width:c.width});let o=uC(r,n,t),a=n5(o,n),s=cC(a),l=2*2;for(let c=s.length-1;c>=0;c--){let h=s[c];if(!(h.width*h.height>l))if(s.length>1)vi&&console.log("CLIENT RECT: remove small"),s.splice(c,1);else{vi&&console.log("CLIENT RECT: remove small, but keep otherwise empty!");break}}return vi&&dC(s),vi&&console.log(`CLIENT RECT: reduced ${r.length} --> ${s.length}`),s}function Ii(i,t,n){return Math.abs(i-t)<=n}function Xj(i,t){let n=Math.max(i.left,t.left),r=Math.min(i.right,t.right),o=Math.max(i.top,t.top),a=Math.min(i.bottom,t.bottom);return{bottom:a,height:Math.max(0,a-o),left:n,right:r,top:o,width:Math.max(0,r-n)}}function lC(i,t){let n=Xj(t,i);if(n.height===0||n.width===0)return[i];let r=[];{let o={bottom:i.bottom,height:0,left:i.left,right:n.left,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:n.top,height:0,left:n.left,right:n.right,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:i.bottom,height:0,left:n.left,right:n.right,top:n.bottom,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:i.bottom,height:0,left:n.right,right:i.right,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}return r}function Md(i,t,n,r){return(i.left<t||Ii(i.left,t,r))&&(i.right>t||Ii(i.right,t,r))&&(i.top<n||Ii(i.top,n,r))&&(i.bottom>n||Ii(i.bottom,n,r))}function Zj(i,t,n){return Md(i,t.left,t.top,n)&&Md(i,t.right,t.top,n)&&Md(i,t.left,t.bottom,n)&&Md(i,t.right,t.bottom,n)}function Qj(i,t){let n=Math.min(i.left,t.left),r=Math.max(i.right,t.right),o=Math.min(i.top,t.top),a=Math.max(i.bottom,t.bottom);return{bottom:a,height:a-o,left:n,right:r,top:o,width:r-n}}function Ig(i,t,n){return(i.left<t.right||n>=0&&Ii(i.left,t.right,n))&&(t.left<i.right||n>=0&&Ii(t.left,i.right,n))&&(i.top<t.bottom||n>=0&&Ii(i.top,t.bottom,n))&&(t.top<i.bottom||n>=0&&Ii(t.top,i.bottom,n))}function uC(i,t,n){for(let r=0;r<i.length;r++)for(let o=r+1;o<i.length;o++){let a=i[r],s=i[o];if(a===s){vi&&console.log("mergeTouchingRects rect1 === rect2 ??!");continue}let l=Ii(a.top,s.top,t)&&Ii(a.bottom,s.bottom,t),c=Ii(a.left,s.left,t)&&Ii(a.right,s.right,t);if((c&&!n||l&&!c)&&Ig(a,s,t)){vi&&console.log(`CLIENT RECT: merging two into one, VERTICAL: ${l} HORIZONTAL: ${c} (${n})`);let m=i.filter(E=>E!==a&&E!==s),y=Qj(a,s);return m.push(y),uC(m,t,n)}}return i}function cC(i){for(let t=0;t<i.length;t++)for(let n=t+1;n<i.length;n++){let r=i[t],o=i[n];if(r===o){vi&&console.log("replaceOverlappingRects rect1 === rect2 ??!");continue}if(Ig(r,o,-1)){let a=[],s,l,c=lC(r,o);if(c.length===1)a=c,s=r,l=o;else{let f=lC(o,r);c.length<f.length?(a=c,s=r,l=o):(a=f,s=o,l=r)}if(vi){let f=[];f.push(l),Array.prototype.push.apply(f,a),dC(f)}vi&&console.log(`CLIENT RECT: overlap, cut one rect into ${a.length}`);let h=i.filter(f=>f!==s);return Array.prototype.push.apply(h,a),cC(h)}}return i}function e5(i,t){return Math.max(0,Math.min(i.right,t.right)-Math.max(i.left,t.left))}function t5(i,t){return Math.max(0,Math.min(i.bottom,t.bottom)-Math.max(i.top,t.top))}function n5(i,t){let n=new Set(i);for(let r of i){if(!(r.width>1&&r.height>1)){vi&&console.log("CLIENT RECT: remove tiny"),n.delete(r);continue}for(let a of i)if(r!==a&&!!n.has(a)&&Zj(a,r,t)){vi&&console.log("CLIENT RECT: remove contained"),n.delete(r);break}}return Array.from(n)}function dC(i){let t=[];for(let n of i)for(let r of i){if(n===r)continue;let o=t.indexOf(n)>=0,a=t.indexOf(r)>=0;if((!o||!a)&&Ig(n,r,-1)&&(o||t.push(n),a||t.push(r),vi)){console.log("CLIENT RECT: overlap ---"),console.log(`#1 TOP:${n.top} BOTTOM:${n.bottom} LEFT:${n.left} RIGHT:${n.right} WIDTH:${n.width} HEIGHT:${n.height}`),console.log(`#2 TOP:${r.top} BOTTOM:${r.bottom} LEFT:${r.left} RIGHT:${r.right} WIDTH:${r.width} HEIGHT:${r.height}`);let s=e5(n,r);console.log(`xOverlap: ${s}`);let l=t5(n,r);console.log(`yOverlap: ${l}`)}}t.length&&vi&&console.log(`CLIENT RECT: overlaps ${t.length}`)}S();var on=!1;function no(i,t){let n=i?i.getSelection():null;if(!n)return;if(n.isCollapsed){on&&console.log("^^^ SELECTION COLLAPSED.");return}let r=n.toString(),o=r.trim().replace(/\n/g," ").replace(/\s\s+/g," ");if(o.length===0){on&&console.log("^^^ SELECTION TEXT EMPTY.");return}if(!n.anchorNode||!n.focusNode)return;let a=n.rangeCount===1?n.getRangeAt(0):hC(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset);if(!a||a.collapsed){on&&console.log("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");return}let s=r5(a);on&&(s.startContainer!==a.startContainer&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: startContainer"),console.log(s.startContainer),console.log(a.startContainer)),s.startOffset!==a.startOffset&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: startOffset"),console.log(`${s.startOffset} !== ${a.startOffset}`)),s.endContainer!==a.endContainer&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: endContainer"),console.log(s.endContainer),console.log(a.endContainer)),s.endOffset!==a.endOffset&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: endOffset"),console.log(`${s.endOffset} !== ${a.endOffset}`)));let l=kr(s,t);if(!l){on&&console.log("^^^ SELECTION RANGE INFO FAIL?!");return}return{rangeInfo:l,cleanText:o,rawText:r,range:s}}function hC(i,t,n,r){try{let o=new Range;if(o.setStart(i,t),o.setEnd(n,r),!o.collapsed)return on&&console.log(">>> createOrderedRange RANGE OK"),o;on&&console.log(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");let a=new Range;if(a.setStart(n,r),a.setEnd(i,t),!a.collapsed)return on&&console.log(">>> createOrderedRange RANGE REVERSE OK."),o;on&&console.log(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!");return}catch(o){console.warn(o.message);return}}function kr(i,t){let n=i.startContainer.nodeType===Node.ELEMENT_NODE,r=n?i.startContainer:i.startContainer.parentNode&&i.startContainer.parentNode.nodeType===Node.ELEMENT_NODE?i.startContainer.parentNode:void 0;if(!r)return;let o=n?-1:Array.from(r.childNodes).indexOf(i.startContainer);if(o<-1)return;let a=t(r),s=i.endContainer.nodeType===Node.ELEMENT_NODE,l=s?i.endContainer:i.endContainer.parentNode&&i.endContainer.parentNode.nodeType===Node.ELEMENT_NODE?i.endContainer.parentNode:void 0;if(!l)return;let c=s?-1:Array.from(l.childNodes).indexOf(i.endContainer);if(c<-1)return;let h=t(l),f=i5(i.startContainer,i.endContainer);if(!f){on&&console.log("^^^ NO RANGE COMMON ANCESTOR?!");return}if(i.commonAncestorContainer){let v=i.commonAncestorContainer.nodeType===Node.ELEMENT_NODE?i.commonAncestorContainer:i.commonAncestorContainer.parentNode;v&&v.nodeType===Node.ELEMENT_NODE&&f!==v&&on&&(console.log(">>>>>> COMMON ANCESTOR CONTAINER DIFF??!"),console.log(t(f)),console.log(t(v)))}return{endContainerChildTextNodeIndex:c,endContainerElementCssSelector:h,endOffset:i.endOffset,startContainerChildTextNodeIndex:o,startContainerElementCssSelector:a,startOffset:i.startOffset}}function fC(i,t){let n=i.querySelector(t.startContainerElementCssSelector);if(!n){on&&console.log("^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!");return}let r=n;if(t.startContainerChildTextNodeIndex>=0){if(t.startContainerChildTextNodeIndex>=n.childNodes.length){on&&console.log("^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!");return}if(r=n.childNodes[t.startContainerChildTextNodeIndex],r.nodeType!==Node.TEXT_NODE){on&&console.log("^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!");return}}let o=i.querySelector(t.endContainerElementCssSelector);if(!o){on&&console.log("^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!");return}let a=o;if(t.endContainerChildTextNodeIndex>=0){if(t.endContainerChildTextNodeIndex>=o.childNodes.length){on&&console.log("^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!");return}if(a=o.childNodes[t.endContainerChildTextNodeIndex],a.nodeType!==Node.TEXT_NODE){on&&console.log("^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!");return}}return hC(r,t.startOffset,a,t.endOffset)}function i5(i,t){if(i.nodeType===Node.ELEMENT_NODE&&i===t||i.nodeType===Node.ELEMENT_NODE&&i.contains(t))return i;if(t.nodeType===Node.ELEMENT_NODE&&t.contains(i))return t;let n=[],r=i.parentNode;for(;r&&r.nodeType===Node.ELEMENT_NODE;)n.push(r),r=r.parentNode;let o=[];for(r=t.parentNode;r&&r.nodeType===Node.ELEMENT_NODE;)o.push(r),r=r.parentNode;let a=n.find(s=>o.indexOf(s)>=0);return a||(a=o.find(s=>n.indexOf(s)>=0)),a}function r5(i){let t=i.cloneRange(),n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset;n.childNodes.length&&r>0&&(n=gC(n.childNodes[r-1]),r=n.length||0),a<o.childNodes.length&&(o=pC(o.childNodes[a]),a=0);let s=pC(n),l=gC(o);function c(h){if(h.childNodes.length)return!1;let f=h.length||0;return h===n&&r===f?!1:!(h===o&&a===0)}for(;s&&!c(s)&&s!==l;)s=o5(s);for(s===n?t.setStart(n,r):s!==null&&(s.nodeType===3?t.setStart(s,0):t.setStartBefore(s));l&&!c(l)&&l!==s;)l=s5(l);return l===o?t.setEnd(o,a):l!==null&&(l.nodeType===3?t.setEnd(l,l.length):t.setEndAfter(l)),t}function o5(i){if(i.firstChild)return i.firstChild;let t=i;for(;!t.nextSibling;)if(t=t.parentNode,!t)return null;return t.nextSibling}function s5(i){if(i.lastChild)return i.lastChild;let t=i;for(;!t.previousSibling;)if(t=t.parentNode,!t)return null;return t.previousSibling}function pC(i){for(;i.firstChild;)i=i.firstChild;return i}function gC(i){for(;i.lastChild;)i=i.lastChild;return i}S();var Hg=Tt(vC()),io;(function(r){r[r.All=0]="All",r[r.Two=1]="Two",r[r.One=2]="One"})(io||(io={}));var Lr,Dg;function Wn(i,t,n){if(i.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(i.tagName.toLowerCase()==="html")return i.tagName.toLowerCase();let r={className:a=>!0,idName:a=>!0,optimizedMinLength:2,root:t.body,seedMinLength:1,tagName:a=>!0,threshold:1e3};Lr=Ze(Ze({},r),n),Dg=f5(Lr.root,r);let o=jg(i,0,()=>jg(i,1,()=>jg(i,2)));if(o){let a=_C(SC(o,i));return a.length>0&&(o=a[0]),Ad(o)}else throw new Error("Selector was not found.")}function f5(i,t){return i.nodeType===Node.DOCUMENT_NODE?i:i===t.root?i.ownerDocument:i}function jg(i,t,n){let r=null,o=[],a=i,s=0;for(;a&&a!==Lr.root.parentElement;){let l=Ug(p5(a))||Ug(...g5(a))||Ug(m5(a))||[v5()],c=y5(a);if(t===0)c&&(l=l.concat(l.filter($g).map(h=>Fg(h,c))));else if(t===1)l=l.slice(0,1),c&&(l=l.concat(l.filter($g).map(h=>Fg(h,c))));else if(t===2){let[h]=l=l.slice(0,1);c&&$g(h)&&(l=[Fg(h,c)])}for(let h of l)h.level=s;if(o.push(l),o.length>=Lr.seedMinLength&&(r=yC(o,n),r))break;a=a.parentElement,s++}return r||(r=yC(o,n)),r}function yC(i,t){let n=_C(EC(i));if(n.length>Lr.threshold)return t?t():null;for(let r of n)if(wC(r))return r;return null}function Ad(i){let t=i[0],n=t.name;for(let r=1;r<i.length;r++){let o=i[r].level||0;t.level===o-1?n=`${i[r].name} > ${n}`:n=`${i[r].name} ${n}`,t=i[r]}return n}function bC(i){return i.map(t=>t.penalty).reduce((t,n)=>t+n,0)}function wC(i){switch(Dg.querySelectorAll(Ad(i)).length){case 0:throw new Error(`Can't select any node with this selector: ${Ad(i)}`);case 1:return!0;default:return!1}}function p5(i){let t=i.getAttribute("id");return t&&Lr.idName(t)?{name:"#"+(0,Hg.default)(t,{isIdentifier:!0}),penalty:0}:null}function g5(i){return Array.from(i.classList).filter(Lr.className).map(n=>({name:"."+(0,Hg.default)(n,{isIdentifier:!0}),penalty:1}))}function m5(i){let t=i.tagName.toLowerCase();return Lr.tagName(t)?{name:t,penalty:2}:null}function v5(){return{name:"*",penalty:3}}function y5(i){let t=i.parentNode;if(!t)return null;let n=t.firstChild;if(!n)return null;let r=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==i);)n=n.nextSibling;return r}function Fg(i,t){return{name:i.name+`:nth-child(${t})`,penalty:i.penalty+1}}function $g(i){return i.name!=="html"&&!i.name.startsWith("#")}function Ug(...i){let t=i.filter(b5);return t.length>0?t:null}function b5(i){return i!=null}function*EC(i,t=[]){if(i.length>0)for(let n of i[0])yield*EC(i.slice(1,i.length),t.concat(n));else yield t}function _C(i){return Array.from(i).sort((t,n)=>bC(t)-bC(n))}function*SC(i,t){if(i.length>2&&i.length>Lr.optimizedMinLength)for(let n=1;n<i.length-1;n++){let r=[...i];r.splice(n,1),wC(r)&&w5(r,t)&&(yield r,yield*SC(r,t))}}function w5(i,t){return Dg.querySelector(Ad(i))===t}S();var et;(function(o){o[o.Highlight=0]="Highlight",o[o.Underline=1]="Underline",o[o.Bookmark=2]="Bookmark",o[o.Custom=3]="Custom"})(et||(et={}));S();var CC=24,xC=24,Wg="0 0 24 24",qn=(i,t,n,r="icon")=>`<svg xmlns="http://www.w3.org/2000/svg" width="${CC}" height="${xC}" viewBox="${Wg}" preserveAspectRatio="xMidYMid meet" role="img" class="${r}" aria-labelledBy="${i}">
|
|
69
|
+
`),r=Array.from(new Array(this.startOffset-n.length)).fill("\u222F");this.textCharacters=r.concat(n,t.raw.split("")),this.source=new DO.default(this.textCharacters.join("")),this.sourceNode.children[0]?this.firstChildPadding=this.sourceNode.children[0].range[0]-this.startOffset:this.firstChildPadding=0}}return i.prototype.markContextRange=function(t){this.contextRanges.push(t)},i.prototype.isInContextRange=function(){var t=this.offset;return this.contextRanges.some(function(n){return n[0]<=t&&t<n[1]})},i.prototype.enterContext=function(t){this.contexts.push(t)},i.prototype.isInContext=function(t){return t?this.contexts.some(function(n){return n===t}):this.contexts.length>0},i.prototype.leaveContext=function(t){var n=this.contexts.lastIndexOf(t);n!==-1&&this.contexts.splice(n,1)},Object.defineProperty(i.prototype,"offset",{get:function(){return this.index+this.firstChildPadding},enumerable:!1,configurable:!0}),i.prototype.now=function(){var t=this.offset,n=this.source.indexToPosition(t);return{line:n.line,column:n.column,offset:t}},Object.defineProperty(i.prototype,"hasEnd",{get:function(){return this.read()===!1},enumerable:!1,configurable:!0}),i.prototype.read=function(t){t===void 0&&(t=0);var n=this.offset+t;return n<this.startOffset?!1:0<=n&&n<this.textCharacters.length?this.textCharacters[n]:!1},i.prototype.readNode=function(t){if(t===void 0&&(t=0),!this.sourceNode)return!1;var n=this.offset+t;if(n<this.startOffset)return!1;var r=this.sourceNode.children.filter(function(o){return o.range[0]<=n&&n<o.range[1]});return r.length>0?r[r.length-1]:!1},i.prototype.peek=function(){this.index+=1},i.prototype.peekNode=function(t){this.index+=t.range[1]-t.range[0]},i.prototype.seekNext=function(t){var n=this.now();t.seek(this);var r=this.now(),o=this.sliceRange(n.offset,r.offset);return{value:o,startPosition:n,endPosition:r}},i.prototype.sliceRange=function(t,n){return this.textCharacters.slice(t,n).join("")},i}();fa.SourceCode=fF});var FO=G(lh=>{S();"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.NewLineParser=void 0;var pF=function(){function i(){}return i.prototype.test=function(t){var n=t.read();return n?/[\r\n]/.test(n):!1},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();lh.NewLineParser=pF});var $O=G(uh=>{S();"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.SpaceParser=void 0;var gF=function(){function i(){}return i.prototype.test=function(t){var n=t.read();return n?/\s/.test(n):!1},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();uh.SpaceParser=gF});var UO=G(os=>{S();"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.SeparatorParser=os.DefaultOptions=void 0;os.DefaultOptions={separatorCharacters:[".","\uFF0E","\u3002","?","!","\uFF1F","\uFF01"]};var mF=function(){function i(t){this.options=t,this.separatorCharacters=t&&t.separatorCharacters?t.separatorCharacters:os.DefaultOptions.separatorCharacters}return i.prototype.test=function(t){if(t.isInContext()||t.isInContextRange())return!1;var n=t.read(),r=t.read(1);return!n||!this.separatorCharacters.includes(n)?!1:n==="."&&r?/[\s\t\r\n]/.test(r):!0},i.prototype.seek=function(t){for(;this.test(t);)t.peek()},i}();os.SeparatorParser=mF});var WO=G(ch=>{S();"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.AnyValueParser=void 0;var vF=function(){function i(t){this.parsers=t.parsers,this.markers=t.markers}return i.prototype.test=function(t){return t.hasEnd?!1:this.parsers.every(function(n){return!n.test(t)})},i.prototype.seek=function(t){var n=t.readNode();if(!n){for(;this.test(t);)this.markers.forEach(function(o){return o.mark(t)}),t.peek();return}for(var r=function(){var o=t.offset;return n.range[0]<=o&&o<n.range[1]};r()&&this.test(t);)this.markers.forEach(function(o){return o.mark(t)}),t.peek()},i}();ch.AnyValueParser=vF});var qO=G(dh=>{S();"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.English=void 0;dh.English={ABBREVIATIONS:["Adj.","Adm.","Adv.","Al.","Ala.","Alta.","Apr.","Arc.","Ariz.","Ark.","Art.","Assn.","Asst.","Attys.","Aug.","Ave.","Bart.","Bld.","Bldg.","Blvd.","Brig.","Bros.","Btw.","Cal.","Calif.","Capt.","Cl.","Cmdr.","Co.","Col.","Colo.","Comdr.","Con.","Conn.","Corp.","Cpl.","Cres.","Ct.","D.phil.","Dak.","Dec.","Del.","Dept.","Det.","Dist.","Dr.","Dr.phil.","Dr.philos.","Drs.","E.g.","Ens.","Esp.","Esq.","Etc.","Exp.","Expy.","Ext.","Feb.","Fed.","Fla.","Ft.","Fwy.","Fy.","Ga.","Gen.","Gov.","Hon.","Hosp.","Hr.","Hway.","Hwy.","I.e.","Ia.","Id.","Ida.","Ill.","Inc.","Ind.","Ing.","Insp.","Is.","Jan.","Jr.","Jul.","Jun.","Kan.","Kans.","Ken.","Ky.","La.","Lt.","Ltd.","Maj.","Man.","Mar.","Mass.","May.","Md.","Me.","Med.","Messrs.","Mex.","Mfg.","Mich.","Min.","Minn.","Miss.","Mlle.","Mm.","Mme.","Mo.","Mont.","Mr.","Mrs.","Ms.","Msgr.","Mssrs.","Mt.","Mtn.","Neb.","Nebr.","Nev.","No.","Nos.","Nov.","Nr.","Oct.","Ok.","Okla.","Ont.","Op.","Ord.","Ore.","P.","Pa.","Pd.","Pde.","Penn.","Penna.","Pfc.","Ph.","Ph.d.","Pl.","Plz.","Pp.","Prof.","Pvt.","Que.","Rd.","Rs.","Ref.","Rep.","Reps.","Res.","Rev.","Rt.","Sask.","Sec.","Sen.","Sens.","Sep.","Sept.","Sfc.","Sgt.","Sr.","St.","Supt.","Surg.","Tce.","Tenn.","Tex.","Univ.","Usafa.","U.S.","Ut.","Va.","V.","Ver.","Vs.","Vt.","Wash.","Wis.","Wisc.","Wy.","Wyo.","Yuk."],PREPOSITIVE_ABBREVIATIONS:["Adm.","Attys.","Brig.","Capt.","Cmdr.","Col.","Cpl.","Det.","Dr.","Gen.","Gov.","Ing.","Lt.","Maj.","Mr.","Mrs.","Ms.","Mt.","Messrs.","Mssrs.","Prof.","Ph.","Rep.","Reps.","Rev.","Sen.","Sens.","Sgt.","St.","Supt.","V.","Vs."],EXCALAMATION_WORDS:["!X\u0169","!Kung","\u01C3\u02BCO\u01C3Kung","!Xuun","!Kung-Ekoka","\u01C3Hu","\u01C3Khung","\u01C3Ku","\u01C3ung","\u01C3Xo","\u01C3X\xFB","\u01C3Xung","\u01C3X\u0169","!Xun","Yahoo!","Y!J","Yum!"]}});var VO=G(hh=>{S();"use strict";Object.defineProperty(hh,"__esModule",{value:!0});hh.AbbrMarker=void 0;var yF=qO(),B0=function(i){return!i||i.length===0?!1:/^[A-Z]/.test(i)},I0=function(i,t){return i.toLowerCase()===t.toLowerCase()},bF=function(){function i(t){t===void 0&&(t=yF.English),this.lang=t}return i.prototype.getWord=function(t,n){n===void 0&&(n=0);var r=/\s/,o=t.read(-1);if(o&&!r.test(o))return"";for(var a="",s=n,l="";(l=t.read(s))&&!r.test(l);)a+=l,s++;return a},i.prototype.getPrevWord=function(t){for(var n=/\s/,r=-1,o="";(o=t.read(r))&&n.test(o);)r--;for(;(o=t.read(r))&&!n.test(o);)r--;return this.getWord(t,r+1)},i.prototype.mark=function(t){if(!t.isInContextRange()){var n=this.getWord(t);if(n.length!==0){if(/^([a-zA-Z]\.){3,}$/.test(n))return t.markContextRange([t.offset,t.offset+n.length]);var r=this.lang.EXCALAMATION_WORDS.some(function(c){return I0(c,n)});if(r)return t.markContextRange([t.offset,t.offset+n.length]);var o=this.lang.PREPOSITIVE_ABBREVIATIONS.some(function(c){return I0(c,n)});if(o)return t.markContextRange([t.offset,t.offset+n.length]);var a=this.lang.ABBREVIATIONS.some(function(c){return I0(c,n)}),s=this.getPrevWord(t),l=this.getWord(t,n.length+1);B0(s)&&/[A-Z]\./.test(n)&&B0(l)?t.markContextRange([t.offset,t.offset+n.length]):a&&!B0(l)&&t.markContextRange([t.offset,t.offset+n.length])}}},i}();hh.AbbrMarker=bF});var N0=G(pa=>{S();"use strict";var wF=pa&&pa.__spreadArray||function(i,t){for(var n=0,r=t.length,o=i.length;n<r;n++,o++)i[o]=t[n];return i};Object.defineProperty(pa,"__esModule",{value:!0});pa.debugLog=void 0;function EF(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];I.env.DEBUG==="sentence-splitter"&&console.log.apply(console,wF(["sentence-splitter: "],i))}pa.debugLog=EF});var zO=G((XW,fh)=>{S();Object.values=Object.values?Object.values:function(i){var t=["[object String]","[object Object]","[object Array]","[object Function]"],n=Object.prototype.toString.call(i);if(i===null||typeof i=="undefined")throw new TypeError("Cannot convert undefined or null to object");if(~t.indexOf(n)){if(Object.keys)return Object.keys(i).map(function(a){return i[a]});var r=[];for(var o in i)i.hasOwnProperty(o)&&r.push(i[o]);return r}else return[]};typeof fh!="undefined"&&fh.exports&&(fh.exports=Object.values)});var JO=G(ga=>{S();"use strict";var _F=ga&&ga.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ga,"__esModule",{value:!0});ga.PairMaker=void 0;var GO=N0(),SF=_F(zO()),CF=function(){function i(){var t;this.pairs=(t={},t['"']='"',t["\u300C"]="\u300D",t["\uFF08"]="\uFF09",t["("]=")",t["\u300E"]="\u300F",t["\u3010"]="\u3011",t["\u300A"]="\u300B",t),this.pairKeys=Object.keys(this.pairs),this.pairValues=SF.default(this.pairs)}return i.prototype.mark=function(t){var n=t.read();if(!!n)if(t.isInContext()){var a=this.pairValues.indexOf(n);if(a!==-1){var o=this.pairKeys[a];GO.debugLog("PairMaker -> leaveContext: "+this.pairValues[a]),t.leaveContext(o)}}else{var r=this.pairKeys.indexOf(n);if(r!==-1){var o=this.pairKeys[r];GO.debugLog("PairMaker -> enterContext: "+o),t.enterContext(o)}}},i}();ga.PairMaker=CF});var eT=G(Qt=>{S();"use strict";var ph=Qt&&Qt.__assign||function(){return ph=Object.assign||function(i){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},ph.apply(this,arguments)};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.createNode=Qt.createEmptySentenceNode=Qt.createTextNode=Qt.createPunctuationNode=Qt.createWhiteSpaceNode=Qt.splitAST=Qt.split=Qt.SplitParser=Qt.Syntax=void 0;var KO=RO(),xF=jO(),OF=FO(),TF=$O(),MF=UO(),AF=WO(),RF=VO(),kF=JO(),gh=N0();Qt.Syntax={WhiteSpace:"WhiteSpace",Punctuation:"Punctuation",Sentence:"Sentence",Str:"Str"};var H0=function(){function i(t){this.nodeList=[],this.results=[],this.source=new xF.SourceCode(t)}return Object.defineProperty(i.prototype,"current",{get:function(){return this.nodeList[this.nodeList.length-1]},enumerable:!1,configurable:!0}),i.prototype.pushNodeToCurrent=function(t){var n=this.current;n?n.children.push(t):this.results.push(t)},i.prototype.open=function(t){this.nodeList.push(t)},i.prototype.isOpened=function(){return this.nodeList.length>0},i.prototype.nextLine=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;return this.pushNodeToCurrent(XO(r,o,a)),a},i.prototype.nextSpace=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;this.pushNodeToCurrent(Tl("WhiteSpace",r,o,a))},i.prototype.nextValue=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;this.pushNodeToCurrent(QO(r,o,a))},i.prototype.close=function(t){var n=this.source.seekNext(t),r=n.value,o=n.startPosition,a=n.endPosition;o.offset!==a.offset&&this.pushNodeToCurrent(ZO(r,o,a));var s=this.nodeList.pop();if(!!s&&s.children.length!==0){var l=s.children[0],c=this.source.now();s.loc={start:l.loc.start,end:D0(c)};var h=this.source.sliceRange(l.range[0],c.offset);s.range=[l.range[0],c.offset],s.raw=h,this.results.push(s)}},i.prototype.toList=function(){return this.results},i}();Qt.SplitParser=H0;var YO=function(i){i===void 0&&(i={});var t=new OF.NewLineParser,n=new TF.SpaceParser,r=new MF.SeparatorParser(i.SeparatorParser),o=new RF.AbbrMarker,a=new kF.PairMaker,s=new AF.AnyValueParser({parsers:[t,r],markers:[o,a]});return{newLine:t,space:n,separator:r,abbrMarker:o,anyValueParser:s}};function LF(i,t){for(var n=YO(t),r=n.newLine,o=n.space,a=n.separator,s=n.anyValueParser,l=new H0(i),c=l.source;!c.hasEnd;)r.test(c)?l.nextLine(r):o.test(c)?l.nextSpace(o):a.test(c)?l.close(a):(l.isOpened()||l.open(mh()),l.nextValue(s));return l.close(o),l.toList()}Qt.split=LF;function PF(i,t){for(var n=YO(t),r=n.newLine,o=n.space,a=n.separator,s=n.anyValueParser,l=new H0(i),c=l.source;!c.hasEnd;){var h=c.readNode();if(!h)break;h.type===KO.ASTNodeTypes.Str?o.test(c)?(gh.debugLog("space"),l.nextSpace(o)):a.test(c)?(gh.debugLog("separator"),l.close(a)):r.test(c)?(gh.debugLog("newline"),l.nextLine(r)):(l.isOpened()||(gh.debugLog("open -> createEmptySentenceNode()"),l.open(mh())),l.nextValue(s)):h.type===KO.ASTNodeTypes.Break?(l.pushNodeToCurrent(h),c.peekNode(h)):(l.isOpened()||l.open(mh()),l.pushNodeToCurrent(h),c.peekNode(h))}return l.close(o),ph(ph({},i),{children:l.toList()})}Qt.splitAST=PF;function XO(i,t,n){return Tl("WhiteSpace",i,t,n)}Qt.createWhiteSpaceNode=XO;function ZO(i,t,n){return Tl("Punctuation",i,t,n)}Qt.createPunctuationNode=ZO;function QO(i,t,n){return Tl("Str",i,t,n)}Qt.createTextNode=QO;function mh(){return{type:"Sentence",raw:"",loc:{start:{column:NaN,line:NaN},end:{column:NaN,line:NaN}},range:[NaN,NaN],children:[]}}Qt.createEmptySentenceNode=mh;function Tl(i,t,n,r){return{type:i,raw:t,value:t,loc:{start:D0(n),end:D0(r)},range:[n.offset,r.offset]}}Qt.createNode=Tl;function D0(i){return{line:i.line,column:i.column}}});var $F={};qP($F,{Link:()=>Sl,build:()=>FF,default:()=>jF});S();S();S();var Mw=Tt(Ow()),Aw=Tt($n());S();var Tw=Tt($n());function kc(i,t){return Tw.TaJson.deserialize(i,t)}var Yr=class extends Mw.Publication{static async fromUrl(t){let r=await(await fetch(t.href,{credentials:"same-origin"})).json(),o=kc(r,Yr);return o.manifestUrl=t,o}get readingOrder(){return this.Spine}get tableOfContents(){return this.sample?.isSampleRead&&this.positions?.length>0?this.limitedTOC():this.TOC}limitedTOC(){function t(r){for(let o=0;o<r.Children.length;o++){let a=r.Children[o];a.Href=void 0,a.Children&&t(a)}}return this.TOC.map(r=>{if(r.Href){let o=this.positionsByHref(this.getRelativeHref(r.Href));if(o?.length>0){let a=o[0];Math.round(a.locations.totalProgression*100)<=this.sample?.limit||(r.Href=void 0,r.Children&&t(r))}}return r})}get landmarks(){return this.Landmarks}get pageList(){return this.PageList}get isFixedLayout(){return this.Metadata.Rendition?.Layout==="fixed"}get isReflowable(){return!this.isFixedLayout}get layout(){return this.isFixedLayout?"fixed":"reflowable"}get hasMediaOverlays(){return this.readingOrder?this.readingOrder.filter(t=>t.Properties?.MediaOverlay).length>0:!1}getStartLink(){return this.readingOrder.length>0?this.readingOrder[0]:null}getPreviousSpineItem(t){let n=this.getSpineIndex(t);return n!==null&&n>0?this.readingOrder[n-1]:null}getNextSpineItem(t){let n=this.getSpineIndex(t);return n!==null&&n<this.readingOrder.length-1?this.readingOrder[n+1]:null}getSpineItem(t){let n=this.getSpineIndex(t);return n!==null?this.readingOrder[n]:null}getSpineIndex(t){return this.readingOrder.findIndex(n=>n.Href&&this.getAbsoluteHref(n.Href)===t)}getAbsoluteHref(t){return new URL(t,this.manifestUrl.href).href}getRelativeHref(t){let n=this.manifestUrl.href.replace("/manifest.json",""),r=t.replace(n,"");return r.indexOf("#")>0&&(r=r.slice(0,r.indexOf("#"))),r.charAt(0)==="/"&&(r=r.substring(1)),r}getTOCItemAbsolute(t){let n=this.getAbsoluteHref(t),r=(a,s)=>{for(let l=0;l<s.length;l++){let c=s[l];if(c.Href){let h=c.Href.indexOf("#")!==-1?c.Href.slice(0,c.Href.indexOf("#")):c.Href;if(this.getAbsoluteHref(h)===a)return c}if(c.Children){let h=r(a,c.Children);if(h!==null)return h}}return null},o=r(n,this.tableOfContents);return o===null&&(o=r(n,this.readingOrder)),o}getTOCItem(t){let n=(o,a)=>{for(let s=0;s<a.length;s++){let l=a[s];if(l.Href&&this.getAbsoluteHref(l.Href)===o)return l;if(l.Children){let c=n(o,l.Children);if(c!==null)return c}}return null},r=n(t,this.tableOfContents);if(r===null&&(r=n(t,this.readingOrder)),r===null&&t.indexOf("#")!==-1){let o=t.slice(0,t.indexOf("#"));r=n(o,this.tableOfContents),r===null&&(r=n(o,this.readingOrder))}return r}positionsByHref(t){let n=decodeURI(t)??"";return this.positions?.filter(r=>n.includes(r.href))}async autoGeneratePositions(t=a4){let n=0,r=0,o=[];for(let s of this.readingOrder)if(this.isFixedLayout){let l={href:s.Href,locations:{progression:0,position:n+1},type:s.TypeLink};o.push(l),n=n+1}else{let l=this.getAbsoluteHref(s.Href),c=await t(l);s.contentLength=c,r+=c;let f=Math.max(1,Math.ceil(c/1024));for(let v=0;v<f;v++){let m={href:s.Href,locations:{progression:v/f,position:n+(v+1)},type:s.TypeLink};o.push(m)}n=n+f}var a=0;if(this.isReflowable)for(let s of this.readingOrder){if(!s.contentLength){console.error("Link is missing contentLength",s);return}s.contentWeight=100/r*s.contentLength,a=a+s.contentWeight}for(let s of o){let l=o.filter(h=>h.href===decodeURI(s.href)),c=Math.ceil(s.locations.progression*(l.length-1));s.locations.totalProgression=(s.locations.position-1)/o.length,s.locations.remainingPositions=Math.abs(c-(l.length-1)),s.locations.totalRemainingPositions=Math.abs(s.locations.position-1-(o.length-1))}this.positions=o}async fetchPositionsFromService(t){let r=await(await fetch(t)).json();this.positions=r.positions}async fetchWeightsFromService(t){if(this.isFixedLayout){console.warn("Not fetching weights from service for fixed layout publication.");return}let r=await(await fetch(t)).json();this.readingOrder.forEach(o=>{o.contentWeight=r[o.Href]})}};Yr=yu([(0,Aw.JsonObject)()],Yr);var a4=async i=>(await(await fetch(i)).blob()).size;S();S();var Ns=class{json(){return JSON.stringify(this)}},Rw=class extends Ns{constructor(t,n,r){super();this.value=t,this.ref=n,this.name=r}toString(){return this.value}},kw=class extends Ns{constructor(t,n,r){super();this.value=t,this.ref=n,this.name=r}toString(){return this.value}toJson(){return JSON.parse(this.value)}},Lw=class extends Ns{constructor(t,n,r,o){super();this.value=t,this.values=n,this.ref=r,this.name=o}toString(){return this.values[this.value]}},Pw=class extends Ns{constructor(t,n,r,o,a,s,l){super();this.value=t,this.min=n,this.max=r,this.step=o,this.suffix=a,this.ref=s,this.name=l}toString(){return this.value.toString()+this.suffix}increment(){this.value<=this.max&&(this.value+=this.step)}decrement(){this.value>=this.min&&(this.value-=this.step)}},Bw=class extends Ns{constructor(t,n,r,o,a){super();this.value=r,this.onValue=t,this.offValue=n,this.ref=o,this.name=a}toString(){return this.value?this.onValue:this.offValue}switch(){this.value=!this.value}},Ho=class{constructor(){this.properties=[]}addIncremental(t,n,r,o,a,s,l){this.properties.push(new Pw(t,n,r,o,a,s,l))}addStringable(t,n,r){this.properties.push(new Rw(t,n,r))}addJSONable(t,n,r){this.properties.push(new kw(t,n,r))}addSwitchable(t,n,r,o,a){this.properties.push(new Bw(t,n,r,o,a))}addEnumerable(t,n,r,o){this.properties.push(new Lw(t,n,r,o))}getByRef(t){let n=this.properties.filter(r=>r.ref===t);return n.length>0?n[0]:null}getByKey(t){let n=this.properties.filter(r=>r.key===t);return n.length>0?n[0]:null}};S();var fi=class{},V=fi;V.FONT_SIZE_REF="fontSize",V.FONT_FAMILY_REF="fontFamily",V.FONT_OVERRIDE_REF="fontOverride",V.APPEARANCE_REF="appearance",V.SCROLL_REF="scroll",V.TEXT_ALIGNMENT_REF="textAlign",V.COLUMN_COUNT_REF="colCount",V.WORD_SPACING_REF="wordSpacing",V.LETTER_SPACING_REF="letterSpacing",V.PAGE_MARGINS_REF="pageMargins",V.LINE_HEIGHT_REF="lineHeight",V.FONT_SIZE_KEY="--USER__"+fi.FONT_SIZE_REF,V.FONT_FAMILY_KEY="--USER__"+fi.FONT_FAMILY_REF,V.FONT_OVERRIDE_KEY="--USER__"+fi.FONT_OVERRIDE_REF,V.APPEARANCE_KEY="--USER__"+fi.APPEARANCE_REF,V.SCROLL_KEY="--USER__"+fi.SCROLL_REF,V.TEXT_ALIGNMENT_KEY="--USER__"+fi.TEXT_ALIGNMENT_REF,V.COLUMN_COUNT_KEY="--USER__"+fi.COLUMN_COUNT_REF,V.WORD_SPACING_KEY="--USER__"+fi.WORD_SPACING_REF,V.LETTER_SPACING_KEY="--USER__"+fi.LETTER_SPACING_REF,V.PAGE_MARGINS_KEY="--USER__"+fi.PAGE_MARGINS_REF,V.LINE_HEIGHT_KEY="--USER__"+fi.LINE_HEIGHT_REF;S();function ve(i,t){return i.querySelector(t)}function Bt(i,t){let n=ve(i,t);if(n)return n;throw new Error("required element "+t+" not found")}function l4(i,t){if(i===null)throw new Error("parent element is null");return i.querySelector(t)}function Ft(i,t){let n=l4(i,t);if(n)return n;throw new Error("required element "+t+" not found in iframe")}function Rn(i,t,n){i.setAttribute(t,n)}S();function Iw(i,t){return new Promise(function(n){setTimeout(n.bind(null,t),i)})}var W=!1;S();S();var XS=Tt(Cd()),ta=class{constructor(t){this.getScrollingElement=t=>t.scrollingElement?t.scrollingElement:t.body;this.navigator=t}async handleFootnote(t,n){let r=t.getAttribute("href");if(r.indexOf("#")>0){let a=function(l){let c=document.location.href;return new URL(l,c).href},o=r.substring(r.indexOf("#")+1),s=a(r);s=s.substring(0,s.indexOf("#")),n.preventDefault(),n.stopPropagation(),await fetch(s).then(l=>l.text()).then(async l=>{let f=new DOMParser().parseFromString(l,"text/html").querySelector("#"+o);f&&(n.preventDefault(),n.stopPropagation(),this.showPopup(f,n))})}}showPopup(t,n){let r=this.navigator.iframes[0].contentDocument.getElementById("d2-popup");r&&r.parentElement.removeChild(r);let o=document.createElement("aside");o.id="d2-popup",o.className="d2-popup is-active";let a=document.createElement("div");a.className="d2-popup-wrapper",o.appendChild(a);let s=document.createElement("div");s.className="d2-popup-content",a.appendChild(s);let l=document.createElement("p");s.appendChild(l),typeof t=="string"?l.innerHTML=t:l.innerHTML=(0,XS.default)(t.innerHTML,{allowedTags:[],allowedAttributes:{}});let c=this.navigator.view.isPaginated(),h=this.getScrollingElement(this.navigator.iframes[0].contentDocument),f=c?h.scrollLeft:0,v=c?h.scrollTop:0,m=n.x+f,y=n.y+v;o.style.top=y+"px",c&&(o.style.left=m+"px"),this.navigator.iframes[0].contentDocument.body.appendChild(o);let E=this;this.navigator.iframes[0].contentWindow.onclick=function(_){n.target!==_.target&&o.parentElement&&(o.style.display="none",o.parentElement.removeChild(o),E.navigator.iframes[0].contentWindow.onclick=void 0)}}};function ue(i,t,n){i&&i.addEventListener(t,n,!0)}function Le(i,t,n){i&&i.removeEventListener(t,n,!0)}var xd=class{constructor(t){this.onInternalLink=()=>{};this.onClickThrough=()=>{};this.checkForLink=t=>{let n=t.target;for(;n&&n.tagName.toLowerCase()!=="body";){if(n.tagName.toLowerCase()==="a"&&n.href)return n;n=n.parentElement}return null};this.handleLinks=async t=>{W&&console.log("R2 Click Handler");let n=this.checkForLink(t);if(n){let r=window.location.protocol===n.protocol&&window.location.port===n.port&&window.location.hostname===n.hostname,o=this.navigator.publication.manifestUrl,a=o.protocol===n.protocol&&o.port===n.port&&o.hostname===n.hostname,s=n.href.indexOf("#");if(!r&&!a)window.open(n.href,"_blank"),t.preventDefault(),t.stopPropagation();else if(t.target.href=n.href,(r||a)&&s!==-1){let l=t.target;l?l.getAttribute("epub:type")==="noteref"?await this.popup.handleFootnote(l,t):this.onInternalLink(t):this.onInternalLink(t)}else(r||a)&&s===-1&&this.onInternalLink(t)}else this.onClickThrough(t)};this.navigator=t,this.popup=new ta(this.navigator)}setupEvents(t){if(t!==null)t.addEventListener("click",this.handleLinks.bind(this));else throw"cannot setup events for null"}};S();S();function ZS(){return Bt(document,"#iframe-wrapper").clientWidth}function to(){return Bt(document,"#iframe-wrapper").clientHeight}var eC=Tt(Go()),Od=class{constructor(t){this.layout="reflowable";this.USERSETTINGS="userSetting";this.sideMargin=20;this.height=0;this.attributes={margin:0};this.hasFixedScrollWidth=!1;this.store=t,this.isScrollMode()?(this.name="readium-scroll-on",this.label="Scrolling"):(this.name="readium-scroll-off",this.label="Paginated")}setMode(t){if(this.scrollMode=t,t===!0){this.name="readium-scroll-on",this.label="Scrolling";let n=Ft(this.iframe.contentDocument,"head");if(n){let o=ve(n,"meta[name=viewport]");o&&o.remove()}Ft(this.iframe.contentDocument,"html").style.setProperty("--USER__scroll","readium-scroll-on"),this.setSize(),this.setIframeHeight(this.iframe)}else this.height=to()-40-this.attributes.margin,this.name="readium-scroll-off",this.label="Paginated",this.checkForFixedScrollWidth(),Ft(this.iframe.contentDocument,"html").style.setProperty("--USER__scroll","readium-scroll-off"),this.setSize();this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}start(){if(this.isScrollMode()){let t=Ft(this.iframe.contentDocument,"head");if(t){let n=ve(t,"meta[name=viewport]");n&&n.remove()}this.setSize()}else{this.iframe.height="0",this.iframe.width="0",this.setSize();let t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1, maximum-scale=1",this.checkForFixedScrollWidth()}}stop(){this.iframe.height="0",this.iframe.width="0";let t=Ft(this.iframe.contentDocument,"body"),n=Array.prototype.slice.call(t.querySelectorAll("img"));for(let r of n)r.style.maxWidth=""}getCurrentPosition(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode())return t.scrollTop/this.scrollingElement.scrollHeight;{let n=this.getColumnWidth(),r=this.getLeftColumnsWidth(),o=this.getRightColumnsWidth(),a=r+n+o;return r/a}}goToProgression(t){let n=Bt(document,"#iframe-wrapper");if(this.isScrollMode())n.scrollTop=this.scrollingElement.scrollHeight*t;else{let r=this.getColumnWidth(),o=this.getLeftColumnsWidth(),a=this.getRightColumnsWidth(),s=o+r+a,l=t*s,c=Math.round(l/r)*r;c>=s&&(c=c-r),this.setLeftColumnsWidth(c)}}goToCssSelector(t,n){var r=this.iframe.contentDocument.querySelector(t);this.goToElement(r,n)}goToFragment(t,n){let r=this.iframe.contentDocument.getElementById(t);this.goToElement(r,n)}snap(t,n){if(t&&!this.isScrollMode()){let r=t.style.height;t.style.height="0";let o=this.getColumnWidth(),a=this.getLeftColumnsWidth()+t.getBoundingClientRect().left,s=Math.floor(a/o)*o;t.style.height=r,this.setLeftColumnsWidth(s),this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate(0)}}goToElement(t,n){let r=Bt(document,"#iframe-wrapper");if(this.isScrollMode())t&&(r.scrollTop=t.offsetTop);else if(t){let o=t.style.height;t.style.height="0";let a=t.getBoundingClientRect().left,s=this.getColumnWidth(),l=this.scrollingElement.scrollLeft-s,c=Math.ceil(a/s)*s+l;if(n){let h=this.getLeftColumnsWidth();c=Math.ceil(a/s)*s+h}t.style.height=o,this.setLeftColumnsWidth(c),this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate(200)}}atStart(){return this.isScrollMode()?Bt(document,"#iframe-wrapper").scrollTop===0:this.getLeftColumnsWidth()<=0}atEnd(){if(this.isScrollMode()){let t=Bt(document,"#iframe-wrapper");return Math.ceil(this.scrollingElement.scrollHeight-t.scrollTop)-1<=to()}else return Math.floor(this.getRightColumnsWidth())<=0}goToPreviousPage(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode()){let n=t.scrollTop,r=this.getScreenHeight(),o=n-r;o>=0?t.scrollTop=o:t.scrollTop=0}else{let n=this.getLeftColumnsWidth(),r=this.getColumnWidth(),o=n-r;o>=0?this.setLeftColumnsWidth(o):this.setLeftColumnsWidth(0),this.delegate.checkResourcePosition()}this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}goToNextPage(){let t=Bt(document,"#iframe-wrapper");if(this.isScrollMode()){let n=t.scrollTop,r=this.getScreenHeight(),o=this.scrollingElement.scrollHeight,a=n+r;a<o?t.scrollTop=a:t.scrollTop=o}else{let n=this.getLeftColumnsWidth(),r=this.getColumnWidth(),o=this.scrollWidth,a=n+r;a<o?this.setLeftColumnsWidth(a):this.setLeftColumnsWidth(o),this.delegate.checkResourcePosition()}this.delegate.rights?.enableContentProtection&&this.delegate.contentProtectionModule.recalculate()}getCurrentPage(){return this.isScrollMode()?0:this.getCurrentPosition()*this.getPageCount()+1}getPageCount(){if(this.isScrollMode())return 0;{let t=this.getColumnWidth();return this.scrollWidth/t}}isPaginated(){return this.iframe?Ft(this.iframe.contentDocument,"html").style.getPropertyValue("--USER__scroll")==="readium-scroll-on"===!1:this.scrollMode===!1}isScrollMode(){return this.iframe?Ft(this.iframe.contentDocument,"html").style.getPropertyValue("--USER__scroll")==="readium-scroll-on"===!0:this.scrollMode===!0}async getProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);return r=r.filter(o=>o.name===t),r.length===0?null:r[0]}return null}getScreenHeight(){return Bt(document,"#iframe-wrapper").clientHeight}setIframeHeight(t){(0,eC.debounce)(r=>{if(r){let o=r.contentWindow.document.body,a=r.contentWindow.document.documentElement,s=Math.max(o.scrollHeight,o.offsetHeight,a.clientHeight,a.scrollHeight,a.offsetHeight),l=to()-this.attributes.margin;r.height=Math.max(l,s)+"px"}},200)(t)}checkForFixedScrollWidth(){let t=Ft(this.iframe.contentDocument,"body"),n=t.scrollWidth;this.hasFixedScrollWidth=t.scrollWidth===n}setSize(){if(this.iframe.width=ZS()+"px",!this.scrollMode)this.iframe.contentDocument.documentElement.style.height=this.height+"px",this.iframe.height=this.height+"px";else{let t=this.iframe.contentWindow.document.documentElement;this.iframe.height=t.offsetHeight+"px"}}getLeftColumnsWidth(){return Math.ceil(this.scrollingElement.scrollLeft)}getRightColumnsWidth(){let t=this.getColumnWidth(),n=this.scrollWidth-t;if(this.hasFixedScrollWidth){let r=this.getLeftColumnsWidth();n=Math.max(0,n-r)}return n}getColumnWidth(){return this.scrollingElement.clientWidth}setLeftColumnsWidth(t){this.scrollingElement.scrollLeft=t}get scrollingElement(){return this.iframe.contentDocument.scrollingElement?this.iframe.contentDocument.scrollingElement:this.iframe.contentDocument.body}get scrollWidth(){let t=this.scrollingElement.scrollWidth,n=this.getColumnWidth();return Math.floor(t/n)*n}};S();var Td=class{constructor(t){this.layout="fixed";this.sideMargin=20;this.height=0;this.attributes={margin:0}}start(){}stop(){}getCurrentPosition(){return 0}getScreenHeight(){return Bt(document,"#iframe-wrapper").clientHeight}goToProgression(t){}goToCssSelector(t,n){}goToFragment(t,n){}snap(t,n){}getCurrentPage(){return 0}getPageCount(){return 1}setSize(){}isPaginated(){return!0}isScrollMode(){return!1}};var Ct=class{constructor(t,n,r,o,a){this.USERSETTINGS="userSetting";this.fontSize=100;this.fontOverride=!1;this.fontFamily=0;this.appearance=0;this.verticalScroll=!0;this.textAlignment=0;this.columnCount=0;this.wordSpacing=0;this.letterSpacing=0;this.pageMargins=2;this.lineHeight=1;this.settingsChangeCallback=()=>{};this.settingsColumnsChangeCallback=()=>{};this.viewChangeCallback=()=>{};this.store=t,this.view=a==="fixed"?new Td(this.store):new Od(this.store),this.headerMenu=n,this.api=r,this.injectables=o,this.injectables.forEach(s=>{s.type==="style"&&(s.fontFamily&&this.addFont(s.fontFamily),s.appearance&&this.addAppearance(s.appearance))})}async isPaginated(){return await this.getPropertyAndFallback("verticalScroll",V.SCROLL_KEY)===!1}async isScrollMode(){return!await this.isPaginated()}static async create(t){let n=new this(t.store,t.headerMenu,t.api,t.injectables,t.layout);if(await n.initialise(),t.initialUserSettings){n.userProperties||(n.userProperties=n.getUserSettings());let r=t.initialUserSettings;r.verticalScroll!==void 0&&(n.verticalScroll=this.parseScrollSetting(r.verticalScroll),n.userProperties.getByRef(V.SCROLL_REF).value=n.verticalScroll,await n.saveProperty(n.userProperties.getByRef(V.SCROLL_REF)),W&&console.log(n.verticalScroll)),r.appearance&&(n.appearance=Ct.appearanceValues.findIndex(o=>o===r.appearance),n.userProperties.getByRef(V.APPEARANCE_REF).value=n.appearance,await n.saveProperty(n.userProperties.getByRef(V.APPEARANCE_REF)),W&&console.log(n.appearance)),r.fontSize&&(n.fontSize=r.fontSize,n.userProperties.getByRef(V.FONT_SIZE_REF).value=n.fontSize,await n.saveProperty(n.userProperties.getByRef(V.FONT_SIZE_REF)),W&&console.log(n.fontSize)),r.fontFamily&&(n.fontFamily=Ct.fontFamilyValues.findIndex(o=>o===r.fontFamily),n.userProperties.getByRef(V.FONT_FAMILY_REF).value=n.fontFamily,await n.saveProperty(n.userProperties.getByRef(V.FONT_FAMILY_REF)),W&&console.log(n.fontFamily),n.fontFamily!==0&&(n.fontOverride=!0)),r.textAlignment&&(n.textAlignment=Ct.textAlignmentValues.findIndex(o=>o===r.textAlignment),n.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value=n.textAlignment,await n.saveProperty(n.userProperties.getByRef(V.TEXT_ALIGNMENT_REF)),W&&console.log(n.textAlignment)),r.columnCount&&(n.columnCount=Ct.columnCountValues.findIndex(o=>o===r.columnCount),n.userProperties.getByRef(V.COLUMN_COUNT_REF).value=n.columnCount,await n.saveProperty(n.userProperties.getByRef(V.COLUMN_COUNT_REF)),W&&console.log(n.columnCount)),r.wordSpacing&&(n.wordSpacing=r.wordSpacing,n.userProperties.getByRef(V.WORD_SPACING_REF).value=n.wordSpacing,await n.saveProperty(n.userProperties.getByRef(V.WORD_SPACING_REF)),W&&console.log(n.wordSpacing)),r.letterSpacing&&(n.letterSpacing=r.letterSpacing,n.userProperties.getByRef(V.LETTER_SPACING_REF).value=n.letterSpacing,await n.saveProperty(n.userProperties.getByRef(V.LETTER_SPACING_REF)),W&&console.log(n.letterSpacing)),r.pageMargins&&(n.pageMargins=r.pageMargins,n.userProperties.getByRef(V.PAGE_MARGINS_REF).value=n.pageMargins,await n.saveProperty(n.userProperties.getByRef(V.PAGE_MARGINS_REF)),W&&console.log(n.pageMargins)),r.lineHeight&&(n.lineHeight=r.lineHeight,n.userProperties.getByRef(V.LINE_HEIGHT_REF).value=n.lineHeight,await n.saveProperty(n.userProperties.getByRef(V.LINE_HEIGHT_REF)),W&&console.log(n.lineHeight)),n.userProperties=n.getUserSettings(),await n.initialise()}return await n.initializeSelections(),new Promise(r=>r(n))}stop(){W&&console.log("book settings stop")}async initialise(){this.appearance=await this.getPropertyAndFallback("appearance",V.APPEARANCE_KEY),this.verticalScroll=await this.getPropertyAndFallback("verticalScroll",V.SCROLL_KEY),this.fontFamily=await this.getPropertyAndFallback("fontFamily",V.FONT_FAMILY_KEY),this.fontFamily!==0&&(this.fontOverride=!0),this.textAlignment=await this.getPropertyAndFallback("textAlignment",V.TEXT_ALIGNMENT_KEY),this.columnCount=await this.getPropertyAndFallback("columnCount",V.COLUMN_COUNT_KEY),this.fontSize=await this.getPropertyAndFallback("fontSize",V.FONT_SIZE_KEY),this.wordSpacing=await this.getPropertyAndFallback("wordSpacing",V.WORD_SPACING_KEY),this.letterSpacing=await this.getPropertyAndFallback("letterSpacing",V.LETTER_SPACING_KEY),this.pageMargins=await this.getPropertyAndFallback("pageMargins",V.PAGE_MARGINS_KEY),this.lineHeight=await this.getPropertyAndFallback("lineHeight",V.LINE_HEIGHT_KEY),this.userProperties=this.getUserSettings()}async reset(){this.appearance=0,this.verticalScroll=!0,this.fontSize=100,this.fontOverride=!1,this.fontFamily=0,this.textAlignment=0,this.columnCount=0,this.wordSpacing=0,this.letterSpacing=0,this.pageMargins=2,this.lineHeight=1,this.userProperties=this.getUserSettings();let t=Ft(this.iframe.contentDocument,"html"),n=document.documentElement,r=Bt(n,"body");t.style.removeProperty(V.FONT_SIZE_KEY),t.style.removeProperty(V.WORD_SPACING_KEY),t.style.removeProperty(V.LETTER_SPACING_KEY),t.style.removeProperty(V.COLUMN_COUNT_KEY),t.style.removeProperty(V.TEXT_ALIGNMENT_KEY),t.style.removeProperty(V.LINE_HEIGHT_KEY),t.style.removeProperty(V.PAGE_MARGINS_KEY),t.style.removeProperty(V.APPEARANCE_KEY),Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day"),t.style.removeProperty(V.FONT_FAMILY_KEY),Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")}async initializeSelections(){this.headerMenu&&(this.settingsView=ve(this.headerMenu,"#container-view-settings"))}async applyProperties(){this.userProperties=this.getUserSettings();let t=Ft(this.iframe.contentDocument,"html"),n=document.documentElement,r=Bt(n,"body");this.view.delegate.publication.isReflowable&&(await this.getProperty(V.FONT_SIZE_KEY)&&t.style.setProperty(V.FONT_SIZE_KEY,this.userProperties.getByRef(V.FONT_SIZE_REF).toString()),await this.getProperty(V.WORD_SPACING_KEY)&&t.style.setProperty(V.WORD_SPACING_KEY,this.userProperties.getByRef(V.WORD_SPACING_REF).toString()),await this.getProperty(V.LETTER_SPACING_KEY)&&t.style.setProperty(V.LETTER_SPACING_KEY,this.userProperties.getByRef(V.LETTER_SPACING_REF).toString())),await this.getProperty(V.COLUMN_COUNT_KEY)&&t.style.setProperty(V.COLUMN_COUNT_KEY,this.userProperties.getByRef(V.COLUMN_COUNT_REF).toString()),this.view.delegate.publication.isReflowable&&(await this.getProperty(V.TEXT_ALIGNMENT_KEY)&&(this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).toString()==="auto"?t.style.removeProperty(V.TEXT_ALIGNMENT_KEY):t.style.setProperty(V.TEXT_ALIGNMENT_KEY,this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).toString())),await this.getProperty(V.LINE_HEIGHT_KEY)&&t.style.setProperty(V.LINE_HEIGHT_KEY,this.userProperties.getByRef(V.LINE_HEIGHT_REF).toString()),await this.getProperty(V.PAGE_MARGINS_KEY)&&t.style.setProperty(V.PAGE_MARGINS_KEY,this.userProperties.getByRef(V.PAGE_MARGINS_REF).toString())),await this.getProperty(V.APPEARANCE_KEY)?(t.style.setProperty(V.APPEARANCE_KEY,this.userProperties.getByRef(V.APPEARANCE_REF).toString()),this.userProperties.getByRef(V.APPEARANCE_REF).value===0?(Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day")):this.userProperties.getByRef(V.APPEARANCE_REF).value===1?(Rn(n,"data-viewer-theme","sepia"),Rn(r,"data-viewer-theme","sepia")):this.userProperties.getByRef(V.APPEARANCE_REF).value===2&&(Rn(n,"data-viewer-theme","night"),Rn(r,"data-viewer-theme","night"))):(t.style.setProperty(V.APPEARANCE_KEY,this.userProperties.getByRef(V.APPEARANCE_REF).toString()),Rn(n,"data-viewer-theme","day"),Rn(r,"data-viewer-theme","day")),this.view.delegate.publication.isReflowable&&(await this.getProperty(V.FONT_FAMILY_KEY)?(t.style.setProperty(V.FONT_FAMILY_KEY,this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),this.userProperties.getByRef(V.FONT_FAMILY_REF).value===0?(Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")):this.userProperties.getByRef(V.FONT_FAMILY_REF).value===1?(Rn(t,"data-viewer-font","serif"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on")):this.userProperties.getByRef(V.FONT_FAMILY_REF).value===2?(Rn(t,"data-viewer-font","sans"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on")):(Rn(t,"data-viewer-font",this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-on"))):(t.style.setProperty(V.FONT_FAMILY_KEY,this.userProperties.getByRef(V.FONT_FAMILY_REF).toString()),Rn(t,"data-viewer-font","publisher"),t.style.setProperty(V.FONT_OVERRIDE_KEY,"readium-font-off")),await this.getProperty(V.SCROLL_KEY)?this.userProperties.getByRef(V.SCROLL_REF).value===!0?t.style.setProperty("--USER__scroll","readium-scroll-on"):t.style.setProperty("--USER__scroll","readium-scroll-off"):t.style.setProperty("--USER__scroll","readium-scroll-on"),t.style.setProperty("--USER__advancedSettings","readium-advanced-on"),this.isScrollMode().then(o=>{this.view.setMode(o)}))}setIframe(t){this.iframe=t,this.view.iframe=t,this.settingsView&&this.renderControls(this.settingsView)}renderControls(t){ue(ve(t,"ul"),"click",n=>{n.stopPropagation()})}onSettingsChange(t){this.settingsChangeCallback=t}onColumnSettingsChange(t){this.settingsColumnsChangeCallback=t}onViewChange(t){this.viewChangeCallback=t}async storeProperty(t){await this.updateUserSettings(),await this.saveProperty(t)}addAppearance(t){Ct.appearanceValues.includes(t)||Ct.appearanceValues.push(t)}initAddedAppearance(){this.applyProperties()}addFont(t){Ct.fontFamilyValues.includes(t)||Ct.fontFamilyValues.push(t)}initAddedFont(){this.applyProperties()}async updateUserSettings(){let t={fontFamily:Ct.fontFamilyValues[await this.userProperties.getByRef(V.FONT_FAMILY_REF).value],fontSize:this.userProperties.getByRef(V.FONT_SIZE_REF).value,appearance:Ct.appearanceValues[await this.userProperties.getByRef(V.APPEARANCE_REF).value],textAlignment:Ct.textAlignmentValues[await this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value],columnCount:Ct.columnCountValues[await this.userProperties.getByRef(V.COLUMN_COUNT_REF).value],wordSpacing:this.userProperties.getByRef(V.WORD_SPACING_REF).value,letterSpacing:this.userProperties.getByRef(V.LETTER_SPACING_REF).value,verticalScroll:this.userProperties.getByRef(V.SCROLL_REF).value};this.api?.updateSettings&&this.api?.updateSettings(t).then(n=>{W&&console.log("api updated user settings",t)})}getUserSettings(){let t=new Ho;return t.addSwitchable("readium-font-on","readium-font-off",this.fontOverride,V.FONT_OVERRIDE_REF,V.FONT_OVERRIDE_KEY),t.addEnumerable(this.columnCount,Ct.columnCountValues,V.COLUMN_COUNT_REF,V.COLUMN_COUNT_KEY),t.addEnumerable(this.appearance,Ct.appearanceValues,V.APPEARANCE_REF,V.APPEARANCE_KEY),t.addIncremental(this.pageMargins,.5,4,.25,"",V.PAGE_MARGINS_REF,V.PAGE_MARGINS_KEY),t.addEnumerable(this.textAlignment,Ct.textAlignmentValues,V.TEXT_ALIGNMENT_REF,V.TEXT_ALIGNMENT_KEY),t.addEnumerable(this.fontFamily,Ct.fontFamilyValues,V.FONT_FAMILY_REF,V.FONT_FAMILY_KEY),t.addIncremental(this.fontSize,100,300,25,"%",V.FONT_SIZE_REF,V.FONT_SIZE_KEY),t.addIncremental(this.lineHeight,1,2,.25,"em",V.LINE_HEIGHT_REF,V.LINE_HEIGHT_KEY),t.addIncremental(this.wordSpacing,0,1,.25,"rem",V.WORD_SPACING_REF,V.WORD_SPACING_KEY),t.addIncremental(this.letterSpacing,0,.5,.0625,"em",V.LETTER_SPACING_REF,V.LETTER_SPACING_KEY),t.addSwitchable("readium-scroll-on","readium-scroll-off",this.verticalScroll,V.SCROLL_REF,V.SCROLL_KEY),t}async saveProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.name!==t.name),t.value!==void 0&&r.push(t),await this.store.set(this.USERSETTINGS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(this.USERSETTINGS,JSON.stringify(r))}return new Promise(r=>r(t))}async getProperty(t){let n=await this.store.get(this.USERSETTINGS);if(n){let r=JSON.parse(n);return r=r.filter(o=>o.name===t),r.length===0?null:r[0]}return null}async getPropertyAndFallback(t,n){return(await this.getProperty(n))?.value??this[t]}async resetUserSettings(){await this.store.remove(this.USERSETTINGS),await this.reset(),this.settingsChangeCallback()}get currentSettings(){return{appearance:Ct.appearanceValues[this.userProperties.getByRef(V.APPEARANCE_REF).value],fontFamily:Ct.fontFamilyValues[this.userProperties.getByRef(V.FONT_FAMILY_REF).value],textAlignment:Ct.textAlignmentValues[this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value],columnCount:Ct.columnCountValues[this.userProperties.getByRef(V.COLUMN_COUNT_REF).value],verticalScroll:this.verticalScroll,fontSize:this.fontSize,wordSpacing:this.wordSpacing,letterSpacing:this.letterSpacing,pageMargins:this.pageMargins,lineHeight:this.lineHeight}}async applyUserSettings(t){if(t.appearance){let n;t.appearance==="day"||t.appearance==="readium-default-on"?n=Ct.appearanceValues[0]:t.appearance==="sepia"||t.appearance==="readium-sepia-on"?n=Ct.appearanceValues[1]:t.appearance==="night"||t.appearance==="readium-night-on"?n=Ct.appearanceValues[2]:n=t.appearance,this.appearance=Ct.appearanceValues.findIndex(r=>r===n),this.userProperties.getByRef(V.APPEARANCE_REF).value=this.appearance,await this.storeProperty(this.userProperties.getByRef(V.APPEARANCE_REF))}t.fontSize&&(this.fontSize=t.fontSize,this.userProperties.getByRef(V.FONT_SIZE_REF).value=this.fontSize,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))),t.fontFamily&&(this.fontFamily=Ct.fontFamilyValues.findIndex(n=>n===t.fontFamily),this.userProperties.getByRef(V.FONT_FAMILY_REF).value=this.fontFamily,await this.storeProperty(this.userProperties.getByRef(V.FONT_FAMILY_REF))),t.letterSpacing&&(this.letterSpacing=t.letterSpacing,this.userProperties.getByRef(V.LETTER_SPACING_REF).value=this.letterSpacing,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))),t.wordSpacing&&(this.wordSpacing=t.wordSpacing,this.userProperties.getByRef(V.WORD_SPACING_REF).value=this.wordSpacing,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))),t.columnCount&&(this.columnCount=Ct.columnCountValues.findIndex(n=>n===t.columnCount),this.userProperties.getByRef(V.COLUMN_COUNT_REF).value=this.columnCount,await this.storeProperty(this.userProperties.getByRef(V.COLUMN_COUNT_REF)),this.settingsColumnsChangeCallback()),t.textAlignment&&(this.textAlignment=Ct.textAlignmentValues.findIndex(n=>n===t.textAlignment),this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF).value=this.textAlignment,await this.storeProperty(this.userProperties.getByRef(V.TEXT_ALIGNMENT_REF))),t.lineHeight&&(this.lineHeight=t.lineHeight,this.userProperties.getByRef(V.LINE_HEIGHT_REF).value=this.lineHeight,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),t.pageMargins&&(this.pageMargins=t.pageMargins,this.userProperties.getByRef(V.PAGE_MARGINS_REF).value=this.pageMargins,await this.storeProperty(this.userProperties.getByRef(V.PAGE_MARGINS_REF))),await this.applyProperties(),this.settingsChangeCallback(),setTimeout(async()=>{if(t.verticalScroll!==void 0){let n=this.view.getCurrentPosition();this.verticalScroll=Ct.parseScrollSetting(t.verticalScroll),this.userProperties.getByRef(V.SCROLL_REF).value=this.verticalScroll,await this.saveProperty(this.userProperties.getByRef(V.SCROLL_REF)),await this.applyProperties(),this.view.setMode(this.verticalScroll),this.view.goToProgression(n),this.viewChangeCallback()}},10)}static parseScrollSetting(t){switch(t){case!0:case"scroll":case"readium-scroll-on":return!0;case!1:case"paginated":case"readium-scroll-off":return!1}}async scroll(t){let n=this.view.getCurrentPosition();this.verticalScroll=t,this.userProperties.getByRef(V.SCROLL_REF).value=this.verticalScroll,await this.saveProperty(this.userProperties.getByRef(V.SCROLL_REF)),await this.applyProperties(),this.view.setMode(this.verticalScroll),this.view.goToProgression(n),this.viewChangeCallback()}async increase(t){t==="fontSize"?(this.userProperties.getByRef(V.FONT_SIZE_REF).increment(),this.fontSize=this.userProperties.getByRef(V.FONT_SIZE_REF).value,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))):t==="letterSpacing"?(this.userProperties.getByRef(V.LETTER_SPACING_REF).increment(),this.letterSpacing=this.userProperties.getByRef(V.LETTER_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))):t==="wordSpacing"?(this.userProperties.getByRef(V.WORD_SPACING_REF).increment(),this.wordSpacing=this.userProperties.getByRef(V.WORD_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))):t==="lineHeight"&&(this.userProperties.getByRef(V.LINE_HEIGHT_REF).increment(),this.lineHeight=this.userProperties.getByRef(V.LINE_HEIGHT_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),await this.applyProperties(),this.settingsChangeCallback()}async decrease(t){t==="fontSize"?(this.userProperties.getByRef(V.FONT_SIZE_REF).decrement(),this.fontSize=this.userProperties.getByRef(V.FONT_SIZE_REF).value,await this.storeProperty(this.userProperties.getByRef(V.FONT_SIZE_REF))):t==="letterSpacing"?(this.userProperties.getByRef(V.LETTER_SPACING_REF).decrement(),this.letterSpacing=this.userProperties.getByRef(V.LETTER_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LETTER_SPACING_REF))):t==="wordSpacing"?(this.userProperties.getByRef(V.WORD_SPACING_REF).decrement(),this.wordSpacing=this.userProperties.getByRef(V.WORD_SPACING_REF).value,await this.storeProperty(this.userProperties.getByRef(V.WORD_SPACING_REF))):t==="lineHeight"&&(this.userProperties.getByRef(V.LINE_HEIGHT_REF).decrement(),this.wordSpacing=this.userProperties.getByRef(V.LINE_HEIGHT_REF).value,await this.storeProperty(this.userProperties.getByRef(V.LINE_HEIGHT_REF))),await this.applyProperties(),this.settingsChangeCallback()}},Jo=Ct;Jo.appearanceValues=["readium-default-on","readium-sepia-on","readium-night-on"],Jo.fontFamilyValues=["Original","serif","sans-serif"],Jo.textAlignmentValues=["auto","justify","start"],Jo.columnCountValues=["auto","1","2"];S();S();var mi;(function(n){n[n.Bookmark=0]="Bookmark",n[n.Annotation=1]="Annotation"})(mi||(mi={}));S();S();S();S();S();S();var tC={stringify(i){let t=i.nSigBytes,n=i.words,r=[];for(let o=0;o<t;o++){let a=n[o>>>2]>>>24-o%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join("")},parse(i){let t=i.length;if(t%2!=0)throw new Error("Hex string count must be even");let n=[];for(let r=0;r<t;r+=2)n[r>>>3]|=parseInt(i.substr(r,2),16)<<24-r%8*4;return new Un(n,t/2)}};S();S();var nC=typeof navigator!="undefined"&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Ko=(()=>{let i=parseInt((/msie (\d+)/.exec(nC)||[])[1],10);return isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(nC)||[])[1],10),isNaN(i)?!1:i):i})();function iC(i,t){return Ko===!1?!1:t?i==="<"?Ko<t:i==="<="?Ko<=t:i===">"?Ko>t:i===">="?Ko>=t:Ko===t:!0}function Jj(){if(typeof window!="undefined"){let i=window.crypto||window.msCrypto;if(!i){if(iC("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(Math.random()*512)%256};throw new Error("Crypto module not found")}return function(){return i.getRandomValues(new Uint32Array(1))[0]}}else{if(typeof window!="undefined"&&window.crypto)return function(){return window.crypto.randomBytes(4).readInt32LE()};if(typeof yy=="function")return function(){let t="crypt";return t+=String.fromCharCode(111),__non_webpack_require__(t).randomBytes(4).readInt32LE()}}throw new Error("Unable to find crypto module")}var rC=Jj();var Un=class{constructor(t,n){if(Array.isArray(t)||!t){this._words=Array.isArray(t)?t:[],this._nSignificantBytes=typeof n=="number"?n:this._words.length*4;return}let r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else if(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else throw new Error("Invalid argument");if(!r){this._words=[],this._nSignificantBytes=0;return}let o=r.byteLength,a=[];for(let s=0;s<o;s++)a[s>>>2]|=r[s]<<24-s%4*8;this._words=a,this._nSignificantBytes=o}get nSigBytes(){return this._nSignificantBytes}set nSigBytes(t){this._nSignificantBytes=t}get words(){return this._words}toString(t){return t?t.stringify(this):tC.stringify(this)}toUint8Array(){let t=this._words,n=this._nSignificantBytes,r=new Uint8Array(n);for(let o=0;o<n;o++)r[o]=t[o>>>2]>>>24-o%4*8&255;return r}concat(t){let n=t.words.slice(),r=t.nSigBytes;if(this.clamp(),this._nSignificantBytes%4)for(let o=0;o<r;o++){let a=n[o>>>2]>>>24-o%4*8&255;this._words[this._nSignificantBytes+o>>>2]|=a<<24-(this._nSignificantBytes+o)%4*8}else for(let o=0;o<r;o+=4)this._words[this._nSignificantBytes+o>>>2]=n[o>>>2];return this._nSignificantBytes+=r,this}clamp(){let t=this._nSignificantBytes;this._words[t>>>2]&=4294967295<<32-t%4*8,this._words.length=Math.ceil(t/4)}clone(){return new Un(this._words.slice(),this._nSignificantBytes)}static random(t){let n=[];for(let r=0;r<t;r+=4)n.push(rC());return new Un(n,t)}};S();S();var kg={stringify(i){let t=i.nSigBytes,n=i.words,r=[];for(let o=0;o<t;o++){let a=n[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse(i){let t=i.length,n=[];for(let r=0;r<t;r++)n[r>>>2]|=(i.charCodeAt(r)&255)<<24-r%4*8;return new Un(n,t)}};var oC={stringify(i){try{return decodeURIComponent(escape(kg.stringify(i)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse(i){return kg.parse(unescape(encodeURIComponent(i)))}};var Lg=class{constructor(t){this._minBufferSize=0,this._blockSize=0,this._props=t,this._data=t&&typeof t.data!="undefined"?t.data.clone():new Un,this._nBytes=t&&typeof t.nBytes=="number"?t.nBytes:0}get blockSize(){return this._blockSize}reset(t,n){this._data=typeof t!="undefined"?t.clone():new Un,this._nBytes=typeof n=="number"?n:0}_append(t){let n=typeof t=="string"?oC.parse(t):t;this._data.concat(n),this._nBytes+=n.nSigBytes}_process(t){let n,r=this._data.words,o=this._data.nSigBytes,a=this._blockSize,s=this._blockSize*4,l=o/s;t?l=Math.ceil(l):l=Math.max((l|0)-this._minBufferSize,0);let c=l*a,h=Math.min(c*4,o);if(c){for(let f=0;f<c;f+=a)this._doProcessBlock(r,f);n=r.splice(0,c),this._data.nSigBytes-=h}return new Un(n,h)}_doProcessBlock(t,n){throw new Error("Not implemented")}};var Pg=class extends Lg{constructor(t){super(t);this._blockSize=512/32,this._props=t,t&&typeof t.blockSize=="number"&&(this._blockSize=t.blockSize),this.reset(t?t.data:void 0,t?t.nBytes:void 0)}get blockSize(){return this._blockSize}reset(t,n){super.reset.call(this,t,n),this._doReset()}update(t){return this._append(t),this._process(),this}finalize(t){return t&&this._append(t),this._doFinalize()}_doReset(){throw new Error("Not implemented")}_doFinalize(){throw new Error("Not implemented")}};var Bg=[],sC=[];function Kj(i){let t=Math.sqrt(i);for(let n=2;n<=t;n++)if(!(i%n))return!1;return!0}function aC(i){return(i-(i|0))*4294967296|0}(function(){let t=2,n=0;for(;n<64;)Kj(t)&&(n<8&&(Bg[n]=aC(Math.pow(t,1/2))),sC[n]=aC(Math.pow(t,1/3)),n++),t++})();var Yo=[],zi=class extends Pg{constructor(t){super(t);this._hash=new Un(Bg.slice(0)),this._props=t,t&&typeof t.hash!="undefined"&&(this._hash=t.hash.clone())}_doReset(){this._hash=new Un(Bg.slice(0))}_doProcessBlock(t,n){let r=this._hash.words,o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],h=r[5],f=r[6],v=r[7];for(let m=0;m<64;m++){if(m<16)Yo[m]=t[n+m]|0;else{let L=Yo[m-15],j=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,N=Yo[m-2],q=(N<<15|N>>>17)^(N<<13|N>>>19)^N>>>10;Yo[m]=j+Yo[m-7]+q+Yo[m-16]}let y=c&h^~c&f,E=o&a^o&s^a&s,_=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),C=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),A=v+C+y+sC[m]+Yo[m],T=_+E;v=f,f=h,h=c,c=l+A|0,l=s,s=a,a=o,o=A+T|0}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+s|0,r[3]=r[3]+l|0,r[4]=r[4]+c|0,r[5]=r[5]+h|0,r[6]=r[6]+f|0,r[7]=r[7]+v|0}_doFinalize(){let t=this._data.words,n=this._nBytes*8,r=this._data.nSigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,this._data.nSigBytes=t.length*4,this._process(),this._hash}clone(){let t={hash:this._hash,blockSize:this._blockSize,data:this._data,nBytes:this._nBytes};return new zi(t)}static hash(t,n){return new zi(n).finalize(t)}};var kd=Tt(Go());S();var Qe;(function(a){a[a.Annotation=0]="Annotation",a[a.Search=1]="Search",a[a.ReadAloud=2]="ReadAloud",a[a.PageBreak=3]="PageBreak",a[a.Popup=4]="Popup"})(Qe||(Qe={}));S();var vi=!1;function na(i,t){let n=i.getClientRects();return Yj(n,t)}function Yj(i,t){let n=1,r=[];for(let c of i)r.push({bottom:c.bottom,height:c.height,left:c.left,right:c.right,top:c.top,width:c.width});let o=uC(r,n,t),a=n5(o,n),s=cC(a),l=2*2;for(let c=s.length-1;c>=0;c--){let h=s[c];if(!(h.width*h.height>l))if(s.length>1)vi&&console.log("CLIENT RECT: remove small"),s.splice(c,1);else{vi&&console.log("CLIENT RECT: remove small, but keep otherwise empty!");break}}return vi&&dC(s),vi&&console.log(`CLIENT RECT: reduced ${r.length} --> ${s.length}`),s}function Ii(i,t,n){return Math.abs(i-t)<=n}function Xj(i,t){let n=Math.max(i.left,t.left),r=Math.min(i.right,t.right),o=Math.max(i.top,t.top),a=Math.min(i.bottom,t.bottom);return{bottom:a,height:Math.max(0,a-o),left:n,right:r,top:o,width:Math.max(0,r-n)}}function lC(i,t){let n=Xj(t,i);if(n.height===0||n.width===0)return[i];let r=[];{let o={bottom:i.bottom,height:0,left:i.left,right:n.left,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:n.top,height:0,left:n.left,right:n.right,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:i.bottom,height:0,left:n.left,right:n.right,top:n.bottom,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}{let o={bottom:i.bottom,height:0,left:n.right,right:i.right,top:i.top,width:0};o.width=o.right-o.left,o.height=o.bottom-o.top,o.height!==0&&o.width!==0&&r.push(o)}return r}function Md(i,t,n,r){return(i.left<t||Ii(i.left,t,r))&&(i.right>t||Ii(i.right,t,r))&&(i.top<n||Ii(i.top,n,r))&&(i.bottom>n||Ii(i.bottom,n,r))}function Zj(i,t,n){return Md(i,t.left,t.top,n)&&Md(i,t.right,t.top,n)&&Md(i,t.left,t.bottom,n)&&Md(i,t.right,t.bottom,n)}function Qj(i,t){let n=Math.min(i.left,t.left),r=Math.max(i.right,t.right),o=Math.min(i.top,t.top),a=Math.max(i.bottom,t.bottom);return{bottom:a,height:a-o,left:n,right:r,top:o,width:r-n}}function Ig(i,t,n){return(i.left<t.right||n>=0&&Ii(i.left,t.right,n))&&(t.left<i.right||n>=0&&Ii(t.left,i.right,n))&&(i.top<t.bottom||n>=0&&Ii(i.top,t.bottom,n))&&(t.top<i.bottom||n>=0&&Ii(t.top,i.bottom,n))}function uC(i,t,n){for(let r=0;r<i.length;r++)for(let o=r+1;o<i.length;o++){let a=i[r],s=i[o];if(a===s){vi&&console.log("mergeTouchingRects rect1 === rect2 ??!");continue}let l=Ii(a.top,s.top,t)&&Ii(a.bottom,s.bottom,t),c=Ii(a.left,s.left,t)&&Ii(a.right,s.right,t);if((c&&!n||l&&!c)&&Ig(a,s,t)){vi&&console.log(`CLIENT RECT: merging two into one, VERTICAL: ${l} HORIZONTAL: ${c} (${n})`);let m=i.filter(E=>E!==a&&E!==s),y=Qj(a,s);return m.push(y),uC(m,t,n)}}return i}function cC(i){for(let t=0;t<i.length;t++)for(let n=t+1;n<i.length;n++){let r=i[t],o=i[n];if(r===o){vi&&console.log("replaceOverlappingRects rect1 === rect2 ??!");continue}if(Ig(r,o,-1)){let a=[],s,l,c=lC(r,o);if(c.length===1)a=c,s=r,l=o;else{let f=lC(o,r);c.length<f.length?(a=c,s=r,l=o):(a=f,s=o,l=r)}if(vi){let f=[];f.push(l),Array.prototype.push.apply(f,a),dC(f)}vi&&console.log(`CLIENT RECT: overlap, cut one rect into ${a.length}`);let h=i.filter(f=>f!==s);return Array.prototype.push.apply(h,a),cC(h)}}return i}function e5(i,t){return Math.max(0,Math.min(i.right,t.right)-Math.max(i.left,t.left))}function t5(i,t){return Math.max(0,Math.min(i.bottom,t.bottom)-Math.max(i.top,t.top))}function n5(i,t){let n=new Set(i);for(let r of i){if(!(r.width>1&&r.height>1)){vi&&console.log("CLIENT RECT: remove tiny"),n.delete(r);continue}for(let a of i)if(r!==a&&!!n.has(a)&&Zj(a,r,t)){vi&&console.log("CLIENT RECT: remove contained"),n.delete(r);break}}return Array.from(n)}function dC(i){let t=[];for(let n of i)for(let r of i){if(n===r)continue;let o=t.indexOf(n)>=0,a=t.indexOf(r)>=0;if((!o||!a)&&Ig(n,r,-1)&&(o||t.push(n),a||t.push(r),vi)){console.log("CLIENT RECT: overlap ---"),console.log(`#1 TOP:${n.top} BOTTOM:${n.bottom} LEFT:${n.left} RIGHT:${n.right} WIDTH:${n.width} HEIGHT:${n.height}`),console.log(`#2 TOP:${r.top} BOTTOM:${r.bottom} LEFT:${r.left} RIGHT:${r.right} WIDTH:${r.width} HEIGHT:${r.height}`);let s=e5(n,r);console.log(`xOverlap: ${s}`);let l=t5(n,r);console.log(`yOverlap: ${l}`)}}t.length&&vi&&console.log(`CLIENT RECT: overlaps ${t.length}`)}S();var on=!1;function no(i,t){let n=i?i.getSelection():null;if(!n)return;if(n.isCollapsed){on&&console.log("^^^ SELECTION COLLAPSED.");return}let r=n.toString(),o=r.trim().replace(/\n/g," ").replace(/\s\s+/g," ");if(o.length===0){on&&console.log("^^^ SELECTION TEXT EMPTY.");return}if(!n.anchorNode||!n.focusNode)return;let a=n.rangeCount===1?n.getRangeAt(0):hC(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset);if(!a||a.collapsed){on&&console.log("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");return}let s=r5(a);on&&(s.startContainer!==a.startContainer&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: startContainer"),console.log(s.startContainer),console.log(a.startContainer)),s.startOffset!==a.startOffset&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: startOffset"),console.log(`${s.startOffset} !== ${a.startOffset}`)),s.endContainer!==a.endContainer&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: endContainer"),console.log(s.endContainer),console.log(a.endContainer)),s.endOffset!==a.endOffset&&on&&(console.log(">>>>>>>>>>>>>>>>>>>>>>> SELECTION RANGE NORMALIZE diff: endOffset"),console.log(`${s.endOffset} !== ${a.endOffset}`)));let l=kr(s,t);if(!l){on&&console.log("^^^ SELECTION RANGE INFO FAIL?!");return}return{rangeInfo:l,cleanText:o,rawText:r,range:s}}function hC(i,t,n,r){try{let o=new Range;if(o.setStart(i,t),o.setEnd(n,r),!o.collapsed)return on&&console.log(">>> createOrderedRange RANGE OK"),o;on&&console.log(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");let a=new Range;if(a.setStart(n,r),a.setEnd(i,t),!a.collapsed)return on&&console.log(">>> createOrderedRange RANGE REVERSE OK."),o;on&&console.log(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!");return}catch(o){console.warn(o.message);return}}function kr(i,t){let n=i.startContainer.nodeType===Node.ELEMENT_NODE,r=n?i.startContainer:i.startContainer.parentNode&&i.startContainer.parentNode.nodeType===Node.ELEMENT_NODE?i.startContainer.parentNode:void 0;if(!r)return;let o=n?-1:Array.from(r.childNodes).indexOf(i.startContainer);if(o<-1)return;let a=t(r),s=i.endContainer.nodeType===Node.ELEMENT_NODE,l=s?i.endContainer:i.endContainer.parentNode&&i.endContainer.parentNode.nodeType===Node.ELEMENT_NODE?i.endContainer.parentNode:void 0;if(!l)return;let c=s?-1:Array.from(l.childNodes).indexOf(i.endContainer);if(c<-1)return;let h=t(l),f=i5(i.startContainer,i.endContainer);if(!f){on&&console.log("^^^ NO RANGE COMMON ANCESTOR?!");return}if(i.commonAncestorContainer){let v=i.commonAncestorContainer.nodeType===Node.ELEMENT_NODE?i.commonAncestorContainer:i.commonAncestorContainer.parentNode;v&&v.nodeType===Node.ELEMENT_NODE&&f!==v&&on&&(console.log(">>>>>> COMMON ANCESTOR CONTAINER DIFF??!"),console.log(t(f)),console.log(t(v)))}return{endContainerChildTextNodeIndex:c,endContainerElementCssSelector:h,endOffset:i.endOffset,startContainerChildTextNodeIndex:o,startContainerElementCssSelector:a,startOffset:i.startOffset}}function fC(i,t){let n=i.querySelector(t.startContainerElementCssSelector);if(!n){on&&console.log("^^^ convertRangeInfo NO START ELEMENT CSS SELECTOR?!");return}let r=n;if(t.startContainerChildTextNodeIndex>=0){if(t.startContainerChildTextNodeIndex>=n.childNodes.length){on&&console.log("^^^ convertRangeInfo rangeInfo.startContainerChildTextNodeIndex >= startElement.childNodes.length?!");return}if(r=n.childNodes[t.startContainerChildTextNodeIndex],r.nodeType!==Node.TEXT_NODE){on&&console.log("^^^ convertRangeInfo startContainer.nodeType !== Node.TEXT_NODE?!");return}}let o=i.querySelector(t.endContainerElementCssSelector);if(!o){on&&console.log("^^^ convertRangeInfo NO END ELEMENT CSS SELECTOR?!");return}let a=o;if(t.endContainerChildTextNodeIndex>=0){if(t.endContainerChildTextNodeIndex>=o.childNodes.length){on&&console.log("^^^ convertRangeInfo rangeInfo.endContainerChildTextNodeIndex >= endElement.childNodes.length?!");return}if(a=o.childNodes[t.endContainerChildTextNodeIndex],a.nodeType!==Node.TEXT_NODE){on&&console.log("^^^ convertRangeInfo endContainer.nodeType !== Node.TEXT_NODE?!");return}}return hC(r,t.startOffset,a,t.endOffset)}function i5(i,t){if(i.nodeType===Node.ELEMENT_NODE&&i===t||i.nodeType===Node.ELEMENT_NODE&&i.contains(t))return i;if(t.nodeType===Node.ELEMENT_NODE&&t.contains(i))return t;let n=[],r=i.parentNode;for(;r&&r.nodeType===Node.ELEMENT_NODE;)n.push(r),r=r.parentNode;let o=[];for(r=t.parentNode;r&&r.nodeType===Node.ELEMENT_NODE;)o.push(r),r=r.parentNode;let a=n.find(s=>o.indexOf(s)>=0);return a||(a=o.find(s=>n.indexOf(s)>=0)),a}function r5(i){let t=i.cloneRange(),n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset;n.childNodes.length&&r>0&&(n=gC(n.childNodes[r-1]),r=n.length||0),a<o.childNodes.length&&(o=pC(o.childNodes[a]),a=0);let s=pC(n),l=gC(o);function c(h){if(h.childNodes.length)return!1;let f=h.length||0;return h===n&&r===f?!1:!(h===o&&a===0)}for(;s&&!c(s)&&s!==l;)s=o5(s);for(s===n?t.setStart(n,r):s!==null&&(s.nodeType===3?t.setStart(s,0):t.setStartBefore(s));l&&!c(l)&&l!==s;)l=s5(l);return l===o?t.setEnd(o,a):l!==null&&(l.nodeType===3?t.setEnd(l,l.length):t.setEndAfter(l)),t}function o5(i){if(i.firstChild)return i.firstChild;let t=i;for(;!t.nextSibling;)if(t=t.parentNode,!t)return null;return t.nextSibling}function s5(i){if(i.lastChild)return i.lastChild;let t=i;for(;!t.previousSibling;)if(t=t.parentNode,!t)return null;return t.previousSibling}function pC(i){for(;i.firstChild;)i=i.firstChild;return i}function gC(i){for(;i.lastChild;)i=i.lastChild;return i}S();var Hg=Tt(vC()),io;(function(r){r[r.All=0]="All",r[r.Two=1]="Two",r[r.One=2]="One"})(io||(io={}));var Lr,Dg;function Wn(i,t,n){if(i.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(i.tagName.toLowerCase()==="html")return i.tagName.toLowerCase();let r={className:a=>!0,idName:a=>!0,optimizedMinLength:2,root:t.body,seedMinLength:1,tagName:a=>!0,threshold:1e3};Lr=Ze(Ze({},r),n),Dg=f5(Lr.root,r);let o=jg(i,0,()=>jg(i,1,()=>jg(i,2)));if(o){let a=_C(SC(o,i));return a.length>0&&(o=a[0]),Ad(o)}else throw new Error("Selector was not found.")}function f5(i,t){return i.nodeType===Node.DOCUMENT_NODE?i:i===t.root?i.ownerDocument:i}function jg(i,t,n){let r=null,o=[],a=i,s=0;for(;a&&a!==Lr.root.parentElement;){let l=Ug(p5(a))||Ug(...g5(a))||Ug(m5(a))||[v5()],c=y5(a);if(t===0)c&&(l=l.concat(l.filter($g).map(h=>Fg(h,c))));else if(t===1)l=l.slice(0,1),c&&(l=l.concat(l.filter($g).map(h=>Fg(h,c))));else if(t===2){let[h]=l=l.slice(0,1);c&&$g(h)&&(l=[Fg(h,c)])}for(let h of l)h.level=s;if(o.push(l),o.length>=Lr.seedMinLength&&(r=yC(o,n),r))break;a=a.parentElement,s++}return r||(r=yC(o,n)),r}function yC(i,t){let n=_C(EC(i));if(n.length>Lr.threshold)return t?t():null;for(let r of n)if(wC(r))return r;return null}function Ad(i){let t=i[0],n=t.name;for(let r=1;r<i.length;r++){let o=i[r].level||0;t.level===o-1?n=`${i[r].name} > ${n}`:n=`${i[r].name} ${n}`,t=i[r]}return n}function bC(i){return i.map(t=>t.penalty).reduce((t,n)=>t+n,0)}function wC(i){switch(Dg.querySelectorAll(Ad(i)).length){case 0:throw new Error(`Can't select any node with this selector: ${Ad(i)}`);case 1:return!0;default:return!1}}function p5(i){let t=i.getAttribute("id");return t&&Lr.idName(t)?{name:"#"+(0,Hg.default)(t,{isIdentifier:!0}),penalty:0}:null}function g5(i){return Array.from(i.classList).filter(Lr.className).map(n=>({name:"."+(0,Hg.default)(n,{isIdentifier:!0}),penalty:1}))}function m5(i){let t=i.tagName.toLowerCase();return Lr.tagName(t)?{name:t,penalty:2}:null}function v5(){return{name:"*",penalty:3}}function y5(i){let t=i.parentNode;if(!t)return null;let n=t.firstChild;if(!n)return null;let r=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==i);)n=n.nextSibling;return r}function Fg(i,t){return{name:i.name+`:nth-child(${t})`,penalty:i.penalty+1}}function $g(i){return i.name!=="html"&&!i.name.startsWith("#")}function Ug(...i){let t=i.filter(b5);return t.length>0?t:null}function b5(i){return i!=null}function*EC(i,t=[]){if(i.length>0)for(let n of i[0])yield*EC(i.slice(1,i.length),t.concat(n));else yield t}function _C(i){return Array.from(i).sort((t,n)=>bC(t)-bC(n))}function*SC(i,t){if(i.length>2&&i.length>Lr.optimizedMinLength)for(let n=1;n<i.length-1;n++){let r=[...i];r.splice(n,1),wC(r)&&w5(r,t)&&(yield r,yield*SC(r,t))}}function w5(i,t){return Dg.querySelector(Ad(i))===t}S();var et;(function(o){o[o.Highlight=0]="Highlight",o[o.Underline=1]="Underline",o[o.Bookmark=2]="Bookmark",o[o.Custom=3]="Custom"})(et||(et={}));S();var CC=24,xC=24,Wg="0 0 24 24",qn=(i,t,n,r="icon")=>`<svg xmlns="http://www.w3.org/2000/svg" width="${CC}" height="${xC}" viewBox="${Wg}" preserveAspectRatio="xMidYMid meet" role="img" class="${r}" aria-labelledBy="${i}">
|
|
70
70
|
<title id="${i}">${t}</title>
|
|
71
71
|
${n}
|
|
72
72
|
</svg>`,qg=(i,t,n,r="icon",o,a)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="${Wg}" style="fill:${a}" preserveAspectRatio="xMidYMid meet" role="img" class="${r}" aria-labelledBy="${i}">
|
|
@@ -81,7 +81,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
81
81
|
<span>There was an error loading this page.</span>
|
|
82
82
|
<button class="go-back">Go back</button>
|
|
83
83
|
<button class="try-again">Try again</button>
|
|
84
|
-
`;var yo=Tt(Ld());var OO=Tt(CO()),nh=Tt(Go());S();var ha=class{constructor(){this.onBackwardSwipe=()=>{};this.onForwardSwipe=()=>{};this.setupEvents=t=>{var n=null,r=null,o=this;t.addEventListener("touchstart",function(a){a.changedTouches.length===1&&(n=a)},!1),t.addEventListener("touchend",function(a){if(a.changedTouches.length!==1||!n)return;let s=n.changedTouches[0],l=a.changedTouches[0];if(!s)return;let c=window.devicePixelRatio,h=(s.clientX-l.clientX)/c,f=(s.clientY-l.clientY)/c;if(Math.abs(h)<ha.TAP_TOLERANCE&&Math.abs(f)<ha.TAP_TOLERANCE){if(r){n=null,r=null;return}if(a.timeStamp-n.timeStamp>ha.LONG_PRESS_MS){n=null,r=null;return}n=null,r=a;return}if(r=null,a.timeStamp-n.timeStamp>ha.SLOW_SWIPE_MS){n=null;return}let v=(s.clientY-l.clientY)/(s.clientX-l.clientX);if(Math.abs(v)>.5){n=null;return}h<0?o.onBackwardSwipe(a):o.onForwardSwipe(a),n=null},!1)}}},is=ha;is.TAP_TOLERANCE=10,is.LONG_PRESS_MS=500,is.SLOW_SWIPE_MS=500;S();var eh=class{constructor(){this.onBackwardSwipe=()=>{};this.onForwardSwipe=()=>{};this.setupEvents=t=>{this.focusin(t),this.keydown(t)};this.focusin=t=>{let n=this;t.addEventListener("focusin",function(r){n.delegate.view.snap(r.target)},!0)};this.keydown=t=>{let n=this;t.addEventListener("keydown",function(r){let o=r.target;if(/input|select|option|textarea/i.test(o.tagName)||!(o.ownerDocument||o).defaultView.getSelection().isCollapsed)return;switch(r.key){case"ArrowRight":n.onForwardSwipe(r);break;case"ArrowLeft":n.onBackwardSwipe(r);break}},!1)}}};S();var xO=Tt(Go()),th=class{constructor(t){this.enforceSampleRead=(0,xO.debounce)(t=>{let r=Math.round(t.locations.totalProgression*100)<=this.delegate.sample?.limit;this.delegate.view.layout==="fixed"&&!r&&t.locations.position<=this.delegate.sample?.minimum&&(r=!0);let o={37:1,38:0,39:1,40:1,32:1,33:1,34:1,35:1,36:1};function a(y){y.preventDefault()}function s(y){o[y.keyCode]&&!r&&a(y)}let l=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){l=!0}}))}catch(y){}let c=l?{passive:!1}:!1;function h(y){y=y||window.event;let E=Math.max(-1,Math.min(1,y.wheelDelta||-y.detail));return E==1,E==-1&&!r&&y.preventDefault(),!1}let f;function v(y){y=y||window.event;let E=y.target||y.srcElement,_=y.touches[0].clientY;if(!(_>f)){if(_<f&&!r)return E.className.match(/\baltNav\b/)||(y.returnValue=!1,y.cancelable&&(y.cancelBubble=!0),y.preventDefault&&y.cancelable&&(y.preventDefault(),y.stopPropagation())),!1}return f=_,!1}function m(y){return y=y||window.event,f=y.touches[0].clientY,!1}window.addEventListener("mousewheel",h,c),window.addEventListener("DOMMouseScroll",h,c),window.addEventListener("keydown",s,c),window.addEventListener("touchmove",v,c),window.addEventListener("touchstart",m,c),r?(this.delegate.iframes[0].focus(),this.delegate.errorMessage&&(this.delegate.errorMessage.style.display="none",this.delegate.errorMessage.style.removeProperty("background-color"))):(this.delegate.iframes[0].blur(),this.delegate.errorMessage&&(this.delegate.errorMessage.style.display="block",this.delegate.errorMessage.style.backgroundColor="rgb(255, 255, 255)",this.delegate.errorMessage.innerHTML=this.delegate.sample?.popup))},300);this.delegate=t}};var fn=class{constructor(t,n=null,r=null,o=null,a,s,l,c,h,f,v,m,y){this.iframes=[];this.sideNavExpanded=!1;this.material=!1;this.currentChapterLink={};this.currentSpreadLinks={};this.upLink=null;this.didInitKeyboardEventHandler=!1;this.onResize=()=>{clearTimeout(this.timeout),this.timeout=setTimeout(this.handleResize.bind(this),200)};this.reload=async()=>{let t=null;if(this.annotator&&(t=await this.annotator.getLastReadingPosition()),t){let n=this.publication.getAbsoluteHref(t.href);W&&console.log(t.href),W&&console.log(n),t.href=n,await this.navigate(t)}};this.savePosition=(0,nh.debounce)(async()=>{this.annotator&&await this.saveCurrentReadingPosition()},200);this.checkResourcePosition=(0,nh.debounce)(()=>{this.view.atStart()&&this.view.atEnd()?this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen():this.view.atEnd()?this.api?.resourceAtEnd&&this.api?.resourceAtEnd():this.view.atStart()&&this.api?.resourceAtStart&&this.api?.resourceAtStart()},200);this.settings=t,this.annotator=n,this.view=t.view,this.view.attributes=v,this.view.delegate=this,this.eventHandler=new xd(this),this.touchEventHandler=new is,this.keyboardEventHandler=new eh,this.upLinkConfig=r,this.initialLastReadingPosition=o,this.publication=a,this.material=s,this.api=l,this.rights=c,this.tts=h,this.injectables=f,this.attributes=v||{margin:0},this.services=m,this.sample=y,this.sampleReadEventHandler=new th(this)}static async create(t){let n=new this(t.settings,t.annotator||null,t.upLink||null,t.initialLastReadingPosition||null,t.publication,t.material,t.api,t.rights,t.tts,t.injectables,t.attributes||{margin:0},t.services,t.sample);return await n.start(t.mainElement,t.headerMenu,t.footerMenu),new Promise(r=>r(n))}stop(){W&&console.log("Iframe navigator stop"),Le(this.previousChapterAnchorElement,"click",this.handlePreviousChapterClick.bind(this)),Le(this.nextChapterAnchorElement,"click",this.handleNextChapterClick.bind(this)),Le(this.previousChapterTopAnchorElement,"click",this.handlePreviousPageClick.bind(this)),Le(this.nextChapterBottomAnchorElement,"click",this.handleNextPageClick.bind(this)),Le(this.previousPageAnchorElement,"click",this.handlePreviousPageClick.bind(this)),Le(this.nextPageAnchorElement,"click",this.handleNextPageClick.bind(this)),Le(this.tryAgainButton,"click",this.tryAgain.bind(this)),Le(this.goBackButton,"click",fn.goBack.bind(this)),Le(this.bookmarksControl,"keydown",this.hideBookmarksOnEscape.bind(this)),Le(this.espandMenuIcon,"click",this.handleEditClick.bind(this)),Le(window,"resize",this.onResize),this.iframes.forEach(t=>{Le(t,"resize",this.onResize)}),this.rights?.enableMaterial&&(this.mDropdowns&&this.mDropdowns.forEach(t=>{t.destroy()}),this.mCollapsibles&&this.mCollapsibles.forEach(t=>{t.destroy()}),this.mSidenav&&this.mSidenav.destroy(),this.mTabs&&this.mTabs.forEach(t=>{t.destroy()}))}async start(t,n,r){this.headerMenu=n,this.mainElement=t;try{let E=Bt(t,"main#iframe-wrapper");E.style.overflow="overlay";let _=ve(t,"main#iframe-wrapper iframe"),C=ve(t,"#second");if(_&&this.iframes.push(_),C&&this.iframes.push(C),window.matchMedia("screen and (max-width: 600px)").matches&&(this.settings.columnCount=1),this.iframes.length===0){E.style.overflow="overlay";let A=document.createElement("iframe");if(A.setAttribute("SCROLLING","no"),A.setAttribute("allowtransparency","true"),this.iframes.push(A),this.publication.isFixedLayout?(this.spreads=document.createElement("div"),this.firstSpread=document.createElement("div"),this.spreads.style.display="flex",this.spreads.style.alignItems="center",this.spreads.style.justifyContent="center",this.spreads.appendChild(this.firstSpread),this.firstSpread.appendChild(this.iframes[0]),E.appendChild(this.spreads)):(A.setAttribute("height","100%"),A.setAttribute("width","100%"),E.appendChild(this.iframes[0])),this.publication.isFixedLayout)if(this.settings.columnCount!==1&&!window.matchMedia("screen and (max-width: 600px)").matches){let T=document.createElement("div");this.spreads.appendChild(T);let L=document.createElement("iframe");L.setAttribute("SCROLLING","no"),L.setAttribute("allowtransparency","true"),L.style.opacity="1",L.style.border="none",L.style.overflow="hidden",this.iframes.push(L),T.appendChild(this.iframes[1]),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 100% 120%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc",T.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, 0% 120%)",T.style.boxShadow="0 0 8px 2px #ccc"}else this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc";else this.iframes[0].style.paddingTop=(this.attributes?.iframePaddingTop??0)+"px"}if(this.publication.isFixedLayout){let A=E.clientHeight;var o=this.iframes[0].parentElement.parentElement;o.style.height=A+40+"px"}else this.iframes.length===2&&this.iframes.pop();this.loadingMessage=ve(t,"#reader-loading"),this.loadingMessage&&(this.loadingMessage.innerHTML=_O,this.loadingMessage.style.display="none"),this.errorMessage=ve(t,"#reader-error"),this.errorMessage&&(this.errorMessage.innerHTML=SO,this.errorMessage.style.display="none"),this.tryAgainButton=ve(t,"button[class=try-again]"),this.goBackButton=ve(t,"button[class=go-back]"),this.infoTop=ve(t,"div[class='info top']"),this.infoBottom=ve(t,"div[class='info bottom']"),this.headerMenu&&(this.bookTitle=ve(this.headerMenu,"#book-title")),this.infoBottom&&(this.chapterTitle=ve(this.infoBottom,"span[class=chapter-title]")),this.infoBottom&&(this.chapterPosition=ve(this.infoBottom,"span[class=chapter-position]")),this.infoBottom&&(this.remainingPositions=ve(this.infoBottom,"span[class=remaining-positions]")),this.headerMenu&&(this.espandMenuIcon=ve(this.headerMenu,"#expand-menu")),this.headerMenu&&(this.links=ve(this.headerMenu,"ul.links.top")),this.headerMenu&&(this.linksTopLeft=ve(this.headerMenu,"#nav-mobile-left")),this.headerMenu&&(this.tocView=ve(this.headerMenu,"#container-view-toc")),this.headerMenu&&(this.landmarksView=ve(n,"#container-view-landmarks")),this.headerMenu&&(this.landmarksSection=ve(n,"#sidenav-section-landmarks")),this.headerMenu&&(this.pageListView=ve(n,"#container-view-pagelist")),r&&(this.linksBottom=ve(r,"ul.links.bottom")),r&&(this.linksMiddle=ve(r,"ul.links.middle")),this.headerMenu&&(this.nextChapterAnchorElement=ve(this.headerMenu,"a[rel=next]")),this.headerMenu&&(this.nextChapterBottomAnchorElement=ve(t,"#next-chapter")),r&&(this.nextPageAnchorElement=ve(r,"a[rel=next]")),this.headerMenu&&(this.previousChapterAnchorElement=ve(this.headerMenu,"a[rel=prev]")),this.headerMenu&&(this.previousChapterTopAnchorElement=ve(t,"#previous-chapter")),r&&(this.previousPageAnchorElement=ve(r,"a[rel=prev]")),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.newPosition=null,this.newElementId=null,this.isBeingStyled=!0,this.isLoading=!0,this.setupEvents(),this.settings.setIframe(this.iframes[0]),this.settings.onSettingsChange(this.handleResize.bind(this)),this.settings.onColumnSettingsChange(this.handleNumberOfIframes.bind(this)),this.settings.onViewChange(this.updateBookView.bind(this)),this.initialLastReadingPosition&&this.annotator.initLastReadingPosition(this.initialLastReadingPosition);var a=this;if(this.headerMenu)var s=ve(this.headerMenu,"#menu-button-search"),l=ve(this.headerMenu,"#menu-button-tts"),c=ve(this.headerMenu,"#menu-button-bookmark"),h=ve(this.headerMenu,"#menu-button-play"),f=ve(this.headerMenu,"#menu-button-pause"),v=ve(this.headerMenu,"#menu-button-mediaoverlay");if(this.rights?.enableMaterial){let A=document.querySelectorAll(".sidenav");A&&(a.mSidenav=yo.Sidenav.init(A,{edge:this.attributes?.sideNavPosition??"left"}));let T=document.querySelectorAll(".collapsible");T&&(a.mCollapsibles=yo.Collapsible.init(T,{accordion:!0}));let L=document.querySelectorAll(".dropdown-trigger");L&&(a.mDropdowns=yo.Dropdown.init(L,{alignment:"right",constrainWidth:!1,coverTrigger:!1,closeOnClick:!1,autoTrigger:!1,onOpenEnd:function(){a.mTabs.forEach(N=>{N.updateTabIndicator()})}}));let j=document.querySelectorAll(".tabs");if(j&&(a.mTabs=yo.Tabs.init(j)),this.headerMenu){if(!this.rights?.enableBookmarks){c&&c.parentElement.style.setProperty("display","none");var m=ve(this.headerMenu,"#sidenav-section-bookmarks");m&&m.style.setProperty("display","none")}if(!this.rights?.enableAnnotations){var y=ve(this.headerMenu,"#sidenav-section-highlights");y&&y.style.setProperty("display","none")}this.rights?.enableTTS||l&&l.parentElement.style.setProperty("display","none"),this.rights?.enableSearch||s&&s.parentElement.style.setProperty("display","none"),s&&this.view.delegate.publication.isFixedLayout&&s.parentElement.style.setProperty("display","none")}}else this.headerMenu&&(s&&s.parentElement.style.setProperty("display","none"),l&&l.parentElement.style.setProperty("display","none"),c&&c.parentElement.style.setProperty("display","none"));return this.hasMediaOverlays?(h&&h.parentElement.style.setProperty("display","block"),f&&f.parentElement.style.setProperty("display","block"),v&&v.parentElement.style.setProperty("display","block")):(h&&h.parentElement.style.setProperty("display","none"),f&&f.parentElement.style.setProperty("display","none"),v&&v.parentElement.style.setProperty("display","none")),await this.loadManifest()}catch(E){return console.error(E),this.abortOnError(),Promise.reject(E)}}setupEvents(){for(let t of this.iframes)ue(t,"load",this.handleIFrameLoad.bind(this));ue(this.previousChapterAnchorElement,"click",this.handlePreviousChapterClick.bind(this)),ue(this.nextChapterAnchorElement,"click",this.handleNextChapterClick.bind(this)),ue(this.previousChapterTopAnchorElement,"click",this.handlePreviousPageClick.bind(this)),ue(this.nextChapterBottomAnchorElement,"click",this.handleNextPageClick.bind(this)),ue(this.previousPageAnchorElement,"click",this.handlePreviousPageClick.bind(this)),ue(this.nextPageAnchorElement,"click",this.handleNextPageClick.bind(this)),ue(this.tryAgainButton,"click",this.tryAgain.bind(this)),ue(this.goBackButton,"click",fn.goBack.bind(this)),ue(this.bookmarksControl,"keydown",this.hideBookmarksOnEscape.bind(this)),ue(this.espandMenuIcon,"click",this.handleEditClick.bind(this)),ue(window,"resize",this.onResize);for(let t of this.iframes)ue(t,"resize",this.onResize)}setupModalFocusTrap(t,n,r){let o=9;n.addEventListener("keydown",a=>{if(fn.isDisplayed(t)){let s=a.keyCode===o,l=!!a.shiftKey;s&&l&&(r.focus(),a.preventDefault(),a.stopPropagation())}}),r.addEventListener("keydown",a=>{if(fn.isDisplayed(t)){let s=a.keyCode===o,l=!!a.shiftKey;s&&!l&&(n.focus(),a.preventDefault(),a.stopPropagation())}})}updateBookView(){this.view.layout==="fixed"?(this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="none"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):(this.settings.isPaginated().then(t=>{if(t)this.view.height=to()-40-this.attributes.margin,this.infoBottom&&this.infoBottom.style.removeProperty("display"),document.body.onscroll=()=>{},this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="unset"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="unset"),this.chapterTitle&&(this.chapterTitle.style.display="inline"),this.chapterPosition&&(this.chapterPosition.style.display="inline"),this.remainingPositions&&(this.remainingPositions.style.display="inline"),this.eventHandler&&(this.eventHandler.onInternalLink=this.handleInternalLink.bind(this),this.eventHandler.onClickThrough=this.handleClickThrough.bind(this)),this.touchEventHandler&&(this.touchEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.touchEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this)),this.keyboardEventHandler&&(this.keyboardEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.keyboardEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this));else{this.infoBottom&&(this.infoBottom.style.display="none"),this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="none"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="none"),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"));let n=(0,nh.debounce)(()=>{this.isScrolling=!1},200),r=Bt(document,"#iframe-wrapper");r.onscroll=async()=>{this.isScrolling=!0,await this.savePosition(),this.view.atEnd(),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):(this.settings.isPaginated().then(o=>{o||(this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")))}),this.checkResourcePosition()),n()},this.chapterTitle&&(this.chapterTitle.style.display="none"),this.chapterPosition&&(this.chapterPosition.style.display="none"),this.remainingPositions&&(this.remainingPositions.style.display="none"),this.eventHandler&&(this.eventHandler.onInternalLink=this.handleInternalLink.bind(this),this.eventHandler.onClickThrough=this.handleClickThrough.bind(this)),this.touchEventHandler&&(this.touchEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.touchEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this)),this.keyboardEventHandler&&(this.keyboardEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.keyboardEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this))}}),setTimeout(async()=>{this.pageBreakModule!==void 0&&(await this.highlighter.destroyHighlights(Qe.PageBreak),await this.pageBreakModule.drawPageBreaks()),this.annotationModule!==void 0&&await this.annotationModule.drawHighlights(),this.bookmarkModule!==void 0&&await this.bookmarkModule.drawBookmarks(),this.rights?.enableSearch&&this.searchModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Search),this.searchModule.drawSearch()),this.rights?.enableDefinitions&&this.definitionsModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Popup),this.definitionsModule.drawDefinitions())},200))}async loadManifest(){try{let n=(h,f,v,m=!1)=>{var y,E;v&&(y=v,h instanceof HTMLDivElement&&(E=h));var _=document.createElement("ul");m&&(_=document.createElement("ol")),_.className="sidenav-toc";let C=null;for(let A of f){let T=document.createElement("li"),L=document.createElement("a"),j=document.createElement("span");L.className="chapter-link",L.tabIndex=-1;let N="";A.Href?(N=this.publication.getAbsoluteHref(A.Href),L.href=N,L.innerHTML=A.Title||"",T.appendChild(L)):(j.innerHTML=A.Title||"",j.className="chapter-title",T.appendChild(j)),A.Children&&A.Children.length>0&&n(T,A.Children,null,!0),_.appendChild(T),C=L}C&&y&&this.setupModalFocusTrap(E,y,C),ue(_,"click",A=>{if(A.preventDefault(),A.stopPropagation(),A.target&&A.target.tagName.toLowerCase()==="a"){let T=A.target;if(T.className.indexOf("active")!==-1)this.hideView(E,y);else{y?.focus();let L={progression:0};if(T.href.indexOf("#")!==-1){let N=T.href.slice(T.href.indexOf("#")+1);N!==null&&(L={fragment:N})}let j={href:T.href,locations:L,type:T.type,title:T.title};this.hideView(E,y),this.navigate(j)}}}),h.appendChild(_)},r=this.publication.tableOfContents,o=this.publication.landmarks,a=this.publication.pageList;if(this.tocView&&(r.length?n(this.tocView,r):this.tocView.parentElement.parentElement.removeChild(this.tocView.parentElement)),this.pageListView&&(a?.length?n(this.pageListView,a):this.pageListView.parentElement.parentElement.removeChild(this.pageListView.parentElement)),this.landmarksView&&(o?.length?n(this.landmarksView,o):this.landmarksSection.parentElement.removeChild(this.landmarksSection)),(this.links||this.linksTopLeft)&&this.upLinkConfig&&this.upLinkConfig.url){let h=this.upLinkConfig.url,f=this.upLinkConfig.label||"",v=this.upLinkConfig.ariaLabel||f;var t=EO(h.href,f,v);let m=document.createElement("li");m.classList.add("uplink-wrapper"),m.innerHTML=t,this.links?(this.links.insertBefore(m,this.links.firstChild),this.upLink=Bt(this.links,"a[rel=up]")):(this.linksTopLeft.insertBefore(m,this.linksTopLeft.firstChild),this.upLink=Bt(this.linksTopLeft,"a[rel=up]"))}let s=null;this.annotator&&(s=await this.annotator.getLastReadingPosition());let l=this.publication.getStartLink(),c=null;if(l&&l.Href&&(c=this.publication.getAbsoluteHref(l.Href)),s){let h=this.publication.getAbsoluteHref(s.href);W&&console.log(s.href),W&&console.log(h),s.href=h,await this.navigate(s)}else if(c){let h={href:c,locations:{progression:0},created:new Date,title:l.Title};await this.navigate(h)}return new Promise(h=>h())}catch(n){return console.error(n),this.abortOnError(),new Promise((r,o)=>o(n)).catch(()=>{})}}async handleIFrameLoad(){this.errorMessage&&(this.errorMessage.style.display="none"),this.showLoadingMessageAfterDelay();try{let t=0;this.newPosition&&(t=this.newPosition.locations.progression),await this.handleResize(),this.updateBookView(),await this.settings.applyProperties();let n=this.currentChapterLink.href,r=this.publication.getPreviousSpineItem(n);r&&r.Href&&(this.previousChapterLink={href:r.Href,title:r.Title,type:r.TypeLink}),this.previousChapterAnchorElement&&(this.previousChapterLink?(this.previousChapterAnchorElement.href=this.publication.getAbsoluteHref(this.previousChapterLink.href),this.previousChapterAnchorElement.className=this.previousChapterAnchorElement.className.replace(" disabled","")):(this.previousChapterAnchorElement.removeAttribute("href"),this.previousChapterAnchorElement.className+=" disabled"));let o=this.publication.getNextSpineItem(n);o?this.nextChapterLink={href:o.Href,title:o.Title,type:o.TypeLink}:this.nextChapterLink=void 0,this.nextChapterAnchorElement&&(this.nextChapterLink?(this.nextChapterAnchorElement.href=this.publication.getAbsoluteHref(this.nextChapterLink.href),this.nextChapterAnchorElement.className=this.nextChapterAnchorElement.className.replace(" disabled","")):(this.nextChapterAnchorElement.removeAttribute("href"),this.nextChapterAnchorElement.className+=" disabled")),this.currentTocUrl!==null?this.setActiveTOCItem(this.currentTocUrl):this.setActiveTOCItem(n),this.publication.Metadata.Title&&this.bookTitle&&(this.bookTitle.innerHTML=this.publication.Metadata.Title.toString());let a=this.publication.getSpineItem(n);a!==null&&(this.currentChapterLink.title=a.Title,this.currentChapterLink.type=a.TypeLink);let s=this.publication.getTOCItem(n);this.currentTocUrl!==null&&(s=this.publication.getTOCItem(this.currentTocUrl)),!this.currentChapterLink.title&&s!==null&&s.Title&&(this.currentChapterLink.title=s.Title),!this.currentChapterLink.type&&s!==null&&s.TypeLink&&(this.currentChapterLink.title=s.Title),this.currentChapterLink.title?this.chapterTitle&&(this.chapterTitle.innerHTML="("+this.currentChapterLink.title+")"):this.chapterTitle&&(this.chapterTitle.innerHTML="(Current Chapter)"),await this.injectInjectablesIntoIframeHead(),this.highlighter!==void 0&&await this.highlighter.initialize();let l=this.iframes[0].contentDocument.body;this.rights?.enableTTS&&this.tts?.enableSplitter&&(0,OO.default)({target:l,by:"lines"});let c=l.querySelector("details");if(c){let h=this;c.addEventListener("toggle",async f=>{await h.view.setIframeHeight(this.iframes[0])})}if(this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&await this.contentProtectionModule.initialize(),this.eventHandler){for(let h of this.iframes)this.eventHandler.setupEvents(h.contentDocument),this.touchEventHandler.setupEvents(h.contentDocument),this.keyboardEventHandler.setupEvents(h.contentDocument);this.touchEventHandler.setupEvents(this.errorMessage),this.didInitKeyboardEventHandler||(this.keyboardEventHandler.delegate=this,this.keyboardEventHandler.keydown(document),this.didInitKeyboardEventHandler=!0)}if(this.view.layout!=="fixed"&&this.view?.isScrollMode())for(let h of this.iframes)this.view.setIframeHeight(h);if(this.annotationModule!==void 0&&await this.annotationModule.initialize(),this.bookmarkModule!==void 0&&await this.bookmarkModule.initialize(),this.rights?.enableTTS)for(let h of this.iframes){let f=h.contentDocument.body;this.ttsModule!==void 0&&(this.tts.enableSplitter?await this.ttsModule.initialize(f):await this.ttsModule.initialize(f))}return this.timelineModule!==void 0&&await this.timelineModule.initialize(),this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initialize(),setTimeout(async()=>{if(this.newElementId){let h=this.iframes[0].contentDocument.getElementById(this.newElementId);this.view.goToElement(h),this.newElementId=null}else this.newPosition&&this.newPosition.highlight?this.view.goToCssSelector(this.newPosition.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector):t>0&&this.view.goToProgression(t);this.newPosition=null,this.hideLoadingMessage(),this.showIframeContents(),this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initializeResource(this.currentLink()),this.view?.setSize(),await this.updatePositionInfo(),await this.view.setSize()},200),this.definitionsModule!==void 0&&await this.definitionsModule.definitions(),new Promise(h=>h())}catch(t){return console.error(t),this.abortOnError(),Promise.reject(t)}}async injectInjectablesIntoIframeHead(){let t=[],n=r=>{let o=new Promise(a=>{r.onload=()=>{a(!0)}});t.push(o)};for(let r of this.iframes){let o=r.contentDocument.head;o&&(o.insertBefore(fn.createBase(this.currentChapterLink.href),o.firstChild),this.injectables.forEach(a=>{if(a.type==="style")if(a.fontFamily){if(this.settings.initAddedFont(),!a.systemFont){let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}}else if(a.r2before){let s=fn.createCssLink(a.url);o.insertBefore(s,o.firstChild),n(s)}else if(a.r2default){let s=fn.createCssLink(a.url);o.insertBefore(s,o.childNodes[1]),n(s)}else if(a.r2after){a.appearance&&this.settings.initAddedAppearance();let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}else{let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}else if(a.type==="script"){let s=fn.createJavascriptLink(a.url,a.async);o.appendChild(s),n(s)}}))}t.length!==0&&await Promise.all(t)}abortOnError(){this.errorMessage&&(this.errorMessage.style.display="block"),this.isLoading&&this.hideLoadingMessage()}tryAgain(){this.precessContentForIframe()}precessContentForIframe(){let t=this;var n=this.publication.getSpineIndex(this.currentChapterLink.href),r=n%2==1;this.showLoadingMessageAfterDelay();function o(c,h){let v=new DOMParser().parseFromString(c,"application/xhtml+xml");v.head&&v.head.insertBefore(fn.createBase(h),v.head.firstChild);let m=v.documentElement.outerHTML,y=t.iframes[0].contentDocument;y.open(),y.write(m),y.close()}function a(c,h){let v=new DOMParser().parseFromString(c,"application/xhtml+xml");v.head&&v.head.insertBefore(fn.createBase(h),v.head.firstChild);let m=v.documentElement.outerHTML,y=t.iframes[1].contentDocument;y.open(),y.write(m),y.close()}let s=new URL(this.currentChapterLink.href),l=window.location.protocol===s.protocol&&window.location.port===s.port&&window.location.hostname===s.hostname;if(this.api?.getContent)if(this.publication.isFixedLayout)if(this.settings.columnCount!==1)if(r){if(this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.api?.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)}),this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.right={href:h},this.api?.getContent(h).then(f=>{f===void 0?l?this.iframes[1].src=h:fetch(h).then(v=>v.text()).then(async v=>{a.call(this,v,h),this.currentSpreadLinks.right={href:h}}):a.call(this,f,h)})}else this.iframes[1].src="about:blank"}else{if(n>0){let c=this.publication.getPreviousSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.left={href:h},this.api?.getContent(h).then(f=>{f===void 0?l?this.iframes[0].src=h:fetch(h).then(v=>v.text()).then(async v=>{o.call(this,v,h)}):o.call(this,f,h)})}else this.iframes[0].src="about:blank";this.iframes.length===2&&this.publication.isFixedLayout&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},this.api.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[1].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{a.call(this,h,this.currentChapterLink.href)}):a.call(this,c,this.currentChapterLink.href)}))}else this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.api?.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)});else this.api?.getContent(this.currentChapterLink.href).then(c=>{this.currentSpreadLinks.left={href:this.currentChapterLink.href},c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)});else if(this.publication.isFixedLayout)if(this.settings.columnCount!==1)if(r){if(l){if(this.iframes[0].src=this.currentChapterLink.href,this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.iframes[1].src=h,this.currentSpreadLinks.right={href:h}}else this.iframes[1].src="about:blank"}else if(fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)}),this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.right={href:h},fetch(h).then(f=>f.text()).then(async f=>{a.call(this,f,h)})}else this.iframes[1].src="about:blank"}else{if(n>0){let c=this.publication.getPreviousSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.left={href:h},l?(this.iframes[0].src=h,this.iframes.length===2&&(this.iframes[1].src=this.currentChapterLink.href)):(fetch(h).then(f=>f.text()).then(async f=>{o.call(this,f,h)}),this.iframes.length===2&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},fetch(this.currentChapterLink.href).then(f=>f.text()).then(async f=>{a.call(this,f,this.currentChapterLink.href)})))}else this.iframes[0].src="about:blank";this.iframes.length===2&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},l?this.iframes[1].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{a.call(this,c,this.currentChapterLink.href)}))}else this.currentSpreadLinks.left={href:this.currentChapterLink.href},l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)});else this.currentSpreadLinks.left={href:this.currentChapterLink.href},l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)});this.publication.isFixedLayout&&setTimeout(()=>{let c=getComputedStyle(n===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).height,h=getComputedStyle(n===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).width;if(parseInt(c.replace("px",""))===0||parseInt(h.replace("px",""))===0){let C=Ft(n===0&&this.iframes.length===2?this.iframes[1].contentDocument:this.iframes[0].contentDocument,"head");if(C){let A=ve(C,"meta[name=viewport]");if(A){var f=A.content,v=f.split(",").reduce((T,L)=>{var[j,N]=L.match(/[^\s;=]+/g);return T[j]=isNaN(Number(N))?N:+N,T},{});c=v.height+"px",h=v.width+"px"}}}var m=n===0&&this.iframes.length===2?this.iframes[1].parentElement.parentElement:this.iframes[0].parentElement.parentElement,y=(parseInt(getComputedStyle(m).width)-100)/(this.iframes.length===2?parseInt(h.replace("px",""))*2+200:parseInt(h.replace("px",""))),E=(parseInt(getComputedStyle(m).height)-100)/parseInt(c.replace("px","")),_=Math.min(y,E);m.style.transform="scale("+_+")";for(let C of this.iframes)C.style.height=c,C.style.width=h,C.parentElement.style.height=c},400)}static goBack(){window.history.back()}static isDisplayed(t){return t?t.className.indexOf(" active")!==-1:!1}static showElement(t,n){if(t){if(t.className=t.className.replace(" inactive",""),t.className.indexOf(" active")===-1&&(t.className+=" active"),t.setAttribute("aria-hidden","false"),n){n.setAttribute("aria-expanded","true");let a=n.querySelector(".icon.open");if(a&&(a.getAttribute("class")||"").indexOf(" inactive-icon")===-1){let l=(a.getAttribute("class")||"")+" inactive-icon";a.setAttribute("class",l)}let s=n.querySelector(".icon.close");if(s){let l=(s.getAttribute("class")||"").replace(" inactive-icon","");s.setAttribute("class",l)}}let r=Array.prototype.slice.call(t.querySelectorAll("button")),o=Array.prototype.slice.call(t.querySelectorAll("a"));for(let a of r)a.tabIndex=0;for(let a of o)a.tabIndex=0}}static hideElement(t,n){if(t){if(t.className=t.className.replace(" active",""),t.className.indexOf(" inactive")===-1&&(t.className+=" inactive"),t.setAttribute("aria-hidden","true"),n){n.setAttribute("aria-expanded","false");let a=n.querySelector(".icon.open");if(a){let l=(a.getAttribute("class")||"").replace(" inactive-icon","");a.setAttribute("class",l)}let s=n.querySelector(".icon.close");if(s&&(s.getAttribute("class")||"").indexOf(" inactive-icon")===-1){let l=(s.getAttribute("class")||"")+" inactive-icon";s.setAttribute("class",l)}}let r=Array.prototype.slice.call(t.querySelectorAll("button")),o=Array.prototype.slice.call(t.querySelectorAll("a"));for(let a of r)a.tabIndex=-1;for(let a of o)a.tabIndex=-1}}hideModal(t,n){for(let r of this.iframes)r.setAttribute("aria-hidden","false");this.upLink&&this.upLink.setAttribute("aria-hidden","false"),this.linksBottom&&this.linksBottom.setAttribute("aria-hidden","false"),this.linksMiddle&&this.linksMiddle.setAttribute("aria-hidden","false"),this.loadingMessage&&this.loadingMessage.setAttribute("aria-hidden","false"),this.errorMessage&&this.errorMessage.setAttribute("aria-hidden","false"),this.infoTop&&this.infoTop.setAttribute("aria-hidden","false"),this.infoBottom&&this.infoBottom.setAttribute("aria-hidden","false"),fn.hideElement(t,n)}handleEditClick(t){var n=t.target,r=ve(this.headerMenu,".sidenav");n.className.indexOf(" active")===-1?(n.className+=" active",r.className+=" expanded",n.innerText="unfold_less",this.sideNavExpanded=!0,this.bookmarkModule.showBookmarks(),this.annotationModule.showHighlights()):(n.className=n.className.replace(" active",""),r.className=r.className.replace(" expanded",""),n.innerText="unfold_more",this.sideNavExpanded=!1,this.bookmarkModule.showBookmarks(),this.annotationModule.showHighlights()),t.preventDefault(),t.stopPropagation()}get hasMediaOverlays(){return this.publication.hasMediaOverlays}startReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.highlighter.speakAll():this.ttsModule.speakPlay())}startReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.startReadAloud()}stopReadAloud(){this.rights?.enableTTS&&(this.highlighter.stopReadAloud(),this.tts.enableSplitter||this.annotationModule!==void 0&&this.annotationModule.drawHighlights())}stopReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.stopReadAloud()}pauseReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.ttsModule.speakPause():(this.ttsModule.speakPause(),this.annotationModule!==void 0&&this.annotationModule.drawHighlights()))}pauseReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.pauseReadAloud()}resumeReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.ttsModule.speakResume():this.ttsModule.speakResume())}resumeReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.resumeReadAloud()}totalResources(){return this.publication.readingOrder.length}mostRecentNavigatedTocItem(){return this.publication.getRelativeHref(this.currentTOCRawLink)}currentResource(){let t=this.currentChapterLink.href;return this.publication.getSpineIndex(t)}currentLink(){if(this.settings.columnCount!==1&&this.currentSpreadLinks.left!==void 0&&this.currentSpreadLinks.right!==void 0){let n=this.publication.getSpineItem(this.currentSpreadLinks.left.href),r=this.publication.getSpineItem(this.currentSpreadLinks.right.href);return[n,r]}let t=this.currentChapterLink.href;return[this.publication.getSpineItem(t)]}tableOfContents(){return this.publication.tableOfContents}readingOrder(){return this.publication.readingOrder}atStart(){return this.view.atStart()}atEnd(){return this.view.atEnd()}previousPage(){this.handlePreviousPageClick(null)}nextPage(){this.handleNextPageClick(null)}previousResource(){this.handlePreviousChapterClick(null)}nextResource(){this.handleNextChapterClick(null)}goTo(t){let n=t.locations??{progression:0};if(t.href.indexOf("#")!==-1){let a=t.href.slice(t.href.indexOf("#")+1);a!==null&&(n=dn(Ze({},n),{fragment:a}))}let r=Ze({},t);r.locations=n;let o=this.publication.getAbsoluteHref(t.href);W&&console.log(t.href),W&&console.log(o),r.href=o,this.stopReadAloud(),this.navigate(r)}currentLocator(){let t;if((this.rights?.autoGeneratePositions??!1)&&this.publication.positions||this.publication.positions){let r=this.publication.positionsByHref(this.publication.getRelativeHref(this.currentChapterLink.href)),o=Math.ceil(this.view.getCurrentPosition()*(r.length-1));t=r[o]}else{var n=this.publication.getTOCItem(this.currentChapterLink.href);this.currentTocUrl!==null&&(n=this.publication.getTOCItem(this.currentTocUrl)),n===null&&(n=this.publication.getTOCItemAbsolute(this.currentChapterLink.href)),t={href:n.Href,type:this.currentChapterLink.type,title:this.currentChapterLink.title,locations:{}}}return t.locations.progression=this.view.getCurrentPosition(),t.displayInfo={resourceScreenIndex:Math.round(this.view.getCurrentPage()),resourceScreenCount:Math.round(this.view.getPageCount())},t}positions(){return this.publication.positions?this.publication.positions:[]}goToPosition(t){if(this.publication.positions){let n=this.publication.positions.filter(r=>r.locations.position===parseInt(String(t)))[0];this.goTo(n)}}snapToElement(t){this.view.snap(t)}applyAttributes(t){this.attributes=t,this.view.attributes=t,this.handleResize()}handlePreviousPageClick(t){this.stopReadAloud(),this.view.layout==="fixed"?this.handlePreviousChapterClick(t):(this.view.atStart()?this.handlePreviousChapterClick(t):(this.view.goToPreviousPage(),this.updatePositionInfo(),this.savePosition()),t&&(t.preventDefault(),t.stopPropagation()))}handleNextPageClick(t){let n=!0;if(this.sample?.isSampleRead&&this.publication.positions){let r=this.currentLocator();n=Math.round(r.locations.totalProgression*100)<=this.sample?.limit,this.view.layout==="fixed"&&!n&&r.locations.position<=this.sample?.minimum&&(n=!0)}(n&&this.sample?.isSampleRead&&this.publication.positions||!this.sample?.isSampleRead||!this.publication.positions)&&(this.stopReadAloud(),this.view.layout==="fixed"?this.handleNextChapterClick(t):(this.view.atEnd()?this.handleNextChapterClick(t):(this.view.goToNextPage(),this.updatePositionInfo(),this.savePosition()),t&&(t.preventDefault(),t.stopPropagation()))),!n&&this.sample?.isSampleRead&&this.publication.positions&&t&&(t.preventDefault(),t.stopPropagation())}handleClickThrough(t){this.mDropdowns&&this.mDropdowns.forEach(n=>{n.close()})}handleInternalLink(t){let n=t.target,r={progression:0},o=n;if(o.href.indexOf("#")!==-1){let s=o.href.slice(o.href.indexOf("#")+1);s!==null&&(r={fragment:s})}let a={href:o.href,locations:r,type:o.type,title:o.title};t.preventDefault(),t.stopPropagation(),this.stopReadAloud(),this.navigate(a)}handleNumberOfIframes(){if(this.publication.isFixedLayout){if(this.settings.columnCount!==1&&!window.matchMedia("screen and (max-width: 600px)").matches){if(this.iframes.length===1){var t=document.createElement("iframe");t.setAttribute("SCROLLING","no"),t.setAttribute("allowtransparency","true"),t.style.opacity="1",t.style.border="none",t.style.overflow="hidden",this.iframes.push(t)}let n=document.createElement("div");this.spreads.appendChild(n),n.appendChild(this.iframes[1]),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 100% 120%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc",n.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, 0% 120%)",n.style.boxShadow="0 0 8px 2px #ccc"}else this.iframes.length===2&&(this.iframes.pop(),this.spreads.removeChild(this.spreads.lastChild)),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc";this.precessContentForIframe()}}async handleResize(){if(this.isScrolling)return;if(this.publication.isFixedLayout){var t=this.publication.getSpineIndex(this.currentChapterLink.href);let h=to()-40-this.attributes.margin;var n=t===0&&this.iframes.length===2?this.iframes[1].parentElement.parentElement:this.iframes[0].parentElement.parentElement;n.style.height=h+40+"px";let f=getComputedStyle(t===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).height,v=getComputedStyle(t===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).width,m=Ft(t===0&&this.iframes.length===2?this.iframes[1].contentDocument:this.iframes[0].contentDocument,"head");if(m){let y=ve(m,"meta[name=viewport]");if(y){var r=y.content,o=r.split(",").reduce((E,_)=>{var[C,A]=_.match(/[^\s;=]+/g);return E[C]=isNaN(Number(A))?A:+A,E},{});(parseInt(o.height)!==0||parseInt(o.width)!==0)&&(f=o.height+"px",v=o.width+"px")}}var a=(parseInt(getComputedStyle(n).width)-100)/(this.iframes.length===2?parseInt(v.replace("px",""))*2+200:parseInt(v.replace("px",""))),s=(parseInt(getComputedStyle(n).height)-100)/parseInt(f.replace("px","")),l=Math.min(a,s);n.style.transform="scale("+l+")";for(let y of this.iframes)y.style.height=f,y.style.width=v,y.parentElement.style.height=f}let c=this.view.getCurrentPosition();await this.settings.applyProperties(),this.infoTop&&(this.infoTop.style.height=0+"px"),this.infoTop&&(this.infoTop.style.minHeight=0+"px"),this.infoBottom&&(this.infoBottom.style.height=this.attributes.bottomInfoHeight?this.attributes.bottomInfoHeight+"px":40+"px"),this.view.layout!=="fixed"&&this.settings.isPaginated().then(h=>{h?(this.view.height=to()-40-this.attributes.margin,this.infoBottom&&this.infoBottom.style.removeProperty("display")):this.infoBottom&&(this.infoBottom.style.display="none")}),setTimeout(()=>{if(this.view.layout!=="fixed"&&this.view?.isScrollMode())for(let h of this.iframes)this.view.setIframeHeight(h)},100),setTimeout(async()=>{this.view.goToProgression(c),await this.updatePositionInfo(!1),this.annotationModule!==void 0&&await this.annotationModule.handleResize(),this.bookmarkModule!==void 0&&await this.bookmarkModule.handleResize(),this.searchModule!==void 0&&await this.searchModule.handleResize(),this.definitionsModule!==void 0&&await this.definitionsModule.handleResize(),this.pageBreakModule!==void 0&&await this.pageBreakModule.handleResize(),this.contentProtectionModule!==void 0&&this.contentProtectionModule.handleResize()},150)}async updatePositionInfo(t=!0){if(this.view.layout==="fixed")this.chapterPosition&&(this.chapterPosition.innerHTML=""),this.remainingPositions&&(this.remainingPositions.innerHTML="");else if(this.view?.isPaginated()){let n=this.currentLocator(),r=n.displayInfo.resourceScreenIndex,o=n.displayInfo.resourceScreenCount;this.chapterPosition&&(this.chapterPosition.innerHTML="Page "+r+" of "+o)}else this.chapterPosition&&(this.chapterPosition.innerHTML=""),this.remainingPositions&&(this.remainingPositions.innerHTML="");t&&await this.savePosition()}handlePreviousChapterClick(t){if(this.view.layout==="fixed"&&this.settings.columnCount!==1){let n=this.publication.getSpineIndex(this.currentChapterLink.href);n=n-2,n<0&&(n=0);let r=this.publication.readingOrder[n],o={href:this.publication.getAbsoluteHref(r.Href),locations:{progression:0},type:r.TypeLink,title:r.Title};this.stopReadAloud(),this.navigate(o)}else if(this.previousChapterLink){let n={href:this.publication.getAbsoluteHref(this.previousChapterLink.href),locations:{progression:1},type:this.previousChapterLink.type,title:this.previousChapterLink.title};this.stopReadAloud(),this.navigate(n)}t&&(t.preventDefault(),t.stopPropagation())}handleNextChapterClick(t){if(this.view.layout==="fixed"&&this.settings.columnCount!==1){let n=this.publication.getSpineIndex(this.currentChapterLink.href);n=n+2,n>=this.publication.readingOrder.length-1&&(n=this.publication.readingOrder.length-1);let r=this.publication.readingOrder[n],o={href:this.publication.getAbsoluteHref(r.Href),locations:{progression:0},type:r.TypeLink,title:r.Title};this.stopReadAloud(),this.navigate(o)}else if(this.nextChapterLink){let n={href:this.publication.getAbsoluteHref(this.nextChapterLink.href),locations:{progression:0},type:this.nextChapterLink.type,title:this.nextChapterLink.title};this.stopReadAloud(),this.navigate(n)}t&&(t.preventDefault(),t.stopPropagation())}hideBookmarksOnEscape(t){let n=27;fn.isDisplayed(this.bookmarksView)&&t.keyCode===n&&this.hideModal(this.bookmarksView,this.bookmarksControl)}hideView(t,n){this.view.layout!=="fixed"&&this.view?.isScrollMode()&&(document.body.style.overflow="auto")}setActiveTOCItem(t){if(this.tocView){let n=Array.prototype.slice.call(this.tocView.querySelectorAll("li > a"));for(let o of n)o.className=o.className.replace(" active","");let r=this.tocView.querySelector('li > a[href^="'+t+'"]');r&&(r.className+=" active")}}async navigate(t){if(this.publication.getTOCItem(t.href)){var r=!1;if(t.href.indexOf("#")!==-1){let o=t.href.slice(0,t.href.indexOf("#"));o===this.currentChapterLink.href&&(r=!0),this.currentChapterLink.href=o,this.currentChapterLink.type=t.type,this.currentChapterLink.title=t.title}else t.href===this.currentChapterLink.href&&(r=!0),this.currentChapterLink.href=t.href,this.currentChapterLink.type=t.type,this.currentChapterLink.title=t.title;if(this.currentSpreadLinks.left!==void 0&&this.currentSpreadLinks.right!==void 0&&(t.href===this.currentSpreadLinks.left.href||t.href===this.currentSpreadLinks.right.href))return;if(r){if(t.href.indexOf("#")!==-1){let h=t.href.slice(t.href.indexOf("#")+1);t.locations={fragment:h}}if(this.newPosition=t,this.currentTOCRawLink=t.href,t.locations.fragment===void 0?this.currentTocUrl=null:(this.newElementId=t.locations.fragment,this.currentTocUrl=this.currentChapterLink.href+"#"+this.newElementId),this.newElementId){for(let h of this.iframes){let f=h.contentDocument.getElementById(this.newElementId);this.view.goToElement(f)}this.newElementId=null}else t.highlight?this.view.goToCssSelector(t.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector):this.view.goToProgression(t.locations.progression);let o=this.currentChapterLink.href,a=this.publication.getPreviousSpineItem(o);a&&a.Href&&(this.previousChapterLink={href:a.Href,type:a.TypeLink,title:a.Title}),this.previousChapterAnchorElement&&(this.previousChapterLink?(this.previousChapterAnchorElement.href=this.publication.getAbsoluteHref(this.previousChapterLink.href),this.previousChapterAnchorElement.className=this.previousChapterAnchorElement.className.replace(" disabled","")):(this.previousChapterAnchorElement.removeAttribute("href"),this.previousChapterAnchorElement.className+=" disabled"));let s=this.publication.getNextSpineItem(o);s?this.nextChapterLink={href:s.Href,type:s.TypeLink,title:s.Title}:this.nextChapterLink=void 0,this.nextChapterAnchorElement&&(this.nextChapterLink?(this.nextChapterAnchorElement.href=this.publication.getAbsoluteHref(this.nextChapterLink.href),this.nextChapterAnchorElement.className=this.nextChapterAnchorElement.className.replace(" disabled","")):(this.nextChapterAnchorElement.removeAttribute("href"),this.nextChapterAnchorElement.className+=" disabled")),this.currentTocUrl!==null?this.setActiveTOCItem(this.currentTocUrl):this.setActiveTOCItem(o),this.publication.Metadata.Title&&this.bookTitle&&(this.bookTitle.innerHTML=this.publication.Metadata.Title.toString());let l=this.publication.getSpineItem(o);l!==null&&(this.currentChapterLink.title=l.Title,this.currentChapterLink.type=l.TypeLink);let c=this.publication.getTOCItem(o);this.currentTocUrl!==null&&(c=this.publication.getTOCItem(this.currentTocUrl)),!this.currentChapterLink.title&&c!==null&&c.Title&&(this.currentChapterLink.title=c.Title),!this.currentChapterLink.type&&c!==null&&c.TypeLink&&(this.currentChapterLink.title=c.Title),this.currentChapterLink.title?this.chapterTitle&&(this.chapterTitle.innerHTML="("+this.currentChapterLink.title+")"):this.chapterTitle&&(this.chapterTitle.innerHTML="(Current Chapter)"),await this.updatePositionInfo()}else this.searchModule!==void 0&&this.searchModule.clearSearch(),t.locations.fragment===void 0?this.currentTocUrl=null:(this.newElementId=t.locations.fragment,this.currentTocUrl=this.currentChapterLink.href+"#"+this.newElementId),this.hideIframeContents(),this.showLoadingMessageAfterDelay(),t.locations===void 0&&(t.locations={progression:0}),this.newPosition=t,this.currentTOCRawLink=t.href,this.precessContentForIframe(),this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&await this.contentProtectionModule.initializeResource(),this.rights?.enableMediaOverlays&&this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initializeResource(this.currentLink()),this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&this.contentProtectionModule.recalculate(300),this.pageBreakModule!==void 0&&(await this.highlighter.destroyHighlights(Qe.PageBreak),await this.pageBreakModule.drawPageBreaks()),this.annotationModule!==void 0&&(await this.annotationModule.drawHighlights(),await this.annotationModule.showHighlights()),this.bookmarkModule!==void 0&&(await this.bookmarkModule.drawBookmarks(),await this.bookmarkModule.showBookmarks()),this.rights?.enableSearch&&this.searchModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Search),this.searchModule.drawSearch()),this.rights?.enableDefinitions&&this.definitionsModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Popup),this.definitionsModule.drawDefinitions()),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen()):this.settings.isPaginated().then(o=>{o||(this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")))})}else{let o=this.publication.getStartLink(),a=null;if(o&&o.Href&&(a=this.publication.getAbsoluteHref(o.Href)),a){let s={href:a,locations:{progression:0},created:new Date,title:o.Title};await this.navigate(s)}}}showIframeContents(){this.isBeingStyled=!1,setTimeout(()=>{this.isBeingStyled||this.iframes.forEach(t=>{t.style.opacity="1",t.style.border="none",t.style.overflow="hidden"})},150)}showLoadingMessageAfterDelay(){this.isLoading=!0,this.isLoading&&this.loadingMessage&&(this.loadingMessage.style.display="block",this.loadingMessage.classList.add("is-loading"))}hideIframeContents(){this.isBeingStyled=!0,this.iframes.forEach(t=>{t.style.opacity="0",t.style.border="none",t.style.overflow="hidden"})}hideLoadingMessage(){setTimeout(()=>{this.isLoading=!1,this.loadingMessage&&(this.loadingMessage.style.display="none",this.loadingMessage.classList.remove("is-loading")),this.view.layout!=="fixed"&&(this.view.atStart()&&this.view.atEnd()?this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen():this.view.atEnd()?this.api?.resourceAtEnd&&this.api?.resourceAtEnd():this.view.atStart()&&this.api?.resourceAtStart&&this.api?.resourceAtStart()),this.api?.resourceReady&&this.api?.resourceReady()},150)}async saveCurrentReadingPosition(){if(this.annotator){var t=this.publication.getTOCItem(this.currentChapterLink.href);this.currentTocUrl!==null&&(t=this.publication.getTOCItem(this.currentTocUrl)),t===null&&(t=this.publication.getTOCItemAbsolute(this.currentChapterLink.href));let n={progression:this.view.getCurrentPosition()};if(t.Href.indexOf("#")!==-1){let o=t.Href.slice(t.Href.indexOf("#")+1);o!==null&&(n={progression:this.view.getCurrentPosition(),fragment:o})}let r;if((this.rights?.autoGeneratePositions??!1)&&this.publication.positions||this.publication.positions){let o=this.publication.positionsByHref(this.publication.getRelativeHref(t.Href)),a=Math.ceil(n.progression*(o.length-1)),s=o[a];s.locations.fragment=n.fragment,r=dn(Ze({},s),{href:t.Href,created:new Date,title:this.currentChapterLink.title})}else r={href:t.Href,locations:n,created:new Date,type:this.currentChapterLink.type,title:this.currentChapterLink.title};if(this.sample?.isSampleRead&&this.publication.positions&&this.sampleReadEventHandler?.enforceSampleRead(r),this.api?.updateCurrentLocation)this.api?.updateCurrentLocation(r).then(async o=>(W&&console.log("api updated current location",r),this.annotator.saveLastReadingPosition(r)));else return W&&console.log("save last reading position",r),this.annotator.saveLastReadingPosition(r)}else return new Promise(n=>n())}static createBase(t){let n=document.createElement("base");return n.target="_self",n.href=t,n}static createCssLink(t){let n=document.createElement("link");return n.rel="stylesheet",n.type="text/css",n.href=t,n}static createJavascriptLink(t,n){let r=document.createElement("script");return r.type="text/javascript",r.src=t,r.async=n,r}activateMarker(t,n){this.annotationModule!==void 0&&(this.annotationModule.activeAnnotationMarkerId=t,this.annotationModule.activeAnnotationMarkerPosition=n,this.highlighter.activeAnnotationMarkerId=t)}deactivateMarker(){this.annotationModule!==void 0&&(this.annotationModule.activeAnnotationMarkerId=void 0,this.annotationModule.activeAnnotationMarkerPosition=void 0,this.highlighter.activeAnnotationMarkerId=void 0)}};S();var At=class{constructor(t){this.store=t.store}async getLastReadingPosition(){let t=await this.store.get(At.LAST_READING_POSITION);if(t){let n=JSON.parse(t);return new Promise(r=>r(n))}return new Promise(n=>n())}async initLastReadingPosition(t){if(typeof t=="string")await this.store.set(At.LAST_READING_POSITION,t);else{let n=JSON.stringify(t);await this.store.set(At.LAST_READING_POSITION,n)}return new Promise(n=>n())}async saveLastReadingPosition(t){if(typeof t=="string")await this.store.set(At.LAST_READING_POSITION,t);else{let n=JSON.stringify(t);await this.store.set(At.LAST_READING_POSITION,n)}return new Promise(n=>n())}async initBookmarks(t){if(typeof t=="string"){let n=JSON.parse(t);return await this.store.set(At.BOOKMARKS,JSON.stringify(n)),new Promise(r=>r(t))}else return await this.store.set(At.BOOKMARKS,JSON.stringify(t)),new Promise(n=>n(t))}async saveBookmark(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);r.push(t),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}return new Promise(r=>r(t))}async locatorExists(t,n){let r;switch(n){case mi.Bookmark:r=At.BOOKMARKS;break}let o=await this.store.get(r);return o&&JSON.parse(o).filter(l=>l.href===t.href&&l.locations.progression===t.locations.progression).length>0?new Promise(l=>l(t)):new Promise(a=>a())}async deleteBookmark(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.id!==t.id),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}return new Promise(r=>r(t))}async getBookmarks(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);if(t){let o=r.filter(a=>a.href===t);return o=o.sort((a,s)=>a.locations.progression-s.locations.progression),new Promise(a=>a(o))}return r=r.sort((o,a)=>o.locations.progression-a.locations.progression),new Promise(o=>o(r))}return new Promise(r=>r())}async initAnnotations(t){let n;typeof t=="string"?n=JSON.parse(t):n=t;let r=[];return n.forEach(o=>{let a=`${o.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector}${o.highlight.selectionInfo.rangeInfo.startContainerChildTextNodeIndex}${o.highlight.selectionInfo.rangeInfo.startOffset}${o.highlight.selectionInfo.rangeInfo.endContainerElementCssSelector}${o.highlight.selectionInfo.rangeInfo.endContainerChildTextNodeIndex}${o.highlight.selectionInfo.rangeInfo.endOffset}`,s=zi.hash(a);o.highlight.id="R2_HIGHLIGHT_"+s;var l;l=o.color,Ue.isHexColor(l)&&(l=Ue.hexToRgbString(l)),o.highlight.color=l,o.highlight.pointerInteraction=!0,o.highlight.selectionInfo.cleanText=o.highlight.selectionInfo.rawText.trim().replace(/\n/g," ").replace(/\s\s+/g," "),r.push(o)}),await this.store.set(At.ANNOTATIONS,JSON.stringify(r)),new Promise(o=>o(r))}async saveAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r.push(t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async deleteAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.id!==t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async deleteSelectedAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.highlight.id!==t.highlight.id),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async getAnnotations(){let t=await this.store.get(At.ANNOTATIONS);if(t){let n=JSON.parse(t);return n=n.sort((r,o)=>r.locations.progression-o.locations.progression),new Promise(r=>r(n))}return new Promise(n=>n())}async getAnnotationPosition(t,n){let r=await this.store.get(At.ANNOTATIONS);if(r){let a=JSON.parse(r).filter(s=>s.id===t);if(a.length>0){let s=n.document.getElementById(`${a[0].highlight.id}`);if(s){let l=0;if(s.hasChildNodes)for(let c=0;c<s.childNodes.length;c++){let h=s.childNodes[c],f=parseInt(h.style.top.replace("px",""));(f<l||l==0)&&(l=f)}else l=parseInt(s.style.top.replace("px",""));return new Promise(c=>c(l))}}}return new Promise(o=>o())}async getAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let o=JSON.parse(n).filter(a=>a.highlight.id===t.id);if(o.length>0)return new Promise(a=>a(o[0]))}return new Promise(r=>r())}async getAnnotationByID(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let o=JSON.parse(n).filter(a=>a.highlight.id===t);if(o.length>0)return new Promise(a=>a(o[0]))}return new Promise(r=>r())}},rs=At;rs.LAST_READING_POSITION="last-reading-position",rs.BOOKMARKS="bookmarks",rs.ANNOTATIONS="annotations";S();S();var ih=class{constructor(){this.store={}}get(t){let n=this.store[t]||null;return new Promise(r=>r(n))}set(t,n){return this.store[t]=n,new Promise(r=>r())}remove(t){return this.store[t]=null,new Promise(n=>n())}};var _l=class{constructor(t){this.prefix=t.prefix,this.useLocalStorage=t.useLocalStorage;try{let n=t.prefix+"-"+String(Math.random());this.useLocalStorage?(window.localStorage.setItem(n,"test"),window.localStorage.removeItem(n)):(window.sessionStorage.setItem(n,"test"),window.sessionStorage.removeItem(n)),this.fallbackStore=null}catch(n){this.fallbackStore=new ih}}getLocalStorageKey(t){return this.prefix+"-"+t}async get(t){let n=null;return this.fallbackStore?n=await this.fallbackStore.get(t):this.useLocalStorage?n=window.localStorage.getItem(this.getLocalStorageKey(t)):n=window.sessionStorage.getItem(this.getLocalStorageKey(t)),new Promise(r=>r(n))}async set(t,n){return this.fallbackStore?await this.fallbackStore.set(t,n):this.useLocalStorage?window.localStorage.setItem(this.getLocalStorageKey(t),n):window.sessionStorage.setItem(this.getLocalStorageKey(t),n),new Promise(r=>r())}async remove(t){return this.fallbackStore?await this.fallbackStore.remove(t):this.useLocalStorage?window.localStorage.removeItem(this.getLocalStorageKey(t)):window.sessionStorage.removeItem(this.getLocalStorageKey(t)),new Promise(n=>n())}};S();var TO=Tt(Na()),MO=Tt($n());var Sl=class extends TO.Link{};Sl=yu([(0,MO.JsonObject)()],Sl);function Cl(i){let t,n,r,o;if(i instanceof Array)return i.map(function(a){return typeof a=="object"&&(a=Cl(a)),a});t={};for(n in i)i.hasOwnProperty(n)&&(r=(n.charAt(0).toLowerCase()+n.slice(1)||n).toString(),o=i[n],(o instanceof Array||o!==null&&o.constructor===Object)&&(o=Cl(o)),r==="href1"?t.href=o:r==="typeLink"?t.type=o:t[r]=o);return t}S();var rh=class{static async create(t){let n=new this(t.headerMenu,t.delegate,t.publication);return await n.start(),n}constructor(t,n,r){this.headerMenu=t,this.delegate=n,this.publication=r}async stop(){W&&console.log("Page Break module stop")}async start(){this.delegate.pageBreakModule=this,this.headerMenu&&(this.goToPageView=ve(this.headerMenu,"#sidenav-section-gotopage")),this.headerMenu&&(this.goToPageNumberInput=ve(this.headerMenu,"#goToPageNumberInput")),this.headerMenu&&(this.goToPageNumberButton=ve(this.headerMenu,"#goToPageNumberButton")),ue(this.goToPageNumberInput,"keypress",this.goToPageNumber.bind(this)),ue(this.goToPageNumberButton,"click",this.goToPageNumber.bind(this)),this.goToPageView&&(this.publication.pageList?.length||this.goToPageView.parentElement.removeChild(this.goToPageView))}async goToPageNumber(t){if(this.goToPageNumberInput.value&&(t.key==="Enter"||t.type==="click")){var n=this.publication.pageList.filter(o=>o.Href.slice(o.Href.indexOf("#")+1).replace(/[^0-9]/g,"")===this.goToPageNumberInput.value);if(n&&n.length>0){var r=n[0];let o={progression:0};if(r.Href.indexOf("#")!==-1){let s=r.Href.slice(r.Href.indexOf("#")+1);s!==null&&(o={fragment:s})}let a={href:this.publication.getAbsoluteHref(r.Href),locations:o,type:r.TypeLink,title:r.Title};this.delegate.goTo(a)}}}async handleResize(){await this.delegate.highlighter.destroyHighlights(Qe.PageBreak),await this.drawPageBreaks()}async drawPageBreaks(){setTimeout(()=>{let n=this.delegate.iframes[0].contentDocument.body.querySelectorAll('[*|type="pagebreak"]'),r=this;function o(a){try{return Wn(a,r.delegate.iframes[0].contentDocument,ho)}catch(s){return console.log("uniqueCssSelector:"),console.log(s),""}}for(let a=0;a<n.length;a++){let s=n[a];W&&console.log(s);let l=s.innerHTML,c=!1;s.innerHTML.length===0&&(l=s.getAttribute("title"),s.innerHTML=l,c=!0),s.innerHTML.length===0&&(l=s.getAttribute("id").replace(/[^0-9]/g,""),s.innerHTML=l,c=!0);let h=this.delegate.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getWindow().document.createRange(),f=this.delegate.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getSelection();if(f.removeAllRanges(),h.selectNodeContents(s),f.addRange(h),!f.isCollapsed){let v=kr(h,o);f.removeAllRanges(),this.delegate.highlighter.createPageBreakHighlight({rangeInfo:v,cleanText:"",rawText:"",range:void 0},l)}c&&(s.innerHTML="")}},200)}};S();var AO=Tt(Cd()),oh=class{constructor(t,n,r,o,a,s=null,l=null){this.voices=[];this.hasEventListener=!1;this.index=0;this.userScrolled=!1;this.delegate=t,this.tts=n,this.headerMenu=r,this.rights=o,this.highlighter=a,this.properties=s,this.api=l}initialize(t){this.highlighter!==void 0&&(this.tts.setControls(),this.tts.onSettingsChange(this.handleResize.bind(this)),this.body=t,this.clean=(0,AO.default)(this.body.innerHTML,{allowedTags:[],allowedAttributes:{}}),t.querySelectorAll("[data-word]").forEach(o=>{o.dataset.ttsColor=this.tts.color}),t.querySelectorAll("[data-whitespace]").forEach(o=>{o.dataset.ttsColor=this.tts.color}),window.speechSynthesis.getVoices(),this.initVoices(!0),this.hasEventListener||(this.hasEventListener=!0,ue(document,"wheel",this.wheel.bind(this)),ue(this.body,"wheel",this.wheel.bind(this)),ue(document,"keydown",this.wheel.bind(this)),ue(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))))}initVoices(t){function n(){return new Promise(function(o,a){let s=window.speechSynthesis,l;l=setInterval(()=>{s.getVoices().length!==0&&(o(s.getVoices()),clearInterval(l))},10)})}n().then(async o=>{if(W&&console.log(o),this.voices=[],o.forEach(s=>{s.localService===!0&&this.voices.push(s)}),W&&console.log(this.voices),t&&this.headerMenu){var a=ve(this.headerMenu,"#preferred-languages");a&&this.voices.forEach(s=>{var l=document.createElement("option");l.value=s.name+":"+s.lang,l.innerHTML=s.name+" ("+s.lang+")",a.add(l)})}})}cancel(){this.api?.stopped&&this.api?.stopped(),this.userScrolled=!1,window.speechSynthesis.cancel(),this.splittingResult&&this.delegate.tts?.enableSplitter&&this.splittingResult.forEach(t=>{t.dataset.ttsCurrentWord="false",t.dataset.ttsCurrentLine="false"})}handleResize(){this.body.querySelectorAll("[data-word]").forEach(r=>{r.dataset.ttsColor=this.tts.color,r.dataset.ttsCurrentWord="false",r.dataset.ttsCurrentLine="false"}),this.body.querySelectorAll("[data-whitespace]").forEach(r=>{r.dataset.ttsColor=this.tts.color,r.dataset.ttsCurrentWord="false",r.dataset.ttsCurrentLine="false"})}async speak(t,n,r){this.api?.started&&this.api?.started();var o=this;if(this.userScrolled=!1,this.cancel(),this.delegate.tts?.enableSplitter)if(n){var a=o.body.querySelectorAll("[data-word]"),s=t.range.startContainer.parentElement;s.tagName.toLowerCase()==="a"&&(s=s.parentElement),s.dataset===void 0&&(s=s.nextElementSibling);var l=t.range.endContainer.parentElement;l.tagName.toLowerCase()==="a"&&(l=l.parentElement),l.dataset===void 0&&(l=l.previousElementSibling);var c=parseInt(s.dataset.wordIndex),h=parseInt(l.dataset.wordIndex)+1;let L=Array.from(a);this.splittingResult=L.slice(c,h)}else document.scrollingElement.scrollTop=0,this.splittingResult=o.body.querySelectorAll("[data-word]");let f=n?new SpeechSynthesisUtterance(t.cleanText):new SpeechSynthesisUtterance(this.clean);f.rate=this.tts.rate,f.pitch=this.tts.pitch,f.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var v=!0;this.tts.voice&&this.tts.voice.lang&&(v=this.tts.voice.lang.indexOf("-")!==-1,v===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),v=!0)),W&&console.log("initialVoiceHasHyphen",v),W&&console.log("voices",this.voices);var m;v===!0?(m=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(L=>{var j=L.lang.replace("_","-");return j===this.tts.voice.lang&&L.name===this.tts.voice.name})[0]:void 0,m===void 0&&(m=this.tts.voice&&this.tts.voice.lang?this.voices.filter(L=>L.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(m=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(L=>L.lang===this.tts.voice.lang&&L.name===this.tts.voice.name)[0]:void 0,m===void 0&&(m=this.tts.voice&&this.tts.voice.lang?this.voices.filter(L=>L.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",m);var y=o.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",y);var E;y===!0?E=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(L=>{var j=L.lang.replace("_","-");return j.startsWith(o.delegate.publication.Metadata.Language[0])||j.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:E=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(L=>L.lang.startsWith(o.delegate.publication.Metadata.Language[0])||L.lang.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",E);var _=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",_);var C;_===!0?C=this.voices.filter(L=>{var j=L.lang.replace("_","-");return j===navigator.language&&L.localService===!0})[0]:C=this.voices.filter(L=>{var j=L.lang;return j===navigator.language&&L.localService===!0})[0],C===void 0&&(C=this.voices.filter(L=>{var j=L.lang;return j.includes(navigator.language)&&L.localService===!0})[0]),W&&console.log("defaultVoice",C),m?(W&&console.log("initialVoice"),f.voice=m):E?(W&&console.log("publicationVoice"),f.voice=E):C&&(W&&console.log("defaultVoice"),f.voice=C),f.voice!==void 0&&f.voice!==null&&(f.lang=f.voice.lang,W&&console.log("utterance.voice.lang",f.voice.lang),W&&console.log("utterance.lang",f.lang)),W&&console.log("navigator.language",navigator.language),window.speechSynthesis.speak(f),this.index=0;var A=void 0;f.onboundary=function(L){if(L.name==="sentence"&&W&&console.log("sentence boundary",L.charIndex,L.charLength,f.text.slice(L.charIndex,L.charIndex+L.charLength)),L.name==="word"){let N=function(q,ye){q=String(q),ye=Number(ye)>>>0;var Z=q.slice(0,ye+1).search(/\S+$/),te=q.slice(ye).search(/\s/);return te<0?q.slice(Z):q.slice(Z,te+ye)}(f.text,L.charIndex);A===N&&o.index--,A=N,o.delegate.tts?.enableSplitter&&T(N)}};async function T(L){var j=L.replace(/[^a-zA-Z0-9 ]/g,"");W&&console.log("spokenWordCleaned",j);let N=o.splittingResult[o.index];var q=N?.dataset.word.replace(/[^a-zA-Z0-9 ]/g,"");if(W&&console.log("splittingWordCleaned",q),q.length===0&&(o.index++,N=o.splittingResult[o.index],q=N?.dataset.word.replace(/[^a-zA-Z0-9 ]/g,""),W&&console.log("splittingWordCleaned",q)),N){var ye=N.parentElement.tagName.toLowerCase()==="a";ye||(j.length>0&&q.length>0?q.startsWith(j)||q.endsWith(j)||j.startsWith(q)||j.endsWith(q)?(o.index>0&&(o.body.querySelectorAll("[data-word]").forEach(le=>{le.dataset.ttsColor=o.tts.color,le.dataset.ttsCurrentWord="false",le.dataset.ttsCurrentLine="false"}),o.body.querySelectorAll("[data-whitespace]").forEach(le=>{le.dataset.ttsColor=o.tts.color,le.dataset.ttsCurrentWord="false",le.dataset.ttsCurrentLine="false"})),N.dataset.ttsCurrentWord="true",o.delegate.view.isScrollMode()&&o.tts.autoScroll&&!o.userScrolled&&N.scrollIntoView({block:"center",behavior:"smooth"})):o.index++:j.length===0&&o.index--),o.index++}}f.onend=function(){W&&console.log("utterance ended"),o.highlighter.doneSpeaking(),o.delegate.tts?.enableSplitter&&(o.body.querySelectorAll("[data-word]").forEach(N=>{N.dataset.ttsColor=o.tts.color,N.dataset.ttsCurrentWord="false",N.dataset.ttsCurrentLine="false"}),o.body.querySelectorAll("[data-whitespace]").forEach(N=>{N.dataset.ttsColor=o.tts.color,N.dataset.ttsCurrentWord="false",N.dataset.ttsCurrentLine="false"})),o.api?.finished()},r()}speakPause(){window.speechSynthesis.speaking&&(this.api?.paused&&this.api?.paused(),this.userScrolled=!1,window.speechSynthesis.pause())}speakResume(){window.speechSynthesis.speaking&&(this.api?.resumed&&this.api?.resumed(),this.userScrolled=!1,window.speechSynthesis.resume())}static async create(t){let n=new this(t.delegate,t.tts,t.headerMenu,t.rights,t.highlighter,t,t.api);return await n.start(),n}async start(){if(this.delegate.ttsModule=this,this.headerMenu){var t=ve(this.headerMenu,"#menu-button-tts");this.rights?.enableMaterial?t&&t.parentElement.style.removeProperty("display"):t&&t.parentElement.style.setProperty("display","none")}}wheel(t){if(t instanceof KeyboardEvent)switch(t.key){case"ArrowUp":this.userScrolled=!0;break;case"ArrowDown":this.userScrolled=!0;break}else this.userScrolled=!0}stop(){W&&console.log("TTS module stop"),Le(document,"wheel",this.wheel.bind(this)),Le(this.body,"wheel",this.wheel.bind(this)),Le(document,"keydown",this.wheel.bind(this)),Le(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))}};S();var tT=Tt(Cd());var nT=Tt(Go()),iT=Tt(eT());var vh=class{constructor(t,n,r,o,a,s=null,l=null){this.voices=[];this.hasEventListener=!1;this.index=0;this.userScrolled=!1;this.speaking=!1;this.restartIndex=-1;this.ttsQueueIndex=-1;this.ttsQueue=null;this.ttsPlayQueueIndexDebounced=(0,nT.debounce)((t,n)=>{this.restartIndex>=0?(this.ttsQueueIndex=this.restartIndex,this.restartIndex=-1):this.ttsQueueIndex=t,this.ttsQueue=n,this.ttsPlayQueueIndex(this.ttsQueueIndex,n)},150);this.delegate=t,this.tts=n,this.headerMenu=r,this.rights=o,this.highlighter=a,this.properties=s,this.api=l}initialize(t){this.highlighter!==void 0&&(this.tts.setControls(),this.tts.onRestart(this.restart.bind(this)),this.body=t,this.clean=(0,tT.default)(this.body.innerHTML,{allowedTags:[],allowedAttributes:{}}),window.speechSynthesis.getVoices(),this.initVoices(!0),this.hasEventListener||(this.hasEventListener=!0,ue(document,"wheel",this.wheel.bind(this)),ue(this.body,"wheel",this.wheel.bind(this)),ue(document,"keydown",this.wheel.bind(this)),ue(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))),ue(this.body,"click",this.click.bind(this)))}click(t){if(window.speechSynthesis.speaking&&this.speaking){let n=this.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getSelection(),r=n.getRangeAt(0),o=n.anchorNode;for(;r.toString().indexOf(" ")!=0;)try{r.setStart(o,r.startOffset-1)}catch(c){break}r.setStart(o,r.startOffset+1);do r.setEnd(o,r.endOffset+1);while(r.toString().indexOf(" ")==-1&&r.toString().trim()!="");let s=document.querySelector("main#iframe-wrapper iframe").contentWindow.document.body,l=this.findTtsQueueItemIndex(this.ttsQueue,n.anchorNode,n.focusNode,n.focusOffset,s);n.removeAllRanges(),l>=0&&(window.speechSynthesis.cancel(),this.restartIndex=l,this.ttsPlayQueueIndexDebounced(this.restartIndex,this.ttsQueue))}}initVoices(t){function n(){return new Promise(function(o,a){let s=window.speechSynthesis,l;l=setInterval(()=>{s.getVoices().length!==0&&(o(s.getVoices()),clearInterval(l))},10)})}n().then(async o=>{if(W&&console.log(o),this.voices=[],o.forEach(s=>{s.localService===!0&&this.voices.push(s)}),W&&console.log(this.voices),t&&this.headerMenu){var a=ve(this.headerMenu,"#preferred-languages");a&&this.voices.forEach(s=>{var l=document.createElement("option");l.value=s.name+":"+s.lang,l.innerHTML=s.name+" ("+s.lang+")",a.add(l)})}})}cancel(){this.api?.stopped&&this.api?.stopped(),this.userScrolled=!1,this.speaking=!1,setTimeout(()=>{window.speechSynthesis.cancel()},0),this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0)}async speak(t,n,r){this.api?.started&&this.api?.started();var o=this;this.userScrolled=!1,this.cancel();let a=n?new SpeechSynthesisUtterance(t.cleanText):new SpeechSynthesisUtterance(this.clean);a.rate=this.tts.rate,a.pitch=this.tts.pitch,a.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var s=!0;this.tts.voice&&this.tts.voice.lang&&(s=this.tts.voice.lang.indexOf("-")!==-1,s===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),s=!0)),W&&console.log("initialVoiceHasHyphen",s),W&&console.log("voices",this.voices);var l;s===!0?(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(m=>{var y=m.lang.replace("_","-");return y===this.tts.voice.lang&&m.name===this.tts.voice.name})[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(m=>m.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(m=>m.lang===this.tts.voice.lang&&m.name===this.tts.voice.name)[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(m=>m.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",l);var c=o.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",c);var h;c===!0?h=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(m=>{var y=m.lang.replace("_","-");return y.startsWith(o.delegate.publication.Metadata.Language[0])||y.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:h=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(m=>m.lang.startsWith(o.delegate.publication.Metadata.Language[0])||m.lang.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",h);var f=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",f);var v;f===!0?v=this.voices.filter(m=>{var y=m.lang.replace("_","-");return y===navigator.language&&m.localService===!0})[0]:v=this.voices.filter(m=>{var y=m.lang;return y===navigator.language&&m.localService===!0})[0],v===void 0&&(v=this.voices.filter(m=>{var y=m.lang;return y.includes(navigator.language)&&m.localService===!0})[0]),W&&console.log("defaultVoice",v),l?(W&&console.log("initialVoice"),a.voice=l):h?(W&&console.log("publicationVoice"),a.voice=h):v&&(W&&console.log("defaultVoice"),a.voice=v),a.voice!==void 0&&a.voice!==null&&(a.lang=a.voice.lang,W&&console.log("utterance.voice.lang",a.voice.lang),W&&console.log("utterance.lang",a.lang)),W&&console.log("navigator.language",navigator.language),setTimeout(()=>{window.speechSynthesis.speak(a)},0),this.index=0,a.onend=function(){W&&console.log("utterance ended"),o.highlighter.doneSpeaking(),o.api?.finished()},r()}speakPlay(){this.cancel();let t=this,r=document.querySelector("main#iframe-wrapper iframe").contentWindow.document.body,o=this.generateTtsQueue(r,!0);if(!o.length)return;let a=0;function s(){let l=t.highlighter.visibleTextRects[0],c=t.highlighter.dom(t.delegate.iframes[0].contentDocument.body).getWindow().document.createRange(),h=t.highlighter.dom(t.delegate.iframes[0].contentDocument.body).getSelection();h.removeAllRanges(),c.selectNodeContents(l.node),h.addRange(c);let f=na(c,!1);function v(y){let E=window.scrollX,_=E+window.innerWidth,C=y.left+y.width,A=y.top+y.height,T=window.scrollY,L=T+window.innerHeight,j=A<T,N=y.top>L,q=C<E,ye=y.left>_;return j||N||q||ye}let m=0;for(let y of f){if(!v(y)){let E=h.focusNode,_=h.focusOffset;h.collapse(h.anchorNode,h.anchorOffset);for(let j=0;j<m;j++)h.modify("move","forward","line");h.extend(E,_);let C=h.focusNode,A=h.focusNode.length;h.collapse(h.anchorNode,h.anchorOffset);let T=A;h.anchorOffset>A?T=A:T=h.anchorOffset+1,h.modify("move","forward","character"),h.modify("move","backward","word"),h.extend(C,T-1),h.modify("extend","backward","character"),h.modify("extend","forward","sentence");let L=t.findTtsQueueItemIndex(o,h.anchorNode,h.focusNode,h.focusOffset,r);L>=0&&(a=L),h.removeAllRanges();break}m++}}s(),a<0&&(a=0),setTimeout(()=>{this.startTTSSession(o,a)},100)}speakPause(){window.speechSynthesis.speaking&&(this.api?.paused&&this.api?.paused(),this.userScrolled=!1,window.speechSynthesis.pause(),this.speaking=!1,this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0))}speakResume(){window.speechSynthesis.speaking&&(this.api?.resumed&&this.api?.resumed(),this.userScrolled=!1,window.speechSynthesis.resume(),this.speaking=!0)}static async create(t){let n=new this(t.delegate,t.tts,t.headerMenu,t.rights,t.highlighter,t,t.api);return await n.start(),n}async start(){if(this.delegate.ttsModule=this,this.headerMenu){var t=ve(this.headerMenu,"#menu-button-tts");this.rights?.enableMaterial?t&&t.parentElement.style.removeProperty("display"):t&&t.parentElement.style.setProperty("display","none")}}wheel(t){if(t instanceof KeyboardEvent)switch(t.key){case"ArrowUp":this.userScrolled=!0;break;case"ArrowDown":this.userScrolled=!0;break}else this.userScrolled=!0}stop(){W&&console.log("TTS module stop"),Le(document,"wheel",this.wheel.bind(this)),Le(this.body,"wheel",this.wheel.bind(this)),Le(document,"keydown",this.wheel.bind(this)),Le(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this)),Le(this.body,"click",this.click.bind(this))}generateTtsQueue(t,n){let r=[],o=[];function a(h){if(h.nodeType!==Node.TEXT_NODE||!h.nodeValue||!h.nodeValue.trim().length)return;let f=o[o.length-1];if(!f)return;let v=h.parentElement?rT(h.parentElement):void 0,m=h.parentElement?BF(h.parentElement):void 0,y=r[r.length-1];(!y||y.parentElement!==f||y.lang!==v||y.dir!==m)&&(y={combinedText:"",combinedTextSentences:void 0,combinedTextSentencesRangeBegin:void 0,combinedTextSentencesRangeEnd:void 0,dir:m,lang:v,parentElement:f,textNodes:[]},r.push(y)),y.textNodes.push(h)}let s=!0;function l(h){if(h.nodeType!==Node.ELEMENT_NODE)return;let f=s||h.matches("h1, h2, h3, h4, h5, h6, p, th, td, caption, li, blockquote, q, dt, dd, figcaption, div, pre");s=!1,f&&o.push(h);for(let v of h.childNodes)switch(v.nodeType){case Node.ELEMENT_NODE:let m=v;if(!m.matches("img, sup, sub, audio, video, source, button, canvas, del, dialog, embed, form, head, iframe, meter, noscript, object, s, script, select, style, textarea"))l(m);else if(m.tagName&&m.tagName.toLowerCase()==="img"&&m.src){let E=m.getAttribute("alt");if(E){let _=E.trim();if(_){let C=rT(m),A=void 0;r.push({combinedText:_,combinedTextSentences:void 0,combinedTextSentencesRangeBegin:void 0,combinedTextSentencesRangeEnd:void 0,dir:A,lang:C,parentElement:m,textNodes:[]})}}}break;case Node.TEXT_NODE:o.length!==0&&a(v);break;default:break}f&&o.pop()}l(t);function c(h){if(!h.textNodes||!h.textNodes.length){(!h.combinedText||!h.combinedText.length)&&(h.combinedText=""),h.combinedTextSentences=void 0;return}h.combinedText=IF(h.textNodes,!0).replace(/[\r\n]/g," ");let f=!1,v=h.parentElement;for(;v;){if(v.tagName){let m=v.tagName.toLowerCase();if(m==="pre"||m==="code"||m==="video"||m==="audio"){f=!0;break}}v=v.parentElement}if(n&&!f)try{let m=h.combinedText;h.combinedTextSentences=void 0;let y=(0,iT.split)(m);h.combinedTextSentences=[],h.combinedTextSentencesRangeBegin=[],h.combinedTextSentencesRangeEnd=[];for(let E of y)E.type==="Sentence"&&(h.combinedTextSentences.push(E.raw),h.combinedTextSentencesRangeBegin.push(E.range[0]),h.combinedTextSentencesRangeEnd.push(E.range[1]));(h.combinedTextSentences.length===0||h.combinedTextSentences.length===1)&&(h.combinedTextSentences=void 0)}catch(m){console.log(m),h.combinedTextSentences=void 0}else h.combinedTextSentences=void 0}for(let h of r)c(h);return r}findTtsQueueItemIndex(t,n,r,o,a){let s=0;for(let l of t){if(r&&l.textNodes){if(l.textNodes.includes(r))if(l.combinedTextSentences&&l.combinedTextSentencesRangeBegin&&l.combinedTextSentencesRangeEnd){let c=0;for(let f of l.textNodes)if(!(!f.nodeValue&&f.nodeValue!=="")){if(f===r){c+=o;break}c+=f.nodeValue.length}let h=s-1;for(let f of l.combinedTextSentencesRangeEnd)if(h++,!(f<c))return h;return s}else return s}else if(n===l.parentElement||l.parentElement!==n.ownerDocument.body&&l.parentElement!==a&&l.parentElement.contains(n)||n.contains(l.parentElement))return s;l.combinedTextSentences?s+=l.combinedTextSentences.length:s++}return-1}restart(){window.speechSynthesis.speaking&&(window.speechSynthesis.cancel(),this.restartIndex=this.ttsQueueIndex,this.ttsPlayQueueIndexDebounced(this.restartIndex,this.ttsQueue))}startTTSSession(t,n){if(!oT(t,n)){this.cancel();return}this.speaking=!0,this.ttsPlayQueueIndexDebounced(n,t)}ttsPlayQueueIndex(t,n){if(t<0){this.cancel();return}let r=oT(n,t);if(!r){this.cancel();return}let o=sT(r);if(!o){this.cancel();return}let a=new SpeechSynthesisUtterance(o);a.rate=this.tts.rate,a.pitch=this.tts.pitch,a.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var s=!0;this.tts.voice&&this.tts.voice.lang&&(s=this.tts.voice.lang.indexOf("-")!==-1,s===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),s=!0)),W&&console.log("initialVoiceHasHyphen",s),W&&console.log("voices",this.voices);var l;s===!0?(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(y=>{var E=y.lang.replace("_","-");return E===this.tts.voice.lang&&y.name===this.tts.voice.name})[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(y=>y.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(y=>y.lang===this.tts.voice.lang&&y.name===this.tts.voice.name)[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(y=>y.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",l);var c=this,h=c.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",h);var f;h===!0?f=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(y=>{var E=y.lang.replace("_","-");return E.startsWith(c.delegate.publication.Metadata.Language[0])||E.endsWith(c.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:f=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(y=>y.lang.startsWith(c.delegate.publication.Metadata.Language[0])||y.lang.endsWith(c.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",f);var v=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",v);var m;v===!0?m=this.voices.filter(y=>{var E=y.lang.replace("_","-");return E===navigator.language&&y.localService===!0})[0]:m=this.voices.filter(y=>{var E=y.lang;return E===navigator.language&&y.localService===!0})[0],m===void 0&&(m=this.voices.filter(y=>{var E=y.lang;return E.includes(navigator.language)&&y.localService===!0})[0]),W&&console.log("defaultVoice",m),l?(W&&console.log("initialVoice"),a.voice=l):f?(W&&console.log("publicationVoice"),a.voice=f):m&&(W&&console.log("defaultVoice"),a.voice=m),a.voice!==void 0&&a.voice!==null&&(a.lang=a.voice.lang,W&&console.log("utterance.voice.lang",a.voice.lang),W&&console.log("utterance.lang",a.lang)),W&&console.log("navigator.language",navigator.language),a.onboundary=y=>{this.updateTTSInfo(r,y.charIndex,y.charLength,a.text)},setTimeout(()=>{window.speechSynthesis.speak(a),c.speaking||window.speechSynthesis.pause()},0);var c=this;a.onend=function(){c.speaking&&c.ttsPlayQueueIndexDebounced(t+1,n)}}updateTTSInfo(t,n,r,o){if(!t)return;let a=o||sT(t);if(n>=0&&o){let s=o.slice(0,n+1).search(/\S+$/),l=o.slice(n).search(/\s/),c=l<0?o.slice(s):o.slice(s,l+n),h=s+c.length;this.wrapHighlightWord(t,o,n,r,c,s,h)}return a}wrapHighlightWord(t,n,r,o,a,s,l){this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0);let c=t.item,h=t.item.combinedText,f=r;if(c.combinedTextSentences&&c.combinedTextSentencesRangeBegin&&c.combinedTextSentencesRangeEnd&&t.iSentence>=0&&(f+=c.combinedTextSentencesRangeBegin[t.iSentence],h=c.combinedTextSentences[t.iSentence]),W){n!==h&&console.log("TTS utteranceText DIFF?? ",`[[${n}]]`,`[[${h}]]`);let T=n.substr(r,o);T!==a&&console.log("TTS word DIFF?? ",`[[${T}]]`,`[[${a}]]`,`${r}--${o}`,`${s}--${l-s}`)}let v=0,m,y=-1,E,_=-1,C=f+o;for(let T of c.textNodes){if(!T.nodeValue&&T.nodeValue!=="")continue;let L=T.nodeValue.length;if(v+=L,m||f<v&&(m=T,y=L-(v-f)),m&&C<=v){E=T,_=L-(v-C);break}}if(m&&E){let L=function(q){try{return Wn(q,A.delegate.iframes[0].contentDocument,ho)}catch(ye){return console.log("uniqueCssSelector:"),console.log(ye),""}},T=new Range;T.setStart(m,y),T.setEnd(E,_);var A=this;let j=kr(T,L);if(!j)return;let N=this.delegate.highlighter.createHighlight(this.delegate.iframes[0].contentWindow,{rangeInfo:j,cleanText:"",rawText:"",range:void 0},this.tts.color,!1,et.Custom,{id:"tts",title:"",position:"right"},null,{defaultClass:this.tts.color},Qe.ReadAloud,"R2_READALOUD_");this._ttsQueueItemHighlightsWord=N[0],this.delegate.view.isScrollMode()&&this.tts.autoScroll&&!this.userScrolled&&N[1].firstChild.scrollIntoView({block:"center",behavior:"smooth"})}}};function rT(i){let t=i;for(;t&&t.nodeType===Node.ELEMENT_NODE;){let n=t.getAttribute("xml:lang");if(n||(n=t.getAttributeNS("http://www.w3.org/XML/1998/namespace","lang")),n||(n=t.getAttribute("lang")),n)return n;t=t.parentNode}}function BF(i){let t=i;for(;t&&t.nodeType===Node.ELEMENT_NODE;){let n=t.getAttribute("dir");if(n)return n;t=t.parentNode}}function IF(i,t){if(i&&i.length){let n="";for(let r of i)r.nodeValue&&(n+=t?r.nodeValue:HF(r.nodeValue));return n}return""}function NF(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function HF(i){return NF(i).replace(/\n/g," ").replace(/\s\s+/g," ")}function oT(i,t){let n=-1,r=-1;for(let o of i)if(r++,o.combinedTextSentences){let a=-1;for(let s of o.combinedTextSentences)if(a++,n++,t===n)return{item:o,iArray:r,iGlobal:n,iSentence:a}}else if(n++,t===n)return{item:o,iArray:r,iGlobal:n,iSentence:-1}}function sT(i){return i.iSentence===-1?i.item.combinedText:i.item.combinedTextSentences?i.item.combinedTextSentences[i.iSentence]:""}S();var Ml=Tt(Rd());var yh=class{constructor(t,n,r,o,a){this.currentChapterPopupResult=[];this.currentPopupHighlights=[];this.delegate=t,this.publication=n,this.properties=r,this.api=o,this.highlighter=a}static async create(t){let n=new this(t.delegate,t.publication,t,t.api,t.highlighter);return await n.start(),n}async stop(){W&&console.log("Definitions module stop")}async start(){this.delegate.definitionsModule=this}async searchAndPaint(t,n){let r=this.publication.getAbsoluteHref(this.publication.readingOrder[this.delegate.currentResource()].Href),o=this.publication.getTOCItem(r);o===null&&(o=this.publication.readingOrder[this.delegate.currentResource()]);let a=[],s=this.publication.getAbsoluteHref(o.Href);await fetch(s).then(l=>l.text()).then(async l=>{t.terms.forEach((c,h)=>{console.log(c),da(c,this.delegate.iframes[0].contentDocument,o.Href,o.Title).then(f=>{let v;t.result==1?v=0:t.result==2&&(v=Math.floor(Math.random()*f.length-1)+1),console.log(v),f.forEach((m,y)=>{if(v===void 0||v===y){let E={rangeInfo:m.rangeInfo,cleanText:null,rawText:null,range:null};setTimeout(()=>{let _=this.highlighter.createPopupHighlight(E,t);m.highlight=_,a.push(Ml.omit(_,"definition")),this.currentChapterPopupResult.push(m),this.currentPopupHighlights.push(_)},500)}}),h==t.terms.length-1&&setTimeout(()=>{n(a)},500)})})})}async definitions(){for(let t of this.properties.definitions)await this.define(t)}async define(t){await this.searchAndPaint(t,async n=>{this.api?.success&&(this.api?.success(Ml.omit(t,"callbacks"),n),this.api?.visible&&n.forEach(r=>{console.log(this.delegate.iframes[0].contentDocument);let a=this.delegate.iframes[0].contentDocument.querySelector(`#${r.id}`).querySelectorAll(`.${vn}`);new IntersectionObserver((l,c)=>{l.forEach(h=>{h.intersectionRatio==1&&this.api?.visible(Ml.omit(t,"callbacks"),Ml.omit(r,"definition"))})},{threshold:1}).observe(a[0])}))})}drawDefinitions(){setTimeout(async()=>{await this.definitions()},100)}async handleResize(){await this.highlighter.destroyHighlights(Qe.Popup),this.drawDefinitions()}};var ss=class{constructor(t,n,r,o,a,s,l,c,h,f,v,m,y,E){this.settings=t;this.ttsSettings=n;this.navigator=r;this.highlighter=o;this.bookmarkModule=a;this.annotationModule=s;this.ttsModule=l;this.searchModule=c;this.definitionsModule=h;this.contentProtectionModule=f;this.timelineModule=v;this.mediaOverlaySettings=m;this.mediaOverlayModule=y;this.pageBreakModule=E;this.startReadAloud=()=>this.navigator.startReadAloud();this.stopReadAloud=()=>this.navigator.stopReadAloud();this.pauseReadAloud=()=>this.navigator.pauseReadAloud();this.resumeReadAloud=()=>this.navigator.resumeReadAloud();this.startReadAlong=()=>this.navigator.startReadAlong();this.stopReadAlong=()=>this.navigator.stopReadAlong();this.pauseReadAlong=()=>this.navigator.pauseReadAlong();this.resumeReadAlong=()=>this.navigator.resumeReadAlong();this.saveBookmark=async()=>{if(this.navigator.rights?.enableBookmarks)return await this.bookmarkModule.saveBookmark()};this.saveBookmarkPlus=async()=>{if(this.navigator.rights?.enableBookmarks)return this.bookmarkModule.saveBookmarkPlus()};this.deleteBookmark=async t=>{if(this.navigator.rights?.enableBookmarks)return await this.bookmarkModule.deleteBookmark(t)};this.deleteAnnotation=async t=>await this.annotationModule?.deleteAnnotation(t);this.addAnnotation=async t=>await this.annotationModule?.addAnnotation(t);this.hideAnnotationLayer=()=>this.annotationModule?.hideAnnotationLayer();this.showAnnotationLayer=()=>this.annotationModule?.showAnnotationLayer();this.activateMarker=(t,n)=>this.navigator?.activateMarker(t,n);this.deactivateMarker=()=>this.navigator?.deactivateMarker();this.tableOfContents=async()=>await Cl(this.navigator.tableOfContents());this.readingOrder=async()=>await Cl(this.navigator.readingOrder());this.bookmarks=async()=>this.navigator.rights?.enableBookmarks?await this.bookmarkModule.getBookmarks():[];this.annotations=async()=>await this.annotationModule?.getAnnotations()??[];this.search=async(t,n)=>this.navigator.rights?.enableSearch?await this.searchModule?.search(t,n):[];this.goToSearchIndex=async(t,n,r)=>{this.navigator.rights?.enableSearch&&await this.searchModule?.goToSearchIndex(t,n,r)};this.goToSearchID=async(t,n,r)=>{this.navigator.rights?.enableSearch&&await this.searchModule?.goToSearchID(t,n,r)};this.clearSearch=async()=>{this.navigator.rights?.enableSearch&&await this.searchModule?.clearSearch()};this.currentResource=()=>this.navigator.currentResource();this.mostRecentNavigatedTocItem=()=>this.navigator.mostRecentNavigatedTocItem();this.totalResources=()=>this.navigator.totalResources();this.resetUserSettings=async()=>await this.settings.resetUserSettings();this.applyUserSettings=async t=>await this.settings.applyUserSettings(t);this.currentSettings=()=>this.settings.currentSettings;this.scroll=async t=>await this.settings.scroll(t);this.increase=async t=>{this.isTTSIncrementable(t)?this.navigator.rights?.enableTTS&&await this.ttsSettings.increase(t):this.isMOIncrementable(t)?this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.increase(t):await this.settings.increase(t)};this.decrease=async t=>{this.isTTSIncrementable(t)?this.navigator.rights?.enableTTS&&await this.ttsSettings.decrease(t):this.isMOIncrementable(t)?this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.decrease(t):await this.settings.decrease(t)};this.resetTTSSettings=()=>{this.navigator.rights?.enableTTS&&this.ttsSettings.resetTTSSettings()};this.applyTTSSettings=t=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyTTSSettings(t)};this.applyTTSSetting=(t,n)=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyTTSSetting(t,n)};this.applyPreferredVoice=t=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyPreferredVoice(t)};this.resetMediaOverlaySettings=async()=>{this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.resetMediaOverlaySettings()};this.applyMediaOverlaySettings=async t=>{this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.applyMediaOverlaySettings(t)};this.goTo=async t=>{this.navigator.goTo(t)};this.goToPosition=async t=>this.navigator.goToPosition(t);this.nextResource=async()=>{this.navigator.nextResource()};this.previousResource=async()=>{this.navigator.previousResource()};this.nextPage=async()=>{this.navigator.nextPage()};this.previousPage=async()=>{this.navigator.previousPage()};this.atStart=async()=>this.navigator.atStart();this.atEnd=async()=>this.navigator.atEnd();this.snapToElement=async t=>{this.navigator.snapToElement(t)};this.applyAttributes=t=>{this.navigator.applyAttributes(t)};this.stop=()=>{document.body.onscroll=()=>{},this.navigator.stop(),this.settings.stop(),this.ttsSettings?.stop(),this.ttsSettings.enableSplitter?this.ttsModule?.stop():this.ttsModule?.stop(),this.bookmarkModule?.stop(),this.annotationModule?.stop(),this.searchModule?.stop(),this.definitionsModule?.stop(),this.contentProtectionModule?.stop(),this.timelineModule?.stop(),this.mediaOverlaySettings?.stop(),this.mediaOverlayModule?.stop(),this.pageBreakModule?.stop()}}static async build(t){t.rights?.enableContentProtection&&t.protection&&await El.setupPreloadProtection(t.protection);let n=Bt(document,"#D2Reader-Container"),r=ve(document,"#headerMenu"),o=ve(document,"#footerMenu"),a=t.url,s=new _l({prefix:a.href,useLocalStorage:t.useLocalStorage??!1}),l=new _l({prefix:"r2d2bc-reader",useLocalStorage:t.useLocalStorage??!1}),c=new rs({store:s}),h=t.upLinkUrl??void 0,f=await Yr.fromUrl(a),v=DF(t,f);f.sample=v.sample,v.rights?.autoGeneratePositions??!0?await f.autoGeneratePositions():(v.services?.positions&&await f.fetchPositionsFromService(v.services?.positions.href),v.services?.weight&&await f.fetchWeightsFromService(v.services?.weight.href));let m=await Jo.create({store:l,initialUserSettings:v.userSettings,headerMenu:r,material:v.material,api:v.api,injectables:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?v.injectablesFixed:v.injectables,layout:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?"fixed":"reflowable"}),y=await fn.create({mainElement:n,headerMenu:r,footerMenu:o,publication:f,settings:m,annotator:c,upLink:h,initialLastReadingPosition:v.lastReadingPosition,material:v.material,api:v.api,rights:v.rights,tts:v.tts,sample:v.sample,injectables:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?v.injectablesFixed:v.injectables,attributes:v.attributes,services:v.services}),_=!0?await Ue.create(Ze({delegate:y},v.highlighter)):void 0,C=v.rights?.enableBookmarks?await oa.create(Ze({annotator:c,headerMenu:r,rights:v.rights,publication:f,delegate:y,initialAnnotations:v.initialAnnotations},v.bookmarks)):void 0,A=v.rights?.enableAnnotations?await ra.create(Ze({annotator:c,headerMenu:r,rights:v.rights,publication:f,delegate:y,initialAnnotations:v.initialAnnotations,highlighter:_},v.annotations)):void 0,T=v.rights?.enableTTS,L=T?await k0.create(Ze({store:l,initialTTSSettings:v.tts,headerMenu:r},v.tts)):void 0,j=T&&v.tts.enableSplitter?await oh.create(Ze({delegate:y,tts:L,headerMenu:r,rights:v.rights,highlighter:_},v.tts)):T&&!v.tts.enableSplitter?await vh.create(Ze({delegate:y,tts:L,headerMenu:r,rights:v.rights,highlighter:_},v.tts)):void 0,N=v.rights?.enableSearch?await Qd.create(Ze({headerMenu:r,delegate:y,publication:f,highlighter:_},v.search)):void 0,q=v.rights?.enableDefinitions?await yh.create(Ze({delegate:y,publication:f,highlighter:_},v.define)):void 0,ye=v.rights?.enableTimeline?await Bd.create({publication:f,delegate:y}):void 0,Z=v.rights?.enableContentProtection?await El.create(Ze({delegate:y},v.protection)):void 0,te=v.rights?.enableMediaOverlays??!1,le=te?await c0.create(Ze({store:l,initialMediaOverlaySettings:v.mediaOverlays,headerMenu:r},v.mediaOverlays)):void 0,X=te?await Pd.create(Ze({publication:f,settings:le,delegate:y},v.mediaOverlays)):void 0,se=f.isReflowable?await rh.create({publication:f,headerMenu:r,delegate:y}):void 0;return new ss(m,L,y,_,C,A,j,N,q,Z,ye,le,X,se)}get publicationLanguage(){return this.navigator.publication.Metadata.Language}isTTSIncrementable(t){return t==="pitch"||t==="rate"||t==="volume"}isMOIncrementable(t){return t==="mo_volume"}get currentLocator(){return this.navigator.currentLocator()}get positions(){return this.navigator.positions()}};function DF(i,t){return t.isFixedLayout&&(i.rights||(i.rights={}),i.rights.enableAnnotations=!1,i.rights.enableSearch=!1,i.rights.enableTTS=!1),i}var jF=ss,FF=ss.build;return $F;})();
|
|
84
|
+
`;var yo=Tt(Ld());var OO=Tt(CO()),nh=Tt(Go());S();var ha=class{constructor(){this.onBackwardSwipe=()=>{};this.onForwardSwipe=()=>{};this.setupEvents=t=>{var n=null,r=null,o=this;t.addEventListener("touchstart",function(a){a.changedTouches.length===1&&(n=a)},!1),t.addEventListener("touchend",function(a){if(a.changedTouches.length!==1||!n)return;let s=n.changedTouches[0],l=a.changedTouches[0];if(!s)return;let c=window.devicePixelRatio,h=(s.clientX-l.clientX)/c,f=(s.clientY-l.clientY)/c;if(Math.abs(h)<ha.TAP_TOLERANCE&&Math.abs(f)<ha.TAP_TOLERANCE){if(r){n=null,r=null;return}if(a.timeStamp-n.timeStamp>ha.LONG_PRESS_MS){n=null,r=null;return}n=null,r=a;return}if(r=null,a.timeStamp-n.timeStamp>ha.SLOW_SWIPE_MS){n=null;return}let v=(s.clientY-l.clientY)/(s.clientX-l.clientX);if(Math.abs(v)>.5){n=null;return}h<0?o.onBackwardSwipe(a):o.onForwardSwipe(a),n=null},!1)}}},is=ha;is.TAP_TOLERANCE=10,is.LONG_PRESS_MS=500,is.SLOW_SWIPE_MS=500;S();var eh=class{constructor(){this.onBackwardSwipe=()=>{};this.onForwardSwipe=()=>{};this.setupEvents=t=>{this.focusin(t),this.keydown(t)};this.focusin=t=>{let n=this;t.addEventListener("focusin",function(r){n.delegate.view.snap(r.target)},!0)};this.keydown=t=>{let n=this;t.addEventListener("keydown",function(r){let o=r.target;if(/input|select|option|textarea/i.test(o.tagName)||!(o.ownerDocument||o).defaultView.getSelection().isCollapsed)return;switch(r.key){case"ArrowRight":n.onForwardSwipe(r);break;case"ArrowLeft":n.onBackwardSwipe(r);break}},!1)}}};S();var xO=Tt(Go()),th=class{constructor(t){this.enforceSampleRead=(0,xO.debounce)(t=>{let r=Math.round(t.locations.totalProgression*100)<=this.delegate.sample?.limit;this.delegate.view.layout==="fixed"&&!r&&t.locations.position<=this.delegate.sample?.minimum&&(r=!0);let o={37:1,38:0,39:1,40:1,32:1,33:1,34:1,35:1,36:1};function a(y){y.preventDefault()}function s(y){o[y.keyCode]&&!r&&a(y)}let l=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){l=!0}}))}catch(y){}let c=l?{passive:!1}:!1;function h(y){y=y||window.event;let E=Math.max(-1,Math.min(1,y.wheelDelta||-y.detail));return E==1,E==-1&&!r&&y.preventDefault(),!1}let f;function v(y){y=y||window.event;let E=y.target||y.srcElement,_=y.touches[0].clientY;if(!(_>f)){if(_<f&&!r)return E.className.match(/\baltNav\b/)||(y.returnValue=!1,y.cancelable&&(y.cancelBubble=!0),y.preventDefault&&y.cancelable&&(y.preventDefault(),y.stopPropagation())),!1}return f=_,!1}function m(y){return y=y||window.event,f=y.touches[0].clientY,!1}window.addEventListener("mousewheel",h,c),window.addEventListener("DOMMouseScroll",h,c),window.addEventListener("keydown",s,c),window.addEventListener("touchmove",v,c),window.addEventListener("touchstart",m,c),r?(this.delegate.iframes[0].focus(),this.delegate.errorMessage&&(this.delegate.errorMessage.style.display="none",this.delegate.errorMessage.style.removeProperty("background-color"))):(this.delegate.iframes[0].blur(),this.delegate.errorMessage&&(this.delegate.errorMessage.style.display="block",this.delegate.errorMessage.style.backgroundColor="rgb(255, 255, 255)",this.delegate.errorMessage.innerHTML=this.delegate.sample?.popup))},300);this.delegate=t}};var fn=class{constructor(t,n=null,r=null,o=null,a,s,l,c,h,f,v,m,y){this.iframes=[];this.sideNavExpanded=!1;this.material=!1;this.currentChapterLink={};this.currentSpreadLinks={};this.upLink=null;this.didInitKeyboardEventHandler=!1;this.onResize=()=>{clearTimeout(this.timeout),this.timeout=setTimeout(this.handleResize.bind(this),200)};this.reload=async()=>{let t=null;if(this.annotator&&(t=await this.annotator.getLastReadingPosition()),t){let n=this.publication.getAbsoluteHref(t.href);W&&console.log(t.href),W&&console.log(n),t.href=n,await this.navigate(t)}};this.savePosition=(0,nh.debounce)(async()=>{this.annotator&&await this.saveCurrentReadingPosition()},200);this.checkResourcePosition=(0,nh.debounce)(()=>{this.view.atStart()&&this.view.atEnd()?this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen():this.view.atEnd()?this.api?.resourceAtEnd&&this.api?.resourceAtEnd():this.view.atStart()&&this.api?.resourceAtStart&&this.api?.resourceAtStart()},200);this.settings=t,this.annotator=n,this.view=t.view,this.view.attributes=v,this.view.delegate=this,this.eventHandler=new xd(this),this.touchEventHandler=new is,this.keyboardEventHandler=new eh,this.upLinkConfig=r,this.initialLastReadingPosition=o,this.publication=a,this.material=s,this.api=l,this.rights=c,this.tts=h,this.injectables=f,this.attributes=v||{margin:0},this.services=m,this.sample=y,this.sampleReadEventHandler=new th(this)}static async create(t){let n=new this(t.settings,t.annotator||null,t.upLink||null,t.initialLastReadingPosition||null,t.publication,t.material,t.api,t.rights,t.tts,t.injectables,t.attributes||{margin:0},t.services,t.sample);return await n.start(t.mainElement,t.headerMenu,t.footerMenu),new Promise(r=>r(n))}stop(){W&&console.log("Iframe navigator stop"),Le(this.previousChapterAnchorElement,"click",this.handlePreviousChapterClick.bind(this)),Le(this.nextChapterAnchorElement,"click",this.handleNextChapterClick.bind(this)),Le(this.previousChapterTopAnchorElement,"click",this.handlePreviousPageClick.bind(this)),Le(this.nextChapterBottomAnchorElement,"click",this.handleNextPageClick.bind(this)),Le(this.previousPageAnchorElement,"click",this.handlePreviousPageClick.bind(this)),Le(this.nextPageAnchorElement,"click",this.handleNextPageClick.bind(this)),Le(this.tryAgainButton,"click",this.tryAgain.bind(this)),Le(this.goBackButton,"click",fn.goBack.bind(this)),Le(this.bookmarksControl,"keydown",this.hideBookmarksOnEscape.bind(this)),Le(this.espandMenuIcon,"click",this.handleEditClick.bind(this)),Le(window,"resize",this.onResize),this.iframes.forEach(t=>{Le(t,"resize",this.onResize)}),this.rights?.enableMaterial&&(this.mDropdowns&&this.mDropdowns.forEach(t=>{t.destroy()}),this.mCollapsibles&&this.mCollapsibles.forEach(t=>{t.destroy()}),this.mSidenav&&this.mSidenav.destroy(),this.mTabs&&this.mTabs.forEach(t=>{t.destroy()}))}async start(t,n,r){this.headerMenu=n,this.mainElement=t;try{let E=Bt(t,"main#iframe-wrapper");E.style.overflow="auto";let _=ve(t,"main#iframe-wrapper iframe"),C=ve(t,"#second");if(_&&this.iframes.push(_),C&&this.iframes.push(C),window.matchMedia("screen and (max-width: 600px)").matches&&(this.settings.columnCount=1),this.iframes.length===0){E.style.overflow="auto";let A=document.createElement("iframe");if(A.setAttribute("SCROLLING","no"),A.setAttribute("allowtransparency","true"),this.iframes.push(A),this.publication.isFixedLayout?(this.spreads=document.createElement("div"),this.firstSpread=document.createElement("div"),this.spreads.style.display="flex",this.spreads.style.alignItems="center",this.spreads.style.justifyContent="center",this.spreads.appendChild(this.firstSpread),this.firstSpread.appendChild(this.iframes[0]),E.appendChild(this.spreads)):(A.setAttribute("height","100%"),A.setAttribute("width","100%"),E.appendChild(this.iframes[0])),this.publication.isFixedLayout)if(this.settings.columnCount!==1&&!window.matchMedia("screen and (max-width: 600px)").matches){let T=document.createElement("div");this.spreads.appendChild(T);let L=document.createElement("iframe");L.setAttribute("SCROLLING","no"),L.setAttribute("allowtransparency","true"),L.style.opacity="1",L.style.border="none",L.style.overflow="hidden",this.iframes.push(L),T.appendChild(this.iframes[1]),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 100% 120%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc",T.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, 0% 120%)",T.style.boxShadow="0 0 8px 2px #ccc"}else this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc";else this.iframes[0].style.paddingTop=(this.attributes?.iframePaddingTop??0)+"px"}if(this.publication.isFixedLayout){let A=E.clientHeight;var o=this.iframes[0].parentElement.parentElement;o.style.height=A+40+"px"}else this.iframes.length===2&&this.iframes.pop();this.loadingMessage=ve(t,"#reader-loading"),this.loadingMessage&&(this.loadingMessage.innerHTML=_O,this.loadingMessage.style.display="none"),this.errorMessage=ve(t,"#reader-error"),this.errorMessage&&(this.errorMessage.innerHTML=SO,this.errorMessage.style.display="none"),this.tryAgainButton=ve(t,"button[class=try-again]"),this.goBackButton=ve(t,"button[class=go-back]"),this.infoTop=ve(t,"div[class='info top']"),this.infoBottom=ve(t,"div[class='info bottom']"),this.headerMenu&&(this.bookTitle=ve(this.headerMenu,"#book-title")),this.infoBottom&&(this.chapterTitle=ve(this.infoBottom,"span[class=chapter-title]")),this.infoBottom&&(this.chapterPosition=ve(this.infoBottom,"span[class=chapter-position]")),this.infoBottom&&(this.remainingPositions=ve(this.infoBottom,"span[class=remaining-positions]")),this.headerMenu&&(this.espandMenuIcon=ve(this.headerMenu,"#expand-menu")),this.headerMenu&&(this.links=ve(this.headerMenu,"ul.links.top")),this.headerMenu&&(this.linksTopLeft=ve(this.headerMenu,"#nav-mobile-left")),this.headerMenu&&(this.tocView=ve(this.headerMenu,"#container-view-toc")),this.headerMenu&&(this.landmarksView=ve(n,"#container-view-landmarks")),this.headerMenu&&(this.landmarksSection=ve(n,"#sidenav-section-landmarks")),this.headerMenu&&(this.pageListView=ve(n,"#container-view-pagelist")),r&&(this.linksBottom=ve(r,"ul.links.bottom")),r&&(this.linksMiddle=ve(r,"ul.links.middle")),this.headerMenu&&(this.nextChapterAnchorElement=ve(this.headerMenu,"a[rel=next]")),this.headerMenu&&(this.nextChapterBottomAnchorElement=ve(t,"#next-chapter")),r&&(this.nextPageAnchorElement=ve(r,"a[rel=next]")),this.headerMenu&&(this.previousChapterAnchorElement=ve(this.headerMenu,"a[rel=prev]")),this.headerMenu&&(this.previousChapterTopAnchorElement=ve(t,"#previous-chapter")),r&&(this.previousPageAnchorElement=ve(r,"a[rel=prev]")),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.newPosition=null,this.newElementId=null,this.isBeingStyled=!0,this.isLoading=!0,this.setupEvents(),this.settings.setIframe(this.iframes[0]),this.settings.onSettingsChange(this.handleResize.bind(this)),this.settings.onColumnSettingsChange(this.handleNumberOfIframes.bind(this)),this.settings.onViewChange(this.updateBookView.bind(this)),this.initialLastReadingPosition&&this.annotator.initLastReadingPosition(this.initialLastReadingPosition);var a=this;if(this.headerMenu)var s=ve(this.headerMenu,"#menu-button-search"),l=ve(this.headerMenu,"#menu-button-tts"),c=ve(this.headerMenu,"#menu-button-bookmark"),h=ve(this.headerMenu,"#menu-button-play"),f=ve(this.headerMenu,"#menu-button-pause"),v=ve(this.headerMenu,"#menu-button-mediaoverlay");if(this.rights?.enableMaterial){let A=document.querySelectorAll(".sidenav");A&&(a.mSidenav=yo.Sidenav.init(A,{edge:this.attributes?.sideNavPosition??"left"}));let T=document.querySelectorAll(".collapsible");T&&(a.mCollapsibles=yo.Collapsible.init(T,{accordion:!0}));let L=document.querySelectorAll(".dropdown-trigger");L&&(a.mDropdowns=yo.Dropdown.init(L,{alignment:"right",constrainWidth:!1,coverTrigger:!1,closeOnClick:!1,autoTrigger:!1,onOpenEnd:function(){a.mTabs.forEach(N=>{N.updateTabIndicator()})}}));let j=document.querySelectorAll(".tabs");if(j&&(a.mTabs=yo.Tabs.init(j)),this.headerMenu){if(!this.rights?.enableBookmarks){c&&c.parentElement.style.setProperty("display","none");var m=ve(this.headerMenu,"#sidenav-section-bookmarks");m&&m.style.setProperty("display","none")}if(!this.rights?.enableAnnotations){var y=ve(this.headerMenu,"#sidenav-section-highlights");y&&y.style.setProperty("display","none")}this.rights?.enableTTS||l&&l.parentElement.style.setProperty("display","none"),this.rights?.enableSearch||s&&s.parentElement.style.setProperty("display","none"),s&&this.view.delegate.publication.isFixedLayout&&s.parentElement.style.setProperty("display","none")}}else this.headerMenu&&(s&&s.parentElement.style.setProperty("display","none"),l&&l.parentElement.style.setProperty("display","none"),c&&c.parentElement.style.setProperty("display","none"));return this.hasMediaOverlays?(h&&h.parentElement.style.setProperty("display","block"),f&&f.parentElement.style.setProperty("display","block"),v&&v.parentElement.style.setProperty("display","block")):(h&&h.parentElement.style.setProperty("display","none"),f&&f.parentElement.style.setProperty("display","none"),v&&v.parentElement.style.setProperty("display","none")),await this.loadManifest()}catch(E){return console.error(E),this.abortOnError(E),Promise.reject(E)}}setupEvents(){for(let t of this.iframes)ue(t,"load",this.handleIFrameLoad.bind(this));ue(this.previousChapterAnchorElement,"click",this.handlePreviousChapterClick.bind(this)),ue(this.nextChapterAnchorElement,"click",this.handleNextChapterClick.bind(this)),ue(this.previousChapterTopAnchorElement,"click",this.handlePreviousPageClick.bind(this)),ue(this.nextChapterBottomAnchorElement,"click",this.handleNextPageClick.bind(this)),ue(this.previousPageAnchorElement,"click",this.handlePreviousPageClick.bind(this)),ue(this.nextPageAnchorElement,"click",this.handleNextPageClick.bind(this)),ue(this.tryAgainButton,"click",this.tryAgain.bind(this)),ue(this.goBackButton,"click",fn.goBack.bind(this)),ue(this.bookmarksControl,"keydown",this.hideBookmarksOnEscape.bind(this)),ue(this.espandMenuIcon,"click",this.handleEditClick.bind(this)),ue(window,"resize",this.onResize);for(let t of this.iframes)ue(t,"resize",this.onResize)}setupModalFocusTrap(t,n,r){let o=9;n.addEventListener("keydown",a=>{if(fn.isDisplayed(t)){let s=a.keyCode===o,l=!!a.shiftKey;s&&l&&(r.focus(),a.preventDefault(),a.stopPropagation())}}),r.addEventListener("keydown",a=>{if(fn.isDisplayed(t)){let s=a.keyCode===o,l=!!a.shiftKey;s&&!l&&(n.focus(),a.preventDefault(),a.stopPropagation())}})}updateBookView(){this.view.layout==="fixed"?(this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="none"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):(this.settings.isPaginated().then(t=>{if(t)this.view.height=to()-40-this.attributes.margin,this.infoBottom&&this.infoBottom.style.removeProperty("display"),document.body.onscroll=()=>{},this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="unset"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="unset"),this.chapterTitle&&(this.chapterTitle.style.display="inline"),this.chapterPosition&&(this.chapterPosition.style.display="inline"),this.remainingPositions&&(this.remainingPositions.style.display="inline"),this.eventHandler&&(this.eventHandler.onInternalLink=this.handleInternalLink.bind(this),this.eventHandler.onClickThrough=this.handleClickThrough.bind(this)),this.touchEventHandler&&(this.touchEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.touchEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this)),this.keyboardEventHandler&&(this.keyboardEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.keyboardEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this));else{this.infoBottom&&(this.infoBottom.style.display="none"),this.nextPageAnchorElement&&(this.nextPageAnchorElement.style.display="none"),this.previousPageAnchorElement&&(this.previousPageAnchorElement.style.display="none"),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"));let n=(0,nh.debounce)(()=>{this.isScrolling=!1},200),r=Bt(document,"#iframe-wrapper");r.onscroll=async()=>{this.isScrolling=!0,await this.savePosition(),this.view.atEnd(),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")):(this.settings.isPaginated().then(o=>{o||(this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")))}),this.checkResourcePosition()),n()},this.chapterTitle&&(this.chapterTitle.style.display="none"),this.chapterPosition&&(this.chapterPosition.style.display="none"),this.remainingPositions&&(this.remainingPositions.style.display="none"),this.eventHandler&&(this.eventHandler.onInternalLink=this.handleInternalLink.bind(this),this.eventHandler.onClickThrough=this.handleClickThrough.bind(this)),this.touchEventHandler&&(this.touchEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.touchEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this)),this.keyboardEventHandler&&(this.keyboardEventHandler.onBackwardSwipe=this.handlePreviousPageClick.bind(this),this.keyboardEventHandler.onForwardSwipe=this.handleNextPageClick.bind(this))}}),setTimeout(async()=>{this.pageBreakModule!==void 0&&(await this.highlighter.destroyHighlights(Qe.PageBreak),await this.pageBreakModule.drawPageBreaks()),this.annotationModule!==void 0&&await this.annotationModule.drawHighlights(),this.bookmarkModule!==void 0&&await this.bookmarkModule.drawBookmarks(),this.rights?.enableSearch&&this.searchModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Search),this.searchModule.drawSearch()),this.rights?.enableDefinitions&&this.definitionsModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Popup),this.definitionsModule.drawDefinitions())},200))}async loadManifest(){try{let n=(h,f,v,m=!1)=>{var y,E;v&&(y=v,h instanceof HTMLDivElement&&(E=h));var _=document.createElement("ul");m&&(_=document.createElement("ol")),_.className="sidenav-toc";let C=null;for(let A of f){let T=document.createElement("li"),L=document.createElement("a"),j=document.createElement("span");L.className="chapter-link",L.tabIndex=-1;let N="";A.Href?(N=this.publication.getAbsoluteHref(A.Href),L.href=N,L.innerHTML=A.Title||"",T.appendChild(L)):(j.innerHTML=A.Title||"",j.className="chapter-title",T.appendChild(j)),A.Children&&A.Children.length>0&&n(T,A.Children,null,!0),_.appendChild(T),C=L}C&&y&&this.setupModalFocusTrap(E,y,C),ue(_,"click",A=>{if(A.preventDefault(),A.stopPropagation(),A.target&&A.target.tagName.toLowerCase()==="a"){let T=A.target;if(T.className.indexOf("active")!==-1)this.hideView(E,y);else{y?.focus();let L={progression:0};if(T.href.indexOf("#")!==-1){let N=T.href.slice(T.href.indexOf("#")+1);N!==null&&(L={fragment:N})}let j={href:T.href,locations:L,type:T.type,title:T.title};this.hideView(E,y),this.navigate(j)}}}),h.appendChild(_)},r=this.publication.tableOfContents,o=this.publication.landmarks,a=this.publication.pageList;if(this.tocView&&(r.length?n(this.tocView,r):this.tocView.parentElement.parentElement.removeChild(this.tocView.parentElement)),this.pageListView&&(a?.length?n(this.pageListView,a):this.pageListView.parentElement.parentElement.removeChild(this.pageListView.parentElement)),this.landmarksView&&(o?.length?n(this.landmarksView,o):this.landmarksSection.parentElement.removeChild(this.landmarksSection)),(this.links||this.linksTopLeft)&&this.upLinkConfig&&this.upLinkConfig.url){let h=this.upLinkConfig.url,f=this.upLinkConfig.label||"",v=this.upLinkConfig.ariaLabel||f;var t=EO(h.href,f,v);let m=document.createElement("li");m.classList.add("uplink-wrapper"),m.innerHTML=t,this.links?(this.links.insertBefore(m,this.links.firstChild),this.upLink=Bt(this.links,"a[rel=up]")):(this.linksTopLeft.insertBefore(m,this.linksTopLeft.firstChild),this.upLink=Bt(this.linksTopLeft,"a[rel=up]"))}let s=null;this.annotator&&(s=await this.annotator.getLastReadingPosition());let l=this.publication.getStartLink(),c=null;if(l&&l.Href&&(c=this.publication.getAbsoluteHref(l.Href)),s){let h=this.publication.getAbsoluteHref(s.href);W&&console.log(s.href),W&&console.log(h),s.href=h,await this.navigate(s)}else if(c){let h={href:c,locations:{progression:0},created:new Date,title:l.Title};await this.navigate(h)}return new Promise(h=>h())}catch(n){return console.error(n),this.abortOnError(n),new Promise((r,o)=>o(n)).catch(()=>{})}}async handleIFrameLoad(){this.errorMessage&&(this.errorMessage.style.display="none"),this.showLoadingMessageAfterDelay();try{let t=0;this.newPosition&&(t=this.newPosition.locations.progression),await this.handleResize(),this.updateBookView(),await this.settings.applyProperties();let n=this.currentChapterLink.href,r=this.publication.getPreviousSpineItem(n);r&&r.Href&&(this.previousChapterLink={href:r.Href,title:r.Title,type:r.TypeLink}),this.previousChapterAnchorElement&&(this.previousChapterLink?(this.previousChapterAnchorElement.href=this.publication.getAbsoluteHref(this.previousChapterLink.href),this.previousChapterAnchorElement.className=this.previousChapterAnchorElement.className.replace(" disabled","")):(this.previousChapterAnchorElement.removeAttribute("href"),this.previousChapterAnchorElement.className+=" disabled"));let o=this.publication.getNextSpineItem(n);o?this.nextChapterLink={href:o.Href,title:o.Title,type:o.TypeLink}:this.nextChapterLink=void 0,this.nextChapterAnchorElement&&(this.nextChapterLink?(this.nextChapterAnchorElement.href=this.publication.getAbsoluteHref(this.nextChapterLink.href),this.nextChapterAnchorElement.className=this.nextChapterAnchorElement.className.replace(" disabled","")):(this.nextChapterAnchorElement.removeAttribute("href"),this.nextChapterAnchorElement.className+=" disabled")),this.currentTocUrl!==null?this.setActiveTOCItem(this.currentTocUrl):this.setActiveTOCItem(n),this.publication.Metadata.Title&&this.bookTitle&&(this.bookTitle.innerHTML=this.publication.Metadata.Title.toString());let a=this.publication.getSpineItem(n);a!==null&&(this.currentChapterLink.title=a.Title,this.currentChapterLink.type=a.TypeLink);let s=this.publication.getTOCItem(n);this.currentTocUrl!==null&&(s=this.publication.getTOCItem(this.currentTocUrl)),!this.currentChapterLink.title&&s!==null&&s.Title&&(this.currentChapterLink.title=s.Title),!this.currentChapterLink.type&&s!==null&&s.TypeLink&&(this.currentChapterLink.title=s.Title),this.currentChapterLink.title?this.chapterTitle&&(this.chapterTitle.innerHTML="("+this.currentChapterLink.title+")"):this.chapterTitle&&(this.chapterTitle.innerHTML="(Current Chapter)"),await this.injectInjectablesIntoIframeHead(),this.highlighter!==void 0&&await this.highlighter.initialize();let l=this.iframes[0].contentDocument.body;this.rights?.enableTTS&&this.tts?.enableSplitter&&(0,OO.default)({target:l,by:"lines"});let c=l.querySelector("details");if(c){let h=this;c.addEventListener("toggle",async f=>{await h.view.setIframeHeight(this.iframes[0])})}if(this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&await this.contentProtectionModule.initialize(),this.eventHandler){for(let h of this.iframes)this.eventHandler.setupEvents(h.contentDocument),this.touchEventHandler.setupEvents(h.contentDocument),this.keyboardEventHandler.setupEvents(h.contentDocument);this.touchEventHandler.setupEvents(this.errorMessage),this.didInitKeyboardEventHandler||(this.keyboardEventHandler.delegate=this,this.keyboardEventHandler.keydown(document),this.didInitKeyboardEventHandler=!0)}if(this.view.layout!=="fixed"&&this.view?.isScrollMode())for(let h of this.iframes)this.view.setIframeHeight(h);if(this.annotationModule!==void 0&&await this.annotationModule.initialize(),this.bookmarkModule!==void 0&&await this.bookmarkModule.initialize(),this.rights?.enableTTS)for(let h of this.iframes){let f=h.contentDocument.body;this.ttsModule!==void 0&&(this.tts.enableSplitter?await this.ttsModule.initialize(f):await this.ttsModule.initialize(f))}return this.timelineModule!==void 0&&await this.timelineModule.initialize(),this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initialize(),setTimeout(async()=>{if(this.newElementId){let h=this.iframes[0].contentDocument.getElementById(this.newElementId);this.view.goToElement(h),this.newElementId=null}else this.newPosition&&this.newPosition.highlight?this.view.goToCssSelector(this.newPosition.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector):t>=0&&this.view.goToProgression(t);this.newPosition=null,this.hideLoadingMessage(),this.showIframeContents(),this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initializeResource(this.currentLink()),this.view?.setSize(),await this.updatePositionInfo(),await this.view.setSize()},200),this.definitionsModule!==void 0&&await this.definitionsModule.definitions(),new Promise(h=>h())}catch(t){return console.error(t),this.abortOnError(t),Promise.reject(t)}}async injectInjectablesIntoIframeHead(){let t=[],n=r=>{let o=new Promise((a,s)=>{r.onload=()=>{a(!0)},r.onerror=l=>{let c=typeof l=="string"?l:`Injectable failed to load at: ${"href"in r?r.href:r.src}`;s(new Error(c))}});t.push(o)};for(let r of this.iframes){let o=r.contentDocument.head;o&&(o.insertBefore(fn.createBase(this.currentChapterLink.href),o.firstChild),this.injectables.forEach(a=>{if(a.type==="style")if(a.fontFamily){if(this.settings.initAddedFont(),!a.systemFont){let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}}else if(a.r2before){let s=fn.createCssLink(a.url);o.insertBefore(s,o.firstChild),n(s)}else if(a.r2default){let s=fn.createCssLink(a.url);o.insertBefore(s,o.childNodes[1]),n(s)}else if(a.r2after){a.appearance&&this.settings.initAddedAppearance();let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}else{let s=fn.createCssLink(a.url);o.appendChild(s),n(s)}else if(a.type==="script"){let s=fn.createJavascriptLink(a.url,a.async);o.appendChild(s),n(s)}}))}t.length!==0&&await Promise.all(t)}abortOnError(t){if(this.api.onError){let n=t instanceof Error?t:typeof t=="string"?new Error(t):new Error("An unknown error occurred in the IFrameNavigator.");this.api.onError(n)}else this.errorMessage&&(this.errorMessage.style.display="block"),this.isLoading&&this.hideLoadingMessage()}tryAgain(){this.precessContentForIframe()}precessContentForIframe(){let t=this;var n=this.publication.getSpineIndex(this.currentChapterLink.href),r=n%2==1;this.showLoadingMessageAfterDelay();function o(c,h){let v=new DOMParser().parseFromString(c,"application/xhtml+xml");v.head&&v.head.insertBefore(fn.createBase(h),v.head.firstChild);let m=v.documentElement.outerHTML,y=t.iframes[0].contentDocument;y.open(),y.write(m),y.close()}function a(c,h){let v=new DOMParser().parseFromString(c,"application/xhtml+xml");v.head&&v.head.insertBefore(fn.createBase(h),v.head.firstChild);let m=v.documentElement.outerHTML,y=t.iframes[1].contentDocument;y.open(),y.write(m),y.close()}let s=new URL(this.currentChapterLink.href),l=window.location.protocol===s.protocol&&window.location.port===s.port&&window.location.hostname===s.hostname;if(this.api?.getContent)if(this.publication.isFixedLayout)if(this.settings.columnCount!==1)if(r){if(this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.api?.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)}),this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.right={href:h},this.api?.getContent(h).then(f=>{f===void 0?l?this.iframes[1].src=h:fetch(h).then(v=>v.text()).then(async v=>{a.call(this,v,h),this.currentSpreadLinks.right={href:h}}):a.call(this,f,h)})}else this.iframes[1].src="about:blank"}else{if(n>0){let c=this.publication.getPreviousSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.left={href:h},this.api?.getContent(h).then(f=>{f===void 0?l?this.iframes[0].src=h:fetch(h).then(v=>v.text()).then(async v=>{o.call(this,v,h)}):o.call(this,f,h)})}else this.iframes[0].src="about:blank";this.iframes.length===2&&this.publication.isFixedLayout&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},this.api.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[1].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{a.call(this,h,this.currentChapterLink.href)}):a.call(this,c,this.currentChapterLink.href)}))}else this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.api?.getContent(this.currentChapterLink.href).then(c=>{c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)});else this.api?.getContent(this.currentChapterLink.href).then(c=>{this.currentSpreadLinks.left={href:this.currentChapterLink.href},c===void 0?l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(h=>h.text()).then(async h=>{o.call(this,h,this.currentChapterLink.href)}):o.call(this,c,this.currentChapterLink.href)});else if(this.publication.isFixedLayout)if(this.settings.columnCount!==1)if(r){if(l){if(this.iframes[0].src=this.currentChapterLink.href,this.currentSpreadLinks.left={href:this.currentChapterLink.href},this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.iframes[1].src=h,this.currentSpreadLinks.right={href:h}}else this.iframes[1].src="about:blank"}else if(fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)}),this.iframes.length===2)if(n<this.publication.readingOrder.length-1){let c=this.publication.getNextSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.right={href:h},fetch(h).then(f=>f.text()).then(async f=>{a.call(this,f,h)})}else this.iframes[1].src="about:blank"}else{if(n>0){let c=this.publication.getPreviousSpineItem(this.currentChapterLink.href),h=this.publication.getAbsoluteHref(c.Href);this.currentSpreadLinks.left={href:h},l?(this.iframes[0].src=h,this.iframes.length===2&&(this.iframes[1].src=this.currentChapterLink.href)):(fetch(h).then(f=>f.text()).then(async f=>{o.call(this,f,h)}),this.iframes.length===2&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},fetch(this.currentChapterLink.href).then(f=>f.text()).then(async f=>{a.call(this,f,this.currentChapterLink.href)})))}else this.iframes[0].src="about:blank";this.iframes.length===2&&(this.currentSpreadLinks.right={href:this.currentChapterLink.href},l?this.iframes[1].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{a.call(this,c,this.currentChapterLink.href)}))}else this.currentSpreadLinks.left={href:this.currentChapterLink.href},l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)});else this.currentSpreadLinks.left={href:this.currentChapterLink.href},l?this.iframes[0].src=this.currentChapterLink.href:fetch(this.currentChapterLink.href).then(c=>c.text()).then(async c=>{o.call(this,c,this.currentChapterLink.href)});this.publication.isFixedLayout&&setTimeout(()=>{let c=getComputedStyle(n===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).height,h=getComputedStyle(n===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).width;if(parseInt(c.replace("px",""))===0||parseInt(h.replace("px",""))===0){let C=Ft(n===0&&this.iframes.length===2?this.iframes[1].contentDocument:this.iframes[0].contentDocument,"head");if(C){let A=ve(C,"meta[name=viewport]");if(A){var f=A.content,v=f.split(",").reduce((T,L)=>{var[j,N]=L.match(/[^\s;=]+/g);return T[j]=isNaN(Number(N))?N:+N,T},{});c=v.height+"px",h=v.width+"px"}}}var m=n===0&&this.iframes.length===2?this.iframes[1].parentElement.parentElement:this.iframes[0].parentElement.parentElement,y=(parseInt(getComputedStyle(m).width)-100)/(this.iframes.length===2?parseInt(h.replace("px",""))*2+200:parseInt(h.replace("px",""))),E=(parseInt(getComputedStyle(m).height)-100)/parseInt(c.replace("px","")),_=Math.min(y,E);m.style.transform="scale("+_+")";for(let C of this.iframes)C.style.height=c,C.style.width=h,C.parentElement.style.height=c},400)}static goBack(){window.history.back()}static isDisplayed(t){return t?t.className.indexOf(" active")!==-1:!1}static showElement(t,n){if(t){if(t.className=t.className.replace(" inactive",""),t.className.indexOf(" active")===-1&&(t.className+=" active"),t.setAttribute("aria-hidden","false"),n){n.setAttribute("aria-expanded","true");let a=n.querySelector(".icon.open");if(a&&(a.getAttribute("class")||"").indexOf(" inactive-icon")===-1){let l=(a.getAttribute("class")||"")+" inactive-icon";a.setAttribute("class",l)}let s=n.querySelector(".icon.close");if(s){let l=(s.getAttribute("class")||"").replace(" inactive-icon","");s.setAttribute("class",l)}}let r=Array.prototype.slice.call(t.querySelectorAll("button")),o=Array.prototype.slice.call(t.querySelectorAll("a"));for(let a of r)a.tabIndex=0;for(let a of o)a.tabIndex=0}}static hideElement(t,n){if(t){if(t.className=t.className.replace(" active",""),t.className.indexOf(" inactive")===-1&&(t.className+=" inactive"),t.setAttribute("aria-hidden","true"),n){n.setAttribute("aria-expanded","false");let a=n.querySelector(".icon.open");if(a){let l=(a.getAttribute("class")||"").replace(" inactive-icon","");a.setAttribute("class",l)}let s=n.querySelector(".icon.close");if(s&&(s.getAttribute("class")||"").indexOf(" inactive-icon")===-1){let l=(s.getAttribute("class")||"")+" inactive-icon";s.setAttribute("class",l)}}let r=Array.prototype.slice.call(t.querySelectorAll("button")),o=Array.prototype.slice.call(t.querySelectorAll("a"));for(let a of r)a.tabIndex=-1;for(let a of o)a.tabIndex=-1}}hideModal(t,n){for(let r of this.iframes)r.setAttribute("aria-hidden","false");this.upLink&&this.upLink.setAttribute("aria-hidden","false"),this.linksBottom&&this.linksBottom.setAttribute("aria-hidden","false"),this.linksMiddle&&this.linksMiddle.setAttribute("aria-hidden","false"),this.loadingMessage&&this.loadingMessage.setAttribute("aria-hidden","false"),this.errorMessage&&this.errorMessage.setAttribute("aria-hidden","false"),this.infoTop&&this.infoTop.setAttribute("aria-hidden","false"),this.infoBottom&&this.infoBottom.setAttribute("aria-hidden","false"),fn.hideElement(t,n)}handleEditClick(t){var n=t.target,r=ve(this.headerMenu,".sidenav");n.className.indexOf(" active")===-1?(n.className+=" active",r.className+=" expanded",n.innerText="unfold_less",this.sideNavExpanded=!0,this.bookmarkModule.showBookmarks(),this.annotationModule.showHighlights()):(n.className=n.className.replace(" active",""),r.className=r.className.replace(" expanded",""),n.innerText="unfold_more",this.sideNavExpanded=!1,this.bookmarkModule.showBookmarks(),this.annotationModule.showHighlights()),t.preventDefault(),t.stopPropagation()}get hasMediaOverlays(){return this.publication.hasMediaOverlays}startReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.highlighter.speakAll():this.ttsModule.speakPlay())}startReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.startReadAloud()}stopReadAloud(){this.rights?.enableTTS&&(this.highlighter.stopReadAloud(),this.tts.enableSplitter||this.annotationModule!==void 0&&this.annotationModule.drawHighlights())}stopReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.stopReadAloud()}pauseReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.ttsModule.speakPause():(this.ttsModule.speakPause(),this.annotationModule!==void 0&&this.annotationModule.drawHighlights()))}pauseReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.pauseReadAloud()}resumeReadAloud(){this.rights?.enableTTS&&(this.tts.enableSplitter?this.ttsModule.speakResume():this.ttsModule.speakResume())}resumeReadAlong(){this.rights?.enableMediaOverlays&&this.publication.hasMediaOverlays&&this.mediaOverlayModule.resumeReadAloud()}totalResources(){return this.publication.readingOrder.length}mostRecentNavigatedTocItem(){return this.publication.getRelativeHref(this.currentTOCRawLink)}currentResource(){let t=this.currentChapterLink.href;return this.publication.getSpineIndex(t)}currentLink(){if(this.settings.columnCount!==1&&this.currentSpreadLinks.left!==void 0&&this.currentSpreadLinks.right!==void 0){let n=this.publication.getSpineItem(this.currentSpreadLinks.left.href),r=this.publication.getSpineItem(this.currentSpreadLinks.right.href);return[n,r]}let t=this.currentChapterLink.href;return[this.publication.getSpineItem(t)]}tableOfContents(){return this.publication.tableOfContents}readingOrder(){return this.publication.readingOrder}atStart(){return this.view.atStart()}atEnd(){return this.view.atEnd()}previousPage(){this.handlePreviousPageClick(null)}nextPage(){this.handleNextPageClick(null)}previousResource(){this.handlePreviousChapterClick(null)}nextResource(){this.handleNextChapterClick(null)}goTo(t){let n=t.locations??{progression:0};if(t.href.indexOf("#")!==-1){let a=t.href.slice(t.href.indexOf("#")+1);a!==null&&(n=dn(Ze({},n),{fragment:a}))}let r=Ze({},t);r.locations=n;let o=this.publication.getAbsoluteHref(t.href);W&&console.log(t.href),W&&console.log(o),r.href=o,this.stopReadAloud(),this.navigate(r)}currentLocator(){let t;if((this.rights?.autoGeneratePositions??!1)&&this.publication.positions||this.publication.positions){let r=this.publication.positionsByHref(this.publication.getRelativeHref(this.currentChapterLink.href)),o=Math.ceil(this.view.getCurrentPosition()*(r.length-1));t=r[o]}else{var n=this.publication.getTOCItem(this.currentChapterLink.href);this.currentTocUrl!==null&&(n=this.publication.getTOCItem(this.currentTocUrl)),n===null&&(n=this.publication.getTOCItemAbsolute(this.currentChapterLink.href)),t={href:n.Href,type:this.currentChapterLink.type,title:this.currentChapterLink.title,locations:{}}}return t.locations.progression=this.view.getCurrentPosition(),t.displayInfo={resourceScreenIndex:Math.round(this.view.getCurrentPage()),resourceScreenCount:Math.round(this.view.getPageCount())},t}positions(){return this.publication.positions?this.publication.positions:[]}goToPosition(t){if(this.publication.positions){let n=this.publication.positions.filter(r=>r.locations.position===parseInt(String(t)))[0];this.goTo(n)}}snapToElement(t){this.view.snap(t)}applyAttributes(t){this.attributes=t,this.view.attributes=t,this.handleResize()}handlePreviousPageClick(t){this.stopReadAloud(),this.view.layout==="fixed"?this.handlePreviousChapterClick(t):(this.view.atStart()?this.handlePreviousChapterClick(t):(this.view.goToPreviousPage(),this.updatePositionInfo(),this.savePosition()),t&&(t.preventDefault(),t.stopPropagation()))}handleNextPageClick(t){let n=!0;if(this.sample?.isSampleRead&&this.publication.positions){let r=this.currentLocator();n=Math.round(r.locations.totalProgression*100)<=this.sample?.limit,this.view.layout==="fixed"&&!n&&r.locations.position<=this.sample?.minimum&&(n=!0)}(n&&this.sample?.isSampleRead&&this.publication.positions||!this.sample?.isSampleRead||!this.publication.positions)&&(this.stopReadAloud(),this.view.layout==="fixed"?this.handleNextChapterClick(t):(this.view.atEnd()?this.handleNextChapterClick(t):(this.view.goToNextPage(),this.updatePositionInfo(),this.savePosition()),t&&(t.preventDefault(),t.stopPropagation()))),!n&&this.sample?.isSampleRead&&this.publication.positions&&t&&(t.preventDefault(),t.stopPropagation())}handleClickThrough(t){this.mDropdowns&&this.mDropdowns.forEach(n=>{n.close()})}handleInternalLink(t){let n=t.target,r={progression:0},o=n;if(o.href.indexOf("#")!==-1){let s=o.href.slice(o.href.indexOf("#")+1);s!==null&&(r={fragment:s})}let a={href:o.href,locations:r,type:o.type,title:o.title};t.preventDefault(),t.stopPropagation(),this.stopReadAloud(),this.navigate(a)}handleNumberOfIframes(){if(this.publication.isFixedLayout){if(this.settings.columnCount!==1&&!window.matchMedia("screen and (max-width: 600px)").matches){if(this.iframes.length===1){var t=document.createElement("iframe");t.setAttribute("SCROLLING","no"),t.setAttribute("allowtransparency","true"),t.style.opacity="1",t.style.border="none",t.style.overflow="hidden",this.iframes.push(t)}let n=document.createElement("div");this.spreads.appendChild(n),n.appendChild(this.iframes[1]),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 100% 120%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc",n.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, 0% 120%)",n.style.boxShadow="0 0 8px 2px #ccc"}else this.iframes.length===2&&(this.iframes.pop(),this.spreads.removeChild(this.spreads.lastChild)),this.firstSpread.style.clipPath="polygon(0% -20%, 100% -20%, 120% 100%, -20% 120%)",this.firstSpread.style.boxShadow="0 0 8px 2px #ccc";this.precessContentForIframe()}}async handleResize(){if(this.isScrolling)return;if(this.publication.isFixedLayout){var t=this.publication.getSpineIndex(this.currentChapterLink.href);let h=to()-40-this.attributes.margin;var n=t===0&&this.iframes.length===2?this.iframes[1].parentElement.parentElement:this.iframes[0].parentElement.parentElement;n.style.height=h+40+"px";let f=getComputedStyle(t===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).height,v=getComputedStyle(t===0&&this.iframes.length===2?this.iframes[1].contentDocument.body:this.iframes[0].contentDocument.body).width,m=Ft(t===0&&this.iframes.length===2?this.iframes[1].contentDocument:this.iframes[0].contentDocument,"head");if(m){let y=ve(m,"meta[name=viewport]");if(y){var r=y.content,o=r.split(",").reduce((E,_)=>{var[C,A]=_.match(/[^\s;=]+/g);return E[C]=isNaN(Number(A))?A:+A,E},{});(parseInt(o.height)!==0||parseInt(o.width)!==0)&&(f=o.height+"px",v=o.width+"px")}}var a=(parseInt(getComputedStyle(n).width)-100)/(this.iframes.length===2?parseInt(v.replace("px",""))*2+200:parseInt(v.replace("px",""))),s=(parseInt(getComputedStyle(n).height)-100)/parseInt(f.replace("px","")),l=Math.min(a,s);n.style.transform="scale("+l+")";for(let y of this.iframes)y.style.height=f,y.style.width=v,y.parentElement.style.height=f}let c=this.view.getCurrentPosition();await this.settings.applyProperties(),this.infoTop&&(this.infoTop.style.height=0+"px"),this.infoTop&&(this.infoTop.style.minHeight=0+"px"),this.infoBottom&&(this.infoBottom.style.height=this.attributes.bottomInfoHeight?this.attributes.bottomInfoHeight+"px":40+"px"),this.view.layout!=="fixed"&&this.settings.isPaginated().then(h=>{h?(this.view.height=to()-40-this.attributes.margin,this.infoBottom&&this.infoBottom.style.removeProperty("display")):this.infoBottom&&(this.infoBottom.style.display="none")}),setTimeout(()=>{if(this.view.layout!=="fixed"&&this.view?.isScrollMode())for(let h of this.iframes)this.view.setIframeHeight(h)},100),setTimeout(async()=>{this.view.goToProgression(c),await this.updatePositionInfo(!1),this.annotationModule!==void 0&&await this.annotationModule.handleResize(),this.bookmarkModule!==void 0&&await this.bookmarkModule.handleResize(),this.searchModule!==void 0&&await this.searchModule.handleResize(),this.definitionsModule!==void 0&&await this.definitionsModule.handleResize(),this.pageBreakModule!==void 0&&await this.pageBreakModule.handleResize(),this.contentProtectionModule!==void 0&&this.contentProtectionModule.handleResize()},150)}async updatePositionInfo(t=!0){if(this.view.layout==="fixed")this.chapterPosition&&(this.chapterPosition.innerHTML=""),this.remainingPositions&&(this.remainingPositions.innerHTML="");else if(this.view?.isPaginated()){let n=this.currentLocator(),r=n.displayInfo.resourceScreenIndex,o=n.displayInfo.resourceScreenCount;this.chapterPosition&&(this.chapterPosition.innerHTML="Page "+r+" of "+o)}else this.chapterPosition&&(this.chapterPosition.innerHTML=""),this.remainingPositions&&(this.remainingPositions.innerHTML="");t&&await this.savePosition()}handlePreviousChapterClick(t){if(this.view.layout==="fixed"&&this.settings.columnCount!==1){let n=this.publication.getSpineIndex(this.currentChapterLink.href);n=n-2,n<0&&(n=0);let r=this.publication.readingOrder[n],o={href:this.publication.getAbsoluteHref(r.Href),locations:{progression:0},type:r.TypeLink,title:r.Title};this.stopReadAloud(),this.navigate(o)}else if(this.previousChapterLink){let n={href:this.publication.getAbsoluteHref(this.previousChapterLink.href),locations:{progression:1},type:this.previousChapterLink.type,title:this.previousChapterLink.title};this.stopReadAloud(),this.navigate(n)}t&&(t.preventDefault(),t.stopPropagation())}handleNextChapterClick(t){if(this.view.layout==="fixed"&&this.settings.columnCount!==1){let n=this.publication.getSpineIndex(this.currentChapterLink.href);n=n+2,n>=this.publication.readingOrder.length-1&&(n=this.publication.readingOrder.length-1);let r=this.publication.readingOrder[n],o={href:this.publication.getAbsoluteHref(r.Href),locations:{progression:0},type:r.TypeLink,title:r.Title};this.stopReadAloud(),this.navigate(o)}else if(this.nextChapterLink){let n={href:this.publication.getAbsoluteHref(this.nextChapterLink.href),locations:{progression:0},type:this.nextChapterLink.type,title:this.nextChapterLink.title};this.stopReadAloud(),this.navigate(n)}t&&(t.preventDefault(),t.stopPropagation())}hideBookmarksOnEscape(t){let n=27;fn.isDisplayed(this.bookmarksView)&&t.keyCode===n&&this.hideModal(this.bookmarksView,this.bookmarksControl)}hideView(t,n){this.view.layout!=="fixed"&&this.view?.isScrollMode()&&(document.body.style.overflow="auto")}setActiveTOCItem(t){if(this.tocView){let n=Array.prototype.slice.call(this.tocView.querySelectorAll("li > a"));for(let o of n)o.className=o.className.replace(" active","");let r=this.tocView.querySelector('li > a[href^="'+t+'"]');r&&(r.className+=" active")}}async navigate(t){if(this.publication.getTOCItem(t.href)){var r=!1;if(t.href.indexOf("#")!==-1){let o=t.href.slice(0,t.href.indexOf("#"));o===this.currentChapterLink.href&&(r=!0),this.currentChapterLink.href=o,this.currentChapterLink.type=t.type,this.currentChapterLink.title=t.title}else t.href===this.currentChapterLink.href&&(r=!0),this.currentChapterLink.href=t.href,this.currentChapterLink.type=t.type,this.currentChapterLink.title=t.title;if(this.currentSpreadLinks.left!==void 0&&this.currentSpreadLinks.right!==void 0&&(t.href===this.currentSpreadLinks.left.href||t.href===this.currentSpreadLinks.right.href))return;if(r){if(t.href.indexOf("#")!==-1){let h=t.href.slice(t.href.indexOf("#")+1);t.locations={fragment:h}}if(this.newPosition=t,this.currentTOCRawLink=t.href,t.locations.fragment===void 0?this.currentTocUrl=null:(this.newElementId=t.locations.fragment,this.currentTocUrl=this.currentChapterLink.href+"#"+this.newElementId),this.newElementId){for(let h of this.iframes){let f=h.contentDocument.getElementById(this.newElementId);this.view.goToElement(f)}this.newElementId=null}else t.highlight?this.view.goToCssSelector(t.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector):this.view.goToProgression(t.locations.progression);let o=this.currentChapterLink.href,a=this.publication.getPreviousSpineItem(o);a&&a.Href&&(this.previousChapterLink={href:a.Href,type:a.TypeLink,title:a.Title}),this.previousChapterAnchorElement&&(this.previousChapterLink?(this.previousChapterAnchorElement.href=this.publication.getAbsoluteHref(this.previousChapterLink.href),this.previousChapterAnchorElement.className=this.previousChapterAnchorElement.className.replace(" disabled","")):(this.previousChapterAnchorElement.removeAttribute("href"),this.previousChapterAnchorElement.className+=" disabled"));let s=this.publication.getNextSpineItem(o);s?this.nextChapterLink={href:s.Href,type:s.TypeLink,title:s.Title}:this.nextChapterLink=void 0,this.nextChapterAnchorElement&&(this.nextChapterLink?(this.nextChapterAnchorElement.href=this.publication.getAbsoluteHref(this.nextChapterLink.href),this.nextChapterAnchorElement.className=this.nextChapterAnchorElement.className.replace(" disabled","")):(this.nextChapterAnchorElement.removeAttribute("href"),this.nextChapterAnchorElement.className+=" disabled")),this.currentTocUrl!==null?this.setActiveTOCItem(this.currentTocUrl):this.setActiveTOCItem(o),this.publication.Metadata.Title&&this.bookTitle&&(this.bookTitle.innerHTML=this.publication.Metadata.Title.toString());let l=this.publication.getSpineItem(o);l!==null&&(this.currentChapterLink.title=l.Title,this.currentChapterLink.type=l.TypeLink);let c=this.publication.getTOCItem(o);this.currentTocUrl!==null&&(c=this.publication.getTOCItem(this.currentTocUrl)),!this.currentChapterLink.title&&c!==null&&c.Title&&(this.currentChapterLink.title=c.Title),!this.currentChapterLink.type&&c!==null&&c.TypeLink&&(this.currentChapterLink.title=c.Title),this.currentChapterLink.title?this.chapterTitle&&(this.chapterTitle.innerHTML="("+this.currentChapterLink.title+")"):this.chapterTitle&&(this.chapterTitle.innerHTML="(Current Chapter)"),await this.updatePositionInfo()}else this.searchModule!==void 0&&this.searchModule.clearSearch(),t.locations.fragment===void 0?this.currentTocUrl=null:(this.newElementId=t.locations.fragment,this.currentTocUrl=this.currentChapterLink.href+"#"+this.newElementId),this.hideIframeContents(),this.showLoadingMessageAfterDelay(),t.locations===void 0&&(t.locations={progression:0}),this.newPosition=t,this.currentTOCRawLink=t.href,this.precessContentForIframe(),this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&await this.contentProtectionModule.initializeResource(),this.rights?.enableMediaOverlays&&this.mediaOverlayModule!==void 0&&await this.mediaOverlayModule.initializeResource(this.currentLink()),this.rights?.enableContentProtection&&this.contentProtectionModule!==void 0&&this.contentProtectionModule.recalculate(300),this.pageBreakModule!==void 0&&(await this.highlighter.destroyHighlights(Qe.PageBreak),await this.pageBreakModule.drawPageBreaks()),this.annotationModule!==void 0&&(await this.annotationModule.drawHighlights(),await this.annotationModule.showHighlights()),this.bookmarkModule!==void 0&&(await this.bookmarkModule.drawBookmarks(),await this.bookmarkModule.showBookmarks()),this.rights?.enableSearch&&this.searchModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Search),this.searchModule.drawSearch()),this.rights?.enableDefinitions&&this.definitionsModule!==void 0&&this.highlighter!==void 0&&(await this.highlighter.destroyHighlights(Qe.Popup),this.definitionsModule.drawDefinitions()),this.view.layout==="fixed"?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen()):this.settings.isPaginated().then(o=>{o||(this.view.atStart()&&this.view.atEnd()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):this.view.atEnd()?(this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none"),this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="unset")):this.view.atStart()?(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="unset")):(this.nextChapterBottomAnchorElement&&(this.nextChapterBottomAnchorElement.style.display="none"),this.previousChapterTopAnchorElement&&(this.previousChapterTopAnchorElement.style.display="none")))})}else{let o=this.publication.getStartLink(),a=null;if(o&&o.Href&&(a=this.publication.getAbsoluteHref(o.Href)),a){let s={href:a,locations:{progression:0},created:new Date,title:o.Title};await this.navigate(s)}}}showIframeContents(){this.isBeingStyled=!1,setTimeout(()=>{this.isBeingStyled||this.iframes.forEach(t=>{t.style.opacity="1",t.style.border="none",t.style.overflow="hidden"})},150)}showLoadingMessageAfterDelay(){this.isLoading=!0,this.isLoading&&this.loadingMessage&&(this.loadingMessage.style.display="block",this.loadingMessage.classList.add("is-loading"))}hideIframeContents(){this.isBeingStyled=!0,this.iframes.forEach(t=>{t.style.opacity="0",t.style.border="none",t.style.overflow="hidden"})}hideLoadingMessage(){setTimeout(()=>{this.isLoading=!1,this.loadingMessage&&(this.loadingMessage.style.display="none",this.loadingMessage.classList.remove("is-loading")),this.view.layout!=="fixed"&&(this.view.atStart()&&this.view.atEnd()?this.api?.resourceFitsScreen&&this.api?.resourceFitsScreen():this.view.atEnd()?this.api?.resourceAtEnd&&this.api?.resourceAtEnd():this.view.atStart()&&this.api?.resourceAtStart&&this.api?.resourceAtStart()),this.api?.resourceReady&&this.api?.resourceReady()},150)}async saveCurrentReadingPosition(){if(this.annotator){var t=this.publication.getTOCItem(this.currentChapterLink.href);this.currentTocUrl!==null&&(t=this.publication.getTOCItem(this.currentTocUrl)),t===null&&(t=this.publication.getTOCItemAbsolute(this.currentChapterLink.href));let n={progression:this.view.getCurrentPosition()};if(t.Href.indexOf("#")!==-1){let o=t.Href.slice(t.Href.indexOf("#")+1);o!==null&&(n={progression:this.view.getCurrentPosition(),fragment:o})}let r;if((this.rights?.autoGeneratePositions??!1)&&this.publication.positions||this.publication.positions){let o=this.publication.positionsByHref(this.publication.getRelativeHref(t.Href)),a=Math.ceil(n.progression*(o.length-1)),s=o[a];s.locations.fragment=n.fragment,r=dn(Ze({},s),{href:t.Href,created:new Date,title:this.currentChapterLink.title})}else r={href:t.Href,locations:n,created:new Date,type:this.currentChapterLink.type,title:this.currentChapterLink.title};if(this.sample?.isSampleRead&&this.publication.positions&&this.sampleReadEventHandler?.enforceSampleRead(r),this.api?.updateCurrentLocation)this.api?.updateCurrentLocation(r).then(async o=>(W&&console.log("api updated current location",r),this.annotator.saveLastReadingPosition(r)));else return W&&console.log("save last reading position",r),this.annotator.saveLastReadingPosition(r)}else return new Promise(n=>n())}static createBase(t){let n=document.createElement("base");return n.target="_self",n.href=t,n}static createCssLink(t){let n=document.createElement("link");return n.rel="stylesheet",n.type="text/css",n.href=t,n}static createJavascriptLink(t,n){let r=document.createElement("script");return r.type="text/javascript",r.src=t,r.async=n,r}activateMarker(t,n){this.annotationModule!==void 0&&(this.annotationModule.activeAnnotationMarkerId=t,this.annotationModule.activeAnnotationMarkerPosition=n,this.highlighter.activeAnnotationMarkerId=t)}deactivateMarker(){this.annotationModule!==void 0&&(this.annotationModule.activeAnnotationMarkerId=void 0,this.annotationModule.activeAnnotationMarkerPosition=void 0,this.highlighter.activeAnnotationMarkerId=void 0)}};S();var At=class{constructor(t){this.store=t.store}async getLastReadingPosition(){let t=await this.store.get(At.LAST_READING_POSITION);if(t){let n=JSON.parse(t);return new Promise(r=>r(n))}return new Promise(n=>n())}async initLastReadingPosition(t){if(typeof t=="string")await this.store.set(At.LAST_READING_POSITION,t);else{let n=JSON.stringify(t);await this.store.set(At.LAST_READING_POSITION,n)}return new Promise(n=>n())}async saveLastReadingPosition(t){if(typeof t=="string")await this.store.set(At.LAST_READING_POSITION,t);else{let n=JSON.stringify(t);await this.store.set(At.LAST_READING_POSITION,n)}return new Promise(n=>n())}async initBookmarks(t){if(typeof t=="string"){let n=JSON.parse(t);return await this.store.set(At.BOOKMARKS,JSON.stringify(n)),new Promise(r=>r(t))}else return await this.store.set(At.BOOKMARKS,JSON.stringify(t)),new Promise(n=>n(t))}async saveBookmark(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);r.push(t),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}return new Promise(r=>r(t))}async locatorExists(t,n){let r;switch(n){case mi.Bookmark:r=At.BOOKMARKS;break}let o=await this.store.get(r);return o&&JSON.parse(o).filter(l=>l.href===t.href&&l.locations.progression===t.locations.progression).length>0?new Promise(l=>l(t)):new Promise(a=>a())}async deleteBookmark(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.id!==t.id),await this.store.set(At.BOOKMARKS,JSON.stringify(r))}return new Promise(r=>r(t))}async getBookmarks(t){let n=await this.store.get(At.BOOKMARKS);if(n){let r=JSON.parse(n);if(t){let o=r.filter(a=>a.href===t);return o=o.sort((a,s)=>a.locations.progression-s.locations.progression),new Promise(a=>a(o))}return r=r.sort((o,a)=>o.locations.progression-a.locations.progression),new Promise(o=>o(r))}return new Promise(r=>r())}async initAnnotations(t){let n;typeof t=="string"?n=JSON.parse(t):n=t;let r=[];return n.forEach(o=>{let a=`${o.highlight.selectionInfo.rangeInfo.startContainerElementCssSelector}${o.highlight.selectionInfo.rangeInfo.startContainerChildTextNodeIndex}${o.highlight.selectionInfo.rangeInfo.startOffset}${o.highlight.selectionInfo.rangeInfo.endContainerElementCssSelector}${o.highlight.selectionInfo.rangeInfo.endContainerChildTextNodeIndex}${o.highlight.selectionInfo.rangeInfo.endOffset}`,s=zi.hash(a);o.highlight.id="R2_HIGHLIGHT_"+s;var l;l=o.color,Ue.isHexColor(l)&&(l=Ue.hexToRgbString(l)),o.highlight.color=l,o.highlight.pointerInteraction=!0,o.highlight.selectionInfo.cleanText=o.highlight.selectionInfo.rawText.trim().replace(/\n/g," ").replace(/\s\s+/g," "),r.push(o)}),await this.store.set(At.ANNOTATIONS,JSON.stringify(r)),new Promise(o=>o(r))}async saveAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r.push(t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}else{let r=[];r.push(t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async deleteAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.id!==t),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async deleteSelectedAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let r=JSON.parse(n);r=r.filter(o=>o.highlight.id!==t.highlight.id),await this.store.set(At.ANNOTATIONS,JSON.stringify(r))}return new Promise(r=>r(t))}async getAnnotations(){let t=await this.store.get(At.ANNOTATIONS);if(t){let n=JSON.parse(t);return n=n.sort((r,o)=>r.locations.progression-o.locations.progression),new Promise(r=>r(n))}return new Promise(n=>n())}async getAnnotationPosition(t,n){let r=await this.store.get(At.ANNOTATIONS);if(r){let a=JSON.parse(r).filter(s=>s.id===t);if(a.length>0){let s=n.document.getElementById(`${a[0].highlight.id}`);if(s){let l=0;if(s.hasChildNodes)for(let c=0;c<s.childNodes.length;c++){let h=s.childNodes[c],f=parseInt(h.style.top.replace("px",""));(f<l||l==0)&&(l=f)}else l=parseInt(s.style.top.replace("px",""));return new Promise(c=>c(l))}}}return new Promise(o=>o())}async getAnnotation(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let o=JSON.parse(n).filter(a=>a.highlight.id===t.id);if(o.length>0)return new Promise(a=>a(o[0]))}return new Promise(r=>r())}async getAnnotationByID(t){let n=await this.store.get(At.ANNOTATIONS);if(n){let o=JSON.parse(n).filter(a=>a.highlight.id===t);if(o.length>0)return new Promise(a=>a(o[0]))}return new Promise(r=>r())}},rs=At;rs.LAST_READING_POSITION="last-reading-position",rs.BOOKMARKS="bookmarks",rs.ANNOTATIONS="annotations";S();S();var ih=class{constructor(){this.store={}}get(t){let n=this.store[t]||null;return new Promise(r=>r(n))}set(t,n){return this.store[t]=n,new Promise(r=>r())}remove(t){return this.store[t]=null,new Promise(n=>n())}};var _l=class{constructor(t){this.prefix=t.prefix,this.useLocalStorage=t.useLocalStorage;try{let n=t.prefix+"-"+String(Math.random());this.useLocalStorage?(window.localStorage.setItem(n,"test"),window.localStorage.removeItem(n)):(window.sessionStorage.setItem(n,"test"),window.sessionStorage.removeItem(n)),this.fallbackStore=null}catch(n){this.fallbackStore=new ih}}getLocalStorageKey(t){return this.prefix+"-"+t}async get(t){let n=null;return this.fallbackStore?n=await this.fallbackStore.get(t):this.useLocalStorage?n=window.localStorage.getItem(this.getLocalStorageKey(t)):n=window.sessionStorage.getItem(this.getLocalStorageKey(t)),new Promise(r=>r(n))}async set(t,n){return this.fallbackStore?await this.fallbackStore.set(t,n):this.useLocalStorage?window.localStorage.setItem(this.getLocalStorageKey(t),n):window.sessionStorage.setItem(this.getLocalStorageKey(t),n),new Promise(r=>r())}async remove(t){return this.fallbackStore?await this.fallbackStore.remove(t):this.useLocalStorage?window.localStorage.removeItem(this.getLocalStorageKey(t)):window.sessionStorage.removeItem(this.getLocalStorageKey(t)),new Promise(n=>n())}};S();var TO=Tt(Na()),MO=Tt($n());var Sl=class extends TO.Link{};Sl=yu([(0,MO.JsonObject)()],Sl);function Cl(i){let t,n,r,o;if(i instanceof Array)return i.map(function(a){return typeof a=="object"&&(a=Cl(a)),a});t={};for(n in i)i.hasOwnProperty(n)&&(r=(n.charAt(0).toLowerCase()+n.slice(1)||n).toString(),o=i[n],(o instanceof Array||o!==null&&o.constructor===Object)&&(o=Cl(o)),r==="href1"?t.href=o:r==="typeLink"?t.type=o:t[r]=o);return t}S();var rh=class{static async create(t){let n=new this(t.headerMenu,t.delegate,t.publication);return await n.start(),n}constructor(t,n,r){this.headerMenu=t,this.delegate=n,this.publication=r}async stop(){W&&console.log("Page Break module stop")}async start(){this.delegate.pageBreakModule=this,this.headerMenu&&(this.goToPageView=ve(this.headerMenu,"#sidenav-section-gotopage")),this.headerMenu&&(this.goToPageNumberInput=ve(this.headerMenu,"#goToPageNumberInput")),this.headerMenu&&(this.goToPageNumberButton=ve(this.headerMenu,"#goToPageNumberButton")),ue(this.goToPageNumberInput,"keypress",this.goToPageNumber.bind(this)),ue(this.goToPageNumberButton,"click",this.goToPageNumber.bind(this)),this.goToPageView&&(this.publication.pageList?.length||this.goToPageView.parentElement.removeChild(this.goToPageView))}async goToPageNumber(t){if(this.goToPageNumberInput.value&&(t.key==="Enter"||t.type==="click")){var n=this.publication.pageList.filter(o=>o.Href.slice(o.Href.indexOf("#")+1).replace(/[^0-9]/g,"")===this.goToPageNumberInput.value);if(n&&n.length>0){var r=n[0];let o={progression:0};if(r.Href.indexOf("#")!==-1){let s=r.Href.slice(r.Href.indexOf("#")+1);s!==null&&(o={fragment:s})}let a={href:this.publication.getAbsoluteHref(r.Href),locations:o,type:r.TypeLink,title:r.Title};this.delegate.goTo(a)}}}async handleResize(){await this.delegate.highlighter.destroyHighlights(Qe.PageBreak),await this.drawPageBreaks()}async drawPageBreaks(){setTimeout(()=>{let n=this.delegate.iframes[0].contentDocument.body.querySelectorAll('[*|type="pagebreak"]'),r=this;function o(a){try{return Wn(a,r.delegate.iframes[0].contentDocument,ho)}catch(s){return console.log("uniqueCssSelector:"),console.log(s),""}}for(let a=0;a<n.length;a++){let s=n[a];W&&console.log(s);let l=s.innerHTML,c=!1;s.innerHTML.length===0&&(l=s.getAttribute("title"),s.innerHTML=l,c=!0),s.innerHTML.length===0&&(l=s.getAttribute("id").replace(/[^0-9]/g,""),s.innerHTML=l,c=!0);let h=this.delegate.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getWindow().document.createRange(),f=this.delegate.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getSelection();if(f.removeAllRanges(),h.selectNodeContents(s),f.addRange(h),!f.isCollapsed){let v=kr(h,o);f.removeAllRanges(),this.delegate.highlighter.createPageBreakHighlight({rangeInfo:v,cleanText:"",rawText:"",range:void 0},l)}c&&(s.innerHTML="")}},200)}};S();var AO=Tt(Cd()),oh=class{constructor(t,n,r,o,a,s=null,l=null){this.voices=[];this.hasEventListener=!1;this.index=0;this.userScrolled=!1;this.delegate=t,this.tts=n,this.headerMenu=r,this.rights=o,this.highlighter=a,this.properties=s,this.api=l}initialize(t){this.highlighter!==void 0&&(this.tts.setControls(),this.tts.onSettingsChange(this.handleResize.bind(this)),this.body=t,this.clean=(0,AO.default)(this.body.innerHTML,{allowedTags:[],allowedAttributes:{}}),t.querySelectorAll("[data-word]").forEach(o=>{o.dataset.ttsColor=this.tts.color}),t.querySelectorAll("[data-whitespace]").forEach(o=>{o.dataset.ttsColor=this.tts.color}),window.speechSynthesis.getVoices(),this.initVoices(!0),this.hasEventListener||(this.hasEventListener=!0,ue(document,"wheel",this.wheel.bind(this)),ue(this.body,"wheel",this.wheel.bind(this)),ue(document,"keydown",this.wheel.bind(this)),ue(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))))}initVoices(t){function n(){return new Promise(function(o,a){let s=window.speechSynthesis,l;l=setInterval(()=>{s.getVoices().length!==0&&(o(s.getVoices()),clearInterval(l))},10)})}n().then(async o=>{if(W&&console.log(o),this.voices=[],o.forEach(s=>{s.localService===!0&&this.voices.push(s)}),W&&console.log(this.voices),t&&this.headerMenu){var a=ve(this.headerMenu,"#preferred-languages");a&&this.voices.forEach(s=>{var l=document.createElement("option");l.value=s.name+":"+s.lang,l.innerHTML=s.name+" ("+s.lang+")",a.add(l)})}})}cancel(){this.api?.stopped&&this.api?.stopped(),this.userScrolled=!1,window.speechSynthesis.cancel(),this.splittingResult&&this.delegate.tts?.enableSplitter&&this.splittingResult.forEach(t=>{t.dataset.ttsCurrentWord="false",t.dataset.ttsCurrentLine="false"})}handleResize(){this.body.querySelectorAll("[data-word]").forEach(r=>{r.dataset.ttsColor=this.tts.color,r.dataset.ttsCurrentWord="false",r.dataset.ttsCurrentLine="false"}),this.body.querySelectorAll("[data-whitespace]").forEach(r=>{r.dataset.ttsColor=this.tts.color,r.dataset.ttsCurrentWord="false",r.dataset.ttsCurrentLine="false"})}async speak(t,n,r){this.api?.started&&this.api?.started();var o=this;if(this.userScrolled=!1,this.cancel(),this.delegate.tts?.enableSplitter)if(n){var a=o.body.querySelectorAll("[data-word]"),s=t.range.startContainer.parentElement;s.tagName.toLowerCase()==="a"&&(s=s.parentElement),s.dataset===void 0&&(s=s.nextElementSibling);var l=t.range.endContainer.parentElement;l.tagName.toLowerCase()==="a"&&(l=l.parentElement),l.dataset===void 0&&(l=l.previousElementSibling);var c=parseInt(s.dataset.wordIndex),h=parseInt(l.dataset.wordIndex)+1;let L=Array.from(a);this.splittingResult=L.slice(c,h)}else document.scrollingElement.scrollTop=0,this.splittingResult=o.body.querySelectorAll("[data-word]");let f=n?new SpeechSynthesisUtterance(t.cleanText):new SpeechSynthesisUtterance(this.clean);f.rate=this.tts.rate,f.pitch=this.tts.pitch,f.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var v=!0;this.tts.voice&&this.tts.voice.lang&&(v=this.tts.voice.lang.indexOf("-")!==-1,v===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),v=!0)),W&&console.log("initialVoiceHasHyphen",v),W&&console.log("voices",this.voices);var m;v===!0?(m=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(L=>{var j=L.lang.replace("_","-");return j===this.tts.voice.lang&&L.name===this.tts.voice.name})[0]:void 0,m===void 0&&(m=this.tts.voice&&this.tts.voice.lang?this.voices.filter(L=>L.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(m=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(L=>L.lang===this.tts.voice.lang&&L.name===this.tts.voice.name)[0]:void 0,m===void 0&&(m=this.tts.voice&&this.tts.voice.lang?this.voices.filter(L=>L.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",m);var y=o.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",y);var E;y===!0?E=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(L=>{var j=L.lang.replace("_","-");return j.startsWith(o.delegate.publication.Metadata.Language[0])||j.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:E=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(L=>L.lang.startsWith(o.delegate.publication.Metadata.Language[0])||L.lang.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",E);var _=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",_);var C;_===!0?C=this.voices.filter(L=>{var j=L.lang.replace("_","-");return j===navigator.language&&L.localService===!0})[0]:C=this.voices.filter(L=>{var j=L.lang;return j===navigator.language&&L.localService===!0})[0],C===void 0&&(C=this.voices.filter(L=>{var j=L.lang;return j.includes(navigator.language)&&L.localService===!0})[0]),W&&console.log("defaultVoice",C),m?(W&&console.log("initialVoice"),f.voice=m):E?(W&&console.log("publicationVoice"),f.voice=E):C&&(W&&console.log("defaultVoice"),f.voice=C),f.voice!==void 0&&f.voice!==null&&(f.lang=f.voice.lang,W&&console.log("utterance.voice.lang",f.voice.lang),W&&console.log("utterance.lang",f.lang)),W&&console.log("navigator.language",navigator.language),window.speechSynthesis.speak(f),this.index=0;var A=void 0;f.onboundary=function(L){if(L.name==="sentence"&&W&&console.log("sentence boundary",L.charIndex,L.charLength,f.text.slice(L.charIndex,L.charIndex+L.charLength)),L.name==="word"){let N=function(q,ye){q=String(q),ye=Number(ye)>>>0;var Z=q.slice(0,ye+1).search(/\S+$/),te=q.slice(ye).search(/\s/);return te<0?q.slice(Z):q.slice(Z,te+ye)}(f.text,L.charIndex);A===N&&o.index--,A=N,o.delegate.tts?.enableSplitter&&T(N)}};async function T(L){var j=L.replace(/[^a-zA-Z0-9 ]/g,"");W&&console.log("spokenWordCleaned",j);let N=o.splittingResult[o.index];var q=N?.dataset.word.replace(/[^a-zA-Z0-9 ]/g,"");if(W&&console.log("splittingWordCleaned",q),q.length===0&&(o.index++,N=o.splittingResult[o.index],q=N?.dataset.word.replace(/[^a-zA-Z0-9 ]/g,""),W&&console.log("splittingWordCleaned",q)),N){var ye=N.parentElement.tagName.toLowerCase()==="a";ye||(j.length>0&&q.length>0?q.startsWith(j)||q.endsWith(j)||j.startsWith(q)||j.endsWith(q)?(o.index>0&&(o.body.querySelectorAll("[data-word]").forEach(le=>{le.dataset.ttsColor=o.tts.color,le.dataset.ttsCurrentWord="false",le.dataset.ttsCurrentLine="false"}),o.body.querySelectorAll("[data-whitespace]").forEach(le=>{le.dataset.ttsColor=o.tts.color,le.dataset.ttsCurrentWord="false",le.dataset.ttsCurrentLine="false"})),N.dataset.ttsCurrentWord="true",o.delegate.view.isScrollMode()&&o.tts.autoScroll&&!o.userScrolled&&N.scrollIntoView({block:"center",behavior:"smooth"})):o.index++:j.length===0&&o.index--),o.index++}}f.onend=function(){W&&console.log("utterance ended"),o.highlighter.doneSpeaking(),o.delegate.tts?.enableSplitter&&(o.body.querySelectorAll("[data-word]").forEach(N=>{N.dataset.ttsColor=o.tts.color,N.dataset.ttsCurrentWord="false",N.dataset.ttsCurrentLine="false"}),o.body.querySelectorAll("[data-whitespace]").forEach(N=>{N.dataset.ttsColor=o.tts.color,N.dataset.ttsCurrentWord="false",N.dataset.ttsCurrentLine="false"})),o.api?.finished()},r()}speakPause(){window.speechSynthesis.speaking&&(this.api?.paused&&this.api?.paused(),this.userScrolled=!1,window.speechSynthesis.pause())}speakResume(){window.speechSynthesis.speaking&&(this.api?.resumed&&this.api?.resumed(),this.userScrolled=!1,window.speechSynthesis.resume())}static async create(t){let n=new this(t.delegate,t.tts,t.headerMenu,t.rights,t.highlighter,t,t.api);return await n.start(),n}async start(){if(this.delegate.ttsModule=this,this.headerMenu){var t=ve(this.headerMenu,"#menu-button-tts");this.rights?.enableMaterial?t&&t.parentElement.style.removeProperty("display"):t&&t.parentElement.style.setProperty("display","none")}}wheel(t){if(t instanceof KeyboardEvent)switch(t.key){case"ArrowUp":this.userScrolled=!0;break;case"ArrowDown":this.userScrolled=!0;break}else this.userScrolled=!0}stop(){W&&console.log("TTS module stop"),Le(document,"wheel",this.wheel.bind(this)),Le(this.body,"wheel",this.wheel.bind(this)),Le(document,"keydown",this.wheel.bind(this)),Le(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))}};S();var tT=Tt(Cd());var nT=Tt(Go()),iT=Tt(eT());var vh=class{constructor(t,n,r,o,a,s=null,l=null){this.voices=[];this.hasEventListener=!1;this.index=0;this.userScrolled=!1;this.speaking=!1;this.restartIndex=-1;this.ttsQueueIndex=-1;this.ttsQueue=null;this.ttsPlayQueueIndexDebounced=(0,nT.debounce)((t,n)=>{this.restartIndex>=0?(this.ttsQueueIndex=this.restartIndex,this.restartIndex=-1):this.ttsQueueIndex=t,this.ttsQueue=n,this.ttsPlayQueueIndex(this.ttsQueueIndex,n)},150);this.delegate=t,this.tts=n,this.headerMenu=r,this.rights=o,this.highlighter=a,this.properties=s,this.api=l}initialize(t){this.highlighter!==void 0&&(this.tts.setControls(),this.tts.onRestart(this.restart.bind(this)),this.body=t,this.clean=(0,tT.default)(this.body.innerHTML,{allowedTags:[],allowedAttributes:{}}),window.speechSynthesis.getVoices(),this.initVoices(!0),this.hasEventListener||(this.hasEventListener=!0,ue(document,"wheel",this.wheel.bind(this)),ue(this.body,"wheel",this.wheel.bind(this)),ue(document,"keydown",this.wheel.bind(this)),ue(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this))),ue(this.body,"click",this.click.bind(this)))}click(t){if(window.speechSynthesis.speaking&&this.speaking){let n=this.highlighter.dom(this.delegate.iframes[0].contentDocument.body).getSelection(),r=n.getRangeAt(0),o=n.anchorNode;for(;r.toString().indexOf(" ")!=0;)try{r.setStart(o,r.startOffset-1)}catch(c){break}r.setStart(o,r.startOffset+1);do r.setEnd(o,r.endOffset+1);while(r.toString().indexOf(" ")==-1&&r.toString().trim()!="");let s=document.querySelector("main#iframe-wrapper iframe").contentWindow.document.body,l=this.findTtsQueueItemIndex(this.ttsQueue,n.anchorNode,n.focusNode,n.focusOffset,s);n.removeAllRanges(),l>=0&&(window.speechSynthesis.cancel(),this.restartIndex=l,this.ttsPlayQueueIndexDebounced(this.restartIndex,this.ttsQueue))}}initVoices(t){function n(){return new Promise(function(o,a){let s=window.speechSynthesis,l;l=setInterval(()=>{s.getVoices().length!==0&&(o(s.getVoices()),clearInterval(l))},10)})}n().then(async o=>{if(W&&console.log(o),this.voices=[],o.forEach(s=>{s.localService===!0&&this.voices.push(s)}),W&&console.log(this.voices),t&&this.headerMenu){var a=ve(this.headerMenu,"#preferred-languages");a&&this.voices.forEach(s=>{var l=document.createElement("option");l.value=s.name+":"+s.lang,l.innerHTML=s.name+" ("+s.lang+")",a.add(l)})}})}cancel(){this.api?.stopped&&this.api?.stopped(),this.userScrolled=!1,this.speaking=!1,setTimeout(()=>{window.speechSynthesis.cancel()},0),this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0)}async speak(t,n,r){this.api?.started&&this.api?.started();var o=this;this.userScrolled=!1,this.cancel();let a=n?new SpeechSynthesisUtterance(t.cleanText):new SpeechSynthesisUtterance(this.clean);a.rate=this.tts.rate,a.pitch=this.tts.pitch,a.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var s=!0;this.tts.voice&&this.tts.voice.lang&&(s=this.tts.voice.lang.indexOf("-")!==-1,s===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),s=!0)),W&&console.log("initialVoiceHasHyphen",s),W&&console.log("voices",this.voices);var l;s===!0?(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(m=>{var y=m.lang.replace("_","-");return y===this.tts.voice.lang&&m.name===this.tts.voice.name})[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(m=>m.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(m=>m.lang===this.tts.voice.lang&&m.name===this.tts.voice.name)[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(m=>m.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",l);var c=o.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",c);var h;c===!0?h=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(m=>{var y=m.lang.replace("_","-");return y.startsWith(o.delegate.publication.Metadata.Language[0])||y.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:h=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(m=>m.lang.startsWith(o.delegate.publication.Metadata.Language[0])||m.lang.endsWith(o.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",h);var f=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",f);var v;f===!0?v=this.voices.filter(m=>{var y=m.lang.replace("_","-");return y===navigator.language&&m.localService===!0})[0]:v=this.voices.filter(m=>{var y=m.lang;return y===navigator.language&&m.localService===!0})[0],v===void 0&&(v=this.voices.filter(m=>{var y=m.lang;return y.includes(navigator.language)&&m.localService===!0})[0]),W&&console.log("defaultVoice",v),l?(W&&console.log("initialVoice"),a.voice=l):h?(W&&console.log("publicationVoice"),a.voice=h):v&&(W&&console.log("defaultVoice"),a.voice=v),a.voice!==void 0&&a.voice!==null&&(a.lang=a.voice.lang,W&&console.log("utterance.voice.lang",a.voice.lang),W&&console.log("utterance.lang",a.lang)),W&&console.log("navigator.language",navigator.language),setTimeout(()=>{window.speechSynthesis.speak(a)},0),this.index=0,a.onend=function(){W&&console.log("utterance ended"),o.highlighter.doneSpeaking(),o.api?.finished()},r()}speakPlay(){this.cancel();let t=this,r=document.querySelector("main#iframe-wrapper iframe").contentWindow.document.body,o=this.generateTtsQueue(r,!0);if(!o.length)return;let a=0;function s(){let l=t.highlighter.visibleTextRects[0],c=t.highlighter.dom(t.delegate.iframes[0].contentDocument.body).getWindow().document.createRange(),h=t.highlighter.dom(t.delegate.iframes[0].contentDocument.body).getSelection();h.removeAllRanges(),c.selectNodeContents(l.node),h.addRange(c);let f=na(c,!1);function v(y){let E=window.scrollX,_=E+window.innerWidth,C=y.left+y.width,A=y.top+y.height,T=window.scrollY,L=T+window.innerHeight,j=A<T,N=y.top>L,q=C<E,ye=y.left>_;return j||N||q||ye}let m=0;for(let y of f){if(!v(y)){let E=h.focusNode,_=h.focusOffset;h.collapse(h.anchorNode,h.anchorOffset);for(let j=0;j<m;j++)h.modify("move","forward","line");h.extend(E,_);let C=h.focusNode,A=h.focusNode.length;h.collapse(h.anchorNode,h.anchorOffset);let T=A;h.anchorOffset>A?T=A:T=h.anchorOffset+1,h.modify("move","forward","character"),h.modify("move","backward","word"),h.extend(C,T-1),h.modify("extend","backward","character"),h.modify("extend","forward","sentence");let L=t.findTtsQueueItemIndex(o,h.anchorNode,h.focusNode,h.focusOffset,r);L>=0&&(a=L),h.removeAllRanges();break}m++}}s(),a<0&&(a=0),setTimeout(()=>{this.startTTSSession(o,a)},100)}speakPause(){window.speechSynthesis.speaking&&(this.api?.paused&&this.api?.paused(),this.userScrolled=!1,window.speechSynthesis.pause(),this.speaking=!1,this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0))}speakResume(){window.speechSynthesis.speaking&&(this.api?.resumed&&this.api?.resumed(),this.userScrolled=!1,window.speechSynthesis.resume(),this.speaking=!0)}static async create(t){let n=new this(t.delegate,t.tts,t.headerMenu,t.rights,t.highlighter,t,t.api);return await n.start(),n}async start(){if(this.delegate.ttsModule=this,this.headerMenu){var t=ve(this.headerMenu,"#menu-button-tts");this.rights?.enableMaterial?t&&t.parentElement.style.removeProperty("display"):t&&t.parentElement.style.setProperty("display","none")}}wheel(t){if(t instanceof KeyboardEvent)switch(t.key){case"ArrowUp":this.userScrolled=!0;break;case"ArrowDown":this.userScrolled=!0;break}else this.userScrolled=!0}stop(){W&&console.log("TTS module stop"),Le(document,"wheel",this.wheel.bind(this)),Le(this.body,"wheel",this.wheel.bind(this)),Le(document,"keydown",this.wheel.bind(this)),Le(this.delegate.iframes[0].contentDocument,"keydown",this.wheel.bind(this)),Le(this.body,"click",this.click.bind(this))}generateTtsQueue(t,n){let r=[],o=[];function a(h){if(h.nodeType!==Node.TEXT_NODE||!h.nodeValue||!h.nodeValue.trim().length)return;let f=o[o.length-1];if(!f)return;let v=h.parentElement?rT(h.parentElement):void 0,m=h.parentElement?BF(h.parentElement):void 0,y=r[r.length-1];(!y||y.parentElement!==f||y.lang!==v||y.dir!==m)&&(y={combinedText:"",combinedTextSentences:void 0,combinedTextSentencesRangeBegin:void 0,combinedTextSentencesRangeEnd:void 0,dir:m,lang:v,parentElement:f,textNodes:[]},r.push(y)),y.textNodes.push(h)}let s=!0;function l(h){if(h.nodeType!==Node.ELEMENT_NODE)return;let f=s||h.matches("h1, h2, h3, h4, h5, h6, p, th, td, caption, li, blockquote, q, dt, dd, figcaption, div, pre");s=!1,f&&o.push(h);for(let v of h.childNodes)switch(v.nodeType){case Node.ELEMENT_NODE:let m=v;if(!m.matches("img, sup, sub, audio, video, source, button, canvas, del, dialog, embed, form, head, iframe, meter, noscript, object, s, script, select, style, textarea"))l(m);else if(m.tagName&&m.tagName.toLowerCase()==="img"&&m.src){let E=m.getAttribute("alt");if(E){let _=E.trim();if(_){let C=rT(m),A=void 0;r.push({combinedText:_,combinedTextSentences:void 0,combinedTextSentencesRangeBegin:void 0,combinedTextSentencesRangeEnd:void 0,dir:A,lang:C,parentElement:m,textNodes:[]})}}}break;case Node.TEXT_NODE:o.length!==0&&a(v);break;default:break}f&&o.pop()}l(t);function c(h){if(!h.textNodes||!h.textNodes.length){(!h.combinedText||!h.combinedText.length)&&(h.combinedText=""),h.combinedTextSentences=void 0;return}h.combinedText=IF(h.textNodes,!0).replace(/[\r\n]/g," ");let f=!1,v=h.parentElement;for(;v;){if(v.tagName){let m=v.tagName.toLowerCase();if(m==="pre"||m==="code"||m==="video"||m==="audio"){f=!0;break}}v=v.parentElement}if(n&&!f)try{let m=h.combinedText;h.combinedTextSentences=void 0;let y=(0,iT.split)(m);h.combinedTextSentences=[],h.combinedTextSentencesRangeBegin=[],h.combinedTextSentencesRangeEnd=[];for(let E of y)E.type==="Sentence"&&(h.combinedTextSentences.push(E.raw),h.combinedTextSentencesRangeBegin.push(E.range[0]),h.combinedTextSentencesRangeEnd.push(E.range[1]));(h.combinedTextSentences.length===0||h.combinedTextSentences.length===1)&&(h.combinedTextSentences=void 0)}catch(m){console.log(m),h.combinedTextSentences=void 0}else h.combinedTextSentences=void 0}for(let h of r)c(h);return r}findTtsQueueItemIndex(t,n,r,o,a){let s=0;for(let l of t){if(r&&l.textNodes){if(l.textNodes.includes(r))if(l.combinedTextSentences&&l.combinedTextSentencesRangeBegin&&l.combinedTextSentencesRangeEnd){let c=0;for(let f of l.textNodes)if(!(!f.nodeValue&&f.nodeValue!=="")){if(f===r){c+=o;break}c+=f.nodeValue.length}let h=s-1;for(let f of l.combinedTextSentencesRangeEnd)if(h++,!(f<c))return h;return s}else return s}else if(n===l.parentElement||l.parentElement!==n.ownerDocument.body&&l.parentElement!==a&&l.parentElement.contains(n)||n.contains(l.parentElement))return s;l.combinedTextSentences?s+=l.combinedTextSentences.length:s++}return-1}restart(){window.speechSynthesis.speaking&&(window.speechSynthesis.cancel(),this.restartIndex=this.ttsQueueIndex,this.ttsPlayQueueIndexDebounced(this.restartIndex,this.ttsQueue))}startTTSSession(t,n){if(!oT(t,n)){this.cancel();return}this.speaking=!0,this.ttsPlayQueueIndexDebounced(n,t)}ttsPlayQueueIndex(t,n){if(t<0){this.cancel();return}let r=oT(n,t);if(!r){this.cancel();return}let o=sT(r);if(!o){this.cancel();return}let a=new SpeechSynthesisUtterance(o);a.rate=this.tts.rate,a.pitch=this.tts.pitch,a.volume=this.tts.volume,W&&console.log("this.tts.voice.lang",this.tts.voice.lang);var s=!0;this.tts.voice&&this.tts.voice.lang&&(s=this.tts.voice.lang.indexOf("-")!==-1,s===!1&&(this.tts.voice.lang=this.tts.voice.lang.replace("_","-"),s=!0)),W&&console.log("initialVoiceHasHyphen",s),W&&console.log("voices",this.voices);var l;s===!0?(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(y=>{var E=y.lang.replace("_","-");return E===this.tts.voice.lang&&y.name===this.tts.voice.name})[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(y=>y.lang.replace("_","-")===this.tts.voice.lang)[0]:void 0)):(l=this.tts.voice&&this.tts.voice.lang&&this.tts.voice.name?this.voices.filter(y=>y.lang===this.tts.voice.lang&&y.name===this.tts.voice.name)[0]:void 0,l===void 0&&(l=this.tts.voice&&this.tts.voice.lang?this.voices.filter(y=>y.lang===this.tts.voice.lang)[0]:void 0)),W&&console.log("initialVoice",l);var c=this,h=c.delegate.publication.Metadata.Language[0].indexOf("-")!==-1;W&&console.log("publicationVoiceHasHyphen",h);var f;h===!0?f=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(y=>{var E=y.lang.replace("_","-");return E.startsWith(c.delegate.publication.Metadata.Language[0])||E.endsWith(c.delegate.publication.Metadata.Language[0].toUpperCase())})[0]:void 0:f=this.tts.voice&&this.tts.voice.usePublication?this.voices.filter(y=>y.lang.startsWith(c.delegate.publication.Metadata.Language[0])||y.lang.endsWith(c.delegate.publication.Metadata.Language[0].toUpperCase()))[0]:void 0,W&&console.log("publicationVoice",f);var v=navigator.language.indexOf("-")!==-1;W&&console.log("defaultVoiceHasHyphen",v);var m;v===!0?m=this.voices.filter(y=>{var E=y.lang.replace("_","-");return E===navigator.language&&y.localService===!0})[0]:m=this.voices.filter(y=>{var E=y.lang;return E===navigator.language&&y.localService===!0})[0],m===void 0&&(m=this.voices.filter(y=>{var E=y.lang;return E.includes(navigator.language)&&y.localService===!0})[0]),W&&console.log("defaultVoice",m),l?(W&&console.log("initialVoice"),a.voice=l):f?(W&&console.log("publicationVoice"),a.voice=f):m&&(W&&console.log("defaultVoice"),a.voice=m),a.voice!==void 0&&a.voice!==null&&(a.lang=a.voice.lang,W&&console.log("utterance.voice.lang",a.voice.lang),W&&console.log("utterance.lang",a.lang)),W&&console.log("navigator.language",navigator.language),a.onboundary=y=>{this.updateTTSInfo(r,y.charIndex,y.charLength,a.text)},setTimeout(()=>{window.speechSynthesis.speak(a),c.speaking||window.speechSynthesis.pause()},0);var c=this;a.onend=function(){c.speaking&&c.ttsPlayQueueIndexDebounced(t+1,n)}}updateTTSInfo(t,n,r,o){if(!t)return;let a=o||sT(t);if(n>=0&&o){let s=o.slice(0,n+1).search(/\S+$/),l=o.slice(n).search(/\s/),c=l<0?o.slice(s):o.slice(s,l+n),h=s+c.length;this.wrapHighlightWord(t,o,n,r,c,s,h)}return a}wrapHighlightWord(t,n,r,o,a,s,l){this._ttsQueueItemHighlightsWord&&(this.delegate.highlighter.destroyHighlights(Qe.ReadAloud),this._ttsQueueItemHighlightsWord=void 0);let c=t.item,h=t.item.combinedText,f=r;if(c.combinedTextSentences&&c.combinedTextSentencesRangeBegin&&c.combinedTextSentencesRangeEnd&&t.iSentence>=0&&(f+=c.combinedTextSentencesRangeBegin[t.iSentence],h=c.combinedTextSentences[t.iSentence]),W){n!==h&&console.log("TTS utteranceText DIFF?? ",`[[${n}]]`,`[[${h}]]`);let T=n.substr(r,o);T!==a&&console.log("TTS word DIFF?? ",`[[${T}]]`,`[[${a}]]`,`${r}--${o}`,`${s}--${l-s}`)}let v=0,m,y=-1,E,_=-1,C=f+o;for(let T of c.textNodes){if(!T.nodeValue&&T.nodeValue!=="")continue;let L=T.nodeValue.length;if(v+=L,m||f<v&&(m=T,y=L-(v-f)),m&&C<=v){E=T,_=L-(v-C);break}}if(m&&E){let L=function(q){try{return Wn(q,A.delegate.iframes[0].contentDocument,ho)}catch(ye){return console.log("uniqueCssSelector:"),console.log(ye),""}},T=new Range;T.setStart(m,y),T.setEnd(E,_);var A=this;let j=kr(T,L);if(!j)return;let N=this.delegate.highlighter.createHighlight(this.delegate.iframes[0].contentWindow,{rangeInfo:j,cleanText:"",rawText:"",range:void 0},this.tts.color,!1,et.Custom,{id:"tts",title:"",position:"right"},null,{defaultClass:this.tts.color},Qe.ReadAloud,"R2_READALOUD_");this._ttsQueueItemHighlightsWord=N[0],this.delegate.view.isScrollMode()&&this.tts.autoScroll&&!this.userScrolled&&N[1].firstChild.scrollIntoView({block:"center",behavior:"smooth"})}}};function rT(i){let t=i;for(;t&&t.nodeType===Node.ELEMENT_NODE;){let n=t.getAttribute("xml:lang");if(n||(n=t.getAttributeNS("http://www.w3.org/XML/1998/namespace","lang")),n||(n=t.getAttribute("lang")),n)return n;t=t.parentNode}}function BF(i){let t=i;for(;t&&t.nodeType===Node.ELEMENT_NODE;){let n=t.getAttribute("dir");if(n)return n;t=t.parentNode}}function IF(i,t){if(i&&i.length){let n="";for(let r of i)r.nodeValue&&(n+=t?r.nodeValue:HF(r.nodeValue));return n}return""}function NF(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function HF(i){return NF(i).replace(/\n/g," ").replace(/\s\s+/g," ")}function oT(i,t){let n=-1,r=-1;for(let o of i)if(r++,o.combinedTextSentences){let a=-1;for(let s of o.combinedTextSentences)if(a++,n++,t===n)return{item:o,iArray:r,iGlobal:n,iSentence:a}}else if(n++,t===n)return{item:o,iArray:r,iGlobal:n,iSentence:-1}}function sT(i){return i.iSentence===-1?i.item.combinedText:i.item.combinedTextSentences?i.item.combinedTextSentences[i.iSentence]:""}S();var Ml=Tt(Rd());var yh=class{constructor(t,n,r,o,a){this.currentChapterPopupResult=[];this.currentPopupHighlights=[];this.delegate=t,this.publication=n,this.properties=r,this.api=o,this.highlighter=a}static async create(t){let n=new this(t.delegate,t.publication,t,t.api,t.highlighter);return await n.start(),n}async stop(){W&&console.log("Definitions module stop")}async start(){this.delegate.definitionsModule=this}async searchAndPaint(t,n){let r=this.publication.getAbsoluteHref(this.publication.readingOrder[this.delegate.currentResource()].Href),o=this.publication.getTOCItem(r);o===null&&(o=this.publication.readingOrder[this.delegate.currentResource()]);let a=[],s=this.publication.getAbsoluteHref(o.Href);await fetch(s).then(l=>l.text()).then(async l=>{t.terms.forEach((c,h)=>{console.log(c),da(c,this.delegate.iframes[0].contentDocument,o.Href,o.Title).then(f=>{let v;t.result==1?v=0:t.result==2&&(v=Math.floor(Math.random()*f.length-1)+1),console.log(v),f.forEach((m,y)=>{if(v===void 0||v===y){let E={rangeInfo:m.rangeInfo,cleanText:null,rawText:null,range:null};setTimeout(()=>{let _=this.highlighter.createPopupHighlight(E,t);m.highlight=_,a.push(Ml.omit(_,"definition")),this.currentChapterPopupResult.push(m),this.currentPopupHighlights.push(_)},500)}}),h==t.terms.length-1&&setTimeout(()=>{n(a)},500)})})})}async definitions(){for(let t of this.properties.definitions)await this.define(t)}async define(t){await this.searchAndPaint(t,async n=>{this.api?.success&&(this.api?.success(Ml.omit(t,"callbacks"),n),this.api?.visible&&n.forEach(r=>{console.log(this.delegate.iframes[0].contentDocument);let a=this.delegate.iframes[0].contentDocument.querySelector(`#${r.id}`).querySelectorAll(`.${vn}`);new IntersectionObserver((l,c)=>{l.forEach(h=>{h.intersectionRatio==1&&this.api?.visible(Ml.omit(t,"callbacks"),Ml.omit(r,"definition"))})},{threshold:1}).observe(a[0])}))})}drawDefinitions(){setTimeout(async()=>{await this.definitions()},100)}async handleResize(){await this.highlighter.destroyHighlights(Qe.Popup),this.drawDefinitions()}};var ss=class{constructor(t,n,r,o,a,s,l,c,h,f,v,m,y,E){this.settings=t;this.ttsSettings=n;this.navigator=r;this.highlighter=o;this.bookmarkModule=a;this.annotationModule=s;this.ttsModule=l;this.searchModule=c;this.definitionsModule=h;this.contentProtectionModule=f;this.timelineModule=v;this.mediaOverlaySettings=m;this.mediaOverlayModule=y;this.pageBreakModule=E;this.startReadAloud=()=>this.navigator.startReadAloud();this.stopReadAloud=()=>this.navigator.stopReadAloud();this.pauseReadAloud=()=>this.navigator.pauseReadAloud();this.resumeReadAloud=()=>this.navigator.resumeReadAloud();this.startReadAlong=()=>this.navigator.startReadAlong();this.stopReadAlong=()=>this.navigator.stopReadAlong();this.pauseReadAlong=()=>this.navigator.pauseReadAlong();this.resumeReadAlong=()=>this.navigator.resumeReadAlong();this.saveBookmark=async()=>{if(this.navigator.rights?.enableBookmarks)return await this.bookmarkModule.saveBookmark()};this.saveBookmarkPlus=async()=>{if(this.navigator.rights?.enableBookmarks)return this.bookmarkModule.saveBookmarkPlus()};this.deleteBookmark=async t=>{if(this.navigator.rights?.enableBookmarks)return await this.bookmarkModule.deleteBookmark(t)};this.deleteAnnotation=async t=>await this.annotationModule?.deleteAnnotation(t);this.addAnnotation=async t=>await this.annotationModule?.addAnnotation(t);this.hideAnnotationLayer=()=>this.annotationModule?.hideAnnotationLayer();this.showAnnotationLayer=()=>this.annotationModule?.showAnnotationLayer();this.activateMarker=(t,n)=>this.navigator?.activateMarker(t,n);this.deactivateMarker=()=>this.navigator?.deactivateMarker();this.tableOfContents=async()=>await Cl(this.navigator.tableOfContents());this.readingOrder=async()=>await Cl(this.navigator.readingOrder());this.bookmarks=async()=>this.navigator.rights?.enableBookmarks?await this.bookmarkModule.getBookmarks():[];this.annotations=async()=>await this.annotationModule?.getAnnotations()??[];this.search=async(t,n)=>this.navigator.rights?.enableSearch?await this.searchModule?.search(t,n):[];this.goToSearchIndex=async(t,n,r)=>{this.navigator.rights?.enableSearch&&await this.searchModule?.goToSearchIndex(t,n,r)};this.goToSearchID=async(t,n,r)=>{this.navigator.rights?.enableSearch&&await this.searchModule?.goToSearchID(t,n,r)};this.clearSearch=async()=>{this.navigator.rights?.enableSearch&&await this.searchModule?.clearSearch()};this.currentResource=()=>this.navigator.currentResource();this.mostRecentNavigatedTocItem=()=>this.navigator.mostRecentNavigatedTocItem();this.totalResources=()=>this.navigator.totalResources();this.resetUserSettings=async()=>await this.settings.resetUserSettings();this.applyUserSettings=async t=>await this.settings.applyUserSettings(t);this.currentSettings=()=>this.settings.currentSettings;this.scroll=async t=>await this.settings.scroll(t);this.increase=async t=>{this.isTTSIncrementable(t)?this.navigator.rights?.enableTTS&&await this.ttsSettings.increase(t):this.isMOIncrementable(t)?this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.increase(t):await this.settings.increase(t)};this.decrease=async t=>{this.isTTSIncrementable(t)?this.navigator.rights?.enableTTS&&await this.ttsSettings.decrease(t):this.isMOIncrementable(t)?this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.decrease(t):await this.settings.decrease(t)};this.resetTTSSettings=()=>{this.navigator.rights?.enableTTS&&this.ttsSettings.resetTTSSettings()};this.applyTTSSettings=t=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyTTSSettings(t)};this.applyTTSSetting=(t,n)=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyTTSSetting(t,n)};this.applyPreferredVoice=t=>{this.navigator.rights?.enableTTS&&this.ttsSettings.applyPreferredVoice(t)};this.resetMediaOverlaySettings=async()=>{this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.resetMediaOverlaySettings()};this.applyMediaOverlaySettings=async t=>{this.navigator.rights?.enableMediaOverlays&&await this.mediaOverlaySettings.applyMediaOverlaySettings(t)};this.goTo=async t=>{this.navigator.goTo(t)};this.goToPosition=async t=>this.navigator.goToPosition(t);this.nextResource=async()=>{this.navigator.nextResource()};this.previousResource=async()=>{this.navigator.previousResource()};this.nextPage=async()=>{this.navigator.nextPage()};this.previousPage=async()=>{this.navigator.previousPage()};this.atStart=async()=>this.navigator.atStart();this.atEnd=async()=>this.navigator.atEnd();this.snapToElement=async t=>{this.navigator.snapToElement(t)};this.applyAttributes=t=>{this.navigator.applyAttributes(t)};this.stop=()=>{document.body.onscroll=()=>{},this.navigator.stop(),this.settings.stop(),this.ttsSettings?.stop(),this.ttsSettings.enableSplitter?this.ttsModule?.stop():this.ttsModule?.stop(),this.bookmarkModule?.stop(),this.annotationModule?.stop(),this.searchModule?.stop(),this.definitionsModule?.stop(),this.contentProtectionModule?.stop(),this.timelineModule?.stop(),this.mediaOverlaySettings?.stop(),this.mediaOverlayModule?.stop(),this.pageBreakModule?.stop()}}static async build(t){t.rights?.enableContentProtection&&t.protection&&await El.setupPreloadProtection(t.protection);let n=Bt(document,"#D2Reader-Container"),r=ve(document,"#headerMenu"),o=ve(document,"#footerMenu"),a=t.url,s=new _l({prefix:a.href,useLocalStorage:t.useLocalStorage??!1}),l=new _l({prefix:"r2d2bc-reader",useLocalStorage:t.useLocalStorage??!1}),c=new rs({store:s}),h=t.upLinkUrl??void 0,f=await Yr.fromUrl(a),v=DF(t,f);f.sample=v.sample,v.rights?.autoGeneratePositions??!0?await f.autoGeneratePositions():(v.services?.positions&&await f.fetchPositionsFromService(v.services?.positions.href),v.services?.weight&&await f.fetchWeightsFromService(v.services?.weight.href));let m=await Jo.create({store:l,initialUserSettings:v.userSettings,headerMenu:r,material:v.material,api:v.api,injectables:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?v.injectablesFixed:v.injectables,layout:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?"fixed":"reflowable"}),y=await fn.create({mainElement:n,headerMenu:r,footerMenu:o,publication:f,settings:m,annotator:c,upLink:h,initialLastReadingPosition:v.lastReadingPosition,material:v.material,api:v.api,rights:v.rights,tts:v.tts,sample:v.sample,injectables:(f.Metadata.Rendition?.Layout??"unknown")==="fixed"?v.injectablesFixed:v.injectables,attributes:v.attributes,services:v.services}),_=!0?await Ue.create(Ze({delegate:y},v.highlighter)):void 0,C=v.rights?.enableBookmarks?await oa.create(Ze({annotator:c,headerMenu:r,rights:v.rights,publication:f,delegate:y,initialAnnotations:v.initialAnnotations},v.bookmarks)):void 0,A=v.rights?.enableAnnotations?await ra.create(Ze({annotator:c,headerMenu:r,rights:v.rights,publication:f,delegate:y,initialAnnotations:v.initialAnnotations,highlighter:_},v.annotations)):void 0,T=v.rights?.enableTTS,L=T?await k0.create(Ze({store:l,initialTTSSettings:v.tts,headerMenu:r},v.tts)):void 0,j=T&&v.tts.enableSplitter?await oh.create(Ze({delegate:y,tts:L,headerMenu:r,rights:v.rights,highlighter:_},v.tts)):T&&!v.tts.enableSplitter?await vh.create(Ze({delegate:y,tts:L,headerMenu:r,rights:v.rights,highlighter:_},v.tts)):void 0,N=v.rights?.enableSearch?await Qd.create(Ze({headerMenu:r,delegate:y,publication:f,highlighter:_},v.search)):void 0,q=v.rights?.enableDefinitions?await yh.create(Ze({delegate:y,publication:f,highlighter:_},v.define)):void 0,ye=v.rights?.enableTimeline?await Bd.create({publication:f,delegate:y}):void 0,Z=v.rights?.enableContentProtection?await El.create(Ze({delegate:y},v.protection)):void 0,te=v.rights?.enableMediaOverlays??!1,le=te?await c0.create(Ze({store:l,initialMediaOverlaySettings:v.mediaOverlays,headerMenu:r},v.mediaOverlays)):void 0,X=te?await Pd.create(Ze({publication:f,settings:le,delegate:y},v.mediaOverlays)):void 0,se=f.isReflowable?await rh.create({publication:f,headerMenu:r,delegate:y}):void 0;return new ss(m,L,y,_,C,A,j,N,q,Z,ye,le,X,se)}get publicationLanguage(){return this.navigator.publication.Metadata.Language}isTTSIncrementable(t){return t==="pitch"||t==="rate"||t==="volume"}isMOIncrementable(t){return t==="mo_volume"}get currentLocator(){return this.navigator.currentLocator()}get positions(){return this.navigator.positions()}};function DF(i,t){return t.isFixedLayout&&(i.rights||(i.rights={}),i.rights.enableAnnotations=!1,i.rights.enableSearch=!1,i.rights.enableTTS=!1),i}var jF=ss,FF=ss.build;return $F;})();
|
|
85
85
|
/*!
|
|
86
86
|
* Materialize v1.0.0 (http://materializecss.com)
|
|
87
87
|
* Copyright 2014-2017 Materialize
|