text: var Readometer=function(t,e,n){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var o=function(t){return t&&t.Math==Math&&t},c=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||Function("return this")(),l=function(t){try{return!!t()}catch(t){return!0}},u=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,f={f:a&&!s.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:s},h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,g=function(t){return p.call(t).slice(8,-1)},d="".split,v=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==g(t)?d.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=function(t){return v(m(t))},b=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!b(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!b(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!b(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!b(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,w=function(t,e){return S.call(t,e)},x=c.document,T=b(x)&&b(x.createElement),O=function(t){return T?x.createElement(t):{}},I=!u&&!l((function(){return 7!=Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a})),_=Object.getOwnPropertyDescriptor,j={f:u?_:function(t,e){if(t=y(t),e=E(e,!0),I)try{return _(t,e)}catch(t){}if(w(t,e))return h(!f.f.call(t,e),t[e])}},R=function(t){if(!b(t))throw TypeError(String(t)+" is not an object");return t},A=Object.defineProperty,N={f:u?A:function(t,e,n){if(R(t),e=E(e,!0),R(n),I)try{return A(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},P=u?function(t,e,n){return N.f(t,e,h(1,n))}:function(t,e,n){return t[e]=n,t},M=function(t,e){try{P(c,t,e)}catch(n){c[t]=e}return e},k=c["__core-js_shared__"]||M("__core-js_shared__",{}),C=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(t){return C.call(t)});var F,L,D,U=k.inspectSource,V=c.WeakMap,W="function"==typeof V&&/native code/.test(U(V)),$=i((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),G=0,B=Math.random(),H=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+B).toString(36)},Y=$("keys"),K=function(t){return Y[t]||(Y[t]=H(t))},X={},z=c.WeakMap;if(W){var q=new z,J=q.get,Q=q.has,Z=q.set;F=function(t,e){return Z.call(q,t,e),e},L=function(t){return J.call(q,t)||{}},D=function(t){return Q.call(q,t)}}else{var tt=K("state");X[tt]=!0,F=function(t,e){return P(t,tt,e),e},L=function(t){return w(t,tt)?t[tt]:{}},D=function(t){return w(t,tt)}}var et,nt,rt={set:F,get:L,has:D,enforce:function(t){return D(t)?L(t):F(t,{})},getterFor:function(t){return function(e){var n;if(!b(e)||(n=L(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},it=i((function(t){var e=rt.get,n=rt.enforce,r=String(String).split("String");(t.exports=function(t,e,i,o){var l=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||w(i,"name")||P(i,"name",e),n(i).source=r.join("string"==typeof e?e:"")),t!==c?(l?!s&&t[e]&&(u=!0):delete t[e],u?t[e]=i:P(t,e,i)):u?t[e]=i:M(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||U(this)}))})),ot=c,ct=function(t){return"function"==typeof t?t:void 0},lt=function(t,e){return arguments.length<2?ct(ot[t])||ct(c[t]):ot[t]&&ot[t][e]||c[t]&&c[t][e]},ut=Math.ceil,st=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?st:ut)(t)},ft=Math.min,ht=function(t){return t>0?ft(at(t),9007199254740991):0},pt=Math.max,gt=Math.min,dt=function(t){return function(e,n,r){var i,o=y(e),c=ht(o.length),l=function(t,e){var n=at(t);return n<0?pt(n+e,0):gt(n,e)}(r,c);if(t&&n!=n){for(;c>l;)if((i=o[l++])!=i)return!0}else for(;c>l;l++)if((t||l in o)&&o[l]===n)return t||l||0;return!t&&-1}},vt={includes:dt(!0),indexOf:dt(!1)}.indexOf,mt=function(t,e){var n,r=y(t),i=0,o=[];for(n in r)!w(X,n)&&w(r,n)&&o.push(n);for(;e.length>i;)w(r,n=e[i++])&&(~vt(o,n)||o.push(n));return o},yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=yt.concat("length","prototype"),Et={f:Object.getOwnPropertyNames||function(t){return mt(t,bt)}},St={f:Object.getOwnPropertySymbols},wt=lt("Reflect","ownKeys")||function(t){var e=Et.f(R(t)),n=St.f;return n?e.concat(n(t)):e},xt=function(t,e){for(var n=wt(e),r=N.f,i=j.f,o=0;o<n.length;o++){var c=n[o];w(t,c)||r(t,c,i(e,c))}},Tt=/#|\.prototype\./,Ot=function(t,e){var n=_t[It(t)];return n==Rt||n!=jt&&("function"==typeof e?l(e):!!e)},It=Ot.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},_t=Ot.data={},jt=Ot.NATIVE="N",Rt=Ot.POLYFILL="P",At=Ot,Nt=j.f,Pt=function(t,e){var n,r,i,o,l,u=t.target,s=t.global,a=t.stat;if(n=s?c:a?c[u]||M(u,{}):(c[u]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(l=Nt(n,r))&&l.value:n[r],!At(s?r:u+(a?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;xt(o,i)}(t.sham||i&&i.sham)&&P(o,"sham",!0),it(n,r,o,t)}},Mt=Array.isArray||function(t){return"Array"==g(t)},kt=function(t){return Object(m(t))},Ct=function(t,e,n){var r=E(e);r in t?N.f(t,r,h(0,n)):t[r]=n},Ft=!!Object.getOwnPropertySymbols&&!l((function(){return!String(Symbol())})),Lt=Ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Dt=$("wks"),Ut=c.Symbol,Vt=Lt?Ut:Ut&&Ut.withoutSetter||H,Wt=function(t){return w(Dt,t)||(Ft&&w(Ut,t)?Dt[t]=Ut[t]:Dt[t]=Vt("Symbol."+t)),Dt[t]},$t=Wt("species"),Gt=function(t,e){var n;return Mt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Mt(n.prototype)?b(n)&&null===(n=n[$t])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Bt=lt("navigator","userAgent")||"",Ht=c.process,Yt=Ht&&Ht.versions,Kt=Yt&&Yt.v8;Kt?nt=(et=Kt.split("."))[0]+et[1]:Bt&&(!(et=Bt.match(/Edge\/(\d+)/))||et[1]>=74)&&(et=Bt.match(/Chrome\/(\d+)/))&&(nt=et[1]);var Xt=nt&&+nt,zt=Wt("species"),qt=function(t){return Xt>=51||!l((function(){var e=[];return(e.constructor={})[zt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Jt=Wt("isConcatSpreadable"),Qt=Xt>=51||!l((function(){var t=[];return t[Jt]=!1,t.concat()[0]!==t})),Zt=qt("concat"),te=function(t){if(!b(t))return!1;var e=t[Jt];return void 0!==e?!!e:Mt(t)};Pt({target:"Array",proto:!0,forced:!Qt||!Zt},{concat:function(t){var e,n,r,i,o,c=kt(this),l=Gt(c,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?c:arguments[e],te(o)){if(u+(i=ht(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,u++)n in o&&Ct(l,u,o[n])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ct(l,u++,o)}return l.length=u,l}});var ee=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ne=[].push,re=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,c=5==t||o;return function(l,u,s,a){for(var f,h,p=kt(l),g=v(p),d=function(t,e,n){if(ee(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}(u,s,3),m=ht(g.length),y=0,b=a||Gt,E=e?b(l,m):n?b(l,0):void 0;m>y;y++)if((c||y in g)&&(h=d(f=g[y],y,p),t))if(e)E[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:ne.call(E,f)}else if(i)return!1;return o?-1:r||i?i:E}},ie={forEach:re(0),map:re(1),filter:re(2),some:re(3),every:re(4),find:re(5),findIndex:re(6)},oe=Object.defineProperty,ce={},le=function(t){throw t},ue=ie.filter,se=qt("filter"),ae=function(t,e){if(w(ce,t))return ce[t];e||(e={});var n=[][t],r=!!w(e,"ACCESSORS")&&e.ACCESSORS,i=w(e,0)?e[0]:le,o=w(e,1)?e[1]:void 0;return ce[t]=!!n&&!l((function(){if(r&&!u)return!0;var t={length:-1};r?oe(t,1,{enumerable:!0,get:le}):t[1]=1,n.call(t,i,o)}))}("filter");Pt({target:"Array",proto:!0,forced:!se||!ae},{filter:function(t){return ue(this,t,arguments.length>1?arguments[1]:void 0)}});var fe,he=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!b(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),pe=function(t,e,n){var r,i;return he&&"function"==typeof(r=e.constructor)&&r!==n&&b(i=r.prototype)&&i!==n.prototype&&he(t,i),t},ge=Object.keys||function(t){return mt(t,yt)},de=u?Object.defineProperties:function(t,e){R(t);for(var n,r=ge(e),i=r.length,o=0;i>o;)N.f(t,n=r[o++],e[n]);return t},ve=lt("document","documentElement"),me=K("IE_PROTO"),ye=function(){},be=function(t){return"<script>"+t+"<\/script>"},Ee=function(){try{fe=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Ee=fe?function(t){t.write(be("")),t.close();var e=t.parentWindow.Object;return t=null,e}(fe):((e=O("iframe")).style.display="none",ve.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(be("document.F=Object")),t.close(),t.F);for(var n=yt.length;n--;)delete Ee.prototype[yt[n]];return Ee()};X[me]=!0;var Se=Object.create||function(t,e){var n;return null!==t?(ye.prototype=R(t),n=new ye,ye.prototype=null,n[me]=t):n=Ee(),void 0===e?n:de(n,e)},we="[\t\n\v\f\r                　\u2028\u2029\ufeff]",xe=RegExp("^"+we+we+"*"),Te=RegExp(we+we+"*$"),Oe=function(t){return function(e){var n=String(m(e));return 1&t&&(n=n.replace(xe,"")),2&t&&(n=n.replace(Te,"")),n}},Ie={start:Oe(1),end:Oe(2),trim:Oe(3)},_e=Et.f,je=j.f,Re=N.f,Ae=Ie.trim,Ne=c.Number,Pe=Ne.prototype,Me="Number"==g(Se(Pe)),ke=function(t){var e,n,r,i,o,c,l,u,s=E(t,!1);if("string"==typeof s&&s.length>2)if(43===(e=(s=Ae(s)).charCodeAt(0))||45===e){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+s}for(c=(o=s.slice(2)).length,l=0;l<c;l++)if((u=o.charCodeAt(l))<48||u>i)return NaN;return parseInt(o,r)}return+s};if(At("Number",!Ne(" 0o1")||!Ne("0b1")||Ne("+0x1"))){for(var Ce,Fe=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof Fe&&(Me?l((function(){Pe.valueOf.call(n)})):"Number"!=g(n))?pe(new Ne(ke(e)),n,Fe):ke(e)},Le=u?_e(Ne):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),De=0;Le.length>De;De++)w(Ne,Ce=Le[De])&&!w(Fe,Ce)&&Re(Fe,Ce,je(Ne,Ce));Fe.prototype=Pe,Pe.constructor=Fe,it(c,"Number",Fe)}var Ue=Ie.trim,Ve=c.parseFloat,We=1/Ve("\t\n\v\f\r                　\u2028\u2029\ufeff-0")!=-1/0?function(t){var e=Ue(String(t)),n=Ve(e);return 0===n&&"-"==e.charAt(0)?-0:n}:Ve;Pt({target:"Number",stat:!0,forced:Number.parseFloat!=We},{parseFloat:We});var $e=function(){var t=R(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function Ge(t,e){return RegExp(t,e)}var Be,He,Ye={UNSUPPORTED_Y:l((function(){var t=Ge("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:l((function(){var t=Ge("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Ke=RegExp.prototype.exec,Xe=String.prototype.replace,ze=Ke,qe=(Be=/a/,He=/b*/g,Ke.call(Be,"a"),Ke.call(He,"a"),0!==Be.lastIndex||0!==He.lastIndex),Je=Ye.UNSUPPORTED_Y||Ye.BROKEN_CARET,Qe=void 0!==/()??/.exec("")[1];(qe||Qe||Je)&&(ze=function(t){var e,n,r,i,o=this,c=Je&&o.sticky,l=$e.call(o),u=o.source,s=0,a=t;return c&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),a=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(u="(?: "+u+")",a=" "+a,s++),n=new RegExp("^(?:"+u+")",l)),Qe&&(n=new RegExp("^"+u+"$(?!\\s)",l)),qe&&(e=o.lastIndex),r=Ke.call(c?n:o,a),c?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:qe&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),Qe&&r&&r.length>1&&Xe.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var Ze=ze;Pt({target:"RegExp",proto:!0,forced:/./.exec!==Ze},{exec:Ze});var tn=Wt("species"),en=!l((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),nn="$0"==="a".replace(/./,"$0"),rn=Wt("replace"),on=!!/./[rn]&&""===/./[rn]("a","$0"),cn=!l((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),ln=Wt("match"),un=Wt("species"),sn=function(t){return function(e,n){var r,i,o=String(m(e)),c=at(n),l=o.length;return c<0||c>=l?t?"":void 0:(r=o.charCodeAt(c))<55296||r>56319||c+1===l||(i=o.charCodeAt(c+1))<56320||i>57343?t?o.charAt(c):r:t?o.slice(c,c+2):i-56320+(r-55296<<10)+65536}},an={codeAt:sn(!1),charAt:sn(!0)}.charAt,fn=function(t,e,n){return e+(n?an(t,e).length:1)},hn=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==g(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ze.call(t,e)},pn=[].push,gn=Math.min,dn=!l((function(){return!RegExp(4294967295,"y")}));!function(t,e,n,r){var i=Wt(t),o=!l((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),c=o&&!l((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[tn]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!c||"replace"===t&&(!en||!nn||on)||"split"===t&&!cn){var u=/./[i],s=n(i,""[t],(function(t,e,n,r,i){return e.exec===Ze?o&&!i?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:nn,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:on}),a=s[0],f=s[1];it(String.prototype,t,a),it(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}r&&P(RegExp.prototype[i],"sham",!0)}("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r,i,o=String(m(this)),c=void 0===n?4294967295:n>>>0;if(0===c)return[];if(void 0===t)return[o];if(!b(r=t)||!(void 0!==(i=r[ln])?i:"RegExp"==g(r)))return e.call(o,t,c);for(var l,u,s,a=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,p=new RegExp(t.source,f+"g");(l=Ze.call(p,o))&&!((u=p.lastIndex)>h&&(a.push(o.slice(h,l.index)),l.length>1&&l.index<o.length&&pn.apply(a,l.slice(1)),s=l[0].length,h=u,a.length>=c));)p.lastIndex===l.index&&p.lastIndex++;return h===o.length?!s&&p.test("")||a.push(""):a.push(o.slice(h)),a.length>c?a.slice(0,c):a}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=m(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var c=R(t),l=String(this),u=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[un])?e:ee(n)}(c,RegExp),s=c.unicode,a=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(dn?"y":"g"),f=new u(dn?c:"^(?:"+c.source+")",a),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===l.length)return null===hn(f,l)?[l]:[];for(var p=0,g=0,d=[];g<l.length;){f.lastIndex=dn?g:0;var v,m=hn(f,dn?l:l.slice(g));if(null===m||(v=gn(ht(f.lastIndex+(dn?0:g)),l.length))===p)g=fn(l,g,s);else{if(d.push(l.slice(p,g)),d.length===h)return d;for(var y=1;y<=m.length-1;y++)if(d.push(m[y]),d.length===h)return d;g=p=v}}return d.push(l.slice(p)),d}]}),!dn);var vn=[].slice,mn=function(t){return function(e,n){var r=arguments.length>2,i=r?vn.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};Pt({global:!0,bind:!0,forced:/MSIE .\./.test(Bt)},{setTimeout:mn(c.setTimeout),setInterval:mn(c.setInterval)});var yn={default:180,ar:138,ch:158,nl:202,en:228,fi:161,fr:195,de:179,iw:187,it:188,jp:193,pl:166,pt:181,ru:184,sl:180,sp:218,sv:199,tr:166};function bn(){t.call(this,{}),this.isWindowVisible=!0,this.visibilityStateListener=e(),this.visibilityStateListener.start(),this.visibilityStateListener.emitter.on("update",function(){this.isWindowVisible="visible"==this.visibilityStateListener.getState()}.bind(this))}return bn.prototype=Object.create(t.prototype),bn.prototype.constructor=bn,bn.prototype.clearMemory=function(t){this.element=t,this.progress=0,this.reading=!1,this.readingTime=0,this.targetReadingTime=0,this.milestones=[],this.absMilestones=[],this.distance=this.getElementDistanceFromTop(this.element),this.hasScroll=null,this.viewport=n.domkit.getViewportDimensions(),this.lastTimestamp=0,this.timeInterval=null},bn.prototype.start=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";if(n.typekit.isDOMElement(t)){this.clearMemory(t);var i=n.objectkit.getProp(yn,r,"default"),o=this.element.innerText.split(" ").filter((function(t){return t.length>1}));this.targetReadingTime=Math.floor(o.length/i*60);var c=this.element.scrollHeight,l=this.element.clientHeight;this.hasScroll=c!==l;for(var u=this.viewport.height<l?this.viewport.height:l,s=this.hasScroll?0:this.distance,a=1;a<=Math.floor(c/u);a++)this.milestones.push(s+u*a);return(this.hasScroll||l>this.viewport.height)&&this.milestones.push(s+c),this.absMilestones=[].concat(this.milestones),this.onScroll(),this.hasScroll?this.element.onscroll=n.functionkit.debounce(this.onScroll.bind(this),300):window.onscroll=n.functionkit.debounce(this.onScroll.bind(this),300),this.timeInterval=setInterval((function(){return e.checkReadingTime()}),1e3),this}},bn.prototype.onScroll=function(){if(this.checkReadingTime()&&0!==this.milestones.length){var t=document.documentElement.scrollTop||document.body.scrollTop||0,e=this.viewport.height<this.element.clientHeight?this.viewport.height:this.element.clientHeight;(this.hasScroll?this.element.scrollTop+e:t+this.viewport.height)>=this.milestones[0]&&(this.milestones.shift(),this.checkProgress())}},bn.prototype.checkReadingTime=function(){var t=document.documentElement.scrollTop||document.body.scrollTop||0,e=this.distance-t,n=this.viewport.height-e>0,r=this.distance+this.element.clientHeight-t>0,i=!0===n&&!0===r&&!0===this.isWindowVisible,o=this.getTimestamp();return i?!1===this.reading?(this.lastTimestamp=o,this.reading=!0):!0===this.reading&&(this.readingTime+=o-this.lastTimestamp,this.lastTimestamp=o):!0===this.reading&&(this.readingTime+=o-this.lastTimestamp,this.reading=!1),this.checkProgress(),i},bn.prototype.checkProgress=function(){var t=Number.parseFloat((this.absMilestones.length-this.milestones.length)/this.absMilestones.length*100),e=this.targetReadingTime,n=Math.ceil(this.readingTime/e*100),r=0;r=n>=t?t:t>=75&&n>=75||t>=50&&n>=50?n:0,this.progress!==r&&r>this.progress&&(this.progress=r,this.emit("progress",Math.ceil(this.progress)),100===Math.ceil(this.progress)&&(clearInterval(this.timeInterval),this.timeInterval=null,this.hasScroll?this.element.onscroll=null:window.onscroll=null))},bn.prototype.getTimestamp=function(){return Math.ceil(Date.now()/1e3)},bn.prototype.getElementDistanceFromTop=function(t){for(var e=t.offsetTop,r=t.parentElement;n.validationkit.isNotEmpty(r);)e+=r.offsetTop,r=r.parentElement;return e},bn}(EventEmitterObject,VisibilityStateListener,Basekits);
  