Linux lionsclub 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.29 (Ubuntu)
: 161.35.52.75 | : 18.216.203.204
Cant Read [ /etc/named.conf ]
7.4.28
www-data
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
lions_digital /
flipbook /
javascript /
[ HOME SHELL ]
Name
Size
Permission
Action
style
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
BookPreview.js
46
KB
-rw-r--r--
FlipBookPlugins.min.js
26.57
KB
-rw-r--r--
LoadingJS.js
68.79
KB
-rw-r--r--
app.js
768.99
KB
-rw-r--r--
book.min.js
733.14
KB
-rw-r--r--
chunk-vendors.js
640.21
KB
-rw-r--r--
config.js
27.71
KB
-rw-r--r--
deString.js
186.86
KB
-rw-r--r--
editor.js
158
B
-rw-r--r--
flipHtml5.hiSlider2.min.js
420.18
KB
-rw-r--r--
jquery-3.5.1.min.js
87.38
KB
-rw-r--r--
main.min.js
1.4
MB
-rw-r--r--
pageItems.min.js
726.63
KB
-rw-r--r--
pdf.js
394.06
KB
-rw-r--r--
pdf.sandbox.js
614.32
KB
-rw-r--r--
pdf.worker.js
1.66
MB
-rw-r--r--
pwnkit
0
B
-rwxr-xr-x
resource_skeleton.js
3.36
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : book.min.js
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,c){b.raw=c;return b};$jscomp.arrayIteratorImpl=function(b){var c=0;return function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var c="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return c?c.call(b):$jscomp.arrayIterator(b)}; $jscomp.arrayFromIterator=function(b){for(var c,d=[];!(c=b.next()).done;)d.push(c.value);return d};$jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1; $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){if(b==Array.prototype||b==Object.prototype)return b;b[c]=d.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,c){var d=$jscomp.propertyToPolyfillSymbol[c];if(null==d)return b[c];d=b[d];return void 0!==d?d:b[c]}; $jscomp.polyfill=function(b,c,d,e){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,c,d,e):$jscomp.polyfillUnisolated(b,c,d,e))};$jscomp.polyfillUnisolated=function(b,c,d,e){d=$jscomp.global;b=b.split(".");for(e=0;e<b.length-1;e++){var f=b[e];if(!(f in d))return;d=d[f]}b=b[b.length-1];e=d[b];c=c(e);c!=e&&null!=c&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}; $jscomp.polyfillIsolated=function(b,c,d,e){var f=b.split(".");b=1===f.length;e=f[0];e=!b&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var g=0;g<f.length-1;g++){var h=f[g];if(!(h in e))return;e=e[h]}f=f[f.length-1];d=$jscomp.IS_SYMBOL_NATIVE&&"es6"===d?e[f]:null;c=c(d);null!=c&&(b?$jscomp.defineProperty($jscomp.polyfills,f,{configurable:!0,writable:!0,value:c}):c!==d&&(void 0===$jscomp.propertyToPolyfillSymbol[f]&&(d=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[f]=$jscomp.IS_SYMBOL_NATIVE? $jscomp.global.Symbol(f):$jscomp.POLYFILL_PREFIX+d+"$"+f),$jscomp.defineProperty(e,$jscomp.propertyToPolyfillSymbol[f],{configurable:!0,writable:!0,value:c})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},c={};try{return c.__proto__=b,c.a}catch(d){}return!1}; $jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");}; $jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1}; $jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(b){this.yieldResult=b};$jscomp.generator.Context.prototype.throw_=function(b){this.abruptCompletion_={exception:b,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(b){this.abruptCompletion_={return:b};this.nextAddress=this.finallyAddress_}; $jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(b){this.abruptCompletion_={jumpTo:b};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(b,c){this.nextAddress=c;return{value:b}};$jscomp.generator.Context.prototype.yieldAll=function(b,c){b=$jscomp.makeIterator(b);var d=b.next();$jscomp.generator.ensureIteratorResultIsObject_(d);if(d.done)this.yieldResult=d.value,this.nextAddress=c;else return this.yieldAllIterator_=b,this.yield(d.value,c)}; $jscomp.generator.Context.prototype.jumpTo=function(b){this.nextAddress=b};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(b,c){this.catchAddress_=b;void 0!=c&&(this.finallyAddress_=c)};$jscomp.generator.Context.prototype.setFinallyBlock=function(b){this.catchAddress_=0;this.finallyAddress_=b||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(b,c){this.nextAddress=b;this.catchAddress_=c||0}; $jscomp.generator.Context.prototype.enterCatchBlock=function(b){this.catchAddress_=b||0;b=this.abruptCompletion_.exception;this.abruptCompletion_=null;return b};$jscomp.generator.Context.prototype.enterFinallyBlock=function(b,c,d){d?this.finallyContexts_[d]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=b||0;this.finallyAddress_=c||0}; $jscomp.generator.Context.prototype.leaveFinallyBlock=function(b,c){c=this.finallyContexts_.splice(c||0)[0];if(c=this.abruptCompletion_=this.abruptCompletion_||c){if(c.isException)return this.jumpToErrorHandler_();void 0!=c.jumpTo&&this.finallyAddress_<c.jumpTo?(this.nextAddress=c.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=b};$jscomp.generator.Context.prototype.forIn=function(b){return new $jscomp.generator.Context.PropertyIterator(b)}; $jscomp.generator.Context.PropertyIterator=function(b){this.object_=b;this.properties_=[];for(var c in b)this.properties_.push(c);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var b=this.properties_.pop();if(b in this.object_)return b}return null};$jscomp.generator.Engine_=function(b){this.context_=new $jscomp.generator.Context;this.program_=b}; $jscomp.generator.Engine_.prototype.next_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,b,this.context_.next_);this.context_.next_(b);return this.nextStep_()}; $jscomp.generator.Engine_.prototype.return_=function(b){this.context_.start_();var c=this.context_.yieldAllIterator_;if(c)return this.yieldAllStep_("return"in c?c["return"]:function(d){return{value:d,done:!0}},b,this.context_.return);this.context_.return(b);return this.nextStep_()}; $jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],b,this.context_.next_);this.context_.throw_(b);return this.nextStep_()}; $jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,c,d){try{var e=b.call(this.context_.yieldAllIterator_,c);$jscomp.generator.ensureIteratorResultIsObject_(e);if(!e.done)return this.context_.stop_(),e;var f=e.value}catch(g){return this.context_.yieldAllIterator_=null,this.context_.throw_(g),this.nextStep_()}this.context_.yieldAllIterator_=null;d.call(this.context_,f);return this.nextStep_()}; $jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(c){this.context_.yieldResult=void 0,this.context_.throw_(c)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}}; $jscomp.generator.Generator_=function(b){this.next=function(c){return b.next_(c)};this.throw=function(c){return b.throw_(c)};this.return=function(c){return b.return_(c)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,c){c=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(c));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(c,b.prototype);return c}; $jscomp.asyncExecutePromiseGenerator=function(b){function c(e){return b.next(e)}function d(e){return b.throw(e)}return new Promise(function(e,f){function g(h){h.done?e(h.value):Promise.resolve(h.value).then(c,d).then(g,f)}g(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))}; $jscomp.initSymbol=function(){};$jscomp.polyfill("Symbol",function(b){if(b)return b;var c=function(g,h){this.$jscomp$symbol$id_=g;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:h})};c.prototype.toString=function(){return this.$jscomp$symbol$id_};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0,f=function(g){if(this instanceof f)throw new TypeError("Symbol is not a constructor");return new c(d+(g||"")+"_"+e++,g)};return f},"es6","es3"); $jscomp.polyfill("Symbol.iterator",function(b){if(b)return b;b=Symbol("Symbol.iterator");for(var c="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),d=0;d<c.length;d++){var e=$jscomp.global[c[d]];"function"===typeof e&&"function"!=typeof e.prototype[b]&&$jscomp.defineProperty(e.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return b},"es6", "es3");$jscomp.iteratorPrototype=function(b){b={next:b};b[Symbol.iterator]=function(){return this};return b}; $jscomp.polyfill("Promise",function(b){function c(){this.batch_=null}function d(h){return h instanceof f?h:new f(function(k,l){k(h)})}if(b&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return b;c.prototype.asyncExecute=function(h){if(null==this.batch_){this.batch_=[];var k=this;this.asyncExecuteFunction(function(){k.executeBatch_()})}this.batch_.push(h)}; var e=$jscomp.global.setTimeout;c.prototype.asyncExecuteFunction=function(h){e(h,0)};c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var h=this.batch_;this.batch_=[];for(var k=0;k<h.length;++k){var l=h[k];h[k]=null;try{l()}catch(n){this.asyncThrow_(n)}}}this.batch_=null};c.prototype.asyncThrow_=function(h){this.asyncExecuteFunction(function(){throw h;})};var f=function(h){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var k=this.createResolveAndReject_(); try{h(k.resolve,k.reject)}catch(l){k.reject(l)}};f.prototype.createResolveAndReject_=function(){function h(n){return function(p){l||(l=!0,n.call(k,p))}}var k=this,l=!1;return{resolve:h(this.resolveTo_),reject:h(this.reject_)}};f.prototype.resolveTo_=function(h){if(h===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(h instanceof f)this.settleSameAsPromise_(h);else{a:switch(typeof h){case "object":var k=null!=h;break a;case "function":k=!0;break a;default:k=!1}k?this.resolveToNonPromiseObj_(h): this.fulfill_(h)}};f.prototype.resolveToNonPromiseObj_=function(h){var k=void 0;try{k=h.then}catch(l){this.reject_(l);return}"function"==typeof k?this.settleSameAsThenable_(k,h):this.fulfill_(h)};f.prototype.reject_=function(h){this.settle_(2,h)};f.prototype.fulfill_=function(h){this.settle_(1,h)};f.prototype.settle_=function(h,k){if(0!=this.state_)throw Error("Cannot settle("+h+", "+k+"): Promise already settled in state"+this.state_);this.state_=h;this.result_=k;2===this.state_&&this.scheduleUnhandledRejectionCheck_(); this.executeOnSettledCallbacks_()};f.prototype.scheduleUnhandledRejectionCheck_=function(){var h=this;e(function(){if(h.notifyUnhandledRejection_()){var k=$jscomp.global.console;"undefined"!==typeof k&&k.error(h.result_)}},1)};f.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var h=$jscomp.global.CustomEvent,k=$jscomp.global.Event,l=$jscomp.global.dispatchEvent;if("undefined"===typeof l)return!0;"function"===typeof h?h=new h("unhandledrejection",{cancelable:!0}): "function"===typeof k?h=new k("unhandledrejection",{cancelable:!0}):(h=$jscomp.global.document.createEvent("CustomEvent"),h.initCustomEvent("unhandledrejection",!1,!0,h));h.promise=this;h.reason=this.result_;return l(h)};f.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var h=0;h<this.onSettledCallbacks_.length;++h)g.asyncExecute(this.onSettledCallbacks_[h]);this.onSettledCallbacks_=null}};var g=new c;f.prototype.settleSameAsPromise_=function(h){var k=this.createResolveAndReject_(); h.callWhenSettled_(k.resolve,k.reject)};f.prototype.settleSameAsThenable_=function(h,k){var l=this.createResolveAndReject_();try{h.call(k,l.resolve,l.reject)}catch(n){l.reject(n)}};f.prototype.then=function(h,k){function l(B,t){return"function"==typeof B?function(u){try{n(B(u))}catch(w){p(w)}}:t}var n,p,v=new f(function(B,t){n=B;p=t});this.callWhenSettled_(l(h,n),l(k,p));return v};f.prototype.catch=function(h){return this.then(void 0,h)};f.prototype.callWhenSettled_=function(h,k){function l(){switch(n.state_){case 1:h(n.result_); break;case 2:k(n.result_);break;default:throw Error("Unexpected state: "+n.state_);}}var n=this;null==this.onSettledCallbacks_?g.asyncExecute(l):this.onSettledCallbacks_.push(l);this.isRejectionHandled_=!0};f.resolve=d;f.reject=function(h){return new f(function(k,l){l(h)})};f.race=function(h){return new f(function(k,l){for(var n=$jscomp.makeIterator(h),p=n.next();!p.done;p=n.next())d(p.value).callWhenSettled_(k,l)})};f.all=function(h){var k=$jscomp.makeIterator(h),l=k.next();return l.done?d([]):new f(function(n, p){function v(u){return function(w){B[u]=w;t--;0==t&&n(B)}}var B=[],t=0;do B.push(void 0),t++,d(l.value).callWhenSettled_(v(B.length-1),p),l=k.next();while(!l.done)})};return f},"es6","es3");$jscomp.iteratorFromArray=function(b,c){b instanceof String&&(b+="");var d=0,e=!1,f={next:function(){if(!e&&d<b.length){var g=d++;return{value:c(g,b[g]),done:!1}}e=!0;return{done:!0,value:void 0}}};f[Symbol.iterator]=function(){return f};return f}; $jscomp.polyfill("Array.prototype.keys",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(c){return c})}},"es6","es3");$jscomp.findInternal=function(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{i:f,v:g}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(c,d){return $jscomp.findInternal(this,c,d).v}},"es6","es3"); $jscomp.checkStringArgs=function(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}; $jscomp.polyfill("String.prototype.startsWith",function(b){return b?b:function(c,d){var e=$jscomp.checkStringArgs(this,c,"startsWith");c+="";var f=e.length,g=c.length;d=Math.max(0,Math.min(d|0,e.length));for(var h=0;h<g&&d<f;)if(e[d++]!=c[h++])return!1;return h>=g}},"es6","es3");$jscomp.polyfill("Object.is",function(b){return b?b:function(c,d){return c===d?0!==c||1/c===1/d:c!==c&&d!==d}},"es6","es3"); $jscomp.polyfill("Array.prototype.includes",function(b){return b?b:function(c,d){var e=this;e instanceof String&&(e=String(e));var f=e.length;d=d||0;for(0>d&&(d=Math.max(d+f,0));d<f;d++){var g=e[d];if(g===c||Object.is(g,c))return!0}return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(b){return b?b:function(c,d){return-1!==$jscomp.checkStringArgs(this,c,"includes").indexOf(c,d||0)}},"es6","es3"); $jscomp.polyfill("String.prototype.endsWith",function(b){return b?b:function(c,d){var e=$jscomp.checkStringArgs(this,c,"endsWith");c+="";void 0===d&&(d=e.length);d=Math.max(0,Math.min(d|0,e.length));for(var f=c.length;0<f&&0<d;)if(e[--d]!=c[--f])return!1;return 0>=f}},"es6","es3"); $jscomp.polyfill("Array.prototype.fill",function(b){return b?b:function(c,d,e){var f=this.length||0;0>d&&(d=Math.max(0,f+d));if(null==e||e>f)e=f;e=Number(e);0>e&&(e=Math.max(0,f+e));for(d=Number(d||0);d<e;d++)this[d]=c;return this}},"es6","es3");$jscomp.typedArrayFill=function(b){return b?b:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5"); $jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5"); $jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Array.prototype.flat",function(b){return b?b:function(c){c=void 0===c?1:c;for(var d=[],e=0;e<this.length;e++){var f=this[e];Array.isArray(f)&&0<c?(f=Array.prototype.flat.call(f,c-1),d.push.apply(d,f)):d.push(f)}return d}},"es9","es5"); $jscomp.checkEs6ConformanceViaProxy=function(){try{var b={},c=Object.create(new $jscomp.global.Proxy(b,{get:function(d,e,f){return d==b&&"q"==e&&f==c}}));return!0===c.q}catch(d){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.owns=function(b,c){return Object.prototype.hasOwnProperty.call(b,c)}; $jscomp.polyfill("WeakMap",function(b){function c(){if(!b||!Object.seal)return!1;try{var n=Object.seal({}),p=Object.seal({}),v=new b([[n,2],[p,3]]);if(2!=v.get(n)||3!=v.get(p))return!1;v.delete(n);v.set(p,4);return!v.has(n)&&4==v.get(p)}catch(B){return!1}}function d(){}function e(n){var p=typeof n;return"object"===p&&null!==n||"function"===p}function f(n){if(!$jscomp.owns(n,h)){var p=new d;$jscomp.defineProperty(n,h,{value:p})}}function g(n){if(!$jscomp.ISOLATE_POLYFILLS){var p=Object[n];p&&(Object[n]= function(v){if(v instanceof d)return v;Object.isExtensible(v)&&f(v);return p(v)})}}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&$jscomp.ES6_CONFORMANCE)return b}else if(c())return b;var h="$jscomp_hidden_"+Math.random();g("freeze");g("preventExtensions");g("seal");var k=0,l=function(n){this.id_=(k+=Math.random()+1).toString();if(n){n=$jscomp.makeIterator(n);for(var p;!(p=n.next()).done;)p=p.value,this.set(p[0],p[1])}};l.prototype.set=function(n,p){if(!e(n))throw Error("Invalid WeakMap key"); f(n);if(!$jscomp.owns(n,h))throw Error("WeakMap key fail: "+n);n[h][this.id_]=p;return this};l.prototype.get=function(n){return e(n)&&$jscomp.owns(n,h)?n[h][this.id_]:void 0};l.prototype.has=function(n){return e(n)&&$jscomp.owns(n,h)&&$jscomp.owns(n[h],this.id_)};l.prototype.delete=function(n){return e(n)&&$jscomp.owns(n,h)&&$jscomp.owns(n[h],this.id_)?delete n[h][this.id_]:!1};return l},"es6","es3");$jscomp.MapEntry=function(){}; $jscomp.polyfill("Map",function(b){function c(){if($jscomp.ASSUME_NO_NATIVE_MAP||!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var l=Object.seal({x:4}),n=new b($jscomp.makeIterator([[l,"s"]]));if("s"!=n.get(l)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var p=n.entries(),v=p.next();if(v.done||v.value[0]!=l||"s"!=v.value[1])return!1;v=p.next();return v.done||4!=v.value[0].x||"t"!=v.value[1]||!p.next().done?!1:!0}catch(B){return!1}} if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(b&&$jscomp.ES6_CONFORMANCE)return b}else if(c())return b;var d=new WeakMap,e=function(l){this.data_={};this.head_=h();this.size=0;if(l){l=$jscomp.makeIterator(l);for(var n;!(n=l.next()).done;)n=n.value,this.set(n[0],n[1])}};e.prototype.set=function(l,n){l=0===l?0:l;var p=f(this,l);p.list||(p.list=this.data_[p.id]=[]);p.entry?p.entry.value=n:(p.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:l,value:n},p.list.push(p.entry), this.head_.previous.next=p.entry,this.head_.previous=p.entry,this.size++);return this};e.prototype.delete=function(l){l=f(this,l);return l.entry&&l.list?(l.list.splice(l.index,1),l.list.length||delete this.data_[l.id],l.entry.previous.next=l.entry.next,l.entry.next.previous=l.entry.previous,l.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=h();this.size=0};e.prototype.has=function(l){return!!f(this,l).entry};e.prototype.get=function(l){return(l= f(this,l).entry)&&l.value};e.prototype.entries=function(){return g(this,function(l){return[l.key,l.value]})};e.prototype.keys=function(){return g(this,function(l){return l.key})};e.prototype.values=function(){return g(this,function(l){return l.value})};e.prototype.forEach=function(l,n){for(var p=this.entries(),v;!(v=p.next()).done;)v=v.value,l.call(n,v[1],v[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var f=function(l,n){var p=n&&typeof n;"object"==p||"function"==p?d.has(n)?p=d.get(n): (p=""+ ++k,d.set(n,p)):p="p_"+n;var v=l.data_[p];if(v&&$jscomp.owns(l.data_,p))for(l=0;l<v.length;l++){var B=v[l];if(n!==n&&B.key!==B.key||n===B.key)return{id:p,list:v,index:l,entry:B}}return{id:p,list:v,index:-1,entry:void 0}},g=function(l,n){var p=l.head_;return $jscomp.iteratorPrototype(function(){if(p){for(;p.head!=l.head_;)p=p.previous;for(;p.next!=p.head;)return p=p.next,{done:!1,value:n(p)};p=null}return{done:!0,value:void 0}})},h=function(){var l={};return l.previous=l.next=l.head=l},k=0; return e},"es6","es3"); var windowWidth=20,windowHeight,originTotalPageCount,totalPageCount,isTouch=!1,bookContainer,tmpContainer,slideBook,singleSlideBook,catalogBook,singleCatalogBook,flipBook,singlePageBook,flipShotButton,toolBar,printBody,helpBody,aboutBody,sharePanel,annotationPannel,videoGallery,photoGallery,languagePanel,frmSearch,frmShare,frmTableOfContent,bookmark,thumbnail,googleID,noteCookie,textRemark,signature,annotationShapes,QRcode,QRbutton,moreBar,pageIndexTextField,resizeBookAfterFlip=!1,flipAudio,auto_player, hardPageEnable,uiBaseURL,phoneBaseURL,soundBaseURL,browserType,bookType=0,rightToLeft,isFlipPdf=!1,bookConfig,jQuery,Hammer,aliasLanguage,language,isPlaying,ClipboardJS,uc,netscape,Components,staticAd,AlbumCalendar,Directory,videoList,phoneNumber,wx,WeixinJSBridge,checkReportConfig,bmtConfig,aliasConfig,base64,fullScreenApi,skin,bookPlugin,FlipBookPlugins,SliderShowAd,DynamicBackground,StateSynchronous,settingBody,volumeControlBar,getSearchRealPageIndex,positionForPages,PageItem,toolbar_icons,form_icons, realLocation,HTML5AdSlider,totalWidth,deg2rad,windows,rendering,alpha,size,fill,stroke,canvasContext,toBlendModeString,setFill,setStroke,restrictUrl,devicePixelRatio,fliphtml5_pages,configForPages,pdfjsLib,response,pdfLoadStack,htmlConfig,sliderJS,highlightSearchFun,clearHighlightFun,Annotation,AnnotationCookie,SearchTextHighlight,SearchHighlightDOM,phoneCopyForm,CopyForm,inverseEditor,PageEditor,PageEditorParser,pageEditor,onStageResize,templateArea,MiniStyle,BookmarkTab,fromPageIndex,PasswardPannel, _tipsBox,downLoadBody,GuidToolbar,sendvisitinfo,dataLayer,gtag,jsLoadingBar,onBookLoad,editor_js_url,interface_js_url,xyz,property,bdor,ctx,text,blend,transform;window.phoneTemplateArea={getLeftWidth:function(){return 0},getRightWidth:function(){return 0},getTopHeight:function(){return window.toolBar?toolBar.getTopHeight():bookConfig.toolbarAlwaysShow?"both"==bookConfig.phoneToolbarType?60:40:0},getBottomHeight:function(){if(window.toolBar)return toolBar.getBottomHeight();if(!bookConfig.toolbarAlwaysShow)return 0;if("both"==bookConfig.phoneToolbarType)return isIphoneXor11()?80:60;if(!isIphoneXor11())return 40;if(isIphoneXor11())return 60},getHeight:function(){return this.getTopHeight()+ this.getBottomHeight()},getWidth:function(){return this.getLeftWidth()+this.getRightWidth()}};window.templeteName="metro"; window.templateArea={getLeftWidth:function(){return 0},getRightWidth:function(){return 0},getTopHeight:function(){return MiniStyle.isMini()||NeatStyle.isNeat()||!bookConfig.ToolBarVisible?0:isPC()?46:phoneTemplateArea.getTopHeight()},getBottomHeight:function(){return MiniStyle.isMini()?0:NeatStyle.isNeat()?40:bookConfig.ToolBarVisible?isPC()?46:phoneTemplateArea.getBottomHeight():0},getHeight:function(){return this.getTopHeight()+this.getBottomHeight()},getWidth:function(){return this.getLeftWidth()+this.getRightWidth()}};/* Hammer.JS - v2.0.8 - 2016-04-23 http://hammerjs.github.io/ Copyright (c) 2016 Jorik Tangelder; Licensed under the MIT license http://mths.be/base64 v0.1.0 by @mathias | MIT license */ (this||(0,eval)("(this)")).bdor=[];var _agent_={}; (function(b){function c(p){p=e.match(p);if(null==p||0==p.length)return 0;p=p[0];var v=p.indexOf("/");p=p.substring(v+1,p.length);return""==p?0:parseInt(p)}function d(p){p=e.match(p);if(null==p||0==p.length)return 0;p=p[0].replace("_",".").match(/\d+\.?\d?/);if(null==p||0==p.length)return 0;p=p[0];return""==p?0:parseFloat(p)}var e=navigator.userAgent.toLowerCase();b.browser={};b.browser.webkit=/webkit/.test(e);b.browser.mozilla=/firefox/.test(e);b.browser.firefox=b.browser.mozilla;b.browser.msie=/msie/.test(e)|| /trident/.test(e)||/edge/.test(e);b.browser.edge=/edge/.test(e);b.browser.opera=/opera/.test(e)||/opr/.test(e);b.browser.chrome=/chrome/.test(e)&&!b.browser.opera&&!b.browser.edge;b.browser.uc=/ucbrowser/.test(e);b.browser.safari=/safari/.test(e)&&!b.browser.chrome&&!b.browser.uc&&!b.browser.opera;b.browser.wechat=/micromessenger/.test(e);b.browser.dingding=/dingtalk/.test(e);b.browser.version=0;window.bdor[1]="p";b.browser.firefox&&(b.browser.version=c(/firefox\/\d+/));if(b.browser.msie){var f=e.match(/msie\s?\d+\.0/); null==f?(f=e.match(/trident\/\d+\.0/),null!=f&&0<f.length?(f=f[0],f=parseInt(f.replace("trident/","")),b.browser.version=f+4):(f=e.match(/edge\/\d+\.0/),null!=f&&0<f.length&&(f=f[0],f=parseInt(f.replace("edge/","")),b.browser.version=f))):(f=parseInt(f[0].replace("msie","")),b.browser.version=f)}b.browser.opera&&(b.browser.version=c(/opera\/\d+/)||c(/opr\/\d+/));b.browser.chrome&&(b.browser.version=c(/chrome\/\d+/));b.browser.uc&&(b.browser.version=c(/ucbrowser\/\d+/));b.browser.safari&&(b.browser.version= c(/safari\/\d+/));if(void 0==b.browser.device){b.browser.DEVICE_PC=0;b.browser.DEVICE_PAD=1;b.browser.DEVICE_PHONE=2;var g=/pad/.test(e)||/ipod/.test(e);f=/iphone/.test(e);var h=/wpdesktop/.test(e)||/windows phone/.test(e),k=/blackberry/.test(e),l=/mobile/.test(e)||/phone/.test(e),n=/heytapbrowser/.test(e);if(-1<e.indexOf("macintosh")){g=!0;try{document.createEvent("TouchEvent")}catch(p){g=!1}}b.browser.device=b.browser.DEVICE_PC;if(g)b.browser.device=b.browser.DEVICE_PAD;else if(f||h||k||l||n)b.browser.device= b.browser.DEVICE_PHONE}void 0==b.browser.app&&(b.browser.app=/android-app/.test(e));void 0==b.browser.prefix&&(b.browser.prefix="",1==b.browser.webkit&&(b.browser.prefix="-webkit-"),1==b.browser.mozilla&&(b.browser.prefix="-moz-"),1==b.browser.opera&&(b.browser.prefix="-webkit-"),1==b.browser.uc&&(b.browser.prefix="-webkit-"),1==b.browser.msie&&(b.browser.prefix="-ms-"));if(void 0==b.system){b.system={name:"",version:0};b.system.WINDOWS="Windows";b.system.WP="WinPhone";b.system.WP_DESKTOP="WinPhoneDesktop"; b.system.MAC="Mac OS";b.system.IOS="iPhone OS";b.system.LINUX="Linux";b.system.ANDROID="Android";b.system.BLACKBERRY="BlackBerry";/windows/.test(e)&&(b.system.name=b.system.WINDOWS,b.system.version=d(/windows nt\s?\d+\.?\d?/));/windows phone/.test(e)&&(b.system.name=b.system.WP,b.system.version=d(/windows phone\s?\d+\.?\d?/));/wpdesktop/.test(e)&&(b.system.name=b.system.WP_DESKTOP,b.system.version=d(/wpdesktop\s?\d+\.?\d?/));if(b.system.name!=b.system.WP){if(/iphone/.test(e)||/ipad/.test(e))b.system.name= b.system.IOS,b.system.version=d(/os\s?\d+_?\d?/);/macintosh/.test(e)&&g&&(b.system.name=b.system.IOS,b.system.version=d(/version\/\s?\d+_?\d?/));/android/.test(e)&&(b.system.name=b.system.ANDROID,b.system.version=d(/android\s?\d+\.?\d?/))}/mac/.test(e)&&b.browser.system!=b.browser.IOS&&(b.system.name=b.system.MAC,b.system.version=d(/os x\s?\d+\.?\d?/));/linux/.test(e)&&!/android/.test(e)&&(b.system.name=b.system.LINUX);/blackberry/.test(e)&&(b.system.name=b.system.BLACKBERRY,b.system.version=d(/blackberry\s?\d+/))}})(_agent_); var $=window.jQuery,isFirefox=function(){return _agent_.browser.firefox},isIE=function(){return _agent_.browser.msie},isIE8=function(){return _agent_.browser.msie&&8==_agent_.browser.version},isIE9=function(){return _agent_.browser.msie&&9==_agent_.browser.version},isIE11=function(){return _agent_.browser.msie&&11==_agent_.browser.version},isBelowIE11=function(){return _agent_.browser.msie&&11>_agent_.browser.version},isPad=function(){return _agent_.browser.device==_agent_.browser.DEVICE_PAD||_agent_.browser.device== _agent_.browser.DEVICE_PC&&_agent_.system.name==_agent_.system.ANDROID?!0:!1},isIpad=function(){var b=navigator.userAgent.toLowerCase();return 0<b.indexOf("ipad")&&0<b.indexOf("safari")},isPC=function(){return isPhone()||isPad()?!1:_agent_.browser.device==_agent_.browser.DEVICE_PC?!0:!1},isIpod=function(){return 0<navigator.userAgent.toLowerCase().indexOf("ipod")},isIphone=function(){return 0<navigator.userAgent.toLowerCase().indexOf("iphone")},isIphoneXor11=function(){return isIphone()&&(812==screen.height&& 375==screen.width||896==screen.height&&414==screen.width||12<=_agent_.system.version)},isNokiaPhone=function(){var b=navigator.userAgent.toLowerCase();return 0<b.indexOf("msie")&&0<b.indexOf("wpdesktop")},isAndroid=function(){var b=navigator.userAgent.toLowerCase();return-1<b.indexOf("android")||-1<b.indexOf("adr")},isPhone=function(){var b=window.location.search;return _agent_.browser.device==_agent_.browser.DEVICE_PHONE||0<=b.toLowerCase().indexOf("phone=true")||0<=b.toLowerCase().indexOf("phonebook=true")? !0:!1},isAndroidWeChat=function(){return _agent_.system.name==_agent_.system.ANDROID&&_agent_.browser.chrome&&40>_agent_.browser.version},isWeChat=function(){return _agent_.browser.wechat},isDingDing=function(){return _agent_.browser.dingding},isAndroidDefault=function(){return _agent_.system.name==_agent_.system.ANDROID&&_agent_.browser.safari},isPhoneBook=function(){if(_agent_.system.name==_agent_.system.ANDROID&&_agent_.browser.uc)return!0;var b=window.location.search;return(isPhone()||isPad())&& _agent_.system.name==_agent_.system.ANDROID&&4>parseInt(_agent_.system.version)||0<=b.toLowerCase().indexOf("phonebook=true")||(isPhone()||isPad())&&"slide"==bookConfig.FlipStyle.toLowerCase()?!0:!1},isHigherThanIOS8=function(){return _agent_.system.name==_agent_.system.IOS&&8<=_agent_.system.version},isInTheFrame=function(){return window.top!=window};function isBelowIE9(){return _agent_.browser.msie?9>_agent_.browser.version?!0:!1:!1} function isBelowIE8(){return _agent_.browser.msie?8>_agent_.browser.version?!0:!1:!1}function isBelowIE10(){return _agent_.browser.msie?10>_agent_.browser.version?!0:!1:!1}var global=function(){return this||(0,eval)("(this)")}(),virtual_function=function(){};function getPackageByName(b){if(void 0==b||""==b)return global;var c=global;b=b.split(".");for(var d=0;d<b.length;d++){var e=b[d];c[e]||(c[e]={IS_PACKAGE_OBJECT:!0});c=c[e]}return c} function getClassByFullName(b){if(-1==b.indexOf("."))return global[b];var c=b.split(".");b=c.pop();c=c.join(".");return getPackageByName(c)[b]} function classof(b,c){if(!b)return"";c||(c=global);"string"==typeof c&&(c=getPackageByName(c));var d=["webkitStorageInfo","webkitIndexedDB"],e;for(e in c)try{if(!(-1<d.indexOf(e))&&c[e]instanceof Function)try{if(b instanceof c[e])return e}catch(g){}}catch(g){}for(e in c)try{if("object"==typeof c[e]&&c[e].IS_PACKAGE_OBJECT){var f=classof(b,c[e]);if(""!=f)return e+"."+f}}catch(g){}return""} function nameof(b,c){if(!b)return"";c||(c=global);"string"==typeof c&&(c=getPackageByName(c));var d=["webkitStorageInfo","webkitIndexedDB"],e;for(e in c)try{if(!(-1<d.indexOf(e))&&c[e]==b)return e}catch(g){}for(e in c)try{if("object"==typeof c[e]&&c[e].IS_PACKAGE_OBJECT){var f=nameof(b,c[e]);if(""!=f)return e+"."+f}}catch(g){}return""} function Class(b,c){if("string"===typeof b){var d=getPackageByName(c.Package);d[b]=Class(c);return d[b]}var e=function(){if(this.Import){"string"==typeof this.Import&&(this.Import=[this.Import]);for(var g=0;g<this.Import.length;g++){var h=this.Import[g],k=getPackageByName(h);if(k instanceof Function)this[h.split(".").pop()]=k;else for(var l in k)k[l]instanceof Function&&(this[l]=k[l])}}k=getPackageByName(this.Package);if(k!=global)for(l in k)this.getClassName()!=l&&k[l]instanceof Function&&(this[l]= k[l]);this.create&&this.create instanceof Function&&this.create.apply(this,arguments)};e.prototype=b||{};var f;e.prototype.getClassName=function(){f||(f=nameof(e,this.Package));return f};e.prototype.getClass=function(){return e};b=e.prototype.statics;if(void 0!=b){for(d in b)void 0==e[d]&&(e[d]=b[d]);delete e.prototype.statics}return e} Function.prototype.extend=function(b){if(!b)return this;if("string"==typeof b)if(-1<b.indexOf(".")){if(b=getClassByFullName(b),!b)return this}else{var c=this.prototype.Package,d=b;c&&""!=c&&(b=c+"."+d);b=getClassByFullName(b);if(!b&&(b=getClassByFullName(d),!b))return this}if(b instanceof Function){for(var e in b)void 0==this[e]&&(this[e]=b[e]);for(e in b.prototype)void 0==this.prototype[e]?b.prototype[e]==virtual_function?console&&console.error&&console.error("virtual function [%s] must be override.", e):this.prototype[e]=b.prototype[e]:(d=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/,this.prototype[e]instanceof Function&&b.prototype[e]instanceof Function&&d.test(this.prototype[e])&&(this.prototype[e]=function(f,g){return function(){var h=this._super;this._super=f;var k=g.apply(this,arguments);this._super=h;return k}}(b.prototype[e],this.prototype[e])));return this}return"object"!==typeof b?this:this.extend(Class(b))}; Function.prototype.expand=function(b,c){if("object"===typeof b){void 0==c&&(c=!1);var d=b.statics;if(d&&"object"==typeof d){for(var e in d)if(c||void 0==this[e])this[e]=d[e];delete b.statics}for(e in b)if(c||void 0==this.prototype[e])this.prototype[e]=b[e];return this}}; var Instance={copy:function(b){if(!b||"object"!==typeof b)return b;var c={};b instanceof Array&&(c=[]);for(property in b)c[property]="object"==typeof b[property]?Instance.copy(b[property]):b[property];return c},create:function(b,c){c||(c=[]);var d=b;"string"==typeof b&&(d=getClassByFullName(d));if(!d)return null;b=d.prototype.create;d.prototype.create=function(){};var e=new d;d.prototype.create=b;e.create&&e.create instanceof Function&&e.create.apply(e,c);return e},JSON:function(b){if(void 0===b)return"undefined"; if(null===b)return"null";if(b instanceof Array){var c=[];c.push("[");for(var d=0;d<b.length;d++)c.push(Instance.JSON(b[d])),c.push(", ");1<c.length&&c.pop();c.push("]");return c.join("")}if(b instanceof Function)return b;if("string"===typeof b)return b=b.toString(),b=b.replaceAll("\\","\\\\",!0),b=b.replaceAll('"','\\"',!0),'"'+b+'"';if("number"===typeof b)return Number(b).toString();if("boolean"===typeof b)return(!!b).toString();if("object"===typeof b){c=[];c.push("{");for(d in b){var e='"'+d+'":'+ Instance.JSON(b[d]);c.push(e);c.push(", ")}1<c.length&&c.pop();c.push("}");return c.join("")}},parse:function(b,c){return b&&"undefined"!=b&&"null"!=b&&""!=b?eval("("+b+")"):c}};Object.create=Object.create||function(){function b(){}return function(c){if(1!=arguments.length)throw Error("Object.create implementation only accepts one parameter.");b.prototype=c;return new b}}(); Object.keys=Object.keys||function(b){if(b!==Object(b))throw new TypeError("Object.keys called on a non-object");var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(d);return c}; Function.expand({bind:function(b){var c=this;return function(){return c.apply(b,arguments)}},delay:function(b,c,d){"object"!==typeof b&&(d=c,c=b,b=global);c=c||1;d=d||[];return setTimeout(function(){this.apply(b,d)}.bind(this),c)},interval:function(b,c,d){"object"!==typeof b&&(d=c,c=b,b=global);c=c||1;d=d||[];var e=this;return{intervalId:setInterval(function(){this.apply(b,d)}.bind(this),c),stop:function(){clearInterval(this.intervalId);this.intervalId=void 0},isRunning:function(){return void 0!= this.intervalId},start:function(){this.intervalId=setInterval(function(){e.apply(b,d)},c)}}},animation:function(b,c){"object"!==typeof b&&(c=b,b=global);var d={stopFlag:!1,stop:function(){this.stopFlag=!0}},e=this,f=0,g=Math.ceil(c/16.7),h=function(){!0!==d.stopFlag&&(f++,!1!==e.apply(b,[f,g])&&(f<g||void 0==c)&&window.requestAnimationFrame(h))};h();return d},once:function(b,c){b||(b=global);this.executed||(this.executed=!1);this.executed||(this.apply(b,c),this.executed=!0)}}); String.expand({trim:function(){return this.replace(/(^\s*)|(\s*$)/g,"")},replaceAll:function(b,c,d){void 0==d&&(d=!1);if(!b||!c)return this;if(RegExp&&!d)return this.replace(new RegExp(b,"g"),c);var e=this.indexOf(b);d=[];for(var f=this;-1!=e;){e+=b.length;var g=f.substring(0,e);f=f.substring(e);g=g.replace(b,c);d.push(g);e=f.indexOf(b)}""!==f&&d.push(f);return d.join("")},subBetween:function(b,c){if(void 0==b||void 0==c)return"";var d=this.length,e=this.indexOf(b);if(-1==e)return"";e+=b.length;b= this.substring(e,d).indexOf(c);return-1==b?"":this.substring(e,b+e)},isUrl:function(){if(""==this.trim()||!RegExp)return!1;var b=/((((ht|f)tp(s?)):\/\/)|(www\.))([\w\-]+\.)+\w+[\/\w]*/gi,c=this.toLowerCase();return!!c.match(/(((ht|f)tp(s?)):\/\/)?(www\.)?([\w\-]+\.)+\w+[\/\w]*/gi)||!!c.match(b)},isEmail:function(){return""==this?!1:!!this.toLowerCase().match(/^([A-Za-z0-9])(\w)+@(\w)+(\.)(com|com\.cn|net|cn|net\.cn|org|biz|info|gov|gov\.cn|edu|edu\.cn)/)},toArray:function(b){b||(b="");return this.split(b)}, reverse:function(){var b=this.split("");b.reverse();return b.join("")},equals:function(b){return this.trim()==b.trim()},equalsIgnoreCase:function(b){return this.toLowerCase().trim()==b.toLowerCase().trim()},like:function(b){if(!b)return!1;b=this.toLowerCase().trim();var c=this.toLowerCase().trim();return-1<b.indexOf(c)||-1<c.indexOf(b)},contains:function(b){return-1<this.indexOf(b)},startsWith:function(b){return""===b?!1:this.substr(0,b.length)===b},endsWith:function(b){return""===b?!1:this.substr(this.length- b.length,b.length)===b},isEnglish:function(){return/[\x00-\xff]/.test(this)},overflow:function(b){if(void 0==b)return this.toString();var c=2;/[^\x00-\xff]/.test(this)&&(b=Math.floor(b/2),c=Math.floor(c/2));return this.length-b>c?this.substr(0,b)+"...":this.toString()},remove:function(b){if("string"!=typeof b||!b)return this;var c=this.indexOf(b);if(0>c)return this;b=b.length;return this.substring(0,c)+this.substring(c+b,this.length)+""},removeStartFrom:function(b){if("string"==typeof b&&b)return b= this.indexOf(b),0>b?this:this.substring(0,b)+""},cycleToLength:function(b){if(!isNaN(b)){for(var c=parseInt(b/this.length),d=this;0<c;)d+=this,c--;return d.substring(0,b)}},firstUpperCase:function(){return 1>this.length?this:this.substring(0,1).toUpperCase()+this.substring(1)},firstLowerCase:function(){return 1>this.length?this:this.substring(0,1).toLowerCase()+this.substring(1)},extract:function(){if(0==this.length||0==arguments.length)return[];for(var b=[],c=this.toString(),d=0;d<c.length;){for(var e= !1,f=0;f<arguments.length;f++){var g=arguments[f];if(c.substr(d,g.length)==g){b.push(g);d+=g.length;e=!0;break}}e||d++}return b},addUrlParameter:function(b){var c=this.toString();b=b.param;return"string"!=typeof c?c:c=0<=c.indexOf("?")?c+"&"+b:c+"?"+b},statics:{format:function(){if(0==arguments.length)return"";if(1==arguments.length)return arguments[0];for(var b=arguments[0],c=b.extract("%s","%d","%f","%b","%o"),d=1;d<arguments.length;d++){var e=arguments[d],f=c[d-1];"%s"==f&&("string"==typeof e? b=b.replace("%s",e):b=b.replace("%s",""));if("%d"==f){isNaN(e)&&(e=0);var g="number"==typeof e?-1==Number(e).toString().indexOf("."):!1;g?b=b.replace("%d",e+""):b=b.replace("%d","")}"%f"==f&&(isNaN(e)&&(e=0),"number"==typeof e?b=b.replace("%f",e+""):b=b.replace("%f",""));"%b"==f&&(e=!!e,"boolean"==typeof e?b=b.replace("%b",e+""):b=b.replace("%b",""));"%o"==f&&("object"==typeof e?b=b.replace("%o",Instance.JSON(e)):b=b.replace("%o",""))}return b},toUtf8:function(b){if(!b)return"";var c,d=[],e=b.length; for(c=0;c<e;c++){var f=b.charCodeAt(c);0<f&&127>=f?d.push(b.charAt(c)):128<=f&&2047>=f?d.push(String.fromCharCode(192|f>>6&31),String.fromCharCode(128|f&63)):2048<=f&&65535>=f&&d.push(String.fromCharCode(224|f>>12&15),String.fromCharCode(128|f>>6&63),String.fromCharCode(128|f&63))}return d.join("")},parseUtf8:function(b){if(!b)return"";var c,d=[],e=b.length;for(c=0;c<e;c++){var f=[];f.push(b.charCodeAt(c));if(0==(f[0]>>7&255))d.push(b.charAt(c));else if(6==(f[0]>>5&255)){f.push(b.charCodeAt(++c)); var g=[];g.push(f[0]&31);g.push(f[1]&63);d.push(String.fromCharCode(g[0]<<6|g[1]))}else 14==(f[0]>>4&255)&&(f.push(b.charCodeAt(++c)),f.push(b.charCodeAt(++c)),g=[],g.push(f[0]<<4|f[1]>>2&15),g.push((f[1]&3)<<6|f[2]&63),d.push(String.fromCharCode(g[0]<<8|g[1])))}return d.join("")}}}); Array.expand({remove:function(b){return isNaN(b)||b>this.length?!1:this.splice(b,1)[0]},indexOf:function(b){for(var c=0;c<this.length;c++)if(this[c]===b)return c;return-1},removeElement:function(b){b=this.indexOf(b);-1<b&&this.remove(b)},lastIndexOf:function(b){for(var c=-1,d=0;d<this.length;d++)this[d]===b&&(c=d);return c},statics:{isArray:function(b){return"[object Array]"==Object.prototype.toString.call(b)}},clone:function(){for(var b=[],c=0;c<this.length;c++)b.push(this[c]);return b},increasing:function(){return this.sort(function(b, c){return b-c})},diminishing:function(){return this.sort(function(b,c){return c-b})}}); Date.expand({format:function(b,c){c=c||!0;var d={"y+":this.getYear(),"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(b)&&(b=b.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var e in d)(new RegExp("("+e+")")).test(b)&&(b=!0===c?b.replace(RegExp.$1,d[e]):b.replace(RegExp.$1,1==RegExp.$1.length?d[e]:("00"+d[e]).substr((""+d[e]).length))); return b},statics:{now:function(){return(new Date).getTime()}}}); Number.expand({statics:{between:function(b,c,d){if(isNaN(b)||isNaN(c)||isNaN(d))return b;var e=Math.min(c,d);c=Math.max(c,d);b<e&&(b=e);b>c&&(b=c);return b},isBetween:function(b,c,d){if(isNaN(c)||isNaN(d)||isNaN(b))return!1;var e=Math.max(c,d);return b>=Math.min(c,d)&&b<=e?!0:!1},fixed:function(b,c){if(isNaN(b))return b;isNaN(c)&&(c=0);c=Math.pow(10,c);return Math.round(b*c)/c},decimals:function(b){if(isNaN(b))return-1;b=Number(b).toString();var c=b.indexOf(".");return-1==c?0:b.length-c-1},random:function(b, c,d){if(isNaN(b)||isNaN(c))return 0;void 0==d&&Number.decimals(b)==Number.decimals(c)&&(d=Number.decimals(b));var e=Math.min(b,c);b=e+(Math.max(b,c)-e)*Math.random();return!d||0>d||isNaN(d)?Math.floor(b):Number.fixed(b,d)}}}); var Color=function(b){b&&"object"==typeof b&&b.toString&&(b=b.toString());return{value:ColorTable.value(b),toString:function(){function c(e,f,g){if(e.length<g&&e.length>f)for(;e.length<g;)e="0"+e;return e}var d=this.value;d||(d=0);if("string"==typeof d){if(0==d.indexOf("#"))return d;if(0==d.indexOf("0x"))return d.replace("0x","#")}d=parseInt(d);d=0>d?Number(0):d;d=d.toString(16);8<d.length&&(d=d.substr(0,8));d=c(d,6,8);d=c(d,0,6);return"#"+d},valueOf:this.toString,split:function(){var c={r:0,g:0, b:0,a:255};if(!this.value)return c;var d=this.toString(),e="FF";switch(d.length){case 9:e=d.substr(1,2);c=d.substr(3,2);var f=d.substr(5,2);d=d.substr(7,2);break;case 7:c=d.substr(1,2);f=d.substr(3,2);d=d.substr(5,2);break;case 4:c=d.substr(1,1);f=d.substr(2,1);d=d.substr(3,1);c+=c;f+=f;d+=d;break;default:return c}return{r:parseInt(c,16),g:parseInt(f,16),b:parseInt(d,16),a:parseInt(e,16)}},add:function(c){var d="object"==typeof c?c:{r:c,g:c,b:c,a:1};var e=this.split();c=Number.between(e.r+d.r,0,255).toString(16).toUpperCase(); var f=Number.between(e.g+d.g,0,255).toString(16).toUpperCase();d=Number.between(e.b+d.b,0,255).toString(16).toUpperCase();e=Number(e.a).toString(16).toUpperCase();c=1>=c.length?"0"+c:c;f=1>=f.length?"0"+f:f;d=1>=d.length?"0"+d:d;e=1>=e.length?"0"+e:e;return"FF"==e?"#"+c+f+d:"#"+e+c+f+d},reduce:function(c){return this.add("object"==typeof c?c:{r:-c,g:-c,b:-c,a:1})},rgba:function(c){var d=this.split();c=void 0==c||""===c?d.a:parseFloat(c);1<c&&(c=Number.fixed(c/255,2));return String.format("rgba(%d,%d,%d,%f)", d.r,d.g,d.b,c)},equals:function(c){return this.toString()==Color(c).toString()},difference:function(c){var d=this.split();c=Color(c).split();return{r:Math.abs(d.r-c.r),g:Math.abs(d.g-c.g),b:Math.abs(d.b-c.b),a:Math.abs(d.a-c.a)}},reverse:function(){var c=this.split(),d=Number.between(255-c.r,0,255).toString(16).toUpperCase(),e=Number.between(255-c.g,0,255).toString(16).toUpperCase(),f=Number.between(255-c.b,0,255).toString(16).toUpperCase();c=Number(c.a).toString(16).toUpperCase();d=1>=d.length?"0"+ d:d;e=1>=e.length?"0"+e:e;f=1>=f.length?"0"+f:f;c=1>=c.length?"0"+c:c;return"FF"==c?"#"+d+e+f:"#"+c+d+e+f}}};function colorSplit(b){return Color(b).split()}function colorAdd(b,c){return Color(b).add(c)}function colorDiv(b,c){return Color(b).reduce(c)}function equals(b,c){return 1E-7>Math.abs(b-c)} var Point=function(b,c){return{x:b,y:c,isNearTo:function(d,e){if(!d)return!1;void 0==e&&(e=5);return Math.abs(this.x-d.x)<e&&Math.abs(this.y-d.y)<e},equals:function(d){return d?equals(this.x,d.x)&&equals(this.y,d.y):!1},toString:function(){return"("+this.x+","+this.y+")"},clone:function(){return Point(this.x,this.y)},getX:function(){return this.x},getY:function(){return this.y},isNaP:function(){return isNaN(this.x)||isNaN(this.y)}}};Point.NaP=function(){return Point(Number.NaN,Number.NaN)}; _agent_.browser.mozilla&&(HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent}),HTMLElement.prototype.__defineSetter__("innerText",function(b){this.textContent=b})); function getImageConfig(b,c,d,e){if(!b||void 0==c||void 0==d)return null;b[0]&&(b=b[0]);if(b.complete){var f=b.naturalWidth;var g=b.naturalHeight;return e?getCoverSize(f,g,c,d):getContainSize(f,g,c,d)}$(b).on("load",function(){f=b.naturalWidth;g=b.naturalHeight;return e?getCoverSize(f,g,c,d):getContainSize(f,g,c,d)}.bind(this))} function getContainSize(b,c,d,e){if(b/c>d/e)if(b<d){var f=b,g=c;c=(d-f)/2;e=(e-g)/2}else f=d,g=d/b*c,c=0,e=(e-g)/2;else c<e?(f=b,g=c,c=(d-f)/2,e=(e-g)/2):(g=e,f=e/c*b,c=(d-f)/2,e=0);return{scale:f/b,width:f,height:g,left:c,top:e}}function getContainSizeRate(b,c,d,e){b=getContainSize(b,c,d,e);return{scale:b.scale,width:b.width/d,height:b.height/e,left:b.left/d,top:b.left/e}} function getCoverSize(b,c,d,e){if(b/c>d/e){var f=d,g=d/b*c;c=0;e=(e-g)/2}else g=e,f=e/c*b,c=(d-f)/2,e=0;return{scale:b/f,width:f,height:g,left:c,top:e}} function getInverseItem(b,c,d){b=JSON.parse(JSON.stringify(b));var e=b.location;if(window.articleConfig&&window.articleConfig.hotArea){var f=window.articleConfig.hotArea;b.overColor=f.overColor;b.downColor=f.downColor;b.outColor=f.outColor;b.overAlpha=f.overAlpha;b.downAlpha=f.downAlpha;b.outAlpha=f.outAlpha}if(e.pageWidth>c||e.pageHeight>d)c=getContainSizeRate(e.pageWidth,e.pageHeight,c,d),d=(1-c.height)/2,b.location.x=b.location.x*c.width+(1-c.width)/2,b.location.y=b.location.y*c.height+d,b.location.width*= c.width,b.location.height*=c.height;return b}function getOffset(b){for(var c=b.target,d=0,e=0;c;)d+=c.offsetLeft,e+=c.offsetTop,c=c.offsetParent;return{X:window.pageXOffset+b.clientX-d,Y:window.pageYOffset+b.clientY-e}} function getPositionFromEvt(b){b=b.originalEvent&&b.originalEvent.changedTouches?b.originalEvent.changedTouches:b.changedTouches?b.changedTouches:[b];return{x:(b[0].pageX||b[0].clientX)+(document.documentElement.scrollLeft||document.body.scrollLeft),y:(b[0].pageY||b[0].clientY)+(document.documentElement.scrollTop||document.body.scrollTop)}} function getDeString(b){"[object String]"!==Object.prototype.toString.call(b)||b.match(/^[\[\{]/)||(b=window.Module._DeString(window.allocateUTF8(b)),b=window.UTF8ToString(b));return b}function getCustomEventName(){return bookConfig.productName&&bookConfig.productName.toLocaleLowerCase().match(/flip[ ]*pdf/)?"flip_pdf_customize_":bookConfig.productName&&bookConfig.productName.toLocaleLowerCase().match(/fliphtml5/)?"fliphtml5_customize_":""} function getEditorEventName(){return bookConfig.productName&&bookConfig.productName.toLocaleLowerCase().match(/flip[ ]*pdf/)?"flip_pdf_editor_":bookConfig.productName&&bookConfig.productName.toLocaleLowerCase().match(/fliphtml5/)?"fliphtml5_editor_":""} function DeString(b,c){if(""==b)return"";c&&""!=c||(c="fb5");c=escape(c);if(null==b||8>b.length)alert("A salt value could not be extracted from the encrypted message because it's length is too short. The message cannot be decrypted.");else if(null==c||0>=c.length)alert("Please enter a password with which to decrypt the message.");else{for(var d="",e=0;e<c.length;e++)d+=c.charCodeAt(e).toString();var f=Math.floor(d.length/5);f=parseInt(d.charAt(f)+d.charAt(2*f)+d.charAt(3*f)+d.charAt(4*f)+d.charAt(5* f),10);c=Math.round(c.length/2);var g=Math.pow(2,31)-1;e=parseInt(b.substring(b.length-8,b.length),16);b=b.substring(0,b.length-8);for(d+=e;10<d.length;)d=(parseInt(d.substring(0,10),10)+parseInt(d.substring(10,d.length),10)).toString();d=(f*d+c)%g;var h="";for(e=0;e<b.length;e+=2){var k=parseInt(parseInt(b.substring(e,e+2),16)^Math.floor(d/g*255),10);h+=String.fromCharCode(k);d=(f*d+c)%g}return unescape(h)}} function loadJavascript(b,c,d){var e=this,f=!1,g=document.createElement("script");g.type="text/javascript";g.async=!0;g.onload=g.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(g.onload=g.onreadystatechange=null,void 0!=c&&c(g))};g.onerror=function(){void 0!=d&&d(g)};var h=$("head");h.find("script").each(function(){this.src==b&&(f=!0)});f?void 0!=c&&c(g):(h[0].appendChild(g),g.src=b);return g} function loadCss(b,c,d){var e=this,f=!1,g=document.createElement("link");g.rel="stylesheet";g.async=!0;g.onload=g.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(g.onload=g.onreadystatechange=null,void 0!=c&&c(g))};g.onerror=function(){void 0!=d&&d(g)};var h=$("head");h.find("link").each(function(){this.href==b&&(f=!0)});f?void 0!=c&&c(g):(h[0].appendChild(g),g.href=b);return g} (function(){for(var b={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"-",prefix:""},c=["webkit","moz","o","ms"],d=0,e=c.length;d<e;d++)if(b.prefix=c[d],"undefined"!=typeof document[b.prefix+"CancelFullScreen"]){b.supportsFullScreen=!0;break}b.supportsFullScreen&&(b.fullScreenEventName=b.prefix+"fullscreenchange",b.isFullScreen=function(){switch(this.prefix){case "":return document.fullScreen;case "webkit":return document.webkitIsFullScreen; default:return document[this.prefix+"FullScreen"]}},b.requestFullScreen=function(f){f[this.prefix+"RequestFullScreen"]()},b.cancelFullScreen=function(f){return""===this.prefix?document.cancelFullScreen():document[this.prefix+"CancelFullScreen"]()});window.fullScreenApi=b})(); function readAsFullscreen(){isIphone()||isIpad()?window.open(window.location.href):fullScreenApi&&fullScreenApi.supportsFullScreen?($(document).unbind(fullScreenApi.fullScreenEventName,onFullscreenEvent),$(document).bind(fullScreenApi.fullScreenEventName,onFullscreenEvent),fullscreenFun()):window.top!=window?window.open(window.location.href):alert("Press F11 to View FlipBook in Full Screen")} function onFullscreenEvent(b){fullScreenApi.srcElement=b.srcElement||b.target;b=isPhone()||isPad()?"PhoneFullscreenButton":"FullscreenButton";StateSynchronous.instance().findButtons(b).each(function(c){fullScreenApi.isFullScreen()?c.setAsExitFullScreen():c.setAsFullScreen();c.executeCallback()});fullScreenApi.isFullScreen()?MiniStyle.hide():MiniStyle.show();(function(){if(global.toolBar&&global.toolBar.onResize)toolBar.onResize()}).delay(100)} function fullscreenFun(){var b=$("body")[0];fullScreenApi.supportsFullScreen&&(fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen():fullScreenApi.requestFullScreen(b));b.webkitSupportsFullscreen&&b.webkitEnterFullscreen(Element.ALLOW_KEYBOARD_INPUT)} (function(b,c,d,e){function f(m,q,r){return setTimeout(n(m,r),q)}function g(m,q,r){return Array.isArray(m)?(h(m,r[q],r),!0):!1}function h(m,q,r){var y;if(m)if(m.forEach)m.forEach(q,r);else if(m.length!==e)for(y=0;y<m.length;)q.call(r,m[y],y,m),y++;else for(y in m)m.hasOwnProperty(y)&&q.call(r,m[y],y,m)}function k(m,q,r){var y="DEPRECATED METHOD: "+q+"\n"+r+" AT \n";return function(){var C=Error("get-stack-trace");C=C&&C.stack?C.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@"):"Unknown Stack Trace";var D=b.console&&(b.console.warn||b.console.log);D&&D.call(b.console,y,C);return m.apply(this,arguments)}}function l(m,q,r){q=q.prototype;var y=m.prototype=Object.create(q);y.constructor=m;y._super=q;r&&P(y,r)}function n(m,q){return function(){return m.apply(q,arguments)}}function p(m,q){return"function"==typeof m?m.apply(q?q[0]||e:e,q):m}function v(m,q,r){h(u(q),function(y){"undefined"!=typeof b.addEventListener?m.addEventListener(y,r,!1):m.attachEvent(y,r)})} function B(m,q,r){h(u(q),function(y){"undefined"!=typeof b.removeEventListener?m.removeEventListener(y,r,!1):m.detachEvent(y,r,!1)})}function t(m,q){for(;m;){if(m==q)return!0;m=m.parentNode}return!1}function u(m){return m.trim().split(/\s+/g)}function w(m,q,r){if(m.indexOf&&!r)return m.indexOf(q);for(var y=0;y<m.length;){if(r&&m[y][r]==q||!r&&m[y]===q)return y;y++}return-1}function x(m){return Array.prototype.slice.call(m,0)}function z(m,q,r){for(var y=[],C=[],D=0;D<m.length;){var E=q?m[D][q]:m[D]; 0>w(C,E)&&y.push(m[D]);C[D]=E;D++}r&&(y=q?y.sort(function(I,M){return I[q]>M[q]}):y.sort());return y}function A(m,q){if(q&&q[0]){for(var r,y=q[0].toUpperCase()+q.slice(1),C=0;C<oa.length;){r=(r=oa[C])?r+y:q;if(r in m)return r;C++}return e}}function J(m){m=m.ownerDocument||m;return m.defaultView||m.parentWindow||b}function G(m,q){var r=this;this.manager=m;this.callback=q;this.element=m.element;this.target=m.options.inputTarget;this.domHandler=function(y){p(m.options.enable,[m])&&r.handler(y)};this.init()} function H(m,q,r){var y=r.pointers.length,C=r.changedPointers.length;var D=q&1&&0===y-C;r.isFirst=!!D;r.isFinal=!!(q&12&&0===y-C);D&&(m.session={});r.eventType=q;q=m.session;y=r.pointers;C=y.length;q.firstInput||(q.firstInput=F(r));1<C&&!q.firstMultiple?q.firstMultiple=F(r):1===C&&(q.firstMultiple=!1);D=q.firstInput;var E=(C=q.firstMultiple)?C.center:D.center;var I=r.center=K(y);r.timeStamp=fa();r.deltaTime=r.timeStamp-D.timeStamp;r.angle=Q(E,I);r.distance=V(E,I);D=r.center;E=q.offsetDelta||{};I= q.prevDelta||{};var M=q.prevInput||{};if(1===r.eventType||4===M.eventType)I=q.prevDelta={x:M.deltaX||0,y:M.deltaY||0},E=q.offsetDelta={x:D.x,y:D.y};r.deltaX=I.x+(D.x-E.x);r.deltaY=I.y+(D.y-E.y);r.offsetDirection=X(r.deltaX,r.deltaY);E=r.deltaTime;D=r.deltaX/E||0;E=r.deltaY/E||0;r.overallVelocityX=D;r.overallVelocityY=E;r.overallVelocity=T(D)>T(E)?D:E;C?(D=C.pointers,D=V(y[0],y[1],Y)/V(D[0],D[1],Y)):D=1;r.scale=D;C?(C=C.pointers,y=Q(y[1],y[0],Y)+Q(C[1],C[0],Y)):y=0;r.rotation=y;r.maxPointers=q.prevInput? r.pointers.length>q.prevInput.maxPointers?r.pointers.length:q.prevInput.maxPointers:r.pointers.length;E=q.lastInterval||r;y=r.timeStamp-E.timeStamp;8!=r.eventType&&(25<y||E.velocity===e)?(D=r.deltaX-E.deltaX,E=r.deltaY-E.deltaY,I=D/y||0,M=E/y||0,y=I,C=M,I=T(I)>T(M)?I:M,D=X(D,E),q.lastInterval=r):(I=E.velocity,y=E.velocityX,C=E.velocityY,D=E.direction);r.velocity=I;r.velocityX=y;r.velocityY=C;r.direction=D;q=m.element;t(r.srcEvent.target,q)&&(q=r.srcEvent.target);r.target=q;m.emit("hammer.input",r); m.recognize(r);m.session.prevInput=r}function F(m){for(var q=[],r=0;r<m.pointers.length;)q[r]={clientX:W(m.pointers[r].clientX),clientY:W(m.pointers[r].clientY)},r++;return{timeStamp:fa(),pointers:q,center:K(q),deltaX:m.deltaX,deltaY:m.deltaY}}function K(m){var q=m.length;if(1===q)return{x:W(m[0].clientX),y:W(m[0].clientY)};for(var r=0,y=0,C=0;C<q;)r+=m[C].clientX,y+=m[C].clientY,C++;return{x:W(r/q),y:W(y/q)}}function X(m,q){return m===q?1:T(m)>=T(q)?0>m?2:4:0>q?8:16}function V(m,q,r){r||(r=pa);var y= q[r[0]]-m[r[0]];m=q[r[1]]-m[r[1]];return Math.sqrt(y*y+m*m)}function Q(m,q,r){r||(r=pa);return 180*Math.atan2(q[r[1]]-m[r[1]],q[r[0]]-m[r[0]])/Math.PI}function U(){this.evEl=za;this.evWin=Aa;this.pressed=!1;G.apply(this,arguments)}function Z(){this.evEl=qa;this.evWin=ra;G.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function aa(){this.evTarget="touchstart";this.evWin="touchstart touchmove touchend touchcancel";this.started=!1;G.apply(this,arguments)}function R(){this.evTarget= Ba;this.targetIds={};G.apply(this,arguments)}function S(m,q){var r=x(m.touches),y=this.targetIds;if(q&3&&1===r.length)return y[r[0].identifier]=!0,[r,r];m=x(m.changedTouches);var C=[],D=this.target;var E=r.filter(function(I){return t(I.target,D)});if(1===q)for(r=0;r<E.length;)y[E[r].identifier]=!0,r++;for(r=0;r<m.length;)y[m[r].identifier]&&C.push(m[r]),q&12&&delete y[m[r].identifier],r++;if(C.length)return[z(E.concat(C),"identifier",!0),C]}function ha(){G.apply(this,arguments);var m=n(this.handler, this);this.touch=new R(this.manager,m);this.mouse=new U(this.manager,m);this.primaryTouch=null;this.lastTouches=[]}function sa(m){m=m.changedPointers[0];if(m.identifier===this.primaryTouch){var q={x:m.clientX,y:m.clientY};this.lastTouches.push(q);var r=this.lastTouches;setTimeout(function(){var y=r.indexOf(q);-1<y&&r.splice(y,1)},2500)}}function ia(m,q){this.manager=m;this.set(q)}function Ca(m){if(-1<m.indexOf("none"))return"none";var q=-1<m.indexOf("pan-x"),r=-1<m.indexOf("pan-y");return q&&r?"none": q||r?q?"pan-x":"pan-y":-1<m.indexOf("manipulation")?"manipulation":"auto"}function N(m){this.options=P({},this.defaults,m||{});this.id=Da++;this.manager=null;m=this.options.enable;this.options.enable=m===e?!0:m;this.state=1;this.simultaneous={};this.requireFail=[]}function ta(m){return m&16?"cancel":m&8?"end":m&4?"move":m&2?"start":""}function ua(m){return 16==m?"down":8==m?"up":2==m?"left":4==m?"right":""}function ba(m,q){return(q=q.manager)?q.get(m):m}function L(){N.apply(this,arguments)}function ca(){L.apply(this, arguments);this.pY=this.pX=null}function ja(){L.apply(this,arguments)}function ka(){N.apply(this,arguments);this._input=this._timer=null}function la(){L.apply(this,arguments)}function ma(){L.apply(this,arguments)}function da(){N.apply(this,arguments);this.pCenter=this.pTime=!1;this._input=this._timer=null;this.count=0}function O(m,q){q=q||{};var r=q.recognizers;q.recognizers=r===e?O.defaults.preset:r;return new na(m,q)}function na(m,q){this.options=P({},O.defaults,q||{});this.options.inputTarget= this.options.inputTarget||m;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps={};this.element=m;this.input=new ha(this,H);this.touchAction=new ia(this,this.options.touchAction);va(this,!0);h(this.options.recognizers,function(r){var y=this.add(new r[0](r[1]));r[2]&&y.recognizeWith(r[2]);r[3]&&y.requireFailure(r[3])},this)}function va(m,q){var r=m.element;if(r.style){var y;h(m.options.cssProps,function(C,D){y=A(r.style,D);q?(m.oldCssProps[y]=r.style[y],r.style[y]=C):r.style[y]=m.oldCssProps[y]|| ""});q||(m.oldCssProps={})}}function Ea(m,q){var r=c.createEvent("Event");r.initEvent(m,!0,!0);r.gesture=q;q.target.dispatchEvent(r)}var oa=" webkit Moz MS ms o".split(" "),Fa=c.createElement("div"),W=Math.round,T=Math.abs,fa=Date.now;var P="function"!==typeof Object.assign?function(m){if(m===e||null===m)throw new TypeError("Cannot convert undefined or null to object");for(var q=Object(m),r=1;r<arguments.length;r++){var y=arguments[r];if(y!==e&&null!==y)for(var C in y)y.hasOwnProperty(C)&&(q[C]=y[C])}return q}: Object.assign;var wa=k(function(m,q,r){for(var y=Object.keys(q),C=0;C<y.length;){if(!r||r&&m[y[C]]===e)m[y[C]]=q[y[C]];C++}return m},"extend","Use `assign`."),Ga=k(function(m,q){return wa(m,q,!0)},"merge","Use `assign`."),Da=1,Ha=/mobile|tablet|ip(ad|hone|od)|android/i,Ia="ontouchstart"in b;A(b,"PointerEvent");Ia&&Ha.test(navigator.userAgent);var pa=["x","y"],Y=["clientX","clientY"];G.prototype={handler:function(){},init:function(){this.evEl&&v(this.element,this.evEl,this.domHandler);this.evTarget&& v(this.target,this.evTarget,this.domHandler);this.evWin&&v(J(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&B(this.element,this.evEl,this.domHandler);this.evTarget&&B(this.target,this.evTarget,this.domHandler);this.evWin&&B(J(this.element),this.evWin,this.domHandler)}};var Ja={mousedown:1,mousemove:2,mouseup:4},za="mousedown",Aa="mousemove mouseup";l(U,G,{handler:function(m){var q=Ja[m.type];q&1&&0===m.button&&(this.pressed=!0);q&2&&1!==m.which&&(q=4);this.pressed&&(q&4&& (this.pressed=!1),this.callback(this.manager,q,{pointers:[m],changedPointers:[m],pointerType:"mouse",srcEvent:m}))}});var Ka={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},La={2:"touch",3:"pen",4:"mouse",5:"kinect"},qa="pointerdown",ra="pointermove pointerup pointercancel";b.MSPointerEvent&&!b.PointerEvent&&(qa="MSPointerDown",ra="MSPointerMove MSPointerUp MSPointerCancel");l(Z,G,{handler:function(m){var q=this.store,r=!1,y=m.type.toLowerCase().replace("ms","");y=Ka[y];var C= La[m.pointerType]||m.pointerType,D="touch"==C,E=w(q,m.pointerId,"pointerId");y&1&&(0===m.button||D)?0>E&&(q.push(m),E=q.length-1):y&12&&(r=!0);0>E||(q[E]=m,this.callback(this.manager,y,{pointers:q,changedPointers:[m],pointerType:C,srcEvent:m}),r&&q.splice(E,1))}});var Ma={touchstart:1,touchmove:2,touchend:4,touchcancel:8};l(aa,G,{handler:function(m){var q=Ma[m.type];1===q&&(this.started=!0);if(this.started){var r=x(m.touches);var y=x(m.changedTouches);q&12&&(r=z(r.concat(y),"identifier",!0));r=[r, y];q&12&&0===r[0].length-r[1].length&&(this.started=!1);this.callback(this.manager,q,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:m})}}});var Na={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Ba="touchstart touchmove touchend touchcancel";l(R,G,{handler:function(m){var q=Na[m.type],r=S.call(this,m,q);r&&this.callback(this.manager,q,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:m})}});l(ha,G,{handler:function(m,q,r){var y="mouse"==r.pointerType;if(!(y&&r.sourceCapabilities&& r.sourceCapabilities.firesTouchEvents)){if("touch"==r.pointerType)q&1?(this.primaryTouch=r.changedPointers[0].identifier,sa.call(this,r)):q&12&&sa.call(this,r);else{if(y)a:{y=r.srcEvent.clientX;for(var C=r.srcEvent.clientY,D=0;D<this.lastTouches.length;D++){var E=this.lastTouches[D],I=Math.abs(C-E.y);if(25>=Math.abs(y-E.x)&&25>=I){y=!0;break a}}y=!1}if(y)return}this.callback(m,q,r)}},destroy:function(){this.touch.destroy();this.mouse.destroy()}});var xa=A(Fa.style,"touchAction"),ya=xa!==e,ea=function(){if(!ya)return!1; var m={},q=b.CSS&&b.CSS.supports;"auto;manipulation;pan-y;pan-x;pan-x pan-y;none".split(";").forEach(function(r){m[r]=q?b.CSS.supports("touch-action",r):!0});return m}();ia.prototype={set:function(m){"compute"==m&&(m=this.compute());ya&&this.manager.element.style&&ea[m]&&(this.manager.element.style[xa]=m);this.actions=m.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var m=[];h(this.manager.recognizers,function(q){p(q.options.enable,[q])&&(m= m.concat(q.getTouchAction()))});return Ca(m.join(" "))},preventDefaults:function(m){var q=m.srcEvent,r=m.offsetDirection;if(this.manager.session.prevented)q.preventDefault();else{var y=this.actions,C=-1<y.indexOf("none")&&!ea.none,D=-1<y.indexOf("pan-y")&&!ea["pan-y"];y=-1<y.indexOf("pan-x")&&!ea["pan-x"];if(C){var E=2>m.distance,I=250>m.deltaTime;if(1===m.pointers.length&&E&&I)return}if(!y||!D)if(C||D&&r&6||y&&r&24)return this.preventSrc(q)}},preventSrc:function(m){this.manager.session.prevented= !0;m.preventDefault()}};N.prototype={defaults:{},set:function(m){P(this.options,m);this.manager&&this.manager.touchAction.update();return this},recognizeWith:function(m){if(g(m,"recognizeWith",this))return this;var q=this.simultaneous;m=ba(m,this);q[m.id]||(q[m.id]=m,m.recognizeWith(this));return this},dropRecognizeWith:function(m){if(g(m,"dropRecognizeWith",this))return this;m=ba(m,this);delete this.simultaneous[m.id];return this},requireFailure:function(m){if(g(m,"requireFailure",this))return this; var q=this.requireFail;m=ba(m,this);-1===w(q,m)&&(q.push(m),m.requireFailure(this));return this},dropRequireFailure:function(m){if(g(m,"dropRequireFailure",this))return this;m=ba(m,this);m=w(this.requireFail,m);-1<m&&this.requireFail.splice(m,1);return this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(m){return!!this.simultaneous[m.id]},emit:function(m){function q(C){r.manager.emit(C,m)}var r=this,y=this.state;8>y&&q(r.options.event+ta(y));q(r.options.event); m.additionalEvent&&q(m.additionalEvent);8<=y&&q(r.options.event+ta(y))},tryEmit:function(m){if(this.canEmit())return this.emit(m);this.state=32},canEmit:function(){for(var m=0;m<this.requireFail.length;){if(!(this.requireFail[m].state&33))return!1;m++}return!0},recognize:function(m){m=P({},m);p(this.options.enable,[this,m])?(this.state&56&&(this.state=1),this.state=this.process(m),this.state&30&&this.tryEmit(m)):(this.reset(),this.state=32)},process:function(m){},getTouchAction:function(){},reset:function(){}}; l(L,N,{defaults:{pointers:1},attrTest:function(m){var q=this.options.pointers;return 0===q||m.pointers.length===q},process:function(m){var q=this.state,r=m.eventType,y=q&6;m=this.attrTest(m);return y&&(r&8||!m)?q|16:y||m?r&4?q|8:q&2?q|4:2:32}});l(ca,L,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var m=this.options.direction,q=[];m&6&&q.push("pan-y");m&24&&q.push("pan-x");return q},directionTest:function(m){var q=this.options,r=!0,y=m.distance,C=m.direction, D=m.deltaX,E=m.deltaY;C&q.direction||(q.direction&6?(C=0===D?1:0>D?2:4,r=D!=this.pX,y=Math.abs(m.deltaX)):(C=0===E?1:0>E?8:16,r=E!=this.pY,y=Math.abs(m.deltaY)));m.direction=C;return r&&y>q.threshold&&C&q.direction},attrTest:function(m){return L.prototype.attrTest.call(this,m)&&(this.state&2||!(this.state&2)&&this.directionTest(m))},emit:function(m){this.pX=m.deltaX;this.pY=m.deltaY;var q=ua(m.direction);q&&(m.additionalEvent=this.options.event+q);this._super.emit.call(this,m)}});l(ja,L,{defaults:{event:"pinch", threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(m){return this._super.attrTest.call(this,m)&&(Math.abs(m.scale-1)>this.options.threshold||this.state&2)},emit:function(m){1!==m.scale&&(m.additionalEvent=this.options.event+(1>m.scale?"in":"out"));this._super.emit.call(this,m)}});l(ka,N,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(m){var q=this.options,r=m.pointers.length===q.pointers,y=m.distance< q.threshold,C=m.deltaTime>q.time;this._input=m;if(!y||!r||m.eventType&12&&!C)this.reset();else if(m.eventType&1)this.reset(),this._timer=f(function(){this.state=8;this.tryEmit()},q.time,this);else if(m.eventType&4)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(m){8===this.state&&(m&&m.eventType&4?this.manager.emit(this.options.event+"up",m):(this._input.timeStamp=fa(),this.manager.emit(this.options.event,this._input)))}});l(la,L,{defaults:{event:"rotate",threshold:0, pointers:2},getTouchAction:function(){return["none"]},attrTest:function(m){return this._super.attrTest.call(this,m)&&(Math.abs(m.rotation)>this.options.threshold||this.state&2)}});l(ma,L,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return ca.prototype.getTouchAction.call(this)},attrTest:function(m){var q=this.options.direction;if(q&30)var r=m.overallVelocity;else q&6?r=m.overallVelocityX:q&24&&(r=m.overallVelocityY);return this._super.attrTest.call(this, m)&&q&m.offsetDirection&&m.distance>this.options.threshold&&m.maxPointers==this.options.pointers&&T(r)>this.options.velocity&&m.eventType&4},emit:function(m){var q=ua(m.offsetDirection);q&&this.manager.emit(this.options.event+q,m);this.manager.emit(this.options.event,m)}});l(da,N,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(m){var q=this.options,r=m.pointers.length===q.pointers,y=m.distance< q.threshold,C=m.deltaTime<q.time;this.reset();if(m.eventType&1&&0===this.count)return this.failTimeout();if(y&&C&&r){if(4!=m.eventType)return this.failTimeout();r=this.pTime?m.timeStamp-this.pTime<q.interval:!0;y=!this.pCenter||V(this.pCenter,m.center)<q.posThreshold;this.pTime=m.timeStamp;this.pCenter=m.center;this.count=y&&r?this.count+1:1;this._input=m;if(0===this.count%q.taps)return this.hasRequireFailures()?(this._timer=f(function(){this.state=8;this.tryEmit()},q.interval,this),2):8}return 32}, failTimeout:function(){this._timer=f(function(){this.state=32},this.options.interval,this);return 32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});O.VERSION="2.0.8";O.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[la,{enable:!1}],[ja,{enable:!1},["rotate"]],[ma,{direction:6}],[ca,{direction:6},["swipe"]],[da],[da,{event:"doubletap", taps:2},["tap"]],[ka]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};na.prototype={set:function(m){P(this.options,m);m.touchAction&&this.touchAction.update();m.inputTarget&&(this.input.destroy(),this.input.target=m.inputTarget,this.input.init());return this},stop:function(m){this.session.stopped=m?2:1},recognize:function(m){var q=this.session;if(!q.stopped){this.touchAction.preventDefaults(m);var r=this.recognizers, y=q.curRecognizer;if(!y||y&&y.state&8)y=q.curRecognizer=null;for(var C=0;C<r.length;){var D=r[C];2===q.stopped||y&&D!=y&&!D.canRecognizeWith(y)?D.reset():D.recognize(m);!y&&D.state&14&&(y=q.curRecognizer=D);C++}}},get:function(m){if(m instanceof N)return m;for(var q=this.recognizers,r=0;r<q.length;r++)if(q[r].options.event==m)return q[r];return null},add:function(m){if(g(m,"add",this))return this;var q=this.get(m.options.event);q&&this.remove(q);this.recognizers.push(m);m.manager=this;this.touchAction.update(); return m},remove:function(m){if(g(m,"remove",this))return this;if(m=this.get(m)){var q=this.recognizers;m=w(q,m);-1!==m&&(q.splice(m,1),this.touchAction.update())}return this},on:function(m,q){if(m!==e&&q!==e){var r=this.handlers;h(u(m),function(y){r[y]=r[y]||[];r[y].push(q)});return this}},off:function(m,q){if(m!==e){var r=this.handlers;h(u(m),function(y){q?r[y]&&r[y].splice(w(r[y],q),1):delete r[y]});return this}},emit:function(m,q){this.options.domEvents&&Ea(m,q);var r=this.handlers[m]&&this.handlers[m].slice(); if(r&&r.length)for(q.type=m,q.preventDefault=function(){q.srcEvent.preventDefault()},m=0;m<r.length;)r[m](q),m++},destroy:function(){this.element&&va(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};P(O,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6, DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:na,Input:G,TouchAction:ia,TouchInput:R,MouseInput:U,PointerEventInput:Z,TouchMouseInput:ha,SingleTouchInput:aa,Recognizer:N,AttrRecognizer:L,Tap:da,Pan:ca,Swipe:ma,Pinch:ja,Rotate:la,Press:ka,on:v,off:B,each:h,merge:Ga,extend:wa,assign:P,inherit:l,bindFn:n,prefixed:A});("undefined"!==typeof b?b:"undefined"!==typeof self?self:{}).Hammer=O;"function"===typeof define&&define.amd?define(function(){return O}):"undefined"!=typeof module&&module.exports?module.exports= O:b[d]=O})(window,document,"Hammer"); jQuery.fn.IEZoom=function(b){this.options=b;this.middleScale=3;this.maxScale=6;this.side=b.side;this.parameters={width:$(this).width()||0,height:$(this).height()||0,naturalWidth:$(this).width()||0,naturalHeight:$(this).height()||0,left:parseInt($(this).css("left"))||0,top:parseInt($(this).css("top"))||0,naturalLeft:parseInt($(this).css("left"))||0,naturalTop:parseInt($(this).css("top"))||0,scale:1,rotate:0,toScale:1,tran:{x:0,y:0},origin:{x:50,y:50},zoomFlag:!1,zoomming:!1,zoonOut:!1,resize:!1,eventCancel:!1}; this.onPan=function(f){if(!this.parameters.resize&&!this.parameters.eventCancel&&!this.parameters.zoomming&&f&&f.pointers&&1==f.pointers.length&&(this.swipeInterval&&this.swipeInterval.stop(),this.animateInterval&&this.animateInterval.stop(),this.parameters.zoomFlag&&(this.panForMove(this,f.deltaX,f.deltaY,!0),this.options&&this.options.onPan)))this.options.onPan()};this.onDoubleTap=function(f){if(!(BookInfo.getBook().status_resize||BookInfo.getBook().flipping||(BookInfo.getBook().endFlip(),global.windowTapInterval&& window.clearTimeout(global.windowTapInterval),this.parameters.resize||this.parameters.eventCancel||this.parameters.zoomming)))if(this.status_zoom=!0,!this.parameters.zoomFlag)this.zoomIn(this),this.parameters.zoomOut=!1,this.animateToScale(this,this.middleScale,f);else if(this.parameters.zoomFlag){var g=this.parameters.naturalWidth/this.parameters.width;this.parameters.zoomOut=!0;this.animateToScale(this,g,f)}};this.zoomIn=function(f){f.parameters.left=parseInt($(f).css("left"));f.parameters.top= parseInt($(f).css("top"));f.parameters.naturalLeft=f.parameters.left;f.parameters.naturalTop=f.parameters.top;f.parameters.width=$(f).width();f.parameters.height=$(f).height();f.parameters.naturalWidth=$(f).width();f.parameters.naturalHeight=$(f).height();f.parameters.zoomFlag=!0;f.parameters.zoomOut=!1;f.options&&f.options.zoomIn&&f.options.zoomIn()};this.zoomOut=function(f){f.swipeInterval&&f.swipeInterval.stop();f.animateInterval&&f.animateInterval.stop();f.parameters.zoomFlag=!1;f.parameters.zoomOut= !0;f.parameters.toScale=1;f.parameters.scale=1;f.options&&f.options.zoomOut&&f.options.zoomOut()};this.animateToScale=function(f,g,h){if(!f.parameters.eventCancel&&!f.parameters.zoomming){f.options&&f.options.zoomStart&&f.options.zoomStart();f.parameters.zoomming=!0;var k=0,l=0,n=0,p=0,v=0;f.animateInterval=function(B,t){k=$.easing.swing(null,n,f.parameters.width,f.parameters.width*(g-1),20);l=$.easing.swing(null,n,f.parameters.height,f.parameters.height*(g-1),20);p=$.easing.swing(null,n,f.parameters.left, f.parameters.naturalLeft+50*(f.parameters.naturalWidth-f.parameters.width*g)/100-f.parameters.left,20);v=$.easing.swing(null,n,f.parameters.top,f.parameters.naturalTop+50*(f.parameters.naturalHeight-f.parameters.height*g)/100-f.parameters.top,20);f.css({width:k+"px",height:l+"px",left:p+"px",top:v+"px"});for(var u=0;u<f.side.pageArray.length;u++)if(f.side.pageArray[u])f.side.pageArray[u].onResize(k/2,l);n++;if(20<=n||B>=t){f.animateInterval.stop();f.parameters.left=f.parameters.naturalLeft+50*(f.parameters.naturalWidth- f.parameters.width*g)/100;f.parameters.top=f.parameters.naturalTop+50*(f.parameters.naturalHeight-f.parameters.height*g)/100;f.parameters.width*=g;f.parameters.height*=g;f.css({width:f.parameters.width+"px",height:f.parameters.height+"px",left:f.parameters.left+"px",top:f.parameters.top+"px"});for(u=0;u<f.side.pageArray.length;u++)if(f.side.pageArray[u])f.side.pageArray[u].onResize(f.parameters.width/2,f.parameters.height);f.parameters.zoomming=!1;1>=f.parameters.width*f.parameters.scale/f.parameters.naturalWidth&& f.zoomOut(f)}}.animation(this,320)}};this.panForMove=function(f,g,h,k){f.css({left:f.parameters.left+g+"px",top:f.parameters.top+h+"px"})};var c=!1,d=0,e=0;bookConfig.SupportOperatePageZoom&&this.dblclick(function(f){f.pointers=[{pageX:f.pageX,pageY:f.pageY}];this.onDoubleTap(f)}.bind(this));this.bind(_event._down,function(f){c=!0;d=f.pageX;e=f.pageY}.bind(this));this.bind(_event._move,function(f){f.pointers=[{pageX:f.pageX,pageY:f.pageY}];c&&(f.deltaX=f.pageX-d,f.deltaY=f.pageY-e,this.onPan(f))}.bind(this)); this.bind(_event._end,function(f){c=!1;this.parameters.left+=f.pageX-d;this.parameters.top+=f.pageY-e}.bind(this))}; jQuery.fn.zoom=function(b,c){this.options=b;this.isBook=c;this.parameters={width:$(this).width()||0,height:$(this).height()||0,naturalWidth:$(this).width()||0,naturalHeight:$(this).height()||0,left:$(this).offset().left-0||0,top:$(this).offset().top-0||0,toScale:1,scale:1,rotate:0,tran:{x:0,y:0},origin:{x:50,y:50},zoomFlag:!1,zoomming:!1,zoomOut:!1,resize:!1,eventCancel:!1,zoomDelay:!1,onPan:!1,onSwipe:!1,onDoubleTap:!1,onPinch:!1,zoomArea:{left:0,top:0,right:0,bottom:0}};this.onPan=function(d){if(!this.parameters.resize&& !this.parameters.eventCancel&&!this.parameters.zoomming&&d&&d.pointers&&1==d.pointers.length&&(this.swipeInterval&&this.swipeInterval.stop(),this.animateInterval&&this.animateInterval.stop(),this.parameters.zoomFlag)){"panstart"==d.type&&(this.parameters.onPan=!0);var e=this.getDelta(d);e=this.panForMove(this,e.deltaX,e.deltaY,!0);if(this.options&&this.options.onPan)this.options.onPan();if("panend"==d.type||"pancancel"==d.type)this.parameters.onPan=!1,this.setZoomParameters(this,e),this.restrictInBoundary(this)}}; this.onSwipe=function(d){if(!this.parameters.resize&&!this.parameters.eventCancel&&!this.parameters.zoomming)if(this.parameters.zoomFlag){var e=this.parameters.tran,f=this.tranLimit(this,this.parameters.scale,this.parameters.tran);if(f.x==parseInt(e.x)&&f.y==parseInt(e.y)){this.animateInterval&&this.animateInterval.stop();this.swipeInterval&&this.swipeInterval.stop();var g=0,h=0;d=this.getVelocity(d);g=d.velocityX;h=d.velocityY;this.swipeInterval=function(k,l){var n=this.parameters.tran,p=this.tranLimit(this, this.parameters.scale,this.parameters.tran);p.x!=parseInt(n.x)||p.y!=parseInt(n.y)?(this.swipeInterval.stop(),this.restrictInBoundary(this)):(n=(l-k)/l,n=this.panForMove(this,g*n*16.7,h*n*16.7,!0),this.setZoomParameters(this,n),k>=l&&(this.swipeInterval.stop(),this.restrictInBoundary(this)))}.animation(this,320)}}else d=this.getDirection(d),this.options&&this.options.swipeend&&this.options.swipeend(d)};this.getDirection=function(d){var e,f=bookConfig.upsideOnMobile();d.direction&Hammer.DIRECTION_RIGHT&& !f&&(e="right");d.direction&Hammer.DIRECTION_LEFT&&!f&&(e="left");d.direction&Hammer.DIRECTION_UP&&!f&&(e="up");d.direction&Hammer.DIRECTION_DOWN&&!f&&(e="down");d.direction&Hammer.DIRECTION_RIGHT&&f&&(e="down");d.direction&Hammer.DIRECTION_LEFT&&f&&(e="up");d.direction&Hammer.DIRECTION_UP&&f&&(e="left");d.direction&Hammer.DIRECTION_DOWN&&f&&(e="right");return e};this.getVelocity=function(d){var e=0,f=0,g=bookConfig.upsideOnMobile();0==d.velocityX||g||(e=d.velocityX);0==d.velocityY||g||(f=d.velocityY); 0!=d.velocityX&&g&&(e=d.velocityY);0!=d.velocityY&&g&&(f=-d.velocityX);return{velocityX:e,velocityY:f}};this.getDelta=function(d){var e=0,f=0,g=bookConfig.upsideOnMobile();0==d.deltaX||g||(e=d.deltaX);0==d.deltaY||g||(f=d.deltaY);0!=d.deltaX&&g&&(e=d.deltaY);0!=d.deltaY&&g&&(f=-d.deltaX);return{deltaX:e,deltaY:f}};this.onDoubleTap=function(d){if(!(BookInfo.getBook().status_resize||BookInfo.getBook().flipping||(BookInfo.getBook().endFlip(),global.windowTapInterval&&window.clearTimeout(global.windowTapInterval), this.parameters.resize||this.parameters.zoomming)))if(BookInfo.getBook().unSelect(),this.status_zoom=!0,!this.parameters.zoomFlag)BookEvent.trigger("zoomIn",["double tap",BookInfo.getCurrentPages().join("-")]),this.zoomIn(this),this.parameters.origin=this.mathOrigin(this,d),this.originObj(this,this.parameters.origin),this.parameters.zoomOut=!1,this.animateToScale(this,this.middleScale,d);else if(this.parameters.zoomFlag){this.beforeZoomOut(this);BookEvent.trigger("zoomOut",["double tap",BookInfo.getCurrentPages().join("-")]); var e=this.parameters.naturalWidth/this.parameters.width;this.parameters.zoomOut=!0;this.animateToScale(this,e,d)}};this.onPinch=function(d){"pinchstart"==d.type&&(this.pinchStart=!0);if(!(this.parameters.resize||this.parameters.zoomming||!this.parameters.zoomFlag&&1>=d.scale)&&d&&d.pointers){BookInfo.getBook().unSelect();this.animateInterval&&this.animateInterval.stop();this.swipeInterval&&this.swipeInterval.stop();var e=function(){this.pinchStart=!1;this.parameters.zoomFlag||(this.parameters.zoomOut= !1,this.zoomIn(this));BookEvent.trigger("zoomIn",["pinch",BookInfo.getCurrentPages().join("-")]);this.scale=this.parameters.toScale;this.parameters.origin=this.mathOrigin(this,d);this.originObj(this,this.parameters.origin);this.pinchMoveIn(this,parseFloat(this.scale)*parseFloat(d.scale),d,this.parameters.origin)}.bind(this);"pinchstart"==d.type&&(this.parameters.onPinch=!0,e(d));"pinchend"==d.type&&(this.parameters.scale=this.parameters.toScale,this.parameters.onPinch=!1,this.exceedScale(this,d), this.pinchStart=!1);"pinchmove"==d.type&&(this.pinchStart&&e(d),this.pinchMoveIn(this,parseFloat(this.scale)*parseFloat(d.scale),d,this.parameters.origin));"pinchcancel"==d.type&&(this.parameters.scale=this.parameters.toScale,this.parameters.onPinch=!1,this.exceedScale(this,d),this.pinchStart=!1)}};this.exceedScale=function(d,e){var f=d.parameters.width*d.parameters.toScale/d.parameters.naturalWidth,g=d.parameters.width*d.parameters.toScale,h=d.parameters.height*d.parameters.toScale,k=d.parameters.naturalWidth* d.maxScale/d.parameters.width,l=d.parameters.naturalWidth/d.parameters.width,n=d.parameters.toScale;f>d.maxScale&&(n=k);if(1>f||g<windowWidth&&h<windowHeight)d.parameters.zoomOut=!0,n=l;d.animateToScale(d,n,e)};this.zoomIn=function(d){var e=this.getBookOffset($(d));d.parameters.tran=getTransform(d[0]);d.parameters.left=e.left-d.parameters.tran.x;d.parameters.top=e.top-d.parameters.tran.y;d.parameters.width=$(d).width();d.parameters.height=$(d).height();d.parameters.naturalWidth=$(d).width();d.parameters.naturalHeight= $(d).height();d.setZoomSize();d.parameters.zoomFlag=!0;d.parameters.zoomOut=!1;d.options&&d.options.zoomIn&&d.options.zoomIn(d.parameters)};this.beforeZoomOut=function(d){d.options&&d.options.beforeZoomOut&&d.options.beforeZoomOut()};this.zoomOut=function(d){d.swipeInterval&&d.swipeInterval.stop();d.animateInterval&&d.animateInterval.stop();d.parameters.zoomFlag=!1;d.parameters.zoomOut=!0;d.parameters.toScale=1;d.parameters.scale=1;d.options&&d.options.zoomOut&&d.options.zoomOut()};this.tranLimit= function(d,e,f){if(f){if(d.parameters.zoomOut){f={x:0,y:0};f.x=d.parameters.width*(e-1)*d.parameters.origin.x/100;f.y=d.parameters.height*(e-1)*d.parameters.origin.y/100;if((bookType==BookType.normal_book||bookType==BookType.catalog_book)&&bookConfig.retainBookCenter&&d.isBook){var g=BookInfo.getCurrentPages();1==g.length&&(!BookInfo.isLeftPage(g[0],!0)&&bookConfig.FlipDirection&&(f.y-=d.parameters.height*e/4),BookInfo.isLeftPage(g[0],!0)&&bookConfig.FlipDirection&&(f.y+=d.parameters.height*e/4), BookInfo.isLeftPage(g[0],!0)||bookConfig.FlipDirection||(f.x-=d.parameters.width*e/4),BookInfo.isLeftPage(g[0],!0)&&!bookConfig.FlipDirection&&(f.x+=d.parameters.width*e/4))}return f}d.parameters.origin||(d.parameters.origin={x:0,y:0});g=f.x;f=f.y;var h=d.parameters.width;var k=d.parameters.height;var l=d.parameters.left-d.parameters.origin.x*(e-1)*h/100;var n=d.parameters.top-d.parameters.origin.y*(e-1)*k/100;var p=e*h,v=e*k;if(p>windowWidth){var B=windowWidth-p-l+h*e*d.parameters.zoomArea.right/ 100;l=-l-h*e*d.parameters.zoomArea.left/100}else B=-l-h*e*d.parameters.zoomArea.left/100,l=windowWidth-p-l+h*e*d.parameters.zoomArea.right/100;v>windowHeight?(h=windowHeight-v-n+k*e*d.parameters.zoomArea.bottom/100,d=-n-k*e*d.parameters.zoomArea.top/100):(h=-n-k*e*d.parameters.zoomArea.top/100,d=windowHeight-v-n+k*e*d.parameters.zoomArea.bottom/100);g=Number.between(g,B,l);f=Number.between(f,h,d);return{x:parseInt(g),y:parseInt(f)}}};this.pinchMoveIn=function(d,e,f){if(!d.parameters.eventCancel&& !d.parameters.zoomming&&f&&f.pointers&&2==f.pointers.length){var g={};g.scale=e;g.tran=d.mathTran(d,f,d.parameters.origin);d.transformSetting(d,g);d.parameters.toScale=e}};this.mathTran=function(d,e,f){if(!e||!e.pointers||0>=e.pointers.length||!f)return{x:0,y:0};var g=this.getPageXY(e);e=g.pageX;g=g.pageY;var h=d.parameters.width;var k=d.parameters.height;var l=d.parameters.left;d=d.parameters.top;l=(f.x*h/100+l).toFixed(2);f=(f.y*k/100+d).toFixed(2);e-=parseFloat(l);f=g-parseFloat(f);return{x:parseFloat(e.toFixed(2)), y:parseFloat(f.toFixed(2))}};this.mathOrigin=function(d,e){if(!e||!e.pointers||0>=e.pointers.length)return{x:50,y:50};var f=this.getPageXY(e);e=f.pageX;f=f.pageY;var g=d.parameters.width;var h=d.parameters.height;var k=this.getBookOffset(d);e=(e-parseInt(k.left))/(g*d.parameters.scale);d=(f-parseInt(k.top))/(h*d.parameters.scale);return{x:(100*e).toFixed(2),y:(100*d).toFixed(2)}};this.getPageXY=function(d){var e=bookConfig.upsideOnMobile();if(1==d.pointers.length){var f=d.pointers[0].pageX;var g= d.pointers[0].pageY}1<d.pointers.length&&(f=(d.pointers[0].pageX+d.pointers[1].pageX)/2,g=(d.pointers[0].pageY+d.pointers[1].pageY)/2);return e?{pageX:g,pageY:windowHeight-f}:{pageX:f,pageY:g}};this.getBookOffset=function(d){if(d)return d=d.offset(),bookConfig.upsideOnMobile()?{left:d.top,top:d.left}:{left:d.left,top:d.top}};this.restrictInBoundary=function(d,e){if(!d.parameters.eventCancel&&!d.parameters.zoomming){var f=d.parameters.tran,g=this.tranLimit(d,d.parameters.scale,f);if(g.x!=parseInt(f.x)|| g.y!=parseInt(f.y)){d.animateInterval&&d.animateInterval.stop();var h=0,k=0,l=0;g.x!=f.x&&(h=g.x-f.x);g.y!=f.y&&(k=g.y-f.y);d.animateInterval=function(n,p){var v=$.easing.easeOutBack(null,l,0,h,20),B=$.easing.easeOutBack(null,l,0,k,20);0<l&&(v-=$.easing.easeOutBack(null,l-1,0,h,20),B-=$.easing.easeOutBack(null,l-1,0,k,20));v=d.panForMove(d,v,B);d.setZoomParameters(d,v);l++;if(20<=l||n>=p)d.animateInterval.stop(),BookInfo.getBook().bookAttachments&&BookInfo.getBook().bookAttachments.Items.find("ZoomMap").each(function(t){t.refreshArea()}), e&&"function"==typeof e&&e()}.animation(this,320)}}};this.transformSetting=function(d,e){d.setZoomParameters(d,e);e=transformCSS(e);d.css(e)};this.panForMove=function(d,e,f,g){var h=d.parameters?d.parameters.tran:{x:0,y:0};g=d.parameters?d.parameters.scale:1;h||(h={x:0,y:0});g||0==g||(g=1);e=parseInt(h.x+e);f=parseInt(h.y+f);f={x:e,y:f};e=transformCSS({tran:f,scale:g});d.css(e);return{tran:f,scale:g}};this.originObj=function(d,e){d.css({"-webkit-transform-origin":e.x+"% "+e.y+"%","-moz-transform-origin":e.x+ "% "+e.y+"%","-ms-transform-origin":e.x+"% "+e.y+"%","-o-transform-origin":e.x+"% "+e.y+"%"})};this.setZoomParameters=function(d,e){function f(k){return void 0!==k&&null!==k}function g(k){return f(e[k])&&!isNaN(e[k])?e[k]:d.parameters[k]}function h(k){return f(e[k])?e[k]:d.parameters[k]}d&&d.parameters&&e&&(d.parameters={width:g("width"),height:g("height"),naturalWidth:g("naturalWidth"),naturalHeight:g("naturalHeight"),left:g("left"),top:g("top"),scale:g("scale"),rotate:g("rotate"),toScale:g("toScale"), tran:h("tran"),origin:h("origin"),zoomFlag:h("zoomFlag"),zoomming:h("zoomming"),zoomOut:h("zoomOut"),resize:h("resize"),eventCancel:h("eventCancel"),zoomArea:h("zoomArea"),zoomDelay:h("zoomDelay"),onPan:h("onPan"),onSwipe:h("onSwipe"),onDoubleTap:h("onDoubleTap"),onPinch:h("onPinch")})};this.animateToTransform=function(d,e,f){if(!this.parameters.eventCancel&&!this.parameters.zoomming){this.options&&this.options.zoomStart&&this.options.zoomStart();var g=this.getBookOffset($(this));this.parameters.tran= getTransform(this[0]);if(parseInt(e.x)!=parseInt(this.parameters.tran.x)||parseInt(e.y)!=parseInt(this.parameters.tran.y)||d.toFixed(2)!=this.parameters.scale.toFixed(2)){this.parameters.zoomming=!0;this.parameters.left=g.left-this.parameters.tran.x;this.parameters.top=g.top-this.parameters.tran.y;this.parameters.width=$(this).width();this.parameters.height=$(this).height();this.parameters.naturalWidth=$(this).width();this.parameters.naturalHeight=$(this).height();this.setZoomSize();var h={};h.origin= this.parameters.origin;h.scale=d;h.tran=e;h.origin=f;this.zoomTran=h;e=transformCSS(h);this.originObj(this,h.origin);animateOnce(this,e,300,function(){getTransform(this[0]);this.transformSetting(this,h);this.parameters.scale=d;this.parameters.toScale=d;this.parameters.zoomming=!1;if(this.options.onZoomed)this.options.onZoomed(h)}.bind(this),"%stransform","ease-out")}}};this.animateToTransform=function(d,e,f){if(!this.parameters.eventCancel&&!this.parameters.zoomming){this.options&&this.options.zoomStart&& this.options.zoomStart();var g=this.getBookOffset($(this));this.parameters.tran=getTransform(this[0]);if(parseInt(e.x)!=parseInt(this.parameters.tran.x)||parseInt(e.y)!=parseInt(this.parameters.tran.y)||d.toFixed(2)!=this.parameters.scale.toFixed(2)){this.parameters.zoomming=!0;this.parameters.left=g.left-this.parameters.tran.x;this.parameters.top=g.top-this.parameters.tran.y;this.parameters.width=$(this).width();this.parameters.height=$(this).height();this.parameters.naturalWidth=$(this).width(); this.parameters.naturalHeight=$(this).height();this.setZoomSize();var h={};h.scale=d;h.tran=e;h.origin=f;this.zoomTran=h;this.originObj(this,h.origin);try{var k=$.easing.easeOutSine,l=function(){(function(p,v){n(p,v,"Sine")}).animation(this,300)}.bind(this),n=function(p,v,B){if(p<v){B=k(null,p,this.parameters.tran.x,e.x-this.parameters.tran.x,v);var t=k(null,p,this.parameters.tran.y,e.y-this.parameters.tran.y,v);p=k(null,p,this.parameters.scale,d-this.parameters.scale,v);v={};v.scale=p;v.tran={x:B, y:t};B=transformCSS(v);this.css(B)}else if(this.transformSetting(this,h),this.parameters.scale=d,this.parameters.toScale=d,this.parameters.zoomming=!1,this.options.onZoomed)this.options.onZoomed(h)}.bind(this);l()}catch(p){}}}};this.animateToScale=function(d,e,f,g){if(!d.parameters.eventCancel&&!d.parameters.zoomming){d.options&&d.options.zoomStart&&d.options.zoomStart();d.parameters.zoomming=!0;var h={};h.origin=d.parameters.origin;h.scale=e;h.tran=this.mathTran(d,f,h.origin);h.tran=this.tranLimit(d, e,h.tran);this.zoomTran=h;this.animation(d,e,h,g)}};this.animation=function(d,e,f,g){var h=transformCSS(f);d.originObj(d,f.origin);animateOnce(d,h,void 0==g?600:g,function(){getTransform(d[0]);d.transformSetting(d,f);d.parameters.scale=e;d.parameters.toScale=e;d.parameters.zoomming=!1;var k=(d.parameters.width*d.parameters.toScale).toFixed(2),l=(d.parameters.height*d.parameters.toScale).toFixed(2),n=d.parameters.naturalWidth,p=d.parameters.naturalHeight;if(Number.isBetween(k,n-1,n+1)||Number.isBetween(l, p-1,p+1)){d.timeout&&(d.timeout=void 0,window.clearTimeout(d.timeout));d.parameters.zoomDelay=!1;if(d.options.onZoomed)d.options.onZoomed(d.zoomTran);d.zoomOut(d)}else if(d.options.onZoomed)d.options.onZoomed(d.zoomTran)}.bind(d),"%stransform","cubic-bezier(0.2150, 0.610, 0.3550, 1)")};this.delayExecuteOnZoomed=function(d){d.timeout=window.setTimeout(function(){if(d.parameters.zoomFlag&&!d.parameters.onPinch&&!d.parameters.zoomming)d.options.onZoomed(d.zoomTran);d.parameters.zoomDelay=!1;window.clearTimeout(d.timeout); d.timeout=void 0},3E3)};this.registerParamers=function(d){d&&(void 0!=d.width&&(this.parameters.width=d.width),void 0!=d.height&&(this.parameters.height=d.height),void 0!=d.left&&(this.parameters.left=d.left),void 0!=d.top&&(this.parameters.top=d.top),void 0!=d.scale&&(this.parameters.scale=d.scale),void 0!=d.tran&&(this.parameters.tran=d.tran),void 0!=d.origin&&(this.parameters.origin=d.origin))};this.setZoomSize=function(){var d=$(this).width(),e=$(this).height(),f=bookConfig.largePageHeight/bookConfig.largePageWidth, g=bookConfig.middleZoomWidth,h=g*f,k=getPageSize(BookInfo.getCurrentPageIndex(),"normal",bookConfig.totalPageCount);if(k&&1<k.length)if(1<=f){var l=findCloseNum(k,1350),n=l/f;k=k[k.length-1];var p=k/f}else n=findCloseNum(k,1350),l=n*f,p=k[k.length-1],k=p*f;else l=1350,n=l/f,k=2050,p=k/f;bookConfig.FlipDirection?(f=g/d,this.middleScale=Math.max(n/d,f,2),isPhone()||isPad()?this.maxScale=Math.max(p/d,f,4):this.maxScale=1E4/d):(f=h/e,this.middleScale=Math.max(l/e,f,2),isPhone()||isPad()?this.maxScale= Math.max(k/e,f,4):this.maxScale=1E4/e)};b=window.self!==window.top?"pan-y":"none";b=new Hammer.Manager($(this)[0],{touchAction:b});b.add(new Hammer.Pan);b.add((new Hammer.Swipe({velocity:.15})).recognizeWith(b.get("pan")));b.on("panstart panmove panend pancancel",this.onPan.bind(this));b.on("swipe swipeup",this.onSwipe.bind(this));if(bookConfig.SupportOperatePageZoom&&(b.add(new Hammer.Pinch),isPhone()||isPad()?b.add(new Hammer.Tap({event:"doubletap",taps:2,interval:400,posThreshold:30})):b.add(new Hammer.Tap({event:"doubletap", taps:2})),b.on("pinchstart pinchmove pinchcancel pinchend",this.onPinch.bind(this)),!isAndroidWeChat()))b.on("doubletap",this.onDoubleTap.bind(this));this.setZoomSize()};jQuery.easing.jswing=jQuery.easing.swing; jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return jQuery.easing[jQuery.easing.def](b,c,d,e,f)},easeInQuad:function(b,c,d,e,f){return e*(c/=f)*c+d},easeOutQuad:function(b,c,d,e,f){return-e*(c/=f)*(c-2)+d},easeInOutQuad:function(b,c,d,e,f){return 1>(c/=f/2)?e/2*c*c+d:-e/2*(--c*(c-2)-1)+d},easeInCubic:function(b,c,d,e,f){return e*(c/=f)*c*c+d},easeOutCubic:function(b,c,d,e,f){return e*((c=c/f-1)*c*c+1)+d},easeInOutCubic:function(b,c,d,e,f){return 1>(c/=f/2)?e/2*c*c*c+d: e/2*((c-=2)*c*c+2)+d},easeInQuart:function(b,c,d,e,f){return e*(c/=f)*c*c*c+d},easeOutQuart:function(b,c,d,e,f){return-e*((c=c/f-1)*c*c*c-1)+d},easeInOutQuart:function(b,c,d,e,f){return 1>(c/=f/2)?e/2*c*c*c*c+d:-e/2*((c-=2)*c*c*c-2)+d},easeInQuint:function(b,c,d,e,f){return e*(c/=f)*c*c*c*c+d},easeOutQuint:function(b,c,d,e,f){return e*((c=c/f-1)*c*c*c*c+1)+d},easeInOutQuint:function(b,c,d,e,f){return 1>(c/=f/2)?e/2*c*c*c*c*c+d:e/2*((c-=2)*c*c*c*c+2)+d},easeInSine:function(b,c,d,e,f){return-e*Math.cos(c/ f*(Math.PI/2))+e+d},easeOutSine:function(b,c,d,e,f){return e*Math.sin(c/f*(Math.PI/2))+d},easeInOutSine:function(b,c,d,e,f){return-e/2*(Math.cos(Math.PI*c/f)-1)+d},easeInExpo:function(b,c,d,e,f){return 0==c?d:e*Math.pow(2,10*(c/f-1))+d},easeOutExpo:function(b,c,d,e,f){return c==f?d+e:e*(-Math.pow(2,-10*c/f)+1)+d},easeInOutExpo:function(b,c,d,e,f){return 0==c?d:c==f?d+e:1>(c/=f/2)?e/2*Math.pow(2,10*(c-1))+d:e/2*(-Math.pow(2,-10*--c)+2)+d},easeInCirc:function(b,c,d,e,f){return-e*(Math.sqrt(1-(c/=f)* c)-1)+d},easeOutCirc:function(b,c,d,e,f){return e*Math.sqrt(1-(c=c/f-1)*c)+d},easeInOutCirc:function(b,c,d,e,f){return 1>(c/=f/2)?-e/2*(Math.sqrt(1-c*c)-1)+d:e/2*(Math.sqrt(1-(c-=2)*c)+1)+d},easeInElastic:function(b,c,d,e,f){b=0;var g=e;if(0==c)return d;if(1==(c/=f))return d+e;b||(b=.3*f);g<Math.abs(e)?(g=e,e=b/4):e=b/(2*Math.PI)*Math.asin(e/g);return-(g*Math.pow(2,10*--c)*Math.sin(2*(c*f-e)*Math.PI/b))+d},easeOutElastic:function(b,c,d,e,f){var g=0,h=e;if(0==c)return d;if(1==(c/=f))return d+e;g|| (g=.3*f);h<Math.abs(e)?(h=e,b=g/4):b=g/(2*Math.PI)*Math.asin(e/h);return h*Math.pow(2,-10*c)*Math.sin(2*(c*f-b)*Math.PI/g)+e+d},easeInOutElastic:function(b,c,d,e,f){var g=0,h=e;if(0==c)return d;if(2==(c/=f/2))return d+e;g||(g=.3*f*1.5);h<Math.abs(e)?(h=e,b=g/4):b=g/(2*Math.PI)*Math.asin(e/h);return 1>c?-.5*h*Math.pow(2,10*--c)*Math.sin(2*(c*f-b)*Math.PI/g)+d:h*Math.pow(2,-10*--c)*Math.sin(2*(c*f-b)*Math.PI/g)*.5+e+d},easeInBack:function(b,c,d,e,f,g){void 0==g&&(g=1.70158);return e*(c/=f)*c*((g+1)* c-g)+d},easeOutBack:function(b,c,d,e,f,g){void 0==g&&(g=1.70158);return e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(b,c,d,e,f,g){void 0==g&&(g=1.70158);return 1>(c/=f/2)?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-jQuery.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(b,c,d,e,f){return(c/=f)<1/2.75?7.5625*e*c*c+d:c<2/2.75?e*(7.5625*(c-=1.5/2.75)*c+.75)+d:c<2.5/2.75?e*(7.5625*(c-=2.25/2.75)*c+.9375)+d:e*(7.5625* (c-=2.625/2.75)*c+.984375)+d},easeInOutBounce:function(b,c,d,e,f){return c<f/2?.5*jQuery.easing.easeInBounce(b,2*c,0,e,f)+d:.5*jQuery.easing.easeOutBounce(b,2*c-f,0,e,f)+.5*e+d}}); jQuery.fn.drag=function(b){this.options=b?b:{};this.parameters={reference:this.options.reference?this.options.reference:$("body"),direction:this.options.direction?this.options.direction:"both",callback:this.options.callback?this.options.callback:void 0};this.create=function(){this.initEvent()}.bind(this);this.initEvent=function(){var c=new Hammer.Manager(this[0]);c.add(new Hammer.Pan);c.add((new Hammer.Swipe).recognizeWith(c.get("pan")));c.on("panstart panmove panend pancancel",this.onPan.bind(this))}.bind(this); this.onPan=function(c){c&&c.pointers&&1==c.pointers.length&&(this.animateInterval&&this.animateInterval.stop(),"panstart"==c.type&&(this.onPanStart=!0,$(this).css({cursor:"move"}),$(this).find(".form_title")[0]&&$(this).find(".form_title").css({cursor:"move"}),this.startX=this.getLeft(),this.startY=this.getTop()),this.onPanStart&&(this.moveTo(this.startX+c.deltaX,this.startY+c.deltaY),"panend"==c.type||"pancancel"==c.type))&&(this.restrictInBoundary(),$(this).css({cursor:"default"}),$(this).find(".form_title")[0]&& $(this).find(".form_title").css({cursor:"default"}),this.parameters.callback&&this.parameters.callback(c),this.onPanStart=!1)}.bind(this);this.getLeft=function(){return parseInt($(this).css("left"))}.bind(this);this.getTop=function(){return parseInt($(this).css("top"))}.bind(this);this.moveTo=function(c,d){var e=this.offset(),f=this.getLeft(),g=this.getTop(),h=c-f,k=d-g,l=this.parameters.reference.width(),n=this.parameters.reference.height(),p=this.parameters.reference.offset().left,v=this.parameters.reference.offset().top; e.left+h+this.width()>l+p&&(c=l+p-e.left-this.width()+f);e.top+k+this.height()>n+v&&(d=n+v-e.top-this.height()+g);e.left+h<p&&(c=p-e.left+f);e.top+k<v&&(d=v-e.top+g);switch(this.parameters.direction){case "horizontal":$(this).css({left:c+"px"});break;case "vertical":$(this).css({top:d+"px"});break;case "both":$(this).css({left:c+"px",top:d+"px"})}}.bind(this);this.restrictInBoundary=function(){}.bind(this);this.create()}; $.fn.setGradient=function(b,c){var d=colorAdd(b,15);b=colorDiv(b,15);void 0==c&&(c=!1);var e="",f="0";c&&(e="left,",f="1");this.css({background:"linear-gradient("+e+d+", "+b+")"});switch(browserType){case 1:this.css({background:"-webkit-linear-gradient("+e+d+", "+b+")"});break;case 2:this.css({background:"-moz-linear-gradient("+e+d+", "+b+")"});break;case 3:this.css({background:"-ms-linear-gradient("+e+d+", "+b+")"});this.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType="+f+", EndColorStr="+ b+", StartColorStr="+d+")");break;case 4:this.css({background:"-o-linear-gradient("+e+d+", "+b+")"})}}; $.fn.setGradientByDir=function(b,c,d){void 0==d&&(d=!1);var e="",f="0";d&&(e="left,",f="1");this.css({background:"linear-gradient("+e+b+", "+c+")"});switch(browserType){case 1:this.css({background:"-webkit-linear-gradient("+e+b+", "+c+")"});break;case 2:this.css({background:"-moz-linear-gradient("+e+b+", "+c+")"});break;case 3:this.css({background:"-ms-linear-gradient("+e+b+", "+c+")"});this.css("filter","progid:DXImageTransform.Microsoft.Gradient(GradientType="+f+", EndColorStr="+c+", StartColorStr="+ b+")");break;case 4:this.css({background:"-o-linear-gradient("+e+b+", "+c+")"})}};$.fn.addBorderShadow=function(b,c,d){var e=c+"px",f=d+"px";c=2*(Math.abs(c)+Math.abs(d))+"px";this.css({"-moz-box-shadow":e+" "+f+" "+c+" "+b,"box-shadow":e+" "+f+" "+c+" "+b,"-webkit-box-shadow":e+" "+f+" "+c+" "+b,"-o-box-shadow":e+" "+f+" "+c+" "+b,"-ms-box-shadow":e+" "+f+" "+c+" "+b})}; var getHost=function(b){var c;b||(b=window.location.href);var d=b.match(/(.*:\/\/)([^\/]*)\/([^\/]*).*/);d&&(c="s3.amazonaws.com"===d[2]?d[1]+d[2]+"/"+d[3]:d[1]+d[2]);Log.print(b+d+","+c);return c}; $.fn.changeButtonColor=function(b,c,d){var e=this;if("none"!=this.css("display")){var f=this;0<this.children().length&&(f=this.find("img:first"));if(window.ActiveXObject){if("complete"!=f[0].readyState){$(f).on("load",function(){try{e.changeButtonColor(b,c,d)}catch(w){}});return}}else if(!f[0].complete){$(f).on("load",function(){try{e.changeButtonColor(b,c,d)}catch(w){}});return}if(void 0!=f[0]){try{var g=$("<canvas></canvas>")[0];var h=g.getContext("2d")}catch(w){return}var k=f.width(),l=f.height(); f=f[0];void 0==c&&(c=!1);var n=getHost(f.src),p=getHost();if(n&&p!==n){if(g=f.src.replace(n,p),f.src=g,0==c)$(f).on("load",function(){try{e.changeButtonColor(b,!0,d)}catch(w){}})}else{g.width=k;g.height=l;try{h.drawImage(f,0,0,f.naturalWidth,f.naturalHeight,0,0,k,l);var v=h.getImageData(0,0,k,l),B=h.getImageData(0,0,k,l);if(1!=f.colorChanged&&v){var t=Color(b).split();k=0;for(var u=v.data.length;k<u;k+=4)0<B.data[k+3]&&(v.data[k]!=t.r&&(B.data[k]=v.data[k]/255*t.r),v.data[k+1]!=t.g&&(B.data[k+1]= v.data[k+1]/255*t.g),v.data[k+2]!=t.b&&(B.data[k+2]=v.data[k+2]/255*t.b));h.putImageData(B,0,0);f.src=g.toDataURL("image/png");void 0!=d&&d(e);f.colorChanged=!0}}catch(w){if(0==c)$(f).on("load",function(){try{e.changeButtonColor(b,!0,d)}catch(x){}})}}}}}; $.fn.rotate=function(b){if(!(4<browserType&&1>browserType)){switch(browserType){case 1:this.css({"-webkit-transform":"rotate("+b+"deg)"});break;case 2:this.css({"-moz-transform":"rotate("+b+"deg)"});break;case 3:this.css({"-ms-transform":"rotate("+b+"deg)"});break;case 4:this.css({"-o-transform":"rotate("+b+"deg)"})}this.css({transform:"rotate("+b+"deg)"})}}; $.fn.scale=function(b,c){void 0==c&&(c="50% 50% 0");this.css({"-webkit-transform":"scale("+b+")","-moz-transform":"scale("+b+")","-ms-transform":"scale("+b+")","-o-transform":"scale("+b+")",transform:"scale("+b+")","-webkit-transform-origin":c,"-moz-transform-origin":c,"-ms-transform-origin":c,"-o-transform-origin":c,"transform-origin":c})}; $.fn.transition3D=function(){this.css({"-ms-transform":"translate3d(0,0,0)","-webkit-transform":"translate3d(0,0,0)","-moz-transform":"translate3d(0,0,0)","-o-transform":"translate3d(0,0,0)",transform:"translate3d(0,0,0)"});return this}; jQuery.fn.appearance=function(b,c){this.background=$("<div class='appear_win10'></div>");this.addClass("main_dom");this.background.append(this);this.show=function(){this.background.show();this.background.animate({opacity:1},function(){$(this).show();b&&b()})}.bind(this);this.hide=function(){this.background.animate({opacity:0},function(){$(this).hide();c&&c()})}.bind(this);this.getDom=function(){return this.background}.bind(this);this.background.click(function(d){d.target==d.currentTarget&&this.hide()}.bind(this)); return this.background}; $.fn.speed=function(b){function c(u){u=void 0==u.originalEvent.touches?[u]:u.originalEvent.touches;if(1<u.length)return v=!0;f=h=u[0].pageX;g=k=u[0].pageY;l=new Date;-1!=p&&window.clearInterval(p);p=window.setInterval(function(){f=h;g=k;l=new Date},300)}function d(u){if(-1==p||1==v)return!0;u=void 0==u.originalEvent.touches?[u]:u.originalEvent.touches;h=u[0].pageX;k=u[0].pageY}function e(u){if(-1==p)return!0;u=void 0!=u.originalEvent.touches==0?[u]:u.originalEvent.touches;if(1==v)return v=1<u.length, !0;n=new Date;u=(n-l)/20;var w=h-f,x=k-g;0==u?t=B=0:(B=w/u,t=x/u);void 0!=b&&b(B,t);window.clearInterval(p);p=-1}var f,g,h,k,l,n,p=-1,v=!1,B=0,t=0;try{this.bind("mousedown",c),this.bind("mousemove",d),this.bind("mouseup",e),this.bind("mouseleave",e)}catch(u){}try{this.bind("touchstart",c),this.bind("touchmove",d),this.bind("touchend",e),this.bind("touchleave",e)}catch(u){}}; (function(b){var c="object"==typeof exports&&exports,d="object"==typeof module&&module&&module.exports==c&&module,e="object"==typeof global&&global;if(e.global===e||e.window===e)b=e;var f=function(k){this.message=k};f.prototype=Error();f.prototype.name="InvalidCharacterError";var g={encode:function(k){k=String(k);if(/[^\0-\xFF]/.test(k))throw new f("The string to be encoded contains characters outside of the Latin1 range.");for(var l=k.length%3,n="",p=-1,v,B,t,u=k.length-l;++p<u;)v=k.charCodeAt(p)<< 16,B=k.charCodeAt(++p)<<8,t=k.charCodeAt(++p),v=v+B+t,n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v&63);2==l?(v=k.charCodeAt(p)<<8,B=k.charCodeAt(++p),v+=B,n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>> 10)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>>4&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v<<2&63)+"="):1==l&&(v=k.charCodeAt(p),n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(v<<4&63)+"==");return n},decode:function(k){k=String(k);for(var l=k.length,n=0,p,v,B="",t=-1;++t<l;)v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(k.charAt(t)), p=n%4?64*p+v:v,n++%4&&(B+=String.fromCharCode(255&p>>(-2*n&6)));return B},version:"0.1.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(c&&!c.nodeType)if(d)d.exports=g;else for(var h in g)g.hasOwnProperty(h)&&(c[h]=g[h]);else b.base64=g})(this);function parsHexToNormalString(b){for(var c="";2<=b.length;)c+=String.fromCharCode(parseInt(b.substring(0,2),16)),b=b.substring(2,b.length);return c} function parseHexString(b){for(var c=[];2<=b.length;)c.push(parseInt(b.substring(0,2),16)),b=b.substring(2,b.length);return c}function byteArray2String(b){for(var c="",d=0;d<b.length;d++)c+=String.fromCharCode(b[d]);return c} function rc4(b,c){for(var d=[],e=[],f=0;256>f;f++)d[f]=f,e[f]=b.charCodeAt(f%b.length);for(f=b=0;256>f;f++){b=b+d[f]+e[f]&255;var g=d[f];d[f]=d[b];d[b]=g}b=e=0;g="";for(f=0;f<c.length;f++){e=e+1&255;b=b+d[e]&255;var h=d[e];d[e]=d[b];d[b]=h;h=d[e]+d[b]&255;var k=c.charCodeAt(f);k^=d[h];g+=String.fromCharCode(k)}return g} (function(b){function c(t,u){var w=(t&65535)+(u&65535);return(t>>16)+(u>>16)+(w>>16)<<16|w&65535}function d(t,u,w,x,z,A){t=c(c(u,t),c(x,A));return c(t<<z|t>>>32-z,w)}function e(t,u,w,x,z,A,J){return d(u&w|~u&x,t,u,z,A,J)}function f(t,u,w,x,z,A,J){return d(u&x|w&~x,t,u,z,A,J)}function g(t,u,w,x,z,A,J){return d(w^(u|~x),t,u,z,A,J)}function h(t,u){t[u>>5]|=128<<u%32;t[(u+64>>>9<<4)+14]=u;var w=1732584193,x=-271733879,z=-1732584194,A=271733878;for(u=0;u<t.length;u+=16){var J=w;var G=x;var H=z;var F=A; w=e(w,x,z,A,t[u],7,-680876936);A=e(A,w,x,z,t[u+1],12,-389564586);z=e(z,A,w,x,t[u+2],17,606105819);x=e(x,z,A,w,t[u+3],22,-1044525330);w=e(w,x,z,A,t[u+4],7,-176418897);A=e(A,w,x,z,t[u+5],12,1200080426);z=e(z,A,w,x,t[u+6],17,-1473231341);x=e(x,z,A,w,t[u+7],22,-45705983);w=e(w,x,z,A,t[u+8],7,1770035416);A=e(A,w,x,z,t[u+9],12,-1958414417);z=e(z,A,w,x,t[u+10],17,-42063);x=e(x,z,A,w,t[u+11],22,-1990404162);w=e(w,x,z,A,t[u+12],7,1804603682);A=e(A,w,x,z,t[u+13],12,-40341101);z=e(z,A,w,x,t[u+14],17,-1502002290); x=e(x,z,A,w,t[u+15],22,1236535329);w=f(w,x,z,A,t[u+1],5,-165796510);A=f(A,w,x,z,t[u+6],9,-1069501632);z=f(z,A,w,x,t[u+11],14,643717713);x=f(x,z,A,w,t[u],20,-373897302);w=f(w,x,z,A,t[u+5],5,-701558691);A=f(A,w,x,z,t[u+10],9,38016083);z=f(z,A,w,x,t[u+15],14,-660478335);x=f(x,z,A,w,t[u+4],20,-405537848);w=f(w,x,z,A,t[u+9],5,568446438);A=f(A,w,x,z,t[u+14],9,-1019803690);z=f(z,A,w,x,t[u+3],14,-187363961);x=f(x,z,A,w,t[u+8],20,1163531501);w=f(w,x,z,A,t[u+13],5,-1444681467);A=f(A,w,x,z,t[u+2],9,-51403784); z=f(z,A,w,x,t[u+7],14,1735328473);x=f(x,z,A,w,t[u+12],20,-1926607734);w=d(x^z^A,w,x,t[u+5],4,-378558);A=d(w^x^z,A,w,t[u+8],11,-2022574463);z=d(A^w^x,z,A,t[u+11],16,1839030562);x=d(z^A^w,x,z,t[u+14],23,-35309556);w=d(x^z^A,w,x,t[u+1],4,-1530992060);A=d(w^x^z,A,w,t[u+4],11,1272893353);z=d(A^w^x,z,A,t[u+7],16,-155497632);x=d(z^A^w,x,z,t[u+10],23,-1094730640);w=d(x^z^A,w,x,t[u+13],4,681279174);A=d(w^x^z,A,w,t[u],11,-358537222);z=d(A^w^x,z,A,t[u+3],16,-722521979);x=d(z^A^w,x,z,t[u+6],23,76029189);w=d(x^ z^A,w,x,t[u+9],4,-640364487);A=d(w^x^z,A,w,t[u+12],11,-421815835);z=d(A^w^x,z,A,t[u+15],16,530742520);x=d(z^A^w,x,z,t[u+2],23,-995338651);w=g(w,x,z,A,t[u],6,-198630844);A=g(A,w,x,z,t[u+7],10,1126891415);z=g(z,A,w,x,t[u+14],15,-1416354905);x=g(x,z,A,w,t[u+5],21,-57434055);w=g(w,x,z,A,t[u+12],6,1700485571);A=g(A,w,x,z,t[u+3],10,-1894986606);z=g(z,A,w,x,t[u+10],15,-1051523);x=g(x,z,A,w,t[u+1],21,-2054922799);w=g(w,x,z,A,t[u+8],6,1873313359);A=g(A,w,x,z,t[u+15],10,-30611744);z=g(z,A,w,x,t[u+6],15,-1560198380); x=g(x,z,A,w,t[u+13],21,1309151649);w=g(w,x,z,A,t[u+4],6,-145523070);A=g(A,w,x,z,t[u+11],10,-1120210379);z=g(z,A,w,x,t[u+2],15,718787259);x=g(x,z,A,w,t[u+9],21,-343485551);w=c(w,J);x=c(x,G);z=c(z,H);A=c(A,F)}return[w,x,z,A]}function k(t){var u,w="",x=32*t.length;for(u=0;u<x;u+=8)w+=String.fromCharCode(t[u>>5]>>>u%32&255);return w}function l(t){var u,w=[];w[(t.length>>2)-1]=void 0;for(u=0;u<w.length;u+=1)w[u]=0;var x=8*t.length;for(u=0;u<x;u+=8)w[u>>5]|=(t.charCodeAt(u/8)&255)<<u%32;return w}function n(t){return k(h(l(t), 8*t.length))}function p(t,u){var w=l(t),x=[],z=[];x[15]=z[15]=void 0;16<w.length&&(w=h(w,8*t.length));for(t=0;16>t;t+=1)x[t]=w[t]^909522486,z[t]=w[t]^1549556828;u=h(x.concat(l(u)),512+8*u.length);return k(h(z.concat(u),640))}function v(t){var u="",w;for(w=0;w<t.length;w+=1){var x=t.charCodeAt(w);u+="0123456789abcdef".charAt(x>>>4&15)+"0123456789abcdef".charAt(x&15)}return u}function B(t,u,w){u?w?t=p(unescape(encodeURIComponent(u)),unescape(encodeURIComponent(t))):(t=p(unescape(encodeURIComponent(u)), unescape(encodeURIComponent(t))),t=v(t)):t=w?n(unescape(encodeURIComponent(t))):v(n(unescape(encodeURIComponent(t))));return t}"function"===typeof define&&define.amd?define(function(){return B}):"object"===typeof module&&module.exports?module.exports=B:b.md5=B})(this);String.prototype.MD5=function(b){return md5(this)}; var ObjectPool=Class({objects:null,length:0,create:function(){this.objects=[]},add:function(b){b&&(this.objects.push(b),this.length=this.objects.length)},remove:function(b){b&&(this.objects.removeElement(b),this.length=this.objects.length)},exists:function(b){if("string"!=typeof b||""==b)return!1;b=b.toLowerCase();for(var c=0;c<this.objects.length;c++){var d=this.objects[c];if(d.getClassName&&-1<d.getClassName().toLowerCase().indexOf(b))return!0}return!1},find:function(){for(var b=arguments,c=new ObjectPool, d=0;d<b.length;d++){var e=b[d];if("string"==typeof e&&""!=e){e=e.toLowerCase();for(var f=0;f<this.objects.length;f++){var g=this.objects[f];g.getClassName&&-1<g.getClassName().toLowerCase().indexOf(e)&&c.add(g)}}}return c},match:function(){for(var b=arguments,c=new ObjectPool,d=0;d<b.length;d++){var e=b[d];if("string"==typeof e&&""!=e)for(var f=0;f<this.objects.length;f++){var g=this.objects[f];g.getClassName&&g.getClassName()==e&&c.add(g)}}return c},clone:function(){for(var b=new ObjectPool,c=0;c< this.objects.length;c++)b.add(this.get(c));return b},get:function(b){return this.objects[b]},each:function(b){for(var c=0;c<this.objects.length;c++){var d=this.objects[c];d&&b&&b instanceof Function&&b(d)}}}),transformCSS=function(b,c){var d=_agent_.system.name==_agent_.system.IOS&&10.3<=_agent_.system.version,e="",f={};void 0!=b.perspective&&(e=e+"perspective("+b.perspective+"px) ");if(b.tran)if(!1===c)e=e+"translate("+b.tran.x+"px,"+b.tran.y+"px) ";else if(_agent_.browser.msie&&!d&&(e=e+"translate("+ b.tran.x+"px,"+b.tran.y+"px) "),!_agent_.browser.msie||d)e=e+"translate3d("+b.tran.x+"px,"+b.tran.y+"px,0px) ";void 0!=b.rotate&&(e=e+"rotate("+b.rotate+"deg) ");void 0!=b.rotateY&&(e=e+"rotateY("+b.rotateY+"deg) ");void 0!=b.rotateX&&(e=e+"rotateX("+b.rotateX+"deg) ");if(void 0!=b.scale&&void 0==b.scale.x)if(!1===c)e=e+"scale("+b.scale+") ";else{if(!_agent_.browser.msie||d)e=e+"scale3d("+b.scale+","+b.scale+",1) ";_agent_.browser.msie&&!d&&(e=e+"scale("+b.scale+") ")}if(void 0!=b.scale&&void 0!= b.scale.x)if(!1===c)e=e+"scale("+b.scale.x+","+b.scale.y+") ";else{if(!_agent_.browser.msie||d)e=e+"scale3d("+b.scale.x+","+b.scale.y+",1) ";_agent_.browser.msie&&!d&&(e=e+"scale("+b.scale.x+","+b.scale.y+") ")}void 0!=b.scaleX&&(e=e+"scaleX("+b.scaleX+") ");void 0!=b.scaleY&&(e=e+"scaleY("+b.scaleY+") ");b.origin&&(c=b.origin.x+"% "+b.origin.y+"%",f["-webkit-transform-origin"]=c,f["-moz-transform-origin"]=c,f["-ms-transform-origin"]=c,f["-o-transform-origin"]=c,f["transform-origin"]=c);e&&(f["-webkit-transform"]= e,f["-moz-transform"]=e,f["-ms-transform"]=e,f["-o-transform"]=e,f.transform=e);b.obj&&b.obj.css(f);return f};bdor[32]=function(b,c){return b+c}; var changeShowBook=function(b){switch(b){case BookType.normal_book:bookType=BookType.normal_book;singlePageBook&&singlePageBook.hide();flipBook&&flipBook.show();bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.mergeAll();break;case BookType.single_book:bookType=BookType.single_book;singlePageBook&&singlePageBook.show();flipBook&&flipBook.hide();bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.fissionAll();break;case BookType.slide_book:bookType=BookType.slide_book;slideBook&& slideBook.show();singleSlideBook&&singleSlideBook.hide();bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.mergeAll();break;case BookType.singleSlide_book:bookType=BookType.singleSlide_book;slideBook&&slideBook.hide();singleSlideBook&&singleSlideBook.show();bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.fissionAll();break;case BookType.catalog_book:bookType=BookType.catalog_book;catalogBook&&catalogBook.show();bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.mergeAll(); break;case BookType.singleCatalog_book:bookType=BookType.singleCatalog_book,singleCatalogBook&&singleCatalogBook.show(),bookConfig.ThumbnailsButtonVisible&&global.thumbnail&&thumbnail.fissionAll()}},supports=function(){var b=document.createElement("div"),c=["Khtml","Ms","O","Moz","Webkit"];return function(d){if(d in b.style)return!0;d=d.replace(/^[a-z]/,function(f){return f.toUpperCase()});for(var e=c.length;e--;)if(c[e]+d in b.style)return!0;return!1}}(),getBrowserPre=function(){switch(browserType){case 3:return"-ms-"; case 2:return"-moz-";case 1:return"-webkit-";case 4:return"-o-"}},getTransform=function(b){switch(browserType){case 3:var c=b.style["-ms-transform"];break;case 2:c=b.style["-moz-transform"];break;case 1:c=b.style["-webkit-transform"];break;case 4:c=b.style["-o-transform"];break;default:c=b.style.transform}if(void 0==c||null==c)if(c=b.style.transform,void 0==c||null==c)return Point(0,0);c=c.match(/translate\((.*?)\)/)||c.match(/translate3d\((.*?)\)/);if(null==c||""==c||2>c.length)return Point(0,0); c=c[1].split(", ");return Point(parseInt(c[0],10),parseInt(c[1],10))},getTransformScale=function(b){switch(browserType){case 3:var c=b.style["-ms-transform"];break;case 2:c=b.style["-moz-transform"];break;case 1:c=b.style["-webkit-transform"];break;case 4:c=b.style["-o-transform"];break;default:c=b.style.transform}if(void 0==c||null==c)if(c=b.style.transform,void 0==c||null==c)return 1;c=c.match(/scale\((.*?)\)/)||c.match(/scale3d\((.*?)\)/);if(null==c||""==c||2>c.length)return 1;c=c[1].split(","); return c[0]},getTransformRotate=function(b){switch(browserType){case 3:var c=b.style["-ms-transform"];break;case 2:c=b.style["-moz-transform"];break;case 1:c=b.style["-webkit-transform"];break;case 4:c=b.style["-o-transform"];break;default:c=b.style.transform}if(void 0==c||null==c)if(c=b.style.transform,void 0==c||null==c)return 0;c=c.match(/rotate\((.*?)\)/)||c.match(/rotate3d\((.*?)\)/);if(null==c||""==c||2>c.length)return 0;c=c[1].split(",");return parseInt(c[0])},getColor=function(b,c){b=bookConfig[b]; return void 0!=b?Color(b).toString():c},getImage=function(b){return b?$("<img src='"+b+"'/>"):new Image},parseBool=function(b,c){if(!0===b||!1===b)return b;if(void 0==b||null==b)return!1;c=!!c;if("number"==typeof b)return 0!=b;if("string"!=typeof b||""==b)return!1;var d=["true","yes","show","enable"],e=["false","no","hide","disable"];b=b.toLowerCase();return 0>d.indexOf(b)&&0>e.indexOf(b)?c:0<=d.indexOf(b)},getLanguage=function(b,c){if(global.selectedLanguage&&selectedLanguage[b])return selectedLanguage[b]; if(global.aliasLanguage&&aliasLanguage[b]){b=aliasLanguage[b];for(var d=0;d<b.length;d++){var e=b[d];if(global.selectedLanguage&&selectedLanguage[e])return selectedLanguage[e]}}return c},selectedLanguage,selectLanguage=function(b){b||(b="");global.language||(global.language=[]);selectedLanguage=[];if(0!=language.length){var c="";if(b=b.toLowerCase()){var d=[];try{d=b.split(";")}catch(e){d=[]}0<d.length&&(c=d[0])}if(c)for(b=0;b<language.length;b++){if(language[b].language.toLowerCase()==c){selectedLanguage= language[b];break}}else selectedLanguage=language[0]}BookEvent.trigger("selectedLanguage",[])},handleData=function(b,c){if(50>b.length)return b;var d=b.length;c=b.toLowerCase().indexOf(c.toLowerCase());if(25<=c){var e=Math.max(25<=d-c?c-25:d-50,0);e=".."+b.substring(e,c)}else e=b.substring(0,c);b=25<d-c?b.substring(c,25<=c?c+25:50)+"..":b.substring(c,d);return e+b},onWindowTap=function(b){Log.print("onWindowTapEnter");global.windowTapInterval&&window.clearTimeout(global.windowTapInterval);global.windowTapInterval= window.setTimeout(function(){if(global.moreBar&&moreBar.visible)moreBar.hide();else{if(isPhone()||isPad()){if(bookConfig.toolbarAlwaysShow)return;global.phoneSearchBar&&global.phoneSearchBar.showOrHide();toolBar.showOrHide()}global.windowTapInterval&&window.clearTimeout(global.windowTapInterval)}},401)},stopEvent=function(b){try{var c=b||window.event;c.preventDefault?(c.preventDefault(),c.stopPropagation()):(c.returnValue=!1,c.cancelBubble=!0)}catch(d){}return!1},getPagesByRange=function(b){function c(k){for(var l= 0;l<d.length;l++)if(d[l]==k)return!0;return!1}var d=[];if(!b||"string"!==typeof b||""==b.trim())return d;b=b.split(",");for(var e=0;e<b.length;e++){var f=b[e];if(!isNaN(f))f=getRealPageNumber(f),!c(f)&&f<=bookConfig.totalPageCount&&d.push(f);else if(-1<f.indexOf("-")){var g=f.split("-");if(!(2>g.length)){f=getRealPageNumber(g[0]);var h=getRealPageNumber(g[1]);g=Math.max(f,h);for(f=Math.min(f,h);f<=g;f++)f>bookConfig.totalPageCount||c(f)||d.push(f)}}}return d},isSlideBook=function(){return"slide"== bookConfig.FlipStyle.toLowerCase()||isBelowIE9()?!0:!1}; function addGoogleAdSense(){bookConfig.haveAdSense&&bookConfig.adSenseClientId&&loadJavascript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",function(){var b=document.createElement("ins");b=$(b);b.addClass("adsbygoogle");b.css({display:"inline-block",width:"100%",height:"100%"});b.attr("data-ad-client",bookConfig.adSenseClientId);b.attr("data-ad-slot",bookConfig.adSenseSlotId);var c=$("<div/>");c.css({position:"absolute","z-index":100,left:bookConfig.adSenseLeft+"px",top:bookConfig.adSenseTop+ "px",width:bookConfig.adSenseWidth+"px",height:bookConfig.adSenseHeight+"px"});c.bind(_event._down,function(){BookEvent.trigger("googleAdSense",[bookConfig.adSenseClientId,bookConfig.adSenseSlotId,bookConfig.adSenseLeft,bookConfig.adSenseTop,bookConfig.adSenseWidth,bookConfig.adSenseHeight])});tmpContainer.append(c);c.append(b);eval("(adsbygoogle = window.adsbygoogle || []).push({});")})} var changeLanguage=function(b){selectLanguage(b);global.toolBar&&toolBar.changeLanguage&&toolBar.changeLanguage();global.printBody&&printBody.changeLanguage();global.helpBody&&helpBody.changeLanguage();global.aboutBody&&aboutBody.changeLanguage();global.sharePanel&&sharePanel.changeLanguage();global.languagePanel&&languagePanel.changeLanguage();global.videoGallery&&videoGallery.changeLanguage();global.photoGallery&&photoGallery.changeLanguage();global.bookmark&&bookmark.changeLanguage();global.frmTableOfContent&& frmTableOfContent.changeLanguage();global.frmSearch&&frmSearch.changeLanguage();global.thumbnail&&thumbnail.changeLanguage();global.bookInstructions&&global.bookInstructions.changeLanguage&&global.bookInstructions.changeLanguage();global.telephoneNumberForm&&global.telephoneNumberForm.changeLanguage();global.settingBody&&global.settingBody.changeLanguage();global.doubleSinglePageForm&&global.doubleSinglePageForm.changeLanguage();global.downLoadBody&&global.downLoadBody.changeLanguage();global.annotationPannel&& global.annotationPannel.changeLanguage();global.jsLoadingBar&&global.jsLoadingBar.changeLanguage(b);global.reportPanel&&global.reportPanel.changeLanguage(b);global.chatBotPanel&&global.chatBotPanel.changeLanguage(b);BookEvent.trigger("changeLanguage",[])},baiduAnalytics=function(){bookConfig.baiduAnalyticsID&&window.setTimeout(function(){var b=document.createElement("script");b.src="https://hm.baidu.com/hm.js?"+bookConfig.baiduAnalyticsID;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b, c)},3E3)},controlAudioVolume=function(){if(!isNaN(bookConfig.bgSoundVol)){var b=parseFloat(bookConfig.bgSoundVol/100);global.bgSound&&global.bgSound.setVolume(b);flipAudio&&(flipAudio[0].volume=b)}},TurnonAutoFlip=function(){bookConfig.autoFlipOnStart&&window.setTimeout(function(){auto_player&&auto_player.start();toolBar&&toolBar.changeAutoPlayIcon&&toolBar.changeAutoPlayIcon()},1E3)},playFlipSound=function(){if(global.flipSoundIsPlaying)if(!isPhone()&&!isPad()&&!isIE()){var b="flipsound";if(bookType== BookType.slide_book||bookType==BookType.singleSlide_book)b="slidesound";var c=soundBaseURL+b+".mp3";b=soundBaseURL+b+".ogg";bookConfig.flipSoundURL&&(b=c=bookConfig.flipSoundURL);0<$("#flippingSound").length&&$("#flippingSound").remove();c=$("<audio id='flippingSound' preload style='display:none;'>\n \"<source src='"+b+"?2024070101' type='audio/ogg'>\n \"<source src='"+c+"?2024070101' type='audio/mpeg'>\n </audio>");$("body").append(c);b=parseFloat(bookConfig.bgSoundVol/100); c[0].volume=b;c.bind("ended",function(){$(this).remove()});try{c[0].currentTime=0,c[0].play()}catch(d){}}else if(!isPlaying||!isAndroidDefault())try{flipAudio[0].currentTime=0,flipAudio[0].play()}catch(d){}},initFlipSound=function(){if(isPhone()||isPad()||isIE()){var b="flipsound";if(bookType==BookType.slide_book||bookType==BookType.singleSlide_book)b="slidesound";var c=soundBaseURL+b+".mp3";b=soundBaseURL+b+".ogg";bookConfig.flipSoundURL&&(b=c=bookConfig.flipSoundURL);flipAudio=$("<audio preload id='flipSound'>\n <source src='"+ b+"?2024081201' type='audio/ogg'>\n <source src='"+c+"?2024081201' type='audio/mpeg'>\n </audio>");$("body").append(flipAudio)}};function copyFromObj(b){if(b){b.focus();b.select();try{document.execCommand("Copy")}catch(c){b=b.val(),copyToClipboard(b)}}} function copyHref(b){global.isBelowIE9()||(b=new ClipboardJS(b,{text:function(c){c=_get(window,"toolBar.$shareForm.addCurrentPage");return share_url+(c?"#p="+BookInfo.getCurrentPageIndex():"")}}),b.on("success",function(c){"Chinese"==UserGroups&&alert("\u6fb6\u5d85\u57d7\u7f03\u621d\u6f43\u93b4\u612c\u59db");"English"==UserGroups&&alert("Copied successfully");c.clearSelection()}),b.on("error",function(c){uc?("Chinese"==UserGroups&&alert("\u6fb6\u5d85\u57d7\u7f03\u621d\u6f43\u93b4\u612c\u59db"),"English"== UserGroups&&alert("Copied successfully"),c.clearSelection()):("Chinese"==UserGroups&&alert("\u6fb6\u5d85\u57d7\u7f03\u621d\u6f43\u6fb6\u8fab\u89e6"),"English"==UserGroups&&alert("Copied failed"))}))} function copyToClipboard(b){if(window.clipboardData)window.clipboardData.clearData(),window.clipboardData.setData("Text",b);else if(-1!=navigator.userAgent.indexOf("Opera"))window.location=b;else if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(f){return alert(getLanguage("infCopyToClipboard","Your browser does not support clipboard.")),!1}var c=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard); if(c){var d=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(d){d.addDataFlavor("text/unicode");var e=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);e.data=b;d.setTransferData("text/unicode",e,2*b.length);if(!c)return!1;c.setData(d,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}}}else alert(getLanguage("infCopyToClipboard","Your browser does not support clipboard."))} function hideMoreBar(){global.moreBar&&moreBar.visible&&moreBar.hide()}function GetQueryString(b){b=new RegExp("(^|&)"+b+"=([^&]*)(&|$)","i");b=window.location.search.substr(1).match(b);return null!=b?decodeURIComponent(b).split(",")[2]:""}function getProtocal(){return window.location.href.toLowerCase().startsWith("https://")?"https://":"http://"} function showAlert(b,c){var d=$("body"),e=d.find(".alert-success");0<e.length&&e.remove();var f=$('<p class="alert-success"></p>');f.append("<span>"+b+"</span>");c||(c="success");f.addClass(c);(isPhone()||isPad())&&f.addClass("phone");d.append(f);setTimeout(function(){f.addClass("show")},1);setTimeout(function(){f.fadeOut(function(){$(this).remove()})},2E3)} function toggleArticleTitle(b){if(!isPhone()&&!isPad()&&bookConfig.isMouseEnterToDisplayArticleTitle){var c=$("body"),d=c.find(".article-alert-title");d.length||(d=$("<div class='article-alert-title' style='box-sizing:border-box;max-width: 350px;position:absolute;pointer-events:none;font-size:18px;border:4px solid #6FADE3;background:rgba(245, 245, 245, 0.9);padding:10px 15px;'></div>"),c.append(d));if(b.isShow){c=b.pos.x;var e=b.pos.y;d.css({display:"block"});c+d.width()>windowWidth&&(c-=d[0].offsetWidth); e+d.height()>windowHeight&&(e-=d[0].offsetHeight);d.css({left:c+"px",top:e+"px"}).html(b.title)}else d.css({display:"none"})}}window.getHeight=function(){return void 0!=window.innerHeight?window.innerHeight:Math.min(document.documentElement.clientHeight,document.body.clientHeight)};window.getWidth=function(){return void 0!=window.innerWidth?window.innerWidth:Math.min(document.documentElement.clientWidth,document.body.clientWidth)}; function initBrowserType(){_agent_.browser.webkit&&(global.browserType=BrowserType.WEBKIT);_agent_.browser.mozilla&&(global.browserType=BrowserType.MOZ);_agent_.browser.opera&&(global.browserType=BrowserType.OPERA);_agent_.browser.msie&&(global.browserType=BrowserType.MS)} function resizeCatalogBook(){if(bookType==BookType.catalog_book&&global.catalogBook)if(bookConfig.FlipDirection)resizeCatalogCalendar();else{var b=catalogBook.getSpace(!1),c=catalogBook.getFitWH(),d=parseInt(c.x/2),e=parseInt(c.y),f=(windowWidth-b.left-b.right-c.x)/2+b.left;b=(windowHeight-b.top-b.bottom-c.y)/2+b.top;var g=-c.x/4;c=c.x/4;var h={},k=0;1==bookConfig.retainBookCenter&&(h=catalogBook.getCurrentPageIndex(),BookInfo.isCoverPage(h)&&BookInfo.isLeftPage(h,!0)&&(k=c),BookInfo.isCoverPage(h)&& !BookInfo.isLeftPage(h,!0)&&(k=g),h={tran:{x:k,y:0},scale:1,origin:{x:0,y:0}});h.top=b;h.left=f;useTheAliCloudChart(d,e);catalogBook.setCSS(h);catalogBook.onResize(d,e);catalogBook.resetZoomConfig()}} function resizeCatalogCalendar(){var b=catalogBook.getSpace(!1),c=catalogBook.getFitWH(),d=parseInt(c.x),e=parseInt(c.y/2),f=(windowWidth-b.left-b.right-c.x)/2+b.left;b=(windowHeight-b.top-b.bottom-c.y)/2+b.top;var g=-c.y/4;c=c.y/4;var h={},k=0;1==bookConfig.retainBookCenter&&(h=catalogBook.getCurrentPageIndex(),BookInfo.isCoverPage(h)&&BookInfo.isLeftPage(h,!0)&&(k=c),BookInfo.isCoverPage(h)&&!BookInfo.isLeftPage(h,!0)&&(k=g),h={tran:{x:0,y:k},scale:1,origin:{x:0,y:0}});h.top=b;h.left=f;useTheAliCloudChart(d, e);catalogBook.setCSS(h);catalogBook.onResize(d,e);catalogBook.resetZoomConfig()} function resizeFlipBook(){if(bookType==BookType.normal_book||bookType==BookType.single_book)if(bookConfig.FlipDirection)resizeFlipCalendar();else{if(global.flipBook){var b=flipBook.getSpace(!1),c=flipBook.getFitWH(),d=parseInt(c.x/2),e=parseInt(c.y),f=(windowWidth-b.left-b.right-c.x)/2+b.left;b=(windowHeight-b.top-b.bottom-c.y)/2+b.top;var g=-c.x/4;c=c.x/4;var h={tran:{x:0,y:0},scale:1,origin:{x:0,y:0}},k=0;1==bookConfig.retainBookCenter&&(h=flipBook.getCurrentPageIndex(),BookInfo.isCoverPage(h)&& BookInfo.isLeftPage(h,!0)&&(k=c),BookInfo.isCoverPage(h)&&!BookInfo.isLeftPage(h,!0)&&(k=g),h={tran:{x:parseInt(k),y:0},scale:1,origin:{x:0,y:0}});h.top=b;h.left=f;bookType==BookType.normal_book&&useTheAliCloudChart(d,e);flipBook.setCSS(h);flipBook.onResize(d,e);flipBook.resetZoomConfig()}global.singlePageBook&&(bookConfig.isSingleBookFullWindowOnMobile&&(isPhone()||isPad())?(d=windowWidth,e=windowHeight,b=f=0):(c=singlePageBook.getFitWH(),d=c.x,e=c.y,b=singlePageBook.getSpace(!0),f=(windowWidth- b.left-b.right-d)/2+b.left,b=(windowHeight-b.top-b.bottom-e)/2+b.top),bookType==BookType.single_book&&useTheAliCloudChart(d,e),singlePageBook.onResize(d,e),singlePageBook.setCSS({top:b,left:f}),singlePageBook.setCSS({tran:{x:0,y:0},scale:1,origin:{x:0,y:0}}),singlePageBook.resetZoomConfig())}} function resizeFlipCalendar(){if(global.flipBook){var b=flipBook.getSpace(!1),c=flipBook.getFitWH(),d=parseInt(c.x),e=parseInt(c.y/2),f=(windowWidth-b.left-b.right-c.x)/2+b.left;b=(windowHeight-b.top-b.bottom-c.y)/2+b.top;var g=-c.y/4;c=c.y/4;var h={},k=0;1==bookConfig.retainBookCenter&&(h=flipBook.getCurrentPageIndex(),BookInfo.isCoverPage(h)&&BookInfo.isLeftPage(h,!0)&&(k=c),BookInfo.isCoverPage(h)&&!BookInfo.isLeftPage(h,!0)&&(k=g),h={tran:{x:0,y:k},scale:1,origin:{x:0,y:0}});h.top=b;h.left=f; bookType==BookType.normal_book&&useTheAliCloudChart(d,e);flipBook.setCSS(h);flipBook.onResize(d,e);flipBook.resetZoomConfig()}global.singlePageBook&&(bookConfig.isSingleBookFullWindowOnMobile&&(isPhone()||isPad())?(d=windowWidth,e=windowHeight,b=f=0):(c=singlePageBook.getFitWH(),d=c.x,e=c.y,b=singlePageBook.getSpace(!0),f=(windowWidth-b.left-b.right-d)/2+b.left,b=(windowHeight-b.top-b.bottom-e)/2+b.top),bookType==BookType.single_book&&useTheAliCloudChart(d,e),singlePageBook.onResize(d,e),singlePageBook.setCSS({top:b, left:f}),singlePageBook.setCSS({tran:{x:0,y:0},scale:1,origin:{x:0,y:0}}),singlePageBook.resetZoomConfig())}function resizeSlideBook(){if(bookType==BookType.singleSlide_book||bookType==BookType.slide_book){if(global.slideBook)slideBook.onResize();if(global.singleSlideBook)singleSlideBook.onResize()}} function changeShowBookByWindow(){if(bookConfig.FlipDirection)changeShowBookByWindowHorizonal();else{var b=!1;if(bookType==BookType.single_book&&windowWidth>=windowHeight&&"auto"==bookConfig.showDoublePage){bookType=BookType.normal_book;changeShowBook(bookType);var c=singlePageBook.currentPageIndex;b=!0}bookType==BookType.singleSlide_book&&windowWidth>=windowHeight&&"auto"==bookConfig.showDoublePage&&(bookType=BookType.slide_book,changeShowBook(bookType),c=singleSlideBook.getRealPageIndex(),b=!0); bookType==BookType.slide_book&&windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage&&(bookType=BookType.singleSlide_book,changeShowBook(bookType),c=slideBook.getRealPageIndex(),b=!0);bookType==BookType.normal_book&&windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage&&(bookType=BookType.single_book,changeShowBook(bookType),c=flipBook.currentPageIndex,b=!0);resizeFlipBook();resizeCatalogBook();resizeSlideBook();b&&(gotoPageFun(c,!1,"change book type"),global.thumbnail&&thumbnail.clearHighLight(), global.thumbnail&&thumbnail.setHighLight(c))}} function changeShowBookByWindowHorizonal(){var b=!1;if(bookType==BookType.single_book&&windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage){bookType=BookType.normal_book;changeShowBook(bookType);var c=singlePageBook.currentPageIndex;b=!0}bookType==BookType.singleSlide_book&&windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage&&(bookType=BookType.slide_book,changeShowBook(bookType),c=singleSlideBook.getRealPageIndex(),b=!0);bookType==BookType.slide_book&&windowWidth>=windowHeight&&"auto"== bookConfig.showDoublePage&&(bookType=BookType.singleSlide_book,changeShowBook(bookType),c=slideBook.getRealPageIndex(),b=!0);bookType==BookType.normal_book&&windowWidth>=windowHeight&&"auto"==bookConfig.showDoublePage&&(bookType=BookType.single_book,changeShowBook(bookType),c=flipBook.currentPageIndex,b=!0);resizeFlipBook();resizeCatalogBook();resizeSlideBook();b&&(gotoPageFun(c,!1,"change book type"),global.thumbnail&&thumbnail.clearHighLight(),global.thumbnail&&thumbnail.setHighLight(c))} function getStaticAdVisible(){return!global.staticAd||!global.staticAd.haveAd||!global.staticAd.adPosition&&!isPC()||global.staticAd.adPosition&&"Chinese"==UserGroups?!1:!0} function initFlipBook(b,c){if(bookType==BookType.normal_book||bookType==BookType.single_book)console.log("initFlipBook: ",getStaticAdVisible()),$.extend(b,{thickness:bookConfig.FlipDirection?!1:!0,bookshadow:!0,grayshadow:bookConfig.ShowTopLeftShadow?!0:!1,miniFullscreen:bookConfig.hideMiniFullscreen?!1:!0,bookpagenumber:bookConfig.updatePageNumberForFlip?!0:!1,staticad:getStaticAdVisible(),zoommap:bookConfig.ZoomMapVisible?!0:!1,bookmarktab:global.bmtConfig?!0:!1,noteadd:bookConfig.AnnotationButtonVisible? !0:!1}),$.extend(c,{thickness:bookConfig.showThicknessOnMobile?!0:!1,bookshadow:!0,grayshadow:!1,miniFullscreen:bookConfig.hideMiniFullscreen?!1:!0,bookpagenumber:bookConfig.updatePageNumberForFlip?!0:!1,staticad:!1,zoommap:bookConfig.ZoomMapVisible?!0:!1,bookmarktab:global.bmtConfig?!0:!1,noteadd:bookConfig.AnnotationButtonVisible?!0:!1}),bookConfig.HardInnerPageEnable?bookConfig.FlipDirection?bookConfig.HardPageEnable?("single"!=bookConfig.showDoublePage&&(global.flipBook=bookConfig.isTheBookOpen? new OpenAlbumHardCalendar(b):new AlbumHardCalendar(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleAlbumHardCalendar(c))):("single"!=bookConfig.showDoublePage&&(global.flipBook=new AlbumCalendar(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleAlbumCalendar(c))):bookConfig.HardPageEnable?("single"!=bookConfig.showDoublePage&&(global.flipBook=bookConfig.isTheBookOpen?new OpenAlbumHardBook(b):new AlbumHardBook(b)),"double"!=bookConfig.showDoublePage&& (global.singlePageBook=new SingleAlbumHardBook(c))):("single"!=bookConfig.showDoublePage&&(global.flipBook=new AlbumBook(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleAlbumBook(c))):bookConfig.FlipDirection?bookConfig.HardPageEnable?("single"!=bookConfig.showDoublePage&&(global.flipBook=bookConfig.isTheBookOpen?new OpenHardCalendar(b):new HardCalendar(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleHardCalendar(c))):("single"!=bookConfig.showDoublePage&& (global.flipBook=new NormalCalendar(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleCalendar(c))):(bookConfig.HardPageEnable?("single"!=bookConfig.showDoublePage&&(global.flipBook=bookConfig.isTheBookOpen?new OpenHardBook(b):new HardBook(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleHardBook(c))):("single"!=bookConfig.showDoublePage&&(global.flipBook=new NormalBook(b)),"double"!=bookConfig.showDoublePage&&(global.singlePageBook=new SingleBook(c))), bookConfig.flipshortcutbutton&&window.flipShotButton&&flipShotButton.animate())} function initCatalogBook(b){bookType==BookType.catalog_book&&($.extend(b,{thickness:bookConfig.showThicknessOnMobile?!0:!1,bookshadow:!0,grayshadow:bookConfig.ShowTopLeftShadow?!0:!1,miniFullscreen:bookConfig.hideMiniFullscreen?!1:!0,bookpagenumber:bookConfig.updatePageNumberForFlip?!0:!1,staticad:getStaticAdVisible(),zoommap:bookConfig.ZoomMapVisible?!0:!1,bookmarktab:global.bmtConfig?!0:!1,noteadd:bookConfig.AnnotationButtonVisible?!0:!1}),"lite"==bookConfig.ToolbarViewMode.toLowerCase()?(global.catalogBook= bookConfig.FlipDirection?bookConfig.HardPageEnable?bookConfig.isTheBookOpen?new OpenCatalogSimpleHardCalendar(b):new CatalogSimpleHardCalendar(b):new CatalogSimpleCalendar(b):bookConfig.HardPageEnable?bookConfig.isTheBookOpen?new OpenCatalogSimpleHardBook(b):new CatalogSimpleHardBook(b):new CatalogSimpleBook(b),toolBar&&toolBar.hide()):global.catalogBook=bookConfig.FlipDirection?bookConfig.HardPageEnable?bookConfig.isTheBookOpen?new OpenCatalogHardCalendar(b):new CatalogHardCalendar(b):new CatalogCalendar(b): bookConfig.HardPageEnable?bookConfig.isTheBookOpen?new OpenCatalogHardBook(b):new CatalogHardBook(b):new CatalogBook(b))} function initSlideBook(b,c){if(bookType==BookType.slide_book||bookType==BookType.singleSlide_book){$.extend(b,{thickness:!1,bookshadow:!1,grayshadow:!1,miniFullscreen:!1,bookpagenumber:!1,staticad:getStaticAdVisible(),zoommap:!1,bookmarktab:!1,noteadd:!0});$.extend(c,{thickness:!1,bookshadow:!1,grayshadow:!1,miniFullscreen:!1,bookpagenumber:!1,staticad:!1,zoommap:!1,bookmarktab:!1,noteadd:!0});if(bookType==BookType.slide_book||bookType==BookType.singleSlide_book)"single"!=bookConfig.showDoublePage&& (global.slideBook=new PcDoubleSlideBook(b)),"double"!=bookConfig.showDoublePage&&(global.singleSlideBook=new PcSingleSlideBook(c));(isPhone()||isPad())&&global.QRbutton&&QRbutton.hide()}} function initBook(){var b=scrapOriginPageIndex(),c={parent:bookContainer,currentPageIndex:b,flippingTime:bookConfig.flippingTime,rightToLeft:bookConfig.RightToLeft,originTotalPageCount:originTotalPageCount,totalPageCount:totalPageCount,topMargin:bookConfig.topMargin,bottomMargin:bookConfig.bottomMargin,leftMargin:bookConfig.leftMargin,rightMargin:bookConfig.rightMargin,isDoublePage:!0},d=Math.max(1,bookConfig.totalPageCount-1);b={parent:bookContainer,currentPageIndex:bookConfig.SingleModeBanFlipToLastPage? Number.between(b,1,d):b,flippingTime:bookConfig.flippingTime,rightToLeft:bookConfig.RightToLeft,originTotalPageCount:originTotalPageCount,totalPageCount:totalPageCount,topMargin:bookConfig.topMargin,bottomMargin:bookConfig.bottomMargin,leftMargin:bookConfig.leftMargin,rightMargin:bookConfig.rightMargin,isDoublePage:!1};initFlipBook(c,b);initCatalogBook(c,b);initSlideBook(c,b)} function throttle(b,c){c=void 0===c?16:c;var d=0;return function(e){for(var f=[],g=0;g<arguments.length;++g)f[g-0]=arguments[g];g=Date.now();if(g-d>c)return d=g,b.apply(this,f)}}function debounce(b,c){var d=arguments,e=this;c=void 0===c?16:c;var f=null;return function(){f&&(clearTimeout(f),f=null);f=setTimeout(b.bind.apply(b,[e].concat($jscomp.arrayFromIterable(d))),c)}} function _get(b,c,d){c=Array.isArray(c)?c:c.split(".");for(var e=0;e<c.length;e++){if(!b||!b.hasOwnProperty(c[e]))return d;b=b[c[e]];if(""===b)return d?d:""}return b}function initStyleSheet(b){var c=null;b=$('<style id="'+b+'" type="text/css"></style>');$(document.head).append(b);for(var d=$jscomp.makeIterator(document.styleSheets),e=d.next();!e.done;e=d.next())e=e.value,e.ownerNode===b[0]&&(c=e);return function(){return c}}var getLocalStyleSheet=initStyleSheet("local"); function updateStyleSheet(b,c,d,e){var f=getLocalStyleSheet();f||(getLocalStyleSheet=initStyleSheet("local"),f=getLocalStyleSheet());var g=e?e:f,h=g.cssRules;f=null;if(d&&""!==d){e=d.split("@media ")[1];for(var k=$jscomp.makeIterator(h),l=k.next();!l.done;l=k.next())if(l=l.value,!1!==l instanceof CSSMediaRule&&l.cssText.replace(/ /g,"").includes(e.replace(/ /g,""))&&l.cssText.includes(b)){f=l;break}null===f&&(f=g.insertRule(d+" { "+b+" {} }",h.length),f=h.item(f));updateStyleSheet(b,c,null,f)}else{var n= $jscomp.makeIterator(h);for(l=n.next();!l.done;l=n.next())if(l=l.value,l.selectorText===b){f=l;break}!f&&b&&(f=g.insertRule(b+" {}",h.length),f=h.item(f));for(k in c)(h=c[k])&&""===h?f.style.removeProperty(k):"object"===typeof h?updateStyleSheet(""+b+(k.startsWith(":")?"":" ")+k,h,d,e):(h=String(h).split(" !"),f.style.setProperty(k,h[0],h[1]))}} function updateStyleSheetBatch(b,c){function d(h,k){k=void 0===k?"":k;for(var l in h){var n=h[l];n&&updateStyleSheet(l,n,k,f)}}c=void 0===c?"":c;var e=getLocalStyleSheet();e||(getLocalStyleSheet=initStyleSheet("local"),e=getLocalStyleSheet());var f=e;if(""!==c)d(b,c);else for(var g in b)"body"===g?d(b[g]):g.startsWith("@media")?d(b[g],g):g.startsWith("@keyframes")?f.insertRule(g+" "+b[g]):updateStyleSheet(g,b[g])} function handlePropStyle(b,c){if(c){var d=Object.keys(c).includes("body"),e=d?c.body:c;d&&delete c.body;d={};for(var f in c){var g={};d[f]=(g[b]=c[f],g)}c={};updateStyleSheetBatch(Object.assign({},{body:(c[b]=e,c)},d))}}function getHashParams(b){for(var c=window.location.hash,d=/[#&]([^=#]+)=([^&#]*)/g,e,f={};e=d.exec(c);){var g=decodeURIComponent(e[1]);e=decodeURIComponent(e[2]);f[g]=e}return b?f[b]||"":f} function imageUrl2DataUrl(b){return new Promise(function(c,d){try{var e=getImage(b)[0];e.onload=function(){var f=document.createElement("canvas");f.width=e.width;f.height=e.height;f.getContext("2d").drawImage(e,0,0);f=f.toDataURL("image/png",1);c(f)}}catch(f){d(f)}})} function getWebpOriginFormat(b){if(!b||"string"!=typeof b)return"jpg";switch(b.subBetween("_wci_",".")){case "jpeg":return"jpeg";case "png":return"png";case "gif":return"gif";case "svg":return"svg";case "webp":return"webp"}return"jpg"}var fitPageWidthHeight=function(b,c,d,e){d||(d=bookConfig.largePageWidth);e||(e=bookConfig.largePageHeight);var f=Point(0,0);b/c>d/e?(f.x=Math.round(d*c/e),f.y=c):(f.x=b,f.y=Math.round(e*b/d));return f}; function getMetaTagValueByName(b){for(var c=document.getElementsByTagName("meta"),d=0;d<c.length;d++)if(c[d].getAttribute("name")===b)return c[d].getAttribute("content");return""}function removeUrlParts(b){b=new URL(void 0===b?"":b,window.location.href);b.search="";b.hash="";return b.toString()}function appendParamToUrl(b,c){return b&&"string"===typeof b?b.endsWith("?")?b+c:b.includes("?")?b+"&"+c:b+"?"+c:""} Directory={getFileName:function(b){b=b.replaceAll("\\","/",!0);if(""==Directory.getFileSuffix(b))return"index.html";var c=b.lastIndexOf("/");return-1==c?b:b.substr(c+1)},getFilePath:function(b){b=b.replaceAll("\\","/",!0);var c=b.lastIndexOf("/");return-1==c?"":b.substr(0,c+1)},getFileSuffix:function(b){b=b.replaceAll("\\","/",!0);var c=b.lastIndexOf(".");return-1==c?"":b.substr(c)},getFolderName:function(b){b=Directory.getFilePath(b);if(""==b)return"";b=Directory.removeSlash(b);var c=b.lastIndexOf("/"); return-1==c?b:b.substr(c+1)},addSlash:function(b){b=b.replaceAll("\\","/",!0);return b.endsWith("/")?b:b+"/"},removeSlash:function(b){b=b.replaceAll("\\","/",!0);return b.endsWith("/")?b.substring(0,b.length-1):b},getUpperFilePath:function(b){b=b.replaceAll("\\","/",!0);var c=b.split("/"),d=c.length;return b=b.endsWith(".html")||b.endsWith("/")?b.remove(c[d-2]+"/"+c[d-1]):b.remove(c[d-1])}};bdor[2]="e"; function Metacharacter(b){if(null==b||""==b)return"";b=b.replaceAll("%","%25",!0);b=b.replaceAll("+","%2B",!0);b=b.replaceAll("/","%2F",!0);b=b.replaceAll("?","%3F",!0);b=b.replaceAll(" ","%20",!0);b=b.replaceAll("#","%23",!0);b=b.replaceAll("&","%26",!0);b=b.replaceAll("=","%3D",!0);b=b.replaceAll(":","%3A",!0);b=b.replaceAll("\r","%0D",!0);b=b.replaceAll("\n","%0A",!0);return b=b.replaceAll("'","%27",!0)} var reflection=function(b){var c=new Image;c.onload=function(){var d=null;b.children("canvas")[0]&&(d=$(b.children("canvas")[0]));var e=document.createElement("canvas"),f=e.getContext("2d");b[0].appendChild(e);c.onload=c.onerror=null;var g=this.width,h=this.height;b.children("img")&&g>b.children("img").width()&&(g=b.children("img").width());b.children("img")&&h>b.children("img").height()&&(h=b.children("img").height());var k=.7*h;try{e.style.width=g+"px";e.style.height=k+"px";e.width=g;e.height=k; e.className="reflect";$(e).css({transform:"translateY(-1px)"});f.save();f.translate(0,h);f.scale(1,-1);f.drawImage(c,0,0,g,h);f.restore();f.globalCompositeOperation="destination-out";var l=f.createLinearGradient(0,0,0,k);l.addColorStop(1,"rgba(255, 0, 0, 1.0)");l.addColorStop(0,"rgba(255, 0, 0, 0)");f.fillStyle=l;f.rect(0,0,g,2*k);f.fill();d&&d.remove()}catch(n){}};c.onerror=function(){c.onload=c.onerror=null};c.src=b.children("img")[0].src}; $.fn.allowNumberOnly=function(){$(this).keypress(function(b){b=b.keyCode||b.which;return 48<=b&&57>=b?!0:!1}).focus(function(){this.style.imeMode="disabled"}).bind("paste",function(){var b=window.clipboardData.getData("Text");return/^\d+$/.test(b)?!0:!1})};function getAnimationEnd(){var b=document.createElement("div"),c={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},d;for(d in c)if(void 0!==b.style[d])return c[d]} var getRealURL=function(b){if(b.isUrl()){var c=b.toLocaleLowerCase(),d=/^([_a-z\d\-]+\.)*[_a-z\d\-]+\.(com|net|int|info|edu|org|gov|club|biz|mil|xyz|[a-z]{2}[$\/]?)+/;/(f|ht)tp(s?):\/\//.test(c)||d.test(c)&&(b=getProtocal()+b)}else{c=window.location.href.removeStartFrom("#p=");c=Directory.getFilePath(c).substring(0,c.lastIndexOf("/"));d=Directory.getUpperFilePath(c);if(0<=b.indexOf("./"))return b=c+b.remove("./");b=0<=b.indexOf("../")?d+b.remove("../"):c+b}return b}; function dateFormat(b,c){b=new Date(parseInt(b));c=c.replace(/yyyy|YYYY/,b.getFullYear().toString());c=c.replace(/yy|YY/,9<b.getFullYear()%100?(b.getFullYear()%100).toString():"0"+b.getFullYear()%100);var d=b.getMonth()+1;c=c.replace(/MM/,9<d?d.toString():"0"+d);c=c.replace(/M/g,d.toString());c=c.replace(/w|W/g,"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split("")[b.getDay()]);c=c.replace(/dd|DD/,9<b.getDate()?b.getDate().toString():"0"+b.getDate());c=c.replace(/d|D/g,b.getDate().toString());c=c.replace(/hh|HH/, 9<b.getHours()?b.getHours().toString():"0"+b.getHours());c=c.replace(/h|H/g,b.getHours().toString());c=c.replace(/mm/,9<b.getMinutes()?b.getMinutes().toString():"0"+b.getMinutes());c=c.replace(/m/g,b.getMinutes().toString());c=c.replace(/ss|SS/,9<b.getSeconds()?b.getSeconds().toString():"0"+b.getSeconds());return c=c.replace(/s|S/g,b.getSeconds().toString())} function getMeta(b){b=window.location.origin;var c=window.location.pathname,d=window.location.href;-1<d.indexOf("mobile")?(b=d.removeStartFrom("/mobile/"),b=b.removeStartFrom("/articles/"),b+="/files/shot.jpg"):(-1<c.indexOf("index.html")&&(c=c.replace("index.html","")),b=b+c+"files/shot.jpg");return b} var ColorTable={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff0",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdC", ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",value:function(b){if(!b||"string"!=typeof b)return b;var c=b.toLowerCase();return this[c]?this[c]:b}},UserGroups="English"; checkReportConfig=function(){changeBookConfigValue("EnableReportButton",getConfigValue("EnableReportButton",!1))}; var tmpBookConfig={},checkBookConfig=function(){var b=allocateUTF8(htmlConfig.bookConfig);window.key_index=Module._DeConfig_Parse(b);void 0==window.aliasConfig&&(window.aliasConfig={});tmpBookConfig.displayNumberOfShares=getConfigValue("displayNumberOfShares",!1);tmpBookConfig.additionalNumberOfShare=getConfigValue("additionalNumberOfShare",0);tmpBookConfig.flipSoundURL=getConfigValue("flipSoundURL","");tmpBookConfig.isTableOfContentPagesVisible=getConfigValue("isTableOfContentPagesVisible",!1);tmpBookConfig.isArticlePhoneMoreButtonVisible= getConfigValue("isArticlePhoneMoreButtonVisible",!1);tmpBookConfig.alwaysShowBottomFullscreenPrompt=getConfigValue("alwaysShowBottomFullscreenPrompt",!1);tmpBookConfig.bottomFullscreenPromptDisplayDuration=getConfigValue("bottomFullscreenPromptDisplayDuration",3);tmpBookConfig.isChatBotButtonVisible=getConfigValue("isChatBotButtonVisible",!1);tmpBookConfig.articleTitlePosition=getConfigValue("articleTitlePosition","center").toLocaleLowerCase();tmpBookConfig.phoneFlipShortcutButtonSize=getConfigValue("phoneFlipShortcutButtonSize", "large").toLocaleLowerCase();tmpBookConfig.socialSharingList=getConfigValue("socialSharingList",void 0);tmpBookConfig.socialShareType=getConfigValue("socialShareType","0");tmpBookConfig.isRestorePageFrameVisible=getConfigValue("isRestorePageFrameVisible",!0);tmpBookConfig.alwaysShowBookInstructionOnStart=getConfigValue("alwaysShowBookInstructionOnStart","0");tmpBookConfig.showBookInstructionCountOnStart=getConfigValue("showBookInstructionCountOnStart",3);tmpBookConfig.toolBarBrandInfoVisible=getConfigValue("toolBarBrandInfoVisible", void 0);void 0!==tmpBookConfig.toolBarBrandInfoVisible&&(tmpBookConfig.toolBarBrandInfoVisible=parseBool(tmpBookConfig.toolBarBrandInfoVisible));tmpBookConfig.toolBarBrandInfoUrl=getConfigValue("toolBarBrandInfoUrl","");tmpBookConfig.loadingBrandInfoVisible=getConfigValue("loadingBrandInfoVisible",!1);tmpBookConfig.loadingBrandInfoUrl=getConfigValue("loadingBrandInfoUrl","");tmpBookConfig.relatedBrandInfoVisible=getConfigValue("relatedBrandInfoVisible",!1);tmpBookConfig.relatedBrandInfoUrl=getConfigValue("relatedBrandInfoUrl", "");tmpBookConfig.relatedCardVisible=getConfigValue("relatedCardVisible",!1);tmpBookConfig.relatedCardUrl=getConfigValue("relatedCardUrl","");tmpBookConfig.bookBaseURL=getConfigValue("bookBaseURL","");tmpBookConfig.bookResourceBaseURL=getConfigValue("bookResourceBaseURL","");!tmpBookConfig.bookResourceBaseURL&&window.htmlConfig&&window.htmlConfig.loadingConfig&&window.htmlConfig.loadingConfig.bookResourceBaseURL&&(tmpBookConfig.bookResourceBaseURL=window.htmlConfig.loadingConfig.bookResourceBaseURL); !tmpBookConfig.bookResourceBaseURL&&window.bookResourceBaseURL&&(tmpBookConfig.bookResourceBaseURL=window.bookResourceBaseURL);tmpBookConfig.enableCustomizedBookmarkWidth=getConfigValue("enableCustomizedBookmarkWidth",!1);tmpBookConfig.customizedBookmarkWidth=getConfigValue("customizedBookmarkWidth",50);tmpBookConfig.onlyOpenInDingDing=getConfigValue("onlyOpenInDingDing",!1);tmpBookConfig.disableDingDingSharing=getConfigValue("disableDingDingSharing",!1);tmpBookConfig.formBackgroundOpacity=getConfigValue("formBackgroundOpacity", 1);tmpBookConfig.phoneToolbarFontSize=getConfigValue("phoneToolbarFontSize","small").toLowerCase();tmpBookConfig.EnableRecognizeQRcodePressOnMobile=getConfigValue("EnableRecognizeQRcodePressOnMobile",!1);tmpBookConfig.mobileThumbnailSearchBarVisible=getConfigValue("mobileThumbnailSearchBarVisible",!0);tmpBookConfig.loadingMainColor=getConfigValue("loadingMainColor","#1F2232");tmpBookConfig.loadingBackgroundColorType=getConfigValue("loadingBackgroundColorType","1");tmpBookConfig.isShowFirstOrLastPagePrompt= getConfigValue("isShowFirstOrLastPagePrompt",!0);tmpBookConfig.isShowMobileBottomFullscreenPrompts=getConfigValue("isShowMobileBottomFullscreenPrompts",!1);tmpBookConfig.SmallProgramUrl=getConfigValue("SmallProgramUrl","");tmpBookConfig.searchColor=getConfigValue("searchColor","#00ffff");tmpBookConfig.searchAlpha=getConfigValue("searchAlpha",.3);tmpBookConfig.appLogoIcon=getConfigValue("appLogoIcon","");tmpBookConfig.HomeURL=getConfigValue("HomeURL","");tmpBookConfig.bookTitle=getConfigValue("bookTitle", "FLIPBOOK");tmpBookConfig.bookDescription=getConfigValue("bookDescription","");tmpBookConfig.toolbarColor=getConfigValue("toolbarColor","#27181A");tmpBookConfig.iconColor=getConfigValue("iconColor","#FFFFFF");tmpBookConfig.toolbarColor==tmpBookConfig.iconColor&&(tmpBookConfig.iconColor=Color(tmpBookConfig.toolbarColor).reverse());tmpBookConfig.pageNumColor=getConfigValue("pageNumColor","#000000");tmpBookConfig.formBackgroundColor=getConfigValue("formBackgroundColor",tmpBookConfig.toolbarColor);tmpBookConfig.formFontColor= getConfigValue("formFontColor",tmpBookConfig.iconColor);tmpBookConfig.formBackgroundColor.toLocaleLowerCase()==tmpBookConfig.formFontColor.toLocaleLowerCase()&&(tmpBookConfig.formFontColor=Color(tmpBookConfig.formBackgroundColor).reverse());tmpBookConfig.loadingBackground=getConfigValue("loadingBackground","#1F2232");tmpBookConfig.loadingDisplayTime=getConfigValue("loadingDisplayTime",0);tmpBookConfig.searchHightlightColor=getConfigValue("searchHightlightColor","#fdc606");tmpBookConfig.logoHeight= getConfigValue("logoHeight",40);tmpBookConfig.logoTop=getConfigValue("logoTop",0);tmpBookConfig.logoPadding=getConfigValue("logoPadding",0);tmpBookConfig.isFixLogoSize=getConfigValue("isFixLogoSize",!1);tmpBookConfig.HomeButtonVisible=getConfigValue("HomeButtonVisible",!1);tmpBookConfig.ShareButtonVisible=getConfigValue("ShareButtonVisible",!1);tmpBookConfig.facebookAppId=getConfigValue("facebookAppId","");tmpBookConfig.isInsertFrameLinkEnable=getConfigValue("isInsertFrameLinkEnable",!0);tmpBookConfig.addCurrentPage= getConfigValue("addCurrentPage",!1);tmpBookConfig.DoubleSinglePageButtonVisible=getConfigValue("DoubleSinglePageButtonVisible",!1);tmpBookConfig.ToolBarVisible=getConfigValue("ToolBarVisible",!0);tmpBookConfig.WeChatShareButtonVisible=getConfigValue("WeChatShareButtonVisible",!1);tmpBookConfig.ThumbnailsButtonVisible=getConfigValue("ThumbnailsButtonVisible",!1);tmpBookConfig.thumbnailColor=getConfigValue("thumbnailColor",tmpBookConfig.formBackgroundColor);tmpBookConfig.thumbnailAlpha=getConfigValue("thumbnailAlpha", 100);tmpBookConfig.ThumbnailSize=getConfigValue("ThumbnailSize","small");tmpBookConfig.ZoomButtonVisible=getConfigValue("ZoomButtonVisible",!1);tmpBookConfig.ZoomToolbarVisible=getConfigValue("ZoomToolbarVisible",!0);tmpBookConfig.ZoomMapVisible=getConfigValue("ZoomMapVisible",!0);tmpBookConfig.MagnifierButtonVisible=getConfigValue("MagnifierButtonVisible",!1);tmpBookConfig.SupportOperatePageZoom=getConfigValue("SupportOperatePageZoom",!0);tmpBookConfig.TableOfContentButtonVisible=getConfigValue("TableOfContentButtonVisible", !1);if(!global.ols||0>=global.ols.length)global.ols=[],tmpBookConfig.TableOfContentButtonVisible=!1;tmpBookConfig.LargeLogoPosition=getConfigValue("LargeLogoPosition","top-left");tmpBookConfig.LargeLogoTarget=getConfigValue("LargeLogoTarget","blank");tmpBookConfig.isHideTabelOfContentNodes=getConfigValue("isHideTabelOfContentNodes",!0);tmpBookConfig.BookMarkButtonVisible=getConfigValue("BookMarkButtonVisible",!1);tmpBookConfig.SelectTextButtonVisible=getConfigValue("SelectTextButtonVisible",!1);tmpBookConfig.SearchButtonVisible= getConfigValue("SearchButtonVisible",!1);tmpBookConfig.searchKeywordFontColor=getConfigValue("searchKeywordFontColor","#FFB000");tmpBookConfig.FullscreenButtonVisible=getConfigValue("FullscreenButtonVisible",!0);tmpBookConfig.isNeat&&(tmpBookConfig.FullscreenButtonVisible=!0);tmpBookConfig.hideMiniFullscreen=getConfigValue("hideMiniFullscreen",!1);isIphone()&&window.top==window.self&&(tmpBookConfig.isShowMobileBottomFullscreenPrompts=!1);tmpBookConfig.updatePageNumberForFlip=getConfigValue("updatePageNumberForFlip", !1);tmpBookConfig.leastSearchChar=getConfigValue("leastSearchChar",0);tmpBookConfig.PrintButtonVisible=getConfigValue("PrintButtonVisible",!1);tmpBookConfig.MessageButtonVisible=getConfigValue("MessageButtonVisible",!1);tmpBookConfig.printWatermarkFile=getConfigValue("printWatermarkFile","");tmpBookConfig.BackgroundSoundButtonVisible=getConfigValue("BackgroundSoundButtonVisible",!1);tmpBookConfig.BackgroundSoundURL=getConfigValue("BackgroundSoundURL","");tmpBookConfig.BackgroundSoundLoop=getConfigValue("BackgroundSoundLoop", -1);tmpBookConfig.HelpButtonVisible=getConfigValue("HelpButtonVisible",!1);tmpBookConfig.helpContentFileURL=getConfigValue("helpContentFileURL","");tmpBookConfig.helpWidth=getConfigValue("helpWidth",400);tmpBookConfig.helpHeight=getConfigValue("helpHeight",450);tmpBookConfig.showHelpContentAtFirst=getConfigValue("showHelpContentAtFirst",!1);tmpBookConfig.aboutButtonVisible=getConfigValue("aboutButtonVisible",!1);tmpBookConfig.aboutContactInfoTxt=getConfigValue("aboutContactInfoTxt","");tmpBookConfig.AutoPlayButtonVisible= getConfigValue("AutoPlayButtonVisible",!1);tmpBookConfig.autoPlayAutoStart=getConfigValue("autoPlayAutoStart",!1);tmpBookConfig.autoPlayDuration=getConfigValue("autoPlayDuration",3);tmpBookConfig.autoPlayLoopCount=getConfigValue("autoPlayLoopCount",1);tmpBookConfig.minZoomWidth=getConfigValue("minZoomWidth",0);tmpBookConfig.minZoomHeight=getConfigValue("minZoomHeight",0);tmpBookConfig.maxZoomWidth=getConfigValue("maxZoomWidth",0);tmpBookConfig.maxZoomHeight=getConfigValue("maxZoomHeight",0);tmpBookConfig.defaultZoomWidth= getConfigValue("defaultZoomWidth",0);tmpBookConfig.defaultZoomHeight=getConfigValue("defaultZoomHeight",0);tmpBookConfig.middleZoomWidth=getConfigValue("middleZoomWidth",0);isNaN(tmpBookConfig.middleZoomWidth)&&(tmpBookConfig.middleZoomWidth=0);tmpBookConfig.mouseWheelFlip=getConfigValue("mouseWheelFlip",!0);tmpBookConfig.DownloadButtonVisible=getConfigValue("DownloadButtonVisible",!0);tmpBookConfig.DownloadURL=getConfigValue("DownloadURL","");fixDownloadURLValue();tmpBookConfig.bgBeginColor=getConfigValue("bgBeginColor", "#E6E6E6");tmpBookConfig.bgEndColor=getConfigValue("bgEndColor","#E3E3E3");tmpBookConfig.bgMRotation=getConfigValue("bgMRotation",90);tmpBookConfig.backGroundImgURL=getConfigValue("backGroundImgURL","");tmpBookConfig.backgroundOpacity=getConfigValue("backgroundOpacity",100);tmpBookConfig.LeftShadowWidth=getConfigValue("LeftShadowWidth",40);tmpBookConfig.LeftShadowAlpha=getConfigValue("LeftShadowAlpha",1);tmpBookConfig.RightShadowWidth=getConfigValue("RightShadowWidth",40);tmpBookConfig.RightShadowAlpha= getConfigValue("RightShadowAlpha",1);_agent_.system.name==_agent_.system.ANDROID&&_agent_.browser.wechat&&(tmpBookConfig.RightShadowAlpha=1,tmpBookConfig.LeftShadowAlpha=1);tmpBookConfig.ShowTopLeftShadow=getConfigValue("ShowTopLeftShadow",!0);tmpBookConfig.pageBackgroundColor=getConfigValue("pageBackgroundColor","#FFFFFF");tmpBookConfig.flipshortcutbutton=getConfigValue("flipshortcutbutton",!1);tmpBookConfig.OriginPageIndex=getConfigValue("OriginPageIndex",1);tmpBookConfig.HardPageEnable=getConfigValue("HardPageEnable", !1);tmpBookConfig.HardInnerPageEnable=getConfigValue("HardInnerPageEnable",!1);tmpBookConfig.bookPageStretch=getConfigValue("bookPageStretch",!1);_agent_.browser.msie&&11>_agent_.browser.version&&(tmpBookConfig.HardPageEnable=!1,tmpBookConfig.HardInnerPageEnable=!1);tmpBookConfig.HardPageEnable||(tmpBookConfig.HardInnerPageEnable=!1);tmpBookConfig.thicknessWidthType=getConfigValue("thicknessWidthType","thick").toLowerCase();tmpBookConfig.showThicknessOnMobile=getConfigValue("showThicknessOnMobile", !1);"Chinese"==UserGroups&&(tmpBookConfig.pageHighlightType=getConfigValue("pageHighlightType","book").toLowerCase());"English"==UserGroups&&(tmpBookConfig.pageHighlightType=getConfigValue("pageHighlightType","magazine").toLowerCase());tmpBookConfig.usePdfJs=getConfigValue("usePdfJs",!1);tmpBookConfig.highDefinitionConversion=getConfigValue("highDefinitionConversion",!1);tmpBookConfig.usePdfJs&&(tmpBookConfig.highDefinitionConversion=!1);tmpBookConfig.highDefinitionConversion=!1;tmpBookConfig.isStopMouseMenu= getConfigValue("isStopMouseMenu",!1);tmpBookConfig.thicknessColor=getConfigValue("thicknessColor","#FFFFFF");tmpBookConfig.RightToLeft=getConfigValue("RightToLeft",!1);tmpBookConfig.flippingTime=getConfigValue("flippingTime",.3);void 0!=tmpBookConfig.flippingTime&&(tmpBookConfig.flippingTime=.2>tmpBookConfig.flippingTime?.2:tmpBookConfig.flippingTime);tmpBookConfig.supportSerialsFlip=getConfigValue("supportSerialsFlip",!0);tmpBookConfig.retainBookCenter=getConfigValue("retainBookCenter",!0);tmpBookConfig.totalPagesCaption= getConfigValue("totalPagesCaption","");tmpBookConfig.pageNumberCaption=getConfigValue("pageNumberCaption","");tmpBookConfig.buttonsSortXML=getConfigValue("buttonsSortXML",[]);tmpBookConfig.toolbarAlwaysShow=getConfigValue("toolbarAlwaysShow",!1);tmpBookConfig.searchbarAlwaysShowOnMobile=getConfigValue("searchbarAlwaysShowOnMobile",!1);isPhone()||isPad()||(tmpBookConfig.toolbarAlwaysShow=!0);tmpBookConfig.leftRightPnlShowOption=getConfigValue("leftRightPnlShowOption","").toLowerCase();tmpBookConfig.mobileLeftRightPnlShowOption= getConfigValue("mobileLeftRightPnlShowOption","").toLowerCase();tmpBookConfig.topMargin=getConfigValue("topMargin",10);tmpBookConfig.bottomMargin=getConfigValue("bottomMargin",10);tmpBookConfig.leftMargin=getConfigValue("leftMargin",10);tmpBookConfig.rightMargin=getConfigValue("rightMargin",10);tmpBookConfig.topMarginOnMobile=getConfigValue("topMarginOnMobile",10);tmpBookConfig.bottomMarginOnMobile=getConfigValue("bottomMarginOnMobile",10);tmpBookConfig.leftMarginOnMobile=getConfigValue("leftMarginOnMobile", 10);tmpBookConfig.rightMarginOnMobile=getConfigValue("rightMarginOnMobile",10);isPhone()||isPad()?(tmpBookConfig.topMargin=tmpBookConfig.topMarginOnMobile,tmpBookConfig.bottomMargin=tmpBookConfig.bottomMarginOnMobile,tmpBookConfig.leftMargin=tmpBookConfig.leftMarginOnMobile,tmpBookConfig.rightMargin=tmpBookConfig.rightMarginOnMobile,tmpBookConfig.phoneFlipShortcutSwitchButtonVisible=getConfigValue("phoneFlipShortcutSwitchButtonVisible",!1),tmpBookConfig.phoneFlipShortcutButton=getConfigValue("phoneFlipShortcutButton", !1),tmpBookConfig.searchbarAlwaysShowOnMobile&&tmpBookConfig.toolbarAlwaysShow&&(tmpBookConfig.topMargin+=50)):tmpBookConfig.phoneFlipShortcutButton=!1;tmpBookConfig.visibleAreaLeft=parseFloat(getConfigValue("visibleAreaLeft","0%"));tmpBookConfig.visibleAreaTop=parseFloat(getConfigValue("visibleAreaTop","0%"));tmpBookConfig.visibleAreaRight=parseFloat(getConfigValue("visibleAreaRight","100%"));tmpBookConfig.visibleAreaBottom=parseFloat(getConfigValue("visibleAreaBottom","100%"));tmpBookConfig.visibleAreaLeft= isNaN(tmpBookConfig.visibleAreaLeft)?"0%":tmpBookConfig.visibleAreaLeft;tmpBookConfig.visibleAreaTop=isNaN(tmpBookConfig.visibleAreaTop)?"0%":tmpBookConfig.visibleAreaTop;tmpBookConfig.visibleAreaRight=isNaN(tmpBookConfig.visibleAreaRight)?"100%":tmpBookConfig.visibleAreaRight;tmpBookConfig.visibleAreaBottom=isNaN(tmpBookConfig.visibleAreaBottom)?"100%":tmpBookConfig.visibleAreaBottom;tmpBookConfig.bleedAreaLeft=parseFloat(getConfigValue("bleedAreaLeft","0%"));tmpBookConfig.bleedAreaTop=parseFloat(getConfigValue("bleedAreaTop", "0%"));tmpBookConfig.bleedAreaRight=parseFloat(getConfigValue("bleedAreaRight","0%"));tmpBookConfig.bleedAreaBottom=parseFloat(getConfigValue("bleedAreaBottom","0%"));tmpBookConfig.bleedAreaLeft=isNaN(tmpBookConfig.bleedAreaLeft)?"0%":tmpBookConfig.bleedAreaLeft;tmpBookConfig.bleedAreaTop=isNaN(tmpBookConfig.bleedAreaTop)?"0%":tmpBookConfig.bleedAreaTop;tmpBookConfig.bleedAreaRight=isNaN(tmpBookConfig.bleedAreaRight)?"0%":tmpBookConfig.bleedAreaRight;tmpBookConfig.bleedAreaBottom=isNaN(tmpBookConfig.bleedAreaBottom)? "0%":tmpBookConfig.bleedAreaBottom;tmpBookConfig.visibleAreaLeft=tmpBookConfig.bleedAreaLeft?tmpBookConfig.bleedAreaLeft:tmpBookConfig.visibleAreaLeft;tmpBookConfig.visibleAreaTop=tmpBookConfig.bleedAreaTop?tmpBookConfig.bleedAreaTop:tmpBookConfig.visibleAreaTop;tmpBookConfig.visibleAreaRight=tmpBookConfig.bleedAreaRight?100-parseFloat(tmpBookConfig.bleedAreaRight):tmpBookConfig.visibleAreaRight;tmpBookConfig.visibleAreaBottom=tmpBookConfig.bleedAreaBottom?100-parseFloat(tmpBookConfig.bleedAreaBottom): tmpBookConfig.visibleAreaBottom;tmpBookConfig.LinkDownColor=getConfigValue("LinkDownColor","#9C9C9C");tmpBookConfig.LinkAlpha=getConfigValue("LinkAlpha",.4);tmpBookConfig.googleAnalyticsID=getConfigValue("googleAnalyticsID","");tmpBookConfig.googleTagManagerID=getConfigValue("googleTagManagerID","");tmpBookConfig.language=getConfigValue("language","English");tmpBookConfig.AboutAddress=getConfigValue("AboutAddress","");tmpBookConfig.AboutEmail=getConfigValue("AboutEmail","");tmpBookConfig.AboutMobile= getConfigValue("AboutMobile","");tmpBookConfig.AboutWebsite=getConfigValue("AboutWebsite","");tmpBookConfig.AboutDescription=getConfigValue("AboutDescription","");tmpBookConfig.AboutAuthor=getConfigValue("AboutAuthor","");tmpBookConfig.totalPageCount=getConfigValue("totalPageCount",1);tmpBookConfig.largePageWidth=getConfigValue("largePageWidth",1440);tmpBookConfig.largePageHeight=getConfigValue("largePageHeight",1728);tmpBookConfig.normalPath=getConfigValue("normalPath","files/page/");tmpBookConfig.largePath= getConfigValue("largePath","files/large/");tmpBookConfig.thumbPath=getConfigValue("thumbPath","files/thumb/");tmpBookConfig.FlipStyle=getConfigValue("FlipStyle","flip");tmpBookConfig.FlipStyle=tmpBookConfig.FlipStyle.toLowerCase();tmpBookConfig.phoneFlipStyle=getConfigValue("phoneFlipStyle",void 0);(isPhone()||isPad())&&void 0!==tmpBookConfig.phoneFlipStyle&&(tmpBookConfig.FlipStyle=tmpBookConfig.phoneFlipStyle.toLowerCase());tmpBookConfig.autoDoublePage=getConfigValue("autoDoublePage","auto");b= tmpBookConfig.autoDoublePage?tmpBookConfig.autoDoublePage.toLocaleLowerCase():"auto";"single"!=b&&"auto"!=b&&"double"!=b?getConfigValue("autoDoublePage",!0)?tmpBookConfig.showDoublePage="auto":tmpBookConfig.showDoublePage="single":tmpBookConfig.showDoublePage=b;tmpBookConfig.alwaysDoublePageOnMobile=getConfigValue("alwaysDoublePageOnMobile",!1);tmpBookConfig.upsideOnMobile=function(){return isPhone()||isPad()?tmpBookConfig.alwaysDoublePageOnMobile&&window.innerHeight>window.innerWidth?!0:!1:!1};tmpBookConfig.upsideOnMobile()&& "single"!=tmpBookConfig.showDoublePage&&(tmpBookConfig.showDoublePage="double");tmpBookConfig.QRPath=getConfigValue("QRPath","files/extfile/QRURL.png");tmpBookConfig.QRCode=getConfigValue("QRCode",!1);tmpBookConfig.MiniStyle=getConfigValue("MiniStyle",!0);tmpBookConfig.AnnotationButtonVisible=getConfigValue("AnnotationButtonVisible",!1);tmpBookConfig.InstructionsButtonVisible=getConfigValue("InstructionsButtonVisible",!1);tmpBookConfig.showInstructionOnStart=getConfigValue("showInstructionOnStart", !0);tmpBookConfig.showBookInstructionOnStart=getConfigValue("showBookInstructionOnStart",!1);tmpBookConfig.showSwitchTipsOnStart=getConfigValue("showSwitchTipsOnStart",!1);tmpBookConfig.EmailButtonVisible=getConfigValue("EmailButtonVisible",!1);tmpBookConfig.btnShareWithEmailSubject=getConfigValue("btnShareWithEmailSubject","");tmpBookConfig.btnShareWithEmailBody=getConfigValue("btnShareWithEmailBody","");tmpBookConfig.socialShareLink=getConfigValue("socialShareLink","");tmpBookConfig.VideoButtonVisible= getConfigValue("VideoButtonVisible",!1);if(!global.videoList||0>=global.videoList.length)tmpBookConfig.VideoButtonVisible=!1;tmpBookConfig.SlideshowButtonVisible=getConfigValue("SlideshowButtonVisible",!1);if(!global.slideshow||0>=global.slideshow.length)tmpBookConfig.SlideshowButtonVisible=!1;tmpBookConfig.CompanyLogoFile=getConfigValue("CompanyLogoFile","");tmpBookConfig.UIBaseURL=getConfigValue("UIBaseURL","");tmpBookConfig.haveAdSense=getConfigValue("haveAdSense",!1);tmpBookConfig.adSenseLeft= getConfigValue("adSenseLeft",0);tmpBookConfig.adSenseTop=getConfigValue("adSenseTop",0);tmpBookConfig.adSenseWidth=getConfigValue("adSenseWidth",0);tmpBookConfig.adSenseHeight=getConfigValue("adSenseHeight",0);tmpBookConfig.adSenseClientId=getConfigValue("adSenseClientId","");tmpBookConfig.adSenseSlotId=getConfigValue("adSenseSlotId","");tmpBookConfig.productName=getConfigValue("productName","Flip HTML5");tmpBookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");tmpBookConfig.preloadNextPage= getConfigValue("preloadNextPage",!0);tmpBookConfig.showMirrorSide=getConfigValue("showMirrorSide",!0);tmpBookConfig.addPaperCoil=getConfigValue("addPaperCoil",!1);tmpBookConfig.addPaperCoil&&!tmpBookConfig.BindingType&&(tmpBookConfig.BindingType="loose");tmpBookConfig.BindingType||(tmpBookConfig.BindingType=getConfigValue("BindingType","side"));tmpBookConfig.addPaperCoil="loose"==tmpBookConfig.BindingType||"loose2"==tmpBookConfig.BindingType;tmpBookConfig.ToolbarViewMode=getConfigValue("ToolbarViewMode", "standard");tmpBookConfig.ToolbarViewMode=tmpBookConfig.ToolbarViewMode.toLocaleLowerCase();tmpBookConfig.isTheBookOpen=getConfigValue("isTheBookOpen",!1);tmpBookConfig.FlipDirection=getConfigValue("FlipDirection",0);tmpBookConfig.phoneFlipShortcutSwitchButtonIcon=getConfigValue("phoneFlipShortcutSwitchButtonIcon","");tmpBookConfig.HomeButtonIcon=getConfigValue("HomeButtonIcon","");tmpBookConfig.AnnotationButtonIcon=getConfigValue("AnnotationButtonIcon","");tmpBookConfig.VideoButtonIcon=getConfigValue("VideoButtonIcon", "");tmpBookConfig.SlideshowButtonIcon=getConfigValue("SlideshowButtonIcon","");tmpBookConfig.ShareButtonIcon=getConfigValue("ShareButtonIcon","");tmpBookConfig.ThumbnailButtonIcon=getConfigValue("ThumbnailButtonIcon","");tmpBookConfig.ZoomInButtonIcon=getConfigValue("ZoomInButtonIcon","");tmpBookConfig.ZoomOutButtonIcon=getConfigValue("ZoomOutButtonIcon","");tmpBookConfig.MagnifierButtonIcon=getConfigValue("MagnifierButtonIcon","");tmpBookConfig.FullscreenButtonIcon=getConfigValue("FullscreenButtonIcon", "");tmpBookConfig.ExitFullscreenButtonIcon=getConfigValue("ExitFullscreenButtonIcon","");tmpBookConfig.BookmarkButtonIcon=getConfigValue("BookmarkButtonIcon","");tmpBookConfig.TableOfContentButtonIcon=getConfigValue("TableOfContentButtonIcon","");tmpBookConfig.SearchButtonIcon=getConfigValue("SearchButtonIcon","");tmpBookConfig.PrintButtonIcon=getConfigValue("PrintButtonIcon","");tmpBookConfig.BackgroundSoundButtonOnIcon=getConfigValue("BackgroundSoundButtonOnIcon","");tmpBookConfig.BackgroundSoundButtonOffIcon= getConfigValue("BackgroundSoundButtonOffIcon","");tmpBookConfig.HelpButtonIcon=getConfigValue("HelpButtonIcon","");tmpBookConfig.AboutButtonIcon=getConfigValue("AboutButtonIcon","");tmpBookConfig.AutoPlayStartButtonIcon=getConfigValue("AutoPlayStartButtonIcon","");tmpBookConfig.AutoPlayStopButtonIcon=getConfigValue("AutoPlayStopButtonIcon","");tmpBookConfig.DownloadButtonIcon=getConfigValue("DownloadButtonIcon","");tmpBookConfig.SelectTextButtonIcon=getConfigValue("SelectTextButtonIcon","");tmpBookConfig.facebookShotImageURL= getConfigValue("facebookShotImageURL","");tmpBookConfig.searchTextJS=getConfigValue("searchTextJS","files/search/book_config.js");tmpBookConfig.searchPositionJS=getConfigValue("searchPositionJS","files/search/text_position.js");tmpBookConfig.userSmallMode=getConfigValue("userSmallMode",!0);tmpBookConfig.maxWidthToSmallMode=getConfigValue("maxWidthToSmallMode",300);tmpBookConfig.maxHeightToSmallMode=getConfigValue("maxHeightToSmallMode",300);tmpBookConfig.backgroundScene=getConfigValue("backgroundScene", "None");tmpBookConfig.bgSoundVol=getConfigValue("bgSoundVol",50);tmpBookConfig.bgSoundVol=Number.between(tmpBookConfig.bgSoundVol,0,100);tmpBookConfig.enablePageBack=getConfigValue("enablePageBack",!1);tmpBookConfig.userListPath=getConfigValue("userListPath","files/extfiles/users.js");tmpBookConfig.excludeFrontPages=getConfigValue("excludeFrontPages","");tmpBookConfig.isFlipPdf=getConfigValue("isFlipPdf",!1);tmpBookConfig.SingleModeBanFlipToLastPage=getConfigValue("SingleModeBanFlipToLastPage",!1); tmpBookConfig.isSingleBookFullWindowOnMobile=getConfigValue("isSingleBookFullWindowOnMobile",!1);tmpBookConfig.showGotoButtonsAtFirst=getConfigValue("showGotoButtonsAtFirst",!1);0==tmpBookConfig.isFlipPdf&&void 0!=global.isFlipPdf&&(tmpBookConfig.isFlipPdf=isFlipPdf);tmpBookConfig.FlipSound=getConfigValue("FlipSound",!0);global.flipSoundIsPlaying=tmpBookConfig.FlipSound;tmpBookConfig.CurlingPageCorner=getConfigValue("CurlingPageCorner",!0);tmpBookConfig.BanFlipFromDirection=getConfigValue("BanFlipFromDirection", !1);tmpBookConfig.iconFontColor=getConfigValue("iconFontColor","#ffffff");try{void 0!=global.staticAd&&1==staticAd.haveAd&&void 0==global.staticAd.adPosition&&("Chinese"==UserGroups&&(global.staticAd.adPosition=1),"English"==UserGroups&&(global.staticAd.adPosition=0)),void 0!=global.staticAd&&1==staticAd.haveAd&&0===parseInt(global.staticAd.adPosition)?tmpBookConfig.retainBookCenter=!1:tmpBookConfig.retainBookCenter=getConfigValue("retainBookCenter",!0)}catch(e){}tmpBookConfig.updateURLForPage=getConfigValue("updateURLForPage", !0);tmpBookConfig.borderColor=getConfigValue("borderColor","#572f0d");tmpBookConfig.outerCoverBorder=getConfigValue("outerCoverBorder",!1);tmpBookConfig.hardCoverBorderWidth=getConfigValue("hardCoverBorderWidth",0);tmpBookConfig.cornerRound=getConfigValue("cornerRound",0);tmpBookConfig.hardCoverBorderWidth=tmpBookConfig.HardPageEnable?Number.between(0,16,tmpBookConfig.hardCoverBorderWidth):0;tmpBookConfig.cornerRound=tmpBookConfig.HardPageEnable?Number.between(0,tmpBookConfig.hardCoverBorderWidth, tmpBookConfig.cornerRound):0;tmpBookConfig.coverTexture=getConfigValue("coverTexture","none");tmpBookConfig.passwardPrompt=getConfigValue("passwardPrompt","");tmpBookConfig.SlideshowAutoPlay=getConfigValue("SlideshowAutoPlay",!1);tmpBookConfig.SlideshowPlayInterval=getConfigValue("SlideshowPlayInterval",5);tmpBookConfig.productName=getConfigValue("productName","Flip HTML5");tmpBookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");global.productName=tmpBookConfig.productName||"Flip HTML5"; global.homePage=tmpBookConfig.homePage||"http://www.fliphtml5.com";tmpBookConfig.backgroundPosition=getConfigValue("backgroundPosition","Stretch");tmpBookConfig.restorePageVisible=getConfigValue("restorePageVisible",!1);tmpBookConfig.restorePageDuration=getConfigValue("restorePageDuration",86400);tmpBookConfig.toobarClear=getConfigValue("toobarClear",!1);tmpBookConfig.bottomToolBarAlpha=getConfigValue("bottomToolBarAlpha",1);tmpBookConfig.topToolBarAlpha=getConfigValue("topToolBarAlpha",1);tmpBookConfig.ToolBarAlpha= getConfigValue("ToolBarAlpha",1);tmpBookConfig.phoneSearchBarAlpha=getConfigValue("phoneSearchBarAlpha",.8);(isPhone()||isPad())&&"slide"!=tmpBookConfig.FlipStyle.toLowerCase()&&(tmpBookConfig.FlipStyle="flip");isBelowIE9()&&(tmpBookConfig.FlipStyle="slide");if(isPhone()||isPad()||"slide"==tmpBookConfig.FlipStyle.toLowerCase()&&"lite"==tmpBookConfig.ToolbarViewMode.toLowerCase())tmpBookConfig.flipshortcutbutton=!1;if("slide"==tmpBookConfig.FlipStyle&&"lite"==tmpBookConfig.ToolbarViewMode.toLowerCase()|| isPhone()||isPad())tmpBookConfig.flipshortcutbutton=!1;if(global.videoList&&1<=global.videoList.length)for(var c=0;c<videoList.length;c++)videoList[c].id||(videoList[c].id=""),videoList[c].description||(videoList[c].description=""),videoList[c].thumbnail||(videoList[c].thumbnail=""),videoList[c].title||(videoList[c].title=""),videoList[c].type||(videoList[c].type="");try{window.localStorage||(tmpBookConfig.BookMarkButtonVisible=!1,tmpBookConfig.AnnotationButtonVisible=!1,tmpBookConfig.restorePageVisible= !1,global.pageEditor&&global.pageEditor.setting&&parseBool(global.pageEditor.setting.shoppingCartHTML)&&(global.pageEditor.setting.shoppingCartHTML=!1))}catch(e){tmpBookConfig.BookMarkButtonVisible=!1,tmpBookConfig.AnnotationButtonVisible=!1,tmpBookConfig.restorePageVisible=!1,global.pageEditor&&global.pageEditor.setting&&parseBool(global.pageEditor.setting.shoppingCartHTML)&&(global.pageEditor.setting.shoppingCartHTML=!1)}0<=global.templeteName.indexOf("article")&&(isPhone()||isPad())&&(tmpBookConfig.BookMarkButtonVisible= !1);tmpBookConfig.OpenWindow=(getConfigValue("OpenWindow","_blank")+"").toLowerCase();tmpBookConfig.appLogoOpenWindow=(getConfigValue("appLogoOpenWindow","_blank")+"").toLowerCase();tmpBookConfig.OpenWindow.startsWith("_")||(tmpBookConfig.OpenWindow="_"+tmpBookConfig.OpenWindow);tmpBookConfig.appLogoOpenWindow.startsWith("_")||(tmpBookConfig.appLogoOpenWindow="_"+tmpBookConfig.appLogoOpenWindow);tmpBookConfig.appLargeLogoIcon=getConfigValue("appLargeLogoIcon","");tmpBookConfig.appLogoLinkURL=getConfigValue("appLogoLinkURL", "");tmpBookConfig.appLogoLinkURL&&(tmpBookConfig.appLogoLinkURL=getRealURL(tmpBookConfig.appLogoLinkURL));tmpBookConfig.appLargeLogoURL=getConfigValue("appLargeLogoURL","");tmpBookConfig.appLargeLogoURL&&(tmpBookConfig.appLargeLogoURL=getRealURL(tmpBookConfig.appLargeLogoURL));tmpBookConfig.isFixLogoSize=getConfigValue("isFixLogoSize",!1);tmpBookConfig.logoFixWidth=getConfigValue("logoFixWidth",0);tmpBookConfig.logoFixHeight=getConfigValue("logoFixHeight",0);tmpBookConfig.PhoneButtonVisible=getConfigValue("PhoneButtonVisible", !1);window.phoneNumber&&0!=phoneNumber.length||(tmpBookConfig.PhoneButtonVisible=!1);tmpBookConfig.PhoneButtonIcon=getConfigValue("PhoneButtonIcon","");tmpBookConfig.phoneNumber=getConfigValue("phoneNumber","");tmpBookConfig.aboutContactInfoTxt=getConfigValue("aboutContactInfoTxt","");tmpBookConfig.isEncryptionBook=getConfigValue("isEncryptionBook",!1);tmpBookConfig.useTheAliCloudChart=getConfigValue("useTheAliCloudChart",!1);tmpBookConfig.securityType=getConfigValue("securityType",0);tmpBookConfig.singlePasswordKey= getConfigValue("singlePasswordKey","");tmpBookConfig.singlePasswordMD5=getConfigValue("singlePasswordMD5","");1<=passwardType()&&(tmpBookConfig.useTheAliCloudChart=!1);tmpBookConfig.isEncryptionBook&&(tmpBookConfig.useTheAliCloudChart=!1);tmpBookConfig.useTheFliphtml5Service=getConfigValue("useTheFliphtml5Service",!1);if("online.fliphtml5.com"==document.domain||0<=tmpBookConfig.bookResourceBaseURL.indexOf("online.fliphtml5.com"))tmpBookConfig.useTheAliCloudChart=!1,tmpBookConfig.useTheFliphtml5Service= !0;tmpBookConfig.isEncryptionBook&&(tmpBookConfig.useTheFliphtml5Service=!1);tmpBookConfig.OnlyOpenInWechat=getConfigValue("OnlyOpenInWechat",!1);tmpBookConfig.NoWechatSharing=getConfigValue("NoWechatSharing",!1);tmpBookConfig.WeChatShareButtonIcon=getConfigValue("WeChatShareButtonIcon","");tmpBookConfig.isShowAssistantPerson=getConfigValue("isShowAssistantPerson",!0);tmpBookConfig.OnlyOpenInIframe=getConfigValue("OnlyOpenInIframe",!1);tmpBookConfig.OnlyOpenInIframeInfo=getConfigValue("OnlyOpenInIframeInfo", "Only open in iframe.");tmpBookConfig.NoWechatSharing&&jQuery(document).ready(function(){window.setTimeout(function(){function e(){WeixinJSBridge.call("hideOptionMenu")}global.wx&&wx.hideOptionMenu();"undefined"==typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",e,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",e),document.attachEvent("onWeixinJSBridgeReady",e)):e()},10)});tmpBookConfig.textClarityEnhancement=getConfigValue("textClarityEnhancement", 0);tmpBookConfig.textSharpening=getConfigValue("textSharpening",!1);tmpBookConfig.AboutDescription=tmpBookConfig.AboutDescription.replace(/\n/g,"<br/>");tmpBookConfig.AboutDescription=tmpBookConfig.AboutDescription.replace(/\r/g,"<br/>");checkBookmarkConfig();isBelowIE9()&&(tmpBookConfig.BookMarkButtonVisible=!1,tmpBookConfig.AnnotationButtonVisible=!1,tmpBookConfig.WeChatShareButtonVisible=!1);tmpBookConfig.useTheAliCloudChart&&tmpBookConfig.backGroundImgURL&&(0<=tmpBookConfig.backGroundImgURL.indexOf("?")? tmpBookConfig.backGroundImgURL+="&x-oss-process=image/resize,h_800":tmpBookConfig.backGroundImgURL+="?x-oss-process=image/resize,h_800",window.isSupportWebp&&(tmpBookConfig.backGroundImgURL+="/format,webp"));tmpBookConfig.useTheFliphtml5Service&&tmpBookConfig.backGroundImgURL&&(tmpBookConfig.backGroundImgURL=resetFliphtml5URL(tmpBookConfig.backGroundImgURL));global.checkReportConfig&&checkReportConfig();global.aboutReadTimesCaptions="Views";"Chinese"==UserGroups&&(global.aboutReadTimesCaptions="\u95c3\u5470\ue1f0\u5a06\u2103\u669f"); tmpBookConfig.isNeat=getConfigValue("isNeat",!1);0<=window.location.hash.indexOf("isNeat")&&(tmpBookConfig.isNeat=!0);tmpBookConfig.phoneToolbarType=getConfigValue("phoneToolbarType","image").toLowerCase();tmpBookConfig.phoneIconNumber=getConfigValue("phoneIconNumber",6);tmpBookConfig.phoneIconNumber=Math.max(1,tmpBookConfig.phoneIconNumber);tmpBookConfig.showAdOnTop=getConfigValue("showAdOnTop",!0);tmpBookConfig.bookPath=getConfigValue("bookPath",window.location.href);tmpBookConfig.bookPath=tmpBookConfig.bookPath.removeStartFrom("index.html"); tmpBookConfig.bookPath=tmpBookConfig.bookPath.removeStartFrom("articles/");tmpBookConfig.bookPath=tmpBookConfig.bookPath.removeStartFrom("mobile/");tmpBookConfig.bookPath=tmpBookConfig.bookPath.removeStartFrom("?");tmpBookConfig.bookPath=tmpBookConfig.bookPath.removeStartFrom("#");"/"!=tmpBookConfig.bookPath.slice(-1)&&(tmpBookConfig.bookPath+="/");tmpBookConfig.loadPreviewImage=!1;tmpBookConfig.removeLoad=!0;tmpBookConfig.showArticleDescription=getConfigValue("showArticleDescription",!1);tmpBookConfig.showArticlePageFlashes= getConfigValue("showArticlePageFlashes",!0);tmpBookConfig.articleListPath=getConfigValue("articleListPath","");tmpBookConfig.articleConfigPath=getConfigValue("articleConfigPath","");tmpBookConfig.bookArticleConfigPath=getConfigValue("bookArticleConfigPath","");tmpBookConfig.periodsConfigPath=getConfigValue("periodsConfigPath","");tmpBookConfig.userArticleConfigPath=getConfigValue("userArticleConfigPath","");checkURLValue();tmpBookConfig.pageEditorUrl=getConfigValue("pageEditorUrl","");tmpBookConfig.pageReaderUrl= getConfigValue("pageReaderUrl","");tmpBookConfig.pageSliderUrl=getConfigValue("pageSliderUrl","");tmpBookConfig.pageRestrictUrl=getConfigValue("pageRestrictUrl","");tmpBookConfig.restrictUrl=getConfigValue("restrictUrl","");tmpBookConfig.keyForPageTest=getConfigValue("keyForPageTest","");tmpBookConfig.bookOwnerInfo=getConfigValue("bookOwnerInfo","");tmpBookConfig.Copyright=getConfigValue("Copyright","");tmpBookConfig.articleTitle=getConfigValue("articleTitle","");tmpBookConfig.articleTime=getConfigValue("articleTime", "");tmpBookConfig.isMouseEnterToDisplayArticleTitle=getConfigValue("isMouseEnterToDisplayArticleTitle",!1);try{if(window.ignoreModuleArray&&window.ignoreModuleArray.bookConfig)for(c=0;c<window.ignoreModuleArray.bookConfig.length;c++){var d=window.ignoreModuleArray.bookConfig[c];void 0!=tmpBookConfig[d]&&(tmpBookConfig[d]=!1)}}catch(e){}c=Module._getVerifyString();d=UTF8ToString(c);Module._free(c);eval(d)}; function checkBookmarkConfig(){global.bmtConfig||(bmtConfig=[]);void 0==bmtConfig.onSideEdge&&(bmtConfig.onSideEdge=!0);void 0==bmtConfig.showPage&&(bmtConfig.showPage=!1);void 0==bmtConfig.hasTexture&&(bmtConfig.hasTexture=!1);bmtConfig.tabs&&0<bmtConfig.tabs.length&&0==bmtConfig.onSideEdge&&!isPhone()&&!isPad()&&"slide"!=tmpBookConfig.FlipStyle.toLowerCase()&&(75>tmpBookConfig.topMargin&&(tmpBookConfig.topMargin=75),"vertical"==tmpBookConfig.flipDrection&&75>tmpBookConfig.bottomMargin&&(tmpBookConfig.topMargin= 75))} var isBool=function(b){if(!0===b||!1===b)return!0;if(void 0==b)return!1;var c=["false","no","hide","disable"];b=b.toLowerCase();return 0>["true","yes","show","enable"].indexOf(b)&&0>c.indexOf(b)?!1:!0},getValueFromConfig=function(b,c){b=function(d,e){DeConfig_Parse(d);getEditConfig(d);void 0!=e&&"string"==typeof e&&""!=e.trim()&&isBool(e)&&(e=parseBool(e));d=void 0!=tmpBookConfig[d]?tmpBookConfig[d]:getValueFromAliasConfig(d);return void 0==d?e:void 0==e?d:"number"==typeof e?Number(d):"boolean"==typeof e? parseBool(d):"string"==typeof e&&"#"==e[0]?Color(d).toString():d}(b,c);"string"==typeof b&&(b=b.replaceAll("\\/","/",!0),b=b.replaceAll('\\"','"'),b.startsWith("[")&&b.endsWith("]")&&(b=eval(b)));return b},getConfigValue=function(b,c){b=getValueFromConfig(b,c);"string"==typeof b&&0<=b.indexOf("files")&&(b=fixURLValue(b));return b}; function DeConfig_Parse(b){try{var c=Module._DeConfig_Get(window.key_index,allocateUTF8(b)),d=UTF8ToString(c);tmpBookConfig[b]="undefined"==d?void 0:d;return d}catch(e){}}function allocateUTF8(b){var c=lengthBytesUTF8(b)+1,d=_malloc(c);d&&stringToUTF8Array(b,HEAP8,d,c);return d}function getEditConfig(b){try{var c=window.editConfig||window.htmlConfig.editConfig;c&&void 0!=c[b]&&(tmpBookConfig[b]=c[b])}catch(d){}} var getValueFromAliasConfig=function(b){if(global.aliasConfig&&(b=aliasConfig[b]))for(var c=0;c<b.length;c++){var d=b[c];if(void 0!=tmpBookConfig[d])return tmpBookConfig[d]}},fixDownloadURLValue=function(){""==tmpBookConfig.DownloadURL&&void 0!=tmpBookConfig.downloadURL&&""!=tmpBookConfig.downloadURL&&(tmpBookConfig.DownloadURL=tmpBookConfig.downloadURL)},checkURLValue=function(){tmpBookConfig.articleListPath=changeBookResourceBaseURL(tmpBookConfig.articleListPath);tmpBookConfig.articleConfigPath= changeBookResourceBaseURL(tmpBookConfig.articleConfigPath);tmpBookConfig.bookArticleConfigPath=changeBookResourceBaseURL(tmpBookConfig.bookArticleConfigPath);tmpBookConfig.periodsConfigPath=changeBookResourceBaseURL(tmpBookConfig.periodsConfigPath);tmpBookConfig.userArticleConfigPath=changeBookResourceBaseURL(tmpBookConfig.userArticleConfigPath);tmpBookConfig.userListPath=changeBookResourceBaseURL(tmpBookConfig.userListPath)},fixURLValue=function(b){if(_agent_.browser.app||!tmpBookConfig.CreatedTime|| !b)return b;var c=function(e){return"string"!=typeof e?e:e=0<=e.indexOf("?")?e+"&"+tmpBookConfig.CreatedTime:e+"?"+tmpBookConfig.CreatedTime};if("string"!=typeof b)for(var d=0;d<b.length;d++)b[d]=c(b[d]);else b=c(b);return b=changeBookResourceBaseURL(b)},decodeAboutInfo=function(){if(tmpBookConfig.aboutContactInfoTxt){try{var b=$(tmpBookConfig.aboutContactInfoTxt)}catch(p){return}var c,d,e,f,g;b.find("title").text();var h=b.find("desc").text();var k=b.find("logo").text();b=b.find("keys").children(); for(var l=0;l<b.length;l++){var n=$(b[l]);"Phone"==n.attr("type")&&(c=n.text());"Link"==n.attr("type")&&(d=n.text());"Email"==n.attr("type")&&(e=n.text());"Address"==n.attr("type")&&(f=n.text());"Author"==n.attr("type")&&(g=n.text())}b=function(p){return String.parseUtf8(base64.decode(p))};f&&!tmpBookConfig.AboutAddress&&(tmpBookConfig.AboutAddress=b(f));e&&!tmpBookConfig.AboutEmail&&(tmpBookConfig.AboutEmail=b(e));c&&!tmpBookConfig.AboutMobile&&(tmpBookConfig.AboutMobile=b(c));d&&!tmpBookConfig.AboutWebsite&& (tmpBookConfig.AboutWebsite=b(d));h&&!tmpBookConfig.AboutDescription&&(tmpBookConfig.AboutDescription=b(h));g&&!tmpBookConfig.AboutAuthor&&(tmpBookConfig.AboutAuthor=b(g));k&&!tmpBookConfig.CompanyLogoFile&&(tmpBookConfig.CompanyLogoFile=b(k));tmpBookConfig.CompanyLogoFile&&(tmpBookConfig.CompanyLogoFile=tmpBookConfig.CompanyLogoFile.replace(/\\/g,"/"));tmpBookConfig.isFlipPdf&&tmpBookConfig.CompanyLogoFile.startsWith("./")&&(tmpBookConfig.CompanyLogoFile="."+tmpBookConfig.CompanyLogoFile)}},checkHtmlConfig= function(){for(var b="aliasConfig aliasLanguage fliphtml5_pages bmtConfig videoList staticAd language ols slideshow pageEditor flipByAudio downloadconfig assistantConfig phoneNumber bookPlugin shareObj textForPages positionForPages search_pages pages_information bookConfig phoneTemplate userList".split(" "),c=0;c<b.length;c++){var d=b[c];window.htmlConfig&&window.htmlConfig[d]&&"bookConfig"!=d&&(window[d]=window.htmlConfig[d])}!window.htmlConfig||!window.htmlConfig.downloadConfig||window.htmlConfig.downloadconfig&& void 0==window.htmlConfig.downloadconfig.length||(window.downloadconfig=window.htmlConfig.downloadConfig);try{window.downloadconfig&&0==downloadconfig.isDownloadAttach&&(downloadconfig.attachments=null)}catch(e){}};checkHtmlConfig(); function initEncryptPreviewPages(){if(!(!tmpBookConfig.previewPages||tmpBookConfig.previewPagesArray&&tmpBookConfig.previewPagesArray.length)){for(var b=tmpBookConfig.previewPages.split(","),c=[],d=0;d<b.length;d++)if(-1<b[d].indexOf("-"))for(var e=b[d].split("-"),f=parseFloat(e[0]);f<=parseFloat(e[1]);f++)c.push(parseFloat(f));else b[d]&&c.push(parseFloat(b[d]));tmpBookConfig.previewPagesArray=c}}initEncryptPreviewPages(); var getBookInfo=function(){if(window.htmlConfig&&window.htmlConfig.bookConfig&&window.htmlConfig.bookConfig.bookBaseURL){var b=tmpBookConfig.bookBaseURL;b.endsWith("/")||(b+="/");$.ajax({url:b+"bookinfo.js",type:"get",crossDomain:!0,success:function(c){},error:function(c){}})}},toAbsURL=function(b){var c=document.createElement("a");c.href=b;return c.href},changeHostName=function(b,c){var d=document.createElement("a");d.href=b;return b=d.href.replace(d.host,c)},changeBookResourceBaseURL=function(b){if(!tmpBookConfig.bookResourceBaseURL|| tmpBookConfig.useTheFliphtml5Service||0<=b.indexOf("http")||0<=b.indexOf("file:///"))return b;b=0<=b.indexOf("../")?b.remove("../"):b.remove("./");return toAbsURL(tmpBookConfig.bookResourceBaseURL+b)}; function resetFliphtml5URL(b){try{if(!b||0<=b.indexOf("none")||0<=b.indexOf(".zip")||0<=b.indexOf(".svg")||0<=b.indexOf(".js")||window.isSupportWebp&&0<=b.indexOf("webp")||0>b.indexOf("webp"))return b;b=b.removeStartFrom("?")+"";b=changeHostName(b,"online-a.wancaiinfo.com");var c="";c=window.isSupportWebp?"webp":getWebpOriginFormat(b);return b=b+"?image_process=format,"+c}catch(d){return b}} function initImageBaseUrl(){global.uiBaseURL=tmpBookConfig.UIBaseURL;uiBaseURL&&"string"==typeof uiBaseURL&&(uiBaseURL.endsWith("/")||(uiBaseURL+="/"));global.phoneBaseURL=uiBaseURL+"style/phoneIcon/";global.soundBaseURL=uiBaseURL+"style/raw/";global.mbBaseURL=uiBaseURL+"style/mb_icon/";global.uiBaseURL=uiBaseURL+"style/icon/";tmpBookConfig.pageLoadingUrl=global.uiBaseURL+"loading.svg";isIE()&&(tmpBookConfig.pageLoadingUrl=global.uiBaseURL+"loading.gif")} function changeBookConfigValue(b,c){tmpBookConfig[b]=c} function resetYunzhanURL(b,c,d){if(!b||0<=b.indexOf("none")||0<=b.indexOf(".zip")||0<=b.indexOf(".svg")||0<=b.indexOf(".js"))return b;b=b.removeStartFrom("?")+"";b=window.isSupportWebp?0>b.indexOf("webp")?b+"?x-oss-process=image/format,webp":b+"?x-oss-process=image":b+("?x-oss-process=image/format,"+getWebpOriginFormat(b));if(!c||!d)return b;b+="/resize,h_"+parseInt(d)+",w_"+parseInt(c);switch(bookConfig.textClarityEnhancement){case 1:b+="/sharpen,100";break;case 2:b+="/sharpen,150";break;case 3:b+= "/sharpen,200"}return b}function animateOnce(b,c,d,e,f,g){if(b&&c)if(void 0==d||0===d||isIE9())b.css(c),e&&e instanceof Function&&e();else{var h=!1;setAnimation(b,d,f,g);b.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){1!=h&&(h=!0,setAnimation(b,0),e&&e instanceof Function&&e())});b.css(c)}} function setAnimation(b,c,d,e){if(b&&void 0!=c){100>c&&(c*=1E3);if(void 0==d||""==d)d="all";void 0==e&&(e="ease-in-out");e=d+" %dms "+e;0<c?"all"!=d?b.css({"-moz-transition":String.format(e,"-moz-",c),"-webkit-transition":String.format(e,"-webkit-",c),"-o-transition":String.format(e,"-o-",c),"-ms-transition":String.format(e,"-ms-",c),transition:String.format(e,"",c)}):b.css({"-moz-transition":String.format(e,c),"-webkit-transition":String.format(e,c),"-o-transition":String.format(e,c),"-ms-transition":String.format(e, c),transition:String.format(e,c)}):b.css({"-moz-transition":"","-webkit-transition":"","-o-transition":"","-ms-transition":"",transition:""})}} var Log=Class({statics:{level:1,isDebug:function(){return/debug=true/.test(window.location.href)},isPAD:function(){return 0<navigator.userAgent.toLowerCase().indexOf("pad")},logForPad:function(b,c){void 0==this.logDiv&&(this.logDiv=$("<div></div>"),this.logDiv.css({position:"absolute",width:"450px",height:"150px",top:"50px",overflow:"auto","z-index":"100000","background-color":"white"}),$("body")[0]&&$("body")[0].appendChild(this.logDiv[0]));b=$("<p>"+b+"</p>");b.css("color",c);this.logDiv.append(b); c=this.logDiv[0];c.scrollTop=c.scrollHeight},info:function(){if(this.isDebug()){_agent_.browser&&_agent_.browser.msie&&(arguments=[String.format.apply(this,arguments)]);try{console&&console.log&&console.log.apply(console,arguments)}catch(b){}this.logForPad(String.format.apply(this,arguments),"black")}},debug:function(){if(this.isDebug()&&!(3>this.level)){_agent_.browser&&_agent_.browser.msie&&(arguments=[String.format.apply(this,arguments)]);try{console&&console.debug&&console.debug.apply(console, arguments)}catch(b){}this.logForPad(String.format.apply(this,arguments),"blue")}},warn:function(){if(this.isDebug()&&!(2>this.level)){_agent_.browser&&_agent_.browser.msie&&(arguments=[String.format.apply(this,arguments)]);try{console&&console.warn&&console.warn.apply(console,arguments)}catch(b){}this.logForPad(String.format.apply(this,arguments),"#FFA042")}},error:function(){if(this.isDebug()&&!(4>this.level)){_agent_.browser&&_agent_.browser.msie&&(arguments=[String.format.apply(this,arguments)]); try{console&&console.error&&console.error.apply(console,arguments)}catch(b){}this.logForPad(String.format.apply(this,arguments),"red")}},print:function(){var b=String.format.apply(this,arguments),c=(new Date).format("hh:mm:ss.S");this.debug("[%s] %s",c,b)}}}),VERSION_NAME="6.4.9",BUILD_DATE="2024082301",BookType={normal_book:0,single_book:1,slide_book:3,singleSlide_book:6,catalog_book:7,singleCatalog_book:8},normalBookStatu={book_statu_ready:0,book_statu_auto_flip:1,book_statu_mouse_flip:2,book_statu_mag_flip:3}, singleBookStatu={book_statu_ready:0,book_statu_auto_flip:1,book_statu_mouse_flip:2,book_statu_mag_flip:3},bookCorner={top_left:0,top_right:1,bottom_left:2,bottom_right:3},BrowserType={WEBKIT:1,OPERA:1,MOZ:2,MS:3},Direction={left:"left",right:"right",top:"top",bottom:"bottom"},bookEvent={onCurrentPageIndexChanged:"BE_PIC",onCurrentPageIndexWillChange:"BE_PIWC",onNoNextPage:"BE_NNP",onNoPreviousPage:"BE_NPP"},PLUGIN_MAGNETICS="AbPIMagneticSlider",PLUGIN_ROTATE3D="AbPIRotationPhotoFor3D",PLUGIN_VIDEO1= "VideoPlayerExemple01",PLUGIN_VIDEO2="VideoPlayerExemple02",PLUGIN_CLASSAUDIO="",KEY_CODE_ENTER=13,KEY_CODE_LEFT=37,KEY_CODE_UP=38,KEY_CODE_RIGHT=39,KEY_CODE_DOWN=40,KEY_CODE_HOME=36,KEY_CODE_END=35,KEY_CODE_PAGEUP=33,KEY_CODE_PAGEDOWN=34,KEY_CODE_DELETE=46,KEY_CODE_F11=122,KEY_CODE_A=65,MOUSE_LEFT=1,MOUSE_MIDDLE=2,MOUSE_RIGHT=3,LOADING_WIDTH=30,LOADING_HEIGHT=30,COIL_PAGE_WIDTH=500,isTouchDevice=function(){navigator.userAgent.match(/mobile|tablet|ip(ad|hone|od)|android/i);return _agent_.browser.device== _agent_.browser.DEVICE_PHONE||isPad()};isTouch=isTouchDevice();var _event;_event=_agent_.browser.device==_agent_.browser.DEVICE_PHONE||isPad()?{_down:"touchstart",_move:"touchmove",_up:"touchend",_end:"touchend",_click:"touchend",_leave:"touchleave",_out:"touchleave",_enter:"touchstart",_mousewheel:"mousewheel",_over:"touchover"}:{_down:"mousedown",_move:"mousemove",_up:"mouseup",_end:"mouseup",_click:"click",_leave:"mouseleave",_out:"mouseout",_enter:"mouseenter",_mousewheel:"mousewheel",_over:"mouseover"}; _agent_.browser.mozilla&&(_event._mousewheel="DOMMouseScroll"); var WebScheme={HTTP:"http",HTTPS:"https",FTP:"ftp",MAILTO:"mailto",IDAP:"idap",FILE:"file",NEWS:"news",GOPHER:"gopher",TELNET:"telnet"},STR_XML_HEAD='<?xml version="1.0" encoding="utf-8"?>',SearchItemRelation={NEARBY:0,SPACE:1,DOUBLE_SPACE:2,RETURN:3},PageTextSelectMode={LINE:0,COLUMN:1},divHint=Class({create:function(b,c,d,e){this.instance=$("<div class='hint'></div>");this.setText(b);void 0==e&&(e=$("body"));e.append(this.instance);this.instance.css({display:"none",opacity:0});this.moveto(c,d); this.animation=!1;this.className="hint"},setAnimate:function(b){this.animation=b;1==b&&this.instance.css({"-moz-transition":"all 0.2s ease-in-out","-webkit-transition":"all 0.2s ease-in-out","-o-transition":"all 0.2s ease-in-out","-ms-transition":"all 0.2s ease-in-out",transition:"all 0.2s ease-in-out"})},setStyle:function(b){this.instance.removeClass(this.className);this.instance.addClass(b);this.className=b},setText:function(b){this.instance.html(b)},moveto:function(b,c){this.instance.css({left:b, top:c})},show:function(){this.instance.css({display:"block",opacity:1})},hide:function(){1==this.animation?this.instance.css({display:"none",opacity:0}):this.instance.css({display:"none",opacity:1})},destroy:function(){this.hide();this.instance.empty();this.instance.remove()},width:function(){return this.instance.width()+3*this.padding()},height:function(){return this.instance.height()+3*this.padding()},padding:function(){var b=this.instance.css("padding");return void 0==b||null==b||""==b?0:parseInt(b.replace("px", ""))},addClass:function(b){this.instance.addClass(b)}}); MiniStyle=Class({statics:{isMini:function(){if((isPhone()||isPad())&&!isInTheFrame()||!bookConfig.MiniStyle||fullScreenApi.isFullScreen()||NeatStyle.isNeat())return!1;var b=this.getMaxMiniWidthHeight();if(windowWidth>b.w&&windowHeight>b.h)return!1;this.init();return!0},getMaxMiniWidthHeight:function(){for(var b=bookConfig.maxWidthToSmallMode,c=bookConfig.maxHeightToSmallMode,d=window.location.search.split("&"),e=0;e<d.length;e++){var f=d[e].toLowerCase();0<=f.indexOf("maxwidthtosmallmode")&&(b=parseInt(f.substring(f.indexOf("maxwidthtosmallmode")+ 19+1,f.length)));0<=f.indexOf("maxheighttosmallmode")&&(c=parseInt(f.substring(f.indexOf("maxheighttosmallmode")+20+1,f.length)))}return{w:b,h:c}},init:function(){if(!bookConfig.hideMiniFullscreen){if(isPhone()||isPad())if(window.self!==window.top){var b=window.innerHeight,c=window.screen.height,d=0;try{d=window.top.innerHeight}catch(e){d=0}if(70<=100*(d?b/d:b/c)||window.location.href.includes("bookcase"))return}else return;this.caption||(this.caption=$("<div class='clickToRead'></div>"),this.caption.html(getLanguage("lblFullscreen", "Click to view in fullscreen.")),tmpContainer.append(this.caption),this.initEvent())}},initEvent:function(){this.caption.bind(_event._end,function(){this.isMini()&&readAsFullscreen()}.bind(this))},hide:function(){this.caption&&this.caption.hide()},show:function(){this.caption&&this.caption.show()},destroy:function(){this.caption&&(this.caption.remove(),this.caption=void 0)}}}); var NeatStyle=Class({statics:{isNeat:function(){return!bookConfig.isNeat||this.full||fullScreenApi.isFullScreen()?!1:!0},init:function(){this.neatConfig||(this.neatConfig={topMargin:bookConfig.topMargin,bottomMargin:bookConfig.bottomMargin},this.menu=$("<div id='menu' class='neat_menu' style='position:absolute;width:100%;height:42px;z-index:98;bottom:0;'></div>"),tmpContainer.append(this.menu),this.mainColor=Color(bookConfig.toolbarColor),this.iconColor=Color(bookConfig.iconColor),this.visible=!1, this.initLogo(),this.initFullscreenButton(),this.initZoomButton(),this.initFlipShotButton(),this.initSlider(),this.initPageNumber())},initFullscreenButton:function(){this.button=$("<div><img title='"+getLanguage("viewFullScreen","\u93cc\u30e7\u6e45\u934f\u3125\u7746")+"' src='"+uiBaseURL+"NeatFullscreen.svg'/></div>");this.button.css({position:"absolute",bottom:"0px",left:"auto",top:"auto",cursor:"pointer","z-index":"100",width:"42px",height:"42px",right:"9px"});this.button.find("img").css({position:"absolute", left:"12px",top:"12px",width:"18px",height:"18px"});this.button.bind(_event._down,function(b){b.stopPropagation()});this.button.click(function(){this.isNeat()&&(isPhone()||isPad()?(window.parent.postMessage({command:"full"},"*"),this.full=!0):readAsFullscreen())}.bind(this));tmpContainer.append(this.button)},initZoomButton:function(){this.zoomButton=new NeatZoomButton;this.zoomButton.addTo(tmpContainer)},initLogo:function(){this.isShowLogo&&bookConfig.appLogoIcon&&""!=bookConfig.appLogoIcon&&(this.logo= $("<img id='neatLogo' src='"+bookConfig.appLogoIcon+"'/>"),this.logo.css({position:"absolute",left:bookConfig.logoPadding+"px",top:bookConfig.logoTop+"px",height:bookConfig.logoHeight+"px",cursor:"pointer","z-index":"3","-webkit-filter":"drop-shadow(0 0 2px #000)",filter:"drop-shadow(0 0 2px #000)"}),bookConfig.appLogoLinkURL&&this.logo.click(function(){BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"logoImage","logo"]);var b=getAppLogoLinkURL();window.open(b,bookConfig.appLogoOpenWindow); return!1}),tmpContainer.append(this.logo))},hideLogo:function(){this.logo&&(this.logo.hide(),this.isShowLogo=!1)},exitFullscreen:function(){this.full=!1},initFlipShotButton:function(){this.pagePrevButton=$("<div class='btn' style='display:none;'><div class='svg-box'></div><img class='unSelect' src='"+uiBaseURL+"previousPage.svg' style='width:40px;height:40px;margin:0px;'/></div>");this.pageNextButton=$("<div class='btn' style='display:none;'><div class='svg-box'></div><img class='unSelect' src='"+ uiBaseURL+"nextPage.svg' style='width:40px;height:40px;margin:0px;'/></div>");this.pagePrevButton.css({position:"absolute",width:"40px",height:"40px",top:"50%",left:"0","z-index":"11",transform:"translate(0%,-50%)",cursor:"pointer"});this.pageNextButton.css({position:"absolute",width:"40px",height:"40px",top:"50%",right:"0","z-index":"11",transform:"translate(0%,-50%)",cursor:"pointer"});this.pagePrevButton.bind(_event._end,function(){rightToLeft?nextPageFun("phone goto button"):previousPageFun("phone goto button"); BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"prev",getLanguage("btnPrePage","Previous")]);return!1});this.pageNextButton.bind(_event._end,function(){rightToLeft?previousPageFun("phone goto button"):nextPageFun("phone goto button");BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"next",getLanguage("btnNextPage","Next")]);return!1});tmpContainer.append(this.pagePrevButton);tmpContainer.append(this.pageNextButton)},initPageNumber:function(){this.inputButton=$("<div class='inputButton' \n\t\t\tstyle='display:inline-block;text-shadow:0 0 2px #000;max-width:110px;line-height:42px;color:#fff;text-align:center;'>\n\t\t\t<input value='/' \n\t\t\tstyle='line-height:42px;height:42px;color:#fff;text-align:center;width:100%;background:none;border:none;padding:0;margin:0;text-shadow:0 0 2px #000;font-size:16px;' class='currentPageIndexTextField' type='text'/>\n\t\t\t</div>"); this.menu.append(this.inputButton)},initSlider:function(){var b=isPhone()||isPad()?180:220;this.slider=new Slider({parent:this.menu,width:windowWidth-b,height:6,pointerWidth:10,totalPercent:bookConfig.totalPageCount})},refreshSlider:function(){try{var b=BookInfo.getCurrentPageIndex();this.slider.refreshSlider(b);this.inputButton.find("input").val(getShownPageNumberInfo(b))}catch(c){}},initEvent:function(){},hide:function(){try{this.visible&&(this.visible=!1,this.logo&&this.logo.hide(),this.button&& this.button.hide(),this.zoomButton&&this.zoomButton.$button.hide(),this.pagePrevButton&&this.pagePrevButton.hide(),this.pageNextButton&&this.pageNextButton.hide(),this.menu&&this.menu.hide())}catch(b){}},show:function(){try{this.visible||(this.visible=!0,this.logo&&this.logo.show(),this.button&&this.button.show(),this.zoomButton&&this.zoomButton.$button.show(),this.pagePrevButton&&this.pagePrevButton.show(),this.pageNextButton&&this.pageNextButton.show(),this.menu&&this.menu.show())}catch(b){}},destroy:function(){try{this.logo.remove(), this.button.remove(),this.zoomButton.remove(),this.pagePrevButton.remove(),this.pageNextButton.remove(),this.menu.remove()}catch(b){}},onResize:function(b,c){try{var d=isPhone()||isPad()?180:200;if(this.slider)this.slider.onResize(b-d,c)}catch(e){}},resetNeatBottomBar:function(b){var c;null==(c=this.menu)||c.css({bottom:b+"px"});var d;null==(d=this.zoomButton)||d.$button.css({bottom:b+"px"});var e;null==(e=this.button)||e.css({bottom:b+"px"})}}}),LoadingBook=Class({create:function(b,c){this.parent= b;this.isReady=!1;this.backgroundColor||(this.backgroundColor="#1F2232")},chooseBookStyle:function(){var b=this.getBookTye();"normal_book"==b?this.init():this.initBookStyle(b)},initBookStyle:function(b){switch(b){case "slide_book":bookConfig.FlipDirection?windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage||"double"==bookConfig.showDoublePage?this.setBookTye(BookType.slide_book):this.setBookTye(BookType.singleSlide_book):windowWidth>windowHeight&&"auto"==bookConfig.showDoublePage||"double"== bookConfig.showDoublePage?this.setBookTye(BookType.slide_book):this.setBookTye(BookType.singleSlide_book);initBookFrame();break;case "flip_book":bookType=bookConfig.FlipDirection?windowWidth<windowHeight&&"auto"==bookConfig.showDoublePage||"double"==bookConfig.showDoublePage?BookType.normal_book:BookType.single_book:windowWidth>windowHeight&&"auto"==bookConfig.showDoublePage||"double"==bookConfig.showDoublePage?BookType.normal_book:BookType.single_book;initBookFrame();break;case "catalog_book":bookType= BookType.catalog_book,initBookFrame()}this.isReady=!0},getBookTye:function(){var b="normal_book";if("slide"==bookConfig.FlipStyle.toLowerCase()||isBelowIE9())b="slide_book";"flip"!=bookConfig.FlipStyle.toLowerCase()||isBelowIE9()||(b="flip_book");""!=bookConfig.FlipStyle||isBelowIE9()||(b="flip_book");"catalog"!=bookConfig.FlipStyle.toLowerCase()||isBelowIE9()||(b="catalog_book");return b},setBookTye:function(b){window.bookType=b},init:function(){this.container=$("<div class='book_style_choose_container'></div>"); this.bookStyleBox=$("<div class='book_style_box'></div>");this.container.css({"background-color":this.backgroundColor});this.parent.append(this.container);this.container.append(this.bookStyleBox);this.initBookStyleBox()},initBookStyleBox:function(){this.title=$("<p class='title'></p>");this.description=$("<p class='description'></p>");this.bookModelBox=$("<div class='book_style_model_box'></div>");this.flipModel=$("<div class='flipModel book_style_model_item'></div>");this.slideModel=$("<div class='slideModel book_style_model_item'></div>"); var b=$("<img class='book_style_model_img' src='"+uiBaseURL+"pc.png'/>"),c=$("<img class='book_style_model_img' src='"+uiBaseURL+"tablet.png'/>"),d=$("<span class='book_style_model_title' >For PC</span>"),e=$("<span class='book_style_model_title'>For Tablet</span>"),f=$("<span class='book_style_model_description' >"+getLanguage("lblSimulatePageFlip","Chinese"==UserGroups?"\u6d60\u8de8\u6e61\u7f08\u5a5a\u3009":"Simulate page-flipping on a computer")+"</span>"),g=$("<span class='book_style_model_description' >"+ getLanguage("lblSimulatePageSlide","Chinese"==UserGroups?"\u7f01\u5fd3\u5400\u5a4a\u6226\u3009":"Tailor to the sliding habits on a tablet")+"</span>");this.flipModel.append(b);this.slideModel.append(c);this.flipModel.append(d);this.slideModel.append(e);this.flipModel.append(f);this.slideModel.append(g);this.bookStyleBox.append(this.title);this.bookStyleBox.append(this.description);this.bookModelBox.append(this.flipModel);this.bookModelBox.append(this.slideModel);this.bookStyleBox.append(this.bookModelBox); this.title.html(window.document.title);this.description.html(getLanguage("lblSelectMode","Chinese"==UserGroups?"\u7487\u70fd\u20ac\u590b\u5ae8\u93c4\u5267\u305a\u93c2\u7470\u7d21":"Select View Mode Please.")+"(10)");this.initEvent()},initEvent:function(){this.flipModel.bind(_event._end,function(){window.clearInterval(this.inteval);this.destroy();this.initBookStyle("flip_book")}.bind(this));this.slideModel.bind(_event._end,function(){window.clearInterval(this.inteval);this.destroy();this.initBookStyle("slide_book")}.bind(this)); this.initInterval()},initInterval:function(){var b=10,c=getLanguage("lblSelectMode","Chinese"==UserGroups?"\u7487\u70fd\u20ac\u590b\u5ae8\u93c4\u5267\u305a\u93c2\u7470\u7d21":"Select View Mode Please.");this.inteval=window.setInterval(function(){this.description.html(c+"("+b+")");b--;0>=b&&(window.clearInterval(this.inteval),this.destroy(),this.initBookStyle("flip_book"))}.bind(this),1E3)},onResize:function(){},destroy:function(){this.container&&(this.container.hide(),this.container.remove(),this.slideModel= this.flipModel=this.bookStyleBox=this.container=void 0)}});bdor[22]="l";bdor[5]="a";bdor.y="y"; Class("initBackground",{backgroundImage:null,create:function(b){var c=$("#bacgradient");if(c[0]){this.bg=c;try{this.backgroundImage=$($("#bacgradient").children()[1]),$("#bacgradient").children()[1].style["background-image"]||this.resetBgImg()}catch(d){}}else this.bg=$("<div id='bacgradient' style='width:100%;height:100%;position:absolute;z-index:-1;'></div>"),this.bgColor=$("<div style='width:100%;height:100%;position:absolute;z-index:0;'></div>"),b.append(this.bg),this.bg.append(this.bgColor),this.resetBgColor(), this.resetBgImg();window.top!=window&&(this.bg.css("opacity",bookConfig.backgroundOpacity/100),$(document).bind(fullScreenApi.fullScreenEventName,this.onFullscreen.bind(this)));bdor[66]="ipht";this.addDynamicBackground();this.addBookPlugin();this.addSlideShow();this.slideShow&&b.append(this.slideShow);this.initEvent();document.getElementById("tmpLoading")&&(document.getElementById("tmpLoading").style.display="none")},resetBgColor:function(){this.gAngle=-(bookConfig.bgMRotation%360);this.gColorA=getColor("bgBeginColor", "#a93268");this.gColorB=getColor("bgEndColor","#588643");if(_agent_.browser.msie){var b=Math.floor(parseInt(-this.gAngle)/90);0>b&&(b+=4);var c=0;0==b%2&&(c=1);var d=this.gColorA,e=this.gColorB;1<b&&(b=d,d=e,e=b);this.bgColor.css({filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType="+c+", EndColorStr="+e+", StartColorStr="+d+");"})}this.bg.css("opacity",bookConfig.backgroundOpacity/100);this.setRadiusColor()},resetBgImg:function(){var b=this,c=changeBookResourceBaseURL(bookConfig.backGroundImgURL); c?(this.bgImg=$('<img src="'+c+'" />'),this.bgImg.on("load",function(){b.initBackgroundPosition();b.backgroundImage&&0!==b.backgroundImage.length||(b.backgroundImage=$("<div style='width:100%;height :100%;position : absolute;z-index : 1;'></div>"),b.bg.append(b.backgroundImage));b.backgroundImage.css({"background-image":"url("+c+")","background-position":"center center","background-repeat":b.backgroundRepeat,"background-size":b.backgroundSize})}),this.initBackgroundPosition()):this.backgroundImage&& this.backgroundImage[0].style["background-image"]&&this.backgroundImage.css({"background-image":"none"})},initBackgroundPosition:function(){this.backgroundSize="100% 100%";this.backgroundRepeat="no-repeat";switch(bookConfig.backgroundPosition.toLowerCase()){case "stretch":this.backgroundSize="100% 100%";this.backgroundRepeat="no-repeat";break;case "fill":this.backgroundSize="cover";this.backgroundRepeat="no-repeat";break;case "fit":this.backgroundSize="contain";this.backgroundRepeat="no-repeat";break; case "tile":this.backgroundSize="auto",this.backgroundRepeat="repeat"}},onFullscreen:function(){fullScreenApi.isFullScreen()?this.bg.css("opacity",1):this.bg.css("opacity",bookConfig.backgroundOpacity/100)},compute:function(b,c,d){d=d*Math.PI/180;return Point(Math.abs(c*Math.sin(d))+Math.abs(b*Math.cos(d)),Math.abs(c*Math.cos(d))+Math.abs(b*Math.sin(d)))},initEvent:function(){var b=Math.floor(255*Math.random()),c=Math.floor(255*Math.random()),d="rgb("+b+","+b+","+b+")",e="rgb("+c+","+c+","+c+")"; bookContainer.bind(_event._down,function(f){f=f.originalEvent.changedTouches?f.originalEvent.changedTouches:[f];var g=void 0==this.doorStas?8:this.doorStas,h=windowWidth-f[0].pageX,k=windowHeight-f[0].pageY;43>f[0].pageX&&52>f[0].pageY&&8===g&&(this.doorStas=9);60>h&&39>k&&9===g&&(f=$("<div>"+skin[300]+skin[12]+"l"+skin[66]+skin.m+skin.i(22)+skin[42]+skin[60]+"</div>"),g=$("<div>"+skin[300]+skin.y+String.fromCharCode(117)+"n"+skin[11]+skin[26]+skin.i(5)+String.fromCharCode(110)+365+skin[60]+"</div>"), bookContainer.append(f),bookContainer.append(g),h=Math.floor(100*Math.random()),f.css({position:"absolute",top:h+"px",color:d}),g.css({position:"absolute",top:h+30+Math.floor(100*Math.random())+"px",color:e}),this.doorStas=8)}.bind(this))},addBookPlugin:function(){if(!isPhone()){if(window.bookPlugin&&bookPlugin.properties){var b={type:bookPlugin.name,opacity:bookPlugin.opacity,controls:!0,style:bookPlugin.properties.basic};$.extend(b,bookPlugin.properties.extended);window.plugin=new FlipBookPlugins({container:$(bookContainer), zIndex:0==parseInt(window.bookPlugin.layout)?10:0,plugins:[b]})}resizePlugin()}},addSlideShow:function(){if(isPhone()||"English"!=UserGroups){var b=parseInt(_get(global,"staticAd.adPosition",1));if(window.staticAd&&window.staticAd.haveAd&&0<window.staticAd.data.length&&[1,2,3].includes(b)){this.slideShow=$("<div class='slideShow' style='position:absolute;z-index:1002;'></div>");switch(b){case 1:this.slideShow.css({bottom:"0px",width:"100%"});break;case 2:this.slideShow.css({top:"22px",width:"100%"}); break;case 3:b=parseInt(_get(global,"staticAd.top",50));var c=parseInt(_get(global,"staticAd.left",50)),d=parseInt(_get(global,"staticAd.width",50)),e=parseInt(_get(global,"staticAd.height",50));this.slideShow.css({top:b+"%",left:c+"%",width:d+"%",height:e+"%"})}b=window.staticAd.bgColor?window.staticAd.bgColor:"#fff";c=window.staticAd.bgOpacity?window.staticAd.bgOpacity:0;b=(new Color(b)).rgba(c);this.slideShow.css("background",b);window.staticAd.bgColor||this.slideShow.css("z-index","auto");window.addSlideShow= new SliderShowAd(this.slideShow,window.staticAd)}}},addDynamicBackground:function(){if(bookConfig.backgroundScene&&"None"!=bookConfig.backgroundScene&&!isBelowIE9()){var b=$("<div></div>");b.css({width:"100%",height:"100%",position:"absolute","z-index":2});this.bg.append(b);DynamicBackground.create({name:bookConfig.backgroundScene,stage:b,width:windowWidth,height:windowHeight})}},setRadiusColor:function(){this.gColorA===this.gColorB?this.bgColor.css({background:this.gColorA}):this.bgColor.css({"background-image":_agent_.browser.prefix+ "linear-gradient("+this.gAngle+"deg, "+this.gColorA+", "+this.gColorB+")"})}}); var resizePlugin=function(){BookInfo.isDoublePage()&&window.plugin&&window.plugin.show();!BookInfo.isDoublePage()&&window.plugin&&window.plugin.hide()},ImageObject=Class({create:function(){this.$image=$("<img/>")},css:function(b){b&&(this.$image.css(b),void 0!=b.width&&this.$image.attr("width",b.width),void 0!=b.height&&this.$image.attr("height",b.height))},load:function(b){b&&(this.$image[0].onload=b)},src:function(b){void 0!=b&&null!=b&&this.$image.attr("src",b)},alt:function(b){void 0!=b&&null!= b&&this.$image.attr("alt",b)},attr:function(b,c){void 0!=b&&null!=b&&void 0!=c&&null!=c&&this.$image.attr(b,c)},destroy:function(){this.$image=this.$image[0].onload=null},hide:function(){this.$image.hide()},show:function(){this.$image.show()}}),InputObject=Class({create:function(){this.$image=$("<img/>")},css:function(b){this.$image.css(b)},load:function(b){b&&(this.$image[0].onload=b)},src:function(b){void 0!=b&&null!=b&&this.$image.attr("src",b)},alt:function(b){void 0!=b&&null!=b&&this.$image.attr("alt", b)}});Class("StateSynchronous",{buttons:null,statics:{instance:function(){this.synchroner||(this.synchroner=new StateSynchronous);return this.synchroner}},create:function(){this.buttons=new ObjectPool},registButton:function(b){this.buttons.add(b)},findButtons:function(b,c){return c?this.buttons.find(b):this.buttons.match(b)},reportChanged:function(b){this.buttons.match(b.getClassName()).each(function(c){c!=b&&c.setStatusQuietly(b.getStatus())})}}); Class("ToolbarStateButton",{status:-1,getFunctionName:function(b){var c=this.getClass().prototype,d;for(d in c)if(b==c[d])return d},bindStates:function(){this.states=[];for(var b=0;b<arguments.length;b++){var c=arguments[b],d=this.getFunctionName(c);this[d]=function(e,f){return function(){this.status!=f&&(this.status=f,e.apply(this,arguments),StateSynchronous.instance().reportChanged(this))}}(c,b);this.states[b]=d}StateSynchronous.instance().registButton(this)},setStatus:function(b){(b=this[this.states[b]])&& b.apply(this)},setStatusQuietly:function(b){if(this.status!=b){var c=this.getClass().prototype[this.states[b]];c&&(this.status=b,c.apply(this))}},getStatus:function(){return this.status},onClick:virtual_function,initLanguage:function(){this.language=[];for(var b=0;b<arguments.length;b++){var c=arguments[b],d;for(d in c)this.language.push({key:d,defaultValue:c[d]})}},changeLanguage:function(){if(this.language){var b=this.language[this.status];b=getLanguage(b.key,b.defaultValue);this.setCaption(b)}}}).extend("ToolbarButton"); Class("ZoomButton",{create:function(){this._super();this.bindStates(this.setAsZoomin,this.setAsZoomout);this.initLanguage({btnZoomIn:"Zoom In"},{btnZoomOut:"Zoom Out"});this.setAsZoomin()},setAsZoomin:function(){this.setSrc("ZoomIn",bookConfig.ZoomInButtonIcon);this.changeLanguage();this.changeColor()},setAsZoomout:function(){this.setSrc("ZoomOut",bookConfig.ZoomOutButtonIcon);this.changeLanguage();this.changeColor()},executeZoomout:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/ 2,pageY:windowHeight/2}]});auto_player.isPlaying()&&auto_player.stop()},executeZoomin:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]});auto_player.isPlaying()&&auto_player.stop()},zoomout:function(){this.executeZoomout();this.setAsZoomin()},zoomin:function(){this.executeZoomin();this.setAsZoomout()},onClick:function(b){BookInfo.isZoomming()||(BookInfo.zoomStatus()?this.zoomout():this.zoomin())}}).extend("ToolbarStateButton"); Class("AutoPlayButton",{create:function(){this._super();this.bindStates(this.setAsStart,this.setAsStop);this.initLanguage({btnAutoFlip:"Auto Flip"},{btnStopAutoFlip:"Stop Auto Flip"});this.setAsStart()},setAsStart:function(){this.setSrc("autoPlay",bookConfig.AutoPlayStartButtonIcon);this.changeLanguage();this.changeColor()},setAsStop:function(){this.setSrc("stopAutoPlay",bookConfig.AutoPlayStopButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){auto_player&&(auto_player.isPlaying()? auto_player.stop():auto_player.start())}}).extend("ToolbarStateButton"); Class("FullscreenButton",{create:function(){this._super();this.bindStates(this.setAsFullScreen,this.setAsExitFullScreen);this.initLanguage({btnFullscreen:"Fullscreen"},{btnExitFullscreen:"Exit Fullscreen"});this.setAsFullScreen()},setAsFullScreen:function(){this.setSrc("fullscreen",bookConfig.FullscreenButtonIcon);this.changeLanguage();this.changeColor()},setAsExitFullScreen:function(){this.setSrc("exitFullscreen",bookConfig.ExitFullscreenButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){readAsFullscreen()}}).extend("ToolbarStateButton"); Class("WeChatShareButton",{create:function(){this._super();this.bindStates(this.setWeChatShare);this.initLanguage({btnWeCharShare:"WeChat Share"});this.setWeChatShare();this.$button.attr("title","")},setWeChatShare:function(){this.setSrc("wechat",bookConfig.WeChatShareButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){},addEvents:function(){this._super();this.onMouseEnter()},onMouseEnter:function(){this.$button.bind("mouseenter",function(b){b.stopPropagation();b.preventDefault(); global.WeChatShareImg.visible=!0;global.WeChatShareImg.show({left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()})}.bind(this));this.$button.bind("mouseleave",function(b){global.WeChatShareImg.visible=!1;setTimeout(function(){global.WeChatShareImg.visible||global.WeChatShareImg.hide()}.bind(this),200)}.bind(this))}}).extend("ToolbarStateButton"); Class("TelephoneNumberButton",{create:function(){this._super();this.bindStates(this.setTelephoneNumber);this.initLanguage({btnPhoneNumber:"phone"});this.setTelephoneNumber();this.$button.attr("title","")},setTelephoneNumber:function(){this.setSrc("phone",bookConfig.PhoneButtonIcon);this.changeLanguage();this.changeColor()},onClick:function(){},addEvents:function(){this._super();this.onMouseEnter()},onMouseEnter:function(){this.$button.bind("mouseenter",function(b){b.stopPropagation();b.preventDefault(); global.PcTelephoneNumberFrame.visible=!0;global.PcTelephoneNumberFrame.show({left:b.pageX-b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()})}.bind(this));this.$button.bind("mouseleave",function(b){global.PcTelephoneNumberFrame.visible=!1;setTimeout(function(){global.PcTelephoneNumberFrame.visible||global.PcTelephoneNumberFrame.hide()}.bind(this),200)}.bind(this))}}).extend("ToolbarStateButton"); Class("BackgroundSoundButton",{create:function(){this._super();this.soundBtnState=bookConfig.FlipSound||bookConfig.BackgroundSoundURL;this.bindStates(this.setAsSoundOn,this.setAsSoundOff);this.initLanguage({btnSoundOn:"Sound On"},{btnSoundOff:"Sound Off"});this.changeSoundBtnState()},changeSoundBtnState:function(){this.soundBtnState?this.setAsSoundOn():this.setAsSoundOff()},setAsSoundOn:function(){this.setSrc("soundOn",bookConfig.BackgroundSoundButtonOnIcon);this.changeLanguage();this.changeColor(); this.soundBtnState=!0},setAsSoundOff:function(){!isPhone()&&!isPad()&&bookConfig.BackgroundSoundURL&&bookConfig.FlipSound&&bookConfig.BackgroundSoundButtonVisible||(this.setSrc("soundOff",bookConfig.BackgroundSoundButtonOffIcon),this.changeLanguage(),this.changeColor(),this.soundBtnState=!1)},onClick:function(){bookConfig.BackgroundSoundURL||window.mulEditorInfo&&window.mulEditorInfo.hasMusic?settingBody&&settingBody.showOrHide():bookConfig.BackgroundSoundURL?isPlaying?global.bgSound.pause():global.bgSound.play(): (global.flipSoundIsPlaying=!global.flipSoundIsPlaying,global.flipSoundIsPlaying?this.setAsSoundOn():this.setAsSoundOff())},addEvents:function(){this._super();this.onMouseEnter()},onMouseEnter:function(){bookConfig.BackgroundSoundURL&&(this.$button.bind("mouseenter",function(b){b&&"CANVAS"==b.target.tagName.toUpperCase()||setTimeout(function(){if(isFirefox()){var c=getOffset(b);volumeControlBar.show({left:b.pageX-c.X,top:b.pageY-c.Y,width:$(b.target).width(),height:$(b.target).height()})}else volumeControlBar.show({left:b.pageX- b.offsetX,top:b.pageY-b.offsetY,width:$(b.target).width(),height:$(b.target).height()})},200)}.bind(this)),this.$button.bind("mouseleave",function(b){setTimeout(function(){volumeControlBar.visible||volumeControlBar.hide()},200)}.bind(this)))}}).extend("ToolbarStateButton"); Class("SelectTextButton",{create:function(){this._super();this.bindStates(this.setAsUnSelect,this.setAsSelect);this.initLanguage({btnSelectText:"Select Text"},{btnSelectText:"Select Text"});this.setAsUnSelect()},setAsSelect:function(){this.setSrc("text",bookConfig.SelectTextButtonIcon);this.changeColor("#bdc5e9");this.changeLanguage()},setAsUnSelect:function(){this.setSrc("text",bookConfig.SelectTextButtonIcon);this.changeColor();this.changeLanguage()},select:function(b){var c,d,e,f,g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){switch(n.nextAddress){case 1:c= BookInfo.getCurrentPages(),d=0;case 2:if(!(d<c.length)){n.jumpTo(4);break}e=getSearchRealPageIndex(c[d]);if(-1==e){n.jumpTo(3);break}f=!1;for(g=0;g<positionForPages.length;g++)if(positionForPages[g]&&positionForPages[g].page&&positionForPages[g].page==e){f=!0;break}if(f){n.jumpTo(3);break}h=String.format(bookConfig.searchPositionJS,e);1<e&&(h=h.replace("[1]","["+e+"]"));k=/\.*\/?(\w+\/)*\w+(\[|\()?\d+(\]|\))?\.js/gi;l=/\.*\/?(\w+\/)*\w+?\.js/gi;if(!h.match(k)&&!h.match(l)){n.jumpTo(4);break}return n.yield(getArticleImage(fixURLValue(h)), 6);case 6:h=n.yieldResult,loadJavascript(h,function(){},function(){});case 3:d++;n.jumpTo(2);break;case 4:BookInfo.getBook()&&BookInfo.getBook().select(),n.jumpToEnd()}})},unSelect:function(){BookInfo.getBook()&&BookInfo.getBook().unSelect()},onClick:function(){BookInfo.getBook()&&BookInfo.getBook().flipping||(this.status?(this.setAsUnSelect(),this.unSelect(),this.status=0):(this.setAsSelect(),this.select(),this.status=1))}}).extend("ToolbarStateButton"); Class("MunuZoomButton",{create:function(){this._super()},changeColor:function(){this.changeIconColor("#333");this.changeCaptionColor("#333")}}).extend("ZoomButton");Class("MunuFullscreenButton",{create:function(){this._super()},changeColor:function(){this.changeIconColor("#333");this.changeCaptionColor("#333")}}).extend("FullscreenButton"); Class("MagnifierButton",{create:function(){this._super();this.bindStates(this.setAsZoomin,this.setAsZoomout);this.initLanguage({btnMagnifierIn:"Magnifier In"},{btnMagnifierOut:"Magnifier Out"});this.setAsZoomin()},setAsZoomin:function(){!bookConfig.MagnifierButtonVisible||global.magnifierZoomBox||global.isBelowIE11()||(global.magnifierZoomBox=new PageItem.WindowMagnifierBox(tmpContainer));this.setSrc("magnifier",bookConfig.MagnifierButtonIcon);this.changeLanguage();this.changeColor();global.canMagnifierZoom= !1},setAsZoomout:function(){this.setSrc("magnifier",bookConfig.MagnifierButtonIcon);this.changeLanguage();this.changeColor("#bdc5e9");global.canMagnifierZoom=!0},magnifierZoom:function(){BookInfo.getBook()&&BookInfo.getBook().magnifierZoom()},unMagnifierZoom:function(){BookInfo.getBook()&&BookInfo.getBook().unMagnifierZoom()},onClick:function(b){BookInfo.getBook().status_zoom||(global.canMagnifierZoom?(this.setAsZoomin(),this.unMagnifierZoom()):(this.setAsZoomout(),this.magnifierZoom()))}}).extend("ToolbarStateButton"); var FormInfo=Class({statics:{getFormCssClassName:function(b,c){if(!b)return"";b=b.toLowerCase();return c?b+"_form_phone":b+"_form"},getFormTitle:function(b){if(!b)return"";b=b.toLowerCase();switch(b){case "about":return getLanguage("btnAbout","About");case "bookmark":return getLanguage("frmBookMark","Bookmark");case "help":return getLanguage("btnHelp","Help");case "language":return getLanguage("btnLanguage","Language change");case "print":return getLanguage("frmPrintCaption","Print");case "search":return getLanguage("frmSearch", "Search");case "setting":return getLanguage("btnSettings","Settings");case "share":return getLanguage("frmShareCaption","Share");case "tableofcontent":return getLanguage("frmToc","Table of Contents");case "thumbnail":return getLanguage("btnThumb","Thumbnail");case "videogallery":return getLanguage("frmVideoTitle","Video");case "tel":return getLanguage("frmTelephone","Tel");case "download":return getLanguage("btnDownload","Download")}},getFormFavicon:function(b){if(!b)return"";b=b.toLowerCase();switch(b){case "about":return this.getSrc("about", bookConfig.AboutButtonIcon);case "bookmark":return this.getSrc("bookmark",bookConfig.BookmarkButtonIcon);case "help":return this.getSrc("Help",bookConfig.HelpButtonIcon);case "language":return this.getSrc("languageChange",bookConfig.LanguageButtonIcon);case "print":return this.getSrc("print",bookConfig.PrintButtonIcon);case "search":return this.getSrc("search",bookConfig.SearchButtonIcon);case "setting":return"";case "share":return this.getSrc("sharethis",bookConfig.ShareButtonIcon);case "tableofcontent":return this.getSrc("tableOfContent", bookConfig.TableOfContentButtonIcon);case "thumbnail":return this.getSrc("thumbnails",bookConfig.ThumbnailButtonIcon);case "videogallery":return this.getSrc("videoGallery",bookConfig.VideoButtonIcon);case "tel":return"";case "download":return this.getSrc("download",bookConfig.DownloadButtonIcon)}},getSrc:function(b,c){return c&&""!=c?c:toolbar_icons&&toolbar_icons[b]?"data:image/png;base64,"+toolbar_icons[b]:uiBaseURL+b+".png"}}}),FormFrame=Class({parent:void 0,rightToLeft:!1,visible:!1,formType:"", mainColor:"",fontColor:"",mainColorObj:null,fontColorObj:null,elements:null,closeUrl:"",create:function(b){this.options=b;this.parent=this.options.parent;this.formType=this.options.formType;this.rightToLeft=this.options.rightToLeft;this.isPhone=this.options.isPhone;this.initColorConfig()},onCreate:function(){},resetFormColor:function(){this.initColorConfig();this.resetIconSrc();this.resetColorChanged();this.visible&&this.changeIconColor();this.initColorCss&&this.initColorCss();this.resetFormItems&& this.resetFormItems()},initColorConfig:function(){this.formOpacity=bookConfig.formBackgroundOpacity?bookConfig.formBackgroundOpacity:bookConfig.ToolBarAlpha;this.mainColor=Color(bookConfig.formBackgroundColor?bookConfig.formBackgroundColor:bookConfig.toolbarColor).toString();this.fontColor=Color(bookConfig.formFontColor?bookConfig.formFontColor:bookConfig.iconColor).toString();this.mainColorObj=Color(this.mainColor);this.fontColorObj=Color(this.fontColor)},resetColorChanged:function(){this.close&& (this.close.find("img")[0]?this.close.find("img")[0].colorChanged=!1:this.close[0].colorChanged=!1);this.favicon&&(this.favicon[0].colorChanged=!1)},resetIconSrc:function(){FormInfo.getFormFavicon(this.formType)&&this.favicon&&this.favicon.attr("src",FormInfo.getFormFavicon(this.formType));this.close.find("img")[0]?this.close.find("img").attr("src",this.closeUrl):this.close.attr("src",this.closeUrl)},changeIconColor:function(){this.close&&this.close.changeButtonColor(this.fontColor);this.favicon&& this.favicon.changeButtonColor(this.fontColor)},setStyle:function(b){this.stage.css(b)},getShowStatu:function(){return this.visible},showOrHide:function(){this.visible?this.hide():this.show()},show:function(){this.visible=!0;this.stage.show();this.onShow()},hide:function(){this.visible=!1;this.stage.hide();this.onHide()},onShow:function(){this.changeIconColor()},onHide:function(){},onResize:function(){},destroy:function(){},changeLanguage:function(){this.elements&&this.elements.changeLanguage();this.title&& this.title.find("span").html(FormInfo.getFormTitle(this.formType))}}),FadeOutFadeForm=Class({create:function(b){this._super(b);this.closeUrl=window.form_icons&&form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.stage=$("<div class='"+FormInfo.getFormCssClassName(this.formType,this.isPhone)+"'></div>");this.title=$("<p class='form_title'></p>");FormInfo.getFormTitle(this.formType)&&this.title.append($("<span>"+FormInfo.getFormTitle(this.formType)+"</span>"));FormInfo.getFormFavicon(this.formType)&& (this.favicon=$("<img alt='favicon' width='auto' height='auto' class='favicon' src='"+FormInfo.getFormFavicon(this.formType)+"'/>"));this.close=$("<img alt='close' width='auto' height='auto' class='close' src='"+this.closeUrl+"'/>");this.rightToLeft&&this.stage.addClass("rightToLeft");this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.stage.appearance("",function(){this.visible=!1;this.onHideAppearance()}.bind(this));this.parent.append(this.stage.getDom());this.title&&this.title.css({cursor:"default"}); this.hide()},initEvent:function(){this.stage.drag();this.stage.bind(_event._down,function(b){b.stopPropagation()});this.close.bind("click",this.hide.bind(this));this.close.bind("mouseenter",function(){this.close.css({background:"rgba(255,255,255,0.25)"})}.bind(this));this.close.bind("mouseleave",function(){this.close.css({background:""})}.bind(this))},initHtml:virtual_function,onHide:function(){},onHideAppearance:function(){}}).extend(FormFrame),ShowMessage=Class({create:function(b){this._super(b)}, onCreate:function(){this.stage.appearance("",function(){this.destroy()}.bind(this));this.parent.append(this.stage.getDom())},initHtml:function(){this._super();this.content=$("<div class='content'></div>");this.title=$("<div class='title'>"+this.options.message+"</div>");this.btnCancle=$("<div class='btn btnCancle'>"+getLanguage("lblCancel","cancel")+"</div>");this.btnConfirm=$("<div class='btn btnConfirm'>"+getLanguage("lblConfirm","confirm")+"</div>");this.content.append(this.title);this.content.append(this.btnCancle); this.content.append(this.btnConfirm);this.stage.append(this.content)},initEvent:function(){this._super();this.btnCancle.click(function(){this.hide()}.bind(this));this.btnConfirm.click(function(){this.options.callback&&this.options.callback();this.hide()}.bind(this))},destroy:function(){this.stage.getDom().remove()},hide:function(){this._super();window.localStorage.setItem(realLocation+"?historySubmmit",(new Date).getTime())}}).extend(FadeOutFadeForm),showMessage=function(b,c){(new ShowMessage({parent:bookContainer, formType:"message",rightToLeft:rightToLeft,message:b,callback:c})).show()}; function getArticleEditor(){function b(t){if(window.isExecuteGetInverseEditor)var u=window.setInterval(function(){if(window.runArticleEditor||window.inverseEditor)window.clearInterval(u),t()},10);else window.isExecuteGetInverseEditor=!0,f(),window.articleListConfig?(e(window.articleListConfig),t(),window.runArticleEditor&&delete window.runArticleEditor):bookConfig.articleListPath&&c(bookConfig.articleListPath,function(w){d(w,t)},t,"")}function c(t,u,w,x,z){var A=new XMLHttpRequest;A.responseType= void 0===x?"json":x;A.open("GET",t);A.send();A.onreadystatechange=function(){4===A.readyState&&(200===A.status||304===A.status?u&&u(A):"bookinfo"===z&&u?u():w&&w(u))};A.error=function(){w&&w(u)}}function d(t,u){B&&(clearTimeout(B),B=null);if(window.Module.isReady){var w=allocateUTF8(t.responseText),x=Module._DeString(w),z=UTF8ToString(x);z=eval(z);Module._free(w);Module._FreeMemory(x);e(z);u();window.runArticleEditor&&delete window.runArticleEditor}else B=setTimeout(function(){d(t,u)},100)}function e(t){(window.articleListConfig= t)?g(t):window.inverseEditor=[]}function f(){(bookConfig.articleConfigPath||bookConfig.bookArticleConfigPath||bookConfig.periodsConfigPath&&window.book_visit&&window.book_visit.periodicalId||bookConfig.userArticleConfigPath)&&l(function(t){window.articleConfig=t.response})}function g(t){for(var u=[],w=window.bookConfig.totalPageCount,x=window.htmlConfig?window.htmlConfig.search_pages:[],z=0;z<w;z++){for(var A=x&&x.length&&x[z]?x[z].index:z,J=[],G=0;G<t.length;G++)(t[G].articles?t[G].articles:[]).forEach(function(H){var F= "";if(""===H.activePage||void 0===H.activePage||H.activePage&&(-2===parseFloat(H.activePage)||parseFloat(H.activePage)===A))a:{F=A;var K={};H.collapseArea&&(K=JSON.parse(H.collapseArea));if(K[F])F={rect:K[F]};else{if(!H.articleTextList||!H.articleTextList.length){F="";break a}F=k(H.articleTextList,F)}F="[object Object]"===Object.prototype.toString.call(F)?{tannoName:"link1",x:F.rect.x,y:F.rect.y,width:F.rect.width,height:F.rect.height,rotation:"0",reflection:"false",reflectionType:"0",reflectionAlpha:"0", pageWidth:F.rect.pageWidth,pageHeight:F.rect.pageHeight}:""}F&&H.articleTextList&&H.articleTextList.length&&(H=h(H),window.articleConfig||(window.articleConfig={}),window.articleConfig.hotArea||(window.articleConfig.hotArea={overColor:"#4997ee",downColor:"#4997ee",outColor:"#4997ee",overAlpha:"0.3",downAlpha:"0.5",outAlpha:"0"}),K=window.articleConfig.hotArea,J.push({action:{triggerEventType:"mouseDown",actionType:"com.mobiano.flipbook.pageeditor.TAnnoActionShowArticle",articleConfig:H,linkTarget:"showArticle"}, annotype:"com.mobiano.flipbook.pageeditor.TAnnoLink",annoId:"202211710188056",isInverse:!0,alpha:"1",overColor:K.overColor,downColor:K.downColor,outColor:K.outColor,overAlpha:K.overAlpha,downAlpha:K.downAlpha,outAlpha:K.outAlpha,pageViewedBool:"true",ellipseH:"0",ellipseW:"0",location:F,hint:{hintShapeColor:"0",hintShapeColor2:"8388736",hintShapeAlpha:"1",hintW:"0",hintH:"0",hintAuto:"true",hintShapeType:"2",text:""},shadow:{hasDropShadow:"false",shadowDistance:"4",shadowAngle:"270",shadowColor:"0", shadowAlpha:"0.6",shadowBlurX:"4",shadowBlurY:"4"},highlightsBool:"false",linkStatus:"1",mouseOver:"false",borderColor:"16737792"}))});u.push(J)}window.inverseEditor=u}function h(t){t=JSON.parse(JSON.stringify(t));t.articleTextList.map(function(u){"text"===u.type&&(u.text=u.text.replace(/\n[ ]+/g,"<br>  "));return u});return{articleId:t.articleId,newTime:t.newTime,title:t.title,subTitle:t.subTitle,author:t.author,categoryId:t.categoryId,articleTextList:t.articleTextList}}function k(t,u){var w= "";t.forEach(function(x){if(-1!==u&&(x.pageIndex===u||x.mergeList&&x.mergeList.length&&x.mergeList.filter(function(A){return A.pageIndex===u}).length))if(""===w)w=x.mergeList&&x.mergeList.length?k(x.mergeList,u):JSON.parse(JSON.stringify(x));else{if(x.mergeList&&x.mergeList.length){var z=[w].concat(x.mergeList);w=k(z,u)}w.rect.x>x.rect.x&&(w.rect.x=x.rect.x);w.rect.y>x.rect.y&&(w.rect.y=x.rect.y);w.rect.endX<x.rect.endX&&(w.rect.endX=x.rect.endX);w.rect.endY<x.rect.endY&&(w.rect.endY=x.rect.endY); w.rect.width=w.rect.endX-w.rect.x;w.rect.height=w.rect.endY-w.rect.y}});return w}function l(t){bookConfig.articleConfigPath?c(bookConfig.articleConfigPath,t,n):n(t)}function n(t){bookConfig.bookArticleConfigPath?c(bookConfig.bookArticleConfigPath,t,p):p(t)}function p(t){if(bookConfig.periodsConfigPath&&window.book_visit&&window.book_visit.periodicalId){var u=bookConfig.periodsConfigPath;u=u.replace("%periodicalId%",window.book_visit.periodicalId);c(u,t,v)}else v(t)}function v(t){bookConfig.userArticleConfigPath? c(bookConfig.userArticleConfigPath,t):t&&t()}var B;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){return t.return(new Promise(function(u,w){window.templeteName&&!window.templeteName.toLowerCase().match(/article/)?u():window.runArticleEditor||window.inverseEditor?u():(console.log("create getArticleEditor one time"),bookConfig.articleListPath?(w=bookConfig.bookBaseURL)?(w.endsWith("/")||(w+="/"),c(w+"bookinfo.js",function(x){x&&x.response&&(eval(x.response),window.book_visit=book_visit); b(function(){window.runArticleEditor=1;u()})},"","text","bookinfo")):b(function(){window.runArticleEditor=1;u()}):(window.runArticleEditor=1,u(),window.runArticleEditor&&delete window.runArticleEditor))}))})} HTML5AdSlider=Class({create:function(b,c){c&&c.data&&0!=c.data.length&&(this.parent=b,this.options=c,this.data=c.data,this.interval=c.interval?c.interval:3E3,this.outerContainer=$("<div></div>"),this.container=$("<div class='adSlider'></div>"),this.dots=$("<div></div>"),this.getDefaultValue(),this.getImgs(),this.setDots(),this.setSLider(),this.initCss(),1<this.data.length&&this.outerContainer.append(this.dots),this.outerContainer.append(this.container),this.parent.append(this.outerContainer),this.setImgs(), this.autoPlay())},getDefaultValue:function(){this.timer=null;this.imgs=[];this.wappers=[];this.currentIndex=1;this.dotWidth=this.dotHeight=14;this.dotsWidth=0;this.dotMargin=5;this.moving=!1;this.left=this.options.paddingLeft;this.top=this.options.paddingTop;this.width=$(this.parent).width()-this.left-this.options.paddingRight;this.height=$(this.parent).height()-this.top-this.options.paddingBottom},initCss:function(){this.outerContainer.css({position:"absolute",overflow:"hidden",left:this.left+"px", top:this.top+"px",width:this.width+"px",height:this.height,padding:"0",margin:"0"});this.container.css({position:"absolute",left:0,top:0,width:this.width*this.data.length+"px",height:this.height+"px",padding:"0",margin:"0"});this.dots.css({position:"absolute","text-align":"center",width:this.dotsWidth+"px","line-height":this.dotHeight+"px",height:this.dotHeight+"px",right:"20px",top:3*this.height/4+"px","z-index":"2"})},resize:function(){this.width=this.parent.width()-this.options.paddingLeft-this.options.paddingRight; this.height=this.parent.height()-this.options.paddingTop-this.options.paddingBottom;this.container.css({width:this.width*this.data.length+"px",height:this.height,left:-(this.currentIndex-1)*this.width+"px",top:0});this.outerContainer.css({width:this.width,height:this.height,left:this.left+"px",top:this.top+"px"});this.dots.css({top:3*this.height/4+"px"});for(var b=0;b<this.imgs.length;b++){var c=this.imgs[b];this.setImgCss(c);c.css({position:"absolute",width:this.imgWidth+"px",height:this.imgHeight+ "px",left:this.imgLeft+"px",top:this.imgTop+"px"});this.wappers[b].find("a").css({width:this.imgWidth+"px",height:this.imgHeight+"px",left:this.imgLeft+"px",top:this.imgTop+"px"});this.wappers[b].css({position:"absolute",left:this.width*b+"px",top:0,width:this.width+"px",height:this.height+"px",padding:"0",margin:"0",overflow:"hidden"})}this.initCss()},setDots:function(){if(!(1>=this.data.length)){for(var b=0;b<this.data.length;b++)this.dotsWidth+=this.dotWidth+this.dotMargin,this.dot=$("<div>"+(b+ 1)+"</div>"),this.dot.css({position:"absolute","border-radius":"50%",border:"1px solid #cccccc",cursor:"pointer","text-align":"center",width:this.dotWidth+"px","line-height":this.dotHeight+"px",height:this.dotHeight,"font-family":"Arial, serif, Tahoma","font-size":"60%","background-color":"#eeeeee",left:(this.dotWidth+this.dotMargin)*b+"px",top:0,"z-index":2}),this.initDotEvent(this.dot),this.dots.append(this.dot);this.dots.css({width:this.dotsWidth})}},setSLider:function(){for(var b=0;b<this.imgs.length;b++){if(b< this.data.length)if(this.data[b].url){var c=$("<a href="+this.getCorrectUrl(this.data[b].url)+' target="view_window"></a>');c.bind(_event._down,function(){BookEvent.trigger("jumpLink",["adSlider",BookInfo.getCurrentPages().join("-"),this.data[b].url])});this.a=c}else this.a=$("<a></a>");else this.data[0].url?(c=$("<a href="+this.getCorrectUrl(this.data[0].url)+' target="view_window"></a>'),c.bind(_event._down,function(){BookEvent.trigger("jumpLink",["adSlider",BookInfo.getCurrentPages().join("-"), this.data[0].url])}),this.a=c):this.a=$("<a></a>");this.a.css({position:"absolute","z-index":"1",margin:"0px",padding:"0px"});this.dataWrapper=$("<div class='AsSliderDataWrapper' wrapperNum="+(b+1)+"></div>");this.dataWrapper.css({position:"absolute",left:this.width*b+"px",top:0,width:this.width+"px",height:this.height+"px",padding:"0",margin:"0",overflow:"hidden"});this.dataWrapper.append(this.imgs[b],this.a);this.wappers.push(this.dataWrapper);this.container.append(this.dataWrapper)}},getCorrectUrl:function(b){return getRealURL(b)}, getImgs:function(){for(var b=0;b<this.data.length;b++)this.img=$("<img/>"),this.img.attr("src",this.data[b].src),this.imgs.push(this.img);this.img=$("<img/>");this.img.attr("src",this.data[0].src);this.imgs.push(this.img)},setImgs:function(){for(var b=0;b<this.imgs.length;b++){var c=this.imgs[b];c.on("load",function(d,e,f){return function(){d.setImgCss(e);e.css({position:"absolute",width:d.imgWidth+"px",height:d.imgHeight+"px",left:d.imgLeft+"px",top:d.imgTop+"px"});d.wappers[f].find("a").css({position:"absolute", width:d.imgWidth+"px",height:d.imgHeight+"px",left:d.imgLeft+"px",top:d.imgTop+"px"});d.wappers[f].css({position:"absolute",left:d.width*f+"px",top:0,width:d.width+"px",height:d.height+"px",padding:"0",margin:"0"})}}(this,c,b))}},setImgCss:function(b){this.imgWidth=b[0].naturalWidth;this.imgHeight=b[0].naturalHeight;this.pageRadio=this.width/this.height;this.naturalRadio=this.imgWidth/this.imgHeight;this.imgLeft=this.imgTop=0;this.naturalRadio>=this.pageRadio?(b=this.width/this.imgWidth,this.imgWidth= this.width,this.imgHeight*=b,this.imgTop=(this.height-this.imgHeight)/2,this.imgLeft=0):(b=this.height/this.imgHeight,this.imgHeight=this.height,this.imgWidth*=b,this.imgTop=0,this.imgLeft=(this.width-this.imgWidth)/2)},autoPlay:function(){1>=this.data.length||(this.timer=setInterval(function(){this.oneStep(this.currentIndex)}.bind(this),this.interval))},oneStep:function(b){this.moving||(this.moving=!0,this.dots.find("div").css({background:"#eee",color:"#333"}),this.container.animate({left:-this.width* (b-1)+"px"},this.options.effectDuration,function(){this.currentIndex==this.data.length+1&&(this.currentIndex=1,this.container.css({left:0}));this.currentIndex+=1;this.moving=!1}.bind(this)),b==this.data.length+1?$(this.dots).find("div:nth-child(1)").css({background:"#333",color:"#fff"}):$(this.dots).find("div:nth-child("+b+")").css({background:"#333",color:"#fff"}))},initDotEvent:function(b){b.bind("click",function(){clearInterval(this.timer);this.timer=null;var c=parseInt(b.html());this.moving|| (this.oneStep(c),this.currentIndex=c);this.autoPlay()}.bind(this));b.bind("mouseenter",function(){b.css({opacity:"0.5"})}.bind(this));b.bind("mouseleave",function(){b.css({opacity:"1"})}.bind(this))}}); var StaticAd=Class({create:function(b){var c=b.css("left");c=parseInt(c.replace("px",""));var d=parseInt(b.css("top"));b=parseInt(b.css("width"));rightToLeft&&(c+=b/2);this.adContainer=$("<div id='adContainer'></div>");this.adContainer.css({position:"absolute","z-index":3,transition:"all 0.3s"});b=staticAd.height?staticAd.height:isPhone()||isPad()?60:90;var e,f,g=isPC()?templateArea.getBottomHeight():(null==(e=toolBar)?void 0:null==(f=e.bottomBar)?void 0:f.height())||60,h,k;e=isPC()?templateArea.getTopHeight(): (null==(h=toolBar)?void 0:null==(k=h.topBar)?void 0:k.height())||40;switch(staticAd.adPosition){case 0:this.setStyle({left:c,top:d});break;case 1:isPC()&&(bookConfig.bottomMargin+=b);this.setStyle({left:"50%",transform:"translate(-50%,"+-g+"px)",bottom:"0",height:b+"px"});break;case 2:isPC()&&(bookConfig.topMargin+=b),this.setStyle({left:"50%",transform:"translate(-50%,"+e+"px)",top:"0",height:b+"px"})}this.adInstance=new HTML5AdSlider(this.adContainer,{paddingLeft:30,paddingTop:staticAd.adPosition? 0:30,paddingRight:30,paddingBottom:staticAd.adPosition?0:30,loop:!1,interval:staticAd.interval,effectDuration:1E3,data:staticAd.data});bookContainer.append(this.adContainer);this.bindEvent()},bindEvent:function(){var b=this;BookEvent.bindEvent("showToolbar",function(){var c,d,e=isPC()?templateArea.getBottomHeight():(null==(c=toolBar)?void 0:null==(d=c.bottomBar)?void 0:d.height())||60,f,g;c=isPC()?templateArea.getTopHeight():(null==(f=toolBar)?void 0:null==(g=f.topBar)?void 0:g.height())||40;switch(staticAd.adPosition){case 1:b.setStyle({transform:"translate(-50%,"+ -e+"px)"});break;case 2:b.setStyle({transform:"translate(-50%,"+c+"px)"})}});BookEvent.bindEvent("hideToolbar",function(){b.setStyle({transform:"translate(-50%,0)"})})},setStyle:function(b){b&&this.adContainer&&this.adContainer.css(b)},onResize:function(){this.adInstance&&this.adInstance.resize()},show:function(){this.adContainer&&this.adContainer.show()},hide:function(){this.adContainer&&this.adContainer.hide()}}),thickessPerBar=1,totalheight=300; function drawThickeness(b,c,d,e,f){totalheight=d;d=thickessPerBar/8/1.5;for(var g,h=0,k;h<c;){k=getColorAtIdx(h,c);var l=d*h;g=totalheight-2*l;for(k=k.toString(16);6>k.length;)k="0"+k;b.fillStyle="#"+k;b.fillRect(e+f*h,l,1,g);b.fill();h++}}var COLOR_0=243,COLOR_1_1=209,COLOR_1_2=231,COLOR_2_1=209,COLOR_2_2=213; function getColorAtIdx(b,c){var d=Math.max(3,c/6+c/4);d=Math.min(11,d);d=0==d%2?d-1:d;var e=Color(bookConfig.thicknessColor).split();c=e.r/255;var f=e.g/255;e=e.b/255;0==b?b=COLOR_0:b<d?b=0==b%2?COLOR_1_2:COLOR_1_1:(b=(b-d)/2,d=4<b/2?24:6*Math.floor(b/2),b=0==b%2?COLOR_2_1-d:COLOR_2_2-d);return b*e|b*f<<8|b*c<<16} var Thickness=Class({create:function(b,c){this.thicknessWidth=getMaxThicknessWidth();this.totalPageCount=bookConfig.totalPageCount;this.endIndex=this.startIndex=this.pageCount=0;this.parent=b;this.isLeft=c;this.scale=1;this.init();this.initShadow();this.initEvent()},init:function(){this.thickness=$("<div class='thickness'></div>");this.thicknessCanvas=$("<canvas style='position:absolute;top:0;left:0;'>");this.isLeft?this.thickness.addClass("left_thickness"):this.thickness.addClass("right_thickness"); this.thickness.css({"z-index":5});this.thickness.append(this.thicknessCanvas);this.parent.append(this.thickness);this.context=this.thicknessCanvas[0].getContext("2d")},initShadow:function(){this.shadow||_agent_.browser.msie&&11>_agent_.browser.version||(this.shadow=$("<div class='shadow'></div>"),this.thickness.append(this.shadow))},refresh:function(b,c){this.startIndex=b;this.endIndex=c;this.pageCount=this.endIndex-this.startIndex;this.width=this.getThicknessWidth(Math.abs(this.pageCount));this.thickness.css({width:this.width+ "px"});this.thicknessCanvas.attr("width",this.width+"px");this.context.clearRect(0,0,this.thicknessWidth,this.height);this.isLeft?(this.thickness.css({left:-this.width+"px"}),drawThickeness(this.context,this.width,this.height,this.width,-1)):drawThickeness(this.context,this.width,this.height,0,1)},onResize:function(b,c){this.resizeThickness(b,c);this.resizeShadow(b,c)},show:function(){this.thickness.show()},hide:function(){this.thickness.hide()},hideCanvas:function(){this.thicknessCanvas.hide()}, showCanvas:function(){this.thicknessCanvas.show()},resizeShadow:function(b,c){},resizeThickness:function(b,c){this.height=c;var d="100%";this.isLeft&&(d=-this.width+"px");this.thickness.css({left:d});this.thicknessCanvas.attr("height",c+"px");this.thicknessCanvas.attr("width",this.thicknessWidth+"px");this.context.clearRect(0,0,this.thicknessWidth,this.height);this.isLeft?drawThickeness(this.context,this.thicknessWidth,c,this.thicknessWidth,-1):drawThickeness(this.context,this.thicknessWidth,c,0, 1);this.resetTotalWidth(b,c)},resetTotalWidth:function(b,c){this.totalWidth=oneSideTotalThicknessWidth()},getPageIndexByPosition:function(b){b=this.getDistance(b);return this.startIndex+parseInt(b*this.pageCount/this.width)},getDistance:function(b){b=b.pageX;var c=$(this.thickness).offset().left;return b-c},getThicknessWidth:function(b){this.totalWidth||this.resetTotalWidth();return this.width=Math.floor(this.totalWidth*b/this.totalPageCount)},getWidth:function(){return this.width},getHeight:function(){return this.height}, initEvent:function(){this.thickness.bind("mouseup touchstart",function(b){b.stopPropagation()}.bind(this));this.thickness.click(function(b){0!=this.pageCount&&(b=this.getPageIndexByPosition(b),!b||0>=b||gotoPageFun(b,!1,"thickness"))}.bind(this));isPhone()||isPad()||(this.thickness.bind("mousemove",function(b){if(0!=this.pageCount){var c=this.getPageIndexByPosition(b);if(!c||0>=c)this.hint&&this.hint.hide();else{c=" "+getShownPageNumber(c)+" ";var d=b.pageX;b=b.pageY-30;this.hint||(this.hint=new divHint(c, d,b));this.hint.setText(c);this.hint.show(d,b);this.hint.moveto(d,b)}}}.bind(this)),this.thickness.bind("mouseleave",function(){null!=this.hint&&this.hint.hide()}.bind(this)))},doSetMovingScale:function(b,c,d,e,f){if(!((isPhone()||isPad())&&!bookConfig.HardPageEnable&&!BookInfo.isDoublePage()||!this.totalWidth||0>=this.totalWidth||(f=f?0:Math.min(4/this.totalWidth,1),1==f||(1!=b&&1!=c||bookConfig.isTheBookOpen&&BookInfo.isDoublePage())&&b!=totalPageCount&&c!=totalPageCount))){var g=1,h=1;(1!=b||bookConfig.isTheBookOpen&& BookInfo.isDoublePage())&&b!=totalPageCount||(g=f);(1!=c||bookConfig.isTheBookOpen&&BookInfo.isDoublePage())&&c!=totalPageCount||(h=f);b=$.easing.easeInOutSine(null,d,g,h-g,e);this.setScale(b)}},setScale:function(b){this.thickness.css({transform:"scaleX("+b+") scaleZ(1)","-webkit-transform":"scaleX("+b+") scaleZ(1)","-moz-transform":"scaleX("+b+") scaleZ(1)","-ms-transform":"scaleX("+b+") scaleZ(1)","-o-transform":"scaleX("+b+") scaleZ(1)"});this.scale=b}}),totalThicknessWidth=function(b){return b|| bookConfig.showThicknessOnMobile?totalWidth=oneSideTotalThicknessWidth():0},oneSideTotalThicknessWidth=function(){var b=getMaxThicknessWidth(),c=$.easing.easeOutQuad(null,Math.min(bookConfig.totalPageCount,100),0,b,100);c=Math.floor(c);b=$.easing.swing(null,Math.max(c-8,0),1,0,b-8);return c=Math.floor(c*b)},getMaxThicknessWidth=function(){switch(bookConfig.thicknessWidthType){case "none":return 0;case "thinner":return 5;case "thin":return 15;case "thicker":return 40}return 20},ThicknessManager=Class({create:function(b, c){this.book=c;this.leftThickness=new Thickness(b,!0);this.rightThickness=new Thickness(b,!1)},setAttachmentBefore:function(b){bookConfig.RightToLeft?this.book.currentPageIndex<b?this.leftThickness&&this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex(b)):this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(b),0):this.book.currentPageIndex<b?this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(b),bookConfig.totalPageCount):this.leftThickness&& this.leftThickness.refresh(0,this.getMinCurrentIndex(b))},afterCurling:function(){this.refreshThickness()},setAttachmentIn:function(b){},setAttachmentAfter:function(){this._super();this.afterCurling()},followToPoint:function(b,c,d){this.leftThickness&&this.leftThickness.doSetMovingScale(b,c,d,this.book.width,bookConfig.HardPageEnable);this.rightThickness&&this.rightThickness.doSetMovingScale(b,c,d,this.book.width,bookConfig.HardPageEnable)},refreshThickness:function(){bookConfig.RightToLeft?(this.leftThickness&& this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(),0)):(this.leftThickness&&this.leftThickness.refresh(0,this.getMinCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(),bookConfig.totalPageCount));this.leftThickness&&this.leftThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width,bookConfig.HardPageEnable); this.rightThickness&&this.rightThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width,bookConfig.HardPageEnable)},onResize:function(b,c){if(this.leftThickness)this.leftThickness.onResize(b,c);if(this.rightThickness)this.rightThickness.onResize(b,c);this.refreshThickness()},hideCanvas:function(){this.leftThickness&&this.leftThickness.hideCanvas();this.rightThickness&&this.rightThickness.hideCanvas()},showCanvas:function(){this.leftThickness&& this.leftThickness.showCanvas();this.rightThickness&&this.rightThickness.showCanvas()},getThicknessWidth:function(){return[this.leftThickness.getWidth()*this.leftThickness.scale,this.rightThickness.getWidth()*this.rightThickness.scale]},getMinCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;return BookInfo.getMinPageIndex(b)},getMaxCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;b=BookInfo.getMaxPageIndex(b);return Math.min(b,bookConfig.totalPageCount)}, show:function(){},hide:function(){}}),SingleBookThicknessManager=Class({create:function(b,c){this.book=c;rightToLeft&&(this.leftThickness=new Thickness(b,!0));rightToLeft||(this.rightThickness=new Thickness(b,!1))},setAttachmentBefore:function(b){bookConfig.RightToLeft?this.book.currentPageIndex<b?this.leftThickness&&this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex(b)):this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(b),0):this.book.currentPageIndex< b?this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(b),bookConfig.totalPageCount):this.leftThickness&&this.leftThickness.refresh(0,this.getMinCurrentIndex(b))},followToPoint:function(b,c,d){b>c&&(d=2*this.book.width-d);this.leftThickness&&this.leftThickness.doSetMovingScale(b,c,d,2*this.book.width,bookConfig.HardPageEnable);this.rightThickness&&this.rightThickness.doSetMovingScale(b,c,d,2*this.book.width,bookConfig.HardPageEnable)},refreshThickness:function(){bookConfig.RightToLeft? (this.leftThickness&&this.leftThickness.refresh(bookConfig.totalPageCount,this.getMaxCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMinCurrentIndex(),0)):(this.leftThickness&&this.leftThickness.refresh(0,this.getMinCurrentIndex()),this.rightThickness&&this.rightThickness.refresh(this.getMaxCurrentIndex(),bookConfig.totalPageCount));this.leftThickness&&this.leftThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width, bookConfig.HardPageEnable);this.rightThickness&&this.rightThickness.doSetMovingScale(this.book.currentPageIndex,this.book.currentPageIndex,this.book.width,this.book.width,bookConfig.HardPageEnable)},resizeAttachment:function(b,c){if(this.leftThickness)this.leftThickness.onResize(b,c);if(this.rightThickness)this.rightThickness.onResize(b,c);this.refreshThickness()},getThicknessWidth:function(){if(rightToLeft)return[this.leftThickness.getWidth()*this.leftThickness.scale,0];if(!rightToLeft)return[0, this.rightThickness.getWidth()*this.rightThickness.scale]},getMinCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;return b},getMaxCurrentIndex:function(b){if(void 0==b||null==b)b=this.book.currentPageIndex;return Math.min(b,bookConfig.totalPageCount)}}).extend(ThicknessManager),FlipShotBarManager=Class({create:function(b,c){this.book=c;this.leftFlipShotBar=new FlipShotBar(!0);this.rightFlipShotBar=new FlipShotBar(!1)},appendTo:function(b){b.append(this.leftFlipShotBar.getContainer()); b.append(this.rightFlipShotBar.getContainer())},setVisibleByIndex:function(b){bookConfig.RightToLeft?(b>=this.book.currentPageIndex&&this.leftFlipShotBar.setVisibleByIndex(b),b<=this.book.currentPageIndex&&this.rightFlipShotBar.setVisibleByIndex(b)):(b<=this.book.currentPageIndex&&this.leftFlipShotBar.setVisibleByIndex(b),b>=this.book.currentPageIndex&&this.rightFlipShotBar.setVisibleByIndex(b))},refresh:function(){this.leftFlipShotBar&&this.leftFlipShotBar.setVisibleByIndex(this.book.currentPageIndex); this.rightFlipShotBar&&this.rightFlipShotBar.setVisibleByIndex(this.book.currentPageIndex)},onResize:function(b,c){if(this.leftFlipShotBar)this.leftFlipShotBar.onResize(b,c);if(this.rightFlipShotBar)this.rightFlipShotBar.onResize(b,c)},getWidth:function(){return this.leftFlipShotBar?this.leftFlipShotBar.width:this.rightFlipShotBar?this.rightFlipShotBar.width:0},getHeight:function(){return this.leftFlipShotBar?this.leftFlipShotBar.height:this.rightFlipShotBar?this.rightFlipShotBar.height:0},resizeAttachment:function(b, c,d){this.leftFlipShotBar&&this.leftFlipShotBar.setScale(d);this.rightFlipShotBar&&this.rightFlipShotBar.setScale(d);if(this.leftFlipShotBar)this.leftFlipShotBar.onResize(b,c);if(this.rightFlipShotBar)this.rightFlipShotBar.onResize(b,c)}}),BookShadow=Class({create:function(b){this.background=$("<div class='bookShadow'></div>");bookConfig.FlipDirection&&(this.background=$("<div class='bookShadow-vertical'></div>"));if("side2"==bookConfig.BindingType){var c=$("<div class='article-shadow'></div>");this.background.append(c); this.background.css({"-webkit-box-shadow":"0 0 5px rgba(40, 40, 40, 0.05)","-moz-box-shadow":"0 0 5px rgba(40, 40, 40, 0.05)","-o-box-shadow":"0 0 5px rgba(40, 40, 40, 0.05)","-ms-box-shadow":"0 0 5px rgba(40, 40, 40, 0.05)","box-shadow":"0 0 5px rgba(40, 40, 40, 0.05)"})}$(b).append(this.background);this.visible=!0},doubleWidth:function(b){bookConfig.FlipDirection?$(this.background).attr("class",b?"doubleHeight":"singleHeight"):$(this.background).attr("class",b?"doubleWidth":"singleWidth");$(this.background).addClass("bookShadow")}, doubleHeight:function(b){$(this.background).attr("class",b?"doubleHeight":"singleHeight");$(this.background).addClass("bookShadow-vertical")},right:function(b){$(this.background).css({right:"auto"});b&&$(this.background).css({right:"0px"})},down:function(b){$(this.background).css({bottom:"auto"});b&&$(this.background).css({bottom:"0px"})},show:function(){this.visible||($(this.background).show(),this.visible=!0)},hide:function(){this.visible&&($(this.background).hide(),this.visible=!1)},onResize:function(){}}); bdor[26]="h"; Class("BookmarkList",{create:function(){this.bookmarks=[];this.bookPageCount=bookConfig.totalPageCount},reload:function(){this.bookmarks=[];this.loadBasicData();this.loadUserData();this.sort()},loadBasicData:function(){if(global.bmtConfig){var b=bmtConfig;bmtConfig.tabs&&(b=bmtConfig.tabs);for(var c=0;c<b.length;c++)this.isShow(b[c])&&this.bookmarks.push(b[c])}},loadUserData:function(){for(var b=Instance.parse(this.getUserDataFromLocal(),[]),c=0;c<b.length;c++)this.isShow(b[c])&&this.bookmarks.push(b[c])},isShow:function(b){return parseInt(b.pageIndex)<= this.bookPageCount&&!this.exists(b)},getUserDataFromLocal:function(){var b=window.location.href.replace(window.location.hash,"")+"BookMark";try{if(window.localStorage&&window.localStorage[b])return window.localStorage.getItem(b)}catch(c){}},sort:function(){this.bookmarks=this.bookmarks.sort(function(b,c){return parseInt(b.pageIndex)-parseInt(c.pageIndex)})},count:function(){return this.bookmarks.length},item:function(b){return this.bookmarks[b]},exists:function(b){for(var c=0;c<this.count();c++)if(this.item(c).pageIndex== b.pageIndex)return!0;return!1}}); Class("BookmarkTabItem",{$body:null,$parent:null,zIndex:0,create:function(b){this.data=b;this.$body=$("<span class='bookmark_item bookmark_caption'></span>");this.initStyle();this.update()},initStyle:function(){bmtConfig.showPage&&this.$body.attr("title",getShownPageNumber(this.data.pageIndex));bmtConfig.hasTexture&&this.$body.css({"background-image":"url("+(uiBaseURL+"leather1.png)"),"background-repeat":"repeat"});bookConfig.enableCustomizedBookmarkWidth&&bookConfig.customizedBookmarkWidth&&this.$body.css({width:bookConfig.customizedBookmarkWidth+ "px"})},getData:function(){return this.data},setData:function(b){this.data=b;this.update()},update:function(){var b=(bookConfig.tabAlpha?bookConfig.tabAlpha:100)/100;this.$body.css("background-color",Color(this.data.color).rgba(b));this.data.fontColor&&this.$body.css("color",Color(this.data.fontColor).toString());this.$body.html(this.data.caption)},moveTo:function(b){this.$parent!=b&&(this.remove(),this.$parent=b,this.$parent.append(this.$body),this.$body.bind("click",this.onBookmarkClick.bind(this)), this.$body.bind("mouseenter",this.onBookmarkMouseEnter.bind(this)),this.$body.bind("mouseleave",this.onBookmarkMouseLeave.bind(this)),this.$body.bind("pointerdown pointermove pointerup pointerenter",function(c){c.stopPropagation()}),this.$body.bind("mousedown mousemove mouseup mouseenter",function(c){c.stopPropagation()}))},remove:function(){null!=this.$parent&&(this.$body.remove(),this.$body.unbind(),this.$parent=null)},onBookmarkClick:function(b){gotoPageFun(this.data.pageIndex,!1,"bookmark tab")}, onBookmarkMouseEnter:function(b){this.zIndex=this.$body.css("z-index");this.$body.stop(!0,!0).animate({top:"0px"},300);this.$body.css({"align-items":"center","z-index":999})},onBookmarkMouseLeave:function(b){this.$body.stop(!0,!0).animate({top:"30px"},300);this.$body.css({"align-items":"flex-start","z-index":this.zIndex})},setPosition:function(b){this.$body.css({left:"",right:"","z-index":""});this.$body.css(b)},getWidth:function(){return this.$body.width()}}); Class("BookmarkItemPool",{create:function(){this.items=[]},getBookmarkItem:function(b){var c=this.getItemFromList(b);c||(c=this.createNewItem(b));return c},getItemFromList:function(b){for(var c=0;c<this.items.length;c++){var d=this.items[c];if(d.getData().pageIndex==b.pageIndex)return d.setData(b),d}return null},createNewItem:function(b){b=new BookmarkTabItem(b);this.items.push(b);return b},clean:function(b){for(var c=0;c<this.items.length;c++){var d=this.items[c],e=d.getData();b.exists(e)||d.remove()}}}); Class("BookmarkTab",{$parent:null,visible:!0,onSideEdge:!0,zIndex:0,create:function(b,c){this.$parent=b;this.hideSmallTab=!!c;this.onSideEdge=bmtConfig.onSideEdge;bookConfig.FlipDirection&&(this.onSideEdge=!0);this.zIndex=6;this.bookmarkPool=new BookmarkItemPool;this.bookmarkList=new BookmarkList;this.initBookmarkBar();this.reload()},initBookmarkBar:function(){bookConfig.FlipDirection?(this.leftBar=$("<div class='up_bookmark_bar'></div>"),this.rightBar=$("<div class='down_bookmark_bar'></div>")): (this.leftBar=$("<div class='left_bookmark_bar'></div>"),this.rightBar=$("<div class='right_bookmark_bar'></div>"));this.leftBar.on("mouseup touchstart",function(b){b.stopPropagation()});this.rightBar.on("mouseup touchstart",function(b){b.stopPropagation()});this.onSideEdge&&(this.leftBar.addClass("vertical"),this.rightBar.addClass("vertical"));this.leftBar.css("z-index",this.zIndex);this.rightBar.css("z-index",this.zIndex);this.$parent.append(this.leftBar);this.$parent.append(this.rightBar)},reload:function(){0!= this.visible&&(this.bookmarkList.reload(),this.refresh())},refresh:function(){0!=this.visible&&(this.separate(),this.adjustBar(),this.onResize())},separate:function(){this.refreshShownPage();this.bookmarkPool.clean(this.bookmarkList);for(var b=0;b<this.bookmarkList.count();b++){var c=this.bookmarkList.item(b),d=this.bookmarkPool.getBookmarkItem(c);c.pageIndex>=this.bigShownPage?rightToLeft?d.moveTo(this.leftBar):d.moveTo(this.rightBar):c.pageIndex<=this.smallShownPage&&(rightToLeft?d.moveTo(this.rightBar): d.moveTo(this.leftBar))}},refreshShownPage:function(){var b=BookInfo.getCurrentPages();1==b.length?(this.smallShownPage=b[0],this.bigShownPage=b[0]):(this.smallShownPage=Math.min(b[0],b[1]),this.bigShownPage=Math.max(b[0],b[1]))},isTheFirstPage:function(){this.refreshShownPage();return 1==this.bigShownPage},isTheLastPage:function(){this.refreshShownPage();return this.smallShownPage==totalPageCount},setAttachmentBefore:function(b){1>=b&&(parseBool(bookConfig.RightToLeft)?this.hideRightBar():this.hideLeftBar()); b>=originTotalPageCount&&(parseBool(bookConfig.RightToLeft)?this.hideLeftBar():this.hideRightBar())},adjustBar:function(){var b=this.leftBar.children().length,c=this.rightBar.children().length;this.hideSmallTab?rightToLeft?(this.hideRightBar(),0==b?this.hideLeftBar():this.showLeftBar()):(this.hideLeftBar(),0==c?this.hideRightBar():this.showRightBar()):rightToLeft?(0==c||this.isTheFirstPage()?this.hideRightBar():this.showRightBar(),0==b||this.isTheLastPage()?this.hideLeftBar():this.showLeftBar()): (0==b||this.isTheFirstPage()?this.hideLeftBar():this.showLeftBar(),0==c||this.isTheLastPage()?this.hideRightBar():this.showRightBar());bookConfig.HardPageEnable&&this.adjustZindex()},adjustZindex:function(){this.leftBar.css("z-index",this.zIndex);this.rightBar.css("z-index",this.zIndex);rightToLeft?(this.isTheLastPage()&&this.rightBar.css("z-index",1),this.isTheFirstPage()&&this.leftBar.css("z-index",1)):(this.isTheLastPage()&&this.leftBar.css("z-index",1),this.isTheFirstPage()&&this.rightBar.css("z-index", 1))},onResize:function(){if(this.onSideEdge){var b=this.$parent.height(),c=this.$parent.width();bookConfig.FlipDirection&&!this.hideSmallTab&&(b/=2);this.leftBar.css({width:b+"px",left:-b+"px"});this.rightBar.css({width:b+"px",left:c+"px"});bookConfig.FlipDirection&&this.rightBar.css({left:c-b+"px"});rightToLeft?(this.resizeItemsOfBar(this.rightBar,"left",1),this.resizeItemsOfBar(this.leftBar,"right",-1)):(this.resizeItemsOfBar(this.leftBar,"right",1),this.resizeItemsOfBar(this.rightBar,"left",-1))}else b= this.$parent.width(),c=this.$parent.width(),this.hideSmallTab||(b/=2),this.leftBar.css({width:b+"px",left:"0px"}),this.rightBar.css({width:b+"px",left:c-b+"px"}),rightToLeft?(this.resizeItemsOfBar(this.rightBar,"left",1),this.resizeItemsOfBar(this.leftBar,"left",-1)):(this.resizeItemsOfBar(this.leftBar,"left",1),this.resizeItemsOfBar(this.rightBar,"left",-1))},resizeItemsOfBar:function(b,c,d){for(var e=b.width(),f=0,g=0,h=0;h<this.bookmarkList.count();h++){var k=this.bookmarkList.item(h),l=this.bookmarkPool.getBookmarkItem(k); l.$parent==b&&(f=l.getWidth()+22,g+=l.getWidth()+22)}g+=2;h=b.children().length;Number.between(Math.floor((e-4-f)/(h-1)),10,65);var n=f=0,p=0;for(h=0;h<this.bookmarkList.count();h++)if(k=this.bookmarkList.item(h),l=this.bookmarkPool.getBookmarkItem(k),l.$parent==b){var v={};g>=e?(0<p&&(n=l.getWidth()>2*p/3?n+(p/2+10):n+(p-l.getWidth()/2+10)),v[c]=n,p=l.getWidth()):(v[c]=f,f+=l.getWidth()+22);v["z-index"]=d*k.pageIndex;l.setPosition(v)}},show:function(){this.visible=!0;this.refresh()},hide:function(){this.hideLeftBar(); this.hideRightBar();this.visible=!1},showLeftBar:function(){0<this.leftBar.children().length?this.leftBar.css("display","block"):this.leftBar.css("display","none")},hideLeftBar:function(){this.leftBar.css("display","none")},showRightBar:function(){0<this.rightBar.children().length?this.rightBar.css("display","block"):this.rightBar.css("display","none")},hideRightBar:function(){this.rightBar.css("display","none")}}); Annotation=Class({create:function(b,c,d,e){this.stepCookie=[""];this.index=c;this.scale=1;this.pageWidth=d||BookInfo.getBook().pageWidth;this.pageHeight=e||BookInfo.getBook().pageHeight;this.noteParent=b;this.containParent=b.parent();this.panelContainer=$("<div id='annotationPage"+c+"' class='panelContainer'></div>");this.panelContainer.css({top:0,left:"0px",height:"0px",bottom:0,right:0,margin:"auto"});this.canvasPanel=$("<canvas id='annotationCvsPanel"+c+"' class='annotationCvsPanel' width="+this.pageWidth+ " height="+this.pageHeight+" ></canvas>");this.drawCanvas=$("<canvas id='annotationDraw"+c+"' class='annotationDraw' width="+this.pageWidth+" height="+this.pageHeight+" ></canvas>");this.panelContainer.append(this.canvasPanel).append(this.drawCanvas);this.ctx=this.canvasPanel[0].getContext("2d");this.drawCtx=this.drawCanvas[0].getContext("2d");this.eraserCircle=$("<div class='eraserCircle' style='z-index:5;position:absolute;display:none'></div>");this.panelContainer.append(this.eraserCircle);this.containParent.append(this.panelContainer); this.initCss();this.initEvent()},initCss:function(){this.panelContainer.css({"pointer-events":"none",position:"absolute","z-index":"5","-webkit-transform-origin":"0 0","-o-transform-origin":"0 0","-moz-transform-origin":"0 0","-ms-transform-origin":"0 0","transform-origin":"0 0",width:this.pageWidth+"px",height:this.pageHeight+"px"});this.canvasPanel.css({position:"absolute","z-index":"0",width:"100%",height:"100%"});this.drawCanvas.css({position:"absolute","z-index":"0",width:"100%",height:"100%"})}, onResize:function(b,c,d){this.scale=d;this.pageWidth=b;this.pageHeight=c;this.canvasPanel[0].width=b;this.canvasPanel[0].height=c;this.drawCanvas[0].width=b;this.drawCanvas[0].height=c;this.panelContainer.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});if(global.annotationCookie&&(d=global.annotationCookie.getCookie("Note"))&&(d=d[this.index-1]))for(var e in d){var f=b,g=c;this.noteParent.find("#"+e).css({left:d[e].position.x*f+"px",top:d[e].position.y*g+"px",width:d[e].size*b+"px",height:d[e].size* c+"px"});this.noteParent.find("#"+e).find(".noteBox").css({top:d[e].size*g+10+"px"})}},initEvent:function(){this.eraserCircle.bind("pointerdown ",function(b){b.preventDefault()}.bind(this));this.panelContainer.bind("pointerdown mousedown mouseup mouseover mousemove",function(b){b.stopPropagation()}.bind(this));this.panelContainer.bind("touchstart touchend touchmove",function(b){b.stopPropagation();b.preventDefault()}.bind(this));this.drawCanvas.bind("pointerdown ",function(b){b.stopPropagation()}.bind(this)); this.canvasPanel.bind("pointerdown ",function(b){b.stopPropagation()}.bind(this));this.panelContainer.bind(_event._move,function(b){this.panelContainer.css({cursor:"auto"});switch(global.annotationPannel.selectCase){case AnnotationPannel.PEN:this.panelContainer.css({cursor:"url("+uiBaseURL+"note_edit.png),auto"});break;case AnnotationPannel.RECT:this.panelContainer.css({cursor:"url("+uiBaseURL+"note_edit.png),auto"});break;case AnnotationPannel.ROUND:this.panelContainer.css({cursor:"url("+uiBaseURL+ "note_edit.png),auto"})}}.bind(this));this.penPaint(this.drawCanvas);this.penPaint(this.canvasPanel)},penPaint:function(b){var c=0,d=0;b.bind(_event._down,function(e){(isPhone()||isPad())&&global.annotationPannel.bottomBox.css({display:"none"});global.colorPanel&&global.colorPanel.visible&&global.colorPanel.curElem[0]==global.annotationPannel.showColor[0]&&global.colorPanel.hide();global.annotationCookie.currentSteps=[];2==global.annotationPannel.selectCase||3==global.annotationPannel.selectCase|| 4==global.annotationPannel.selectCase?(c=2,d=16):d=c=-4;if(isPhone()||isPad())d=c=0;e=this.getPosition(e,c,d);this.X=e.x;this.Y=e.y;if(5==global.annotationPannel.selectCase){var f=this.getNumberFromSlider("eraser")/2;isPhone()||isPad()||(f=0);this.X=e.x-f;this.Y=e.y-f;var g={x:(e.x-f)/this.pageWidth,y:(e.y-f)/this.pageHeight,lineWidth:this.getNumberFromSlider("eraser")/this.pageWidth};this.showEraser(e.x-f,e.y-f,"block");this.eraserClear(e.x-f,e.y-f);global.annotationCookie.currentSteps.push(g)}this.noLeaveCvs= this.isDown=!0}.bind(this));b.bind(_event._up,function(e){this.eraserCircle.css({display:"none"});this.noLeaveCvs&&(this.drawCaseEvent(e),this.isDown=this.noLeaveCvs=!1)}.bind(this));b.bind("mouseleave",function(e){this.noLeaveCvs=!1;if(this.isDown&&this.lastPos){this.isDown=!1;switch(global.annotationPannel.selectCase){case 2:global.annotationCookie.setAllAnnoSteps(2,this.index-1,global.annotationCookie.currentSteps);global.annotationCookie.stepIndex+=1;break;case 3:e={startX:this.X/this.pageWidth, startY:this.Y/this.pageHeight,x:this.lastPos.x/this.pageWidth,y:this.lastPos.y/this.pageHeight,lineWidth:this.getNumberFromSlider("width")/this.pageWidth,color:Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100)};global.annotationCookie.setAllAnnoSteps(3,this.index-1,[e]);global.annotationCookie.stepIndex+=1;this.drawCtx.clearRect(0,0,this.pageWidth,this.pageHeight);this.drawRect(this.ctx,this.lastPos.x,this.lastPos.y);break;case 4:e={startX:this.X/this.pageWidth, startY:this.Y/this.pageHeight,x:this.lastPos.x/this.pageWidth,y:this.lastPos.y/this.pageHeight,lineWidth:this.getNumberFromSlider("width")/this.pageWidth,color:Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100)};global.annotationCookie.setAllAnnoSteps(4,this.index-1,[e]);global.annotationCookie.stepIndex+=1;this.drawCtx.clearRect(0,0,this.pageWidth,this.pageHeight);this.drawEllipse(this.ctx,this.lastPos.x,this.lastPos.y);break;case 5:global.annotationCookie.setAllAnnoSteps(5, this.index-1,global.annotationCookie.currentSteps),global.annotationCookie.stepIndex+=1}this.lastPos=void 0}}.bind(this));b.bind(_event._move,function(e){if(this.isDown&&this.noLeaveCvs)switch(e=this.getPosition(e,c,d),global.annotationPannel.selectCase){case AnnotationPannel.PEN:var f={startX:this.X/this.pageWidth,startY:this.Y/this.pageHeight,x:e.x/this.pageWidth,y:e.y/this.pageHeight,lineWidth:this.getNumberFromSlider("width")/this.pageWidth,opacity:this.getNumberFromSlider("alpha")/100,color:Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/ 100)};global.annotationCookie.currentSteps.push(f);this.drawLine(e.x,e.y);this.noLeaveCvs&&(this.lastPos=e);break;case AnnotationPannel.ERASER:var g=this.getNumberFromSlider("eraser")/2;isPhone()||isPad()||(g=0);this.showEraser(e.x-g,e.y-g,"block");f={x:(e.x-g)/this.pageWidth,y:(e.y-g)/this.pageHeight,lineWidth:this.getNumberFromSlider("eraser")/this.pageWidth};global.annotationCookie.currentSteps.push(f);this.eraserClear(e.x-g,e.y-g);this.noLeaveCvs&&(this.lastPos=e);break;case AnnotationPannel.RECT:this.drawCtx.clearRect(0, 0,this.pageWidth,this.pageHeight);this.drawRect(this.drawCtx,e.x,e.y);this.noLeaveCvs&&(this.lastPos=e);break;case AnnotationPannel.ROUND:this.drawCtx.clearRect(0,0,this.pageWidth,this.pageHeight),this.drawEllipse(this.drawCtx,e.x,e.y),this.noLeaveCvs&&(this.lastPos=e)}}.bind(this))},getNumberFromSlider:function(b){switch(b){case "width":return isPhone()||isPad()?parseInt(global.annotationPannel.widthBox.find(".bubbleNum").text()):global.annotationPannel.inputWidth.val();case "eraser":return isPhone()|| isPad()?parseInt(global.annotationPannel.eraserBox.find(".bubbleNum").text()):global.annotationPannel.inputEraserWidth.val();case "alpha":return isPhone()||isPad()?parseInt(global.annotationPannel.alphaBox.find(".bubbleNum").text()):global.annotationPannel.inputAlpha.val()}},drawCaseEvent:function(b){switch(global.annotationPannel.selectCase){case 2:b=this.getPosition(b,2,16);global.annotationCookie.setAllAnnoSteps(2,this.index-1,global.annotationCookie.currentSteps);this.X=b.x;this.Y=b.y;global.annotationCookie.stepIndex+= 1;break;case 3:b=this.getPosition(b,2,16);var c={startX:this.X/this.pageWidth,startY:this.Y/this.pageHeight,x:b.x/this.pageWidth,y:b.y/this.pageHeight,lineWidth:this.getNumberFromSlider("width")/this.pageWidth,color:Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100)};global.annotationCookie.setAllAnnoSteps(3,this.index-1,[c]);this.drawRect(this.ctx,b.x,b.y);this.drawCtx.clearRect(0,0,this.pageWidth,this.pageHeight);this.X=b.x;this.Y=b.y;global.annotationCookie.stepIndex+= 1;break;case 4:b=this.getPosition(b,2,16);c={startX:this.X/this.pageWidth,startY:this.Y/this.pageHeight,x:b.x/this.pageWidth,y:b.y/this.pageHeight,lineWidth:this.getNumberFromSlider("width")/this.pageWidth,color:Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100)};global.annotationCookie.setAllAnnoSteps(4,this.index-1,[c]);this.drawEllipse(this.ctx,b.x,b.y);this.drawCtx.clearRect(0,0,this.pageWidth,this.pageHeight);this.X=b.x;this.Y=b.y;global.annotationCookie.stepIndex+= 1;break;case 5:global.annotationCookie.setAllAnnoSteps(5,this.index-1,global.annotationCookie.currentSteps),global.annotationCookie.stepIndex+=1}},getPosition:function(b,c,d,e){if(isPad()||isPhone())d=c=0,"note"==e&&(c=-this.pageWidth/25,d=-this.pageHeight/28);e=BookInfo.getBook().showPage.parameters.toScale||1;b=b.originalEvent&&b.originalEvent.changedTouches?b.originalEvent.changedTouches:b.changedTouches?b.changedTouches:[b];var f=document.documentElement.scrollLeft||document.body.scrollLeft,g= document.documentElement.scrollTop||document.body.scrollTop;c=(b[0].pageX||b[0].clientX+f)-this.panelContainer.offset().left+c;b=(b[0].pageY||b[0].clientY+g)-this.panelContainer.offset().top+d;return{x:c/e,y:b/e}},showEraser:function(b,c){var d=this.getNumberFromSlider("eraser");this.eraserCircle.css({"pointer-events":"none",display:"block",background:"rgba(33,33,33,0.4)",width:d+"px",height:d+"px",left:b+"px",top:c+"px"})},drawLine:function(b,c){this.ctx.beginPath();.85<=this.getNumberFromSlider("alpha")/ 100?this.ctx.lineCap="round":this.ctx.lineCap="butt";this.ctx.lineJoin="round";this.ctx.lineWidth=this.getNumberFromSlider("width");this.ctx.strokeStyle=Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100);this.ctx.moveTo(this.X,this.Y);this.ctx.lineTo(b,c);this.ctx.stroke();this.X=b;this.Y=c},drawRect:function(b,c,d){b.beginPath();b.lineCap="round";b.lineJoin="round";b.lineWidth=this.getNumberFromSlider("width");b.strokeStyle=Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/ 100);var e=this.X,f=this.Y;0>c-this.X&&(e=c);0>d-this.Y&&(f=d);b.moveTo(e,f);b.strokeRect(e,f,Math.abs(c-this.X),Math.abs(d-this.Y));b.stroke()},drawEllipse:function(b,c,d){c=c/2+this.X/2;d=d/2+this.Y/2;var e=Math.abs(c-this.X),f=Math.abs(d-this.Y);b.lineCap="round";b.lineJoin="round";b.lineWidth=this.getNumberFromSlider("width");b.strokeStyle=Color(global.annotationPannel.inputColor.val()).rgba(this.getNumberFromSlider("alpha")/100);b.save();var g=e>f?e:f;e/=g;f/=g;b.scale(e,f);b.beginPath();b.arc(c/ e,d/f,g,0,2*Math.PI,!1);b.closePath();b.restore();b.stroke()},eraserClear:function(b,c){this.ctx.beginPath();this.ctx.stroke();this.ctx.clearRect(this.X,this.Y,this.getNumberFromSlider("eraser"),this.getNumberFromSlider("eraser"));this.X=b;this.Y=c},clearCvs:function(){this.ctx.clearRect(0,0,this.pageWidth,this.pageHeight)}}); AnnotationCookie=Class({create:function(b,c,d){this.parent=b;this.bookType=BookInfo.getBookType();this.pageWidth=c;this.pageHeight=d;this.defaultWidth=c;this.scale=this.tranScale=1;this.stepIndex=0;this.currentSteps=[];this.allAnnoSteps=[]},getCookieName:function(b){var c=bookConfig.ClientBookId?bookConfig.ClientBookId:"";return window.location.href.replace(window.location.hash,"")+c+b},getCookie:function(b){b=this.getCookieName(b);if(window.localStorage.getItem(b))return JSON.parse(window.localStorage.getItem(b))}, hasCvsCookie:function(b){for(var c=["Cookie"],d=0;d<c.length;d++){var e=this.getCookie(c[d]);if(e&&e.length&&e[b]&&e[b].length)return!0}return!1},saveCookie:function(){var b=this.getCookieName("Cookie"),c=this.getCookie("Cookie");c||(c=[]);for(var d=0;d<this.stepIndex;d++){var e=this.allAnnoSteps[d].index;if(this.isArray(e))for(var f=0;f<e.length;f++)c[e[f]]=[];else c[e]||(c[e]=[]),c[e].push(this.allAnnoSteps[d])}c=JSON.stringify(c);window.localStorage.setItem(b,c)},getPage:function(b){b=b?b+1:BookInfo.getBook().currentPageIndex; var c="";"slide"==bookConfig.FlipStyle.toLocaleLowerCase()&&BookInfo.isDoublePage(BookInfo.getBookType())?(BookInfo.getBook().pageArray[b].leftPage?c=BookInfo.getBook().pageArray[b].leftPage.pageAttachments.$animation:BookInfo.getBook().pageArray[b].rightPage&&(c=BookInfo.getBook().pageArray[b].rightPage.pageAttachments.$animation),rightToLeft&&BookInfo.getBook().pageArray[b].rightPage&&(c=BookInfo.getBook().pageArray[b].rightPage.pageAttachments.$animation)):c=BookInfo.getBook().pageArray[b].page.pageAttachments.$animation; return c},repaintCookie:function(b,c,d,e){this.pageWidth=b;this.pageHeight=c;e||(e=this.getPage(d));b&&c||(this.pageWidth=e.width(),this.pageHeight=e.height());if(this.pageWidth&&this.pageHeight&&(this.clearUnsaveCookie(),BookInfo.getBook().showPage.find("#annotationCvsPanel"+(d+1))[0]))for(b=["Note","Cookie"],BookInfo.getBook().showPage.find("#annotationCvsPanel"+(d+1))[0].getContext("2d").clearRect(0,0,this.pageWidth,this.pageHeight),c=0;c<b.length;c++){var f=this.getCookie(b[c]);if(f&&f[d])switch(b[c]){case "Note":if(!e)break; f[d]&&Object.keys(f[d]).length&&e.css({display:"block"});for(var g in f[d]){var h=f[d][g],k=h.position.x*this.pageWidth,l=h.position.y*this.pageHeight,n=e.find("#"+g),p=this.getNoteBoxSize();n[0]?(n.css({"font-size":14/this.scale+"px",left:k/this.scale+"px",top:l/this.scale+"px",width:.05*this.pageWidth/this.scale+"px",height:.05*this.pageWidth/this.scale+"px"}),isPad()||isPhone()?(n.css({width:.05*this.pageWidth/this.scale+"px",height:.05*this.pageWidth/this.scale+"px"}),n.find(".noteBox").css({top:"50%", left:"50%",transform:"translate(-50%, -50%)","-webkit-transform":"translate(-50%, -50%)"})):n.find(".noteBox").css({top:(.05*this.pageWidth+10)/this.scale+"px","-webkit-transform":"scale("+this.tranScale+")","-o-transform":"scale("+this.tranScale+")","-moz-transform":"scale("+this.tranScale+")","-ms-transform":"scale("+this.tranScale+")",transform:"scale("+this.tranScale+")","-webkit-transform-origin":"0 0","-o-transform-origin":"0 0","-moz-transform-origin":"0 0","-ms-transform-origin":"0 0","transform-origin":"0 0"}), n.find(".noteBox textarea").css({width:p.width-20+"px",height:p.height+"px"}).val(h.value),isPhone()||isPad()?n.find(".noteBox .noteTitle").css({width:p.width-82+"px"}):n.find(".noteBox .noteTitle").css({width:p.width-68+"px"}),this.refreshNoteColor(n,h.colorIndex,p)):isPhone()||isPad()?new AnnotationAddMobileNote(e,f[d][g]):new AnnotationAddNote(e,f[d][g])}break;case "Cookie":if(!f[d])return;this.putCookie(d,f[d])}}},getNoteBoxSize:function(){if(isPhone()){var b=148<parseInt(this.pageWidth/2)?148: parseInt(this.pageWidth/2);var c=80<parseInt(this.pageHeight/2)?80:parseInt(this.pageHeight/2)}else b=228<parseInt(this.pageWidth/2)?228:parseInt(this.pageWidth/2),c=100<parseInt(this.pageHeight/2)?100:parseInt(this.pageHeight/2);c>b-20&&(c=b-20);return{width:b,height:c}},refreshNoteColor:function(b,c,d){if(void 0!=c){var e=b.find(".noteBox"),f="#FFF1dc #ffe2df #e6f6ff #e7ffea #f3e9ff #d0cdc7".split(" "),g=e.find(".colorBox");b.find(".noteSvgIcon").html(this.getNoteSvg(f[c]));e.css({background:f[c]}); b=$(g.find("span")[c]);if(isPhone()||isPad())4>h&&(h=4),8<h&&(h=8),g.find("span").removeClass("active").css({margin:"10px "+h+"px;"});else{var h=(d.width-72)/7;4>h&&(h=4);g.find("span").removeClass("active").css({margin:"9px 0 9px "+h+"px","box-shadow":"0 0 0 1px rgba(11,11,11,0.3)","-webkit-box-shadow":"0 0 0 1px rgba(11,11,11,0.3)"})}b.addClass("active").css({"box-shadow":"0 0 0 2px #4BA0FF","-webkit-box-shadow":"0 0 0 2px #4BA0FF"})}},getNoteSvg:function(b){return'<svg style="position:absolute;top:0;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><defs><style>.cls-1, .cls-2 {fill-rule: evenodd;}.cls-1 {opacity: 0.85;}</style></defs><path id="\u8930\u3222\u59f8_2" data-name="\u8930\u3222\u59f8 2" class="cls-1" d="M2,0H15.917A1.98,1.98,0,0,1,18,2V13l-5,5s-8.875.063-11,0-2-2.667-2-2.667-0.062-10.562,0-13S2,0,2,0Z"/><path fill="'+ b+'" id="\u8930\u3222\u59f8_2_\u93b7\u75af\u7909" data-name="\u8930\u3222\u59f8 2 \u93b7\u75af\u7909" class="cls-2" d="M2,1H16a0.863,0.863,0,0,1,1,1c-0.031,1.156,0,10,0,10H12v5H2s-0.906.281-1-1S0.969,3,1,2A0.994,0.994,0,0,1,2,1ZM13,13h4l-4,4V13ZM4.5,5h5a0.5,0.5,0,0,1,0,1h-5A0.5,0.5,0,0,1,4.5,5Zm0,3h7a0.5,0.5,0,0,1,0,1h-7A0.5,0.5,0,0,1,4.5,8Zm0,3h5a0.5,0.5,0,0,1,0,1h-5A0.5,0.5,0,0,1,4.5,11Z"/></svg>'},putCookie:function(b,c){if(BookInfo.getBook().showPage.find("#annotationCvsPanel"+(b+1))[0]&&(BookInfo.getBook().showPage.find("#annotationCvsPanel"+ (b+1))[0].getContext("2d"),c))for(var d=0;d<c.length;d++){var e=c[d].cookie,f=c[d].type;var g=BookInfo.getBook().showPage.find("#annotationCvsPanel"+(b+1))[0].getContext("2d");if("Clear"==f)for(var h=BookInfo.getCurrentPages(),k=0;k<h.length;k++){g=BookInfo.getBook().showPage.find("#annotationCvsPanel"+h[k])[0];if(!g)return;g=g.getContext("2d");g.clearRect(0,0,this.pageWidth,this.pageHeight)}for(h=0;h<e.length;h++)switch(f){case "Pen":this.drawLine(g,e[h]);break;case "Rect":this.drawRect(g,e[h]); break;case "Round":this.drawRound(g,e[h]);break;case "Eraser":this.drawClear(g,e[h])}}},stepPaint:function(b,c,d){if("Clear"!=b)var e=BookInfo.getBook().showPage.find("#annotationCvsPanel"+(c+1))[0].getContext("2d");for(var f=0;f<d.length;f++)switch(b){case "Pen":this.drawLine(e,d[f]);break;case "Rect":this.drawRect(e,d[f]);break;case "Round":this.drawRound(e,d[f]);break;case "Eraser":this.drawClear(e,d[f]);break;case "Clear":for(var g=0;g<c.length;g++)e=BookInfo.getBook().showPage.find("#annotationCvsPanel"+ (c[g]+1))[0].getContext("2d"),e.clearRect(0,0,this.pageWidth,this.pageHeight)}},repaintSteps:function(){if(this.allAnnoSteps.length){for(var b=BookInfo.getCurrentPages(),c=0;c<b.length;c++)BookInfo.getBook().showPage.find("#annotationCvsPanel"+b[c])[0].getContext("2d").clearRect(0,0,this.pageWidth,this.pageHeight),this.hasCvsCookie(b[c]-1)&&this.putCookie(b[c]-1,this.getCookie("Cookie")[b[c]-1]);for(b=0;b<this.stepIndex;b++)this.stepPaint(this.allAnnoSteps[b].type,this.allAnnoSteps[b].index,this.allAnnoSteps[b].cookie)}}, clearUnsaveCookie:function(){this.stepIndex=0;this.currentSteps=[];this.allAnnoSteps=[]},deleteNoteCookie:function(b,c,d){var e=this.getCookieName(b);b=this.getCookie(b);delete b[c][d];Object.keys(b[c]).length?(b=JSON.stringify(b),window.localStorage.setItem(e,b)):b.length?(b=JSON.stringify(b),window.localStorage.setItem(e,b)):window.localStorage.removeItem(e)},isArray:function(b){return"[object Array]"==Object.prototype.toString.call(b)},drawRound:function(b,c){if(this.isFullConfig(c)){var d=(c.x/ 2+c.startX/2)*this.pageWidth,e=(c.y/2+c.startY/2)*this.pageHeight,f=Math.abs(d-c.startX*this.pageWidth),g=Math.abs(e-c.startY*this.pageHeight);b.lineCap="round";b.lineJoin="round";b.lineWidth=parseInt(c.lineWidth*this.pageWidth);b.strokeStyle=c.color;b.save();c=f>g?f:g;f/=c;g/=c;b.scale(f,g);b.beginPath();b.arc(d/f,e/g,c,0,2*Math.PI,!1);b.closePath();b.restore();b.stroke()}},drawRect:function(b,c){if(this.isFullConfig(c)){b.beginPath();b.lineCap="round";b.lineJoin="round";b.lineWidth=c.lineWidth* this.pageWidth;b.strokeStyle=c.color;var d=c.startX*this.pageWidth,e=c.startY*this.pageHeight;0>c.x-c.startX&&(d=c.x*this.pageWidth);0>c.y-c.startY&&(e=c.y*this.pageHeight);b.moveTo(d,e);b.strokeRect(d,e,Math.abs(c.x-c.startX)*this.pageWidth,Math.abs(c.y-c.startY)*this.pageHeight);b.stroke()}},drawLine:function(b,c){this.isFullConfig(c)&&(b.lineCap=.85<=c.opacity?"round":"butt",b.lineJoin="round",b.lineWidth=c.lineWidth*this.pageWidth,b.strokeStyle=c.color,b.beginPath(),b.moveTo(c.startX*this.pageWidth, c.startY*this.pageHeight),b.lineTo(c.x*this.pageWidth,c.y*this.pageHeight),b.stroke(),b.closePath())},drawClear:function(b,c){b&&c.x&&c.y&&c.lineWidth&&(b.beginPath(),b.clearRect(c.x*this.pageWidth,c.y*this.pageHeight,c.lineWidth*this.pageWidth,c.lineWidth*this.pageWidth),b.stroke(),b.closePath())},isFullConfig:function(b){return b&&b.startX&&b.startY&&b.x&&b.y&&b.lineWidth&&b.color},onResize:function(b,c,d){this.scale=d;this.tranScale=b/this.defaultWidth;this.pageWidth=b;this.pageHeight=c},setAllAnnoSteps:function(b, c,d){this.allAnnoSteps.length>this.stepIndex&&(this.allAnnoSteps.length=this.stepIndex);switch(b){case 2:this.allAnnoSteps.push({type:"Pen",index:c,cookie:d});break;case 3:this.allAnnoSteps.push({type:"Rect",index:c,cookie:d});break;case 4:this.allAnnoSteps.push({type:"Round",index:c,cookie:d});break;case 5:this.allAnnoSteps.push({type:"Eraser",index:c,cookie:d});break;case 11:this.allAnnoSteps.push({type:"Clear",index:c,cookie:d})}},saveNoteCookie:function(b,c,d,e){var f=this.getCookieName(b);(b= this.getCookie(b))||(b=[]);b[c]||(b[c]={});b[c][d]=e;b=JSON.stringify(b);window.localStorage.setItem(f,b)}}); var GrayShadow=Class({create:function(b){this.grayShadow=$("<div class='grayShadow'></div>");var c=$("<div class='kong edgeShadow' ></div>");this.grayShadow.append(c);b.append(this.grayShadow)},show:function(){this.grayShadow.show()},hide:function(){this.grayShadow.hide()},onResize:function(){}}),PageHighlightsFlipShadow=Class({create:function(b,c){this.parent=b;this.pageIndex=c;this.init()},init:function(){bookConfig.FlipDirection?(this.flipBackShadow=$("<div class='flip-vertical-shadowB'></div>"), this.flipFrontShadow=$("<div class='flip-vertical-topshadow2'></div>"),this.flipFrontHighlightShadow=$("<div class='flip-vertical-top-hightlight-shadow'></div>"),this.flipFrontEdgeShadow=$("<div class='flip-vertical-top-edge-shadow'></div>"),this.flipFrontTopHighlightShadow=$("<div class='flip-vertical-front-top-hightlight-shadow'></div>")):(this.flipBackShadow=$("<div class='flip-shadowB2'></div>"),this.flipFrontShadow=$("<div class='flip-topshadow2'></div>"),this.flipFrontHighlightShadow=$("<div class='flip-top-hightlight-shadow'></div>"), this.flipFrontEdgeShadow=$("<div class='flip-top-edge-shadow'></div>"),this.flipFrontTopHighlightShadow=$("<div class='flip-front-top-hightlight-shadow'></div>"));this.parent.append(this.flipBackShadow);this.parent.append(this.flipFrontShadow);this.parent.append(this.flipFrontEdgeShadow);this.parent.append(this.flipFrontHighlightShadow);this.parent.append(this.flipFrontTopHighlightShadow)},flip:function(b,c,d){var e=b.shadowRate;d=b.rotate;var f=.9<e?1+2*(1-e)/.1:3*e/.9;e=.9<e?(1-e)/.1:.1>e?1*e/.1: 1;var g=1,h=(b.frontShadowDistance-(90<d?0:260*Math.min(1,b.frontShadowDistance/260)))/Math.cos(d*Math.PI/180),k=(b.frontShadowDistance-3-(90<d?0:18))/Math.cos(d*Math.PI/180),l=(b.frontShadowDistance-(90<d?0:3))/Math.cos(d*Math.PI/180),n=(b.frontShadowDistance-23*Math.min(1,b.frontShadowDistance/260)-(90<d?0:78*Math.min(1,b.frontShadowDistance/260)))/Math.cos(d*Math.PI/180);21>=b.frontShadowDistance&&(g=b.frontShadowDistance/21,l=(b.frontShadowDistance-(90<d?0:3*g))/Math.cos(d*Math.PI/180),k=(b.frontShadowDistance- 3*g-(90<d?0:18*g))/Math.cos(d*Math.PI/180));bookConfig.FlipDirection?(h=transformCSS({scaleY:Math.min(1,b.frontShadowDistance/260),rotate:-d,tran:{x:0,y:h}}),k=transformCSS({scaleY:g,rotate:-d,tran:{x:0,y:k}}),g=transformCSS({scaleY:g,rotate:-d,tran:{x:0,y:l}}),n=transformCSS({scaleY:Math.min(1,b.frontShadowDistance/260),rotate:-d,tran:{x:0,y:n}}),f=transformCSS({scaleY:f,rotate:d,tran:{x:-b.maskTranY,y:b.maskTranX}})):(h=transformCSS({scaleX:Math.min(1,b.frontShadowDistance/260),rotate:-d,tran:{x:h, y:0}}),k=transformCSS({scaleX:g,rotate:-d,tran:{x:k,y:0}}),g=transformCSS({scaleX:g,rotate:-d,tran:{x:l,y:0}}),n=transformCSS({scaleX:Math.min(1,b.frontShadowDistance/260),rotate:-d,tran:{x:n,y:0}}),f=transformCSS({scaleX:f,rotate:d,tran:{x:b.maskTranX,y:b.maskTranY}}));this.flipBackShadow.css(f);this.flipFrontShadow.css(h);this.flipFrontHighlightShadow.css(k);this.flipFrontEdgeShadow.css(g);this.flipFrontTopHighlightShadow.css(n);this.beforeFlip(d,c);c=.34*b.frontShadowDistance/260;260<b.frontShadowDistance&& (c=.34*e);this.flipFrontEdgeShadow.css({opacity:.5*e});this.flipFrontHighlightShadow.css({opacity:.34*e});this.flipFrontShadow.css({opacity:c});this.flipBackShadow.css({opacity:.3*e});this.flipFrontTopHighlightShadow.css({opacity:c})},beforeFlip:function(b,c){var d={};c?(this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"}),d.visibility="visible"):(this.flipBackShadow&&this.flipBackShadow.css({visibility:"visible"}),d.visibility="hidden");bookConfig.FlipDirection?(90<b?(d.bottom="0px", this.flipBackShadow.css({top:"100%"})):(d.bottom="auto",this.flipBackShadow.css({top:"0px"})),c=0<=b&&180>b?100/3:100*(this.width+this.maskWidth)/(3*this.maskWidth),b=90<b?100:0):(90<b?(d.right="0",this.flipBackShadow.css({left:"100%"})):(d.right="auto",this.flipBackShadow.css({left:"0px"})),c=90<b?100:0,b=0<=b&&180>b?100*(this.height+this.maskWidth)/(3*this.maskWidth):100/3);d["transform-origin"]=c+"% "+b+"%";d["-webkit-transform-origin"]=c+"% "+b+"%";d["-moz-transform-origin"]=c+"% "+b+"%";d["-ms-transform-origin"]= c+"% "+b+"%";this.flipFrontShadow.css(d);this.flipFrontHighlightShadow.css(d);this.flipFrontEdgeShadow.css(d);this.flipFrontTopHighlightShadow.css(d)},clear:function(){this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"});this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"});this.flipFrontHighlightShadow&&this.flipFrontHighlightShadow.css({visibility:"hidden"});this.flipFrontEdgeShadow&&this.flipFrontEdgeShadow.css({visibility:"hidden"});this.flipFrontTopHighlightShadow&& this.flipFrontTopHighlightShadow.css({visibility:"hidden"})},resize:function(b,c){this.width=b;this.height=c;this.maskWidth=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));bookConfig.FlipDirection?(this.flipFrontShadow.css({width:3*this.maskWidth,left:-this.maskWidth}),this.flipFrontTopHighlightShadow.css({width:3*this.maskWidth,left:-this.maskWidth}),this.flipFrontEdgeShadow.css({width:3*this.maskWidth,left:-this.maskWidth}),this.flipFrontHighlightShadow.css({width:3*this.maskWidth,left:-this.maskWidth}), this.flipBackShadow.css({width:this.maskWidth,left:(this.width-this.maskWidth)/2})):(this.flipFrontTopHighlightShadow.css({height:3*this.maskWidth,top:-this.maskWidth}),this.flipFrontEdgeShadow.css({height:3*this.maskWidth,top:-this.maskWidth}),this.flipFrontHighlightShadow.css({height:3*this.maskWidth,top:-this.maskWidth}),this.flipFrontShadow.css({height:3*this.maskWidth,top:-this.maskWidth}),this.flipBackShadow.css({height:this.maskWidth,top:(this.height-this.maskWidth)/2}))}}),PageFlipShadow= Class({create:function(b,c){this.parent=b;this.pageIndex=c;this.init()},init:function(){bookConfig.FlipDirection?(this.flipBackShadow=$("<div class='flip-vertical-shadowB'></div>"),this.flipFrontShadow=$("<div class='flip-vertical-topshadow'></div>")):(this.flipBackShadow=$("<div class='flip-shadowB'></div>"),this.flipFrontShadow=$("<div class='flip-topshadow'></div>"));this.parent.append(this.flipBackShadow);this.parent.append(this.flipFrontShadow)},flip:function(b,c,d){var e=b.shadowRate;d=b.rotate; var f=.9<e?1+2*(1-e)/.1:3*e/.9;if(isPhone()||isPad())f=1;e=.9<e?.2*(1-e)/.1:.1>e?.2*e/.1:.2;if(bookConfig.FlipDirection){var g=transformCSS({scaleY:f,rotate:-d,tran:{x:0,y:(b.frontShadowDistance-100*(90<d?0:f))/Math.cos(d*Math.PI/180)}});b=transformCSS({scaleY:f,rotate:d,tran:{x:-b.maskTranY,y:b.maskTranX}})}else g=transformCSS({scaleX:f,rotate:-d,tran:{x:(b.frontShadowDistance-100*(90<d?0:f))/Math.cos(d*Math.PI/180),y:0}}),b=transformCSS({scaleX:f,rotate:d,tran:{x:b.maskTranX,y:b.maskTranY}});this.flipFrontShadow.css(g); this.flipBackShadow.css(b);this.beforeFlip(d,c);isPhone()||isPad()||(this.flipFrontShadow.css({opacity:e}),this.flipBackShadow.css({opacity:e}))},beforeFlip:function(b,c){c?(this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"visible"})):(this.flipBackShadow&&this.flipBackShadow.css({visibility:"visible"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"}));bookConfig.FlipDirection?(90<b?(this.flipFrontShadow.css({bottom:"0px"}), this.flipBackShadow.css({top:"100%"})):(this.flipFrontShadow.css({bottom:"auto"}),this.flipBackShadow.css({top:"0px"})),c=0<=b&&180>b?100/3:100*(this.width+this.maskWidth)/(3*this.maskWidth),b=90<b?100:0):(90<b?(this.flipFrontShadow.css({right:"0px"}),this.flipBackShadow.css({left:"100%"})):(this.flipFrontShadow.css({right:"auto"}),this.flipBackShadow.css({left:"0px"})),c=90<b?100:0,b=0<=b&&180>b?100*(this.height+this.maskWidth)/(3*this.maskWidth):100/3);this.flipFrontShadow.css({"transform-origin":c+ "% "+b+"%","-webkit-transform-origin":c+"% "+b+"%","-moz-transform-origin":c+"% "+b+"%","-ms-transform-origin":c+"% "+b+"%"})},clear:function(){this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"});this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"})},resize:function(b,c){this.width=b;this.height=c;this.maskWidth=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));bookConfig.FlipDirection?(this.flipFrontShadow.css({width:3*this.maskWidth,left:-this.maskWidth}),this.flipBackShadow.css({width:this.maskWidth, left:(this.width-this.maskWidth)/2})):(this.flipFrontShadow.css({height:3*this.maskWidth,top:-this.maskWidth}),this.flipBackShadow.css({height:this.maskWidth,top:(this.height-this.maskWidth)/2}))}}),HardPageFlipShadow=Class({init:function(){this._super();var b=Color(bookConfig.thicknessColor);this.flipThickWidth=getMaxThicknessWidth()/5;this.flipThick=bookConfig.FlipDirection?$("<div class='flip-vertical-thick'></div>"):$("<div class='flip-thick'></div>");this.flipThick.css({background:b.reduce(50)}); this.parent.append(this.flipThick)},flip:function(b,c){var d=b.shadowRate?b.shadowRate:0;d=.5>d?2*d:2*(1-d);var e={"background-image":"none","box-shadow":"rgba(0,0,0,0.3) 0 0 2000px 5000px inset",width:"100%",height:"100%",top:0,left:0};this.flipFrontShadow.css(e);this.flipFrontShadow.css({opacity:d});this.flipBackShadow.css(e);this.flipBackShadow.css({opacity:d});b=bookConfig.FlipDirection?transformCSS({perspective:5E3,rotateX:-b.rotate,scaleY:this.flipThickWidth/6*d}):transformCSS({perspective:5E3, rotateY:-b.rotate,scaleX:this.flipThickWidth/6*d});this.flipThick.css(b);c?(this.flipBackShadow&&this.flipBackShadow.css({visibility:"hidden"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"visible"})):(this.flipBackShadow&&this.flipBackShadow.css({visibility:"visible"}),this.flipFrontShadow&&this.flipFrontShadow.css({visibility:"hidden"}));this.flipThick&&this.flipThick.css({visibility:"visible"})}}).extend(PageFlipShadow),CoverShadow=Class({create:function(b,c){this.parent=b;this.direction= bookConfig.FlipDirection;this.init()},init:virtual_function,destroy:virtual_function,onResize:function(){this.direction?(this.parentWidth=this.parent.height(),this.parentHeight=this.parent.width(),this.rotate.delay(this,1)):(this.parentWidth=this.parent.width(),this.parentHeight=this.parent.height())},rotate:function(){var b=transformCSS({rotate:90,tran:{x:this.parentHeight,y:0},origin:{x:0,y:0}});this.flip&&(b=transformCSS({scaleX:-1,rotate:90,tran:{x:this.parentHeight,y:this.parentWidth},origin:{x:0, y:0}}));this.coverShadow&&(this.coverShadow.css({width:this.parentWidth+"px",height:this.parentHeight+"px"}),this.coverShadow.css(b))}}),HardCoverShadow=Class({init:function(){this.coverShadow=$('<div class="cover_shadow"></div>');isBelowIE11()&&this.coverShadow.css("z-index",3);this.leftBorder=$("<div></div>");this.topBorder=$('<div class="hard_top_border"></div>');this.bottomBorder=$('<div class="hard_bottom_border hard_bottom_border_width"></div>');this.rightBorder=$('<div class="hard_right_border"></div>'); this.parent.append(this.coverShadow);this.coverShadow.append(this.leftBorder);this.coverShadow.append(this.topBorder);this.coverShadow.append(this.bottomBorder);this.coverShadow.append(this.rightBorder)},onResize:function(){this._super();this.rightBorder.css({height:this.parentHeight-3+"px"})},destroy:function(){this.coverShadow.empty();this.coverShadow.remove()}}).extend(CoverShadow),OuterHardCoverShadow=Class({create:function(b,c,d){this.style=c;this.flip=!!d;this._super(b)},init:function(){this._super(); this.leftBorder.addClass("hard_left_border");this.leftBody=$('<div class="hard_left_body"></div>');this.coverShadow.append(this.leftBody);this.coverShadow.addClass(this.style);this.flip&&this.coverShadow.addClass("flip_x");this.onResize()}}).extend(HardCoverShadow),InnerHardCoverShadow=Class({create:function(b,c,d,e,f){this.style=c;this.flip=!!d;void 0==e&&(e=0);this.borderWidth=e;this.showLeftShadow=f;this._super(b)},init:function(){this._super();this.showLeftShadow?(this.leftBorder.addClass("hard_inner_left_border"), this.leftCoverBorder=$('<div class="hard_left_cover_border"></div>'),this.coverShadow.append(this.leftCoverBorder)):this.leftBorder.css({display:"none"});this.flip&&this.coverShadow.addClass("flip_x");this.onResize()},onResize:function(){this._super();this.showLeftShadow&&(this.bottomBorder.css({left:"0px",width:"100%"}),this.leftBorder.css({top:this.borderWidth+"px",height:this.parentHeight-2*this.borderWidth+"px"}));this.flip?0!=bookConfig.LeftShadowAlpha&&0!=bookConfig.LeftShadowWidth||this.coverShadow.css("z-index", -1):0!=bookConfig.RightShadowAlpha&&0!=bookConfig.RightShadowWidth||this.coverShadow.css("z-index",-1)}}).extend(HardCoverShadow),NormalCoverShadow=Class({create:function(b,c,d){this.style=c;this.flip=!!d;this._super(b)},init:function(){this.coverShadow=$('<div class="cover_shadow"></div>');this.coverShadow.addClass(this.style);isBelowIE11()&&this.coverShadow.css("z-index",3);this.leftBorder=$('<div class="normal_left_border"></div>');this.leftBody=$('<div class="normal_left_body"></div>');this.parent.append(this.coverShadow); this.coverShadow.append(this.leftBorder);this.coverShadow.append(this.leftBody);if("saddle"==this.style){var b=$("<div class='top_nail'></div>"),c=$("<div class='bottom_nail'></div>");"book"==bookConfig.pageHighlightType&&(this.leftBorder.css({"background-image":"url("+uiBaseURL+"left-shadow1.png)"}),this.leftBody.css({left:0}));this.leftBody.append(b);this.leftBody.append(c)}this.flip&&this.coverShadow.addClass("flip_x");this.onResize()},destroy:function(){this.coverShadow.empty();this.coverShadow.remove()}, onResize:function(){this._super();if("saddle"==this.style){var b=Math.min(parseInt(87/450*this.parentWidth),87);this.leftBorder.css("width",b+"px");this.leftBody.find("div").css({width:Math.round(2/600*this.parentWidth)+"px",height:Math.round(.075*this.parentHeight)+"px"})}}}).extend(CoverShadow),PageShadow=Class({create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=d;this.isHardPage=parseBool(bookConfig.HardPageEnable)&&!isBelowIE11();this.bindingType=bookConfig.BindingType;this.bindingType|| (this.bindingType="side");this.midShadow=this.coverShadow=null},addShadow:function(){this.isEmpty()||this.destroy();this.addCoverShadow();var b=parseBool(bookConfig.addPaperCoil);null!=this.coverShadow||b||bookConfig.HardInnerPageEnable?this.hidePageShadow():this.addPageShadow();this.onResize()},isEmpty:function(){return null==this.coverShadow&&null==this.midShadow},addCoverShadow:function(){this.coverShadow=this.createCoverShadow()},createCoverShadow:virtual_function,addPageShadow:function(){this.midShadow= this.findPageShadow();if(!this.midShadow&&(this.midShadow=$("<div name='midShadow'></div>"),_agent_.system.name==_agent_.system.IOS)){var b=transformCSS({tran:{x:0,y:0},rotate:0},!0);this.midShadow.css(b)}this.isLeftPage?(bookConfig.FlipDirection?this.midShadow.attr("class","upShadow"):this.midShadow.attr("class","leftShadow"),b=bookConfig.LeftShadowAlpha):(bookConfig.FlipDirection?this.midShadow.attr("class","downShadow"):this.midShadow.attr("class","rightShadow"),b=bookConfig.RightShadowAlpha); "magazine"==bookConfig.pageHighlightType?this.midShadow.addClass("magazine"):this.midShadow.addClass("book");this.midShadow.css({opacity:b});this.parent.append(this.midShadow)},findPageShadow:function(){if(this.midShadow)return this.midShadow;var b=this.parent.children("div[name=midShadow]");return b[0]?$(b[0]):null},hidePageShadow:function(){(this.midShadow=this.findPageShadow())&&this.midShadow.css({display:"none"})},resizePageShadow:function(b){this.midShadow=this.findPageShadow();if(null!=this.midShadow){var c= bookConfig.LeftShadowWidth;this.isLeftPage||(c=bookConfig.RightShadowWidth);c=parseInt(c/450*b);bookConfig.FlipDirection?this.midShadow.css({height:c+"px"}):this.midShadow.css({width:c+"px"})}},onResize:function(b,c){void 0==b?(this.parentWidth=this.parent.width(),this.parentHeight=this.parent.height()):(this.parentWidth=b,this.parentHeight=c);if(this.coverShadow)this.coverShadow.onResize();this.resizePageShadow(this.parentWidth)},destroy:function(){null!=this.coverShadow&&(this.coverShadow.destroy(), this.coverShadow=null);null!=this.midShadow&&(this.midShadow.remove(),this.midShadow=null)}}),NormalPageShadow=Class({create:function(b,c,d){this._super(b,c,d);this.evenPageCount=totalPageCount},createCoverShadow:function(){var b=1==this.pageIndex&&!bookConfig.isTheBookOpen,c=2==this.pageIndex&&!bookConfig.isTheBookOpen||1==this.pageIndex&&bookConfig.isTheBookOpen,d=this.pageIndex==this.evenPageCount,e=this.pageIndex==this.evenPageCount-1,f=4<this.evenPageCount&&!bookConfig.isTheBookOpen||3<this.evenPageCount&& bookConfig.isTheBookOpen,g=this.isLeftPage;if(this.isHardPage){if(b||d)return new OuterHardCoverShadow(this.parent,this.bindingType,g);if(c||e)return new InnerHardCoverShadow(this.parent,this.bindingType,g,bookConfig.hardCoverBorderWidth,f)}else if(b||d)return new NormalCoverShadow(this.parent,this.bindingType,g);return null}}).extend("PageShadow"),SinglePageShadow=Class({create:function(b,c,d){this._super(b,c,d);this.isRightToLeft=parseBool(bookConfig.RightToLeft)},createCoverShadow:function(){var b= 1==this.pageIndex,c=this.pageIndex==bookConfig.totalPageCount;if(this.isHardPage){if(b)return new OuterHardCoverShadow(this.parent,this.bindingType,this.isRightToLeft);if(c)return new InnerHardCoverShadow(this.parent,this.bindingType,this.isRightToLeft,bookConfig.hardCoverBorderWidth,!0)}else if(b)return new NormalCoverShadow(this.parent,this.bindingType,this.isRightToLeft);return null}}).extend("PageShadow"),CatalogPageShadow=Class({create:function(b,c,d){this._super(b,c,d);this.evenPageCount=totalPageCount; this.bindingType="catalog"},createCoverShadow:function(){var b=1==this.pageIndex&&!bookConfig.isTheBookOpen,c=2==this.pageIndex&&!bookConfig.isTheBookOpen||1==this.pageIndex&&bookConfig.isTheBookOpen,d=this.pageIndex==this.evenPageCount,e=this.pageIndex==this.evenPageCount-1,f=4<this.evenPageCount&&!bookConfig.isTheBookOpen||3<this.evenPageCount&&bookConfig.isTheBookOpen,g=this.isLeftPage;if(this.isHardPage){if(b||d)return new OuterHardCoverShadow(this.parent,this.bindingType,g);if(c||e)return new InnerHardCoverShadow(this.parent, this.bindingType,g,0,f)}else if(b||d)return new NormalCoverShadow(this.parent,this.bindingType,g);return null}}).extend("PageShadow"),SlidePageShadow=Class({createCoverShadow:function(){},addShadow:function(){}}).extend("PageShadow"),PageTexture=Class({create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=d;this.isHardPage=parseBool(bookConfig.HardPageEnable)&&!isBelowIE11();this.borderWidth=bookConfig.hardCoverBorderWidth-4;this.initResource()},initResource:function(){this.name=bookConfig.coverTexture; this.resource=PageTextureResource[this.name]},render:function(){this.isEmpty()||this.destroy();this.isCover&&this.renderCover()},isEmpty:function(){return null==this.texture},renderPage:function(){this.texture=null},renderCover:function(){this.resource&&(this.renderTexture(),this.renderSewing(),this.onResize())},renderTexture:function(){this.texture=$("<div id='page_texture'></div>");this.texture.css({position:"absolute","pointer-events":"none","z-index":1,width:"100%",height:"100%"});this.parent.append(this.texture); var b=uiBaseURL+this.resource.texture;this.isOutCover?this.texture.css({"background-image":"url("+b+")","background-repeat":"repeat"}):this.parent.css({"background-image":"url("+b+")","background-repeat":"repeat"})},renderSewing:function(){if(!(0>=this.borderWidth)&&this.resource.sewing){var b=this.resource.sewing;this.isInnerCover&&(b=BorderSewing.flat);bookConfig.FlipDirection?(this.left_texture=$("<div id='left_texture'></div>"),this.left_texture.css({position:"absolute",top:this.borderWidth+"px", left:this.borderWidth+"px",width:b.right.width+"px","background-image":"url("+uiBaseURL+b.left.url+")","background-repeat":"repeat-y"}),this.texture.append(this.left_texture)):(this.top_texture=$("<div id='top_texture'></div>"),this.top_texture.css({position:"absolute",top:this.borderWidth+"px",left:this.borderWidth+"px",height:b.top.height+"px","background-image":"url("+uiBaseURL+b.top.url+")","background-repeat":"repeat-x"}),this.texture.append(this.top_texture));this.right_texture=$("<div id='right_texture'></div>"); this.right_texture.css({position:"absolute",top:this.borderWidth+"px",right:this.borderWidth+"px",width:b.right.width+"px","background-image":"url("+uiBaseURL+b.right.url+")","background-repeat":"repeat-y"});this.texture.append(this.right_texture);this.bottom_texture=$("<div id='bottom_texture'></div>");this.bottom_texture.css({position:"absolute",bottom:this.borderWidth+"px",right:this.borderWidth+"px",height:b.bottom.height+"px","background-image":"url("+uiBaseURL+b.bottom.url+")","background-repeat":"repeat-x"}); this.texture.append(this.bottom_texture);this.isLeftPage&&(bookConfig.FlipDirection?(this.bottom_texture.addClass("flip_y"),this.bottom_texture.css({top:this.borderWidth+"px",bottom:"auto"}),this.left_texture&&this.left_texture.css({bottom:this.borderWidth+"px",top:"auto"}),this.right_texture.css({bottom:this.borderWidth+"px",top:"auto"})):(this.right_texture.addClass("flip_x"),this.right_texture.css({left:this.borderWidth+"px",right:"auto"}),this.top_texture&&this.top_texture.css({right:this.borderWidth+ "px",left:"auto"}),this.bottom_texture.css({right:this.borderWidth+"px",left:"auto"})));this.resource.sewing.renderBorder&&this.renderBorder()}},renderBorder:function(){0!=this.borderWidth&&(bookConfig.FlipDirection?(this.left_texture_border=$("<div id='left_texture_border'></div>"),this.left_texture_border.css({position:"absolute",left:"0px",width:this.borderWidth+"px",height:"100%","background-image":_agent_.browser.prefix+"linear-gradient(left, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}), this.texture.append(this.left_texture_border)):(this.top_texture_border=$("<div id='top_texture_border'></div>"),this.top_texture_border.css({position:"absolute",top:"0px",width:"100%",height:this.borderWidth+"px","background-image":_agent_.browser.prefix+"linear-gradient(top, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}),this.texture.append(this.top_texture_border)),this.right_texture_border=$("<div id='right_texture_border'></div>"),this.right_texture_border.css({position:"absolute", right:"0px",width:this.borderWidth+"px",height:"100%","background-image":_agent_.browser.prefix+"linear-gradient(right, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}),this.texture.append(this.right_texture_border),this.bottom_texture_border=$("<div id='bottom_texture_border'></div>"),this.bottom_texture_border.css({position:"absolute",bottom:"0px",width:"100%",height:this.borderWidth+"px","background-image":_agent_.browser.prefix+"linear-gradient(bottom, rgba(220,220,220,0) 0%, rgba(220,220,220,0.2) 50%, rgba(220,220,220,0) 100%)"}), this.texture.append(this.bottom_texture_border),this.isLeftPage&&(bookConfig.FlipDirection?this.bottom_texture_border.css({top:"0px",bottom:"auto"}):this.right_texture_border.css({left:"0px",right:"auto"})))},onResize:function(){this.parentWidth=this.parent.width();this.parentHeight=this.parent.height();this.top_texture&&this.top_texture.css({width:this.parentWidth-2*this.borderWidth+"px"});this.left_texture&&this.left_texture.css({height:this.parentHeight-2*this.borderWidth+"px"});this.right_texture&& this.right_texture.css({height:this.parentHeight-2*this.borderWidth+"px"});this.bottom_texture&&this.bottom_texture.css({width:this.parentWidth-2*this.borderWidth+"px"})},destroy:function(){this.texture&&(this.texture.remove(),this.texture=null);this.top_texture&&(this.top_texture.remove(),this.top_texture=null);this.left_texture&&(this.left_texture.remove(),this.left_texture=null);this.right_texture&&(this.right_texture.remove(),this.right_texture=null);this.bottom_texture&&(this.bottom_texture.remove(), this.bottom_texture=null);this.left_texture_border&&(this.left_texture_border.remove(),this.left_texture_border=null);this.top_texture_border&&(this.top_texture_border.remove(),this.top_texture_border=null);this.right_texture_border&&(this.right_texture_border.remove(),this.right_texture_border=null);this.bottom_texture_border&&(this.bottom_texture_border.remove(),this.bottom_texture_border=null)}}),NormalPageTexture=Class({create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c&&!bookConfig.isTheBookOpen|| c==totalPageCount;this.isInnerCover=2==c&&!bookConfig.isTheBookOpen||1==c&&bookConfig.isTheBookOpen||c==totalPageCount-1;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture"),SinglePageTexture=Class({create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c;this.isInnerCover=c==bookConfig.totalPageCount;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture"),CatalogPageTexture=Class({create:function(b,c,d){this._super(b,c,d);this.isOutCover=1==c&&!bookConfig.isTheBookOpen|| c==totalPageCount;this.isInnerCover=2==c&&!bookConfig.isTheBookOpen||1==c&&bookConfig.isTheBookOpen||c==totalPageCount-1;this.isCover=this.isOutCover||this.isInnerCover}}).extend("PageTexture"),SlidePageTexture=Class({create:function(b,c,d){this._super(b,c,d);this.isCover=!1}}).extend("PageTexture"),BorderSewing={deep:{top:{url:"deep_top_sewing.png",width:28,height:42},left:{url:"deep_left_sewing.png",width:71,height:28},right:{url:"deep_right_sewing.png",width:71,height:28},bottom:{url:"deep_bottom_sewing.png", width:28,height:42},renderBorder:!0},normal:{top:{url:"normal_top_sewing.png",width:28,height:10},left:{url:"normal_left_sewing.png",width:10,height:28},right:{url:"normal_right_sewing.png",width:10,height:28},bottom:{url:"normal_bottom_sewing.png",width:28,height:20},renderBorder:!0},flat:{top:{url:"flat_top_sewing.png",width:28,height:10},left:{url:"flat_left_sewing.png",width:10,height:28},right:{url:"flat_right_sewing.png",width:10,height:28},bottom:{url:"flat_bottom_sewing.png",width:28,height:10}, renderBorder:!1}},PageTextureResource={leather1:{texture:"leather1.png",sewing:BorderSewing.deep},leather2:{texture:"leather2.png",sewing:BorderSewing.normal},cloth1:{texture:"cloth1.png",sewing:BorderSewing.flat},cloth2:{texture:"cloth2.png",sewing:BorderSewing.flat},cloth3:{texture:"cloth3.png",sewing:BorderSewing.flat},cloth4:{texture:"cloth4.png",sewing:BorderSewing.normal},cardboard1:{texture:"cardboard1.png",sewing:null},cardboard2:{texture:"cardboard2.png",sewing:null},cardboard3:{texture:"cardboard3.png", sewing:null},silk1:{texture:"silk1.png",sewing:BorderSewing.flat},silk2:{texture:"silk2.png",sewing:BorderSewing.flat},silk3:{texture:"silk3.png",sewing:BorderSewing.flat},silk4:{texture:"silk4.png",sewing:BorderSewing.flat},wood1:{texture:"wood1.png",sewing:null},wood2:{texture:"wood2.png",sewing:null}},PageRendering=Class({create:function(b,c,d){this.parent=b;this.pageIndex=c;this.isLeftPage=getPageDirection(c,d);this.pageShadow=getPageShadow(b,c,this.isLeftPage,d);this.pageTexture=getPageTexture(b, c,this.isLeftPage,d);this.grayshadow=getGrayShadow(b,c,this.isLeftPage,d)},render:function(){this.addCoil();this.addPageShadow();this.addPageTexture()},addCoil:function(){if("loose2"==bookConfig.BindingType)this.addCoil2();else if(parseBool(bookConfig.addPaperCoil)){var b=$("<div class='coil'></div>");this.midCoil=$("<div style='z-index:6;'></div>");bookConfig.FlipDirection?this.isLeftPage?(b.attr("class","upPaperCoil"),this.midCoil.attr("class","upPaperCoil_bg")):(b.attr("class","downPaperCoil"), this.midCoil.attr("class","downPaperCoil_bg")):this.isLeftPage?(b.attr("class","leftPaperCoil"),this.midCoil.attr("class","leftPaperCoil_bg")):(b.attr("class","rightPaperCoil"),this.midCoil.attr("class","rightPaperCoil_bg"));this.midCoil.append(b);!bookConfig.HardPageEnable||1!=this.pageIndex&&this.pageIndex!=totalPageCount||this.midCoil.css("background-image","none");this.parent.append(this.midCoil)}},addCoil2:function(){if(parseBool(bookConfig.addPaperCoil)){var b=$("<div class='coil'></div>"); this.midCoil=$("<div style='z-index:6;'></div>");bookConfig.FlipDirection?this.isLeftPage?(b.attr("class","upPaperCoil2"),this.midCoil.attr("class","upPaperCoil2_bg")):(b.attr("class","downPaperCoil2"),this.midCoil.attr("class","downPaperCoil2_bg")):this.isLeftPage?(b.attr("class","leftPaperCoil2"),this.midCoil.attr("class","leftPaperCoil2_bg")):(b.attr("class","rightPaperCoil2"),this.midCoil.attr("class","rightPaperCoil2_bg"));this.midCoil.append(b);this.midCoil.append(b.clone());!bookConfig.HardPageEnable|| 1!=this.pageIndex&&this.pageIndex!=totalPageCount||this.midCoil.css("background-image","none");this.parent.append(this.midCoil)}},addPageShadow:function(){this.pageShadow.addShadow()},addPageTexture:function(){this.pageTexture.render()},hideMiddleShadow:function(){this.pageShadow.hidePageShadow()},onResize:function(b,c){if(this.pageShadow)this.pageShadow.onResize(b,c);if(this.pageTexture)this.pageTexture.onResize(b,c);this.midCoil&&(bookConfig.FlipDirection?this.resizeCoilVertical(b,c):(!bookConfig.HardPageEnable|| 2!=this.pageIndex&&this.pageIndex!=totalPageCount-1||this.midCoil.css({height:c+"px",top:0,bottom:0,margin:"auto"}),"loose2"==bookConfig.BindingType?(b=Math.min(60*parseInt(c/3/60),180),this.midCoil.find("div").css({height:b+"px"}),$(this.midCoil.find("div")[0]).css({top:"67%","margin-top":"-30px",bottom:"auto"}),$(this.midCoil.find("div")[1]).css({bottom:"67%","margin-bottom":"-30px",top:"auto"})):(b=50*parseInt(c/50),this.midCoil.find("div").css({height:b+"px"}))))},resizeCoilVertical:function(b, c){!bookConfig.HardPageEnable||2!=this.pageIndex&&this.pageIndex!=totalPageCount-1||this.midCoil.css({width:b+"px",left:0,right:0,margin:"auto"});"loose2"==bookConfig.BindingType?(b=Math.min(60*parseInt(b/3/60),180),this.midCoil.find("div").css({width:b+"px"}),$(this.midCoil.find("div")[0]).css({left:"67%","margin-left":"-30px",right:"auto"}),$(this.midCoil.find("div")[1]).css({right:"67%","margin-right":"-30px",left:"auto"})):(b=50*parseInt(b/50),this.midCoil.find("div").css({width:b+"px"}))},destroy:function(){this.pageShadow&& (this.pageShadow.destroy(),this.pageShadow=null);this.pageTexture&&(this.pageTexture.destroy(),this.pageTexture=null);this.midCoil&&(this.midCoil.remove(),this.midCoil=null)}});function getGrayShadow(b,c,d,e){if(!_agent_.browser.msie&&!_agent_.browser.safari&&bookConfig.ShowTopLeftShadow&&e==BookType.normal_book&&d)return new GrayShadow(b)} function getPageShadow(b,c,d,e){if(e==BookType.normal_book)return new NormalPageShadow(b,c,d);if(e==BookType.single_book)return new SinglePageShadow(b,c,d);if(e==BookType.catalog_book)return new CatalogPageShadow(b,c,d);if(e==BookType.slide_book||e==BookType.singleSlide_book)return new SlidePageShadow(b,c,d)} function getPageTexture(b,c,d,e){if(e==BookType.normal_book)return new NormalPageTexture(b,c,d);if(e==BookType.single_book)return new SinglePageTexture(b,c,d);if(e==BookType.catalog_book)return new CatalogPageTexture(b,c,d);if(e==BookType.slide_book||e==BookType.singleSlide_book)return new SlidePageTexture(b,c,d)} function getPageDirection(b,c){switch(c){case BookType.single_book:if(bookConfig.RightToLeft)return!0;break;case BookType.singleSlide_book:if(bookConfig.RightToLeft)return!0;break;default:return BookInfo.isLeftPage(b,!0)}return!1}function getLineCapType(b){switch(b){case "round":return LineCap.ROUND;case "square":return LineCap.SQUARE}return LineCap.BUTT}function getLineCapString(b){switch(b){case LineCap.SQUARE:return"square";case LineCap.ROUND:return"round";default:return"butt"}} function getLineJoinType(b){switch(b){case "miter":return LineJoin.MITER;case "round":return LineJoin.ROUND}return LineJoin.BEVEL}function getLineJoinString(b){switch(b){case LineJoin.MITER:return"miter";case LineJoin.ROUND:return"round";default:return"bevel"}}function getRepetitionType(b){var c=PatternRepeatType.REPEAT;switch(b){case "repeat-x":c=PatternRepeatType.REPEAT_X;break;case "repeat-y":c=PatternRepeatType.REPEAT_Y;break;case "no-repeat":c=PatternRepeatType.NONE}return c} function getRepetitionString(b){switch(b){case PatternRepeatType.NONE:return"no-repeat";case PatternRepeatType.REPEAT_X:return"repeat-x";case PatternRepeatType.REPEAT_Y:return"repeat-y";default:return"repeat"}}function getFillRuleType(b){return"evenodd"===b?FillRule.EVEN_ODD:FillRule.NON_ZERO}function getFillRuleString(b){return b===FillRule.EVEN_ODD?"evenodd":"nonzero"}var ZERO_TRANSFORM={x:0,y:0,scale:0,transform:[0,0,0,0,0,0]}; function getBlendMode(b){switch(b){case "multiply":return BlendMode.MULTIPLY;case "screen":return BlendMode.SCREEN;case "overlay":return BlendMode.OVERLAY;case "darken":return BlendMode.DARKEN;case "lighten":return BlendMode.LIGHTEN;case "color-dodge":return BlendMode.COLOR_DODGE;case "color-burn":return BlendMode.COLOR_BURN;case "hard-light":return BlendMode.HARD_LIGHT;case "soft-light":return BlendMode.SOFT_LIGHT;case "difference":return BlendMode.DIFFERENCE;case "exclusion":return BlendMode.EXCLUSION; case "hue":return BlendMode.HUE;case "saturation":return BlendMode.SATURATION;case "color":return BlendMode.COLOR;case "luminosity":return BlendMode.LUMINOSITY}return BlendMode.SOURCE_OVER} function getBlendModeString(b){switch(b){case BlendMode.MULTIPLY:return"multiply";case BlendMode.SCREEN:return"screen";case BlendMode.OVERLAY:return"overlay";case BlendMode.DARKEN:return"darken";case BlendMode.LIGHTEN:return"lighten";case BlendMode.COLOR_DODGE:return"color-dodge";case BlendMode.COLOR_BURN:return"color-burn";case BlendMode.HARD_LIGHT:return"hard-light";case BlendMode.SOFT_LIGHT:return"soft-light";case BlendMode.DIFFERENCE:return"difference";case BlendMode.EXCLUSION:return"exclusion"; case BlendMode.HUE:return"hue";case BlendMode.SATURATION:return"saturation";case BlendMode.COLOR:return"color";case BlendMode.LUMINOSITY:return"luminosity"}return"source-over"}function int2color(b){var c=(b>>24&255).toString(16).toUpperCase(),d=(b>>16&255).toString(16).toUpperCase(),e=(b>>8&255).toString(16).toUpperCase();b=(b&255).toString(16).toUpperCase();c=1>=c.length?"0"+c:c;d=1>=d.length?"0"+d:d;e=1>=e.length?"0"+e:e;b=1>=b.length?"0"+b:b;return"FF"==b?"#"+c+d+e:"#"+b+c+d+e} function converArgbToRgb(b){var c=[];c[0]=(b&16711680)>>16;c[1]=(b&65280)>>8;c[2]=b&255;return"rgb("+c[0]+","+c[1]+","+c[2]+")"}function converRgbToArgb(b,c,d){return-16777216|b<<16|c<<8|d} var FillStrokeType={COLOR:1,PATTERN:2},LineJoin={ROUND:1,MITER:2,BEVEL:3},LineCap={BUTT:1,ROUND:2,SQUARE:3},FillRule={EVEN_ODD:1,NON_ZERO:2},LineStyle={lineWidth:0,lineCap:LineCap,lineJoin:LineJoin,miterLimit:0,dashArray:[],dashOffset:0},FillStrokeColor={type:FillStrokeType.COLOR,color:0},FillStrokePattern={type:FillStrokeType.PATTERN,transform:[0,0,0,0,0,0],pattern:0},WithFillRule={fillRule:null};function getResource(b,c){return canvasData[b].resources[c].name} function getPattern(b,c){return canvasData[b].patterns[c]}function getData(b,c){return canvasData[b].resources[c].data}function getFont(b,c){return canvasData[b].resources[c].name}function getPath(b,c){return canvasData[b].paths[c]}function setTransform(b,c,d){b.setTransform(c[0]*d,c[1]*d,c[2]*d,c[3]*d,c[4]*d,c[5]*d)} function drawPath(b,c,d){var e=c.d,f=c.s;b.translate(c.x,c.y);b.scale(f,f);b.beginPath();c=0;for(d=getPath(d,e);c<d.length;)switch(d[c++]){case PathCommand.MOVE_TO:b.moveTo(d[c],d[c+1]);c+=2;break;case PathCommand.LINE_TO:b.lineTo(d[c],d[c+1]);c+=2;break;case PathCommand.CLOSE:b.closePath();break;case PathCommand.QUADRATIC_CURVE_TO:b.quadraticCurveTo(d[c],d[c+1],d[c+2],d[c+3]);c+=4;break;case PathCommand.BEZIER_CURVE_TO:b.bezierCurveTo(d[c],d[c+1],d[c+2],d[c+3],d[c+4],d[c+5]);c+=6;break;case PathCommand.ARC_TO:b.arcTo(d[c], d[c+1],d[c+2],d[c+3],d[c+4]);c+=5;break;case PathCommand.RECT:b.rect(d[c],d[c+1],d[c+2],d[c+3]);c+=4;break;case PathCommand.ARC:b.arc(d[c],d[c+1],d[c+2],deg2rad(d[c+3]),deg2rad(d[c+4]),!!d[c+5]);c+=6;break;case PathCommand.ELLIPSE:b.ellipse(d[c],d[c+1],d[c+2],d[c+3],deg2rad(d[c+4]),deg2rad(d[c+5]),deg2rad(d[c+6]),!!d[c+6]),c+=7}} var PatternType={IMAGE:1,LINEAR_GRADIENT:2,RADIAL_GRADIENT:3},PatternRepeatType={NONE:1,REPEAT:2,REPEAT_X:3,REPEAT_Y:4},LinearGradientPattern=Class({type:PatternType.LINEAR_GRADIENT,start:[0,0],end:[0,0],stops:[],create:function(b,c){this.initPath(c);this.render(b)},initPath:function(b){this.start=b.start;this.end=b.end;this.stops=b.stops},render:function(b){var c=b.createLinearGradient(this.start[0],this.start[1],this.start[2],this.start[3]);c.addColorStop(this.start[0],this.start[1]);b.fillStyle= c}}),RadialGradientPattern=Class({type:PatternType.RADIAL_GRADIENT,start:[0,0],end:[0,0],stops:[],create:function(b,c){this.initPath(c);this.render(b)},initPath:function(b){this.start=b.start;this.end=b.end;this.stops=b.stops},render:function(b){var c=b.createRadialGradient(this.start[0],this.start[1],this.start[2],this.start[3],this.start[4],this.start[5]);c.addColorStop(this.stops[0],this.stops[1]);b.fillStyle=c}}),ImagePattern=Class({type:PatternType.IMAGE,image:"",repetition:"repeat",create:function(b, c){this.initPath(c);this.render(b)},initPath:function(b){this.image=windows.resources[b.image];switch(b.repetition){case PatternRepeatType.NONE:this.repetition="no-repeat";break;case PatternRepeatType.REPEAT:this.repetition="repeat";break;case PatternRepeatType.REPEAT_X:this.repetition="repeat-x";break;case PatternRepeatType.REPEAT_Y:this.repetition="repeat-y"}},render:function(b){var c=new Image;c.src=this.image;c.onload=function(){var d=ctx.createPattern(c,this.repetition);b.fillStyle=d}}}),BlendMode= {SOURCE_OVER:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},LayerType={PAGE:1,IMAGE:2,IMAGE_DATA:3,TEXT:4,GRAPHICS:5,MASK:6},CompositeLayer=Class({type:LayerType.PAGE,index:0,width:0,height:0,background:0,create:function(b,c){}}),PathCommand={MOVE_TO:1,LINE_TO:2,BEZIER_CURVE_TO:3,QUADRATIC_CURVE_TO:4,ARC_TO:5,ARC:6,RECT:7,ELLIPSE:8,CLOSE:9},GraphicsLayer=Class({type:LayerType.GRAPHICS, alpha:1,paths:null,fill:null,stroke:null,transform:[0,0,0,0,0,0],create:function(b,c,d,e){this.scale=e;this.index=d;this.initPath(c);this.render(b)},initPath:function(b){this.alpha=b.alpha;this.paths=b.paths;this.fill=b.fill;this.stroke=b.stroke;this.transform=b.transform;this.blend=b.blend},render:function(b){if(0!==this.alpha&&0!==this.paths.length&&(null!=this.fill||null!=this.stroke)){this.patternMap=new Map;b.globalAlpha=this.alpha;b.globalCompositeOperation=getBlendModeString(this.blend);this.setFill(b, this.fill);this.setStroke(b,this.stroke);for(var c=0;c<this.paths.length;c++){var d=this.paths[c];setTransform(b,this.transform,this.scale);drawPath(b,d,this.index);this.fill&&(this.setFillStrokeTransform(b,this.fill),b.fill(getFillRuleString(this.fill.fillRule)));this.stroke&&(this.setFillStrokeTransform(b,this.stroke),b.stroke())}this.callback&&this.callback();rendering=!1}},createLinearGradient:function(b,c){if(this.patternMap.has(c))return this.patternMap.get(c);b=b.createLinearGradient(c.start[0], c.start[1],c.end[0],c.end[1]);for(var d=0;d<c.stops.length;d++){var e=c.stops[d];b.addColorStop(e[0],int2color(e[1]))}this.patternMap.set(c,b);return b},createRadialGradient:function(b,c){if(this.patternMap.has(c))return this.patternMap.get(c);b=b.createRadialGradient(c.start[0],c.start[1],c.start[2],c.end[0],c.end[1],c.end[2]);for(var d=0;d<c.stops.length;d++){var e=c.stops[d];b.addColorStop(e[0],int2color(e[1]))}this.patternMap.set(c,b);return b},createImagePattern:function(b,c){if(this.patternMap.has(c))return this.patternMap.get(c); b=b.createPattern(globalImages[this.index][c.image],getRepetitionString(c.repetition));this.patternMap.set(c,b);return b},getFillStrokeStyle:function(b,c){if(c.type===FillStrokeType.PATTERN){var d=getPattern(this.index,c.pattern);switch(d.type){case PatternType.LINEAR_GRADIENT:return this.createLinearGradient(b,d);case PatternType.RADIAL_GRADIENT:return this.createRadialGradient(b,d);case PatternType.IMAGE:return this.createImagePattern(b,d)}}return int2color(c.color)},setFill:function(b,c){null!= c&&(b.fillStyle=this.getFillStrokeStyle(b,c))},setStroke:function(b,c){null!=c&&(b.lineWidth=c.lineWidth,b.lineCap=getLineCapString(c.lineCap),b.lineJoin=getLineJoinString(c.lineJoin),b.miterLimit=c.miterLimit,b.setLineDash(c.dashArray),b.lineDashOffset=c.dashOffset,b.strokeStyle=this.getFillStrokeStyle(b,c))},setFillStrokeTransform:function(b,c){null!=c&&c.type!==FillStrokeType.COLOR&&setTransform(b,c.transform,this.scale)}}),ImageDataLayer=Class({type:LayerType.IMAGE_DATA,data:0,width:0,height:0, x:0,y:0,create:function(b,c,d){this.index=d;this.data=c.data;this.x=c.x;this.y=c.y;b.putImageData(getData(this.index,this.data),this.x,this.y);rendering=!1}}),ImageLayer=Class({type:LayerType.IMAGE,alpha:1,image:"",sourceFrame:[0,0,0,0],destFrame:[0,0,0,0],transform:null,blend:null,create:function(b,c,d,e){this.scale=e;this.index=d;this.initPath(c);this.render(b)},initPath:function(b){this.alpha=b.alpha;this.image=b.image;this.sourceFrame=b.sourceFrame;this.destFrame=b.destFrame;this.transform=b.transform; this.blend=b.blend},render:function(b){b.globalAlpha=this.alpha;b.globalCompositeOperation=getBlendModeString(this.blend);setTransform(b,this.transform,this.scale);b.drawImage(globalImages[this.index][this.image],this.sourceFrame[0],this.sourceFrame[1],this.sourceFrame[2],this.sourceFrame[3],this.destFrame[0],this.destFrame[1],this.destFrame[2],this.destFrame[3])}}),MaskLayer=Class({type:LayerType.MASK,path:[],fillRule:null,transform:[0,0,0,0,0,0],layers:null,create:function(b,c,d,e){this.scale=e; this.index=d;this.initPath(c);this.render(b)},initPath:function(b){this.path=b.path;this.fillRule=b.fillRule;this.transform=b.transform;this.layers=b.layers},render:function(b){b.save();setTransform(b,this.transform,this.scale);drawPath(b,this.path,this.index);b.clip(getFillRuleString(this.fillRule));renderList2(b,this.layers,this.index,this.scale);b.restore()}}),PageLayer=Class({type:LayerType.PAGE,index:0,width:0,height:0,background:0,create:function(b,c){rendering=!1}}),TextLayer=Class({type:LayerType.TEXT, alpha:1,fonts:[],size:15,text:{char:"",x:0,y:0},fill:"#000000",create:function(b,c,d){this.callback=d;this.initPath(c);this.render(b)},initPath:function(b){this.alpha=b.alpha;this.fonts=b.fonts;this.size=b.size;this.text=b.text;this.alpha=b.alpha;this.fill=b.fill;this.stroke=b.stroke},render:function(b){b.alpha=this.alpha;b.font=this.size+" "+this.fonts;this.stroke?(b.strokeStyle="green",b.stroke(),b.strokeText(this.text.char,this.text.x,this.text.y)):b.fillText(this.text.char,this.text.x,this.text.y); this.callback&&this.callback();rendering=!1}}),TransformLayer=Class({transform:[],create:function(b,c){this.initPath(c);this.render(b)},initPath:function(b){this.transform=b.transform},render:function(b){b.transform(this.transform[0],this.transform[1],this.transform[2],this.transform[3],this.transform[4],this.transform[5])}}),TaskPool=Class({create:function(){this.tasks=[];this.index=0;this.isPause=!1},start:function(){this.isPause=!1;var b=this;if(!(this.index>=b.tasks.length)){var c=function(){window.requestAnimationFrame(function(){b.tasks[b.index].start(); b.index<b.tasks.length-1&&(b.index++,b.isPause||c())})};c()}},end:function(){return this.index>=this.tasks.length-1?!0:!1},pause:function(){this.isPause=!0},stop:function(){this.isPause=!0},push:function(b){this.tasks.push(b)}}),RenderPage=Class({create:function(b,c,d,e){this.scale=e;this.index=d;this.layers=c.page.layers;this.canvas=b;this.context=b.getContext("2d");this.data=c;this.taskPool=new TaskPool;this.render(this.context);this.taskPool.start()},render:function(b){this.renderList(b,this.layers)}, renderList:function(b,c){if(b&&c)for(var d=0;d<c.length;d++)this.taskPool.push(new Task(b,c[d],this.index,this.scale))}}),Task=Class({create:function(b,c,d,e){this.scale=e;this.renderer=b;this.layer=c;this.index=d},start:function(){var b=this.renderer,c=this.layer;switch(c.type){case LayerType.PAGE:new PageLayer(b,c,this.index,this.scale);break;case LayerType.IMAGE:new ImageLayer(b,c,this.index,this.scale);break;case LayerType.IMAGE_DATA:new ImageDataLayer(b,c,this.index,this.scale);break;case LayerType.TEXT:new TextLayer(b, c,this.index,this.scale);break;case LayerType.GRAPHICS:new GraphicsLayer(b,c,this.index,this.scale);break;case LayerType.MASK:new MaskLayer(b,c,this.index,this.scale)}}}),renderList2=function(b,c,d,e){if(b&&c){var f=0,g=function(){var h=c[f];switch(h.type){case LayerType.IMAGE:new ImageLayer(b,h,d,e);break;case LayerType.GRAPHICS:new GraphicsLayer(b,h,d,e);break;case LayerType.MASK:new MaskLayer(b,h,d,e)}f<c.length-1&&(f++,g())};g()}},PageInfo=Class({create:function(b){this.getPageInfoArray(b)},getPageInfoArray:function(b){if(this.pageInfoArray)return this.pageInfoArray; this.initPageInfo(b);return this.pageInfoArray},initPageInfo:function(b){this.pageInfoArray=[{}];for(var c=1;c<=totalPageCount;c++){var d=this.getPageInfo(c,b),e=this.getNextPageInfo(c,b);e&&(d.pageWidth=Math.max(d.pageWidth,e.pageWidth),d.pageHeight=Math.max(d.pageHeight,e.pageHeight),d.opacity=Math.max(d.opacity,e.opacity),1!=d.pageWidth||1!=d.pageWidth||1!=d.pageWidth)&&(d.isMiniPage=!0);this.pageInfoArray.push(d)}},getNextPageInfo:function(b,c){if(!c)return b=bookConfig.isTheBookOpen?0==b%2?b+ 1:b-1:0==b%2?b-1:b+1,this.getPageInfo(b,c)},getPageInfo:function(b,c){if(!(0>=b||b>totalPageCount)){var d=c=1,e=1;window.fliphtml5_pages&&window.fliphtml5_pages[b-1]&&(e=window.fliphtml5_pages[b-1],c=e.w?Math.min(e.w,1):1,d=e.h?Math.min(e.h,1):1,e=e.o?Math.min(e.o,1):1);if(1==b||b==totalPageCount)d=c=1;return{pageWidth:c,pageHeight:d,opacity:e}}},statics:{getPageColor:function(b){return window.pages_information&&window.pages_information[b-1]&&window.pages_information[b-1].pageColor?window.pages_information[b- 1].pageColor:bookConfig.pageBackgroundColor},pageIsStrech:function(b){return window.pages_information&&window.pages_information[b-1]&&window.pages_information[b-1].pageIsStrech?parseBool(window.pages_information[b-1].pageIsStrech):bookConfig.bookPageStretch}}}),accessControlImagesPool={},accessControlPostImagesPool=[],PageLoadTask=Class({statics:{task:null,taskList:{normal:[],large:[],thumb:[],previewPage:[]},pageLength:20,addTask:function(b,c){b=parseInt((b-1)/this.pageLength);this.taskList[c]&& this.taskList[c][b]&&(this.taskList[c][b].running||this.taskList[c][b].completed&&this.taskList[c][b].completedAll)||this.createTask(b,c)},createTask:function(b,c){this.taskList[c][b]={completed:!1,completedAll:!1,running:!0};var d=this.getPostUrls(b,c);this.postYunzhanUrls(b,c,d)},getPostUrls:function(b,c){var d=(b+1)*this.pageLength,e=[];for(b=b*this.pageLength+1;b<=d;b++){var f=pageDirWidthPath(b,c);f=this.removeParamFromUrl(f);e=e.concat(f)}return e},postYunzhanUrls:function(b,c,d){var e=this, f=d;"string"==typeof d&&(f=[d]);if(f&&0!=f.length){var g=[];for(d=0;d<f.length;d++){var h=toAbsURL(f[d])+(window.isSupportWebp?"":"?x-oss-process=image/format,jpg");g.push(h)}d=BookRestrict.getRestrictToken();$.ajax({type:"get",url:restrictUrl,dataType:"json",data:{urls:JSON.stringify(g),token:d},success:function(k){if("OK"==k.code){for(var l=!0,n=0;n<f.length;n++){var p=g[n];accessControlImagesPool[f[n]]=k.data[p];k.data[p]||(l=!1)}e.completedTask(b,c);l&&e.completedAllTask(b,c)}else window.encryptionPannel&& !window.encryptionPannel.visible&&window.encryptionPannel.show()},error:function(){window.encryptionPannel&&!window.encryptionPannel.visible&&window.encryptionPannel.show()}})}else this.completedTask(b,c)},isCompleted:function(b,c){b=parseInt((b-1)/this.pageLength);return this.taskList[c]&&this.taskList[c][b]&&this.taskList[c][b].completed?!0:!1},completedTask:function(b,c){try{this.taskList[c][b].completed=!0,this.taskList[c][b].running=!1}catch(d){}},completedAllTask:function(b,c){try{this.taskList[c][b].completedAll= !0}catch(d){}},getUrls:function(b){if("object"==typeof b){for(var c=[],d=[],e=0;e<b.length;e++){var f=b[e],g=f.removeStartFrom("?");f=f.remove(g);f=f.remove("?");d.push(f)}for(e=0;e<b.length;e++)f=b[e],g=f.removeStartFrom("?"),0<=f.indexOf("none")?c.push("none"):c.push(accessControlImagesPool[g]?this.mergeParamFromUrl(accessControlImagesPool[g],d[e]):f);return c}if(0<=b.indexOf("none"))return"none";g=b.removeStartFrom("?");f=b.remove(g);f=f.remove("?");return accessControlImagesPool[g]?this.mergeParamFromUrl(accessControlImagesPool[g], f):accessControlImagesPool[g]?this.mergeParamFromUrl(accessControlImagesPool[g],f):b},mergeParamFromUrl:function(b,c){return b},removeParamFromUrl:function(b){if("object"==typeof b){for(var c=[],d=0;d<b.length;d++){var e=b[d],f=e.removeStartFrom("?");0>e.indexOf("none")&&!accessControlImagesPool[f]&&c.push(f)}return c}if(0<=b.indexOf("none"))return[];c=[];f=b.removeStartFrom("?");c.push(f.toString());return accessControlImagesPool[f]?[]:c}}}),adjustPageURL=function(b,c,d){b=parseInt(b)-1;global.fliphtml5_pages|| (global.fliphtml5_pages=[]);global.fliphtml5_pages[b]||(global.fliphtml5_pages[b]={});switch(c){case 0:global.fliphtml5_pages[b].l=d;break;case 1:global.fliphtml5_pages[b].n=d;break;case 2:global.fliphtml5_pages[b].t=d;break;case 3:global.fliphtml5_pages[b].p=d}},useTheFliphtml5Service=function(){if(bookConfig.useTheFliphtml5Service)for(var b=bookConfig.totalPageCount,c=1;c<=b;c++){var d=pageDirWidthPath(c,"normal",b),e=pageDirWidthPath(c,"large",b),f=pageDirWidthPath(c,"thumb",b),g=pageDirWidthPath(c, "previewPage",b);if("string"!=typeof d)for(var h=0;h<d.length;h++)d[h]=resetFliphtml5URL(d[h]);else d=resetFliphtml5URL(d);e=resetFliphtml5URL(e);f=resetFliphtml5URL(f);g=resetFliphtml5URL(g);adjustPageURL(c,0,e);adjustPageURL(c,1,d);adjustPageURL(c,2,f);adjustPageURL(c,3,g)}},useTheAliCloudChart=function(b,c){if(bookConfig.useTheAliCloudChart){if(isPad()||isPhone())try{b*=devicePixelRatio,c*=devicePixelRatio}catch(n){}for(var d=bookConfig.totalPageCount,e=1;e<=d;e++){var f=realPageDir(e,"normal", d),g=realPageDir(e,"large",d),h=realPageDir(e,"thumb",d),k=realPageDir(e,"previewPage",d);if("string"!=typeof f)for(var l=0;l<f.length;l++)f[l]=resetYunzhanURL(f[l],b,c);else f=resetYunzhanURL(f,b,c);g=resetYunzhanURL(g);h=resetYunzhanURL(h);k=resetYunzhanURL(k);adjustPageURL(e,0,g);adjustPageURL(e,1,f);adjustPageURL(e,2,h);adjustPageURL(e,3,k)}}}; function getPageDir(b,c,d,e,f){var g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress){if("restrict"==BookRestrict.isRestrictPage(b))return g=1==b?getMeta("og:image"):bookConfig.pageRestrictUrl,n.return(g);h=pageDirWidthPath(b,c,d,e,f);if(!bookConfig.isEncryptionBook){if("string"==typeof h)h=changeBookResourceBaseURL(h);else{k=[];for(l=0;l<h.length;l++)k.push(changeBookResourceBaseURL(h[l]));h=k}return n.jumpTo(2)}return n.yield(getYunzhanUrl(h,b,c),3)}2!=n.nextAddress&& (h=n.yieldResult);return n.return(h)})} var pageDirWidthPath=function(b,c,d,e,f){var g=realPageDir(b,c,d,e,f);g||"previewPage"!=c||(g=realPageDir(b,"thumb",d,e,f));if(g)if("string"==typeof g)g=fixURLValue(g);else{b=[];d=getPagePathName(c);for(e=0;e<g.length;e++)f=window.fliphtml5_pages&&fliphtml5_pages[d]&&void 0!=fliphtml5_pages[d][e]?fliphtml5_pages[d][e]:bookConfig[d][e],0<=g[e].indexOf("files/")&&(f=""),0<=g[e].indexOf("http")&&(f=""),b.push(f+g[e]);g=1==g.length&&"normal"==c?fixURLValue(b[0]):fixURLValue(b.clone())}return g},realPageDir= function(b,c,d,e,f){if(0>=b||void 0!=d&&b>d)return"";if(bookConfig.getPageURL){var g=0;"normal"==c&&(g=1);"thumb"==c&&(g=2);"previewPage"==c&&(g=3);return bookConfig.getPageURL(b,g,d,e,f)}d=getFileFormat(b,c);var h=global.fliphtml5_pages;if(void 0!=h&&0<h.length&&(h=h[b-1],void 0!=h&&null!=h))switch(c){case "normal":g=void 0==h.n?h.l:h.n;break;case "large":g=h.l;break;case "thumb":g=h.t;break;case "previewPage":g=h.p}return void 0==g?defaultRealPageDir(c,b,d,e,f):g},defaultRealPageDir=function(b, c,d,e,f){var g="";switch(b){case "normal":g=getNormalPageDirByWidthHeight(b,c,d,e,f);break;case "large":g=bookConfig.largePath+c+d;break;case "thumb":g=bookConfig.thumbPath+c+d}return g},getPagePathName=function(b){switch(b){case "normal":return"normalPath";case "large":return"normalPath";case "thumb":return"thumbPath";case "previewPage":return"normalPath"}},getNormalPageDirByWidthHeight=function(b,c,d,e,f){b=getPageSize(c,b);if(!b)return bookConfig.normalPath+c+d;e||(e=0);f||(f=0);if(isPhone()|| isPad())f=e=1E4;e=findCloseNum(b,Math.max(e,f));return bookConfig.normalPath+c+"_"+e+d};function findCloseNum(b,c){for(var d=0,e=Number.MAX_VALUE,f=0;f<b.length;f++){var g=Math.abs(b[f]-c);g<=e&&!(g===e&&b[f]<b[d])&&(d=f,e=g)}return b[d]} var getPageSize=function(b,c,d){if(0>=b||void 0!=d&&b>d)return null;d=global.fliphtml5_pages;if(void 0!=d&&0<d.length){b=d[b-1];if(void 0!=b&&null!=b)switch(c){case "normal":var e=b.normalSize}if(void 0==e)switch(c){case "normal":e=bookConfig.normalSize}return e?e.increasing():null}switch(c){case "normal":return(e=bookConfig.normalSize)?e.increasing():null}return null}; function getYunzhanUrl(b,c,d){return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){if(!bookConfig.isEncryptionBook||"none"==BookRestrict.isRestrictPage(c))return e.return(b);PageLoadTask.addTask(c,d);return e.return(new Promise(function(f,g){var h=window.setInterval(function(){if(PageLoadTask.isCompleted(c,d)){window.clearInterval(h);var k=PageLoadTask.getUrls(b,c);f(k)}},50)}))})} var globalImages=[],canvasData=[],canvasLoad=function(b,c,d,e,f,g){var h=$("<canvas class='test'></canvas>"),k=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){e&&e(c,c,h,b);l.jumpToEnd()})};(function(){var l=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){$.ajax({url:c,type:"GET",dataType:"json",success:function(p){canvasData[b]="string"==typeof p?JSON.parse(p):p;globalImages[b]=[];(function(){if(0==canvasData[b].resources.length)k();else for(var v=0, B=0;B<canvasData[b].resources.length;B++)if(1!=canvasData[b].resources[B].type)v++,v>=canvasData[b].resources.length&&k();else{var t=new Image;t.src=getResource(b,B);globalImages[b][B]=t;t.onload=function(){v++;v>=canvasData[b].resources.length&&k()}}})()}.bind(l),error:function(){}});n.jumpToEnd()})})()},objectLoad=function(b,c,d,e,f,g){var h,k,l,n,p,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){h=0;k=$("<div style='position:relative;'></div>");k.css({width:bookConfig.largePageWidth+ "px",height:bookConfig.largePageHeight+"px"});l=function(t){bookConfig.largePageWidth/bookConfig.largePageHeight>t[0].naturalWidth/t[0].naturalHeight?t.css({width:"auto",height:"100%"}):t.css({width:"100%",height:"auto"})};for(n=0;n<c.length;n++)p=c[n],p=p.removeStartFrom("?"),v=$("<img style='position:absolute;left:0;top:0;bottom:0;right:0;margin:auto;'></img>"),v.attr("src",p),k.append(v),v[0].onload=function(t){l($(this));h++;h==c.length&&e&&e(c,c,k,b)},v[0].onerror=function(t){h++;h==c.length&& e&&e(c,c,k,b)};B.jumpToEnd()})},noneLoad=function(b,c,d,e,f,g){var h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){h=$("<div style='width:100%;height:100%;background:"+bookConfig.pageBackgroundColor+";'></div>");e&&e(c,c,h,b);return k.return()})},jsLoad=function(b,c,d,e,f,g){var h,k,l,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){h=function(v,B){return!v||passwardType()&&bookConfig.excludeFrontPages&&B>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward()?!1: !0};if(!h(c,b))return!window.userList&&1<passwardType()&&loadJavascript(fixURLValue(bookConfig.userListPath),function(){pageResourceLoad(b,d,e)},function(){}),p.return();if(k=global[decodeDatabasePrefix(d)+b]&&"string"==typeof global[decodeDatabasePrefix(d)+b])return l=dataBase64Str(b,d),n=$("<img src='"+l+"'/>"),n[0].onload=function(){e&&e(l,c,this,b)},p.return();loadJavascript(c,function(v){var B=dataBase64Str(b,d,v);$("<img src='"+B+"'/>")[0].onload=function(){e&&e(B,c,this,b)}},function(){}); return p.return()})},zipLoad=function(b,c,d,e,f,g){var h=this,k,l,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){if(!window.printLoadStack)return p.return();k=f?f:BookInfo.getBook().pageWidth;l=g?g:BookInfo.getBook().pageHeight;n=new PdfLoadingTask(b,d,k,l,function(v){var B=v.toDataURL("image/png"),t=$("<img src='"+B+"'/>");t[0].onload=function(){e&&e(B,B,t,b)}}.bind(h));window.printLoadStack.push(n);return p.return()})},svgLoad=function(b,c,d,e,f,g){var h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){bookConfig.useTheAliCloudChart&& BookInfo.getBook().status_zoom&&(c=c.removeStartFrom("?"));h=$("<img src='"+c+"'/>");h[0].onload=function(){var l=$("<object data='"+c+"' type='image/svg+xml'></object>")[0];e&&e(c,c,l,b)};k.jumpToEnd()})},imgLoad=function(b,c,d,e,f,g){var h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){bookConfig.useTheAliCloudChart&&BookInfo.getBook().status_zoom&&(c=c.removeStartFrom("?"));h=$("<img src='"+c+"'/>");h[0].onload=function(){e&&e(c,c,this,b)};k.jumpToEnd()})},pageResourceLoad=function(b, c,d,e,f){var g,h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){if(1==k.nextAddress)return b&&c?k.yield(getPageDir(b,c,originTotalPageCount),2):k.return();g=k.yieldResult;h="img";"normal"==c&&bookConfig.usePdfJs&&(h="canvas");"object"==typeof g?h="object":"string"==typeof g&&(g.match(/^none/)&&(h="none"),-1<g.indexOf(".js")&&(h="js"),-1<g.indexOf(".zip")&&(h="zip"),-1<g.indexOf(".svg")&&(h="svg"));switch(h){case "canvas":canvasLoad(b,g,c,d,e,f);break;case "object":objectLoad(b,g,c, d,e,f);break;case "none":noneLoad(b,g,c,d,e,f);break;case "js":jsLoad(b,g,c,d,e,f);break;case "zip":zipLoad(b,g,c,d,e,f);break;case "svg":svgLoad(b,g,c,d,e,f);break;case "img":imgLoad(b,g,c,d,e,f)}k.jumpToEnd()})},getFileFormat=function(b,c){var d="";return!passwardType()||!bookConfig.excludeFrontPages||b<=parseInt(bookConfig.excludeFrontPages)?("normal"==c&&(global.fliphtml5_pages&&0<fliphtml5_pages.length&&(b=fliphtml5_pages[b-1])&&b.suffix&&(d=b.suffix),d||(d=bookConfig.normalSuffix?bookConfig.normalSuffix: ".jpg")),"string"==typeof d&&d||(d=".jpg"),"."!=d[0]&&(d="."+d),d):".js"},decodeBase64=function(b,c){var d=encodeDatabasePrefix(c);if(global[d+b]&&"string"==typeof global[d+b]&&(c=getRealkey()))return b=base64.decode(global[d+b]),b=rc4(c,b),base64.encode(b)},dataBase64Str=function(b,c,d){if(verifyPassward()){var e=decodeDatabasePrefix(c),f=encodeDatabasePrefix(c);if(global[e+b])return global[f+b]=null,d&&$(d).remove(),global[e+b];c="data:image/jpg;base64,"+decodeBase64(b,c);global[e+b]=c;global[f+ b]=null;d&&$(d).remove();return c}},decodeDatabasePrefix=function(b){switch(b){case "normal":return"dataBase";case "large":return"dataBase";case "thum":return"dataBaseThum";case "thumb":return"dataBaseThum"}},encodeDatabasePrefix=function(b){switch(b){case "normal":return"page";case "large":return"page";case "thum":return"thumb";case "thumb":return"thumb"}},userList,getRealkey=function(){if(1==passwardType())return getSingleRealKey();if(userList){var b=getPassward(),c=getUsername();if(b&&c&&userList&& "string"==typeof userList[c])return getListRealKey(c,b,userList[c])}},getSingleRealKey=function(){if(bookConfig.singlePasswordKey&&"string"==typeof bookConfig.singlePasswordKey){var b=getPassward();if(b){var c=parsHexToNormalString(bookConfig.singlePasswordKey);return rc4(b,c)}}},getListRealKey=function(b,c,d){b=(b+String.fromCharCode(9)+c).MD5(32);b=parsHexToNormalString(b);b=base64.encode(b);d=d.remove(b);d=d.replace(/==?$/,"");if(d=base64.decode(d))return c=(b+c).cycleToLength(128),rc4(c,d)},verifyPassward= function(b,c){if(!passwardType())return!0;b=b?b:getPassward();c=c?c:getUsername();if(1==passwardType())return b?b.MD5(32).toLowerCase()===bookConfig.singlePasswordMD5.toLowerCase():void 0;if(bookConfig.userListPath&&(userList||loadJavascript(fixURLValue(bookConfig.userListPath),verifyPassward,function(){}),userList&&b&&c&&"string"==typeof userList[c]))return b=(c+String.fromCharCode(9)+b).MD5(32),b=parsHexToNormalString(b),b=base64.encode(b),userList[c].substring(0,24)===b},passwardType=function(){if(!tmpBookConfig.securityType|| 1==parseInt(tmpBookConfig.securityType))return 0;if(tmpBookConfig.securityType&&2==parseInt(tmpBookConfig.securityType))return 1;if(tmpBookConfig.securityType&&3==parseInt(tmpBookConfig.securityType))return 2},getPassward=function(){try{return window.localStorage[realLocation+"?passward"]}catch(b){}},getUsername=function(){try{return window.localStorage[realLocation+"?username"]}catch(b){}},NoneLoad=Class({create:function(b,c,d,e,f,g){window.setTimeout(function(){d&&d("none","none",null,b)},1)}}), JsLoad=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:"",create:function(b,c,d,e,f,g){var h=this,k,l,n,p;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){if(1==v.nextAddress)return h.index=b,h.type=c,h.pageWidth=e,h.pageHeight=f,h.isMirrorSide=g,v.yield(getPageDir(b,c,originTotalPageCount),2);k=v.yieldResult;h.imageURL=k;if(!h.fillImageOrNot(k,b))return!window.userList&&1<passwardType()&&loadJavascript(fixURLValue(bookConfig.userListPath), function(){this.create(b,c,d)}.bind(h),function(){}),v.return();if(l=global[decodeDatabasePrefix(c)+b]&&"string"==typeof global[decodeDatabasePrefix(c)+b])return n=dataBase64Str(b,c),h.$image=$("<img src='"+n+"'/>"),h.$image[0].onload=function(){d&&d(n,k,this.$image[0],b);this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight;this.onResize(this.pageWidth,this.pageHeight)}.bind(h),v.return();p=h;loadJavascript(k,function(B){var t=dataBase64Str(b,c,B);p.$image=$("<img src='"+ t+"'/>");p.$image[0].onload=function(){d&&d(t,k,this.$image[0],b);this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight;this.onResize(this.pageWidth,this.pageHeight)}.bind(p)},function(){});v.jumpToEnd()})},fillImageOrNot:function(b,c){return!b||"string"!=typeof b||passwardType()&&bookConfig.excludeFrontPages&&c>parseInt(bookConfig.excludeFrontPages)&&!verifyPassward()?!1:!0},zoomIn:function(){(isPhone()||isPad())&&bookConfig.highDefinitionConversion&&this.highDefinition()}, zoomOut:function(){},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;if(this.$image){if((isPhone()||isPad())&&!this.isMirrorSide){if(_agent_.system.name!=_agent_.system.ANDROID&&!bookConfig.highDefinitionConversion){this.resizeOnMobile();return}if(bookConfig.highDefinitionConversion&&BookInfo.getBook().status_zoom){this.highDefinition();return}}b/=c;c=this.width/this.height;this.$image.css({width:"100%",height:"100%",position:"absolute",top:0,bottom:0,left:0,right:0,margin:"auto"});.01<= b-c&&!PageInfo.pageIsStrech(this.index)&&this.$image.css({width:"auto"});-.01>=b-c&&!PageInfo.pageIsStrech(this.index)&&this.$image.css({height:"auto"});b=transformCSS({scale:1,origin:{x:0,y:0}});this.$image.css(b)}},resizeOnMobile:function(){var b=1024,c=1024;BookInfo.isDoublePage()&&this.type==BookType.normal_book&&(c=b=768);b=fitPageWidthHeight(b,c,this.width,this.height);this.scale(Math.ceil(b.x),Math.ceil(b.y))},highDefinition:function(){var b=Math.min(6*Math.min(windowWidth,windowHeight),this.width), c=Math.min(6*Math.min(windowWidth,windowHeight),this.height);_agent_.system.name==_agent_.system.ANDROID&&(b=Math.min(1024,b),c=Math.min(1024,c));isPad()&&(b=Math.min(3*Math.min(windowWidth,windowHeight),this.width),c=Math.min(3*Math.min(windowWidth,windowHeight),this.height));b=fitPageWidthHeight(b,c,this.width,this.height);this.scale(Math.ceil(b.x),Math.ceil(b.y))},scale:function(b,c){var d=this.pageWidth/this.pageHeight>this.width/this.height?this.pageHeight/c:this.pageWidth/b;this.$image.css({width:b+ "px",height:c+"px",position:"absolute",left:(this.pageWidth-b*d)/2+"px",bottom:"auto",top:(this.pageHeight-c*d)/2+"px",right:"auto"});b=transformCSS({scale:d,origin:{x:0,y:0}});this.$image.css(b)}}),CanvasLoad=Class({create:function(b,c,d,e,f){var g=$("<canvas></canvas>");this.pageWidth=e;this.pageHeight=f;var h=function(){var l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress)return n.yield(getPageDir(b,c,originTotalPageCount),2);l=n.yieldResult;d&&d(l,l,g,b);n.jumpToEnd()})}, k=this.loadAllImage;(function(){var l=this,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){if(1==p.nextAddress)return p.yield(getPageDir(b,c,originTotalPageCount),2);n=p.yieldResult;$.ajax({url:n,type:"get",async:!1,success:function(v){canvasData[b]=configForPages.pages[b-1].data;globalImages[b]=[];k(b,h)}.bind(l),error:function(){}});p.jumpToEnd()})})()},loadAllImage:function(b,c){for(var d=0,e=0;e<canvasData[b].resources.length;e++)if(1!=canvasData[b].resources[e].type)d++,d>=canvasData[b].resources.length&& c();else{var f=new Image;f.src=getResource(b,e);globalImages[b][e]=f;f.onload=function(){d++;d>=canvasData[b].resources.length&&c()}}},zoomIn:function(){},zoomOut:function(){},onResize:function(){},renderCnvas:function(b,c,d,e,f,g,h){if(bookConfig.usePdfJs&&d){this.renderInterval&&(window.clearInterval(this.renderInterval),this.renderInterval=void 0);this.render&&(this.render.taskPool.stop(),this.render=void 0);var k=canvasData[e],l=k.page,n=f,p=g,v=f/g,B=l.width/l.height;.01<=v-B&&!PageInfo.pageIsStrech(this.pageIndex)&& (n=l.width*g/l.height);-.01>=v-B&&!PageInfo.pageIsStrech(this.pageIndex)&&(p=f*l.height/l.width);if(!window.devicePixelRatio||isPC())window.devicePixelRatio=1;f=n*devicePixelRatio/l.width;d.attr("width",n*devicePixelRatio);d.attr("height",p*devicePixelRatio);d.css("height",p+"px");d.css("width",n+"px");d.css({position:"absolute",top:0,bottom:0,left:0,right:0,margin:"auto"});g=d[0].getContext("2d");g.save();g.imageSmoothingEnabled=!0;l.background&&(g.fillStyle=int2color(l.background),g.fillRect(0, 0,n,p));this.render=new RenderPage(d[0],k,e,f);this.renderInterval=window.setInterval(function(){BookInfo.getBook().flipping||BookInfo.getBook().flipBook.parameters.zoomming?this.render.taskPool.pause():this.render.taskPool.start();this.render.taskPool.end()&&(h&&h(b,c,d),window.clearInterval(this.renderInterval))}.bind(this),200)}}}),SvgLoad=Class({index:0,pageWidth:0,pageHeight:0,create:function(b,c,d,e,f){var g=this,h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){if(1==k.nextAddress)return g.index= b,g.type=c,g.pageWidth=e,g.pageHeight=f,k.yield(getPageDir(b,c,originTotalPageCount),2);h=k.yieldResult;g.sideImage=$("<img src='"+h+"'/>");g.sideImage[0].onload=function(){this.$svgDiv=$("<div style='position:absolute;width:100%;height:100%;left:0;top:0;'></div>");this.$svgDiv.append(this.sideImage);this.$svg=$("<canvas></canvas>");this.$svgDiv.append(this.$svg);this.width=this.sideImage[0].naturalWidth;this.height=this.sideImage[0].naturalHeight;this.onResize(this.pageWidth,this.pageHeight);this.$svg.attr("width", this.width+"px");this.$svg.attr("height",this.height+"px");var l=this.$svg[0].getContext("2d");l.beginPath();l.drawImage(this.sideImage[0],0,0);l.closePath();BookInfo.getBook().status_zoom?this.zoomIn():this.zoomOut();this.reDraw();d&&d(h,h,this.$svgDiv,b)}.bind(g);k.jumpToEnd()})},beginToFlip:function(){},afterFlip:function(){},reDraw:function(){if(!isPC()){var b=this.$svg[0].getContext("2d"),c=function(){b.beginPath();b.clearRect(0,0,this.width,this.height);b.drawImage(this.sideImage[0],0,0,this.width, this.height);b.closePath();console.log("reDraw:"+this.index)}.bind(this);this.interval=window.setTimeout(function(){c();this.interval=window.setTimeout(function(){c();this.interval=window.setTimeout(function(){c()}.bind(this),2E3)}.bind(this),1E3)}.bind(this),500)}},zoomIn:function(){this.sideImage&&this.sideImage.show();this.$svg&&this.$svg.hide()},zoomOut:function(){this.sideImage&&this.sideImage.hide();this.$svg&&this.$svg.show()},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;b/=c; c=this.width/this.height;this.sideImage&&this.sideImage.css({width:"100%",height:"100%",position:"absolute",top:0,left:0});this.$svg&&this.$svg.css({width:"100%",height:"100%",position:"absolute",top:0,left:0});var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);.01<=b-c&&!PageInfo.pageIsStrech(this.index)&&(this.$svg&&this.$svg.css({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+"px"}),this.sideImage&&this.sideImage.css({width:"auto",left:Math.round((this.pageWidth- d.x)/2)+"px"}));-.01>=b-c&&!PageInfo.pageIsStrech(this.index)&&(this.$svg&&this.$svg.css({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"}),this.sideImage&&this.sideImage.css({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"}))},destroy:function(){this.interval&&window.clearInterval(this.interval)}});function randomString(b){b=b||32;for(var c="",d=0;d<b;d++)c+="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678".charAt(Math.floor(48*Math.random()));return c} function canvasReload(b,c,d,e){var f=b.width,g=b.height;c=Math.round(c);d=Math.round(d);var h=f/c,k=g/d,l=Math.ceil(h/2),n=Math.ceil(k/2),p=b.getContext("2d"),v=p.getImageData(0,0,f,g),B=p.createImageData(c,d);v=v.data;for(var t=B.data,u=0;u<d;u++)for(var w=0;w<c;w++){for(var x=4*(w+u*c),z,A=0,J=0,G=0,H=0,F=0,K=0,X=(u+.5)*k,V=Math.ceil((u+1)*k),Q=Math.floor(u*k);Q<V;Q++){var U=Math.abs(X-(Q+.5))/n,Z=(w+.5)*h;U*=U;for(var aa=Math.ceil((w+1)*h),R=Math.floor(w*h);R<aa;R++)if(z=Math.abs(Z-(R+.5))/l,z= Math.sqrt(U+z*z),!(1<=z)){z=2*z*z*z-3*z*z+1;var S=4*(R+Q*f);K+=z*v[S+3];J+=z;255>v[S+3]&&(z=z*v[S+3]/250);G+=z*v[S];H+=z*v[S+1];F+=z*v[S+2];A+=z}}t[x]=G/A;t[x+1]=H/A;t[x+2]=F/A;t[x+3]=K/J}!0===e?(b.width=c,b.height=d):p.clearRect(0,0,f,g);p.putImageData(B,0,0)} var ImageLoad=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:"",canvasDom:null,create:function(b,c,d,e,f,g,h){var k=this,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress)return k.index=b,k.type=c,k.pageWidth=e,k.pageHeight=f,k.isMirrorSide=g,k.parent=h,k.callback=d,n.yield(getPageDir(b,c,originTotalPageCount),2);l=n.yieldResult;k.imageURL=l;bookConfig.useTheAliCloudChart&&BookInfo.getBook().status_zoom&&(l=l.removeStartFrom("?")); k.realImageURL=l;k.id=randomString(10);k.imageObject=new ImageObject;k.imageObject.attr("id",k.id);k.imageObject.alt(k.id);k.imageObject.src(k.realImageURL);k.$image=k.imageObject.$image;k.$image.css("image-rendering","-webkit-optimize-contrast");k.$image[0].onload=k.onLoad.bind(k);k.enableRecognizeQRcode();k.setTextSharpening();n.jumpToEnd()})},onLoad:function(){this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight;if(!(this.width>1.25*this.pageWidth&&this.height>1.25*this.pageHeight)|| !0!==bookConfig.canvasRender&&"true"!==bookConfig.canvasRender||isPhone()||isPad())this.width=this.$image[0].naturalWidth,this.height=this.$image[0].naturalHeight,this.callback&&this.callback(this.realImageURL,this.realImageURL,this.$image[0],this.index),this.onResize(this.pageWidth,this.pageHeight);else try{this.canvasDom=document.createElement("canvas");this.canvasDom.setAttribute("id","pageCanvas");this.canvasDom.setAttribute("width",this.width);this.canvasDom.setAttribute("height",this.height); var b=this.canvasDom.getContext("2d");b.width=this.width;b.height=this.height;b.drawImage(this.$image[0],0,0);canvasReload(this.canvasDom,this.pageWidth,this.pageHeight,!0);this.callback&&this.callback(this.realImageURL,this.realImageURL,this.canvasDom,this.index)}catch(c){this.width=this.$image[0].naturalWidth,this.height=this.$image[0].naturalHeight,this.callback&&this.callback(this.realImageURL,this.realImageURL,this.$image[0],this.index),this.onResize(this.pageWidth,this.pageHeight)}},enableRecognizeQRcode:function(){bookConfig.EnableRecognizeQRcodePressOnMobile&& this.setImageCss({"-webkit-touch-callout":"default"})},setTextSharpening:function(){if(bookConfig.textSharpening){var b="-webkit-optimize-contrast";_agent_.browser.firefox&&(b="-moz-crisp-edges");_agent_.browser.opera&&(b="-o-crisp-edges");this.setImageCss({"image-rendering":b,"-ms-interpolation-mode":"nearest-neighbor"})}},zoomIn:function(b){bookConfig.useTheAliCloudChart&&this.switchLargeImage(b);(isPhone()||isPad())&&this.highDefinition()},zoomOut:function(b,c){bookConfig.useTheAliCloudChart&& this.switchNormalImage(b,c);(isPhone()||isPad())&&this.resize()},onResize:function(b,c){try{if(!(!0!==bookConfig.canvasRender&&"true"!==bookConfig.canvasRender||isPhone()||isPad())&&this.canvasDom){this.pageWidth=b;this.pageHeight=c;this.canvasDom.setAttribute("width",this.width);this.canvasDom.setAttribute("height",this.height);var d=this.canvasDom.getContext("2d");d.width=this.width;d.width=this.height;d.drawImage(this.$image[0],0,0);canvasReload(this.canvasDom,this.pageWidth,this.pageHeight,!0); return}}catch(e){console.log("this function cross-domain !")}if((isPhone()||isPad())&&!this.isMirrorSide&&BookInfo.getBook().status_zoom)this.highDefinition();else{this.pageWidth=b;this.pageHeight=c;b/=c;c=this.width/this.height;this.setImageCss({width:"100%",height:"100%",position:"absolute",top:0,left:0});d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);PageInfo.pageIsStrech(this.index)||(.01<=b-c&&this.setImageCss({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+ "px"}),-.01>=b-c&&this.setImageCss({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"}),.01>Math.abs(b-c)&&isPC()&&bookConfig.useTheAliCloudChart&&(b>c?this.setImageCss({width:"auto",left:Math.round((this.pageWidth-this.pageHeight*this.width/this.height)/2)+"px"}):this.setImageCss({height:"auto",top:Math.round((this.pageHeight-this.pageWidth*this.height/this.width)/2)+"px"})));b=!1;if(isPhone()||isPad())b=!0;b=transformCSS({scale:1,origin:{x:0,y:0}},b);this.setImageCss(b)}},resize:function(){var b= this.pageWidth/this.pageHeight,c=this.width/this.height;this.setImageCss({width:"100%",height:"100%",position:"absolute",top:0,left:0});var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);PageInfo.pageIsStrech(this.index)||(.01<=b-c&&this.setImageCss({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+"px"}),-.01>=b-c&&this.setImageCss({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"}));b=!1;if(isPhone()||isPad())b=!0;b=transformCSS({scale:1,origin:{x:0,y:0}}, b);this.setImageCss(b)},highDefinition:function(){this.scale(this.width,this.height)},scale:function(b,c){var d=this.pageWidth/this.pageHeight,e=this.width/this.height;var f=this.pageHeight/c;var g=this.pageWidth/b;.01<=d-e&&!PageInfo.pageIsStrech(this.index)&&(g=f=this.pageHeight/c);-.01>=d-e&&!PageInfo.pageIsStrech(this.index)&&(f=g=this.pageWidth/b);this.setImageCss({width:b+"px",height:c+"px",position:"absolute",left:Math.round((this.pageWidth-b*g)/2)+"px",bottom:"auto",top:Math.round((this.pageHeight- c*f)/2)+"px",right:"auto"});b=!1;if(isPhone()||isPad())b=!0;g=transformCSS({scale:{x:g,y:f},origin:{x:0,y:0}},b);this.setImageCss(g)},switchLargeImage:function(b){if(bookConfig.useTheAliCloudChart){var c=this.imageURL.removeStartFrom("?");window.isSupportWebp?0>c.indexOf("webp")?c+="?x-oss-process=image/format,webp":bookConfig.textClarityEnhancement&&(c+="?x-oss-process=image"):c+="?x-oss-process=image/format,"+getWebpOriginFormat(c);switch(bookConfig.textClarityEnhancement){case 1:c+="/sharpen,100"; break;case 2:c+="/sharpen,150";break;case 3:c+="/sharpen,200"}if(isPhone()||isPad())if(this.largeImageObject)this.largeImageObject&&this.largeImageObject.show();else{this.largeImageObject=new ImageObject;this.largeImageObject.attr("id",this.id);this.largeImageObject.alt(this.id);this.largeImageObject.src(c);var d=this.largeImageObject.$image;bookConfig.isStopMouseMenu&&$(d).css({"pointer-events":"none"});d[0].onload=function(){this.onResize(this.pageWidth,this.pageHeight);this.parent.append(d)}.bind(this)}else b&& (this.callback=b),this.imageObject.attr("src",c)}},switchNormalImage:function(b,c){var d=this,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress)return bookConfig.useTheAliCloudChart?b?f.yield(getPageDir(d.index,"normal",originTotalPageCount),3):f.jumpTo(2):f.return();if(2!=f.nextAddress){e=f.yieldResult;if(e==d.imageURL)return f.return();d.imageURL=e}isPhone()||isPad()?d.largeImageObject&&d.largeImageObject.hide():(c&&(d.callback=c),d.imageObject.attr("src",d.imageURL)); f.jumpToEnd()})},setImageCss:function(b){this.imageObject&&this.imageObject.css(b);this.largeImageObject&&this.largeImageObject.css(b)}}),PdfLoadArray=Class({create:function(b){this.stacks=[];this.limitCount=b;this.id=0;this.running=!1},push:function(b){if(b&&b.start){for(var c=0;c<this.stacks.length;c++)if(this.stacks[c]==b){console.log(b.isRepeat());if(b.isRepeat())return;this.stacks[c].pause();this.stacks.remove(c);c--;this.running=!1}try{this.stacks.push(b),this.start()}catch(d){}}},pop:function(b){if(this.running&& this.stacks[this.id]==b)this.stacks.remove(this.id),this.running=!1,this.runFirstTask();else for(var c=0;c<this.stacks.length;c++)if(this.stacks[c]==b){this.stacks.remove(c);break}},start:function(){this.runFirstTask()},runFirstTask:function(){if(!this.running){for(var b=0;b<this.stacks.length;b++)if(this.stacks[b]&&this.stacks[b].start&&!this.stacks[b].rendered){this.id=b;this.running=!0;this.stacks[b].start().then(function(){this.stacks.remove(this.id);this.running=!1;this.runFirstTask()}.bind(this)); return}this.running=!1}},next:function(){this.id++;this.id==this.stacks.length?this.running=!1:this.stacks&&this.stacks[this.id]&&this.stacks[this.id].start&&!this.stacks[this.id].rendered?this.stacks[this.id].start().then(function(){this.stacks[this.id]&&this.next()}.bind(this)):this.next()},destroy:function(){this.stacks&&0<this.stacks.length&&(this.stacks.forEach(function(b){b.pause();b.destroy()}),this.stacks=[],this.id=0,this.running=!1)}}),PdfLoadingTask=Class({create:function(b,c,d,e,f){this.page= this.loadingTask=null;this.loaded=this.rendered=!1;this.index=b;this.type=c;this.pageWidth=d;this.pageHeight=e;this.callback=f;this.renderHeight=this.renderWidth=0},start:function(){var b=this.index,c=this.type;return new Promise(function(d,e){var f=this,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){if(1==h.nextAddress){if(!b||0>b||b>bookConfig.totalPageCount)return e(),h.return();if(f.page)return f.loaded=!0,f.renderCanvas(f.pageWidth,f.pageHeight).then(function(k){this.callback&& this.callback(k);this.rendered=!0;d(k)}.bind(f)),h.return();f.loadingTask&&(f.loadingTask.destroy(),f.loadingTask=null);return h.yield(getPageDir(b,c,originTotalPageCount),2)}g=h.yieldResult;"object"==typeof g&&(g=g[0]);getBlob(g).then(function(k){this.loadingTask=pdfjsLib.getDocument({url:k.url,password:k.password});this.loadingTask.promise.then(function(l){l.getPage(1).then(function(n){this.loaded=!0;this.page=n;this.renderCanvas(this.pageWidth,this.pageHeight).then(function(p){this.rendered=!0; this.callback&&this.callback(p);d(p)}.bind(this))}.bind(this))}.bind(this))}.bind(f));h.jumpToEnd()})}.bind(this))},renderCanvas:function(b,c){this.rendered=!1;return new Promise(function(d,e){this.renderWidth=b;this.renderHeight=c;this.renderTask&&(this.renderTask.cancel(),this.renderTask=null);var f=$("<canvas><canvas/>")[0],g=f.getContext("2d"),h=window.devicePixelRatio||1,k=this.page,l=k.getViewport({scale:1});l=fitPageWidthHeight(b,c,l.width,l.height).x/l.width;l=k.getViewport({scale:l});var n= l.width,p=l.height;isPC()||(n>p?3E3<n*h&&(h=3E3/n):3E3<p*h&&(h=3E3/p));f.width=n*h;f.height=p*h;1==h?(f.style.width=f.width+"px",f.style.height=f.height+"px"):(f.style.width=n+"px",f.style.height=p+"px");g={canvasContext:g,transform:1!==h?[h,0,0,h,0,0]:null,viewport:l};try{this.renderTask=k.render(g),this.renderTask.promise.then(function(){this.rendered=!0;d(f)}.bind(this))}catch(v){e(v)}}.bind(this))},remove:function(){},destroy:function(){this.loadingTask&&(this.loadingTask.destroy(),this.loadingTask= null);this.renderTask&&(this.renderTask.cancel(),this.renderTask=null);this.loaded=this.rendered=!1},isRepeat:function(){return this.loaded?this.pageWidth==this.renderWidth&&this.pageHeight==this.renderHeight?!0:!1:!1},pause:function(){this.loaded&&this.renderTask&&(this.renderTask.cancel(),this.renderTask=null,this.rendered=!1)},enterSide:function(){},leaveSide:function(){},changeRenderWH:function(b,c){if(this.pageWidth!=b||this.pageHeight!=c)this.pageWidth=b,this.pageHeight=c,this.rendered=!1}}); window.pdfPages={normal:[],thumb:[],large:[]}; function getBlob(b){return new Promise(function(c,d){d=new XMLHttpRequest;d.open("get",b,!0);d.responseType="blob";d.onload=function(){if(4==this.readyState&&200==this.status){(new Date).getTime();window.response=this.response;var e=new FileReader;e.onload=function(){window.arrayBuffer=new Uint8Array(this.result)};e.readAsArrayBuffer(response);var f=response.slice(1083,response.size-1003,"application/pdf"),g="",h=response.slice(1080,1083),k=response.slice(response.size-1003,response.size-1E3);e=new FileReader; e.onload=function(){g=this.result+g;var l=new FileReader;l.onload=function(){g+=this.result;var n=f.slice(0,4E3),p=new FileReader;p.onload=function(){var v=new Uint8Array(this.result);for(i=0;i<this.result.byteLength;++i)v[i]=255-v[i];v=new Blob([new Blob([v.buffer]),f.slice(4E3,f.size)],{type:"application/pdf"});v=window.URL.createObjectURL(v);c({url:v,password:g})};p.readAsArrayBuffer(n)};l.readAsText(k)};e.readAsText(h)}};d.send()}.bind(this))} function blobToUint8Array(b){var c=URL.createObjectURL(b);b=new XMLHttpRequest;b.open("GET",c,!1);b.send();URL.revokeObjectURL(c);var d=new Uint8Array(b.response.length);for(c=0;c<b.response.length;++c)d[c]=255-b.response.charCodeAt(c);return d} var PdfLoad=Class({index:0,pageWidth:0,pageHeight:0,create:function(b,c,d,e,f,g,h){var k=this,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress)return k.index=b,k.type=c,k.pageWidth=e,k.pageHeight=f,k.renderWidth=e,k.renderHeight=f,k.callback=d,k.parent=h,l=k,n.yield(getPageDir(b,c,originTotalPageCount),2);l.imageURL=n.yieldResult;k.$content=$("<div style='position:absolute;left:0;top:0;width:100%;height:100%;'></div>");k.pdfLoadingTask=new PdfLoadingTask(k.index, k.type,e,f,k.loaded.bind(k));window.pdfLoadStack||(window.pdfLoadStack=new PdfLoadArray(3));window.pdfLoadStack&&pdfLoadStack.push(k.pdfLoadingTask);n.jumpToEnd()})},loaded:function(b){this.pdfLoaded=!0;this.changeImageSrc(b)},enterSide:function(){this.enter=!0},leaveSide:function(){this.enter=!1;this.pdfLoadingTask&&this.pdfLoadingTask.leaveSide()},zoomIn:function(){isPhone()||isPad()},zoomOut:function(){isPhone()||isPad()},resizeSvg:function(b,c){this.renderWidth=b;this.renderHeight=c;this.resizeImage(b, c);window.pdfLoadStack&&(isPC()||isSlideBook()||0<=BookInfo.getCurrentPages().indexOf(this.index))&&(this.pdfLoadingTask.changeRenderWH(b,c),pdfLoadStack.push(this.pdfLoadingTask))},onResize:function(b,c){if(b!=this.pageWidth||c!=this.pageHeight)this.pageWidth=b,this.pageHeight=c,this.renderWidth=b,this.renderHeight=c,this.resizeImage(b,c),window.pdfLoadStack&&(isPC()||isSlideBook()||0<=BookInfo.getCurrentPages().indexOf(this.index))&&this.pdfLoadingTask&&(this.pdfLoadingTask.changeRenderWH(b,c), pdfLoadStack.push(this.pdfLoadingTask))},resizeImage:function(b,c){if(this.width&&this.height){var d={width:"100%",height:"100%",position:"absolute",top:0,left:0},e=fitPageWidthHeight(b,c,this.width,this.height);.01<=(b-e.x)/c&&!PageInfo.pageIsStrech(this.index)&&(d.width=e.x+"px",d.left=Math.round((b-e.x)/2)+"px");.01<=(c-e.y)/b&&!PageInfo.pageIsStrech(this.index)&&(d.height=e.y+"px",d.top=Math.round((c-e.y)/2)+"px");e=transformCSS({scaleX:this.pageWidth/b,scaleY:this.pageHeight/c,origin:{x:0,y:0}}, !1);this.$content.css(e);this.$content.css({width:b+"px",height:c+"px"});this.$canvas.css(d)}},changeImageSrc:function(b){if(this.pdfLoaded){var c=this.renderWidth,d=this.renderHeight;this.width=parseFloat(b.style.width);this.height=parseFloat(b.style.height);this.$canvas=$(b);b={position:"absolute",top:0,left:0};fitPageWidthHeight(c,d,this.width,this.height);b.left=Math.round((c-this.width)/2)+"px";b.top=Math.round((d-this.height)/2)+"px";this.$canvas.css(b);this.$content.empty().append(this.$canvas); this.callback&&this.callback(this.imageURL,this.imageURL,this.$content,this.index)}},destroy:function(){this.pdfLoadingTask&&(window.pdfLoadStack&&pdfLoadStack.pop(this.pdfLoadingTask),this.pdfLoadingTask.destroy(),this.pdfLoadingTask=null)}}),ImageArrayLoadImage=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:"",create:function(b,c,d,e,f,g,h,k,l){var n=this,p,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){n.index=b;n.type=d;n.i= l;n.callback=e;n.errorCallback=f;n.pageWidth=g;n.pageHeight=h;n.isMirrorSide=k;p=c;bookConfig.useTheAliCloudChart&&BookInfo.getBook().status_zoom&&(p=p.removeStartFrom("?"));n.imageURL=p;n.imageObject=new ImageObject;n.imageObject.alt(n.index);n.imageObject.src(n.imageURL);n.imageObject.css({"z-index":0});n.$image=n.imageObject.$image;bookConfig.EnableRecognizeQRcodePressOnMobile&&n.imageObject.css({"-webkit-touch-callout":"default"});n.loaded=!1;n.$image[0].onload=function(){this.loaded=!0;this.callback&& this.callback(this.$image);this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight;this.onResize(this.pageWidth,this.pageHeight)}.bind(n);n.$image[0].onerror=function(){this.loaded=!0;this.errorCallback&&this.errorCallback(this.$image)}.bind(n);bookConfig.textSharpening&&(v="-webkit-optimize-contrast",_agent_.browser.firefox&&(v="-moz-crisp-edges"),_agent_.browser.opera&&(v="-o-crisp-edges"),n.$image.css({"image-rendering":v,"-ms-interpolation-mode":"nearest-neighbor"}));B.jumpToEnd()})}, zoomIn:function(b){bookConfig.useTheAliCloudChart&&isPC()?this.switchLargeImage(b):(isPhone()||isPad())&&this.highDefinition()},zoomOut:function(b,c){bookConfig.useTheAliCloudChart&&isPC()?this.switchNormalImage(b,c):(isPhone()||isPad())&&this.resize()},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;if((isPhone()||isPad())&&!this.isMirrorSide&&BookInfo.getBook().status_zoom)this.highDefinition();else{b/=c;c=this.width/this.height;this.imageObject.css({width:"100%",height:"100%",position:"absolute", top:0,left:0});var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);.01<=b-c&&!PageInfo.pageIsStrech(this.index)&&this.imageObject.css({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+"px"});-.01>=b-c&&!PageInfo.pageIsStrech(this.index)&&this.imageObject.css({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"});.01>Math.abs(b-c)&&isPC()&&(b>c?this.imageObject.css({width:"auto",left:Math.round((this.pageWidth-this.pageHeight*this.width/this.height)/2)+"px"}): this.imageObject.css({height:"auto",top:Math.round((this.pageHeight-this.pageWidth*this.height/this.width)/2)+"px"}));b=!1;if(isPhone()||isPad())b=!0;b=transformCSS({scale:1,origin:{x:0,y:0}},b);this.imageObject.css(b)}},resize:function(){var b=this.pageWidth/this.pageHeight,c=this.width/this.height;this.imageObject.css({width:"100%",height:"100%",position:"absolute",top:0,left:0});var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);.01<=b-c&&!PageInfo.pageIsStrech(this.index)&& this.imageObject.css({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+"px"});-.01>=b-c&&!PageInfo.pageIsStrech(this.index)&&this.imageObject.css({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"});b=!1;if(isPhone()||isPad())b=!0;b=transformCSS({scale:1,origin:{x:0,y:0}},b);this.imageObject.css(b)},highDefinition:function(){this.scale(this.width,this.height)},scale:function(b,c){var d=this.pageWidth/this.pageHeight,e=this.width/this.height;var f=this.pageHeight/c;var g=this.pageWidth/ b;.01<=d-e&&(g=f=this.pageHeight/c);-.01>=d-e&&(f=g=this.pageWidth/b);this.imageObject.css({width:b+"px",height:c+"px",position:"absolute",left:Math.round((this.pageWidth-b*g)/2)+"px",bottom:"auto",top:Math.round((this.pageHeight-c*f)/2)+"px",right:"auto"});b=!1;if(isPhone()||isPad())b=!0;g=transformCSS({scale:{x:g,y:f},origin:{x:0,y:0}},b);this.imageObject.css(g)},switchLargeImage:function(b){if(bookConfig.useTheAliCloudChart){b=this.imageURL.removeStartFrom("?");window.isSupportWebp?0>b.indexOf("webp")? b+="?x-oss-process=image/format,webp":bookConfig.textClarityEnhancement&&(b+="?x-oss-process=image"):b+="?x-oss-process=image/format,"+getWebpOriginFormat(b);switch(bookConfig.textClarityEnhancement){case 1:b+="/sharpen,100";break;case 2:b+="/sharpen,150";break;case 3:b+="/sharpen,200"}this.loaded&&(this.callback=void 0);this.imageObject.attr("src",b)}},switchNormalImage:function(b,c){var d=this,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress)return bookConfig.useTheAliCloudChart? b?f.yield(getPageDir(d.index,"normal",originTotalPageCount)[d.i],3):f.jumpTo(2):f.return();if(2!=f.nextAddress){e=f.yieldResult;if(!e||e==d.imageURL)return f.return();d.imageURL=e}d.loaded&&(d.callback=void 0);d.imageObject.attr("src",d.imageURL);f.jumpToEnd()})},destroy:function(){this.imageObject.destroy()}}),ImageArrayLoadSvg=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:"",create:function(b,c,d,e,f,g,h,k,l){var n=this,p;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){n.index= b;n.type=d;n.i=l;n.callback=e;n.errorCallback=f;n.pageWidth=g;n.pageHeight=h;n.isMirrorSide=k;p=c;bookConfig.useTheAliCloudChart&&!bookConfig.isEncryptionBook&&(p=p.removeStartFrom("?"));n.imageURL=p;n.$image=$("<img src='"+n.imageURL+"' style='z-index:0;'/>");bookConfig.EnableRecognizeQRcodePressOnMobile&&n.$image.css({"-webkit-touch-callout":"default"});n.$image[0].onload=function(){this.callback&&this.callback(this.$image);this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight; this.onResize(this.pageWidth,this.pageHeight)}.bind(n);n.$image[0].onerror=function(){this.errorCallback&&this.errorCallback(this.$image)}.bind(n);v.jumpToEnd()})},zoomIn:function(b){},zoomOut:function(b,c){},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;b/=c;c=this.width/this.height;this.$image.css({width:"100%",height:"100%",position:"absolute",top:0,left:0});var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);.01<=b-c&&!PageInfo.pageIsStrech(this.index)&& this.$image.css({width:"auto",left:Math.round((this.pageWidth-d.x)/2)+"px"});-.01>=b-c&&!PageInfo.pageIsStrech(this.index)&&this.$image.css({height:"auto",top:Math.round((this.pageHeight-d.y)/2)+"px"});b=!1;if(isPhone()||isPad())b=!0;b=transformCSS({scale:1,origin:{x:0,y:0}},b);_agent_.system.name!=_agent_.system.ANDROID&&this.$image.css(b)},scale:function(b,c){var d=this.pageWidth/this.pageHeight>b/c?this.pageHeight/c:this.pageWidth/b;this.$image.css({width:b+"px",height:c+"px",position:"absolute", left:(this.pageWidth-b*d)/2+"px",bottom:"auto",top:(this.pageHeight-c*d)/2+"px",right:"auto"});b=!1;if(isPhone()||isPad())b=!0;d=transformCSS({scale:d,origin:{x:0,y:0}},b);this.$image.css(d)},destroy:function(){this.$image=this.$image[0].onload=null},resizeSvg:function(b,c){if(isPhone()||isPad())b=fitPageWidthHeight(b,c,this.width,this.height),this.scale(b.x,b.y)}}),ImageArrayLoad=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:"",create:function(b, c,d,e,f,g){var h=this,k,l,n,p,v,B;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){if(1==t.nextAddress)return h.index=b,h.type=c,h.pageWidth=e,h.pageHeight=f,h.isMirrorSide=g,h.callback=d,h.$images=[],h.loadArray=[],t.yield(getPageDir(b,c,originTotalPageCount),2);k=t.yieldResult;h.imagesURL=k;l=0;n=function(){l++;this.callback&&l==k.length&&this.callback(k,k,this.$images,this.index)}.bind(h);p=function(u){l++;this.$images.removeElement(u);this.callback&&l==k.length&&this.callback(k, k,this.$images,this.index)}.bind(h);for(v=0;v<k.length;v++)B=-1<k[v].indexOf(".svg")?new ImageArrayLoadSvg(b,k[v],c,n,p,e,f,g,v):new ImageArrayLoadImage(b,k[v],c,n,p,e,f,g,v),h.$images.push(B.$image),h.loadArray.push(B);t.jumpToEnd()})},zoomIn:function(b){for(var c=0;c<this.loadArray.length;c++)this.loadArray[c].zoomIn&&this.loadArray[c].zoomIn(b)},zoomOut:function(b,c){for(var d=0;d<this.loadArray.length;d++)this.loadArray[d].zoomOut&&this.loadArray[d].zoomOut(b,c)},onResize:function(b,c){this.pageWidth= b;this.pageHeight=c;for(var d=0;d<this.loadArray.length;d++)if(this.loadArray[d].onResize)this.loadArray[d].onResize(b,c)},destroy:function(){for(var b=0;b<this.loadArray.length;b++)this.loadArray[b].destroy&&this.loadArray[b].destroy()},resizeSvg:function(b,c){for(var d=0;d<this.loadArray.length;d++)this.loadArray[d].resizeSvg&&this.loadArray[d].resizeSvg(b,c)}}),ImageStageLoad=Class({index:0,type:0,pageWidth:0,pageHeight:0,width:0,height:0,$image:null,imageURL:"",isMirrorSide:!1,create:function(b, c,d,e,f){this.index=b;this.type=c;this.pageWidth=e;this.pageHeight=f;this.callback=d;this.$image=$("<img/>");bookConfig.EnableRecognizeQRcodePressOnMobile&&this.$image.css({"-webkit-touch-callout":"default"});bookConfig.textSharpening&&(c="-webkit-optimize-contrast",_agent_.browser.firefox&&(c="-moz-crisp-edges"),_agent_.browser.opera&&(c="-o-crisp-edges"),this.$image.css({"image-rendering":c,"-ms-interpolation-mode":"nearest-neighbor"}));this.added=!1;this.$image[0].onload=function(){this.callback&& this.callback(this.imageURL,this.imageURL,this.$image[0],b);this.width=this.$image[0].naturalWidth;this.height=this.$image[0].naturalHeight;this.resizeImage();this.added=!0}.bind(this);this.onResize(e,f)},zoomIn:function(b){},zoomOut:function(b,c){},onResize:function(b,c){var d=this,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress)return d.pageWidth=b,d.pageHeight=c,d.resizeImage(),f.yield(d.getImageUrl(),2);e=f.yieldResult;e!=d.imageURL?d.changeImageSrc(e):d.resize(); f.jumpToEnd()})},changeImageSrc:function(b){this.imageURL=b;this.supportCanvas()?(this.$canvasImage||(this.$canvasImage=$("<img style=''/>")),this.$canvasImage[0].crossOrigin="Anonymous",this.$canvasImage.attr("src",b),this.$canvasImage[0].onload=function(){this.renderCanvas()}.bind(this)):this.$image.attr("src",b)},resize:function(){this.supportCanvas()&&this.renderCanvas()},supportCanvas:function(){return 0<=window.location.href.indexOf("file:///")?!1:!0},renderCanvas:function(){var b=$("<canvas><canvas/>")[0], c=b.getContext("2d"),d=window.devicePixelRatio||1,e=this.$canvasImage,f=fitPageWidthHeight(this.pageWidth,this.pageHeight,e[0].naturalWidth,e[0].naturalHeight),g=f.x;f=f.y;b.width=g*d;b.height=f*d;b.style.width=g+"px";b.style.height=f+"px";c.drawImage(e[0],0,0,g*d,f*d);b=b.toDataURL("image/jpeg",1);$(this.$image[0]).attr("src",b)},resizeImage:function(){var b={width:"100%",height:"100%",position:"absolute",top:0,left:0},c=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.width,this.height);.01<= (this.pageWidth-c.x)/this.pageHeight&&!PageInfo.pageIsStrech(this.index)&&(b.width="auto",b.left=Math.round((this.pageWidth-c.x)/2)+"px");.01<=(this.pageHeight-c.y)/this.pageWidth&&!PageInfo.pageIsStrech(this.index)&&(b.height="auto",b.top=Math.round((this.pageHeight-c.y)/2)+"px");c=transformCSS({scale:1,origin:{x:0,y:0}},!1);this.$image.css(c);this.$image.css(b)},getImageUrl:function(){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){return 1==c.nextAddress?c.yield(getPageDir(b.index, b.type,originTotalPageCount,b.pageWidth,b.pageHeight),2):c.return(c.yieldResult)})}}),PageBackground=Class({create:function(b,c,d,e,f,g,h){var k=this,l,n,p;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){if(1==v.nextAddress){if(!b||!c)return v.return();k.type=c;return v.yield(getPageDir(b,c,originTotalPageCount),2)}l=v.yieldResult;n=getPageSize(b,c);k.imageURL=l;k.load=null;k.parent=h;p=k.getUrlType(l,n);switch(p){case 0:k.load=new CanvasLoad(b,c,d,e,f,g,h);break;case 1:k.load=new ImageLoad(b, c,d,e,f,g,h);break;case 2:k.load=new JsLoad(b,c,d,e,f,g,h);break;case 3:k.load=new SvgLoad(b,c,d,e,f,g,h);break;case 4:k.load=new ImageArrayLoad(b,c,d,e,f,g,h);break;case 5:k.load=new PdfLoad(b,c,d,e,f,g,h);break;case 6:k.load=new ImageStageLoad(b,c,d,e,f,g,h);break;case 7:k.load=new NoneLoad(b,c,d,e,f,g,h)}v.jumpToEnd()})},getUrlType:function(b,c){return this.isPdf(b)?5:c&&isPC()?6:"object"==typeof b?4:"normal"==this.type&&bookConfig.usePdfJs?0:-1<b.indexOf("none")?7:-1<b.indexOf(".js")?2:-1<b.indexOf(".svg")? 3:1},isPdf:function(b){return-1<b.indexOf(".pdf")||-1<b.indexOf(".zip")?!0:!1},onResize:function(b,c){if(this.load&&this.load.onResize)this.load.onResize(b,c)},zoomIn:function(b,c){this.load&&this.load.zoomIn&&this.load.zoomIn(b,c)},zoomOut:function(b,c){this.load&&this.load.zoomOut&&this.load.zoomOut(b,c)},destroy:function(){this.load&&this.load.destroy&&this.load.destroy()},resizeSvg:function(b,c){this.load&&this.load.resizeSvg&&this.load.resizeSvg(b,c)},enterSide:function(){this.load&&this.load.enterSide&& this.load.enterSide()},leaveSide:function(){this.load&&this.load.leaveSide&&this.load.leaveSide()}}),Side=Class({bookType:0,pageIndex:0,width:0,height:0,pageWidth:0,pageHeight:0,visible:!0,$annotation:null,sideImage:null,sideContent:null,side:null,create:function(b,c,d,e){this.bookType=d;this.pageIndex=b;this.isMirrorSide=e;this.side=$("<div style='position:absolute;will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;'></div>");this.side.attr("id",c+b);b=PageInfo.getPageColor(this.pageIndex); this.sideContent=$("<div class='side-content' style='background-color : "+b+";'></div>");this.side.append(this.sideContent);this.sideImage=$("<div class='side-image' style='position:absolute;z-index:0;width:100%;height:100%;top:0;left:0;'/>");this.sideContent.append(this.sideImage)},setCSSByStyle:function(b){this.side.css(b)},setCSSByName:function(b){this.side.attr("class",b)},enterSide:virtual_function,leaveSide:virtual_function,remove:virtual_function,zoomInSideImage:virtual_function,zoomOutSideImage:virtual_function, switchLargeImage:virtual_function,switchNormalImage:virtual_function,loading:virtual_function,unLoading:virtual_function,mirrorSide:virtual_function,setFlipShadow:virtual_function,addFlipShadow:virtual_function,resizeFlipShadow:virtual_function,clearFlipShadow:virtual_function,fillContent:virtual_function,fillPage:virtual_function,initSelectTextEvent:virtual_function,destroySelect:virtual_function,initMagnifierEvent:virtual_function,destroyMagnifier:virtual_function,pauseAnimation:virtual_function, startAnimation:virtual_function,addHistoryTexts:virtual_function,highlightSearch:virtual_function,clearHighlight:virtual_function,resetSlider:virtual_function}),BookRestrict=Class({statics:{unLimitPages:[],open:!1,isLoaded:!1,isRestrictPage:function(b){if(!bookConfig.isEncryptionBook)return"none";if(this.open)return"open";var c=this.unLimitPages;return c&&c[b]?c[b]:"restrict"},setRestrictLoaded:function(b){this.isLoaded=b;BookEvent.trigger("onLoadBookRestrict",["onLoadBookRestrict",this.isLoaded])}, getRestrictToken:function(){try{if(!bookConfig.isEncryptionBook||!window.bookId)return"";var b=(new Date).format("yyyy-MM-dd",!0),c=window.localStorage.getItem("restrictToken"+window.bookId+b);return c?c:""}catch(d){}},setRestrictToken:function(b){try{if(!bookConfig.isEncryptionBook||!window.bookId)return"";var c=(new Date).format("yyyy-MM-dd",!0);window.localStorage.setItem("restrictToken"+window.bookId+c,b)}catch(d){}},fillBookContent:function(){this.open=!0;this.loading=!1;this.fillBooks("flipBook"); this.fillBooks("singlePageBook");this.fillBooks("catalogBook");this.fillBooks("slideBook");this.fillBooks("singleSlideBook");BookEvent.trigger("fillBookRestrict",["fillBookRestrict",this.open])},fillBooks:function(b){if(b=global[b])b.loading(),b.fillBookContent()},setRestrictPages:function(b){try{for(var c=1;c<=bookConfig.totalPageCount;c++){a:{var d=c;try{for(var e=b.split(";"),f=0;f<e.length;f++){var g=e[f];if(0<=g.indexOf("-")){var h=g.split("-");if(Number.isBetween(d,parseInt(h[0]),parseInt(h[1]))){var k= !1;break a}}else if(d==parseInt(g)){k=!1;break a}}}catch(l){}k=!0}k?BookRestrict.unLimitPages[c]="restrict":BookRestrict.unLimitPages[c]="open"}}catch(l){}}}}),Page=Class({create:function(b,c,d,e){this._super(b,c,d,e);this.renderPage();this.addFlipShadow()},remove:function(){this.side.remove();this.render&&(this.render.taskPool.stop(),this.renderInterval&&(window.clearInterval(this.renderInterval),this.renderInterval=void 0))},destroy:function(){this.pageBackground&&this.pageBackground.destroy(); this.sideImage=this.side=void 0;this.hasReader&&this.destroySlider()},hasReader:function(){return window.readerConfig&&0<window.readerConfig.pages.length&&window.readerConfig.pages.length>=this.pageIndex&&(this.hasReaderItems()||window.inverseEditor&&window.inverseEditor.length&&window.inverseEditor[this.pageIndex-1]&&window.inverseEditor[this.pageIndex-1].length)?!0:!1},hasReaderItems:function(){return window.readerConfig.pages[this.pageIndex-1]&&(window.readerConfig.pages[this.pageIndex-1].insertPageLink&& window.readerConfig.pages[this.pageIndex-1].insertPageLink.length||window.readerConfig.pages[this.pageIndex-1].items&&window.readerConfig.pages[this.pageIndex-1].items.length||window.readerConfig.pages[this.pageIndex-1].hasSceneAnime||window.readerConfig.pages[this.pageIndex-1].background&&window.readerConfig.pages[this.pageIndex-1].background.isEnable||window.readerConfig.pages[this.pageIndex-1].camera&&window.readerConfig.pages[this.pageIndex-1].camera.isEnable||window.readerConfig.pages[this.pageIndex- 1].foreground&&window.readerConfig.pages[this.pageIndex-1].foreground.isEnable||window.readerConfig.pages[this.pageIndex-1].subtitle&&window.readerConfig.pages[this.pageIndex-1].subtitle.isEnable)},loading:function(){"restrict"==BookRestrict.isRestrictPage(this.pageIndex)||this.originalImageLoaded||this.removeLoad||(this.loadingImage||(this.loadingImage=$("<div class='loadingOuter'><img alt='loadingOuter' width='auto' height='auto' class='loadingImage' src='"+bookConfig.pageLoadingUrl+"'/></div>")), this.sideContent.append(this.loadingImage))},unLoading:function(b){this.hasReader()&&!b||!this.loadingImage||(this.loadingImage.css({display:"none"}),this.loadingImage.remove(),this.loadingImage=null)},restrict:function(){if(!this.restrictImage){this.restrictImage=$("<div class='loadingOuter'></div>");var b=1==this.pageIndex?getMeta("og:image"):bookConfig.pageRestrictUrl;this.restrictImage.css({"background-image":"url("+b+")"});1==this.pageIndex?this.restrictImage.css({"background-size":"contain"}): this.restrictImage.css({"background-size":"auto"});this.mirrorRestrict();this.sideContent.append(this.restrictImage)}},unRestrict:function(){this.restrictImage&&(this.restrictImage.remove(),this.restrictImage=null)},mirrorRestrict:function(){if(this.isMirrorSide&&this.restrictImage){var b="scaleX(-1)";bookConfig.FlipDirection&&(b="scaleY(-1)");this.restrictImage.css({"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b,opacity:.2})}},mirrorSide:function(){this.isMirrorSide= !0;var b="scaleX(-1)";bookConfig.FlipDirection&&(b="scaleY(-1)");this.sideImage.css({"-webkit-transform":b,"-moz-transform":b,"-o-transform":b,"-ms-transform":b,opacity:.2});this.rendering&&(this.rendering.destroy(),this.rendering=null);this.unLoading()},fillPreviewImage:function(){var b=this,c,d;return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){if(1==e.nextAddress)return bookConfig.loadPreviewImage?b.isMirrorSide||window.sliderJS&&window.sliderJS[b.pageIndex-1]&&sliderJS[b.pageIndex- 1].elements&&sliderJS[b.pageIndex-1].elements.length?e.jumpTo(0):e.yield(getPageDir(b.pageIndex,"previewPage",originTotalPageCount),3):e.return();c=e.yieldResult;c.startsWith("none")||(b.sideImage.css({"background-image":"url("+c+")","background-size":"contain","background-repeat":"no-repeat","background-position":"center"}),bookConfig.removeLoad&&(d=$("<img src='"+c+"'/>"),d[0].onload=function(){this.unLoading();this.unRestrict();this.removeLoad=!0}.bind(b)));e.jumpToEnd()})},setFlipShadow:function(b, c,d){this.pageFlipShadow&&this.pageFlipShadow.flip(b,c,d)},addFlipShadow:function(){bookConfig.HardInnerPageEnable?this.addHardFlipShadow():this.pageFlipShadow||(this.pageFlipShadow="magazine"==bookConfig.pageHighlightType?new PageHighlightsFlipShadow(this.side,this.pageIndex):new PageFlipShadow(this.side,this.pageIndex))},addHardFlipShadow:function(){this.pageFlipShadow||(this.pageFlipShadow=new HardPageFlipShadow(this.side))},clearFlipShadow:function(){this.pageFlipShadow&&this.pageFlipShadow.clear(); this.side.removeClass("boxShadow")},resizeFlipShadow:function(b,c){this.pageFlipShadow&&this.pageFlipShadow.resize(b,c)},centerPage:function(){this.isLeft=!1;this.side.attr("class","center-side")},setLeftOrRight:function(b){(this.isLeft=b)?this.side.attr("class","left-side"):this.side.attr("class","right-side")},setUpOrDown:function(b){(this.isUp=b)?this.side.attr("class","up-side"):this.side.attr("class","down-side")},renderPage:function(){this.rendering&&(this.rendering.destroy(),this.rendering= null);this.rendering=new PageRendering(this.side,this.pageIndex,this.bookType);this.rendering.onResize(this.width,this.height);this.rendering.render()},hideMiddleShadow:function(){this.rendering&&this.rendering.hideMiddleShadow()},fillContent:function(b){"restrict"==BookRestrict.isRestrictPage(this.pageIndex)?this.restrict():this.fillPage(this.pageIndex,b)},fillPage:function(b,c,d){this.isMirrorSide&&!bookConfig.showMirrorSide||b!=this.pageIndex||this.originalImageLoaded||(d||(d="normal",this.isMirrorSide&& (d="thumb")),"normal"==d&&(bookConfig.usePdfJs?(b=function(e,f,g){this.pageBackground.load.renderCnvas(e,f,g,this.pageIndex,this.pageWidth,this.pageHeight,this.initContents.bind(this))}.bind(this),this.initPageBackground(c,"normal",b)):this.initPageBackground(c,"normal",this.initContents.bind(this))),"thumb"==d&&(this.type="thumb",this.initPageBackground(c,"thumb",this.onMirrorSideLoaded.bind(this))))},initPageBackground:function(b,c,d){if(!this.pageBackground||b)this.pageBackground=new PageBackground(this.pageIndex, c,d,this.pageWidth,this.pageHeight,this.isMirrorSide,this.sideImage),this.imageURL=this.pageBackground.imageURL},initContents:function(b,c,d){imageLoaded[this.pageIndex]=!0;this.isReaderConfigLoaded(function(){try{this.onOriginalImageLoaded(b,c,d)}catch(e){}}.bind(this))},onMirrorSideLoaded:function(b,c,d){b&&(this.originalImageLoaded=!1,this.unLoading(),this.unRestrict(),isPhone()||isPad()?bookConfig.EnableRecognizeQRcodePressOnMobile||$(d).css({"pointer-events":"none"}):bookConfig.isStopMouseMenu&& $(d).css({"pointer-events":"none"}),this.sideImage&&this.sideImage.empty().append(d))},onOriginalImageLoaded:function(b,c,d){var e=this,f,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){if(!b)return h.return();e.originalImageLoaded=!0;e.unLoading();e.unRestrict();if(e.sideImage&&("string"==typeof c&&!c.startsWith("none")||"string"!=typeof c))if("string"==typeof c||"object"==typeof c&&0<=c[0].indexOf(".zip"))isPhone()||isPad()?bookConfig.EnableRecognizeQRcodePressOnMobile||$(d).css({"pointer-events":"none"}): bookConfig.isStopMouseMenu&&$(d).css({"pointer-events":"none"}),e.sideImage.empty().append(d);else for(e.sideImage.empty(),f=0;f<d.length;f++)isPhone()||isPad()?bookConfig.EnableRecognizeQRcodePressOnMobile||$(d).css({"pointer-events":"none"}):bookConfig.isStopMouseMenu&&$(d).css({"pointer-events":"none"}),e.sideImage.append(d[f]),e.imageWidth=d[f][0].naturalWidth,e.imageHeight=d[f][0].naturalHeight;g=fitPageWidthHeight(e.pageWidth,e.pageHeight,e.imageWidth,e.imageHeight);e.pageAttachments||(e.pageAttachments= new PageAttachmentsParser(e.sideContent,g.x,g.y,e.pageWidth,e.pageHeight,e.pageIndex,e.bookType,e,function(){if(this.onPageLoaded)this.onPageLoaded(this.pageIndex)}.bind(e)));h.jumpToEnd()})},isReaderConfigLoaded:function(b){try{var c=function(){try{b&&b()}catch(e){}};(window.readerConfig||window.readerConfigLoaded)&&c();var d=window.setInterval(function(){window.readerConfigLoaded&&(window.clearInterval(d),c())},100)}catch(e){}},onPageLoaded:function(){var b=this.pageIndex;BookInfo.getBook().getRealBookIndex&& (b=BookInfo.getBook().getRealBookIndex(this.pageIndex));BookInfo.getBook().onBookPageLoaded(b)},enterSide:function(){this.pageAttachments&&this.pageAttachments.enterSide();this.pageBackground&&this.pageBackground.enterSide();window.vuePopDom&&window.vuePopDom.enterPage&&window.vuePopDom.enterPage()},leaveSide:function(){this.pageAttachments&&this.pageAttachments.leaveSide();this.pageBackground&&this.pageBackground.leaveSide();window.vuePopDom&&window.vuePopDom.leavePage&&window.vuePopDom.leavePage()}, initSelectTextEvent:function(){this.pageAttachments&&this.pageAttachments.select()},destroySelect:function(){this.pageAttachments&&this.pageAttachments.destroySelect()},initMagnifierEvent:function(){this.pageAttachments&&this.pageAttachments.initMagnifierEvent()},destroyMagnifier:function(){this.pageAttachments&&this.pageAttachments.destroyMagnifier()},pauseAnimation:function(){this.pageAttachments&&this.pageAttachments.pauseAnimation()},startAnimation:function(){this.pageAttachments&&this.pageAttachments.startAnimation()}, resetSlider:function(){this.pageAttachments&&this.pageAttachments.resetSlider()},destroySlider:function(){this.pageAttachments&&this.pageAttachments.destroySlider()},addHistoryTexts:function(){this.pageAttachments&&this.pageAttachments.addHistoryTexts()},highlightSearch:function(){this.pageAttachments&&this.pageAttachments.highlightSearch()},clearHighlight:function(){this.pageAttachments&&this.pageAttachments.clearHighlight()},initReaderOrSlider:function(){this.pageAttachments&&this.pageAttachments.initReaderOrSlider()}, onResize:function(b,c){this.resizePage(b,c);this.resizeFlipShadow(b,c);if(this.rendering)this.rendering.onResize(b,c);this.pageAttachments&&(b=fitPageWidthHeight(this.pageWidth,this.pageHeight,this.imageWidth,this.imageHeight),this.pageAttachments.onResize(b.x,b.y,this.pageWidth,this.pageHeight))},resizePage:function(b,c){this.width=b;this.height=c;this.pageWidth=parseInt(100*b/(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight)));this.pageHeight=parseInt(100*c/(parseFloat(bookConfig.visibleAreaBottom)- parseFloat(bookConfig.visibleAreaTop)));this.side.css({width:b,height:c});this.sideContent.css({width:this.pageWidth,height:this.pageHeight,top:-this.pageHeight*parseFloat(bookConfig.visibleAreaTop)/100,left:-this.pageWidth*parseFloat(bookConfig.visibleAreaLeft)/100});if(this.pageBackground)this.pageBackground.onResize(this.pageWidth,this.pageHeight)},zoomInSideImage:function(){this.pageBackground.zoomIn()},zoomOutSideImage:function(){this.pageBackground.zoomOut()},switchLargeImage:function(){this.pageBackground&& this.pageBackground.zoomIn(this.onSwitchImage.bind(this))},switchNormalImage:function(b){this.pageBackground&&this.pageBackground.zoomOut(b,this.onSwitchImage.bind(this))},onSwitchImage:function(b,c,d){if(!this.originalImageLoaded)this.initContents(b,c,d);else if(b)if("string"==typeof c)isPhone()||isPad()?bookConfig.EnableRecognizeQRcodePressOnMobile||$(d).css({"pointer-events":"none"}):bookConfig.isStopMouseMenu&&$(d).css({"pointer-events":"none"}),this.sideImage.empty().append(d),this.imageWidth= d.naturalWidth,this.imageHeight=d.naturalHeight;else{this.sideImage.empty();for(b=0;b<d.length;b++)isPhone()||isPad()?bookConfig.EnableRecognizeQRcodePressOnMobile||$(d).css({"pointer-events":"none"}):bookConfig.isStopMouseMenu&&$(d).css({"pointer-events":"none"}),this.sideImage.append(d[b]);this.imageWidth=d[b][0].naturalWidth;this.imageHeight=d[b][0].naturalHeight}},resizeSvg:function(b,c){try{this.pageBackground.resizeSvg(b,c)}catch(d){}}}).extend(Side),PageAttachment=Class({create:function(){}, onResize:function(){},enterSide:function(){},leaveSide:function(){}}),PageMagnifier=Class({create:function(b,c,d,e,f,g){this.$container=b;this.pageIndex=d;this.width=e;this.height=f;this.$parent=c;this.bookType=g;this.sideImage=c.find(".side-image");this.initMagnifierEvent()},initMagnifierEvent:function(){this.$container.bind("mouseenter",function(b){global.canMagnifierZoom&&global.magnifierZoomBox&&(global.magnifierZoomBox.show(),global.magnifierZoomBox.setImg(this.sideImage,this.sideImage.find("img"), b))}.bind(this));this.$container.bind("mouseleave",function(){global.canMagnifierZoom&&global.magnifierZoomBox&&global.magnifierZoomBox.hide()}.bind(this));this.$container.bind("mousemove",function(b){global.canMagnifierZoom&&global.magnifierZoomBox&&(global.magnifierZoomBox.show(),global.magnifierZoomBox.drawBg(b))}.bind(this))},destroyMagnifier:function(){this.$container&&this.$container.remove();this.$container=void 0},onResize:function(){}}).extend(PageAttachment),PageHighlight=Class({create:function(b, c,d,e,f,g){this.$container=b;this.pageIndex=d;this.width=e;this.height=f;this.$parent=c;this.bookType=g;this.highlightSearch()},highlightSearch:function(){var b=this,c,d,e,f,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){if(1==h.nextAddress){global.slideHightLightList[b.pageIndex]&&b.searchTxtFromSlider();c=getSearchRealPageIndex(b.pageIndex);if(-1==c)return h.return();d=!1;for(e=0;e<positionForPages.length;e++)if(positionForPages[e]&&positionForPages[e].page&&positionForPages[e].page== c){d=!0;break}if(d)return highlightSearchFun(b.$container,c),h.jumpTo(0);f=String.format(bookConfig.searchPositionJS,c);1<b.pageIndex&&(f=f.replace("[1]","["+c+"]"));g=/\.*\/?(\w+\/)*\w+(\[|\()?\d+(\]|\))?\.js/gi;return f.match(g)?h.yield(getArticleImage(fixURLValue(f)),3):h.return()}f=h.yieldResult;if(!f)return h.return();loadJavascript(f,function(){highlightSearchFun(this.$container,c)}.bind(b),function(){});h.jumpToEnd()})},clearHighlight:function(){this.$container.css({"background-image":""}); this.$container.remove();clearHighlightFun(this.$container);this.clearSliderHighLight()},searchTxtFromSlider:function(){if(BookInfo.getBook().pageArray[this.pageIndex]&&BookInfo.getBook().pageArray[this.pageIndex].page&&BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments&&BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments.pageAnimation){var b=BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments.pageAnimation;b&&b.searchSliderHighLight()}},clearSliderHighLight:function(){if(BookInfo.getBook().pageArray[this.pageIndex]&& BookInfo.getBook().pageArray[this.pageIndex].page&&BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments&&BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments.pageAnimation){var b=BookInfo.getBook().pageArray[this.pageIndex].page.pageAttachments.pageAnimation;b&&b.clearSliderHighLight()}},onResize:function(){}}).extend(PageAttachment),PageAnnotation=Class({create:function(b,c,d,e,f,g){this.$container=b;this.pageIndex=d;this.width=e;this.height=f;this.$parent=c;this.bookType= g;this.pageAnnotation=new Annotation(this.$container,d,e,f);global.annotationCookie||this.bookType!=BookInfo.getBookType()||(global.annotationCookie=new AnnotationCookie(b,this.width,this.height));this.enterSide()},enterSide:function(){isBelowIE9()&&$(this.$container).css({"background-image":"url('aaaa.a')"});global.annotationCookie&&this.bookType==BookInfo.getBookType()&&global.annotationCookie.repaintCookie(this.width,this.height,this.pageIndex-1,this.$container)},leaveSide:function(){},onResize:function(b, c){if(b!=this.width||c!=this.height)this.width=b,this.height=c,this.pageAnnotation.onResize(b,c,1,this.$container),global.annotationCookie&&this.bookType==BookInfo.getBookType()&&global.annotationCookie.repaintCookie(b,c,this.pageIndex-1,this.$container)}}).extend(PageAttachment),PageSelect=Class({create:function(b,c,d,e,f,g){this.$container=b;this.pageIndex=d;this.width=e;this.height=f;this.$parent=c;this.bookType=g;this.initEvent()},initEvent:function(){var b=new Hammer.Manager(this.$container[0]); b.add(new Hammer.Pan({threshold:0}));b.add(new Hammer.Tap);b.on("panstart panmove panend",this.selectText.bind(this));b.on("tap",this.onTap.bind(this))},onTap:function(){this.$container&&this.$container.empty();this.hint&&this.hint.hide()},destroySelect:function(){this.$container&&this.$container.remove();this.hint&&this.hint.destroy();this.$container=this.hint=void 0},selectText:function(b){if(!BookInfo.getBook().flipping&&global.positionForPages){var c;for(c=0;c<positionForPages.length;c++)if(positionForPages[c]&& positionForPages[c].page&&positionForPages[c].page==getSearchRealPageIndex(this.pageIndex)){var d=positionForPages[c].positions;break}this.$container.empty();if(d){this.searchTextHighlight||(this.searchTextHighlight=new SearchTextHighlight(this.width,this.height,rightToLeft),this.searchTextHighlight.loadFromPage(d),this.highlightDOM=new SearchHighlightDOM(this.$container));d=this.getArea(b);d=this.searchTextHighlight.selectText(d);this.highlightText="";if(d){c=d.getRects();for(var e=0;e<c.length;){for(var f= [],g=0;4>g;g++)f[g]=c[e+g];this.highlightDOM.addHighlight(f);e+=4}this.highlightText=d.getText()}"panend"==b.type&&(isPhone()||isPad()?this.highlightText&&(global.phoneCopyForm||(phoneCopyForm=new CopyForm({parent:tmpContainer,formType:"copy",rightToLeft:rightToLeft})),phoneCopyForm.fillText(this.highlightText),phoneCopyForm.show()):(d=b.srcEvent.pageX,b=b.srcEvent.pageY,this.hint||(this.hint=new divHint(getLanguage("lblCopy","Copy"),d,b),this.hint.addClass("hint_active"),this.hint.instance.bind(_event._end, function(){this.highlightText&&this.copyToClipboard(this.highlightText)}.bind(this))),this.highlightText?(this.hint.show(d,b),this.hint.moveto(d,b)):this.hint.hide()))}}},copyToClipboard:function(b){global.tmpCopyInput||(global.tmpCopyInput=$("<textarea style='position:absolute;top:-100%;right:-50px;'></textarea>"),$("body").append(global.tmpCopyInput));global.tmpCopyInput.val(b);copyFromObj(global.tmpCopyInput)},getArea:function(b){"panstart"==b.type&&(this.selectStartPoint=this.getRealPoint(b.srcEvent)); var c=this.$container.width(),d=this.$container.height(),e=BookInfo.getBook().flipBook.parameters?BookInfo.getBook().flipBook.parameters.scale:1,f=this.selectStartPoint[0]/(c*e),g=this.selectStartPoint[1]/(d*e),h=b.deltaX,k=b.deltaY;bookConfig.upsideOnMobile()&&(h=b.deltaY,k=-b.deltaX);return{left:f,top:g,right:(this.selectStartPoint[0]+h)/(c*e),bottom:(this.selectStartPoint[1]+k)/(d*e)}},getRealPoint:function(b){if((b=b.originalEvent&&b.originalEvent.changedTouches?b.originalEvent.changedTouches: b.changedTouches?b.changedTouches:[b])&&!(3<=b.length)){var c=this.$container.offset().left,d=this.$container.offset().top,e=BookInfo.getBook().flipBook.parameters?BookInfo.getBook().flipBook.parameters.scale:1;this.$container.width();e*=this.$container.height();var f=b[0].pageX;b=b[0].pageY;return bookConfig.upsideOnMobile()?[b-d,e-(f-c)]:[f-c,b-d]}},onResize:function(){}}).extend(PageAttachment),PageAnimation=Class({create:function(b){this.$container=b.$container;this.pageIndex=b.pageIndex;this.page= b.page;this.width=b.width;this.height=b.height;this.$parent=b.$parent;this.bookType=b.bookType;this.callback=b.callback},pauseAnimation:function(){},startAnimation:function(){},enterSide:function(){},leaveSide:function(){},onResize:function(b,c){},resetSlider:function(){},destroySlider:function(){},initReaderOrSlider:function(){}}),PageEditorLoad=Class({statics:{isLoading:!1,isCompleted:function(){try{if(window.PageItem&&window.PageItem.HtmlVideo)return!0}catch(b){}}}}),PageHisliderLoad=Class({statics:{isLoading:!1, isCompleted:function(){try{if(window.hiSliderFactory)return!0}catch(b){}}}}),PageEditorAnimation=Class({create:function(b){this.$container=b.$container;this.pageIndex=b.pageIndex;this.page=b.page;this.width=b.width;this.height=b.height;this.$parent=b.$parent;this.bookType=b.bookType;this.callback=b.callback;this.Items=new ObjectPool;this.needLoadResource()?this.loadResource():this.initPageEditor()},needLoadResource:function(){if(PageEditorLoad.isCompleted())return!0;for(var b=this.getPageAnnos()[this.pageIndex- 1],c=0;c<b.length;c++){var d=b[c];if(d)if(d.annotype==PageEditor.AnnoType.ANNO_LINK){if(d.action.actionType!=PageEditor.ActionType.GOTO_PAGE&&d.action.actionType!=PageEditor.ActionType.OPEN_URL&&d.action.actionType!=PageEditor.ActionType.SHOW_ARTICLE&&d.action.actionType!=PageEditor.ActionType.SLIDE_SHOW)return!0;break}else return!0}return!1},getPageAnnos:function(){var b=global.pageEditor;b instanceof Array||(b=b.pageAnnos);if(this.hasInverseEditor()){var c=b;b.length<inverseEditor.length&&(c=inverseEditor); for(var d=0;d<c.length;d++){b[d]||(b[d]=[]);inverseEditor[d]||(inverseEditor[d]=[]);var e=inverseEditor[d];e&&e.length&&(e=e.map(function(f){return getInverseItem(f,this.width,this.height)}.bind(this)));b[d]=b[d].concat(e);inverseEditor[d]=[]}}return b},hasInverseEditor:function(){return window.inverseEditor&&window.inverseEditor&&window.inverseEditor.length},loadResource:function(){var b=this;this.loadInterval=window.setInterval(function(){PageEditorLoad.isCompleted()&&(window.clearInterval(b.loadInterval), b.initPageEditor())},50)},initPageEditor:function(){this.initInterval=window.setInterval(function(){global.PageEditorParser&&window.clearInterval(this.initInterval);global.PageEditorParser&&(this.Items=(new PageEditorParser(this.$container,this.width,this.height)).createItemsForPage(this.pageIndex),this.Items.find("Youtube").each(function(b){b.hide()}),this.preventMMBackEvent(),this.onResize(this.width,this.height),this.callback())}.bind(this),100)},preventMMBackEvent:function(){document.body.ondragstart= function(){return!1};var b="mousedown touchstart pointerdown mouseover mousemove";if(isPhone()||isPad())b="mousedown touchstart mouseover mousemove";$(this.$container).on(b,".hi-action",function(c){c.stopPropagation()});$(this.$container).on(b,".slider-action",function(c){c.stopPropagation()});$(this.$container).on(b,".flip-action",function(c){c.stopPropagation()})},pauseAnimation:function(){this.Items.each(function(b){b.nameLike&&(b.nameIs("EmbeddedSlideshow","AlphaTransitionBanner","Carousel","TextAmin", "AText","StarText","HotSpots","Banner")&&(b.pause&&b.pause(),b.stop&&b.stop(),b.stopFlash&&b.stopFlash()),b.nameLike("Button")&&b.stopAnimation&&b.stopAnimation())})},startAnimation:function(){this.Items.each(function(b){b.nameLike&&(b.nameIs("EmbeddedSlideshow","AlphaTransitionBanner","Carousel","TextAmin","AText","StarText","HotSpots","Banner")&&b.play&&b.play(),b.nameLike("Button")&&b.runAnimation&&b.runAnimation())})},enterSide:function(){this.Items.each(function(b){b.showAnimate&&b.showAnimate(); b.audio&&b.audio.enterPlay&&b.audio.play&&b.audio.play();if(b.nameLike){b.nameLike("youtube","flashSwf","button","Video","LoopControlVideo")&&b.show&&b.show();(b.nameLike("youtube")||b.nameLike("vimeo"))&&b.playVideo&&b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY&&b.playVideo();b.nameLike("audio")&&(b.isReplay()&&b.backTime(),b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY&&b.playAudio(),b.background&&b.isBackgroundAudio()&&b.playAudio());if(b.nameIs("Video")||b.nameIs("LoopControlVideo"))b.isReplay()&& b.backTime(),b.getPlayEvt()==PageEditor.PlayEvt.EVT_PLAY&&b.playVideo();b.nameIs("EmbeddedSlideshow","AlphaTransitionBanner","Carousel","TextAmin","AText","StarText","HotSpots","EffectText","Banner")&&b.play&&b.play();b.nameIs("Link")&&b.flash();b.nameLike("Image")&&(b.resetImgSrc(),b.showEffect());b.nameLike("Button")&&b.runAnimation&&b.runAnimation()}})},leaveSide:function(){this.Items.each(function(b){b.pause&&b.pause();b.stop&&b.stop();b.stopFlash&&b.stopFlash();b.audio&&b.audio.stop&&b.audio.stop(); b.dialog&&b.dialog.hide();b.nameLike&&(b.nameLike("youtube","flashSwf","button","Video","LoopControlVideo")&&b.hide&&b.hide(),b.nameLike("youtube","vimeo")&&b.pauseVideo&&b.pauseVideo(),b.nameLike("audio")&&b.pauseAudio&&b.pauseAudio(),b.nameIs("LoopControlVideo")&&b.pauseVideo&&b.pauseVideo(),b.nameIs("Video")&&b.getStopEvt()==PageEditor.PlayEvt.EVT_STOP&&b.pauseVideo(),b.nameLike("Image")&&(b.removeImgSrc(),b.hideEffect()),b.nameLike("Button")&&b.stopAnimation&&b.stopAnimation(),b.nameLike("zoom")&& global.popZoomBox&&(global.popZoomBox.popZoom.hide(),global.popZoomBox.visible=!0))})},onResize:function(b,c){this.width=b;this.height=c;this.Items.each(function(d){d.onResize(b,c);d.onResizePopup(windowWidth,windowHeight)})},destroySlider:function(){this.initInterval&&window.clearInterval(this.initInterval);this.loadInterval&&window.clearInterval(this.loadInterval)},refreshEvent:function(){this.Items&&this.Items.length&&this.Items.each(function(b){b.initEvents&&b.initEvents()})}}).extend(PageAnimation), PageHislider=Class({create:function(b){this.$container=b.$container;this.pageIndex=b.pageIndex;this.page=b.page;this.width=b.width;this.height=b.height;this.$parent=b.$parent;this.bookType=b.bookType;this.callback=b.callback;this.initSlider()},initSlider:function(){window.hiSliderFactory&&(this.slider=window.hiSliderFactory({container:this.$container,slide:sliderJS[this.pageIndex-1],initialWidth:this.width,initialHeight:this.height,focusOnFunc:this.focusOn.bind(this),resetFocusFunc:this.resetFocus.bind(this)}), this.slider.resize(this.width,this.height),this.preventMMBackEvent(),setTimeout(this.callback.bind(this),100))},preventMMBackEvent:function(){document.body.ondragstart=function(){return!1};var b="mousedown touchstart pointerdown mouseover mousemove";if(isPhone()||isPad())b="mousedown touchstart mouseover mousemove";$(this.$container).on(b,".hi-action",function(c){c.stopPropagation()});$(this.$container).on(b,".slider-action",function(c){c.stopPropagation()});$(this.$container).on(b,".flip-action", function(c){c.stopPropagation()})},playSlider:function(){this.slider&&this.slider.play()},replaySlider:function(){this.slider&&this.slider.replay()},resetSlider:function(){this.resetFocus(0);this.slider&&this.slider.reset()},destroySlider:function(){this.slider&&(this.slider.destoryed&&this.slider.destoryed(),this.slider=null,this.$container.find(".app").remove())},pauseAnimation:function(){this.slider&&(this.pauseSlider(),this.slider&&this.slider.startFlip&&this.slider.startFlip())},startAnimation:function(){this.slider&& (this.playSlider(),this.slider&&this.slider.endFlip&&this.slider.endFlip())},pauseSlider:function(){this.slider&&this.slider.pause()},onResize:function(b,c){this.width=b;this.height=c;this.slider&&this.bookType===BookInfo.getBookType()&&this.slider.resize(b,c)},enterSide:function(){this.slider&&this.replaySlider();this.slider&&this.slider.endFlip&&this.slider.endFlip()},leaveSide:function(){this.slider&&this.slider.startFlip&&this.slider.startFlip()},focusOn:function(b){this.option=b;this.focusIng= !0;var c=b.pageWidth,d=b.duration/1E3,e=this.width/(b.width*this.width/c);c=-b.left*e*this.width/c;b=-b.top*e*this.height/b.pageHeight;e=Math.max(1,e);c=Number.between(c,(1-e)*this.width,0);b=Number.between(b,(1-e)*this.height,0);e=transformCSS({origin:{x:0,y:0},tran:{x:c,y:b},scale:e});animateOnce(this.$parent,e,d,function(){},"%stransform")},resetFocus:function(b){if(this.focusIng){b||(b=0);var c=transformCSS({origin:{x:0,y:0},tran:{x:0,y:0},scale:1});animateOnce(this.$parent,c,b/1E3,function(){this.focusIng= !1}.bind(this),"%stransform")}}}).extend(PageAnimation),PageReader=Class({sliderPlayerArray:[],create:function(b){this.$container=b.$container;this.pageIndex=b.pageIndex;this.page=b.page;this.width=b.width;this.height=b.height;this.$parent=b.$parent;this.bookType=b.bookType;this.callback=b.callback;this.initReader()},initReader:function(){this.slider||this.isAddReader||(this.isAddReader=!0,this.$container.addClass(this.getBookPageStr()+"_animatePanel_"+(this.pageIndex-1)),this.$readerContainer=$("<div class='reader reader_"+ (this.pageIndex-1)+"' style='width:100%;height:100%;position:absolute;left:0;top:0;'></div>"),this.$container.append(this.$readerContainer),this.$container.show(),this.createVueDom())},createVueDom:function(){var b=BookInfo.getCurrentPages();window.setVueDom({lazy:-1===b.indexOf(this.pageIndex),dom:"."+this.getBookPageStr()+"_animatePanel_"+(this.pageIndex-1)+" .reader_"+(this.pageIndex-1),pageStr:this.getBookPageStr(),pageIndex:this.pageIndex-1,width:this.width,height:this.height}).then(function(c){this.slider= c;this.slider.resize(this.width,this.height);c.reset();this.page.unLoading(!0);this.slider.getAutoPlayArray&&(this.sliderPlayerArray=this.slider.getAutoPlayArray());this.callback()}.bind(this))},getBookPageStr:function(){var b="double";1===this.bookType&&(b="single");return b},playSlider:function(){this.clearSliderTimeout();this.slider?(this.playTimeout&&(clearTimeout(this.playTimeout),this.playTimeout=null),this.slider.play()):this.playTimeout=setTimeout(this.playSlider.bind(this),100)},replaySlider:function(){this.clearSliderTimeout(); this.slider?(this.playTimeout&&(clearTimeout(this.playTimeout),this.playTimeout=null),this.slider.replay()):this.playTimeout=setTimeout(this.replaySlider.bind(this),100)},destroySlider:function(){this.slider&&(this.slider.destoryed&&this.slider.destoryed(),this.slider=null,this.isAddReader=!1,this.$container.find(".app").remove())},pauseAnimation:function(){this.pauseSlider();this.slider&&this.slider.startFlip&&this.slider.startFlip()},startAnimation:function(){this.playSlider();this.slider&&this.slider.endFlip&& this.slider.endFlip()},pauseSlider:function(){this.slider&&this.slider.pause()},onResize:function(b,c){this.width=b;this.height=c;this.slider&&this.bookType===BookInfo.getBookType()&&this.slider.resize(b,c)},sliderEnterPage:function(){try{window.vuePopDom&&window.vuePopDom.sliderEnterPage&&window.vuePopDom.sliderEnterPage()}catch(b){}},sliderLeavePage:function(){try{window.vuePopDom&&window.vuePopDom.sliderLeavePage&&window.vuePopDom.sliderLeavePage(),this.slider&&this.slider.sliderLeavePage&&this.slider.sliderLeavePage()}catch(b){}}, enterSide:function(){this.slider&&(this.replaySlider(),this.slider&&this.slider.endFlip&&this.slider.endFlip())},leaveSide:function(){this.slider&&(this.slider.startFlip&&this.slider.startFlip(),this.sliderLeavePage())},searchSliderHighLight:function(){this.slider&&global.search_Text&&this.slider.searchText(search_Text)},clearSliderHighLight:function(){this.slider&&this.slider.clearHighLight()},clearSliderTimeout:function(){this.playTimeout&&(clearTimeout(this.playTimeout),this.playTimeout=null)}}).extend(PageAnimation), hddr=[],a=hddr.soo2,i=0,PageAnimationFactory=Class({create:function(b){this.$container=b.$container;this.pageIndex=b.pageIndex;this.page=b.page;this.width=b.width;this.height=b.height;this.$parent=b.$parent;this.bookType=b.bookType;this.callback=b.callback;this.option=b;this.isHiddenEditor()||this.initAnimation()},initAnimation:function(){this.hasReader()?window.setVueDom?this.initReader():this.loadPageReader():this.hasPageEditor()&&(this.pageEditor=new PageEditorAnimation(this.option));this.hasSlider()&& (window.hiSliderFactory?this.initSlider():this.loadPageSlider())},initReader:function(){this.pageReader||BookInfo.getBookType()!=this.bookType||this.pageReader||(this.pageReader=new PageReader(this.option))},initSlider:function(){this.hasSlider()&&!this.pageHislider&&(this.pageHislider=new PageHislider(this.option))},initReaderOrSlider:function(){this.hasReader()&&(window.setVueDom?this.initReader():this.loadPageReader());this.hasSlider()&&(window.hiSliderFactory?this.initSlider():this.loadPageSlider())}, loadPageReader:function(){var b=this;this.loadReaderInterval=window.setInterval(function(){window.setVueDom&&(b.destroyReaderInterval(),b.initReader())},100)},destroyReaderInterval:function(){this.loadReaderInterval&&(window.clearInterval(this.loadReaderInterval),this.loadReaderInterval=null)},loadPageSlider:function(){var b=this;this.loadSliderInterval=window.setInterval(function(){window.hiSliderFactory&&(b.destroySliderInterval(),b.initSlider())},100)},destroySliderInterval:function(){this.loadSliderInterval&& (window.clearInterval(this.loadSliderInterval),this.loadSliderInterval=null)},hasPageEditor:function(){if(this.judgeHasPageEditor()||window.inverseEditor&&window.inverseEditor.length&&window.inverseEditor[this.pageIndex-1]&&window.inverseEditor[this.pageIndex-1].length)return!0},judgeHasPageEditor:function(){var b=this.pageIndex-1;return window.pageEditor&&(!pageEditor.pageAnnos&&pageEditor[b]&&0<pageEditor[b].length||pageEditor.pageAnnos&&pageEditor.pageAnnos[b]&&0<pageEditor.pageAnnos[b].length)? !0:!1},isHiddenEditor:function(){return bookConfig.previewPagesArray&&Array.isArray(bookConfig.previewPagesArray)&&-1===bookConfig.previewPagesArray.indexOf(this.pageIndex)?!0:!1},hasReader:function(){return window.readerConfig&&0<window.readerConfig.pages.length&&window.readerConfig.pages.length>=this.pageIndex&&(this.hasReaderItems()||window.inverseEditor&&window.inverseEditor.length&&window.inverseEditor[this.pageIndex-1]&&window.inverseEditor[this.pageIndex-1].length)?!0:!1},hasReaderItems:function(){var b= window.readerConfig.pages[this.pageIndex-1];return b&&(b.insertPageLink&&b.insertPageLink.length||b.items&&b.items.length||b.hasSceneAnime||b.background&&b.background.isEnable||b.camera&&b.camera.isEnable||b.foreground&&b.foreground.isEnable||b.subtitle&&b.subtitle.isEnable)},hasSlider:function(){return window.sliderJS&&window.sliderJS[this.pageIndex-1]&&window.sliderJS[this.pageIndex-1].elements&&0<sliderJS[this.pageIndex-1].elements.length?!0:!1},onResize:function(b,c){this.width=b;this.height= c;if(this.pageEditor)this.pageEditor.onResize(b,c);if(this.pageHislider)this.pageHislider.onResize(b,c);if(this.pageReader)this.pageReader.onResize(b,c)},searchSliderHighLight:function(){this.pageReader&&this.pageReader.searchSliderHighLight()},clearSliderHighLight:function(){this.pageReader&&this.pageReader.clearSliderHighLight()},enterSide:function(){this.pageEditor&&this.pageEditor.enterSide();this.pageHislider&&this.pageHislider.enterSide();this.pageReader&&this.pageReader.enterSide();global.frmSearch&& global.frmSearch.visible&&global.search_Text&&this.searchSliderHighLight()},leaveSide:function(){this.pageEditor&&this.pageEditor.leaveSide();this.pageHislider&&this.pageHislider.leaveSide();this.pageReader&&this.pageReader.leaveSide();global.frmSearch&&global.frmSearch.visible&&global.search_Text&&this.clearSliderHighLight()},pauseAnimation:function(){this.pageEditor&&this.pageEditor.pauseAnimation();this.pageHislider&&this.pageHislider.pauseAnimation();this.pageReader&&this.pageReader.pauseAnimation()}, startAnimation:function(){this.pageEditor&&this.pageEditor.startAnimation();this.pageHislider&&this.pageHislider.startAnimation();this.pageReader&&this.pageReader.startAnimation()},resetSlider:function(){this.pageEditor&&this.pageEditor.resetSlider();this.pageHislider&&this.pageHislider.resetSlider();this.pageReader&&this.pageReader.resetSlider()},destroySlider:function(){this.pageEditor&&this.pageEditor.destroySlider();this.pageHislider&&this.pageHislider.destroySlider();this.pageReader&&this.pageReader.destroySlider(); this.pageHislider=this.pageReader=null;this.destroyReaderInterval();this.destroySliderInterval()}}),PageAttachmentsFactory=Class({createAttachment:function(b,c,d,e,f,g,h,k,l){k=this.initOptions(b,c,d,e,f,g,h,k,l);switch(b){case "animation":var n=new PageAnimationFactory(k);break;case "annotation":n=new PageAnnotation(c,g,f,d,e,h);break;case "highlight":n=new PageHighlight(c,g,f,d,e,h);break;case "magnifier":n=new PageMagnifier(c,g,f,d,e,h);break;case "select":n=new PageSelect(c,g,f,d,e,h)}return n}, initOptions:function(b,c,d,e,f,g,h,k,l){return{$container:c,pageIndex:f,page:k,width:d,height:e,$parent:g,bookType:h,callback:l}}}),PageAttachmentsParser=function(b,c,d,e,f,g,h,k,l){this.parent=b;this.width=c;this.page=k;this.height=d;this.pageWidth=e;this.pageHeight=f;this.pageIndex=g;this.bookType=h;this.callback=l;this.createAttachmentsForPage()}; PageAttachmentsParser.prototype.createAttachmentsForPage=function(){this.Items=new ObjectPool;this.factory=new PageAttachmentsFactory;this.isHiddenEditor()||getArticleEditor().then(this.createAnimation.bind(this));this.createAnnotation();this.highlightSearch()};PageAttachmentsParser.prototype.isHiddenEditor=function(){return!bookConfig.isPreview||bookConfig.previewPages&&-1!==(Array.isArray(bookConfig.previewPages)&&bookConfig.previewPages.indexOf(this.pageIndex))?!1:!0}; PageAttachmentsParser.prototype.createAnimation=function(){this.hasAnimation()&&(this.createAnimationDom(),this.pageAnimation=this.factory.createAttachment("animation",this.$animation,this.width,this.height,this.pageIndex,this.parent,this.bookType,this.page,function(){this.callback();this.onResizeAnimation(this.width,this.height,this.pageWidth,this.pageHeight)}.bind(this)),this.Items.add(this.pageAnimation))}; PageAttachmentsParser.prototype.createAnimationDom=function(){this.$animation||(this.$animation=$("<div id='animation"+this.bookType+"-"+this.pageIndex+"' style='width:100%;height:100%;position:absolute;bottom:0;right:0;left:0;top:0;z-index:4;'></div>"),this.$animation.css({width:this.width+"px",height:this.height+"px"}),this.parent.append(this.$animation))}; PageAttachmentsParser.prototype.hasAnimation=function(){var b=this.pageIndex-1;return this.isHiddenEditor()?!1:global.pageEditor&&(!pageEditor.pageAnnos&&pageEditor[b]&&0<pageEditor[b].length||pageEditor.pageAnnos&&pageEditor.pageAnnos[b]&&0<pageEditor.pageAnnos[b].length)||global.sliderJS&&sliderJS[b]&&0<sliderJS[b].elements.length||global.inverseEditor&&global.inverseEditor.length&&global.inverseEditor[b]&&global.inverseEditor[b].length||window.assistantConfig||global.readerConfig&&global.readerConfig.pages&& 0<global.readerConfig.pages.length&&this.hasReaderItems()?!0:!1}; PageAttachmentsParser.prototype.hasReaderItems=function(){return window.readerConfig.pages[this.pageIndex-1]&&(window.readerConfig.pages[this.pageIndex-1].insertPageLink&&window.readerConfig.pages[this.pageIndex-1].insertPageLink.length||window.readerConfig.pages[this.pageIndex-1].items&&window.readerConfig.pages[this.pageIndex-1].items.length||window.readerConfig.pages[this.pageIndex-1].hasSceneAnime||window.readerConfig.pages[this.pageIndex-1].background&&window.readerConfig.pages[this.pageIndex- 1].background.isEnable||window.readerConfig.pages[this.pageIndex-1].camera&&window.readerConfig.pages[this.pageIndex-1].camera.isEnable||window.readerConfig.pages[this.pageIndex-1].foreground&&window.readerConfig.pages[this.pageIndex-1].foreground.isEnable||window.readerConfig.pages[this.pageIndex-1].subtitle&&window.readerConfig.pages[this.pageIndex-1].subtitle.isEnable)}; PageAttachmentsParser.prototype.isHiddenEditor=function(){return!bookConfig.isPreview||bookConfig.previewPages&&-1!==(Array.isArray(bookConfig.previewPages)&&bookConfig.previewPages.indexOf(this.pageIndex))?!1:!0}; PageAttachmentsParser.prototype.select=function(){this.pageSelect||(this.$select=$("<div id='select"+this.bookType+"-"+this.pageIndex+"' style='cursor:text;width:100%;height:100%;position:absolute;left:0;top:0;z-index:4;'></div>"),this.$select.css({width:this.width+"px",height:this.height+"px",bottom:0,right:0,margin:"auto"}),this.pageSelect=this.factory.createAttachment("select",this.$select,this.width,this.height,this.pageIndex,this.parent,this.bookType),this.Items.add(this.pageSelect),this.parent.append(this.$select))}; PageAttachmentsParser.prototype.destroySelect=function(){this.Items.find("PageSelect").each(function(b){b.destroySelect()});this.Items.remove(this.pageSelect);this.$select=void 0;this.pageSelect=null}; PageAttachmentsParser.prototype.initMagnifierEvent=function(){this.pageMagnifier||(this.$magnifier=$("<div class='mgnifierBox' style='width:100%;height:100%;position:absolute;z-index:10;cursor:none;top:0;bottom:0;left:0;right:0;margin:auto;'></div>"),this.$magnifier.css({width:this.width+"px",height:this.height+"px",bottom:0,right:0,margin:"auto"}),this.pageMagnifier=this.factory.createAttachment("magnifier",this.$magnifier,this.width,this.height,this.pageIndex,this.parent,this.bookType),this.Items.add(this.pageMagnifier), this.parent.append(this.$magnifier))};PageAttachmentsParser.prototype.destroyMagnifier=function(){this.Items.find("PageMagnifier").each(function(b){b.destroyMagnifier()});this.Items.remove(this.pageMagnifier);this.$magnifier=void 0;this.pageMagnifier=null};PageAttachmentsParser.prototype.addHistoryTexts=function(){this.Items.find("PageAnnotation").each(function(b){b.enterSide()})}; PageAttachmentsParser.prototype.highlightSearch=function(){if(bookConfig.SearchButtonVisible&&window.frmSearch&&!this.pageHighlight){var b=!0;window.frmSearch&&frmSearch.visible&&0<frmSearch.getList().length&&(b=!1);window.frmSearch&&(isPhone()||isPad())&&window.frmSearch.input.val()&&(b=!1);b||(this.$highlight=$("<div id='highlight"+this.bookType+"-"+this.pageIndex+"' style='pointer-events:none;width:100%;height:100%;position:absolute;left:0;top:0;z-index:4;' class='kong'></div>"),this.$highlight.css({width:this.width+ "px",height:this.height+"px",bottom:0,right:0,margin:"auto"}),this.pageHighlight=this.factory.createAttachment("highlight",this.$highlight,this.width,this.height,this.pageIndex,this.parent,this.bookType),this.Items.add(this.pageHighlight),this.parent.append(this.$highlight))}};PageAttachmentsParser.prototype.clearHighlight=function(){this.Items.find("PageHighlight").each(function(b){b.clearHighlight()});this.Items.remove(this.pageHighlight);this.$highlight=void 0;this.pageHighlight=null}; PageAttachmentsParser.prototype.createAnnotation=function(){if(bookConfig.AnnotationButtonVisible&&!this.pageAnnotation){this.createAnimationDom();var b=fitPageWidthHeight(this.pageWidth,this.pageHeight,bookConfig.largePageWidth,bookConfig.largePageHeight);this.$annotation=this.$animation;this.pageAnnotation=this.factory.createAttachment("annotation",this.$annotation,b.x,b.y,this.pageIndex,this.parent,this.bookType);this.Items.add(this.pageAnnotation);this.onResizeAnimation(this.width,this.height, this.pageWidth,this.pageHeight)}};PageAttachmentsParser.prototype.enterSide=function(){this.Items.each(function(b){b.enterSide()});global.assistant&&global.assistant.refresh()};PageAttachmentsParser.prototype.leaveSide=function(){this.Items.each(function(b){b.leaveSide()});this.destroySelect();global.annotationPannel&&global.annotationPannel.resetAnnoConfig()};PageAttachmentsParser.prototype.pauseAnimation=function(){this.Items.find("PageAnimation").each(function(b){b.pauseAnimation()})}; PageAttachmentsParser.prototype.startAnimation=function(){this.Items.find("PageAnimation").each(function(b){b.startAnimation()})};PageAttachmentsParser.prototype.resetSlider=function(){this.Items.find("PageAnimation").each(function(b){b.resetSlider()})};PageAttachmentsParser.prototype.destroySlider=function(){this.Items.find("PageAnimation").each(function(b){b.destroySlider()})};PageAttachmentsParser.prototype.initReaderOrSlider=function(){this.Items.each(function(b){b.initReaderOrSlider&&b.initReaderOrSlider()})}; PageAttachmentsParser.prototype.removeAttachment=function(){this.attachment&&this.destroyMM()}; PageAttachmentsParser.prototype.onResize=function(b,c,d,e){this.width=b;this.height=c;this.pageWidth=d;this.pageHeight=e;this.onResizeAnimation(b,c,d,e);this.onResizeAnnotation(b,c,d,e);this.$select&&this.$select.css({width:this.width+"px",height:this.height+"px"});this.$magnifier&&this.$magnifier.css({width:this.width+"px",height:this.height+"px"});this.$highlight&&this.$highlight.css({width:this.width+"px",height:this.height+"px"});this.Items.each(function(f){if(f!=this.pageAnimation&&f!=this.pageAnnotation)f.onResize(b, c)}.bind(this))};PageAttachmentsParser.prototype.onResizeAnimation=function(b,c,d,e){this.pageAnimation&&(b=fitPageWidthHeight(d,e,bookConfig.largePageWidth,bookConfig.largePageHeight),this.$animation.css({width:b.x+"px",height:b.y+"px",left:(d-b.x)/2+"px",top:(e-b.y)/2+"px"}),this.pageAnimation.onResize(b.x,b.y))}; PageAttachmentsParser.prototype.onResizeAnnotation=function(b,c,d,e){this.pageAnnotation&&(b=fitPageWidthHeight(d,e,bookConfig.largePageWidth,bookConfig.largePageHeight),this.$annotation.css({width:b.x+"px",height:b.y+"px",left:(d-b.x)/2+"px",top:(e-b.y)/2+"px"}),this.pageAnnotation.onResize(b.x,b.y))}; PageAttachmentsParser.prototype.resizeOnMobile=function(){var b=1024,c=1024;BookInfo.isDoublePage()&&this.bookType==BookType.normal_book&&(c=b=768);b=fitPageWidthHeight(b,c,bookConfig.largePageWidth,bookConfig.largePageHeight);this.pageAnimation.onResize(Math.ceil(b.x),Math.ceil(b.y));this.scale(Math.ceil(b.x),Math.ceil(b.y))}; PageAttachmentsParser.prototype.highDefinition=function(){var b=6*Math.min(windowWidth,windowHeight),c=6*Math.min(windowWidth,windowHeight);isPad()&&(b=3*Math.min(windowWidth,windowHeight),c=3*Math.min(windowWidth,windowHeight));b=fitPageWidthHeight(b,c,bookConfig.largePageWidth,bookConfig.largePageHeight);this.pageAnimation.onResize(Math.ceil(b.x),Math.ceil(b.y));this.scale(Math.ceil(b.x),Math.ceil(b.y))}; PageAttachmentsParser.prototype.scale=function(b,c){var d=fitPageWidthHeight(this.pageWidth,this.pageHeight,bookConfig.largePageWidth,bookConfig.largePageHeight).y/c;this.$animation.css({width:b+"px",height:c+"px",left:(this.pageWidth-b*d)/2+"px",top:(this.pageHeight-c*d)/2+"px"});b=!1;if(isPhone()||isPad())b=!0;d=transformCSS({scale:d,origin:{x:0,y:0}},b);this.$animation.css(d)};var BookPage=Class({}).extend(Page),imageLoaded=[];bdor[33]=function(b,c){return b/bdor[30](c,20)};bdor[36]=36; global.bdor[35]=function(){return 3}();global.bdor[37]=80; var PageInterface=Class({zIndex:0,pageIndex:0,visible:!1,pageWidth:0,pageHeight:0,maskWidth:0,maskHeight:0,pageMask:null,page:null,isSingleBook:!1,bookType:0,isHardPage:!1,$page:null,opacity:1,create:function(b,c,d,e,f){this.pageIndex=b;this.visible=!0;this.isSingleBook=d;this.bookType=e;this.newPage(b,c,e,f)},newPage:function(b,c,d,e){var f=this.isSingleBook?window.singleCachePages:window.cachePages;e&&(f=window.mirrorSideCachePages);if(f&&f[b]){this.page=f[b];try{this.page.pageAttachments.pageAnimation&& this.page.pageAttachments.pageAnimation.pageEditor&&this.page.pageAttachments.pageAnimation.pageEditor.refreshEvent()}catch(g){}}else this.page=new BookPage(b,c,d,e);isPhone()||isPad()||(this.isSingleBook&&!e?(window.singleCachePages||(window.singleCachePages=[]),window.singleCachePages[b]=this.page):e?(window.mirrorSideCachePages||(window.mirrorSideCachePages=[]),window.mirrorSideCachePages[b]=this.page):(window.cachePages||(window.cachePages=[]),window.cachePages[b]=this.page))},setCSSByStyle:function(b){this.$page.css(b)}, setCSSByName:function(b){this.$page.attr("class",b)},setLeftOrRight:virtual_function,setUpOrDown:virtual_function,setVisible:function(b){this.$page&&(bookConfig.HardInnerPageEnable?b?this.$page.show():this.$page.hide():b?this.$page.css("visibility","visible"):this.$page.css("visibility","hidden"));this.visible=b},onResize:virtual_function,getWidth:function(){return this.width},setZIndex:function(b){this.zIndex=b;this.$page.css({"z-index":b})},getZIndex:function(){return this.zIndex},beginToFlip:virtual_function, enterSide:function(){this.page&&this.page.enterSide()},leaveSide:function(){this.page&&this.page.leaveSide()},remove:function(){this.page.remove();this.page=void 0;this.$page.remove();this.$page=void 0},zoomInSideImage:function(){this.page&&this.page.zoomInSideImage()},zoomOutSideImage:function(){this.page&&this.page.zoomOutSideImage()},switchLargeImage:function(){this.page&&this.page.switchLargeImage()},switchNormalImage:function(b){this.page&&this.page.switchNormalImage(b)},resizeSvg:function(b, c){this.page&&this.page.resizeSvg(b,c)},loading:function(){this.page&&this.page.loading()},mirrorSide:function(){this.page&&this.page.mirrorSide()},fillPreviewImage:function(){this.page&&this.page.fillPreviewImage()},setFlipShadow:function(b,c,d){this.page&&this.page.setFlipShadow(b,c,d)},addFlipShadow:function(){},clearFlipShadow:function(){this.page&&this.page.clearFlipShadow()},addAttachment:function(){this.page&&this.page.addAttachment()},fillContent:function(){this.page&&this.page.fillContent()}, fillPage:function(b,c){this.page&&this.page.fillPage(b,c)},initSelectTextEvent:function(){this.page&&this.page.initSelectTextEvent()},destroySelect:function(){this.page&&this.page.destroySelect()},initMagnifierEvent:function(){this.page&&this.page.initMagnifierEvent()},destroyMagnifier:function(){this.page&&this.page.destroyMagnifier()},pauseAnimation:function(){this.page&&this.page.pauseAnimation()},startAnimation:function(){this.page&&this.page.startAnimation()},addHistoryTexts:function(b){this.page&& this.page.addHistoryTexts(b)},highlightSearch:function(){this.page&&this.page.highlightSearch()},clearHighlight:function(){this.page&&this.page.clearHighlight()},resetSlider:function(){this.page&&this.page.resetSlider()},initReaderOrSlider:function(){this.page&&this.page.initReaderOrSlider()},destroySlider:function(){this.page&&this.page.destroySlider()}});bdor[30]=function(b,c){return bdor[b]-c};bdor[38]=function(){return bdor[30](37,40)}(); var NormalPage=Class({create:function(b,c,d,e,f){this._super(b,c,d,e,f);this.$page=$("<div style='will-change: transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;'></div>");this.$page.attr("id",c+"Mask"+b);this.setMaskCss();this.$page.append(this.page.side)},setMaskCss:function(){if(bookConfig.FlipDirection){var b="vertical-mask";this.isSingleBook&&rightToLeft&&(b="single-book-right-vertical-mask");this.isSingleBook&&!rightToLeft&&(b="single-book-vertical-mask")}else b="mask", this.isSingleBook&&rightToLeft&&(b="single-book-right-mask"),this.isSingleBook&&!rightToLeft&&(b="single-book-mask");this.setCSSByName(b)},onResize:function(b,c,d){this.pageWidth=b;this.pageHeight=c;d||(d=1);var e=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));0!=(e-c)%2&&(e+=1);this.width=e;this.$page.css({width:e,height:e,opacity:d});if(this.page)this.page.onResize(b,c);bookConfig.FlipDirection?(this.$page.css({left:"50%","margin-left":-this.width/2+"px"}),this.page&&this.page.side.css({left:(this.width- b)/2})):(this.$page.css({top:"50%","margin-top":-this.width/2+"px"}),this.page&&this.page.side.css({top:(this.width-c)/2}))},setLeftOrRight:function(b){var c=this.isSingleBook?"left-single-mask-side":"left-mask-side";b||(c=this.isSingleBook?"right-single-mask-side":"right-mask-side");this.setCSSByName(c);this.page&&this.page.setLeftOrRight(b)},setUpOrDown:function(b){var c=this.isSingleBook?"up-single-mask-side":"up-mask-side";b||(c=this.isSingleBook?"down-single-mask-side":"down-mask-side");this.setCSSByName(c); this.page&&this.page.setUpOrDown(b)},beginToFlip:function(){this.setMaskCss()}}).extend(PageInterface);bdor[39]=function(){return 8}();var bookMouseDown=!1,nBookStatu=0;global.bdor[200]=function(b){return bdor[b]}; var Book=Class({bookType:void 0,parent:null,width:0,height:0,flippingTime:600,currentPageIndex:1,rightToLeft:!1,pageArray:null,pageWidth:0,pageHeight:0,visible:!1,create:function(b){this.init(b)},init:function(b){this.options=b;this.parent=b.parent;this.currentPageIndex=b.currentPageIndex;this.flippingTime=1E3*b.flippingTime;this.rightToLeft=b.rightToLeft;this.pageArray=[]},getBookType:function(){return this.bookType},onBookPageLoaded:function(b){if(!this.flipping&&this.visible&&BookInfo.getBook()== this){var c=this.getCurrentPages();if(c)for(var d=0;d<c.length;d++){var e=c[d];this.pageArray[e]&&b==e&&this.pageArray[e].enterSide()}}},fillBookContent:function(){if(!this.flipping){var b=this.pageArray;if(b)for(var c=0;c<b.length;c++){var d=b[c];d&&d.fillContent(c)}if(b=this.pageBackArray)for(c=0;c<b.length;c++)(d=b[c])&&d.fillContent(c,!0)}},adjustBookPosition:function(){onStageResize()},getBook:virtual_function,getCurrentPages:function(){return[]},initBook:virtual_function,gotoPage:virtual_function, show:virtual_function,hide:virtual_function,onResize:virtual_function,destroy:virtual_function}),NoteAdd=Class({create:function(b){this.noteAdd=$("<div class='anno-noteAdd'></div>");this.noteAdd.bind("mousedown mouseup pointerdown",function(c){c.stopPropagation()}.bind(this));this.noteAdd.bind(_event._down,function(){this.noteAdd.css({opacity:"0.7"})}.bind(this));this.noteAdd.bind(_event._up,function(c){c.stopPropagation();this.noteAdd.css({opacity:""});global.annotationPannel&&global.annotationPannel.noteEvent(this.noteAdd)}.bind(this)); b.append(this.noteAdd)},show:function(){this.noteAdd.css({display:"block"})},hide:function(){this.noteAdd.css({display:"none"})},getPageWidth:function(){var b=BookInfo.getBook().currentPageIndex,c="";if(BookInfo.getBook().pageArray.length&&BookInfo.getBook().pageArray[b])return"slide"==bookConfig.FlipStyle.toLocaleLowerCase()&&BookInfo.isDoublePage(BookInfo.getBookType())?(BookInfo.getBook().pageArray[b].leftPage?c=BookInfo.getBook().pageArray[b].leftPage:BookInfo.getBook().pageArray[b].rightPage&& (c=BookInfo.getBook().pageArray[b].rightPage),rightToLeft&&BookInfo.getBook().pageArray[b].rightPage&&(c=BookInfo.getBook().pageArray[b].rightPage)):c=BookInfo.getBook().pageArray[b].page,{width:c.pageWidth,height:c.pageHeight}},isFirstOrLastPage:function(){return this.isFirstPage()||this.isLastPage()?!0:!1},isCurrentDoublePage:function(){return 1<BookInfo.getPagesByIndex(BookInfo.getCurrentPageIndex()).length},isLastPage:function(){var b=BookInfo.getBook().currentPageIndex,c=bookConfig.totalPageCount; "slide"==bookConfig.FlipStyle.toLocaleLowerCase()&&(c=BookInfo.getBook().pageLength());return b==c},isFirstPage:function(){return 1===BookInfo.getBook().currentPageIndex},onResize:function(b,c){var d=this.getPageWidth();if(d&&(b=d.width,c=d.height,bookConfig.AnnotationButtonVisible&&!isPhone()&&!isPad())){d=windowHeight-c-templateArea.getTopHeight()-templateArea.getBottomHeight();var e=BookInfo.isDoublePage(BookInfo.getBookType())?windowWidth-2*b-templateArea.getRightWidth()-templateArea.getLeftWidth(): windowWidth-b-templateArea.getRightWidth()-templateArea.getLeftWidth();if("slide"==bookConfig.FlipStyle.toLocaleLowerCase()&&BookInfo.isDoublePage(BookInfo.getBookType())&&this.isFirstOrLastPage()&&!this.isCurrentDoublePage()){var f=BookInfo.getBook().width,g=BookInfo.getBook().height;b=(f-b)/2;c=(g-c)/2;rightToLeft?24<b+e?this.noteAdd.css({display:"block",top:"0",right:"auto",left:b-24+"px"}):24<c+d?this.noteAdd.css({display:"block",top:c-24+"px",right:"auto",left:"0"}):this.noteAdd.css({display:"none"}): 24<b+e?this.noteAdd.css({display:"block",top:"0",right:b-24+"px",left:"auto"}):24<c+d?this.noteAdd.css({display:"block",top:c-24+"px",right:"0",left:"auto"}):this.noteAdd.css({display:"none"})}else 24>e/2&&24>d/2?this.noteAdd.css({display:"none"}):24<=e/2?rightToLeft?(this.noteAdd.css({display:"block",top:"0",right:"auto",left:"-22px"}),this.isLastPage()&&(this.isCurrentDoublePage()?this.noteAdd.css({left:"auto",right:"-22px"}):this.noteAdd.css({right:"-22px",left:"auto"}))):(this.noteAdd.css({display:"block", top:"0",left:"auto",right:"-22px"}),this.isLastPage()&&(this.isCurrentDoublePage()?this.noteAdd.css({right:"-22px",left:"auto"}):this.noteAdd.css({left:"-22px",right:"auto"}))):rightToLeft?(this.noteAdd.css({display:"block",top:"-22px",right:"auto",left:"0"}),this.isLastPage()&&this.noteAdd.css({left:"auto",right:"0"})):(this.noteAdd.css({display:"block",top:"-22px",left:"auto",right:"0"}),this.isLastPage()&&this.noteAdd.css({right:"auto",left:"0"}))}}}),ZoomHint=Class({create:function(b){var c=this; this.mouseInBook=new Point(-1,-1);this.oldMouseInBook=new Point(-1,-1);this.zoomHint=null;this.trackMousePoint=function(d){d=isTouch?d.originalEvent.touches:[d];var e=d[0].pageY;c.mouseInBook.x=d[0].pageX;c.mouseInBook.y=e};bookContainer.bind(_event._move,this.trackMousePoint);this.zoomHintTimer=window.setInterval(function(){if(bookType!=BookType.normal_book)c.clearZoomHintTimer();else if(null==c.zoomHint)if(-1==c.oldMouseInBook.x)c.oldMouseInBook.x=c.mouseInBook.x,c.oldMouseInBook.y=c.mouseInBook.y; else if(c.oldMouseInBook.x==c.mouseInBook.x&&c.oldMouseInBook.y==c.mouseInBook.y){var d=c.globalToBook(!0,c.mouseInBook.x,c.mouseInBook.y);if(!(0>d.x||d.x>c.width||0>d.y||d.y>c.height)){d=c.mouseInBook.x+15;var e=c.mouseInBook.y;c.zoomHint=new divHint(getLanguage("lblDoubleClickToZoomIn","Double click to zoom in."),d,e,b);c.zoomHint.show();c.hideCount=0}}else c.oldMouseInBook.x=c.mouseInBook.x,c.oldMouseInBook.y=c.mouseInBook.y;else 2==++c.hideCount&&(bookContainer.unbind(_event._move,c.trackMousePoint), c.zoomHint.destroy(),c.zoomHint=null,window.clearInterval(c.zoomHintTimer))},1500)},globalToBook:function(b,c,d){switch(bookType){case BookType.single_book:var e=Point(c-singlePageBook.getLeft(),d-singlePageBook.getTop());break;case BookType.normal_book:e=Point(c-((b?0:flipBook.getPageWidth())+flipBook.getLeft()),d-flipBook.getTop());break;case BookType.catalog_book:e=catalogBook.getTran(),b=c-((b?0:catalogBook.getPageWidth())+catalogBook.getCssLeft())-e.x,d=d-catalogBook.getCssTop()-e.y,e=Point(b, d)}return e},clearZoomHintTimer:function(){try{window.clearInterval(this.zoomHintTimer)}catch(b){}null!=this.zoomHint&&(bookContainer.unbind(_event._move,this.trackMousePoint),this.zoomHint.destroy(),this.zoomHint=null)}}),TipsBox=Class({create:function(b,c){this.visible=!1;this.option=b;this.background=$("<div class='tipsBox tipsBoxShadow tipsBoxRadius'></div>");$(c).append(this.background)},setTimer:function(){this.timer=window.setInterval(function(){this.hideTipsBox();window.clearInterval(this.timer)}.bind(this), 1500)},resetTimer:function(){window.clearInterval(this.timer);this.setTimer()},setPosition:function(b,c,d){void 0==d&&(d=["left","top"]);$(this.background).css(d[0],b+"px");$(this.background).css(d[1],c+"px")},onResize:function(b,c){},getWidth:function(){return $(this.background).width()},getHeight:function(){return $(this.background).height()},setCaption:function(b){this.background.html(b)},showTipsBox:function(){this.visible?this.resetTimer():(this.setTimer(),this.visible=!0,$(this.background).show(), $(this.background).animate({opacity:this.option.opacity?this.option.opacity:.5},300))},hideTipsBox:function(){this.visible&&(this.visible=!1,$(this.background).animate({opacity:0},300,function(){$(this.background).hide()}.bind(this)))}}),BookMiniFullscreen=Class({create:function(){},init:function(){if(!isIE()){if(isPhone()||isPad()){if(!bookConfig.isShowMobileBottomFullscreenPrompts)return}else if(MiniStyle.isMini()||bookConfig.hideMiniFullscreen)return;fullScreenApi.supportsFullScreen&&fullScreenApi.isFullScreen()|| this.miniFullScreen||(this.miniFullScreen=$("<div class='miniFullscreen' id='miniFullscreen'></div>"),this.miniFullScreen.html(getLanguage("lblFullscreen","Click to view in fullscreen.")),this.onResize(),bookContainer.append(this.miniFullScreen),this.miniFullscreenEnter=!1,bookConfig.alwaysShowBottomFullscreenPrompt||(this.miniFullscreenTimeout&&window.clearTimeout(this.miniFullscreenTimeout),this.miniFullscreenTimeout=window.setTimeout(function(){this.removeMiniFullScreen()}.bind(this),1E3*bookConfig.bottomFullscreenPromptDisplayDuration)), this.initMiniFullScreenEvent())}},initMiniFullScreenEvent:function(){this.miniFullScreen.bind(_event._end,function(){bookType==BookType.catalog_book&&global.catalogBook&&catalogBook.guidBar&&catalogBook.guidBar.fullscreenBtn?catalogBook.guidBar.fullscreenBtn.trigger(_event._end):readAsFullscreen();this.miniFullScreen.remove();this.miniFullScreen=void 0}.bind(this));this.miniFullScreen.bind(_event._enter,function(){this.miniFullscreenEnter=!0}.bind(this));this.miniFullScreen.bind(_event._leave,function(){this.miniFullscreenEnter= !1;bookConfig.alwaysShowBottomFullscreenPrompt||(this.miniFullscreenTimeout&&window.clearTimeout(this.miniFullscreenTimeout),this.miniFullscreenTimeout=window.setTimeout(function(){this.removeMiniFullScreen()}.bind(this),1E3*bookConfig.bottomFullscreenPromptDisplayDuration))}.bind(this))},removeMiniFullScreen:function(){if(this.miniFullScreen&&!this.miniFullscreenEnter){var b={alpha:.7};$(b).animate({alpha:0},{duration:300,easing:"easeOutSine",step:function(){this.miniFullScreen&&this.miniFullScreen.css({opacity:b.alpha})}.bind(this), complete:function(){this.miniFullScreen&&this.miniFullScreen.remove();this.miniFullScreen&&(this.miniFullScreen=void 0)}.bind(this)})}},onResize:function(){if(this.miniFullScreen)if(!MiniStyle.isMini()||isPhone()||isPad()){var b=BookInfo.top();this.miniFullScreen.css({top:b+BookInfo.height()-80+"px"})}else this.miniFullScreen.remove(),this.miniFullScreen=void 0},show:function(){this.miniFullScreen&&this.miniFullScreen.show()},hide:function(){this.miniFullScreen&&this.miniFullScreen.hide()},remove:function(){this.miniFullScreen&& this.miniFullScreen.remove();this.miniFullScreen=void 0},setStyle:function(b){b&&this.miniFullScreen&&this.miniFullScreen.css(b)}}),BookPageNumberForFlip=Class({create:function(){},init:function(){if(bookConfig.updatePageNumberForFlip){var b=-1==BookInfo.getCurrentPageIndex()?1:BookInfo.getCurrentPageIndex();this.miniFullScreen?this.miniFullScreen.html(getShownPageNumberInfo(b)):(this.miniFullScreen=$("<div class='miniFullscreen' id='pageNumberForFlip'></div>"),this.miniFullScreen.html(getShownPageNumberInfo(b)), this.onResize(),bookContainer.append(this.miniFullScreen),this.miniFullscreenEnter=!1,this.miniFullscreenTimeout&&window.clearTimeout(this.miniFullscreenTimeout),this.miniFullscreenTimeout=window.setTimeout(function(){this.removeMiniFullScreen()}.bind(this),3E3),this.initMiniFullScreenEvent())}},initMiniFullScreenEvent:function(){},removeMiniFullScreen:function(){if(this.miniFullScreen&&!this.miniFullscreenEnter){var b={alpha:.5};$(b).animate({alpha:0},{duration:300,easing:"easeOutSine",step:function(){this.miniFullScreen&& this.miniFullScreen.css({opacity:b.alpha})}.bind(this),complete:function(){this.miniFullScreen&&this.miniFullScreen.remove();this.miniFullScreen&&(this.miniFullScreen=void 0)}.bind(this)})}},onResize:function(){if(this.miniFullScreen)if(MiniStyle.isMini())this.miniFullScreen.remove(),this.miniFullScreen=void 0;else{var b=BookInfo.top();this.miniFullScreen.css({top:b+BookInfo.height()-40+"px"})}},show:function(){this.miniFullScreen&&this.miniFullScreen.show()},hide:function(){this.miniFullScreen&& this.miniFullScreen.hide()},remove:function(){this.miniFullScreen&&this.miniFullScreen.remove();this.miniFullScreen=void 0},setStyle:function(b){b&&this.miniFullScreen&&this.miniFullScreen.css(b)}}),BookAttachmentsFactory=Class({create:function(b,c,d,e){this.isDoublePage=e;this.container=b;this.book=d;this.pageIndex=c},createAttachment:function(b,c){switch(b){case "thickness":var d=c?new ThicknessManager(this.container,this.book):new SingleBookThicknessManager(this.container,this.book);d.refreshThickness(); break;case "bookshadow":d=new BookShadow(this.container);break;case "zoomhint":d=new ZoomHint(this.parent);break;case "minifullscreen":d=new BookMiniFullscreen;0<=BookInfo.getCurrentPages().indexOf(1)&&d.init();break;case "bookpagenumber":d=new BookPageNumberForFlip;break;case "staticad":d=new StaticAd(this.container);break;case "zoommap":d=new ZoomMap(this.book);d.fillContent(this.pageIndex);break;case "bookmarktab":d=new BookmarkTab(this.container,!this.isDoublePage);break;case "noteadd":d=new NoteAdd(this.container)}return d}}), BookAttachmentsBuilder=Class({Package:"BookAttachment",create:function(b,c,d,e){this.parent=b;this.pageIndex=c;this.book=d;this.isDoublePage=e;this.Items=this.createAttachmentsForBook()},createAttachmentsForBook:function(){var b=new ObjectPool;this.factory=new BookAttachmentsFactory(this.parent,this.pageIndex,this.book,this.isDoublePage);return b},thickness:function(b){this.bookThickness=this.factory.createAttachment("thickness",b);this.Items.add(this.bookThickness)},bookshadow:function(){this.bookShadow= this.factory.createAttachment("bookshadow");this.Items.add(this.bookShadow)},grayshadow:function(){_agent_.browser.msie||_agent_.browser.safari||!bookConfig.ShowTopLeftShadow||this.book.bookType!=BookType.normal_book||(this.grayshadow=this.factory.createAttachment("grayshadow"),this.Items.add(this.grayshadow))},miniFullscreen:function(){this.miniFullscreen=this.factory.createAttachment("minifullscreen");this.Items.add(this.miniFullscreen)},bookpagenumber:function(){this.bookPageNumber=this.factory.createAttachment("bookpagenumber"); this.bookPageNumber.init();this.Items.add(this.bookPageNumber)},staticad:function(){void 0!=global.staticAd&&1==staticAd.haveAd&&(this.staticAd=this.factory.createAttachment("staticad"),this.Items.add(this.staticAd))},zoommap:function(){isPad()||isPhone()||!bookConfig.ZoomMapVisible||(this.zoomMap=this.factory.createAttachment("zoommap"),this.Items.add(this.zoomMap))},bookmarktab:function(){(function(){isPhone()||isPad()||(this.bookMarkTab=this.factory.createAttachment("bookmarktab"),this.Items.add(this.bookMarkTab))}).delay(this, 1)},noteadd:function(){!bookConfig.AnnotationButtonVisible||isPhone()||isPad()||(this.noteAdd=this.factory.createAttachment("noteadd"),this.Items.add(this.noteAdd))},zoomhint:function(){isTouchDevice()},hide:function(){this.Items.find("StaticAd").each(function(b){b.hide()});this.Items.find("ZoomMap").each(function(b){b.hide()});this.Items.find("BookMiniFullscreen").each(function(b){b.hide()});this.Items.find("BookPageNumberForFlip").each(function(b){b.hide()})},show:function(){this.Items.find("BookMiniFullscreen").each(function(b){b.show()}); this.Items.find("BookPageNumberForFlip").each(function(b){b.show()});this.Items.find("BookmarkTab").each(function(b){b.refresh()});this.Items.find("StaticAd").each(function(b){b.show()});this.book.flipping||1!=this.book.currentPageIndex||bookConfig.isTheBookOpen||this.Items.find("StaticAd").each(function(b){b.setStyle({"z-index":3})}.bind(this))},onResize:function(b,c){this.width=b;this.height=c;if(this.book.getCssLeft)var d=this.book.getCssLeft();if(this.book.getCssTop)var e=this.book.getCssTop(); this.Items.find("StaticAd").each(function(f){rightToLeft&&(d+=b);f.setStyle({width:b+"px"});0===staticAd.adPosition&&f.setStyle({left:d,top:e,height:c+"px"})});this.Items.each(function(f){f.onResize(b,c)}.bind(this));this.Items.find("ZoomMap").each(function(f){f.refreshArea()}.bind(this))},afterCurling:function(){this.isDoublePage&&this.Items.find("BookmarkTab").each(function(b){b.adjustBar()});this.Items.find("ThicknessManager").each(function(b){b.refreshThickness()});this.book.flipping||1!=this.book.currentPageIndex|| bookConfig.isTheBookOpen||this.Items.find("StaticAd").each(function(b){b.setStyle({"z-index":3})}.bind(this))},setAttachmentBeforeFlipTo:function(b){this.Items.find("ThicknessManager").each(function(c){c.setAttachmentBefore(b)});this.Items.find("StaticAd").each(function(c){0===staticAd.adPosition&&c.setStyle({"z-index":1})}.bind(this));this.isDoublePage&&this.Items.find("BookmarkTab").each(function(c){c.setAttachmentBefore(b)}.bind(this))},setAttachmentAfterFlipTo:function(b){this.Items.find("ThicknessManager").each(function(c){c.refreshThickness()}); this.Items.find("BookmarkTab").each(function(c){c.refresh()}.bind(this));this.Items.find("ZoomMap").each(function(c){c.fillContent(b);c.refreshArea()}.bind(this));this.book.flipping||1!=this.book.currentPageIndex||bookConfig.isTheBookOpen||this.Items.find("StaticAd").each(function(c){c.setStyle({"z-index":3})}.bind(this))},afterZoomIn:function(b,c){isPhone()||isPad()||this.Items.find("ThicknessManager").each(function(d){d.onResize(b,c)}.bind(this));this.Items.find("BookmarkTab").each(function(d){d.onResize()}.bind(this)); this.Items.find("ZoomMap").each(function(d){d.refreshArea()}.bind(this));this.Items.find("noteadd").length&&this.Items.find("noteadd").get(0).hide()}}),FlipPage=Class({downMask:null,upMask:null,currentIndex:0,nextIndex:0,hardPage:!1,coverPage:!1,coordinate:null,startPoint:null,toPoint:null,fromPoint:null,AliceToLeft:!1,AliceToRight:!1,loosen:!0,flipping:!1,dragMoveToFlip:!1,fallback:!1,pageWidth:0,pageHeight:0,maskWidth:0,create:function(b){this.book=b},startToFlip:function(){this.loosen=this.flipping= !0;this.fallback=this.AliceToRight=this.AliceToLeft=!1},meetFlipCondition:function(){var b=this.toPoint&&this.startPoint&&(this.book.mouseMoveDirection==this.book.moveDirectionType.MOVE_LEFT&&0<this.startPoint.x||this.book.mouseMoveDirection==this.book.moveDirectionType.MOVE_RIGHT&&0>this.startPoint.x);return this.toPoint&&this.startPoint&&(this.toPoint.x<this.book.MiddleX&&0<this.startPoint.x||this.toPoint.x>this.book.MiddleX&&0>this.startPoint.x)||b},flipToPoint:function(b,c,d){if(b&&c)if(1==this.hardPage)this.flipToHardPoint(b, c);else if(this.downMask&&this.upMask&&this.downMask.page&&this.upMask.page){this.coordinate=c;var e=this.pageWidth,f=computePoint(e,this.pageHeight,this.maskWidth,b,c);if(f){var g=transformCSS({rotate:f.rotate,tran:{x:f.maskTranX,y:f.maskTranY}}),h=transformCSS({rotate:f.rotate,tran:{x:f.maskTranX,y:f.maskTranY}}),k=transformCSS({rotate:-f.rotate,tran:{x:-f.pageTranX,y:0}}),l=transformCSS({rotate:f.rotate,tran:{x:f.pageTranX,y:0}});this.downMask&&this.downMask.setCSSByStyle(g);this.upMask&&this.upMask.setCSSByStyle(h); this.downMask&&this.downMask.page&&this.downMask.page.setCSSByStyle(k);this.upMask&&this.upMask.page&&this.upMask.page.setCSSByStyle(l);this.setFlipAlpha(e,b,c);this.setFlipShadow(f,d);this.book.followToPoint(this,b,c)}}},flipToHardPoint:function(b,c){if(b&&c){var d=this.pageWidth,e=this.pageHeight,f=this.maskWidth;c.x>d&&(c.x=d);c.x<-d&&(c.x=-d);this.coordinate=c;if(e=computePoint(d,e,f,b,c)){f=-90+90*Math.abs(c.x/b.x);0>c.x&&(f=90-90*Math.abs(c.x/b.x));var g=transformCSS({perspective:6E3,rotateY:f}), h=transformCSS({perspective:6E3,rotateY:f});e.rotate=f;this.downMask&&this.downMask.setCSSByStyle(g);this.upMask&&this.upMask.setCSSByStyle(h);0>c.x/b.x?this.setPagesVisible(!1):this.setPagesVisible(!0);this.setHardFlipShadow(e);this.setFlipAlpha(d,b,c);this.book.followToPoint(this,b,c)}}},setPagesVisible:function(b){},setHardFlipShadow:function(b){b&&(this.upMask&&this.upMask.setFlipShadow(b,!0),this.downMask&&this.downMask.setFlipShadow(b,!1))},setFlipAlpha:function(b,c,d){},setFlipShadow:function(b, c){b&&(this.upMask.page&&this.upMask.page.setFlipShadow(b,!0,c),this.nextPage&&!this.isMiniPage()&&this.nextPage.setFlipShadow(b,!1,c))},isMiniPage:function(){return 1<Math.abs(this.pageWidth-this.book.pageWidth)||1<Math.abs(this.pageHeight-this.book.pageHeight)},resetWidthHeight:function(){var b=this.getPageWidthHeight().width,c=this.getPageWidthHeight().height,d=parseInt(Math.sqrt(Math.pow(b,2)+Math.pow(c,2)));0!=(d-c)%2&&(d+=1);this.pageWidth=b;this.pageHeight=c;this.maskWidth=d},getPageWidthHeight:function(){if(this.downMask)return{width:this.downMask.pageWidth, height:this.downMask.pageHeight};if(this.upMask)return{width:this.upMask.pageWidth,height:this.upMask.pageHeight}},setPageZIndex:function(){},setFlipOriginPoint:function(){},endFlipByIndex:function(){},isDragMoveToFlip:function(){this.dragMoveToFlip=!1;this.coordinate&&this.startPoint&&this.coordinate.x!=this.startPoint.x&&(this.dragMoveToFlip=!0)},endFlip:function(){this.flipping=!1},destroy:function(){}}),SingleFlipPage=Class({flipToHardPoint:function(b,c){if(b&&c){this.coordinate=c;var d=this.pageWidth, e=computePoint(d,this.pageHeight,this.maskWidth,b,c);if(e){var f=-90+90*Math.abs(c.x/b.x);0>c.x&&(f=90-90*Math.abs(c.x/b.x));var g=transformCSS({perspective:6E3,rotateY:f});f=transformCSS({perspective:6E3,rotateY:f});this.downMask&&this.downMask.setCSSByStyle(g);this.upMask&&this.upMask.setCSSByStyle(f);0>c.x/b.x?(this.upMask.setVisible(!1),this.downMask.setVisible(!1)):(this.upMask.setVisible(!1),this.downMask.setVisible(!0));this.setHardFlipShadow(e);this.setFlipAlpha(d,b,c);this.book.followToPoint(this, b,c)}}},setHardFlipShadow:function(b){b&&(this.upMask&&this.upMask.setFlipShadow(b,!0),this.downMask&&this.downMask.setFlipShadow(b,!1))},setPageZIndex:function(){var b=this.downMask.pageIndex,c=this.upMask.pageIndex,d=originTotalPageCount+5+c,e=originTotalPageCount+5-b;if(bookConfig.HardPageEnable){if(c==totalPageCount||1==c)d=2*(bookConfig.totalPageCount+5)+10;if(b==totalPageCount||1==b)e=2*(bookConfig.totalPageCount+5)+10}this.upMask.setZIndex(d);this.downMask.setZIndex(e)},setFlipAlpha:function(b, c,d){},setFlipOriginPoint:function(){this.dragMoveToFlip||rightToLeft||(this.fromPoint={x:this.pageWidth,y:this.pageHeight});!this.dragMoveToFlip&&rightToLeft&&(this.fromPoint={x:-this.pageWidth,y:this.pageHeight});this.toPoint="left"==this.book.flipToDirection?{x:-this.pageWidth,y:this.fromPoint.y}:{x:this.pageWidth,y:this.fromPoint.y};this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=-this.toPoint.x;this.startPoint.y=this.toPoint.y},endFlipByIndex:function(b){b=transformCSS({rotate:0, tran:{x:0,y:0}});this.upMask.setCSSByStyle(b);this.upMask.page&&this.upMask.page.setCSSByStyle(b);this.downMask.setCSSByStyle(b);this.downMask.page&&this.downMask.page.setCSSByStyle(b);this.upMask.setLeftOrRight(rightToLeft);this.downMask.setLeftOrRight(rightToLeft);this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask);this.upMask.clearFlipShadow();this.downMask.clearFlipShadow()}}).extend(FlipPage),SingleCalendarPage=Class({flipToPoint:function(b,c,d){if(b&&c)if(1== this.hardPage)this.flipToHardPoint(b,c);else if(this.downMask&&this.upMask&&this.downMask.page&&this.upMask.page){this.coordinate=c;var e=this.pageWidth,f=computePoint(this.pageHeight,e,this.maskWidth,b,c);if(f){var g=transformCSS({rotate:f.rotate,tran:{x:-f.maskTranY,y:f.maskTranX}}),h=transformCSS({rotate:f.rotate,tran:{x:-f.maskTranY,y:f.maskTranX}}),k=transformCSS({rotate:-f.rotate,tran:{x:0,y:-f.pageTranX}}),l=transformCSS({rotate:f.rotate,tran:{x:0,y:f.pageTranX}});this.downMask&&this.downMask.setCSSByStyle(g); this.upMask&&this.upMask.setCSSByStyle(h);this.downMask&&this.downMask.page&&this.downMask.page.setCSSByStyle(k);this.upMask&&this.upMask.page&&this.upMask.page.setCSSByStyle(l);this.setFlipAlpha(e,b,c);this.setFlipShadow(f,d);this.book.followToPoint(this,b,c)}}},flipToHardPoint:function(b,c){if(b&&c){this.coordinate=c;var d=this.pageWidth,e=computePoint(this.pageHeight,d,this.maskWidth,b,c);if(e){var f=-90+90*Math.abs(c.x/b.x);0>c.x&&(f=90-90*Math.abs(c.x/b.x));var g=transformCSS({perspective:6E3, rotateX:-f});f=transformCSS({perspective:6E3,rotateX:-f});this.downMask&&this.downMask.setCSSByStyle(g);this.upMask&&this.upMask.setCSSByStyle(f);0>c.x/b.x?(this.upMask.setVisible(!1),this.downMask.setVisible(!1)):(this.upMask.setVisible(!1),this.downMask.setVisible(!0));this.setHardFlipShadow(e);this.setFlipAlpha(d,b,c);this.book.followToPoint(this,b,c)}}},setPageZIndex:function(){var b=this.downMask.pageIndex,c=this.upMask.pageIndex,d=originTotalPageCount+5+c,e=originTotalPageCount+5-b;if(bookConfig.HardPageEnable){if(c== totalPageCount||1==c)d=2*(bookConfig.totalPageCount+5)+10;if(b==totalPageCount||1==b)e=2*(bookConfig.totalPageCount+5)+10}this.upMask.setZIndex(d);this.downMask.setZIndex(e)},setFlipAlpha:function(b,c,d){},setFlipOriginPoint:function(){this.dragMoveToFlip||rightToLeft||(this.fromPoint={x:this.pageHeight,y:0});!this.dragMoveToFlip&&rightToLeft&&(this.fromPoint={x:-this.pageHeight,y:0});this.toPoint="left"==this.book.flipToDirection?{x:-this.pageHeight,y:this.fromPoint.y}:{x:this.pageHeight,y:this.fromPoint.y}; this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=-this.toPoint.x;this.startPoint.y=this.toPoint.y},endFlipByIndex:function(b){b=transformCSS({rotate:0,tran:{x:0,y:0}});this.upMask.setCSSByStyle(b);this.upMask.page&&this.upMask.page.setCSSByStyle(b);this.downMask.setCSSByStyle(b);this.downMask.page&&this.downMask.page.setCSSByStyle(b);this.upMask.setUpOrDown(rightToLeft);this.downMask.setUpOrDown(rightToLeft);this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask); this.upMask.clearFlipShadow();this.downMask.clearFlipShadow()}}).extend(SingleFlipPage),DoubleFlipPage=Class({setPagesVisible:function(b){b?(this.upMask.setVisible(!1),this.downMask.setVisible(!0)):(this.upMask.setVisible(!0),this.downMask.setVisible(!1))},setPageZIndex:function(b){var c=this.downMask.pageIndex,d=this.upMask.pageIndex,e=originTotalPageCount+5+d,f=originTotalPageCount+5-c;"min"==b.flipTo&&(e=2*originTotalPageCount+5-d);"min"==b.flipTo&&(f=5+c);if(bookConfig.HardPageEnable){if(d==totalPageCount|| 1==d)e=2*(bookConfig.totalPageCount+5)+10;if(c==totalPageCount||1==c)f=2*(bookConfig.totalPageCount+5)+10}this.upMask.setZIndex(e);this.downMask.setZIndex(f)},setFlipOriginPoint:function(b){this.dragMoveToFlip||"left"!=b||(this.fromPoint={x:this.pageWidth,y:this.pageHeight});this.dragMoveToFlip||"right"!=b||(this.fromPoint={x:-this.pageWidth,y:this.pageHeight});this.toPoint={x:-this.fromPoint.x,y:this.fromPoint.y};this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=this.fromPoint.x;this.startPoint.y= this.fromPoint.y},endFlipByIndex:function(b){var c=transformCSS({rotate:0,tran:{x:0,y:0}});this.upMask.setCSSByStyle(c);this.upMask.page&&this.upMask.page.setCSSByStyle(c);this.downMask.setCSSByStyle(c);this.downMask.page&&this.downMask.page.setCSSByStyle(c);b?(this.downMask.setLeftOrRight(!0),this.upMask.setLeftOrRight(!0)):(this.downMask.setLeftOrRight(!1),this.upMask.setLeftOrRight(!1));this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask);this.upMask.clearFlipShadow(); this.downMask.clearFlipShadow()}}).extend(FlipPage),DoubleCalendarPage=Class({flipToPoint:function(b,c,d){if(b&&c)if(1==this.hardPage)this.flipToHardPoint(b,c);else if(this.downMask&&this.upMask&&this.downMask.page&&this.upMask.page){this.coordinate=c;var e=this.pageWidth,f=computePoint(this.pageHeight,e,this.maskWidth,b,c);if(f){var g=transformCSS({rotate:f.rotate,tran:{x:-f.maskTranY,y:f.maskTranX}}),h=transformCSS({rotate:f.rotate,tran:{x:-f.maskTranY,y:f.maskTranX}}),k=transformCSS({rotate:-f.rotate, tran:{x:0,y:-f.pageTranX}}),l=transformCSS({rotate:f.rotate,tran:{x:0,y:f.pageTranX}});this.downMask&&this.downMask.setCSSByStyle(g);this.upMask&&this.upMask.setCSSByStyle(h);this.downMask&&this.downMask.page&&this.downMask.page.setCSSByStyle(k);this.upMask&&this.upMask.page&&this.upMask.page.setCSSByStyle(l);this.setFlipAlpha(e,b,c);this.setFlipShadow(f,d);this.book.followToPoint(this,b,c)}}},flipToHardPoint:function(b,c){if(b&&c){var d=this.pageWidth,e=this.pageHeight,f=this.maskWidth;c.x>e&&(c.x= e);c.x<-e&&(c.x=-e);this.coordinate=c;if(e=computePoint(e,d,f,b,c)){var g=-90+90*Math.abs(c.x/b.x);0>c.x&&(g=90-90*Math.abs(c.x/b.x));f=transformCSS({perspective:6E3,rotateX:-g});g=transformCSS({perspective:6E3,rotateX:-g});this.downMask&&this.downMask.setCSSByStyle(f);this.upMask&&this.upMask.setCSSByStyle(g);0>c.x/b.x?this.setPagesVisible(!1):this.setPagesVisible(!0);this.setHardFlipShadow(e);this.setFlipAlpha(d,b,c);this.book.followToPoint(this,b,c)}}},setFlipOriginPoint:function(b){this.dragMoveToFlip|| "left"!=b||(this.fromPoint={x:this.pageHeight,y:0});this.dragMoveToFlip||"right"!=b||(this.fromPoint={x:-this.pageHeight,y:0});this.toPoint={x:-this.fromPoint.x,y:this.fromPoint.y};this.startPoint||(this.startPoint={x:0,y:0});this.startPoint.x=this.fromPoint.x;this.startPoint.y=this.fromPoint.y},endFlipByIndex:function(b){var c=transformCSS({rotate:0,tran:{x:0,y:0}});this.upMask.setCSSByStyle(c);this.upMask.page&&this.upMask.page.setCSSByStyle(c);this.downMask.setCSSByStyle(c);this.downMask.page&& this.downMask.page.setCSSByStyle(c);b?(this.downMask.setUpOrDown(!0),this.upMask.setUpOrDown(!0)):(this.downMask.setUpOrDown(!1),this.upMask.setUpOrDown(!1));this.book.setZIndexByPageIndex(this.upMask);this.book.setZIndexByPageIndex(this.downMask);this.upMask.clearFlipShadow();this.downMask.clearFlipShadow()}}).extend(DoubleFlipPage),FlipPageManager=Class({create:function(b){this.book=b;this.array=[];this.pinDownCurlingArray=[];this.fallbackArray=[];this.flipArray=[];this.zoomArray=[];this.resizeArray= [];this.hardFlipArray=[];this.softFlipArray=[];this.coverFlipArray=[]},initFlipPageByIndex:function(b,c,d){if(this.book.isCoverPage(b,c))return this.initCoverFlipByIndex(b,c,d);if(this.book.isHardPage(b,c))return this.initHardFlipByIndex(b,c,d);d=this.book.getDownUpPage(b,c,d);var e=b+"-"+c;this[e]||(this[e]=this.book.newFlipPage());this[e].downMask=d[0];this[e].upMask=d[1];this[e].currentIndex=b;this[e].nextIndex=c;this[e].hardPage=!1;this[e].resetWidthHeight();0>this.array.indexOf(e)&&this.array.push(e); 0>this.softFlipArray.indexOf(e)&&this.softFlipArray.push(e);return this[e]},initHardFlipByIndex:function(b,c,d){d=this.book.getDownUpHardPage(b,c,d);var e=b+"-"+c;this[e]||(this[e]=this.book.newFlipPage());this[e].downMask=d[0];this[e].upMask=d[1];this[e].currentIndex=b;this[e].nextIndex=c;this[e].hardPage=!0;this[e].resetWidthHeight();0>this.array.indexOf(e)&&this.array.push(e);0>this.hardFlipArray.indexOf(e)&&this.hardFlipArray.push(e);return this[e]},initCoverFlipByIndex:function(b,c,d){d=this.book.getDownUpHardPage(b, c,d);var e=b+"-"+c;this[e]||(this[e]=this.book.newFlipPage());this[e].downMask=d[0];this[e].upMask=d[1];this[e].currentIndex=b;this[e].nextIndex=c;this[e].hardPage=!0;this[e].coverPage=!0;this[e].resetWidthHeight();0>this.array.indexOf(e)&&this.array.push(e);0>this.coverFlipArray.indexOf(e)&&this.coverFlipArray.push(e);return this[e]},checkFlipping:function(){for(var b=this.array.length,c=0;c<b;c++)if(this.array[c]){var d=this.array[c];if(this[d]&&this[d].flipping)return!0}return!1},removeFlipArrayByIndex:function(b){b= b.currentIndex+"-"+b.nextIndex;this[b]&&this[b].nextPage&&this[b].nextPage.clearFlipShadow();this[b]&&delete this[b];this.array&&this.array.removeElement(b);this.flipArray&&this.flipArray.removeElement(b);this.hardFlipArray&&this.hardFlipArray.removeElement(b);this.softFlipArray&&this.softFlipArray.removeElement(b);this.coverFlipArray&&this.coverFlipArray.removeElement(b);this.pinDownCurlingArray&&this.pinDownCurlingArray.removeElement(b);this.fallbackArray&&this.fallbackArray.removeElement(b)},endFlip:function(){if(this.array&& 0!=this.array.length)for(var b=this.array.length,c=0;c<b;c++)if(this.array[c]){var d=this[this.array[c]];d&&(d.endFlipByIndex(),this.removeFlipArrayByIndex(d))}},doNotMeetPageConditions:function(b){if(this.hasBeenMonitor()||this.hasUnLoosenPage()||this.fallbackArray&&0<this.fallbackArray.length||0<=this.book.getPagesByIndex(b).indexOf(this.book.currentPageIndex))return!0;var c=!1;!rightToLeft&&b>this.book.currentPageIndex&&(c=!0);rightToLeft&&b<this.book.currentPageIndex&&(c=!0);return this.isReverseSeriesFlip(c)|| this.isReversePinDownCurlingArray(c,b)?!0:this.existMutexPages(b)?(this.monitorMutexFlipSituation(b),!0):this.crossFlipMode(b)?(this.book.gotoNearPage(b),window.setTimeout(function(){gotoPageFun(b,!1,"cross page")},20),!0):this.crossPageMode(b)?(window.setTimeout(function(){gotoPageFun(b,!1,"cross page")},20),!0):!1},hasBeenMonitor:function(){return this.monitorMutexFlipInterval?!0:!1},hasUnLoosenPage:function(){var b=this.book.optionPage;return b&&this[b]&&!this[b].loosen?!0:!1},isReverseSeriesFlip:function(b){if(b&& this.book.flipping&&this.book.flipToDirection==this.book.direction_right||!b&&this.book.flipping&&this.book.flipToDirection==this.book.direction_left)return!0},isReversePinDownCurlingArray:function(b,c){if(!this.pinDownCurlingArray||0>=this.pinDownCurlingArray.length)return!1;c=this.book.getPagesByIndex(c);for(var d=this.pinDownCurlingArray.length,e=0;e<d;e++){var f=this[this.pinDownCurlingArray[e]];if(b&&f&&f.AliceToRight||!b&&f&&f.AliceToLeft||f&&0>c.indexOf(f.nextIndex))return!0}return!1},existMutexPages:function(b){return this.hardFlipArray&& 0<this.hardFlipArray.length&&(this.toSoftPage(b)||this.toCoverPage(b))||this.softFlipArray&&0<this.softFlipArray.length&&(this.toHardPage(b)||this.toCoverPage(b))||this.coverFlipArray&&0<this.coverFlipArray.length&&(this.toHardPage(b)||this.toSoftPage(b))?!0:!1},monitorMutexFlipSituation:function(b){this.monitorMutexFlipInterval||(this.monitorMutexFlipInterval=window.setInterval(function(){this.existMutexPages(b)||(window.clearInterval(this.monitorMutexFlipInterval),this.monitorMutexFlipInterval= void 0,gotoPageFun(b,!1,"cross page"))}.bind(this),20))},toSoftPage:function(b){return this.book.toSoftPage(b)},toHardPage:function(b){return this.book.toHardPage(b)},toCoverPage:function(b){return this.book.toCoverPage(b)},crossFlipMode:function(b){return this.book.crossFlipMode(b)?!0:!1},crossPageMode:function(b){var c=this.book.getFlipTo(b),d=c.minIndex,e=c.maxIndex,f=c.toIndex;if("max"==c.flipTo){if(this.book.pageInfoArray[e].isMiniPage&&!(0<=this.book.getPagesByIndex(e+1).indexOf(b)))return nextPageFun("cross page"), !0;if(this.book.pageInfoArray[f].isMiniPage&&!(0<=this.book.getPagesByIndex(e+1).indexOf(b)))return gotoPageFun(f-1,!1,"cross page"),!0}if("min"==c.flipTo){if(this.book.pageInfoArray[d].isMiniPage&&!(0<=this.book.getPagesByIndex(d-1).indexOf(b)))return previousPageFun("cross page"),!0;if(this.book.pageInfoArray[f].isMiniPage&&!(0<=this.book.getPagesByIndex(d-1).indexOf(b)))return gotoPageFun(f+1,!1,"cross page"),!0}},beyondPageRange:function(b){return 0>=b||b>originTotalPageCount?!0:!1},beforeFlip:function(b, c){try{var d=this.book.beforeFlipTo(b,!0);this.isDragMoveToFlip(d);if(!d.dragMoveToFlip){var e=this.book.getFromStartPointByIndex(b,d);d.flipToPoint(e[0],e[1],!0)}var f=d.currentIndex+"-"+d.nextIndex;this.book.optionPage==f&&(this.book.optionPage=null);0<this.pinDownCurlingArray.indexOf(f)&&(d.dragMoveToFlip=!0);0>this.flipArray.indexOf(f)&&this.flipArray.push(f);this.fallbackArray.removeElement(f);this.pinDownCurlingArray.removeElement(f);d.startToFlip();this.book.flipping=!0;return d}catch(g){}}, isDragMoveToFlip:function(b){b.dragMoveToFlip=!1;b.coordinate&&b.startPoint&&b.coordinate.x!=b.startPoint.x&&(b.dragMoveToFlip=!0)}}),FlipBookIntervalManager=Class({create:function(b){this.book=b;this.flippingTime=1E3*bookConfig.flippingTime},flipIntervalTmp:function(b,c,d,e){if(b){this.book.flipping=!0;b.flipping=!0;var f=.05;if(isIE()||isFirefox())f=0;b.setFlipOriginPoint(e);b.coordinate||(b.coordinate=b.startPoint);var g=b.coordinate.x,h=b.coordinate.y,k,l=this.flippingTime;l=l*Math.abs(b.toPoint.x- g)/Math.abs(b.toPoint.x-b.startPoint.x);e=isAndroidWeChat()||isAndroidDefault()||isIE()||isFirefox()?function(){var p=0;k=function(){n(p,25,"Sine");p++}.interval(this,l/25)}.bind(this):function(){k=function(p,v){n(p,v,"Sine")}.animation(this,l)}.bind(this);var n=function(p,v,B){if(!b)return!1;var t=b.pageWidth,u=b.pageHeight,w=$.easing["easeInOut"+B],x=$.easing["easeOut"+B];B=x(null,p,g,b.toPoint.x-g,v);x=x(null,p,h,b.toPoint.y-h,v);b.dragMoveToFlip||(B=w(null,p,g,b.toPoint.x-g,v),x=bookConfig.FlipDirection? f*Math.sqrt(u*u-B*B):u-f*Math.sqrt(t*t-B*B));p<v?this.flipToPoint(b,c,d,b.fromPoint,{x:B,y:x}):(this.flipToPoint(b,c,d,b.fromPoint,b.toPoint),this.book.afterFlipTo(b,d),BookEvent.trigger("afterFlipPage",[d]),k.stop())}.bind(this);e()}},setFlipInterval:function(){this.flipInterval=function(){if(!this.flipIntervalManager.flipInterval||!this.flipIntervalManager.flipInterval.stop){if(this.flipPageManager&&this.flipPageManager.array&&0!=this.flipPageManager.array.length)for(var b=0;b<this.flipPageManager.array.length;b++){var c= this.flipPageManager.array[b];if(c){var d=this.flipPageManager[c];if(!this.flipPageManager[c])this.flipPageManager.array.removeElement(c),b--;else if(this.flipPageManager[c].fromPoint&&this.flipPageManager[c].startPoint&&this.flipPageManager[c].toPoint&&this.flipPageManager[c].downMask&&this.flipPageManager[c].upMask&&!this.flipPageManager[c].flipping){this.flipPageManager[c].Alice=!0;this.flipPageManager[c].coordinate||(this.flipPageManager[c].coordinate=this.flipPageManager[c].startPoint);var e= .22*(d.toPoint.x-d.coordinate.x),f=e+this.flipPageManager[c].coordinate.x;d=e/((d.coordinate.x-d.toPoint.x)/(d.coordinate.y-d.toPoint.y))+this.flipPageManager[c].coordinate.y;e=this.flipPageManager[c].downMask.pageIndex;var g=this.flipPageManager[c].upMask.pageIndex;this.flipIntervalManager.flipToPoint(this.flipPageManager[c],e,g,this.flipPageManager[c].fromPoint,{x:f,y:d});!this.flipPageManager[c].flipping&&this.flipPageManager[c].loosen&&(1>Math.abs(f.toFixed(2)-this.flipPageManager[c].toPoint.x)&& 1>Math.abs(d.toFixed(2)-this.flipPageManager[c].toPoint.y)||isNaN(f)||isNaN(d))&&(this.flipPageManager[c].Alice=!1,f=this.flipPageManager[c].toPoint.x,d=this.flipPageManager[c].toPoint.y,this.flipIntervalManager.flipToPoint(this.flipPageManager[c],e,g,this.flipPageManager[c].fromPoint,{x:f,y:d}),this.flipPageManager[c].endFlipByIndex(0>this.flipPageManager[c].toPoint.x),this.flipPageManager.removeFlipArrayByIndex(this.flipPageManager[c]),this.afterCurling(),b--)}}}else this.flipIntervalManager.flipInterval.stop= !0,this.flipIntervalManager.flipInterval=void 0;this.flipIntervalManager.flipInterval&&(isAndroidWeChat()||isAndroidDefault()||isIE()||isFirefox()?window.setTimeout(this.flipIntervalManager.flipInterval,30):window.requestAnimationFrame(this.flipIntervalManager.flipInterval))}}.bind(this.book);this.flipInterval()},flipToPoint:function(b,c,d,e,f,g){b&&b.flipToPoint(e,f,g);c=Math.abs(f.x-e.x)*this.book.pageWidth/b.pageWidth;(!this.book.movedLength||Math.abs(this.book.movedLength)>c||!b.loosen||b.flipping)&& this.book.movetoCenter(b.currentIndex,b.nextIndex,c)},endFlip:function(){},destroy:function(){}}),computePoint=function(b,c,d,e,f){if(!e||!f)return{rotate:0,pageTranX:0,maskTranX:0,maskTranY:0};f.x>b&&(f.x=b);f.x<-b&&(f.x=-b);isAndroidDefault()&&(e.y=f.y);if(e.x==f.x){var g=0;0>e.x&&(g+=180);return{rotate:g,pageTranX:0,maskTranX:e.x,maskTranY:0}}g=Math.sqrt(Math.pow(e.y-c,2)+Math.pow(e.x-0,2));if(Math.sqrt(Math.pow(f.y-c,2)+Math.pow(f.x-0,2))>g){var h=Math.atan((f.y-c)/(f.x-0)),k=Math.abs(Math.cos(h)* g);f.y=c-Math.abs(Math.sin(h)*g);f.x=0<f.x?k:-k}g=Math.sqrt(Math.pow(e.y-0,2)+Math.pow(e.x-0,2));Math.sqrt(Math.pow(f.y-0,2)+Math.pow(f.x-0,2))>g&&(h=Math.atan((f.y-0)/(f.x-0)),k=Math.abs(Math.cos(h)*g),f.y=Math.abs(Math.sin(h)*g),f.x=0<f.x?k:-k);var l=(f.y-e.y)/(f.x-e.x),n=Math.atan(l);g=180*n/Math.PI;var p=(f.x+e.x)/2,v=(f.y+e.y)/2;h=c/2;k=b/2;var B=c/2;0>e.x&&(g+=180,k=-b/2);e=Module._getTmpDistance(c,e.y-f.y,e.x-f.x,n,g,e.y);c=Module._getShadowRate(b,c,e,n,d,window.key_index,originTotalPageCount); 1<c&&(window.bookConfig=null);d=((p-k)*l+B+Math.pow(l,2)*v)/(1+Math.pow(l,2));f=l*(v-d)+p;k=Module._getPageNewCenterX(f,d,k,B);return{frontShadowDistance:e,shadowRate:c,rotate:g,pageTranX:k-b/2,maskTranX:f-0,maskTranY:d-h}},FlipBook=Class({coordinate_bottom_left:"bl",coordinate_top_left:"tl",coordinate_bottom_right:"br",coordinate_top_right:"tr",direction_left:"left",direction_right:"right",flipPageManager:null,maskWidth:0,create:function(b){this._super(b);this.flipPageManager=new FlipPageManager(this); this.toPageIndex=this.currentPageIndex;this.initBook();this.initEvent();this.flipIntervalManager=new FlipBookIntervalManager(this);this.pageInfoArray=(new PageInfo(!this.doublePage)).pageInfoArray},initBook:function(){this.flipBook=$("<div class='book'></div>");this.parent.append(this.flipBook);this.initAttachments()},initAttachments:function(){this.showPage=this.flipBook;this.bookAttachments=new BookAttachmentsBuilder(this.flipBook,this.currentPageIndex,this,this.options.isDoublePage);this.options.thickness&& this.bookAttachments.thickness(!0);this.options.bookshadow&&this.bookAttachments.bookshadow();this.options.grayshadow&&this.bookAttachments.grayshadow();this.options.miniFullscreen&&this.bookAttachments.miniFullscreen();this.options.bookpagenumber&&this.bookAttachments.bookpagenumber();this.options.staticad&&this.bookAttachments.staticad();this.options.zoommap&&this.bookAttachments.zoommap();this.options.bookmarktab&&this.bookAttachments.bookmarktab();this.options.noteadd&&this.bookAttachments.noteadd(); this.resetBookShadow(this.currentPageIndex)},resetPages:function(){},getBook:function(){return this.flipBook},addPageArray:function(b){if(b&&this.pageArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(this.pageArray[b[c]]&&this.fillContent(b[c]),this.pageArray[b[c]]))){var d=this.newPage(b[c]);d.fillPreviewImage();var e=this.pageInfoArray[b[c]];d.onResize(this.pageWidth*e.pageWidth,this.pageHeight*e.pageHeight,e.opacity);this.pageArray[b[c]]=d;this.fillContent(b[c]);this.flipBook.append(d.$page)}}, onResize:function(b,c){this.resizeBook(b,c);0==this.pageArray.length&&this.resetPages(this.currentPageIndex);isPhone()||isPad()||this.switchNormalImage(!0);this.resizeAttachments(b,c);this.showPages()},resizeAttachments:function(b,c){},loading:function(){if(!this.flipping){var b=this.getCurrentPages();if(b&&!(0>=b.length))for(var c=b.length,d=0;d<c;d++)b[d]&&this.pageArray[b[d]]&&this.pageArray[b[d]].loading()}},fillContent:function(b,c){this.flipping||!bookConfig.preloadNextPage&&0>this.getCurrentPages().indexOf(b)|| (this.pageArray[b]&&!c&&this.pageArray[b].fillContent(),this.pageBackArray&&this.pageBackArray[b]&&c&&this.pageBackArray[b].fillContent())},fillPage:function(b,c){if(b)for(var d=this.pageArray.length,e=0;e<d;e++)this.pageArray[e]&&this.pageArray[e].fillPage(b,c),this.pageBackArray&&this.pageBackArray[e]&&this.pageBackArray[e].fillPage(b,c)},removePage:function(b){!isNaN(b)&&this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},unWrapPageExcludeArray:function(b){if(b&&this.pageArray)for(var c= this.pageArray.length,d=0;d<c;d++)!this.pageArray[d]||0<=b.indexOf(d)||(this.pageArray[d].remove(),this.pageArray[d]=void 0)},unWrapPageBackExcludeArray:function(b){if(b&&this.pageBackArray)for(var c=this.pageBackArray.length,d=0;d<c;d++)!this.pageBackArray[d]||0<=b.indexOf(d)||(this.pageBackArray[d].remove(),this.pageBackArray[d]=void 0)},resizePage:function(b,c){if(this.pageArray)for(var d=this.pageArray.length,e=0;e<d;e++)if(this.pageArray[e]){var f=this.pageInfoArray[e];this.pageArray[e].onResize(b* f.pageWidth,c*f.pageHeight,f.opacity)}if(this.pageBackArray)for(d=this.pageBackArray.length,e=0;e<d;e++)this.pageBackArray[e]&&(f=this.pageInfoArray[e],this.pageBackArray[e].onResize(b*f.pageWidth,c*f.pageHeight,f.opacity))},crossFlipMode:function(b,c){return!1},toSoftPage:function(b){return!0},toHardPage:function(b){return!1},toCoverPage:function(){return!1},isCoverPage:function(){return!1},isHardPage:function(){return!1},beforeFlipTo:function(b,c){b=this.getFlipTo(b);var d=b.minIndex,e=b.maxIndex, f=b.toIndex,g;"max"==b.flipTo&&(g=this.flipToMax(e,f,c,rightToLeft));"min"==b.flipTo&&(g=this.flipToMin(d,f,c,!rightToLeft));this.setAttachmentBeforeFlipTo(f);this.hidePagesBeforeFlip&&this.hidePagesBeforeFlip(g);g.setPageZIndex(b);return g},afterFlipTo:function(b,c){b&&b.downMask&&b.upMask&&(b.endFlipByIndex(),this.flipPageManager.removeFlipArrayByIndex(b),this.checkFlipping(),b.downMask.pageIndex<c?this.afterFlipToMax(c,!rightToLeft):this.afterFlipToMin(c,rightToLeft),this.setAttachmentAfterFlipTo(c), this.showPagesAfterFlip&&this.showPagesAfterFlip())},checkFlipping:function(){this.flipping=!1;this.flipPageManager.checkFlipping()?this.flipping=!0:(this.startAnimation(),this.flipToDirection="",this.loading())},followToPoint:function(b,c,d){},endFlip:function(){this.flipPageManager&&this.flipPageManager.endFlip()},getCurrentPageIndex:function(){return this.currentPageIndex},getPageWidth:function(b){if(void 0==b)return this.pageWidth;this.pageWidth=b},getPageHeight:function(b){if(void 0==b)return this.pageHeight; this.pageHeight=b},getWidth:function(){return this.width},getHeight:function(){return this.height},getScale:function(){return this.flipBook.parameters.toScale},getLeft:function(){return this.flipBook.offset().left},getTop:function(){return this.flipBook.offset().top},getCssLeft:function(){return parseInt(this.flipBook.css("left"))},getCssTop:function(){return parseInt(this.flipBook.css("top"))},setCSS:function(b){if(b){void 0!=b.width&&this.flipBook.css("width",b.width+"px");void 0!=b.height&&this.flipBook.css("height", b.height+"px");void 0!=b.left&&this.flipBook.css("left",b.left+"px");void 0!=b.top&&this.flipBook.css("top",b.top+"px");void 0!=b.display&&this.flipBook.css("display",b.display);if(b.tran||void 0!=b.scale||b.origin){var c=transformCSS(b);this.flipBook.css(c)}this.flipBook.registerPatamers&&this.flipBook.registerParamers(b)}},setPosition:function(b,c,d){void 0==d&&(d=["left","top"]);this.flipBook.css(d[0],b+"px");this.flipBook.css(d[1],c+"px")},translate:function(b,c){b=transformCSS({});this.flipBook.css(b)}, supportSerialsFlip:function(){return isPhone()||isPad()||!bookConfig.supportSerialsFlip?!1:!0},gotoPage:function(b,c){if(b&&(this.toPageIndex=b,!this.flipBook.parameters||!this.flipBook.parameters.zoomming))if(this.status_zoom&&(isPhone()||isPad()))c={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]},this.flipBook.onDoubleTap.bind(this.flipBook)(c);else if(!this.flipPageManager.beyondPageRange(b)&&!this.flipPageManager.doNotMeetPageConditions(b)&&(this.supportSerialsFlip()&&!this.status_zoom|| !this.flipping)){this.flipping=!0;this.stopMedia();this.flipIntervalManager&&this.flipIntervalManager.flipInterval&&(this.flipIntervalManager.flipInterval.stop=!0,this.flipIntervalManager.flipInterval=void 0);var d=this.flipPageManager.beforeFlip(b,!0);fromPageIndex=this.currentPageIndex;var e=this.flipToDirection;!c&&flipHistory&&flipHistory.addFromCurrentIndex(b);this.flippingTo(b,c);playFlipSound();bookConfig.restorePageVisible&&window.localStorage.setItem(realLocation+"?historyPageIndex",b);(function(){this.flipIntervalManager.flipIntervalTmp(d, fromPageIndex,b,e)}).delay(this,50);0<=BookInfo.getPagesByIndex(b).indexOf(1)?this.bookAttachments.Items.find("BookMiniFullscreen").each(function(f){f.init()}):this.bookAttachments.Items.find("BookMiniFullscreen").each(function(f){f.remove()});this.bookAttachments.Items.find("BookPageNumberForFlip").each(function(f){f.init()})}},afterCurling:function(){this.showPagesAfterFlip&&this.showPagesAfterFlip();this.startAnimation()},startAnimation:function(){var b=BookInfo.getCurrentPages();if(void 0!=b&& null!=b)for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].startAnimation()}},pauseAnimation:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].pauseAnimation()},openShownMedia:function(){var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b)for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].enterSide();this.pageArray[d]&&this.pageArray[d].addHistoryTexts()}},stopMedia:function(){for(var b=this.pageArray.length, c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].leaveSide()},resetSlider:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].resetSlider()},destroySlider:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].destroySlider()},select:function(){this.selected=!0;var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b){for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].initSelectTextEvent()}this.flipBook.parameters&& (this.flipBook.parameters.eventCancel=!0)}},unSelect:function(){this.selected=!1;var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b){for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].destroySelect()}StateSynchronous.instance().findButtons("SelectTextButton",!0).each(function(e){e.setAsUnSelect();e.executeCallback()});this.flipBook.parameters&&(this.flipBook.parameters.eventCancel=!1)}},magnifierZoom:function(){this.selected=!0;var b=BookInfo.getCurrentPages();if(void 0!= b&&null!=b)for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].initMagnifierEvent()}},unMagnifierZoom:function(){this.selected=!1;var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b){for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d].destroyMagnifier()}bookConfig.MagnifierButtonVisible&&window.magnifierZoomBox&&window.magnifierZoomBox.hide();StateSynchronous.instance().findButtons("magnifier",!0).each(function(e){e.setAsZoomin()})}},switchLargeImage:function(){for(var b= this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].switchLargeImage()},switchNormalImage:function(b){for(var c=this.pageArray.length,d=0;d<c;d++)this.pageArray[d]&&this.pageArray[d].switchNormalImage(b)},hide:function(){Log.debug("normal book hide.");this.visible=!1;this.setCSS({display:"none"});this.stopMedia();this.destroySlider();this.controlBar&&this.controlBar.setVisible(!1);this.bookAttachments&&this.bookAttachments.hide()},show:function(){Log.debug("normal book show."); this.visible=!0;this.setCSS({display:"block"});this.enterPage();this.bookAttachments&&this.bookAttachments.show()},enterPage:function(){this.afterChangeBookType();this.openShownMedia();this.addSearchHighlight()},afterChangeBookType:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].initReaderOrSlider()},addSearchHighlight:function(){var b=this.currentPageIndex;b=0==b%2?b+1:b-1;this.pageArray[b]&&this.pageArray[b].highlightSearch();this.pageArray[b+1]&&this.pageArray[b+ 1].highlightSearch();this.pageArray[b-1]&&this.pageArray[b-1].highlightSearch();this.pageArray[b+2]&&this.pageArray[b+2].highlightSearch()},clearSearchHighlight:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].clearHighlight()},destroy:function(){this.flipBook.remove()},adjustBookPosition:function(){if(!this.status_zoom&&!this.flipping&&this.width&&this.height){this.pageWidthHeight=this.getFitWH();var b=this.getTranY(),c=this.pageWidthHeight.x/this.width, d=this.getTranX(c);this.flipBook.animateToTransform.bind(this.flipBook)(c,{x:d,y:b},{x:50,y:0})}},getTranX:function(b){if(!bookConfig.retainBookCenter)return 0;var c=0;b=this.width*b/4;1!=this.currentPageIndex||bookConfig.isTheBookOpen||(c=rightToLeft?b:-b);this.currentPageIndex==totalPageCount&&(c=rightToLeft?-b:b);b=this.getCssLeft();var d=this.getSpace(!0);return d.left+(windowWidth-d.left-d.right-this.width)/2-b+c},getTranY:function(){var b=this.getCssTop(),c=this.getSpace(!0);return c.top+(windowHeight- c.top-c.bottom-this.pageWidthHeight.y)/2-b}}).extend(Book);bdor[32]=function(b,c){return b+c};bdor[41]=function(){return bdor[32](bdor[30](37,0),bdor[38]/bdor[40])}(); var ZoomMonitor=Class({options:void 0,target:void 0,beforeZoomIn:void 0,afterZoomIn:void 0,beforeZoomOut:void 0,afterZoomOut:void 0,beforePan:void 0,afterPan:void 0,create:function(){},register:function(b,c){this.options=b;this.target=b.target;this.beforeZoomIn=b.beforeZoomIn;this.afterZoomIn=b.afterZoomIn;this.beforeZoomOut=b.beforeZoomOut;this.afterZoomOut=b.afterZoomOut;this.beforePan=b.beforePan;this.afterPan=b.afterPan;this.target.zoom({zoomIn:this.beforeZoomIn,onPan:this.beforePan,beforeZoomOut:this.beforeZoomOut, zoomOut:this.afterZoomOut,onZoomed:this.afterZoomIn},c)}}); FlipBook.expand({initEvent:function(){this.moveDirectionType={MOVE_LEFT:-1,MOVE_RIGHT:1,MOVE_NONE:0};this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.hammerEventModular();this.mouseWheelFlip();this.mouseZoomEvent()},hammerEventModular:function(){var b=new Hammer.Manager(this.flipBook[0],{touchAction:window.self!==window.top?"pan-y":"none"});b.add(new Hammer.Pan);b.add((new Hammer.Swipe({velocity:.03,threshold:.5})).recognizeWith(b.get("pan")));b.add(new Hammer.Press({time:"1000"}));b.add(new Hammer.Pinch); b.add(new Hammer.Tap({event:"doubletap",taps:2}));b.add(new Hammer.Tap);b.on("panstart panmove panend",this.onPan.bind(this));b.on("press",this.onPress.bind(this));if(_agent_.browser.device!==_agent_.browser.DEVICE_PC)this.flipBook.bind("click",this.onTap.bind(this));else b.on("tap",this.onTap.bind(this));b.on("swipeleft swiperight swipedown swipeup",this.onSwipe.bind(this));this.flipBook.bind("mouseover mousemove",this.onOver.bind(this));this.flipBook.bind("mousedown touchstart",this.onDown.bind(this)); $("body").bind("mouseup touchend",this.onUp.bind(this));$("body").bind("mouseleave touchleave",this.onUp.bind(this));this.zoomMonitor=new ZoomMonitor;this.zoomMonitor.register({target:this.flipBook,beforeZoomIn:this.beforeZoomIn.bind(this),afterZoomIn:this.afterZoomIn.bind(this),beforePan:this.beforePan.bind(this),afterPan:this.afterPan.bind(this),beforeZoomOut:this.beforeZoomOut.bind(this),afterZoomOut:this.afterZoomOut.bind(this)},!0);$(this.flipBook).bind("mouseup touchstart",function(c){onWindowClick(c)})}, onDown:function(){this.fingleDown=!0},onUp:function(b){this.fingleDown=!1;this.selected||this.status_zoom||this.isZoomming||bookType!=this.bookType||(b=this.realPoint(b)[0],b=this.aroundCorner(b),bookConfig.CurlingPageCorner&&b&&0<=b.indexOf("l")&&this.optionPage&&this.flipPageManager[this.optionPage]&&this.flipPageManager[this.optionPage].AliceToRight||bookConfig.CurlingPageCorner&&b&&0<=b.indexOf("r")&&this.optionPage&&this.flipPageManager[this.optionPage]&&this.flipPageManager[this.optionPage].AliceToLeft|| (this.optionPage&&(this.flipPageManager[this.optionPage]&&this.flipPageManager[this.optionPage].meetFlipCondition()&&this.pageDragToFlip(),this.flipPageManager[this.optionPage]&&(this.flipPageManager[this.optionPage].loosen=!0),this.optionPage=null),this.unCurling()))},onPinch:function(b){this.selected||this.status_zoom||this.isZoomming||this.status_zoom||this.status_resize||this.flipping||"pinchout"!=b.type||(this.endFlip(),this.zoomToPage(this.currentPageIndex))},onDoubleTap:function(b){if(!this.selected&& !this.status_resize&&!this.flipping){var c=this.realPoint(b.srcEvent)[0];this.aroundCorner(c)||b.srcEvent[0].pageX>$("#flipBook").offset().left+$("#flipBook").outerWidth()||b.srcEvent[0].pageX<$("#flipBook").offset().left||b.srcEvent[0].pageY>$("#flipBook").offset().top+$("#flipBook").outerHeight()||b.srcEvent[0].pageY<$("#flipBook").offset().top||(this.endFlip(),this.zoomToPage(this.currentPageIndex,b.srcEvent.pageX,b.srcEvent.pageY))}},onPan:function(b){if("panend"!=b.type&&!(this.selected||this.status_zoom|| this.isZoomming||bookType!=this.bookType||this.status_zoom||this.status_resize||this.flipping||this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length)){var c=this.realPoint(b.srcEvent)[0],d=this.aroundCorner(c);this.optionPage?(this.flipPageManager[this.optionPage].toPoint=c,this.lastMousePoint&&(this.mouseMoveDirection=0<=c.x-this.lastMousePoint.x?this.moveDirectionType.MOVE_RIGHT:this.moveDirectionType.MOVE_LEFT),this.lastMousePoint=c):bookConfig.FlipDirection||bookConfig.upsideOnMobile()? ("panstart"==b.type&&d||30<Math.abs(b.deltaY)&&(c.x<this.MiddleX&&0<b.deltaY||c.x>this.MiddleX&&0>b.deltaY))&&this.curling(c,d):("panstart"==b.type&&d||30<Math.abs(b.deltaX)&&(c.x<this.MiddleX&&0<b.deltaX||c.x>this.MiddleX&&0>b.deltaX))&&this.curling(c,d)}},onPress:function(b){if(!(this.selected||this.status_zoom||this.isZoomming||bookType!=this.bookType||this.status_zoom||this.status_resize||this.flipping||this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length)){b=this.realPoint(b.srcEvent)[0]; var c=this.aroundCorner(b);this.optionPage?this.flipPageManager[this.optionPage].toPoint=b:(c||(c=b.x>this.MiddleX?"r":"l"),this.curling(b,c))}},onRotate:function(b){},onSwipe:function(b){if(!(this.selected||this.status_zoom||this.isZoomming||this.dragToFlip))if(bookConfig.FlipDirection||bookConfig.upsideOnMobile())switch(b.type){case "swipeup":this.flipFromDirection(this.coordinate_bottom_right,"swipe to flip");break;case "swipedown":this.flipFromDirection(this.coordinate_bottom_left,"swipe to flip")}else switch(b.type){case "swipeleft":this.flipFromDirection(this.coordinate_bottom_right, "swipe to flip");break;case "swiperight":this.flipFromDirection(this.coordinate_bottom_left,"swipe to flip")}},onTap:function(b){var c=b;b.srcEvent&&(c=b.srcEvent);if(this.selected||this.status_zoom||this.isZoomming)b=this.realPoint(c)[0],this.aroundFlipBound(b)&&onWindowTap(c);else if(bookType==this.bookType&&!this.status_zoom&&!this.status_resize){b=this.realPoint(c)[0];var d=this.aroundFlipCorner(b);!d||bookConfig.BanFlipFromDirection?this.aroundFlipBound(b)&&onWindowTap(c):(this.flipPageManager[this.optionPage]&& (this.flipPageManager[this.optionPage].loosen=!0),this.optionPage=null,this.flipFromDirection(d,"direction"))}},onOver:function(b){if(!(isPhone()||isPad()||this.selected||this.status_zoom||this.isZoomming||bookType!=this.bookType||this.fingleDown||this.flipping)&&bookConfig.CurlingPageCorner){b=this.realPoint(b)[0];var c=this.aroundCorner(b);c?this.curling(b,c):(this.flipPageManager[this.optionPage]&&(this.flipPageManager[this.optionPage].loosen=!0),this.optionPage=null);this.unCurling()}},aroundFlipCorner:function(b){var c= this.aroundCorner(b);if(c)return c;if(!this.doublePage){var d=this.getCurrentPageWidthHeight(b.x);bookConfig.FlipDirection?(c=d.pageHeight,d=d.pageWidth):(c=d.pageWidth,d=d.pageHeight);0>this.MiddleX&&(b.x=-b.x);if(!(b.x>c-1||1>b.x||b.y>d-1||1>b.y||b.x<.8*c&&b.x>.2*c||b.y>.2*d&&b.y<.8*d)){var e=Math.sqrt(Math.pow(.2*d,2)-Math.pow((c-Math.abs(b.x))*d/c,2));c=Math.sqrt(Math.pow(.2*d,2)-Math.pow(Math.abs(b.x)*d/c,2));if(b.y<c&&b.x<this.MiddleX&&0<this.MiddleX)return"tl";if(b.y<c&&b.x<-this.MiddleX&& 0>this.MiddleX||b.y<e&&b.x>this.MiddleX&&0<this.MiddleX)return"tr";if(b.y<e&&b.x>-this.MiddleX&&0>this.MiddleX)return"tl";if(b.y>d-c&&b.x<this.MiddleX&&0<this.MiddleX)return"bl";if(b.y>d-c&&b.x<-this.MiddleX&&0>this.MiddleX||b.y>d-e&&b.x>this.MiddleX&&0<this.MiddleX)return"br";if(b.y>d-e&&b.x>-this.MiddleX&&0>this.MiddleX)return"bl"}}},aroundCorner:function(b){this.edgeX();var c=this.getCurrentPageWidthHeight(b.x);if(bookConfig.FlipDirection){var d=c.pageHeight;c=c.pageWidth}else d=c.pageWidth,c= c.pageHeight;if(!(Math.abs(b.x)>d-1||b.y>c-1||1>b.y||Math.abs(b.x)<.8*d||b.y>.2*c&&b.y<.8*c)){d=Math.sqrt(Math.pow(.2*c,2)-Math.pow((d-Math.abs(b.x))*c/d,2));if(b.y<d&&b.x<this.MiddleX)return"tl";if(b.y<d&&b.x>this.MiddleX)return"tr";if(b.y>c-d&&b.x<this.MiddleX)return"bl";if(b.y>c-d&&b.x>this.MiddleX)return"br"}},aroundFlipBound:function(b){this.edgeX();var c=this.getCurrentPageWidthHeight(b.x);if(bookConfig.FlipDirection){var d=c.pageHeight;c=c.pageWidth}else d=c.pageWidth,c=c.pageHeight;return Math.abs(b.x)> d||Math.abs(b.y)>c||0>b.y?!1:!0},getCurrentPageWidthHeight:function(b){this.edgeX();var c=this.getCurrentPages();if(1==c.length||b<=this.MiddleX&&!rightToLeft||b>=this.MiddleX&&rightToLeft)return{pageWidth:this.pageInfoArray[c[0]].pageWidth*this.pageWidth,pageHeight:this.pageInfoArray[c[0]].pageHeight*this.pageHeight};if(b<=this.MiddleX&&rightToLeft||b>=this.MiddleX&&!rightToLeft)return{pageWidth:this.pageInfoArray[c[1]].pageWidth*this.pageWidth,pageHeight:this.pageInfoArray[c[1]].pageHeight*this.pageHeight}}, pageDragToFlip:function(){this.flipPageManager[this.optionPage].toPoint.y=this.flipPageManager[this.optionPage].startPoint.y;this.flipPageManager[this.optionPage].toPoint.x=-this.flipPageManager[this.optionPage].startPoint.x;this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.flipPageManager[this.optionPage].startToFlip();this.flipPageManager[this.optionPage].dragMoveToFlip=!0;this.flipToDirection=0>this.flipPageManager[this.optionPage].startPoint.x?"right":"left";this.tmpDragToFlipTimeout&& window.clearTimeout(this.tmpDragToFlipTimeout);this.dragToFlip=!0;this.tmpDragToFlipTimeout=window.setTimeout(function(){this.dragToFlip=!1}.bind(this),500);this.getNextPage("drag to flip")},flipFromDirection:function(b,c){if(!(this.flipPageManager.fallbackArray&&0<this.flipPageManager.fallbackArray.length))if(0<=b.indexOf("l")){if(!this.flipping||this.flipToDirection!=this.direction_left){if(this.flipPageManager.pinDownCurlingArray&&0<this.flipPageManager.pinDownCurlingArray.length){b=this.flipPageManager.pinDownCurlingArray.length; for(var d=0;d<b;d++)if(this.flipPageManager.pinDownCurlingArray[d].AliceToLeft)return}this.flipToDirection=this.direction_right;this.getNextPage(c)}}else if(0<=b.indexOf("r")&&(!this.flipping||this.flipToDirection!=this.direction_right)){if(this.flipPageManager.pinDownCurlingArray&&0<this.flipPageManager.pinDownCurlingArray.length)for(b=this.flipPageManager.pinDownCurlingArray.length,d=0;d<b;d++)if(this.flipPageManager.pinDownCurlingArray[d].AliceToRight)return;this.flipToDirection=this.direction_left; this.getNextPage(c)}},hidePages:function(){var b=this.pageArray.length,c=this.getCurrentPages();this.zoomPageArray=[];for(var d=0;d<b;d++)this.pageArray[d]&&0>c.indexOf(d)&&this.pageArray[d].visible&&(this.zoomPageArray.push(this.pageArray[d]),this.pageArray[d].setVisible(!1)),this.pageBackArray&&this.pageBackArray[d]&&(this.zoomPageArray.push(this.pageBackArray[d]),this.pageBackArray[d].setVisible(!1))},showPages:function(){if(this.zoomPageArray){for(var b=this.zoomPageArray.length,c=0;c<b;c++){var d= this.zoomPageArray[c];d&&d.setVisible(!0)}this.zoomPageArray=[]}},beforeZoomIn:function(){if(!isPhone()&&!isPad()){bookConfig.ZoomToolbarVisible&&!this.controlBar&&(this.controlBar=bookType!=BookType.catalog_book?new ZoomControlBar(this.parent):new CatalogZoomControlBar(this.parent));if(this.controlBar){var b="lite"==bookConfig.ToolbarViewMode&&bookType==BookType.catalog_book?50:0;this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,templateArea.getTopHeight()+b+5);this.controlBar.setVisible(bookConfig.ZoomToolbarVisible)}this.bookAttachments&& this.bookAttachments.Items.find("ZoomMap").each(function(c){c.show();c.fillContent(this.currentPageIndex)});bookConfig.AnnotationButtonVisible&&global.annotationCookie&&global.annotationCookie.saveCookie()}window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!1);this.status_zoom=!0;this.hidePages();global.canMagnifierZoom&&this.unMagnifierZoom();StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(c){c.setAsZoomout();c.executeCallback()});this.bookAttachments&&this.bookAttachments.Items.find("StaticAd").each(function(c){c.setStyle({"z-index":1})}); this.bookAttachments&&this.bookAttachments.Items.find("BookmarkTab").each(function(c){c.hide()})},beforeZoomOut:function(){bookConfig.AnnotationButtonVisible&&global.annotationCookie&&global.annotationCookie.saveCookie()},afterZoomOut:function(){this.resetZoomConfig();if(isPhone()||isPad())this.showPages(),gotoPageFun(this.toPageIndex,!1,"change book type");isPhone()||isPad()||(this.bookAttachments.noteAdd&&(this.bookAttachments.noteAdd.show(),this.bookAttachments.noteAdd.onResize()),this.switchNormalImage())}, resetZoomConfig:function(){this.flipping||1!=this.currentPageIndex||bookConfig.isTheBookOpen||this.bookAttachments&&this.bookAttachments.Items.find("StaticAd").each(function(b){b.setStyle({"z-index":3})}.bind(this));this.status_zoom=!1;this.controlBar&&this.controlBar.setVisible(!1);this.bookAttachments&&this.bookAttachments.Items.find("ZoomMap").each(function(b){b.hide()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!0);StateSynchronous.instance().findButtons("ZoomButton", !0).each(function(b){b.setAsZoomin();b.executeCallback()});this.thicknessManager&&this.thicknessManager.showCanvas();this.bookAttachments&&this.bookAttachments.Items.find("BookmarkTab").each(function(b){b.show()});this.showPage&&this.showPage.parameters&&(this.showPage.parameters.zoomFlag=!1,this.showPage.parameters.scale=1,this.showPage.parameters.toScale=1)},beforePan:function(){this.bookAttachments&&this.bookAttachments.Items.find("ZoomMap").each(function(b){b.refreshArea()})},afterPan:function(){}, curling:function(b,c){this.selected||this.status_zoom||this.status_resize||(this.optionPage=this.curlingPage(b,c))&&(this.flipIntervalManager.flipInterval||this.flipIntervalManager.setFlipInterval())},curlingPage:function(b,c){if(!c&&b.x<this.MiddleX||c&&0<=c.indexOf("l")){if(this.flipping&&"left"==this.flipToDirection)return;var d=this.realIndex(!1)[0];var e=this.realIndex(!1)[1];var f=d+"-"+e;var g=!1}if(!c&&b.x>this.MiddleX||c&&0<=c.indexOf("r")){if(this.flipping&&"right"==this.flipToDirection)return; d=this.realIndex(!0)[0];e=this.realIndex(!0)[1];f=d+"-"+e;g=!0}if(f&&d&&e){var h=originTotalPageCount;bookConfig.SingleModeBanFlipToLastPage&&this.bookType==BookType.single_book&&(h=Math.max(1,bookConfig.totalPageCount-1));if(!(0>=d||d>h||0>=e||e>h||this.flipPageManager[f]&&this.flipPageManager[f].fallback||this.flipPageManager[f]&&this.flipPageManager[f].flipping||BookEvent.trigger("beforeFlipPage",[e])))if(h=e,BookInfo.isDoublePage()&&(h=BookInfo.getMinPageIndex(h)),passwardType()&&bookConfig.excludeFrontPages&& h>=parseInt(bookConfig.excludeFrontPages)&&!verifyPassward())global.passwardPannel||(global.passwardPannel=new PasswardPannel),global.passwardPannel.show();else return this.defineFlipPage(f,b,c,d,e,g),f}},defineFlipPage:function(b,c,d,e,f,g){if(c){var h=originTotalPageCount;bookConfig.SingleModeBanFlipToLastPage&&this.bookType==BookType.single_book&&(h=Math.max(1,bookConfig.totalPageCount-1));0>=e||e>h||0>=f||f>h||(this.flipPageManager[b]?d=this.getFromStartPointByCoordinate(c,d,this.flipPageManager[b]): (this.beforeFlipTo(f),d=this.getFromStartPointByCoordinate(c,d,this.flipPageManager[b]),this.flipIntervalManager.flipToPoint(this.flipPageManager[b],e,f,d[0],d[1],!0)),g?(this.flipPageManager[b].AliceToLeft=!0,this.flipPageManager[b].AliceToRight=!1):(this.flipPageManager[b].AliceToLeft=!1,this.flipPageManager[b].AliceToRight=!0),this.flipPageManager[b].loosen=!1,this.flipPageManager[b].fromPoint=d[0],this.flipPageManager[b].startPoint=d[1],this.flipPageManager[b].toPoint=c,0>this.flipPageManager.pinDownCurlingArray.indexOf(b)&& this.flipPageManager.pinDownCurlingArray.push(b),this.flipPageManager.fallbackArray.removeElement(b),this.flipPageManager.flipArray.removeElement(b))}},unCurling:function(){if(!(this.selected||this.status_zoom||this.status_resize)&&this.flipPageManager.array)for(var b=this.flipPageManager.array.length,c=0;c<b;c++){var d=this.flipPageManager.array[c];if(d!=this.optionPage&&this.flipPageManager[d]&&!this.flipPageManager[d].fallback&&!this.flipPageManager[d].flipping&&(this.flipPageManager[d].AliceToRight|| this.flipPageManager[d].AliceToLeft)){this.flipPageManager[d].AliceToRight=!1;this.flipPageManager[d].AliceToLeft=!1;this.flipPageManager[d].fallback=!0;var e=this.getRealToPoint(this.flipPageManager[d],this.flipPageManager[d].fromPoint,this.flipPageManager[d].startPoint);this.flipPageManager[d].toPoint=e.toPoint;this.flipPageManager[d].fromPoint=e.fromPoint;this.flipPageManager[d].coordinate=e.coordinate;0>this.flipPageManager.fallbackArray.indexOf(d)&&this.flipPageManager.fallbackArray.push(d); this.flipPageManager.pinDownCurlingArray.removeElement(d);this.flipPageManager.flipArray.removeElement(d)}}},getFromStartPointByCoordinate:function(b,c,d){if(b){var e={x:0,y:0},f={x:0,y:0};if(bookConfig.FlipDirection){var g=d.getPageWidthHeight().height;d=d.getPageWidthHeight().width}else g=d.getPageWidthHeight().width,d=d.getPageWidthHeight().height;var h=b.y>d/2?b.y-5:b.y+5;0>b.x&&(e={x:-g,y:h});0<b.x&&(e={x:g,y:h});c&&0<=c.indexOf("r")&&(e.x=g);c&&0<=c.indexOf("l")&&(e.x=-g);"tl"==c&&(e={x:-g, y:0});"bl"==c&&(e={x:-g,y:d});"tr"==c&&(e={x:g,y:0});"br"==c&&(e={x:g,y:d});f.x=e.x;f.y=e.y;return[e,f]}},getRealToPoint:function(b,c,d){if(bookConfig.FlipDirection){b.getPageWidthHeight();var e=b.getPageWidthHeight().width}else b.getPageWidthHeight(),e=b.getPageWidthHeight().height;if(0==c.y||c.y==e)return{fromPoint:c,toPoint:d,coordinate:b.coordinate};var f={},g={},h=b.coordinate;b.coordinate.y<=c.y?(f.y=e,f.x=c.x,g.y=e):(f.y=0,f.x=c.x,g.y=0);g.x=d.x;b=(h.y-c.y)/(h.x-c.x);h.x=[(b*b-1)*f.x+b*(-2* f.y+c.y+h.y)+(c.x+h.x)]/(b*b+1);h.y=f.y+b*(h.x-f.x);return{fromPoint:f,toPoint:g,coordinate:h}},realIndex:function(b){var c=BookInfo.getMinPageIndex(this.currentPageIndex);if(b&&!rightToLeft||!b&&rightToLeft)return[c+1,c+2];if(!b&&!rightToLeft||b&&rightToLeft)return[c,c-1]},getNextPage:function(b){"right"==this.flipToDirection&&!rightToLeft||"left"==this.flipToDirection&&rightToLeft?previousPageFun(b):nextPageFun(b)},realBookPosition:function(){if(bookConfig.upsideOnMobile())var b=this.flipBook.offset().top, c=this.flipBook.offset().left;else b=this.flipBook.offset().left,c=this.flipBook.offset().top;return[b,c]},realPoint:function(b){if((b=b.originalEvent&&b.originalEvent.changedTouches?b.originalEvent.changedTouches:b.changedTouches?b.changedTouches:[b])&&!(3<=b.length)){var c=this.realBookPosition()[0],d=this.realBookPosition()[1],e=b[0].pageX,f=b[0].pageY;bookConfig.upsideOnMobile()&&(e=b[0].pageY,f=windowHeight-b[0].pageX);if(bookConfig.FlipDirection){f=f-d-this.pageHeight;var g=this.getCurrentPageWidthHeight(f), h=g.pageWidth;e=this.pageWidth-(e-c)-(this.pageWidth-h)/2;if(!b[1])return[{x:f,y:e}];g=b[1].pageX;b=b[1].pageY;g=this.pageWidth-(g-c)-(this.pageWidth-h)/2;b=b-d-this.pageHeight;return[{x:f,y:e},{x:b,y:g}]}e=e-c-this.pageWidth;g=this.getCurrentPageWidthHeight(e);h=g.pageHeight;f=f-d-(this.pageHeight-h)/2;if(!b[1])return[{x:e,y:f}];g=b[1].pageX;b=b[1].pageY;g=g-c-this.pageWidth;b=b-d-(this.pageHeight-h)/2;return[{x:e,y:f},{x:g,y:b}]}},mouseWheelFlip:function(){var b;this.flipBook.bind(_event._mousewheel, function(c){if(void 0!=b&&150>(new Date).getTime()-b)var d=!1;else b=(new Date).getTime(),d=!0;if(!d)return!1;d=c.originalEvent;d=Math.max(-1,Math.min(1,d.wheelDelta||-d.detail));c=c.originalEvent?c.originalEvent:c;this.status_zoom&&(c={pointers:[{pageX:c.pageX,pageY:c.pageY},{pageX:c.pageX,pageY:c.pageY}]},0>d?this.controlBar&&this.controlBar.zoomDown(c):this.controlBar&&this.controlBar.zoomUp(c));this.status_zoom||!bookConfig.mouseWheelFlip||this.flipping||(0>d?nextPageFun("mouse wheel flip"):previousPageFun("mouse wheel flip")); if(bookConfig.mouseWheelFlip)return stopEvent(c),!1}.bind(this))},mouseZoomEvent:function(){$(this.flipBook).bind(_event._move,function(b){var c=BookInfo.getBook();if(c.status_zoom&&!this.flipBook.parameters.zoomming&&c.controlBar&&c.controlBar.moveByMousePosition){c=this.flipBook;var d=c.width(),e=c.height(),f=b.pageX;b=b.pageY;d=f-f*d/windowWidth;e=b-b*e/windowHeight;b={};b.origin=c.parameters.origin;b.scale=c.parameters.scale;d-=c.parameters.left;e-=c.parameters.top;b.tran={x:d,y:e};e=transformCSS(b); c.css(e);this.bookAttachments&&this.bookAttachments.zoomMap&&this.bookAttachments.zoomMap.refreshArea()}}.bind(this))}}); var DoubleFlipBook=Class({newFlipPage:function(){return new DoubleFlipPage(this)},resetPages:function(b){isNaN(b)||0>=b||(b=this.getMinPageIndex(b),this.unWrapPageExcludeArray([b,b+1,b+2,b+3,b-1,b-2]),this.addPageArray([b,b+1,b+2,b+3,b-1,b-2]),this.currentPage=this.pageArray[b],this.currentPage2=this.pageArray[b+1],this.nextPage=this.pageArray[b+2],this.nextPage2=this.pageArray[b+3],this.previousPage=this.pageArray[b-1],this.previousPage2=this.pageArray[b-2],this.setPageCss(),this.loading())},setPageCss:function(){var b= transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b));this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2),this.previousPage2.setCSSByStyle(b));this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage), this.nextPage.setCSSByStyle(b));this.nextPage2&&(this.setZIndexByPageIndex(this.nextPage2),this.nextPage2.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setLeftOrRight(!1),this.previousPage&&this.previousPage.setLeftOrRight(!1),this.previousPage2&&this.previousPage2.setLeftOrRight(!1),this.currentPage2&&this.currentPage2.setLeftOrRight(!0),this.nextPage&&this.nextPage.setLeftOrRight(!0),this.nextPage2&&this.nextPage2.setLeftOrRight(!0)):(this.currentPage&&this.currentPage.setLeftOrRight(!0), this.previousPage&&this.previousPage.setLeftOrRight(!0),this.previousPage2&&this.previousPage2.setLeftOrRight(!0),this.currentPage2&&this.currentPage2.setLeftOrRight(!1),this.nextPage&&this.nextPage.setLeftOrRight(!1),this.nextPage2&&this.nextPage2.setLeftOrRight(!1))},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"), this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},getDownUpPage:function(b,c){this.addPageArray([b,c]);this.pageArray[b]&&this.pageArray[b].beginToFlip();this.pageArray[c]&&this.pageArray[c].beginToFlip();this.pageArray[b]&&(this.pageArray[b].page.setCSSByName("right-flip-side"),this.setZIndexByPageIndex(this.pageArray[b]));this.pageArray[c]&&(this.pageArray[c].page.setCSSByName("flip-side"),this.pageArray[c].page.side.addClass("boxShadow"), this.setZIndexByPageIndex(this.pageArray[c]));return[this.pageArray[b],this.pageArray[c]]},flipToMax:function(b,c,d,e){e=this.flipPageManager.initFlipPageByIndex(b,c,e);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c+1]&&(this.pageArray[c+1].setLeftOrRight(rightToLeft),e.nextPage=this.pageArray[c+1]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c);return e},addPagesBeforeFlipToMax:function(b,c){this.addPageArray([b+1]);c&&this.supportSerialsFlip()&&this.addPageArray([b+ 2,b+3])},setPagesStyleBeforeFlipToMax:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b+1]&&this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2],b),this.pageArray[b+2].setLeftOrRight(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3],b),this.pageArray[b+3].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMax:function(b,c){for(var d=c+4;d<=originTotalPageCount;d++)this.pageArray[d]&& (this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b+1;d<c;d++)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0)},afterFlipToMax:function(b,c){b=this.getMinPageIndex(b);this.addPagesAfterFlipToMax(b);this.setPagesStyleAfterFlipToMax(b);this.deleteUnnecessaryPagesAfterFlipToMax(b)},addPagesAfterFlipToMax:function(b){this.flipping||this.addPageArray([b+3,b,b-1,b-2]);this.supportSerialsFlip()||this.addPageArray([b+2,b+3]);this.pageArray[b+1]&&this.fillContent(b+1);this.pageArray[b+ 2]&&this.fillContent(b+2);this.pageArray[b+3]&&this.fillContent(b+3)},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setLeftOrRight(!rightToLeft));this.pageArray[b-1]&&(this.setZIndexByPageIndex(this.pageArray[b-1],b),this.pageArray[b-1].setLeftOrRight(!rightToLeft));this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2],b),this.pageArray[b-2].setLeftOrRight(!rightToLeft));this.supportSerialsFlip()&&this.flipping|| (this.pageArray[b+1]&&this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2]),this.pageArray[b+2].setLeftOrRight(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3]),this.pageArray[b+3].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMax:function(b){for(b-=3;0<=b;b--)this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},flipToMin:function(b,c,d,e){e=this.flipPageManager.initFlipPageByIndex(b, c,e);this.addPagesBeforeFlipToMin(c,d);this.pageArray[c-1]&&(this.pageArray[c-1].setLeftOrRight(!rightToLeft),e.nextPage=this.pageArray[c-1]);this.setPagesStyleBeforeFlipToMin(c,d);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return e},addPagesBeforeFlipToMin:function(b,c){this.addPageArray([b-1]);c&&this.supportSerialsFlip()&&this.addPageArray([b-2,b-3])},setPagesStyleBeforeFlipToMin:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1], b),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2],b),this.pageArray[b-2].setLeftOrRight(!rightToLeft)),this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-3],b),this.pageArray[b-3].setLeftOrRight(!rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMin:function(b,c){for(var d=c-4;0<=d;d--)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b-1;d>c;d--)this.pageArray[d]&&(this.pageArray[d].remove(),this.pageArray[d]=void 0)},afterFlipToMin:function(b, c){b=this.getMaxPageIndex(b);this.addPagesAfterFlipToMin(b);this.setPagesStyleAfterFlipToMin(b);this.deleteUnnecessaryPagesAfterFlipToMin(b)},addPagesAfterFlipToMin:function(b){this.flipping||this.addPageArray([b-3,b,b+1,b+2]);this.supportSerialsFlip()||this.addPageArray([b-2,b-3]);this.pageArray[b-1]&&this.fillContent(b-1);this.pageArray[b-2]&&this.fillContent(b-2);this.pageArray[b-3]&&this.fillContent(b-3)},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b], b),this.pageArray[b].setLeftOrRight(rightToLeft));this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setLeftOrRight(rightToLeft));this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2],b),this.pageArray[b+2].setLeftOrRight(rightToLeft));this.supportSerialsFlip()&&this.flipping||(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1]),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2]),this.pageArray[b-2].setLeftOrRight(!rightToLeft)), this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-3]),this.pageArray[b-3].setLeftOrRight(!rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMin:function(b){for(b+=3;b<=originTotalPageCount;b++)this.pageArray[b]&&(this.pageArray[b].remove(),this.pageArray[b]=void 0)},getFlipTo:function(b){var c=this.getMinPageIndex(this.currentPageIndex);b=this.getMinPageIndex(b);var d=c+1,e="";b>d&&(e="max");b+1<c&&(e="min",b+=1);return{flipTo:e,minIndex:c,maxIndex:d,toIndex:b}},getCurrentPages:function(){return BookInfo.getPagesByIndex(this.currentPageIndex)}, getPagesByIndex:function(b){return BookInfo.getPagesByIndex(b)},movetoCenter:function(b,c,d){if(!this.status_zoom&&bookConfig.retainBookCenter&&!(1<BookInfo.getPagesByIndex(b).length&&1<BookInfo.getPagesByIndex(c).length)){var e=this.pageWidth,f=-e/2,g=e/2,h=0,k=0;BookInfo.isLeftPage(b,!0)||1!=BookInfo.getPagesByIndex(b).length||(h=f);BookInfo.isLeftPage(b,!0)&&1==BookInfo.getPagesByIndex(b).length&&(h=g);BookInfo.isLeftPage(c,!0)||1!=BookInfo.getPagesByIndex(c).length||(k=f);BookInfo.isLeftPage(c, !0)&&1==BookInfo.getPagesByIndex(c).length&&(k=g);this.fromTrans=0>this.movedX*k&&this.toTrans!=k?this.movedX:h;this.toTrans=k;b=2*e;void 0==d&&(d=b);isNaN(d)||(this.movedLength=d,this.movedX=$.easing.easeInOutSine(null,d,this.fromTrans,this.toTrans-this.fromTrans,b),d={tran:{x:parseInt(this.movedX),y:0}},this.setCSS(d))}},edgeX:function(){this.MiddleX=0},getFromStartPointByIndex:function(b,c){var d=this.getMinPageIndex(this.currentPageIndex),e=d+1;if(b!=e&&b!=d){var f={x:0,y:0},g={x:0,y:0},h=c.getPageWidthHeight().width; c=c.getPageWidthHeight().height;var k=!1;if(b>e&&!rightToLeft||b<d&&rightToLeft)f={x:h,y:c},g.x=f.x-2,g.y=f.y-2,k=!0;if(b<d&&!rightToLeft||b>e&&rightToLeft)f={x:-h,y:c},g.x=f.x+2,g.y=f.y-2,k=!1;this.flipToDirection=k?"left":"right";return[f,g]}},afterZoomIn:function(b){if(!isPhone()&&!isPad()||bookConfig.usePdfJs){if(isPhone()||isPad()||this.showPages(),b&&this.flipBook.parameters&&!this.flipBook.parameters.resize){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top, d=this.flipBook.parameters.left,e=c-this.flipBook.parameters.top;f=this.flipBook.parameters.scale;d={tran:{x:parseInt(b-d),y:parseInt(e)},scale:1,origin:{x:0,y:0}};1!=f&&this.resizeBook(Math.round(this.width*f/2),Math.round(this.height*f));this.status_zoom||(f=0,1==this.currentPageIndex&&bookConfig.retainBookCenter&&!bookConfig.isTheBookOpen&&(f=rightToLeft?this.width/4:-this.width/4),this.currentPageIndex==totalPageCount&&bookConfig.retainBookCenter&&(f=rightToLeft?-this.width/4:this.width/4),d.tran= {x:parseInt(f),y:0},d.left=b-f,d.top=c-0);this.setCSS(d);this.flipBook.parameters.tran=d.tran;this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=1;this.flipBook.parameters.width=$(this.flipBook).width();this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;isPhone()||isPad()||this.switchLargeImage()}}else if(c=BookInfo.getCurrentPages(),void 0!=c&&null!=c)for(d=0;d<c.length;d++)if(e=c[d],this.pageArray[e]){var f= this.flipBook.parameters.scale;this.pageArray[e].resizeSvg(Math.round(this.pageWidth*f),Math.round(this.pageHeight*f));bookConfig.highDefinitionConversion?this.pageArray[e].zoomInSideImage():(1<b.scale&&this.pageArray[e].zoomInSideImage(),1==b.scale&&this.pageArray[e].zoomOutSideImage())}},setZIndexByPageIndex:function(b,c){b&&(c=c?c:this.currentPageIndex,c=this.getMinPageIndex(c),b==this.pageArray[c+1]?b.setZIndex(2):b==this.pageArray[c+2]?b.setZIndex(1):b==this.pageArray[c+3]?b.setZIndex(0):b== this.pageArray[c]?b.setZIndex(2):b==this.pageArray[c-1]?b.setZIndex(1):b==this.pageArray[c-2]&&b.setZIndex(0))},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),c=windowWidth-b.left-b.right;b=windowHeight-b.top-b.bottom;var d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,e=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return fitPageWidthHeight(c,b,2*d,e)}, getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),d+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}},getMinPageIndex:function(b){return b= bookConfig.isTheBookOpen?2*Math.ceil(b/2)-1:2*Math.floor(b/2)},getMaxPageIndex:function(b){return b=bookConfig.isTheBookOpen?2*Math.ceil(b/2):2*Math.floor(b/2)+1}}).extend(FlipBook),DoubleCalendar=Class({bookType:BookType.normal_book,doublePage:!0,create:function(b){this._super(b);this.resetZoomArea()},initBook:function(){this._super();this.showPage=this.flipBook},newFlipPage:function(){return new DoubleCalendarPage(this)},newPage:function(b){return new NormalPage(b,"page",!1,this.bookType)},setPageCss:function(){var b= transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b));this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2),this.previousPage2.setCSSByStyle(b));this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage), this.nextPage.setCSSByStyle(b));this.nextPage2&&(this.setZIndexByPageIndex(this.nextPage2),this.nextPage2.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setUpOrDown(!1),this.previousPage&&this.previousPage.setUpOrDown(!1),this.previousPage2&&this.previousPage2.setUpOrDown(!1),this.currentPage2&&this.currentPage2.setUpOrDown(!0),this.nextPage&&this.nextPage.setUpOrDown(!0),this.nextPage2&&this.nextPage2.setUpOrDown(!0)):(this.currentPage&&this.currentPage.setUpOrDown(!0),this.previousPage&& this.previousPage.setUpOrDown(!0),this.previousPage2&&this.previousPage2.setUpOrDown(!0),this.currentPage2&&this.currentPage2.setUpOrDown(!1),this.nextPage&&this.nextPage.setUpOrDown(!1),this.nextPage2&&this.nextPage2.setUpOrDown(!1))},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")):(this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"), this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b],this.pageArray[c]]},flipToMax:function(b,c,d,e){e=this.flipPageManager.initFlipPageByIndex(b,c,e);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c+1]&&(this.pageArray[c+1].setUpOrDown(rightToLeft),e.nextPage=this.pageArray[c+1]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c);return e},setPagesStyleBeforeFlipToMax:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b+ 1]&&this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2],b),this.pageArray[b+2].setUpOrDown(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3],b),this.pageArray[b+3].setUpOrDown(rightToLeft)))},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setUpOrDown(!rightToLeft));this.pageArray[b-1]&&(this.setZIndexByPageIndex(this.pageArray[b- 1],b),this.pageArray[b-1].setUpOrDown(!rightToLeft));this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2],b),this.pageArray[b-2].setUpOrDown(!rightToLeft));this.supportSerialsFlip()&&this.flipping||(this.pageArray[b+1]&&this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+2]),this.pageArray[b+2].setUpOrDown(rightToLeft)),this.pageArray[b+3]&&(this.setZIndexByPageIndex(this.pageArray[b+3]),this.pageArray[b+3].setUpOrDown(rightToLeft)))}, flipToMin:function(b,c,d,e){e=this.flipPageManager.initFlipPageByIndex(b,c,e);this.addPagesBeforeFlipToMin(c,d);this.pageArray[c-1]&&(this.pageArray[c-1].setUpOrDown(!rightToLeft),e.nextPage=this.pageArray[c-1]);this.setPagesStyleBeforeFlipToMin(c,d);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return e},setPagesStyleBeforeFlipToMin:function(b,c){c&&this.supportSerialsFlip()&&(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1],b),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b- 2],b),this.pageArray[b-2].setUpOrDown(!rightToLeft)),this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-3],b),this.pageArray[b-3].setUpOrDown(!rightToLeft)))},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setUpOrDown(rightToLeft));this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setUpOrDown(rightToLeft));this.pageArray[b+2]&&(this.setZIndexByPageIndex(this.pageArray[b+ 2],b),this.pageArray[b+2].setUpOrDown(rightToLeft));this.supportSerialsFlip()&&this.flipping||(this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1]),this.pageArray[b-2]&&(this.setZIndexByPageIndex(this.pageArray[b-2]),this.pageArray[b-2].setUpOrDown(!rightToLeft)),this.pageArray[b-3]&&(this.setZIndexByPageIndex(this.pageArray[b-3]),this.pageArray[b-3].setUpOrDown(!rightToLeft)))},movetoCenter:function(b,c,d){if(!this.status_zoom&&bookConfig.retainBookCenter&&!(1<BookInfo.getPagesByIndex(b).length&& 1<BookInfo.getPagesByIndex(c).length)){var e=this.pageHeight,f=-e/2;e/=2;var g=0,h=0;BookInfo.isLeftPage(b,!0)||1!=BookInfo.getPagesByIndex(b).length||(g=f);BookInfo.isLeftPage(b,!0)&&1==BookInfo.getPagesByIndex(b).length&&(g=e);BookInfo.isLeftPage(c,!0)||1!=BookInfo.getPagesByIndex(c).length||(h=f);BookInfo.isLeftPage(c,!0)&&1==BookInfo.getPagesByIndex(c).length&&(h=e);this.fromTrans=0>this.movedY*h&&this.toTrans!=h?this.movedY:g;this.toTrans=h;b=2*this.pageHeight;void 0==d&&(d=b);isNaN(d)||(this.movedLength= d,this.movedY=$.easing.easeInOutSine(null,d,this.fromTrans,this.toTrans-this.fromTrans,b),this.setCSS({tran:{x:0,y:this.movedY}}))}},edgeX:function(){this.MiddleX=0},getFromStartPointByIndex:function(b,c){var d=this.getMinPageIndex(this.currentPageIndex),e=d+1;if(b!=e&&b!=d){var f={x:0,y:0},g={x:0,y:0},h=c.getPageWidthHeight().height;c.getPageWidthHeight();c=!1;if(b>e&&!rightToLeft||b<d&&rightToLeft)f={x:h,y:0},g.x=f.x-2,g.y=f.y+2,c=!0;if(b<d&&!rightToLeft||b>e&&rightToLeft)f={x:-h,y:0},g.x=f.x+2, g.y=f.y+2,c=!1;this.flipToDirection=c?"left":"right";return[f,g]}},afterZoomIn:function(b){if(!isPhone()&&!isPad()||bookConfig.usePdfJs){if(isPhone()||isPad()||this.showPages(),b&&this.flipBook.parameters&&!this.flipBook.parameters.resize){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top,d=this.flipBook.parameters.left,e=this.flipBook.parameters.top;f=this.flipBook.parameters.scale;d={tran:{x:b-d,y:c-e},scale:1,origin:{x:0,y:0}};1!=f&&this.resizeBook(Math.round(this.width* f),Math.round(this.height*f/2));this.status_zoom||(f=0,1==this.currentPageIndex&&bookConfig.retainBookCenter&&!bookConfig.isTheBookOpen&&(f=rightToLeft?this.height/4:-this.height/4),this.currentPageIndex==totalPageCount&&bookConfig.retainBookCenter&&(f=rightToLeft?-this.height/4:this.height/4),d.tran={x:0,y:f},d.left=b-0,d.top=c-f);this.setCSS(d);this.flipBook.parameters.tran=d.tran;this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=1;this.flipBook.parameters.width=$(this.flipBook).width(); this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;isPhone()||isPad()||this.switchLargeImage()}}else if(c=BookInfo.getCurrentPages(),void 0!=c&&null!=c)for(d=0;d<c.length;d++)if(e=c[d],this.pageArray[e]){var f=this.flipBook.parameters.scale;this.pageArray[e].resizeSvg(Math.round(this.pageWidth*f),Math.round(this.pageHeight*f));bookConfig.highDefinitionConversion?this.pageArray[e].zoomInSideImage():(1<b.scale&&this.pageArray[e].zoomInSideImage(), 1==b.scale&&this.pageArray[e].zoomOutSideImage())}},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),c=windowWidth-b.left-b.right;b=windowHeight-b.top-b.bottom;var d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,e=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return fitPageWidthHeight(c,b,d,2*e)},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(), d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),d+=bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}},resizeBook:function(b,c){this.endFlip();this.width=b;this.height=2*c;this.pageWidth=b;this.pageHeight=c;this.maskWidth= parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.setCSS({width:this.width,height:this.height});this.resizePage(this.pageWidth,this.pageHeight);this.resetBookShadow(this.currentPageIndex)},resetBookShadow:function(){},setAttachmentBeforeFlipTo:function(){},setAttachmentAfterFlipTo:function(){},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex); this.resetZoomArea()},resetZoomArea:function(){this.flipBook&&this.flipBook.parameters&&this.flipBook.parameters.zoomArea&&(1!=this.getCurrentPages().length||BookInfo.isLeftPage(this.currentPageIndex,!0)?1==this.getCurrentPages().length&&BookInfo.isLeftPage(this.currentPageIndex,!0)?this.flipBook.parameters.zoomArea={left:0,top:0,right:0,bottom:50}:this.flipBook.parameters.zoomArea={left:0,top:0,right:0,bottom:0}:this.flipBook.parameters.zoomArea={left:0,top:50,right:0,bottom:0})},getDownUpPage:function(b, c){this.addPageArray([b,c]);this.pageArray[b]&&this.pageArray[b].beginToFlip();this.pageArray[c]&&this.pageArray[c].beginToFlip();this.pageArray[b]&&(this.pageArray[b].page.setCSSByName("down-flip-side"),this.setZIndexByPageIndex(this.pageArray[b]));this.pageArray[c]&&(this.pageArray[c].page.setCSSByName("flip-vertical-side"),this.pageArray[c].page.side.addClass("boxShadow"),this.setZIndexByPageIndex(this.pageArray[c]));return[this.pageArray[b],this.pageArray[c]]},adjustBookPosition:function(){if(!this.status_zoom&& !this.flipping&&this.width&&this.height){this.pageWidthHeight=this.getFitWH();var b=this.getTranX(),c=this.pageWidthHeight.y/this.height,d=this.getTranY(c);this.flipBook.animateToTransform.bind(this.flipBook)(c,{x:b,y:d},{x:0,y:50})}},getTranX:function(){var b=this.getCssLeft(),c=this.getSpace(!0);return c.left+(windowWidth-c.left-c.right-this.pageWidthHeight.x)/2-b},getTranY:function(b){if(!bookConfig.retainBookCenter)return 0;var c=0;b=this.height*b/4;1!=this.currentPageIndex||bookConfig.isTheBookOpen|| (c=rightToLeft?b:-b);this.currentPageIndex==totalPageCount&&(c=rightToLeft?-b:b);b=this.getCssTop();var d=this.getSpace(!0);return d.top+(windowHeight-d.top-d.bottom-this.height)/2-b+c}}).extend(DoubleFlipBook),SingleFlipBook=Class({pageBackArray:null,create:function(b){this.pageBackArray=[];this._super(b)},newFlipPage:function(){return new SingleFlipPage(this)},resetPages:function(b){isNaN(b)||0>=b||(this.unWrapPageBackExcludeArray([b,b+1]),this.unWrapPageExcludeArray([b,b+1]),this.addPageArray([b, b+1]),this.addPageBackArray([b]),this.currentPage=this.pageArray[b],this.currentPage2=this.pageBackArray[b],this.nextPage=this.pageArray[b+1],this.previousPage=this.pageArray[b-1],this.previousPage2=this.pageBackArray[b-1],this.setPageCss(),this.loading())},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b)); this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2),this.previousPage2.setCSSByStyle(b));this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage),this.nextPage.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setLeftOrRight(!0),this.previousPage&&this.previousPage.setLeftOrRight(!0),this.previousPage2&&this.previousPage2.setLeftOrRight(!0),this.currentPage2&&this.currentPage2.setLeftOrRight(!0), this.nextPage&&this.nextPage.setLeftOrRight(!0)):(this.currentPage&&this.currentPage.setLeftOrRight(!1),this.previousPage&&this.previousPage.setLeftOrRight(!1),this.previousPage2&&this.previousPage2.setLeftOrRight(!1),this.currentPage2&&this.currentPage2.setLeftOrRight(!1),this.nextPage&&this.nextPage.setLeftOrRight(!1))},addPageBackArray:function(b){if(b&&this.pageBackArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(!this.pageBackArray[b[c]]||this.flipping&&!imageLoaded[b[c]]|| this.fillContent(b[c],!0),this.pageBackArray[b[c]]))){var d=this.newPageBack(b[c]),e=this.pageInfoArray[b[c]];d.mirrorSide();d.onResize(this.pageWidth*e.pageWidth,this.pageHeight*e.pageHeight,e.opacity);this.pageBackArray[b[c]]=d;this.flipping&&!imageLoaded[b[c]]||this.fillContent(b[c],!0);this.flipBook.append(d.$page)}},getDownUpPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);this.pageArray[d]&&this.pageArray[d].beginToFlip();this.pageBackArray[d]&&this.pageBackArray[d].beginToFlip(); this.pageArray[d]&&this.pageArray[d].page.setCSSByName("right-flip-side");this.pageBackArray[d]&&(this.pageBackArray[d].page.setCSSByName("flip-side"),this.pageBackArray[d].page.side.addClass("boxShadow"));return[this.pageArray[d],this.pageBackArray[d]]},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);rightToLeft?(this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")): (this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]},flipToMax:function(b,c,d){var e=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c]&&(this.pageArray[c].setLeftOrRight(rightToLeft),e.nextPage=this.pageArray[c]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c); return e},hidePagesBeforeFlip:function(b){if(!this.supportSerialsFlip()){var c=this.pageArray.length;this.flipPageArray=[];var d=b.currentIndex;b=b.nextIndex;for(var e=[d,b],f=0;f<c;f++)0>e.indexOf(f)&&(this.pageArray[f]&&this.pageArray[f].visible&&(this.flipPageArray.push(this.pageArray[f]),this.pageArray[f].setVisible(!1)),this.pageBackArray[f]&&this.pageBackArray[f].visible&&(this.flipPageArray.push(this.pageBackArray[f]),this.pageBackArray[f].setVisible(!1)));c=Math.max(d,b);this.pageBackArray[c]&& this.pageBackArray[c].visible&&(this.flipPageArray.push(this.pageBackArray[c]),this.pageBackArray[c].setVisible(!1))}},showPagesAfterFlip:function(){if(!this.supportSerialsFlip()&&this.flipPageArray){for(var b=this.flipPageArray.length,c=0;c<b;c++){var d=this.flipPageArray[c];d&&d.setVisible(!0)}this.flipPageArray=[]}},addPagesBeforeFlipToMax:function(b,c){this.addPageArray([b]);c&&this.supportSerialsFlip()&&(this.addPageBackArray([b]),this.addPageArray([b+1]))},setPagesStyleBeforeFlipToMax:function(b, c){c&&(this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setLeftOrRight(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b],b),this.pageBackArray[b].setLeftOrRight(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMax:function(b,c){for(var d=c+1;d<=originTotalPageCount;d++)this.pageBackArray[d]&&(this.pageBackArray[d]&& this.pageBackArray[d].remove(),this.pageBackArray[d]=void 0);for(d=c+2;d<=originTotalPageCount;d++)this.pageArray[d]&&(this.pageArray[d]&&this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b+1;d<c;d++)if(this.pageArray[d]||this.pageBackArray[d])this.pageArray[d]&&this.pageArray[d].remove(),this.pageBackArray[d]&&this.pageBackArray[d].remove(),this.pageArray[d]=void 0,this.pageBackArray[d]=void 0},afterFlipToMax:function(b){this.addPagesAfterFlipToMax(b);this.setPagesStyleAfterFlipToMax(b); this.deleteUnnecessaryPagesAfterFlipToMax(b)},addPagesAfterFlipToMax:function(b){this.supportSerialsFlip()||(this.addPageArray([b]),this.addPageBackArray([b]),this.addPageArray([b+1]));this.pageArray[b]&&this.fillContent(b);this.pageArray[b+1]&&this.fillContent(b+1)},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1],b);this.pageBackArray[b-1]&&this.setZIndexByPageIndex(this.pageBackArray[b-1],b);this.supportSerialsFlip()||(this.pageArray[b]&& (this.setZIndexByPageIndex(this.pageArray[b]),this.pageArray[b].setLeftOrRight(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b]),this.pageBackArray[b].setLeftOrRight(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMax:function(b){for(b-=2;0<=b;b--)if(this.pageArray[b]||this.pageBackArray[b])this.pageArray[b]&&this.pageArray[b].remove(),this.pageBackArray[b]&& this.pageBackArray[b].remove(),this.pageArray[b]=void 0,this.pageBackArray[b]=void 0},flipToMin:function(b,c,d){var e=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMin(c,d);this.pageArray[b]&&(e.nextPage=this.pageArray[b]);this.setPagesStyleBeforeFlipToMin(c);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return e},addPagesBeforeFlipToMin:function(b,c){},setPagesStyleBeforeFlipToMin:function(b){},deleteUnnecessaryPagesBeforeFlipToMin:function(b,c){for(--b;b>c;b--)if(this.pageArray[b]|| this.pageBackArray[b])this.pageArray[b]&&this.pageArray[b].remove(),this.pageBackArray[b]&&this.pageBackArray[b].remove(),this.pageArray[b]=void 0,this.pageBackArray[b]=void 0},afterFlipToMin:function(b){this.addPagesAfterFlipToMin(b);this.setPagesStyleAfterFlipToMin(b);this.deleteUnnecessaryPagesAfterFlipToMin(b)},addPagesAfterFlipToMin:function(b){this.supportSerialsFlip()||(this.addPageArray([b]),this.addPageBackArray([b]),this.addPageArray([b-1]));this.pageArray[b]&&this.fillContent(b);this.pageArray[b- 1]&&this.fillContent(b-1)},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setLeftOrRight(rightToLeft));this.supportSerialsFlip()||(this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b]),this.pageArray[b].setLeftOrRight(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b]),this.pageBackArray[b].setLeftOrRight(rightToLeft)),this.pageArray[b-1]&&(this.setZIndexByPageIndex(this.pageArray[b- 1]),this.pageArray[b-1].setLeftOrRight(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMin:function(b){for(var c=b+2;c<=originTotalPageCount;c++)if(this.pageArray[c]||this.pageBackArray[c])this.pageArray[c]&&this.pageArray[c].remove(),this.pageBackArray[c]&&this.pageBackArray[c].remove(),this.pageArray[c]=void 0,this.pageBackArray[c]=void 0;this.pageBackArray[b+1]&&(this.pageBackArray[b+1]&&this.pageBackArray[b+1].remove(),this.pageBackArray[b+1]=void 0)},getCurrentPages:function(){return[this.currentPageIndex]}, getPagesByIndex:function(b){return[b]},movetoCenter:function(){},getFromStartPointByIndex:function(b,c){var d=this.currentPageIndex;if(b!=d&&b!=d){var e={x:0,y:0},f=c.getPageWidthHeight().width,g=c.getPageWidthHeight().height,h=!1;c={x:f,y:g};rightToLeft&&(c={x:-f,y:g});if(b>d&&!rightToLeft||b<d&&rightToLeft)h=!0;if(b<d&&!rightToLeft||b>d&&rightToLeft)h=!1;b>d&&(e={x:c.x*(f-2)/f,y:g-2});b<d&&(e={x:-c.x*(f-2)/f,y:g-2});this.flipToDirection=h?"left":"right";return[c,e]}},realBookPosition:function(){var b= this.flipBook.offset().left-(rightToLeft?0:this.pageWidth),c=this.flipBook.offset().top;return[b,c]},edgeX:function(){this.MiddleX=this.pageWidth/2;rightToLeft&&(this.MiddleX=-this.pageWidth/2)},realIndex:function(b){var c=this.currentPageIndex;if(b&&!rightToLeft||!b&&rightToLeft)return[c,c+1];if(!b&&!rightToLeft||b&&rightToLeft)return[c,c-1]},getFromStartPointByCoordinate:function(b,c,d){if(b){var e={x:0,y:0},f={x:0,y:0},g=d.getPageWidthHeight().width;d=d.getPageWidthHeight().height;var h=b.y>d/ 2?b.y-5:b.y+5;b.x<this.MiddleX&&(e.y=h,f.x=-g);b.x>this.MiddleX&&(e.y=h,f.x=g);c&&0<=c.indexOf("r")&&(f.x=g);c&&0<=c.indexOf("l")&&(f.x=-g);"tl"==c&&(e.y=0);"bl"==c&&(e.y=d);"tr"==c&&(e.y=0);"br"==c&&(e.y=d);e.x=rightToLeft?-g:g;f.y=e.y;return[e,f]}},getFlipTo:function(b){var c=this.currentPageIndex,d="";b>c&&(d="max");b<c&&(d="min");return{flipTo:d,minIndex:c,maxIndex:c,toIndex:b}},afterZoomIn:function(b){if(!isPhone()&&!isPad()||bookConfig.usePdfJs){if(isPhone()||isPad()||this.showPages(),b&&this.flipBook.parameters&& !this.flipBook.parameters.resize){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top;b-=this.flipBook.parameters.left;var d=c-this.flipBook.parameters.top;c=this.flipBook.parameters.scale;1!=c&&this.resizeBook(Math.round(this.width*c),Math.round(this.height*c));transformCSS({tran:{x:b,y:d},scale:1,origin:{x:0,y:0},obj:this.flipBook});this.flipBook.parameters.tran={x:b,y:d};this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=1;this.flipBook.parameters.width= $(this.flipBook).width();this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;isPhone()||isPad()||this.switchLargeImage()}}else if(d=BookInfo.getCurrentPages(),void 0!=d&&null!=d)for(var e=0;e<d.length;e++){var f=d[e];this.pageArray[f]&&this.pageArray[f]&&(c=this.flipBook.parameters.scale,this.pageArray[f].resizeSvg(Math.round(this.width*c),Math.round(this.height*c)),bookConfig.highDefinitionConversion?this.pageArray[f].zoomInSideImage(): (1<b.scale&&this.pageArray[f].zoomInSideImage(),1==b.scale&&this.pageArray[f].zoomOutSideImage()))}},setZIndexByPageIndex:function(b,c){b&&(c=c?c:this.currentPageIndex,b==this.pageArray[c]?b.setZIndex(2):b==this.pageBackArray[c]?b.setZIndex(1):b==this.pageArray[c+1]?b.setZIndex(0):b.setZIndex(-1))},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),c=windowWidth-b.left-b.right;b=windowHeight-b.top-b.bottom;var d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/ 100,e=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return fitPageWidthHeight(c,b,d,e)},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=rightToLeft?bookConfig.hardCoverBorderWidth+totalThicknessWidth(!1):0,d+=rightToLeft?0:bookConfig.hardCoverBorderWidth+ totalThicknessWidth(!1),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}},getTranX:function(b){if(!bookConfig.retainBookCenter)return 0;b=this.getCssLeft();var c=this.getSpace(!0);return c.left+(windowWidth-c.left-c.right-this.width)/2-b},getTranY:function(){var b=this.getCssTop(),c=this.getSpace(!0);return c.top+(windowHeight-c.top-c.bottom-this.pageWidthHeight.y)/2-b}}).extend(FlipBook),SingleFlipCalendar=Class({bookType:BookType.single_book, doublePage:!1,pageBackArray:null,create:function(b){this.pageBackArray=[];this._super(b)},newPage:function(b){return new NormalPage(b,"page",!0,this.bookType)},newPageBack:function(b){return new NormalPage(b,"pageBack",!0,BookType.single_book,!0)},newFlipPage:function(){return new SingleCalendarPage(this)},resetPages:function(b){isNaN(b)||0>=b||(this.unWrapPageBackExcludeArray([b,b+1]),this.unWrapPageExcludeArray([b,b+1]),this.addPageArray([b,b+1]),this.addPageBackArray([b]),this.currentPage=this.pageArray[b], this.currentPage2=this.pageBackArray[b],this.nextPage=this.pageArray[b+1],this.previousPage=this.pageArray[b-1],this.previousPage2=this.pageBackArray[b-1],this.setPageCss(),this.loading())},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&(this.setZIndexByPageIndex(this.currentPage),this.currentPage.setCSSByStyle(b));this.previousPage&&(this.setZIndexByPageIndex(this.previousPage),this.previousPage.setCSSByStyle(b));this.previousPage2&&(this.setZIndexByPageIndex(this.previousPage2), this.previousPage2.setCSSByStyle(b));this.currentPage2&&(this.setZIndexByPageIndex(this.currentPage2),this.currentPage2.setCSSByStyle(b));this.nextPage&&(this.setZIndexByPageIndex(this.nextPage),this.nextPage.setCSSByStyle(b));rightToLeft?(this.currentPage&&this.currentPage.setUpOrDown(!0),this.previousPage&&this.previousPage.setUpOrDown(!0),this.previousPage2&&this.previousPage2.setUpOrDown(!0),this.currentPage2&&this.currentPage2.setUpOrDown(!0),this.nextPage&&this.nextPage.setUpOrDown(!0)):(this.currentPage&& this.currentPage.setUpOrDown(!1),this.previousPage&&this.previousPage.setUpOrDown(!1),this.previousPage2&&this.previousPage2.setUpOrDown(!1),this.currentPage2&&this.currentPage2.setUpOrDown(!1),this.nextPage&&this.nextPage.setUpOrDown(!1))},addPageBackArray:function(b){if(b&&this.pageBackArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||(!this.pageBackArray[b[c]]||this.flipping&&!imageLoaded[b[c]]||this.fillContent(b[c]),this.pageBackArray[b[c]]))){var d=this.newPageBack(b[c]), e=this.pageInfoArray[b[c]];d.onResize(this.pageWidth*e.pageWidth,this.pageHeight*e.pageHeight,e.opacity);d.mirrorSide();this.pageBackArray[b[c]]=d;this.flipping&&!imageLoaded[b[c]]||this.fillContent(b[c]);this.flipBook.append(d.$page)}},getDownUpPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);this.pageArray[d]&&this.pageArray[d].beginToFlip();this.pageBackArray[d]&&this.pageBackArray[d].beginToFlip();this.pageArray[d]&&this.pageArray[d].page.setCSSByName("down-flip-side"); this.pageBackArray[d]&&(this.pageBackArray[d].page.setCSSByName("flip-vertical-side"),this.pageBackArray[d].page.side.addClass("boxShadow"));return[this.pageArray[d],this.pageBackArray[d]]},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);rightToLeft?(this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-up-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-down-side")):(this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-down-side"), this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-up-side"));return[this.pageArray[d],this.pageBackArray[d]]},flipToMax:function(b,c,d){var e=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMax(c,d);this.pageArray[c]&&(this.pageArray[c].setUpOrDown(rightToLeft),e.nextPage=this.pageArray[c]);this.setPagesStyleBeforeFlipToMax(c,d);this.deleteUnnecessaryPagesBeforeFlipToMax(b,c);return e},addPagesBeforeFlipToMax:function(b,c){this.addPageArray([b]);c&&this.supportSerialsFlip()&& (this.addPageBackArray([b]),this.addPageArray([b+1]))},setPagesStyleBeforeFlipToMax:function(b,c){c&&(this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b],b),this.pageArray[b].setUpOrDown(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b],b),this.pageBackArray[b].setUpOrDown(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1],b),this.pageArray[b+1].setUpOrDown(rightToLeft)))},deleteUnnecessaryPagesBeforeFlipToMax:function(b, c){for(var d=c+1;d<=originTotalPageCount;d++)this.pageBackArray[d]&&(this.pageBackArray[d]&&this.pageBackArray[d].remove(),this.pageBackArray[d]=void 0);for(d=c+2;d<=originTotalPageCount;d++)this.pageArray[d]&&(this.pageArray[d]&&this.pageArray[d].remove(),this.pageArray[d]=void 0);for(d=b+1;d<c;d++)if(this.pageArray[d]||this.pageBackArray[d])this.pageArray[d]&&this.pageArray[d].remove(),this.pageBackArray[d]&&this.pageBackArray[d].remove(),this.pageArray[d]=void 0,this.pageBackArray[d]=void 0},afterFlipToMax:function(b){this.addPagesAfterFlipToMax(b); this.setPagesStyleAfterFlipToMax(b);this.deleteUnnecessaryPagesAfterFlipToMax(b)},addPagesAfterFlipToMax:function(b){this.supportSerialsFlip()||(this.addPageArray([b]),this.addPageBackArray([b]),this.addPageArray([b+1]));this.pageArray[b]&&this.fillContent(b);this.pageArray[b+1]&&this.fillContent(b+1)},setPagesStyleAfterFlipToMax:function(b){this.pageArray[b-1]&&this.setZIndexByPageIndex(this.pageArray[b-1],b);this.pageBackArray[b-1]&&this.setZIndexByPageIndex(this.pageBackArray[b-1],b);this.supportSerialsFlip()|| (this.pageArray[b]&&(this.setZIndexByPageIndex(this.pageArray[b]),this.pageArray[b].setUpOrDown(rightToLeft)),this.pageBackArray[b]&&(this.setZIndexByPageIndex(this.pageBackArray[b]),this.pageBackArray[b].setUpOrDown(rightToLeft)),this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setUpOrDown(rightToLeft)))},deleteUnnecessaryPagesAfterFlipToMax:function(b){for(b-=2;0<=b;b--)if(this.pageArray[b]||this.pageBackArray[b])this.pageArray[b]&&this.pageArray[b].remove(), this.pageBackArray[b]&&this.pageBackArray[b].remove(),this.pageArray[b]=void 0,this.pageBackArray[b]=void 0},flipToMin:function(b,c,d){var e=this.flipPageManager.initFlipPageByIndex(b,c);this.addPagesBeforeFlipToMin(c,d);this.pageArray[b]&&(e.nextPage=this.pageArray[b]);this.setPagesStyleBeforeFlipToMin(c);this.deleteUnnecessaryPagesBeforeFlipToMin(b,c);return e},addPagesBeforeFlipToMin:function(b,c){},setPagesStyleBeforeFlipToMin:function(b){},deleteUnnecessaryPagesBeforeFlipToMin:function(b,c){for(--b;b> c;b--)if(this.pageArray[b]||this.pageBackArray[b])this.pageArray[b]&&this.pageArray[b].remove(),this.pageBackArray[b]&&this.pageBackArray[b].remove(),this.pageArray[b]=void 0,this.pageBackArray[b]=void 0},afterFlipToMin:function(b){this.addPagesAfterFlipToMin(b);this.setPagesStyleAfterFlipToMin(b);this.deleteUnnecessaryPagesAfterFlipToMin(b)},addPagesAfterFlipToMin:function(b){this.supportSerialsFlip()||(this.addPageArray([b]),this.addPageBackArray([b]),this.addPageArray([b-1]));this.pageArray[b]&& this.fillContent(b);this.pageArray[b-1]&&this.fillContent(b-1)},setPagesStyleAfterFlipToMin:function(b){this.pageArray[b+1]&&(this.setZIndexByPageIndex(this.pageArray[b+1]),this.pageArray[b+1].setUpOrDown(rightToLeft))},deleteUnnecessaryPagesAfterFlipToMin:function(b){for(var c=b+2;c<=originTotalPageCount;c++)if(this.pageArray[c]||this.pageBackArray[c])this.pageArray[c]&&this.pageArray[c].remove(),this.pageBackArray[c]&&this.pageBackArray[c].remove(),this.pageArray[c]=void 0,this.pageBackArray[c]= void 0;this.pageBackArray[b+1]&&(this.pageBackArray[b+1]&&this.pageBackArray[b+1].remove(),this.pageBackArray[b+1]=void 0)},getCurrentPages:function(){return[this.currentPageIndex]},getPagesByIndex:function(b){return[b]},movetoCenter:function(){},getFromStartPointByIndex:function(b,c){var d=this.currentPageIndex;if(b!=d&&b!=d){var e={x:0,y:0},f=c.getPageWidthHeight().height;c.getPageWidthHeight();var g=!1;c={x:f,y:0};rightToLeft&&(c={x:-f,y:0});if(b>d&&!rightToLeft||b<d&&rightToLeft)g=!0;if(b<d&& !rightToLeft||b>d&&rightToLeft)g=!1;b>d&&(e={x:c.x*(f-2)/f,y:2});b<d&&(e={x:-c.x*(f-2)/f,y:2});this.flipToDirection=g?"left":"right";return[c,e]}},realBookPosition:function(){var b=this.flipBook.offset().left,c=this.flipBook.offset().top-(rightToLeft?0:this.pageHeight);return[b,c]},edgeX:function(){this.MiddleX=this.pageHeight/2;rightToLeft&&(this.MiddleX=-this.pageHeight/2)},realIndex:function(b){var c=this.currentPageIndex;if(b&&!rightToLeft||!b&&rightToLeft)return[c,c+1];if(!b&&!rightToLeft||b&& rightToLeft)return[c,c-1]},getFromStartPointByCoordinate:function(b,c,d){if(b){var e={x:0,y:0},f={x:0,y:0},g=d.getPageWidthHeight().height;d=d.getPageWidthHeight().width;var h=b.y>d/2?b.y-5:b.y+5;b.x<this.MiddleX&&(e.y=h,f.x=-g);b.x>this.MiddleX&&(e.y=h,f.x=g);c&&0<=c.indexOf("r")&&(f.x=g);c&&0<=c.indexOf("l")&&(f.x=-g);"tl"==c&&(e.y=0);"bl"==c&&(e.y=d);"tr"==c&&(e.y=0);"br"==c&&(e.y=d);e.x=rightToLeft?-g:g;f.y=e.y;return[e,f]}},getFlipTo:function(b){var c=this.currentPageIndex,d="";b>c&&(d="max"); b<c&&(d="min");return{flipTo:d,minIndex:c,maxIndex:c,toIndex:b}},afterZoomIn:function(b){if(!isPhone()&&!isPad()||bookConfig.usePdfJs){if(isPhone()||isPad()||this.showPages(),b&&this.flipBook.parameters&&!this.flipBook.parameters.resize){this.flipBook.parameters.resize=!0;b=this.flipBook.offset().left;var c=this.flipBook.offset().top;b-=this.flipBook.parameters.left;var d=c-this.flipBook.parameters.top;c=this.flipBook.parameters.scale;1!=c&&this.resizeBook(Math.round(this.width*c),Math.round(this.height* c));transformCSS({tran:{x:b,y:d},scale:1,origin:{x:0,y:0},obj:this.flipBook});this.flipBook.parameters.tran={x:b,y:d};this.flipBook.parameters.scale=1;this.flipBook.parameters.toScale=1;this.flipBook.parameters.width=$(this.flipBook).width();this.flipBook.parameters.height=$(this.flipBook).height();this.flipBook.parameters.origin={x:0,y:0};this.flipBook.parameters.resize=!1;isPhone()||isPad()||this.switchLargeImage()}}else if(d=BookInfo.getCurrentPages(),void 0!=d&&null!=d)for(var e=0;e<d.length;e++){var f= d[e];this.pageArray[f]&&this.pageArray[f]&&(c=this.flipBook.parameters.scale,this.pageArray[f].resizeSvg(Math.round(this.width*c),Math.round(this.height*c)),bookConfig.highDefinitionConversion?this.pageArray[f].zoomInSideImage():(1<b.scale&&this.pageArray[f].zoomInSideImage(),1==b.scale&&this.pageArray[f].zoomOutSideImage()))}},setZIndexByPageIndex:function(b,c){b&&(c=c?c:this.currentPageIndex,b==this.pageArray[c]?b.setZIndex(2):b==this.pageBackArray[c]?b.setZIndex(1):b==this.pageArray[c+1]?b.setZIndex(0): b.setZIndex(-1))},getFitWH:function(){this.getSpace(!1);var b=this.getSpace(!0),c=windowWidth-b.left-b.right;b=windowHeight-b.top-b.bottom;var d=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,e=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;return fitPageWidthHeight(c,b,d,e)},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+ templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=bookConfig.hardCoverBorderWidth,d+=bookConfig.hardCoverBorderWidth,e+=rightToLeft?bookConfig.hardCoverBorderWidth+totalThicknessWidth(!1):0,f+=rightToLeft?0:bookConfig.hardCoverBorderWidth+totalThicknessWidth(!1));return{left:c,right:d,top:e,bottom:f}},resizeBook:function(b,c){this.endFlip();this.width=b;this.height=c;this.pageWidth=b;this.pageHeight=c;this.maskWidth= parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.flipBook.css({width:this.width+"px",height:this.height+"px"});this.resizePage(this.pageWidth,this.pageHeight);this.resetBookShadow()},resetBookShadow:function(){},setAttachmentBeforeFlipTo:function(){},setAttachmentAfterFlipTo:function(){},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex)}}).extend(SingleFlipBook), NormalBook=Class({bookType:BookType.normal_book,doublePage:!0,create:function(b){this._super(b);this.resetZoomArea()},initBook:function(){this._super()},resetBookShadow:function(b){b=this.flipPageManager.array.length;if(0==b){var c=2==BookInfo.getCurrentPages().length,d=!BookInfo.isLeftPage(this.currentPageIndex,!0);this.bookAttachments.Items.find("BookShadow").each(function(l){l.doubleWidth(c);l.right(d);l.show()});this.bookAttachments.Items.find("GrayShadow").each(function(l){c?l.show():l.hide()})}else{for(var e= !0,f=!0,g=0;g<b;g++){var h=this.flipPageManager.array[g],k=this.flipPageManager[h].nextIndex;h=this.flipPageManager[h].currentIndex;1==BookInfo.getPagesByIndex(k).length&&BookInfo.isLeftPage(k,!0)&&(f=!1);1==BookInfo.getPagesByIndex(h).length&&BookInfo.isLeftPage(h,!0)&&(f=!1);1!=BookInfo.getPagesByIndex(k).length||BookInfo.isLeftPage(k,!0)||(e=!1);1!=BookInfo.getPagesByIndex(h).length||BookInfo.isLeftPage(h,!0)||(e=!1)}e||f||this.bookAttachments.Items.find("BookShadow").each(function(l){l.hide()}); (e&&!f||!e&&f)&&this.bookAttachments.Items.find("BookShadow").each(function(l){l.show();l.doubleWidth(!1);l.right(f)});this.bookAttachments.Items.find("GrayShadow").each(function(l){e&&f?l.show():l.hide()})}},hasTwoSingleFlipPage:function(b){for(var c=this.flipPageManager.array.length,d,e=0;e<c;e++){var f=this.flipPageManager.array[e],g=this.flipPageManager[f].nextIndex;f=this.flipPageManager[f].currentIndex;1==BookInfo.getPagesByIndex(g).length&&(d=g);1==BookInfo.getPagesByIndex(f).length&&(d=f)}return d&& (d!=b&&1==BookInfo.getPagesByIndex(b).length||d!=this.currentPageIndex&&1==BookInfo.getPagesByIndex(this.currentPageIndex).length)?(this.bookAttachments.Items.find("BookShadow").each(function(h){h.hide()}),!0):!1},newPage:function(b){return new NormalPage(b,"page",!1,this.bookType)},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex);this.resetZoomArea()},resetZoomArea:function(){this.flipBook&& this.flipBook.parameters&&this.flipBook.parameters.zoomArea&&(1!=this.getCurrentPages().length||BookInfo.isLeftPage(this.currentPageIndex,!0)?1==this.getCurrentPages().length&&BookInfo.isLeftPage(this.currentPageIndex,!0)?this.flipBook.parameters.zoomArea={left:0,top:0,right:50,bottom:0}:this.flipBook.parameters.zoomArea={left:0,top:0,right:0,bottom:0}:this.flipBook.parameters.zoomArea={left:50,top:0,right:0,bottom:0})},afterCurling:function(){this._super();this.resetBookShadow(this.currentPageIndex); this.bookAttachments.afterCurling()},setAttachmentBeforeFlipTo:function(b){this.pauseAnimation();this.bookAttachments.setAttachmentBeforeFlipTo(b);this.resetBookShadow(b)},setAttachmentAfterFlipTo:function(b){this.stopMedia();this.resetSlider();this.bookAttachments.setAttachmentAfterFlipTo(b);this.resetBookShadow(b);this.flipping||this.enterPage();bookConfig.ThumbnailsButtonVisible&&(thumbnail.clearHighLight(),thumbnail.setHighLight(this.currentPageIndex));window.resizeBookAfterFlip&&!this.flipping&& window.setTimeout(function(){onStageResize()},30)},resizeBook:function(b,c){this.endFlip();this.width=2*b;this.height=c;this.pageWidth=b;this.pageHeight=c;this.maskWidth=parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.setCSS({width:this.width,height:this.height});this.resizePage(this.pageWidth,this.pageHeight);this.resetBookShadow(this.currentPageIndex)},resizeAttachments:function(b,c){this.bookAttachments.onResize(b,c)},movetoCenter:function(b,c,d){this._super(b, c,d);this.bookAttachments.Items.find("ThicknessManager").each(function(e){e.followToPoint(b,c,d,!1)})},afterZoomIn:function(b){b&&this.flipBook.parameters&&!this.flipBook.parameters.resize&&(this._super(b),this.bookAttachments.afterZoomIn(this.width,this.height))}}).extend(DoubleFlipBook),NormalCalendar=Class({bookType:BookType.normal_book,doublePage:!0,create:function(b){this._super(b);this.resetZoomArea()},resetBookShadow:function(b){b=this.flipPageManager.array.length;if(0==b){var c=2==BookInfo.getCurrentPages().length, d=!BookInfo.isLeftPage(this.currentPageIndex,!0);this.bookAttachments.Items.find("BookShadow").each(function(l){l.doubleHeight(c);l.down(d);l.show()})}else{for(var e=!0,f=!0,g=0;g<b;g++){var h=this.flipPageManager.array[g],k=this.flipPageManager[h].nextIndex;h=this.flipPageManager[h].currentIndex;1==BookInfo.getPagesByIndex(k).length&&BookInfo.isLeftPage(k,!0)&&(f=!1);1==BookInfo.getPagesByIndex(h).length&&BookInfo.isLeftPage(h,!0)&&(f=!1);1!=BookInfo.getPagesByIndex(k).length||BookInfo.isLeftPage(k, !0)||(e=!1);1!=BookInfo.getPagesByIndex(h).length||BookInfo.isLeftPage(h,!0)||(e=!1)}e||f||this.bookAttachments.Items.find("BookShadow").each(function(l){l.hide()});(e&&!f||!e&&f)&&this.bookAttachments.Items.find("BookShadow").each(function(l){l.show();l.doubleHeight(!1);l.down(f)})}},hasTwoSingleFlipPage:function(b){for(var c=this.flipPageManager.array.length,d,e=0;e<c;e++){var f=this.flipPageManager.array[e],g=this.flipPageManager[f].nextIndex;f=this.flipPageManager[f].currentIndex;1==BookInfo.getPagesByIndex(g).length&& (d=g);1==BookInfo.getPagesByIndex(f).length&&(d=f)}return d&&(d!=b&&1==BookInfo.getPagesByIndex(b).length||d!=this.currentPageIndex&&1==BookInfo.getPagesByIndex(this.currentPageIndex).length)?(this.bookAttachments.Items.find("BookShadow").each(function(h){h.hide()}),!0):!1},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex);this.resetZoomArea()},afterCurling:function(){this._super(); this.resetBookShadow(this.currentPageIndex);this.bookAttachments.afterCurling()},setAttachmentBeforeFlipTo:function(b){this.pauseAnimation();this.bookAttachments.setAttachmentBeforeFlipTo(b);this.resetBookShadow(b)},setAttachmentAfterFlipTo:function(b){this.stopMedia();this.resetSlider();this.bookAttachments.setAttachmentAfterFlipTo(b);this.resetBookShadow(b);this.flipping||this.enterPage();bookConfig.ThumbnailsButtonVisible&&(thumbnail.clearHighLight(),thumbnail.setHighLight(this.currentPageIndex)); window.resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30)},resizeAttachments:function(b,c){this.bookAttachments.onResize(b,c)},afterZoomIn:function(b){b&&this.flipBook.parameters&&!this.flipBook.parameters.resize&&(this._super(b),this.bookAttachments.afterZoomIn(this.width,this.height))}}).extend(DoubleCalendar),SingleBook=Class({bookType:BookType.single_book,doublePage:!1,create:function(b){this._super(b)},newPage:function(b){return new NormalPage(b,"page",!0, BookType.single_book)},newPageBack:function(b){return new NormalPage(b,"pageBack",!0,BookType.single_book,!0)},afterCurling:function(){this._super();this.bookAttachments.afterCurling()},setAttachmentBeforeFlipTo:function(b){this.pauseAnimation();this.bookAttachments.setAttachmentBeforeFlipTo(b)},setAttachmentAfterFlipTo:function(b){this.stopMedia();this.resetSlider();this.flipping||this.enterPage();this.bookAttachments.setAttachmentAfterFlipTo(b);bookConfig.ThumbnailsButtonVisible&&(thumbnail.clearHighLight(), thumbnail.setHighLight(this.currentPageIndex));window.resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30)},resizeBook:function(b,c){this.endFlip();this.width=b;this.height=c;this.pageWidth=b;this.pageHeight=c;this.maskWidth=parseInt(Math.sqrt(b*b+c*c));0!=(this.maskWidth-this.height)%2&&(this.maskWidth+=1);this.flipBook.css({width:this.width+"px",height:this.height+"px"});this.resizePage(this.pageWidth,this.pageHeight);this.resetBookShadow()},resizeAttachments:function(b, c){this.bookAttachments.onResize(b,c)},resetBookShadow:function(){this.bookAttachments.Items.find("BookShadow").each(function(b){b.doubleWidth(!0);b.right(!1)})},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex)},movetoCenter:function(b,c,d){this._super(b,c,d);this.bookAttachments.Items.find("ThicknessManager").each(function(e){e.followToPoint(b,c,d,!1)})},afterZoomIn:function(b){b&& this.flipBook.parameters&&!this.flipBook.parameters.resize&&(this._super(b),this.bookAttachments.afterZoomIn(this.width,this.height))}}).extend(SingleFlipBook),SingleCalendar=Class({bookType:BookType.single_book,doublePage:!1,create:function(b){this._super(b)},newPage:function(b){return new NormalPage(b,"page",!0,BookType.single_book)},newPageBack:function(b){return new NormalPage(b,"pageBack",!0,BookType.single_book,!0)},afterCurling:function(){this._super();this.bookAttachments.afterCurling()}, setAttachmentBeforeFlipTo:function(b){this.pauseAnimation();this.bookAttachments.setAttachmentBeforeFlipTo(b)},setAttachmentAfterFlipTo:function(b){this.stopMedia();this.resetSlider();this.flipping||this.enterPage();this.bookAttachments.setAttachmentAfterFlipTo(b);bookConfig.ThumbnailsButtonVisible&&(thumbnail.clearHighLight(),thumbnail.setHighLight(this.currentPageIndex));window.resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30)},resizeAttachments:function(b,c){this.bookAttachments.onResize(b, c)},resetBookShadow:function(){this.bookAttachments.Items.find("BookShadow").each(function(b){b.doubleWidth(!0);b.down(!1)})},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex)}}).extend(SingleFlipCalendar),HardPage=Class({create:function(b,c,d,e,f){this._super(b,c,d,e,f);this.isHardPage=!0;this.borderWidth=bookConfig.hardCoverBorderWidth;this.outerCoverBorder=bookConfig.outerCoverBorder|| BookInfo.isInnerPage(b,e);this.$page=$("<div class='hardSide' style='background-color:"+bookConfig.borderColor+";'></div>");this.$page.append(this.page.side);this.page.side.addClass("pageSide");this.renderPage()},newPage:function(b,c,d,e){this.page=new HardSide(b,c,d,e)},setLeftOrRight:function(b){(this.isLeft=b)?this.setCSSByName("left-side"):this.setCSSByName("right-side");var c=b&&this.outerCoverBorder?this.borderWidth:0,d=bookConfig.cornerRound;b?(this.$page.css({"border-radius":d+"px 0px 0px "+ d+"px"}),this.$page.css({"margin-top":-this.borderWidth+"px","margin-left":-this.borderWidth+"px"})):(this.$page.css({"border-radius":"0px "+d+"px "+d+"px 0px"}),this.$page.css({"margin-top":-this.borderWidth+"px","margin-right":-this.borderWidth+"px"}));this.page.side.css({left:c+"px"})},setUpOrDown:function(b){(this.isUp=b)?this.setCSSByName("up-side"):this.setCSSByName("down-side");var c=b&&this.outerCoverBorder?this.borderWidth:0,d=bookConfig.cornerRound;b?(this.$page.css({"border-radius":d+"px "+ d+"px 0px 0px"}),this.$page.css({"margin-top":-this.borderWidth+"px","margin-left":-this.borderWidth+"px"})):(this.$page.css({"border-radius":"0px 0px "+d+"px "+d+"px"}),this.$page.css({"margin-bottom":-this.borderWidth+"px","margin-left":-this.borderWidth+"px"}));this.page.side.css({top:c+"px"})},onResize:function(b,c,d){this.pageWidth=b;this.pageHeight=c;bookConfig.FlipDirection?(this.width=b+2*this.borderWidth,this.height=c+this.borderWidth,this.pageWidth=this.outerCoverBorder?b:b+2*this.borderWidth, this.pageHeight=this.outerCoverBorder?c:c+this.borderWidth):(this.width=b+this.borderWidth,this.height=c+2*this.borderWidth,this.pageWidth=this.outerCoverBorder?b:b+this.borderWidth,this.pageHeight=this.outerCoverBorder?c:c+2*this.borderWidth);if(this.page)this.page.onResize(this.pageWidth,this.pageHeight);this.$page.css({width:this.width,height:this.height});bookConfig.FlipDirection?this.page.side.css({left:this.outerCoverBorder?this.borderWidth:0}):this.page.side.css({top:this.outerCoverBorder? this.borderWidth:0});if(this.rendering)this.rendering.onResize(b,c)},renderPage:function(){this.rendering&&(this.rendering.destroy(),this.rendering=null);this.rendering=new PageRendering(this.$page,this.pageIndex,this.bookType);this.rendering.onResize(this.width,this.height);this.rendering.render()},beginToFlip:function(){},setHardCover:function(b,c,d,e,f){this.outerCoverBorder=bookConfig.outerCoverBorder||BookInfo.isInnerPage(this.pageIndex,this.bookType);this.$page.css("background-color",bookConfig.borderColor); this.borderWidth!=bookConfig.hardCoverBorderWidth&&(this.borderWidth=bookConfig.hardCoverBorderWidth,bookConfig.FlipDirection?this.setUpOrDown(this.isUp):this.setLeftOrRight(this.isLeft),this.onResize(this.pageWidth,this.pageHeight));this.renderPage()}}).extend(PageInterface),HardSide=Class({create:function(b,c,d,e){this._super(b,c,d,e);this.isHard=!0},addFlipShadow:function(){},renderPage:function(){}}).extend(BookPage),HardCover=Class({create:function(b){this.parent=b;this.borderWidth=bookConfig.hardCoverBorderWidth; this.rightToLeft=bookConfig.RightToLeft;this.cover=$("<div class='hardCover'></div>");this.initPage();this.initBookSpine();this.parent.append(this.cover)},initPage:function(){var b=BookInfo.getHardCoverPages(!0);this.leftPage=new HardPage(b[0],"coverPage",!1,BookType.normal_book);this.rightPage=new HardPage(b[1],"coverPage",!1,BookType.normal_book);this.cover.append(this.leftPage.$page);this.cover.append(this.rightPage.$page);this.leftPage.rendering.midCoil&&this.leftPage.rendering.midCoil.hide(); this.rightPage.rendering.midCoil&&this.rightPage.rendering.midCoil.hide();this.leftPage.setLeftOrRight(!0);this.rightPage.setLeftOrRight(!1);this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});this.rightPage.setCSSByStyle({top:"0",right:"0","margin-top":0,"margin-right":0})},initBookSpine:function(){this.topSpine=new BookSpine(this.cover);this.bottomSpine=new BookSpine(this.cover);this.topSpine.setCSSByName("top_spine");this.bottomSpine.setCSSByName("botoom_spine")},onResize:function(b, c,d){if(this.leftPage)this.leftPage.onResize(b,c);if(this.rightPage)this.rightPage.onResize(b,c);this.topSpine.onResize(d);this.bottomSpine.onResize(d);this.pageWidth=b;this.pageHeight=c;this.resizeCover(b,c,d)},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=2*b+(d[0]+d[1])+2*this.borderWidth;this.height=c+2*this.borderWidth;this.cover.css({width:this.width+"px",height:this.height+"px",left:-(this.borderWidth+d[0])+"px",top:-this.borderWidth+"px"})},refresh:function(b,c,d){this.refreshBookSpine(c); this.refreshPage(b,d);this.resizeCover(this.pageWidth,this.pageHeight,c)},getSensitiveIndex:function(){return BookInfo.getSensitiveIndex(!0)},refreshPage:function(b,c){var d=this.getSensitiveIndex().min,e=this.getSensitiveIndex().max;if(b<=d||b>=e){if(b<=d&&bookConfig.RightToLeft||!bookConfig.RightToLeft&&b>=e)this.rightPage&&this.rightPage.setVisible(!1),(c<e&&bookConfig.RightToLeft||c>d&&!bookConfig.RightToLeft)&&this.leftPage&&this.leftPage.setVisible(!0);if(b<=d&&!bookConfig.RightToLeft||bookConfig.RightToLeft&& b>=e)this.leftPage&&this.leftPage.setVisible(!1),(c<e&&!bookConfig.RightToLeft||c>d&&bookConfig.RightToLeft)&&this.rightPage&&this.rightPage.setVisible(!0);this.hideBookSpine()}else this.showBookSpine(),this.leftPage&&this.leftPage.setVisible(!0),this.rightPage&&this.rightPage.setVisible(!0)},refreshBookSpine:function(b){this.topSpine.refresh(b);this.bottomSpine.refresh(b)},hideBookSpine:function(){this.topSpine.hide();this.bottomSpine.hide()},showBookSpine:function(){this.topSpine.show();this.bottomSpine.show()}, show:function(){this.cover.show()},hide:function(){this.cover.hide()}}),BookSpine=Class({create:function(b){this.parent=b;this.initSpine()},initSpine:function(){this.height=bookConfig.hardCoverBorderWidth;this.bookSpine=$("<div class='bookSpine'></div>");this.bookSpine.css({height:this.height,"background-color":bookConfig.borderColor});this.parent.append(this.bookSpine);this.addShadow()},addShadow:function(){this.leftShadow=$("<div class='left_shadow shadow'></div>");this.rightShadow=$("<div class='right_shadow shadow'></div>"); this.bookSpine.append(this.leftShadow);this.bookSpine.append(this.rightShadow)},refresh:function(b){this.onResize(b)},show:function(){this.bookSpine.show()},hide:function(){},setCSSByStyle:function(b){this.bookSpine.css(b)},setCSSByName:function(b){this.bookSpine.attr("class",b);this.bookSpine.addClass("bookSpine")},onResize:function(b){this.width=b[0]+b[1];this.bookSpine.css({width:this.width,"margin-left":-this.width/2+"px"})}}),HardCalendarCover=Class({create:function(b){this.parent=b;this.borderWidth= bookConfig.hardCoverBorderWidth;this.rightToLeft=bookConfig.RightToLeft;this.cover=$("<div class='hardCover'></div>");this.initPage();this.initBookSpine();this.parent.append(this.cover)},initPage:function(){var b=BookInfo.getHardCoverPages(!0);this.leftPage=new HardPage(b[0],"coverPage",!1,BookType.normal_book);this.rightPage=new HardPage(b[1],"coverPage",!1,BookType.normal_book);this.cover.append(this.leftPage.$page);this.cover.append(this.rightPage.$page);this.leftPage.setUpOrDown(!0);this.rightPage.setUpOrDown(!1); this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});this.rightPage.setCSSByStyle({bottom:"0",left:"0","margin-bottom":0,"margin-left":0})},initBookSpine:function(){this.topSpine=new BookSpine(this.cover);this.bottomSpine=new BookSpine(this.cover);this.topSpine.setCSSByName("top_spine");this.bottomSpine.setCSSByName("botoom_spine")},onResize:function(b,c,d){if(this.leftPage)this.leftPage.onResize(b,c);if(this.rightPage)this.rightPage.onResize(b,c);this.topSpine.onResize(d); this.bottomSpine.onResize(d);this.pageWidth=b;this.pageHeight=c;this.resizeCover(b,c,d)},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=b+2*this.borderWidth;this.height=2*c+(d[0]+d[1])+2*this.borderWidth;this.cover.css({width:this.width+"px",height:this.height+"px",left:-this.borderWidth+"px",top:-(this.borderWidth+d[0])+"px"})},refresh:function(b,c,d){this.refreshBookSpine(c);this.refreshPage(b,d);this.resizeCover(this.pageWidth,this.pageHeight,c)},getSensitiveIndex:function(){return BookInfo.getSensitiveIndex(!0)}, refreshPage:function(b,c){var d=this.getSensitiveIndex().min,e=this.getSensitiveIndex().max;if(b<=d||b>=e){if(b<=d&&bookConfig.RightToLeft||!bookConfig.RightToLeft&&b>=e)this.rightPage&&this.rightPage.setVisible(!1),(c<e&&bookConfig.RightToLeft||c>d&&!bookConfig.RightToLeft)&&this.leftPage&&this.leftPage.setVisible(!0);if(b<=d&&!bookConfig.RightToLeft||bookConfig.RightToLeft&&b>=e)this.leftPage&&this.leftPage.setVisible(!1),(c<e&&!bookConfig.RightToLeft||c>d&&bookConfig.RightToLeft)&&this.rightPage&& this.rightPage.setVisible(!0);this.hideBookSpine()}else this.showBookSpine(),this.leftPage&&this.leftPage.setVisible(!0),this.rightPage&&this.rightPage.setVisible(!0)},refreshBookSpine:function(b){this.topSpine.refresh(b);this.bottomSpine.refresh(b)},hideBookSpine:function(){this.topSpine.hide();this.bottomSpine.hide()},showBookSpine:function(){this.topSpine.show();this.bottomSpine.show()},show:function(){this.cover.show()},hide:function(){this.cover.hide()}}),HardBook=Class({bookType:BookType.normal_book, create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,totalPageCount].indexOf(c)&&0<=[1,totalPageCount].indexOf(b)||0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)|| 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){return!1},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1, totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return!1},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)}, newPage:function(b){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new NormalPage(b,"page",!1,BookType.normal_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"), this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)}, afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b, c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalBook),HardCalendar=Class({bookType:BookType.normal_book,create:function(b){this._super(b)}, crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,totalPageCount].indexOf(c)&&0<=[1,totalPageCount].indexOf(b)||0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount- 2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){return!1},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b, c){return!1},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCalendarCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount|| b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new NormalPage(b,"page",!1,BookType.normal_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!0),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")): (this.pageArray[b]&&this.pageArray[b].setUpOrDown(!1),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0,0]},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b, c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalCalendar),OpenHardCalendar=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!= b?!1:!0},toSoftPage:function(b){return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount- 1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new NormalPage(b,"page",!1,BookType.normal_book)}}).extend(HardCalendar),OpenHardBook=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toSoftPage:function(b){return 0<= [totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")}, newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new NormalPage(b,"page",!1,BookType.normal_book)}}).extend(HardBook),SingleHardCover=Class({initPage:function(){var b=BookInfo.getHardCoverPages(!1);bookConfig.RightToLeft&&(this.leftPage=new HardPage(b[0],"coverPage",!0,BookType.single_book));bookConfig.RightToLeft||(this.rightPage=new HardPage(b[0],"coverPage",!0,BookType.single_book));this.leftPage&&this.cover.append(this.leftPage.$page); this.rightPage&&this.cover.append(this.rightPage.$page);this.leftPage&&this.leftPage.setLeftOrRight(!0);this.rightPage&&this.rightPage.setLeftOrRight(!1);this.leftPage&&this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});this.rightPage&&this.rightPage.setCSSByStyle({top:"0",right:"0","margin-top":0,"margin-right":0})},getSensitiveIndex:function(){return BookInfo.getSensitiveIndex(!1)},initBookSpine:function(){this.topSpine=new SingleBookSpine(this.cover);this.bottomSpine= new SingleBookSpine(this.cover);this.topSpine.setCSSByName("top_spine");this.bottomSpine.setCSSByName("botoom_spine")},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=b+(d[0]+d[1])+this.borderWidth;this.height=c+2*this.borderWidth;this.cover.css({width:this.width+"px",height:this.height+"px",left:(bookConfig.RightToLeft?-(this.borderWidth+d[0]):0)+"px",top:-this.borderWidth+"px"})}}).extend(HardCover),SingleBookSpine=Class({onResize:function(b){this.width=b[0]+b[1];this.bookSpine.css({width:this.width}); bookConfig.RightToLeft?this.bookSpine.css({left:"auto",right:"0"}):this.bookSpine.css({right:"auto",left:"0"})}}).extend(BookSpine),SingleHardCalendarCover=Class({initPage:function(){var b=BookInfo.getHardCoverPages(!1);bookConfig.RightToLeft&&(this.leftPage=new HardPage(b[0],"coverPage",!0,BookType.single_book));bookConfig.RightToLeft||(this.rightPage=new HardPage(b[0],"coverPage",!0,BookType.single_book));this.leftPage&&this.cover.append(this.leftPage.$page);this.rightPage&&this.cover.append(this.rightPage.$page); this.leftPage&&this.leftPage.setUpOrDown(!0);this.rightPage&&this.rightPage.setUpOrDown(!1);this.leftPage&&this.leftPage.setCSSByStyle({top:"0",left:"0","margin-top":0,"margin-left":0});this.rightPage&&this.rightPage.setCSSByStyle({bottom:"0",left:"0","margin-bottom":0,"margin-left":0})},getSensitiveIndex:function(){return BookInfo.getSensitiveIndex(!1)},initBookSpine:function(){this.topSpine=new SingleBookSpine(this.cover);this.bottomSpine=new SingleBookSpine(this.cover);this.topSpine.setCSSByName("top_spine"); this.bottomSpine.setCSSByName("botoom_spine")},resizeCover:function(b,c,d){this.thicknessWidthArray=d;this.width=b+2*this.borderWidth;this.height=c+(d[0]+d[1])+this.borderWidth;this.cover.css({width:this.width+"px",height:this.height+"px",top:(bookConfig.RightToLeft?-(this.borderWidth+d[0]):0)+"px",left:-this.borderWidth+"px"})}}).extend(HardCover),SingleHardBook=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 1== c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return 2==b||1==b?!1:!0},toHardPage:function(b){return!1},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){return!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new SingleHardCover(this.flipBook)},newPage:function(b){1== b||b==bookConfig.totalPageCount?(b=new HardPage(b,"page",!0,BookType.single_book),b.setLeftOrRight(bookConfig.RightToLeft)):b=new NormalPage(b,"page",!0,BookType.single_book);return b},newPageBack:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"pageBack",!0,BookType.single_book,!0),b.setLeftOrRight(bookConfig.RightToLeft)):b=new NormalPage(b,"pageBack",!0,BookType.single_book,!0);return b},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth())},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&& this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(), this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)}, resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleBook),SingleHardCalendar=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 1==c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return 2== b||1==b?!1:!0},toHardPage:function(b){return!1},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){return!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new SingleHardCalendarCover(this.flipBook)},newPage:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b, "page",!0,BookType.single_book),b.setUpOrDown(bookConfig.RightToLeft)):b=new NormalPage(b,"page",!0,BookType.single_book);return b},newPageBack:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"pageBack",!0,BookType.single_book,!0),b.setUpOrDown(bookConfig.RightToLeft)):b=new NormalPage(b,"pageBack",!0,BookType.single_book,!0);return b},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b, c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!0),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-up-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-down-side")):(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!1),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-down-side"), this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-up-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0,0]},onResize:function(b,c){this._super(b,c)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleCalendar),AlbumSide=Class({create:function(b,c,d,e){this._super(b, c,d,e);this.isHard=!0},renderPage:function(){},onResize:function(b,c){this._super(b,c);bookConfig.FlipDirection?this.side&&this.side.css({left:"50%","margin-left":-b/2+"px"}):this.side&&this.side.css({top:"50%","margin-top":-c/2+"px"})}}).extend(BookPage),AlbumPage=Class({isHardPage:!0,create:function(b,c,d,e,f){this._super(b,c,d,e,f);this.isHardPage=!0;this.$page=this.page.side},newPage:function(b,c,d,e){var f=this.isSingleBook?window.singleCachePages:window.cachePages;e&&(f=window.mirrorSideCachePages); this.page=f&&f[b]?f[b]:new BookPage(b,c,d,e);isPhone()||isPad()||(this.isSingleBook&&!e?(window.singleCachePages||(window.singleCachePages=[]),window.singleCachePages[b]=this.page):e?(window.mirrorSideCachePages||(window.mirrorSideCachePages=[]),window.mirrorSideCachePages[b]=this.page):(window.cachePages||(window.cachePages=[]),window.cachePages[b]=this.page))},setLeftOrRight:function(b){this.page&&this.page.setLeftOrRight(b)},setUpOrDown:function(b){this.page&&this.page.setUpOrDown(b)},onResize:function(b, c,d){this.opacity=d?d:1;this.pageWidth=b;this.pageHeight=c;this.width=b;this.height=c;if(this.page)this.page.onResize(this.pageWidth,this.pageHeight)},addFlipShadow:function(){this.pageFlipShadow||(this.pageFlipShadow=new HardPageFlipShadow(this.side))},beginToFlip:function(){}}).extend(PageInterface),AlbumBook=Class({bookType:BookType.normal_book,create:function(b){this._super(b)},crossFlipMode:function(b){return!1},toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b, c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumPage(b,"page",!1,BookType.normal_book)},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")): (this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]}}).extend(NormalBook),AlbumHardBook=Class({bookType:BookType.normal_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,totalPageCount].indexOf(c)&& 0<=[1,totalPageCount].indexOf(b)||0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){return!1},toHardPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount- 1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!1: !0},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount||b== totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new AlbumPage(b,"page",!1,BookType.normal_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")): (this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&& this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalBook),OpenAlbumHardBook=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&& 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toHardPage:function(b){return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isHardPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!1:!0},isCoverPage:function(b,c){return b== totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new AlbumPage(b,"page",!1,BookType.normal_book)}}).extend(AlbumHardBook),SingleAlbumBook=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){return!1}, toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b,c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumPage(b,"page",!0,BookType.single_book)},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0), this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]}}).extend(SingleBook), SingleAlbumHardBook=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 1==c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return!1},toHardPage:function(b){return 2==b||1==b?!1:!0},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!1:!0},gotoNearPage:function(b){1== this.currentPageIndex?gotoPageFun(2,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new SingleHardCover(this.flipBook)},newPage:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"page",!0,BookType.single_book),b.setLeftOrRight(bookConfig.RightToLeft)):b=new AlbumPage(b,"page",!0,BookType.single_book);return b},newPageBack:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"pageBack",!0,BookType.single_book),b.setLeftOrRight(bookConfig.RightToLeft)): b=new AlbumPage(b,"pageBack",!0,BookType.single_book,!0);return b},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!0),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-left-side"), this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-right-side")):(this.pageArray[d]&&this.pageArray[d].setLeftOrRight(!1),this.pageBackArray[d]&&this.pageBackArray[d].setLeftOrRight(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-right-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-left-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b, this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b}, onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleBook), AlbumCanlendar=Class({bookType:BookType.normal_book,create:function(b){this._super(b)},crossFlipMode:function(b){return!1},toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b,c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumPage(b,"page",!1,BookType.normal_book)},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!0), this.pageArray[c]&&this.pageArray[c].setUpOrDown(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")):(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!1),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b],this.pageArray[c]]}}).extend(NormalCalendar), AlbumHardCalendar=Class({bookType:BookType.normal_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,totalPageCount].indexOf(c)&&0<=[1,totalPageCount].indexOf(b)||0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){return!1}, toHardPage:function(b){var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1, totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!1:!0},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"): 1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCalendarCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new AlbumPage(b,"page",!1,BookType.normal_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&& this.pageArray[b].setUpOrDown(!0),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")):(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!1),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b], this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0, 0]},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(NormalCalendar), OpenAlbumHardCalendar=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toHardPage:function(b){return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!= this.currentPageIndex&&totalPageCount!=b?!1:!0},isHardPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!1:!0},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.normal_book):new AlbumPage(b, "page",!1,BookType.normal_book)}}).extend(AlbumHardCalendar),SingleAlbumCalendar=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){return!1},toSoftPage:function(b){return!1},toHardPage:function(b){return!0},isHardPage:function(b,c){return!0},toCoverPage:function(){return!1},isCoverPage:function(){return!1},gotoNearPage:function(b){},newPage:function(b){return new AlbumPage(b,"page",!0,BookType.single_book)},getDownUpHardPage:function(b,c){var d=b;b> c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]);bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!0),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-up-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-down-side")):(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!1),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-down-side"), this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-up-side"));return[this.pageArray[d],this.pageBackArray[d]]}}).extend(SingleCalendar),SingleAlbumHardCalendar=Class({bookType:BookType.single_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 1==c&&2!=b||2!=c&&1==b?!0:!1},toSoftPage:function(b){return!1},toHardPage:function(b){return 2==b||1==b?!1:!0},toCoverPage:function(b){return 1!=b?!1:!0},isCoverPage:function(b,c){var d=b;b> c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!0:!1},isHardPage:function(b,c){var d=b;b>c&&(d=c);return 1==d||d==bookConfig.totalPageCount?!1:!0},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new SingleHardCalendarCover(this.flipBook)},newPage:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"page",!0,BookType.single_book),b.setUpOrDown(bookConfig.RightToLeft)): b=new AlbumPage(b,"page",!0,BookType.single_book);return b},newPageBack:function(b){1==b||b==bookConfig.totalPageCount?(b=new HardPage(b,"pageBack",!0,BookType.single_book),b.setUpOrDown(bookConfig.RightToLeft)):b=new AlbumPage(b,"pageBack",!0,BookType.single_book,!0);return b},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c){var d=b;b>c&&(d=c);this.addPageArray([d]);this.addPageBackArray([d]); bookConfig.RightToLeft?(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!0),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!0),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-up-side"),this.pageBackArray[d]&&this.pageBackArray[d].setCSSByName("flip-hard-down-side")):(this.pageArray[d]&&this.pageArray[d].setUpOrDown(!1),this.pageBackArray[d]&&this.pageBackArray[d].setUpOrDown(!1),this.pageArray[d]&&this.pageArray[d].setCSSByName("flip-hard-down-side"),this.pageBackArray[d]&& this.pageBackArray[d].setCSSByName("flip-hard-up-side"));return[this.pageArray[d],this.pageBackArray[d]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(SingleCalendar),zoom_icons={moveByPos:"iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABoSURBVHjarJRRDsAgCEML8f5Xfvsezqmk/EjANC1FA5AjUqZISTgZ4ZSGc0Y4h43TNZz2c9Pb7RE/NW4XsoJFOSVJY3FpBRir+rgAqexeeR6AVDmfeR6A7BhH9/W3XdOJa93/aJL5DADgpBckJE4YCgAAAABJRU5ErkJggg==", moveByDrag:"iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAACzSURBVHjaxFTLDsMgDLMpqvr/n0sB7wKIMcZDq7ScQHIcOwlQEp4Ig4dihUjee20TxRgFoCRKgrW2XJ1zXVJ2eqQQAo7jYL5nbHOeWuN93zXB0PawR9d1ISv13k9JvlnrAlvVrU3TJE7txBi7RUwNSDaGZCQRQkDb9NaaUkUYs7Srhch+FqRI/r7ZJJHGv6xmNDXtEpkRSBKccwBQVKbC3Hm0lITzPN+aX00Mqwv5n//oNQCKCmKo6/HSRQAAAABJRU5ErkJggg==", ZU:"iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBA3y7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BUNTVQYqg4jIKAX08EGIIUByaVEZhMXIwMDAIMCgxeDHUMmwiuEBozRjFOM8xqdMhkwNTJeYNZgbme+y2LDMY2VmzWa9yubEtoldhX0mhwBHJycrZzMXM1cbNzf3RB4pnqW8xryH+IL5nvFXCwgJrBZ0E3wk1CisKHxYJF2UV3SrWJw4p/hWiRRJYcmjUhXSutJPZObIhsoJyp2V71HwUeRVvKA0RTlKRUnltepWtUZ1Pw1Zjbea+7QmaqfqWOsK6b7SO6I/36DGMMrI0ljS+LfJPdPDZivM+y0qLBOtfKwtbFRtRexY7L7aP3e47XjB6ZjzXpetruvdVrov9VjkudBrgfdCn8W+y/xW+a8P2Bq4N+hY8PmQW6HPwr5EMEUKRilFG8e4xUbF5cW3JMxO3Jx0Nvl5KlOaXLpNRlRmVdas7D059/KY8tULfAqLi2YXHy55WyZR7lJRWDmv6mz131q9uvj6SQ3HGn83G7Skt85ru94h2Ond1d59uJehz76/bsK+if8nO05pnXpiOu+M4JmzZj2aozW3ZN6+BVwLwxYtXvxxqcOyCcsfrjRe1br65lrddU3rb2402NSx+cFWq21Tt3/Y6btr1R6Oven7jh9QP9h56PURv6Obj4ufqD355LT3mS3nZM+3X/h0Ke7yqasW15bdEL3ZeuvrnfS7N+/7PDjwyPTx6qeKz2a+EHzZ9Zr5Td3bn+9LP3z6VPD53de8b+9+5P/88Lv4z7d/Vf//AwAqvx2K829RWwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAAL0lEQVR42mL8z0AYMDEMDUX/Gf7TyjrG/6gWocmSbRLCPEZ6OHwIRTAAAAD//wMAHjoIG4Kx7iYAAAAASUVORK5CYII=", PB:"iVBORw0KGgoAAAANSUhEUgAAAHwAAAAICAYAAAA7rZtpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAACQSURBVHja7NWxCQJREEXRs2K4INiAiQVYg6mpsZ0tlmBkAdYgGJmYCYKwYP5NduHzSxjmRsML32VmulKKihW2kig8MdbBspqPOKPPnsLwwwmXOeimDV/jlbLDSt/gC4sp3KXssPSTX7XwT/YSmncr/I4hewnJgEf7w2cO2Od5D8GIG6512ApPgvMHAAD//wMAcr8cMeD+ziUAAAAASUVORK5CYII=", ZD:"iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBA3y7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BUNTVQYqg4jIKAX08EGIIUByaVEZhMXIwMDAIMCgxeDHUMmwiuEBozRjFOM8xqdMhkwNTJeYNZgbme+y2LDMY2VmzWa9yubEtoldhX0mhwBHJycrZzMXM1cbNzf3RB4pnqW8xryH+IL5nvFXCwgJrBZ0E3wk1CisKHxYJF2UV3SrWJw4p/hWiRRJYcmjUhXSutJPZObIhsoJyp2V71HwUeRVvKA0RTlKRUnltepWtUZ1Pw1Zjbea+7QmaqfqWOsK6b7SO6I/36DGMMrI0ljS+LfJPdPDZivM+y0qLBOtfKwtbFRtRexY7L7aP3e47XjB6ZjzXpetruvdVrov9VjkudBrgfdCn8W+y/xW+a8P2Bq4N+hY8PmQW6HPwr5EMEUKRilFG8e4xUbF5cW3JMxO3Jx0Nvl5KlOaXLpNRlRmVdas7D059/KY8tULfAqLi2YXHy55WyZR7lJRWDmv6mz131q9uvj6SQ3HGn83G7Skt85ru94h2Ond1d59uJehz76/bsK+if8nO05pnXpiOu+M4JmzZj2aozW3ZN6+BVwLwxYtXvxxqcOyCcsfrjRe1br65lrddU3rb2402NSx+cFWq21Tt3/Y6btr1R6Oven7jh9QP9h56PURv6Obj4ufqD355LT3mS3nZM+3X/h0Ke7yqasW15bdEL3ZeuvrnfS7N+/7PDjwyPTx6qeKz2a+EHzZ9Zr5Td3bn+9LP3z6VPD53de8b+9+5P/88Lv4z7d/Vf//AwAqvx2K829RWwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAAJklEQVR42mL8z0AYMDGMeEUsKDz0QGMkwSTG0RAnShEAAAD//wMAU6UDIxn1UhsAAAAASUVORK5CYII=", ZO:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF/SURBVHjarJQ9Sx1REIafXdRI5MZERbQRmxSpYsItrC3ENEp+gXUgWFunDDYXi1SBWyUBMSKC/gMbK3+DnR/ED0wiUZ4UzibHy+71wnVgOOyZOc/s7rxnMpWHtLxkrw58Bq6Am3CBLWDmPmDW8oZLQAO4AHaA/YC9AN4AI8BH4ANwWUpUC3/vrW2q9WS/8JfqRuSslMRR/wFfqdcBe5Ik1NRnyXO/uh7Q2XbAhvpbfV1VOfFJ9UxdU3urgMfqlvqoA2CmflJP1YnWeNHlYeAgOks0osyL2B4wCDztRDad2FXV+Z5YL4ChVE7tpAZMA6fASZVsmuqhOtXBPxxVj9Rv0fXSptRDCtvqwD3AZuQutJMN6nIkflefRzfT+HgC+1JVsCf5+lWgBiwDb+M+7wJ/gClgMdQgMBlr1u7qFT6nflVP/G/nodN59Z137c75rGJ89QFjobMc+AEcAT8TLVKmiqyLeVgKzbuYpVlZgbzLAZ0Bv4DrhwICPI5pngP8HQDUZDnUnQeVQgAAAABJRU5ErkJggg==", PR:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABUSURBVHja3JQxCgAwDAJj6f+/bNduTYJCiVuWQ1ADkqHUCrHmAakEUukwXYXdgN03qg6pDIXqlOGoTRmaCQWvIDq1gWMpcEwP3z+HAcADAAD//wMAcqoLKWIIZkIAAAAASUVORK5CYII=", NE:"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABQSURBVHja3JTBCQAwDAK90v1XthOUQjBQ4j9HRBHbSmoprDlAd3zoDstP6C4cWxLpUNyRstNAkkAqoXCxR7I2JHtIsth8Pw6DgAcAAP//AwBCsgspjp7kPwAAAABJRU5ErkJggg==", "arrow-left":"iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUisiGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQsf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJOyhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaIb4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArouS49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0ivQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxRRKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKbF6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQDtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJEgeQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhMgqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgswkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYroQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHmsAdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQtJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzypOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrCWbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0SvoPfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05bRztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAUvdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZvxjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHIdmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Snt+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z/z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4RzwzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8YqpjZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbjkqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09mSWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvNe70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quFnbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1FDR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TLd1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/EXRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPqRudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WPlR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+lf65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeKj3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAF5JREFUOE+d0EEKACEMQ9E4979zhwwKFW0a5m9cvSiOiMDfnnk6Hbe4eMFtwMEZjHl+dbiETGEJWYVbyG7YguyGM8hDR9WzrQH1Ye2AwkwOdJiVAw5mayAP2ZhtEABeakIQG+bQ9XcAAAAASUVORK5CYII="}; bdor[500]=global.bdor[404];bdor[13]="p"; var ZoomControlBar=Class({create:function(b){this.moveByMousePosition=!1;this.moveByPositionUrl=this.getImageUrl("moveByPos");this.moveByDragUrl=this.getImageUrl("moveByDrag");this.initButtons();this.initBar(b);this.initEvent()},initButtons:function(){this.btnZoomUp=$("<div class='button' title='"+getLanguage("btnZoomIn","zoom in")+"'><img src='"+this.getImageUrl("ZU")+"'/></div>");this.btnZoomDown=$("<div class='button' title='"+getLanguage("btnZoomOut","zoom out")+"'><img src='"+this.getImageUrl("ZD")+ "'/></div>");this.btnZoomOut=$("<div class='button' title='"+getLanguage("btnZoomOut","zoom out")+"'><img src='"+this.getImageUrl("ZO")+"'/></div>");this.btnPre=$("<div class='button' title='"+getLanguage("btnPrePage","pre")+"'><img src='"+this.getImageUrl("PR")+"'/></div>");this.btnNext=$("<div class='button' title='"+getLanguage("btnNextPage","next")+"'><img src='"+this.getImageUrl("NE")+"'/></div>");this.btnMoveMode=$("<div class='button' title='"+getLanguage("btnPositionToMove","Move by mouse position")+ "'><img src='"+this.moveByPositionUrl+"'/></div>")},initBar:function(b){this.width=260;this.height=40;this.bar=$("<div class='zoomControlBar'></div>");this.bar.append(this.btnZoomUp);this.bar.append(this.btnZoomDown);this.bar.append(this.btnZoomOut);this.bar.append(this.btnPre);this.bar.append(this.btnNext);this.bar.append(this.btnMoveMode);this.bar.css({"background-color":bookConfig.toolbarColor});"slide"==bookConfig.FlipStyle.toLowerCase()&&(this.width=220,this.btnMoveMode.css({display:"none"}), this.bar.css({width:this.width+"px"}));b.append(this.bar)},getImageUrl:function(b){return window.zoom_icons&&zoom_icons[b]?"data:image/png;base64,"+zoom_icons[b]:uiBaseURL+b+".png"},setVisible:function(b){b&&this.buttonChangeColor();this.bar.css({display:b?"block":"none"})},buttonChangeColor:function(){this.hasChanged||(this.btnZoomUp.changeButtonColor(bookConfig.iconColor),this.btnZoomDown.changeButtonColor(bookConfig.iconColor),this.btnZoomOut.changeButtonColor(bookConfig.iconColor),this.btnPre.changeButtonColor(bookConfig.iconColor), this.btnNext.changeButtonColor(bookConfig.iconColor),this.btnMoveMode.changeButtonColor(bookConfig.iconColor),this.hasChanged=!0)},setPosition:function(b,c,d){void 0==d&&(d=["left","top"]);this.bar.css(d[0],b+"px");this.bar.css(d[1],c+"px")},initEvent:function(){this.btnZoomUp.bind(_event._end,function(){BookEvent.trigger("zoomIn",["zoom bar",BookInfo.getCurrentPages().join("-")]);this.zoomUp()}.bind(this));this.btnZoomDown.bind(_event._end,function(){BookEvent.trigger("zoomOut",["zoom bar",BookInfo.getCurrentPages().join("-")]); this.zoomDown()}.bind(this));this.btnZoomOut.bind(_event._end,function(){BookEvent.trigger("zoomOut",["zoom bar",BookInfo.getCurrentPages().join("-")]);this.zoomOut()}.bind(this));this.btnPre.bind(_event._end,function(){rightToLeft?nextPageFun("zoom bar"):previousPageFun("zoom bar")});this.btnNext.bind(_event._end,function(){rightToLeft?previousPageFun("zoom bar"):nextPageFun("zoom bar")});this.btnMoveMode.bind(_event._end,function(){BookEvent.trigger("zoomMove",["zoom bar",BookInfo.getCurrentPages().join("-")]); this.changeMoveMode()}.bind(this))},changeMoveMode:function(){1==this.moveByMousePosition?(this.moveByMousePosition=!1,this.btnMoveMode.empty().append(getImage(this.moveByPositionUrl)).attr("title",getLanguage("btnPositionToMove","Move by mouse position"))):(this.moveByMousePosition=!0,this.btnMoveMode.empty().append(getImage(this.moveByDragUrl)).attr("title",getLanguage("btnDragToMove","Move by mouse drag")));this.btnMoveMode.changeButtonColor(bookConfig.iconColor)},destroy:function(){this.bar.remove()}, zoomUp:function(b){var c=BookInfo.getBook().showPage;if(!c.parameters.eventCancel&&!c.parameters.zoomming){bookConfig.AnnotationButtonVisible&&global.annotationCookie&&global.annotationCookie.saveCookie();c.scale=c.parameters.toScale;var d=Math.min(c.parameters.naturalHeight*c.maxScale/c.parameters.height,1.2*parseFloat(c.scale));d!=c.scale&&(b||(b={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2},{pageX:windowWidth/2,pageY:windowHeight/2}]}),c.parameters.origin=c.mathOrigin(c,b),c.originObj(c, c.parameters.origin),c.animateToScale(c,d,b,300))}},zoomDown:function(b){var c=BookInfo.getBook().showPage;if(!c.parameters.eventCancel&&!c.parameters.zoomming){bookConfig.AnnotationButtonVisible&&global.annotationCookie&&global.annotationCookie.saveCookie();b||(b={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2},{pageX:windowWidth/2,pageY:windowHeight/2}]});c.scale=c.parameters.toScale;c.parameters.origin=c.mathOrigin(c,b);c.originObj(c,c.parameters.origin);var d=c.parameters.naturalHeight/c.parameters.height, e=.8*parseFloat(c.scale);e<=d&&(c.parameters.zoomOut=!0);c.animateToScale(c,Math.max(d,e),b,300)}},zoomOut:function(){var b=BookInfo.getBook().showPage;b.onDoubleTap.bind(b)({pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]});StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(c){c.setAsZoomin();c.executeCallback()})}}),CatalogZoomControlBar=Class({}).extend(ZoomControlBar),ZoomMap=Class({create:function(b){this.book=b;this.maxWidth=80;this.maxHeight=100;this.pageHeight=this.pageWidth= this.height=this.width=0;this.doublePage=!1;this.init();this.initEvent()},init:function(){this.map=$("<div class='thumbnail_map'></div>");bookConfig.FlipDirection?(this.imageLeft=$("<img class='map_img map_img_up'></img>"),this.imageRight=$("<img class='map_img map_img_down'></img>")):(this.imageLeft=$("<img class='map_img map_img_left'></img>"),this.imageRight=$("<img class='map_img map_img_right'></img>"));this.mapCursor=$("<div class='map_cursor'></div>");this.map.append(this.imageLeft);this.map.append(this.imageRight); this.map.append(this.mapCursor);bookContainer.append(this.map)},show:function(){this.visible=!0;this.refreshArea();this.map.show()},hide:function(){this.visible=!1;this.map.hide()},onResize:function(){bookConfig.largePageWidth/bookConfig.largePageHeight<this.maxWidth/this.maxHeight?(this.pageWidth=this.maxWidth,this.pageHeight=bookConfig.largePageHeight*this.maxWidth/bookConfig.largePageWidth):(this.pageHeight=this.maxHeight,this.pageWidth=bookConfig.largePageWidth*this.maxHeight/bookConfig.largePageHeight); bookConfig.FlipDirection?(this.height=this.book.doublePage?2*(this.pageHeight+1):this.pageHeight,this.width=this.pageWidth+2):(this.height=this.pageHeight+2,this.width=this.book.doublePage?2*(this.pageWidth+1):this.pageWidth);var b=20+bookConfig.rightMargin,c=templateArea.getTopHeight()+10+bookConfig.topMargin;this.map.css({left:"auto",right:b+"px",top:c,width:this.width+"px",height:this.height+"px"});$(".map_img").css({width:this.pageWidth+"px",height:this.pageHeight+"px"});this.doublePage=this.book.doublePage}, fillContent:function(b){this.visible&&(b=BookInfo.getCurrentPages(),this.doublePage=1<b.length,bookConfig.FlipDirection?(this.doublePage?(this.fillImage(this.imageLeft,b[0]),this.fillImage(this.imageRight,b[1]),this.imageLeft.show(),this.imageRight.show(),this.imageLeft.css({"border-bottom":"none"})):(this.fillImage(this.imageLeft,b[0]),this.imageLeft.show(),this.imageRight.hide(),this.imageLeft.css({"border-bottom":"1px solid gray"})),this.height=this.pageHeight,this.doublePage&&(this.height=2*(this.pageHeight+ 1)),this.map.css({height:this.height+"px"})):(this.doublePage?(this.fillImage(this.imageLeft,b[0]),this.fillImage(this.imageRight,b[1]),this.imageLeft.show(),this.imageRight.show(),this.imageLeft.css({"border-right":"none"})):(this.fillImage(this.imageLeft,b[0]),this.imageLeft.show(),this.imageRight.hide(),this.imageLeft.css({"border-right":"1px solid gray"})),this.width=this.pageWidth,this.doublePage&&(this.width=2*(this.pageWidth+1)),this.map.css({width:this.width+"px"})),$(".map_img").css({width:this.pageWidth+ "px",height:this.pageHeight+"px"}))},fillImage:function(b,c){b&&pageResourceLoad(c,"thumb",function(d){b.attr("src",d)})},refreshArea:function(){if(this.book.showPage){var b=this.book.showPage,c=b.width(),d=b.height();b=getTransform(b[0]);var e=this.getBookPosition();if(1==this.book.doublePage&&0==this.doublePage)if(bookConfig.FlipDirection){d/=2;var f=BookInfo.getBook().getCurrentPageIndex();BookInfo.isLeftPage(f,!0)||(e.top+=d)}else c/=2,f=BookInfo.getBook().getCurrentPageIndex(),BookInfo.isLeftPage(f, !0)||(e.left+=c);f=-(e.left+b.x);var g=-(e.top+b.y);b=(f+windowWidth)/c;e=(g+windowHeight)/d;c=Math.max(0,f/c);d=Math.max(0,g/d);b=Math.min(1,b);e=Math.min(1,e);f=this.width;this.mapCursor.css({left:c*f,top:d*this.height,width:(b-c)*f,height:(e-d)*this.height})}},getBookPosition:function(){var b=this.book.showPage.css("left");b=parseInt(b.replace("px",""));var c=this.book.showPage.css("top");c=parseInt(c.replace("px",""));return{left:b,top:c}},initEvent:function(){var b=new Hammer.Manager(this.mapCursor[0]); b.add(new Hammer.Pan);b.on("panstart panmove panend pancancel",this.onPan.bind(this))},onPan:function(b){if(b&&b.pointers&&1==b.pointers.length){var c=this.book.showPage.width()/this.width,d=this.book.showPage.height()/this.height;c=this.book.showPage.panForMove(this.book.showPage,-b.deltaX*c,-b.deltaY*d,!1);this.refreshArea();this.mapCursor.css({"background-color":"RGBA(245,225,135,0.8)",cursor:"move"});if("panend"==b.type||"pancancel"==b.type)this.mapCursor.css({"background-color":"RGBA(250,240,185,0.5)", cursor:"default"}),this.book.showPage.setZoomParameters(this.book.showPage,c),this.book.showPage.restrictInBoundary(this.book.showPage,this.refreshArea.bind(this))}}}),FlipShotBar=Class({create:function(b){this.flipShotObj=$("<div id='flipShotBar' class='flipShotBar'></div>");this.flipShotObj.css({"z-index":2*(bookConfig.totalPageCount+5)+1});this.isLeft=b;this.visible=!0;this.width=50;this.height=0;this.init();this.initEvents();this.flipShotObj.append(this.firstDiv);this.flipShotObj.append(this.prevDiv)}, init:function(){this.firstDiv=$("<div class='flipbutton upbutton'></div>");this.prevDiv=$("<div class='flipbutton downbutton'></div>");this.isLeft?(this.firstDiv.addClass("left"),this.prevDiv.addClass("left"),this.prevImageUrl=uiBaseURL+"slide_leftButton.png",this.firstImageUrl=uiBaseURL+"catalog_firstButton.png"):(this.firstDiv.addClass("right"),this.prevDiv.addClass("right"),this.prevImageUrl=uiBaseURL+"slide_rightButton.png",this.firstImageUrl=uiBaseURL+"catalog_lastButton.png");this.prevDiv.append("<img src='"+ this.prevImageUrl+"'/>");this.firstDiv.append("<img src='"+this.firstImageUrl+"'/>")},onResize:function(b,c){var d=Math.min(50,.7*c/8),e=Math.min(.7*c,310);this.width=d;this.height=e;this.flipShotObj.css({width:d,height:e});this.setPosition(b,c)},setPosition:function(b,c){this.flipShotObj.css({left:this.isLeft?1-this.width:"100%",top:(c-this.height)/2})},setScale:function(b){this.width*=b;this.height*=b;this.flipShotObj.css({width:this.width,height:this.height})},setVisible:function(b){this.flipShotObj.css({display:b? "block":"none"});this.visible=b},getContainer:function(){return this.flipShotObj},initEvents:function(){this.isLeft?(this.prevDiv.bind(_event._end,function(b){rightToLeft?nextPageFun("flip shot bar"):previousPageFun("flip shot bar")}),this.firstDiv.bind(_event._end,function(b){rightToLeft?lastPageFun("flip shot bar"):firstPageFun("flip shot bar")})):(this.prevDiv.bind(_event._end,function(b){rightToLeft?previousPageFun("flip shot bar"):nextPageFun("flip shot bar")}),this.firstDiv.bind(_event._end, function(b){rightToLeft?firstPageFun("flip shot bar"):lastPageFun("flip shot bar")}));this.prevDiv.on("mousedown mouseup touchstart",function(b){b.stopPropagation()});this.firstDiv.on("mousedown mouseup touchstart",function(b){b.stopPropagation()})},setVisibleByIndex:function(b){this.isLeft?(1<b&&(rightToLeft||this.setVisible(!0)),b<originTotalPageCount-1&&rightToLeft&&this.setVisible(!0),3>=b&&(bookConfig.RightToLeft||1>=b&&this.setVisible(!1)),b>=originTotalPageCount-2&&bookConfig.RightToLeft&& b>=originTotalPageCount-1&&this.setVisible(!1)):(1<b&&rightToLeft&&this.setVisible(!0),b<originTotalPageCount-1&&(rightToLeft||this.setVisible(!0)),3>=b&&bookConfig.RightToLeft&&1>=b&&this.setVisible(!1),b>=originTotalPageCount-2&&(bookConfig.RightToLeft||b>=originTotalPageCount-1&&this.setVisible(!1)))},refresh:function(){}}),setCurrentIndexTextField=function(b){b=getShownPageNumberInfo(b);$("#guidPageIndex").html("<b>"+b+"</b>");$("#currentPageIndexTextField")&&$("#currentPageIndexTextField")[0]&& !$("#currentPageIndexTextField")[0].onFocus&&$("#currentPageIndexTextField").val(b);for(var c=$(".currentPageIndexTextField"),d=0;d<c.length;d++)c[d]&&!c[d].onFocus&&$(c[d]).val(b)},getShownPageNumberInfo=function(b){BookInfo.isDoublePage();b=BookInfo.getCurrentPages();for(var c=originTotalPageCount,d="",e=0;e<b.length;e++){var f=getShownPageNumber(b[e]);0!=e&&d!=f&&(d+="-");d!=f&&(d+=f)}0==b.length&&(d=getShownPageNumber(1));bookConfig.totalPagesCaption&&(c=bookConfig.totalPagesCaption);return rightToLeft? c+"/"+d:d+"/"+c},getShownPageArray=function(){var b=bookConfig.pageNumberCaption+"",c=originTotalPageCount;";"==b.substr(b.length-1,1)&&(b=b.substr(0,b.length-1));b=b.split(";");for(var d=[],e=0;e<b.length;e++)if(""!=b[e]&&void 0!=b[e]){var f=b[e].split(":");if(f[0])if(f[1]||(f[1]=""),-1<f[1].indexOf("+")){var g=f[0];g.indexOf("-");g=g.split("-");var h=g[0];g=g[1];h=parseInt(h);var k=g?parseInt(g):c;f=getPageNumberFormat(f[1]);for(var l=h;l<=k;l++){var n=(l-h)*f.addition+f.startPage;g="";0==f.type&& (g=n+"");1==f.type&&(g=parseRoman(n));2==f.type&&(g=parseRoman(n).toLowerCase());d[l]=String.format(f.page,g)}}else if(!isNaN(f[0]))h=parseInt(f[0]),d[h]=void 0==f[1]?"":f[1];else if(-1<f[0].indexOf("-"))for(g=f[0],g.indexOf("-"),g=g.split("-"),h=g[0],g=g[1],h=parseInt(h),k=g?parseInt(g):c,l=h;l<=k;l++)d[l]=void 0==f[1]?"":f[1]}return d}; function getPageNumberFormat(b){var c={page:"%s",startPage:1,type:0,addition:1};if(-1<b.indexOf("{")){var d=b.indexOf("{"),e=b.indexOf("}")+1;d=b.substring(d,e);c.page=b.replace(d,"%s");-1<d.indexOf("N+")&&(c.type=0);-1<d.indexOf("R+")&&(c.type=1);-1<d.indexOf("r+")&&(c.type=2);d=d.subBetween("+","}");c.startPage=""==d?1:parseInt(d)}else d=b.split("+")[0],b=b.split("+")[1],c.startPage=""==d?1:parseInt(d),b&&(c.addition=parseInt(b));return c} function parseRoman(b){if(isNaN(b))return"";for(var c=[" I II III IV V VI VII VIII IX".split(" ")," X XX XXX XL L LX LXX LXXX XC".split(" ")," C CC CCC CD D DC DCC DCCC CM".split(" ")],d="",e,f=0,g=1E3;3>f;f++,g/=10)e=Math.floor(b%g/(g/10)),d+=c[2-f][e];return d} var getShownPageNumber=function(b){var c=bookConfig.pageNumberCaption;if(""==c||void 0==c)return b;b=parseInt(b);c=getShownPageArray();return void 0==c[b]?b:c[b]},getRealPageNumber=function(b){b=getRealPage(b);isNaN(b)&&(b=1);return b},getRealPage=function(b,c){c=void 0===c?!1:c;var d=bookConfig.pageNumberCaption;if(""==d||void 0==d)return parseInt(b);b+="";d=getShownPageArray();for(var e=c?[]:-1,f=d.length,g=1;g<=f;g++)if(c)(d[g]+"").includes(b)&&e.push(g);else if(d[g]+""==b){e=g;break}return c? 0<e.length?e:"error":-1!=e?e:isNaN(parseInt(b))||void 0!==d[parseInt(b)]?"error":parseInt(b)},setLocationHash=function(b){bookConfig.updateURLForPage&&(window.location.hash="#p="+getShownPageNumber(b))},nextPageFun=function(b){switch(bookType){case BookType.normal_book:gotoPageFun(BookInfo.getMinPageIndex(flipBook.getCurrentPageIndex())+2,!1,b);break;case BookType.single_book:gotoPageFun(parseInt(singlePageBook.currentPageIndex)+1,!1,b);break;case BookType.slide_book:gotoPageFun(BookInfo.getMinPageIndex(slideBook.getRealPageIndex())+ 2,!1,b);break;case BookType.singleSlide_book:gotoPageFun(parseInt(singleSlideBook.getRealPageIndex())+1,!1,b);break;case BookType.catalog_book:gotoPageFun(BookInfo.getMinPageIndex(catalogBook.getCurrentPageIndex())+2,!1,b);break;case BookType.singleCatalog_book:gotoPageFun(parseInt(singleCatalogBook.currentIndex)+1,!1,b)}},previousPageFun=function(b){switch(bookType){case BookType.normal_book:gotoPageFun(BookInfo.getMaxPageIndex(flipBook.getCurrentPageIndex())-2,!1,b);break;case BookType.catalog_book:gotoPageFun(BookInfo.getMaxPageIndex(catalogBook.getCurrentPageIndex())- 2,!1,b);break;case BookType.single_book:gotoPageFun(parseInt(singlePageBook.currentPageIndex)-1,!1,b);break;case BookType.slide_book:gotoPageFun(BookInfo.getMaxPageIndex(slideBook.getRealPageIndex())-2,!1,b);break;case BookType.singleSlide_book:gotoPageFun(singleSlideBook.getRealPageIndex()-1,!1,b);break;case BookType.singleCatalog_book:gotoPageFun(parseInt(singleCatalogBook.currentIndex)-1,!1,b)}},firstPageFun=function(b){gotoPageFun(1,!1,b)},lastPageFun=function(b){gotoPageFun(originTotalPageCount, !1,b)},gotoPageFun=function(b,c,d){if(!(isNaN(b)||BookEvent.trigger("beforeFlipPage",[b])||(gotoPageVisit(b,d),BookEvent.suspendFlipPage&&0<=BookInfo.getCurrentPagesByIndex(b).indexOf(parseInt(BookEvent.suspendFlipPage))))){b=parseInt(b);var e=bookConfig.totalPageCount;bookConfig.SingleModeBanFlipToLastPage&&bookType==BookType.single_book&&(e=Math.max(1,bookConfig.totalPageCount-1));if(1>b&&bookConfig.isShowFirstOrLastPagePrompt||b>e&&bookConfig.isShowFirstOrLastPagePrompt){if(0>BookInfo.getCurrentPages().indexOf(e)&& b>e){gotoPageFun(e,c,d);return}if(0>BookInfo.getCurrentPages().indexOf(1)&&1>b){gotoPageFun(1,c,d);return}if(bookConfig.isShowFirstOrLastPagePrompt){b=1>b?getLanguage("lblFirst","This is the first page"):getLanguage("lblLast","This is the last page");global._tipsBox||(_tipsBox=new TipsBox(b,bookContainer));_tipsBox.setCaption(b);_tipsBox.showTipsBox();return}}d=b;BookInfo.isDoublePage()&&(d=BookInfo.getMaxPageIndex(d));d=Math.max(1,d);if(passwardType()&&bookConfig.excludeFrontPages&&d>=parseInt(bookConfig.excludeFrontPages)&& !verifyPassward())global.passwardPannel||(global.passwardPannel=new PasswardPannel),global.passwardPannel.show();else{switch(bookType){case BookType.normal_book:flipBook.gotoPage(b,c);break;case BookType.single_book:singlePageBook.gotoPage(b,c);break;case BookType.slide_book:slideBook.gotoPage(b,c);break;case BookType.singleSlide_book:singleSlideBook.gotoPage(b,c);break;case BookType.catalog_book:catalogBook.gotoPage(b,c);break;case BookType.singleCatalog_book:singleCatalogBook.gotoPage(b,c)}global.bookmark&& global.bookmark.elements.refreshElements();bookConfig.SelectTextButtonVisible&&BookInfo.getBook().unSelect();bookConfig.MagnifierButtonVisible&&BookInfo.getBook().unMagnifierZoom();global.annotationPannel&&global.annotationPannel.clearBtnDownCase();bookConfig.addCurrentPage&&global.sharePanel&&global.sharePanel.elements&&global.sharePanel.elements.fillArea(!0,"link");global.downLoadBody&&downLoadBody.gotoPage(b);if(bookConfig.AnnotationButtonVisible&&!isPhone()&&!isPad()&&BookInfo.getBook().bookAttachments.noteAdd)BookInfo.getBook().bookAttachments.noteAdd.onResize(); setCurrentIndexTextField(BookInfo.getCurrentPageIndex(),BookInfo.isDoublePage());setLocationHash(BookInfo.getCurrentPageIndex());global.phoneGotoPagePanel&&global.phoneGotoPagePanel.visible&&global.phoneGotoPagePanel.refreshSlider();global.NeatStyle&&NeatStyle.refreshSlider();global.assistant&&global.assistant.refresh();global.pcArticlePages&&(global.pcArticlePages.clearHighLight(),global.pcArticlePages.setHighLight(b));global.phoneArticlePages&&(global.phoneArticlePages.clearHighLight(),global.phoneArticlePages.setHighLight(b)); global.flipPageAudio&&global.flipPageAudio.playByIndex(b);global.phoneGotoPagePanel&&global.phoneGotoPagePanel.showFirstOrLast();global.flipShotButton&&global.flipShotButton.showFirstOrLast();global.toolbar&&global.toolBar&&global.toolBar.showFirstOrLast&&global.toolBar.showFirstOrLast()}}},gotoPageVisit=function(b,c){var d=window.lastVisitTime?(new Date).getTime()-window.lastVisitTime:0;window.lastVisitTime=(new Date).getTime();BookEvent.trigger("flipPage",[c,BookInfo.getCurrentPages().join("-"), BookInfo.getCurrentPagesByIndex(b).join("-"),d])},BookInfo=Class({statics:{getCurrentPages:function(){var b=[];if(this.isDoublePage()){var c=this.getCurrentPageIndex();b=this.getPagesByIndex(c)}else c=this.getCurrentPageIndex(),b.push(c);return b},getCurrentPagesByIndex:function(b){var c=[];this.isDoublePage()?c=this.getPagesByIndex(b):c.push(b);return c},getPageCount:function(){return bookConfig.totalPageCount},isRightToLeft:function(){return rightToLeft},getBookType:function(){return bookType}, getBook:function(){switch(this.getBookType()){case BookType.normal_book:var b=global.flipBook;break;case BookType.single_book:b=global.singlePageBook;break;case BookType.slide_book:b=global.slideBook;break;case BookType.singleSlide_book:b=global.singleSlideBook;break;case BookType.catalog_book:b=global.catalogBook;break;case BookType.singleCatalog_book:b=global.singleCatalogBook}return b},getBooks:function(){var b=[];global.flipBook&&b.push(global.flipBook);global.singlePageBook&&b.push(global.singlePageBook); global.slideBook&&b.push(global.slideBook);global.singleSlideBook&&b.push(global.singleSlideBook);global.catalogBook&&b.push(global.catalogBook);global.singleCatalogBook&&b.push(global.singleCatalogBook);return b},getCurrentPageIndex:function(){var b=this.getBook();return b&&b.getCurrentPageIndex?b.getCurrentPageIndex():bookConfig.OriginPageIndex},isDoublePage:function(b){var c=this.getBookType();void 0!=b&&(c=b);switch(c){case BookType.single_book:return!1;case BookType.singleSlide_book:return!1; case BookType.singleCatalog_book:return!1}return!0},left:function(){var b=this.getBook();return b&&b.getLeft?b.getLeft():0},top:function(){var b=this.getBook();return b&&b.getTop?b.getTop():0},width:function(){var b=this.getBook();return b&&b.getWidth?b.getWidth():0},height:function(){var b=this.getBook();return b&&b.getHeight?b.getHeight():0},scale:function(){var b=this.getBook();return b&&b.getScale?b.getScale():0},isZoomming:function(){return this.getBook().showPage.parameters.zoomming},zoomStatus:function(){return this.getBook()&& this.getBook().status_zoom?!0:!1},container:function(){return bookContainer},getThumbnailPages:function(){for(var b=[],c=Math.ceil(bookConfig.totalPageCount/2),d=0;d<=c;d++){var e=this.getPagesByIndex(2*d+1);0<e.length&&b.push(e)}return b},getPagesByIndex:function(b){function c(f){1<=f&&f<=bookConfig.totalPageCount&&d.push(f)}var d=[];if(bookConfig.isTheBookOpen){b=2*Math.ceil(b/2);var e=b-1}else e=2*Math.floor(b/2),b=e+1;rightToLeft?(c(b),c(e)):(c(e),c(b));return d},isLeftPage:function(b,c){c=void 0== c?this.isDoublePage():c;if(!c&&!rightToLeft)return!1;if(!c&&rightToLeft||(0==b%2&&!rightToLeft||0!=b%2&&rightToLeft)&&!bookConfig.isTheBookOpen)return!0;if((0==b%2&&!rightToLeft||0!=b%2&&rightToLeft)&&bookConfig.isTheBookOpen||(0==b%2&&rightToLeft||0!=b%2&&!rightToLeft)&&!bookConfig.isTheBookOpen)return!1;if((0==b%2&&rightToLeft||0!=b%2&&!rightToLeft)&&bookConfig.isTheBookOpen)return!0},isInnerPage:function(b,c){if(1!=b&&c==BookType.single_book||!this.isCoverPage(b)&&c!=BookType.single_book)return!0}, isCoverPage:function(b,c){return 0<=[1,totalPageCount].indexOf(b)&&!bookConfig.isTheBookOpen||b==totalPageCount&&bookConfig.isTheBookOpen?!0:!1},getHardCoverPages:function(b){if(b&&rightToLeft&&!bookConfig.isTheBookOpen)return[totalPageCount-1,2];if(b&&!rightToLeft&&!bookConfig.isTheBookOpen)return[2,totalPageCount-1];if(b&&rightToLeft&&bookConfig.isTheBookOpen)return[0==bookConfig.totalPageCount%2?bookConfig.totalPageCount:bookConfig.totalPageCount-1,1];if(b&&!rightToLeft&&bookConfig.isTheBookOpen)return[1, 0==bookConfig.totalPageCount%2?bookConfig.totalPageCount:bookConfig.totalPageCount-1];if(!b)return[bookConfig.totalPageCount]},getSensitiveIndex:function(b){if(b&&!bookConfig.isTheBookOpen)return b=totalPageCount-2,{min:3,max:b};if(b&&bookConfig.isTheBookOpen)return b=totalPageCount-2,{min:4,max:b};b=bookConfig.totalPageCount;return{min:2,max:b}},getMinPageIndex:function(b){return b=bookConfig.isTheBookOpen?2*Math.ceil(b/2)-1:2*Math.floor(b/2)},getMaxPageIndex:function(b){return b=bookConfig.isTheBookOpen? 2*Math.ceil(b/2):2*Math.floor(b/2)+1}}}),FlipHistory=Class({create:function(){this.array=[];this.currentIndex=0},backward:function(){var b=this.currentIndex-1;void 0!=this.array[b]&&(this.currentIndex=b,gotoPageFun(this.array[b].index,!0,"history"))},forward:function(){var b=this.currentIndex+1;void 0!=this.array[b]&&(this.currentIndex=b,gotoPageFun(this.array[b].index,!0,"history"))},addFromCurrentIndex:function(b){this.array=this.array.slice(0,this.currentIndex+1);this.array.push({index:b});this.currentIndex= this.array.length-1},push:function(b){this.array.push({index:b})}}),flipHistory=new FlipHistory,CatalogBook=Class({bookType:BookType.catalog_book,guidBarHeight:0,create:function(b){this._super(b)},initAttachments:function(){this._super();this.flipShotBarManager=new FlipShotBarManager(this.flipBook,this);bookConfig.flipshortcutbutton&&this.flipShotBarManager.appendTo(this.flipBook);this.flipShotBarManager.refresh()},newPage:function(b){return 1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1||!bookConfig.HardPageEnable? bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book):new HardPage(b,"page",!1,BookType.catalog_book)},setAttachmentBeforeFlipTo:function(b){this._super(b);this.flipShotBarManager.setVisibleByIndex(b)},setAttachmentAfterFlipTo:function(b){this._super(b);this.flipShotBarManager.refresh()},afterCurling:function(){this._super();this.flipShotBarManager.refresh()},resizeAttachmentAfterZoomIn:function(b){this._super(b);this.flipShotBarManager.resizeAttachment(this.width, this.height,b)},getControlBarTop:function(){return"lite"==bookConfig.ToolbarViewMode.toLowerCase()?50:templateArea.getTopHeight()+5},beforeZoomIn:function(){this._super();thumbnail&&thumbnail.visible&&thumbnail.transparent&&thumbnail.transparent()},resetZoomConfig:function(){this._super();thumbnail&&thumbnail.visible&&thumbnail.noTransparent&&thumbnail.noTransparent()},onResize:function(b,c){this._super(b,c);this.flipShotBarManager.onResize(b,c)},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(), d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),this.flipShotBarManager.getWidth()),d+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),this.flipShotBarManager.getWidth()),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}}}).extend(NormalBook), CatalogHardBook=Class({bookType:BookType.catalog_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){if(bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1, 2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){if(!bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2, totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)? !1:!0},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount|| b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&& this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")):(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&& this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()}); return b},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(CatalogBook), OpenCatalogHardBook=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toSoftPage:function(b){return bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toHardPage:function(b){return!bookConfig.HardInnerPageEnable|| 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount? gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)}}).extend(CatalogHardBook),CatalogSimpleBook=Class({create:function(b){this._super(b)},initBook:function(){this._super()},showOrHideLiteThumbnail:function(){this.flipPageManager.array&& 0<this.flipPageManager.array.length||this.status_zoom||1!=this.isFlipping&&1!=this.isZomming&&this.adjustBookPosition()},hideToolBarAndShowGuidBar:function(){this.status_zoom||1==this.isFlipping||1==this.isZomming||(this.guidBar&&this.guidBar.show(),toolBar&&toolBar.hide(),this.mode="simple",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},hideGuidBarAndShowToolBar:function(){this.status_zoom||1==this.isFlipping||1==this.isZomming||(this.guidBar&&this.guidBar.hide(),toolBar&& toolBar.show(),this.mode="complex",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},adjustBookPosition:function(){this.pageWidthHeight=this.getFitWH();var b=this.getTranY(),c=this.pageWidthHeight.x/this.width,d=this.getTranX(c);this.pageWidthHeight.x==this.width&&0==b&&0==d||this.flipBook.animateToTransform.bind(this.flipBook)(c,{x:d,y:b},{x:50,y:0})},getTranX:function(b){if(!bookConfig.retainBookCenter)return 0;var c=0;b=this.width*b/4;1!=this.currentPageIndex||bookConfig.isTheBookOpen|| (c=rightToLeft?b:-b);this.currentPageIndex==totalPageCount&&(c=rightToLeft?-b:b);b=this.getCssLeft();var d=this.getSpace(!0);return d.left+(windowWidth-d.left-d.right-this.width)/2-b+c},getTranY:function(){var b=this.getCssTop(),c=this.getSpace(!0);return c.top+(windowHeight-c.top-c.bottom-this.pageWidthHeight.y)/2-b},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(), f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),this.flipShotBarManager.getWidth()),d+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),this.flipShotBarManager.getWidth()),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}}}).extend(CatalogBook),CatalogSimpleHardBook=Class({bookType:BookType.catalog_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c= this.currentPageIndex;return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){if(bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount- 1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){if(!bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},isHardPage:function(b, c){return bookConfig.HardInnerPageEnable&&1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1== this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1, BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!0),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-left-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-right-side")): (this.pageArray[b]&&this.pageArray[b].setLeftOrRight(!1),this.pageArray[c]&&this.pageArray[c].setLeftOrRight(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-right-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-left-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&& this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){var b=[0,0];this.bookAttachments.Items.find("ThicknessManager").each(function(c){b=c.getThicknessWidth()});return b},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex, this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(CatalogSimpleBook),OpenCatalogSimpleHardBook=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount- 2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toSoftPage:function(b){return bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toHardPage:function(b){return!bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&& 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount- 1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)}}).extend(CatalogSimpleHardBook),CatalogCalendar=Class({bookType:BookType.catalog_book,guidBarHeight:0,create:function(b){this._super(b)},newPage:function(b){return 1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1||!bookConfig.HardPageEnable? bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book):new HardPage(b,"page",!1,BookType.catalog_book)},getControlBarTop:function(){return"lite"==bookConfig.ToolbarViewMode.toLowerCase()?50:templateArea.getTopHeight()+5},beforeZoomIn:function(){this._super();thumbnail&&thumbnail.visible&&thumbnail.transparent&&thumbnail.transparent()},resetZoomConfig:function(){this._super();thumbnail&&thumbnail.visible&&thumbnail.noTransparent&& thumbnail.noTransparent()},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(),f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),0),d+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),0),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d, top:e,bottom:f}}}).extend(NormalCalendar),CatalogHardCalendar=Class({bookType:BookType.catalog_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){if(bookConfig.HardInnerPageEnable)return!1; var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){if(!bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<= [totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount-1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&1!=b&& 2!=b&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"):this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCalendarCover(this.flipBook)},newPage:function(b){return 1== b||2==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!0),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!1), this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")):(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!1),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&& this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0,0]},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth()); this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(CatalogCalendar),OpenCatalogHardCalendar=Class({crossFlipMode:function(b){var c=this.currentPageIndex; return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1:!0},toSoftPage:function(b){return bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toHardPage:function(b){return!bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount- 2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&&totalPageCount!=b?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1, "cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)}}).extend(CatalogHardCalendar),CatalogSimpleCalendar=Class({create:function(b){this._super(b)},initBook:function(){this._super()},showOrHideLiteThumbnail:function(){this.flipPageManager.array&& 0<this.flipPageManager.array.length||this.status_zoom||1!=this.isFlipping&&1!=this.isZomming&&this.adjustBookPosition()},hideToolBarAndShowGuidBar:function(){this.status_zoom||1==this.isFlipping||1==this.isZomming||(this.guidBar&&this.guidBar.show(),toolBar&&toolBar.hide(),this.mode="simple",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},hideGuidBarAndShowToolBar:function(){this.status_zoom||1==this.isFlipping||1==this.isZomming||(this.guidBar&&this.guidBar.hide(),toolBar&& toolBar.show(),this.mode="complex",thumbnail&&thumbnail.visible&&thumbnail.show(),this.adjustBookPosition())},adjustBookPosition:function(){this.pageWidthHeight=this.getFitWH();var b=this.pageWidthHeight.x/this.width,c=this.getTranY(b),d=this.getTranX(b);this.pageWidthHeight.x==this.width&&0==c&&0==d||this.flipBook.animateToTransform.bind(this.flipBook)(b,{x:d,y:c},{x:50,y:0})},getTranX:function(b){b=this.getCssLeft();var c=this.getSpace(!0);return c.left+(windowWidth-c.left-c.right-this.width)/2- b},getTranY:function(b){if(!bookConfig.retainBookCenter)return 0;var c=0;b=this.height*b/4;1!=this.currentPageIndex||bookConfig.isTheBookOpen||(c=rightToLeft?b:-b);this.currentPageIndex==totalPageCount&&(c=rightToLeft?-b:b);b=this.getCssTop();var d=this.getSpace(!0);return d.top+(windowHeight-d.top-d.bottom-this.pageWidthHeight.y)/2-b+c},getSpace:function(b){var c=bookConfig.leftMargin+templateArea.getLeftWidth(),d=bookConfig.rightMargin+templateArea.getRightWidth(),e=bookConfig.topMargin+templateArea.getTopHeight(), f=bookConfig.bottomMargin+templateArea.getBottomHeight();b&&(c+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),0),d+=Math.max(bookConfig.hardCoverBorderWidth+totalThicknessWidth(!0),0),e+=bookConfig.hardCoverBorderWidth,f+=bookConfig.hardCoverBorderWidth);return{left:c,right:d,top:e,bottom:f}}}).extend(CatalogCalendar),CatalogSimpleHardCalendar=Class({bookType:BookType.catalog_book,create:function(b){this._super(b)},crossFlipMode:function(b){var c=this.currentPageIndex;return 0<= [1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},toSoftPage:function(b){if(bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1; 0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toHardPage:function(b){if(!bookConfig.HardInnerPageEnable)return!1;var c=this.currentPageIndex;if(0<=[1,2,3].indexOf(c)&&0<=[1,2,3].indexOf(b)||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b))return!1;0>[1,totalPageCount].indexOf(c)&&[1,totalPageCount].indexOf(b);return!0},toCoverPage:function(b){var c=this.currentPageIndex;return 0>[1,2,totalPageCount- 1,totalPageCount].indexOf(c)&&0>[1,2,totalPageCount-1,totalPageCount].indexOf(b)||0<=[2,3].indexOf(c)&&0>[1,totalPageCount].indexOf(b)||0>[1,totalPageCount].indexOf(c)&&0>[1,totalPageCount].indexOf(b)?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&1!=b&&2!=b&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){1==this.currentPageIndex?gotoPageFun(2,!1,"cross page"): this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):1==b&&gotoPageFun(2,!1,"cross page")},initBook:function(){this._super();this.hardCover=new HardCalendarCover(this.flipBook)},newPage:function(b){return 1==b||2==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book):bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page", !1,BookType.catalog_book)},followToPoint:function(b,c,d){this._super(b,c,d);this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth())},getDownUpHardPage:function(b,c,d){this.addPageArray([b,c]);d?(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!0),this.pageArray[c]&&this.pageArray[c].setUpOrDown(!1),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-up-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-down-side")):(this.pageArray[b]&&this.pageArray[b].setUpOrDown(!1), this.pageArray[c]&&this.pageArray[c].setUpOrDown(!0),this.pageArray[b]&&this.pageArray[b].setCSSByName("flip-hard-down-side"),this.pageArray[c]&&this.pageArray[c].setCSSByName("flip-hard-up-side"));return[this.pageArray[b],this.pageArray[c]]},setAttachmentBeforeFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(b,this.getThicknessWidth(),this.currentPageIndex)},afterCurling:function(){this._super();this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(), this.currentPageIndex)},setAttachmentAfterFlipTo:function(b){this._super(b);this.hardCover&&this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},getThicknessWidth:function(){return[0,0]},onResize:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth());this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},resizeBook:function(b,c){this._super(b,c);this.hardCover.onResize(b,c,this.getThicknessWidth()); this.hardCover.refresh(this.currentPageIndex,this.getThicknessWidth(),this.currentPageIndex)},show:function(){this._super();this.hardCover.show()},hide:function(){this._super();this.hardCover.hide()}}).extend(CatalogSimpleCalendar),OpenCatalogSimpleHardCalendar=Class({crossFlipMode:function(b){var c=this.currentPageIndex;return 0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(c)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)||totalPageCount!=c&&totalPageCount!=b?!1: !0},toSoftPage:function(b){return bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toHardPage:function(b){return!bookConfig.HardInnerPageEnable||0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(this.currentPageIndex)&&0<=[totalPageCount-1,totalPageCount-2,totalPageCount].indexOf(b)?!1:!0},toCoverPage:function(b){return totalPageCount!=this.currentPageIndex&& totalPageCount!=b?!1:!0},isHardPage:function(b,c){return bookConfig.HardInnerPageEnable&&b!=totalPageCount&&b!=totalPageCount-1?!0:!1},isCoverPage:function(b,c){return b==totalPageCount||b==totalPageCount-1?!0:!1},gotoNearPage:function(b){this.currentPageIndex==totalPageCount?gotoPageFun(totalPageCount-1,!1,"cross page"):b==totalPageCount&&gotoPageFun(totalPageCount-1,!1,"cross page")},newPage:function(b){return 1==b||b==totalPageCount||b==totalPageCount-1?new HardPage(b,"page",!1,BookType.catalog_book): bookConfig.HardInnerPageEnable?new AlbumPage(b,"page",!1,BookType.catalog_book):new NormalPage(b,"page",!1,BookType.catalog_book)}}).extend(CatalogSimpleHardCalendar),SlideCalendarPage=Class({onPageLoaded:null,create:function(b,c,d,e){this.pageHeight=this.pageWidth=this.height=this.width=this.zIndex=0;this.pageIndex=b;this.pageArray=[];this.bookType=d;this.onPageLoaded=e;this.side=$("<div class='slide_side'></div>");this.side.attr("id",c+b);this.init(b)},init:function(b){isNaN(b)||(this.pages=$("<div class='slide_pages'></div>"), this.initPages(b),this.setPageCss(),this.side.append(this.pages),this.initEvent())},initEvent:function(){this.adContainer&&this.adContainer.css({"z-index":3});isBelowIE9()?this.pages.IEZoom({side:this,zoomIn:this.zoomIn.bind(this),zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)}):this.pages.zoom({side:this,zoomIn:this.zoomIn.bind(this),zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)})},zoomIn:function(b){b=BookInfo.getBook();b.status_zoom=!0;b.adContainer&&b.adContainer.css({"z-index":1}); StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(d){d.setAsZoomout();d.executeCallback()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!1);if(!isPhone()&&!isPad()){this.switchLargeImage();bookConfig.ZoomToolbarVisible&&!this.controlBar&&(this.controlBar=new ZoomControlBar(tmpContainer),this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,templateArea.getTopHeight()+c+5));if(this.controlBar){var c="lite"==bookConfig.ToolbarViewMode&&bookType== BookType.catalog_book?50:0;this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,templateArea.getTopHeight()+c+5);this.controlBar.setVisible(!0)}global.canMagnifierZoom&&BookInfo.getBook().unMagnifierZoom()}},zoomOut:function(){var b=BookInfo.getBook();b.status_zoom=!1;b.flipping||!b.adContainer||1!=b.currentPageIndex||bookConfig.isTheBookOpen||b.adContainer.css({"z-index":3});gotoPageFun(b.toPageIndex,!1,"change book type");StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(c){c.setAsZoomin(); c.executeCallback()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!0);this.switchNormalImage();this.controlBar&&this.controlBar.setVisible(!1)},onZoomed:function(b){if(isPhone()||isPad()){var c=BookInfo.getBook(),d=BookInfo.getCurrentPages();if(void 0!=d&&null!=d)for(var e=0;e<d.length;e++){var f=c.pageArray[d[e]];f&&(f.resizeSvg(Math.round(this.pageWidth*b.scale),Math.round(this.pageHeight*b.scale)),bookConfig.highDefinitionConversion?f.zoomInSideImage():(1<b.scale&&f.zoomInSideImage(), 1==b.scale&&f.zoomOutSideImage()))}}else b&&!this.pages.parameters.resize&&(this.pages.parameters.resize=!0,b=this.pages.offset().left,c=this.pages.offset().top,b-=this.pages.parameters.left,c-=this.pages.parameters.top,d=this.pages.parameters.scale,1!=d&&(this.resizePages(parseInt(this.pageWidth*d),parseInt(this.pageHeight*d)),d=1),d=transformCSS({tran:{x:b,y:c},scale:d,origin:{x:0,y:0}}),this.pages.css(d),this.pages.parameters&&(this.pages.parameters.tran={x:b,y:c},this.pages.parameters.scale=1, this.pages.parameters.toScale=1,this.pages.parameters.width=$(this.pages).width(),this.pages.parameters.height=$(this.pages).height(),this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize=!1))},mouseWheelFlip:function(){var b;this.side.parent().bind(_event._mousewheel,function(c){if(void 0!=b&&150>new Date-b)var d=!1;else b=new Date,d=!0;if(!d)return!1;d=c.originalEvent;d=Math.max(-1,Math.min(1,d.wheelDelta||-d.detail));c=c.originalEvent?c.originalEvent:c;this.status_zoom&&(c={pointers:[{pageX:c.pageX, pageY:c.pageY},{pageX:c.pageX,pageY:c.pageY}]},0>d?this.controlBar&&this.controlBar.zoomDown(c):this.controlBar&&this.controlBar.zoomUp(c));!this.status_zoom&&bookConfig.mouseWheelFlip&&(0>d?nextPageFun("mouse wheel flip"):previousPageFun("mouse wheel flip"));if(bookConfig.mouseWheelFlip)return stopEvent(c),!1}.bind(this))},initPages:function(b){b=bookConfig.isTheBookOpen?2*b:2*b-1;var c=b-1;var d=rightToLeft?b:c;b=rightToLeft?c:b;this.addPageArray([d,b]);this.leftPage=this.pageArray[d];this.rightPage= this.pageArray[b]},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});!this.rightPage&&this.leftPage&&bookConfig.retainBookCenter?(this.leftPage.centerPage(),this.leftPage.setCSSByStyle(b)):!this.leftPage&&this.rightPage&&bookConfig.retainBookCenter?(this.rightPage.centerPage(),this.rightPage.setCSSByStyle(b)):(this.leftPage&&(this.leftPage.setUpOrDown(!0),this.leftPage.setCSSByStyle(b)),this.rightPage&&(this.rightPage.setUpOrDown(!1),this.rightPage.setCSSByStyle(b)))},addPageArray:function(b){if(b&& this.pageArray)for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||this.pageArray[b[c]])){var d=new Page(b[c],"page",this.bookType,this.onPageLoaded);d.hideMiddleShadow();d.onResize(this.pageWidth,this.pageHeight);this.pageArray[b[c]]=d;this.pages.append(d.side)}},fillContent:function(b){this.pageArray[b]&&this.pageArray[b].fillContent()},fillImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].fillContent()},remove:function(){this.controlBar&& this.controlBar.destroy();this.side.remove();this.side=void 0},setCSSByStyle:function(b){this.side.css(b)},setCSSByName:function(b){this.side.addClass(b)},onResize:function(b,c){this.width=b;this.height=c;this.resetPages()},resetPages:function(){if(this.pages){var b=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,c=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;c=fitPageWidthHeight(this.width, this.height,b,2*c);b=parseInt(c.x);c=2*parseInt(c.y/2);this.resizePages(b,c);this.pages.css({left:(this.width-b)/2+"px",top:(this.height-c)/2+"px"});b=transformCSS({rotate:0,tran:{x:0,y:0}});this.pages.css(b);this.pages.parameters&&(this.pages.parameters.tran={x:0,y:0},this.pages.parameters.scale=1,this.pages.parameters.toScale=1,this.pages.parameters.width=$(this.pages).width(),this.pages.parameters.height=$(this.pages).height(),this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize= !1,this.pages.swipeInterval&&this.pages.swipeInterval.stop(),this.pages.animateInterval&&this.pages.animateInterval.stop(),this.pages.parameters.zoomFlag=!1,this.pages.parameters.zoomOut=!0,this.pages.parameters.toScale=1,this.pages.parameters.scale=1);this.controlBar&&this.controlBar.setVisible(!1)}},resizePages:function(b,c){this.pageWidth=b;this.pageHeight=c;this.pages.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});b=this.pageWidth;c=this.pageHeight/2;for(var d=0;d<this.pageArray.length;d++)if(this.pageArray[d])this.pageArray[d].onResize(b, c)},loading:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].loading()},setLeftOrRight:function(b){this.isLeft=b},reset:function(){},getSide:function(){return this.side},setZIndex:function(b){this.zIndex=b;this.side.css({"z-index":b})},getZIndex:function(){return this.zIndex},enterSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].enterSide()},leaveSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&& this.pageArray[b].leaveSide()},initSelectTextEvent:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initSelectTextEvent()},destroySelect:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].destroySelect()},initMagnifierEvent:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initMagnifierEvent()},destroyMagnifier:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].destroyMagnifier()}, pauseAnimation:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].pauseAnimation()},startAnimation:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].startAnimation()},addHistoryTexts:function(b){for(var c=0;c<this.pageArray.length;c++)this.pageArray[c]&&this.pageArray[c].addHistoryTexts(b)},highlightSearch:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].highlightSearch()},clearHighlight:function(){for(var b= 0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].clearHighlight()},resetSlider:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].resetSlider()},initReaderOrSlider:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initReaderOrSlider&&this.pageArray[b].initReaderOrSlider()},fillPage:function(b,c){for(var d=0;d<this.pageArray.length;d++)this.pageArray[d]&&this.pageArray[d].fillPage(b,c)},zoomInSideImage:function(){for(var b= 0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].zoomInSideImage()},zoomOutSideImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].zoomOutSideImage()},switchLargeImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].switchLargeImage()},switchNormalImage:function(b){for(var c=0;c<this.pageArray.length;c++)this.pageArray[c]&&this.pageArray[c].switchNormalImage(b)},resizeSvg:function(b,c){for(var d=0;d< this.pageArray.length;d++)this.pageArray[d]&&this.pageArray[d].resizeSvg(b,c)}}),SlideBookPage=Class({onPageLoaded:null,create:function(b,c,d,e){this.pageHeight=this.pageWidth=this.height=this.width=this.zIndex=0;this.pageIndex=b;this.pageArray=[];this.bookType=d;this.onPageLoaded=e;this.side=$("<div class='slide_side'></div>");this.side.attr("id",c+b);this.init(b)},init:function(b){isNaN(b)||(this.pages=$("<div class='slide_pages'></div>"),this.initPages(b),this.setPageCss(),this.side.append(this.pages), this.initEvent())},initEvent:function(){this.adContainer&&this.adContainer.css({"z-index":3});isBelowIE9()?this.pages.IEZoom({side:this,zoomIn:this.zoomIn.bind(this),zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)}):this.pages.zoom({side:this,zoomIn:this.zoomIn.bind(this),zoomOut:this.zoomOut.bind(this),onZoomed:this.onZoomed.bind(this)})},zoomIn:function(b){b=BookInfo.getBook();b.status_zoom=!0;b.adContainer&&b.adContainer.css({"z-index":1});StateSynchronous.instance().findButtons("ZoomButton", !0).each(function(d){d.setAsZoomout();d.executeCallback()});window.toolBar&&window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!1);if(!isPhone()&&!isPad()){this.switchLargeImage();bookConfig.ZoomToolbarVisible&&!this.controlBar&&(this.controlBar=new ZoomControlBar(tmpContainer),this.controlBar.setPosition((windowWidth-this.controlBar.width)/2,templateArea.getTopHeight()+c+5));if(this.controlBar){var c="lite"==bookConfig.ToolbarViewMode&&bookType==BookType.catalog_book?50:0;this.controlBar.setPosition((windowWidth- this.controlBar.width)/2,templateArea.getTopHeight()+c+5);this.controlBar.setVisible(!0)}global.canMagnifierZoom&&BookInfo.getBook().unMagnifierZoom()}},zoomOut:function(){var b=BookInfo.getBook();b.status_zoom=!1;b.flipping||!b.adContainer||1!=b.currentPageIndex||bookConfig.isTheBookOpen||b.adContainer.css({"z-index":3});gotoPageFun(b.toPageIndex,!1,"change book type");StateSynchronous.instance().findButtons("ZoomButton",!0).each(function(c){c.setAsZoomin();c.executeCallback()});window.toolBar&& window.toolBar.btnZoom&&window.toolBar.changeZoomIcon(!0);this.switchNormalImage();this.controlBar&&this.controlBar.setVisible(!1)},onZoomed:function(b){if(isPhone()||isPad()){var c=BookInfo.getBook(),d=BookInfo.getCurrentPages();if(void 0!=d&&null!=d)for(var e=0;e<d.length;e++){var f=c.pageArray[d[e]];f&&(f.resizeSvg(Math.round(this.pageWidth*b.scale),Math.round(this.pageHeight*b.scale)),bookConfig.highDefinitionConversion?f.zoomInSideImage():(1<b.scale&&f.zoomInSideImage(),1==b.scale&&f.zoomOutSideImage()))}}else b&& !this.pages.parameters.resize&&(this.pages.parameters.resize=!0,b=this.pages.offset().left,c=this.pages.offset().top,b-=this.pages.parameters.left,c-=this.pages.parameters.top,d=this.pages.parameters.scale,1!=d&&(this.resizePages(parseInt(this.pageWidth*d),parseInt(this.pageHeight*d)),d=1),d=transformCSS({tran:{x:b,y:c},scale:d,origin:{x:0,y:0}}),this.pages.css(d),this.pages.parameters&&(this.pages.parameters.tran={x:b,y:c},this.pages.parameters.scale=1,this.pages.parameters.toScale=1,this.pages.parameters.width= $(this.pages).width(),this.pages.parameters.height=$(this.pages).height(),this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize=!1))},mouseWheelFlip:function(){var b;this.side.parent().bind(_event._mousewheel,function(c){if(void 0!=b&&150>new Date-b)var d=!1;else b=new Date,d=!0;if(!d)return!1;d=c.originalEvent;d=Math.max(-1,Math.min(1,d.wheelDelta||-d.detail));c=c.originalEvent?c.originalEvent:c;this.status_zoom&&(c={pointers:[{pageX:c.pageX,pageY:c.pageY},{pageX:c.pageX,pageY:c.pageY}]}, 0>d?this.controlBar&&this.controlBar.zoomDown(c):this.controlBar&&this.controlBar.zoomUp(c));!this.status_zoom&&bookConfig.mouseWheelFlip&&(0>d?nextPageFun("mouse wheel flip"):previousPageFun("mouse wheel flip"));if(bookConfig.mouseWheelFlip)return stopEvent(c),!1}.bind(this))},initPages:function(b){b=bookConfig.isTheBookOpen?2*b:2*b-1;var c=b-1;var d=rightToLeft?b:c;b=rightToLeft?c:b;this.addPageArray([d,b]);this.leftPage=this.pageArray[d];this.rightPage=this.pageArray[b]},setPageCss:function(){var b= transformCSS({rotate:0,tran:{x:0,y:0}});!this.rightPage&&this.leftPage&&bookConfig.retainBookCenter?(this.leftPage.centerPage(),this.leftPage.setCSSByStyle(b)):!this.leftPage&&this.rightPage&&bookConfig.retainBookCenter?(this.rightPage.centerPage(),this.rightPage.setCSSByStyle(b)):(this.leftPage&&(this.leftPage.setLeftOrRight(!0),this.leftPage.setCSSByStyle(b)),this.rightPage&&(this.rightPage.setLeftOrRight(!1),this.rightPage.setCSSByStyle(b)))},addPageArray:function(b){if(b&&this.pageArray)for(var c= 0;c<b.length;c++)if(!(0>=b[c]||b[c]>originTotalPageCount||this.pageArray[b[c]])){var d=new Page(b[c],"page",this.bookType,this.onPageLoaded);d.hideMiddleShadow();d.onResize(this.pageWidth,this.pageHeight);this.pageArray[b[c]]=d;this.pages.append(d.side)}},fillContent:function(b){this.pageArray[b]&&this.pageArray[b].fillContent()},fillImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].fillContent()},remove:function(){this.controlBar&&this.controlBar.destroy(); this.side.remove();this.side=void 0},setCSSByStyle:function(b){this.side.css(b)},setCSSByName:function(b){this.side.addClass(b)},onResize:function(b,c){this.width=b;this.height=c;this.resetPages()},resetPages:function(){if(this.pages){var b=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,c=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;c=fitPageWidthHeight(this.width,this.height, 2*b,c);b=2*parseInt(c.x/2);c=parseInt(c.y);this.resizePages(b,c);this.pages.css({left:(this.width-b)/2+"px",top:(this.height-c)/2+"px"});b=transformCSS({rotate:0,tran:{x:0,y:0}});this.pages.css(b);this.pages.parameters&&(this.pages.parameters.tran={x:0,y:0},this.pages.parameters.scale=1,this.pages.parameters.toScale=1,this.pages.parameters.width=$(this.pages).width(),this.pages.parameters.height=$(this.pages).height(),this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize=!1,this.pages.swipeInterval&& this.pages.swipeInterval.stop(),this.pages.animateInterval&&this.pages.animateInterval.stop(),this.pages.parameters.zoomFlag=!1,this.pages.parameters.zoomOut=!0,this.pages.parameters.toScale=1,this.pages.parameters.scale=1);this.controlBar&&this.controlBar.setVisible(!1)}},resizePages:function(b,c){this.pageWidth=b;this.pageHeight=c;this.pages.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});b=this.pageWidth/2;c=this.pageHeight;for(var d=0;d<this.pageArray.length;d++)if(this.pageArray[d])this.pageArray[d].onResize(b, c)},loading:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].loading()},setLeftOrRight:function(b){this.isLeft=b},reset:function(){},getSide:function(){return this.side},setZIndex:function(b){this.zIndex=b;this.side.css({"z-index":b})},getZIndex:function(){return this.zIndex},enterSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].enterSide()},leaveSide:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&& this.pageArray[b].leaveSide()},initSelectTextEvent:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initSelectTextEvent()},destroySelect:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].destroySelect()},initMagnifierEvent:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initMagnifierEvent()},destroyMagnifier:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].destroyMagnifier()}, pauseAnimation:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].pauseAnimation()},startAnimation:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].startAnimation()},addHistoryTexts:function(b){for(var c=0;c<this.pageArray.length;c++)this.pageArray[c]&&this.pageArray[c].addHistoryTexts(b)},highlightSearch:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].highlightSearch()},clearHighlight:function(){for(var b= 0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].clearHighlight()},resetSlider:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].resetSlider()},initReaderOrSlider:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].initReaderOrSlider&&this.pageArray[b].initReaderOrSlider()},fillPage:function(b,c){for(var d=0;d<this.pageArray.length;d++)this.pageArray[d]&&this.pageArray[d].fillPage(b,c)},zoomInSideImage:function(){for(var b= 0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].zoomInSideImage()},zoomOutSideImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].zoomOutSideImage()},switchLargeImage:function(){for(var b=0;b<this.pageArray.length;b++)this.pageArray[b]&&this.pageArray[b].switchLargeImage()},switchNormalImage:function(b){for(var c=0;c<this.pageArray.length;c++)this.pageArray[c]&&this.pageArray[c].switchNormalImage(b)},resizeSvg:function(b,c){for(var d=0;d< this.pageArray.length;d++)this.pageArray[d]&&this.pageArray[d].resizeSvg(b,c)}}),SingleSlideBookPage=Class({initPages:function(b){this.addPageArray([b]);this.page=this.pageArray[b]},resetPages:function(){if(this.pages){if(bookConfig.isSingleBookFullWindowOnMobile&&(isPhone()||isPad()))var b=windowWidth,c=windowHeight;else b=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,c=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)- parseFloat(bookConfig.visibleAreaTop))/100,c=fitPageWidthHeight(this.width,this.height,b,c),b=parseInt(c.x),c=parseInt(c.y);this.resizePages(b,c);this.pages.css({left:(this.width-b)/2+"px",top:(this.height-c)/2+"px"});b=transformCSS({rotate:0,tran:{x:0,y:0}});this.pages.css(b);this.pages.parameters&&(this.pages.parameters.tran={x:0,y:0},this.pages.parameters.scale=1,this.pages.parameters.toScale=1,this.pages.parameters.width=$(this.pages).width(),this.pages.parameters.height=$(this.pages).height(), this.pages.parameters.origin={x:0,y:0},this.pages.parameters.resize=!1,this.pages.swipeInterval&&this.pages.swipeInterval.stop(),this.pages.animateInterval&&this.pages.animateInterval.stop(),this.pages.parameters.zoomFlag=!1,this.pages.parameters.zoomOut=!0,this.pages.parameters.toScale=1,this.pages.parameters.scale=1)}},resizePages:function(b,c){if(this.pages){this.pageWidth=b;this.pageHeight=c;this.pages.css({width:this.pageWidth+"px",height:this.pageHeight+"px"});b=this.pageWidth;c=this.pageHeight; for(var d=0;d<this.pageArray.length;d++)if(this.pageArray[d])this.pageArray[d].onResize(b,c)}},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.page&&(this.page.centerPage(),this.page.setCSSByStyle(b))},fillPage:function(b,c){this.page&&this.page.fillPage(b,c)}}).extend(SlideBookPage),SlideBook=Class({currentTran:0,create:function(b){this._super(b);this.currentPageIndex=this.getRealBookIndex(b.currentPageIndex);this.mainPageIndex=this.getRealBookIndex(b.currentPageIndex);this.initBook(); this.initEvent()},initBook:function(){this.flipBook=$("<div class='SlideBook' id='SlideBook' ></div>");this.parent.append(this.flipBook);this.initAttachments()},initAttachments:function(){this.showPage=this.flipBook;this.bookAttachments=new BookAttachmentsBuilder(this.flipBook,this.currentPageIndex,this,this.options.isDoublePage);this.options.thickness&&this.bookAttachments.thickness(!0);this.options.bookshadow&&this.bookAttachments.bookshadow();this.options.grayshadow&&this.bookAttachments.grayshadow(); this.options.miniFullscreen&&this.bookAttachments.miniFullscreen();this.options.bookpagenumber&&this.bookAttachments.bookpagenumber();this.options.staticad&&this.bookAttachments.staticad();this.options.zoommap&&this.bookAttachments.zoommap();this.options.bookmarktab&&this.bookAttachments.bookmarktab();this.options.noteadd&&this.bookAttachments.noteadd()},getBook:function(){return this.flipBook},fillPage:function(b,c){if(b)for(var d=this.pageArray.length,e=0;e<d;e++)this.pageArray[e]&&this.pageArray[e].fillPage(b, c),this.pageBackArray&&this.pageBackArray[e]&&this.pageBackArray[e].fillPage(b,c)},resetPages:function(b){isNaN(b)||0>=b||(this.unWrapPageExcludeArray([b,b+1,b-1]),this.addPageArray([b,b+1,b-1]),this.loading(),this.currentPage=this.pageArray[b],this.nextPage=this.pageArray[b+1],this.previousPage=this.pageArray[b-1],this.setPageCss())},addPageArray:function(b){if(b&&this.pageArray){for(var c=0;c<b.length;c++)if(!(0>=b[c]||b[c]>this.pageLength()||(this.pageArray[b[c]]&&this.fillContent(b[c]),this.pageArray[b[c]]))){var d= this.newPage(b[c]);d.onResize(this.width,this.height);this.pageArray[b[c]]=d;this.fillContent(b[c]);this.flipBook.append(d.getSide())}this.orderPages()}},setPagePosition:function(b,c){bookConfig.FlipDirection?(c*=windowHeight,c={top:c+"px"}):(c*=windowWidth,c={left:c+"px"});this.pageArray[b]&&this.pageArray[b].setCSSByStyle(c)},orderPages:function(){this.sequenceList={};for(var b=this.pageArray.length,c=0,d=this.mainPageIndex+1;d<b;d++)this.pageArray[d]&&(rightToLeft?c--:c++,this.pageArray[d].sequence= c,this.sequenceList[c]=d,this.setPagePosition(d,c));c=0;for(b=this.mainPageIndex;0<b;b--)this.pageArray[b]&&(this.pageArray[b].sequence=c,this.sequenceList[c]=b,this.setPagePosition(b,c),rightToLeft?c++:c--)},setPageCss:function(){var b=transformCSS({rotate:0,tran:{x:0,y:0}});this.currentPage&&this.currentPage.setCSSByStyle(b);this.previousPage&&this.previousPage.setCSSByStyle(b);this.nextPage&&this.nextPage.setCSSByStyle(b)},fillContent:function(b){(!this.flipping||imageLoaded[b])&&this.pageArray[b]&& this.pageArray[b].fillImage()},newPage:function(b){return new SlideBookPage(b,"slidePage",this.bookType)},pageLength:function(){return bookConfig.totalPageCount},unWrapPageExcludeArray:function(b){if(b&&this.pageArray){for(var c=this.pageArray.length,d=0;d<c;d++)!this.pageArray[d]||0<=b.indexOf(d)||(this.pageArray[d].remove(),this.pageArray[d]=void 0);this.orderPages()}},mouseWheelFlip:function(){if(bookConfig.mouseWheelFlip){var b;this.flipBook.bind(_event._mousewheel,function(c){if(void 0!=b&&150> (new Date).getTime()-b)var d=!1;else b=(new Date).getTime(),d=!0;if(!d)return!1;d=c.originalEvent;d=Math.max(-1,Math.min(1,d.wheelDelta||-d.detail));this.status_zoom&&(c={pointers:[{pageX:c.pageX,pageY:c.pageY},{pageX:c.pageX,pageY:c.pageY}]},0>d?this.currentPage.controlBar&&this.currentPage.controlBar.zoomDown(c):this.currentPage.controlBar&&this.currentPage.controlBar.zoomUp(c));this.status_zoom||!bookConfig.mouseWheelFlip||this.flipping||(0>d?nextPageFun("mouse wheel flip"):previousPageFun("mouse wheel flip")); if(bookConfig.mouseWheelFlip)return stopEvent(c),!1}.bind(this))}},flippingTo:function(b){this.currentPageIndex=b;this.currentPageIndex=Math.max(1,this.currentPageIndex);this.currentPageIndex=Math.min(originTotalPageCount,this.currentPageIndex)},getRealPageIndex:function(){return this.currentPageIndex},getRealBookIndex:function(b){return b},gotoPage:function(b,c){if(!isNaN(b)){this.toPageIndex=b;if(this.status_zoom)return b={pointers:[{pageX:windowWidth/2,pageY:windowHeight/2}]},c=this.pageArray[this.currentPageIndex].pages, c.onDoubleTap.bind(c)(b),!0;b=this.getRealBookIndex(b);0>=b||b>this.pageLength()||!this.flipEffect(b)||(!c&&flipHistory&&flipHistory.addFromCurrentIndex(this.toPageIndex),this.flippingTo(b),playFlipSound(),bookConfig.restorePageVisible&&window.localStorage.setItem(realLocation+"?historyPageIndex",this.toPageIndex),this.flipInterval&&this.flipInterval.stop(),this.refreshPages(b),this.flipIntervalTmp(b))}},flipEffect:function(b){return this.status_zoom||b==this.currentPageIndex||this.flipping?!1:!0}, flipIntervalTmp:function(b){var c=this.currentTran,d=this.getFlipTo(b);this.flipping=!0;var e=function(f,g,h){f<g?(f=(0,$.easing["easeInOut"+h])(null,f,c,d-c,g),this.setBookTran(f)):(this.afterFlipTo(),this.flipInterval.stop(),BookEvent.trigger("afterFlipPage",[b]))}.bind(this);this.flipInterval=function(f,g){e(f,g,"Sine")}.animation(this,this.flippingTime)},refreshPages:function(b){this.setAttachmentBeforeFlipTo(b);if(!this.pageArray[b]){var c=this.getCurrentViewPageIndex(),d=bookConfig.FlipDirection? this.currentTran-this.height:this.currentTran-this.width;(b>c||b<this.mainPageIndex)&&!rightToLeft&&(d=this.currentTran);(b<c||b>this.mainPageIndex)&&rightToLeft&&(d=this.currentTran);this.addPageArray([b]);this.setBookTran(d)}this.showPage=this.pageArray[b].pages},getCurrentViewPageIndex:function(){var b=Math.abs(this.currentTran);return this.sequenceList[(0>=this.currentTran?1:-1)*(bookConfig.FlipDirection?Math.floor(b/this.height)+1+(b%this.height>this.height/2)?0:1:Math.floor(b/this.width)+1+ (b%this.width>this.width/2)?0:1)]},getFlipTo:function(b){return this.pageArray[b]&&this.pageArray[b].sequence?-this.pageArray[b].sequence*(bookConfig.FlipDirection?windowHeight:windowWidth):0},getCurrentTran:function(){return this.currentTran},setBookTran:function(b){if(bookConfig.FlipDirection){var c=transformCSS({rotate:0,tran:{x:0,y:b}});isBelowIE9()&&(c={top:b+this.bookTop+"px"})}else c=transformCSS({rotate:0,tran:{x:b,y:0}}),isBelowIE9()&&(c={left:b+this.bookLeft+"px"});this.setCSSByStyle(c); this.currentTran=b},onResize:function(){this.resize();this.status_zoom=!1;this.showPage=this.pageArray[this.currentPageIndex].pages},resize:function(){this.endFlip();this.resizeBook();this.resizePage(this.width,this.height);this.resetPages(this.currentPageIndex);this.resizeAdvertisement()},getTop:function(){return this.bookTop},resizeBook:function(){var b=bookConfig.topMargin+templateArea.getTopHeight(),c=bookConfig.bottomMargin+templateArea.getBottomHeight(),d=bookConfig.leftMargin+templateArea.getLeftWidth(), e=bookConfig.rightMargin+templateArea.getRightWidth();e=windowWidth-d-e;c=windowHeight-b-c;var f=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,g=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;bookConfig.FlipDirection?(f=fitPageWidthHeight(e,c,f,2*g),this.width=parseInt(f.x),this.height=2*parseInt(f.y/2),this.bookTop=b+(c-this.height)/2,this.bookLeft=d+(e-this.width)/2, bookType==BookType.slide_book&&useTheAliCloudChart(this.width,parseInt(f.y/2))):(f=fitPageWidthHeight(e,c,2*f,g),this.width=2*parseInt(f.x/2),this.height=parseInt(f.y),this.bookTop=b+(c-this.height)/2,this.bookLeft=d+(e-this.width)/2,bookType==BookType.slide_book&&useTheAliCloudChart(parseInt(f.x/2),this.height));this.flipBook.css({width:this.width+"px",height:this.height+"px",left:this.bookLeft+"px",top:this.bookTop+"px"})},resizeAdvertisement:function(){var b=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+ parseFloat(bookConfig.visibleAreaRight))/100,c=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;bookConfig.FlipDirection?(b=fitPageWidthHeight(this.width,this.height,b,2*c),this.pageWidth=parseInt(b.x),this.pageHeight=2*parseInt(b.y/2)):(b=fitPageWidthHeight(this.width,this.height,2*b,c),this.pageWidth=2*parseInt(b.x/2),this.pageHeight=parseInt(b.y))},resizePage:function(b,c){for(var d=this.pageArray.length,e=0;e<d;e++)this.pageArray[e]&& (this.pageArray[e].onResize(b,c),this.pageArray[e].controlBar&&this.pageArray[e].controlBar.setVisible(!1))},getHeight:function(){return this.height},getWidth:function(){return this.width},getScale:function(){return this.currentPage.pages.parameters.toScale},getCssLeft:function(){return parseInt(this.flipBook.css("left"))},getCssTop:function(){return parseInt(this.flipBook.css("top"))},checkFlipping:function(){this.flipping=!1;this.loading();this.fillContent(this.currentPageIndex)},afterFlipTo:function(){this.mainPageIndex= this.currentPageIndex;this.resetPages(this.currentPageIndex);this.setBookTran(0);this.startTran=this.currentTran;this.checkFlipping();this.setAttachmentAfterFlipTo()},setAttachmentBeforeFlipTo:function(){this.bookAttachments.setAttachmentBeforeFlipTo()},setAttachmentAfterFlipTo:function(){this.stopMedia();this.resetSlider();this.flipping||this.enterPage();bookConfig.ThumbnailsButtonVisible&&thumbnail.clearHighLight();bookConfig.ThumbnailsButtonVisible&&thumbnail.setHighLight(this.getRealPageIndex()); window.resizeBookAfterFlip&&!this.flipping&&window.setTimeout(function(){onStageResize()},30);this.bookAttachments.setAttachmentAfterFlipTo()},endFlip:function(){this.flipping=!1},loading:function(){this.flipping||this.pageArray[this.currentPageIndex]&&this.pageArray[this.currentPageIndex].loading()},getCurrentPageIndex:function(){return this.getRealPageIndex()},getCurrentPages:function(){return[this.currentPageIndex]},setCSSByStyle:function(b){this.flipBook.css(b)},setShow:function(b){},hide:function(){Log.debug("slide book hide."); this.visible=!1;this.setCSSByStyle({display:"none"});this.stopMedia();this.resetSlider();this.bookAttachments&&this.bookAttachments.hide()},show:function(){Log.debug("slide book show.");this.visible=!0;this.setCSSByStyle({display:"block"});this.enterPage();this.bookAttachments&&this.bookAttachments.show()},enterPage:function(){this.afterChangeBookType();this.openShownMedia();this.addSearchHighlight()},addSearchHighlight:function(){var b=this.currentPageIndex;this.pageArray[b]&&this.pageArray[b].highlightSearch()}, clearSearchHighlight:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].clearHighlight()},openShownMedia:function(){var b=this.currentPageIndex;this.pageArray[b]&&this.pageArray[b].enterSide();this.pageArray[b]&&this.pageArray[b].addHistoryTexts()},stopMedia:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].leaveSide()},resetSlider:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].resetSlider()}, afterChangeBookType:function(){console.log("afterChangeBookType");for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].initReaderOrSlider()},select:function(){this.selected=!0;var b=this.currentPageIndex;this.pageArray[b]&&(this.pageArray[b]&&this.pageArray[b].initSelectTextEvent(),this.pageArray[b].pages.parameters&&(this.pageArray[b].pages.parameters.eventCancel=!0))},unSelect:function(){this.selected=!1;var b=this.getCurrentPages();if(void 0!=b&&null!=b){for(var c=0;c< b.length;c++){var d=b[c];this.pageArray[d]&&(this.pageArray[d]&&this.pageArray[d].destroySelect(),this.pageArray[d].pages.parameters&&(this.pageArray[d].pages.parameters.eventCancel=!1))}StateSynchronous.instance().findButtons("SelectTextButton",!0).each(function(e){e.setAsUnSelect();e.executeCallback()})}},magnifierZoom:function(){this.selected=!0;var b=this.currentPageIndex;this.pageArray[b]&&this.pageArray[b]&&this.pageArray[b].initMagnifierEvent()},unMagnifierZoom:function(){this.selected=!1; var b=BookInfo.getCurrentPages();if(void 0!=b&&null!=b){for(var c=0;c<b.length;c++){var d=b[c];this.pageArray[d]&&this.pageArray[d]&&this.pageArray[d].destroyMagnifier()}bookConfig.MagnifierButtonVisible&&window.magnifierZoomBox&&window.magnifierZoomBox.hide();StateSynchronous.instance().findButtons("magnifier",!0).each(function(e){e.setAsZoomin()})}},switchLargeImage:function(){for(var b=this.pageArray.length,c=0;c<b;c++)this.pageArray[c]&&this.pageArray[c].switchLargeImage()},switchNormalImage:function(b){for(var c= this.pageArray.length,d=0;d<c;d++)this.pageArray[d]&&this.pageArray[d].switchNormalImage(b)},destroy:function(){}}).extend(Book); SlideBook.expand({initEvent:function(){this.moveDirectionType={MOVE_LEFT:-1,MOVE_RIGHT:1,MOVE_NONE:0};this.mouseMoveDirection=this.moveDirectionType.MOVE_NONE;this.hammerEventModular();this.mouseWheelFlip()},hammerEventModular:function(){var b=new Hammer.Manager(this.flipBook[0]);b.add(new Hammer.Pan);b.add((new Hammer.Swipe).recognizeWith(b.get("pan")));b.add(new Hammer.Press({time:"1000"}));b.add(new Hammer.Pinch);b.add(new Hammer.Tap({event:"doubletap",taps:2}));b.on("panstart panmove",this.onPan.bind(this)); b.on("press",this.onPress.bind(this));this.flipBook.bind("click",this.onTap.bind(this));this.flipBook.bind("mouseover mousemove",this.onOver.bind(this));this.flipBook.bind(_event._down,this.onDown.bind(this));$("body").bind(_event._end+" "+_event._leave,this.onUp.bind(this));this.flipBook.speed(this.onSwipe.bind(this))},onPan:function(b){this.selected||this.status_zoom||this.isZoomming||bookType!=this.bookType||this.status_zoom||this.status_resize||this.flipping||("panstart"==b.type&&(this.startTran= this.currentTran,this.panstart=!0),this.panstart&&(bookConfig.FlipDirection||bookConfig.upsideOnMobile()?this.setBookTran(this.startTran+b.deltaY):this.setBookTran(this.startTran+b.deltaX),"panend"==b.type&&(this.panstart=!1)))},onPress:function(b){},onTap:function(b){onWindowTap(b.srcEvent)},onOver:function(b){},onDown:function(b){this.fingleDown=!0},onUp:function(b){!this.flipping&&this.fingleDown&&(30<=Math.abs(this.currentTran-this.startTran)&&(this.currentTran>this.startTran&&!rightToLeft||this.currentTran< this.startTran&&rightToLeft?previousPageFun("window click"):this.currentTran!=this.startTran&&nextPageFun("window click")),this.startTran=this.currentTran,this.panstart=this.fingleDown=!1,this.onBack())},onBack:function(){if(0!=this.currentTran&&!this.flipping){this.flipping=!0;var b=this.currentTran,c=function(d,e,f){d<e?(d=(0,$.easing["easeInOut"+f])(null,d,b,0-b,e),this.setBookTran(d)):(this.flipping=!1,this.flipInterval.stop(),this.setBookTran(0),this.startTran=this.currentTran)}.bind(this);this.flipInterval= function(d,e){c(d,e,"Sine")}.animation(this,this.flippingTime)}},getNextPage:function(b){this.currentTran>this.startTran&&!rightToLeft||this.currentTran<this.startTran&&rightToLeft?previousPageFun(b):nextPageFun(b)},onSwipe:function(b,c){if(!(this.selected||this.status_zoom||this.isZomming||this.dragToFlip)){var d=30;bookConfig.FlipDirection?(d=d*this.height/1600,b=c):d=d*this.width/1600;Math.abs(b)<=d||(b<-d?rightToLeft?previousPageFun("swipe to flip"):nextPageFun("swipe to flip"):b>d&&(rightToLeft? nextPageFun("swipe to flip"):previousPageFun("swipe to flip")))}}}); var DoubleSlideBook=Class({getRealPageIndex:function(){var b=2*this.currentPageIndex-1;return b=Number.between(b,1,bookConfig.totalPageCount)},getRealBookIndex:function(b){b=bookConfig.isTheBookOpen?Math.ceil(b/2):parseInt(b/2)+1;return b=Number.between(b,1,this.pageLength())},pageLength:function(){return bookConfig.isTheBookOpen?Math.ceil(bookConfig.totalPageCount/2):parseInt(bookConfig.totalPageCount/2)+1},newPage:function(b){return bookConfig.FlipDirection?new SlideCalendarPage(b,"slidePage",this.bookType): new SlideBookPage(b,"slidePage",this.bookType)}}).extend(SlideBook),SingleSlideBook=Class({getRealPageIndex:function(){var b=this.currentPageIndex;return b=Number.between(b,1,bookConfig.totalPageCount)},getRealBookIndex:function(b){return b=Number.between(b,1,bookConfig.totalPageCount)},pageLength:function(){return bookConfig.totalPageCount},newPage:function(b){return new SingleSlideBookPage(b,"slidePage",this.bookType)},resizeBook:function(){var b=bookConfig.topMargin+templateArea.getTopHeight(), c=bookConfig.bottomMargin+templateArea.getBottomHeight(),d=bookConfig.leftMargin+templateArea.getLeftWidth(),e=bookConfig.rightMargin+templateArea.getRightWidth();e=windowWidth-d-e;c=windowHeight-b-c;var f=bookConfig.largePageWidth*(-parseFloat(bookConfig.visibleAreaLeft)+parseFloat(bookConfig.visibleAreaRight))/100,g=bookConfig.largePageHeight*(parseFloat(bookConfig.visibleAreaBottom)-parseFloat(bookConfig.visibleAreaTop))/100;f=fitPageWidthHeight(e,c,f,g);this.width=parseInt(f.x);this.height=parseInt(f.y); this.bookTop=b+(c-this.height)/2;this.bookLeft=d+(e-this.width)/2;bookType==BookType.singleSlide_book&&useTheAliCloudChart(this.width,this.height);this.flipBook.css({width:this.width+"px",height:this.height+"px",left:this.bookLeft+"px",top:this.bookTop+"px"})}}).extend(SlideBook),PcDoubleSlideBook=Class({bookType:BookType.slide_book,create:function(b){this._super(b)},onResize:function(){this._super();if(bookConfig.FlipDirection)this.bookAttachments.onResize(this.width,this.height/2);else this.bookAttachments.onResize(this.width/ 2,this.height)}}).extend(DoubleSlideBook),PcSingleSlideBook=Class({bookType:BookType.singleSlide_book,create:function(b){this._super(b)},onResize:function(){this._super();this.bookAttachments.onResize(this.width,this.height)}}).extend(SingleSlideBook),BookEvent=Class({statics:{bindEvent:function(b,c){"string"==typeof b&&c&&"function"==typeof c&&(this[b]||(this[b]=[]),this[b].push(c))},bindOnceEvent:function(b,c){if("string"===typeof b&&c&&"function"===typeof c){var d=function(e){for(var f=[],g=0;g< arguments.length;++g)f[g-0]=arguments[g];f=c.apply(this,f);this.removeEvent(b,d);return f}.bind(this);this[b]||(this[b]=[]);this[b].push(d)}},removeEvent:function(b,c){"string"==typeof b&&c&&"function"==typeof c&&this[b].removeElement(c)},trigger:function(b,c){if((b=this[b])&&0!=b.length){for(var d=!1,e=0;e<b.length;e++)if("function"==typeof b[e]){var f=b[e].apply(this,c);d=(f?f.paused:!1)||d}return d}}}}); function statisticalData(b,c){global.sendvisitinfo&&"function"==typeof global.sendvisitinfo&&sendvisitinfo(b,c)} var googleAnalytics=function(){bookConfig.googleAnalyticsID&&window.setTimeout(function(){loadJavascript("https://www.googletagmanager.com/gtag/js?id="+bookConfig.googleAnalyticsID,function(){window.dataLayer=window.dataLayer||[];window.gtag=function(){dataLayer.push(arguments)};gtag("js",new Date);gtag("config",bookConfig.googleAnalyticsID)},function(){})},3E3)},googleTagManager=function(){bookConfig.googleTagManagerID&&window.setTimeout(function(){var b=window,c=bookConfig.googleTagManagerID;b.dataLayer= b.dataLayer||[];b.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"});b=document.getElementsByTagName("script")[0];var d=document.createElement("script");d.async=!0;d.src="https://www.googletagmanager.com/gtm.js?id="+c;b.parentNode.insertBefore(d,b)},3E3)},PluginEvent=Class({statics:{bindEvent:function(b,c){"string"==typeof b&&c&&"function"==typeof c&&(this[b]||(this[b]=[]),this[b].push(c))},removeEvent:function(b,c){"string"==typeof b&&c&&"function"==typeof c&&this[b].removeElement(c)}, trigger:function(b,c){if((b=this[b])&&0!=b.length){for(var d=!1,e=0;e<b.length;e++)"function"==typeof b[e]&&(d=b[e].apply(this,c)||d);return d}}}}),logEvent=Class({statics:{printLog:!1,visit:function(b,c,d,e,f,g){logEvent.printLog&&console.log("visit",b,c,d,e,f,g)},beforeFlipPage:function(b){logEvent.printLog&&console.log("beforeFlipPage",b)},afterFlipPage:function(b){logEvent.printLog&&console.log("afterFlipPage",b)},flipPage:function(b,c,d,e){statisticalData(1,c);bookConfig.googleAnalyticsID&&window.gtag&& gtag("event",getCustomEventName()+"click",{event_category:"flipPage",event_label:"goto page:"+c});logEvent.printLog&&console.log("flipPage",b,c,d,e)},suspendFlipPage:4,zoomIn:function(b,c){logEvent.printLog&&console.log("zoomIn",b,c)},zoomOut:function(b,c){logEvent.printLog&&console.log("zoomOut",b,c)},zoomMove:function(b,c){logEvent.printLog&&console.log("zoomMove",b,c)},jumpLink:function(b,c,d){logEvent.printLog&&console.log("jumpLink",b,c,d)},clickButton:function(b,c,d){bookConfig.googleAnalyticsID&& window.gtag&>ag("event",getCustomEventName()+"click",{event_category:c,event_label:c+" button is clicked"});logEvent.printLog&&console.log("clickButton",b,c,d)},search:function(b,c,d){statisticalData(6,b);logEvent.printLog&&console.log("search",b,c,d)},share:function(b,c,d){logEvent.printLog&&console.log("share",b,c,d)},print:function(b,c,d){logEvent.printLog&&console.log("print",b,c,d)},addBookmark:function(b,c,d){logEvent.printLog&&console.log("addBookmark",b,c,d)},deleteBookmark:function(b){logEvent.printLog&& console.log("deleteBookmark",b)},editBookmark:function(b,c,d){logEvent.printLog&&console.log("deleteBookmark",b,c,d)},googleAdSense:function(b,c,d,e,f,g){logEvent.printLog&&console.log("googleAdSense",b,c,d,e,f,g)},playMedia:function(b,c,d,e,f){logEvent.printLog&&console.log("playMedia",b,c,d,e,f)},passward:function(b,c){logEvent.printLog&&console.log("passward",b,c)},clickPageItem:function(b,c,d,e,f,g){logEvent.printLog&&console.log("clickPageItem",b,c,d,e,f,g)},orientationchange:function(b,c,d){logEvent.printLog&& console.log("orientationchange",b,c,d)},windowClick:function(b,c,d){logEvent.printLog&&console.log("windowClick",b,c,d)},readArticle:function(b){logEvent.readArticle&&console.log("readArticle",b)}}});BookEvent.bindEvent("visit",logEvent.visit);BookEvent.bindEvent("flipPage",logEvent.flipPage);BookEvent.bindEvent("jumpLink",logEvent.jumpLink);BookEvent.bindEvent("zoomIn",logEvent.zoomIn);BookEvent.bindEvent("zoomOut",logEvent.zoomOut);BookEvent.bindEvent("zoomMove",logEvent.zoomMove); BookEvent.bindEvent("clickButton",logEvent.clickButton);BookEvent.bindEvent("search",logEvent.search);BookEvent.bindEvent("share",logEvent.share);BookEvent.bindEvent("print",logEvent.print);BookEvent.bindEvent("addBookmark",logEvent.addBookmark);BookEvent.bindEvent("deleteBookmark",logEvent.deleteBookmark);BookEvent.bindEvent("editBookmark",logEvent.editBookmark);BookEvent.bindEvent("googleAdSense",logEvent.googleAdSense);BookEvent.bindEvent("playMedia",logEvent.playMedia); BookEvent.bindEvent("passward",logEvent.passward);BookEvent.bindEvent("clickPageItem",logEvent.clickPageItem);BookEvent.bindEvent("orientationchange",logEvent.orientationchange);BookEvent.bindEvent("windowClick",logEvent.windowClick);BookEvent.bindEvent("suspendFlipPage",logEvent.suspendFlipPage);BookEvent.bindEvent("beforeFlipPage",logEvent.beforeFlipPage); function scrapOriginPageIndex(){window.realLocation=window.location.href.removeStartFrom("?");window.realLocation=realLocation.removeStartFrom("#");var b=bookConfig.OriginPageIndex,c=window.location.hash;""!=c&&3<c.length&&"#p="==c.substr(0,3)&&(b=parseInt(getRealPageNumber(c.substr(3,c.length-3))));b=Number.between(b,1,originTotalPageCount);if(bookConfig.restorePageVisible&&window.localStorage[realLocation+"?historyPageIndex"]){var d=parseInt(window.localStorage[realLocation+"?historyPageIndex"]); c=window.localStorage[realLocation+"?historySubmmit"];d!=b&&(bookConfig.isRestorePageFrameVisible?(!c||31<c&&(new Date).getTime()-parseInt(c)>=bookConfig.restorePageDuration||31>=c&&(new Date).getDate()!=parseInt(c))&&showMessage(getLanguage("restorePage","Would you like to restore previous session"),function(){window.localStorage.setItem(realLocation+"?historySubmmit",(new Date).getTime());gotoPageFun(window.localStorage[realLocation+"?historyPageIndex"])}):setTimeout(function(){gotoPageFun(d)}, 300))}return b} function initialization(){var b,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){if(1==d.nextAddress)return window.tmpContainer=$("<div id= 'tmpContainer' class='tmpContainer'></div>"),isPC()&&_agent_.browser.safari&&_agent_.system.name==_agent_.system.WINDOWS&&tmpContainer.css({"z-index":0}),$("body").append(tmpContainer),window.bookContainer=$("<div id= 'bookContainer' class='bookContainer'></div>"),tmpContainer.append(bookContainer),window.soundBaseURL="style/raw/",b=window.getWidth(), windowHeight=c=window.getHeight(),windowWidth=b,checkBookConfig(),selectLanguage(bookConfig.language),initImageBaseUrl(),global.onBookLoad=new LoadingBook(tmpContainer,bookConfig.loadingBackground),d.yield(initToolBarBrand(),2);if(3!=d.nextAddress)return window.top===window.self?d.jumpTo(3):d.yield(getUserInfo(),3);delayLoading();d.jumpToEnd()})} function getUserInfo(){var b,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){b=bookConfig.bookBaseURL;b.endsWith("/")||(b+="/");c=window.location.host.toLowerCase();if(c.match(/fliphtml5.com|flipbuilder/))try{$.ajax({url:b+"../getuserinfo.js",type:"get",crossDomain:!0,success:function(e){eval(e);window.userInfo=userInfo},error:function(e){console.log(e)}})}catch(e){console.log(err)}d.jumpToEnd()})}function extractBrandPath(b){b=b.split("/");b.pop();return b.join("/")} function initToolBarBrand(){var b,c,d,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress){b=_get(window,"bookConfig.toolBarBrandInfoVisible",void 0);if(void 0===b)return f.return();c=_get(window,"bookConfig.toolBarBrandInfoUrl","");return b&&""!==c?f.yield(fetchBrandInfo(c),2):(bookConfig.appLogoIcon="",f.return())}d=f.yieldResult;e=extractBrandPath(c);bookConfig.appLogoIcon=d&&d.logo?e+"/"+d.logo.replace("./",""):"";bookConfig.appLogoLinkURL=d&&d.url?getRealURL(d.url): "";f.jumpToEnd()})}function fetchBrandInfo(b){var c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){if(1==d.nextAddress)return d.setCatchFinallyBlocks(2),d.yield($.ajax({url:b,type:"get",dataType:"json"}),4);if(2!=d.nextAddress)return c=d.yieldResult,d.return(c);d.enterCatchBlock();return d.return(null)})} function delayLoading(){var b=function(){window.jsLoadingBar&&(jsLoadingBar.destroy(),onBookLoad.chooseBookStyle(),window.hasOwnProperty("GuideLoadingJS")&&jsLoadingBar instanceof GuideLoadingJS||(jsLoadingBar=null))};window.setTimeout(function(){window.loadingConfig&&loadingConfig.loadingVideo&&jsLoadingBar&&jsLoadingBar.showVideo?(jsLoadingBar.showVideo(),$(jsLoadingBar.video).bind("pause",function(){b()}),$(jsLoadingBar.video).bind("ended",function(){b()}),jsLoadingBar.video.ontimeupdate=function(){60<= jsLoadingBar.video.currentTime&&b()}):window.jsLoadingBar?b():onBookLoad.chooseBookStyle()},Math.max(1E3*parseInt(window.loadingConfig&&window.loadingConfig.loadingDisplayTime||.01),10))}var onWindowClick=function(){};window.isSupportWebp=!1; (function(){function b(d){window.isSupportWebp=d&&"load"===d.type?1==c.width:!1;"false"==GetQueryString("isSupportWebp")&&(window.isSupportWebp=!1);"true"==GetQueryString("isSupportWebp")&&(window.isSupportWebp=!0);var e=window.setInterval(function(){window.Module&&Module.isReady&&(window.clearInterval(e),initialization())},100)}var c=new Image;c.onerror=b;c.onload=b;c.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="})(); function initBookFrame(){useTheFliphtml5Service();window.rightToLeft=bookConfig.RightToLeft;initBrowserType();changeBookConfigValue("pageRestrictUrl",uiBaseURL+"articleEmpty.png");changeBookConfigValue("OriginPageIndex",bookConfig.OriginPageIndex?bookConfig.OriginPageIndex:1);changeBookConfigValue("upsideOnMobile",function(){return isPhone()||isPad()?bookConfig.alwaysDoublePageOnMobile&&window.innerHeight>window.innerWidth?!0:!1:!1});global.originTotalPageCount=parseInt(bookConfig.totalPageCount); global.totalPageCount=originTotalPageCount+(1==originTotalPageCount%2&&!bookConfig.isTheBookOpen||0==originTotalPageCount%2&&bookConfig.isTheBookOpen?1:0);initBook();changeShowBook(bookType);resizeFlipBook();resizeSlideBook();try{Module._monitorWH(window.key_index,bookConfig.largePageWidth/bookConfig.largePageHeight,originTotalPageCount)}catch(b){}};
Close