index-ad7ebdce.js 188 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import{d as Ie,x as ke,r as ae,y as Fe,a7 as li,a as H,V as Ve,A as Ot,F as Ue,C as ce,ah as Bi,q as hi,M as Ne,al as Wi,w as ji,z as ze,E as Hi,a5 as ui,e as zi,h as ri,a0 as qi,Q as Gi}from"./index-2eaca48c.js";import{a as Vi,b as Ui,c as Xi,d as $i,e as Yi,f as Zi,g as Ki,h as Qi}from"./fade-in-scale-up.cssr-5fd97bec.js";import{N as Ji,T as tn}from"./index-e0af7ef7.js";import{q as en}from"./base-aba1ba3e.js";import{g as me,s as kt,a as ci,b as di}from"./api-9372293f.js";import{d as qe}from"./deep-clone-c0d00fc2.js";import{T as nn,a as Ge}from"./index-b5fb4922.js";import{T as oi}from"./index-2ceb0c19.js";import"./use-tab-status-8946c989.js";import"./index-87cddea8.js";const sn="_container_8nt1j_1",rn="_head_8nt1j_10",on="_back_8nt1j_18",an="_tabs_8nt1j_21",ln="_downBtn_8nt1j_37",hn="_activeBtn_8nt1j_48",un="_icon_8nt1j_48",cn="_iconUp_8nt1j_73",dn="_popover_8nt1j_78",pn="_content_8nt1j_97",fn="_wrap_8nt1j_103",gn="_emtpyWrap_8nt1j_109",mn="_wrapItem_8nt1j_120",yn="_item_8nt1j_130",vn="_name_8nt1j_161",wn="_favoriteBtn_8nt1j_168",xn="_containerImg_8nt1j_174",bn="_cover_8nt1j_200",Pn="_loaded_8nt1j_230",Sn="_book_8nt1j_233",Tn="_bookWrap_8nt1j_247",Cn="_show_8nt1j_255",An="_popupContainer_8nt1j_260",kn="_searchList_8nt1j_266",_n="_popoverTitle_8nt1j_272",Mn="_popupList_8nt1j_288",Dn="_btnGroup_8nt1j_309",En="_btnSure_8nt1j_324",mt={container:sn,head:rn,back:on,tabs:an,downBtn:ln,activeBtn:hn,icon:un,iconUp:cn,popover:dn,content:pn,wrap:fn,emtpyWrap:gn,wrapItem:mn,item:yn,name:vn,favoriteBtn:wn,containerImg:xn,cover:bn,loaded:Pn,book:Sn,bookWrap:Tn,show:Cn,popupContainer:An,searchList:kn,popoverTitle:_n,popupList:Mn,btnGroup:Dn,btnSure:En},pi=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href,Nn="_book_1v6y0_1",Ln="_back_1v6y0_11",In="_bookHide_1v6y0_16",Fn="_wrap_1v6y0_36",On="_wrapItem_1v6y0_53",Rn="_item_1v6y0_60",Bn="_des_1v6y0_69",Wn="_icon_1v6y0_74",jn="_last_1v6y0_79",Ut={book:Nn,back:Ln,bookHide:In,wrap:Fn,wrapItem:On,item:Rn,des:Bn,icon:Wn,last:jn},Hn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAAFDElEQVRYCcWZy24cRRSGT3XPxbHj+MIlwXLCJkJKkLJmzSICicfIhi0Pwg55k9dASF6AxAOwQAIhgRRkQpwQRMaZxjOeme7i/8+pmqtlVwMzLqlVl66u+uo/p0731DiZS/6s+754eYTmhyL+DsrX57r892obQzon0nkmUlUF5jnCoIcizcfujXd+mJ4AvSx571tyVnyO2qfifRbbl5K3NwCIKU5eiJSDyRTOVagcyM7+Z845vaGAAe4rgH046b3EUuuaSNYQOX0l0oeAC8l9Lbv7HxPSlKJyq4IjTFkaUgtKnpsg1KuntKa44HPfL92sMyAwnJoZefGXyODvmbtaobl940GmG2LZPrcwvZ/43saOSKO10MMEGz6iibFbryCNsAfKke3mzbdN0UWMh873X3eXEkoWJzu/pYkNk2PDMJVDmPtUhPAV/dQVzvdeQ+8rTjlMTDMzNs6lgD7XmlTFukZ9XEPx1UA8Vu0rlGG2CkpU2KllWUnlR8i9lJWXUVXJta1bcuOt27MzMBbyypsWfhgjA2w64M9firz8EdIT6gwvAEzqGlJlTSmlgXLTymgrxcoVy2zHpX2Rd4tiETDi0sS8plIiINT67Vu8kezJyuU6KQHsAgQgWfaA8Ch7vWftpfYnLPr4RTNO8SwUEwHDcxjbS6Yg40mpngAYbwYqWY3LOYC4kLgIgybkN0/gBhjpvd1cbm/Zu2KBLDSkA3oPVUy5aC6aNyrH3ANyUg/3CA0ohScs6s8LvnKxWF/+j4CAU6WQm/kAS7W0DhiFoGoRCPcIHKAM3u4HcZKyZAVpLvoXFYgKTnKCEsZAI5T2jSaP9/F8nXSxA0yNZGAThQyIZm2JW9sOgKauKQ3goGD0TbZzoXVS8nI4me5QNRkmUvM2ZOv+R9Lc2pM+Pj47v/8kvdPClEY/6xNVxe6Gz3KMGA1SQNMBaVoqgJybw8ydS7Z2Q+dZ296TW7hOOy/kz+MnMuz1gsnNT6m4PV9PwXQTB3PpBlFQbgKoIbNxbX37pty594G8uXcXiyDUrG+qginShT7JCkaTTmKbmXmObzx13myrv9mOByh8T1Vcjg+6MDjVMBNz09Cn5hXswwf/eP5UOt3uJCbyGaqpeT0TJyvICUwNvnttNzIOjgZ9yVvrctYr5OXxr9I5OVHTR19lHtWPz49lTijUADQwew/bjib08S/fSWN9Wwp8BNiHQVBZfS/ERy0HUCyqTkoHxMDxy8XMFXwKn1T9AuZE+Bj72XRflmlaQsIlqGidlNxbgy4m01eWmtvim4Yb1OMrzlwhqm1QsQ9dgs/XScm9LVzQfAYWYxpNHu9FECo53r1UEFf0Qy6gTkruHb9UxmCMi/wwBTBhDCCYE/W4EDUv6hGept5slfiSEXn3kk8tLiQZUFWCD2l4oYr0qRjbUGbIYZuBTvwxgkUX4InCJ3eT3w/4+kxMa7v7AAgbI4AZ1JRqhOSlChps3DhqZlUyWRMlq/2rzuPnYIWdWyIv8SMo/hjiacYQZsMt5E6GVYYfSZkMcA418DnacuQNubnh5N7O7O+OizSqDXjRYMu4l+Fdet7x0jLmqj8m2OCD7qj+k6t6wh1xkxyuarp/Mc/hFR2/JaDy+M3Jg8y1N3kmfJDwyKq7HJBNP4dXfgR82VIdjoDb1ydHwHpgjQYc2HyBy35VXzbIMu6rWcEQ4DjF7A8KNKzkb4jpxWmY00hyCJrHweXGPf4B6HyHtp8LqjYAAAAASUVORK5CYII=",zn=Ie({name:"courseware-detail",emits:["close"],setup(E,{emit:O}){const Z=ke({box:{},show:!1,steps:[{ele:"",eleRect:{},img:me("courseware-detail1.png"),handStyle:{top:"-0.4rem",left:"0.98rem",transform:"rotate(-90deg)"},boxStyle:{borderRadius:"0.1rem"},imgStyle:{top:"-1.3rem",left:"2.2rem"},btnsStyle:{top:"1.5rem",left:"3.5rem"}}],step:0}),et=ae(!1),J=ae({});(async()=>{var nt;try{const dt=await ci({guideTag:"guideInfo"});dt.data?J.value=JSON.parse((nt=dt.data)==null?void 0:nt.guideValue)||null:J.value={},J.value&&J.value.coursewareDetail?et.value=!1:et.value=!0}catch(dt){console.log(dt)}})();const $=()=>{console.log(`coursewareDetail-${Z.step}`);const nt=document.getElementById(`coursewareDetail-${Z.step}`);if(nt){const dt=nt.getBoundingClientRect();Z.box={left:dt.x+"px",top:dt.y+"px",width:dt.width+"px",height:dt.height+"px"}}else bt()};Fe(()=>{$(),window.addEventListener("resize",ut)});const ut=()=>{$()};li(()=>{window.removeEventListener("resize",ut)});const bt=()=>{if(Z.step>=2){Pt();return}Z.step=Z.step+1,$()},Pt=async()=>{J.value?J.value.coursewareDetail=!0:J.value={coursewareDetail:!0};try{const nt=await di({guideTag:"guideInfo",guideValue:JSON.stringify(J.value)})}catch(nt){console.log(nt)}et.value=!1};return()=>H(Ve,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",kt.guidePopup],show:et.value,"onUpdate:show":nt=>et.value=nt},{default:()=>[H("div",{class:kt.content,onClick:()=>bt()},[Z.step!=Z.steps.length-1&&H("div",{class:kt.backBtn,onClick:nt=>{nt.stopPropagation(),Pt()}},[Ot("跳过")]),H("div",{class:kt.box,style:{...Z.box,...Z.steps[Z.step].boxStyle},id:`modeType-${Z.step}`},[Z.steps.map((nt,dt)=>{var Et,_t;return H("div",{onClick:Ct=>Ct.stopPropagation(),class:kt.item,style:{display:dt===Z.step?"":"none",left:`${(Et=nt.eleRect)==null?void 0:Et.left}px`,top:`${(_t=nt.eleRect)==null?void 0:_t.top}px`}},[H("img",{class:kt.img,style:nt.imgStyle,src:nt.img},null),H("img",{class:kt.iconHead,style:nt.handStyle,src:me("indexDot.png")},null),H("div",{class:kt.btns,style:nt.btnsStyle},[Z.step+1==Z.steps.length?H(Ue,null,[H(ce,{class:[kt.btn,kt.endBtn],round:!0,type:"primary",onClick:()=>Pt()},{default:()=>[Ot("完成")]})]):H(ce,{class:kt.btn,round:!0,type:"primary",onClick:()=>bt()},{default:()=>[Ot("下一步 ("),Z.step+1,Ot("/"),Z.steps.length,Ot(")")]})])])})])])]})}});var Le={},qn={get exports(){return Le},set exports(E){Le=E}};(function(E,O){(function(Z,et){et(O)})(Bi,function(Z){class et{constructor(a,h){this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0},this.createdDensity=h,this.nowDrawingDensity=this.createdDensity,this.render=a}setDensity(a){this.createdDensity=a,this.nowDrawingDensity=a}setDrawingDensity(a){this.nowDrawingDensity=a}setPosition(a){this.state.position=a}setAngle(a){this.state.angle=a}setArea(a){this.state.area=a}setHardDrawingAngle(a){this.state.hardDrawingAngle=a}setHardAngle(a){this.state.hardAngle=a,this.state.hardDrawingAngle=a}setOrientation(a){this.orientation=a}getDrawingDensity(){return this.nowDrawingDensity}getDensity(){return this.createdDensity}getHardAngle(){return this.state.hardAngle}}class J extends et{constructor(a,h,y){super(a,y),this.image=null,this.isLoad=!1,this.loadingAngle=0,this.image=new Image,this.image.src=h}draw(a){const h=this.render.getContext(),y=this.render.convertToGlobal(this.state.position),x=this.render.getRect().pageWidth,k=this.render.getRect().height;h.save(),h.translate(y.x,y.y),h.beginPath();for(let F of this.state.area)F!==null&&(F=this.render.convertToGlobal(F),h.lineTo(F.x-y.x,F.y-y.y));h.rotate(this.state.angle),h.clip(),this.isLoad?h.drawImage(this.image,0,0,x,k):this.drawLoader(h,{x:0,y:0},x,k),h.restore()}simpleDraw(a){const h=this.render.getRect(),y=this.render.getContext(),x=h.pageWidth,k=h.height,F=a===1?h.left+h.pageWidth:h.left,tt=h.top;this.isLoad?y.drawImage(this.image,F,tt,x,k):this.drawLoader(y,{x:F,y:tt},x,k)}drawLoader(a,h,y,x){a.beginPath(),a.strokeStyle="rgb(200, 200, 200)",a.fillStyle="rgb(255, 255, 255)",a.lineWidth=1,a.rect(h.x+1,h.y+1,y-1,x-1),a.stroke(),a.fill();const k={x:h.x+y/2,y:h.y+x/2};a.beginPath(),a.lineWidth=10,a.arc(k.x,k.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle),a.stroke(),a.closePath(),this.loadingAngle+=.07,this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}load(){this.isLoad||(this.image.onload=()=>{this.isLoad=!0})}newTemporaryCopy(){return this}getTemporaryCopy(){return this}hideTemporaryCopy(){}}class Bt{constructor(a,h){this.pages=[],this.currentPageIndex=0,this.currentSpreadIndex=0,this.landscapeSpread=[],this.portraitSpread=[],this.render=h,this.app=a,this.currentPageIndex=0,this.isShowCover=this.app.getSettings().showCover}destroy(){this.pages=[]}createSpread(){this.landscapeSpread=[],this.portraitSpread=[];for(let h=0;h<this.pages.length;h++)this.portraitSpread.push([h]);let a=0;this.isShowCover&&(this.pages[0].setDensity("hard"),this.landscapeSpread.push([a]),a++);for(let h=a;h<this.pages.length;h+=2)h<this.pages.length-1?this.landscapeSpread.push([h,h+1]):(this.landscapeSpread.push([h]),this.pages[h].setDensity("hard"))}getSpread(){return this.render.getOrientation()==="landscape"?this.landscapeSpread:this.portraitSpread}getSpreadIndexByPage(a){const h=this.getSpread();for(let y=0;y<h.length;y++)if(a===h[y][0]||a===h[y][1])return y;return null}getPageCount(){return this.pages.length}getPages(){return this.pages}getPage(a){if(a>=0&&a<this.pages.length)return this.pages[a];throw new Error("Invalid page number")}nextBy(a){const h=this.pages.indexOf(a);return h<this.pages.length-1?this.pages[h+1]:null}prevBy(a){const h=this.pages.indexOf(a);return h>0?this.pages[h-1]:null}getFlippingPage(a){const h=this.currentSpreadIndex;if(this.render.getOrientation()==="portrait")return a===0?this.pages[h].newTemporaryCopy():this.pages[h-1];{const y=a===0?this.getSpread()[h+1]:this.getSpread()[h-1];return y.length===1||a===0?this.pages[y[0]]:this.pages[y[1]]}}getBottomPage(a){const h=this.currentSpreadIndex;if(this.render.getOrientation()==="portrait")return a===0?this.pages[h+1]:this.pages[h-1];{const y=a===0?this.getSpread()[h+1]:this.getSpread()[h-1];return y.length===1?this.pages[y[0]]:a===0?this.pages[y[1]]:this.pages[y[0]]}}showNext(){this.currentSpreadIndex<this.getSpread().length&&(this.currentSpreadIndex++,this.showSpread())}showPrev(){this.currentSpreadIndex>0&&(this.currentSpreadIndex--,this.showSpread())}getCurrentPageIndex(){return this.currentPageIndex}show(a=null){if(a===null&&(a=this.currentPageIndex),a<0||a>=this.pages.length)return;const h=this.getSpreadIndexByPage(a);h!==null&&(this.currentSpreadIndex=h,this.showSpread())}getCurrentSpreadIndex(){return this.currentSpreadIndex}setCurrentSpreadIndex(a){if(!(a>=0&&a<this.getSpread().length))throw new Error("Invalid page");this.currentSpreadIndex=a}showSpread(){const a=this.getSpread()[this.currentSpreadIndex];a.length===2?(this.render.setLeftPage(this.pages[a[0]]),this.render.setRightPage(this.pages[a[1]])):this.render.getOrientation()==="landscape"&&a[0]===this.pages.length-1?(this.render.setLeftPage(this.pages[a[0]]),this.render.setRightPage(null)):(this.render.setLeftPage(null),this.render.setRightPage(this.pages[a[0]])),this.currentPageIndex=a[0],this.app.updatePageIndex(this.currentPageIndex)}}class $ extends Bt{constructor(a,h,y){super(a,h),this.imagesHref=y}load(){for(const a of this.imagesHref){const h=new J(this.render,a,"soft");h.load(),this.pages.push(h)}this.createSpread()}}class ut{static GetDistanceBetweenTwoPoint(a,h){return a===null||h===null?1/0:Math.sqrt(Math.pow(h.x-a.x,2)+Math.pow(h.y-a.y,2))}static GetSegmentLength(a){return ut.GetDistanceBetweenTwoPoint(a[0],a[1])}static GetAngleBetweenTwoLine(a,h){const y=a[0].y-a[1].y,x=h[0].y-h[1].y,k=a[1].x-a[0].x,F=h[1].x-h[0].x;return Math.acos((y*x+k*F)/(Math.sqrt(y*y+k*k)*Math.sqrt(x*x+F*F)))}static PointInRect(a,h){return h===null?null:h.x>=a.left&&h.x<=a.width+a.left&&h.y>=a.top&&h.y<=a.top+a.height?h:null}static GetRotatedPoint(a,h,y){return{x:a.x*Math.cos(y)+a.y*Math.sin(y)+h.x,y:a.y*Math.cos(y)-a.x*Math.sin(y)+h.y}}static LimitPointToCircle(a,h,y){if(ut.GetDistanceBetweenTwoPoint(a,y)<=h)return y;const x=a.x,k=a.y,F=y.x,tt=y.y;let st=Math.sqrt(Math.pow(h,2)*Math.pow(x-F,2)/(Math.pow(x-F,2)+Math.pow(k-tt,2)))+x;y.x<0&&(st*=-1);let yt=(st-x)*(k-tt)/(x-F)+k;return x-F+k===0&&(yt=h),{x:st,y:yt}}static GetIntersectBetweenTwoSegment(a,h,y){return ut.PointInRect(a,ut.GetIntersectBeetwenTwoLine(h,y))}static GetIntersectBeetwenTwoLine(a,h){const y=a[0].y-a[1].y,x=h[0].y-h[1].y,k=a[1].x-a[0].x,F=h[1].x-h[0].x,tt=a[0].x*a[1].y-a[1].x*a[0].y,st=h[0].x*h[1].y-h[1].x*h[0].y,yt=y*st-x*tt,xt=k*st-F*tt,At=-(tt*F-st*k)/(y*F-x*k),Xt=-(y*st-x*tt)/(y*F-x*k);if(isFinite(At)&&isFinite(Xt))return{x:At,y:Xt};if(Math.abs(yt-xt)<.1)throw new Error("Segment included");return null}static GetCordsFromTwoPoint(a,h){const y=Math.abs(a.x-h.x),x=Math.abs(a.y-h.y),k=Math.max(y,x),F=[a];function tt(st,yt,xt,At,Xt){return yt>st?st+Xt*(xt/At):yt<st?st-Xt*(xt/At):st}for(let st=1;st<=k;st+=1)F.push({x:tt(a.x,h.x,y,k,st),y:tt(a.y,h.y,x,k,st)});return F}}class bt extends et{constructor(a,h,y){super(a,y),this.copiedElement=null,this.temporaryCopy=null,this.isLoad=!1,this.element=h,this.element.classList.add("stf__item"),this.element.classList.add("--"+y)}newTemporaryCopy(){return this.nowDrawingDensity==="hard"?this:(this.temporaryCopy===null&&(this.copiedElement=this.element.cloneNode(!0),this.element.parentElement.appendChild(this.copiedElement),this.temporaryCopy=new bt(this.render,this.copiedElement,this.nowDrawingDensity)),this.getTemporaryCopy())}getTemporaryCopy(){return this.temporaryCopy}hideTemporaryCopy(){this.temporaryCopy!==null&&(this.copiedElement.remove(),this.copiedElement=null,this.temporaryCopy=null)}draw(a){const h=a||this.nowDrawingDensity,y=this.render.convertToGlobal(this.state.position),x=this.render.getRect().pageWidth,k=this.render.getRect().height;this.element.classList.remove("--simple");const F=`
  2. display: block;
  3. z-index: ${this.element.style.zIndex};
  4. left: 0;
  5. top: 0;
  6. width: ${x}px;
  7. height: ${k}px;
  8. `;h==="hard"?this.drawHard(F):this.drawSoft(y,F)}drawHard(a=""){const h=this.render.getRect().left+this.render.getRect().width/2,y=this.state.hardDrawingAngle,x=a+`
  9. backface-visibility: hidden;
  10. -webkit-backface-visibility: hidden;
  11. clip-path: none;
  12. -webkit-clip-path: none;
  13. `+(this.orientation===0?`transform-origin: ${this.render.getRect().pageWidth}px 0;
  14. transform: translate3d(0, 0, 0) rotateY(${y}deg);`:`transform-origin: 0 0;
  15. transform: translate3d(${h}px, 0, 0) rotateY(${y}deg);`);this.element.style.cssText=x}drawSoft(a,h=""){let y="polygon( ";for(const k of this.state.area)if(k!==null){let F=this.render.getDirection()===1?{x:-k.x+this.state.position.x,y:k.y-this.state.position.y}:{x:k.x-this.state.position.x,y:k.y-this.state.position.y};F=ut.GetRotatedPoint(F,{x:0,y:0},this.state.angle),y+=F.x+"px "+F.y+"px, "}y=y.slice(0,-2),y+=")";const x=h+`transform-origin: 0 0; clip-path: ${y}; -webkit-clip-path: ${y};`+(this.render.isSafari()&&this.state.angle===0?`transform: translate(${a.x}px, ${a.y}px);`:`transform: translate3d(${a.x}px, ${a.y}px, 0) rotate(${this.state.angle}rad);`);this.element.style.cssText=x}simpleDraw(a){const h=this.render.getRect(),y=h.pageWidth,x=h.height,k=a===1?h.left+h.pageWidth:h.left,F=h.top;this.element.classList.add("--simple"),this.element.style.cssText=`
  16. position: absolute;
  17. display: block;
  18. height: ${x}px;
  19. left: ${k}px;
  20. top: ${F}px;
  21. width: ${y}px;
  22. z-index: ${this.render.getSettings().startZIndex+1};`}getElement(){return this.element}load(){this.isLoad=!0}setOrientation(a){super.setOrientation(a),this.element.classList.remove("--left","--right"),this.element.classList.add(a===1?"--right":"--left")}setDrawingDensity(a){this.element.classList.remove("--soft","--hard"),this.element.classList.add("--"+a),super.setDrawingDensity(a)}}class Pt extends Bt{constructor(a,h,y,x){super(a,h),this.element=y,this.pagesElement=x}load(){for(const a of this.pagesElement){const h=new bt(this.render,a,a.dataset.density==="hard"?"hard":"soft");h.load(),this.pages.push(h)}this.createSpread()}}class nt{constructor(a,h,y,x){this.direction=a,this.corner=h,this.topIntersectPoint=null,this.sideIntersectPoint=null,this.bottomIntersectPoint=null,this.pageWidth=parseInt(y,10),this.pageHeight=parseInt(x,10)}calc(a){try{return this.position=this.calcAngleAndPosition(a),this.calculateIntersectPoint(this.position),!0}catch(h){return!1}}getFlippingClipArea(){const a=[];let h=!1;return a.push(this.rect.topLeft),a.push(this.topIntersectPoint),this.sideIntersectPoint===null?h=!0:(a.push(this.sideIntersectPoint),this.bottomIntersectPoint===null&&(h=!1)),a.push(this.bottomIntersectPoint),(h||this.corner==="bottom")&&a.push(this.rect.bottomLeft),a}getBottomClipArea(){const a=[];return a.push(this.topIntersectPoint),this.corner==="top"?a.push({x:this.pageWidth,y:0}):(this.topIntersectPoint!==null&&a.push({x:this.pageWidth,y:0}),a.push({x:this.pageWidth,y:this.pageHeight})),this.sideIntersectPoint!==null?ut.GetDistanceBetweenTwoPoint(this.sideIntersectPoint,this.topIntersectPoint)>=10&&a.push(this.sideIntersectPoint):this.corner==="top"&&a.push({x:this.pageWidth,y:this.pageHeight}),a.push(this.bottomIntersectPoint),a.push(this.topIntersectPoint),a}getAngle(){return this.direction===0?-this.angle:this.angle}getRect(){return this.rect}getPosition(){return this.position}getActiveCorner(){return this.direction===0?this.rect.topLeft:this.rect.topRight}getDirection(){return this.direction}getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}getCorner(){return this.corner}getBottomPagePosition(){return this.direction===1?{x:this.pageWidth,y:0}:{x:0,y:0}}getShadowStartPoint(){return this.corner==="top"?this.topIntersectPoint:this.sideIntersectPoint!==null?this.sideIntersectPoint:this.topIntersectPoint}getShadowAngle(){const a=ut.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return this.direction===0?a:Math.PI-a}calcAngleAndPosition(a){let h=a;if(this.updateAngleAndGeometry(h),h=this.corner==="top"?this.checkPositionAtCenterLine(h,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(h,{x:0,y:this.pageHeight},{x:0,y:0}),Math.abs(h.x-this.pageWidth)<1&&Math.abs(h.y)<1)throw new Error("Point is too small");return h}updateAngleAndGeometry(a){this.angle=this.calculateAngle(a),this.rect=this.getPageRect(a)}calculateAngle(a){const h=this.pageWidth-a.x+1,y=this.corner==="bottom"?this.pageHeight-a.y:a.y;let x=2*Math.acos(h/Math.sqrt(y*y+h*h));y<0&&(x=-x);const k=Math.PI-x;if(!isFinite(x)||k>=0&&k<.003)throw new Error("The G point is too small");return this.corner==="bottom"&&(x=-x),x}getPageRect(a){return this.corner==="top"?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],a):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],a)}getRectFromBasePoint(a,h){return{topLeft:this.getRotatedPoint(a[0],h),topRight:this.getRotatedPoint(a[1],h),bottomLeft:this.getRotatedPoint(a[2],h),bottomRight:this.getRotatedPoint(a[3],h)}}getRotatedPoint(a,h){return{x:a.x*Math.cos(this.angle)+a.y*Math.sin(this.angle)+h.x,y:a.y*Math.cos(this.angle)-a.x*Math.sin(this.angle)+h.y}}calculateIntersectPoint(a){const h={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};this.corner==="top"?(this.topIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[a,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[a,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])):(this.topIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[a,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=ut.GetIntersectBetweenTwoSegment(h,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}]))}checkPositionAtCenterLine(a,h,y){let x=a;const k=ut.LimitPointToCircle(h,this.pageWidth,x);x!==k&&(x=k,this.updateAngleAndGeometry(x));const F=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2));let tt=this.rect.bottomRight,st=this.rect.topLeft;if(this.corner==="bottom"&&(tt=this.rect.topRight,st=this.rect.bottomLeft),tt.x<=0){const yt=ut.LimitPointToCircle(y,F,st);yt!==x&&(x=yt,this.updateAngleAndGeometry(x))}return x}getSegmentToShadowLine(){const a=this.getShadowStartPoint();return[a,a!==this.sideIntersectPoint&&this.sideIntersectPoint!==null?this.sideIntersectPoint:this.bottomIntersectPoint]}}class dt{constructor(a,h){this.flippingPage=null,this.bottomPage=null,this.calc=null,this.state="read",this.render=a,this.app=h}fold(a){this.setState("user_fold"),this.calc===null&&this.start(a),this.do(this.render.convertToPage(a))}flip(a){if(this.app.getSettings().disableFlipByClick&&!this.isPointOnCorners(a)||(this.calc!==null&&this.render.finishAnimation(),!this.start(a)))return;const h=this.getBoundsRect();this.setState("flipping");const y=h.height/10,x=this.calc.getCorner()==="bottom"?h.height-y:y,k=this.calc.getCorner()==="bottom"?h.height:0;this.calc.calc({x:h.pageWidth-y,y:x}),this.animateFlippingTo({x:h.pageWidth-y,y:x},{x:-h.pageWidth,y:k},!0)}start(a){this.reset();const h=this.render.convertToBook(a),y=this.getBoundsRect(),x=this.getDirectionByPoint(h),k=h.y>=y.height/2?"bottom":"top";if(!this.checkDirection(x))return!1;try{if(this.flippingPage=this.app.getPageCollection().getFlippingPage(x),this.bottomPage=this.app.getPageCollection().getBottomPage(x),this.render.getOrientation()==="landscape")if(x===1){const F=this.app.getPageCollection().nextBy(this.flippingPage);F!==null&&this.flippingPage.getDensity()!==F.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),F.setDrawingDensity("hard"))}else{const F=this.app.getPageCollection().prevBy(this.flippingPage);F!==null&&this.flippingPage.getDensity()!==F.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),F.setDrawingDensity("hard"))}return this.render.setDirection(x),this.calc=new nt(x,k,y.pageWidth.toString(10),y.height.toString(10)),!0}catch(F){return!1}}do(a){if(this.calc!==null&&this.calc.calc(a)){const h=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea()),this.bottomPage.setPosition(this.calc.getBottomPagePosition()),this.bottomPage.setAngle(0),this.bottomPage.setHardAngle(0),this.flippingPage.setArea(this.calc.getFlippingClipArea()),this.flippingPage.setPosition(this.calc.getActiveCorner()),this.flippingPage.setAngle(this.calc.getAngle()),this.calc.getDirection()===0?this.flippingPage.setHardAngle(90*(200-2*h)/100):this.flippingPage.setHardAngle(-90*(200-2*h)/100),this.render.setPageRect(this.calc.getRect()),this.render.setBottomPage(this.bottomPage),this.render.setFlippingPage(this.flippingPage),this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),h,this.calc.getDirection())}}flipToPage(a,h){const y=this.app.getPageCollection().getCurrentSpreadIndex(),x=this.app.getPageCollection().getSpreadIndexByPage(a);try{x>y&&(this.app.getPageCollection().setCurrentSpreadIndex(x-1),this.flipNext(h)),x<y&&(this.app.getPageCollection().setCurrentSpreadIndex(x+1),this.flipPrev(h))}catch(k){}}flipNext(a){this.flip({x:this.render.getRect().left+2*this.render.getRect().pageWidth-10,y:a==="top"?1:this.render.getRect().height-2})}flipPrev(a){this.flip({x:10,y:a==="top"?1:this.render.getRect().height-2})}stopMove(){if(this.calc===null)return;const a=this.calc.getPosition(),h=this.getBoundsRect(),y=this.calc.getCorner()==="bottom"?h.height:0;a.x<=0?this.animateFlippingTo(a,{x:-h.pageWidth,y},!0):this.animateFlippingTo(a,{x:h.pageWidth,y},!1)}showCorner(a){if(!this.checkState("read","fold_corner"))return;const h=this.getBoundsRect(),y=h.pageWidth;if(this.isPointOnCorners(a))if(this.calc===null){if(!this.start(a))return;this.setState("fold_corner"),this.calc.calc({x:y-1,y:1});const x=50,k=this.calc.getCorner()==="bottom"?h.height-1:1,F=this.calc.getCorner()==="bottom"?h.height-x:x;this.animateFlippingTo({x:y-1,y:k},{x:y-x,y:F},!1,!1)}else this.do(this.render.convertToPage(a));else this.setState("read"),this.render.finishAnimation(),this.stopMove()}animateFlippingTo(a,h,y,x=!0){const k=ut.GetCordsFromTwoPoint(a,h),F=[];for(const st of k)F.push(()=>this.do(st));const tt=this.getAnimationDuration(k.length);this.render.startAnimation(F,tt,()=>{this.calc&&(y&&(this.calc.getDirection()===1?this.app.turnToPrevPage():this.app.turnToNextPage()),x&&(this.render.setBottomPage(null),this.render.setFlippingPage(null),this.render.clearShadow(),this.setState("read"),this.reset()))})}getCalculation(){return this.calc}getState(){return this.state}setState(a){this.state!==a&&(this.app.updateState(a),this.state=a)}getDirectionByPoint(a){const h=this.getBoundsRect();if(this.render.getOrientation()==="portrait"){if(a.x-h.pageWidth<=h.width/5)return 1}else if(a.x<h.width/2)return 1;return 0}getAnimationDuration(a){const h=this.app.getSettings().flippingTime;return a>=1e3?h:a/1e3*h}checkDirection(a){return a===0?this.app.getCurrentPageIndex()<this.app.getPageCount()-1:this.app.getCurrentPageIndex()>=1}reset(){this.calc=null,this.flippingPage=null,this.bottomPage=null}getBoundsRect(){return this.render.getRect()}checkState(...a){for(const h of a)if(this.state===h)return!0;return!1}isPointOnCorners(a){const h=this.getBoundsRect(),y=h.pageWidth,x=Math.sqrt(Math.pow(y,2)+Math.pow(h.height,2))/5,k=this.render.convertToBook(a);return k.x>0&&k.y>0&&k.x<h.width&&k.y<h.height&&(k.x<x||k.x>h.width-x)&&(k.y<x||k.y>h.height-x)}}class Et{constructor(a,h){this.leftPage=null,this.rightPage=null,this.flippingPage=null,this.bottomPage=null,this.direction=null,this.orientation=null,this.shadow=null,this.animation=null,this.pageRect=null,this.boundsRect=null,this.timer=0,this.safari=!1,this.setting=h,this.app=a;const y=new RegExp("Version\\/[\\d\\.]+.*Safari/");this.safari=y.exec(window.navigator.userAgent)!==null}render(a){if(this.animation!==null){const h=Math.round((a-this.animation.startedAt)/this.animation.durationFrame);h<this.animation.frames.length?this.animation.frames[h]():(this.animation.onAnimateEnd(),this.animation=null)}this.timer=a,this.drawFrame()}start(){this.update();const a=h=>{this.render(h),requestAnimationFrame(a)};requestAnimationFrame(a)}startAnimation(a,h,y){this.finishAnimation(),this.animation={frames:a,duration:h,durationFrame:h/a.length,onAnimateEnd:y,startedAt:this.timer}}finishAnimation(){this.animation!==null&&(this.animation.frames[this.animation.frames.length-1](),this.animation.onAnimateEnd!==null&&this.animation.onAnimateEnd()),this.animation=null}update(){this.boundsRect=null;const a=this.calculateBoundsRect();this.orientation!==a&&(this.orientation=a,this.app.updateOrientation(a))}calculateBoundsRect(){let a="landscape";const h=this.getBlockWidth(),y=h/2,x=this.getBlockHeight()/2,k=this.setting.width/this.setting.height;let F=this.setting.width,tt=this.setting.height,st=y-F;return this.setting.size==="stretch"?(h<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(a="portrait"),F=a==="portrait"?this.getBlockWidth():this.getBlockWidth()/2,F>this.setting.maxWidth&&(F=this.setting.maxWidth),tt=F/k,tt>this.getBlockHeight()&&(tt=this.getBlockHeight(),F=tt*k),st=a==="portrait"?y-F/2-F:y-F):h<2*F&&this.app.getSettings().usePortrait&&(a="portrait",st=y-F/2-F),this.boundsRect={left:st,top:x-tt/2,width:2*F,height:tt,pageWidth:F},a}setShadowData(a,h,y,x){if(!this.app.getSettings().drawShadow)return;const k=100*this.getSettings().maxShadowOpacity;this.shadow={pos:a,angle:h,width:3*this.getRect().pageWidth/4*y/100,opacity:(100-y)*k/100/100,direction:x,progress:2*y}}clearShadow(){this.shadow=null}getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}getDirection(){return this.direction}getRect(){return this.boundsRect===null&&this.calculateBoundsRect(),this.boundsRect}getSettings(){return this.app.getSettings()}getOrientation(){return this.orientation}setPageRect(a){this.pageRect=a}setDirection(a){this.direction=a}setRightPage(a){a!==null&&a.setOrientation(1),this.rightPage=a}setLeftPage(a){a!==null&&a.setOrientation(0),this.leftPage=a}setBottomPage(a){a!==null&&a.setOrientation(this.direction===1?0:1),this.bottomPage=a}setFlippingPage(a){a!==null&&a.setOrientation(this.direction===0&&this.orientation!=="portrait"?0:1),this.flippingPage=a}convertToBook(a){const h=this.getRect();return{x:a.x-h.left,y:a.y-h.top}}isSafari(){return this.safari}convertToPage(a,h){h||(h=this.direction);const y=this.getRect();return{x:h===0?a.x-y.left-y.width/2:y.width/2-a.x+y.left,y:a.y-y.top}}convertToGlobal(a,h){if(h||(h=this.direction),a==null)return null;const y=this.getRect();return{x:h===0?a.x+y.left+y.width/2:y.width/2-a.x+y.left,y:a.y+y.top}}convertRectToGlobal(a,h){return h||(h=this.direction),{topLeft:this.convertToGlobal(a.topLeft,h),topRight:this.convertToGlobal(a.topRight,h),bottomLeft:this.convertToGlobal(a.bottomLeft,h),bottomRight:this.convertToGlobal(a.bottomRight,h)}}}class _t extends Et{constructor(a,h,y){super(a,h),this.canvas=y,this.ctx=y.getContext("2d")}getContext(){return this.ctx}reload(){}drawFrame(){this.clear(),this.orientation!=="portrait"&&this.leftPage!=null&&this.leftPage.simpleDraw(0),this.rightPage!=null&&this.rightPage.simpleDraw(1),this.bottomPage!=null&&this.bottomPage.draw(),this.drawBookShadow(),this.flippingPage!=null&&this.flippingPage.draw(),this.shadow!=null&&(this.drawOuterShadow(),this.drawInnerShadow());const a=this.getRect();this.orientation==="portrait"&&(this.ctx.beginPath(),this.ctx.rect(a.left+a.pageWidth,a.top,a.width,a.height),this.ctx.clip())}drawBookShadow(){const a=this.getRect();this.ctx.save(),this.ctx.beginPath();const h=a.width/20;this.ctx.rect(a.left,a.top,a.width,a.height);const y={x:a.left+a.width/2-h/2,y:0};this.ctx.translate(y.x,y.y);const x=this.ctx.createLinearGradient(0,0,h,0);x.addColorStop(0,"rgba(0, 0, 0, 0)"),x.addColorStop(.4,"rgba(0, 0, 0, 0.2)"),x.addColorStop(.49,"rgba(0, 0, 0, 0.1)"),x.addColorStop(.5,"rgba(0, 0, 0, 0.5)"),x.addColorStop(.51,"rgba(0, 0, 0, 0.4)"),x.addColorStop(1,"rgba(0, 0, 0, 0)"),this.ctx.clip(),this.ctx.fillStyle=x,this.ctx.fillRect(0,0,h,2*a.height),this.ctx.restore()}drawOuterShadow(){const a=this.getRect();this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(a.left,a.top,a.width,a.height);const h=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(h.x,h.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const y=this.ctx.createLinearGradient(0,0,this.shadow.width,0);this.shadow.direction===0?(this.ctx.translate(0,-100),y.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),y.addColorStop(1,"rgba(0, 0, 0, 0)")):(this.ctx.translate(-this.shadow.width,-100),y.addColorStop(0,"rgba(0, 0, 0, 0)"),y.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")")),this.ctx.clip(),this.ctx.fillStyle=y,this.ctx.fillRect(0,0,this.shadow.width,2*a.height),this.ctx.restore()}drawInnerShadow(){const a=this.getRect();this.ctx.save(),this.ctx.beginPath();const h=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),y=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(y.topLeft.x,y.topLeft.y),this.ctx.lineTo(y.topRight.x,y.topRight.y),this.ctx.lineTo(y.bottomRight.x,y.bottomRight.y),this.ctx.lineTo(y.bottomLeft.x,y.bottomLeft.y),this.ctx.translate(h.x,h.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const x=3*this.shadow.width/4,k=this.ctx.createLinearGradient(0,0,x,0);this.shadow.direction===0?(this.ctx.translate(-x,-100),k.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")"),k.addColorStop(.9,"rgba(0, 0, 0, 0.05)"),k.addColorStop(.7,"rgba(0, 0, 0, "+this.shadow.opacity+")"),k.addColorStop(0,"rgba(0, 0, 0, 0)")):(this.ctx.translate(0,-100),k.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),k.addColorStop(.1,"rgba(0, 0, 0, 0.05)"),k.addColorStop(.3,"rgba(0, 0, 0, "+this.shadow.opacity+")"),k.addColorStop(1,"rgba(0, 0, 0, 0)")),this.ctx.clip(),this.ctx.fillStyle=k,this.ctx.fillRect(0,0,x,2*a.height),this.ctx.restore()}clear(){this.ctx.fillStyle="white",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}class Ct{constructor(a,h,y){this.touchPoint=null,this.swipeTimeout=250,this.onResize=()=>{this.update()},this.onMouseDown=k=>{if(this.checkTarget(k.target)){const F=this.getMousePos(k.clientX,k.clientY);this.app.startUserTouch(F),k.preventDefault()}},this.onTouchStart=k=>{if(this.checkTarget(k.target)&&k.changedTouches.length>0){const F=k.changedTouches[0],tt=this.getMousePos(F.clientX,F.clientY);this.touchPoint={point:tt,time:Date.now()},setTimeout(()=>{this.touchPoint!==null&&this.app.startUserTouch(tt)},this.swipeTimeout),this.app.getSettings().mobileScrollSupport||k.preventDefault()}},this.onMouseUp=k=>{const F=this.getMousePos(k.clientX,k.clientY);this.app.userStop(F)},this.onMouseMove=k=>{const F=this.getMousePos(k.clientX,k.clientY);this.app.userMove(F,!1)},this.onTouchMove=k=>{if(k.changedTouches.length>0){const F=k.changedTouches[0],tt=this.getMousePos(F.clientX,F.clientY);this.app.getSettings().mobileScrollSupport?(this.touchPoint!==null&&(Math.abs(this.touchPoint.point.x-tt.x)>10||this.app.getState()!=="read")&&k.cancelable&&this.app.userMove(tt,!0),this.app.getState()!=="read"&&k.preventDefault()):this.app.userMove(tt,!0)}},this.onTouchEnd=k=>{if(k.changedTouches.length>0){const F=k.changedTouches[0],tt=this.getMousePos(F.clientX,F.clientY);let st=!1;if(this.touchPoint!==null){const yt=tt.x-this.touchPoint.point.x,xt=Math.abs(tt.y-this.touchPoint.point.y);Math.abs(yt)>this.swipeDistance&&xt<2*this.swipeDistance&&Date.now()-this.touchPoint.time<this.swipeTimeout&&(yt>0?this.app.flipPrev(this.touchPoint.point.y<this.app.getRender().getRect().height/2?"top":"bottom"):this.app.flipNext(this.touchPoint.point.y<this.app.getRender().getRect().height/2?"top":"bottom"),st=!0),this.touchPoint=null}this.app.userStop(tt,st)}},this.parentElement=a,a.classList.add("stf__parent"),a.insertAdjacentHTML("afterbegin",'<div class="stf__wrapper"></div>'),this.wrapper=a.querySelector(".stf__wrapper"),this.app=h;const x=this.app.getSettings().usePortrait?1:2;a.style.minWidth=y.minWidth*x+"px",a.style.minHeight=y.minHeight+"px",y.size==="fixed"&&(a.style.minWidth=y.width*x+"px",a.style.minHeight=y.height+"px"),y.autoSize&&(a.style.width="100%",a.style.maxWidth=2*y.maxWidth+"px"),a.style.display="block",window.addEventListener("resize",this.onResize,!1),this.swipeDistance=y.swipeDistance}destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers(),this.distElement.remove(),this.wrapper.remove()}getDistElement(){return this.distElement}getWrapper(){return this.wrapper}setOrientationStyle(a){this.wrapper.classList.remove("--portrait","--landscape"),a==="portrait"?(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+"%"),this.wrapper.classList.add("--portrait")):(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+"%"),this.wrapper.classList.add("--landscape")),this.update()}removeHandlers(){window.removeEventListener("resize",this.onResize),this.distElement.removeEventListener("mousedown",this.onMouseDown),this.distElement.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("touchend",this.onTouchEnd)}setHandlers(){window.addEventListener("resize",this.onResize,!1),this.app.getSettings().useMouseEvents&&(this.distElement.addEventListener("mousedown",this.onMouseDown),this.distElement.addEventListener("touchstart",this.onTouchStart),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport}),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("touchend",this.onTouchEnd))}getMousePos(a,h){const y=this.distElement.getBoundingClientRect();return{x:a-y.left,y:h-y.top}}checkTarget(a){return!this.app.getSettings().clickEventForward||!["a","button"].includes(a.tagName.toLowerCase())}}class U extends Ct{constructor(a,h,y,x){super(a,h,y),this.wrapper.insertAdjacentHTML("afterbegin",'<div class="stf__block"></div>'),this.distElement=a.querySelector(".stf__block"),this.items=x;for(const k of x)this.distElement.appendChild(k);this.setHandlers()}clear(){for(const a of this.items)this.parentElement.appendChild(a)}updateItems(a){this.removeHandlers(),this.distElement.innerHTML="";for(const h of a)this.distElement.appendChild(h);this.items=a,this.setHandlers()}update(){this.app.getRender().update()}}class K extends Ct{constructor(a,h,y){super(a,h,y),this.wrapper.innerHTML='<canvas class="stf__canvas"></canvas>',this.canvas=a.querySelectorAll("canvas")[0],this.distElement=this.canvas,this.resizeCanvas(),this.setHandlers()}resizeCanvas(){const a=getComputedStyle(this.canvas),h=parseInt(a.getPropertyValue("width"),10),y=parseInt(a.getPropertyValue("height"),10);this.canvas.width=h,this.canvas.height=y}getCanvas(){return this.canvas}update(){this.resizeCanvas(),this.app.getRender().update()}}class ht extends Et{constructor(a,h,y){super(a,h),this.outerShadow=null,this.innerShadow=null,this.hardShadow=null,this.hardInnerShadow=null,this.element=y,this.createShadows()}createShadows(){this.element.insertAdjacentHTML("beforeend",`<div class="stf__outerShadow"></div>
  23. <div class="stf__innerShadow"></div>
  24. <div class="stf__hardShadow"></div>
  25. <div class="stf__hardInnerShadow"></div>`),this.outerShadow=this.element.querySelector(".stf__outerShadow"),this.innerShadow=this.element.querySelector(".stf__innerShadow"),this.hardShadow=this.element.querySelector(".stf__hardShadow"),this.hardInnerShadow=this.element.querySelector(".stf__hardInnerShadow")}clearShadow(){super.clearShadow(),this.outerShadow.style.cssText="display: none",this.innerShadow.style.cssText="display: none",this.hardShadow.style.cssText="display: none",this.hardInnerShadow.style.cssText="display: none"}reload(){this.element.querySelector(".stf__outerShadow")||this.createShadows()}drawHardInnerShadow(){const a=this.getRect(),h=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress;let y=(100-h)*(2.5*a.pageWidth)/100+20;y>a.pageWidth&&(y=a.pageWidth);let x=`
  26. display: block;
  27. z-index: ${(this.getSettings().startZIndex+5).toString(10)};
  28. width: ${y}px;
  29. height: ${a.height}px;
  30. background: linear-gradient(to right,
  31. rgba(0, 0, 0, ${this.shadow.opacity*h/100}) 5%,
  32. rgba(0, 0, 0, 0) 100%);
  33. left: ${a.left+a.width/2}px;
  34. transform-origin: 0 0;
  35. `;x+=this.getDirection()===0&&this.shadow.progress>100||this.getDirection()===1&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0);":"transform: translate3d(0, 0, 0) rotateY(180deg);",this.hardInnerShadow.style.cssText=x}drawHardOuterShadow(){const a=this.getRect();let h=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*a.pageWidth)/100+20;h>a.pageWidth&&(h=a.pageWidth);let y=`
  36. display: block;
  37. z-index: ${(this.getSettings().startZIndex+4).toString(10)};
  38. width: ${h}px;
  39. height: ${a.height}px;
  40. background: linear-gradient(to left, rgba(0, 0, 0, ${this.shadow.opacity}) 5%, rgba(0, 0, 0, 0) 100%);
  41. left: ${a.left+a.width/2}px;
  42. transform-origin: 0 0;
  43. `;y+=this.getDirection()===0&&this.shadow.progress>100||this.getDirection()===1&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0) rotateY(180deg);":"transform: translate3d(0, 0, 0);",this.hardShadow.style.cssText=y}drawInnerShadow(){const a=this.getRect(),h=3*this.shadow.width/4,y=this.getDirection()===0?h:0,x=this.getDirection()===0?"to left":"to right",k=this.convertToGlobal(this.shadow.pos),F=this.shadow.angle+3*Math.PI/2,tt=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];let st="polygon( ";for(const xt of tt){let At=this.getDirection()===1?{x:-xt.x+this.shadow.pos.x,y:xt.y-this.shadow.pos.y}:{x:xt.x-this.shadow.pos.x,y:xt.y-this.shadow.pos.y};At=ut.GetRotatedPoint(At,{x:y,y:100},F),st+=At.x+"px "+At.y+"px, "}st=st.slice(0,-2),st+=")";const yt=`
  44. display: block;
  45. z-index: ${(this.getSettings().startZIndex+10).toString(10)};
  46. width: ${h}px;
  47. height: ${2*a.height}px;
  48. background: linear-gradient(${x},
  49. rgba(0, 0, 0, ${this.shadow.opacity}) 5%,
  50. rgba(0, 0, 0, 0.05) 15%,
  51. rgba(0, 0, 0, ${this.shadow.opacity}) 35%,
  52. rgba(0, 0, 0, 0) 100%);
  53. transform-origin: ${y}px 100px;
  54. transform: translate3d(${k.x-y}px, ${k.y-100}px, 0) rotate(${F}rad);
  55. clip-path: ${st};
  56. -webkit-clip-path: ${st};
  57. `;this.innerShadow.style.cssText=yt}drawOuterShadow(){const a=this.getRect(),h=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),y=this.shadow.angle+3*Math.PI/2,x=this.getDirection()===1?this.shadow.width:0,k=this.getDirection()===0?"to right":"to left",F=[{x:0,y:0},{x:a.pageWidth,y:0},{x:a.pageWidth,y:a.height},{x:0,y:a.height}];let tt="polygon( ";for(const yt of F)if(yt!==null){let xt=this.getDirection()===1?{x:-yt.x+this.shadow.pos.x,y:yt.y-this.shadow.pos.y}:{x:yt.x-this.shadow.pos.x,y:yt.y-this.shadow.pos.y};xt=ut.GetRotatedPoint(xt,{x,y:100},y),tt+=xt.x+"px "+xt.y+"px, "}tt=tt.slice(0,-2),tt+=")";const st=`
  58. display: block;
  59. z-index: ${(this.getSettings().startZIndex+10).toString(10)};
  60. width: ${this.shadow.width}px;
  61. height: ${2*a.height}px;
  62. background: linear-gradient(${k}, rgba(0, 0, 0, ${this.shadow.opacity}), rgba(0, 0, 0, 0));
  63. transform-origin: ${x}px 100px;
  64. transform: translate3d(${h.x-x}px, ${h.y-100}px, 0) rotate(${y}rad);
  65. clip-path: ${tt};
  66. -webkit-clip-path: ${tt};
  67. `;this.outerShadow.style.cssText=st}drawLeftPage(){this.orientation!=="portrait"&&this.leftPage!==null&&(this.direction===1&&this.flippingPage!==null&&this.flippingPage.getDrawingDensity()==="hard"?(this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.leftPage.draw(this.flippingPage.getDrawingDensity())):this.leftPage.simpleDraw(0))}drawRightPage(){this.rightPage!==null&&(this.direction===0&&this.flippingPage!==null&&this.flippingPage.getDrawingDensity()==="hard"?(this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.rightPage.draw(this.flippingPage.getDrawingDensity())):this.rightPage.simpleDraw(1))}drawBottomPage(){if(this.bottomPage===null)return;const a=this.flippingPage!=null?this.flippingPage.getDrawingDensity():null;this.orientation==="portrait"&&this.direction===1||(this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10),this.bottomPage.draw(a))}drawFrame(){this.clear(),this.drawLeftPage(),this.drawRightPage(),this.drawBottomPage(),this.flippingPage!=null&&(this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.flippingPage.draw()),this.shadow!=null&&this.flippingPage!==null&&(this.flippingPage.getDrawingDensity()==="soft"?(this.drawOuterShadow(),this.drawInnerShadow()):(this.drawHardOuterShadow(),this.drawHardInnerShadow()))}clear(){for(const a of this.app.getPageCollection().getPages())a!==this.leftPage&&a!==this.rightPage&&a!==this.flippingPage&&a!==this.bottomPage&&(a.getElement().style.cssText="display: none"),a.getTemporaryCopy()!==this.flippingPage&&a.hideTemporaryCopy()}update(){super.update(),this.rightPage!==null&&this.rightPage.setOrientation(1),this.leftPage!==null&&this.leftPage.setOrientation(0)}}class at{constructor(){this._default={startPage:0,size:"fixed",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}getSettings(a){const h=this._default;if(Object.assign(h,a),h.size!=="stretch"&&h.size!=="fixed")throw new Error('Invalid size type. Available only "fixed" and "stretch" value');if(h.width<=0||h.height<=0)throw new Error("Invalid width or height");if(h.flippingTime<=0)throw new Error("Invalid flipping time");return h.size==="stretch"?(h.minWidth<=0&&(h.minWidth=100),h.maxWidth<h.minWidth&&(h.maxWidth=2e3),h.minHeight<=0&&(h.minHeight=100),h.maxHeight<h.minHeight&&(h.maxHeight=2e3)):(h.minWidth=h.width,h.maxWidth=h.width,h.minHeight=h.height,h.maxHeight=h.height),h}}(function(B,a){a===void 0&&(a={});var h=a.insertAt;if(B&&typeof document<"u"){var y=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css",h==="top"&&y.firstChild?y.insertBefore(x,y.firstChild):y.appendChild(x),x.styleSheet?x.styleSheet.cssText=B:x.appendChild(document.createTextNode(B))}})(`.stf__parent {
  68. position: relative;
  69. display: block;
  70. box-sizing: border-box;
  71. transform: translateZ(0);
  72. -ms-touch-action: pan-y;
  73. touch-action: pan-y;
  74. }
  75. .sft__wrapper {
  76. position: relative;
  77. width: 100%;
  78. box-sizing: border-box;
  79. }
  80. .stf__parent canvas {
  81. position: absolute;
  82. width: 100%;
  83. height: 100%;
  84. left: 0;
  85. top: 0;
  86. }
  87. .stf__block {
  88. position: absolute;
  89. width: 100%;
  90. height: 100%;
  91. box-sizing: border-box;
  92. perspective: 2000px;
  93. }
  94. .stf__item {
  95. display: none;
  96. position: absolute;
  97. transform-style: preserve-3d;
  98. }
  99. .stf__outerShadow {
  100. position: absolute;
  101. left: 0;
  102. top: 0;
  103. }
  104. .stf__innerShadow {
  105. position: absolute;
  106. left: 0;
  107. top: 0;
  108. }
  109. .stf__hardShadow {
  110. position: absolute;
  111. left: 0;
  112. top: 0;
  113. }
  114. .stf__hardInnerShadow {
  115. position: absolute;
  116. left: 0;
  117. top: 0;
  118. }`),Z.PageFlip=class extends class{constructor(){this.events=new Map}on(B,a){return this.events.has(B)?this.events.get(B).push(a):this.events.set(B,[a]),this}off(B){this.events.delete(B)}trigger(B,a,h=null){if(this.events.has(B))for(const y of this.events.get(B))y({data:h,object:a})}}{constructor(B,a){super(),this.isUserTouch=!1,this.isUserMove=!1,this.setting=null,this.pages=null,this.setting=new at().getSettings(a),this.block=B}destroy(){this.ui.destroy(),this.block.remove()}update(){this.render.update(),this.pages.show()}loadFromImages(B){this.ui=new K(this.block,this,this.setting);const a=this.ui.getCanvas();this.render=new _t(this,this.setting,a),this.flipController=new dt(this.render,this),this.pages=new $(this,this.render,B),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout(()=>{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}loadFromHTML(B){this.ui=new U(this.block,this,this.setting,B),this.render=new ht(this,this.setting,this.ui.getDistElement()),this.flipController=new dt(this.render,this),this.pages=new Pt(this,this.render,this.ui.getDistElement(),B),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout(()=>{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})},1)}updateFromImages(B){const a=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new $(this,this.render,B),this.pages.load(),this.pages.show(a),this.trigger("update",this,{page:a,mode:this.render.getOrientation()})}updateFromHtml(B){const a=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new Pt(this,this.render,this.ui.getDistElement(),B),this.pages.load(),this.ui.updateItems(B),this.render.reload(),this.pages.show(a),this.trigger("update",this,{page:a,mode:this.render.getOrientation()})}clear(){this.pages.destroy(),this.ui.clear()}turnToPrevPage(){this.pages.showPrev()}turnToNextPage(){this.pages.showNext()}turnToPage(B){this.pages.show(B)}flipNext(B="top"){this.flipController.flipNext(B)}flipPrev(B="top"){this.flipController.flipPrev(B)}flip(B,a="top"){this.flipController.flipToPage(B,a)}updateState(B){this.trigger("changeState",this,B)}updatePageIndex(B){this.trigger("flip",this,B)}updateOrientation(B){this.ui.setOrientationStyle(B),this.update(),this.trigger("changeOrientation",this,B)}getPageCount(){return this.pages.getPageCount()}getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}getPage(B){return this.pages.getPage(B)}getRender(){return this.render}getFlipController(){return this.flipController}getOrientation(){return this.render.getOrientation()}getBoundsRect(){return this.render.getRect()}getSettings(){return this.setting}getUI(){return this.ui}getState(){return this.flipController.getState()}getPageCollection(){return this.pages}startUserTouch(B){this.mousePosition=B,this.isUserTouch=!0,this.isUserMove=!1}userMove(B,a){this.isUserTouch||a||!this.setting.showPageCorners?this.isUserTouch&&ut.GetDistanceBetweenTwoPoint(this.mousePosition,B)>5&&(this.isUserMove=!0,this.flipController.fold(B)):this.flipController.showCorner(B)}userStop(B,a=!1){this.isUserTouch&&(this.isUserTouch=!1,a||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(B)))}},Object.defineProperty(Z,"__esModule",{value:!0})})})(qn,Le);const Gn=Ie({name:"the-book",props:{bookData:{type:Object,default:()=>({})},tab:{type:String,default:""},show:{type:Boolean,default:!1},rect:{type:Object,default:()=>({})}},emits:["close"],setup(E,{emit:O}){var _t,Ct,U,K;hi(),console.log(Ne.user.data.phone);const Z="lastTime"+((K=(U=(Ct=(_t=Ne)==null?void 0:_t.user)==null?void 0:Ct.data)==null?void 0:U.phone)!=null?K:""),et=ke({show:!1,width:0,height:0,transform:"",list:[],lastTime:localStorage.getItem(Z)}),J=ae(!1),Bt=async()=>{console.log("初始化完成")};let $=null,ut=null;const bt=()=>{window.$("#flipbook");const ht=document.body.clientHeight*.8;et.height=ht,et.width=ht*(210/297)*2;const at=document.getElementById("flipbook");$=new Le.PageFlip(at,{width:et.width/2,height:et.height,showCover:!0,maxShadowOpacity:.3}),$.loadFromHTML(document.querySelectorAll(".page"))},Pt=()=>{const ht=document.querySelector(".bookWrap");if(ht){const at=ht.getBoundingClientRect(),B=E.rect.width/(at.width/2),a=E.rect.height/at.height,h=(at.width/2*(B-1)+E.rect.x-at.x-E.rect.width)/B,y=(at.height*(a-1)/2+E.rect.y-at.y)/a,x=`scale3d(${B}, ${a}, 1) translate(${h}px, ${y}px)`;ht.style.transform=et.transform=x,ht.style.transition="transform 0s",ze(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{ht.style.transition="transform 1s",ht.style.transform="",et.show=!0,ut=setTimeout(()=>{},500),setTimeout(()=>{J.value=!0},1500)})})})}},nt=()=>{clearTimeout(ut);const ht=document.querySelector(".bookWrap");console.log("🚀 ~ pageFlip:",$),$.flip(0),ht&&(ht.style.transform=et.transform),O("close"),setTimeout(()=>{ht.style.transition="",ht.style.transform="",et.show=!1,et.list=[]},1e3)};Fe(async()=>{await Bt(),Wi("webViewOnResume",()=>{et.lastTime=localStorage.getItem(Z)})});const dt=()=>{var a;if(!((a=E.bookData)!=null&&a.lessonList))return;const ht=Math.floor((document.body.clientHeight*.8-40)/50);console.log("🚀 ~ step:",ht);const at=[];let B=[];for(let h=0;h<E.bookData.lessonList.length;h++){const y=E.bookData.lessonList[h];B.length>=ht?(at.push([...B]),B=[{name:y.name}]):B.push({name:y.name});for(let x=0;x<y.knowledgeList.length;x++)B.length>=ht?(at.push([...B]),B=[y.knowledgeList[x]]):B.push(y.knowledgeList[x])}B.length&&at.push(B),et.list=at};ji(()=>E.show,()=>{E.show&&(dt(),ze(()=>{bt(),ze(()=>{requestAnimationFrame(()=>{Pt()})})}))});const Et=ht=>{if(ht.id){if(!ht.containMaterial){Hi("暂无资源");return}localStorage.setItem(Z,ht.id);const at=en.stringify({id:ht.id,lessonCoursewareId:ht.lessonCoursewareId,lessonCoursewareDetailId:ht.lessonCoursewareDetailId,name:ht.name,tab:E.tab}),B=location.origin+location.pathname+"#/courseware-play?"+at;console.log("🚀 ~ url:",B),ui({api:"openWebView",content:{url:B,orientation:0,isHideTitle:!1,c_orientation:0}})}};return()=>H("div",{class:[Ut.book,et.show?"":Ut.bookHide]},[H("div",{class:Ut.back,onClick:nt},[H("img",{src:pi},null)]),H("div",{class:"bookWrap",style:{width:et.width+"px",height:et.height+"px"}},[!!et.list.length&&H("div",{id:"flipbook",class:[et.show&&"animated"]},[H("div",{class:"page coverImg","data-density":"hard"},[H("img",{style:"width: 100%; height: 100%; object-fit: cover;",src:E.bookData.coverImg},null)]),et.list.map(ht=>H("div",{class:"page"},[H("div",{class:Ut.wrap},[H("div",{class:Ut.wrapItem},[ht.map((at,B)=>H(Ue,null,[H("div",{class:[Ut.item,at.id&&Ut.des],onTouchstart:a=>{a.stopPropagation()},onClick:a=>{a.stopPropagation(),Et(at)}},[at.id?H("img",{id:B==1?"coursewareDetail-0":"",class:Ut.icon,src:Hn},null):null,H("div",{class:Ut.name,style:{lineHeight:"20Px"}},[at.name,et.lastTime===at.id&&H("span",{class:Ut.last},[Ot("上次观看")])])])]))])])])),et.list.length%2===1&&H("div",{class:"page","data-density":"hard"},[H("div",{class:Ut.wrap},[H("div",{class:Ut.wrapItem},null)])])])]),J.value?H(zn,null,null):null])}}),Vn=Ie({name:"courseware-list",emits:["close"],setup(E,{emit:O}){const Z=ke({box:{},show:!1,steps:[{ele:"",eleRect:{},img:me("courseware-list1.png"),handStyle:{top:"1.5rem",left:"3.5rem",transform:"rotate(-90deg)"},imgStyle:{top:".7rem",left:"5rem"},btnsStyle:{top:"3.5rem",left:"6.2rem"},boxStyle:{},eleRectPadding:{left:-4,top:-4,width:-8,height:-8}},{ele:"",img:me("courseware-list2.png"),handStyle:{top:"-.25rem",left:"1.38rem",transform:"rotate(-90deg)"},imgStyle:{top:"-1.2rem",left:"2.4rem"},btnsStyle:{top:"1.6rem",left:"3.6rem"},eleRectPadding:{left:4,top:4,width:8,height:8}},{ele:"",img:me("courseware-list3.png"),handStyle:{bottom:"-2.1rem",left:"0.66rem"},imgStyle:{top:"1.1rem",left:"-2rem"},btnsStyle:{top:"4.2rem",left:"-0.5rem"},eleRectPadding:{left:4,top:4,width:8,height:8}},{ele:"",img:me("courseware-list4.png"),handStyle:{top:".8rem",left:"1rem"},imgStyle:{top:"1.1rem",left:"-4.6rem"},btnsStyle:{top:"4rem",left:"-4.5rem","justify-content":"center",padding:0}}],step:0}),et=ae(!1),J=ae({});(async()=>{var nt;try{const dt=await ci({guideTag:"guideInfo"});dt.data?J.value=JSON.parse((nt=dt.data)==null?void 0:nt.guideValue)||null:J.value={},J.value&&J.value.courseware?et.value=!1:et.value=!0}catch(dt){console.log(dt)}})();const $=()=>{var dt,Et,_t,Ct;const nt=document.getElementById(`courseware-${Z.step}`);if(nt){const U=nt.getBoundingClientRect(),K=((dt=Z.steps[Z.step].eleRectPadding)==null?void 0:dt.left)||0,ht=((Et=Z.steps[Z.step].eleRectPadding)==null?void 0:Et.top)||0,at=((_t=Z.steps[Z.step].eleRectPadding)==null?void 0:_t.width)||0,B=((Ct=Z.steps[Z.step].eleRectPadding)==null?void 0:Ct.height)||0;Z.box={left:U.x-K+"px",top:U.y-ht+"px",width:U.width+at+"px",height:U.height+B+"px"}}else bt()};Fe(()=>{$(),window.addEventListener("resize",ut)});const ut=()=>{$()};li(()=>{window.removeEventListener("resize",ut)});const bt=()=>{if(Z.step>=3){Pt();return}Z.step=Z.step+1,$()},Pt=async()=>{J.value?J.value.courseware=!0:J.value={courseware:!0};try{const nt=await di({guideTag:"guideInfo",guideValue:JSON.stringify(J.value)})}catch(nt){console.log(nt)}et.value=!1};return()=>H(Ve,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",kt.guidePopup],show:et.value,"onUpdate:show":nt=>et.value=nt},{default:()=>[H("div",{class:kt.content,onClick:()=>bt()},[Z.step!=Z.steps.length-1&&H("div",{class:kt.backBtn,onClick:nt=>{nt.stopPropagation(),Pt()}},[Ot("跳过")]),H("div",{class:kt.box,style:{...Z.box,...Z.steps[Z.step].boxStyle},id:`modeType-${Z.step}`},[Z.steps.map((nt,dt)=>{var Et,_t;return H("div",{onClick:Ct=>Ct.stopPropagation(),class:kt.item,style:{display:dt===Z.step?"":"none",left:`${(Et=nt.eleRect)==null?void 0:Et.left}px`,top:`${(_t=nt.eleRect)==null?void 0:_t.top}px`}},[H("img",{class:kt.img,style:nt.imgStyle,src:nt.img},null),H("img",{class:kt.iconHead,style:nt.handStyle,src:me("indexDot.png")},null),H("div",{class:kt.btns,style:nt.btnsStyle},[Z.step+1==Z.steps.length?H(Ue,null,[H(ce,{class:[kt.btn],round:!0,type:"primary",onClick:()=>Pt()},{default:()=>[Ot("完成")]}),H(ce,{class:[kt.btn,kt.endBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{Z.step=0,$()}},{default:()=>[Ot("再看一遍")]})]):H(ce,{class:kt.btn,round:!0,type:"primary",onClick:()=>bt()},{default:()=>[Ot("下一步 ("),Z.step+1,Ot("/"),Z.steps.length,Ot(")")]})])])})])])]})}});/*! jQuery v1.7 jquery.com | jquery.org/license */(function(E,O){function Z(t){return e.isWindow(t)?t:t.nodeType===9?t.defaultView||t.parentWindow:!1}function et(t){if(!je[t]){var i=j.body,n=e("<"+t+">").appendTo(i),s=n.css("display");n.remove(),(s==="none"||s==="")&&(Jt||(Jt=j.createElement("iframe"),Jt.frameBorder=Jt.width=Jt.height=0),i.appendChild(Jt),(!Te||!Jt.createElement)&&(Te=(Jt.contentWindow||Jt.contentDocument).document,Te.write((j.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),Te.close()),n=Te.createElement(t),Te.body.appendChild(n),s=e.css(n,"display"),i.removeChild(Jt)),je[t]=s}return je[t]}function J(t,i){var n={};return e.each(ni.concat.apply([],ni.slice(0,i)),function(){n[this]=t}),n}function Bt(){Ee=O}function $(){return setTimeout(Bt,0),Ee=e.now()}function ut(){try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function bt(){try{return new E.XMLHttpRequest}catch(t){}}function Pt(t,i){t.dataFilter&&(i=t.dataFilter(i,t.dataType));var n=t.dataTypes,s={},l,u,d=n.length,p,w=n[0],S,b,P,A,N;for(l=1;l<d;l++){if(l===1)for(u in t.converters)typeof u=="string"&&(s[u.toLowerCase()]=t.converters[u]);if(S=w,w=n[l],w==="*")w=S;else if(S!=="*"&&S!==w){if(b=S+" "+w,P=s[b]||s["* "+w],!P){N=O;for(A in s)if(p=A.split(" "),(p[0]===S||p[0]==="*")&&(N=s[p[1]+" "+w],N)){A=s[A],A===!0?P=N:N===!0&&(P=A);break}}!P&&!N&&e.error("No conversion from "+b.replace(" "," to ")),P!==!0&&(i=P?P(i):N(A(i)))}}return i}function nt(t,i,n){var s=t.contents,l=t.dataTypes,u=t.responseFields,d,p,w,S;for(p in u)p in n&&(i[u[p]]=n[p]);for(;l[0]==="*";)l.shift(),d===O&&(d=t.mimeType||i.getResponseHeader("content-type"));if(d){for(p in s)if(s[p]&&s[p].test(d)){l.unshift(p);break}}if(l[0]in n)w=l[0];else{for(p in n){if(!l[0]||t.converters[p+" "+l[0]]){w=p;break}S||(S=p)}w=w||S}if(w)return w!==l[0]&&l.unshift(w),n[w]}function dt(t,i,n,s){if(e.isArray(i))e.each(i,function(u,d){n||Si.test(t)?s(t,d):dt(t+"["+(typeof d=="object"||e.isArray(d)?u:"")+"]",d,n,s)});else if(!n&&i!=null&&typeof i=="object")for(var l in i)dt(t+"["+l+"]",i[l],n,s);else s(t,i)}function Et(t,i){var n,s,l=e.ajaxSettings.flatOptions||{};for(n in i)i[n]!==O&&((l[n]?t:s||(s={}))[n]=i[n]);s&&e.extend(!0,t,s)}function _t(t,i,n,s,l,u){l=l||i.dataTypes[0],u=u||{},u[l]=!0;for(var d=t[l],p=0,w=d?d.length:0,S=t===Be,b;p<w&&(S||!b);p++)b=d[p](i,n,s),typeof b=="string"&&(!S||u[b]?b=O:(i.dataTypes.unshift(b),b=_t(t,i,n,s,b,u)));return(S||!b)&&!u["*"]&&(b=_t(t,i,n,s,"*",u)),b}function Ct(t){return function(i,n){if(typeof i!="string"&&(n=i,i="*"),e.isFunction(n))for(var s=i.toLowerCase().split(Qe),l=0,u=s.length,d,p,w;l<u;l++)d=s[l],w=/^\+/.test(d),w&&(d=d.substr(1)||"*"),p=t[d]=t[d]||[],p[w?"unshift":"push"](n)}}function U(t,i,n){var s=i==="width"?t.offsetWidth:t.offsetHeight,l=i==="width"?xi:bi;return s>0?(n!=="border"&&e.each(l,function(){n||(s-=parseFloat(e.css(t,"padding"+this))||0),n==="margin"?s+=parseFloat(e.css(t,n+this))||0:s-=parseFloat(e.css(t,"border"+this+"Width"))||0}),s+"px"):(s=Pe(t,i,i),(s<0||s==null)&&(s=t.style[i]||0),s=parseFloat(s)||0,n&&e.each(l,function(){s+=parseFloat(e.css(t,"padding"+this))||0,n!=="padding"&&(s+=parseFloat(e.css(t,"border"+this+"Width"))||0),n==="margin"&&(s+=parseFloat(e.css(t,n+this))||0)}),s+"px")}function K(t,i){i.src?e.ajax({url:i.src,async:!1,dataType:"script"}):e.globalEval((i.text||i.textContent||i.innerHTML||"").replace(oe,"/*$0*/")),i.parentNode&&i.parentNode.removeChild(i)}function ht(t){var i=(t.nodeName||"").toLowerCase();i==="input"?at(t):i!=="script"&&typeof t.getElementsByTagName<"u"&&e.grep(t.getElementsByTagName("input"),at)}function at(t){(t.type==="checkbox"||t.type==="radio")&&(t.defaultChecked=t.checked)}function B(t){return typeof t.getElementsByTagName<"u"?t.getElementsByTagName("*"):typeof t.querySelectorAll<"u"?t.querySelectorAll("*"):[]}function a(t,i){var n;i.nodeType===1&&(i.clearAttributes&&i.clearAttributes(),i.mergeAttributes&&i.mergeAttributes(t),n=i.nodeName.toLowerCase(),n==="object"?i.outerHTML=t.outerHTML:n!=="input"||t.type!=="checkbox"&&t.type!=="radio"?n==="option"?i.selected=t.defaultSelected:(n==="input"||n==="textarea")&&(i.defaultValue=t.defaultValue):(t.checked&&(i.defaultChecked=i.checked=t.checked),i.value!==t.value&&(i.value=t.value)),i.removeAttribute(e.expando))}function h(t,i){if(i.nodeType===1&&e.hasData(t)){var n,s,l,u=e._data(t),d=e._data(i,u),p=u.events;if(p){delete d.handle,d.events={};for(n in p)for(s=0,l=p[n].length;s<l;s++)e.event.add(i,n+(p[n][s].namespace?".":"")+p[n][s].namespace,p[n][s],p[n][s].data)}d.data&&(d.data=e.extend({},d.data))}}function y(t,i){return e.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function x(t){var i=le.split(" "),n=t.createDocumentFragment();if(n.createElement)for(;i.length;)n.createElement(i.pop());return n}function k(t,i,n){if(i=i||0,e.isFunction(i))return e.grep(t,function(l,u){var d=!!i.call(l,u,l);return d===n});if(i.nodeType)return e.grep(t,function(l,u){return l===i===n});if(typeof i=="string"){var s=e.grep(t,function(l){return l.nodeType===1});if(xe.test(i))return e.filter(i,s,!n);i=e.filter(i,s)}return e.grep(t,function(l,u){return e.inArray(l,i)>=0===n})}function F(t){return!t||!t.parentNode||t.parentNode.nodeType===11}function tt(){return!0}function st(){return!1}function yt(t,i,n){var s=i+"defer",l=i+"queue",u=i+"mark",d=e._data(t,s);d&&(n==="queue"||!e._data(t,l))&&(n==="mark"||!e._data(t,u))&&setTimeout(function(){!e._data(t,l)&&!e._data(t,u)&&(e.removeData(t,s,!0),d.fire())},0)}function xt(t){for(var i in t)if(!(i==="data"&&e.isEmptyObject(t[i]))&&i!=="toJSON")return!1;return!0}function At(t,i,n){if(n===O&&t.nodeType===1){var s="data-"+i.replace(V,"-$1").toLowerCase();if(n=t.getAttribute(s),typeof n=="string"){try{n=n==="true"?!0:n==="false"?!1:n==="null"?null:e.isNumeric(n)?parseFloat(n):_.test(n)?e.parseJSON(n):n}catch(l){}e.data(t,i,n)}else n=O}return n}function Xt(t){var i=f[t]={},n,s;for(t=t.split(/\s+/),n=0,s=t.length;n<s;n++)i[t[n]]=!0;return i}var j=E.document,r=E.navigator,o=E.location,e=function(){function t(){if(!i.isReady){try{j.documentElement.doScroll("left")}catch(g){setTimeout(t,1);return}i.ready()}}var i=function(g,I){return new i.fn.init(g,I,l)},n=E.jQuery,s=E.$,l,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,d=/\S/,p=/^\s+/,w=/\s+$/,S=/\d/,b=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=/^[\],:{}\s]*$/,A=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,N=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,W=/(?:^|:|,)(?:\s*\[)+/g,Q=/(webkit)[ \/]([\w.]+)/,lt=/(opera)(?:.*version)?[ \/]([\w.]+)/,ot=/(msie) ([\w.]+)/,Lt=/(mozilla)(?:.*? rv:([\w.]+))?/,It=/-([a-z]|[0-9])/ig,it=/^-ms-/,c=function(g,I){return(I+"").toUpperCase()},m=r.userAgent,T,C,M,D=Object.prototype.toString,R=Object.prototype.hasOwnProperty,G=Array.prototype.push,z=Array.prototype.slice,Y=String.prototype.trim,Wt=Array.prototype.indexOf,Dt={};return i.fn=i.prototype={constructor:i,init:function(g,I,q){var L,ct,pt,gt;if(!g)return this;if(g.nodeType)return this.context=this[0]=g,this.length=1,this;if(g==="body"&&!I&&j.body)return this.context=j,this[0]=j.body,this.selector=g,this.length=1,this;if(typeof g=="string"){if(g.charAt(0)!=="<"||g.charAt(g.length-1)!==">"||g.length<3?L=u.exec(g):L=[null,g,null],L&&(L[1]||!I)){if(L[1])return I=I instanceof i?I[0]:I,gt=I?I.ownerDocument||I:j,pt=b.exec(g),pt?i.isPlainObject(I)?(g=[j.createElement(pt[1])],i.fn.attr.call(g,I,!0)):g=[gt.createElement(pt[1])]:(pt=i.buildFragment([L[1]],[gt]),g=(pt.cacheable?i.clone(pt.fragment):pt.fragment).childNodes),i.merge(this,g);if(ct=j.getElementById(L[2]),ct&&ct.parentNode){if(ct.id!==L[2])return q.find(g);this.length=1,this[0]=ct}return this.context=j,this.selector=g,this}return!I||I.jquery?(I||q).find(g):this.constructor(I).find(g)}return i.isFunction(g)?q.ready(g):(g.selector!==O&&(this.selector=g.selector,this.context=g.context),i.makeArray(g,this))},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return z.call(this,0)},get:function(g){return g==null?this.toArray():g<0?this[this.length+g]:this[g]},pushStack:function(g,I,q){var L=this.constructor();return i.isArray(g)?G.apply(L,g):i.merge(L,g),L.prevObject=this,L.context=this.context,I==="find"?L.selector=this.selector+(this.selector?" ":"")+q:I&&(L.selector=this.selector+"."+I+"("+q+")"),L},each:function(g,I){return i.each(this,g,I)},ready:function(g){return i.bindReady(),C.add(g),this},eq:function(g){return g===-1?this.slice(g):this.slice(g,+g+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(z.apply(this,arguments),"slice",z.call(arguments).join(","))},map:function(g){return this.pushStack(i.map(this,function(I,q){return g.call(I,q,I)}))},end:function(){return this.prevObject||this.constructor(null)},push:G,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var g,I,q,L,ct,pt,gt=arguments[0]||{},jt=1,Yt=arguments.length,He=!1;for(typeof gt=="boolean"&&(He=gt,gt=arguments[1]||{},jt=2),typeof gt!="object"&&!i.isFunction(gt)&&(gt={}),Yt===jt&&(gt=this,--jt);jt<Yt;jt++)if((g=arguments[jt])!=null)for(I in g)q=gt[I],L=g[I],gt!==L&&(He&&L&&(i.isPlainObject(L)||(ct=i.isArray(L)))?(ct?(ct=!1,pt=q&&i.isArray(q)?q:[]):pt=q&&i.isPlainObject(q)?q:{},gt[I]=i.extend(He,pt,L)):L!==O&&(gt[I]=L));return gt},i.extend({noConflict:function(g){return E.$===i&&(E.$=s),g&&E.jQuery===i&&(E.jQuery=n),i},isReady:!1,readyWait:1,holdReady:function(g){g?i.readyWait++:i.ready(!0)},ready:function(g){if(g===!0&&!--i.readyWait||g!==!0&&!i.isReady){if(!j.body)return setTimeout(i.ready,1);if(i.isReady=!0,g!==!0&&--i.readyWait>0)return;C.fireWith(j,[i]),i.fn.trigger&&i(j).trigger("ready").unbind("ready")}},bindReady:function(){if(!C){if(C=i.Callbacks("once memory"),j.readyState==="complete")return setTimeout(i.ready,1);if(j.addEventListener)j.addEventListener("DOMContentLoaded",M,!1),E.addEventListener("load",i.ready,!1);else if(j.attachEvent){j.attachEvent("onreadystatechange",M),E.attachEvent("onload",i.ready);var g=!1;try{g=E.frameElement==null}catch(I){}j.documentElement.doScroll&&g&&t()}}},isFunction:function(g){return i.type(g)==="function"},isArray:Array.isArray||function(g){return i.type(g)==="array"},isWindow:function(g){return g&&typeof g=="object"&&"setInterval"in g},isNumeric:function(g){return g!=null&&S.test(g)&&!isNaN(g)},type:function(g){return g==null?String(g):Dt[D.call(g)]||"object"},isPlainObject:function(g){if(!g||i.type(g)!=="object"||g.nodeType||i.isWindow(g))return!1;try{if(g.constructor&&!R.call(g,"constructor")&&!R.call(g.constructor.prototype,"isPrototypeOf"))return!1}catch(q){return!1}var I;for(I in g);return I===O||R.call(g,I)},isEmptyObject:function(g){for(var I in g)return!1;return!0},error:function(g){throw g},parseJSON:function(g){if(typeof g!="string"||!g)return null;if(g=i.trim(g),E.JSON&&E.JSON.parse)return E.JSON.parse(g);if(P.test(g.replace(A,"@").replace(N,"]").replace(W,"")))return new Function("return "+g)();i.error("Invalid JSON: "+g)},parseXML:function(g){var I,q;try{E.DOMParser?(q=new DOMParser,I=q.parseFromString(g,"text/xml")):(I=new ActiveXObject("Microsoft.XMLDOM"),I.async="false",I.loadXML(g))}catch(L){I=O}return(!I||!I.documentElement||I.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+g),I},noop:function(){},globalEval:function(g){g&&d.test(g)&&(E.execScript||function(I){E.eval.call(E,I)})(g)},camelCase:function(g){return g.replace(it,"ms-").replace(It,c)},nodeName:function(g,I){return g.nodeName&&g.nodeName.toUpperCase()===I.toUpperCase()},each:function(g,I,q){var L,ct=0,pt=g.length,gt=pt===O||i.isFunction(g);if(q)if(gt){for(L in g)if(I.apply(g[L],q)===!1)break}else for(;ct<pt&&I.apply(g[ct++],q)!==!1;);else if(gt){for(L in g)if(I.call(g[L],L,g[L])===!1)break}else for(;ct<pt&&I.call(g[ct],ct,g[ct++])!==!1;);return g},trim:Y?function(g){return g==null?"":Y.call(g)}:function(g){return g==null?"":(g+"").replace(p,"").replace(w,"")},makeArray:function(g,I){var q=I||[];if(g!=null){var L=i.type(g);g.length==null||L==="string"||L==="function"||L==="regexp"||i.isWindow(g)?G.call(q,g):i.merge(q,g)}return q},inArray:function(g,I,q){var L;if(I){if(Wt)return Wt.call(I,g,q);for(L=I.length,q=q?q<0?Math.max(0,L+q):q:0;q<L;q++)if(q in I&&I[q]===g)return q}return-1},merge:function(g,I){var q=g.length,L=0;if(typeof I.length=="number")for(var ct=I.length;L<ct;L++)g[q++]=I[L];else for(;I[L]!==O;)g[q++]=I[L++];return g.length=q,g},grep:function(g,I,q){var L=[],ct;q=!!q;for(var pt=0,gt=g.length;pt<gt;pt++)ct=!!I(g[pt],pt),q!==ct&&L.push(g[pt]);return L},map:function(g,I,q){var L,ct,pt=[],gt=0,jt=g.length,Yt=g instanceof i||jt!==O&&typeof jt=="number"&&(jt>0&&g[0]&&g[jt-1]||jt===0||i.isArray(g));if(Yt)for(;gt<jt;gt++)L=I(g[gt],gt,q),L!=null&&(pt[pt.length]=L);else for(ct in g)L=I(g[ct],ct,q),L!=null&&(pt[pt.length]=L);return pt.concat.apply([],pt)},guid:1,proxy:function(g,I){if(typeof I=="string"){var q=g[I];I=g,g=q}if(!i.isFunction(g))return O;var L=z.call(arguments,2),ct=function(){return g.apply(I,L.concat(z.call(arguments)))};return ct.guid=g.guid=g.guid||ct.guid||i.guid++,ct},access:function(g,I,q,L,ct,pt){var gt=g.length;if(typeof I=="object"){for(var jt in I)i.access(g,jt,I[jt],L,ct,q);return g}if(q!==O){L=!pt&&L&&i.isFunction(q);for(var Yt=0;Yt<gt;Yt++)ct(g[Yt],I,L?q.call(g[Yt],Yt,ct(g[Yt],I)):q,pt);return g}return gt?ct(g[0],I):O},now:function(){return new Date().getTime()},uaMatch:function(g){g=g.toLowerCase();var I=Q.exec(g)||lt.exec(g)||ot.exec(g)||g.indexOf("compatible")<0&&Lt.exec(g)||[];return{browser:I[1]||"",version:I[2]||"0"}},sub:function(){function g(q,L){return new g.fn.init(q,L)}i.extend(!0,g,this),g.superclass=this,g.fn=g.prototype=this(),g.fn.constructor=g,g.sub=this.sub,g.fn.init=function(q,L){return L&&L instanceof i&&!(L instanceof g)&&(L=g(L)),i.fn.init.call(this,q,L,I)},g.fn.init.prototype=g.fn;var I=g(j);return g},browser:{}}),i.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(g,I){Dt["[object "+I+"]"]=I.toLowerCase()}),T=i.uaMatch(m),T.browser&&(i.browser[T.browser]=!0,i.browser.version=T.version),i.browser.webkit&&(i.browser.safari=!0),d.test(" ")&&(p=/^[\s\xA0]+/,w=/[\s\xA0]+$/),l=i(j),j.addEventListener?M=function(){j.removeEventListener("DOMContentLoaded",M,!1),i.ready()}:j.attachEvent&&(M=function(){j.readyState==="complete"&&(j.detachEvent("onreadystatechange",M),i.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i}),i}(),f={};e.Callbacks=function(t){t=t?f[t]||Xt(t):{};var i=[],n=[],s,l,u,d,p,w=function(P){var A,N,W,Q;for(A=0,N=P.length;A<N;A++)W=P[A],Q=e.type(W),Q==="array"?w(W):Q==="function"&&(!t.unique||!b.has(W))&&i.push(W)},S=function(P,A){for(A=A||[],s=!t.memory||[P,A],l=!0,p=u||0,u=0,d=i.length;i&&p<d;p++)if(i[p].apply(P,A)===!1&&t.stopOnFalse){s=!0;break}l=!1,i&&(t.once?s===!0?b.disable():i=[]:n&&n.length&&(s=n.shift(),b.fireWith(s[0],s[1])))},b={add:function(){if(i){var P=i.length;w(arguments),l?d=i.length:s&&s!==!0&&(u=P,S(s[0],s[1]))}return this},remove:function(){if(i)for(var P=arguments,A=0,N=P.length;A<N;A++)for(var W=0;W<i.length&&!(P[A]===i[W]&&(l&&W<=d&&(d--,W<=p&&p--),i.splice(W--,1),t.unique));W++);return this},has:function(P){if(i){for(var A=0,N=i.length;A<N;A++)if(P===i[A])return!0}return!1},empty:function(){return i=[],this},disable:function(){return i=n=s=O,this},disabled:function(){return!i},lock:function(){return n=O,(!s||s===!0)&&b.disable(),this},locked:function(){return!n},fireWith:function(P,A){return n&&(l?t.once||n.push([P,A]):(!t.once||!s)&&S(P,A)),this},fire:function(){return b.fireWith(this,arguments),this},fired:function(){return!!s}};return b};var v=[].slice;e.extend({Deferred:function(t){var i=e.Callbacks("once memory"),n=e.Callbacks("once memory"),s=e.Callbacks("memory"),l="pending",u={resolve:i,reject:n,notify:s},d={done:i.add,fail:n.add,progress:s.add,state:function(){return l},isResolved:i.fired,isRejected:n.fired,then:function(S,b,P){return p.done(S).fail(b).progress(P),this},always:function(){return p.done.apply(p,arguments).fail.apply(p,arguments)},pipe:function(S,b,P){return e.Deferred(function(A){e.each({done:[S,"resolve"],fail:[b,"reject"],progress:[P,"notify"]},function(N,W){var Q=W[0],lt=W[1],ot;e.isFunction(Q)?p[N](function(){ot=Q.apply(this,arguments),ot&&e.isFunction(ot.promise)?ot.promise().then(A.resolve,A.reject,A.notify):A[lt+"With"](this===p?A:this,[ot])}):p[N](A[lt])})}).promise()},promise:function(S){if(S==null)S=d;else for(var b in d)S[b]=d[b];return S}},p=d.promise({}),w;for(w in u)p[w]=u[w].fire,p[w+"With"]=u[w].fireWith;return p.done(function(){l="resolved"},n.disable,s.lock).fail(function(){l="rejected"},i.disable,s.lock),t&&t.call(p,p),p},when:function(t){function i(b){return function(P){d[b]=arguments.length>1?v.call(arguments,0):P,w.notifyWith(S,d)}}function n(b){return function(P){s[b]=arguments.length>1?v.call(arguments,0):P,--p||w.resolveWith(w,s)}}var s=v.call(arguments,0),l=0,u=s.length,d=Array(u),p=u,w=u<=1&&t&&e.isFunction(t.promise)?t:e.Deferred(),S=w.promise();if(u>1){for(;l<u;l++)s[l]&&s[l].promise&&e.isFunction(s[l].promise)?s[l].promise().then(n(l),w.reject,i(l)):--p;p||w.resolveWith(w,s)}else w!==t&&w.resolveWith(w,u?[t]:[]);return S}}),e.support=function(){var t=j.createElement("div"),i=j.documentElement,n,s,l,u,d,p,w,S,b,P,A,N,W,Q,lt,ot;if(t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",n=t.getElementsByTagName("*"),s=t.getElementsByTagName("a")[0],!n||!n.length||!s)return{};l=j.createElement("select"),u=l.appendChild(j.createElement("option")),d=t.getElementsByTagName("input")[0],w={leadingWhitespace:t.firstChild.nodeType===3,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(s.getAttribute("style")),hrefNormalized:s.getAttribute("href")==="/a",opacity:/^0.55/.test(s.style.opacity),cssFloat:!!s.style.cssFloat,unknownElems:!!t.getElementsByTagName("nav").length,checkOn:d.value==="on",optSelected:u.selected,getSetAttribute:t.className!=="t",enctype:!!j.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},d.checked=!0,w.noCloneChecked=d.cloneNode(!0).checked,l.disabled=!0,w.optDisabled=!u.disabled;try{delete t.test}catch(Lt){w.deleteExpando=!1}!t.addEventListener&&t.attachEvent&&t.fireEvent&&(t.attachEvent("onclick",function(){w.noCloneEvent=!1}),t.cloneNode(!0).fireEvent("onclick")),d=j.createElement("input"),d.value="t",d.setAttribute("type","radio"),w.radioValue=d.value==="t",d.setAttribute("checked","checked"),t.appendChild(d),S=j.createDocumentFragment(),S.appendChild(t.lastChild),w.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",t.style.width=t.style.paddingLeft="1px",b=j.getElementsByTagName("body")[0],A=j.createElement(b?"div":"body"),N={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&e.extend(N,{position:"absolute",left:"-999px",top:"-999px"});for(lt in N)A.style[lt]=N[lt];if(A.appendChild(t),P=b||i,P.insertBefore(A,P.firstChild),w.appendChecked=d.checked,w.boxModel=t.offsetWidth===2,"zoom"in t.style&&(t.style.display="inline",t.style.zoom=1,w.inlineBlockNeedsLayout=t.offsetWidth===2,t.style.display="",t.innerHTML="<div style='width:4px;'></div>",w.shrinkWrapBlocks=t.offsetWidth!==2),t.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",W=t.getElementsByTagName("td"),ot=W[0].offsetHeight===0,W[0].style.display="",W[1].style.display="none",w.reliableHiddenOffsets=ot&&W[0].offsetHeight===0,t.innerHTML="",j.defaultView&&j.defaultView.getComputedStyle&&(p=j.createElement("div"),p.style.width="0",p.style.marginRight="0",t.appendChild(p),w.reliableMarginRight=(parseInt((j.defaultView.getComputedStyle(p,null)||{marginRight:0}).marginRight,10)||0)===0),t.attachEvent)for(lt in{submit:1,change:1,focusin:1})Q="on"+lt,ot=Q in t,ot||(t.setAttribute(Q,"return;"),ot=typeof t[Q]=="function"),w[lt+"Bubbles"]=ot;return e(function(){var Lt,It,it,c,m,T=1,C="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",M="visibility:hidden;border:0;",D="style='"+C+"border:5px solid #000;padding:0;'",R="<div "+D+"><div></div></div><table "+D+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";b=j.getElementsByTagName("body")[0],!b||(Lt=j.createElement("div"),Lt.style.cssText=M+"width:0;height:0;position:static;top:0;margin-top:"+T+"px",b.insertBefore(Lt,b.firstChild),A=j.createElement("div"),A.style.cssText=C+M,A.innerHTML=R,Lt.appendChild(A),It=A.firstChild,it=It.firstChild,c=It.nextSibling.firstChild.firstChild,m={doesNotAddBorder:it.offsetTop!==5,doesAddBorderForTableAndCells:c.offsetTop===5},it.style.position="fixed",it.style.top="20px",m.fixedPosition=it.offsetTop===20||it.offsetTop===15,it.style.position=it.style.top="",It.style.overflow="hidden",It.style.position="relative",m.subtractsBorderForOverflowNotVisible=it.offsetTop===-5,m.doesNotIncludeMarginInBodyOffset=b.offsetTop!==T,b.removeChild(Lt),A=Lt=null,e.extend(w,m))}),A.innerHTML="",P.removeChild(A),A=S=l=u=b=p=t=d=null,w}(),e.boxModel=e.support.boxModel;var _=/^(?:\{.*\}|\[.*\])$/,V=/([A-Z])/g;e.extend({cache:{},uuid:0,expando:"jQuery"+(e.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(t){return t=t.nodeType?e.cache[t[e.expando]]:t[e.expando],!!t&&!xt(t)},data:function(t,i,n,s){if(e.acceptData(t)){var l,u,d;e.expando;var p=typeof i=="string",w=t.nodeType,S=w?e.cache:t,b=w?t[e.expando]:t[e.expando]&&e.expando,P=i==="events";return(!b||!S[b]||!P&&!s&&!S[b].data)&&p&&n===O?void 0:(b||(w?t[e.expando]=b=++e.uuid:b=e.expando),S[b]||(S[b]={},w||(S[b].toJSON=e.noop)),(typeof i=="object"||typeof i=="function")&&(s?S[b]=e.extend(S[b],i):S[b].data=e.extend(S[b].data,i)),l=u=S[b],s||(u.data||(u.data={}),u=u.data),n!==O&&(u[e.camelCase(i)]=n),P&&!u[i]?l.events:(p?(d=u[i],d==null&&(d=u[e.camelCase(i)])):d=u,d))}},removeData:function(t,i,n){if(e.acceptData(t)){var s,l,u;e.expando;var d=t.nodeType,p=d?e.cache:t,w=d?t[e.expando]:e.expando;if(!p[w])return;if(i&&(s=n?p[w]:p[w].data,s)){for(e.isArray(i)?i=i:(i in s)?i=[i]:(i=e.camelCase(i),i in s?i=[i]:i=i.split(" ")),l=0,u=i.length;l<u;l++)delete s[i[l]];if(!(n?xt:e.isEmptyObject)(s))return}if(!n&&(delete p[w].data,!xt(p[w])))return;e.support.deleteExpando||!p.setInterval?delete p[w]:p[w]=null,d&&(e.support.deleteExpando?delete t[e.expando]:t.removeAttribute?t.removeAttribute(e.expando):t[e.expando]=null)}},_data:function(t,i,n){return e.data(t,i,n,!0)},acceptData:function(t){if(t.nodeName){var i=e.noData[t.nodeName.toLowerCase()];if(i)return i!==!0&&t.getAttribute("classid")===i}return!0}}),e.fn.extend({data:function(t,i){var n,s,l,u=null;if(typeof t>"u"){if(this.length&&(u=e.data(this[0]),this[0].nodeType===1&&!e._data(this[0],"parsedAttrs"))){s=this[0].attributes;for(var d=0,p=s.length;d<p;d++)l=s[d].name,l.indexOf("data-")===0&&(l=e.camelCase(l.substring(5)),At(this[0],l,u[l]));e._data(this[0],"parsedAttrs",!0)}return u}return typeof t=="object"?this.each(function(){e.data(this,t)}):(n=t.split("."),n[1]=n[1]?"."+n[1]:"",i===O?(u=this.triggerHandler("getData"+n[1]+"!",[n[0]]),u===O&&this.length&&(u=e.data(this[0],t),u=At(this[0],t,u)),u===O&&n[1]?this.data(n[0]):u):this.each(function(){var w=e(this),S=[n[0],i];w.triggerHandler("setData"+n[1]+"!",S),e.data(this,t,i),w.triggerHandler("changeData"+n[1]+"!",S)}))},removeData:function(t){return this.each(function(){e.removeData(this,t)})}}),e.extend({_mark:function(t,i){t&&(i=(i||"fx")+"mark",e._data(t,i,(e._data(t,i)||0)+1))},_unmark:function(t,i,n){if(t!==!0&&(n=i,i=t,t=!1),i){n=n||"fx";var s=n+"mark",l=t?0:(e._data(i,s)||1)-1;l?e._data(i,s,l):(e.removeData(i,s,!0),yt(i,n,"mark"))}},queue:function(t,i,n){var s;if(t)return i=(i||"fx")+"queue",s=e._data(t,i),n&&(!s||e.isArray(n)?s=e._data(t,i,e.makeArray(n)):s.push(n)),s||[]},dequeue:function(t,i){i=i||"fx";var n=e.queue(t,i),s=n.shift(),l={};s==="inprogress"&&(s=n.shift()),s&&(i==="fx"&&n.unshift("inprogress"),e._data(t,i+".run",l),s.call(t,function(){e.dequeue(t,i)},l)),n.length||(e.removeData(t,i+"queue "+i+".run",!0),yt(t,i,"queue"))}}),e.fn.extend({queue:function(t,i){return typeof t!="string"&&(i=t,t="fx"),i===O?e.queue(this[0],t):this.each(function(){var n=e.queue(this,t,i);t==="fx"&&n[0]!=="inprogress"&&e.dequeue(this,t)})},dequeue:function(t){return this.each(function(){e.dequeue(this,t)})},delay:function(t,i){return t=e.fx&&e.fx.speeds[t]||t,i=i||"fx",this.queue(i,function(n,s){var l=setTimeout(n,t);s.stop=function(){clearTimeout(l)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,i){function n(){--d||s.resolveWith(l,[l])}typeof t!="string"&&(t=O),t=t||"fx";for(var s=e.Deferred(),l=this,u=l.length,d=1,p=t+"defer",w=t+"queue",S=t+"mark",b;u--;)(b=e.data(l[u],p,O,!0)||(e.data(l[u],w,O,!0)||e.data(l[u],S,O,!0))&&e.data(l[u],p,e.Callbacks("once memory"),!0))&&(d++,b.add(n));return n(),s.promise()}});var X=/[\n\t\r]/g,rt=/\s+/,ft=/\r/g,wt=/^(?:button|input)$/i,St=/^(?:button|input|object|select|textarea)$/i,qt=/^a(?:rea)?$/i,zt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Ft=e.support.getSetAttribute,Nt,Zt,Kt;e.fn.extend({attr:function(t,i){return e.access(this,t,i,!0,e.attr)},removeAttr:function(t){return this.each(function(){e.removeAttr(this,t)})},prop:function(t,i){return e.access(this,t,i,!0,e.prop)},removeProp:function(t){return t=e.propFix[t]||t,this.each(function(){try{this[t]=O,delete this[t]}catch(i){}})},addClass:function(t){var i,n,s,l,u,d,p;if(e.isFunction(t))return this.each(function(w){e(this).addClass(t.call(this,w,this.className))});if(t&&typeof t=="string"){for(i=t.split(rt),n=0,s=this.length;n<s;n++)if(l=this[n],l.nodeType===1)if(!l.className&&i.length===1)l.className=t;else{for(u=" "+l.className+" ",d=0,p=i.length;d<p;d++)~u.indexOf(" "+i[d]+" ")||(u+=i[d]+" ");l.className=e.trim(u)}}return this},removeClass:function(t){var i,n,s,l,u,d,p;if(e.isFunction(t))return this.each(function(w){e(this).removeClass(t.call(this,w,this.className))});if(t&&typeof t=="string"||t===O){for(i=(t||"").split(rt),n=0,s=this.length;n<s;n++)if(l=this[n],l.nodeType===1&&l.className)if(t){for(u=(" "+l.className+" ").replace(X," "),d=0,p=i.length;d<p;d++)u=u.replace(" "+i[d]+" "," ");l.className=e.trim(u)}else l.className=""}return this},toggleClass:function(t,i){var n=typeof t,s=typeof i=="boolean";return e.isFunction(t)?this.each(function(l){e(this).toggleClass(t.call(this,l,this.className,i),i)}):this.each(function(){if(n==="string")for(var l,u=0,d=e(this),p=i,w=t.split(rt);l=w[u++];)p=s?p:!d.hasClass(l),d[p?"addClass":"removeClass"](l);else(n==="undefined"||n==="boolean")&&(this.className&&e._data(this,"__className__",this.className),this.className=this.className||t===!1?"":e._data(this,"__className__")||"")})},hasClass:function(t){for(var i=" "+t+" ",n=0,s=this.length;n<s;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(X," ").indexOf(i)>-1)return!0;return!1},val:function(t){var i,n,s,l=this[0];return arguments.length?(s=e.isFunction(t),this.each(function(u){var d=e(this),p;this.nodeType===1&&(s?p=t.call(this,u,d.val()):p=t,p==null?p="":typeof p=="number"?p+="":e.isArray(p)&&(p=e.map(p,function(w){return w==null?"":w+""})),i=e.valHooks[this.nodeName.toLowerCase()]||e.valHooks[this.type],(!i||!("set"in i)||i.set(this,p,"value")===O)&&(this.value=p))})):l?(i=e.valHooks[l.nodeName.toLowerCase()]||e.valHooks[l.type],i&&"get"in i&&(n=i.get(l,"value"))!==O?n:(n=l.value,typeof n=="string"?n.replace(ft,""):n==null?"":n)):O}}),e.extend({valHooks:{option:{get:function(t){var i=t.attributes.value;return!i||i.specified?t.value:t.text}},select:{get:function(t){var i,n,s,l,u=t.selectedIndex,d=[],p=t.options,w=t.type==="select-one";if(u<0)return null;for(n=w?u:0,s=w?u+1:p.length;n<s;n++)if(l=p[n],l.selected&&(e.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!e.nodeName(l.parentNode,"optgroup"))){if(i=e(l).val(),w)return i;d.push(i)}return w&&!d.length&&p.length?e(p[u]).val():d},set:function(t,i){var n=e.makeArray(i);return e(t).find("option").each(function(){this.selected=e.inArray(e(this).val(),n)>=0}),n.length||(t.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(t,i,n,s){var l,u,d,p=t.nodeType;return!t||p===3||p===8||p===2?O:s&&i in e.attrFn?e(t)[i](n):"getAttribute"in t?(d=p!==1||!e.isXMLDoc(t),d&&(i=i.toLowerCase(),u=e.attrHooks[i]||(zt.test(i)?Zt:Nt)),n!==O?n===null?(e.removeAttr(t,i),O):u&&"set"in u&&d&&(l=u.set(t,n,i))!==O?l:(t.setAttribute(i,""+n),n):u&&"get"in u&&d&&(l=u.get(t,i))!==null?l:(l=t.getAttribute(i),l===null?O:l)):e.prop(t,i,n)},removeAttr:function(t,i){var n,s,l,u,d=0;if(t.nodeType===1)for(s=(i||"").split(rt),u=s.length;d<u;d++)l=s[d].toLowerCase(),n=e.propFix[l]||l,e.attr(t,l,""),t.removeAttribute(Ft?l:n),zt.test(l)&&n in t&&(t[n]=!1)},attrHooks:{type:{set:function(t,i){if(wt.test(t.nodeName)&&t.parentNode)e.error("type property can't be changed");else if(!e.support.radioValue&&i==="radio"&&e.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",i),n&&(t.value=n),i}}},value:{get:function(t,i){return Nt&&e.nodeName(t,"button")?Nt.get(t,i):i in t?t.value:null},set:function(t,i,n){if(Nt&&e.nodeName(t,"button"))return Nt.set(t,i,n);t.value=i}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(t,i,n){var s,l,u,d=t.nodeType;return!t||d===3||d===8||d===2?O:(u=d!==1||!e.isXMLDoc(t),u&&(i=e.propFix[i]||i,l=e.propHooks[i]),n!==O?l&&"set"in l&&(s=l.set(t,n,i))!==O?s:t[i]=n:l&&"get"in l&&(s=l.get(t,i))!==null?s:t[i])},propHooks:{tabIndex:{get:function(t){var i=t.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):St.test(t.nodeName)||qt.test(t.nodeName)&&t.href?0:O}}}}),e.attrHooks.tabindex=e.propHooks.tabIndex,Zt={get:function(t,i){var n,s=e.prop(t,i);return s===!0||typeof s!="boolean"&&(n=t.getAttributeNode(i))&&n.nodeValue!==!1?i.toLowerCase():O},set:function(t,i,n){var s;return i===!1?e.removeAttr(t,n):(s=e.propFix[n]||n,s in t&&(t[s]=!0),t.setAttribute(n,n.toLowerCase())),n}},Ft||(Kt={name:!0,id:!0},Nt=e.valHooks.button={get:function(t,i){var n;return n=t.getAttributeNode(i),n&&(Kt[i]?n.nodeValue!=="":n.specified)?n.nodeValue:O},set:function(t,i,n){var s=t.getAttributeNode(n);return s||(s=j.createAttribute(n),t.setAttributeNode(s)),s.nodeValue=i+""}},e.attrHooks.tabindex.set=Nt.set,e.each(["width","height"],function(t,i){e.attrHooks[i]=e.extend(e.attrHooks[i],{set:function(n,s){if(s==="")return n.setAttribute(i,"auto"),s}})}),e.attrHooks.contenteditable={get:Nt.get,set:function(t,i,n){i===""&&(i="false"),Nt.set(t,i,n)}}),e.support.hrefNormalized||e.each(["href","src","width","height"],function(t,i){e.attrHooks[i]=e.extend(e.attrHooks[i],{get:function(n){var s=n.getAttribute(i,2);return s===null?O:s}})}),e.support.style||(e.attrHooks.style={get:function(t){return t.style.cssText.toLowerCase()||O},set:function(t,i){return t.style.cssText=""+i}}),e.support.optSelected||(e.propHooks.selected=e.extend(e.propHooks.selected,{get:function(t){var i=t.parentNode;return i&&(i.selectedIndex,i.parentNode&&i.parentNode.selectedIndex),null}})),e.support.enctype||(e.propFix.enctype="encoding"),e.support.checkOn||e.each(["radio","checkbox"],function(){e.valHooks[this]={get:function(t){return t.getAttribute("value")===null?"on":t.value}}}),e.each(["radio","checkbox"],function(){e.valHooks[this]=e.extend(e.valHooks[this],{set:function(t,i){if(e.isArray(i))return t.checked=e.inArray(e(t).val(),i)>=0}})});var $t=/^(?:textarea|input|select)$/i,ye=/^([^\.]*)?(?:\.(.+))?$/,te=/\bhover(\.\S+)?/,ee=/^key/,ve=/^(?:mouse|contextmenu)|click/,Qt=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,we=function(t){var i=Qt.exec(t);return i&&(i[1]=(i[1]||"").toLowerCase(),i[3]=i[3]&&new RegExp("(?:^|\\s)"+i[3]+"(?:\\s|$)")),i},_e=function(t,i){return(!i[1]||t.nodeName.toLowerCase()===i[1])&&(!i[2]||t.id===i[2])&&(!i[3]||i[3].test(t.className))},Gt=function(t){return e.event.special.hover?t:t.replace(te,"mouseenter$1 mouseleave$1")};e.event={add:function(t,i,n,s,l){var u,d,p,w,S,b,P,A,N,W,Q;if(!(t.nodeType===3||t.nodeType===8||!i||!n||!(u=e._data(t)))){for(n.handler&&(N=n,n=N.handler),n.guid||(n.guid=e.guid++),p=u.events,p||(u.events=p={}),d=u.handle,d||(u.handle=d=function(lt){return typeof e<"u"&&(!lt||e.event.triggered!==lt.type)?e.event.dispatch.apply(d.elem,arguments):O},d.elem=t),i=Gt(i).split(" "),w=0;w<i.length;w++)S=ye.exec(i[w])||[],b=S[1],P=(S[2]||"").split(".").sort(),Q=e.event.special[b]||{},b=(l?Q.delegateType:Q.bindType)||b,Q=e.event.special[b]||{},A=e.extend({type:b,origType:S[1],data:s,handler:n,guid:n.guid,selector:l,namespace:P.join(".")},N),l&&(A.quick=we(l),!A.quick&&e.expr.match.POS.test(l)&&(A.isPositional=!0)),W=p[b],W||(W=p[b]=[],W.delegateCount=0,(!Q.setup||Q.setup.call(t,s,P,d)===!1)&&(t.addEventListener?t.addEventListener(b,d,!1):t.attachEvent&&t.attachEvent("on"+b,d))),Q.add&&(Q.add.call(t,A),A.handler.guid||(A.handler.guid=n.guid)),l?W.splice(W.delegateCount++,0,A):W.push(A),e.event.global[b]=!0;t=null}},global:{},remove:function(t,i,n,s){var l=e.hasData(t)&&e._data(t),u,d,p,w,S,b,P,A,N,W,Q;if(l&&(P=l.events)){for(i=Gt(i||"").split(" "),u=0;u<i.length;u++){if(d=ye.exec(i[u])||[],p=d[1],w=d[2],!p){w=w?"."+w:"";for(b in P)e.event.remove(t,b+w,n,s);return}if(A=e.event.special[p]||{},p=(s?A.delegateType:A.bindType)||p,W=P[p]||[],S=W.length,w=w?new RegExp("(^|\\.)"+w.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null,n||w||s||A.remove)for(b=0;b<W.length;b++)Q=W[b],(!n||n.guid===Q.guid)&&(!w||w.test(Q.namespace))&&(!s||s===Q.selector||s==="**"&&Q.selector)&&(W.splice(b--,1),Q.selector&&W.delegateCount--,A.remove&&A.remove.call(t,Q));else W.length=0;W.length===0&&S!==W.length&&((!A.teardown||A.teardown.call(t,w)===!1)&&e.removeEvent(t,p,l.handle),delete P[p])}e.isEmptyObject(P)&&(N=l.handle,N&&(N.elem=null),e.removeData(t,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(t,i,n,s){if(!n||n.nodeType!==3&&n.nodeType!==8){var l=t.type||t,u=[],d,p,w,S,b,P,A,N,W,Q;if(l.indexOf("!")>=0&&(l=l.slice(0,-1),p=!0),l.indexOf(".")>=0&&(u=l.split("."),l=u.shift(),u.sort()),(!n||e.event.customEvent[l])&&!e.event.global[l])return;if(t=typeof t=="object"?t[e.expando]?t:new e.Event(l,t):new e.Event(l),t.type=l,t.isTrigger=!0,t.exclusive=p,t.namespace=u.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,P=l.indexOf(":")<0?"on"+l:"",(s||!n)&&t.preventDefault(),!n){d=e.cache;for(w in d)d[w].events&&d[w].events[l]&&e.event.trigger(t,i,d[w].handle.elem,!0);return}if(t.result=O,t.target||(t.target=n),i=i!=null?e.makeArray(i):[],i.unshift(t),A=e.event.special[l]||{},A.trigger&&A.trigger.apply(n,i)===!1)return;if(W=[[n,A.bindType||l]],!s&&!A.noBubble&&!e.isWindow(n)){for(Q=A.delegateType||l,b=null,S=n.parentNode;S;S=S.parentNode)W.push([S,Q]),b=S;b&&b===n.ownerDocument&&W.push([b.defaultView||b.parentWindow||E,Q])}for(w=0;w<W.length&&(S=W[w][0],t.type=W[w][1],N=(e._data(S,"events")||{})[t.type]&&e._data(S,"handle"),N&&N.apply(S,i),N=P&&S[P],N&&e.acceptData(S)&&N.apply(S,i),!t.isPropagationStopped());w++);return t.type=l,t.isDefaultPrevented()||(!A._default||A._default.apply(n.ownerDocument,i)===!1)&&(l!=="click"||!e.nodeName(n,"a"))&&e.acceptData(n)&&P&&n[l]&&(l!=="focus"&&l!=="blur"||t.target.offsetWidth!==0)&&!e.isWindow(n)&&(b=n[P],b&&(n[P]=null),e.event.triggered=l,n[l](),e.event.triggered=O,b&&(n[P]=b)),t.result}},dispatch:function(t){t=e.event.fix(t||E.event);var i=(e._data(this,"events")||{})[t.type]||[],n=i.delegateCount,s=[].slice.call(arguments,0),l=!t.exclusive&&!t.namespace,u=(e.event.special[t.type]||{}).handle,d=[],p,w,S,b,P,A,N,W,Q,lt;if(s[0]=t,t.delegateTarget=this,n&&!t.target.disabled&&(!t.button||t.type!=="click"))for(S=t.target;S!=this;S=S.parentNode||this){for(P={},N=[],p=0;p<n;p++)W=i[p],Q=W.selector,lt=P[Q],W.isPositional?lt=(lt||(P[Q]=e(Q))).index(S)>=0:lt===O&&(lt=P[Q]=W.quick?_e(S,W.quick):e(S).is(Q)),lt&&N.push(W);N.length&&d.push({elem:S,matches:N})}for(i.length>n&&d.push({elem:this,matches:i.slice(n)}),p=0;p<d.length&&!t.isPropagationStopped();p++)for(A=d[p],t.currentTarget=A.elem,w=0;w<A.matches.length&&!t.isImmediatePropagationStopped();w++)W=A.matches[w],(l||!t.namespace&&!W.namespace||t.namespace_re&&t.namespace_re.test(W.namespace))&&(t.data=W.data,t.handleObj=W,b=(u||W.handler).apply(A.elem,s),b!==O&&(t.result=b,b===!1&&(t.preventDefault(),t.stopPropagation())));return t.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,i){return t.which==null&&(t.which=i.charCode!=null?i.charCode:i.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(t,i){var n,s,l,u=i.button,d=i.fromElement;return t.pageX==null&&i.clientX!=null&&(n=t.target.ownerDocument||j,s=n.documentElement,l=n.body,t.pageX=i.clientX+(s&&s.scrollLeft||l&&l.scrollLeft||0)-(s&&s.clientLeft||l&&l.clientLeft||0),t.pageY=i.clientY+(s&&s.scrollTop||l&&l.scrollTop||0)-(s&&s.clientTop||l&&l.clientTop||0)),!t.relatedTarget&&d&&(t.relatedTarget=d===t.target?i.toElement:d),!t.which&&u!==O&&(t.which=u&1?1:u&2?3:u&4?2:0),t}},fix:function(t){if(t[e.expando])return t;var i,n,s=t,l=e.event.fixHooks[t.type]||{},u=l.props?this.props.concat(l.props):this.props;for(t=e.Event(s),i=u.length;i;)n=u[--i],t[n]=s[n];return t.target||(t.target=s.srcElement||j),t.target.nodeType===3&&(t.target=t.target.parentNode),t.metaKey===O&&(t.metaKey=t.ctrlKey),l.filter?l.filter(t,s):t},special:{ready:{setup:e.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(t,i,n){e.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(t,i){this.onbeforeunload===i&&(this.onbeforeunload=null)}}},simulate:function(t,i,n,s){var l=e.extend(new e.Event,n,{type:t,isSimulated:!0,originalEvent:{}});s?e.event.trigger(l,null,i):e.event.dispatch.call(i,l),l.isDefaultPrevented()&&n.preventDefault()}},e.event.handle=e.event.dispatch,e.removeEvent=j.removeEventListener?function(t,i,n){t.removeEventListener&&t.removeEventListener(i,n,!1)}:function(t,i,n){t.detachEvent&&t.detachEvent("on"+i,n)},e.Event=function(t,i){if(!(this instanceof e.Event))return new e.Event(t,i);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.returnValue===!1||t.getPreventDefault&&t.getPreventDefault()?tt:st):this.type=t,i&&e.extend(this,i),this.timeStamp=t&&t.timeStamp||e.now(),this[e.expando]=!0},e.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var t=this.originalEvent;!t||(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=tt;var t=this.originalEvent;!t||(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:st,isPropagationStopped:st,isImmediatePropagationStopped:st},e.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,i){e.event.special[t]=e.event.special[i]={delegateType:i,bindType:i,handle:function(n){var s=this,l=n.relatedTarget,u=n.handleObj;u.selector;var d,p;return(!l||u.origType===n.type||l!==s&&!e.contains(s,l))&&(d=n.type,n.type=u.origType,p=u.handler.apply(this,arguments),n.type=d),p}}}),e.support.submitBubbles||(e.event.special.submit={setup:function(){if(e.nodeName(this,"form"))return!1;e.event.add(this,"click._submit keypress._submit",function(t){var i=t.target,n=e.nodeName(i,"input")||e.nodeName(i,"button")?i.form:O;n&&!n._submit_attached&&(e.event.add(n,"submit._submit",function(s){this.parentNode&&e.event.simulate("submit",this.parentNode,s,!0)}),n._submit_attached=!0)})},teardown:function(){if(e.nodeName(this,"form"))return!1;e.event.remove(this,"._submit")}}),e.support.changeBubbles||(e.event.special.change={setup:function(){if($t.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(e.event.add(this,"propertychange._change",function(t){t.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),e.event.add(this,"click._change",function(t){this._just_changed&&(this._just_changed=!1,e.event.simulate("change",this,t,!0))})),!1;e.event.add(this,"beforeactivate._change",function(t){var i=t.target;$t.test(i.nodeName)&&!i._change_attached&&(e.event.add(i,"change._change",function(n){this.parentNode&&!n.isSimulated&&e.event.simulate("change",this.parentNode,n,!0)}),i._change_attached=!0)})},handle:function(t){var i=t.target;if(this!==i||t.isSimulated||t.isTrigger||i.type!=="radio"&&i.type!=="checkbox")return t.handleObj.handler.apply(this,arguments)},teardown:function(){return e.event.remove(this,"._change"),$t.test(this.nodeName)}}),e.support.focusinBubbles||e.each({focus:"focusin",blur:"focusout"},function(t,i){var n=0,s=function(l){e.event.simulate(i,l.target,e.event.fix(l),!0)};e.event.special[i]={setup:function(){n++===0&&j.addEventListener(t,s,!0)},teardown:function(){--n===0&&j.removeEventListener(t,s,!0)}}}),e.fn.extend({on:function(t,i,n,s,l){var u,d;if(typeof t=="object"){typeof i!="string"&&(n=i,i=O);for(d in t)this.on(d,i,n,t[d],l);return this}if(n==null&&s==null?(s=i,n=i=O):s==null&&(typeof i=="string"?(s=n,n=O):(s=n,n=i,i=O)),s===!1)s=st;else if(!s)return this;return l===1&&(u=s,s=function(p){return e().off(p),u.apply(this,arguments)},s.guid=u.guid||(u.guid=e.guid++)),this.each(function(){e.event.add(this,t,s,n,i)})},one:function(t,i,n,s){return this.on.call(this,t,i,n,s,1)},off:function(t,i,n){if(t&&t.preventDefault&&t.handleObj){var s=t.handleObj;return e(t.delegateTarget).off(s.namespace?s.type+"."+s.namespace:s.type,s.selector,s.handler),this}if(typeof t=="object"){for(var l in t)this.off(l,i,t[l]);return this}return(i===!1||typeof i=="function")&&(n=i,i=O),n===!1&&(n=st),this.each(function(){e.event.remove(this,t,n,i)})},bind:function(t,i,n){return this.on(t,null,i,n)},unbind:function(t,i){return this.off(t,null,i)},live:function(t,i,n){return e(this.context).on(t,this.selector,i,n),this},die:function(t,i){return e(this.context).off(t,this.selector||"**",i),this},delegate:function(t,i,n,s){return this.on(i,t,n,s)},undelegate:function(t,i,n){return arguments.length==1?this.off(t,"**"):this.off(i,t,n)},trigger:function(t,i){return this.each(function(){e.event.trigger(t,i,this)})},triggerHandler:function(t,i){if(this[0])return e.event.trigger(t,i,this[0],!0)},toggle:function(t){var i=arguments,n=t.guid||e.guid++,s=0,l=function(u){var d=(e._data(this,"lastToggle"+t.guid)||0)%s;return e._data(this,"lastToggle"+t.guid,d+1),u.preventDefault(),i[d].apply(this,arguments)||!1};for(l.guid=n;s<i.length;)i[s++].guid=n;return this.click(l)},hover:function(t,i){return this.mouseenter(t).mouseleave(i||t)}}),e.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,i){e.fn[i]=function(n,s){return s==null&&(s=n,n=null),arguments.length>0?this.bind(i,n,s):this.trigger(i)},e.attrFn&&(e.attrFn[i]=!0),ee.test(i)&&(e.event.fixHooks[i]=e.event.keyHooks),ve.test(i)&&(e.event.fixHooks[i]=e.event.mouseHooks)}),function(){function t(c,m,T,C,M,D){for(var R=0,G=C.length;R<G;R++){var z=C[R];if(z){var Y=!1;for(z=z[c];z;){if(z[s]===T){Y=C[z.sizset];break}if(z.nodeType===1){if(D||(z[s]=T,z.sizset=R),typeof m!="string"){if(z===m){Y=!0;break}}else if(P.filter(m,[z]).length>0){Y=z;break}}z=z[c]}C[R]=Y}}}function i(c,m,T,C,M,D){for(var R=0,G=C.length;R<G;R++){var z=C[R];if(z){var Y=!1;for(z=z[c];z;){if(z[s]===T){Y=C[z.sizset];break}if(z.nodeType===1&&!D&&(z[s]=T,z.sizset=R),z.nodeName.toLowerCase()===m){Y=z;break}z=z[c]}C[R]=Y}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,s="sizcache"+(Math.random()+"").replace(".",""),l=0,u=Object.prototype.toString,d=!1,p=!0,w=/\\/g,S=/\r\n/g,b=/\W/;[0,0].sort(function(){return p=!1,0});var P=function(c,m,T,C){T=T||[],m=m||j;var M=m;if(m.nodeType!==1&&m.nodeType!==9)return[];if(!c||typeof c!="string")return T;var D,R,G,z,Y,Wt,Dt,g,I=!0,q=P.isXML(m),L=[],ct=c;do if(n.exec(""),D=n.exec(ct),D&&(ct=D[3],L.push(D[1]),D[2])){z=D[3];break}while(D);if(L.length>1&&W.exec(c))if(L.length===2&&N.relative[L[0]])R=it(L[0]+L[1],m,C);else for(R=N.relative[L[0]]?[m]:P(L.shift(),m);L.length;)c=L.shift(),N.relative[c]&&(c+=L.shift()),R=it(c,R,C);else if(!C&&L.length>1&&m.nodeType===9&&!q&&N.match.ID.test(L[0])&&!N.match.ID.test(L[L.length-1])&&(Y=P.find(L.shift(),m,q),m=Y.expr?P.filter(Y.expr,Y.set)[0]:Y.set[0]),m)for(Y=C?{expr:L.pop(),set:ot(C)}:P.find(L.pop(),L.length===1&&(L[0]==="~"||L[0]==="+")&&m.parentNode?m.parentNode:m,q),R=Y.expr?P.filter(Y.expr,Y.set):Y.set,L.length>0?G=ot(R):I=!1;L.length;)Wt=L.pop(),Dt=Wt,N.relative[Wt]?Dt=L.pop():Wt="",Dt==null&&(Dt=m),N.relative[Wt](G,Dt,q);else G=L=[];if(G||(G=R),G||P.error(Wt||c),u.call(G)==="[object Array]")if(!I)T.push.apply(T,G);else if(m&&m.nodeType===1)for(g=0;G[g]!=null;g++)G[g]&&(G[g]===!0||G[g].nodeType===1&&P.contains(m,G[g]))&&T.push(R[g]);else for(g=0;G[g]!=null;g++)G[g]&&G[g].nodeType===1&&T.push(R[g]);else ot(G,T);return z&&(P(z,M,T,C),P.uniqueSort(T)),T};P.uniqueSort=function(c){if(Lt&&(d=p,c.sort(Lt),d))for(var m=1;m<c.length;m++)c[m]===c[m-1]&&c.splice(m--,1);return c},P.matches=function(c,m){return P(c,null,null,m)},P.matchesSelector=function(c,m){return P(m,null,null,[c]).length>0},P.find=function(c,m,T){var C,M,D,R,G,z;if(!c)return[];for(M=0,D=N.order.length;M<D;M++)if(G=N.order[M],(R=N.leftMatch[G].exec(c))&&(z=R[1],R.splice(1,1),z.substr(z.length-1)!=="\\"&&(R[1]=(R[1]||"").replace(w,""),C=N.find[G](R,m,T),C!=null))){c=c.replace(N.match[G],"");break}return C||(C=typeof m.getElementsByTagName<"u"?m.getElementsByTagName("*"):[]),{set:C,expr:c}},P.filter=function(c,m,T,C){for(var M,D,R,G,z,Y,Wt,Dt,g,I=c,q=[],L=m,ct=m&&m[0]&&P.isXML(m[0]);c&&m.length;){for(R in N.filter)if((M=N.leftMatch[R].exec(c))!=null&&M[2]){if(Y=N.filter[R],Wt=M[1],D=!1,M.splice(1,1),Wt.substr(Wt.length-1)==="\\")continue;if(L===q&&(q=[]),N.preFilter[R]){if(M=N.preFilter[R](M,L,T,q,C,ct),!M)D=G=!0;else if(M===!0)continue}if(M)for(Dt=0;(z=L[Dt])!=null;Dt++)z&&(G=Y(z,M,Dt,L),g=C^G,T&&G!=null?g?D=!0:L[Dt]=!1:g&&(q.push(z),D=!0));if(G!==O){if(T||(L=q),c=c.replace(N.match[R],""),!D)return[];break}}if(c===I)if(D==null)P.error(c);else break;I=c}return L},P.error=function(c){throw"Syntax error, unrecognized expression: "+c};var A=P.getText=function(c){var m,T,C=c.nodeType,M="";if(C){if(C===1){if(typeof c.textContent=="string")return c.textContent;if(typeof c.innerText=="string")return c.innerText.replace(S,"");for(c=c.firstChild;c;c=c.nextSibling)M+=A(c)}else if(C===3||C===4)return c.nodeValue}else for(m=0;T=c[m];m++)T.nodeType!==8&&(M+=A(T));return M},N=P.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(c){return c.getAttribute("href")},type:function(c){return c.getAttribute("type")}},relative:{"+":function(c,m){var T=typeof m=="string",C=T&&!b.test(m),M=T&&!C;C&&(m=m.toLowerCase());for(var D=0,R=c.length,G;D<R;D++)if(G=c[D]){for(;(G=G.previousSibling)&&G.nodeType!==1;);c[D]=M||G&&G.nodeName.toLowerCase()===m?G||!1:G===m}M&&P.filter(m,c,!0)},">":function(c,m){var T,C=typeof m=="string",M=0,D=c.length;if(C&&!b.test(m)){for(m=m.toLowerCase();M<D;M++)if(T=c[M],T){var R=T.parentNode;c[M]=R.nodeName.toLowerCase()===m?R:!1}}else{for(;M<D;M++)T=c[M],T&&(c[M]=C?T.parentNode:T.parentNode===m);C&&P.filter(m,c,!0)}},"":function(c,m,T){var C,M=l++,D=t;typeof m=="string"&&!b.test(m)&&(m=m.toLowerCase(),C=m,D=i),D("parentNode",m,M,c,C,T)},"~":function(c,m,T){var C,M=l++,D=t;typeof m=="string"&&!b.test(m)&&(m=m.toLowerCase(),C=m,D=i),D("previousSibling",m,M,c,C,T)}},find:{ID:function(c,m,T){if(typeof m.getElementById<"u"&&!T){var C=m.getElementById(c[1]);return C&&C.parentNode?[C]:[]}},NAME:function(c,m){if(typeof m.getElementsByName<"u"){for(var T=[],C=m.getElementsByName(c[1]),M=0,D=C.length;M<D;M++)C[M].getAttribute("name")===c[1]&&T.push(C[M]);return T.length===0?null:T}},TAG:function(c,m){if(typeof m.getElementsByTagName<"u")return m.getElementsByTagName(c[1])}},preFilter:{CLASS:function(c,m,T,C,M,D){if(c=" "+c[1].replace(w,"")+" ",D)return c;for(var R=0,G;(G=m[R])!=null;R++)G&&(M^(G.className&&(" "+G.className+" ").replace(/[\t\n\r]/g," ").indexOf(c)>=0)?T||C.push(G):T&&(m[R]=!1));return!1},ID:function(c){return c[1].replace(w,"")},TAG:function(c,m){return c[1].replace(w,"").toLowerCase()},CHILD:function(c){if(c[1]==="nth"){c[2]||P.error(c[0]),c[2]=c[2].replace(/^\+|\s*/g,"");var m=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(c[2]==="even"&&"2n"||c[2]==="odd"&&"2n+1"||!/\D/.test(c[2])&&"0n+"+c[2]||c[2]);c[2]=m[1]+(m[2]||1)-0,c[3]=m[3]-0}else c[2]&&P.error(c[0]);return c[0]=l++,c},ATTR:function(c,m,T,C,M,D){var R=c[1]=c[1].replace(w,"");return!D&&N.attrMap[R]&&(c[1]=N.attrMap[R]),c[4]=(c[4]||c[5]||"").replace(w,""),c[2]==="~="&&(c[4]=" "+c[4]+" "),c},PSEUDO:function(c,m,T,C,M){if(c[1]==="not")if((n.exec(c[3])||"").length>1||/^\w/.test(c[3]))c[3]=P(c[3],null,null,m);else{var D=P.filter(c[3],m,T,!0^M);return T||C.push.apply(C,D),!1}else if(N.match.POS.test(c[0])||N.match.CHILD.test(c[0]))return!0;return c},POS:function(c){return c.unshift(!0),c}},filters:{enabled:function(c){return c.disabled===!1&&c.type!=="hidden"},disabled:function(c){return c.disabled===!0},checked:function(c){return c.checked===!0},selected:function(c){return c.parentNode&&c.parentNode.selectedIndex,c.selected===!0},parent:function(c){return!!c.firstChild},empty:function(c){return!c.firstChild},has:function(c,m,T){return!!P(T[3],c).length},header:function(c){return/h\d/i.test(c.nodeName)},text:function(c){var m=c.getAttribute("type"),T=c.type;return c.nodeName.toLowerCase()==="input"&&T==="text"&&(m===T||m===null)},radio:function(c){return c.nodeName.toLowerCase()==="input"&&c.type==="radio"},checkbox:function(c){return c.nodeName.toLowerCase()==="input"&&c.type==="checkbox"},file:function(c){return c.nodeName.toLowerCase()==="input"&&c.type==="file"},password:function(c){return c.nodeName.toLowerCase()==="input"&&c.type==="password"},submit:function(c){var m=c.nodeName.toLowerCase();return(m==="input"||m==="button")&&c.type==="submit"},image:function(c){return c.nodeName.toLowerCase()==="input"&&c.type==="image"},reset:function(c){var m=c.nodeName.toLowerCase();return(m==="input"||m==="button")&&c.type==="reset"},button:function(c){var m=c.nodeName.toLowerCase();return m==="input"&&c.type==="button"||m==="button"},input:function(c){return/input|select|textarea|button/i.test(c.nodeName)},focus:function(c){return c===c.ownerDocument.activeElement}},setFilters:{first:function(c,m){return m===0},last:function(c,m,T,C){return m===C.length-1},even:function(c,m){return m%2===0},odd:function(c,m){return m%2===1},lt:function(c,m,T){return m<T[3]-0},gt:function(c,m,T){return m>T[3]-0},nth:function(c,m,T){return T[3]-0===m},eq:function(c,m,T){return T[3]-0===m}},filter:{PSEUDO:function(c,m,T,C){var M=m[1],D=N.filters[M];if(D)return D(c,T,m,C);if(M==="contains")return(c.textContent||c.innerText||A([c])||"").indexOf(m[3])>=0;if(M==="not"){for(var R=m[3],G=0,z=R.length;G<z;G++)if(R[G]===c)return!1;return!0}P.error(M)},CHILD:function(c,m){var T,C,M,D,R,G,z=m[1],Y=c;switch(z){case"only":case"first":for(;Y=Y.previousSibling;)if(Y.nodeType===1)return!1;if(z==="first")return!0;Y=c;case"last":for(;Y=Y.nextSibling;)if(Y.nodeType===1)return!1;return!0;case"nth":if(T=m[2],C=m[3],T===1&&C===0)return!0;if(M=m[0],D=c.parentNode,D&&(D[s]!==M||!c.nodeIndex)){for(R=0,Y=D.firstChild;Y;Y=Y.nextSibling)Y.nodeType===1&&(Y.nodeIndex=++R);D[s]=M}return G=c.nodeIndex-C,T===0?G===0:G%T===0&&G/T>=0}},ID:function(c,m){return c.nodeType===1&&c.getAttribute("id")===m},TAG:function(c,m){return m==="*"&&c.nodeType===1||!!c.nodeName&&c.nodeName.toLowerCase()===m},CLASS:function(c,m){return(" "+(c.className||c.getAttribute("class"))+" ").indexOf(m)>-1},ATTR:function(c,m){var T=m[1],C=P.attr?P.attr(c,T):N.attrHandle[T]?N.attrHandle[T](c):c[T]!=null?c[T]:c.getAttribute(T),M=C+"",D=m[2],R=m[4];return C==null?D==="!=":!D&&P.attr?C!=null:D==="="?M===R:D==="*="?M.indexOf(R)>=0:D==="~="?(" "+M+" ").indexOf(R)>=0:R?D==="!="?M!==R:D==="^="?M.indexOf(R)===0:D==="$="?M.substr(M.length-R.length)===R:D==="|="?M===R||M.substr(0,R.length+1)===R+"-":!1:M&&C!==!1},POS:function(c,m,T,C){var M=m[2],D=N.setFilters[M];if(D)return D(c,T,m,C)}}},W=N.match.POS,Q=function(c,m){return"\\"+(m-0+1)};for(var lt in N.match)N.match[lt]=new RegExp(N.match[lt].source+/(?![^\[]*\])(?![^\(]*\))/.source),N.leftMatch[lt]=new RegExp(/(^(?:.|\r|\n)*?)/.source+N.match[lt].source.replace(/\\(\d+)/g,Q));var ot=function(c,m){return c=Array.prototype.slice.call(c,0),m?(m.push.apply(m,c),m):c};try{Array.prototype.slice.call(j.documentElement.childNodes,0)[0].nodeType}catch(c){ot=function(m,T){var C=0,M=T||[];if(u.call(m)==="[object Array]")Array.prototype.push.apply(M,m);else if(typeof m.length=="number")for(var D=m.length;C<D;C++)M.push(m[C]);else for(;m[C];C++)M.push(m[C]);return M}}var Lt,It;j.documentElement.compareDocumentPosition?Lt=function(c,m){return c===m?(d=!0,0):!c.compareDocumentPosition||!m.compareDocumentPosition?c.compareDocumentPosition?-1:1:c.compareDocumentPosition(m)&4?-1:1}:(Lt=function(c,m){if(c===m)return d=!0,0;if(c.sourceIndex&&m.sourceIndex)return c.sourceIndex-m.sourceIndex;var T,C,M=[],D=[],R=c.parentNode,G=m.parentNode,z=R;if(R===G)return It(c,m);if(!R)return-1;if(!G)return 1;for(;z;)M.unshift(z),z=z.parentNode;for(z=G;z;)D.unshift(z),z=z.parentNode;T=M.length,C=D.length;for(var Y=0;Y<T&&Y<C;Y++)if(M[Y]!==D[Y])return It(M[Y],D[Y]);return Y===T?It(c,D[Y],-1):It(M[Y],m,1)},It=function(c,m,T){if(c===m)return T;for(var C=c.nextSibling;C;){if(C===m)return-1;C=C.nextSibling}return 1}),function(){var c=j.createElement("div"),m="script"+new Date().getTime(),T=j.documentElement;c.innerHTML="<a name='"+m+"'/>",T.insertBefore(c,T.firstChild),j.getElementById(m)&&(N.find.ID=function(C,M,D){if(typeof M.getElementById<"u"&&!D){var R=M.getElementById(C[1]);return R?R.id===C[1]||typeof R.getAttributeNode<"u"&&R.getAttributeNode("id").nodeValue===C[1]?[R]:O:[]}},N.filter.ID=function(C,M){var D=typeof C.getAttributeNode<"u"&&C.getAttributeNode("id");return C.nodeType===1&&D&&D.nodeValue===M}),T.removeChild(c),T=c=null}(),function(){var c=j.createElement("div");c.appendChild(j.createComment("")),c.getElementsByTagName("*").length>0&&(N.find.TAG=function(m,T){var C=T.getElementsByTagName(m[1]);if(m[1]==="*"){for(var M=[],D=0;C[D];D++)C[D].nodeType===1&&M.push(C[D]);C=M}return C}),c.innerHTML="<a href='#'></a>",c.firstChild&&typeof c.firstChild.getAttribute<"u"&&c.firstChild.getAttribute("href")!=="#"&&(N.attrHandle.href=function(m){return m.getAttribute("href",2)}),c=null}(),j.querySelectorAll&&function(){var c=P,m=j.createElement("div"),T="__sizzle__";if(m.innerHTML="<p class='TEST'></p>",!m.querySelectorAll||m.querySelectorAll(".TEST").length!==0){P=function(M,D,R,G){if(D=D||j,!G&&!P.isXML(D)){var z=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(M);if(z&&(D.nodeType===1||D.nodeType===9)){if(z[1])return ot(D.getElementsByTagName(M),R);if(z[2]&&N.find.CLASS&&D.getElementsByClassName)return ot(D.getElementsByClassName(z[2]),R)}if(D.nodeType===9){if(M==="body"&&D.body)return ot([D.body],R);if(z&&z[3]){var Y=D.getElementById(z[3]);if(!Y||!Y.parentNode)return ot([],R);if(Y.id===z[3])return ot([Y],R)}try{return ot(D.querySelectorAll(M),R)}catch(L){}}else if(D.nodeType===1&&D.nodeName.toLowerCase()!=="object"){var Wt=D,Dt=D.getAttribute("id"),g=Dt||T,I=D.parentNode,q=/^\s*[+~]/.test(M);Dt?g=g.replace(/'/g,"\\$&"):D.setAttribute("id",g),q&&I&&(D=D.parentNode);try{if(!q||I)return ot(D.querySelectorAll("[id='"+g+"'] "+M),R)}catch(L){}finally{Dt||Wt.removeAttribute("id")}}}return c(M,D,R,G)};for(var C in c)P[C]=c[C];m=null}}(),function(){var c=j.documentElement,m=c.matchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.msMatchesSelector;if(m){var T=!m.call(j.createElement("div"),"div"),C=!1;try{m.call(j.documentElement,"[test!='']:sizzle")}catch(M){C=!0}P.matchesSelector=function(M,D){if(D=D.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!P.isXML(M))try{if(C||!N.match.PSEUDO.test(D)&&!/!=/.test(D)){var R=m.call(M,D);if(R||!T||M.document&&M.document.nodeType!==11)return R}}catch(G){}return P(D,null,null,[M]).length>0}}}(),function(){var c=j.createElement("div");if(c.innerHTML="<div class='test e'></div><div class='test'></div>",c.getElementsByClassName&&c.getElementsByClassName("e").length!==0){if(c.lastChild.className="e",c.getElementsByClassName("e").length===1)return;N.order.splice(1,0,"CLASS"),N.find.CLASS=function(m,T,C){if(typeof T.getElementsByClassName<"u"&&!C)return T.getElementsByClassName(m[1])},c=null}}(),j.documentElement.contains?P.contains=function(c,m){return c!==m&&(c.contains?c.contains(m):!0)}:j.documentElement.compareDocumentPosition?P.contains=function(c,m){return!!(c.compareDocumentPosition(m)&16)}:P.contains=function(){return!1},P.isXML=function(c){var m=(c?c.ownerDocument||c:0).documentElement;return m?m.nodeName!=="HTML":!1};var it=function(c,m,T){for(var C,M=[],D="",R=m.nodeType?[m]:m;C=N.match.PSEUDO.exec(c);)D+=C[0],c=c.replace(N.match.PSEUDO,"");c=N.relative[c]?c+"*":c;for(var G=0,z=R.length;G<z;G++)P(c,R[G],M,T);return P.filter(D,M)};P.attr=e.attr,P.selectors.attrMap={},e.find=P,e.expr=P.selectors,e.expr[":"]=e.expr.filters,e.unique=P.uniqueSort,e.text=P.getText,e.isXMLDoc=P.isXML,e.contains=P.contains}();var Ce=/Until$/,Mt=/^(?:parents|prevUntil|prevAll)/,Oe=/,/,xe=/^.[^:#\[\.,]*$/,Ae=Array.prototype.slice,ie=e.expr.match.POS,ne={children:!0,contents:!0,next:!0,prev:!0};e.fn.extend({find:function(t){var i=this,n,s;if(typeof t!="string")return e(t).filter(function(){for(n=0,s=i.length;n<s;n++)if(e.contains(i[n],this))return!0});var l=this.pushStack("","find",t),u,d,p;for(n=0,s=this.length;n<s;n++)if(u=l.length,e.find(t,this[n],l),n>0){for(d=u;d<l.length;d++)for(p=0;p<u;p++)if(l[p]===l[d]){l.splice(d--,1);break}}return l},has:function(t){var i=e(t);return this.filter(function(){for(var n=0,s=i.length;n<s;n++)if(e.contains(this,i[n]))return!0})},not:function(t){return this.pushStack(k(this,t,!1),"not",t)},filter:function(t){return this.pushStack(k(this,t,!0),"filter",t)},is:function(t){return!!t&&(typeof t=="string"?ie.test(t)?e(t,this.context).index(this[0])>=0:e.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,i){var n=[],s,l,u=this[0];if(e.isArray(t)){for(var d=1;u&&u.ownerDocument&&u!==i;){for(s=0;s<t.length;s++)e(u).is(t[s])&&n.push({selector:t[s],elem:u,level:d});u=u.parentNode,d++}return n}var p=ie.test(t)||typeof t!="string"?e(t,i||this.context):0;for(s=0,l=this.length;s<l;s++)for(u=this[s];u;){if(p?p.index(u)>-1:e.find.matchesSelector(u,t)){n.push(u);break}if(u=u.parentNode,!u||!u.ownerDocument||u===i||u.nodeType===11)break}return n=n.length>1?e.unique(n):n,this.pushStack(n,"closest",t)},index:function(t){return t?typeof t=="string"?e.inArray(this[0],e(t)):e.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(t,i){var n=typeof t=="string"?e(t,i):e.makeArray(t&&t.nodeType?[t]:t),s=e.merge(this.get(),n);return this.pushStack(F(n[0])||F(s[0])?s:e.unique(s))},andSelf:function(){return this.add(this.prevObject)}}),e.each({parent:function(t){var i=t.parentNode;return i&&i.nodeType!==11?i:null},parents:function(t){return e.dir(t,"parentNode")},parentsUntil:function(t,i,n){return e.dir(t,"parentNode",n)},next:function(t){return e.nth(t,2,"nextSibling")},prev:function(t){return e.nth(t,2,"previousSibling")},nextAll:function(t){return e.dir(t,"nextSibling")},prevAll:function(t){return e.dir(t,"previousSibling")},nextUntil:function(t,i,n){return e.dir(t,"nextSibling",n)},prevUntil:function(t,i,n){return e.dir(t,"previousSibling",n)},siblings:function(t){return e.sibling(t.parentNode.firstChild,t)},children:function(t){return e.sibling(t.firstChild)},contents:function(t){return e.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:e.makeArray(t.childNodes)}},function(t,i){e.fn[t]=function(n,s){var l=e.map(this,i,n),u=Ae.call(arguments);return Ce.test(t)||(s=n),s&&typeof s=="string"&&(l=e.filter(s,l)),l=this.length>1&&!ne[t]?e.unique(l):l,(this.length>1||Oe.test(s))&&Mt.test(t)&&(l=l.reverse()),this.pushStack(l,t,u.join(","))}}),e.extend({filter:function(t,i,n){return n&&(t=":not("+t+")"),i.length===1?e.find.matchesSelector(i[0],t)?[i[0]]:[]:e.find.matches(t,i)},dir:function(t,i,n){for(var s=[],l=t[i];l&&l.nodeType!==9&&(n===O||l.nodeType!==1||!e(l).is(n));)l.nodeType===1&&s.push(l),l=l[i];return s},nth:function(t,i,n,s){i=i||1;for(var l=0;t&&!(t.nodeType===1&&++l===i);t=t[n]);return t},sibling:function(t,i){for(var n=[];t;t=t.nextSibling)t.nodeType===1&&t!==i&&n.push(t);return n}});var le="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",be=/ jQuery\d+="(?:\d+|null)"/g,Tt=/^\s+/,Ht=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,vt=/<([\w:]+)/,Vt=/<tbody/i,se=/<|&#?\w+;/,he=/<(?:script|style)/i,de=/<(?:script|object|embed|option|style)/i,re=new RegExp("<(?:"+le.replace(" ","|")+")","i"),ue=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/\/(java|ecma)script/i,oe=/^\s*<!(?:\[CDATA\[|\-\-)/,Rt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},fi=x(j);Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td,e.support.htmlSerialize||(Rt._default=[1,"div<div>","</div>"]),e.fn.extend({text:function(t){return e.isFunction(t)?this.each(function(i){var n=e(this);n.text(t.call(this,i,n.text()))}):typeof t!="object"&&t!==O?this.empty().append((this[0]&&this[0].ownerDocument||j).createTextNode(t)):e.text(this)},wrapAll:function(t){if(e.isFunction(t))return this.each(function(n){e(this).wrapAll(t.call(this,n))});if(this[0]){var i=e(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&i.insertBefore(this[0]),i.map(function(){for(var n=this;n.firstChild&&n.firstChild.nodeType===1;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(t){return e.isFunction(t)?this.each(function(i){e(this).wrapInner(t.call(this,i))}):this.each(function(){var i=e(this),n=i.contents();n.length?n.wrapAll(t):i.append(t)})},wrap:function(t){return this.each(function(){e(this).wrapAll(t)})},unwrap:function(){return this.parent().each(function(){e.nodeName(this,"body")||e(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(t){this.nodeType===1&&this.appendChild(t)})},prepend:function(){return this.domManip(arguments,!0,function(t){this.nodeType===1&&this.insertBefore(t,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(i){this.parentNode.insertBefore(i,this)});if(arguments.length){var t=e(arguments[0]);return t.push.apply(t,this.toArray()),this.pushStack(t,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(i){this.parentNode.insertBefore(i,this.nextSibling)});if(arguments.length){var t=this.pushStack(this,"after",arguments);return t.push.apply(t,e(arguments[0]).toArray()),t}},remove:function(t,i){for(var n=0,s;(s=this[n])!=null;n++)(!t||e.filter(t,[s]).length)&&(!i&&s.nodeType===1&&(e.cleanData(s.getElementsByTagName("*")),e.cleanData([s])),s.parentNode&&s.parentNode.removeChild(s));return this},empty:function(){for(var t=0,i;(i=this[t])!=null;t++)for(i.nodeType===1&&e.cleanData(i.getElementsByTagName("*"));i.firstChild;)i.removeChild(i.firstChild);return this},clone:function(t,i){return t=t==null?!1:t,i=i==null?t:i,this.map(function(){return e.clone(this,t,i)})},html:function(t){if(t===O)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(be,""):null;if(typeof t=="string"&&!he.test(t)&&(e.support.leadingWhitespace||!Tt.test(t))&&!Rt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Ht,"<$1></$2>");try{for(var i=0,n=this.length;i<n;i++)this[i].nodeType===1&&(e.cleanData(this[i].getElementsByTagName("*")),this[i].innerHTML=t)}catch(s){this.empty().append(t)}}else e.isFunction(t)?this.each(function(s){var l=e(this);l.html(t.call(this,s,l.html()))}):this.empty().append(t);return this},replaceWith:function(t){return this[0]&&this[0].parentNode?e.isFunction(t)?this.each(function(i){var n=e(this),s=n.html();n.replaceWith(t.call(this,i,s))}):(typeof t!="string"&&(t=e(t).detach()),this.each(function(){var i=this.nextSibling,n=this.parentNode;e(this).remove(),i?e(i).before(t):e(n).append(t)})):this.length?this.pushStack(e(e.isFunction(t)?t():t),"replaceWith",t):this},detach:function(t){return this.remove(t,!0)},domManip:function(t,i,n){var s,l,u,d,p=t[0],w=[];if(!e.support.checkClone&&arguments.length===3&&typeof p=="string"&&ue.test(p))return this.each(function(){e(this).domManip(t,i,n,!0)});if(e.isFunction(p))return this.each(function(A){var N=e(this);t[0]=p.call(this,A,i?N.html():O),N.domManip(t,i,n)});if(this[0]){if(d=p&&p.parentNode,e.support.parentNode&&d&&d.nodeType===11&&d.childNodes.length===this.length?s={fragment:d}:s=e.buildFragment(t,this,w),u=s.fragment,u.childNodes.length===1?l=u=u.firstChild:l=u.firstChild,l){i=i&&e.nodeName(l,"tr");for(var S=0,b=this.length,P=b-1;S<b;S++)n.call(i?y(this[S]):this[S],s.cacheable||b>1&&S<P?e.clone(u,!0,!0):u)}w.length&&e.each(w,K)}return this}}),e.buildFragment=function(t,i,n){var s,l,u,d,p=t[0];return i&&i[0]&&(d=i[0].ownerDocument||i[0]),d.createDocumentFragment||(d=j),t.length===1&&typeof p=="string"&&p.length<512&&d===j&&p.charAt(0)==="<"&&!de.test(p)&&(e.support.checkClone||!ue.test(p))&&!e.support.unknownElems&&re.test(p)&&(l=!0,u=e.fragments[p],u&&u!==1&&(s=u)),s||(s=d.createDocumentFragment(),e.clean(t,d,s,n)),l&&(e.fragments[p]=u?s:1),{fragment:s,cacheable:l}},e.fragments={},e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,i){e.fn[t]=function(n){var s=[],l=e(n),u=this.length===1&&this[0].parentNode;if(u&&u.nodeType===11&&u.childNodes.length===1&&l.length===1)return l[i](this[0]),this;for(var d=0,p=l.length;d<p;d++){var w=(d>0?this.clone(!0):this).get();e(l[d])[i](w),s=s.concat(w)}return this.pushStack(s,t,l.selector)}}),e.extend({clone:function(t,i,n){var s=t.cloneNode(!0),l,u,d;if((!e.support.noCloneEvent||!e.support.noCloneChecked)&&(t.nodeType===1||t.nodeType===11)&&!e.isXMLDoc(t))for(a(t,s),l=B(t),u=B(s),d=0;l[d];++d)u[d]&&a(l[d],u[d]);if(i&&(h(t,s),n))for(l=B(t),u=B(s),d=0;l[d];++d)h(l[d],u[d]);return l=u=null,s},clean:function(t,i,n,s){var l;i=i||j,typeof i.createElement>"u"&&(i=i.ownerDocument||i[0]&&i[0].ownerDocument||j);for(var u=[],d,p=0,w;(w=t[p])!=null;p++)if(typeof w=="number"&&(w+=""),!!w){if(typeof w=="string")if(!se.test(w))w=i.createTextNode(w);else{w=w.replace(Ht,"<$1></$2>");var S=(vt.exec(w)||["",""])[1].toLowerCase(),b=Rt[S]||Rt._default,P=b[0],A=i.createElement("div");for(i===j?fi.appendChild(A):x(i).appendChild(A),A.innerHTML=b[1]+w+b[2];P--;)A=A.lastChild;if(!e.support.tbody){var N=Vt.test(w),W=S==="table"&&!N?A.firstChild&&A.firstChild.childNodes:b[1]==="<table>"&&!N?A.childNodes:[];for(d=W.length-1;d>=0;--d)e.nodeName(W[d],"tbody")&&!W[d].childNodes.length&&W[d].parentNode.removeChild(W[d])}!e.support.leadingWhitespace&&Tt.test(w)&&A.insertBefore(i.createTextNode(Tt.exec(w)[0]),A.firstChild),w=A.childNodes}var Q;if(!e.support.appendChecked)if(w[0]&&typeof(Q=w.length)=="number")for(d=0;d<Q;d++)ht(w[d]);else ht(w);w.nodeType?u.push(w):u=e.merge(u,w)}if(n)for(l=function(ot){return!ot.type||pe.test(ot.type)},p=0;u[p];p++)if(s&&e.nodeName(u[p],"script")&&(!u[p].type||u[p].type.toLowerCase()==="text/javascript"))s.push(u[p].parentNode?u[p].parentNode.removeChild(u[p]):u[p]);else{if(u[p].nodeType===1){var lt=e.grep(u[p].getElementsByTagName("script"),l);u.splice.apply(u,[p+1,0].concat(lt))}n.appendChild(u[p])}return u},cleanData:function(t){for(var i,n,s=e.cache,l=e.event.special,u=e.support.deleteExpando,d=0,p;(p=t[d])!=null;d++)if(!(p.nodeName&&e.noData[p.nodeName.toLowerCase()])&&(n=p[e.expando],n)){if(i=s[n],i&&i.events){for(var w in i.events)l[w]?e.event.remove(p,w):e.removeEvent(p,w,i.handle);i.handle&&(i.handle.elem=null)}u?delete p[e.expando]:p.removeAttribute&&p.removeAttribute(e.expando),delete s[n]}}});var Re=/alpha\([^)]*\)/i,gi=/opacity=([^)]*)/,mi=/([A-Z]|^ms)/g,Xe=/^-?\d+(?:px)?$/i,yi=/^-?\d/,vi=/^([\-+])=([\-+.\de]+)/,wi={position:"absolute",visibility:"hidden",display:"block"},xi=["Left","Right"],bi=["Top","Bottom"],Pe,$e,Ye;e.fn.css=function(t,i){return arguments.length===2&&i===O?this:e.access(this,t,i,!0,function(n,s,l){return l!==O?e.style(n,s,l):e.css(n,s)})},e.extend({cssHooks:{opacity:{get:function(t,i){if(i){var n=Pe(t,"opacity","opacity");return n===""?"1":n}return t.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:e.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,i,n,s){if(t&&t.nodeType!==3&&t.nodeType!==8&&t.style){var l,u,d=e.camelCase(i),p=t.style,w=e.cssHooks[d];if(i=e.cssProps[d]||d,n===O)return w&&"get"in w&&(l=w.get(t,!1,s))!==O?l:p[i];if(u=typeof n,u==="string"&&(l=vi.exec(n))&&(n=+(l[1]+1)*+l[2]+parseFloat(e.css(t,i)),u="number"),n==null||u==="number"&&isNaN(n))return;if(u==="number"&&!e.cssNumber[d]&&(n+="px"),!w||!("set"in w)||(n=w.set(t,n))!==O)try{p[i]=n}catch(S){}}},css:function(t,i,n){var s,l;if(i=e.camelCase(i),l=e.cssHooks[i],i=e.cssProps[i]||i,i==="cssFloat"&&(i="float"),l&&"get"in l&&(s=l.get(t,!0,n))!==O)return s;if(Pe)return Pe(t,i)},swap:function(t,i,n){var s={};for(var l in i)s[l]=t.style[l],t.style[l]=i[l];n.call(t);for(l in i)t.style[l]=s[l]}}),e.curCSS=e.css,e.each(["height","width"],function(t,i){e.cssHooks[i]={get:function(n,s,l){var u;if(s)return n.offsetWidth!==0?U(n,i,l):(e.swap(n,wi,function(){u=U(n,i,l)}),u)},set:function(n,s){if(!Xe.test(s))return s;if(s=parseFloat(s),s>=0)return s+"px"}}}),e.support.opacity||(e.cssHooks.opacity={get:function(t,i){return gi.test((i&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100+"":i?"1":""},set:function(t,i){var n=t.style,s=t.currentStyle,l=e.isNumeric(i)?"alpha(opacity="+i*100+")":"",u=s&&s.filter||n.filter||"";n.zoom=1,!(i>=1&&e.trim(u.replace(Re,""))===""&&(n.removeAttribute("filter"),s&&!s.filter))&&(n.filter=Re.test(u)?u.replace(Re,l):u+" "+l)}}),e(function(){e.support.reliableMarginRight||(e.cssHooks.marginRight={get:function(t,i){var n;return e.swap(t,{display:"inline-block"},function(){i?n=Pe(t,"margin-right","marginRight"):n=t.style.marginRight}),n}})}),j.defaultView&&j.defaultView.getComputedStyle&&($e=function(t,i){var n,s,l;return i=i.replace(mi,"-$1").toLowerCase(),(s=t.ownerDocument.defaultView)?((l=s.getComputedStyle(t,null))&&(n=l.getPropertyValue(i),n===""&&!e.contains(t.ownerDocument.documentElement,t)&&(n=e.style(t,i))),n):O}),j.documentElement.currentStyle&&(Ye=function(t,i){var n,s,l,u=t.currentStyle&&t.currentStyle[i],d=t.style;return u===null&&d&&(l=d[i])&&(u=l),!Xe.test(u)&&yi.test(u)&&(n=d.left,s=t.runtimeStyle&&t.runtimeStyle.left,s&&(t.runtimeStyle.left=t.currentStyle.left),d.left=i==="fontSize"?"1em":u||0,u=d.pixelLeft+"px",d.left=n,s&&(t.runtimeStyle.left=s)),u===""?"auto":u}),Pe=$e||Ye,e.expr&&e.expr.filters&&(e.expr.filters.hidden=function(t){var i=t.offsetWidth,n=t.offsetHeight;return i===0&&n===0||!e.support.reliableHiddenOffsets&&(t.style&&t.style.display||e.css(t,"display"))==="none"},e.expr.filters.visible=function(t){return!e.expr.filters.hidden(t)});var Pi=/%20/g,Si=/\[\]$/,Ze=/\r?\n/g,Ti=/#.*$/,Ci=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ai=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ki=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,_i=/^(?:GET|HEAD)$/,Mi=/^\/\//,Ke=/\?/,Di=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Ei=/^(?:select|textarea)/i,Qe=/\s+/,Ni=/([?&])_=[^&]*/,Je=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,ti=e.fn.load,Be={},ei={},fe,ge,ii=["*/"]+["*"];try{fe=o.href}catch(t){fe=j.createElement("a"),fe.href="",fe=fe.href}ge=Je.exec(fe.toLowerCase())||[],e.fn.extend({load:function(t,i,n){if(typeof t!="string"&&ti)return ti.apply(this,arguments);if(!this.length)return this;var s=t.indexOf(" ");if(s>=0){var l=t.slice(s,t.length);t=t.slice(0,s)}var u="GET";i&&(e.isFunction(i)?(n=i,i=O):typeof i=="object"&&(i=e.param(i,e.ajaxSettings.traditional),u="POST"));var d=this;return e.ajax({url:t,type:u,dataType:"html",data:i,complete:function(p,w,S){S=p.responseText,p.isResolved()&&(p.done(function(b){S=b}),d.html(l?e("<div>").append(S.replace(Di,"")).find(l):S)),n&&d.each(n,[S,w,p])}}),this},serialize:function(){return e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?e.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Ei.test(this.nodeName)||Ai.test(this.type))}).map(function(t,i){var n=e(this).val();return n==null?null:e.isArray(n)?e.map(n,function(s,l){return{name:i.name,value:s.replace(Ze,`\r
  119. `)}}):{name:i.name,value:n.replace(Ze,`\r
  120. `)}}).get()}}),e.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(t,i){e.fn[i]=function(n){return this.bind(i,n)}}),e.each(["get","post"],function(t,i){e[i]=function(n,s,l,u){return e.isFunction(s)&&(u=u||l,l=s,s=O),e.ajax({type:i,url:n,data:s,success:l,dataType:u})}}),e.extend({getScript:function(t,i){return e.get(t,O,i,"script")},getJSON:function(t,i,n){return e.get(t,i,n,"json")},ajaxSetup:function(t,i){return i?Et(t,e.ajaxSettings):(i=t,t=e.ajaxSettings),Et(t,i),t},ajaxSettings:{url:fe,isLocal:ki.test(ge[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":ii},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":E.String,"text html":!0,"text json":e.parseJSON,"text xml":e.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Ct(Be),ajaxTransport:Ct(ei),ajax:function(t,i){function n(T,C,M,D){if(ot!==2){ot=2,Q&&clearTimeout(Q),W=O,A=D||"",it.readyState=T>0?4:0;var R,G,z,Y=C,Wt=M?nt(s,it,M):O,Dt,g;if(T>=200&&T<300||T===304)if(s.ifModified&&((Dt=it.getResponseHeader("Last-Modified"))&&(e.lastModified[S]=Dt),(g=it.getResponseHeader("Etag"))&&(e.etag[S]=g)),T===304)Y="notmodified",R=!0;else try{G=Pt(s,Wt),Y="success",R=!0}catch(I){Y="parsererror",z=I}else z=Y,(!Y||T)&&(Y="error",T<0&&(T=0));it.status=T,it.statusText=""+(C||Y),R?d.resolveWith(l,[G,Y,it]):d.rejectWith(l,[it,Y,z]),it.statusCode(w),w=O,Lt&&u.trigger("ajax"+(R?"Success":"Error"),[it,s,R?G:z]),p.fireWith(l,[it,Y]),Lt&&(u.trigger("ajaxComplete",[it,s]),--e.active||e.event.trigger("ajaxStop"))}}typeof t=="object"&&(i=t,t=O),i=i||{};var s=e.ajaxSetup({},i),l=s.context||s,u=l!==s&&(l.nodeType||l instanceof e)?e(l):e.event,d=e.Deferred(),p=e.Callbacks("once memory"),w=s.statusCode||{},S,b={},P={},A,N,W,Q,lt,ot=0,Lt,It,it={readyState:0,setRequestHeader:function(T,C){if(!ot){var M=T.toLowerCase();T=P[M]=P[M]||T,b[T]=C}return this},getAllResponseHeaders:function(){return ot===2?A:null},getResponseHeader:function(T){var C;if(ot===2){if(!N)for(N={};C=Ci.exec(A);)N[C[1].toLowerCase()]=C[2];C=N[T.toLowerCase()]}return C===O?null:C},overrideMimeType:function(T){return ot||(s.mimeType=T),this},abort:function(T){return T=T||"abort",W&&W.abort(T),n(0,T),this}};if(d.promise(it),it.success=it.done,it.error=it.fail,it.complete=p.add,it.statusCode=function(T){if(T){var C;if(ot<2)for(C in T)w[C]=[w[C],T[C]];else C=T[it.status],it.then(C,C)}return this},s.url=((t||s.url)+"").replace(Ti,"").replace(Mi,ge[1]+"//"),s.dataTypes=e.trim(s.dataType||"*").toLowerCase().split(Qe),s.crossDomain==null&&(lt=Je.exec(s.url.toLowerCase()),s.crossDomain=!(!lt||lt[1]==ge[1]&&lt[2]==ge[2]&&(lt[3]||(lt[1]==="http:"?80:443))==(ge[3]||(ge[1]==="http:"?80:443)))),s.data&&s.processData&&typeof s.data!="string"&&(s.data=e.param(s.data,s.traditional)),_t(Be,s,i,it),ot===2)return!1;if(Lt=s.global,s.type=s.type.toUpperCase(),s.hasContent=!_i.test(s.type),Lt&&e.active++===0&&e.event.trigger("ajaxStart"),!s.hasContent&&(s.data&&(s.url+=(Ke.test(s.url)?"&":"?")+s.data,delete s.data),S=s.url,s.cache===!1)){var c=e.now(),m=s.url.replace(Ni,"$1_="+c);s.url=m+(m===s.url?(Ke.test(s.url)?"&":"?")+"_="+c:"")}(s.data&&s.hasContent&&s.contentType!==!1||i.contentType)&&it.setRequestHeader("Content-Type",s.contentType),s.ifModified&&(S=S||s.url,e.lastModified[S]&&it.setRequestHeader("If-Modified-Since",e.lastModified[S]),e.etag[S]&&it.setRequestHeader("If-None-Match",e.etag[S])),it.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+ii+"; q=0.01":""):s.accepts["*"]);for(It in s.headers)it.setRequestHeader(It,s.headers[It]);if(s.beforeSend&&(s.beforeSend.call(l,it,s)===!1||ot===2))return it.abort(),!1;for(It in{success:1,error:1,complete:1})it[It](s[It]);if(W=_t(ei,s,i,it),!W)n(-1,"No Transport");else{it.readyState=1,Lt&&u.trigger("ajaxSend",[it,s]),s.async&&s.timeout>0&&(Q=setTimeout(function(){it.abort("timeout")},s.timeout));try{ot=1,W.send(b,n)}catch(T){ot<2?n(-1,T):e.error(T)}}return it},param:function(t,i){var n=[],s=function(u,d){d=e.isFunction(d)?d():d,n[n.length]=encodeURIComponent(u)+"="+encodeURIComponent(d)};if(i===O&&(i=e.ajaxSettings.traditional),e.isArray(t)||t.jquery&&!e.isPlainObject(t))e.each(t,function(){s(this.name,this.value)});else for(var l in t)dt(l,t[l],i,s);return n.join("&").replace(Pi,"+")}}),e.extend({active:0,lastModified:{},etag:{}});var Li=e.now(),Me=/(\=)\?(&|$)|\?\?/i;e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return e.expando+"_"+Li++}}),e.ajaxPrefilter("json jsonp",function(t,i,n){var s=t.contentType==="application/x-www-form-urlencoded"&&typeof t.data=="string";if(t.dataTypes[0]==="jsonp"||t.jsonp!==!1&&(Me.test(t.url)||s&&Me.test(t.data))){var l,u=t.jsonpCallback=e.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,d=E[u],p=t.url,w=t.data,S="$1"+u+"$2";return t.jsonp!==!1&&(p=p.replace(Me,S),t.url===p&&(s&&(w=w.replace(Me,S)),t.data===w&&(p+=(/\?/.test(p)?"&":"?")+t.jsonp+"="+u))),t.url=p,t.data=w,E[u]=function(b){l=[b]},n.always(function(){E[u]=d,l&&e.isFunction(d)&&E[u](l[0])}),t.converters["script json"]=function(){return l||e.error(u+" was not called"),l[0]},t.dataTypes[0]="json","script"}}),e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(t){return e.globalEval(t),t}}}),e.ajaxPrefilter("script",function(t){t.cache===O&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),e.ajaxTransport("script",function(t){if(t.crossDomain){var i,n=j.head||j.getElementsByTagName("head")[0]||j.documentElement;return{send:function(s,l){i=j.createElement("script"),i.async="async",t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(u,d){(d||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,n&&i.parentNode&&n.removeChild(i),i=O,d||l(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(0,1)}}}});var We=E.ActiveXObject?function(){for(var t in Se)Se[t](0,1)}:!1,Ii=0,Se;e.ajaxSettings.xhr=E.ActiveXObject?function(){return!this.isLocal&&bt()||ut()}:bt,function(t){e.extend(e.support,{ajax:!!t,cors:!!t&&"withCredentials"in t})}(e.ajaxSettings.xhr()),e.support.ajax&&e.ajaxTransport(function(t){if(!t.crossDomain||e.support.cors){var i;return{send:function(n,s){var l=t.xhr(),u,d;if(t.username?l.open(t.type,t.url,t.async,t.username,t.password):l.open(t.type,t.url,t.async),t.xhrFields)for(d in t.xhrFields)l[d]=t.xhrFields[d];t.mimeType&&l.overrideMimeType&&l.overrideMimeType(t.mimeType),!t.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");try{for(d in n)l.setRequestHeader(d,n[d])}catch(p){}l.send(t.hasContent&&t.data||null),i=function(p,w){var S,b,P,A,N;try{if(i&&(w||l.readyState===4))if(i=O,u&&(l.onreadystatechange=e.noop,We&&delete Se[u]),w)l.readyState!==4&&l.abort();else{S=l.status,P=l.getAllResponseHeaders(),A={},N=l.responseXML,N&&N.documentElement&&(A.xml=N),A.text=l.responseText;try{b=l.statusText}catch(W){b=""}!S&&t.isLocal&&!t.crossDomain?S=A.text?200:404:S===1223&&(S=204)}}catch(W){w||s(-1,W)}A&&s(S,b,A,P)},!t.async||l.readyState===4?i():(u=++Ii,We&&(Se||(Se={},e(E).unload(We)),Se[u]=i),l.onreadystatechange=i)},abort:function(){i&&i(0,1)}}}});var je={},Jt,Te,Fi=/^(?:toggle|show|hide)$/,Oi=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,De,ni=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Ee;e.fn.extend({show:function(t,i,n){var s,l;if(t||t===0)return this.animate(J("show",3),t,i,n);for(var u=0,d=this.length;u<d;u++)s=this[u],s.style&&(l=s.style.display,!e._data(s,"olddisplay")&&l==="none"&&(l=s.style.display=""),l===""&&e.css(s,"display")==="none"&&e._data(s,"olddisplay",et(s.nodeName)));for(u=0;u<d;u++)s=this[u],s.style&&(l=s.style.display,(l===""||l==="none")&&(s.style.display=e._data(s,"olddisplay")||""));return this},hide:function(t,i,n){if(t||t===0)return this.animate(J("hide",3),t,i,n);for(var s,l,u=0,d=this.length;u<d;u++)s=this[u],s.style&&(l=e.css(s,"display"),l!=="none"&&!e._data(s,"olddisplay")&&e._data(s,"olddisplay",l));for(u=0;u<d;u++)this[u].style&&(this[u].style.display="none");return this},_toggle:e.fn.toggle,toggle:function(t,i,n){var s=typeof t=="boolean";return e.isFunction(t)&&e.isFunction(i)?this._toggle.apply(this,arguments):t==null||s?this.each(function(){var l=s?t:e(this).is(":hidden");e(this)[l?"show":"hide"]()}):this.animate(J("toggle",3),t,i,n),this},fadeTo:function(t,i,n,s){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:i},t,n,s)},animate:function(t,i,n,s){function l(){u.queue===!1&&e._mark(this);var d=e.extend({},u),p=this.nodeType===1,w=p&&e(this).is(":hidden"),S,b,P,A,N,W,Q,lt,ot;d.animatedProperties={};for(P in t){if(S=e.camelCase(P),P!==S&&(t[S]=t[P],delete t[P]),b=t[S],e.isArray(b)?(d.animatedProperties[S]=b[1],b=t[S]=b[0]):d.animatedProperties[S]=d.specialEasing&&d.specialEasing[S]||d.easing||"swing",b==="hide"&&w||b==="show"&&!w)return d.complete.call(this);p&&(S==="height"||S==="width")&&(d.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],e.css(this,"display")==="inline"&&e.css(this,"float")==="none"&&(!e.support.inlineBlockNeedsLayout||et(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}d.overflow!=null&&(this.style.overflow="hidden");for(P in t)A=new e.fx(this,d,P),b=t[P],Fi.test(b)?(ot=e._data(this,"toggle"+P)||(b==="toggle"?w?"show":"hide":0),ot?(e._data(this,"toggle"+P,ot==="show"?"hide":"show"),A[ot]()):A[b]()):(N=Oi.exec(b),W=A.cur(),N?(Q=parseFloat(N[2]),lt=N[3]||(e.cssNumber[P]?"":"px"),lt!=="px"&&(e.style(this,P,(Q||1)+lt),W=(Q||1)/A.cur()*W,e.style(this,P,W+lt)),N[1]&&(Q=(N[1]==="-="?-1:1)*Q+W),A.custom(W,Q,lt)):A.custom(W,b,""));return!0}var u=e.speed(i,n,s);return e.isEmptyObject(t)?this.each(u.complete,[!1]):(t=e.extend({},t),u.queue===!1?this.each(l):this.queue(u.queue,l))},stop:function(t,i,n){return typeof t!="string"&&(n=i,i=t,t=O),i&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){function s(w,S,b){var P=S[b];e.removeData(w,b,!0),P.stop(n)}var l,u=!1,d=e.timers,p=e._data(this);if(n||e._unmark(!0,this),t==null)for(l in p)p[l].stop&&l.indexOf(".run")===l.length-4&&s(this,p,l);else p[l=t+".run"]&&p[l].stop&&s(this,p,l);for(l=d.length;l--;)d[l].elem===this&&(t==null||d[l].queue===t)&&(n?d[l](!0):d[l].saveState(),u=!0,d.splice(l,1));(!n||!u)&&e.dequeue(this,t)})}}),e.each({slideDown:J("show",1),slideUp:J("hide",1),slideToggle:J("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,i){e.fn[t]=function(n,s,l){return this.animate(i,n,s,l)}}),e.extend({speed:function(t,i,n){var s=t&&typeof t=="object"?e.extend({},t):{complete:n||!n&&i||e.isFunction(t)&&t,duration:t,easing:n&&i||i&&!e.isFunction(i)&&i};return s.duration=e.fx.off?0:typeof s.duration=="number"?s.duration:s.duration in e.fx.speeds?e.fx.speeds[s.duration]:e.fx.speeds._default,(s.queue==null||s.queue===!0)&&(s.queue="fx"),s.old=s.complete,s.complete=function(l){e.isFunction(s.old)&&s.old.call(this),s.queue?e.dequeue(this,s.queue):l!==!1&&e._unmark(this)},s},easing:{linear:function(t,i,n,s){return n+s*t},swing:function(t,i,n,s){return(-Math.cos(t*Math.PI)/2+.5)*s+n}},timers:[],fx:function(t,i,n){this.options=i,this.elem=t,this.prop=n,i.orig=i.orig||{}}}),e.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(e.fx.step[this.prop]||e.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var t,i=e.css(this.elem,this.prop);return isNaN(t=parseFloat(i))?!i||i==="auto"?0:i:t},custom:function(t,i,n){function s(d){return l.step(d)}var l=this,u=e.fx;this.startTime=Ee||$(),this.end=i,this.now=this.start=t,this.pos=this.state=0,this.unit=n||this.unit||(e.cssNumber[this.prop]?"":"px"),s.queue=this.options.queue,s.elem=this.elem,s.saveState=function(){l.options.hide&&e._data(l.elem,"fxshow"+l.prop)===O&&e._data(l.elem,"fxshow"+l.prop,l.start)},s()&&e.timers.push(s)&&!De&&(De=setInterval(u.tick,u.interval))},show:function(){var t=e._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=t||e.style(this.elem,this.prop),this.options.show=!0,t!==O?this.custom(this.cur(),t):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),e(this.elem).show()},hide:function(){this.options.orig[this.prop]=e._data(this.elem,"fxshow"+this.prop)||e.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(t){var i,n,s,l=Ee||$(),u=!0,d=this.elem,p=this.options;if(t||l>=p.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),p.animatedProperties[this.prop]=!0;for(i in p.animatedProperties)p.animatedProperties[i]!==!0&&(u=!1);if(u){if(p.overflow!=null&&!e.support.shrinkWrapBlocks&&e.each(["","X","Y"],function(w,S){d.style["overflow"+S]=p.overflow[w]}),p.hide&&e(d).hide(),p.hide||p.show)for(i in p.animatedProperties)e.style(d,i,p.orig[i]),e.removeData(d,"fxshow"+i,!0),e.removeData(d,"toggle"+i,!0);s=p.complete,s&&(p.complete=!1,s.call(d))}return!1}return p.duration==1/0?this.now=l:(n=l-this.startTime,this.state=n/p.duration,this.pos=e.easing[p.animatedProperties[this.prop]](this.state,n,0,1,p.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},e.extend(e.fx,{tick:function(){for(var t,i=e.timers,n=0;n<i.length;n++)t=i[n],!t()&&i[n]===t&&i.splice(n--,1);i.length||e.fx.stop()},interval:13,stop:function(){clearInterval(De),De=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(t){e.style(t.elem,"opacity",t.now)},_default:function(t){t.elem.style&&t.elem.style[t.prop]!=null?t.elem.style[t.prop]=t.now+t.unit:t.elem[t.prop]=t.now}}}),e.each(["width","height"],function(t,i){e.fx.step[i]=function(n){e.style(n.elem,i,Math.max(0,n.now))}}),e.expr&&e.expr.filters&&(e.expr.filters.animated=function(t){return e.grep(e.timers,function(i){return t===i.elem}).length});var Ri=/^t(?:able|d|h)$/i,si=/^(?:body|html)$/i;"getBoundingClientRect"in j.documentElement?e.fn.offset=function(t){var i=this[0],n;if(t)return this.each(function(N){e.offset.setOffset(this,t,N)});if(!i||!i.ownerDocument)return null;if(i===i.ownerDocument.body)return e.offset.bodyOffset(i);try{n=i.getBoundingClientRect()}catch(N){}var s=i.ownerDocument,l=s.documentElement;if(!n||!e.contains(l,i))return n?{top:n.top,left:n.left}:{top:0,left:0};var u=s.body,d=Z(s),p=l.clientTop||u.clientTop||0,w=l.clientLeft||u.clientLeft||0,S=d.pageYOffset||e.support.boxModel&&l.scrollTop||u.scrollTop,b=d.pageXOffset||e.support.boxModel&&l.scrollLeft||u.scrollLeft,P=n.top+S-p,A=n.left+b-w;return{top:P,left:A}}:e.fn.offset=function(t){var i=this[0];if(t)return this.each(function(P){e.offset.setOffset(this,t,P)});if(!i||!i.ownerDocument)return null;if(i===i.ownerDocument.body)return e.offset.bodyOffset(i);for(var n,s=i.offsetParent,l=i.ownerDocument,u=l.documentElement,d=l.body,p=l.defaultView,w=p?p.getComputedStyle(i,null):i.currentStyle,S=i.offsetTop,b=i.offsetLeft;(i=i.parentNode)&&i!==d&&i!==u&&!(e.support.fixedPosition&&w.position==="fixed");)n=p?p.getComputedStyle(i,null):i.currentStyle,S-=i.scrollTop,b-=i.scrollLeft,i===s&&(S+=i.offsetTop,b+=i.offsetLeft,e.support.doesNotAddBorder&&(!e.support.doesAddBorderForTableAndCells||!Ri.test(i.nodeName))&&(S+=parseFloat(n.borderTopWidth)||0,b+=parseFloat(n.borderLeftWidth)||0),s=i.offsetParent),e.support.subtractsBorderForOverflowNotVisible&&n.overflow!=="visible"&&(S+=parseFloat(n.borderTopWidth)||0,b+=parseFloat(n.borderLeftWidth)||0),w=n;return(w.position==="relative"||w.position==="static")&&(S+=d.offsetTop,b+=d.offsetLeft),e.support.fixedPosition&&w.position==="fixed"&&(S+=Math.max(u.scrollTop,d.scrollTop),b+=Math.max(u.scrollLeft,d.scrollLeft)),{top:S,left:b}},e.offset={bodyOffset:function(t){var i=t.offsetTop,n=t.offsetLeft;return e.support.doesNotIncludeMarginInBodyOffset&&(i+=parseFloat(e.css(t,"marginTop"))||0,n+=parseFloat(e.css(t,"marginLeft"))||0),{top:i,left:n}},setOffset:function(t,i,n){var s=e.css(t,"position");s==="static"&&(t.style.position="relative");var l=e(t),u=l.offset(),d=e.css(t,"top"),p=e.css(t,"left"),w=(s==="absolute"||s==="fixed")&&e.inArray("auto",[d,p])>-1,S={},b={},P,A;w?(b=l.position(),P=b.top,A=b.left):(P=parseFloat(d)||0,A=parseFloat(p)||0),e.isFunction(i)&&(i=i.call(t,n,u)),i.top!=null&&(S.top=i.top-u.top+P),i.left!=null&&(S.left=i.left-u.left+A),"using"in i?i.using.call(t,S):l.css(S)}},e.fn.extend({position:function(){if(!this[0])return null;var t=this[0],i=this.offsetParent(),n=this.offset(),s=si.test(i[0].nodeName)?{top:0,left:0}:i.offset();return n.top-=parseFloat(e.css(t,"marginTop"))||0,n.left-=parseFloat(e.css(t,"marginLeft"))||0,s.top+=parseFloat(e.css(i[0],"borderTopWidth"))||0,s.left+=parseFloat(e.css(i[0],"borderLeftWidth"))||0,{top:n.top-s.top,left:n.left-s.left}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||j.body;t&&!si.test(t.nodeName)&&e.css(t,"position")==="static";)t=t.offsetParent;return t})}}),e.each(["Left","Top"],function(t,i){var n="scroll"+i;e.fn[n]=function(s){var l,u;return s===O?(l=this[0],l?(u=Z(l),u?"pageXOffset"in u?u[t?"pageYOffset":"pageXOffset"]:e.support.boxModel&&u.document.documentElement[n]||u.document.body[n]:l[n]):null):this.each(function(){u=Z(this),u?u.scrollTo(t?e(u).scrollLeft():s,t?s:e(u).scrollTop()):this[n]=s})}}),e.each(["Height","Width"],function(t,i){var n=i.toLowerCase();e.fn["inner"+i]=function(){var s=this[0];return s?s.style?parseFloat(e.css(s,n,"padding")):this[n]():null},e.fn["outer"+i]=function(s){var l=this[0];return l?l.style?parseFloat(e.css(l,n,s?"margin":"border")):this[n]():null},e.fn[n]=function(s){var l=this[0];if(!l)return s==null?null:this;if(e.isFunction(s))return this.each(function(S){var b=e(this);b[n](s.call(this,S,b[n]()))});if(e.isWindow(l)){var u=l.document.documentElement["client"+i],d=l.document.body;return l.document.compatMode==="CSS1Compat"&&u||d&&d["client"+i]||u}if(l.nodeType===9)return Math.max(l.documentElement["client"+i],l.body["scroll"+i],l.documentElement["scroll"+i],l.body["offset"+i],l.documentElement["offset"+i]);if(s===O){var p=e.css(l,n),w=parseFloat(p);return e.isNumeric(w)?w:p}return this.css(n,typeof s=="string"?s:s+"px")}}),E.jQuery=E.$=e})(window);(function(E){var O,Z,et="",J="4.1.0",Bt=Math.PI,$=Bt/2,ut="ontouchstart"in window,bt=ut?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},Pt={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br","l","r"]},nt=["single","double"],dt=["ltr","rtl"],Et={acceleration:!0,display:"double",duration:600,page:1,gradients:!0,turnCorners:"bl,br",when:null},_t={cornerSize:100},Ct=6,U={init:function(r){O="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,Z=y(),et=tt();var o,e=0,f=this.data(),v=this.children();if(r=E.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},Et,r),f.opts=r,f.pageObjs={},f.pages={},f.pageWrap={},f.pageZoom={},f.pagePlace={},f.pageMv=[],f.zoom=1,f.totalPages=r.pages||0,f.eventHandlers={touchStart:E.proxy(U._touchStart,this),touchMove:E.proxy(U._touchMove,this),touchEnd:E.proxy(U._touchEnd,this),start:E.proxy(U._eventStart,this)},r.when)for(o in r.when)F(o,r.when)&&this.bind(o,r.when[o]);for(this.css({position:"relative",width:r.width,height:r.height}),this.turn("display",r.display),r.direction!==""&&this.turn("direction",r.direction),O&&!ut&&r.acceleration&&this.transform(x(0,0,!0)),o=0;o<v.length;o++)E(v[o]).attr("ignore")!="1"&&this.turn("addPage",v[o],++e);return E(this).bind(bt.down,f.eventHandlers.touchStart).bind("end",U._eventEnd).bind("pressed",U._eventPressed).bind("released",U._eventReleased).bind("flip",U._flip),E(this).parent().bind("start",f.eventHandlers.start),E(document).bind(bt.move,f.eventHandlers.touchMove).bind(bt.up,f.eventHandlers.touchEnd),this.turn("page",r.page),f.done=!0,this},addPage:function(r,o){var e,f,v=!1,_=this.data(),V=_.totalPages+1;if(_.destroying)return!1;if((e=/\bp([0-9]+)\b/.exec(E(r).attr("class")))&&(o=parseInt(e[1],10)),o){if(o==V)v=!0;else if(o>V)throw At('Page "'+o+'" cannot be inserted')}else o=V,v=!0;return o>=1&&o<=V&&(_.display=="double"?f=o%2?" odd":" even":f="",_.done&&this.turn("stop"),o in _.pageObjs&&U._movePages.call(this,o,1),v&&(_.totalPages=V),_.pageObjs[o]=E(r).css({float:"left"}).addClass("page p"+o+f),!j()&&_.pageObjs[o].hasClass("hard")&&_.pageObjs[o].removeClass("hard"),U._addPage.call(this,o),U._removeFromDOM.call(this)),this},_addPage:function(r){var o=this.data(),e=o.pageObjs[r];if(e)if(U._necessPage.call(this,r)){if(!o.pageWrap[r]){o.pageWrap[r]=E("<div/>",{class:"page-wrapper",page:r,css:{position:"absolute",overflow:"hidden"}}),this.append(o.pageWrap[r]),o.pagePlace[r]||(o.pagePlace[r]=r,o.pageObjs[r].appendTo(o.pageWrap[r]));var f=U._pageSize.call(this,r,!0);e.css({width:f.width,height:f.height}),o.pageWrap[r].css(f)}o.pagePlace[r]==r&&U._makeFlip.call(this,r)}else o.pagePlace[r]=0,o.pageObjs[r]&&o.pageObjs[r].remove()},hasPage:function(r){return F(r,this.data().pageObjs)},center:function(r){var o=this.data(),e=E(this).turn("size"),f=0;if(!o.noCenter){if(o.display=="double"){var v=this.turn("view",r||o.tpage||o.page);o.direction=="ltr"?v[0]?v[1]||(f+=e.width/4):f-=e.width/4:v[0]?v[1]||(f-=e.width/4):f+=e.width/4}E(this).css({marginLeft:f})}return this},destroy:function(){var r=this,o=this.data(),e=["end","first","flip","last","pressed","released","start","turning","turned","zooming","missing"];if(xt("destroying",this)!="prevented"){for(o.destroying=!0,E.each(e,function(f,v){r.unbind(v)}),this.parent().unbind("start",o.eventHandlers.start),E(document).unbind(bt.move,o.eventHandlers.touchMove).unbind(bt.up,o.eventHandlers.touchEnd);o.totalPages!==0;)this.turn("removePage",o.totalPages);return o.fparent&&o.fparent.remove(),o.shadow&&o.shadow.remove(),this.removeData(),o=null,this}},is:function(){return typeof this.data().pages=="object"},zoom:function(r){var o=this.data();if(typeof r=="number"){if(r<.001||r>100)throw At(r+" is not a value for zoom");if(xt("zooming",this,[r,o.zoom])=="prevented")return this;var e=this.turn("size"),f=this.turn("view"),v=1/o.zoom,_=Math.round(e.width*v*r),V=Math.round(e.height*v*r);o.zoom=r,E(this).turn("stop").turn("size",_,V),o.opts.autoCenter&&this.turn("center"),U._updateShadow.call(this);for(var X=0;X<f.length;X++)f[X]&&o.pageZoom[f[X]]!=o.zoom&&(this.trigger("zoomed",[f[X],f,o.pageZoom[f[X]],o.zoom]),o.pageZoom[f[X]]=o.zoom);return this}else return o.zoom},_pageSize:function(r,o){var e=this.data(),f={};if(e.display=="single")f.width=this.width(),f.height=this.height(),o&&(f.top=0,f.left=0,f.right="auto");else{var v=this.width()/2,_=this.height();if(e.pageObjs[r].hasClass("own-size")?(f.width=e.pageObjs[r].width(),f.height=e.pageObjs[r].height()):(f.width=v,f.height=_),o){var V=r%2;f.top=(_-f.height)/2,e.direction=="ltr"?(f[V?"right":"left"]=v-f.width,f[V?"left":"right"]="auto"):(f[V?"left":"right"]=v-f.width,f[V?"right":"left"]="auto")}}return f},_makeFlip:function(r){var o=this.data();if(!o.pages[r]&&o.pagePlace[r]==r){var e=o.display=="single",f=r%2;o.pages[r]=o.pageObjs[r].css(U._pageSize.call(this,r)).flip({page:r,next:f||e?r+1:r-1,turn:this}).flip("disable",o.disabled),U._setPageLoc.call(this,r),o.pageZoom[r]=o.zoom}return o.pages[r]},_makeRange:function(){var r,o,e=this.data();if(!(e.totalPages<1))for(o=this.turn("range"),r=o[0];r<=o[1];r++)U._addPage.call(this,r)},range:function(r){var o,e,f,v,_=this.data();if(r=r||_.tpage||_.page||1,v=U._view.call(this,r),r<1||r>_.totalPages)throw At('"'+r+'" is not a valid page');return v[1]=v[1]||v[0],v[0]>=1&&v[1]<=_.totalPages?(o=Math.floor((Ct-2)/2),_.totalPages-v[1]>v[0]?(e=Math.min(v[0]-1,o),f=2*o-e):(f=Math.min(_.totalPages-v[1],o),e=2*o-f)):(e=Ct-1,f=Ct-1),[Math.max(1,v[0]-e),Math.min(_.totalPages,v[1]+f)]},_necessPage:function(r){if(r===0)return!0;var o=this.turn("range");return this.data().pageObjs[r].hasClass("fixed")||r>=o[0]&&r<=o[1]},_removeFromDOM:function(){var r,o=this.data();for(r in o.pageWrap)F(r,o.pageWrap)&&!U._necessPage.call(this,r)&&U._removePageFromDOM.call(this,r)},_removePageFromDOM:function(r){var o=this.data();if(o.pages[r]){var e=o.pages[r].data();K._moveFoldingPage.call(o.pages[r],!1),e.f&&e.f.fwrapper&&e.f.fwrapper.remove(),o.pages[r].removeData(),o.pages[r].remove(),delete o.pages[r]}o.pageObjs[r]&&o.pageObjs[r].remove(),o.pageWrap[r]&&(o.pageWrap[r].remove(),delete o.pageWrap[r]),U._removeMv.call(this,r),delete o.pagePlace[r],delete o.pageZoom[r]},removePage:function(r){var o=this.data();if(r=="*")for(;o.totalPages!==0;)this.turn("removePage",o.totalPages);else{if(r<1||r>o.totalPages)throw At("The page "+r+" doesn't exist");o.pageObjs[r]&&(this.turn("stop"),U._removePageFromDOM.call(this,r),delete o.pageObjs[r]),U._movePages.call(this,r,-1),o.totalPages=o.totalPages-1,o.page>o.totalPages?(o.page=null,U._fitPage.call(this,o.totalPages)):(U._makeRange.call(this),this.turn("update"))}return this},_movePages:function(r,o){var e,f=this,v=this.data(),_=v.display=="single",V=function(X){var rt=X+o,ft=rt%2,wt=ft?" odd ":" even ";v.pageObjs[X]&&(v.pageObjs[rt]=v.pageObjs[X].removeClass("p"+X+" odd even").addClass("p"+rt+wt)),v.pagePlace[X]&&v.pageWrap[X]&&(v.pagePlace[rt]=rt,v.pageObjs[rt].hasClass("fixed")?v.pageWrap[rt]=v.pageWrap[X].attr("page",rt):v.pageWrap[rt]=v.pageWrap[X].css(U._pageSize.call(f,rt,!0)).attr("page",rt),v.pages[X]&&(v.pages[rt]=v.pages[X].flip("options",{page:rt,next:_||ft?rt+1:rt-1})),o&&(delete v.pages[X],delete v.pagePlace[X],delete v.pageZoom[X],delete v.pageObjs[X],delete v.pageWrap[X]))};if(o>0)for(e=v.totalPages;e>=r;e--)V(e);else for(e=r;e<=v.totalPages;e++)V(e)},display:function(r){var o=this.data(),e=o.display;if(r===void 0)return e;if(E.inArray(r,nt)==-1)throw At('"'+r+'" is not a value for display');switch(r){case"single":o.pageObjs[0]||(this.turn("stop").css({overflow:"hidden"}),o.pageObjs[0]=E("<div />",{class:"page p-temporal"}).css({width:this.width(),height:this.height()}).appendTo(this)),this.addClass("shadow");break;case"double":o.pageObjs[0]&&(this.turn("stop").css({overflow:""}),o.pageObjs[0].remove(),delete o.pageObjs[0]),this.removeClass("shadow");break}if(o.display=r,e){var f=this.turn("size");U._movePages.call(this,1,0),this.turn("size",f.width,f.height).turn("update")}return this},direction:function(r){var o=this.data();if(r===void 0)return o.direction;if(r=r.toLowerCase(),E.inArray(r,dt)==-1)throw At('"'+r+'" is not a value for direction');return r=="rtl"&&E(this).attr("dir","ltr").css({direction:"ltr"}),o.direction=r,o.done&&this.turn("size",E(this).width(),E(this).height()),this},animating:function(){return this.data().pageMv.length>0},corner:function(){var r,o,e=this.data();for(o in e.pages)if(F(o,e.pages)&&(r=e.pages[o].flip("corner")))return r;return!1},data:function(){return this.data()},disable:function(r){var o,e=this.data(),f=this.turn("view");e.disabled=r===void 0||r===!0;for(o in e.pages)F(o,e.pages)&&e.pages[o].flip("disable",e.disabled?!0:E.inArray(parseInt(o,10),f)==-1);return this},disabled:function(r){return r===void 0?this.data().disabled===!0:this.turn("disable",r)},size:function(r,o){if(r===void 0||o===void 0)return{width:this.width(),height:this.height()};this.turn("stop");var e,f,v=this.data(),_=v.display=="double"?r/2:r;this.css({width:r,height:o}),v.pageObjs[0]&&v.pageObjs[0].css({width:_,height:o});for(e in v.pageWrap)F(e,v.pageWrap)&&(f=U._pageSize.call(this,e,!0),v.pageObjs[e].css({width:f.width,height:f.height}),v.pageWrap[e].css(f),v.pages[e]&&v.pages[e].css({width:f.width,height:f.height}));return this.turn("resize"),this},resize:function(){var r,o=this.data();for(o.pages[0]&&(o.pageWrap[0].css({left:-this.width()}),o.pages[0].flip("resize",!0)),r=1;r<=o.totalPages;r++)o.pages[r]&&o.pages[r].flip("resize",!0);U._updateShadow.call(this),o.opts.autoCenter&&this.turn("center")},_removeMv:function(r){var o,e=this.data();for(o=0;o<e.pageMv.length;o++)if(e.pageMv[o]==r)return e.pageMv.splice(o,1),!0;return!1},_addMv:function(r){var o=this.data();U._removeMv.call(this,r),o.pageMv.push(r)},_view:function(r){var o=this.data();return r=r||o.page,o.display=="double"?r%2?[r-1,r]:[r,r+1]:[r]},view:function(r){var o=this.data(),e=U._view.call(this,r);return o.display=="double"?[e[0]>0?e[0]:0,e[1]<=o.totalPages?e[1]:0]:[e[0]>0&&e[0]<=o.totalPages?e[0]:0]},stop:function(r,o){if(this.turn("animating")){var e,f,v,_=this.data();for(_.tpage&&(_.page=_.tpage,delete _.tpage),e=0;e<_.pageMv.length;e++)!_.pageMv[e]||_.pageMv[e]===r||(v=_.pages[_.pageMv[e]],f=v.data().f.opts,v.flip("hideFoldedPage",o),o||K._moveFoldingPage.call(v,!1),f.force&&(f.next=f.page%2===0?f.page-1:f.page+1,delete f.force))}return this.turn("update"),this},pages:function(r){var o=this.data();if(r){if(r<o.totalPages)for(var e=o.totalPages;e>r;e--)this.turn("removePage",e);return o.totalPages=r,U._fitPage.call(this,o.page),this}else return o.totalPages},_missing:function(r){var o=this.data();if(!(o.totalPages<1)){var e,f=this.turn("range",r),v=[];for(e=f[0];e<=f[1];e++)o.pageObjs[e]||v.push(e);v.length>0&&this.trigger("missing",[v])}},_fitPage:function(r){var o=this.data(),e=this.turn("view",r);if(U._missing.call(this,r),!!o.pageObjs[r]){o.page=r,this.turn("stop");for(var f=0;f<e.length;f++)e[f]&&o.pageZoom[e[f]]!=o.zoom&&(this.trigger("zoomed",[e[f],e,o.pageZoom[e[f]],o.zoom]),o.pageZoom[e[f]]=o.zoom);U._removeFromDOM.call(this),U._makeRange.call(this),U._updateShadow.call(this),this.trigger("turned",[r,e]),this.turn("update"),o.opts.autoCenter&&this.turn("center")}},_turnPage:function(r){var o,e,f=this.data(),v=f.pagePlace[r],_=this.turn("view"),V=this.turn("view",r);if(f.page!=r){var X=f.page;if(xt("turning",this,[r,V])=="prevented"){X==f.page&&E.inArray(v,f.pageMv)!=-1&&f.pages[v].flip("hideFoldedPage",!0);return}E.inArray(1,V)!=-1&&this.trigger("first"),E.inArray(f.totalPages,V)!=-1&&this.trigger("last")}f.display=="single"?(o=_[0],e=V[0]):_[1]&&r>_[1]?(o=_[1],e=V[0]):_[0]&&r<_[0]&&(o=_[0],e=V[1]);var rt=f.opts.turnCorners.split(","),ft=f.pages[o].data().f,wt=ft.opts,St=ft.point;U._missing.call(this,r),f.pageObjs[r]&&(this.turn("stop"),f.page=r,U._makeRange.call(this),f.tpage=e,wt.next!=e&&(wt.next=e,wt.force=!0),this.turn("update"),ft.point=St,ft.effect=="hard"?f.direction=="ltr"?f.pages[o].flip("turnPage",r>o?"r":"l"):f.pages[o].flip("turnPage",r>o?"l":"r"):f.direction=="ltr"?f.pages[o].flip("turnPage",rt[r>o?1:0]):f.pages[o].flip("turnPage",rt[r>o?0:1]))},page:function(r){var o=this.data();if(r===void 0)return o.page;if(!o.disabled&&!o.destroying){if(r=parseInt(r,10),r>0&&r<=o.totalPages)return r!=o.page&&(!o.done||E.inArray(r,this.turn("view"))!=-1?U._fitPage.call(this,r):U._turnPage.call(this,r)),this;throw At("The page "+r+" does not exist")}},next:function(){return this.turn("page",Math.min(this.data().totalPages,U._view.call(this,this.data().page).pop()+1))},previous:function(){return this.turn("page",Math.max(1,U._view.call(this,this.data().page).shift()-1))},peel:function(r,o){var e=this.data(),f=this.turn("view");if(o=o===void 0?!0:o===!0,r===!1)this.turn("stop",null,o);else if(e.display=="single")e.pages[e.page].flip("peel",r,o);else{var v;e.direction=="ltr"?v=r.indexOf("l")!=-1?f[0]:f[1]:v=r.indexOf("l")!=-1?f[1]:f[0],e.pages[v]&&e.pages[v].flip("peel",r,o)}return this},_addMotionPage:function(){var r=E(this).data().f.opts,o=r.turn;o.data(),U._addMv.call(o,r.page)},_eventStart:function(r,o,e){var f=o.turn.data(),v=f.pageZoom[o.page];if(r.isDefaultPrevented()){U._updateShadow.call(o.turn);return}v&&v!=f.zoom&&(o.turn.trigger("zoomed",[o.page,o.turn.turn("view",o.page),v,f.zoom]),f.pageZoom[o.page]=f.zoom),f.display=="single"&&e&&(e.charAt(1)=="l"&&f.direction=="ltr"||e.charAt(1)=="r"&&f.direction=="rtl"?(o.next=o.next<o.page?o.next:o.page-1,o.force=!0):o.next=o.next>o.page?o.next:o.page+1),U._addMotionPage.call(r.target),U._updateShadow.call(o.turn)},_eventEnd:function(r,o,e){var f=E(r.target);f.data().f;var v=o.turn,_=v.data();if(e){var V=_.tpage||_.page;(V==o.next||V==o.page)&&(delete _.tpage,U._fitPage.call(v,V||o.next,!0))}else U._removeMv.call(v,o.page),U._updateShadow.call(v),v.turn("update")},_eventPressed:function(r){var o=E(r.target).data().f,e=o.opts.turn,f=e.data();return f.pages,f.mouseAction=!0,e.turn("update"),o.time=new Date().getTime()},_eventReleased:function(r,o){var e,f=E(r.target),v=f.data().f,_=v.opts.turn,V=_.data();V.display=="single"?e=o.corner=="br"||o.corner=="tr"?o.x<f.width()/2:o.x>f.width()/2:e=o.x<0||o.x>f.width(),(new Date().getTime()-v.time<200||e)&&(r.preventDefault(),U._turnPage.call(_,v.opts.next)),V.mouseAction=!1},_flip:function(r){r.stopPropagation();var o=E(r.target).data().f.opts;o.turn.trigger("turn",[o.next]),o.turn.data().opts.autoCenter&&o.turn.turn("center",o.next)},_touchStart:function(){var r=this.data();for(var o in r.pages)if(F(o,r.pages)&&K._eventStart.apply(r.pages[o],arguments)===!1)return!1},_touchMove:function(){var r=this.data();for(var o in r.pages)F(o,r.pages)&&K._eventMove.apply(r.pages[o],arguments)},_touchEnd:function(){var r=this.data();for(var o in r.pages)F(o,r.pages)&&K._eventEnd.apply(r.pages[o],arguments)},calculateZ:function(r){var o,e,f,v,_,V=this,X=this.data(),rt=this.turn("view"),ft=rt[0]||rt[1],wt=r.length-1,St={pageZ:{},partZ:{},pageV:{}},qt=function(zt){var Ft=V.turn("view",zt);Ft[0]&&(St.pageV[Ft[0]]=!0),Ft[1]&&(St.pageV[Ft[1]]=!0)};for(o=0;o<=wt;o++)e=r[o],f=X.pages[e].data().f.opts.next,v=X.pagePlace[e],qt(e),qt(f),_=X.pagePlace[f]==f?f:e,St.pageZ[_]=X.totalPages-Math.abs(ft-_),St.partZ[v]=X.totalPages*2-wt+o;return St},update:function(){var r,o=this.data();if(this.turn("animating")&&o.pageMv[0]!==0){var e,f,v=this.turn("calculateZ",o.pageMv),_=this.turn("corner"),V=this.turn("view"),X=this.turn("view",o.tpage);for(r in o.pageWrap)F(r,o.pageWrap)&&(f=o.pageObjs[r].hasClass("fixed"),o.pageWrap[r].css({display:v.pageV[r]||f?"":"none",zIndex:(o.pageObjs[r].hasClass("hard")?v.partZ[r]:v.pageZ[r])||(f?-1:0)}),(e=o.pages[r])&&(e.flip("z",v.partZ[r]||null),v.pageV[r]&&e.flip("resize"),o.tpage?e.flip("hover",!1).flip("disable",E.inArray(parseInt(r,10),o.pageMv)==-1&&r!=X[0]&&r!=X[1]):e.flip("hover",_===!1).flip("disable",r!=V[0]&&r!=V[1])))}else for(r in o.pageWrap)if(F(r,o.pageWrap)){var rt=U._setPageLoc.call(this,r);o.pages[r]&&o.pages[r].flip("disable",o.disabled||rt!=1).flip("hover",!0).flip("z",null)}return this},_updateShadow:function(){var r,o,e,f=this.data(),v=this.width(),_=this.height(),V=f.display=="single"?v:v/2;r=this.turn("view"),f.shadow||(f.shadow=E("<div />",{class:"shadow",css:at(0,0,0).css}).appendTo(this));for(var X=0;X<f.pageMv.length&&!(!r[0]||!r[1]);X++)r=this.turn("view",f.pages[f.pageMv[X]].data().f.opts.next),o=this.turn("view",f.pageMv[X]),r[0]=r[0]&&o[0],r[1]=r[1]&&o[1];switch(r[0]?r[1]?e=3:e=f.direction=="ltr"?2:1:e=f.direction=="ltr"?1:2,e){case 1:f.shadow.css({width:V,height:_,top:0,left:V});break;case 2:f.shadow.css({width:V,height:_,top:0,left:0});break;case 3:f.shadow.css({width:v,height:_,top:0,left:0});break}},_setPageLoc:function(r){var o=this.data(),e=this.turn("view"),f=0;if(r==e[0]||r==e[1]?f=1:(o.display=="single"&&r==e[0]+1||o.display=="double"&&r==e[0]-2||r==e[1]+2)&&(f=2),!this.turn("animating"))switch(f){case 1:o.pageWrap[r].css({zIndex:o.totalPages,display:""});break;case 2:o.pageWrap[r].css({zIndex:o.totalPages-1,display:""});break;case 0:o.pageWrap[r].css({zIndex:0,display:o.pageObjs[r].hasClass("fixed")?"":"none"});break}return f},options:function(r){if(r===void 0)return this.data().opts;var o=this.data();if(E.extend(o.opts,r),r.pages&&this.turn("pages",r.pages),r.page&&this.turn("page",r.page),r.display&&this.turn("display",r.display),r.direction&&this.turn("direction",r.direction),r.width&&r.height&&this.turn("size",r.width,r.height),r.when)for(var e in r.when)F(e,r.when)&&this.unbind(e).bind(e,r.when[e]);return this},version:function(){return J}},K={init:function(r){return this.data({f:{disabled:!1,hover:!1,effect:this.hasClass("hard")?"hard":"sheet"}}),this.flip("options",r),K._addPageWrapper.call(this),this},setData:function(r){var o=this.data();return o.f=E.extend(o.f,r),this},options:function(r){var o=this.data().f;return r?(K.setData.call(this,{opts:E.extend({},o.opts||_t,r)}),this):o.opts},z:function(r){var o=this.data().f;return o.opts["z-index"]=r,o.fwrapper&&o.fwrapper.css({zIndex:r||parseInt(o.parent.css("z-index"),10)||0}),this},_cAllowed:function(){var r=this.data().f,o=r.opts.page,e=r.opts.turn.data(),f=o%2;return r.effect=="hard"?e.direction=="ltr"?[f?"r":"l"]:[f?"l":"r"]:e.display=="single"?o==1?e.direction=="ltr"?Pt.forward:Pt.backward:o==e.totalPages?e.direction=="ltr"?Pt.backward:Pt.forward:Pt.all:e.direction=="ltr"?Pt[f?"forward":"backward"]:Pt[f?"backward":"forward"]},_cornerActivated:function(r){var o=this.data().f,e=this.width(),f=this.height(),v={x:r.x,y:r.y,corner:""},_=o.opts.cornerSize;if(v.x<=0||v.y<=0||v.x>=e||v.y>=f)return!1;var V=K._cAllowed.call(this);switch(o.effect){case"hard":if(v.x>e-_)v.corner="r";else if(v.x<_)v.corner="l";else return!1;break;case"sheet":if(v.y<_)v.corner+="t";else if(v.y>=f-_)v.corner+="b";else return!1;if(v.x<=_)v.corner+="l";else if(v.x>=e-_)v.corner+="r";else return!1;break}return!v.corner||E.inArray(v.corner,V)==-1?!1:v},_isIArea:function(r){var o=this.data().f.parent.offset();return r=ut&&r.originalEvent?r.originalEvent.touches[0]:r,K._cornerActivated.call(this,{x:r.pageX-o.left,y:r.pageY-o.top})},_c:function(r,o){switch(o=o||0,r){case"tl":return h(o,o);case"tr":return h(this.width()-o,o);case"bl":return h(o,this.height()-o);case"br":return h(this.width()-o,this.height()-o);case"l":return h(o,0);case"r":return h(this.width()-o,0)}},_c2:function(r){switch(r){case"tl":return h(this.width()*2,0);case"tr":return h(-this.width(),0);case"bl":return h(this.width()*2,this.height());case"br":return h(-this.width(),this.height());case"l":return h(this.width()*2,0);case"r":return h(-this.width(),0)}},_foldingPage:function(){var r=this.data().f;if(r){var o=r.opts;if(o.turn)return r=o.turn.data(),r.display=="single"?o.next>1||o.page>1?r.pageObjs[0]:null:r.pageObjs[o.next]}},_backGradient:function(){var r=this.data().f,o=r.opts.turn.data(),e=o.opts.gradients&&(o.display=="single"||r.opts.page!=2&&r.opts.page!=o.totalPages-1);return e&&!r.bshadow&&(r.bshadow=E("<div/>",at(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(r.parent)),e},type:function(){return this.data().f.effect},resize:function(r){var o=this.data().f,e=o.opts.turn.data(),f=this.width(),v=this.height();switch(o.effect){case"hard":r&&(o.wrapper.css({width:f,height:v}),o.fpage.css({width:f,height:v}),e.opts.gradients&&(o.ashadow.css({width:f,height:v}),o.bshadow.css({width:f,height:v})));break;case"sheet":if(r){var _=Math.round(Math.sqrt(Math.pow(f,2)+Math.pow(v,2)));o.wrapper.css({width:_,height:_}),o.fwrapper.css({width:_,height:_}).children(":first-child").css({width:f,height:v}),o.fpage.css({width:f,height:v}),e.opts.gradients&&o.ashadow.css({width:f,height:v}),K._backGradient.call(this)&&o.bshadow.css({width:f,height:v})}if(o.parent.is(":visible")){var V=Xt(o.parent[0]);o.fwrapper.css({top:V.top,left:V.left}),V=Xt(o.opts.turn[0]),o.fparent.css({top:-V.top,left:-V.left})}this.flip("z",o.opts["z-index"]);break}},_addPageWrapper:function(){var r=this.data().f,o=r.opts.turn.data(),e=this.parent();if(r.parent=e,!r.wrapper)switch(r.effect){case"hard":var f={};f[et+"transform-style"]="preserve-3d",f[et+"backface-visibility"]="hidden",r.wrapper=E("<div/>",at(0,0,2)).css(f).appendTo(e).prepend(this),r.fpage=E("<div/>",at(0,0,1)).css(f).appendTo(e),o.opts.gradients&&(r.ashadow=E("<div/>",at(0,0,0)).hide().appendTo(e),r.bshadow=E("<div/>",at(0,0,0)));break;case"sheet":if(this.width(),this.height(),r.fparent=r.opts.turn.data().fparent,!r.fparent){var v=E("<div/>",{css:{"pointer-events":"none"}}).hide();v.data().flips=0,v.css(at(0,0,"auto","visible").css).appendTo(r.opts.turn),r.opts.turn.data().fparent=v,r.fparent=v}this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),r.wrapper=E("<div/>",at(0,0,this.css("z-index"))).appendTo(e).prepend(this),r.fwrapper=E("<div/>",at(e.offset().top,e.offset().left)).hide().appendTo(r.fparent),r.fpage=E("<div/>",at(0,0,0,"visible")).css({cursor:"default"}).appendTo(r.fwrapper),o.opts.gradients&&(r.ashadow=E("<div/>",at(0,0,1)).appendTo(r.fpage)),K.setData.call(this,r);break}K.resize.call(this,!0)},_fold:function(r){var o=this.data().f,e=o.opts.turn.data(),f=K._c.call(this,r.corner),v=this.width(),_=this.height();switch(o.effect){case"hard":r.corner=="l"?r.x=Math.min(Math.max(r.x,0),v*2):r.x=Math.max(Math.min(r.x,v),-v);var V,X,rt,ft,wt,St=e.totalPages,qt=o.opts["z-index"]||St,zt={overflow:"visible"},Ft=f.x?(f.x-r.x)/v:r.x/v,Nt=Ft*90,Zt=Nt<90;switch(r.corner){case"l":ft="0% 50%",wt="100% 50%",Zt?(V=0,X=o.opts.next-1>0,rt=1):(V="100%",X=o.opts.page+1<St,rt=0);break;case"r":ft="100% 50%",wt="0% 50%",Nt=-Nt,v=-v,Zt?(V=0,X=o.opts.next+1<St,rt=0):(V="-100%",X=o.opts.page!=1,rt=1);break}zt[et+"perspective-origin"]=wt,o.wrapper.transform("rotateY("+Nt+"deg)translate3d(0px, 0px, "+(this.attr("depth")||0)+"px)",wt),o.fpage.transform("translateX("+v+"px) rotateY("+(180+Nt)+"deg)",ft),o.parent.css(zt),Zt?(Ft=-Ft+1,o.wrapper.css({zIndex:qt+1}),o.fpage.css({zIndex:qt})):(Ft=Ft-1,o.wrapper.css({zIndex:qt}),o.fpage.css({zIndex:qt+1})),e.opts.gradients&&(X?o.ashadow.css({display:"",left:V,backgroundColor:"rgba(0,0,0,"+.5*Ft+")"}).transform("rotateY(0deg)"):o.ashadow.hide(),o.bshadow.css({opacity:-Ft+1}),Zt?o.bshadow.parent()[0]!=o.wrapper[0]&&o.bshadow.appendTo(o.wrapper):o.bshadow.parent()[0]!=o.fpage[0]&&o.bshadow.appendTo(o.fpage),yt(o.bshadow,h(rt*100,0),h((-rt+1)*100,0),[[0,"rgba(0,0,0,0.3)"],[1,"rgba(0,0,0,0)"]],2));break;case"sheet":var Kt=this,$t=0,ye,te,ee,ve,Qt,we,_e,Gt=h(0,0),Ce=h(0,0),Mt=h(0,0),Oe=K._foldingPage.call(this),xe=e.opts.acceleration,Ae=o.wrapper.height(),ie=r.corner.substr(0,1)=="t",ne=r.corner.substr(1,1)=="l",le=function(){var Tt=h(0,0),Ht=h(0,0);Tt.x=f.x?f.x-r.x:r.x,Z?Tt.y=f.y?f.y-r.y:r.y:Tt.y=0,Ht.x=ne?v-Tt.x/2:r.x+Tt.x/2,Ht.y=Tt.y/2;var vt=$-Math.atan2(Tt.y,Tt.x),Vt=vt-Math.atan2(Ht.y,Ht.x),se=Math.max(0,Math.sin(Vt)*Math.sqrt(Math.pow(Ht.x,2)+Math.pow(Ht.y,2)));if($t=a(vt),Mt=h(se*Math.sin(vt),se*Math.cos(vt)),vt>$&&(Mt.x=Mt.x+Math.abs(Mt.y*Tt.y/Tt.x),Mt.y=0,Math.round(Mt.x*Math.tan(Bt-vt))<_))return r.y=Math.sqrt(Math.pow(_,2)+2*Ht.x*Tt.x),ie&&(r.y=_-r.y),le();if(vt>$){var he=Bt-vt,de=Ae-_/Math.sin(he);Gt=h(Math.round(de*Math.cos(he)),Math.round(de*Math.sin(he))),ne&&(Gt.x=-Gt.x),ie&&(Gt.y=-Gt.y)}ye=Math.round(Mt.y/Math.tan(vt)+Mt.x);var re=v-ye,ue=re*Math.cos(vt*2),pe=re*Math.sin(vt*2);if(Ce=h(Math.round(ne?re-ue:ye+ue),Math.round(ie?pe:_-pe)),e.opts.gradients){Qt=re*Math.sin(vt);var oe=K._c2.call(Kt,r.corner),Rt=Math.sqrt(Math.pow(oe.x-r.x,2)+Math.pow(oe.y-r.y,2))/v;_e=Math.sin($*(Rt>1?2-Rt:Rt)),we=Math.min(Rt,1),ve=Qt>100?(Qt-100)/Qt:0,te=h(Qt*Math.sin(vt)/v*100,Qt*Math.cos(vt)/_*100),K._backGradient.call(Kt)&&(ee=h(Qt*1.2*Math.sin(vt)/v*100,Qt*1.2*Math.cos(vt)/_*100),ne||(ee.x=100-ee.x),ie||(ee.y=100-ee.y))}return Mt.x=Math.round(Mt.x),Mt.y=Math.round(Mt.y),!0},be=function(Tt,Ht,vt,Vt){var se=["0","auto"],he=(v-Ae)*vt[0]/100,de=(_-Ae)*vt[1]/100,re={left:se[Ht[0]],top:se[Ht[1]],right:se[Ht[2]],bottom:se[Ht[3]]},ue={},pe=Vt!=90&&Vt!=-90?ne?-1:1:0,oe=vt[0]+"% "+vt[1]+"%";Kt.css(re).transform(k(Vt)+x(Tt.x+pe,Tt.y,xe),oe),o.fpage.css(re).transform(k(Vt)+x(Tt.x+Ce.x-Gt.x-v*vt[0]/100,Tt.y+Ce.y-Gt.y-_*vt[1]/100,xe)+k((180/Vt-2)*Vt),oe),o.wrapper.transform(x(-Tt.x+he-pe,-Tt.y+de,xe)+k(-Vt),oe),o.fwrapper.transform(x(-Tt.x+Gt.x+he,-Tt.y+Gt.y+de,xe)+k(-Vt),oe),e.opts.gradients&&(vt[0]&&(te.x=100-te.x),vt[1]&&(te.y=100-te.y),ue["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*_e+")",Oe.css(ue),yt(o.ashadow,h(ne?100:0,ie?0:100),h(te.x,te.y),[[ve,"rgba(0,0,0,0)"],[(1-ve)*.8+ve,"rgba(0,0,0,"+.2*we+")"],[1,"rgba(255,255,255,"+.2*we+")"]],3),K._backGradient.call(Kt)&&yt(o.bshadow,h(ne?0:100,ie?0:100),h(ee.x,ee.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*we+")"],[1,"rgba(0,0,0,0)"]],3))};switch(r.corner){case"l":break;case"r":break;case"tl":r.x=Math.max(r.x,1),le(),be(Mt,[1,0,0,1],[100,0],$t);break;case"tr":r.x=Math.min(r.x,v-1),le(),be(h(-Mt.x,Mt.y),[0,0,0,1],[0,0],-$t);break;case"bl":r.x=Math.max(r.x,1),le(),be(h(Mt.x,-Mt.y),[1,1,0,0],[100,100],-$t);break;case"br":r.x=Math.min(r.x,v-1),le(),be(h(-Mt.x,-Mt.y),[0,1,1,0],[0,100],$t);break}break}o.point=r},_moveFoldingPage:function(r){var o=this.data().f;if(o){var e=o.opts.turn,f=e.data(),v=f.pagePlace;if(r){var _=o.opts.next;if(v[_]!=o.opts.page){o.folding&&K._moveFoldingPage.call(this,!1);var V=K._foldingPage.call(this);V.appendTo(o.fpage),v[_]=o.opts.page,o.folding=_}e.turn("update")}else if(o.folding){if(f.pages[o.folding]){var X=f.pages[o.folding].data().f;f.pageObjs[o.folding].appendTo(X.wrapper)}else f.pageWrap[o.folding]&&f.pageObjs[o.folding].appendTo(f.pageWrap[o.folding]);o.folding in v&&(v[o.folding]=o.folding),delete o.folding}}},_showFoldedPage:function(r,o){var e=K._foldingPage.call(this),f=this.data(),v=f.f,_=v.visible;if(e){if(!_||!v.point||v.point.corner!=r.corner){var V=v.status=="hover"||v.status=="peel"||v.opts.turn.data().mouseAction?r.corner:null;if(_=!1,xt("start",this,[v.opts,V])=="prevented")return!1}if(o){var X=this,rt=v.point&&v.point.corner==r.corner?v.point:K._c.call(this,r.corner,1);this.animatef({from:[rt.x,rt.y],to:[r.x,r.y],duration:500,frame:function(ft){r.x=Math.round(ft[0]),r.y=Math.round(ft[1]),K._fold.call(X,r)}})}else K._fold.call(this,r),f.effect&&!f.effect.turning&&this.animatef(!1);if(!_)switch(v.effect){case"hard":v.visible=!0,K._moveFoldingPage.call(this,!0),v.fpage.show(),v.opts.shadows&&v.bshadow.show();break;case"sheet":v.visible=!0,v.fparent.show().data().flips++,K._moveFoldingPage.call(this,!0),v.fwrapper.show(),v.bshadow&&v.bshadow.show();break}return!0}return!1},hide:function(){var r=this.data().f,o=r.opts.turn.data(),e=K._foldingPage.call(this);switch(r.effect){case"hard":o.opts.gradients&&(r.bshadowLoc=0,r.bshadow.remove(),r.ashadow.hide()),r.wrapper.transform(""),r.fpage.hide();break;case"sheet":--r.fparent.data().flips===0&&r.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),r.wrapper.transform(""),r.fwrapper.hide(),r.bshadow&&r.bshadow.hide(),e.transform("");break}return r.visible=!1,this},hideFoldedPage:function(r){var o=this.data().f;if(o.point){var e=this,f=o.point,v=function(){o.point=null,o.status="",e.flip("hide"),e.trigger("end",[o.opts,!1])};if(r){var _=K._c.call(this,f.corner),V=f.corner.substr(0,1)=="t",X=V?Math.min(0,f.y-_.y)/2:Math.max(0,f.y-_.y)/2,rt=h(f.x,f.y+X),ft=h(_.x,_.y-X);this.animatef({from:0,to:1,frame:function(wt){var St=B(f,rt,ft,_,wt);f.x=St.x,f.y=St.y,K._fold.call(e,f)},complete:v,duration:800,hiding:!0})}else this.animatef(!1),v()}},turnPage:function(r){var o=this,e=this.data().f,f=e.opts.turn.data();r={corner:e.corner?e.corner.corner:r||K._cAllowed.call(this)[0]};var v=e.point||K._c.call(this,r.corner,e.opts.turn?f.opts.elevation:0),_=K._c2.call(this,r.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(V){var X=B(v,v,_,_,V);r.x=X.x,r.y=X.y,K._showFoldedPage.call(o,r)},complete:function(){o.trigger("end",[e.opts,!0])},duration:f.opts.duration,turning:!0}),e.corner=null},moving:function(){return"effect"in this.data()},isTurning:function(){return this.flip("moving")&&this.data().effect.turning},corner:function(){return this.data().f.corner},_eventStart:function(r){var o=this.data().f,e=o.opts.turn;if(!o.corner&&!o.disabled&&!this.flip("isTurning")&&o.opts.page==e.data().pagePlace[o.opts.page]){if(o.corner=K._isIArea.call(this,r),o.corner&&K._foldingPage.call(this))return this.trigger("pressed",[o.point]),K._showFoldedPage.call(this,o.corner),!1;o.corner=null}},_eventMove:function(r){var o=this.data().f;if(!o.disabled){if(r=ut?r.originalEvent.touches:[r],o.corner){var e=o.parent.offset();o.corner.x=r[0].pageX-e.left,o.corner.y=r[0].pageY-e.top,K._showFoldedPage.call(this,o.corner)}else if(o.hover&&!this.data().effect&&this.is(":visible")){var f=K._isIArea.call(this,r[0]);if(f){if(o.effect=="sheet"&&f.corner.length==2||o.effect=="hard"){o.status="hover";var v=K._c.call(this,f.corner,o.opts.cornerSize/2);f.x=v.x,f.y=v.y,K._showFoldedPage.call(this,f,!0)}}else o.status=="hover"&&(o.status="",K.hideFoldedPage.call(this,!0))}}},_eventEnd:function(){var r=this.data().f,o=r.corner;!r.disabled&&o&&xt("released",this,[r.point||o])!="prevented"&&K.hideFoldedPage.call(this,!0),r.corner=null},disable:function(r){return K.setData.call(this,{disabled:r}),this},hover:function(r){return K.setData.call(this,{hover:r}),this},peel:function(r,o){var e=this.data().f;if(r){if(E.inArray(r,Pt.all)==-1)throw At("Corner "+r+" is not permitted");if(E.inArray(r,K._cAllowed.call(this))!=-1){var f=K._c.call(this,r,e.opts.cornerSize/2);e.status="peel",K._showFoldedPage.call(this,{corner:r,x:f.x,y:f.y},o)}}else e.status="",K.hideFoldedPage.call(this,o);return this}};function ht(r,o,e){if(!e[0]||typeof e[0]=="object")return o.init.apply(r,e);if(o[e[0]])return o[e[0]].apply(r,Array.prototype.slice.call(e,1));throw At(e[0]+" is not a method or property")}function at(r,o,e,f){return{css:{position:"absolute",top:r,left:o,overflow:f||"hidden",zIndex:e||"auto"}}}function B(r,o,e,f,v){var _=1-v,V=_*_*_,X=v*v*v;return h(Math.round(V*r.x+3*v*_*_*o.x+3*v*v*_*e.x+X*f.x),Math.round(V*r.y+3*v*_*_*o.y+3*v*v*_*e.y+X*f.y))}function a(r){return r/Bt*180}function h(r,o){return{x:r,y:o}}function y(){var r;if(r=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent)){var o=parseFloat(r[1]);return o>534.3}else return!0}function x(r,o,e){return O&&e?" translate3d("+r+"px,"+o+"px, 0px) ":" translate("+r+"px, "+o+"px) "}function k(r){return" rotate("+r+"deg) "}function F(r,o){return Object.prototype.hasOwnProperty.call(o,r)}function tt(){for(var r=["Moz","Webkit","Khtml","O","ms"],o=r.length,e="";o--;)r[o]+"Transform"in document.body.style&&(e="-"+r[o].toLowerCase()+"-");return e}function st(){var r,o=document.createElement("fakeelement"),e={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(r in e)if(o.style[r]!==void 0)return e[r]}function yt(r,o,e,f,v){var _,V=[];if(et=="-webkit-"){for(_=0;_<v;_++)V.push("color-stop("+f[_][0]+", "+f[_][1]+")");r.css({"background-image":"-webkit-gradient(linear, "+o.x+"% "+o.y+"%,"+e.x+"% "+e.y+"%, "+V.join(",")+" )"})}else{o={x:o.x/100*r.width(),y:o.y/100*r.height()},e={x:e.x/100*r.width(),y:e.y/100*r.height()};var X=e.x-o.x,rt=e.y-o.y,ft=Math.atan2(rt,X),wt=ft-Math.PI/2,St=Math.abs(r.width()*Math.sin(wt))+Math.abs(r.height()*Math.cos(wt)),qt=Math.sqrt(rt*rt+X*X),zt=h(e.x<o.x?r.width():0,e.y<o.y?r.height():0),Ft=Math.tan(ft),Nt=-1/Ft,Zt=(Nt*zt.x-zt.y-Ft*o.x+o.y)/(Nt-Ft),Kt={x:Zt,y:Nt*Zt-Nt*zt.x+zt.y},$t=Math.sqrt(Math.pow(Kt.x-o.x,2)+Math.pow(Kt.y-o.y,2));for(_=0;_<v;_++)V.push(" "+f[_][1]+" "+($t+qt*f[_][0])*100/St+"%");r.css({"background-image":et+"linear-gradient("+-ft+"rad,"+V.join(",")+")"})}}function xt(r,o,e){var f=E.Event(r);return o.trigger(f,e),f.isDefaultPrevented()?"prevented":f.isPropagationStopped()?"stopped":""}function At(r){function o(e){this.name="TurnJsError",this.message=e}return o.prototype=new Error,o.prototype.constructor=o,new o(r)}function Xt(r){var o={top:0,left:0};do o.left+=r.offsetLeft,o.top+=r.offsetTop;while(r=r.offsetParent);return o}function j(){return navigator.userAgent.indexOf("MSIE 9.0")==-1}window.requestAnim=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(r){window.setTimeout(r,1e3/60)}}(),E.extend(E.fn,{flip:function(){return ht(E(this[0]),K,arguments)},turn:function(){return ht(E(this[0]),U,arguments)},transform:function(r,o){var e={};return o&&(e[et+"transform-origin"]=o),e[et+"transform"]=r,this.css(e)},animatef:function(r){var o=this.data();if(o.effect&&o.effect.stop(),r){r.to.length||(r.to=[r.to]),r.from.length||(r.from=[r.from]);for(var e=[],f=r.to.length,v=!0,_=this,V=new Date().getTime(),X=function(){if(!(!o.effect||!v)){for(var ft=[],wt=Math.min(r.duration,new Date().getTime()-V),St=0;St<f;St++)ft.push(o.effect.easing(1,wt,r.from[St],e[St],r.duration));r.frame(f==1?ft[0]:ft),wt==r.duration?(delete o.effect,_.data(o),r.complete&&r.complete()):window.requestAnim(X)}},rt=0;rt<f;rt++)e.push(r.to[rt]-r.from[rt]);o.effect=E.extend({stop:function(){v=!1},easing:function(ft,wt,St,qt,zt){return qt*Math.sqrt(1-(wt=wt/zt-1)*wt)+St}},r),this.data(o),X()}else delete o.effect}}),E.isTouch=ut,E.mouseEvents=bt,E.cssPrefix=tt,E.cssTransitionEnd=st,E.findPos=Xt})(jQuery);const ai={grades:[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5},{text:"六年级",value:6},{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}],bookTypes:{LAST:"上册",NEXT:"下册"}},is=Ie({name:"courseware-list",setup(){hi();const E=ae(!1),O=ae([]),Z=ae([]),et=()=>{ui({api:"goBack"})},J=ke({currentGradeNum:null,bookVersionId:null,page:1,rows:999,type:"COURSEWARE"});zi(()=>ai.grades.map((a,h)=>({...a,color:J.currentGradeNum===h?"var(--van-primary-color)":"",className:J.currentGradeNum===h?"fontBlod":""})));const Bt=ae(!1),$=ke({list:[],loading:!1,favoriteList:[],tab:"all",details:[],bookData:{},showBook:!1,book:{}}),ut=async()=>{try{const a=Ne.user.data.schoolInfos,h=a.length>0?a[0].tenantId:null;if(h){const{data:y}=await Vi({id:h});O.value=y.bookVersionList||[],Z.value=qe(O.value)}}catch(a){}},bt=async()=>{var k;$.loading=!0;const{bookVersionId:a,currentGradeNum:h,...y}=J,x=await Ui({...y,bookversionId:a==-1?null:a,currentGradeNum:h||""});(x==null?void 0:x.code)===200&&Array.isArray((k=x==null?void 0:x.data)==null?void 0:k.rows)&&($.list=x.data.rows.map(F=>(F.load=!1,F.key=Date.now()+F.id,F))),$.loading=!1,Bt.value=!0},Pt=async()=>{var h,y,x;$.loading=!0;const a=await Xi({clientType:"STUDENT",userId:(y=(h=Ne.user)==null?void 0:h.data)==null?void 0:y.id,page:J.page,rows:J.rows,bookVersionId:J.bookVersionId!=-1?J.bookVersionId:"",currentGradeNum:J.currentGradeNum?J.currentGradeNum:""});(a==null?void 0:a.code)===200&&Array.isArray((x=a==null?void 0:a.data)==null?void 0:x.rows)&&($.list=a.data.rows.map(k=>(k.name=`${k.name}`,k.load=!1,k.favoriteFlag=!0,k.key=Date.now()+k.id,k))),$.loading=!1},nt=async()=>{var h;$.loading=!0;const a=await $i({bookVersionId:J.bookVersionId?J.bookVersionId:"",page:J.page,rows:J.rows});(a==null?void 0:a.code)===200&&Array.isArray((h=a==null?void 0:a.data)==null?void 0:h.rows)&&($.list=a.data.rows.map(y=>(y.load=!1,y.key=Date.now()+y.id,y))),$.loading=!1,Bt.value=!0},dt=()=>{$.tab==="all"&&bt(),$.tab==="favorite"&&Pt(),$.tab==="course"&&nt()},Et=()=>{$.tab==="course"?Z.value=[...qe(O.value),{bookVersionId:-1,bookVersionName:"自定义"}]:Z.value=qe(O.value),dt()};Fe(()=>{ut(),dt()});const _t=async a=>{a.favoriteFlag?await Yi({lessonCoursewareId:a.id}):(await Zi({lessonCoursewareId:a.id}),$.tab==="favorite"&&dt())};let Ct=null;const U=(a,h=300)=>{Ct&&clearTimeout(Ct),Ct=setTimeout(a,h)},K=async a=>{var h,y;if($.tab==="course"){const x=await Ki(a.id);if((x==null?void 0:x.code)==200&&Array.isArray((h=x==null?void 0:x.data)==null?void 0:h.lessonList))$.details=x.data.lessonList||[],$.bookData=x.data,console.log("🚀 ~ data.details course:",$.details);else{Gi({title:"提示",message:"课程教材已更新,是否重新加载?"}).then(()=>{dt()}).catch(()=>{});return}}else{const x=await Qi(a.id);(x==null?void 0:x.code)==200&&Array.isArray((y=x==null?void 0:x.data)==null?void 0:y.lessonList)&&($.details=x.data.lessonList||[],$.bookData=x.data,console.log("🚀 ~ data.details:",$.details))}ht(a.id),at(()=>{$.showBook=!0})},ht=a=>{const h=document.querySelector(`[data-id="${a}"]`);if(!h)return;const y=h.getBoundingClientRect();$.book=y},at=a=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{a()})})},B=async a=>{await K(a)};return()=>H("div",{class:mt.container},[H("div",{class:mt.head,style:{opacity:$.showBook?0:""}},[H("div",{class:mt.back,onClick:et},[H("img",{src:pi},null)]),H(nn,{class:mt.tabs,active:$.tab,"onUpdate:active":a=>$.tab=a,onChange:()=>Et()},{default:()=>[H(Ge,{title:"全部教材",name:"all"},null),H(Ge,{title:"课程教材",name:"course"},null),H(Ge,{name:"favorite"},{title:()=>H("div",{id:"courseware-2"},[Ot("我的收藏")])})]}),H(ce,ri({class:[mt.downBtn,$.tab!="course"&&J.bookVersionId>0||$.tab=="course"&&J.bookVersionId||J.currentGradeNum?mt.activeBtn:""],round:!0,size:"small",onClick:()=>E.value=!0},{id:"courseware-3"}),{default:()=>[Ot("筛选"),H("svg",{class:[mt.icon,E.value?mt.iconUp:""],width:"9px",height:"5px",viewBox:"0 0 9 5",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[H("title",null,[Ot("三角形")]),H("g",{id:"演示用",stroke:"none","stroke-width":"1",fill:"currentColor","fill-rule":"evenodd"},[H("g",{id:"全部教材-筛选",transform:"translate(-769.000000, -35.000000)",fill:"currentColor"},[H("g",{id:"编组-3",transform:"translate(696.000000, 20.000000)"},[H("g",{id:"筛选目录备份-2",transform:"translate(13.000000, 7.000000)"},[H("path",{d:"M64.8716471,8.41294119 L68.2489659,12.1655176 C68.4336954,12.3707726 68.4170562,12.6869176 68.2118012,12.8716471 C68.1199888,12.9542782 68.0008397,13 67.8773188,13 L61.1226812,13 C60.8465388,13 60.6226812,12.7761424 60.6226812,12.5 C60.6226812,12.3764791 60.668403,12.25733 60.7510341,12.1655176 L64.1283529,8.41294119 C64.3130824,8.20768618 64.6292274,8.19104698 64.8344824,8.37577649 C64.8475136,8.38750459 64.859919,8.39990996 64.8716471,8.41294119 Z",id:"三角形",transform:"translate(64.500000, 10.500000) rotate(-180.000000) translate(-64.500000, -10.500000) "},null)])])])])])]})]),H("div",{class:mt.content},[H("div",{class:[mt.wrap,$.list.length<=0&&!$.loading?mt.emtpyWrap:""]},[$.list.map((a,h)=>H("div",{class:[mt.wrapItem,$.bookData.id===a.id&&$.showBook?mt.wrapItemHide:""],key:a.key,onClick:()=>B(a)},[H("div",{class:mt.item},[H(Ji,ri({"data-id":a.id},{id:h==0?"courseware-0":""},{class:[mt.cover,a.load?mt.loaded:""],objectFit:"cover",src:a.coverImg,onLoad:()=>{a.load=!0},onError:()=>{a.load=!0}}),null)]),H("div",{class:mt.name},[a.name]),!$.loading&&$.tab!=="course"&&H("div",{id:h===0?"courseware-1":"",class:mt.favoriteBtn,onClick:y=>{y.stopPropagation(),a.favoriteFlag=!a.favoriteFlag,U(()=>_t(a))}},[H(tn,{isFavorite:a.favoriteFlag},null)])])),$.list.length<=0&&!$.loading&&H(qi,{image:"list",description:"暂无数据"},null)])]),H(Gn,{show:$.showBook,bookData:$.bookData,tab:$.tab,rect:$.book,onClose:()=>{$.showBook=!1}},null),Bt.value?H(Vn,null,null):null,H(Ve,{show:E.value,"onUpdate:show":a=>E.value=a,class:mt.popupContainer},{default:()=>[H("div",{class:mt.popoverContainer},[H("div",{class:mt.searchList},[H("div",{class:mt.popoverTitle},[Ot("教材版本")]),H("div",{class:[mt.popupList,mt.versionList]},[Z.value.map(a=>H(oi,{plain:J.bookVersionId==a.bookVersionId,round:!0,onClick:()=>J.bookVersionId=a.bookVersionId},{default:()=>[a.bookVersionName]}))]),H("div",{class:mt.popoverTitle},[Ot("选择年级")]),H("div",{class:[mt.popupList,mt.versionList]},[ai.grades.map(a=>H(oi,{plain:J.currentGradeNum===a.value,round:!0,onClick:()=>J.currentGradeNum=a.value},{default:()=>[a.text]}))])]),H("div",{class:mt.btnGroup},[H(ce,{round:!0,onClick:()=>{J.bookVersionId=null,J.currentGradeNum=null}},{default:()=>[Ot("重置")]}),H(ce,{round:!0,class:mt.btnSure,onClick:()=>{dt(),E.value=!1}},{default:()=>[Ot("确认")]})])])]})])}});export{ai as BOOK_DATA,is as default};