m+p&&(c=m+p-f.left-this.width()+g);f.top+l+this.height()>n+q&&(d=n+q-f.top-this.height()+h);f.left+kg?-50:50),g=this.getEffectiveLength(g),
this.moveTo(g),f.stopPropagation(),!1}}.bind(this);this.getLeft=function(){return parseInt(this.swiper.css("left"))}.bind(this);this.getRight=function(){return parseInt(this.swiper.css("right"))}.bind(this);this.getBottom=function(){return parseInt(this.swiper.css("bottom"))}.bind(this);this.getTop=function(){return parseInt(this.swiper.css("top"))}.bind(this);this.animateToPosition=function(f){var g=this.getCurrentLength();f=this.getEffectiveLength(f);var h=function(k,l,m){m=(0,$.easing["easeOut"+
m])(null,k,g,f-g,l);k");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};jQuery.fn.onTap=function(b){if(isPhone()||isPad())this.click(function(d){d.stopPropagation();b(d)});else{var c=new Hammer.Manager(this[0]);c.add(new Hammer.Tap({event:"tap",taps:1,threshold:5,time:400}));c.on("tap",function(d){d.srcEvent.stopPropagation();b(d)})}};jQuery.fn.onDoubleTap=function(b){var c=new Hammer.Manager(this[0]);c.add(new Hammer.Tap({event:"doubletap",taps:2}));c.on("doubletap",b)};var flipping=!1;
(function(b){bdor[5]="i";var c=function(d,f,g,h,k){if(void 0!=d&&null!=d){0>=h.length&&(k=b.extend({background:"green",cornersTop:!0,scale:"noresize"},k));d.prev();var l=0,m=!1,n=k.background,p=k.cornersTop,q=k.gradientColors||["#ddd","#eee","#fff"],r=k.scale,u=0,y=[];try{var D=d.clone();var C=D[0].getContext("2d");var x=d[0].getContext("2d");u=0}catch(K){x=C=D=null}this.images=h=h.each(function(K){if(!y[K]&&null!=x){var M=this;M.onload=function(){var S=1;if("noresize"!=r){var P=0==this.width?this.naturalWidth:
this.width,Y=0==this.height?this.naturalHeight:this.height,Z=f/P,N=g/Y;"fit"==r&&(S=1>Z||1>N?Math.min(Z,N):1);"fill"==r&&(S=Math.min(Z,N))}b(M).data("flip.scale",S);y[K]=x.createPattern(M,"no-repeat");y[K].width=P;y[K].height=Y;u++;u!=h.length||m||(m=!0,X())};M.complete&&window.setTimeout(function(){M.onload()},10)}}).get();this.patterns=y;var z=f,B=g,H=b.browser.msie?d.offset():null,F,I,E,L;b.browser.msie&&function(){var K=b("").width(f).height(g).css({position:"absolute",cursor:"default",zIndex:1}).appendTo(tmpContainer);
7==parseInt(b.browser.version)&&K.css({opacity:1E-6,background:"#FFF"});var M=function(){H=d.offset();return K.css({left:H.left+"px",top:H.top+"px"})};b(window).resize(M);return M()}();this.autoFlip=function(){window.clearInterval(F);I=(new Date).getTime();E=z;L=B/50;F=window.setInterval(U,0);l+=1;0>l&&(l=h.length-1);l==h.length&&(l=0)};this.timerFun=function(){this.timer=setInterval(this.autoFlip.bind(this),3E3)};this.timerFun();var U=this.flip=function(K){var M=(new Date).getTime()-I;700<=M?(window.clearInterval(F),
K&&K?(h.unshift(h.pop()),y.unshift(y.pop())):(h.push(h.shift()),y.push(y.shift())),z=f,B=g):(z=E-2*f*M/700,B=L+2*g*M/700/3);X()},T=function(K,M){if(null!=x){var S=K*f+M,P=-M/K;b.browser.msie&&(S=Math.round(S),P=Math.round(P));x.beginPath();x.moveTo(f,Math.min(S,g));x.lineTo(f,0);x.lineTo(Math.max(P,0),0);0>P?(x.lineTo(0,Math.min(M,g)),M
parseFloat(b.browser.version)){var R=C;R.clearRect(0,0,f,g);R.save();R.translate(1,0)}else R=x;Y=R.createLinearGradient(Y,Z,N,Q);Y.addColorStop(0,q[0]);Y.addColorStop(xa/M,q[1]);Y.addColorStop(1,q[2]);R.fillStyle=Y;R.beginPath();R.moveTo(-K/2,0);R.quadraticCurveTo((-K/2+z)/2+.02*z,B/2,z,B);R.quadraticCurveTo((f+z)/2,(2*f+K+B)/2-.02*(g-B),f,2*f+K);b.browser.mozilla&&1.9>parseFloat(b.browser.version)?
(R.save(),R.clip(),R.fillRect(0,0,f,g),R.restore(),x.drawImage(D[0],0,0),R.restore()):R.fill();x.fillStyle=n;T(2,K);x.fill();T(2,K);b.browser.safari||b.browser.opera||x.restore();h[1]||(h[1]=h[0]);K=h[1];M=b(K).data("flip.scale");if(b.browser.msie)x.fillStyle=y[1],x.fillStyle.width2=x.fillStyle.width*M,x.fillStyle.height2=x.fillStyle.height*M,x.fill();else{x.save();x.clip();if(b.browser.safari||b.browser.opera)x.scale(1,1/S),x.translate(-0,-P);x.drawImage(K,(f-K.width*M)/2,(g-K.height*M)/2,K.width*
M,K.height*M);x.restore();(b.browser.safari||b.browser.opera)&&x.restore()}}}}}};b.fn.jFlip=function(d,f,g,h,k,l){return this.each(function(){b(this).wrap("");if("true"==l){if(1>=g.length)return;var m=b("
"),n=b("
");b(this).parent().append(m).append(n)}var p=b(this).find("img"),q=b(document.createElement("canvas")).attr({width:d,height:f}).css({margin:0,width:d+"px",height:f+"px"});b(this).css({position:"absolute",left:"-9000px",top:"-9000px",display:"none"}).after(q);var r=new c(b(this).next(),d||300,f||300,p,g);"true"!=l||1>=g.length||(m.bind("click",function(){r.flip(!0)}),n.bind("click",function(){r.flip()}))})}})(jQuery);
function searchFromPages(b,c){var d=[];c=c.trim().toLowerCase();c=-1==c.indexOf(" ")?[c]:c.split(" ");var f;for(f=0;f
m)m=u,n=u+c[q].length,h=g.substring(n),0==q&&(k=u),q==c.length-1&&(l=u+r);else{p=!1;break}}else{p=!1;break}}p&&(m=[],n=getHighlightRealPageIndex(f),0>n||(m.search_page=n+1,m.search_title="page "+(n+1),
k=g.substring(0,k).lastIndexOf("."),-1==k?k=0:k++,n=g.substring(l),p=n.indexOf(".")+1,p=-1==p?n.length():l+p,g=g.substring(k,p),m.search_text=g,d.push(m)))}return d}function getSearchRealPageIndex(b){if(!window.search_pages||void 0==search_pages[b-1])return b;var c;(b=search_pages[b-1])&&(c=parseInt(b.index));return isNaN(c)||-1==c?-1:c+1}
function getHighlightRealPageIndex(b){if(!window.search_pages)return b;for(var c=-1,d=0;d=b?b-1:this.next(c.substring(0,b));this.__times=0;this.__index=-1};bdor[10]="l";
KMP.prototype.next=function(b){for(var c=Math.ceil(b.length/2);0")[0];var k=h.getContext("2d")}catch(D){return}var l=g.width(),m=g.height();
g=g[0];void 0==c&&(c=!1);var n=getHost(g.src),p=getHost();if(n&&p!==n){if(h=g.src.replace(n,p),g.src=h,0==c)$(g).on("load",function(){try{f.changeButtonColor(b,!0,d)}catch(D){}})}else{h.width=l;h.height=m;try{k.drawImage(g,0,0,g.naturalWidth,g.naturalHeight,0,0,l,m);var q=k.getImageData(0,0,l,m),r=k.getImageData(0,0,l,m);if(1!=g.colorChanged&&q){var u=Color(b).split();l=0;for(var y=q.data.length;lbrowserType)){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};
$.fn.speed=function(b){function c(r){r=void 0==r.originalEvent.touches?[r]:r.originalEvent.touches;if(1b.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="",f=0;f"+c[g]+"");f.push(k)}""!==b&&f.push(b);return f.join("")},isHTML:function(b){return b?!!b.match(/^(<\w+>?).*((<\/\w+>)|(\/>))$/g):!1},toText:function(b){return"string"!=typeof b?"":b.replace(/<\/?\w+>/g,"")},toLabel:function(b){b=b.replaceAll("<","<");return b.replaceAll(">",
">")}},LanguageTool={isEnglish:function(b){return/[\x00-\xff]/.test(b)},isChinese:function(b){return/[\u4E00-\u9FBF]/.test(b)},isArabic:function(b){return/[\u0600-\u06FF]|[\u0750-\u077F]/.test(b)},isUrdu:function(b){return this.isArabic(b)||/[\uFE70-\uFEFF]/.test(b)},isHebrew:function(b){return/[\u0590-\u05FF]|[\uFB00-\uFB4F]/.test(b)},isFarsi:function(b){return this.isUrdu(b)},isTai:function(b){return/[\u0E00-\u0E7F]/.test(b)},isHindi:function(b){return/[\u0900-\u097F]/.test(b)},isTamil:function(b){return/[\u0B80-\u0BFF]/.test(b)},
isHimalayaRahm:function(b){return/[\u0D00-\u0D7F]/.test(b)},isRightToLeft:function(b){return this.isArabic(b)||this.isUrdu(b)||this.isHebrew(b)||this.isFarsi(b)||this.isHindi(b)||this.isHimalayaRahm(b)}},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])}};function animateOnce(b,c,d,f,g,h){if(b&&c)if(void 0==d||0===d||isIE9())b.css(c),f&&f instanceof Function&&f();else{var k=!1;setAnimation(b,d,g,h);b.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){1!=k&&(k=!0,setAnimation(b,0),f&&f instanceof Function&&f())});b.css(c)}}
function setAnimation(b,c,d,f){if(b&&void 0!=c){100>c&&(c*=1E3);if(void 0==d||""==d)d="all";void 0==f&&(f="ease-in-out");f=d+" %dms "+f;0 "),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=$(""+b+"
");b.css("color",c);this.logDiv.append(b);
c=this.logDiv[0];c.scrollTop=c.scrollHeight},info:function(){if(this.isDebug()){$.browser&&$.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)){$.browser&&$.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)){$.browser&&$.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)){$.browser&&$.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)}}}),divHint=Class({create:function(b,c,d,f){this.instance=$("");this.setText(b);void 0==f&&(f=$("body"));f.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:iPadding=parseInt(b.replace("px",""))},addClass:function(b){this.instance.addClass(b)}});
Class("ObjectPool",{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;cb.children("img").width()&&(h=b.children("img").width());b.children("img")&&k>b.children("img").height()&&(k=b.children("img").height());var l=.7*k;try{f.style.width=h+"px";f.style.height=l+"px";f.width=h;f.height=l;
f.className="reflect";$(f).css({transform:"translateY(-1px)"});g.save();g.translate(0,k);g.scale(1,-1);g.drawImage(c,0,0,h,k);g.restore();g.globalCompositeOperation="destination-out";var m=g.createLinearGradient(0,0,0,l);m.addColorStop(1,"rgba(255, 0, 0, 1.0)");m.addColorStop(0,"rgba(255, 0, 0, 0)");g.fillStyle=m;g.rect(0,0,h,2*l);g.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||e;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',SearchItemRelation={NEARBY:0,SPACE:1,DOUBLE_SPACE:2,RETURN:3},PageTextSelectMode={LINE:0,COLUMN:1};
if(window.aliasLanguage){var source={btnFullScreen:["btnFullscreen"],btnDisableFullScreen:["btnExitFullscreen"],btnSelection:["btnSelectText"],btnNextPage:["btnPageForward"],btnPrePage:["btnPageBack"]},property;for(property in source)aliasLanguage[property]||(aliasLanguage[property]=source[property])}else window.aliasLanguage={btnFullScreen:["btnFullscreen"],btnDisableFullScreen:["btnExitFullscreen"],btnSelection:["btnSelectText"],btnNextPage:["btnPageForward"],btnPrePage:["btnPageBack"]};
var checkBookConfig=function(){void 0==window.aliasConfig&&(window.aliasConfig={});bookConfig.isShowMobileBottomFullscreenPrompts=getConfigValue("isShowMobileBottomFullscreenPrompts",!1);bookConfig.searchColor=getConfigValue("searchColor","#00ffff");bookConfig.searchAlpha=getConfigValue("searchAlpha",.3);bookConfig.appLogoIcon=getConfigValue("appLogoIcon","");bookConfig.HomeURL=getConfigValue("HomeURL","");bookConfig.bookTitle=getConfigValue("bookTitle","FLIPBOOK");bookConfig.bookDescription=getConfigValue("bookDescription",
"");bookConfig.toolbarColor=getConfigValue("toolbarColor","#27181A");bookConfig.iconColor=getConfigValue("iconColor","#FFFFFF");bookConfig.toolbarColor==bookConfig.iconColor&&(bookConfig.iconColor=Color(bookConfig.toolbarColor).reverse());bookConfig.pageNumColor=getConfigValue("pageNumColor","#000000");bookConfig.formBackgroundColor=getConfigValue("formBackgroundColor",bookConfig.toolbarColor);bookConfig.formFontColor=getConfigValue("formFontColor",bookConfig.iconColor);bookConfig.formBackgroundColor==
bookConfig.formFontColor&&(bookConfig.formFontColor=Color(bookConfig.formBackgroundColor).reverse());bookConfig.loadingBackground=getConfigValue("loadingBackground","#1F2232");bookConfig.loadingDisplayTime=getConfigValue("loadingDisplayTime",10);bookConfig.searchHightlightColor=getConfigValue("searchHightlightColor","#fdc606");bookConfig.logoHeight=getConfigValue("logoHeight",40);bookConfig.logoTop=getConfigValue("logoTop",0);bookConfig.logoPadding=getConfigValue("logoPadding",0);bookConfig.isFixLogoSize=
getConfigValue("isFixLogoSize",!1);bookConfig.HomeButtonVisible=getConfigValue("HomeButtonVisible",!1);bookConfig.ShareButtonVisible=getConfigValue("ShareButtonVisible",!1);bookConfig.isInsertFrameLinkEnable=getConfigValue("isInsertFrameLinkEnable",!0);bookConfig.addCurrentPage=getConfigValue("addCurrentPage",!1);bookConfig.DoubleSinglePageButtonVisible=getConfigValue("DoubleSinglePageButtonVisible",!1);bookConfig.ToolBarVisible=getConfigValue("ToolBarVisible",!0);bookConfig.WeChatShareButtonVisible=
getConfigValue("WeChatShareButtonVisible",!1);bookConfig.ThumbnailsButtonVisible=getConfigValue("ThumbnailsButtonVisible",!1);bookConfig.thumbnailColor=getConfigValue("thumbnailColor",bookConfig.formBackgroundColor);bookConfig.thumbnailAlpha=getConfigValue("thumbnailAlpha",100);bookConfig.ThumbnailSize=getConfigValue("ThumbnailSize","small");bookConfig.ZoomButtonVisible=getConfigValue("ZoomButtonVisible",!1);bookConfig.ZoomToolbarVisible=getConfigValue("ZoomToolbarVisible",!0);bookConfig.ZoomMapVisible=
getConfigValue("ZoomMapVisible",!0);bookConfig.MagnifierButtonVisible=getConfigValue("MagnifierButtonVisible",!1);bookConfig.SupportOperatePageZoom=getConfigValue("SupportOperatePageZoom",!0);bookConfig.TableOfContentButtonVisible=getConfigValue("TableOfContentButtonVisible",!1);bookConfig.isHideTabelOfContentNodes=getConfigValue("isHideTabelOfContentNodes",!0);bookConfig.BookMarkButtonVisible=getConfigValue("BookMarkButtonVisible",!1);bookConfig.SelectTextButtonVisible=getConfigValue("SelectTextButtonVisible",
!1);bookConfig.SearchButtonVisible=getConfigValue("SearchButtonVisible",!1);bookConfig.searchKeywordFontColor=getConfigValue("searchKeywordFontColor","#FFB000");bookConfig.FullscreenButtonVisible=getConfigValue("FullscreenButtonVisible",!0);bookConfig.isNeat&&(bookConfig.FullscreenButtonVisible=!0);bookConfig.hideMiniFullscreen=getConfigValue("hideMiniFullscreen",!1);bookConfig.updatePageNumberForFlip=getConfigValue("updatePageNumberForFlip",!1);bookConfig.leastSearchChar=getConfigValue("leastSearchChar",
0);bookConfig.PrintButtonVisible=getConfigValue("PrintButtonVisible",!1);bookConfig.MessageButtonVisible=getConfigValue("MessageButtonVisible",!1);bookConfig.printWatermarkFile=getConfigValue("printWatermarkFile","");bookConfig.BackgroundSoundButtonVisible=getConfigValue("BackgroundSoundButtonVisible",!1);bookConfig.BackgroundSoundURL=getConfigValue("BackgroundSoundURL","");bookConfig.BackgroundSoundLoop=getConfigValue("BackgroundSoundLoop",-1);bookConfig.HelpButtonVisible=getConfigValue("HelpButtonVisible",
!1);bookConfig.helpContentFileURL=getConfigValue("helpContentFileURL","");bookConfig.helpWidth=getConfigValue("helpWidth",400);bookConfig.helpHeight=getConfigValue("helpHeight",450);bookConfig.showHelpContentAtFirst=getConfigValue("showHelpContentAtFirst",!1);bookConfig.aboutButtonVisible=getConfigValue("aboutButtonVisible",!1);bookConfig.aboutContactInfoTxt=getConfigValue("aboutContactInfoTxt","");bookConfig.AutoPlayButtonVisible=getConfigValue("AutoPlayButtonVisible",!1);bookConfig.autoPlayAutoStart=
getConfigValue("autoPlayAutoStart",!1);bookConfig.autoPlayDuration=getConfigValue("autoPlayDuration",3);bookConfig.autoPlayLoopCount=getConfigValue("autoPlayLoopCount",1);bookConfig.minZoomWidth=getConfigValue("minZoomWidth",0);bookConfig.minZoomHeight=getConfigValue("minZoomHeight",0);bookConfig.maxZoomWidth=getConfigValue("maxZoomWidth",0);bookConfig.maxZoomHeight=getConfigValue("maxZoomHeight",0);bookConfig.defaultZoomWidth=getConfigValue("defaultZoomWidth",0);bookConfig.defaultZoomHeight=getConfigValue("defaultZoomHeight",
0);bookConfig.middleZoomWidth=getConfigValue("middleZoomWidth",0);isNaN(bookConfig.middleZoomWidth)&&(bookConfig.middleZoomWidth=0);bookConfig.mouseWheelFlip=getConfigValue("mouseWheelFlip",!0);bookConfig.DownloadButtonVisible=getConfigValue("DownloadButtonVisible",!0);bookConfig.DownloadURL=getConfigValue("DownloadURL","");fixDownloadURLValue();bookConfig.bgBeginColor=getConfigValue("bgBeginColor","#E6E6E6");bookConfig.bgEndColor=getConfigValue("bgEndColor","#E3E3E3");bookConfig.bgMRotation=getConfigValue("bgMRotation",
90);bookConfig.backGroundImgURL=getConfigValue("backGroundImgURL","");bookConfig.backgroundOpacity=getConfigValue("backgroundOpacity",100);bookConfig.LeftShadowWidth=getConfigValue("LeftShadowWidth",40);bookConfig.LeftShadowAlpha=getConfigValue("LeftShadowAlpha",1);bookConfig.RightShadowWidth=getConfigValue("RightShadowWidth",40);bookConfig.RightShadowAlpha=getConfigValue("RightShadowAlpha",1);$.system.name==$.system.ANDROID&&$.browser.wechat&&(bookConfig.RightShadowAlpha=1,bookConfig.LeftShadowAlpha=
1);bookConfig.ShowTopLeftShadow=getConfigValue("ShowTopLeftShadow",!0);bookConfig.pageBackgroundColor=getConfigValue("pageBackgroundColor","#FFFFFF");bookConfig.flipshortcutbutton=getConfigValue("flipshortcutbutton",!1);bookConfig.OriginPageIndex=getConfigValue("OriginPageIndex",1);bookConfig.HardPageEnable=getConfigValue("HardPageEnable",!1);bookConfig.HardInnerPageEnable=getConfigValue("HardInnerPageEnable",!1);bookConfig.bookPageStretch=getConfigValue("bookPageStretch",!1);$.browser.msie&&11>$.browser.version&&
(bookConfig.HardPageEnable=!1,bookConfig.HardInnerPageEnable=!1);bookConfig.HardPageEnable||(bookConfig.HardInnerPageEnable=!1);bookConfig.thicknessWidthType=getConfigValue("thicknessWidthType","thick").toLowerCase();bookConfig.showThicknessOnMobile=getConfigValue("showThicknessOnMobile",!1);"Chinese"==UserGroups&&(bookConfig.pageHighlightType=getConfigValue("pageHighlightType","book").toLowerCase());"English"==UserGroups&&(bookConfig.pageHighlightType=getConfigValue("pageHighlightType","magazine").toLowerCase());
bookConfig.usePdfJs=getConfigValue("usePdfJs",!1);bookConfig.highDefinitionConversion=getConfigValue("highDefinitionConversion",!1);bookConfig.usePdfJs&&(bookConfig.highDefinitionConversion=!1);bookConfig.highDefinitionConversion=!1;bookConfig.isStopMouseMenu=getConfigValue("isStopMouseMenu",!1);bookConfig.thicknessColor=getConfigValue("thicknessColor","#FFFFFF");bookConfig.RightToLeft=getConfigValue("RightToLeft",!1);bookConfig.flippingTime=getConfigValue("flippingTime",.3);void 0!=bookConfig.flippingTime&&
(bookConfig.flippingTime=.2>bookConfig.flippingTime?.2:bookConfig.flippingTime);bookConfig.supportSerialsFlip=getConfigValue("supportSerialsFlip",!0);bookConfig.retainBookCenter=getConfigValue("retainBookCenter",!0);bookConfig.totalPagesCaption=getConfigValue("totalPagesCaption","");bookConfig.pageNumberCaption=getConfigValue("pageNumberCaption","");bookConfig.buttonsSortXML=getConfigValue("buttonsSortXML",[]);bookConfig.toolbarAlwaysShow=getConfigValue("toolbarAlwaysShow",!1);bookConfig.searchbarAlwaysShowOnMobile=
getConfigValue("searchbarAlwaysShowOnMobile",!1);isPhone()||isPad()||(bookConfig.toolbarAlwaysShow=!0);bookConfig.leftRightPnlShowOption=getConfigValue("leftRightPnlShowOption","").toLowerCase();bookConfig.topMargin=getConfigValue("topMargin",10);bookConfig.bottomMargin=getConfigValue("bottomMargin",10);bookConfig.leftMargin=getConfigValue("leftMargin",10);bookConfig.rightMargin=getConfigValue("rightMargin",10);bookConfig.topMarginOnMobile=getConfigValue("topMarginOnMobile",10);bookConfig.bottomMarginOnMobile=
getConfigValue("bottomMarginOnMobile",10);bookConfig.leftMarginOnMobile=getConfigValue("leftMarginOnMobile",10);bookConfig.rightMarginOnMobile=getConfigValue("rightMarginOnMobile",10);isPhone()||isPad()?(bookConfig.topMargin=bookConfig.topMarginOnMobile,bookConfig.bottomMargin=bookConfig.bottomMarginOnMobile,bookConfig.leftMargin=bookConfig.leftMarginOnMobile,bookConfig.rightMargin=bookConfig.rightMarginOnMobile,bookConfig.phoneFlipShortcutSwitchButtonVisible=getConfigValue("phoneFlipShortcutSwitchButtonVisible",
!1),bookConfig.phoneFlipShortcutButton=getConfigValue("phoneFlipShortcutButton",!1),bookConfig.searchbarAlwaysShowOnMobile&&bookConfig.toolbarAlwaysShow&&(bookConfig.topMargin+=50)):bookConfig.phoneFlipShortcutButton=!1;bookConfig.visibleAreaLeft=parseFloat(getConfigValue("visibleAreaLeft","0%"));bookConfig.visibleAreaTop=parseFloat(getConfigValue("visibleAreaTop","0%"));bookConfig.visibleAreaRight=parseFloat(getConfigValue("visibleAreaRight","100%"));bookConfig.visibleAreaBottom=parseFloat(getConfigValue("visibleAreaBottom",
"100%"));bookConfig.visibleAreaLeft=isNaN(bookConfig.visibleAreaLeft)?"0%":bookConfig.visibleAreaLeft;bookConfig.visibleAreaTop=isNaN(bookConfig.visibleAreaTop)?"0%":bookConfig.visibleAreaTop;bookConfig.visibleAreaRight=isNaN(bookConfig.visibleAreaRight)?"100%":bookConfig.visibleAreaRight;bookConfig.visibleAreaBottom=isNaN(bookConfig.visibleAreaBottom)?"100%":bookConfig.visibleAreaBottom;bookConfig.bleedAreaLeft=parseFloat(getConfigValue("bleedAreaLeft","0%"));bookConfig.bleedAreaTop=parseFloat(getConfigValue("bleedAreaTop",
"0%"));bookConfig.bleedAreaRight=parseFloat(getConfigValue("bleedAreaRight","0%"));bookConfig.bleedAreaBottom=parseFloat(getConfigValue("bleedAreaBottom","0%"));bookConfig.bleedAreaLeft=isNaN(bookConfig.bleedAreaLeft)?"0%":bookConfig.bleedAreaLeft;bookConfig.bleedAreaTop=isNaN(bookConfig.bleedAreaTop)?"0%":bookConfig.bleedAreaTop;bookConfig.bleedAreaRight=isNaN(bookConfig.bleedAreaRight)?"0%":bookConfig.bleedAreaRight;bookConfig.bleedAreaBottom=isNaN(bookConfig.bleedAreaBottom)?"0%":bookConfig.bleedAreaBottom;
bookConfig.visibleAreaLeft=bookConfig.bleedAreaLeft?bookConfig.bleedAreaLeft:bookConfig.visibleAreaLeft;bookConfig.visibleAreaTop=bookConfig.bleedAreaTop?bookConfig.bleedAreaTop:bookConfig.visibleAreaTop;bookConfig.visibleAreaRight=bookConfig.bleedAreaRight?100-parseFloat(bookConfig.bleedAreaRight):bookConfig.visibleAreaRight;bookConfig.visibleAreaBottom=bookConfig.bleedAreaBottom?100-parseFloat(bookConfig.bleedAreaBottom):bookConfig.visibleAreaBottom;bookConfig.LinkDownColor=getConfigValue("LinkDownColor",
"#9C9C9C");bookConfig.LinkAlpha=getConfigValue("LinkAlpha",.4);bookConfig.googleAnalyticsID=getConfigValue("googleAnalyticsID","");bookConfig.language=getConfigValue("language","English");bookConfig.AboutAddress=getConfigValue("AboutAddress","");bookConfig.AboutEmail=getConfigValue("AboutEmail","");bookConfig.AboutMobile=getConfigValue("AboutMobile","");bookConfig.AboutWebsite=getConfigValue("AboutWebsite","");bookConfig.AboutDescription=getConfigValue("AboutDescription","");bookConfig.AboutAuthor=
getConfigValue("AboutAuthor","");bookConfig.totalPageCount=getConfigValue("totalPageCount",1);bookConfig.largePageWidth=getConfigValue("largePageWidth",1440);bookConfig.largePageHeight=getConfigValue("largePageHeight",1728);bookConfig.normalPath=getConfigValue("normalPath","files/page/");bookConfig.largePath=getConfigValue("largePath","files/large/");bookConfig.thumbPath=getConfigValue("thumbPath","files/thumb/");bookConfig.FlipStyle=getConfigValue("FlipStyle","flip");bookConfig.FlipStyle=bookConfig.FlipStyle.toLowerCase();
var b=bookConfig.autoDoublePage?bookConfig.autoDoublePage.toLocaleLowerCase():"auto";"single"!=b&&"auto"!=b&&"double"!=b?getConfigValue("autoDoublePage",!0)?bookConfig.showDoublePage="auto":bookConfig.showDoublePage="single":bookConfig.showDoublePage=b;bookConfig.alwaysDoublePageOnMobile=getConfigValue("alwaysDoublePageOnMobile",!1);bookConfig.upsideOnMobile=function(){return bookConfig.alwaysDoublePageOnMobile&&window.innerHeight>window.innerWidth?!0:!1};bookConfig.QRPath=getConfigValue("QRPath",
"files/extfile/QRURL.png");bookConfig.QRCode=getConfigValue("QRCode",!1);bookConfig.MiniStyle=getConfigValue("MiniStyle",!0);bookConfig.AnnotationButtonVisible=getConfigValue("AnnotationButtonVisible",!1);bookConfig.InstructionsButtonVisible=getConfigValue("InstructionsButtonVisible",!1);bookConfig.showInstructionOnStart=getConfigValue("showInstructionOnStart",!0);bookConfig.showBookInstructionOnStart=getConfigValue("showBookInstructionOnStart",!1);bookConfig.showSwitchTipsOnStart=getConfigValue("showSwitchTipsOnStart",
!1);bookConfig.EmailButtonVisible=getConfigValue("EmailButtonVisible",!1);bookConfig.btnShareWithEmailSubject=getConfigValue("btnShareWithEmailSubject","");bookConfig.btnShareWithEmailBody=getConfigValue("btnShareWithEmailBody","");bookConfig.socialShareLink=getConfigValue("socialShareLink","");bookConfig.VideoButtonVisible=getConfigValue("VideoButtonVisible",!1);if(!global.videoList||0>=global.videoList.length)bookConfig.VideoButtonVisible=!1;bookConfig.SlideshowButtonVisible=getConfigValue("SlideshowButtonVisible",
!1);if(!global.slideshow||0>=global.slideshow.length)bookConfig.SlideshowButtonVisible=!1;bookConfig.CompanyLogoFile=getConfigValue("CompanyLogoFile","");bookConfig.UIBaseURL=getConfigValue("UIBaseURL","");bookConfig.bookBaseURL=getConfigValue("bookBaseURL","");bookConfig.haveAdSense=getConfigValue("haveAdSense",!1);bookConfig.adSenseLeft=getConfigValue("adSenseLeft",0);bookConfig.adSenseTop=getConfigValue("adSenseTop",0);bookConfig.adSenseWidth=getConfigValue("adSenseWidth",0);bookConfig.adSenseHeight=
getConfigValue("adSenseHeight",0);bookConfig.adSenseClientId=getConfigValue("adSenseClientId","");bookConfig.adSenseSlotId=getConfigValue("adSenseSlotId","");bookConfig.productName=getConfigValue("productName","Flip HTML5");bookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");bookConfig.preloadNextPage=getConfigValue("preloadNextPage",!0);bookConfig.showMirrorSide=getConfigValue("showMirrorSide",!0);bookConfig.addPaperCoil=getConfigValue("addPaperCoil",!1);bookConfig.addPaperCoil&&
!bookConfig.BindingType&&(bookConfig.BindingType="loose");bookConfig.addPaperCoil="loose"==bookConfig.BindingType||"loose2"==bookConfig.BindingType;bookConfig.ToolbarViewMode=getConfigValue("ToolbarViewMode","standard");bookConfig.ToolbarViewMode=bookConfig.ToolbarViewMode.toLocaleLowerCase();bookConfig.isTheBookOpen=getConfigValue("isTheBookOpen",!1);bookConfig.FlipDirection=getConfigValue("FlipDirection",0);bookConfig.phoneFlipShortcutSwitchButtonIcon=getConfigValue("phoneFlipShortcutSwitchButtonIcon",
"");bookConfig.HomeButtonIcon=getConfigValue("HomeButtonIcon","");bookConfig.AnnotationButtonIcon=getConfigValue("AnnotationButtonIcon","");bookConfig.VideoButtonIcon=getConfigValue("VideoButtonIcon","");bookConfig.SlideshowButtonIcon=getConfigValue("SlideshowButtonIcon","");bookConfig.ShareButtonIcon=getConfigValue("ShareButtonIcon","");bookConfig.ThumbnailButtonIcon=getConfigValue("ThumbnailButtonIcon","");bookConfig.ZoomInButtonIcon=getConfigValue("ZoomInButtonIcon","");bookConfig.ZoomOutButtonIcon=
getConfigValue("ZoomOutButtonIcon","");bookConfig.MagnifierButtonIcon=getConfigValue("MagnifierButtonIcon","");bookConfig.FullscreenButtonIcon=getConfigValue("FullscreenButtonIcon","");bookConfig.ExitFullscreenButtonIcon=getConfigValue("ExitFullscreenButtonIcon","");bookConfig.BookmarkButtonIcon=getConfigValue("BookmarkButtonIcon","");bookConfig.TableOfContentButtonIcon=getConfigValue("TableOfContentButtonIcon","");bookConfig.SearchButtonIcon=getConfigValue("SearchButtonIcon","");bookConfig.PrintButtonIcon=
getConfigValue("PrintButtonIcon","");bookConfig.BackgroundSoundButtonOnIcon=getConfigValue("BackgroundSoundButtonOnIcon","");bookConfig.BackgroundSoundButtonOffIcon=getConfigValue("BackgroundSoundButtonOffIcon","");bookConfig.HelpButtonIcon=getConfigValue("HelpButtonIcon","");bookConfig.AboutButtonIcon=getConfigValue("AboutButtonIcon","");bookConfig.AutoPlayStartButtonIcon=getConfigValue("AutoPlayStartButtonIcon","");bookConfig.AutoPlayStopButtonIcon=getConfigValue("AutoPlayStopButtonIcon","");bookConfig.DownloadButtonIcon=
getConfigValue("DownloadButtonIcon","");bookConfig.facebookShotImageURL=getConfigValue("facebookShotImageURL","");bookConfig.searchTextJS=getConfigValue("searchTextJS","files/search/book_config.js");bookConfig.searchPositionJS=getConfigValue("searchPositionJS","files/search/text_position.js");bookConfig.userSmallMode=getConfigValue("userSmallMode",!0);bookConfig.maxWidthToSmallMode=getConfigValue("maxWidthToSmallMode",300);bookConfig.maxHeightToSmallMode=getConfigValue("maxHeightToSmallMode",300);
bookConfig.backgroundScene=getConfigValue("backgroundScene","None");bookConfig.bgSoundVol=getConfigValue("bgSoundVol",50);bookConfig.bgSoundVol=Number.between(bookConfig.bgSoundVol,0,100);bookConfig.enablePageBack=getConfigValue("enablePageBack",!1);bookConfig.userListPath=getConfigValue("userListPath","files/extfiles/users.js");bookConfig.isFlipPdf=getConfigValue("isFlipPdf",!1);bookConfig.SingleModeBanFlipToLastPage=getConfigValue("SingleModeBanFlipToLastPage",!1);bookConfig.isSingleBookFullWindowOnMobile=
getConfigValue("isSingleBookFullWindowOnMobile",!1);bookConfig.showGotoButtonsAtFirst=getConfigValue("showGotoButtonsAtFirst",!1);0==bookConfig.isFlipPdf&&void 0!=global.isFlipPdf&&(bookConfig.isFlipPdf=isFlipPdf);bookConfig.FlipSound=getConfigValue("FlipSound",!0);bookConfig.CurlingPageCorner=getConfigValue("CurlingPageCorner",!0);bookConfig.BanFlipFromDirection=getConfigValue("BanFlipFromDirection",!1);bookConfig.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&&1!=parseInt(global.staticAd.adPosition)?bookConfig.retainBookCenter=!1:bookConfig.retainBookCenter=getConfigValue("retainBookCenter",!0)}catch(c){}bookConfig.updateURLForPage=getConfigValue("updateURLForPage",!0);bookConfig.borderColor=getConfigValue("borderColor","#572f0d");bookConfig.outerCoverBorder=
getConfigValue("outerCoverBorder",!1);bookConfig.hardCoverBorderWidth=getConfigValue("hardCoverBorderWidth",0);bookConfig.cornerRound=getConfigValue("cornerRound",0);bookConfig.hardCoverBorderWidth=bookConfig.HardPageEnable?Number.between(0,16,bookConfig.hardCoverBorderWidth):0;bookConfig.cornerRound=bookConfig.HardPageEnable?Number.between(0,bookConfig.hardCoverBorderWidth,bookConfig.cornerRound):0;bookConfig.coverTexture=getConfigValue("coverTexture","none");bookConfig.passwardPrompt=getConfigValue("passwardPrompt",
"");bookConfig.SlideshowAutoPlay=getConfigValue("SlideshowAutoPlay",!1);bookConfig.SlideshowPlayInterval=getConfigValue("SlideshowPlayInterval",5);bookConfig.productName=getConfigValue("productName","Flip HTML5");bookConfig.homePage=getConfigValue("homePage","http://www.fliphtml5.com");global.productName=bookConfig.productName||"Flip HTML5";global.homePage=bookConfig.homePage||"http://www.fliphtml5.com";bookConfig.backgroundPosition=getConfigValue("backgroundPosition","Stretch");bookConfig.restorePageVisible=
getConfigValue("restorePageVisible",!1);bookConfig.restorePageDuration=getConfigValue("restorePageDuration",86400);bookConfig.toobarClear=getConfigValue("toobarClear",!1);bookConfig.bottomToolBarAlpha=getConfigValue("bottomToolBarAlpha",1);bookConfig.topToolBarAlpha=getConfigValue("topToolBarAlpha",1);bookConfig.ToolBarAlpha=getConfigValue("ToolBarAlpha",1);bookConfig.phoneSearchBarAlpha=getConfigValue("phoneSearchBarAlpha",.8);(isPhone()||isPad())&&"slide"!=bookConfig.FlipStyle.toLowerCase()&&(bookConfig.FlipStyle=
"flip");isBelowIE9()&&(bookConfig.FlipStyle="slide");if(isPhone()||isPad()||"slide"==bookConfig.FlipStyle.toLowerCase()&&"lite"==bookConfig.ToolbarViewMode.toLowerCase())bookConfig.flipshortcutbutton=!1;if(bookType==BookType.slide_book&&"lite"==bookConfig.ToolbarViewMode.toLowerCase()||bookType==BookType.singleSlide_book&&"lite"==bookConfig.ToolbarViewMode.toLowerCase()||isPhone()||isPad())bookConfig.flipshortcutbutton=!1;if(global.videoList&&1<=global.videoList.length)for(b=0;b");bookConfig.AboutDescription=bookConfig.AboutDescription.replace(/\r/g,"
");checkBookmarkConfig();isBelowIE9()&&(bookConfig.BookMarkButtonVisible=!1,bookConfig.AnnotationButtonVisible=!1,bookConfig.WeChatShareButtonVisible=
!1);bookConfig.useTheAliCloudChart&&bookConfig.backGroundImgURL&&(0<=bookConfig.backGroundImgURL.indexOf("?")?bookConfig.backGroundImgURL+="&x-oss-process=image/resize,h_800":bookConfig.backGroundImgURL+="?x-oss-process=image/resize,h_800",window.isSupportWebp&&(bookConfig.backGroundImgURL+="/format,webp"));checkURLValue();global.checkReportConfig&&checkReportConfig();global.aboutReadTimesCaptions="Views";"Chinese"==UserGroups&&(global.aboutReadTimesCaptions="\u9605\u8bfb\u6b21\u6570");bookConfig.isNeat=
getConfigValue("isNeat",!1);0<=window.location.hash.indexOf("isNeat")&&(bookConfig.isNeat=!0);bookConfig.phoneToolbarType=getConfigValue("phoneToolbarType","image").toLowerCase();bookConfig.phoneIconNumber=getConfigValue("phoneIconNumber",6);bookConfig.phoneIconNumber=Math.max(1,bookConfig.phoneIconNumber);bookConfig.showAdOnTop=getConfigValue("showAdOnTop",!0);bookConfig.bookPath=getConfigValue("bookPath",window.location.href);bookConfig.loadPreviewImage=!1;bookConfig.removeLoad=!0;bookConfig.showArticleDescription=
getConfigValue("showArticleDescription",!1);bookConfig.showArticlePageFlashes=getConfigValue("showArticlePageFlashes",!0)};
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&&0bookConfig.topMargin&&(bookConfig.topMargin=75),"vertical"==bookConfig.flipDrection&&75>bookConfig.bottomMargin&&(bookConfig.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},getConfigValue=function(b,c){void 0!=c&&"string"==typeof c&&""!=c.trim()&&isBool(c)&&(c=parseBool(c));b=void 0!=bookConfig[b]?bookConfig[b]:getValueFromAliasConfig(b);return void 0==b?c:void 0==c?b:"number"==typeof c?Number(b):"boolean"==typeof c?parseBool(b):"string"==typeof c&&"#"==c[0]?Color(b).toString():
b},getValueFromAliasConfig=function(b){if(global.aliasConfig&&(b=aliasConfig[b]))for(var c=0;cc.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]},getColor=function(b,c){b=bookConfig[b];return void 0!=b?Color(b).toString():c},getImage=function(b){return 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"],f=["false","no","hide","disable"];b=b.toLowerCase();return 0>d.indexOf(b)&&0>f.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;db.length)return b;var d=b.length;c=b.toLowerCase().indexOf(c.toLowerCase());if(25<=c){var f=Math.max(25<=d-c?c-25:d-50,0);f=".."+b.substring(f,c)}else f=b.substring(0,c);b=25h.length)){g=getRealPageNumber(h[0]);var k=getRealPageNumber(h[1]);h=Math.max(g,k);for(g=Math.min(g,k);g<=h;g++)g>bookConfig.totalPageCount||c(g)||d.push(g)}}}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=$("");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()},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)},flipSoundIsPlaying=bookConfig.FlipSound,playFlipSound=function(){if(flipSoundIsPlaying)if(!isPhone()&&!isPad()&&!isIE()){var b="flipsound";if(bookType==BookType.slide_book||bookType==BookType.singleSlide_book)b="slidesound";b=$("");$("body").append(b);var c=parseFloat(bookConfig.bgSoundVol/100);b[0].volume=c;b.bind("ended",function(){$(this).remove()});try{b[0].currentTime=0,b[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";flipAudio=
$("");$("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){return window.location.href}}),b.on("success",function(c){"Chinese"==UserGroups&&alert("\u590d\u5236\u7f51\u5740\u6210\u529f");"English"==UserGroups&&alert("Copied successfully");c.clearSelection()}),b.on("error",function(c){uc?("Chinese"==UserGroups&&alert("\u590d\u5236\u7f51\u5740\u6210\u529f"),"English"==UserGroups&&alert("Copied successfully"),c.clearSelection()):("Chinese"==UserGroups&&alert("\u590d\u5236\u7f51\u5740\u5931\u8d25"),
"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(g){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 f=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);f.data=b;d.setTransferData("text/unicode",f,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://"};var form_icons={drag:"iVBORw0KGgoAAAANSUhEUgAAABkAAAAKCAYAAABBq/VWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcm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htcC5paWQ6QTFDMUQ2MDgzRTkwMTFFNkI3QkZCQTFDMUYxQ0UxMTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTFDMUQ2MDkzRTkwMTFFNkI3QkZCQTFDMUYxQ0UxMTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMUMxRDYwNjNFOTAxMUU2QjdCRkJBMUMxRjFDRTExOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMUMxRDYwNzNFOTAxMUU2QjdCRkJBMUMxRjFDRTExOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgcvoREAAADzSURBVHja7NjRCcIwEAbgnggWB9AZ6jZ1CGdwBGdwCHUaO0MdoNSn+Ic2EjAP3iUnPlzgJy2F+6imTTlyzlW/GMtwQER+2iB7pEFqYc0R6ZAL8gg3Qu8Doi2mI7IudBMDckL93p8sogttQaSaa7XhJIYahb9ml4JqBWiVglSHQQYZZJBB/wRhBz2oQ98iWVBA8K1xVoO4iAiSIGxIirCgHIQFBYCz0sQ/XQ7GXgxSTLS8JZj4geViWa8g1QdWitl+ZJBBBhmkBI0K9Z8pqFOA7inoVk2tr1JjmGtO+1bUr/OT79n51leJxuAV6T8ag9rjJcAAuDFYXZXo6HwAAAAASUVORK5CYII="};var setCurrentIndexTextField=function(b){b=getShownPageNumberInfo(b);$("#guidPageIndex").html(""+b+"");$("#currentPageIndexTextField")&&$("#currentPageIndexTextField")[0]&&!$("#currentPageIndexTextField")[0].onFocus&&$("#currentPageIndexTextField").val(b);(isPhone()||isPad())&&$(".currentPageIndexTextField")&&$(".currentPageIndexTextField")[0]&&!$(".currentPageIndexTextField")[0].onFocus&&$(".currentPageIndexTextField").val(b)},getShownPageNumberInfo=function(b){BookInfo.isDoublePage();b=BookInfo.getCurrentPages();
for(var c=originTotalPageCount,d="",f=0;fg;g++,h/=10)f=Math.floor(b%h/(h/10)),d+=c[2-g][f];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){var c=bookConfig.pageNumberCaption;if(""==c||void 0==c)return parseInt(b);b+="";c=getShownPageArray();for(var d=-1,f=c.length,g=1;g<=f;g++)if(c[g]+""==b){d=g;break}return-1!=d?d:isNaN(parseInt(b))||void 0!==c[parseInt(b)]?"error":parseInt(b)},
setLocationHash=function(b){bookConfig.updateURLForPage&&(window.location.hash="#p="+getShownPageNumber(b))};var 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 f=bookConfig.totalPageCount;bookConfig.SingleModeBanFlipToLastPage&&bookType==BookType.single_book&&(f=Math.max(1,bookConfig.totalPageCount-1));if(1>b||b>f)0>BookInfo.getCurrentPages().indexOf(f)&&b>f?gotoPageFun(f,c,d):0>BookInfo.getCurrentPages().indexOf(1)&&1>b?gotoPageFun(1,c,d):(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());
else if(d=b,BookInfo.isDoublePage()&&(d=BookInfo.getMinPageIndex(d)),d=Math.max(1,d),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();NeatStyle.refreshSlider();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()}}},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])};var 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},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 f=this.getPagesByIndex(2*d+1);0 ");this.title=$(""+FormInfo.getFormTitle(this.formType)+"
");this.close=$(phoneSvgIcons.formClose);this.rightToLeft&&this.stage.addClass("rightToLeft");this.close.bind("click",this.hide.bind(this));this.stage.css({visibility:"hidden"});this.initHtml();this.initEvent();this.onCreate();(isPhone()||isPad())&&this.initScrollEvent()},onCreate:function(){this.stage.insertBefore(this.parent);
this.stage.css({position:"absolute",left:this.width+"px",top:0,width:this.width+"px",height:this.height+"px","background-color":colorDiv(this.mainColor,20),color:this.fontColor,overflow:"hidden"})},getPosition:function(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)}},firstTimeMove:function(b){this.firstTime=!0;this.dragEnd=this.getPosition(b);b=this.dragEnd.x-this.dragStart.x;var c=this.dragEnd.y-this.dragStart.y;0==b&&0!=c&&(this.noSwipeRight=!0);0!=b&&0==c&&(this.noSwipeRight=!1);0==b&&0==c&&(this.noSwipeRight=!0);1.01>=Math.abs(b/c)&&(this.noSwipeRight=!0)},initScrollEvent:function(){this.dragStart={};this.dragEnd={};this.stage.bind(_event._down,function(b){b.stopPropagation();this.formTouching=!0;this.firstTime=this.dragMove=this.noSwipeRight=
!1;this.dragEnd=this.dragStart=this.getPosition(b);this.endTime=this.startTime=(new Date).getTime()}.bind(this));this.stage.bind(_event._move,function(b){b.stopPropagation();this.dragMove=!0;this.firstTime||this.firstTimeMove(b);if(this.formTouching){this.dragEnd=this.getPosition(b);var c=this.dragEnd.x-this.dragStart.x;this.noSwipeRight||(b.preventDefault(),0=c&&this.stage.css({transform:"translate3d("+-windowWidth+"px,0,0)"}),c>=windowWidth&&this.stage.css({transform:"translate3d(0px,0,0)"})))}}.bind(this));this.stage.bind(_event._up,function(b){b.stopPropagation();if(this.dragEnd&&void 0!=this.dragEnd.x&&(b=this.dragEnd.x-this.dragStart.x,this.endTime=(new Date).getTime(),this.formTouching&&!this.noSwipeRight&&this.dragMove&&!(0>b))){this.formTouching=!1;var c=(this.endTime-this.startTime)/1E3;0=c&&b>.1*
windowWidth?this.hide():windowWidth-this.dragEnd.x+this.dragStart.x>2*windowWidth/3?this.animate(-windowWidth):this.hide();this.dragMove=this.firstTime=this.noSwipeRight=!1}}.bind(this))},show:function(){if(!this.visible&&(this.stage.css({visibility:"visible"}),this.visible=!0,this.animate(-this.width),this.mask||(this.mask=$(""),this.mask.click(this.hide.bind(this)),this.parent.append(this.mask)),this.mask&&this.mask.show(),BookInfo.getBook().addSearchHighlight(),
this.onShow))this.onShow()},hide:function(){this.visible&&(this.visible=!1,this.dragEnd={},this.animate(0),this.mask&&this.mask.hide(),isPhone()||isPad()||BookInfo.getBook().clearSearchHighlight())},animate:function(b){this.animating=!0;var c=transformCSS({tran:{x:b,y:0}});animateOnce(this.stage,c,.2,function(){this.animating=!1;0==b&&this.stage.css({visibility:"hidden"})}.bind(this));animateOnce(this.parent,c,.2,function(){this.animating=!1}.bind(this))},onResize:function(){this.width=windowWidth;
this.height=windowHeight;this.stage.css({left:this.width+"px",width:this.width+"px",height:this.height+"px"});var b=this.visible?transformCSS({tran:{x:-this.width,y:0}}):transformCSS({tran:{x:0,y:0}});this.stage.css(b);this.parent.css(b)},showOrHide:function(){!0===this.visible?this.hide():this.show(-this.width)}}).extend(FormFrame),PhoneBottomFormFrame=Class({create:function(b){this._super(b);this.closeUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjhBN0ZCRjFCQjgwMTFFNjhCMjQ5NjVERDlGODU5NkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjhBN0ZCRjJCQjgwMTFFNjhCMjQ5NjVERDlGODU5NkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOEE3RkJFRkJCODAxMUU2OEIyNDk2NUREOUY4NTk2RSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOEE3RkJGMEJCODAxMUU2OEIyNDk2NUREOUY4NTk2RSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Prtn4R8AAABdSURBVHjaYvz//z8DLQETA43BqAWjFtDHgv9QTKocyT74T4BPtgWMWAz9j0OebB8w4nA5IzUjmZEAf/DGAb5g+U+tZIpuONGW0DwOWMgwmIFWqWi0sBu1ADsACDAA1jMSLYufr4AAAAAASUVORK5CYII=";
this.stage=$("");this.title=$(""+FormInfo.getFormTitle(this.formType)+"
");this.close=$(""+getLanguage("lblCancel","Cancel")+"
");this.rightToLeft&&this.stage.addClass("rightToLeft");this.close.bind(_event._click,this.hide.bind(this));this.stage.css({visibility:"hidden"});this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.stage.insertBefore(this.parent);
this.stage.css({position:"fixed",left:0,bottom:-this.height+"px",width:this.width+"px",height:this.height+"px","background-color":colorDiv(this.mainColor,20),color:this.fontColor,overflow:"hidden"})},show:function(){this.visible||(this.visible=!0,this.stage.css({visibility:"visible"}),this.animate(this.height),this.mask||(this.mask=$(""),this.mask.bind(_event._click,this.hide.bind(this)),this.mask.insertBefore(this.parent)),this.mask&&this.mask.show(),BookInfo.getBook().addSearchHighlight())},
hide:function(){this.visible&&(this.visible=!1,this.animate(0),this.mask&&this.mask.hide(),isPhone()||isPad()||BookInfo.getBook().clearSearchHighlight(),this.onHide())},animate:function(b){this.animating=!0;var c=transformCSS({tran:{x:0,y:-b}});animateOnce(this.stage,c,.2,function(){this.animating=!1;0==b&&this.stage.css({visibility:"hidden"})}.bind(this));window.setTimeout(function(){if(this.onShow)this.onShow()}.bind(this),200)},onResize:function(){this.width=windowWidth;this.height=272;this.stage.css({bottom:-this.height+
"px",width:this.width+"px",height:this.height+"px"});var b=this.visible?transformCSS({tran:{x:0,y:-this.height}}):transformCSS({tran:{x:0,y:0}});this.stage.css(b);this.parent.css(b)},showOrHide:function(){!0===this.visible?this.hide():this.show(this.width)},onHide:function(){}}).extend(FormFrame),PhoneReaderFormFrame=Class({onCreate:function(){this.parent.append(this.stage);this.stage.css({position:"fixed",left:0,bottom:-this.height+"px",width:this.width+"px",height:this.height+"px","background-color":colorDiv(this.mainColor,
20),color:this.fontColor,overflow:"hidden"})},show:function(){this.visible||(this.visible=!0,this.stage.css({visibility:"visible"}),this.animate(this.height),this.mask||(this.mask=$(""),this.mask.bind(_event._click,this.hide.bind(this)),this.parent.append(this.mask)),this.mask&&this.mask.show(),BookInfo.getBook().addSearchHighlight())}}).extend(PhoneBottomFormFrame),FadeOutFadeForm=Class({create:function(b){this._super(b);this.closeUrl=form_icons.close?"data:image/png;base64,"+
form_icons.close:uiBaseURL+"close.png";this.stage=$("");this.title=$("");FormInfo.getFormTitle(this.formType)&&this.title.append($(""+FormInfo.getFormTitle(this.formType)+""));FormInfo.getFormFavicon(this.formType)&&(this.favicon=$(""));this.close=$("");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),SlideForm=Class({create:function(b){this._super(b);this.closeUrl=form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.stage=$("");this.title=$("");this.title.append($(""+FormInfo.getFormTitle(this.formType)+
""));FormInfo.getFormFavicon(this.formType)&&(this.favicon=$(""));this.close=$("");this.rightToLeft&&this.stage.addClass("rightToLeft");this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.parent.append(this.stage);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))},show:function(){this.visible=!0;this.stage.animate({left:10},400,function(){}.bind(this));this.onShow()},hide:function(){this.visible=!1;this.stage.animate({left:2*-this.width},400,function(){this.onHide()}.bind(this))},onHide:function(){}}).extend(FormFrame),SlideRightForm=
Class({create:function(b){this._super(b);this.closeUrl=form_icons.close?"data:image/png;base64,"+form_icons.close:uiBaseURL+"close.png";this.stage=$("");this.title=$("");this.title.append($(""+FormInfo.getFormTitle(this.formType)+""));FormInfo.getFormFavicon(this.formType)&&(this.favicon=$(""));this.close=$("");this.rightToLeft&&this.stage.addClass("rightToLeft");this.stage.css({visibility:"hidden"});this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.parent.append(this.stage);this.title&&this.title.css({cursor:"default"})},onResize:function(){var b=windowHeight;this.width=250;this.height=b-24;this.stage.css({right:2*-this.width+"px"})},initEvent:function(){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,showOrHide:function(){this.visible?this.hide():this.show()},show:function(){this.visible=!0;this.stage.css({visibility:"visible"});this.stage.animate({right:0},400,function(){}.bind(this));this.onShow()},hide:function(){this.visible=!1;this.stage.animate({right:2*-this.width},400,function(){this.onHide();
this.stage.css({visibility:"hidden"})}.bind(this))}}).extend(FormFrame),PcBottomForm=Class({create:function(b){this._super(b);this.stage=$("");this.rightToLeft&&this.stage.addClass("rightToLeft");this.initHtml();this.initEvent();this.onCreate()},onCreate:function(){this.parent.append(this.stage)},initEvent:function(){this.stage.drag();this.stage.bind(_event._down,function(b){b.stopPropagation()});this.stage.bind("click",this.hide.bind(this))},
initHtml:virtual_function,onHide:function(){}}).extend(FormFrame),LoadingBook=Class({create:function(b,c){this.parent=b;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":bookType=bookConfig.FlipDirection?windowWidthwindowHeight&&"auto"==bookConfig.showDoublePage||"double"==bookConfig.showDoublePage?BookType.slide_book:BookType.singleSlide_book;init();(isPhone()||isPad())&&global.QRbutton&&QRbutton.hide();break;case "flip_book":bookType=bookConfig.FlipDirection?windowWidthwindowHeight&&"auto"==bookConfig.showDoublePage||"double"==bookConfig.showDoublePage?BookType.normal_book:
BookType.single_book;init();bookConfig.flipshortcutbutton&&flipShotButton.animate();break;case "catalog_book":bookType=BookType.catalog_book,init()}},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},init:function(){this.container=
$("");this.bookStyleBox=$("");this.container.css({"background-color":this.backgroundColor});this.parent.append(this.container);this.container.append(this.bookStyleBox);this.initBookStyleBox()},initBookStyleBox:function(){this.title=$("");this.description=$("");this.flipModel=$("");this.slideModel=$("");this.flipModel.append($("").asImageButton());this.slideModel.append($("").asImageButton());this.bookStyleBox.append(this.title);this.bookStyleBox.append(this.description);this.bookStyleBox.append(this.flipModel);this.bookStyleBox.append(this.slideModel);this.title.html(window.document.title);this.description.html(getLanguage("lblSelectMode","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","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)}});
function loadXMLString(b){var c=null;if(!window.DOMParser&&window.ActiveXObject)for(var d=["MSXML.2.DOMDocument.6.0","MSXML.2.DOMDocument.3.0","Microsoft.XMLDOM"],f=0;f");
this.page=$("");this.image=$("");this.noThumbBg=$("");this.leftBtn=$("");this.rightBtn=$("");this.thumbnail.append(this.noThumbBg).append(this.image);this.thumbnail.append(this.page)},resetBtnSrc:function(){this.leftBtn.attr("src",
this.leftButtonUrl);this.rightBtn.attr("src",this.rightButtonUrl)},initEvent:function(){this.leftBtn.onTap(function(){this.fillContent(this.currentPageIndex-1)}.bind(this));this.rightBtn.onTap(function(){this.fillContent(this.currentPageIndex+1)}.bind(this))},fillContent:function(b){if(!(1>b||b>bookConfig.totalPageCount)){1==b?this.leftBtn.css({opacity:"0.4",cursor:"auto"}):this.leftBtn.css({opacity:"1",cursor:"pointer"});b==bookConfig.totalPageCount?this.rightBtn.css({opacity:"0.4",cursor:"auto"}):
this.rightBtn.css({opacity:"1",cursor:"pointer"});this.currentPageIndex=b;var c=function(d,f){d.match(/^none/)?(this.noThumbBg.css({display:"block"}),this.image.css({display:"none"})):(this.image.attr("src",d),this.noThumbBg.css({display:"none"}),this.image.css({display:"inline-block",width:this.imageWidth+"px",height:"130px"}))}.bind(this);fillImageAfterLoaded(b,"thumb",c);this.fillPage(b);this.callback&&this.callback(b)}},fillPage:function(b){this.page.html(b+"/"+bookConfig.totalPageCount)},getPageIndex:function(){return this.currentPageIndex}}),
PictureListForm=Class({initHtml:function(){this.stage=$("");this.stage.append(this.thumbnail);1");this.button=b;this.initPrintEvent()},getImageSizeForMM:function(b,c){return b/210>=c/297?{width:210,height:Math.floor(210*
c/b)}:{width:Math.floor(297*b/c),height:297}},getImageSizeForInches:function(b,c){return b/7.18>=c/10.61?{width:7.18,height:Number.fixed(7.18*c/b,2)}:{width:Number.fixed(10.61*b/c,2),height:10.61}},getImageSizeForIE:function(b,c){return b/8>=c/11.3?{width:8,height:Number.fixed(8*c/b,2)}:{width:Number.fixed(11.3*b/c,2),height:11.3}},printPages:function(b){var c=this;if(b&&b.length){this.initLoadPrint();var d=0;this.printArea.empty();this.printArray=[];var f=function(g,h,k,l){var m=$(""),
n=$(k);g&&-1"),$watermark.css({"z-index":"201",left:"0",top:"0",position:"absolute"}),m.append($watermark),g=this.getImageSizeForInches($watermark[0].naturalWidth,$watermark[0].naturalHeight),$watermark.css({width:g.width+"in",height:g.height+"in"}));isIE()?($(n).parent().css({"text-align":"center",
width:"100%",height:"100%"}),n.css({"text-align":"center",margin:"0 auto",display:"inline-block","max-width":"100%","max-height":"100%"})):($(n).parent().css({"text-align":"center",width:"100%",height:"100%"}),n.css({"text-align":"center",margin:"0 auto",display:"inline-block","max-width":"100%","max-height":"100%"}),n[0].naturalWidth/n[0].naturalHeight>8/11.3?n.css({width:"98%"}):n.css({height:"98%"}));this.printArray[l]=m;d++;if(d==b.length){for(l=1;l").on("load",function(){for(var n=this,p=0;p"),this.printLoad.css({display:"none","z-index":"1001",position:"absolute",left:"0",top:"0",width:"100%",height:"100%",background:"rgba(11,11,11,0.7)"}),this.printLoad.bind("click",function(b){b.stopPropagation();window.printLoadStack&&window.printLoadStack.destroy();this.hidePrintLoading()}.bind(this)),this.loadingIcon=$(""),this.printLoad.append(this.loadingIcon),tmpContainer.append(this.printLoad));this.showPrintLoading()},showPrintLoading:function(){this.printLoad&&this.printLoad.fadeIn(200)},hidePrintLoading:function(){this.printLoad&&this.printLoad.fadeOut(200)}}),PrintElements=Class({create:function(b){this._super(b);this.printOnUrl=form_icons.print_on?"data:image/png;base64,"+form_icons.print_on:uiBaseURL+"print_on.png";this.printOffUrl=form_icons.print_off?"data:image/png;base64,"+
form_icons.print_off:uiBaseURL+"print_off.png";this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){this.rightToLeft?(this.printAll=$(""+getLanguage("frmPrintall","Print All Pages")+" "),this.printCurrent=$(""+getLanguage("frmPrintcurrent","Print Current Pages")+" "),this.printRange=$("")):(this.printAll=$(""+getLanguage("frmPrintall","Print All Pages")+" "),this.printCurrent=
$(""+getLanguage("frmPrintcurrent","Print Current Pages")+" "),this.printRange=$(""));this.printButton=$(""+
getLanguage("frmPrintbtn","Print")+"
");this.printButton.printType="printCurrent";this.analysis=new AnalysisPrint(this.printButton);this.pictureListForm=new PictureListForm},pickElements:function(b){b.printOnUrl=this.printOnUrl;b.printOffUrl=this.printOffUrl;b.printAll=this.printAll;b.printCurrent=this.printCurrent;b.printRange=this.printRange;b.printButton=this.printButton;b.pictureListForm=this.pictureListForm},initEvent:function(b){this.printAll.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));
this.printCurrent.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.printRange.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.printRange.find("input").on("input propertychange change",function(){this.refreshPrintButton()}.bind(this));this.printRange.find("input").bind("mousedown touchstart pointerdown mouseover mousemove touchmove touchstend",function(c){c.stopPropagation()})},buttonEvent:function(b,c){var d=b.stage.find(".on");d.find("img").attr("src",
this.printOffUrl);d.find("img")[0].colorChanged=!1;d.removeClass("on");$(c).find("img").attr("src",this.printOnUrl);$(c).find("img")[0].colorChanged=!1;$(c).addClass("on");c=$(c).attr("print");b.printButton.printType=c;this.refreshPrintButton();b.changeItemColor()},refreshPrintButton:function(){"printRange"!=this.printButton.printType||$("#print_range_num").val()?this.lightPrintButton():this.darkPrintButton()},lightPrintButton:function(){$(this.printButton).addClass("usable");$(this.printButton).removeClass("disable");
$(this.printButton).addClass("button_hover")},darkPrintButton:function(){"printRange"==this.printButton.printType&&($(this.printButton).removeClass("usable"),$(this.printButton).removeClass("button_hover"),$(this.printButton).addClass("disable"))},changeLanguage:function(){this.printAll.find(".title").html(getLanguage("frmPrintall","Print All Pages"));this.printCurrent.find(".title").html(getLanguage("frmPrintcurrent","Print Current Pages"));this.printRange.find(".title").html(getLanguage("frmPrintRange",
"Print Range"));this.printRange.find("#print_range_num").attr("placeholder",getLanguage("frmPrintexample","Exzample:1,3-7,12"));this.printButton.html(getLanguage("frmPrintbtn","Print"))}}).extend(FormElements),PhonePrintElements=Class({create:function(b){this._super(b);this.printOnUrl=phoneBaseURL+"print_on_phone.png";this.printOffUrl=phoneBaseURL+"print_off_phone.png";this.fontColor=bookConfig.formBackgroundColor?bookConfig.formBackgroundColor:bookConfig.toolbarColor;this.initElements();this.initEvent(b);
this.pickElements(b)},initElements:function(){this.rightToLeft?(this.printAll=$(""+getLanguage("frmPrintall","Print All Pages")+""+this.getOnIcon()+"
"),this.printCurrent=$(""+getLanguage("frmPrintcurrent","Print Current Pages")+""+this.getOffIcon()+"
"),this.printRange=$("")):(this.printAll=$(""+this.getOnIcon()+"
"+getLanguage("frmPrintall","Print All Pages")+" "),this.printCurrent=$(""+
this.getOffIcon()+"
"+getLanguage("frmPrintcurrent","Print Current Pages")+" "),this.printRange=$(""));this.printButton=$(""+getLanguage("frmPrintbtn",
"Print")+"
");this.printButton.printType="printCurrent";this.analysis=new AnalysisPrint(this.printButton);this.pictureListForm=new PictureListForm},getOffIcon:function(){return''},
getOnIcon:function(){return''},
buttonEvent:function(b,c){var d=b.stage.find(".on");d.find(".print_icon").html(this.getOffIcon());d.removeClass("on");$(c).find(".print_icon").html(this.getOnIcon());$(c).addClass("on");c=$(c).attr("print");b.printButton.printType=c;this.refreshPrintButton()}}).extend(PrintElements),PcPrintFrame=Class({create:function(b){this.elements=new PrintElements(this);this._super(b)},onCreate:function(){this.initColorCss();this._super()},initColorCss:function(){this.stage.css({"background-color":this.mainColor,
color:this.fontColor})},initHtml:function(){this._super()},changeIconColor:function(){this._super();this.pictureListForm.leftBtn.changeButtonColor(this.fontColor);this.pictureListForm.rightBtn.changeButtonColor(this.fontColor);this.changeItemColor()},resetColorChanged:function(){this._super();this.printAll.find("img")[0].colorChanged=!1;this.printCurrent.find("img")[0].colorChanged=!1;this.printRange.find("img")[0].colorChanged=!1;this.pictureListForm&&(this.pictureListForm.leftBtn[0].colorChanged=
!1,this.pictureListForm.rightBtn[0].colorChanged=!1)},resetIconSrc:function(){this._super();this.stage.find(".item").find("img").attr("src",this.elements.printOffUrl);this.stage.find(".on").find("img").attr("src",this.elements.printOnUrl);this.pictureListForm&&this.pictureListForm.resetBtnSrc()},changeItemColor:function(){this.printCurrent.changeButtonColor(this.fontColor);this.printRange.changeButtonColor(this.fontColor);this.printAll.changeButtonColor(this.fontColor)},onShow:function(){this.changeIconColor()}}).extend(FadeOutFadeForm),
PhonePrintForm=Class({create:function(b){this.elements=new PhonePrintElements(this);this._super(b)},onCreate:function(){this.printAll.css({"background-color":this.fontColor,color:this.mainColor});this.printCurrent.css({"background-color":this.fontColor,color:this.mainColor});this.printRange.css({"background-color":this.fontColor,color:this.mainColor});this.printButton.css({"background-color":this.fontColor,color:this.mainColor});this.favicon&&this.favicon.changeButtonColor(this.fontColor);this._super()},
initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.printAll);this.stage.append(this.printCurrent);this.stage.append(this.printRange);this.stage.append(this.printButton)},changeItemColor:function(){},onShow:function(){this.favicon&&this.favicon.changeButtonColor(this.fontColor)},initEvent:function(){}}).extend(PhoneFormFrame),DownloadElements=Class({create:function(b){this._super(b);this.downloadOnUrl=form_icons.print_on?"data:image/png;base64,"+
form_icons.print_on:uiBaseURL+"print_on.png";this.downloadOffUrl=form_icons.print_off?"data:image/png;base64,"+form_icons.print_off:uiBaseURL+"print_off.png";this.initConfig();this.initElements();this.initEvent(b);this.pickElements(b)},initConfig:function(){this.downloadconfig=window.downloadconfig},initElements:function(){this.rightToLeft?(this.downloadAll=$(""+getLanguage("DownloadFullPublication","Full Publication")+" "),this.downloadCurrent=$(""+getLanguage("DownloadCurrentPage","Current Page")+" "+this.pageIndex+" "),this.downloadAttachments=$(""+getLanguage("DownloadAttachedFiles","Attached Files")+" ")):(this.downloadAll=$(""+getLanguage("DownloadFullPublication","Full Publication")+" "),this.downloadCurrent=$(""+getLanguage("DownloadCurrentPage","Current Page")+""+this.pageIndex+" "),this.downloadAttachments=$(""+getLanguage("DownloadAttachedFiles","Attached Files")+" "));this.downloadButton=$(""+getLanguage("btnDownload","Download")+"
");this.downloadButton.downloadType=downloadconfig.hideDownloadSinglePage?downloadconfig.pdf?"downloadAll":"downloadAttachments":"downloadCurrent";this[this.downloadButton.downloadType].find("img").attr("src",this.downloadOnUrl);this[this.downloadButton.downloadType].addClass("on");
this.selectAttachments=$("");var b=this.downloadconfig.attachments;if(b&&0"+d.name+""))}this.pictureListForm=new PictureListForm(this.gotoPage.bind(this));this.pageIndex=this.pictureListForm.getPageIndex()},gotoPage:function(b){this.pageIndex=b;this.downloadCurrent.find(".page").html(b)},pickElements:function(b){b&&(b.downloadAll=this.downloadAll,b.downloadCurrent=
this.downloadCurrent,b.downloadAttachments=this.downloadAttachments,b.selectAttachments=this.selectAttachments,b.downloadButton=this.downloadButton,b.pictureListForm=this.pictureListForm)},initEvent:function(b){this.downloadAll.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.downloadCurrent.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.downloadAttachments.click(function(c){this.buttonEvent(b,c.delegateTarget)}.bind(this));this.downloadButton.click(function(c){var d=
this,f,g,h,k,l,m;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress)return f="","downloadAll"==d.downloadButton.downloadType&&(f=d.downloadconfig.pdf.url),"downloadCurrent"!=d.downloadButton.downloadType?n.jumpTo(2):n.yield(getPageDir(d.pageIndex,"normal"),3);2!=n.nextAddress&&(f=n.yieldResult);"downloadAttachments"==d.downloadButton.downloadType&&(f=d.selectAttachments[0].value);if("object"==typeof f)for(g=0;g');p[0].click();p.remove()}.bind(d)),d.downloadPdfLoadingTask.start()):-1');p[0].click();p.remove()}.bind(d)):("downloadCurrent"==d.downloadButton.downloadType&&(f=f.removeStartFrom("?")),f.match(/^none/)?(k=document.createElement("canvas"),l=k.getContext("2d"),k.width=bookConfig.largePageWidth,k.height=bookConfig.largePageWidth,l.fillStyle=bookConfig.pageBackgroundColor,l.fillRect(0,0,bookConfig.largePageWidth,bookConfig.largePageHeight),m=$("'),m[0].click()):window.open(f,"_blank"));n.jumpToEnd()})}.bind(this))},loadImages:function(b){var c=0,d=$("");d.css({width:bookConfig.largePageWidth+"px",height:bookConfig.largePageHeight+"px"});d.attr("width",bookConfig.largePageWidth+"px");d.attr("height",bookConfig.largePageHeight+"px");for(var f=0;f");
g.attr("src",b);g[0].onload=function(h){h=$(this);bookConfig.largePageWidth/bookConfig.largePageHeight>h[0].naturalWidth/h[0].naturalHeight?h.css({width:"auto",height:"100%"}):h.css({width:"100%",height:"auto"});d.drawImage(h);c++;c==imageURL.length&&callback&&callback(imageURL,imageURL,d,index)};g[0].onerror=function(h){c++;c==imageURL.length&&callback&&callback(imageURL,imageURL,d,index)}}},buttonEvent:function(b,c){var d=b.stage.find(".on");d.find("img").attr("src",this.downloadOffUrl);d.find("img")[0].colorChanged=
!1;d.removeClass("on");$(c).find("img").attr("src",this.downloadOnUrl);$(c).find("img")[0].colorChanged=!1;$(c).addClass("on");c=$(c).attr("download");b.downloadButton.downloadType=c;b.changeItemColor()},changeLanguage:function(){this.downloadAll.find(".title").html(getLanguage("DownloadFullPublication","Full Publication"));this.downloadCurrent.find(".title").html(getLanguage("DownloadCurrentPage","Current Page"));this.downloadAttachments.find(".title").html(getLanguage("DownloadAttachedFiles","Attached Files"));
this.downloadButton.html(getLanguage("btnDownload","Download"))}}).extend(FormElements),PcDownloadFrame=Class({create:function(b){this.elements=new DownloadElements(this);this._super(b)},onCreate:function(){this.initColorCss();this._super()},initColorCss:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor});this.borderColor=this.mainColorObj.reduce(26);this.itemBgColor=this.mainColorObj.add(24)},initHtml:function(){this._super()},initEvent:function(){this._super()},onShow:function(){this.changeIconColor()},
gotoPage:function(b){}}).extend(FadeOutFadeForm),PhoneDownloadForm=Class({create:function(b){this.elements=new DownloadElements(this);this._super(b)},onCreate:function(){this.content.find(".item").css({"background-color":this.fontColor,color:this.mainColor});this.selectContent.css({"background-color":this.fontColor,color:this.mainColor});this.downloadButton.css({"background-color":this.fontColor,color:this.mainColor});this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);
this.downloadContent=$("");this.content=$("");this.content1=$("");downloadconfig.pdf&&this.content1.append(this.downloadAll);downloadconfig.hideDownloadSinglePage||this.content1.append(this.downloadCurrent);this.selectContent=$("");this.selectContent.append(this.selectAttachments);downloadconfig.attachments&&0");this.content2.append(this.pictureListForm.getDom());this.content.append(this.content2);this.content.append(this.content1);this.downloadContent.append(this.content);this.stage.append(this.downloadContent)},changeIconColor:function(){this._super();this.changeItemColor()},changeItemColor:function(){this.downloadCurrent.changeButtonColor(this.mainColor);this.downloadAttachments.changeButtonColor(this.mainColor);
this.downloadAll.changeButtonColor(this.mainColor);this.pictureListForm.leftBtn.changeButtonColor(this.fontColor);this.pictureListForm.rightBtn.changeButtonColor(this.fontColor)},onShow:function(){this.favicon&&this.favicon.changeButtonColor(this.fontColor);this.changeItemColor()},gotoPage:function(b){this.pictureListForm.fillContent(b)},initEvent:function(){}}).extend(PhoneFormFrame);global.textForPages||(global.textForPages=[]);global.positionForPages||(global.positionForPages=[]);
var highlightSearchFun=function(b,c){if(0!=positionForPages.length&&b){var d=!1;window.frmSearch&&frmSearch.visible&&0!=frmSearch.getList().length||(d=!0);var f=search_Text;""==f&&(d=!0);if(1!=d||isPhone()||isPad()){for(d=0;dl;l++)k[l]=c[h+l];g.addHighlight(k);h+=4}}b.css({display:"block"})}}else clearHighlightFun(b)}},clearHighlightFun=function(b){b.css({"background-image":""});b.css({display:"none"});b.empty()},search_Text="",SearchElements=Class({create:function(b){this._super(b);this.callBack=b;this.initElements();this.initEvent(b);this.pickElements(b)},
initElements:function(){this.searchButtonUrl=bookConfig.SearchButtonIcon?bookConfig.SearchButtonIcon:form_icons.search_form?"data:image/png;base64,"+form_icons.search_form:uiBaseURL+"search_form.png";this.searchList=[];this.searchText="";this.input=$("");bookConfig.RightToLeft&&this.input.attr("dir","rtl");this.searchButton=$("");this.searchResult=
$("");this.initSwiper()},initSwiper:function(){this.searchSwiper=$("");this.searchSwiperList=$("");this.searchSwiper.append(this.searchSwiperList);this.initPageHtml();isPhone()||isPad()?this.searchSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):(this.searchSwiper.css({overflow:"hidden"}),this.progress=$(""),this.progressBar=$(""),
this.searchSwiper.append(this.progress),this.progress.append(this.progressBar),this.searchSwiper.scroll({},Direction.top))},initPageHtml:function(){this.searchPageSwiper=$("");this.pageResult=$("");this.pageItem=$("");this.thumb=$("");this.noThumbBg=$("");if(isPhone()||isPad())this.thumb.css({width:"80px"}),this.noThumbBg.css({width:"80px",height:"104px"});this.thumb.onTap(function(){this.thumb.attr("id")&&((isPhone()||isPad()||global.frmSearch)&&global.frmSearch.hide(),gotoPageFun(this.thumb.attr("id"),!1,"search"))}.bind(this));this.noThumbBg.onTap(function(){this.noThumbBg.attr("index")&&((isPhone()||isPad()||global.frmSearch)&&global.frmSearch.hide(),gotoPageFun(this.noThumbBg.attr("index"),
!1,"search"))}.bind(this));this.searchPageSwiper.append(this.pageResult).append(this.pageItem.append(this.noThumbBg).append(this.thumb))},refreshItems:function(b){for(var c=0;c"+b+" :"+getLanguage("lblPage","Page")):this.pageResult.html(getLanguage("lblPage","Page")+": "+b+""),this.thumb.attr("id",c),this.noThumbBg.attr("index",c),fillImageAfterLoaded(c,"thumb",function(d){d.match(/^none/)?(this.noThumbBg.css({display:"block"}),this.thumb.attr("src","").css({display:"none"})):(this.thumb.attr("src",
d).css({display:"inline-block"}),this.noThumbBg.css({display:"none"}))}.bind(this))):(this.afterSearchText(),this.searchPageSwiper.css({display:"none"}))},doSearch:function(b){!b.length&&!isNaN(this.searchText)&&this.searchText<=bmtConfig.totalPageCount?this.searchResult.css({display:"none"}):this.searchResult.css({display:"block"});this.searchSwiper.hideLoading();this.searchList=b;this.searchSwiperList.empty();rightToLeft?this.searchResult.html(""+this.searchList.length+" "+getLanguage("lblPages","Found Pages")):this.searchResult.html(getLanguage("lblPages","Found Pages")+" "+this.searchList.length+"");this.refreshSwiper(this.searchSwiperList,this.searchList);this.refresh();BookInfo.getBook().addSearchHighlight()},getSearchText:function(){return this.searchText},getList:function(){return this.searchList},clear:function(){search_Text=this.searchText="";this.input.val("");
this.searchList=[];BookInfo.getBook().clearSearchHighlight();this.searchSwiperList.empty();this.searchResult.html(getLanguage("frmSearchPrompt","Enter key to search."));this.refresh()},pickElements:function(b){b.searchButtonUrl=this.searchButtonUrl;b.searchList=this.searchList;b.searchText=this.searchText;b.input=this.input;b.searchButton=this.searchButton;b.searchResult=this.searchResult;b.searchSwiper=this.searchSwiper;b.searchSwiperList=this.searchSwiperList;b.progress=this.progress;b.progressBar=
this.progressBar;b.searchPageSwiper=this.searchPageSwiper;b.pageResult=this.pageResult;this.afterSearchThumbs=b.afterSearchThumbs;this.afterSearchText=b.afterSearchText;b.search=this.search.bind(this)},changeLanguage:function(){this.input.attr("placeholder",FormInfo.getFormTitle("search"));toolBar.edtPreSearch&&toolBar.edtPreSearch.find("input")[0]&&toolBar.edtPreSearch.find("input").val(getLanguage("btnSearch","Search"))}}).extend(FormElements),PcSearchFrame=Class({create:function(b){this.elements=
new SearchElements(this);this._super(b)},onCreate:function(){this.initColorCss()},initColorCss:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor})},initHtml:function(){this.stage.addClass("win10_border");this.stage.append(this.title);this.favicon&&(bookConfig.RightToLeft?this.title.append(this.favicon):this.title.prepend(this.favicon));bookConfig.SearchButtonIcon&&(this.searchButton=$(""));this.stage.append(this.close);this.stage.append(this.input);this.stage.append(this.searchButton);this.stage.append(this.searchPageSwiper);this.stage.append(this.searchResult);this.stage.append(this.searchSwiper);this.parent.append(this.stage)},newSearchItem:function(b,c){return new PcSearchItem(b,c)},onResize:function(){var b=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1);toolBar.getWidth();var c=toolBar.getTopHeight()+
10;this.width=250;this.height=b-87;this.maxHeight=this.height-87;this.stage.css({height:this.height+"px",top:c+"px"});this.searchSwiper.css("height",this.maxHeight+"px");this.elements.refresh()},afterSearchThumbs:function(){this.height=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),1)-87;this.searchSwiper.css("height",this.height-287+"px")},afterSearchText:function(){this.height=Math.max(windowHeight-bookConfig.topMargin-bookConfig.bottomMargin-toolBar.getHeight(),
1)-87;this.searchSwiper.css("height",this.height-87+"px");this.searchPageSwiper.css({display:"none"})},getList:function(){return this.elements.getList()},onShow:function(){this.changeIconColor();this.input.focus();BookInfo.getBook().addSearchHighlight()},onHide:function(){BookInfo.getBook().clearSearchHighlight()}}).extend(SlideForm),loadSearchFlag=!1,AnalysisSearch=Class({create:function(b,c){this.callback=c;this.results=[];this.search(b)},search:function(b){if(0==loadSearchFlag)if(isTouchDevice())loadJavascript(fixURLValue(bookConfig.searchTextJS),
function(){loadSearchFlag=!0;this.doSearch(b)}.bind(this),function(){loadSearchFlag=!0;this.doSearch(b)}.bind(this));else{var c=!1,d=!1,f=function(){c&&d&&(loadSearchFlag=!0,this.doSearch(b))}.bind(this);loadJavascript(fixURLValue(bookConfig.searchTextJS),function(){c=!0;f()},function(){c=!0;f()});var g=String.format(bookConfig.searchPositionJS,BookInfo.getCurrentPageIndex());loadJavascript(fixURLValue(g),function(){d=!0;f()},function(){d=!0;f()})}else this.doSearch(b)},doSearch:function(b){this.results=
searchFromPages(textForPages,b);this.callback(this.results)},getList:function(){return this.results},clear:function(){this.results=[]}}),SearchItem=Class({create:function(b,c){this.fontColor=c.fontColor;this.parent=b;this.parm=c;this.sDescription=this.handleData(c.search_text,c.searchText);this.index=c.search_page;this.sPage=getShownPageNumber(c.search_page);this.sPageTitle=getLanguage("lblPage","Page");this.initHtml();this.initEvent()},initHtml:function(){this.initElement();this.item.append(this.page);
this.item.append(this.description);this.parent.append(this.item)},initElement:function(){this.item=$("");rightToLeft?(this.page=$(""+this.sPage+":"+this.sPageTitle+"
"),LanguageTool.isRightToLeft(this.parm.search_text)?this.description=$(""+this.sDescription+"
"):this.description=$(""+this.sDescription+"
")):(this.page=$(""+this.sPageTitle+":"+this.sPage+"
"),this.description=
$(""+this.sDescription+"
"))},handleData:function(b,c){b=HTMLString.toLabel(b);b=handleData(b,c);return b=HTMLString.riseAWord(b,c,bookConfig.searchKeywordFontColor)},initEvent:function(){this.item.bind("mouseover",function(){this.item.css({"background-color":Color(this.fontColor).rgba(.25)})}.bind(this));this.item.bind("mouseleave",function(){this.item.css({"background-color":"transparent"})}.bind(this));this.item.onTap(function(){gotoPageFun(this.index,!1,"search");
BookInfo.getBook().addSearchHighlight();(isPhone()||isPad())&&global.frmSearch.hide()}.bind(this))}}),PhoneSearchItem=Class({initEvent:function(){this.item.bind("mouseover",function(){this.item.css({"background-color":Color(this.fontColor).rgba(.25)})}.bind(this));this.item.bind("mouseleave",function(){this.item.css({"background-color":"transparent"})}.bind(this));this.item.onTap(function(){gotoPageFun(this.index,!1,"search");BookInfo.getBook().addSearchHighlight();(isPhone()||isPad())&&setTimeout(function(){global.frmSearch.hide()}.bind(this),
1>bookConfig.flippingTime?1E3*bookConfig.flippingTime+100:bookConfig.flippingTime+100)}.bind(this))}}).extend(SearchItem),PhoneSearchForm=Class({create:function(b){this.elements=new SearchElements(this);this._super(b)},onCreate:function(){this.stage.css({color:this.fontColor,"background-color":this.mainColor});this.input.css({color:"#000000",opacity:1});var b=new Color(this.mainColor);String.format("%s %s %s %s",b.reduce(40),b.reduce(40),b.add(40),b.add(40));isPhone()||isPad()?this.searchSwiper.css({"overflow-y":"auto",
"overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):this.searchSwiper.css({overflow:"hidden"});this.favicon&&this.favicon.changeButtonColor(this.fontColor);this._super()},initHtml:function(){bookConfig.SearchButtonIcon&&(this.searchButton=$(""));this.container=$("");this.title.append(this.close);
this.stage.append(this.title);this.stage.append(this.input);this.stage.append(this.searchButton);this.searchSwiper.css({height:"auto"}).find(".swiper").css({position:"relative"});this.stage.append(this.container);this.container.append(this.searchPageSwiper).append(this.searchResult).append(this.searchSwiper)},newSearchItem:function(b,c){return new PhoneSearchItem(b,c)},getList:function(){return this.elements.getList()},onShow:function(){this.favicon&&this.favicon.changeButtonColor(this.fontColor)},
hide:function(){this._super();this.input.blur()},afterSearchThumbs:function(){this.height=windowHeight},afterSearchText:function(){this.height=windowHeight;this.searchPageSwiper.css({display:"none"})},onResize:function(){this._super();this.container.css("height",this.height-115+"px");this.searchPageSwiper.css("display");this.input.css("width",this.width-75+"px");this.elements.refresh()},initEvent:function(){}}).extend(PhoneFormFrame),LanguageElements=Class({create:function(b){this._super(b);this.initElements();
this.initEvent(b);this.pickElements(b)},initElements:function(){this.choosedUrl=uiBaseURL+"choosed.png";this.itemArray=[];this.scrollBox=$("");for(var b=0;b"+c+"
");b.toLowerCase()===bookConfig.language.toLowerCase()&&
(d.addClass("focus"),this.currentItem=d);d.bind(_event._end,function(){this.refreshLanguage(b);this.currentItem=d;this.scrollBox.find(".focus").removeClass("focus");d.addClass("focus")}.bind(this));this.scrollBox.append(d);this.itemArray.push(d)}},refreshLanguage:function(b){bookConfig.language=b;changeLanguage(bookConfig.language)},initEvent:function(b){},pickElements:function(b){b.choosedUrl=this.choosedUrl;b.itemArray=this.itemArray;b.scrollBox=this.scrollBox},changeLanguage:function(){}}).extend(FormElements);
Class("PcLanguageForm",{create:function(b){this.elements=new LanguageElements(this);this._super(b)},onCreate:function(){this.close.changeButtonColor(this.color);this._super()},initEvent:function(){this._super();this.stage.bind(_event._end,function(){this.hide()}.bind(this));for(var b=0;b");var b=flipSoundIsPlaying?this.choosedUrl:this.unChoosedUrl,c=bookConfig.BackgroundSoundURL?this.choosedUrl:this.unChoosedUrl,d=getLanguage("closeFlipSound","Close Flip Sound"),f=getLanguage("closeBackgroundSound","Close Background Sound");this.flipSoundBtn=$(""+
d+"
");this.backgroundSoundBtn=$(""+f+"
");this.scrollBox.append(this.flipSoundBtn);bookConfig.BackgroundSoundButtonVisible&&bookConfig.BackgroundSoundURL&&this.scrollBox.append(this.backgroundSoundBtn)},initEvent:function(b){$(this.flipSoundBtn.find("img")).bind(_event._down,function(c){c.preventDefault()});$(this.backgroundSoundBtn.find("img")).bind(_event._down,function(c){c.preventDefault()});
this.flipSoundBtn.bind(_event._down,function(c){flipSoundIsPlaying=!flipSoundIsPlaying;this.changeFlipSoundBtnCase()}.bind(this));this.backgroundSoundBtn.bind(_event._down,function(){window.bgSound&&bgSound.playOrPause();this.changeBackgroundBtnCase()}.bind(this))},changeFlipSoundBtnCase:function(){flipSoundIsPlaying?(this.flipSoundBtn.find("img").attr("src",this.choosedUrl),playFlipSound(),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"flip sound",getLanguage("tmpl_Flipsoundon",
"Open Flip Sound")])):(this.flipSoundBtn.find("img").attr("src",this.unChoosedUrl),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"flip sound",getLanguage("tmpl_Flipsoundoff","Close Flip Sound")]));this.changeBackgroundSoundButtonState()},changeBackgroundBtnCase:function(){!0!==isPlaying?(this.backgroundSoundBtn.find("img").attr("src",this.unChoosedUrl),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"background sound",getLanguage("tmpl_Backgoundsoundoff","Close Background Sound")])):
(this.backgroundSoundBtn.find("img").attr("src",this.choosedUrl),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"background sound",getLanguage("tmpl_Backgoundsoundon","Open Background Sound")]))},changeBackgroundSoundButtonState:function(){isPlaying||flipSoundIsPlaying?StateSynchronous.instance().findButtons("PhoneBackgroundSoundButton").each(function(b){b.setAsSoundOn();b.executeCallback()}):StateSynchronous.instance().findButtons("PhoneBackgroundSoundButton").each(function(b){b.setAsSoundOff();
b.executeCallback()})},pickElements:function(b){b.choosedUrl=this.choosedUrl;b.unChoosedUrl=this.unChoosedUrl;b.scrollBox=this.scrollBox;b.flipSoundBtn=this.flipSoundBtn;b.backgroundSoundBtn=this.backgroundSoundBtn;b.changeFlipSoundBtnCase=this.changeFlipSoundBtnCase;b.changeBackgroundBtnCase=this.changeBackgroundBtnCase;b.changeBackgroundSoundButtonState=this.changeBackgroundSoundButtonState},changeLanguage:function(){flipSoundIsPlaying?this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundon",
"Open Flip Sound")):this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundoff","Close Flip Sound"));!0===isPlaying?this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundoff","Close Background Sound")):this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundon","Open Background Sound"))}}).extend(FormElements),PhoneSettingForm=Class({create:function(b){this.elements=new SettingElements(this);this._super(b)},onCreate:function(){this.favicon&&this.favicon.changeButtonColor(this.fontColor);
this._super()},initHtml:function(){this.title.append(this.close);this.stage.append(this.title);this.stage.append(this.scrollBox)},initEvent:function(){},onShow:function(){this.favicon&&this.favicon.changeButtonColor(this.fontColor)},changeLanguage:function(){this._super();this.elements.changeLanguage()}}).extend(PhoneFormFrame),PcSoundSettingForm=Class({create:function(b){this._super(b)},onCreate:function(){this.stage.css({"background-color":"transparent"});this._super()},initHtml:function(){this.flipSoundOnImage=
uiBaseURL+"flipSoundOn.png";this.flipSoundOffImage=uiBaseURL+"flipSoundOff.png";this.backSoundOnImage=uiBaseURL+"backSoundOn.png";this.backSoundOffImage=uiBaseURL+"backSoundOff.png";var b=flipSoundIsPlaying?getLanguage("tmpl_Flipsoundon","Open Flip Sound"):getLanguage("tmpl_Flipsoundoff","Close Flip Sound"),c=flipSoundIsPlaying?this.flipSoundOnImage:this.flipSoundOffImage,d=bookConfig.BackgroundSoundURL?getLanguage("tmpl_Backgoundsoundon","Open Background Sound"):getLanguage("tmpl_Backgoundsoundoff",
"Close Background Sound");this.backgroundSoundBtn=$(""+d+"
");this.flipSoundBtn=$(""+b+"
");this.stage.append(this.backgroundSoundBtn);this.stage.append(this.flipSoundBtn)},initEvent:function(b){this.flipSoundBtn.bind(_event._end,function(){flipSoundIsPlaying=!flipSoundIsPlaying;this.changeFlipSoundBtnCase()}.bind(this));
this.backgroundSoundBtn.bind(_event._end,function(){window.bgSound&&bgSound.playOrPause();this.changeBackgroundBtnCase()}.bind(this))},changeFlipSoundBtnCase:function(){flipSoundIsPlaying?(this.flipSoundBtn.find("img").attr("src",this.flipSoundOnImage),this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundon","Open Flip Sound")),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"flip sound",getLanguage("tmpl_Flipsoundon","Open Flip Sound")]),playFlipSound()):(this.flipSoundBtn.find("img").attr("src",
this.flipSoundOffImage),this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundoff","Close Flip Sound")),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"flip sound",getLanguage("tmpl_Flipsoundoff","Close Flip Sound")]));this.changeBackgroundSoundButtonState()},changeBackgroundBtnCase:function(){!0!==isPlaying?(this.backgroundSoundBtn.find("img").attr("src",this.backSoundOffImage),this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundoff","Close Background Sound")),
BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"background sound",getLanguage("tmpl_Backgoundsoundoff","Close Background Sound")])):(this.backgroundSoundBtn.find("img").attr("src",this.backSoundOnImage),this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundon","Open Background Sound")),BookEvent.trigger("clickButton",[BookInfo.getCurrentPageIndex(),"background sound",getLanguage("tmpl_Backgoundsoundon","Open Background Sound")]))},changeBackgroundSoundButtonState:function(){isPlaying||
flipSoundIsPlaying?StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOn();b.executeCallback()}):StateSynchronous.instance().findButtons("BackgroundSoundButton").each(function(b){b.setAsSoundOff();b.executeCallback()})},onShow:function(){},changeLanguage:function(){flipSoundIsPlaying?this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundon","Open Flip Sound")):this.flipSoundBtn.find(".title").html(getLanguage("tmpl_Flipsoundoff","Close Flip Sound"));
!0===isPlaying?this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundoff","Close Background Sound")):this.backgroundSoundBtn.find(".title").html(getLanguage("tmpl_Backgoundsoundon","Open Background Sound"))}}).extend(FadeOutFadeForm),HelpElements=Class({create:function(b){this._super(b);this.initElements();this.initEvent(b);this.pickElements(b)},initElements:function(){bookConfig.helpContentFileURL?this.image=$(""):(this.helpUrl=form_icons.help_form?"data:image/png;base64,"+
form_icons.help_form:uiBaseURL+"help_form.png",this.image=$(""),this.title1=$(""+getLanguage("lblHelp1","Drag the page corner to view")+"
"),this.title2=$(""+getLanguage("lblHelp2","Double click to zoom in, out")+"
"))},resetHelpIcon:function(b){bookConfig.helpContentFileURL||this.image.attr("src",this.helpUrl)},initEvent:function(b){},pickElements:function(b){b.helpUrl=this.helpUrl;b.image=this.image;b.title1=
this.title1;b.title2=this.title2},changeLanguage:function(){this.title1&&this.title1.html(getLanguage("lblHelp1","Drag the page corner to view"));this.title2&&this.title2.html(getLanguage("lblHelp2","Double click to zoom in, out"))}}).extend(FormElements),PcHelpFrame=Class({create:function(b){this.elements=new HelpElements(this);this._super(b)},onCreate:function(){this.initColorCss();bookConfig.helpContentFileURL&&(this.stage.css({width:bookConfig.helpWidth+"px",height:bookConfig.helpHeight+"px"}),
this.image.css({background:"url("+bookConfig.helpContentFileURL+") center no-repeat","background-size":"contain",width:"100%",height:"100%"}),this.content&&this.content.css({width:bookConfig.helpWidth-34+"px",height:bookConfig.helpHeight-59+"px"}));this._super();bookConfig.showHelpContentAtFirst?this.show():this.hide()},initColorCss:function(){this.stage.css({"background-color":this.mainColor,color:this.fontColor})},resetColorChanged:function(){this._super();!bookConfig.helpContentFileURL&&this.image&&
(this.image[0].colorChanged=!1)},resetIconSrc:function(b){this._super();!bookConfig.helpContentFileURL&&this.image&&this.elements.resetHelpIcon(this.fontColor)},changeIconColor:function(){this._super();!bookConfig.helpContentFileURL&&this.image&&this.image.changeButtonColor(this.fontColor)},initHtml:function(){this._super()},onShow:function(){this.changeIconColor()}}).extend(FadeOutFadeForm);
Class("SharePoster",{create:function(b){this.parent=b;this.initConfig();this.initHtml();this.initCss();this.initEvent()},initHtml:function(){this.pContainer=$("");this.initReadyHtmlPanel();this.initPosterImgPanel();this.parent.append(this.pContainer)},initConfig:function(){this.height=windowHeight-20;this.width=.66*this.height;var b=windowWidth-20;this.width>b&&(this.width=b,this.height=this.width/.66);this.scale=this.width/684},initReadyHtmlPanel:function(){this.canvas=
$("");this.ctx=this.canvas[0].getContext("2d");this.thumb=$("");this.cvsBg=$("");this.qrcodeBox=$("");
this.qrcodeBox.qrcode({width:100,height:100,render:"image",text:bookConfig.socialShareLink?bookConfig.socialShareLink:window.location.href.removeStartFrom("#p=")});this.pContainer.append(this.canvas).append(this.svg)},initPosterImg:function(){this.beforeCreatePoster();this.canvas[0].width=684;this.canvas[0].height=1036;this.imgs=[this.cvsBg,this.thumb];this.getSrcAndImg(0)},setImgs:function(b,c){var d=b.imgs;b.loadImgFun(d[c]).then(function(){c+=1;c"),h.attr("src",g),h.attr("crossOrigin","Anonymous"),this.imgs.push(h))}.bind(c));c.setImgs(c,b)}})},afterLoadPdf:function(b,c){this.thumb.attr("src",c.toDataURL("image/png"));this.setImgs(this,b)},loadImgFun:function(b){var c=$(b);return new Promise(function(d,f){c[0].complete?(console.log("load img complete"),c.attr("crossOrigin","Anonymous"),d()):
(c[0].onload=function(){c.attr("crossOrigin","Anonymous");console.log("load img ok");d()},c[0].onerror=function(g){console.log("load img error",c);f(g)})}.bind(this))},drawImages:function(b,c){this.imgs.shift();this.imgs.forEach(function(d){var f=getImageConfig(d[0],556,781,this.isUseThumb);""===d.attr("src")?(f={width:556,height:781,left:0,top:0},this.ctx.fillStyle="#ffffff",this.ctx.fillRect(b+f.left,c+f.top,f.width,f.height)):this.ctx.drawImage(d[0],f.left+b,f.top+c,f.width,f.height)}.bind(this))},
drawPoster:function(){var b=window.document.title,c=getImageConfig(this.thumb[0],556,781,this.isUseThumb);if(-1g;g++)this.ctx.fillStyle=
0==g%2?"#e5e5e5":"#f2f2f2",rightToLeft?this.ctx.fillRect(Math.floor(b.left+c-5+1*g),d+b.top+(5-g),1,f-2*(5-g)):this.ctx.fillRect(Math.floor(b.left+c+b.width+1*g),d+b.top+1*g,1,f-2*g)},drawTitleText:function(b,c){c&&(this.ctx.font="20px Arial");var d=this.ctx.measureText(b).width;c=957;this.ctx.textBaseline="top";274c)return d?g+"...":g;g=f;f+=textArr[b]}return f},drawAlertText:function(){this.ctx.font="20px Arial";var b=954;this.ctx.textBaseline="top";this.ctx.fillStyle="#db9a67";var c=this.getLinitText(getLanguage("infLongPressToIndentify","Long press to identify QR code"),267,!0),d=this.getLinitText(getLanguage("infScanCodeToView","Scan code to read"),227,!0),f=323+(226-this.ctx.measureText(d).width)/2;if(getLanguage("infLongPressToIndentify")){b=
943;this.ctx.font="14px Arial";var g=323+(226-this.ctx.measureText(c).width)/2;this.ctx.fillText(c,g,b);this.ctx.font="20px Arial";this.ctx.fillText(d,f,b+26)}else this.ctx.fillText(d,323,b)},drawQrcode:function(){this.ctx.fillStyle="#ffffff";this.ctx.fillRect(561,911,110,110);this.ctx.drawImage(this.qrcodeBox.find("img")[0],566,916,100,100);var b=new Image;b.src=bookConfig.appLogoIcon;b.setAttribute("crossOrigin","Anonymous");bookConfig.appLogoIcon&&this.ctx.drawImage(b,611,961,20,20)},getCloseSrc:function(){return"./style/icon/close.svg"},
initPosterImgPanel:function(){this.topTitle=$("");this.pcDownload=$(""+getLanguage("btnDownloadPosterPrompt","Click to download the poster")+"");this.alertText=$(""+getLanguage("infLongPressToSavePoster","Long press to identify QR code")+"
");this.closeBtn=$(''+
phoneSvgIcons.close+"");this.loading=$("");this.posterImgOuter=$("");this.posterImg=$("");this.popPosterBox=$("");this.popPosterBg=$("");this.topTitle.append(this.alertText).append(this.closeBtn).append(this.pcDownload);this.posterImgOuter.append(this.posterImg).append(this.topTitle);
this.popPosterBox.append(this.popPosterBg).append(this.posterImgOuter).append(this.loading);this.pContainer.append(this.popPosterBox);this.posterImgOuter.fadeOut()},onResize:function(){this.initConfig();this.resizeCss()},showPosterHtml:function(){this.canvas.css({display:"block",left:"50%",top:"50%",transform:"translate(-50%,-50%) scale("+this.scale+")"})},initCss:function(){this.posterImgOuter.css({overflow:"hidden",transform:"translate(-50%,-50%)","-webkit-transform":"translate(-50%,-50%)",left:"50%",
top:"50%","z-index":"1111",position:"absolute",display:"none",width:684*this.scale+"px",height:1036*this.scale+"px"});this.posterImg.css({width:684*this.scale+"px",height:1036*this.scale+"px"});this.pContainer.css({display:"none","z-index":"1001",position:"absolute",left:"0",top:"0",width:"100%",height:"100%",background:"rgba(11,11,11,0.7)"});this.popPosterBox.css({"z-index":"1001",position:"absolute",left:"0",top:"0",width:"100%",height:"100%"});this.popPosterBg.css({"z-index":"0",position:"absolute",
left:"0",top:"0",width:"100%",height:"100%"});isPhone()||isPad()?(this.topTitle.css({"-webkit-transform":"translateY(0)",transform:"translateY(0)"}),this.alertText.css({display:"block"}),this.pcDownload.css({display:"none"})):(this.topTitle.css({"-webkit-transform":"translateY(-30px)",transform:"translateY(-30px)"}),this.pcDownload.css({display:"block"}),this.alertText.css({display:"none"}))},resizeCss:function(){this.alertText.css({width:this.width-37+"px"});this.posterImgOuter.css({width:684*this.scale+
"px",height:1036*this.scale+"px"});this.posterImg.css({width:684*this.scale+"px",height:1036*this.scale+"px"});this.canvas.css({"-webkit-transform":"translate(-50%,-50%) scale("+this.scale+")",transform:"translate(-50%,-50%) scale("+this.scale+")"})},initEvent:function(){this.popPosterBg.bind(_event._down,function(b){b.stopPropagation();this.pContainer.fadeOut()}.bind(this));this.posterImg.on("load",function(){this.posterImgOuter.fadeIn()}.bind(this));isPC()&&(this.closeBtn.bind(_event._enter,function(b){b.stopPropagation();
this.closeBtn.css({opacity:"0.65"})}.bind(this)),this.closeBtn.bind(_event._leave,function(b){b.stopPropagation();this.closeBtn.css({opacity:"1"})}.bind(this)),this.pcDownload.bind(_event._enter,function(b){b.stopPropagation();this.pcDownload.css({opacity:"0.65"})}.bind(this)),this.pcDownload.bind(_event._leave,function(b){b.stopPropagation();this.pcDownload.css({opacity:"1"})}.bind(this)));this.closeBtn.bind(_event._click,function(b){b.stopPropagation();this.hide()}.bind(this));isPhone()||isPad()||
(this.posterImgOuter.bind("mouseenter",function(){this.topTitle.css({transform:"translateY(0)","-webkit-transform":"translateY(0)"})}.bind(this)),this.posterImgOuter.bind("mouseleave",function(){this.topTitle.css({transform:"translateY(-30px)","-webkit-transform":"translateY(-30px)"})}.bind(this)))},beforeCreatePoster:function(){this.canvas.css({display:"block"});this.loading.css({display:"block"})},afterCreatedPoster:function(){this.canvas.css({display:"none",left:"110%",top:"110%",transform:"scale("+
this.scale+")"});this.loading.css({display:"none"})},afterFailLoad:function(){this.beforeCreatePoster();this.showPosterHtml();this.loading.css({display:"none"});this.canvas.css({"z-index":"1002"})},show:function(){this.pContainer.fadeIn();this.hasPoster?this.posterImgOuter.fadeIn():this.isloadFail?this.afterFailLoad():this.initPosterImg();global.sharePanel&&global.sharePanel.hide();this.onShow()},hide:function(){this.pContainer.fadeOut();this.onHide()},onShow:function(){},onHide:function(){}});
(function(b){if(bookConfig.ShareButtonVisible){var c=window.location.href.toLowerCase();!(-1=window.shareObj.length)return[];for(var b=window.shareObj.length,c=[],d=0;d");b=$("");c.append(b);$("body").append(c);c.onClick(function(){c.hide();c.remove()})},ShareToFaceBook=function(b){var c=function(){var f=getHost(window.location.href).toLowerCase();if(-1<
f.indexOf("fliphtml5.com"))return"759223277462081";if(-1');
c=$('');g.append(c);$("body").append(g);g.bind("click",function(){g.unbind("click");g.remove()})}}
function sharePhoneWeChat(){var b=$(''),c=$('');b.append(c);$("body").append(b);b.bind("click",function(){b.unbind("click");b.remove()})}
(function(b){function c(p){if(!h)return p&&p();var q=document.createElement("script");q.onload=function(){p&&p()};q.onerror=function(){};q.src=1==+h?"//3gimg.qq.com/html5/js/qb.js":"//jsapi.qq.com/get?api=app.share";$("body").append(q)}function d(p){var q="";1==p.type?q=8:2==p.type?q=1:3==p.type?q=4:4==p.type?q=11:0==p.type&&(q="undefined");var r=function(){var u={url:p.url,title:p.title,description:p.desc,img_url:p.img,img_title:p.title,to_app:q,cus_txt:""};window.browser?browser.app&&browser.app.share(u):
window.qb&&qb.share&&qb.share(u)};n?r():c(r)}var f=navigator.appVersion;var g=1l&&1==m||h&&5.3>l&&1==m?h=0:h&&5.4>
l&&2==m?h=1:g&&(10.2>f&&1==m||9.7>f&&2==m)&&(g=0);c(function(){n=!0});b.mShare=function(p){this.check=function(q,r,u){g?q():h&&!k?q():k?r():u()};this.config=p;this.init=function(q){"undefined"!=typeof q&&(this.config.type=q);try{if(g){var r=this.config;q="";r.type&&(2==m?1==r.type?q="WechatTimeline":2==r.type?q="WechatFriends":3==r.type?q="QQ":4==r.type?q="SinaWeibo":0==r.type&&(q="undefined"):1==m&&(1==r.type?q="kWeixinFriend":2==r.type?q="kWeixin":3==r.type?q="kQQ":4==r.type?q="kSinaWeibo":0==r.type&&
(q="undefined")));var u=[r.title,r.desc,r.url,q,"","",""];window.ucweb?ucweb.startRequest&&ucweb.startRequest("shell.page_share",u):window.ucbrowser&&ucbrowser.web_share&&ucbrowser.web_share.apply(null,u)}else h&&!k&&d(this.config)}catch(y){}}}})(this);function showPoster(){global.sharePoster||(global.sharePoster=new SharePoster(tmpContainer));global.sharePoster.show();onShowPoster()}function onShowPoster(){}
var PhoneShareItem=Class({create:function(b){b&&(this.info=b,this.initItem(),this.initEvent())},initItem:function(){-1"):this.info.type&&"copy"==this.info.type?(this.link=$(""),copyHref(this.link[0])):this.link=$("");this.item=$("");this.logo=$("");this.title=$(''+
this.info.title+"
");this.link.append(this.item);this.info.logo&&this.item.append(this.logo);this.item.append(this.title);this.item.css({color:this.info.fontColor})},initEvent:function(){this.link.bind("touchend",function(){BookEvent.trigger("share",[BookInfo.getCurrentPageIndex(),this.info.title,!1])}.bind(this));-1"+getLanguage("frmPanelTitle","Share to")+":");this.linkBox=$("");this.linkTitle=$(""+getLanguage("frmLinkLabel","Link")+":
");this.linkArea=$("");this.copy1=$(""+getLanguage("lblCopy","Copy")+"
");this.codeBox=$("");this.codeButton=
$(""+getLanguage("frmShareQRcode","QRCode")+""+getLanguage("frmShareSmallProgram","smallProgram")+"
");this.shareCode=$("");this.miniProgramCode=$("");this.shareCode.find(".QRcode").qrcode({width:100,height:100,render:global.isIE8()?"":"image",text:share_url});bookConfig.SmallProgramUrl&&this.codeBox.append(this.miniProgramCode);this.codeBox.append(this.shareCode);this.codeBox.append(this.codeButton);this.bigCodeBox=$("");
this.bigMiniProgramCode=$("");this.shareCodeArrowBorder=$("");this.shareCodeArrow=$("");bookConfig.RightToLeft?(this.shareCodeArrowBorder.css({width:"0",height:"0","border-top":"6px solid transparent","border-right":"12px solid #dedede",
"border-bottom":"6px solid transparent",position:"absolute",left:"-12px",top:"84px"}),this.shareCodeArrow.css({width:"0",height:"0","border-top":"5px solid transparent","border-right":"10px solid #fff","border-bottom":"5px solid transparent",position:"absolute",left:"-10px",top:"85px"})):(this.shareCodeArrowBorder.css({width:"0",height:"0","border-top":"6px solid transparent","border-left":"12px solid #dedede","border-bottom":"6px solid transparent",position:"absolute",right:"-12px",top:"84px"}),
this.shareCodeArrow.css({width:"0",height:"0","border-top":"5px solid transparent","border-left":"10px solid #fff","border-bottom":"5px solid transparent",position:"absolute",right:"-10px",top:"85px"}));this.bigCodeBox.append(this.shareCodeArrowBorder);this.bigCodeBox.append(this.shareCodeArrow);this.bigMiniProgramCode.append(this.shareCodeArrow.clone(!0));bookConfig.RightToLeft?(this.bigCodeBox.css("right","-200px"),this.bigMiniProgramCode.css("right","-195px")):(this.bigCodeBox.css("left","-200px"),
this.bigMiniProgramCode.css("left","-195px"));this.shareCode.append(this.bigCodeBox);this.miniProgramCode.append(this.bigMiniProgramCode);this.shareCurrentPageBox=$("");this.shareCurrentCheck=$("");this.shareCurrentPageTitle1=$(""+getLanguage("DownloadCurrentPage","Current Page")+"
");this.sharePanel=$("");this.initQRCode();
this.showOrHideCheck();this.initCodeCss();this.addItem(this.sharePanel)},showOrHideCheck:function(){bookConfig.addCurrentPage?(this.shareCurrentPageBox.css({display:"block"}),this.shareCurrentPageBox.parent().css({height:"215px"}),this.shareCurrentChecked=!0,this.fillArea(!0,"link"),this.shareCurrentCheck.attr("src",this.searchOnUrl),this.shareCurrentCheck[0].colorChanged=!1):(this.shareCurrentPageBox.css({display:"none"}),this.shareCurrentPageBox.parent().css({height:"200px"}),this.fillArea(!1,"link"))},
initQRCode:function(){this.qrcode=$("");var b=$(""+getLanguage("frmShareQRcode","QRCode")+"");this.qrcode.find(".QRcode").qrcode({width:100,height:100,render:"image",text:share_url});$(this.qrcode.find("p")).append(b);if(bookConfig.SmallProgramUrl){b.css({cursor:""});this.qrcode.find(".miniProgram img").attr("src",bookConfig.SmallProgramUrl);this.qrcode.addClass("two");
var c=$(""+getLanguage("frmShareSmallProgram","smallProgram")+"");$(this.qrcode.find("p")).append(b);$(this.qrcode.find("p")).append(c);b.onTap(function(){c.removeClass("checked");b.addClass("checked");this.qrcode.find(".QRcode").addClass("showQR");this.qrcode.find(".miniProgram").removeClass("showQR")}.bind(this));c.onTap(function(){b.removeClass("checked");c.addClass("checked");this.qrcode.find(".QRcode").removeClass("showQR");this.qrcode.find(".miniProgram").addClass("showQR")}.bind(this))}},
initCodeCss:function(){bookConfig.SmallProgramUrl||(this.codeButton.find(".miniProgram").css({display:"none"}),this.codeButton.find(".qrcode").css({width:"100%",background:"transparent",opacity:"1",cursor:"auto"}),this.shareCode.css({"margin-top":"10px"}));this.miniProgramCode.css({display:"none"})},fillArea:function(b,c){var d=share_url;0<=d.toLowerCase().indexOf("file:")&&(d="index.html");b&&(this.shareCurrentChecked=b,d=d+"#p="+getShownPageNumber(BookInfo.getCurrentPageIndex()));"link"==c&&this.linkArea&&
this.linkArea.val(d);this.shareCurrentCheck.attr("src",this.shareCurrentChecked?this.searchOnUrl:this.searchOffUrl);this.shareCurrentCheck[0].colorChanged=!1;this.qrcode.find(".QRcode").empty().qrcode({width:100,height:100,render:"image",text:d});this.shareCode.find(".QRcode").empty().qrcode({width:100,height:100,render:global.isIE8()?"":"image",text:d})},addItem:function(b){if(this.shareList&&!(0>this.shareList.length))for(b=0;b"),copyHref(c[0])):c=-1"):$("");this.sharePanel.append(c);this.itemArray.push(c);var d=this;c.bind(_event._end,function(){var f=$(this).attr("title");BookEvent.trigger("share",[BookInfo.getCurrentPageIndex(),f,d.shareCurrentChecked])})}}},initEvent:function(b){this.copy1.onTap(function(){BookEvent.trigger("share",[BookInfo.getCurrentPageIndex(),getLanguage("lblCopy","Copy"),self.shareCurrentChecked]);this.copyFrom(this.linkArea)}.bind(this));this.linkArea.onTap(function(){this.linkArea.select()}.bind(this));this.shareCurrentCheck.onTap(function(){this.shareCurrentChecked=
!this.shareCurrentChecked;this.afterCheckClick()}.bind(this));this.linkArea.bind("mousedown touchstart pointerdown mouseover mousemove",function(c){c.stopPropagation()});this.initCodeEvent();this.linkInputChnagedEvent()},afterCheckClick:function(){this.fillArea(this.shareCurrentChecked,"link");this.shareCurrentCheck.attr("src",this.shareCurrentChecked?this.searchOnUrl:this.searchOffUrl);this.shareCurrentCheck[0].colorChanged=!1;this.shareCurrentCheck.changeButtonColor(this.fontColor)},initCodeEvent:function(){bookConfig.SmallProgramUrl&&
(this.codeButton.find(".qrcode").bind("click",function(){this.codeButton.find(".qrcode").addClass("active");this.codeButton.find(".miniProgram").removeClass("active");this.shareCode.show();this.miniProgramCode.hide();BookEvent.trigger("share",[BookInfo.getCurrentPages().join("-"),getLanguage("frmShareQRcode","QRCode"),this.shareCurrentChecked])}.bind(this)),this.codeButton.find(".miniProgram").bind("click",function(){this.codeButton.find(".qrcode").removeClass("active");this.codeButton.find(".miniProgram").addClass("active");
this.miniProgramCode.show();this.shareCode.hide();BookEvent.trigger("share",[BookInfo.getCurrentPages().join("-"),getLanguage("frmShareSmallProgram","smallProgram"),this.shareCurrentChecked])}.bind(this)),this.miniProgramCode.bind("mouseenter",function(){this.bigMiniProgramCode.fadeIn("100")}.bind(this)),this.miniProgramCode.bind("mouseleave",function(){this.bigMiniProgramCode.fadeOut("100")}.bind(this)));this.shareCode&&(this.shareCode.bind("mouseenter",function(){this.initBigCode();this.bigCodeBox.fadeIn("100")}.bind(this)),
this.shareCode.bind("mouseleave",function(){this.bigCodeBox.fadeOut("100")}.bind(this)))},initBigCode:function(){this.bigShareCode||(this.bigShareCode=$(""),this.bigCodeBox.append(this.bigShareCode));this.bigShareCode.empty().qrcode({width:160,height:160,render:global.isIE8()?"":"image",text:share_url})},linkInputChnagedEvent:function(){if(this.linkArea)this.linkArea.on("input propertychange change",function(){var b=this.linkArea.val();0<=b.toLowerCase().indexOf("file:")&&
(b="index.html");share_url=b;this.analysisShare.refreshList();this.shareList=this.analysisShare.getList();for(b=0;b");this.shareStage=$("");
this.shareSwiper=$("");this.progress=$("");this.progressBar=$("");this.shareSwiper.append(this.sharePanel);this.shareStage.append(this.shareSwiper);this.shareStage.append(this.progress);this.progress.append(this.progressBar);this.swiperContainer.append(this.shareStage);this.shareStage.scroll({},Direction.top,"win10")},initHtml:function(){this._super()},resetColorChanged:function(){this._super();bookConfig.addCurrentPage&&
(this.shareCurrentCheck[0].colorChanged=!1,this.elements.shareCurrentChecked?this.shareCurrentCheck.attr("src",this.elements.searchOnUrl):this.shareCurrentCheck.attr("src",this.elements.searchOffUrl))},changeIconColor:function(){this._super();this.changeItemColor()},changeItemColor:function(){this.elements.fontColor=this.fontColor;this.shareCurrentCheck.changeButtonColor(this.fontColor)},onShow:function(){this.changeIconColor();this.shareStage.refreshData()}}).extend(FadeOutFadeForm),PhoneShareForm=
Class({create:function(b){this.elements=new ShareElements(this);this._super(b)},onCreate:function(){this.stage.css({color:this.fontColor});this.close.changeButtonColor(this.fontColor);this.back.css({color:this.fontColor});this.favicon&&this.favicon.changeButtonColor(this.fontColor);this._super()},initHtml:function(){this.initSwiper();var b="Back";"Chinese"==UserGroups&&(b="\u8fd4\u56de");b=getLanguage("btnBack",b);this.back=$(""+b+" ");this.stage.append(this.back);this.stage.append(this.title);this.favicon&&(bookConfig.RightToLeft?this.title.append(this.favicon):this.title.prepend(this.favicon));this.stage.append(this.close);this.stage.append(this.shareSwiper);this.stage.append(this.qrcode);this.hideQRCode()},initSwiper:function(){this.shareSwiper=$("");this.shareSwiperList=$("");
this.refreshSwiper(this.shareSwiperList,this.shareList);this.shareSwiper.append(this.shareSwiperList);isPhone()||isPad()?this.shareSwiper.css({"overflow-y":"auto","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}):(this.shareSwiper.css({overflow:"hidden"}),this.shareSwiperList.css({top:0,left:0,width:"100%",position:"absolute"}),this.progress=$(""),this.progressBar=$(""),this.shareSwiper.append(this.progress),this.progress.append(this.progressBar),
this.shareSwiper.scroll({},Direction.top))},refreshSwiper:function(b,c){for(var d=c.length,f=0;f");this.title.append(this.close);this.stage.append(this.title);this.container.append(this.logo);this.container.append(this.description);this.container.append(this.author);this.container.append(this.address);this.container.append(this.email);this.container.append(this.website);this.container.append(this.mobile);this.stage.append(this.container)},bookReadTimesVisible:function(){var b=setInterval(function(){try{0"+getLanguage("frmaboutcaption","Contact")+"");this.descriptionTitle=$(""+getLanguage("frmaboutDESCRIPTION",
"Description")+"");this.logo=$("");this.initDom();this.resetAboutHtml();bookConfig.AboutWebsite&&this.logo.attr("href",bookConfig.AboutWebsite)},resetAboutHtml:function(){bookConfig.CompanyLogoFile?this.logo.css({display:"inline-block",background:"url('"+bookConfig.CompanyLogoFile+"') center center no-repeat",
"background-size":"contain"}):this.logo.css({display:"none"});this.strViews=getLanguage("frmaboutViews",global.aboutReadTimesCaptions);rightToLeft?(this.author.html(""+bookConfig.AboutAuthor+"
: "+getLanguage("frmaboutAUTHOR","Author")+""),this.address.html(""+bookConfig.AboutAddress+"
: "+getLanguage("frmaboutADDRESS","Address")+""),this.email.html(""+bookConfig.AboutEmail+": "+getLanguage("frmaboutEMAIL","Email")+""),this.website.html(""+bookConfig.AboutWebsite+": "+getLanguage("frmaboutWEBSITE","Website")+""),this.mobile.html(""+bookConfig.AboutMobile+": "+
getLanguage("frmaboutMOBILE","Mobile")+""),this.description.html(""+bookConfig.AboutDescription.replaceAll(" "," ")+""),this.views.html(""+this.ReadTimes+"
: "+getLanguage("frmaboutViews",this.strViews)+"")):(this.author.html(""+getLanguage("frmaboutAUTHOR","Author")+": "+bookConfig.AboutAuthor+""),this.address.html(""+
getLanguage("frmaboutADDRESS","Address")+": "+bookConfig.AboutAddress+""),this.email.html(""+getLanguage("frmaboutEMAIL","Email")+": "+bookConfig.AboutEmail+""),this.website.html(""+getLanguage("frmaboutWEBSITE","Website")+": "+bookConfig.AboutWebsite+
""),this.mobile.html(""+getLanguage("frmaboutMOBILE","Mobile")+": "+bookConfig.AboutMobile+""),this.description.html(""+bookConfig.AboutDescription.replaceAll(" "," ")+""),this.views.html(""+getLanguage("frmaboutViews",this.strViews)+": "+this.ReadTimes+"
"));this.email.bind(_event._down,
function(){BookEvent.trigger("jumpLink",["about email",BookInfo.getCurrentPages().join("-"),bookConfig.AboutEmail])});this.website.bind(_event._down,function(){BookEvent.trigger("jumpLink",["about website",BookInfo.getCurrentPages().join("-"),bookConfig.AboutWebsite])});this.mobile.bind(_event._down,function(){BookEvent.trigger("jumpLink",["about mobile",BookInfo.getCurrentPages().join("-"),bookConfig.AboutMobile])});this.showOrHideContent()},showOrHideContent:function(){var b="inline-block";if(isPhone()||
isPad()||"brief"==global.templeteName)b="block";this.views.css({display:this.ReadTimes?b:"none"});this.author.css({display:bookConfig.AboutAuthor?b:"none"});this.address.css({display:bookConfig.AboutAddress?b:"none"});this.email.css({display:bookConfig.AboutEmail?b:"none"});this.website.css({display:bookConfig.AboutWebsite?b:"none"});this.mobile.css({display:bookConfig.AboutMobile?b:"none"});this.description.css({display:bookConfig.AboutDescription?b:"none"})},initDom:function(){this.views=$("");
this.author=$("");this.address=$("");this.email=$("");this.website=$("");this.mobile=$("");this.description=$("")},pickElements:function(b){b&&(b.contactTitle=this.contactTitle,b.descriptionTitle=this.descriptionTitle,b.logo=this.logo,b.author=this.author,b.address=this.address,b.email=this.email,b.website=this.website,
b.mobile=this.mobile,b.description=this.description,b.views=this.views,b.ReadTimes=this.ReadTimes)},initEvent:function(b){this.contactTitle.onTap(function(){b.showContact()});this.descriptionTitle.onTap(function(){b.showDescription()})},changeLanguage:function(){this.contactTitle.html(getLanguage("frmaboutcaption","Contact"));this.descriptionTitle.html(getLanguage("frmaboutDESCRIPTION","Description"));this.rightToLeft?(this.author.find(".title").html(":"+getLanguage("frmaboutAUTHOR","Author")),this.address.find(".title").html(":"+
getLanguage("frmaboutADDRESS","Address")),this.email.find(".title").html(":"+getLanguage("frmaboutEMAIL","Email")),this.website.find(".title").html(":"+getLanguage("frmaboutWEBSITE","Website")),this.mobile.find(".title").html(":"+getLanguage("frmaboutMOBILE","Mobile")),this.views.find(".title").html(":"+getLanguage("frmaboutViews",this.strViews))):(this.author.find(".title").html(getLanguage("frmaboutAUTHOR","Author")+":"),this.address.find(".title").html(getLanguage("frmaboutADDRESS","Address")+
":"),this.email.find(".title").html(getLanguage("frmaboutEMAIL","Email")+":"),this.website.find(".title").html(getLanguage("frmaboutWEBSITE","Website")+":"),this.mobile.find(".title").html(getLanguage("frmaboutMOBILE","Mobile")+":"),this.views.find(".title").html(getLanguage("frmaboutViews",this.strViews)+":"))}}).extend(FormElements);
Class("AutoFlip",{create:function(){this.duration=bookConfig.autoPlayDuration;this.loopCount=bookConfig.autoPlayLoopCount;this.loopNumber=0;bookConfig.autoPlayAutoStart&&bookConfig.AutoPlayButtonVisible&&this.start.delay(this,300)},isPlaying:function(){return this.interval?this.interval.isRunning():!1},start:function(){this.isPlaying()||(this.interval?this.interval.start():this.interval=this.flipPage.interval(this,1E3*this.duration),StateSynchronous.instance().findButtons("AutoPlayButton",!0).each(function(b){b.setAsStop();
b.executeCallback()}))},stop:function(){this.isPlaying()&&(this.interval&&this.interval.stop(),this.loopNumber=0,StateSynchronous.instance().findButtons("AutoPlayButton",!0).each(function(b){b.setAsStart();b.executeCallback()}))},flipPage:function(){var b=bookConfig.totalPageCount;bookConfig.SingleModeBanFlipToLastPage&&bookType==BookType.single_book&&(b=Math.max(1,bookConfig.totalPageCount-1));-1this.loopNumber?
firstPageFun("auto flip"):this.stop()):nextPageFun("auto flip")}});bdor[22]="l";bdor[5]="a";bdor.y="y";bdor[60]=DeString("aedbead60022df63");bdor[11]=DeString("fa03614631");
Class("initBackground",{create:function(b){this.bg=$("");this.bgColor=$("");this.bgImg=$("");this.backgroundImage=$("");window.top!=window&&(this.bg.css("opacity",bookConfig.backgroundOpacity/100),$(document).bind(fullScreenApi.fullScreenEventName,this.onFullscreen.bind(this)));
b.append(this.bg);this.bg.append(this.bgColor);bdor[66]="ipht";this.resetBgColor();this.resetBgImg();this.addDynamicBackground();this.addBookPlugin();this.addSlideShow();this.slideShow&&b.append(this.slideShow);this.initEvent()},resetBgColor:function(){this.gAngle=-(bookConfig.bgMRotation%360);this.gColorA=getColor("bgBeginColor","#a93268");this.gColorB=getColor("bgEndColor","#588643");if($.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,
f=this.gColorB;1g[0].pageX&&52>g[0].pageY&&8===h&&(this.doorStas=9);60>k&&39>l&&9===h&&(g=$(""+skin[300]+skin[12]+"l"+skin[66]+skin.m+skin.i(22)+skin[42]+skin[60]+"
"),h=$(""+skin[300]+
skin.y+String.fromCharCode(117)+"n"+skin[11]+skin[26]+skin.i(5)+String.fromCharCode(110)+365+skin[60]+"
"),bookContainer.append(g),bookContainer.append(h),k=Math.floor(100*Math.random()),g.css({position:"absolute",top:k+"px",color:d}),h.css({position:"absolute",top:k+30+Math.floor(100*Math.random())+"px",color:f}),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(window.staticAd&&window.staticAd.haveAd&&0");var 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=$("");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":$.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()},SliderShowAd=Class({create:function(b,c){this.parent=b;this.slides=c.data;this.timer=null;this.index=0;this.tableBox=$("");this.closeBtn=$("");
this.closeUrl=uiBaseURL+"ad_close.png";this.closeIcon=$("");this.closeBtn.append(this.closeIcon);this.closeBtn.bind("click",this.hide.bind(this));window.staticAd.bgColor?this.parent.append(this.closeBtn):(this.tableBox.css("position","relative"),this.closeBtn.css({right:"0px",top:"-22px"}),this.tableBox.append(this.closeBtn));this.parent.append(this.tableBox);this.initSwiperHtml();this.setSwiperInterval(c)},initSwiperHtml:function(){for(var b=
staticAd.adHeight?parseInt(staticAd.adHeight):60,c=0;c"):$(""),this.swiperImg=$(""),this.swiperImg.attr("src",this.slides[c].src),this.swiper.append(this.swiperImg),0=windowWidth/b&&$(this).css({width:"100%",height:"auto"})})},getCorrectUrl:function(b){return getRealURL(b)},setSwiperInterval:function(b){this.timer=setInterval(function(){this.index++;this.index=this.index==this.slides.length?0:this.index;this.tableBox.find("a").eq(this.index).show().siblings("a").hide()}.bind(this),b.interval)},hide:function(){this.parent.animate({bottom:-85},1E3,function(){this.destroy()}.bind(this))},destroy:function(){this.parent.remove();
this.timer=null}}),PhoneSliderShow=Class({create:function(b,c){this.parent=b;this.slides=c.data;this.timer=null;this.index=0;this.tableBox=$("");this.closeBtn=$("\u5173\u95ed
");this.closeBtn.bind("click",this.hide.bind(this));this.parent.append(this.closeBtn);this.parent.append(this.tableBox);this.initSwiperHtml();
this.setSwiperInterval(c)},initSwiperHtml:function(){for(var b=0;b"):$(""),this.swiperImg=$(""),this.swiperImg.attr("src",this.slides[b].src),this.swiper.append(this.swiperImg),
this.tableBox.append(this.swiper)},getCorrectUrl:function(b){return getRealURL(b)},setSwiperInterval:function(b){this.timer=setInterval(function(){this.index++;this.index=this.index==this.slides.length?0:this.index;this.tableBox.find("a").eq(this.index).show().siblings("a").hide()}.bind(this),b.interval)},hide:function(){this.parent.animate({bottom:-85},1E3,function(){this.destroy()}.bind(this))},destroy:function(){this.parent.remove();this.timer=null}}),isPlaying;
Class("BackgroundSound",{create:function(){isPlaying=!1;this.currentIndex=0;this.urlList=[];this.audioList=[];this.initResource();this.initAudioList();this.initEvent();this.play()},initResource:function(){var b=bookConfig.BackgroundSoundURL;b&&("string"==typeof b?this.urlList.push(b):this.urlList=b)},resetResource:function(){this.destroyAudio();this.urlList=[];this.audioList=[];this.initResource();this.initAudioList();this.initEvent();this.play()},destroyAudio:function(){for(var b=0;b"),$("body").append(d)):d=$(""),isNaN(bookConfig.bgSoundVol)||(d[0].volume=bookConfig.bgSoundVol/100),d[0].index=c,d.bind("play",function(){unbindSoundEvent();this.hasPlayed=!0}),this.audioList.push(d))}},
initEvent:function(){for(var b=this,c=bookConfig.BackgroundSoundLoop,d=this.audioList.length,f=0;f");this.iconBox=$("");$(b).append(this.background);$(this.background).asButton();this.background.css({position:"absolute",width:this.width+"px",height:this.height+"px","-webkit-border-radius":"2px","-moz-border-radius":"2px","border-radius":"2px",cursor:"pointer"});void 0!=this.config.mainColor&&(this.mainColor=this.config.mainColor,this.background.css({"background-color":this.config.mainColor}));this.buttonType!=
buttonType.icon_button&&(this.caption=this.config.caption,this.captionBox=new label(this.caption,this.background),this.setPosition());this.buttonType!=buttonType.caption_button&&(this.iconBox.attr("src",this.iconURL),this.asImgButton&&$(this.iconBox).asImageButton(),$(this.background).append(this.iconBox),this.iconBox.on("load",function(){this.setPosition()}.bind(this)))},setPosition:function(){if(this.buttonType==buttonType.double_button){var b=this.captionBox.getWidth(),c=this.captionBox.getHeight(),
d=this.iconBox.width(),f=this.iconBox.height();switch(this.config.align){case buttonAlign.icon_left:this.width=b+d+12;this.height=Math.max(f,c)+6;$(this.iconBox).css({top:(this.height-f)/2+"px",left:"4px"});this.captionBox.setLabelPosition((this.height-c)/2,4,["top","right"]);break;case buttonAlign.icon_top:this.width=Math.max(d,b)+6;this.height=c+f+8;this.iconBox.css({top:"2px",left:(this.width-d)/2+"px"});this.captionBox.setLabelPosition((this.width-b)/2,2,["left","bottom"]);break;case buttonAlign.icon_right:this.width=
b+d+12;this.height=Math.max(f,c)+6;$(this.iconBox).css({top:(this.height-f)/2+"px",right:"4px"});this.captionBox.setLabelPosition((this.height-c)/2,4,["top","left"]);break;case buttonAlign.icon_bottom:this.width=Math.max(d,b)+6,this.height=c+f+8,$(this.iconBox).css({bottom:"2px",left:(this.width-d)/2+"px"}),this.captionBox.setLabelPosition(2,(this.width-b)/2,["top","left"])}}else if(this.buttonType==buttonType.caption_button)this.width=this.captionBox.getWidth()+10,this.height=this.captionBox.getHeight()+
10,this.captionBox.setLabelPosition(5,2);else if(this.buttonType==buttonType.icon_button)this.iconBox.on("load",function(){this.width=$(this.iconBox).width();this.height=$(this.iconBox).height()}.bind(this));$(this.background).css({width:this.width,height:this.height+"px"})},resize:function(b,c){this.onResize(b,c)},onResize:function(b,c){this.width=b;this.height=c;$(this.background).css({width:b+"px",height:c+"px"})},getWidth:function(){return this.width},getHeight:function(){return this.height},
setCSS:function(b){$(this.background).css(b)},setButtonPosition:function(b,c,d){void 0==d&&(d=["left","top"]);this.background.css(d[0],b+"px");this.background.css(d[1],c+"px")},setVisible:function(b){$(this.background).css({display:b?"block":"none"})},changeIcon:function(b){this.iconURL=b;$(this.iconBox).attr("src",this.iconURL);1==this.iconBox[0].colorChanged&&(this.iconBox[0].colorChanged=!1);this.setPosition()},changeCaption:function(b){this.captionBox.setCaption(b);this.setPosition()},getCaptionWidth:function(b){return this.captionBox.getWidth()},
setIconPosition:function(b,c){this.iconBox.css({left:b+"px",top:c+"px"})},setColor:function(b,c){this.mainColor=b;$(this.iconBox).changeButtonColor(b);this.buttonType!=buttonType.icon_button&&(this.captionBox.setFont("12px",c?c:b,"Tahoma"),$(this.background).css({"text-shadow":"1px 1px #666666"}))},onMouseDown:function(b,c){this.background.bind(_event._down,function(d){c.call(b,d);return!1})},onMouseUp:function(b,c){$.browser.msie?this.background.bind("click",function(d){c.call(b,d);return!1}):this.background.bind(_event._end,
function(d){c.call(b);return!1})},onMouseOver:function(b,c){this.background.bind(_event._move,function(d){c.call(b);return!1})},mouseEnterShine:function(b,c){this.background.mouseEnterShine(b,c)},mouseEnterJump:function(){this.background.mouseEnterJump()},mouseEnterLight:function(b){this.background.css({"border-radius":"5px"});this.background.bind(_event._enter,function(c){$(this).css({background:b})});this.background.bind(_event._leave,function(c){$(this).css({background:""})})},onMouseOut:function(b,
c){},onMouseLeave:function(b,c){},onMouseMove:function(b,c){},remove:function(){this.background.remove()}});
eval(function(b,c,d,f,g,h){g=function(k){return(62>k?"":g(parseInt(k/62)))+(35<(k%=62)?String.fromCharCode(k+29):k.toString(36))};if(0=="0".replace(0,g)){for(;d--;)h[g(d)]=f[d];f=[function(k){return h[k]||k}];g=function(){return"([2-46-9b-su-wA-Z]|1\\w)"};d=1}for(;d--;)f[d]&&(b=b.replace(new RegExp("\\b"+g(d)+"\\b","g"),f[d]));return b}("6 2;6 initDemoBar=b(){q(B.indexOf(\"C.D\")==-1){B+=\"C.D\"}q(!4.j||!4.j.E()||!4.c||!4.c.E())$(\"r\").F(\"\");6 s=4.c;2=$(\"\");2.3({u:'305px',l:'70px',m:'n','background-G':'#cccccc','H':0.5,'z-I':J,'-moz-v-w':'o','-webkit-v-w':'o','v-w':'o'});6 d=$(\"\");d.3({m:'n',e:'L',f:'o',\"M-u\":\"53px\",\"M-l\":\"N\"});6 g=$(\"\");g.3({m:'n',e:'13px',f:'65px'});6 demoLogo=$(\"\");6 h=$(\"\"+4.j+\"\");6 8=$(\"\"+s+\"\");8.3({m:'n',e:'25px',f:'0px'});h.3({'font-size':'15px',G:'#333333'});$(\"r\").i(2);2.i(g);g.i(h);bdor[18]=\"t\";g.i(8);$.fn.extend(2,{V:b(){2.3({e:0,f:0,W:0,X:0,O:\"auto\"})},Y:b(){d.on(\"load\",b(){2.i(d)});d.Z({P:Q+'R.S'})}});2.Y();2.V();window.setInterval(b(){q(!2||2.3(\"display\")==\"none\"||2.3(\"visibility\")==\"p\"||2.A(':p')||!2.parent()[0]||10(2.3(\"H\"))<=0||10(2.3(\"z-I\"))");
this.leftBottonIcon=$("");this.leftBotton.append(this.leftBottonIcon);this.rightBotton=$("");this.rightBottonIcon=$("");this.rightBotton.append(this.rightBottonIcon);this.firstButton=$("");this.lastButton=$("");var k=this;$("")[0].onload=function(){k.width=this.naturalWidth;k.height=this.naturalHeight;
k.onResize()};this.leftBottonIcon.asImageButton(d);this.rightBottonIcon.asImageButton(f)},getImageUrl:function(b){return window.toolbar_icons&&toolbar_icons[b]?"data:image/png;base64,"+toolbar_icons[b]:uiBaseURL+b+".png"},onResize:function(){this.left=toolBar.getLeftWidth();this.right=toolBar.getRightWidth();var b=BookInfo.top();1==BookInfo.getCurrentPageIndex()&&BookInfo.isDoublePage()&&bookConfig.retainBookCenter&&bookConfig.FlipDirection&&"slide"!=bookConfig.FlipStyle.toLowerCase()&&(b+=BookInfo.height()/
4);this.top=(BookInfo.height()-this.height)/2+b;this.minLeft=Math.max(this.left,10);this.minRight=Math.max(this.right,10);this.minBottom=windowHeight-b-BookInfo.height();this.leftBotton.css({left:this.left,top:this.top});this.firstButton.css({left:this.minLeft,bottom:this.minBottom});this.rightBotton.css({right:this.right,top:this.top});this.lastButton.css({right:this.minRight,bottom:this.minBottom})},animate:function(){this.leftBotton.animate({left:this.left},500);this.firstButton.animate({left:this.minLeft},
500);this.rightBotton.animate({right:this.right},500);this.lastButton.animate({right:this.minRight},500)},show:function(){this.leftBotton.show();this.firstButton.show();this.rightBotton.show();this.lastButton.show()},hide:function(){this.leftBotton.hide();this.firstButton.hide();this.rightBotton.hide();this.lastButton.hide()},initEvents:function(){this.leftBotton.bind(_event._click,function(){rightToLeft?nextPageFun("flip shot bar"):previousPageFun("flip shot bar");return!1});this.firstButton.bind(_event._click,
function(){rightToLeft?lastPageFun("flip shot bar"):firstPageFun("flip shot bar");return!1});this.rightBotton.bind(_event._click,function(){rightToLeft?previousPageFun("flip shot bar"):nextPageFun("flip shot bar");return!1});this.lastButton.bind(_event._click,function(){rightToLeft?firstPageFun("flip shot bar"):lastPageFun("flip shot bar");return!1});this.firstButton.bind(_event._enter,function(){$(this).css({opacity:"1",background:"rgba(0,0,0,0.2)"});$(this).scale(1)});this.firstButton.bind(_event._leave,
function(){$(this).css({opacity:"1",background:"none"});$(this).css({opacity:"0.2"});$(this).scale(1)});this.firstButton.bind(_event._end,function(){$(this).css({opacity:"1",background:"none"});$(this).css({opacity:"0.2"});$(this).scale(1)});this.lastButton.bind(_event._enter,function(){$(this).css({opacity:"1",background:"rgba(0,0,0,0.2)"});$(this).css({opacity:"1"});$(this).scale(1)});this.lastButton.bind(_event._leave,function(){$(this).css({opacity:"1",background:"none"});$(this).css({opacity:"0.2"});
$(this).scale(1)});this.lastButton.bind(_event._end,function(){$(this).css({opacity:"1",background:"none"});$(this).css({opacity:"0.2"});$(this).scale(1)})}});
Class("CodeBar",{create:function(b){if(this.visible=parseBool(bookConfig.QRCode)&&!isBelowIE9())this.background=$(""),this.contentBox=$(""),this.showing=!1,this.width=windowWidth,this.height=windowHeight,this.contentWidth=Math.min(windowWidth-60,windowHeight-60,310)+20,this.contentHeight=Math.min(windowWidth-60,windowHeight-60,310)+20+40,this.mainColor="#888888",this.background.css({height:this.height+"px",bottom:"0px"}),this.contentBox.css({height:this.contentHeight+
"px",width:this.contentWidth+"px",left:(this.width-this.contentWidth)/2+"px"}),this.contentBox.css({top:(this.height-this.contentHeight)/2+"px"}),$(b).append(this.background),$(b).append(this.contentBox),this.titleBox=$(""),this.titleBox.css({width:this.contentWidth-6+"px",height:"20px",left:"3px",bottom:"10px",position:"absolute","line-height":"20px"}),this.titleBox.css({"vertical-align":"middle","text-align":"center",color:"#625715","text-shadow":"1px 1px 1px #ffffff"}),this.titleBox.css({background:"#edaa1d",
"border-radius":"10px",border:"#ffffff solid 1px"}),this.titleBox.html("Scan QR code"),this.scanBox=$(""),this.scanBox.css({position:"absolute","border-radius":"5px"}),this.scanBox.css({width:this.contentWidth-80+"px",height:this.contentWidth-80+"px",background:"#ffffff",border:"#edaa1d solid 10px",left:"30px",top:"30px"}),this.contentBox.append(this.scanBox),this.closeButton=$(""),this.closeButton.css({top:"0px",right:"0px",position:"absolute"}),this.closeButton.append($("")),$(this.contentBox).append(this.closeButton),this.fillImage(),this.initEvent(),this.background.css({display:"none"}),this.contentBox.css({display:"none"})},onResize:function(){this.visible&&(this.width=windowWidth,this.height=windowHeight,this.contentWidth=Math.min(windowWidth-60,windowHeight-60,310)+20,this.contentHeight=Math.min(windowWidth-60,windowHeight-60,310)+20+40,this.background.css({height:this.height+"px",bottom:"0px"}),this.contentBox.css({height:this.contentHeight+
"px",width:this.contentWidth+"px",left:(this.width-this.contentWidth)/2+"px"}),this.contentBox.css({top:(this.height-this.contentHeight)/2+"px"}),this.titleBox.css({width:this.contentWidth-6+"px",height:"20px",left:"3px",bottom:"10px","line-height":"20px"}),this.scanBox.css({width:this.contentWidth-80+"px",height:this.contentWidth-80+"px",left:"30px",top:"30px"}),this.closeButton.css({top:"0px",right:"0px"}),this.scanBox.html(""),this.fillImage())},setPosition:function(b,c,d){this.visible&&(void 0==
d&&(d=["left","top"]),$(this.background).css(d[0],b+"px"),$(this.background).css(d[1],c+"px"))},getShowStatu:function(){return this.showing},setShowStatu:function(b){this.showing=b},show:function(){this.visible&&($(this.background).css({display:"block"}),$(this.contentBox).fadeIn(500),this.showing=!0)},hide:function(){this.visible&&($(this.background).fadeOut(500),$(this.contentBox).fadeOut(500),this.showing=!1)},initEvent:function(){if(this.visible){var b=this;this.background.bind(_event._down,function(c){b.hide();
b.showing=!1});this.closeButton.bind(_event._end,function(c){b.hide();b.showing=!1});this.closeButton.bind("mouseover",function(c){b.closeButton.css({cursor:"pointer"})})}},fillImage:function(){this.visible&&this.scanBox.qrcode({width:this.contentWidth-80,height:this.contentWidth-80,text:window.location.href})}});
Class("QRButton",{create:function(b){if(this.visible=parseBool(bookConfig.QRCode)&&!isBelowIE9())this.button=$(""),this.$qrcodeBox=$(""),this.$boxArrow=$(""),b.append(this.button),this.initHtml(),this.initQrcode(),this.initEvent()},initHtml:function(){var b=$("#fbToolBar").height()?$("#fbToolBar").height()+5:15;this.button.css({width:"40px",height:"40px","z-index":"1001",right:"0px",bottom:b+"px",background:"rgba(0, 0, 0, 0.3)",
position:"absolute","image-redering":"pixelated"});this.$codeIconBox=$("");this.resetIconColor();this.button.append(this.$codeIconBox)},resetIconColor:function(){var b=$('
");b?l.css(b):l.css("text-align",k.align);var m=$("");m.css(this.getFontCSS(k.font));k=k.text;k=k.replaceAll("<br>","
");(k=k.replaceAll("<br/>","
"))||(k=" ");k=k.replaceAll(" "," ");-1")&&(k=k.replaceAll("",''));
m.append(k);l.append(m);g.append(l)}c.append(g)}return c},getFontCSS:function(b){return b?{"font-family":b.family,color:b.color,"font-size":b.size+"px","letter-spacing":b.letterSpacing+"px","word-spacing":b.kerning+"px","font-style":b.italic?"italic":"normal","text-decoration":b.underline?"underline":"none"}:{}}});
Class("Item",{Package:"PageItem",create:function(b,c,d,f){this.parent=b;this.config=this.parseConfig(c);this.pageWidth=d;this.pageHeight=f;this.pw=d;this.ph=f;this.type=this.config.annotype},parseConfig:function(b){return b},animateConfig:function(){this.config.animation&&this.config.animation.name&&(this.config.animation.duration||(this.config.animation.duration=1),this.config.animation.timeFun||(this.config.animation.timeFun="ease"),this.config.animation.delay||(this.config.animation.delay=0),this.config.animation.count||
(this.config.animation.count=1),this.config.animation.direction||(this.config.animation.direction="normal"))},getOssUrl:function(b,c,d,f){return b=0=c&&(c=0);this.top+this.hintHeight>this.pageHeight/2?b.css({left:c+"px",top:Math.max(2,this.top-this.hintHeight-15)+"px"}):b.css({left:c+"px",top:Math.max(2,this.top+this.height+5)+"px"})},bubbleHint:function(b){var c=this.left+(this.width-this.hintWidth-10)/2;0>=c&&(c=0);this.top+this.hintHeight+this.height>this.pageHeight/
2?b.css({left:c+"px",top:Math.max(2,this.top-this.hintHeight-15)+"px"}):(b.css({left:c+"px",top:Math.max(2,this.top+this.height+5)+"px"}),b.find("#text_hint")[0]&&b.find("#text_hint").css({position:"absolute",bottom:"auto",top:"-10px",left:this.hintWidth/2-6+"px",border:"10px solid transparent","border-top-width":0,"border-left-width":"5px","border-right-width":"5px","border-bottom-color":Color(this.config.hint.hintShapeColor).rgba(this.config.hint.hintShapeAlpha)}))},addActionEvent:function(b){b=
new this.ActionManager(this,b,this.config);b.prepareAction();b.addAction()},addEffectEvent:function(b,c){(new this.EffectManager(this,b,c,this.config)).addEffect()},addHighLightEvent:function(b,c){b=new this.HighLightManager(this,b,c,this.config);if(b=b.addHighLight())return b},imageReflection:function(b){1==supports("boxReflect")&&this.addCSSReflection(b)},addCSSReflection:function(b){var c=this.config.pageW/this.pageWidth;this.config.pageW||(c=1.2);var d=this.config.reflectionAlpha?Number(this.config.reflectionAlpha):
0;"1"==this.config.reflectionType&&(d?b.css({"-webkit-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))","-o-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))"}):b.css({"-webkit-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))",
"-o-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))"}));"6"==this.config.reflectionType&&(d?b.css({"-webkit-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))","-o-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))"}):b.css({"-webkit-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))",
"-o-box-reflect":"below 0px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))"}));"3"==this.config.reflectionType&&(d?b.css({"-webkit-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))","-o-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))"}):b.css({"-webkit-box-reflect":"below "+
10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))","-o-box-reflect":"below "+10*c+"px -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.5, transparent), to(white))"}));"4"==this.config.reflectionType&&(d?b.css({"-webkit-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))","-o-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+
d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))"}):b.css({"-webkit-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))","-o-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.7, transparent), to(white))"}));"5"==this.config.reflectionType&&(d?b.css({"-webkit-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+
d+")), to(white))","-o-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255,255,255,"+d/2+")),color-stop(0.5,rgba(255,255,255,"+d+")), to(white))"}):b.css({"-webkit-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.6, transparent), to(white))","-o-box-reflect":"below 0 -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(0.6, transparent), to(white))"}))},setShapeShadow:function(b){switch(Number(this.config.sa)){case 90:offx=
0;offy=4;break;case 180:offx=-4;offy=0;break;case 270:offx=0;offy=-4;break;case 360:offx=4,offy=0}b.shadowOffsetX=offx;b.shadowOffsetY=offy;b.shadowBlur=this.config.sx;b.shadowColor=Color(this.config.sr).toString()},addShadow:function(b){if(this.config.hasShadow){var c=0,d=0,f=this.config.shadow,g=Color(f.shadowColor).rgba(f.shadowAlpha);switch(Number(f.shadowAngle)){case 90:c=0;d=4;break;case 180:c=-4;d=0;break;case 270:c=0;d=-4;break;case 360:c=4,d=0}b.css({"box-shadow":c+"px "+d+"px "+f.shadowBlurX+
"px "+g,"-moz-box-shadow":c+"px "+d+"px "+f.shadowBlurX+"px "+g,"-webkit-box-shadow":c+"px "+d+"px "+f.shadowBlurX+"px "+g,"-ms-box-shadow":c+"px "+d+"px "+f.shadowBlurX+"px "+g,"-o-box-shadow":c+"px "+d+"px "+f.shadowBlurX+"px "+g})}},setRotation:function(b,c){0!=parseInt(c)&&(isNaN(c)||b.css({transform:"rotate("+c+"deg)","-webkit-transform":"rotate("+c+"deg)","-ms-transform":"rotate("+c+"deg)","-o-transform":"rotate("+c+"deg)","-moz-transform":"rotate("+c+"deg)","transform-origin":"0% 0%","-webkit-transform-origin":"0% 0%",
"-ms-transform-origin":"0% 0%","-o-transform-origin":"0% 0%","-moz-transform-origin":"0% 0%"}))},fixRelativePath:function(b){return b?"string"!==typeof b?fixURLValue(b):1==bookConfig.isFlipPdf?b.startsWith("../")?fixURLValue(b):b.startsWith("./")?fixURLValue("."+b):b.startsWith("files")?fixURLValue("../"+b):b.isUrl()?fixURLValue(b):fixURLValue("../"+b):fixURLValue(b):b},nameIs:function(){if(0==arguments.length)return!1;for(var b=this.getClassName(),c=0;c");c.html(f);d.initFont(c);d=Color(b.hint.hintShapeColor);parseBool(b.hint.hintAuto)?c.css({padding:"5px","border-radius":"2px"}):c.css({width:b.hint.hintW+"px",height:b.hint.hintH+"px","line-height":b.hint.hintH+"px"});c.css({position:"absolute",background:d.rgba(b.hint.hintShapeAlpha),"border-radius":"2px",color:"white"});return c}});
Class("BubbleLinkHint",{build:function(b,c,d){var f=new TextFormatAnalyzer(b.hint.text),g=f.getHTML();c=$("");d=$("");c.html(g);c.append(d);f.initFont(c);f=Color(b.hint.hintShapeColor);g=Color(b.hint.hintShapeColor2);parseBool(b.hint.hintAuto)?c.css({padding:"5px","border-radius":"2px"}):c.css({width:b.hint.hintW+"px",height:b.hint.hintH+"px","line-height":b.hint.hintH+"px"});d.css({position:"absolute",bottom:"-10px",border:"10px solid transparent","border-bottom-width":0,
"border-left-width":"5px","border-right-width":"5px","border-top-color":g.rgba(b.hint.hintShapeAlpha)});c.css({position:"absolute","text-align":"center",background:"-moz-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-o-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-ms-linear-gradient(top,"+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"-webkit-linear-gradient(top,"+
f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")",background:"linear-gradient("+f.rgba(b.hint.hintShapeAlpha)+","+g.rgba(b.hint.hintShapeAlpha)+")","border-radius":"2px",color:"white"});return c}}).extend("NormalLinkHint");
Class("ActionManager",{Package:"PageItem",create:function(b,c,d){this.item=b;this.element=c;this.config=d;this.action=d.action;this.initAction();this.initActionEvent()},initAction:function(){if(this.action){if(this.action instanceof Array){if(0==this.action.length){this.action=null;return}this.action=this.action[0]}this.eventType=null;this.action.triggerEventType&&(this.eventType=this.action.triggerEventType);$.system.name==$.system.IOS&&(this.eventType==PageEditor.TriggerEventType.MouseDown&&(void 0==
this.action.linkTarget&&(this.action.linkTarget="_self"),"_blank"==this.action.linkTarget&&(this.eventType=PageEditor.TriggerEventType.MouseUp),"Blank"==this.action.linkTarget&&(this.eventType=PageEditor.TriggerEventType.MouseUp)),this.action.url&&"tel:"==this.action.url.toLowerCase().substr(0,4)&&(this.eventType=PageEditor.TriggerEventType.MouseUp))}},initActionEvent:function(){if(this.action)switch(this.eventName="",this.eventType){case PageEditor.TriggerEventType.MouseDown:this.eventName=_event._click;
break;case PageEditor.TriggerEventType.MouseOver:this.eventName=_event._over;if(isPad()||isPhone())this.eventName=_event._click;break;case PageEditor.TriggerEventType.MouseOut:this.eventName=_event._out;if(isPad()||isPhone())this.eventName=_event._click;break;case PageEditor.TriggerEventType.MouseUp:this.eventName=_event._click;break;case PageEditor.TriggerEventType.MouseMove:this.eventName=_event._move;break;case PageEditor.TriggerEventType.MouseLeave:if(this.eventName=_event._leave,isPad()||isPhone())this.eventName=
_event._click}},prepareAction:function(){this.action&&this.element&&(this.executor=this.getActionExecutor())&&this.executor.prepare&&this.executor.prepare(this.item,this.element,this.config)},addAction:function(){this.action&&this.element&&""!=this.eventName&&(!isPhone()&&!isPad()||this.eventName!=_event._click&&this.eventName!=_event._down&&this.eventName!=_event._end&&this.eventName!=_event._over&&this.eventName!=_event._move?(this.element.css({cursor:"pointer"}),this.element.bind("mousedown touchstart pointerdown",
function(b){this.config.isInverse||b.stopPropagation()}.bind(this)),this.element.bind(this.eventName,function(b){this.onAction();this.config.isInverse||b.stopPropagation();if(!this.config.isInverse)return!1}.bind(this))):this.addPhoneAction())},addPhoneAction:function(){var b=null;this.element.onTap(function(c){b&&(clearTimeout(b),b=null);b=setTimeout(function(){this.onAction();b=null}.bind(this),100)}.bind(this))},onAction:function(){this.executor||(this.executor=this.getActionExecutor());if(this.executor)return this.executor.execute(this.item,
this.element,this.config)},getActionExecutor:function(){if(this.action.actionType==PageEditor.ActionType.GOTO_PAGE)return new PageItem.Action.GotoPageAction;if(this.action.actionType==PageEditor.ActionType.OPEN_URL)return new PageItem.Action.OpenUrlAction;if(this.action.actionType==PageEditor.ActionType.OPEN_WINDOW)return new PageItem.Action.OpenWindowAction;if(this.action.actionType==PageEditor.ActionType.SLIDE_SHOW)return new PageItem.Action.OpenSlideshowAction;if(this.action.actionType==PageEditor.ActionType.PLAY_AUDIO)return new PageItem.Action.PlayAudioAction;
if(this.action.actionType==PageEditor.ActionType.ACTION_JS)return new PageItem.Action.ExecuteJavascriptAction;if(this.action.actionType==PageEditor.ActionType.WINDOW_HTML)return new PageItem.Action.HTMLWindowAction;if(this.action.actionType==PageEditor.ActionType.PLAY_VIDEO)return new PageItem.Action.PlayVideoAction;if(this.action.actionType==PageEditor.ActionType.SHOW_INFORMATION)return new PageItem.Action.ShowInformationAction;if(this.action.actionType==PageEditor.ActionType.QUIZ)return new PageItem.Action.OpenQuizAction;
if(this.action.actionType==PageEditor.ActionType.SWF_SLIDE)return new PageItem.Action.OpenSwfSlideAction;if(this.action.actionType==PageEditor.ActionType.SHOW_ARTICLE)return new PageItem.Action.ShowArticleAction}});Class("GotoPageAction",{Package:"PageItem.Action",execute:function(b,c,d){this.initPageIndex(d.action);gotoPageFun(this.linkPageIndex,!1,"action");c.addClass("slider-action")},initPageIndex:function(b){this.linkPageIndex=b.pageIndex;this.linkPageIndex||(this.linkPageIndex=1)}});
Class("OpenUrlAction",{Package:"PageItem.Action",execute:function(b,c,d){this.initLink(d.action);if("tel:"==this.linkUrl.substr(0,4))window.open(this.linkUrl),BookEvent.trigger("jumpLink",["telePhoneNumber",BookInfo.getCurrentPages().join("-"),this.linkUrl]);else{if(this.isTargetMatch("self"))return window.location=this.linkUrl,BookEvent.trigger("jumpLink",["openUrl",BookInfo.getCurrentPages().join("-"),this.linkUrl]),!1;if(this.isTargetMatch("blank"))return-1this.elementConfig.elemWidth/this.elementConfig.elemHeight?(this.startLeft=(this.elementConfig.parentWidth-this.elementConfig.elemWidth)/2,this.startTop=0):(this.startLeft=
0,this.startTop=(this.elementConfig.parentHeight-this.elementConfig.elemHeight)/2);switch(this.effect.position){case "left":var b=this.elementConfig.parentWidth-this.elementConfig.elemWidth;this.element.css({left:-(this.elementConfig.elemWidth+b)+"px",top:this.startTop+"px"});break;case "top":b=this.elementConfig.parentHeight-this.elementConfig.elemHeight;this.element.css({top:-(this.elementConfig.elemHeight+b)+"px",left:this.startLeft+"px"});break;case "bottom":b=this.elementConfig.parentHeight-
this.elementConfig.elemHeight;this.element.css({top:this.elementConfig.elemHeight+b+"px",left:this.startLeft+"px"});break;case "right":b=this.elementConfig.parentWidth-this.elementConfig.elemWidth,this.element.css({left:this.elementConfig.elemWidth+b+"px",top:this.startTop+"px"})}},hide:function(){this.setPosition()},show:function(){setTimeout(function(){"left"==this.effect.position||"right"==this.effect.position?this.element.animate({left:this.startLeft},1E3*this.effect.duration,"easeOutBack"):this.element.animate({top:this.startTop},
1E3*this.effect.duration,"easeOutBack")}.bind(this),1E3*bookConfig.flippingTime)}});
Class("Cutting",{Package:"PageItem.Effect",create:function(b,c,d,f){c&&d&&f&&(this.elementConfig=d,this.element=c,this.elemParent=this.element.parent(),this.config=f,this.showTime=0,this.effect=f.effect,this.initCss())},initCss:function(){isPhone()||isPad()||(this.element.addClass("clip"),this.element.parent().addClass("active"),this.element.css({transform:""}))},resetClass:function(){isPhone()||isPad()||(this.element.removeClass("clip"),this.element.parent().removeClass("active"))},cutting:function(b){if(!b)return!1;
this.initCss();b.removeAttribute("id");var c=this.elementConfig.elemHeight,d=this.elementConfig.elemWidth,f=this.elementConfig.elemWidth/10,g=b.outerHTML;if(window.getComputedStyle(document.body).webkitClipPath){for(var h="",k=0;kMath.random()?-1:1;n="translate("+
[d*(.5-Math.random()),c*(.5-Math.random())].map(function(p){return p+"px"}).join()+") rotate("+Math.round(360*n*Math.random())+"deg)";h+=g.replace('style="',' style="-webkit-transform:'+(n+";-o-transform:"+n+";-moz-transform:"+n+";-ms-transform:"+n+";transform:"+n+";")+m);this.element.css({visibility:"hidden"})}.bind(this));$(b).parent().append(h);setTimeout(function(){this.elemParent.find("img").css({background:"transparent",visibility:"visible"});this.elemParent.find("img").not(":first").remove();
this.resetClass()}.bind(this),1100);return!0}b.className+=" no-clippath";return!1},hide:function(){isPhone()||isPad()?this.element.fadeOut(0):this.element.css({display:"none"})},show:function(){isPhone()||isPad()?this.element.fadeIn(1E3):(this.element.css({display:"block"}),this.cutting(this.element[0]))}});
Class("HighLightManager",{Package:"PageItem",create:function(b,c,d,f){c&&f&&d&&(this.elementConfig=d,this.item=b,this.element=c,this.highlightsLabel=f.highlightsLabel)},addHighLight:function(){if(this.element&&this.highlightsLabel){var b=this.getHighLightType();if(b)return b}},getHighLightType:function(){if(this.highlightsLabel==PageEditor.HighLight.GREENBOXSTOP)return new PageItem.HighLight.GreenBoxStop(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.GREENBOX)return new PageItem.HighLight.GreenBox(this.element,
this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.ORIGINCIRCLE)return new PageItem.HighLight.OriginCircle(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDBOX)return new PageItem.HighLight.RedBox(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDCIRCLE)return new PageItem.HighLight.RedCircle(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.BLUESQUARE)return new PageItem.HighLight.BlueSquare(this.element,
this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.GREENCIRCLEROTATE)return new PageItem.HighLight.GreenCircleRotate(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.GREENLINELTOR)return new PageItem.HighLight.GreenLineLToR(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.GREENLINERTOL)return new PageItem.HighLight.GreenLineRToL(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.GREENSQUARE)return new PageItem.HighLight.GreenSquare(this.element,
this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.LINESQUARE)return new PageItem.HighLight.LineSquare(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.ORANGEHIGHLIGHT)return new PageItem.HighLight.OrangeHighLight(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.ORANGECIRCLELIGHT)return new PageItem.HighLight.OrangeCircleLight(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.PUSHSQUARE)return new PageItem.HighLight.PushSquare(this.element,
this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDHIGHLIGHT)return new PageItem.HighLight.RedHighLight(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDBOXBLINK)return new PageItem.HighLight.RedBoxBlink(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDLINEBLINK)return new PageItem.HighLight.RedLineBlink(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDLINELTOR)return new PageItem.HighLight.RedLineLToR(this.element,
this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.REDLINERTOL)return new PageItem.HighLight.RedLineRToL(this.element,this.elementConfig);if(this.highlightsLabel==PageEditor.HighLight.SPINSQUARE)return new PageItem.HighLight.SpinSquare(this.element,this.elementConfig)}});
Class("HighLightHtml",{Package:"PageItem.HighLight",create:function(b,c){b&&c&&(this.config=c,this.width=c.width,this.height=c.height,this.element=b,this.initConfig(),this.cvs=$(""),this.ctx=this.cvs[0].getContext("2d"),this.initCss(),this.element.append(this.cvs),this.element.bind("mouseenter",this.animate.bind(this)),this.element.bind("mouseleave",function(){this.stopAnimate();this.clearCvs()}.bind(this)))},initConfig:function(){},animate:function(){},
stopAnimate:function(){},ellipse:function(b,c,d,f,g,h,k,l){b.save();var m=f>g?f:g;f/=m;g/=m;b.lineJoin="round";b.scale(f,g);b.beginPath();b.arc(c/f,d/g,m,h,k,l);b.stroke();b.closePath();b.restore()},clearCvs:function(){this.ctx.clearRect(0,0,this.width,this.height)},onResize:function(b,c){this.width=b;this.height=c;this.cvs[0].width=b;this.cvs[0].height=c;this.initConfig()},initCss:function(){this.cvs.css({position:"absolute","pointer-events":"none",left:0,top:0,"z-index":0})},hide:function(){},show:function(){}});
Class("GreenBoxStop",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.gradientWidth=this.width;this.overSize=this.height-this.width;this.heightthis.height&&(k=this.ctx.createLinearGradient(this.overSize*d,this.gradientWidth,this.gradientWidth+this.overSize*d,0));k.addColorStop(0,"transparent");k.addColorStop(g,"transparent");k.addColorStop(f,Color("#009900").rgba(.5-.4*d));k.addColorStop(h,
"transparent");k.addColorStop(1,"transparent");this.ctx.fillStyle=k;this.ctx.fillRect(.05*this.width,.05*this.height,this.drawW,this.drawH);this.ctx.closePath();this.drawRect();b==c&&(this.ctx.clearRect(0,0,this.width,this.height),this.drawRect(),this.boxFlashAnimate&&(this.boxFlash=this.boxFlashAnimate.animation(this,800)))}}).extend("HighLightHtml");
Class("GreenBox",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c);this.color=Color("#009900")},boxFlashAnimate:function(b,c){this.clearCvs();this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(b<=c/2?1-b/c*2:b/c*2-1);this.ctx.lineJoin="round";this.ctx.lineWidth=1;this.ctx.strokeRect(this.x,this.y,this.drawW,this.drawH);this.ctx.closePath();b==c&&(this.boxFlash&&this.boxFlash.stop(),this.boxFlash=this.boxFlashAnimate.animation(this,800))}}).extend("GreenBoxStop");
Class("OriginCircle",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.color=Color("#F7771E");this.x=this.width/2;this.y=this.height/2;this.drawW=.72*this.width/2;this.drawH=.72*this.height/2;this.gradientWidth=2*this.drawW;this.overSize=2*(this.drawH-this.drawW);this.drawW>this.drawH&&(this.gradientWidth=2*this.drawH,this.overSize=2*(this.drawW-this.drawH))},animate:function(){this.drawRound=this.ellipse1Anime.animation(this,500)},stopAnimate:function(){this.drawRound&&
this.drawRound.stop();this.flash&&this.flash.stop();this.ellipseFlash&&this.ellipseFlash.stop()},ellipse1Anime:function(b,c){var d=b/c;this.clearCvs();this.ctx.beginPath();this.ctx.strokeStyle=this.color.toString();this.ctx.lineJoin="round";this.ctx.lineWidth=1;this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,.25*-Math.PI,.75*Math.PI*d);this.ctx.closePath();this.ctx.beginPath();this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,-.25*Math.PI,-.25*Math.PI-1*Math.PI*d,!0);this.ctx.closePath();
b==c&&(this.flash=this.flashAnimate.animation(this,300))},flashAnimate:function(b,c){var d=b/c,f=.2+.4*d,g=f-.2,h=f+.2,k=.14*this.width,l=.14*this.height;this.clearCvs();var m=this.ctx.createLinearGradient(k,.86*this.height-this.overSize*d,this.gradientWidth+k,.86*this.height-this.gradientWidth-this.overSize*d*.9);this.width>this.height&&(m=this.ctx.createLinearGradient(k+this.overSize*d,this.gradientWidth+l,k+this.gradientWidth+this.overSize*d,l));m.addColorStop(0,"transparent");m.addColorStop(g,
"transparent");m.addColorStop(f,this.color.rgba(.5-.4*d));m.addColorStop(h,"transparent");m.addColorStop(1,"transparent");this.ctx.beginPath();this.ctx.fillStyle=m;this.ctx.strokeStyle=this.color.toString();this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,0,2*Math.PI,!0);this.ctx.fill();this.ctx.closePath();b==c&&(this.ellipseFlash=this.flashRound.animation(this,800))},flashRound:function(b,c){var d=b<=c/2?1-b/c*2:b/c*2-1;this.clearCvs();this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(d);
this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,0,2*Math.PI,!0);this.ctx.closePath();b==c&&(this.ellipseFlash&&this.ellipseFlash.stop(),this.ellipseFlash=this.flashRound.animation(this,800))}}).extend("HighLightHtml");
Class("RedBox",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.direct=1;this.gradientWidth=this.width;this.heightthis.lineWidth&&(this.lineWidth=1);this.x=.14*this.width;this.y=.14*this.height;this.drawW=.72*this.width;this.drawH=.72*this.height;this.overW=this.width-this.drawW;this.overH=this.height-this.drawH},animate:function(){this.rect=this.rectFlash.animation(this,
600)},stopAnimate:function(){this.rect&&this.rect.stop();this.timer&&clearTimeout(this.timer)},drawRect:function(b,c){this.ctx.beginPath();this.ctx.strokeStyle="#52A0E9";this.ctx.lineJoin="round";this.ctx.lineWidth=this.lineWidth;this.ctx.moveTo(b.x,b.y);this.ctx.lineTo(c.x,c.y);this.ctx.stroke();this.ctx.closePath()},rectFlash:function(b,c){this.clearCvs();var d=b/c,f=0>b/c*2-1?0:b/c*2-1,g=this.x*d,h=this.y*d,k=this.x*f,l=this.y*f;this.ctx.lineWidth=this.lineWidth;this.ctx.strokeStyle="#52A0E9";
this.ctx.strokeRect(g,h,this.width-this.overW*d,this.height-this.overH*d);this.ctx.strokeRect(k,l,this.width-this.overW*f,this.height-this.overH*f);b==c&&(this.rect.stop(),this.clearCvs(),this.ctx.strokeRect(this.x,this.y,this.drawW,this.drawH),this.timer=setTimeout(function(){this.rect=this.rectFlash.animation(this,600)}.bind(this),1E3))}}).extend("HighLightHtml");
Class("GreenCircleRotate",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.color=Color("#009933");this.x=this.width/2;this.y=this.height/2;this.drawW=.72*this.width/2;this.drawH=.72*this.height/2;this.r=this.drawW>this.drawH?this.drawW:this.drawH;this.ratioX=this.drawW/this.r;this.ratioY=this.drawH/this.r;this.arrowRate=Math.sin(Math.PI/4);this.cos=.87;this.sin=.5;this.arrowW=.1*this.r},animate:function(){this.round=this.ellipseAnime.animation(this,2E3)},
stopAnimate:function(){this.round&&this.round.stop()},getPos:function(b){var c={};b=1*Math.PI+2*Math.PI*b;c.end={x:this.x+this.ratioX*this.r*Math.cos(b),y:this.y+this.ratioY*this.r*Math.sin(b)};return c},ellipseAnime:function(b,c){b/=c;c=this.getPos(b);this.clearCvs();this.ctx.strokeStyle=this.color.toString();this.ctx.lineJoin="round";this.ctx.lineWidth=1;this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,1.1*Math.PI+2*Math.PI*b,3*Math.PI+2*Math.PI*b);this.drawArrow1(c.end,1*Math.PI+2*Math.PI*
b)},drawArrow1:function(b,c){var d=c-Math.PI/3;c=this.x+this.ratioX*this.r*Math.cos(d);d=this.y+this.ratioY*this.r*Math.sin(d);this.ctx.beginPath();this.ctx.fillStyle="#009933";this.ctx.save();this.ctx.translate(b.x,b.y);this.ctx.rotate(Math.PI/3.2);this.ctx.scale(.15,.15);this.ctx.moveTo(this.x-b.x,this.y-b.y);this.ctx.lineTo(b.x-b.x,b.y-b.y);this.ctx.lineTo(c-b.x,d-b.y);this.ctx.closePath();this.ctx.fill();this.ctx.restore()}}).extend("HighLightHtml");
Class("GreenLineLToR",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.color=Color("#009933");this.x=0;this.y=this.height/2;this.endX=this.width;this.endY=this.height/2;this.lineWidth=1},animate:function(){this.line=this.drawLine.animation(this,2E3)},stopAnimate:function(){this.line&&this.line.stop()},drawLine:function(b,c){var d=b/c;this.ctx.beginPath();this.clearCvs();this.ctx.strokeStyle=this.color.toString();this.ctx.lineJoin="round";this.ctx.lineWidth=
this.lineWidth;this.ctx.moveTo(this.x,this.y);this.ctx.lineTo(this.x+this.endX*d,this.endY);this.ctx.stroke();this.ctx.closePath();b==c&&this.line.stop()}}).extend("HighLightHtml");Class("GreenLineRToL",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.color=Color("#009933");this.x=this.width;this.y=this.height/2;this.endX=-this.width;this.endY=this.height/2;this.lineWidth=1}}).extend("GreenLineLToR");
Class("GreenSquare",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c);this.color=Color("#26E20C")},initConfig:function(){this.freshTime=this.time=1;this.gradientWidth=this.width;this.heightthis.lineWidth&&(this.lineWidth=1);this.x=.14*this.width;this.y=.14*this.height;this.showX=.14*this.width;this.showY=1.5*this.height;this.drawW=.72*this.width;this.drawH=.72*this.height},animate:function(){this.rect=
this.rectAnime.animation(this,300)},stopAnimate:function(){this.timer&&clearTimeout(this.timer);this.rect&&this.rect.stop();this.fresh&&this.fresh.stop();this.freshTime=this.time=1},drawRect:function(b,c){this.ctx.beginPath();this.ctx.lineJoin="round";this.ctx.lineWidth=this.lineWidth;this.ctx.moveTo(b.x,b.y);this.ctx.lineTo(c.x,c.y);this.ctx.stroke();this.ctx.closePath()},rectAnime:function(b,c){this.clearCvs();var d=b/c;this.ctx.lineWidth=this.lineWidth;this.ctx.strokeStyle=this.color.toString();
1=300/this.time?100:300/this.time,6<=this.time?this.timer=setTimeout(function(){this.fresh=this.rectFlash.animation(this,300)}.bind(this),500):this.rect=this.rectAnime.animation(this,b))},rectFlash:function(b,c){this.clearCvs();this.ctx.save();var d=b/c,f=this.x-.15*this.drawW*d,g=this.y-.15*this.drawH*d;
this.ctx.strokeStyle=this.color.toString();this.ctx.strokeRect(this.x,this.y,this.drawW,this.drawH);this.ctx.strokeStyle=this.color.rgba(1-d);this.ctx.strokeRect(f,g,this.drawW+.3*this.drawW*d,this.drawH+.3*this.drawH*d);this.ctx.restore();b==c&&(this.rect.stop(),2>this.freshTime?(this.timer=setTimeout(function(){this.fresh=this.rectFlash.animation(this,300)}.bind(this),300),this.freshTime+=1):(this.clearCvs(),this.ctx.strokeRect(.14*this.width,.14*this.height,this.drawW,this.drawH)))}}).extend("GreenBoxStop");
Class("LineSquare",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.animateCase=1;this.color=Color("#0099CC");this.gradientWidth=this.width;this.height=this.lineWidth&&(this.lineWidth=1);this.x=.14*this.width;this.y=.14*this.height;this.drawW=.72*this.width;this.drawH=.72*this.height},animate:function(){this.line=this.lineAnimate.animation(this,500)},getLeavePos:function(){var b=
[];pos1={x:this.x,y:this.y,width:.86*this.width,height:0};pos2={x:.86*this.width,y:this.y,width:0,height:.86*this.height};pos3={x:.86*this.width,y:.86*this.height,width:.86*-this.width,height:0};pos4={x:this.x,y:.86*this.height,width:0,height:0,height:.86*-this.height};b.push(pos1);b.push(pos2);b.push(pos3);b.push(pos4);return b},getPos:function(b){var c=[];pos1={x:this.width-.86*this.width*b,y:this.y,width:.5*this.drawW,height:0};pos2={x:this.x+this.drawW,y:this.height-.86*this.height*b,width:0,
height:.5*this.drawH};pos3={x:.86*this.width*b,y:.86*this.height,width:.5*-this.drawW,height:0};pos4={x:this.x,y:.86*this.height*b,width:0,height:0,height:.5*-this.drawH};c.push(pos1);c.push(pos2);c.push(pos3);c.push(pos4);return c},stopAnimate:function(){this.line&&this.line.stop();this.timer&&(clearTimeout(this.timer),this.time=null);this.animateCase=1},drawRect:function(b){this.ctx.save();this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(.2);this.ctx.lineJoin="round";this.ctx.lineWidth=
this.lineWidth;b&&this.ctx.setLineDash([this.drawW/14]);this.ctx.strokeRect(this.x,this.y,this.drawW,this.drawH);this.ctx.closePath();this.ctx.restore()},lineAnimate:function(b,c){var d=b/c;this.ctx.clearRect(0,0,this.width,this.height);this.drawRect(!0);this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(d);this.ctx.lineWidth=this.lineWidth;if(1==this.animateCase)var f=this.getPos(d);else 2==this.animateCase?(f=this.getPos(1),this.ctx.strokeStyle=this.color.rgba(1)):(f=this.getLeavePos(),this.ctx.strokeStyle=
this.color.rgba(1-d));for(var g=0;gthis.drawH&&(this.gradientWidth=2*this.drawH);this.lineWidth=Math.ceil(.04*this.gradientWidth);1>=this.lineWidth&&(this.lineWidth=1)},animate:function(){this.ellipseFlash=this.flashRound.animation(this,1E3)},stopAnimate:function(){this.ellipseFlash&&
this.ellipseFlash.stop()},flashRound:function(b,c){var d=b<=c/2?1-b/c*2:b/c*2-1;this.clearCvs();this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(d);this.ctx.lineWidth=this.lineWidth;this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,0,2*Math.PI,!0);this.ctx.closePath();b==c&&(this.ellipseFlash&&this.ellipseFlash.stop(),this.ellipseFlash=this.flashRound.animation(this,1E3))}}).extend("HighLightHtml");
Class("OrangeCircleLight",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.color=Color("#FF6600");this.x=this.width/2;this.y=this.height/2;this.drawW=.8*this.width/2;this.drawH=.8*this.height/2;this.gradientWidth=2*this.drawW;this.drawW>this.drawH&&(this.gradientWidth=2*this.drawH);this.lineWidth=Math.ceil(.03*this.gradientWidth);1>=this.lineWidth&&(this.lineWidth=1)},animate:function(){this.drawRound=this.ellipseAnime.animation(this,400)},stopAnimate:function(){this.timer&&
(clearTimeout(this.timer),this.time=null);this.drawRound&&this.drawRound.stop();this.scaleRound&&this.scaleRound.stop()},ellipseAnime:function(b,c){var d=b/c;this.clearCvs();this.ctx.lineJoin="round";this.ctx.lineWidth=this.lineWidth;if(.5>d){var f=1-2*d;d=1-d}else f=2*d-1;this.ctx.strokeStyle=this.color.rgba(f);this.ellipse(this.ctx,this.x,this.y,this.drawW*d,this.drawH*d,0,2*Math.PI,!0);b==c&&(this.scaleRound=this.scaleRoundAnimate.animation(this,400))},scaleRoundAnimate:function(b,c){var d=b/c;
this.clearCvs();this.ctx.strokeStyle=this.color.toString();this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,0,2*Math.PI,!0);this.ctx.save();this.ctx.strokeStyle=this.color.rgba(1-d/3*2);this.ctx.lineWidth=1>this.lineWidth/2?1:this.lineWidth/2;this.ellipse(this.ctx,this.x,this.y,this.drawW+.3*this.drawW*d,this.drawH+.3*this.drawH*d,0,2*Math.PI,!0);this.ellipse(this.ctx,this.x,this.y,this.drawW+.25*this.drawW*d,this.drawH+.25*this.drawH*d,0,2*Math.PI,!0);this.ctx.restore();b==c&&(this.clearCvs(),
this.ellipse(this.ctx,this.x,this.y,this.drawW,this.drawH,0,2*Math.PI,!0),this.timer=setTimeout(function(){this.drawRound=this.ellipseAnime.animation(this,400)}.bind(this),1E3))}}).extend("HighLightHtml");
Class("PushSquare",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.animateCase=1;this.color=Color("#FF6600");this.gradientWidth=this.width;this.height=this.lineWidth&&(this.lineWidth=1);this.x=.14*this.width;this.y=.14*this.height;this.drawW=.72*this.width;this.drawH=.72*this.height},animate:function(){this.line=this.lineAnimate.animation(this,400)},stopAnimate:function(){this.line&&
this.line.stop();this.timer&&(clearTimeout(this.timer),this.time=null);this.animateCase=1},drawDashRect:function(b,c){this.ctx.save();this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(b);this.ctx.lineJoin="round";this.ctx.lineWidth=this.lineWidth;c&&this.ctx.setLineDash([this.drawW/14]);this.ctx.strokeRect(this.x+this.drawW/2-this.drawW/2*b,this.y+this.drawH/2-this.drawH/2*b,this.drawW*b,this.drawH*b);this.ctx.closePath();this.ctx.restore()},drawHalfRect:function(b,c){0!=c%2?(c=this.x*b,this.ctx.moveTo(c+
this.drawW/4,this.y),this.ctx.lineTo(c,this.y),this.ctx.lineTo(c,this.y+this.drawH),this.ctx.lineTo(c+this.drawW/4,this.y+this.drawH),this.ctx.stroke(),c=this.width-this.x*b,this.ctx.moveTo(c-this.drawW/4,this.y),this.ctx.lineTo(c,this.y),this.ctx.lineTo(c,this.y+this.drawH),this.ctx.lineTo(c-this.drawW/4,this.y+this.drawH)):(c=this.y*b,this.ctx.moveTo(this.x,c+this.drawH/4),this.ctx.lineTo(this.x,c),this.ctx.lineTo(this.x+this.drawW,c),this.ctx.lineTo(this.x+this.drawW,c+this.drawH/4),this.ctx.stroke(),
c=this.height-this.y*b,this.ctx.moveTo(this.x,c-this.drawH/4),this.ctx.lineTo(this.x,c),this.ctx.lineTo(this.x+this.drawW,c),this.ctx.lineTo(this.x+this.drawW,c-this.drawH/4));this.ctx.stroke()},lineAnimate:function(b,c){var d=b/c;this.ctx.clearRect(0,0,this.width,this.height);this.ctx.beginPath();this.ctx.strokeStyle=this.color.rgba(d);this.ctx.lineWidth=this.lineWidth;4==this.animateCase&&this.drawDashRect(d,!0);this.drawHalfRect(d,this.animateCase);b==c&&(this.animateCase+=1,5<=this.animateCase?
(this.drawDashRect(1),this.animateCase=1,this.timer=setTimeout(function(){this.line=this.lineAnimate.animation(this,400)}.bind(this),1E3)):this.line=this.lineAnimate.animation(this,400))}}).extend("HighLightHtml");
Class("RedBoxBlink",{Package:"PageItem.HighLight",create:function(b,c){this._super(b,c)},initConfig:function(){this.gradientWidth=this.width;this.overSize=this.height-this.width;this.heightthis.lineWidth&&(this.lineWidth=1);this.x=.14*this.width;this.y=.14*this.height;this.drawW=.72*this.width;this.drawH=.72*this.height},animate:function(){this.rect=this.rectAnime.animation(this,400)},
stopAnimate:function(){this.timer&&clearTimeout(this.timer);this.rect&&this.rect.stop();this.fresh&&this.fresh.stop();this.freshTime=this.time=1},drawRect:function(b,c){this.ctx.beginPath();this.ctx.lineJoin="round";this.ctx.lineWidth=this.lineWidth;this.ctx.moveTo(b.x,b.y);this.ctx.lineTo(c.x,c.y);this.ctx.stroke();this.ctx.closePath()},rectAnime:function(b,c){this.clearCvs();var d=1-b/c;this.ctx.lineWidth=this.lineWidth;this.ctx.strokeStyle=this.color.toString();1=400/this.time?250:400/this.time,4<=this.time?(this.time=0,this.timer=setTimeout(function(){this.rect=this.rectAnime.animation(this,400)}.bind(this),800)):this.rect=this.rectAnime.animation(this,b)))}}).extend("GreenBoxStop");
Class("Youtube",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);null!=this.config.id&&(this.firstTime=!0,this.animateConfig(),this.width=Number(this.config.width)*this.pageWidth,this.height=Number(this.config.height)*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,this.sVideoId=this.config.id,-1"),"youtube"),this.config.rotation&&this.setRotation(this.youtubeFrame.$media,this.config.rotation),this.parent.append(this.youtubeFrame.$media))},setTransOrigin:function(b,c){this.youtubeFrame.setCss({"-webkit-transform-origin":b+"px "+c+"px","-o-transform-origin":b+"px "+c+"px","-moz-transform-origin":b+"px "+c+"px","-ms-transform-origin":b+"px "+c+"px","transform-origin":b+"px "+c+"px"})},parseConfig:function(b){return{width:b.location.width,height:b.location.height,
x:b.location.x,y:b.location.y,alpha:b.alpha,id:b.videoId?b.videoId:b.videoID,moviePlayTriggerEvt:b.moviePlayTriggerEvt,playerParameters:b.playerParameters,movieStopTriggerEvt:b.movieStopTriggerEvt,rotation:b.location.rotation,animation:b.animation}},initCss:function(){this.youtubeFrame.setCss({width:this.width+"px",height:this.height+"px",top:this.y+"px",left:this.x+"px"})},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*
this.pageHeight;this.youtubeFrame.setCss({width:this.width+"px",height:this.height+"px"});this.setPosition()},setPosition:function(){this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.youtubeFrame.setCss({top:this.y+"px",left:this.x+"px"})},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt},pauseVideo:function(){this.youtubeFrame&&(BookEvent.trigger("playMedia",["pauseYoutube",BookInfo.getCurrentPageIndex(),
this.prefix+"://www.youtube.com/embed/"+this.sVideoId,"Youtube"]),this.youtubeFrame.pause())},playVideo:function(){this.youtubeFrame&&(BookEvent.trigger("playMedia",["playYoutube",BookInfo.getCurrentPageIndex(),this.prefix+"://www.youtube.com/embed/"+this.sVideoId,"Youtube"]),this.firstTime?(this.youtubeFrame.$media.on("load",function(){this.youtubeFrame.play()}.bind(this)),this.firstTime=!1):this.youtubeFrame.play())},hide:function(){this.youtubeFrame&&(this.youtubeFrame.setCss({width:"0px",height:"0px"}),
this.youtubeFrame.setCss({display:"none"}))},show:function(){this.youtubeFrame&&(this.youtubeFrame.setCss({width:this.width+"px",height:this.height+"px"}),this.youtubeFrame.setCss({display:"block"}))},showAnimate:function(){if(this.config.animation&&this.config.animation.name){var b=getAnimationEnd(),c=this.config.animation;this.youtubeFrame.setCss({animation:c.name+" "+c.duration+"s "+c.timeFun+" "+c.delay+"s "+c.count+" "+c.direction});this.youtubeFrame.$media.one(b,function(){this.youtubeFrame.setCss({animation:""})}.bind(this))}}}).extend("Item");
Class("Video",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.animateConfig();this.parent=b;this.pageWidth=d;this.pageHeight=f;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.playCount=0;this.content=$("");this.content.css({position:"absolute",overflow:"hidden",left:this.x+"px",top:this.y+"px",width:this.width+"px",
height:this.height+"px",opacity:this.config.alpha});this.setRotation(this.content,this.config.rotation);this.parent.append(this.content);"string"==typeof this.config.previewSrc&&""!=this.config.previewSrc&&null!=this.config.previewSrc&&void 0!=this.config.previewSrc&&(this.config.previewSrc=this.fixRelativePath(this.config.previewSrc),bookConfig.useTheAliCloudChart&&(this.config.previewSrc=this.getOssUrl(this.config.previewSrc,this.width,this.height,"fixed")));if("string"==typeof this.config.src){if(b=
this.config.src.match(/(.mp4|.flv|.f4v)\b/),null==this.config.src||null==b)return}else if(this.config.src=={})return;this.config.src=this.fixRelativePath(this.config.src);this.video=null;this.video=new Media($(''),"video");this.video.setCss({position:"absolute","z-index":1,left:"0px","object-fit":"fill",top:"0px",width:"100%",height:"100%"});this.config.previewSrc&&
(this.video.$media.attr("poster",this.config.previewSrc),this.video.$media.css({"object-fit":"fill"}));this.content.append(this.video.$media);void 0!=this.video.$media[0].play&&(this.videoSkin=this.content.addVideoSkin(g,this.video),this.video.$media.removeAttr("controls"));this.content.bind(_event._down,function(h){h.stopPropagation()});this.video.$media.bind(_event._down,function(h){h.stopPropagation()});this.video.$media.keydown(function(h){h.preventDefault();h.stopPropagation()}.bind(this));this.video.$media.keyup(function(h){h.preventDefault();
h.stopPropagation()}.bind(this));this.video.$media.on("loadstart",function(){this.resizeCss()}.bind(this));parseBool(this.config.reflection)&&this.imageReflection(this.content,this.width,this.height);parseBool(this.config.shadow.hasDropShadow)&&this.addShadow(this.content);this.video.$media.bind("click mousedown mouseup DOMMouseScroll mousewheel",function(h){h.stopPropagation()}.bind(this));this.initLoopEvent();this.config.prompt&&this.config.promptTime&&this.video.$media.bind("loadedmetadata",function(h){h=
[];for(var k=this.config.prompt.split("|"),l=this.config.promptTime.split("|"),m=0;mthis.config.H5PlaybackNumber&&this.video.$media.attr("loop","loop");0this.config.H5PlaybackNumber&&(this.playCount=0)}.bind(this))},showAnimate:function(){if(this.config.animation&&this.config.animation.name){var b=getAnimationEnd(),c=this.config.animation;this.content.css({animation:c.name+" "+c.duration+"s "+c.timeFun+" "+c.delay+"s "+c.count+" "+c.direction});this.content.one(b,function(){this.content.css({animation:""})}.bind(this))}},parseConfig:function(b){var c={width:b.location.width,height:b.location.height,rotation:b.location.rotation,
x:b.location.x,y:b.location.y,alpha:b.alpha,shadow:b.shadow,reflection:b.location.reflection,reflectionType:b.location.reflectionType,reflectionAlpha:b.location.reflectionAlpha,previewSrc:b.previewUrl,prompt:b.prompt,promptTime:b.promptTime,moviePlayTriggerEvt:b.moviePlayTriggerEvt?b.moviePlayTriggerEvt:b.PlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt?b.movieStopTriggerEvt:b.StopTriggerEvt,replayWhenPlayEventTrigger:b.replayWhenPlayEventTrigger,animation:b.animation};b.H5PlaybackNumber&&
(c.H5PlaybackNumber=parseInt(b.H5PlaybackNumber));b.H5Replay&&(c.H5Replay=parseBool(b.H5Replay));b.componentData&&(c.moviePlayTriggerEvt=b.componentData.playEvt,c.movieStopTriggerEvt=b.componentData.stopEvt,b.componentData.previewURL&&(c.previewSrc=b.componentData.previewURL),b.componentData.imgURL&&(c.previewSrc=b.componentData.imgURL));b.imgIcon&&(c.previewSrc=b.imgIcon);b.previewURL&&(c.previewSrc=b.previewURL);void 0!=b.videoURL&&(c.src=b.videoURL);void 0!=b.url&&(c.src=b.url);b.componentData&&
(c.src=b.componentData.videoURL);parseBool(b.shadow.hasDropShadow)&&(c.hasShadow=!0);return c},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.resizeCss()},resizeCss:function(){this.content.css({width:this.width+"px",height:this.height+"px"});this.content.css({"background-size":this.width+"px "+this.height+"px"});if(this.videoSkin)this.videoSkin.onResize();this.setPosition()},setPosition:function(){this.x=
this.pageWidth*this.config.x;this.y=this.pageHeight*this.config.y;this.content.css({left:this.x+"px",top:this.y+"px"})},playVideo:function(){if(null!=this.video)try{this.video.play(),this.videoSkin.play()}catch(b){}},stopVideo:function(){if(null!=this.video)try{this.video.pause(),this.videoSkin.stop()}catch(b){}},pauseVideo:function(){if(null!=this.video)try{this.video.pause(),this.videoSkin.pause()}catch(b){}},backTime:function(){this.playCount=0;if(this.video.$media[0])if(isIE())try{this.video.$media[0].currentTime=
0}catch(b){}else this.video.$media[0].currentTime=0},isReplay:function(){return this.config.H5Replay},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt},getPlayStatuEnded:function(){return this.video.$media[0].ended},getReplayWhenPlayEvent:function(){return this.config.replayWhenPlayEventTrigger},getTotalTime:function(){return this.video.$media[0].duration},getCurrentTime:function(){return this.video.$media[0].currentTime},setCurrentTime:function(b){this.video.$media[0].currentTime=
b}}).extend(PageItem.Item);
Class("Vimeo",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.vimeoFrame=null;null!=this.config.id&&(this.animateConfig(),this.pageWidth=d,this.pageHeight=f,this.width=this.config.width*this.pageWidth,this.height=this.config.height*this.pageHeight,this.x=this.config.x*this.pageWidth,this.y=this.config.y*this.pageHeight,this.config.id+="",c=this.config.id.lastIndexOf("/"),this.fixstr=this.config.id.substring(c+1),this.prefix="https"==(window.location.href?window.location.href.toLowerCase():
"http:").substring(0,5)?"https":"http",c=$(""),this.vimeoFrame=new Media(c,"vimeo",this.getPlayEvt()),b.append(this.vimeoFrame.$media))},parseConfig:function(b){return{width:b.location.width,
height:b.location.height,x:b.location.x,y:b.location.y,alpha:b.alpha,id:b.videoID?b.videoID:b.videoId,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,playerParameters:b.playerParameters,animation:b.animation}},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.vimeoFrame.setCss({width:this.pageWidth*this.config.width+"px",height:this.pageHeight*this.config.height+"px"});this.setPosition(this.config.x*this.pageWidth,this.config.y*this.pageHeight)},playVideo:function(){this.vimeoFrame&&
(BookEvent.trigger("playMedia",["play",BookInfo.getCurrentPageIndex(),this.prefix+"://player.vimeo.com/video/"+this.fixstr,"vimeo",0]),this.vimeoFrame.play())},pauseVideo:function(){this.vimeoFrame&&(BookEvent.trigger("playMedia",["pause",BookInfo.getCurrentPageIndex(),this.prefix+"://player.vimeo.com/video/"+this.fixstr,"vimeo",0]),this.vimeoFrame.pause())},setPosition:function(b,c){this.vimeoFrame.setCss({top:c+"px",left:b+"px"})},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt},
showAnimate:function(){if(this.config.animation&&this.config.animation.name){var b=getAnimationEnd(),c=this.config.animation;this.vimeoFrame.setCss({animation:c.name+" "+c.duration+"s "+c.timeFun+" "+c.delay+"s "+c.count+" "+c.direction});this.vimeoFrame.$media.one(b,function(){this.vimeoFrame.setCss({animation:""})}.bind(this))}},hide:function(){this.vimeoFrame.setCss({display:"none"})},show:function(){this.vimeoFrame.setCss({display:"block"})}}).extend("Item");
Class("PopUpVimeo",{Package:"PageItem",create:function(b,c,d,f,g){this.config=this.parseConfig(c);this.type=g;this.parent=b;this.vimeoFrame=null;if(null!=this.config.id){this.pageWidth=d;this.pageHeight=f;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;this.x=this.config.x*this.pageWidth;this.y=this.config.y*this.pageHeight;this.vimeoDiv=$("");this.vimeoDiv.css({width:this.width+"px",height:this.height+"px",left:this.x+"px",
top:this.y+"px",opacity:this.config.alpha,position:"absolute",cursor:"pointer","background-color":"rgba(0,0,0,0.9)"});this.url=this.config.url;this.url||(this.url=phoneBaseURL+g+".png");bookConfig.isFlipPdf&&(this.config.url=this.fixRelativePath(this.config.url));"vimeo"==g||"youtube"==g?(this.url=phoneBaseURL+g+"Logo.png",this.vimeoImage=$("")):
this.vimeoImage=$("");this.url&&"null"!=this.url||this.vimeoImage.css({display:"none"});if(isPhone()||isPad())b=Math.min(Math.min(48,.36*this.width),Math.min(48,.36*this.height)),this.vimeoDiv.css({background:"#333333",border:"1px solid #bbb"}),c="play","vimeo"==g&&(c="vimeoplay"),"youtube"==g&&(c="youtubeplay"),c=this.fixRelativePath(phoneBaseURL+c+".png"),this.playImg=$(""),this.vimeoDiv.append(this.playImg);this.parent.append(this.vimeoDiv);this.vimeoDiv.append(this.vimeoImage);this.vimeoDiv.onTap(function(h){this.popupVideo=new PopUpPhoneVideo(this.config,g);this.popupVideo.background.show()}.bind(this))}},parseConfig:function(b){return{width:b.location.width,height:b.location.height,x:b.location.x,y:b.location.y,alpha:b.alpha,id:b.videoId?
b.videoId:b.videoID,moviePlayTriggerEvt:b.moviePlayTriggerEvt,movieStopTriggerEvt:b.movieStopTriggerEvt,playerParameters:b.playerParameters,url:b.url,autoPlay:b.autoPlay}},destroy:function(){this.popupVideo&&this.popupVideo.destroy();this.vimeoDiv.empty();this.vimeoDiv.remove()},onResize:function(b,c){this.pageWidth=b;this.pageHeight=c;this.width=this.config.width*this.pageWidth;this.height=this.config.height*this.pageHeight;if(this.popupVideo)this.popupVideo.onResize(this.pageWidth,this.pageHeight);
this.url&&"null"!=this.url&&this.vimeoImage.css({width:this.width+"px",height:this.height+"px"});this.vimeoDiv&&(this.vimeoDiv.css({width:this.pageWidth*this.config.width+"px",height:this.pageHeight*this.config.height+"px"}),this.setPosition(this.config.x*this.pageWidth,this.config.y*this.pageHeight))},setPosition:function(b,c){this.vimeoDiv.css({top:c+"px",left:b+"px"})}}).extend("Item");
var PopUpVideo=Class({create:function(b,c){this.config=$.extend({id:null,alpha:1},b);this.config.id+="";this.type=c;this.videoWidth=this.config.windowWidth||480;this.videoHeight=this.config.windowHeight||320;this.background=$("");this.vimeoBac=$("");this.vimeoBorder=$("");this.title=$("");this.config.caption&&this.title.html(this.config.caption);"right"==this.config.languageLayout&&this.title.css({"text-align":"right",direction:"rtl"});
this.initVideo(c);tmpContainer.append(this.background);this.background.append(this.vimeoBac);this.vimeoBac.append(this.vimeoBorder);this.vimeoBorder.append(this.vimeoFrame.$media);this.closeButton=$("");this.vimeoBorder.append(this.closeButton).append(this.title);this.initStyle();this.initEvents();this.onResize();this.vimeoFrame.play();this.resizeTimer=this.onResize.interval(this,500);this.visible=!0;BookEvent.trigger("playMedia",["play",BookInfo.getCurrentPageIndex(),
this.getURL(c),c,0])},initVideo:function(b){var c="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http";if("vimeo"==b){var d=this.config.id.lastIndexOf("/");d=this.config.id.substring(d+1);var f="";"true"==this.config.autoPlay&&(f="?autoplay=1&autopause=0");d=$("");
this.vimeoFrame=new Media(d,"vimeo")}"youtube"==b&&(d=this.config.id,-1"),this.vimeoFrame=new Media(d,"youtube"));"dailymotion"==
b&&(d=$(""),this.vimeoFrame=new Media(d,"dailymotion"));"wistia"==b&&(d=$(""),this.vimeoFrame=new Media(d,"wistia"));"youku"==b&&(d=$(""),this.vimeoFrame=new Media(d,"youku"));"qq"==b&&(d=$(""),this.vimeoFrame=new Media(d,"qq"))},getURL:function(b){var c=this.config.id,d="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http",f="";if("vimeo"==b){var g=c.lastIndexOf("/");c=c.substring(g+1)}"youtube"==b&&-1d?c=b*d:b=c/d):(b=Math.min(d,b),c=Math.min(f,c));this.vimeoBorder.css({width:b+"px",height:c+"px"});c-=37;this.vimeoFrame&&(this.vimeoFrame.$media.attr("width",b-10+"px"),this.vimeoFrame.$media.attr("height",c+"px"))}},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},getStopEvt:function(){return this.config.movieStopTriggerEvt}}),PopUpPhoneVideo=Class({create:function(b,c){this.config=$.extend({id:null,
alpha:1},b);this.config.id+="";this.type=c;this.initVideoSize();this.staticWidth=this.videoWidth;this.staticHeight=this.videoHeight;this.background=$("");this.vimeoBac=$("");this.vimeoBorder=$("");"right"==this.config.languageLayout&&this.title.css({"text-align":"right",direction:"rtl"});this.initVideo(c);tmpContainer.append(this.background);this.background.append(this.vimeoBac);this.vimeoBac.append(this.vimeoBorder);this.vimeoBorder.append(this.vimeoFrame.$media);
this.closeButton=$("");this.background.append(this.closeButton);this.initStyle();this.initEvents();this.onResize();this.vimeoFrame.play();this.resizeTimer=this.onResize.interval(this,500);this.visible=!0;BookEvent.trigger("playMedia",["play",BookInfo.getCurrentPageIndex(),this.getURL(c),c,0])},initVideo:function(b){var c="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http";if("vimeo"==b){var d=this.config.id.lastIndexOf("/");
d=this.config.id.substring(d+1);var f="";"true"==this.config.autoPlay&&(f="?autoplay=1&autopause=0");d=$("");this.vimeoFrame=new Media(d,"vimeo")}"youtube"==b&&(d=this.config.id,-1"),this.vimeoFrame=new Media(d,"youtube"));"dailymotion"==b&&(d=$(""),this.vimeoFrame=new Media(d,"dailymotion"));"wistia"==b&&(d=$(""),this.vimeoFrame=new Media(d,"wistia"));"youku"==b&&
(d=$(""),this.vimeoFrame=new Media(d,"youku"));"qq"==b&&(d=$(""),this.vimeoFrame=new Media(d,"qq"))},getURL:function(b){var c=this.config.id,d="https"==(window.location.href?window.location.href.toLowerCase():"http:").substring(0,5)?"https":"http",f="";if("vimeo"==b){var g=c.lastIndexOf("/");c=c.substring(g+1)}"youtube"==b&&-1windowHeight?(this.videoHeight=windowHeight,this.videoWidth=16*this.videoHeight/9,this.videoWidth=Math.min(this.videoWidth,windowWidth)):(this.videoWidth=windowWidth,this.videoHeight=9*this.videoWidth/16,this.videoHeight=Math.min(this.videoHeight,windowHeight))},onResize:function(){if(this.windowWidth!=windowWidth||this.windowHeight!=windowHeight){this.initVideoSize();var b=this.videoWidth/this.staticWidth;this.windowWidth=
windowWidth;this.windowHeight=windowHeight;"youku"!=this.type?(this.vimeoBorder.css({width:this.videoWidth+"px",height:this.videoHeight+"px"}),this.vimeoFrame&&(this.vimeoFrame.$media.attr("width","100%"),this.vimeoFrame.$media.attr("height",this.videoHeight+"px"))):this.staticWidth>this.staticHeight&&1>b?this.vimeoFrame.$media.css({transform:"translate(-50%,-50%) scale("+b+")"}):this.vimeoFrame.$media.css({transform:"translate(-50%,-50%)"})}},getPlayEvt:function(){return this.config.moviePlayTriggerEvt},
getStopEvt:function(){return this.config.movieStopTriggerEvt}}).extend("PopUpVideo");
Class("HtmlVideo",{Package:"PageItem",create:function(b,c,d,f){this._super(b,c,d,f);this.animateConfig();this.container=$("");this.initVideoFrame();this.config.rotation&&this.setRotation(this.container,this.config.rotation);this.parent.append(this.container);this.initCss();this.setPosition()},initVideoFrame:function(){if(this.config.generalCode){this.iframeSrc=this.config.generalCode;if(this.config.generalCode.startsWith("www")){var b="http://"+this.config.generalCode;
try{$.ajax({url:b,type:"GET",dataType:"jsonp",timeout:3E3,complete:function(d){200!=d.status&&(b="https://"+this.config.generalCode)}})}catch(d){}this.config.generalCode=b}if(this.config.generalCode.startsWith("http")||this.config.generalCode.startsWith("https")||this.config.generalCode.startsWith("//"))this.videoFrame=$("");
else if(/^(