import{d as Lt,a as j,q as un,K as bt,r as He,x as Ft,y as Vt,an as In,w as On,F as Ut,z as Pt,N as Bn,X as Wn,U as Gt,Q as Hn,R as cn,A as We,C as Tt,e as Rn,h as on,a2 as zn,S as an,a4 as qn}from"./index-869d77fb.js";import{S as Gn,a as Vn,b as Un,c as Kn,d as Qn,e as Xn,f as Yn,g as Zn,h as Jn,i as $n,j as er,k as tr}from"./index-31bc4566.js";import{g as Mt,s as Ue,a as nr,b as rr}from"./api-939e8a82.js";import{d as Rt}from"./deep-clone-c0d00fc2.js";import{N as ir}from"./Image-7b636fbd.js";import{T as sr,a as zt}from"./index-973b4cec.js";import{T as qt}from"./index-70d6770d.js";import"./use-tab-status-0ed30c24.js";import"./index-d45dfe1a.js";const or="_container_1v4px_1",ar="_head_1v4px_12",lr="_back_1v4px_20",ur="_tabs_1v4px_23",cr="_downBtn_1v4px_39",fr="_activeBtn_1v4px_50",dr="_icon_1v4px_50",hr="_iconUp_1v4px_75",pr="_popover_1v4px_80",gr="_content_1v4px_99",mr="_wrap_1v4px_105",vr="_emtpyWrap_1v4px_111",yr="_wrapItem_1v4px_122",wr="_item_1v4px_132",xr="_name_1v4px_163",Ar="_favoriteBtn_1v4px_170",br="_containerImg_1v4px_176",Tr="_cover_1v4px_202",kr="_loaded_1v4px_232",Cr="_book_1v4px_235",Nr="_bookWrap_1v4px_249",Mr="_show_1v4px_257",Sr="_popupContainer_1v4px_262",_r="_searchList_1v4px_268",Er="_popoverTitle_1v4px_274",Dr="_popupList_1v4px_290",Pr="_btnGroup_1v4px_314",Fr="_btnSure_1v4px_329",Lr="_containerTablet_1v4px_334",jr="_contentEmpty_1v4px_338",ae={container:or,head:ar,back:lr,tabs:ur,downBtn:cr,activeBtn:fr,icon:dr,iconUp:hr,popover:pr,content:gr,wrap:mr,emtpyWrap:vr,wrapItem:yr,item:wr,name:xr,favoriteBtn:Ar,containerImg:br,cover:Tr,loaded:kr,book:Cr,bookWrap:Nr,show:Mr,popupContainer:Sr,searchList:_r,popoverTitle:Er,popupList:Dr,btnGroup:Pr,btnSure:Fr,containerTablet:Lr,contentEmpty:jr},fn=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href;const Ir="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAkCAYAAAD7PHgWAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAJAAAAAC/FoutAAADKklEQVRYCc2YW4hNYRiGx3FyaJxPMUYOOZWSUBgjE8odk3AhXChR5E5qTG5QUmhScoFxNXKIckiZUk4hlJBcGJPzIeVYzOB5prWy7TFr9p7Zs9d+69nrX+v7//97117/+tbaOy8vx9UhBX/j6VMG82AYDIFv8AKuwQmogV+QqMnsLAXHFUIBvAbHXYaTcBtarXGMvAC/U+AufUpAeRLVkMq4W/SbCWlrIyN+gkk+wkFYCCOhG/SDqVABtWA/v8Hd8DbY/8x2DxTDAMiHIiiFvfASHCeV0AlS0k56hQn30+7bwigTl0MDhAnP0R4KUfJEt4LLxXFnwGORWkPUzj9geWTPpkHXWz1UQeem4WaPTCfyDsx7qNleBCZAeDbLojpGxOYTS/lSJcwzkfYX0OTKhOP/NE8FHVxvcWgFSTX4Bppcas/ARf4V+kNcukpiTW5KNrArCOxLDmR530qhwYfJee8FgdnJgSzvu34ta5osDHNbRsLL2zU8GOP2OLk1uEoPHcHK7yPvCVhe4tb9wECRWw0ODA5Yi3JBPonUID802MMG8g7OBVkPVU8/NPjKBvItJRcU+mj0pcHngauWnp3ZMu89oRp9adDK/RN07ltK3JoUGKhLNHKaHW/tDYkHY2iPIKclz3XYuAbZNmoRnxq0YMepbSTXx5FkE1044KU2uDo5mKX9UeTxJVcP/32i+T5n0E6jIZvy/fE6mL8qKvHRoNMdtn2iOmY4VhnkrWXbK2ruAoKPwTNxPfpboj1lFTkA5vsOs6BFWW4egIMeQViXaGZUrvvwivkUK01ndl9avcya9OYpgUxqMJNdAef/BMWQtnoz4iI4iYV8M3hJ2qq5TBD+5KyjPaUtE2poO1g8NXoJWvtI9E7dAQ3gXDWQsTW+gMn828KJP8ASSEdj6XwTHF8P5ZCJq8E0f+V741kwibjAI0sCcbUOvAkc8xRmQLtqLbOHCZ/RntNMNqvBeQhP6DBty1hWNIYsN8Dkrk9/FeZDKJ/t78G42zLIulz0FeAdrhF/Ki6G6mDfY36DfpOxahrZLegaCvF1aT3kjLy8W0Bjx2A45KS6Z9rVH+dMzG9PPT/rAAAAAElFTkSuQmCC",Or="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAJKADAAQAAAABAAAAIAAAAADfjkU8AAAHv0lEQVRYCZVXW6hWRRReM/u/HM/xclRCUzHLEFIkyqfwIUylG5pKIFqBhSgUkj1kGYT2ENJDUQhhF4QgDBRJPGZHo9KkHoISzUsmPQl5yfvlePz33jN935qZ39+T132Yf9bMrMs331ozex8jN3h6X180Nqv1e8kb+4QxdoR3MsSXZSGFOyul32tco6s6+O41ZuVK1+rCr1+f5bt2LYTNLG+z8eL8MKwbyd1ZnxfH/JX8+0Zv8cnADWsPtdol2SQh9X75K0Pzava+qdTniStrxnmBUwGgqz2mxBvB2lFTuhWVj1Z/Rvti6dKFpmJXOicjDQ2g5wv+wL6kDzSMvTO5uXy5q7jc83L/zV8dp216rgHUeHvJQ1m1vskbP9rAK4EI+zLK6himAOOxaf4xqHi7UaMaedZgTedowzXaF0435NXeYIqgsFy4E9JzZU775i9+/h+gxhuLH8wGDNjpnRtkXIHdw6JaExkzTmT/HjgtuVExaJ5BxUYf6BkYT1hDDzbAbtgQOmWYDKktl7AhjB03Vvqesrd3+sBvvvxFffDHL13aWXaa3djwGAsw6mz0WDHzF4u09RNZ9abIqZO6KwYnC5pCgrIEBL7SHDZisJfALoGRjYgEQFQkVgiUnbcE9a87f2r8wB1dJysElHcU71mfjTG6K2gbK2beIpH2DpEtG0ROHIMlphkITiApgIAqZh3zzXWkSBWVqTAP5jFFOyiSNcji2JBOsXeZen/W4WzTs2zhqGq945A1rt2UOZRLhIPRYzNE9u0W+fswjDHW7cAEq+oMU/pghwqS47Bl9H1kXYMa5/Gw595DaYI1+ARTeS1vPFDJfH2BuKJdte4bJ2bkPSLbN4OZ9cFCdwmPdBYdq1ewGAKnKJjVnVMPirRL+uwxvppW6pA52LKedGirufOvVcDM44KyMQbeJk8TGTdBZOc2kfMNBORWoN4KhtZkCUwG2oPzZnAuN8HQFo3poR39YKxXiW40+NHTiiWsTK1A6V54wAio1n0qMrBT5MJFTMGaTmhIAAmYynFNgTIgA8WGLtjFnmu6jp8ElL4pg50AGDJFa4dXfOmGWnjjSTDnzomcPoMVesdDEKqJjrvkoyDQ666xTpUkt65TTmvJhr4AhjUUWIKAGFpbvDMy6QBDuDsJALN6AijH2zU4pGMGjrvBsj4E2wwYZa5xTtegr+ucg6AnKuiBhHBjs2eDb1wC3LuzvpEfxztKkZNGRdt0lJzHQATFRxmJfQKWwNCWTCQfaZ1YdA4/0NW7SeNhjPgat5Dz1pTmKG/NAAYsUaZzbZA1eGRHmeJanG8JdhVAWk89bYM90xSAMG2BHX2tgCWiRYZO4WLODyRmPI9gWIMCHKadJgCca7JDUBynFscYNnVa7NUvAfH80B/Z0XSFrBAgoh+y1rnP9Q3M25UKrCEijqwpG3RMJ5i+yk4CwrkIQoFTpm5s9KPA6BsyY7Dx3YjeUVbmwZDYDxFJpPeF5w8bKe/HW0Usql2LWymkc2pEQJTZFECU01jBQK9VJ26gyQg27QDENUopiwLYUMpopcFNVK2eGLxn6zBct3hyt5HXkL6B+akAWvVqUuSQGUx3SRmNTxNIlLnOR+fxowBjzUBmypSNnAVMIGGsajA11m6huQKqnxu6AiCO8UWvOWZ+1UOoKQVB6hnsmsa5OB/ZCKkKTNEFCxrfPSFFZAd+SrwznZ4sxMGflex8z/GjS5qAzLerr5iyXEXlAIoswRFBNHMMdTJHQAzEXllrSZOucYwwyTYFJhiwo0CwpqcMTljKlazywYh/fuuJHtmF5/LsufvgaYIlhagl1hTfMxjiwScJAyoQ9IlrBYEf7aGp6cEAoLV4Wbg5NkgwrBsAK7lx5MzZTGy1emTw/u7RjMAn1FCQxRbFXOhddDl2gObwNcKdKvXax8CQ9W5REFEmewoGPY829QGkCQaACEazQNahZozprbnqrBheu2sA1bs27pfSvkrwNCQQrSm+SjCpaUhB6bEFGEspAIIRPnbSsQ7MhFQ5njKmEH8OKcjq/ZZ3HOz6vRVQyEbrDORLT85Zi9p5kWg1fRCQMIxwU+jeMh0pc0DCL8XAIgMCGRrTw2LWY57SBDAlLlYPp5W22qbOfdtm9wkdy6PvLMaXps/eiAtrjkWkjPcE4Wgfq4pAmHEWsLJFNskMmIynimyUjcCKgxLLDsxIVm/7YfCB7qnXCXtjQFS+MG3mJsn9MxnQWDhTQFEmW9oYRQGRjZBWpovMlDqGjHVegh5gKvXajs6D3025HhjO0etNn54ps9ahGOfx9iYwfoaCdDSwg7pSenjXsFAJAHMKBDIKES0ww/9OAGbroAPbn75ZQJbJTZ/2HzfNN9YsQ/p6SxS3Hlse4bxAY4+ADRznPA9rkHUN6dJ/CLlna/JKve2dW4EhkFsylNBemDxzCnhfhzoZTrb4KaH3EutGixopURkAyQrm1Lu1Z+qVtnn9/+zGh/qtn9sGRFdHRj3Sb9DIIR9Lo3gO76Nq+gzVLwQFwTQRB1JopMhqta97zp1ekG7hW8O5A4ZanV2aNOPhoszXoHAn4drFQQQKANKjbywuYPuH9ZVFg/7a9mur3e3Id8RQX4cXJz41sTTuXXxKPIoaM3gn/YR/M98asq97b1/d2x3/B8k9N3E67sAEAAAAAElFTkSuQmCC",Br=Lt({name:"the-favorite",props:{isFavorite:{type:Boolean,default:!1}},setup(N){return()=>j("div",{class:["favoriteWrap",N.isFavorite?"liked":""]},[j("img",{class:"favoritIcon",src:N.isFavorite?Or:Ir},null)])}}),Wr="_book_f8oe1_1",Hr="_back_f8oe1_11",Rr="_bookHide_f8oe1_16",zr="_wrap_f8oe1_36",qr="_wrapItem_f8oe1_53",Gr="_item_f8oe1_60",Vr="_name_f8oe1_69",Ur="_des_f8oe1_76",Kr="_icon_f8oe1_81",Qr="_last_f8oe1_86",Xr="_preIcon_f8oe1_129",Yr="_nameText_f8oe1_134",ze={book:Wr,back:Hr,bookHide:Rr,wrap:zr,wrapItem:qr,item:Gr,name:Vr,des:Ur,icon:Kr,last:Qr,preIcon:Xr,nameText:Yr},Zr="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=",Jr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAaCAYAAADMp76xAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALKADAAQAAAABAAAAGgAAAADSD6qFAAAD9UlEQVRYCdWYaWxUVRTHf29auglUKcqWBlErqGnAAiopFQOiIkGDaY2VuMQ1MfIBP9TGCELEpYgm+MX0iySYCDUtDRJELZA0UAQBjRLROrK1MbG1rZZqy5QJz3Pm9jHzmMfrjDppOcnc5Zy7/N+5Z7l3LAbItm2L3Q1v0/1HOaHQOMLhDEc2JHV6ej+ZmW3kXrWZBQsrLcuyFYelhb1vz1TaO7fT319AwY0wZgxk56ho6KivF7q6IPgzZGQEuSZviTV3frMV0Wx9bTM5OQUUl0Bm1tCB9Nr57FnYvxd6e4MsLZ2atrqkuIqengdE7cMPrH5AejpMnAQ//ZhH22/ZgYjNqhkMN83GaluxKUbxr0DEwdRmB6OGnbBh3WCjEpOvfwP2NSY21hmlGCUYBCLRIBEH6/wdWk470/1rWxx67UrYWhM/rvtPONAEaWnxMj+OYpTIJQaSArIk+JQ+YkArsAdLo5sc/c60c6+EjvYoP7aVlQ0jR8VyLrRTA1iXn3YLvLLGgNbNF9xrNv3he1O/9rKpLy71dBYugueXXyyJ9FMHWJe/uRBWVEL9JzBvPhLn4eB+WPYkLH04AsBVhMPw9KNQOMPFju0kB7irEzZWx86Ptm+dBTNmRvtOa/YdoD+ljzaCxtV77jf9bXXw7WFY/ZbpHzkI587BzNmm71EmBzgUguNBj2WENXmKN9/htrbAzk+NZq8YabiqALV3hxr3QJF8uE+ITQ7whIlik+ud5ZOruzrgBomlZXLkDvWcgayBzBoWzQab4YlnHalnnRxgzyUGYaoTHZajLpJjnl7kHqwabjkl8VXMRLVavckt9+gFPHj/L0tj7rtio3//5V73/Hn4RTR6phu+2GFkAYGjPx/yl/pMTFhUXwPFd8LoXPeUk8eNA5bcBep8GkESoNQC/uYQnBBgi5bEQ9FUnz8ZXlhh7Ljhs/gxHpzUAq4T7aqj6S+WDh2AXZ/Dcy/CiBHG0bZKrO6Q9D8IpQ7wsaPQfExSdLkbgqbjDzbA3ffBTZINlW6bA1Ouh1UV0N5meJco46PE6ZPeQ7vFOdTOLiV3ZjnxuHaL0eys2x0JNO6GD6th/AR47KkoX1svVcLrrxrQa6pg3Hi3fKBn2R9vCjGnOINJ+YZVtljeTBKK/i1t2Sb3Vvm45c9AxUqT/fr64P134MjX8JCk5LJl3rc1fRatXWUuRW++B3ljoyh+bYWvmvotu66mhWuvy6dwuhFqMP8vNGq0ma1hzMloytGUPneeXMSn+a+uqbt2M5Q/7v4oveWdOtFq2bu+rBJjr2CxeLJPSvTfJcVSTSw7tsPYq9cN/0eogm3ae+ERGrl5XFbPfOcwL5c/Uv4BMfRITu69WqwAAAAASUVORK5CYII=",$r=Lt({name:"the-book",props:{bookData:{type:Object,default:()=>({})},tab:{type:String,default:""},show:{type:Boolean,default:!1},rect:{type:Object,default:()=>({})},subjectId:{type:[String,Number],default:""}},emits:["close"],setup(N,{emit:D}){var me,Ie,$e,ne;un(),console.log(bt.user.data.phone);const te="lastTime"+((ne=($e=(Ie=(me=bt)==null?void 0:me.user)==null?void 0:Ie.data)==null?void 0:$e.phone)!=null?ne:""),ge=He(!1),Z=Ft({show:!1,width:0,height:0,transform:"",list:[],lastTime:localStorage.getItem(te),isClick:!1,coursewareList:[]}),X=He(!1),Ne=He(!1),G=He(!1),ke=He(0);He();const Me=async()=>{console.log("初始化完成")};He(!0);let se=null,xe=null;const Ee=()=>{se=window.$("#flipbook");const J=document.body.clientHeight*.8;Z.height=J,Z.width=J*(210/297)*2,se.turn({autoCenter:!0,duration:1e3,disabled:!0,acceleration:!0,elevation:50,width:Z.width,height:Z.height,gradients:!0}),se.bind("start",(K,M,H)=>{(H=="tl"||H=="tr")&&K.preventDefault(),Z.isClick&&Pt(()=>{Z.isClick=!1,H=="tl"||H=="tr"?K.preventDefault():se.turn("page",M.next)})}),se.bind("turned",(K,M,H)=>{Pt(()=>{Ne.value=!0})}),se.bind("turning",(K,M,H)=>{M===se.turn("pages")&&De(!1),M===1&&De(!1)})},Se=()=>{const J=document.querySelector(".bookWrap");if(J){const K=J.getBoundingClientRect(),M=N.rect.width/(K.width/2),H=N.rect.height/K.height,oe=(K.width/2*(M-1)/2+N.rect.x-K.x-K.width/4)/M,ee=(K.height*(H-1)/2+N.rect.y-K.y)/H,ve=`scale3d(${M}, ${H}, 1) translate(${oe}px, ${ee}px)`;J.style.transform=Z.transform=ve,J.style.transition="transform 0s",Pt(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{J.style.transition="transform 1s",J.style.transform="",Z.show=!0,xe=setTimeout(()=>{se.turn("page",2)},500)})})})}},De=(J=!0)=>{if(Ne.value=!1,G.value)return;G.value=!0,clearTimeout(xe);const K=document.querySelector(".bookWrap");J&&se.turn("page",1),K&&(K.style.transform=Z.transform),D("close"),setTimeout(()=>{K.style.transition="",K.style.transform="",Z.show=!1,Z.list=[],G.value=!1},1e3)};Vt(async()=>{await Me(),In("webViewOnResume",()=>{Z.lastTime=localStorage.getItem(te)})});const q=()=>{var M;if(!((M=N.bookData)!=null&&M.lessonList))return;ke.value=Math.floor((document.body.clientHeight*.8-40)/50);const J=[];let K=[];for(let H=0;H=ke.value?(J.push([...K]),K=[{name:oe.name}]):K.push({name:oe.name});for(let ee=0;ee=ke.value?(J.push([...K]),K=[oe.knowledgeList[ee]]):K.push(oe.knowledgeList[ee])}K.length&&J.push(K),Z.list=J};On(()=>N.show,()=>{N.show&&(q(),Pt(()=>{Ee(),requestAnimationFrame(()=>{Se()})}))});const U=async J=>{var K;if(J.id){if(!J.containMaterial){Bn("暂无资源");return}if(J.coursewareNum)try{const M=N.tab=="all"?await Vn({lessonCoursewareKnowledgeDetailId:J.id}):await Un({lessonCoursewareKnowledgeDetailId:J.id});(M==null?void 0:M.code)==200&&((K=M.data)!=null&&K.length)&&(M.data.forEach(H=>{H.coursewareDetailKnowledgeId=H.coursewareDetailKnowledgeId||J.id,H.lessonCoursewareId=J.lessonCoursewareId,H.lessonCoursewareDetailId=J.lessonCoursewareDetailId,H.zjName=J.name}),Z.coursewareList=M.data,M.data.length==1?je(M.data[0]):X.value=!0)}catch(M){}}},je=async J=>{if(J.id){if(ge.value)return;ge.value=!0,localStorage.setItem(te,J.id);const K=Wn.stringify({id:J.id,lessonCoursewareId:J.lessonCoursewareId,courseId:N.bookData.id,lessonCoursewareDetailId:J.lessonCoursewareDetailId,name:J.zjName,subjectId:N.subjectId,tab:N.tab,coursewareDetailKnowledgeId:J.coursewareDetailKnowledgeId}),M=location.origin+location.pathname+"#/courseware-play?"+K;console.log("🚀 ~ url:",M),Gt({api:"openWebView",content:{url:M,orientation:0,isHideTitle:!1,c_orientation:0}}),ge.value=!1}};return()=>j("div",{class:[ze.book,Z.show?"":ze.bookHide],onClick:()=>De(),onTouchmove:()=>{console.log("sdfds"),Z.isClick=!0}},[j("div",{class:ze.back},[j("img",{src:fn},null)]),j("div",{class:"bookWrap",style:{width:Z.width+"px"},onClick:J=>{J.stopPropagation()}},[!!Z.list.length&&j("div",{id:"flipbook",class:[Z.show&&"animated"]},[j("div",{class:"page"},[j("img",{style:"width: 100%; height: 100%; object-fit: cover;",src:N.bookData.coverImg},null)]),Z.list.map(J=>j("div",{class:"page"},[j("div",{class:ze.wrap},[j("div",{class:ze.wrapItem},[J.map((K,M)=>j(Ut,null,[j("div",{class:[ze.item,K.id&&ze.des],onTouchstart:H=>{H.stopPropagation()},onClick:H=>{H.stopPropagation(),U(K)},onTouchend:H=>{console.log(H)}},[K.id?j("img",{id:M==1?"coursewareDetail-0":"",class:ze.icon,src:Zr},null):null,j("div",{class:ze.name,style:{lineHeight:"20Px"}},[Z.lastTime===K.id&&j("img",{src:Jr,alt:"",class:ze.preIcon},null),j("div",{class:ze.nameText},[" ",K.name])])])]))])])])),Z.list.length%2===1&&j("div",{class:"page",style:{pointerEvents:"none"}},[j("div",{class:ze.wrap},[j("div",{class:ze.wrapItem},null)])]),j("div",{class:"page"},[j("img",{style:"width: 100%; height: 100%; object-fit: cover;",src:N.bookData.coverImg},null)])])]),X.value&&j(Gn,{list:Z.coursewareList,onClose:()=>{X.value=!1},onSelect:J=>je(J)},null)])}}),ei=Lt({name:"courseware-list",emits:["close"],setup(N,{emit:D}){const te=Ft({box:{},show:!1,steps:[{ele:"",eleRect:{},img:Mt("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:Mt("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:Mt("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:Mt("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}),ge=He(!1),Z=He({});(async()=>{var se;try{const xe=await nr({guideTag:"guideInfo"});xe.data?Z.value=JSON.parse((se=xe.data)==null?void 0:se.guideValue)||null:Z.value={},Z.value&&Z.value.courseware?ge.value=!1:ge.value=!0}catch(xe){console.log(xe)}})();const Ne=()=>{var xe,Ee,Se,De;const se=document.getElementById(`courseware-${te.step}`);if(se){const q=se.getBoundingClientRect(),U=((xe=te.steps[te.step].eleRectPadding)==null?void 0:xe.left)||0,je=((Ee=te.steps[te.step].eleRectPadding)==null?void 0:Ee.top)||0,me=((Se=te.steps[te.step].eleRectPadding)==null?void 0:Se.width)||0,Ie=((De=te.steps[te.step].eleRectPadding)==null?void 0:De.height)||0;te.box={left:q.x-U+"px",top:q.y-je+"px",width:q.width+me+"px",height:q.height+Ie+"px"}}else ke()};Vt(()=>{Ne(),window.addEventListener("resize",G)});const G=()=>{Ne()};Hn(()=>{window.removeEventListener("resize",G)});const ke=()=>{if(te.step>=3){Me();return}te.step=te.step+1,Ne()},Me=async()=>{Z.value?Z.value.courseware=!0:Z.value={courseware:!0};try{const se=await rr({guideTag:"guideInfo",guideValue:JSON.stringify(Z.value)})}catch(se){console.log(se)}console.log("调用list完成"),ge.value=!1};return()=>j(cn,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",Ue.guidePopup],show:ge.value,"onUpdate:show":se=>ge.value=se},{default:()=>[j("div",{class:Ue.content,onClick:()=>ke()},[te.step!=te.steps.length-1&&j("div",{class:Ue.backBtn,onClick:se=>{se.stopPropagation(),Me()}},[We("跳过")]),j("div",{class:Ue.box,style:{...te.box,...te.steps[te.step].boxStyle},id:`modeType-${te.step}`},[te.steps.map((se,xe)=>{var Ee,Se;return j("div",{onClick:De=>De.stopPropagation(),class:Ue.item,style:{display:xe===te.step?"":"none",left:`${(Ee=se.eleRect)==null?void 0:Ee.left}px`,top:`${(Se=se.eleRect)==null?void 0:Se.top}px`}},[j("img",{class:Ue.img,style:se.imgStyle,src:se.img},null),j("img",{class:Ue.iconHead,style:se.handStyle,src:Mt("indexDot.png")},null),j("div",{class:Ue.btns,style:se.btnsStyle},[te.step+1==te.steps.length?j(Ut,null,[j(Tt,{class:[Ue.btn],round:!0,type:"primary",onClick:()=>Me()},{default:()=>[We("完成")]}),j(Tt,{class:[Ue.btn,Ue.endBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{te.step=0,Ne()}},{default:()=>[We("再看一遍")]})]):j(Tt,{class:Ue.btn,round:!0,type:"primary",onClick:()=>ke()},{default:()=>[We("下一步 ("),te.step+1,We("/"),te.steps.length,We(")")]})])])})])])]})}});/*! jQuery v1.7 jquery.com | jquery.org/license */(function(N,D){function te(e){return t.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}function ge(e){if(!Wt[e]){var n=L.body,r=t("<"+e+">").appendTo(n),i=r.css("display");r.remove(),(i==="none"||i==="")&&(Je||(Je=L.createElement("iframe"),Je.frameBorder=Je.width=Je.height=0),n.appendChild(Je),(!At||!Je.createElement)&&(At=(Je.contentWindow||Je.contentDocument).document,At.write((L.compatMode==="CSS1Compat"?"":"")+""),At.close()),r=At.createElement(e),At.body.appendChild(r),i=t.css(r,"display"),n.removeChild(Je)),Wt[e]=i}return Wt[e]}function Z(e,n){var r={};return t.each(rn.concat.apply([],rn.slice(0,n)),function(){r[this]=e}),r}function X(){Dt=D}function Ne(){return setTimeout(X,0),Dt=t.now()}function G(){try{return new N.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function ke(){try{return new N.XMLHttpRequest}catch(e){}}function Me(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},a,l,c=r.length,f,m=r[0],w,v,y,b,S;for(a=1;a0?(r!=="border"&&t.each(a,function(){r||(i-=parseFloat(t.css(e,"padding"+this))||0),r==="margin"?i+=parseFloat(t.css(e,r+this))||0:i-=parseFloat(t.css(e,"border"+this+"Width"))||0}),i+"px"):(i=wt(e,n,n),(i<0||i==null)&&(i=e.style[n]||0),i=parseFloat(i)||0,r&&t.each(a,function(){i+=parseFloat(t.css(e,"padding"+this))||0,r!=="padding"&&(i+=parseFloat(t.css(e,"border"+this+"Width"))||0),r==="margin"&&(i+=parseFloat(t.css(e,r+this))||0)}),i+"px")}function U(e,n){n.src?t.ajax({url:n.src,async:!1,dataType:"script"}):t.globalEval((n.text||n.textContent||n.innerHTML||"").replace(ot,"/*$0*/")),n.parentNode&&n.parentNode.removeChild(n)}function je(e){var n=(e.nodeName||"").toLowerCase();n==="input"?me(e):n!=="script"&&typeof e.getElementsByTagName<"u"&&t.grep(e.getElementsByTagName("input"),me)}function me(e){(e.type==="checkbox"||e.type==="radio")&&(e.defaultChecked=e.checked)}function Ie(e){return typeof e.getElementsByTagName<"u"?e.getElementsByTagName("*"):typeof e.querySelectorAll<"u"?e.querySelectorAll("*"):[]}function $e(e,n){var r;n.nodeType===1&&(n.clearAttributes&&n.clearAttributes(),n.mergeAttributes&&n.mergeAttributes(e),r=n.nodeName.toLowerCase(),r==="object"?n.outerHTML=e.outerHTML:r!=="input"||e.type!=="checkbox"&&e.type!=="radio"?r==="option"?n.selected=e.defaultSelected:(r==="input"||r==="textarea")&&(n.defaultValue=e.defaultValue):(e.checked&&(n.defaultChecked=n.checked=e.checked),n.value!==e.value&&(n.value=e.value)),n.removeAttribute(t.expando))}function ne(e,n){if(n.nodeType===1&&t.hasData(e)){var r,i,a,l=t._data(e),c=t._data(n,l),f=l.events;if(f){delete c.handle,c.events={};for(r in f)for(i=0,a=f[r].length;i=0===r})}function H(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function oe(){return!0}function ee(){return!1}function ve(e,n,r){var i=n+"defer",a=n+"queue",l=n+"mark",c=t._data(e,i);c&&(r==="queue"||!t._data(e,a))&&(r==="mark"||!t._data(e,l))&&setTimeout(function(){!t._data(e,a)&&!t._data(e,l)&&(t.removeData(e,i,!0),c.fire())},0)}function Oe(e){for(var n in e)if(!(n==="data"&&t.isEmptyObject(e[n]))&&n!=="toJSON")return!1;return!0}function qe(e,n,r){if(r===D&&e.nodeType===1){var i="data-"+n.replace(W,"-$1").toLowerCase();if(r=e.getAttribute(i),typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:t.isNumeric(r)?parseFloat(r):T.test(r)?t.parseJSON(r):r}catch(a){}t.data(e,n,r)}else r=D}return r}function kt(e){var n=d[e]={},r,i;for(e=e.split(/\s+/),r=0,i=e.length;r)[^>]*$|#([\w\-]*)$)/,c=/\S/,f=/^\s+/,m=/\s+$/,w=/\d/,v=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,y=/^[\],:{}\s]*$/,b=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,S=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,F=/(?:^|:|,)(?:\s*\[)+/g,V=/(webkit)[ \/]([\w.]+)/,re=/(opera)(?:.*version)?[ \/]([\w.]+)/,$=/(msie) ([\w.]+)/,be=/(mozilla)(?:.*? rv:([\w.]+))?/,Te=/-([a-z]|[0-9])/ig,Q=/^-ms-/,u=function(h,E){return(E+"").toUpperCase()},p=s.userAgent,x,A,k,C=Object.prototype.toString,P=Object.prototype.hasOwnProperty,B=Array.prototype.push,I=Array.prototype.slice,z=String.prototype.trim,Pe=Array.prototype.indexOf,we={};return n.fn=n.prototype={constructor:n,init:function(h,E,O){var _,ie,le,ce;if(!h)return this;if(h.nodeType)return this.context=this[0]=h,this.length=1,this;if(h==="body"&&!E&&L.body)return this.context=L,this[0]=L.body,this.selector=h,this.length=1,this;if(typeof h=="string"){if(h.charAt(0)!=="<"||h.charAt(h.length-1)!==">"||h.length<3?_=l.exec(h):_=[null,h,null],_&&(_[1]||!E)){if(_[1])return E=E instanceof n?E[0]:E,ce=E?E.ownerDocument||E:L,le=v.exec(h),le?n.isPlainObject(E)?(h=[L.createElement(le[1])],n.fn.attr.call(h,E,!0)):h=[ce.createElement(le[1])]:(le=n.buildFragment([_[1]],[ce]),h=(le.cacheable?n.clone(le.fragment):le.fragment).childNodes),n.merge(this,h);if(ie=L.getElementById(_[2]),ie&&ie.parentNode){if(ie.id!==_[2])return O.find(h);this.length=1,this[0]=ie}return this.context=L,this.selector=h,this}return!E||E.jquery?(E||O).find(h):this.constructor(E).find(h)}return n.isFunction(h)?O.ready(h):(h.selector!==D&&(this.selector=h.selector,this.context=h.context),n.makeArray(h,this))},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return I.call(this,0)},get:function(h){return h==null?this.toArray():h<0?this[this.length+h]:this[h]},pushStack:function(h,E,O){var _=this.constructor();return n.isArray(h)?B.apply(_,h):n.merge(_,h),_.prevObject=this,_.context=this.context,E==="find"?_.selector=this.selector+(this.selector?" ":"")+O:E&&(_.selector=this.selector+"."+E+"("+O+")"),_},each:function(h,E){return n.each(this,h,E)},ready:function(h){return n.bindReady(),A.add(h),this},eq:function(h){return h===-1?this.slice(h):this.slice(h,+h+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(I.apply(this,arguments),"slice",I.call(arguments).join(","))},map:function(h){return this.pushStack(n.map(this,function(E,O){return h.call(E,O,E)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},n.fn.init.prototype=n.fn,n.extend=n.fn.extend=function(){var h,E,O,_,ie,le,ce=arguments[0]||{},Fe=1,Qe=arguments.length,Ht=!1;for(typeof ce=="boolean"&&(Ht=ce,ce=arguments[1]||{},Fe=2),typeof ce!="object"&&!n.isFunction(ce)&&(ce={}),Qe===Fe&&(ce=this,--Fe);Fe0)return;A.fireWith(L,[n]),n.fn.trigger&&n(L).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){if(A=n.Callbacks("once memory"),L.readyState==="complete")return setTimeout(n.ready,1);if(L.addEventListener)L.addEventListener("DOMContentLoaded",k,!1),N.addEventListener("load",n.ready,!1);else if(L.attachEvent){L.attachEvent("onreadystatechange",k),N.attachEvent("onload",n.ready);var h=!1;try{h=N.frameElement==null}catch(E){}L.documentElement.doScroll&&h&&e()}}},isFunction:function(h){return n.type(h)==="function"},isArray:Array.isArray||function(h){return n.type(h)==="array"},isWindow:function(h){return h&&typeof h=="object"&&"setInterval"in h},isNumeric:function(h){return h!=null&&w.test(h)&&!isNaN(h)},type:function(h){return h==null?String(h):we[C.call(h)]||"object"},isPlainObject:function(h){if(!h||n.type(h)!=="object"||h.nodeType||n.isWindow(h))return!1;try{if(h.constructor&&!P.call(h,"constructor")&&!P.call(h.constructor.prototype,"isPrototypeOf"))return!1}catch(O){return!1}var E;for(E in h);return E===D||P.call(h,E)},isEmptyObject:function(h){for(var E in h)return!1;return!0},error:function(h){throw h},parseJSON:function(h){if(typeof h!="string"||!h)return null;if(h=n.trim(h),N.JSON&&N.JSON.parse)return N.JSON.parse(h);if(y.test(h.replace(b,"@").replace(S,"]").replace(F,"")))return new Function("return "+h)();n.error("Invalid JSON: "+h)},parseXML:function(h){var E,O;try{N.DOMParser?(O=new DOMParser,E=O.parseFromString(h,"text/xml")):(E=new ActiveXObject("Microsoft.XMLDOM"),E.async="false",E.loadXML(h))}catch(_){E=D}return(!E||!E.documentElement||E.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+h),E},noop:function(){},globalEval:function(h){h&&c.test(h)&&(N.execScript||function(E){N.eval.call(N,E)})(h)},camelCase:function(h){return h.replace(Q,"ms-").replace(Te,u)},nodeName:function(h,E){return h.nodeName&&h.nodeName.toUpperCase()===E.toUpperCase()},each:function(h,E,O){var _,ie=0,le=h.length,ce=le===D||n.isFunction(h);if(O)if(ce){for(_ in h)if(E.apply(h[_],O)===!1)break}else for(;ie0&&h[0]&&h[Fe-1]||Fe===0||n.isArray(h));if(Qe)for(;ce1?g.call(arguments,0):y,m.notifyWith(w,c)}}function r(v){return function(y){i[v]=arguments.length>1?g.call(arguments,0):y,--f||m.resolveWith(m,i)}}var i=g.call(arguments,0),a=0,l=i.length,c=Array(l),f=l,m=l<=1&&e&&t.isFunction(e.promise)?e:t.Deferred(),w=m.promise();if(l>1){for(;a
a",r=e.getElementsByTagName("*"),i=e.getElementsByTagName("a")[0],!r||!r.length||!i)return{};a=L.createElement("select"),l=a.appendChild(L.createElement("option")),c=e.getElementsByTagName("input")[0],m={leadingWhitespace:e.firstChild.nodeType===3,tbody:!e.getElementsByTagName("tbody").length,htmlSerialize:!!e.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,unknownElems:!!e.getElementsByTagName("nav").length,checkOn:c.value==="on",optSelected:l.selected,getSetAttribute:e.className!=="t",enctype:!!L.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},c.checked=!0,m.noCloneChecked=c.cloneNode(!0).checked,a.disabled=!0,m.optDisabled=!l.disabled;try{delete e.test}catch(be){m.deleteExpando=!1}!e.addEventListener&&e.attachEvent&&e.fireEvent&&(e.attachEvent("onclick",function(){m.noCloneEvent=!1}),e.cloneNode(!0).fireEvent("onclick")),c=L.createElement("input"),c.value="t",c.setAttribute("type","radio"),m.radioValue=c.value==="t",c.setAttribute("checked","checked"),e.appendChild(c),w=L.createDocumentFragment(),w.appendChild(e.lastChild),m.checkClone=w.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",e.style.width=e.style.paddingLeft="1px",v=L.getElementsByTagName("body")[0],b=L.createElement(v?"div":"body"),S={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},v&&t.extend(S,{position:"absolute",left:"-999px",top:"-999px"});for(re in S)b.style[re]=S[re];if(b.appendChild(e),y=v||n,y.insertBefore(b,y.firstChild),m.appendChecked=c.checked,m.boxModel=e.offsetWidth===2,"zoom"in e.style&&(e.style.display="inline",e.style.zoom=1,m.inlineBlockNeedsLayout=e.offsetWidth===2,e.style.display="",e.innerHTML="
",m.shrinkWrapBlocks=e.offsetWidth!==2),e.innerHTML="
t
",F=e.getElementsByTagName("td"),$=F[0].offsetHeight===0,F[0].style.display="",F[1].style.display="none",m.reliableHiddenOffsets=$&&F[0].offsetHeight===0,e.innerHTML="",L.defaultView&&L.defaultView.getComputedStyle&&(f=L.createElement("div"),f.style.width="0",f.style.marginRight="0",e.appendChild(f),m.reliableMarginRight=(parseInt((L.defaultView.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0),e.attachEvent)for(re in{submit:1,change:1,focusin:1})V="on"+re,$=V in e,$||(e.setAttribute(V,"return;"),$=typeof e[V]=="function"),m[re+"Bubbles"]=$;return t(function(){var be,Te,Q,u,p,x=1,A="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",k="visibility:hidden;border:0;",C="style='"+A+"border:5px solid #000;padding:0;'",P="
";v=L.getElementsByTagName("body")[0],!v||(be=L.createElement("div"),be.style.cssText=k+"width:0;height:0;position:static;top:0;margin-top:"+x+"px",v.insertBefore(be,v.firstChild),b=L.createElement("div"),b.style.cssText=A+k,b.innerHTML=P,be.appendChild(b),Te=b.firstChild,Q=Te.firstChild,u=Te.nextSibling.firstChild.firstChild,p={doesNotAddBorder:Q.offsetTop!==5,doesAddBorderForTableAndCells:u.offsetTop===5},Q.style.position="fixed",Q.style.top="20px",p.fixedPosition=Q.offsetTop===20||Q.offsetTop===15,Q.style.position=Q.style.top="",Te.style.overflow="hidden",Te.style.position="relative",p.subtractsBorderForOverflowNotVisible=Q.offsetTop===-5,p.doesNotIncludeMarginInBodyOffset=v.offsetTop!==x,v.removeChild(be),b=be=null,t.extend(m,p))}),b.innerHTML="",y.removeChild(b),b=w=a=l=v=f=e=c=null,m}(),t.boxModel=t.support.boxModel;var T=/^(?:\{.*\}|\[.*\])$/,W=/([A-Z])/g;t.extend({cache:{},uuid:0,expando:"jQuery"+(t.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?t.cache[e[t.expando]]:e[t.expando],!!e&&!Oe(e)},data:function(e,n,r,i){if(t.acceptData(e)){var a,l,c;t.expando;var f=typeof n=="string",m=e.nodeType,w=m?t.cache:e,v=m?e[t.expando]:e[t.expando]&&t.expando,y=n==="events";return(!v||!w[v]||!y&&!i&&!w[v].data)&&f&&r===D?void 0:(v||(m?e[t.expando]=v=++t.uuid:v=t.expando),w[v]||(w[v]={},m||(w[v].toJSON=t.noop)),(typeof n=="object"||typeof n=="function")&&(i?w[v]=t.extend(w[v],n):w[v].data=t.extend(w[v].data,n)),a=l=w[v],i||(l.data||(l.data={}),l=l.data),r!==D&&(l[t.camelCase(n)]=r),y&&!l[n]?a.events:(f?(c=l[n],c==null&&(c=l[t.camelCase(n)])):c=l,c))}},removeData:function(e,n,r){if(t.acceptData(e)){var i,a,l;t.expando;var c=e.nodeType,f=c?t.cache:e,m=c?e[t.expando]:t.expando;if(!f[m])return;if(n&&(i=r?f[m]:f[m].data,i)){for(t.isArray(n)?n=n:(n in i)?n=[n]:(n=t.camelCase(n),n in i?n=[n]:n=n.split(" ")),a=0,l=n.length;a"u"){if(this.length&&(l=t.data(this[0]),this[0].nodeType===1&&!t._data(this[0],"parsedAttrs"))){i=this[0].attributes;for(var c=0,f=i.length;c-1)return!0;return!1},val:function(e){var n,r,i,a=this[0];return arguments.length?(i=t.isFunction(e),this.each(function(l){var c=t(this),f;this.nodeType===1&&(i?f=e.call(this,l,c.val()):f=e,f==null?f="":typeof f=="number"?f+="":t.isArray(f)&&(f=t.map(f,function(m){return m==null?"":m+""})),n=t.valHooks[this.nodeName.toLowerCase()]||t.valHooks[this.type],(!n||!("set"in n)||n.set(this,f,"value")===D)&&(this.value=f))})):a?(n=t.valHooks[a.nodeName.toLowerCase()]||t.valHooks[a.type],n&&"get"in n&&(r=n.get(a,"value"))!==D?r:(r=a.value,typeof r=="string"?r.replace(ue,""):r==null?"":r)):D}}),t.extend({valHooks:{option:{get:function(e){var n=e.attributes.value;return!n||n.specified?e.value:e.text}},select:{get:function(e){var n,r,i,a,l=e.selectedIndex,c=[],f=e.options,m=e.type==="select-one";if(l<0)return null;for(r=m?l:0,i=m?l+1:f.length;r=0}),r.length||(e.selectedIndex=-1),r}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var a,l,c,f=e.nodeType;return!e||f===3||f===8||f===2?D:i&&n in t.attrFn?t(e)[n](r):"getAttribute"in e?(c=f!==1||!t.isXMLDoc(e),c&&(n=n.toLowerCase(),l=t.attrHooks[n]||(Be.test(n)?Xe:Ae)),r!==D?r===null?(t.removeAttr(e,n),D):l&&"set"in l&&c&&(a=l.set(e,r,n))!==D?a:(e.setAttribute(n,""+r),r):l&&"get"in l&&c&&(a=l.get(e,n))!==null?a:(a=e.getAttribute(n),a===null?D:a)):t.prop(e,n,r)},removeAttr:function(e,n){var r,i,a,l,c=0;if(e.nodeType===1)for(i=(n||"").split(Y),l=i.length;c=0}})});var Ke=/^(?:textarea|input|select)$/i,pt=/^([^\.]*)?(?:\.(.+))?$/,et=/\bhover(\.\S+)?/,tt=/^key/,gt=/^(?:mouse|contextmenu)|click/,Ze=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,mt=function(e){var n=Ze.exec(e);return n&&(n[1]=(n[1]||"").toLowerCase(),n[3]=n[3]&&new RegExp("(?:^|\\s)"+n[3]+"(?:\\s|$)")),n},St=function(e,n){return(!n[1]||e.nodeName.toLowerCase()===n[1])&&(!n[2]||e.id===n[2])&&(!n[3]||n[3].test(e.className))},Ge=function(e){return t.event.special.hover?e:e.replace(et,"mouseenter$1 mouseleave$1")};t.event={add:function(e,n,r,i,a){var l,c,f,m,w,v,y,b,S,F,V;if(!(e.nodeType===3||e.nodeType===8||!n||!r||!(l=t._data(e)))){for(r.handler&&(S=r,r=S.handler),r.guid||(r.guid=t.guid++),f=l.events,f||(l.events=f={}),c=l.handle,c||(l.handle=c=function(re){return typeof t<"u"&&(!re||t.event.triggered!==re.type)?t.event.dispatch.apply(c.elem,arguments):D},c.elem=e),n=Ge(n).split(" "),m=0;m=0&&(a=a.slice(0,-1),f=!0),a.indexOf(".")>=0&&(l=a.split("."),a=l.shift(),l.sort()),(!r||t.event.customEvent[a])&&!t.event.global[a])return;if(e=typeof e=="object"?e[t.expando]?e:new t.Event(a,e):new t.Event(a),e.type=a,e.isTrigger=!0,e.exclusive=f,e.namespace=l.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+l.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,y=a.indexOf(":")<0?"on"+a:"",(i||!r)&&e.preventDefault(),!r){c=t.cache;for(m in c)c[m].events&&c[m].events[a]&&t.event.trigger(e,n,c[m].handle.elem,!0);return}if(e.result=D,e.target||(e.target=r),n=n!=null?t.makeArray(n):[],n.unshift(e),b=t.event.special[a]||{},b.trigger&&b.trigger.apply(r,n)===!1)return;if(F=[[r,b.bindType||a]],!i&&!b.noBubble&&!t.isWindow(r)){for(V=b.delegateType||a,v=null,w=r.parentNode;w;w=w.parentNode)F.push([w,V]),v=w;v&&v===r.ownerDocument&&F.push([v.defaultView||v.parentWindow||N,V])}for(m=0;m=0:re===D&&(re=y[V]=F.quick?St(w,F.quick):t(w).is(V)),re&&S.push(F);S.length&&c.push({elem:w,matches:S})}for(n.length>r&&c.push({elem:this,matches:n.slice(r)}),f=0;f0?this.bind(n,r,i):this.trigger(n)},t.attrFn&&(t.attrFn[n]=!0),tt.test(n)&&(t.event.fixHooks[n]=t.event.keyHooks),gt.test(n)&&(t.event.fixHooks[n]=t.event.mouseHooks)}),function(){function e(u,p,x,A,k,C){for(var P=0,B=A.length;P0){z=I;break}}I=I[u]}A[P]=z}}}function n(u,p,x,A,k,C){for(var P=0,B=A.length;P+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),a=0,l=Object.prototype.toString,c=!1,f=!0,m=/\\/g,w=/\r\n/g,v=/\W/;[0,0].sort(function(){return f=!1,0});var y=function(u,p,x,A){x=x||[],p=p||L;var k=p;if(p.nodeType!==1&&p.nodeType!==9)return[];if(!u||typeof u!="string")return x;var C,P,B,I,z,Pe,we,h,E=!0,O=y.isXML(p),_=[],ie=u;do if(r.exec(""),C=r.exec(ie),C&&(ie=C[3],_.push(C[1]),C[2])){I=C[3];break}while(C);if(_.length>1&&F.exec(u))if(_.length===2&&S.relative[_[0]])P=Q(_[0]+_[1],p,A);else for(P=S.relative[_[0]]?[p]:y(_.shift(),p);_.length;)u=_.shift(),S.relative[u]&&(u+=_.shift()),P=Q(u,P,A);else if(!A&&_.length>1&&p.nodeType===9&&!O&&S.match.ID.test(_[0])&&!S.match.ID.test(_[_.length-1])&&(z=y.find(_.shift(),p,O),p=z.expr?y.filter(z.expr,z.set)[0]:z.set[0]),p)for(z=A?{expr:_.pop(),set:$(A)}:y.find(_.pop(),_.length===1&&(_[0]==="~"||_[0]==="+")&&p.parentNode?p.parentNode:p,O),P=z.expr?y.filter(z.expr,z.set):z.set,_.length>0?B=$(P):E=!1;_.length;)Pe=_.pop(),we=Pe,S.relative[Pe]?we=_.pop():Pe="",we==null&&(we=p),S.relative[Pe](B,we,O);else B=_=[];if(B||(B=P),B||y.error(Pe||u),l.call(B)==="[object Array]")if(!E)x.push.apply(x,B);else if(p&&p.nodeType===1)for(h=0;B[h]!=null;h++)B[h]&&(B[h]===!0||B[h].nodeType===1&&y.contains(p,B[h]))&&x.push(P[h]);else for(h=0;B[h]!=null;h++)B[h]&&B[h].nodeType===1&&x.push(P[h]);else $(B,x);return I&&(y(I,k,x,A),y.uniqueSort(x)),x};y.uniqueSort=function(u){if(be&&(c=f,u.sort(be),c))for(var p=1;p0},y.find=function(u,p,x){var A,k,C,P,B,I;if(!u)return[];for(k=0,C=S.order.length;k":function(u,p){var x,A=typeof p=="string",k=0,C=u.length;if(A&&!v.test(p)){for(p=p.toLowerCase();k=0)?x||A.push(B):x&&(p[P]=!1));return!1},ID:function(u){return u[1].replace(m,"")},TAG:function(u,p){return u[1].replace(m,"").toLowerCase()},CHILD:function(u){if(u[1]==="nth"){u[2]||y.error(u[0]),u[2]=u[2].replace(/^\+|\s*/g,"");var p=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(u[2]==="even"&&"2n"||u[2]==="odd"&&"2n+1"||!/\D/.test(u[2])&&"0n+"+u[2]||u[2]);u[2]=p[1]+(p[2]||1)-0,u[3]=p[3]-0}else u[2]&&y.error(u[0]);return u[0]=a++,u},ATTR:function(u,p,x,A,k,C){var P=u[1]=u[1].replace(m,"");return!C&&S.attrMap[P]&&(u[1]=S.attrMap[P]),u[4]=(u[4]||u[5]||"").replace(m,""),u[2]==="~="&&(u[4]=" "+u[4]+" "),u},PSEUDO:function(u,p,x,A,k){if(u[1]==="not")if((r.exec(u[3])||"").length>1||/^\w/.test(u[3]))u[3]=y(u[3],null,null,p);else{var C=y.filter(u[3],p,x,!0^k);return x||A.push.apply(A,C),!1}else if(S.match.POS.test(u[0])||S.match.CHILD.test(u[0]))return!0;return u},POS:function(u){return u.unshift(!0),u}},filters:{enabled:function(u){return u.disabled===!1&&u.type!=="hidden"},disabled:function(u){return u.disabled===!0},checked:function(u){return u.checked===!0},selected:function(u){return u.parentNode&&u.parentNode.selectedIndex,u.selected===!0},parent:function(u){return!!u.firstChild},empty:function(u){return!u.firstChild},has:function(u,p,x){return!!y(x[3],u).length},header:function(u){return/h\d/i.test(u.nodeName)},text:function(u){var p=u.getAttribute("type"),x=u.type;return u.nodeName.toLowerCase()==="input"&&x==="text"&&(p===x||p===null)},radio:function(u){return u.nodeName.toLowerCase()==="input"&&u.type==="radio"},checkbox:function(u){return u.nodeName.toLowerCase()==="input"&&u.type==="checkbox"},file:function(u){return u.nodeName.toLowerCase()==="input"&&u.type==="file"},password:function(u){return u.nodeName.toLowerCase()==="input"&&u.type==="password"},submit:function(u){var p=u.nodeName.toLowerCase();return(p==="input"||p==="button")&&u.type==="submit"},image:function(u){return u.nodeName.toLowerCase()==="input"&&u.type==="image"},reset:function(u){var p=u.nodeName.toLowerCase();return(p==="input"||p==="button")&&u.type==="reset"},button:function(u){var p=u.nodeName.toLowerCase();return p==="input"&&u.type==="button"||p==="button"},input:function(u){return/input|select|textarea|button/i.test(u.nodeName)},focus:function(u){return u===u.ownerDocument.activeElement}},setFilters:{first:function(u,p){return p===0},last:function(u,p,x,A){return p===A.length-1},even:function(u,p){return p%2===0},odd:function(u,p){return p%2===1},lt:function(u,p,x){return px[3]-0},nth:function(u,p,x){return x[3]-0===p},eq:function(u,p,x){return x[3]-0===p}},filter:{PSEUDO:function(u,p,x,A){var k=p[1],C=S.filters[k];if(C)return C(u,x,p,A);if(k==="contains")return(u.textContent||u.innerText||b([u])||"").indexOf(p[3])>=0;if(k==="not"){for(var P=p[3],B=0,I=P.length;B=0}},ID:function(u,p){return u.nodeType===1&&u.getAttribute("id")===p},TAG:function(u,p){return p==="*"&&u.nodeType===1||!!u.nodeName&&u.nodeName.toLowerCase()===p},CLASS:function(u,p){return(" "+(u.className||u.getAttribute("class"))+" ").indexOf(p)>-1},ATTR:function(u,p){var x=p[1],A=y.attr?y.attr(u,x):S.attrHandle[x]?S.attrHandle[x](u):u[x]!=null?u[x]:u.getAttribute(x),k=A+"",C=p[2],P=p[4];return A==null?C==="!=":!C&&y.attr?A!=null:C==="="?k===P:C==="*="?k.indexOf(P)>=0:C==="~="?(" "+k+" ").indexOf(P)>=0:P?C==="!="?k!==P:C==="^="?k.indexOf(P)===0:C==="$="?k.substr(k.length-P.length)===P:C==="|="?k===P||k.substr(0,P.length+1)===P+"-":!1:k&&A!==!1},POS:function(u,p,x,A){var k=p[2],C=S.setFilters[k];if(C)return C(u,x,p,A)}}},F=S.match.POS,V=function(u,p){return"\\"+(p-0+1)};for(var re in S.match)S.match[re]=new RegExp(S.match[re].source+/(?![^\[]*\])(?![^\(]*\))/.source),S.leftMatch[re]=new RegExp(/(^(?:.|\r|\n)*?)/.source+S.match[re].source.replace(/\\(\d+)/g,V));var $=function(u,p){return u=Array.prototype.slice.call(u,0),p?(p.push.apply(p,u),p):u};try{Array.prototype.slice.call(L.documentElement.childNodes,0)[0].nodeType}catch(u){$=function(p,x){var A=0,k=x||[];if(l.call(p)==="[object Array]")Array.prototype.push.apply(k,p);else if(typeof p.length=="number")for(var C=p.length;A",x.insertBefore(u,x.firstChild),L.getElementById(p)&&(S.find.ID=function(A,k,C){if(typeof k.getElementById<"u"&&!C){var P=k.getElementById(A[1]);return P?P.id===A[1]||typeof P.getAttributeNode<"u"&&P.getAttributeNode("id").nodeValue===A[1]?[P]:D:[]}},S.filter.ID=function(A,k){var C=typeof A.getAttributeNode<"u"&&A.getAttributeNode("id");return A.nodeType===1&&C&&C.nodeValue===k}),x.removeChild(u),x=u=null}(),function(){var u=L.createElement("div");u.appendChild(L.createComment("")),u.getElementsByTagName("*").length>0&&(S.find.TAG=function(p,x){var A=x.getElementsByTagName(p[1]);if(p[1]==="*"){for(var k=[],C=0;A[C];C++)A[C].nodeType===1&&k.push(A[C]);A=k}return A}),u.innerHTML="",u.firstChild&&typeof u.firstChild.getAttribute<"u"&&u.firstChild.getAttribute("href")!=="#"&&(S.attrHandle.href=function(p){return p.getAttribute("href",2)}),u=null}(),L.querySelectorAll&&function(){var u=y,p=L.createElement("div"),x="__sizzle__";if(p.innerHTML="

",!p.querySelectorAll||p.querySelectorAll(".TEST").length!==0){y=function(k,C,P,B){if(C=C||L,!B&&!y.isXML(C)){var I=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(k);if(I&&(C.nodeType===1||C.nodeType===9)){if(I[1])return $(C.getElementsByTagName(k),P);if(I[2]&&S.find.CLASS&&C.getElementsByClassName)return $(C.getElementsByClassName(I[2]),P)}if(C.nodeType===9){if(k==="body"&&C.body)return $([C.body],P);if(I&&I[3]){var z=C.getElementById(I[3]);if(!z||!z.parentNode)return $([],P);if(z.id===I[3])return $([z],P)}try{return $(C.querySelectorAll(k),P)}catch(_){}}else if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var Pe=C,we=C.getAttribute("id"),h=we||x,E=C.parentNode,O=/^\s*[+~]/.test(k);we?h=h.replace(/'/g,"\\$&"):C.setAttribute("id",h),O&&E&&(C=C.parentNode);try{if(!O||E)return $(C.querySelectorAll("[id='"+h+"'] "+k),P)}catch(_){}finally{we||Pe.removeAttribute("id")}}}return u(k,C,P,B)};for(var A in u)y[A]=u[A];p=null}}(),function(){var u=L.documentElement,p=u.matchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.msMatchesSelector;if(p){var x=!p.call(L.createElement("div"),"div"),A=!1;try{p.call(L.documentElement,"[test!='']:sizzle")}catch(k){A=!0}y.matchesSelector=function(k,C){if(C=C.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!y.isXML(k))try{if(A||!S.match.PSEUDO.test(C)&&!/!=/.test(C)){var P=p.call(k,C);if(P||!x||k.document&&k.document.nodeType!==11)return P}}catch(B){}return y(C,null,null,[k]).length>0}}}(),function(){var u=L.createElement("div");if(u.innerHTML="
",u.getElementsByClassName&&u.getElementsByClassName("e").length!==0){if(u.lastChild.className="e",u.getElementsByClassName("e").length===1)return;S.order.splice(1,0,"CLASS"),S.find.CLASS=function(p,x,A){if(typeof x.getElementsByClassName<"u"&&!A)return x.getElementsByClassName(p[1])},u=null}}(),L.documentElement.contains?y.contains=function(u,p){return u!==p&&(u.contains?u.contains(p):!0)}:L.documentElement.compareDocumentPosition?y.contains=function(u,p){return!!(u.compareDocumentPosition(p)&16)}:y.contains=function(){return!1},y.isXML=function(u){var p=(u?u.ownerDocument||u:0).documentElement;return p?p.nodeName!=="HTML":!1};var Q=function(u,p,x){for(var A,k=[],C="",P=p.nodeType?[p]:p;A=S.match.PSEUDO.exec(u);)C+=A[0],u=u.replace(S.match.PSEUDO,"");u=S.relative[u]?u+"*":u;for(var B=0,I=P.length;B0){for(c=l;c=0:t.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,n){var r=[],i,a,l=this[0];if(t.isArray(e)){for(var c=1;l&&l.ownerDocument&&l!==n;){for(i=0;i-1:t.find.matchesSelector(l,e)){r.push(l);break}if(l=l.parentNode,!l||!l.ownerDocument||l===n||l.nodeType===11)break}return r=r.length>1?t.unique(r):r,this.pushStack(r,"closest",e)},index:function(e){return e?typeof e=="string"?t.inArray(this[0],t(e)):t.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,n){var r=typeof e=="string"?t(e,n):t.makeArray(e&&e.nodeType?[e]:e),i=t.merge(this.get(),r);return this.pushStack(H(r[0])||H(i[0])?i:t.unique(i))},andSelf:function(){return this.add(this.prevObject)}}),t.each({parent:function(e){var n=e.parentNode;return n&&n.nodeType!==11?n:null},parents:function(e){return t.dir(e,"parentNode")},parentsUntil:function(e,n,r){return t.dir(e,"parentNode",r)},next:function(e){return t.nth(e,2,"nextSibling")},prev:function(e){return t.nth(e,2,"previousSibling")},nextAll:function(e){return t.dir(e,"nextSibling")},prevAll:function(e){return t.dir(e,"previousSibling")},nextUntil:function(e,n,r){return t.dir(e,"nextSibling",r)},prevUntil:function(e,n,r){return t.dir(e,"previousSibling",r)},siblings:function(e){return t.sibling(e.parentNode.firstChild,e)},children:function(e){return t.sibling(e.firstChild)},contents:function(e){return t.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:t.makeArray(e.childNodes)}},function(e,n){t.fn[e]=function(r,i){var a=t.map(this,n,r),l=Nt.call(arguments);return Ct.test(e)||(i=r),i&&typeof i=="string"&&(a=t.filter(i,a)),a=this.length>1&&!rt[e]?t.unique(a):a,(this.length>1||jt.test(i))&&ye.test(e)&&(a=a.reverse()),this.pushStack(a,e,l.join(","))}}),t.extend({filter:function(e,n,r){return r&&(e=":not("+e+")"),n.length===1?t.find.matchesSelector(n[0],e)?[n[0]]:[]:t.find.matches(e,n)},dir:function(e,n,r){for(var i=[],a=e[n];a&&a.nodeType!==9&&(r===D||a.nodeType!==1||!t(a).is(r));)a.nodeType===1&&i.push(a),a=a[n];return i},nth:function(e,n,r,i){n=n||1;for(var a=0;e&&!(e.nodeType===1&&++a===n);e=e[r]);return e},sibling:function(e,n){for(var r=[];e;e=e.nextSibling)e.nodeType===1&&e!==n&&r.push(e);return r}});var at="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",yt=/ jQuery\d+="(?:\d+|null)"/g,pe=/^\s+/,Le=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,fe=/<([\w:]+)/,Ve=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},dn=K(L);_e.optgroup=_e.option,_e.tbody=_e.tfoot=_e.colgroup=_e.caption=_e.thead,_e.th=_e.td,t.support.htmlSerialize||(_e._default=[1,"div
","
"]),t.fn.extend({text:function(e){return t.isFunction(e)?this.each(function(n){var r=t(this);r.text(e.call(this,n,r.text()))}):typeof e!="object"&&e!==D?this.empty().append((this[0]&&this[0].ownerDocument||L).createTextNode(e)):t.text(this)},wrapAll:function(e){if(t.isFunction(e))return this.each(function(r){t(this).wrapAll(e.call(this,r))});if(this[0]){var n=t(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&n.insertBefore(this[0]),n.map(function(){for(var r=this;r.firstChild&&r.firstChild.nodeType===1;)r=r.firstChild;return r}).append(this)}return this},wrapInner:function(e){return t.isFunction(e)?this.each(function(n){t(this).wrapInner(e.call(this,n))}):this.each(function(){var n=t(this),r=n.contents();r.length?r.wrapAll(e):n.append(e)})},wrap:function(e){return this.each(function(){t(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){t.nodeName(this,"body")||t(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(n){this.parentNode.insertBefore(n,this)});if(arguments.length){var e=t(arguments[0]);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(n){this.parentNode.insertBefore(n,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,t(arguments[0]).toArray()),e}},remove:function(e,n){for(var r=0,i;(i=this[r])!=null;r++)(!e||t.filter(e,[i]).length)&&(!n&&i.nodeType===1&&(t.cleanData(i.getElementsByTagName("*")),t.cleanData([i])),i.parentNode&&i.parentNode.removeChild(i));return this},empty:function(){for(var e=0,n;(n=this[e])!=null;e++)for(n.nodeType===1&&t.cleanData(n.getElementsByTagName("*"));n.firstChild;)n.removeChild(n.firstChild);return this},clone:function(e,n){return e=e==null?!1:e,n=n==null?e:n,this.map(function(){return t.clone(this,e,n)})},html:function(e){if(e===D)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(yt,""):null;if(typeof e=="string"&&!lt.test(e)&&(t.support.leadingWhitespace||!pe.test(e))&&!_e[(fe.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Le,"<$1>");try{for(var n=0,r=this.length;n1&&w0?this.clone(!0):this).get();t(a[c])[n](m),i=i.concat(m)}return this.pushStack(i,e,a.selector)}}),t.extend({clone:function(e,n,r){var i=e.cloneNode(!0),a,l,c;if((!t.support.noCloneEvent||!t.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!t.isXMLDoc(e))for($e(e,i),a=Ie(e),l=Ie(i),c=0;a[c];++c)l[c]&&$e(a[c],l[c]);if(n&&(ne(e,i),r))for(a=Ie(e),l=Ie(i),c=0;a[c];++c)ne(a[c],l[c]);return a=l=null,i},clean:function(e,n,r,i){var a;n=n||L,typeof n.createElement>"u"&&(n=n.ownerDocument||n[0]&&n[0].ownerDocument||L);for(var l=[],c,f=0,m;(m=e[f])!=null;f++)if(typeof m=="number"&&(m+=""),!!m){if(typeof m=="string")if(!it.test(m))m=n.createTextNode(m);else{m=m.replace(Le,"<$1>");var w=(fe.exec(m)||["",""])[1].toLowerCase(),v=_e[w]||_e._default,y=v[0],b=n.createElement("div");for(n===L?dn.appendChild(b):K(n).appendChild(b),b.innerHTML=v[1]+m+v[2];y--;)b=b.lastChild;if(!t.support.tbody){var S=Ve.test(m),F=w==="table"&&!S?b.firstChild&&b.firstChild.childNodes:v[1]===""&&!S?b.childNodes:[];for(c=F.length-1;c>=0;--c)t.nodeName(F[c],"tbody")&&!F[c].childNodes.length&&F[c].parentNode.removeChild(F[c])}!t.support.leadingWhitespace&&pe.test(m)&&b.insertBefore(n.createTextNode(pe.exec(m)[0]),b.firstChild),m=b.childNodes}var V;if(!t.support.appendChecked)if(m[0]&&typeof(V=m.length)=="number")for(c=0;c=0)return i+"px"}}}),t.support.opacity||(t.cssHooks.opacity={get:function(e,n){return hn.test((n&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":n?"1":""},set:function(e,n){var r=e.style,i=e.currentStyle,a=t.isNumeric(n)?"alpha(opacity="+n*100+")":"",l=i&&i.filter||r.filter||"";r.zoom=1,!(n>=1&&t.trim(l.replace(It,""))===""&&(r.removeAttribute("filter"),i&&!i.filter))&&(r.filter=It.test(l)?l.replace(It,a):l+" "+a)}}),t(function(){t.support.reliableMarginRight||(t.cssHooks.marginRight={get:function(e,n){var r;return t.swap(e,{display:"inline-block"},function(){n?r=wt(e,"margin-right","marginRight"):r=e.style.marginRight}),r}})}),L.defaultView&&L.defaultView.getComputedStyle&&(Qt=function(e,n){var r,i,a;return n=n.replace(pn,"-$1").toLowerCase(),(i=e.ownerDocument.defaultView)?((a=i.getComputedStyle(e,null))&&(r=a.getPropertyValue(n),r===""&&!t.contains(e.ownerDocument.documentElement,e)&&(r=t.style(e,n))),r):D}),L.documentElement.currentStyle&&(Xt=function(e,n){var r,i,a,l=e.currentStyle&&e.currentStyle[n],c=e.style;return l===null&&c&&(a=c[n])&&(l=a),!Kt.test(l)&&gn.test(l)&&(r=c.left,i=e.runtimeStyle&&e.runtimeStyle.left,i&&(e.runtimeStyle.left=e.currentStyle.left),c.left=n==="fontSize"?"1em":l||0,l=c.pixelLeft+"px",c.left=r,i&&(e.runtimeStyle.left=i)),l===""?"auto":l}),wt=Qt||Xt,t.expr&&t.expr.filters&&(t.expr.filters.hidden=function(e){var n=e.offsetWidth,r=e.offsetHeight;return n===0&&r===0||!t.support.reliableHiddenOffsets&&(e.style&&e.style.display||t.css(e,"display"))==="none"},t.expr.filters.visible=function(e){return!t.expr.filters.hidden(e)});var xn=/%20/g,An=/\[\]$/,Yt=/\r?\n/g,bn=/#.*$/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,kn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,Mn=/^\/\//,Zt=/\?/,Sn=/)<[^<]*)*<\/script>/gi,_n=/^(?:select|textarea)/i,Jt=/\s+/,En=/([?&])_=[^&]*/,$t=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,en=t.fn.load,Ot={},tn={},dt,ht,nn=["*/"]+["*"];try{dt=o.href}catch(e){dt=L.createElement("a"),dt.href="",dt=dt.href}ht=$t.exec(dt.toLowerCase())||[],t.fn.extend({load:function(e,n,r){if(typeof e!="string"&&en)return en.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var a=e.slice(i,e.length);e=e.slice(0,i)}var l="GET";n&&(t.isFunction(n)?(r=n,n=D):typeof n=="object"&&(n=t.param(n,t.ajaxSettings.traditional),l="POST"));var c=this;return t.ajax({url:e,type:l,dataType:"html",data:n,complete:function(f,m,w){w=f.responseText,f.isResolved()&&(f.done(function(v){w=v}),c.html(a?t("
").append(w.replace(Sn,"")).find(a):w)),r&&c.each(r,[w,m,f])}}),this},serialize:function(){return t.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?t.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||_n.test(this.nodeName)||kn.test(this.type))}).map(function(e,n){var r=t(this).val();return r==null?null:t.isArray(r)?t.map(r,function(i,a){return{name:n.name,value:i.replace(Yt,`\r `)}}):{name:n.name,value:r.replace(Yt,`\r `)}}).get()}}),t.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,n){t.fn[n]=function(r){return this.bind(n,r)}}),t.each(["get","post"],function(e,n){t[n]=function(r,i,a,l){return t.isFunction(i)&&(l=l||a,a=i,i=D),t.ajax({type:n,url:r,data:i,success:a,dataType:l})}}),t.extend({getScript:function(e,n){return t.get(e,D,n,"script")},getJSON:function(e,n,r){return t.get(e,n,r,"json")},ajaxSetup:function(e,n){return n?Ee(e,t.ajaxSettings):(n=e,e=t.ajaxSettings),Ee(e,n),e},ajaxSettings:{url:dt,isLocal:Cn.test(ht[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","*":nn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":N.String,"text html":!0,"text json":t.parseJSON,"text xml":t.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:De(Ot),ajaxTransport:De(tn),ajax:function(e,n){function r(x,A,k,C){if($!==2){$=2,V&&clearTimeout(V),F=D,b=C||"",Q.readyState=x>0?4:0;var P,B,I,z=A,Pe=k?se(i,Q,k):D,we,h;if(x>=200&&x<300||x===304)if(i.ifModified&&((we=Q.getResponseHeader("Last-Modified"))&&(t.lastModified[w]=we),(h=Q.getResponseHeader("Etag"))&&(t.etag[w]=h)),x===304)z="notmodified",P=!0;else try{B=Me(i,Pe),z="success",P=!0}catch(E){z="parsererror",I=E}else I=z,(!z||x)&&(z="error",x<0&&(x=0));Q.status=x,Q.statusText=""+(A||z),P?c.resolveWith(a,[B,z,Q]):c.rejectWith(a,[Q,z,I]),Q.statusCode(m),m=D,be&&l.trigger("ajax"+(P?"Success":"Error"),[Q,i,P?B:I]),f.fireWith(a,[Q,z]),be&&(l.trigger("ajaxComplete",[Q,i]),--t.active||t.event.trigger("ajaxStop"))}}typeof e=="object"&&(n=e,e=D),n=n||{};var i=t.ajaxSetup({},n),a=i.context||i,l=a!==i&&(a.nodeType||a instanceof t)?t(a):t.event,c=t.Deferred(),f=t.Callbacks("once memory"),m=i.statusCode||{},w,v={},y={},b,S,F,V,re,$=0,be,Te,Q={readyState:0,setRequestHeader:function(x,A){if(!$){var k=x.toLowerCase();x=y[k]=y[k]||x,v[x]=A}return this},getAllResponseHeaders:function(){return $===2?b:null},getResponseHeader:function(x){var A;if($===2){if(!S)for(S={};A=Tn.exec(b);)S[A[1].toLowerCase()]=A[2];A=S[x.toLowerCase()]}return A===D?null:A},overrideMimeType:function(x){return $||(i.mimeType=x),this},abort:function(x){return x=x||"abort",F&&F.abort(x),r(0,x),this}};if(c.promise(Q),Q.success=Q.done,Q.error=Q.fail,Q.complete=f.add,Q.statusCode=function(x){if(x){var A;if($<2)for(A in x)m[A]=[m[A],x[A]];else A=x[Q.status],Q.then(A,A)}return this},i.url=((e||i.url)+"").replace(bn,"").replace(Mn,ht[1]+"//"),i.dataTypes=t.trim(i.dataType||"*").toLowerCase().split(Jt),i.crossDomain==null&&(re=$t.exec(i.url.toLowerCase()),i.crossDomain=!(!re||re[1]==ht[1]&&re[2]==ht[2]&&(re[3]||(re[1]==="http:"?80:443))==(ht[3]||(ht[1]==="http:"?80:443)))),i.data&&i.processData&&typeof i.data!="string"&&(i.data=t.param(i.data,i.traditional)),Se(Ot,i,n,Q),$===2)return!1;if(be=i.global,i.type=i.type.toUpperCase(),i.hasContent=!Nn.test(i.type),be&&t.active++===0&&t.event.trigger("ajaxStart"),!i.hasContent&&(i.data&&(i.url+=(Zt.test(i.url)?"&":"?")+i.data,delete i.data),w=i.url,i.cache===!1)){var u=t.now(),p=i.url.replace(En,"$1_="+u);i.url=p+(p===i.url?(Zt.test(i.url)?"&":"?")+"_="+u:"")}(i.data&&i.hasContent&&i.contentType!==!1||n.contentType)&&Q.setRequestHeader("Content-Type",i.contentType),i.ifModified&&(w=w||i.url,t.lastModified[w]&&Q.setRequestHeader("If-Modified-Since",t.lastModified[w]),t.etag[w]&&Q.setRequestHeader("If-None-Match",t.etag[w])),Q.setRequestHeader("Accept",i.dataTypes[0]&&i.accepts[i.dataTypes[0]]?i.accepts[i.dataTypes[0]]+(i.dataTypes[0]!=="*"?", "+nn+"; q=0.01":""):i.accepts["*"]);for(Te in i.headers)Q.setRequestHeader(Te,i.headers[Te]);if(i.beforeSend&&(i.beforeSend.call(a,Q,i)===!1||$===2))return Q.abort(),!1;for(Te in{success:1,error:1,complete:1})Q[Te](i[Te]);if(F=Se(tn,i,n,Q),!F)r(-1,"No Transport");else{Q.readyState=1,be&&l.trigger("ajaxSend",[Q,i]),i.async&&i.timeout>0&&(V=setTimeout(function(){Q.abort("timeout")},i.timeout));try{$=1,F.send(v,r)}catch(x){$<2?r(-1,x):t.error(x)}}return Q},param:function(e,n){var r=[],i=function(l,c){c=t.isFunction(c)?c():c,r[r.length]=encodeURIComponent(l)+"="+encodeURIComponent(c)};if(n===D&&(n=t.ajaxSettings.traditional),t.isArray(e)||e.jquery&&!t.isPlainObject(e))t.each(e,function(){i(this.name,this.value)});else for(var a in e)xe(a,e[a],n,i);return r.join("&").replace(xn,"+")}}),t.extend({active:0,lastModified:{},etag:{}});var Dn=t.now(),_t=/(\=)\?(&|$)|\?\?/i;t.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return t.expando+"_"+Dn++}}),t.ajaxPrefilter("json jsonp",function(e,n,r){var i=e.contentType==="application/x-www-form-urlencoded"&&typeof e.data=="string";if(e.dataTypes[0]==="jsonp"||e.jsonp!==!1&&(_t.test(e.url)||i&&_t.test(e.data))){var a,l=e.jsonpCallback=t.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,c=N[l],f=e.url,m=e.data,w="$1"+l+"$2";return e.jsonp!==!1&&(f=f.replace(_t,w),e.url===f&&(i&&(m=m.replace(_t,w)),e.data===m&&(f+=(/\?/.test(f)?"&":"?")+e.jsonp+"="+l))),e.url=f,e.data=m,N[l]=function(v){a=[v]},r.always(function(){N[l]=c,a&&t.isFunction(c)&&N[l](a[0])}),e.converters["script json"]=function(){return a||t.error(l+" was not called"),a[0]},e.dataTypes[0]="json","script"}}),t.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return t.globalEval(e),e}}}),t.ajaxPrefilter("script",function(e){e.cache===D&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),t.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=L.head||L.getElementsByTagName("head")[0]||L.documentElement;return{send:function(i,a){n=L.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(l,c){(c||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=D,c||a(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Bt=N.ActiveXObject?function(){for(var e in xt)xt[e](0,1)}:!1,Pn=0,xt;t.ajaxSettings.xhr=N.ActiveXObject?function(){return!this.isLocal&&ke()||G()}:ke,function(e){t.extend(t.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(t.ajaxSettings.xhr()),t.support.ajax&&t.ajaxTransport(function(e){if(!e.crossDomain||t.support.cors){var n;return{send:function(r,i){var a=e.xhr(),l,c;if(e.username?a.open(e.type,e.url,e.async,e.username,e.password):a.open(e.type,e.url,e.async),e.xhrFields)for(c in e.xhrFields)a[c]=e.xhrFields[c];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),!e.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");try{for(c in r)a.setRequestHeader(c,r[c])}catch(f){}a.send(e.hasContent&&e.data||null),n=function(f,m){var w,v,y,b,S;try{if(n&&(m||a.readyState===4))if(n=D,l&&(a.onreadystatechange=t.noop,Bt&&delete xt[l]),m)a.readyState!==4&&a.abort();else{w=a.status,y=a.getAllResponseHeaders(),b={},S=a.responseXML,S&&S.documentElement&&(b.xml=S),b.text=a.responseText;try{v=a.statusText}catch(F){v=""}!w&&e.isLocal&&!e.crossDomain?w=b.text?200:404:w===1223&&(w=204)}}catch(F){m||i(-1,F)}b&&i(w,v,b,y)},!e.async||a.readyState===4?n():(l=++Pn,Bt&&(xt||(xt={},t(N).unload(Bt)),xt[l]=n),a.onreadystatechange=n)},abort:function(){n&&n(0,1)}}}});var Wt={},Je,At,Fn=/^(?:toggle|show|hide)$/,Ln=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Et,rn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Dt;t.fn.extend({show:function(e,n,r){var i,a;if(e||e===0)return this.animate(Z("show",3),e,n,r);for(var l=0,c=this.length;l=f.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),f.animatedProperties[this.prop]=!0;for(n in f.animatedProperties)f.animatedProperties[n]!==!0&&(l=!1);if(l){if(f.overflow!=null&&!t.support.shrinkWrapBlocks&&t.each(["","X","Y"],function(m,w){c.style["overflow"+w]=f.overflow[m]}),f.hide&&t(c).hide(),f.hide||f.show)for(n in f.animatedProperties)t.style(c,n,f.orig[n]),t.removeData(c,"fxshow"+n,!0),t.removeData(c,"toggle"+n,!0);i=f.complete,i&&(f.complete=!1,i.call(c))}return!1}return f.duration==1/0?this.now=a:(r=a-this.startTime,this.state=r/f.duration,this.pos=t.easing[f.animatedProperties[this.prop]](this.state,r,0,1,f.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},t.extend(t.fx,{tick:function(){for(var e,n=t.timers,r=0;r-1,w={},v={},y,b;m?(v=a.position(),y=v.top,b=v.left):(y=parseFloat(c)||0,b=parseFloat(f)||0),t.isFunction(n)&&(n=n.call(e,r,l)),n.top!=null&&(w.top=n.top-l.top+y),n.left!=null&&(w.left=n.left-l.left+b),"using"in n?n.using.call(e,w):a.css(w)}},t.fn.extend({position:function(){if(!this[0])return null;var e=this[0],n=this.offsetParent(),r=this.offset(),i=sn.test(n[0].nodeName)?{top:0,left:0}:n.offset();return r.top-=parseFloat(t.css(e,"marginTop"))||0,r.left-=parseFloat(t.css(e,"marginLeft"))||0,i.top+=parseFloat(t.css(n[0],"borderTopWidth"))||0,i.left+=parseFloat(t.css(n[0],"borderLeftWidth"))||0,{top:r.top-i.top,left:r.left-i.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||L.body;e&&!sn.test(e.nodeName)&&t.css(e,"position")==="static";)e=e.offsetParent;return e})}}),t.each(["Left","Top"],function(e,n){var r="scroll"+n;t.fn[r]=function(i){var a,l;return i===D?(a=this[0],a?(l=te(a),l?"pageXOffset"in l?l[e?"pageYOffset":"pageXOffset"]:t.support.boxModel&&l.document.documentElement[r]||l.document.body[r]:a[r]):null):this.each(function(){l=te(this),l?l.scrollTo(e?t(l).scrollLeft():i,e?i:t(l).scrollTop()):this[r]=i})}}),t.each(["Height","Width"],function(e,n){var r=n.toLowerCase();t.fn["inner"+n]=function(){var i=this[0];return i?i.style?parseFloat(t.css(i,r,"padding")):this[r]():null},t.fn["outer"+n]=function(i){var a=this[0];return a?a.style?parseFloat(t.css(a,r,i?"margin":"border")):this[r]():null},t.fn[r]=function(i){var a=this[0];if(!a)return i==null?null:this;if(t.isFunction(i))return this.each(function(w){var v=t(this);v[r](i.call(this,w,v[r]()))});if(t.isWindow(a)){var l=a.document.documentElement["client"+n],c=a.document.body;return a.document.compatMode==="CSS1Compat"&&l||c&&c["client"+n]||l}if(a.nodeType===9)return Math.max(a.documentElement["client"+n],a.body["scroll"+n],a.documentElement["scroll"+n],a.body["offset"+n],a.documentElement["offset"+n]);if(i===D){var f=t.css(a,r),m=parseFloat(f);return t.isNumeric(m)?m:f}return this.css(r,typeof i=="string"?i:i+"px")}}),N.jQuery=N.$=t})(window);(function(N){var D,te,ge="",Z="4.1.0",X=Math.PI,Ne=X/2,G="ontouchstart"in window,ke=G?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},Me={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br","l","r"]},se=["single","double"],xe=["ltr","rtl"],Ee={acceleration:!0,display:"double",duration:600,page:1,gradients:!0,turnCorners:"bl,br",when:null},Se={cornerSize:100},De=6,q={init:function(s){D="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,te=J(),ge=oe();var o,t=0,d=this.data(),g=this.children();if(s=N.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},Ee,s),d.opts=s,d.pageObjs={},d.pages={},d.pageWrap={},d.pageZoom={},d.pagePlace={},d.pageMv=[],d.zoom=1,d.totalPages=s.pages||0,d.eventHandlers={touchStart:N.proxy(q._touchStart,this),touchMove:N.proxy(q._touchMove,this),touchEnd:N.proxy(q._touchEnd,this),start:N.proxy(q._eventStart,this)},s.when)for(o in s.when)H(o,s.when)&&this.bind(o,s.when[o]);for(this.css({position:"relative",width:s.width,height:s.height}),this.turn("display",s.display),s.direction!==""&&this.turn("direction",s.direction),D&&!G&&s.acceleration&&this.transform(K(0,0,!0)),o=0;oW)throw qe('Page "'+o+'" cannot be inserted')}else o=W,g=!0;return o>=1&&o<=W&&(T.display=="double"?d=o%2?" odd":" even":d="",T.done&&this.turn("stop"),o in T.pageObjs&&q._movePages.call(this,o,1),g&&(T.totalPages=W),T.pageObjs[o]=N(s).css({float:"left"}).addClass("page p"+o+d),!L()&&T.pageObjs[o].hasClass("hard")&&T.pageObjs[o].removeClass("hard"),q._addPage.call(this,o),q._removeFromDOM.call(this)),this},_addPage:function(s){var o=this.data(),t=o.pageObjs[s];if(t)if(q._necessPage.call(this,s)){if(!o.pageWrap[s]){o.pageWrap[s]=N("
",{class:"page-wrapper",page:s,css:{position:"absolute",overflow:"hidden"}}),this.append(o.pageWrap[s]),o.pagePlace[s]||(o.pagePlace[s]=s,o.pageObjs[s].appendTo(o.pageWrap[s]));var d=q._pageSize.call(this,s,!0);t.css({width:d.width,height:d.height}),o.pageWrap[s].css(d)}o.pagePlace[s]==s&&q._makeFlip.call(this,s)}else o.pagePlace[s]=0,o.pageObjs[s]&&o.pageObjs[s].remove()},hasPage:function(s){return H(s,this.data().pageObjs)},center:function(s){var o=this.data(),t=N(this).turn("size"),d=0;if(!o.noCenter){if(o.display=="double"){var g=this.turn("view",s||o.tpage||o.page);o.direction=="ltr"?g[0]?g[1]||(d+=t.width/4):d-=t.width/4:g[0]?g[1]||(d-=t.width/4):d+=t.width/4}N(this).css({marginLeft:d})}return this},destroy:function(){var s=this,o=this.data(),t=["end","first","flip","last","pressed","released","start","turning","turned","zooming","missing"];if(Oe("destroying",this)!="prevented"){for(o.destroying=!0,N.each(t,function(d,g){s.unbind(g)}),this.parent().unbind("start",o.eventHandlers.start),N(document).unbind(ke.move,o.eventHandlers.touchMove).unbind(ke.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(s){var o=this.data();if(typeof s=="number"){if(s<.001||s>100)throw qe(s+" is not a value for zoom");if(Oe("zooming",this,[s,o.zoom])=="prevented")return this;var t=this.turn("size"),d=this.turn("view"),g=1/o.zoom,T=Math.round(t.width*g*s),W=Math.round(t.height*g*s);o.zoom=s,N(this).turn("stop").turn("size",T,W),o.opts.autoCenter&&this.turn("center"),q._updateShadow.call(this);for(var R=0;RT.totalPages)throw qe('"'+s+'" is not a valid page');return g[1]=g[1]||g[0],g[0]>=1&&g[1]<=T.totalPages?(o=Math.floor((De-2)/2),T.totalPages-g[1]>g[0]?(t=Math.min(g[0]-1,o),d=2*o-t):(d=Math.min(T.totalPages-g[1],o),t=2*o-d)):(t=De-1,d=De-1),[Math.max(1,g[0]-t),Math.min(T.totalPages,g[1]+d)]},_necessPage:function(s){if(s===0)return!0;var o=this.turn("range");return this.data().pageObjs[s].hasClass("fixed")||s>=o[0]&&s<=o[1]},_removeFromDOM:function(){var s,o=this.data();for(s in o.pageWrap)H(s,o.pageWrap)&&!q._necessPage.call(this,s)&&q._removePageFromDOM.call(this,s)},_removePageFromDOM:function(s){var o=this.data();if(o.pages[s]){var t=o.pages[s].data();U._moveFoldingPage.call(o.pages[s],!1),t.f&&t.f.fwrapper&&t.f.fwrapper.remove(),o.pages[s].removeData(),o.pages[s].remove(),delete o.pages[s]}o.pageObjs[s]&&o.pageObjs[s].remove(),o.pageWrap[s]&&(o.pageWrap[s].remove(),delete o.pageWrap[s]),q._removeMv.call(this,s),delete o.pagePlace[s],delete o.pageZoom[s]},removePage:function(s){var o=this.data();if(s=="*")for(;o.totalPages!==0;)this.turn("removePage",o.totalPages);else{if(s<1||s>o.totalPages)throw qe("The page "+s+" doesn't exist");o.pageObjs[s]&&(this.turn("stop"),q._removePageFromDOM.call(this,s),delete o.pageObjs[s]),q._movePages.call(this,s,-1),o.totalPages=o.totalPages-1,o.page>o.totalPages?(o.page=null,q._fitPage.call(this,o.totalPages)):(q._makeRange.call(this),this.turn("update"))}return this},_movePages:function(s,o){var t,d=this,g=this.data(),T=g.display=="single",W=function(R){var Y=R+o,ue=Y%2,de=ue?" odd ":" even ";g.pageObjs[R]&&(g.pageObjs[Y]=g.pageObjs[R].removeClass("p"+R+" odd even").addClass("p"+Y+de)),g.pagePlace[R]&&g.pageWrap[R]&&(g.pagePlace[Y]=Y,g.pageObjs[Y].hasClass("fixed")?g.pageWrap[Y]=g.pageWrap[R].attr("page",Y):g.pageWrap[Y]=g.pageWrap[R].css(q._pageSize.call(d,Y,!0)).attr("page",Y),g.pages[R]&&(g.pages[Y]=g.pages[R].flip("options",{page:Y,next:T||ue?Y+1:Y-1})),o&&(delete g.pages[R],delete g.pagePlace[R],delete g.pageZoom[R],delete g.pageObjs[R],delete g.pageWrap[R]))};if(o>0)for(t=g.totalPages;t>=s;t--)W(t);else for(t=s;t<=g.totalPages;t++)W(t)},display:function(s){var o=this.data(),t=o.display;if(s===void 0)return t;if(N.inArray(s,se)==-1)throw qe('"'+s+'" is not a value for display');switch(s){case"single":o.pageObjs[0]||(this.turn("stop").css({overflow:"hidden"}),o.pageObjs[0]=N("
",{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=s,t){var d=this.turn("size");q._movePages.call(this,1,0),this.turn("size",d.width,d.height).turn("update")}return this},direction:function(s){var o=this.data();if(s===void 0)return o.direction;if(s=s.toLowerCase(),N.inArray(s,xe)==-1)throw qe('"'+s+'" is not a value for direction');return s=="rtl"&&N(this).attr("dir","ltr").css({direction:"ltr"}),o.direction=s,o.done&&this.turn("size",N(this).width(),N(this).height()),this},animating:function(){return this.data().pageMv.length>0},corner:function(){var s,o,t=this.data();for(o in t.pages)if(H(o,t.pages)&&(s=t.pages[o].flip("corner")))return s;return!1},data:function(){return this.data()},disable:function(s){var o,t=this.data(),d=this.turn("view");t.disabled=s===void 0||s===!0;for(o in t.pages)H(o,t.pages)&&t.pages[o].flip("disable",t.disabled?!0:N.inArray(parseInt(o,10),d)==-1);return this},disabled:function(s){return s===void 0?this.data().disabled===!0:this.turn("disable",s)},size:function(s,o){if(s===void 0||o===void 0)return{width:this.width(),height:this.height()};this.turn("stop");var t,d,g=this.data(),T=g.display=="double"?s/2:s;this.css({width:s,height:o}),g.pageObjs[0]&&g.pageObjs[0].css({width:T,height:o});for(t in g.pageWrap)H(t,g.pageWrap)&&(d=q._pageSize.call(this,t,!0),g.pageObjs[t].css({width:d.width,height:d.height}),g.pageWrap[t].css(d),g.pages[t]&&g.pages[t].css({width:d.width,height:d.height}));return this.turn("resize"),this},resize:function(){var s,o=this.data();for(o.pages[0]&&(o.pageWrap[0].css({left:-this.width()}),o.pages[0].flip("resize",!0)),s=1;s<=o.totalPages;s++)o.pages[s]&&o.pages[s].flip("resize",!0);q._updateShadow.call(this),o.opts.autoCenter&&this.turn("center")},_removeMv:function(s){var o,t=this.data();for(o=0;o0?t[0]:0,t[1]<=o.totalPages?t[1]:0]:[t[0]>0&&t[0]<=o.totalPages?t[0]:0]},stop:function(s,o){if(this.turn("animating")){var t,d,g,T=this.data();for(T.tpage&&(T.page=T.tpage,delete T.tpage),t=0;ts;t--)this.turn("removePage",t);return o.totalPages=s,q._fitPage.call(this,o.page),this}else return o.totalPages},_missing:function(s){var o=this.data();if(!(o.totalPages<1)){var t,d=this.turn("range",s),g=[];for(t=d[0];t<=d[1];t++)o.pageObjs[t]||g.push(t);g.length>0&&this.trigger("missing",[g])}},_fitPage:function(s){var o=this.data(),t=this.turn("view",s);if(q._missing.call(this,s),!!o.pageObjs[s]){o.page=s,this.turn("stop");for(var d=0;dT[1]?(o=T[1],t=W[0]):T[0]&&so?"r":"l"):d.pages[o].flip("turnPage",s>o?"l":"r"):d.direction=="ltr"?d.pages[o].flip("turnPage",Y[s>o?1:0]):d.pages[o].flip("turnPage",Y[s>o?0:1]))},page:function(s){var o=this.data();if(s===void 0)return o.page;if(!o.disabled&&!o.destroying){if(s=parseInt(s,10),s>0&&s<=o.totalPages)return s!=o.page&&(!o.done||N.inArray(s,this.turn("view"))!=-1?q._fitPage.call(this,s):q._turnPage.call(this,s)),this;throw qe("The page "+s+" does not exist")}},next:function(){return this.turn("page",Math.min(this.data().totalPages,q._view.call(this,this.data().page).pop()+1))},previous:function(){return this.turn("page",Math.max(1,q._view.call(this,this.data().page).shift()-1))},peel:function(s,o){var t=this.data(),d=this.turn("view");if(o=o===void 0?!0:o===!0,s===!1)this.turn("stop",null,o);else if(t.display=="single")t.pages[t.page].flip("peel",s,o);else{var g;t.direction=="ltr"?g=s.indexOf("l")!=-1?d[0]:d[1]:g=s.indexOf("l")!=-1?d[1]:d[0],t.pages[g]&&t.pages[g].flip("peel",s,o)}return this},_addMotionPage:function(){var s=N(this).data().f.opts,o=s.turn;o.data(),q._addMv.call(o,s.page)},_eventStart:function(s,o,t){var d=o.turn.data(),g=d.pageZoom[o.page];if(s.isDefaultPrevented()){q._updateShadow.call(o.turn);return}g&&g!=d.zoom&&(o.turn.trigger("zoomed",[o.page,o.turn.turn("view",o.page),g,d.zoom]),d.pageZoom[o.page]=d.zoom),d.display=="single"&&t&&(t.charAt(1)=="l"&&d.direction=="ltr"||t.charAt(1)=="r"&&d.direction=="rtl"?(o.next=o.nexto.page?o.next:o.page+1),q._addMotionPage.call(s.target),q._updateShadow.call(o.turn)},_eventEnd:function(s,o,t){var d=N(s.target);d.data().f;var g=o.turn,T=g.data();if(t){var W=T.tpage||T.page;(W==o.next||W==o.page)&&(delete T.tpage,q._fitPage.call(g,W||o.next,!0))}else q._removeMv.call(g,o.page),q._updateShadow.call(g),g.turn("update")},_eventPressed:function(s){var o=N(s.target).data().f,t=o.opts.turn,d=t.data();return d.pages,d.mouseAction=!0,t.turn("update"),o.time=new Date().getTime()},_eventReleased:function(s,o){var t,d=N(s.target),g=d.data().f,T=g.opts.turn,W=T.data();W.display=="single"?t=o.corner=="br"||o.corner=="tr"?o.xd.width()/2:t=o.x<0||o.x>d.width(),(new Date().getTime()-g.time<200||t)&&(s.preventDefault(),q._turnPage.call(T,g.opts.next)),W.mouseAction=!1},_flip:function(s){s.stopPropagation();var o=N(s.target).data().f.opts;o.turn.trigger("turn",[o.next]),o.turn.data().opts.autoCenter&&o.turn.turn("center",o.next)},_touchStart:function(){var s=this.data();for(var o in s.pages)if(H(o,s.pages)&&U._eventStart.apply(s.pages[o],arguments)===!1)return!1},_touchMove:function(){var s=this.data();for(var o in s.pages)H(o,s.pages)&&U._eventMove.apply(s.pages[o],arguments)},_touchEnd:function(){var s=this.data();for(var o in s.pages)H(o,s.pages)&&U._eventEnd.apply(s.pages[o],arguments)},calculateZ:function(s){var o,t,d,g,T,W=this,R=this.data(),Y=this.turn("view"),ue=Y[0]||Y[1],de=s.length-1,he={pageZ:{},partZ:{},pageV:{}},Re=function(Be){var Ce=W.turn("view",Be);Ce[0]&&(he.pageV[Ce[0]]=!0),Ce[1]&&(he.pageV[Ce[1]]=!0)};for(o=0;o<=de;o++)t=s[o],d=R.pages[t].data().f.opts.next,g=R.pagePlace[t],Re(t),Re(d),T=R.pagePlace[d]==d?d:t,he.pageZ[T]=R.totalPages-Math.abs(ue-T),he.partZ[g]=R.totalPages*2-de+o;return he},update:function(){var s,o=this.data();if(this.turn("animating")&&o.pageMv[0]!==0){var t,d,g=this.turn("calculateZ",o.pageMv),T=this.turn("corner"),W=this.turn("view"),R=this.turn("view",o.tpage);for(s in o.pageWrap)H(s,o.pageWrap)&&(d=o.pageObjs[s].hasClass("fixed"),o.pageWrap[s].css({display:g.pageV[s]||d?"":"none",zIndex:(o.pageObjs[s].hasClass("hard")?g.partZ[s]:g.pageZ[s])||(d?-1:0)}),(t=o.pages[s])&&(t.flip("z",g.partZ[s]||null),g.pageV[s]&&t.flip("resize"),o.tpage?t.flip("hover",!1).flip("disable",N.inArray(parseInt(s,10),o.pageMv)==-1&&s!=R[0]&&s!=R[1]):t.flip("hover",T===!1).flip("disable",s!=W[0]&&s!=W[1])))}else for(s in o.pageWrap)if(H(s,o.pageWrap)){var Y=q._setPageLoc.call(this,s);o.pages[s]&&o.pages[s].flip("disable",o.disabled||Y!=1).flip("hover",!0).flip("z",null)}return this},_updateShadow:function(){var s,o,t,d=this.data(),g=this.width(),T=this.height(),W=d.display=="single"?g:g/2;s=this.turn("view"),d.shadow||(d.shadow=N("
",{class:"shadow",css:me(0,0,0).css}).appendTo(this));for(var R=0;R=t||g.y>=d)return!1;var W=U._cAllowed.call(this);switch(o.effect){case"hard":if(g.x>t-T)g.corner="r";else if(g.x=d-T)g.corner+="b";else return!1;if(g.x<=T)g.corner+="l";else if(g.x>=t-T)g.corner+="r";else return!1;break}return!g.corner||N.inArray(g.corner,W)==-1?!1:g},_isIArea:function(s){var o=this.data().f.parent.offset();return s=G&&s.originalEvent?s.originalEvent.touches[0]:s,U._cornerActivated.call(this,{x:s.pageX-o.left,y:s.pageY-o.top})},_c:function(s,o){switch(o=o||0,s){case"tl":return ne(o,o);case"tr":return ne(this.width()-o,o);case"bl":return ne(o,this.height()-o);case"br":return ne(this.width()-o,this.height()-o);case"l":return ne(o,0);case"r":return ne(this.width()-o,0)}},_c2:function(s){switch(s){case"tl":return ne(this.width()*2,0);case"tr":return ne(-this.width(),0);case"bl":return ne(this.width()*2,this.height());case"br":return ne(-this.width(),this.height());case"l":return ne(this.width()*2,0);case"r":return ne(-this.width(),0)}},_foldingPage:function(){var s=this.data().f;if(s){var o=s.opts;if(o.turn)return s=o.turn.data(),s.display=="single"?o.next>1||o.page>1?s.pageObjs[0]:null:s.pageObjs[o.next]}},_backGradient:function(){var s=this.data().f,o=s.opts.turn.data(),t=o.opts.gradients&&(o.display=="single"||s.opts.page!=2&&s.opts.page!=o.totalPages-1);return t&&!s.bshadow&&(s.bshadow=N("
",me(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(s.parent)),t},type:function(){return this.data().f.effect},resize:function(s){var o=this.data().f,t=o.opts.turn.data(),d=this.width(),g=this.height();switch(o.effect){case"hard":s&&(o.wrapper.css({width:d,height:g}),o.fpage.css({width:d,height:g}),t.opts.gradients&&(o.ashadow.css({width:d,height:g}),o.bshadow.css({width:d,height:g})));break;case"sheet":if(s){var T=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(g,2)));o.wrapper.css({width:T,height:T}),o.fwrapper.css({width:T,height:T}).children(":first-child").css({width:d,height:g}),o.fpage.css({width:d,height:g}),t.opts.gradients&&o.ashadow.css({width:d,height:g}),U._backGradient.call(this)&&o.bshadow.css({width:d,height:g})}if(o.parent.is(":visible")){var W=kt(o.parent[0]);o.fwrapper.css({top:W.top,left:W.left}),W=kt(o.opts.turn[0]),o.fparent.css({top:-W.top,left:-W.left})}this.flip("z",o.opts["z-index"]);break}},_addPageWrapper:function(){var s=this.data().f,o=s.opts.turn.data(),t=this.parent();if(s.parent=t,!s.wrapper)switch(s.effect){case"hard":var d={};d[ge+"transform-style"]="preserve-3d",d[ge+"backface-visibility"]="hidden",s.wrapper=N("
",me(0,0,2)).css(d).appendTo(t).prepend(this),s.fpage=N("
",me(0,0,1)).css(d).appendTo(t),o.opts.gradients&&(s.ashadow=N("
",me(0,0,0)).hide().appendTo(t),s.bshadow=N("
",me(0,0,0)));break;case"sheet":if(this.width(),this.height(),s.fparent=s.opts.turn.data().fparent,!s.fparent){var g=N("
",{css:{"pointer-events":"none"}}).hide();g.data().flips=0,g.css(me(0,0,"auto","visible").css).appendTo(s.opts.turn),s.opts.turn.data().fparent=g,s.fparent=g}this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),s.wrapper=N("
",me(0,0,this.css("z-index"))).appendTo(t).prepend(this),s.fwrapper=N("
",me(t.offset().top,t.offset().left)).hide().appendTo(s.fparent),s.fpage=N("
",me(0,0,0,"visible")).css({cursor:"default"}).appendTo(s.fwrapper),o.opts.gradients&&(s.ashadow=N("
",me(0,0,1)).appendTo(s.fpage)),U.setData.call(this,s);break}U.resize.call(this,!0)},_fold:function(s){var o=this.data().f,t=o.opts.turn.data(),d=U._c.call(this,s.corner),g=this.width(),T=this.height();switch(o.effect){case"hard":s.corner=="l"?s.x=Math.min(Math.max(s.x,0),g*2):s.x=Math.max(Math.min(s.x,g),-g);var W,R,Y,ue,de,he=t.totalPages,Re=o.opts["z-index"]||he,Be={overflow:"visible"},Ce=d.x?(d.x-s.x)/g:s.x/g,Ae=Ce*90,Xe=Ae<90;switch(s.corner){case"l":ue="0% 50%",de="100% 50%",Xe?(W=0,R=o.opts.next-1>0,Y=1):(W="100%",R=o.opts.page+1Ne&&(ye.x=ye.x+Math.abs(ye.y*pe.y/pe.x),ye.y=0,Math.round(ye.x*Math.tan(X-fe))Ne){var lt=X-fe,ct=Nt-T/Math.sin(lt);Ge=ne(Math.round(ct*Math.cos(lt)),Math.round(ct*Math.sin(lt))),rt&&(Ge.x=-Ge.x),nt&&(Ge.y=-Ge.y)}pt=Math.round(ye.y/Math.tan(fe)+ye.x);var st=g-pt,ut=st*Math.cos(fe*2),ft=st*Math.sin(fe*2);if(Ct=ne(Math.round(rt?st-ut:pt+ut),Math.round(nt?ft:T-ft)),t.opts.gradients){Ze=st*Math.sin(fe);var ot=U._c2.call(Ye,s.corner),_e=Math.sqrt(Math.pow(ot.x-s.x,2)+Math.pow(ot.y-s.y,2))/g;St=Math.sin(Ne*(_e>1?2-_e:_e)),mt=Math.min(_e,1),gt=Ze>100?(Ze-100)/Ze:0,et=ne(Ze*Math.sin(fe)/g*100,Ze*Math.cos(fe)/T*100),U._backGradient.call(Ye)&&(tt=ne(Ze*1.2*Math.sin(fe)/g*100,Ze*1.2*Math.cos(fe)/T*100),rt||(tt.x=100-tt.x),nt||(tt.y=100-tt.y))}return ye.x=Math.round(ye.x),ye.y=Math.round(ye.y),!0},yt=function(pe,Le,fe,Ve){var it=["0","auto"],lt=(g-Nt)*fe[0]/100,ct=(T-Nt)*fe[1]/100,st={left:it[Le[0]],top:it[Le[1]],right:it[Le[2]],bottom:it[Le[3]]},ut={},ft=Ve!=90&&Ve!=-90?rt?-1:1:0,ot=fe[0]+"% "+fe[1]+"%";Ye.css(st).transform(M(Ve)+K(pe.x+ft,pe.y,vt),ot),o.fpage.css(st).transform(M(Ve)+K(pe.x+Ct.x-Ge.x-g*fe[0]/100,pe.y+Ct.y-Ge.y-T*fe[1]/100,vt)+M((180/Ve-2)*Ve),ot),o.wrapper.transform(K(-pe.x+lt-ft,-pe.y+ct,vt)+M(-Ve),ot),o.fwrapper.transform(K(-pe.x+Ge.x+lt,-pe.y+Ge.y+ct,vt)+M(-Ve),ot),t.opts.gradients&&(fe[0]&&(et.x=100-et.x),fe[1]&&(et.y=100-et.y),ut["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*St+")",jt.css(ut),ve(o.ashadow,ne(rt?100:0,nt?0:100),ne(et.x,et.y),[[gt,"rgba(0,0,0,0)"],[(1-gt)*.8+gt,"rgba(0,0,0,"+.2*mt+")"],[1,"rgba(255,255,255,"+.2*mt+")"]],3),U._backGradient.call(Ye)&&ve(o.bshadow,ne(rt?0:100,nt?0:100),ne(tt.x,tt.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*mt+")"],[1,"rgba(0,0,0,0)"]],3))};switch(s.corner){case"l":break;case"r":break;case"tl":s.x=Math.max(s.x,1),at(),yt(ye,[1,0,0,1],[100,0],Ke);break;case"tr":s.x=Math.min(s.x,g-1),at(),yt(ne(-ye.x,ye.y),[0,0,0,1],[0,0],-Ke);break;case"bl":s.x=Math.max(s.x,1),at(),yt(ne(ye.x,-ye.y),[1,1,0,0],[100,100],-Ke);break;case"br":s.x=Math.min(s.x,g-1),at(),yt(ne(-ye.x,-ye.y),[0,1,1,0],[0,100],Ke);break}break}o.point=s},_moveFoldingPage:function(s){var o=this.data().f;if(o){var t=o.opts.turn,d=t.data(),g=d.pagePlace;if(s){var T=o.opts.next;if(g[T]!=o.opts.page){o.folding&&U._moveFoldingPage.call(this,!1);var W=U._foldingPage.call(this);W.appendTo(o.fpage),g[T]=o.opts.page,o.folding=T}t.turn("update")}else if(o.folding){if(d.pages[o.folding]){var R=d.pages[o.folding].data().f;d.pageObjs[o.folding].appendTo(R.wrapper)}else d.pageWrap[o.folding]&&d.pageObjs[o.folding].appendTo(d.pageWrap[o.folding]);o.folding in g&&(g[o.folding]=o.folding),delete o.folding}}},_showFoldedPage:function(s,o){var t=U._foldingPage.call(this),d=this.data(),g=d.f,T=g.visible;if(t){if(!T||!g.point||g.point.corner!=s.corner){var W=g.status=="hover"||g.status=="peel"||g.opts.turn.data().mouseAction?s.corner:null;if(T=!1,Oe("start",this,[g.opts,W])=="prevented")return!1}if(o){var R=this,Y=g.point&&g.point.corner==s.corner?g.point:U._c.call(this,s.corner,1);this.animatef({from:[Y.x,Y.y],to:[s.x,s.y],duration:500,frame:function(ue){s.x=Math.round(ue[0]),s.y=Math.round(ue[1]),U._fold.call(R,s)}})}else U._fold.call(this,s),d.effect&&!d.effect.turning&&this.animatef(!1);if(!T)switch(g.effect){case"hard":g.visible=!0,U._moveFoldingPage.call(this,!0),g.fpage.show(),g.opts.shadows&&g.bshadow.show();break;case"sheet":g.visible=!0,g.fparent.show().data().flips++,U._moveFoldingPage.call(this,!0),g.fwrapper.show(),g.bshadow&&g.bshadow.show();break}return!0}return!1},hide:function(){var s=this.data().f,o=s.opts.turn.data(),t=U._foldingPage.call(this);switch(s.effect){case"hard":o.opts.gradients&&(s.bshadowLoc=0,s.bshadow.remove(),s.ashadow.hide()),s.wrapper.transform(""),s.fpage.hide();break;case"sheet":--s.fparent.data().flips===0&&s.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),s.wrapper.transform(""),s.fwrapper.hide(),s.bshadow&&s.bshadow.hide(),t.transform("");break}return s.visible=!1,this},hideFoldedPage:function(s){var o=this.data().f;if(o.point){var t=this,d=o.point,g=function(){o.point=null,o.status="",t.flip("hide"),t.trigger("end",[o.opts,!1])};if(s){var T=U._c.call(this,d.corner),W=d.corner.substr(0,1)=="t",R=W?Math.min(0,d.y-T.y)/2:Math.max(0,d.y-T.y)/2,Y=ne(d.x,d.y+R),ue=ne(T.x,T.y-R);this.animatef({from:0,to:1,frame:function(de){var he=Ie(d,Y,ue,T,de);d.x=he.x,d.y=he.y,U._fold.call(t,d)},complete:g,duration:800,hiding:!0})}else this.animatef(!1),g()}},turnPage:function(s){var o=this,t=this.data().f,d=t.opts.turn.data();s={corner:t.corner?t.corner.corner:s||U._cAllowed.call(this)[0]};var g=t.point||U._c.call(this,s.corner,t.opts.turn?d.opts.elevation:0),T=U._c2.call(this,s.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(W){var R=Ie(g,g,T,T,W);s.x=R.x,s.y=R.y,U._showFoldedPage.call(o,s)},complete:function(){o.trigger("end",[t.opts,!0])},duration:d.opts.duration,turning:!0}),t.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(s){var o=this.data().f,t=o.opts.turn;if(!o.corner&&!o.disabled&&!this.flip("isTurning")&&o.opts.page==t.data().pagePlace[o.opts.page]){if(o.corner=U._isIArea.call(this,s),o.corner&&U._foldingPage.call(this))return this.trigger("pressed",[o.point]),U._showFoldedPage.call(this,o.corner),!1;o.corner=null}},_eventMove:function(s){var o=this.data().f;if(!o.disabled){if(s=G?s.originalEvent.touches:[s],o.corner){var t=o.parent.offset();o.corner.x=s[0].pageX-t.left,o.corner.y=s[0].pageY-t.top,U._showFoldedPage.call(this,o.corner)}else if(o.hover&&!this.data().effect&&this.is(":visible")){var d=U._isIArea.call(this,s[0]);if(d){if(o.effect=="sheet"&&d.corner.length==2||o.effect=="hard"){o.status="hover";var g=U._c.call(this,d.corner,o.opts.cornerSize/2);d.x=g.x,d.y=g.y,U._showFoldedPage.call(this,d,!0)}}else o.status=="hover"&&(o.status="",U.hideFoldedPage.call(this,!0))}}},_eventEnd:function(){var s=this.data().f,o=s.corner;!s.disabled&&o&&Oe("released",this,[s.point||o])!="prevented"&&U.hideFoldedPage.call(this,!0),s.corner=null},disable:function(s){return U.setData.call(this,{disabled:s}),this},hover:function(s){return U.setData.call(this,{hover:s}),this},peel:function(s,o){var t=this.data().f;if(s){if(N.inArray(s,Me.all)==-1)throw qe("Corner "+s+" is not permitted");if(N.inArray(s,U._cAllowed.call(this))!=-1){var d=U._c.call(this,s,t.opts.cornerSize/2);t.status="peel",U._showFoldedPage.call(this,{corner:s,x:d.x,y:d.y},o)}}else t.status="",U.hideFoldedPage.call(this,o);return this}};function je(s,o,t){if(!t[0]||typeof t[0]=="object")return o.init.apply(s,t);if(o[t[0]])return o[t[0]].apply(s,Array.prototype.slice.call(t,1));throw qe(t[0]+" is not a method or property")}function me(s,o,t,d){return{css:{position:"absolute",top:s,left:o,overflow:d||"hidden",zIndex:t||"auto"}}}function Ie(s,o,t,d,g){var T=1-g,W=T*T*T,R=g*g*g;return ne(Math.round(W*s.x+3*g*T*T*o.x+3*g*g*T*t.x+R*d.x),Math.round(W*s.y+3*g*T*T*o.y+3*g*g*T*t.y+R*d.y))}function $e(s){return s/X*180}function ne(s,o){return{x:s,y:o}}function J(){var s;if(s=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent)){var o=parseFloat(s[1]);return o>534.3}else return!0}function K(s,o,t){return D&&t?" translate3d("+s+"px,"+o+"px, 0px) ":" translate("+s+"px, "+o+"px) "}function M(s){return" rotate("+s+"deg) "}function H(s,o){return Object.prototype.hasOwnProperty.call(o,s)}function oe(){for(var s=["Moz","Webkit","Khtml","O","ms"],o=s.length,t="";o--;)s[o]+"Transform"in document.body.style&&(t="-"+s[o].toLowerCase()+"-");return t}function ee(){var s,o=document.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(s in t)if(o.style[s]!==void 0)return t[s]}function ve(s,o,t,d,g){var T,W=[];if(ge=="-webkit-"){for(T=0;T{Gt({api:"goBack"})},Z=localStorage.getItem("courseware-list")?JSON.parse(localStorage.getItem("courseware-list")):{},X=Ft({currentGradeNum:Z.currentGradeNum||null,bookVersionId:Z.bookVersionId||null,subjectId:Z.subjectId||((K=bt.user.data)==null?void 0:K.subjectId)||null,page:1,rows:999,type:"COURSEWARE"});Rn(()=>ln.grades.map((M,H)=>({...M,color:X.currentGradeNum===H?"var(--van-primary-color)":"",className:X.currentGradeNum===H?"fontBlod":""})));const Ne=He(!1),G=Ft({list:[],loading:!1,favoriteList:[],tab:"all",details:[],bookData:{},subjectList:[],showBook:!1,book:{}}),ke=async()=>{try{const M=bt.user.data.schoolInfos,H=M&&M.length>0?M[0].id:null;if(!H)return;const{data:oe}=await Kn({id:H});D.value=oe.bookVersionList||[],te.value=Rt(D.value),D.value.findIndex(ve=>ve.bookVersionId==Z.bookVersoinId)<0&&(X.bookVersionId=null)}catch(M){console.log(M)}},Me=async()=>{var ve;G.loading=!0;const{bookVersionId:M,currentGradeNum:H,...oe}=X,ee=await Xn({...oe,bookVersionId:M==-1?null:M,currentGradeNum:H||""});(ee==null?void 0:ee.code)===200&&Array.isArray((ve=ee==null?void 0:ee.data)==null?void 0:ve.rows)&&(G.list=ee.data.rows.map(Oe=>(Oe.load=!1,Oe.key=Date.now()+Oe.id,Oe))),G.loading=!1,setTimeout(()=>{Ne.value=!0},100)},se=async()=>{var H,oe,ee;G.loading=!0;const M=await Yn({clientType:"STUDENT",userId:(oe=(H=bt.user)==null?void 0:H.data)==null?void 0:oe.id,page:X.page,rows:X.rows,subjectId:X.subjectId,bookVersionId:X.bookVersionId!=-1?X.bookVersionId:"",currentGradeNum:X.currentGradeNum?X.currentGradeNum:""});(M==null?void 0:M.code)===200&&Array.isArray((ee=M==null?void 0:M.data)==null?void 0:ee.rows)&&(G.list=M.data.rows.map(ve=>(ve.name=`${ve.name}`,ve.load=!1,ve.favoriteFlag=!0,ve.key=Date.now()+ve.id,ve))),G.loading=!1},xe=async()=>{var H;G.loading=!0;const M=await Zn({bookVersionId:X.bookVersionId?X.bookVersionId:"",page:X.page,rows:X.rows,subjectId:X.subjectId,currentGradeNum:X.currentGradeNum?X.currentGradeNum:""});(M==null?void 0:M.code)===200&&Array.isArray((H=M==null?void 0:M.data)==null?void 0:H.rows)&&(G.list=M.data.rows.map(oe=>(oe.load=!1,oe.key=Date.now()+oe.id,oe))),G.loading=!1},Ee=()=>{G.tab==="all"&&Me(),G.tab==="favorite"&&se(),G.tab==="course"&&xe()},Se=He(),De=()=>{G.tab==="course"?te.value=[...Rt(D.value),{bookVersionId:-1,bookVersionName:"自定义"}]:te.value=Rt(D.value),Ee(),Se.value&&an().isTablet&&Se.value.scrollTo(0,0)},q=async()=>{try{const M=await Qn({enableFlag:!0,delFlag:0,page:1,rows:999});G.subjectList=M.data.rows||[]}catch(M){}};Vt(async()=>{await ke(),await q(),Ee(),Gt({api:"setStatusBarVisibility",content:{isVisibility:0}})});const U=async M=>{M.favoriteFlag?await Jn({lessonCoursewareId:M.id}):(await $n({lessonCoursewareId:M.id}),G.tab)};let je=null;const me=(M,H=300)=>{je&&clearTimeout(je),je=setTimeout(M,H)},Ie=async M=>{var H,oe;if(G.tab==="course"){const ee=await er({id:M.id,subjectId:X.subjectId});if((ee==null?void 0:ee.code)==200&&Array.isArray((H=ee==null?void 0:ee.data)==null?void 0:H.lessonList))G.details=ee.data.lessonList||[],G.bookData=ee.data,console.log("🚀 ~ data.details course:",G.details);else{qn({title:"提示",message:"课程教材已更新,是否重新加载?"}).then(()=>{Ee()}).catch(()=>{});return}}else{const ee=await tr({id:M.id,subjectId:X.subjectId});(ee==null?void 0:ee.code)==200&&Array.isArray((oe=ee==null?void 0:ee.data)==null?void 0:oe.lessonList)&&(G.details=ee.data.lessonList||[],G.bookData=ee.data,console.log("🚀 ~ data.details:",G.details))}$e(M.id),ne(()=>{G.showBook=!0})},$e=M=>{const H=document.querySelector(`[data-id="${M}"]`);if(!H)return;const oe=H.getBoundingClientRect();G.book=oe},ne=M=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{M()})})},J=async M=>{await Ie(M)};return()=>j("div",{class:[ae.container,an().isTablet?ae.containerTablet:""]},[j("div",{class:ae.head,style:{opacity:G.showBook?0:""}},[j("div",{class:ae.back,onClick:ge},[j("img",{src:fn},null)]),j(sr,{class:ae.tabs,active:G.tab,"onUpdate:active":M=>G.tab=M,onChange:()=>De()},{default:()=>[j(zt,{title:"全部教材",name:"all"},null),j(zt,{title:"课程教材",name:"course"},null),j(zt,{name:"favorite"},{title:()=>j("div",{id:"courseware-2"},[We("我的收藏")])})]}),j(Tt,on({class:[ae.downBtn,G.tab!="course"&&X.bookVersionId>0||G.tab=="course"&&X.bookVersionId||X.subjectId||X.currentGradeNum?ae.activeBtn:""],round:!0,size:"small",onClick:()=>N.value=!0},{id:"courseware-3"}),{default:()=>[We("筛选"),j("svg",{class:[ae.icon,N.value?ae.iconUp:""],width:"9px",height:"5px",viewBox:"0 0 9 5",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[j("title",null,[We("三角形")]),j("g",{id:"演示用",stroke:"none","stroke-width":"1",fill:"currentColor","fill-rule":"evenodd"},[j("g",{id:"全部教材-筛选",transform:"translate(-769.000000, -35.000000)",fill:"currentColor"},[j("g",{id:"编组-3",transform:"translate(696.000000, 20.000000)"},[j("g",{id:"筛选目录备份-2",transform:"translate(13.000000, 7.000000)"},[j("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)])])])])])]})]),j("div",{ref:Se,class:[ae.content,G.list.length<=0&&!G.loading?ae.contentEmpty:""]},[j("div",{class:[ae.wrap,G.list.length<=0&&!G.loading?ae.emtpyWrap:""]},[G.list.map((M,H)=>j("div",{class:[ae.wrapItem,G.bookData.id===M.id&&G.showBook?ae.wrapItemHide:""],key:M.key,onClick:()=>J(M)},[j("div",{class:ae.item},[j(ir,on({"data-id":M.id},{id:H==0?"courseware-0":""},{class:[ae.cover,M.load?ae.loaded:""],objectFit:"cover",src:M.coverImg,onLoad:()=>{M.load=!0}}),null)]),j("div",{class:ae.name},[M.name]),!G.loading&&G.tab!=="course"&&j("div",{id:H===0?"courseware-1":"",class:ae.favoriteBtn,onClick:oe=>{oe.stopPropagation(),M.favoriteFlag=!M.favoriteFlag,me(()=>U(M))}},[j(Br,{isFavorite:M.favoriteFlag},null)])])),G.list.length<=0&&!G.loading&&j(zn,{image:"list",description:"暂无数据"},null)])]),j($r,{show:G.showBook,bookData:G.bookData,subjectId:X.subjectId,tab:G.tab,rect:G.book,onClose:()=>{G.showBook=!1}},null),Ne.value?j(ei,null,null):null,j(cn,{show:N.value,"onUpdate:show":M=>N.value=M,class:ae.popupContainer},{default:()=>[j("div",{class:ae.popoverContainer},[j("div",{class:ae.searchList},[te.value.length>0&&j(Ut,null,[j("div",{class:ae.popoverTitle},[We("教材版本")]),j("div",{class:[ae.popupList,ae.versionList]},[te.value.map(M=>j(qt,{plain:X.bookVersionId==M.bookVersionId,round:!0,onClick:()=>X.bookVersionId=M.bookVersionId},{default:()=>[M.bookVersionName]}))])]),j("div",{class:ae.popoverTitle},[We("选择年级")]),j("div",{class:[ae.popupList,ae.versionList]},[ln.grades.map(M=>j(qt,{plain:X.currentGradeNum===M.value,round:!0,onClick:()=>X.currentGradeNum=M.value},{default:()=>[M.text]}))]),j("div",{class:ae.popoverTitle},[We("选择声部")]),j("div",{class:[ae.popupList,ae.versionList]},[G.subjectList.map(M=>j(qt,{plain:X.subjectId==M.id,round:!0,onClick:()=>X.subjectId=M.id},{default:()=>[M.name]}))])]),j("div",{class:ae.btnGroup},[j(Tt,{round:!0,onClick:()=>{var M;X.bookVersionId=null,X.currentGradeNum=null,X.subjectId=((M=bt.user.data)==null?void 0:M.subjectId)||null}},{default:()=>[We("重置")]}),j(Tt,{round:!0,class:ae.btnSure,onClick:()=>{localStorage.setItem("courseware-list",JSON.stringify({bookVersionId:X.bookVersionId,currentGradeNum:X.currentGradeNum,subjectId:X.subjectId})),Ee(),N.value=!1}},{default:()=>[We("确认")]})])])]})])}});export{ln as BOOK_DATA,ci as default};